From 04e4ca828f27505f552f7ff9882115951bf97f4f Mon Sep 17 00:00:00 2001 From: Yaco 0x Date: Tue, 17 Sep 2024 16:39:29 -0300 Subject: [PATCH] refactor: simplify typing --- packages/automated-dispute/src/services/eboProcessor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/automated-dispute/src/services/eboProcessor.ts b/packages/automated-dispute/src/services/eboProcessor.ts index 99c8cbc..25a314d 100644 --- a/packages/automated-dispute/src/services/eboProcessor.ts +++ b/packages/automated-dispute/src/services/eboProcessor.ts @@ -77,9 +77,9 @@ export class EboProcessor { for (const [moduleName, moduleAddress] of Object.entries(this.accountingModules)) { const isApproved = approvedModules.includes(moduleAddress); - const key = (isApproved ? "approved" : "notApproved") as keyof typeof summary; + const key = isApproved ? "approved" : "notApproved"; - summary[key] = { ...summary[key], [moduleName]: moduleAddress }; + summary[key][moduleName as keyof AccountingModules] = moduleAddress; } if (Object.keys(summary.notApproved).length > 0) {