From 28e52aba4655c4585532bc17dc7a96fbb658b45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20G=C3=B3mez?= Date: Wed, 13 Nov 2024 15:29:42 +0100 Subject: [PATCH] Remove FF_IMITATION_MAPPING (#2125) --- src/config/entities/__tests__/configuration.ts | 1 - src/config/entities/configuration.ts | 2 -- .../transactions/mappers/transactions-history.mapper.ts | 8 -------- ...ions-history.imitation-transactions.controller.spec.ts | 1 - 4 files changed, 12 deletions(-) diff --git a/src/config/entities/__tests__/configuration.ts b/src/config/entities/__tests__/configuration.ts index 85c81212ba..f72c6ce1bf 100644 --- a/src/config/entities/__tests__/configuration.ts +++ b/src/config/entities/__tests__/configuration.ts @@ -138,7 +138,6 @@ export default (): ReturnType => ({ zerionBalancesChainIds: ['137'], debugLogs: false, configHooksDebugLogs: false, - imitationMapping: false, auth: false, delegatesV2: false, counterfactualBalances: false, diff --git a/src/config/entities/configuration.ts b/src/config/entities/configuration.ts index 7f62fc356e..31e5ce8786 100644 --- a/src/config/entities/configuration.ts +++ b/src/config/entities/configuration.ts @@ -215,8 +215,6 @@ export default () => ({ debugLogs: process.env.FF_DEBUG_LOGS?.toLowerCase() === 'true', configHooksDebugLogs: process.env.FF_CONFIG_HOOKS_DEBUG_LOGS?.toLowerCase() === 'true', - imitationMapping: - process.env.FF_IMITATION_MAPPING?.toLowerCase() === 'true', auth: process.env.FF_AUTH?.toLowerCase() === 'true', delegatesV2: process.env.FF_DELEGATES_V2?.toLowerCase() === 'true', counterfactualBalances: diff --git a/src/routes/transactions/mappers/transactions-history.mapper.ts b/src/routes/transactions/mappers/transactions-history.mapper.ts index b2307b6d29..657fc4c5a8 100644 --- a/src/routes/transactions/mappers/transactions-history.mapper.ts +++ b/src/routes/transactions/mappers/transactions-history.mapper.ts @@ -24,7 +24,6 @@ import { @Injectable() export class TransactionsHistoryMapper { - private readonly isImitationMappingEnabled: boolean; private readonly maxNestedTransfers: number; constructor( @@ -36,9 +35,6 @@ export class TransactionsHistoryMapper { private readonly transferImitationMapper: TransferImitationMapper, private readonly creationTransactionMapper: CreationTransactionMapper, ) { - this.isImitationMappingEnabled = this.configurationService.getOrThrow( - 'features.imitationMapping', - ); this.maxNestedTransfers = this.configurationService.getOrThrow( 'mappings.history.maxNestedTransfers', ); @@ -150,10 +146,6 @@ export class TransactionsHistoryMapper { .filter((x: T): x is NonNullable => x != null) .flat(); - if (!this.isImitationMappingEnabled) { - return transactionItems; - } - return this.transferImitationMapper.mapImitations({ transactions: transactionItems, previousTransaction: args.previousTransaction, diff --git a/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts b/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts index a7a452358c..a66a968339 100644 --- a/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts +++ b/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts @@ -84,7 +84,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = }, features: { ...configuration().features, - imitationMapping: true, improvedAddressPoisoning: true, }, });