diff --git a/src/domain/common/utils/utils.ts b/src/domain/common/utils/utils.ts index 753c7970c1..feab14315f 100644 --- a/src/domain/common/utils/utils.ts +++ b/src/domain/common/utils/utils.ts @@ -5,3 +5,16 @@ export function getNumberString(value: number): string { useGrouping: false, }); } + +/** + * Truncates an address with a specific lengthed prefix and suffix + * @param {`0x${string}`} address to truncate + * @param {number} [length] of the prefix and suffix, minus hex prefix + * @returns {`0x${string}`} truncated address + */ +export function truncateAddress( + address: `0x${string}`, + length: number = 4, +): `0x${string}` { + return `${address.slice(0, length + 2)}...${address.slice(-length)}` as `0x${string}`; +} diff --git a/src/routes/transactions/__tests__/controllers/get-transaction-by-id.transactions.controller.spec.ts b/src/routes/transactions/__tests__/controllers/get-transaction-by-id.transactions.controller.spec.ts index 4f3a0d8ec8..3d14efa8c1 100644 --- a/src/routes/transactions/__tests__/controllers/get-transaction-by-id.transactions.controller.spec.ts +++ b/src/routes/transactions/__tests__/controllers/get-transaction-by-id.transactions.controller.spec.ts @@ -250,7 +250,6 @@ describe('Get by id - Transactions Controller (Unit)', () => { value: moduleTransaction.value, }, humanDescription: null, - richDecodedInfo: null, }, txData: { to: expect.objectContaining({ value: contract.address }), diff --git a/src/routes/transactions/__tests__/controllers/preview-transaction-cow-swap.transactions.controller.spec.ts b/src/routes/transactions/__tests__/controllers/preview-transaction-cow-swap.transactions.controller.spec.ts index 32053234a2..f4c8680858 100644 --- a/src/routes/transactions/__tests__/controllers/preview-transaction-cow-swap.transactions.controller.spec.ts +++ b/src/routes/transactions/__tests__/controllers/preview-transaction-cow-swap.transactions.controller.spec.ts @@ -164,7 +164,6 @@ describe('Preview transaction - CoW Swap - Transactions Controller (Unit)', () = txInfo: { type: 'SwapOrder', humanDescription: null, - richDecodedInfo: null, uid: order.uid, status: order.status, kind: order.kind, @@ -300,7 +299,6 @@ describe('Preview transaction - CoW Swap - Transactions Controller (Unit)', () = txInfo: { type: 'SwapOrder', humanDescription: null, - richDecodedInfo: null, uid: order.uid, status: order.status, kind: order.kind, @@ -780,7 +778,6 @@ describe('Preview transaction - CoW Swap - Transactions Controller (Unit)', () = txInfo: { type: 'TwapOrder', humanDescription: null, - richDecodedInfo: null, status: 'presignaturePending', kind: 'sell', class: 'limit', @@ -917,7 +914,6 @@ describe('Preview transaction - CoW Swap - Transactions Controller (Unit)', () = txInfo: { type: 'TwapOrder', humanDescription: null, - richDecodedInfo: null, status: 'presignaturePending', kind: 'sell', class: 'limit', diff --git a/src/routes/transactions/__tests__/controllers/preview-transaction-kiln.transactions.controller.spec.ts b/src/routes/transactions/__tests__/controllers/preview-transaction-kiln.transactions.controller.spec.ts index 95a3b7f67a..2df488cf54 100644 --- a/src/routes/transactions/__tests__/controllers/preview-transaction-kiln.transactions.controller.spec.ts +++ b/src/routes/transactions/__tests__/controllers/preview-transaction-kiln.transactions.controller.spec.ts @@ -191,7 +191,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingDeposit', humanDescription: null, - richDecodedInfo: null, status: 'NOT_STAKED', estimatedEntryTime: networkStats.estimated_entry_time_seconds * 1_000, @@ -348,7 +347,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingDeposit', humanDescription: null, - richDecodedInfo: null, status: 'NOT_STAKED', estimatedEntryTime: networkStats.estimated_entry_time_seconds * 1_000, @@ -960,7 +958,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingValidatorsExit', humanDescription: null, - richDecodedInfo: null, status: 'ACTIVE', estimatedExitTime: networkStats.estimated_exit_time_seconds * 1_000, @@ -1112,7 +1109,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingValidatorsExit', humanDescription: null, - richDecodedInfo: null, status: 'ACTIVE', estimatedExitTime: networkStats.estimated_exit_time_seconds * 1_000, @@ -1712,7 +1708,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingWithdraw', humanDescription: null, - richDecodedInfo: null, value: ( +stakes[0].net_claimable_consensus_rewards! + +stakes[1].net_claimable_consensus_rewards! @@ -1863,7 +1858,6 @@ describe('Preview transaction - Kiln - Transactions Controller (Unit)', () => { txInfo: { type: 'NativeStakingWithdraw', humanDescription: null, - richDecodedInfo: null, value: ( +stakes[0].net_claimable_consensus_rewards! + +stakes[1].net_claimable_consensus_rewards! diff --git a/src/routes/transactions/__tests__/controllers/preview-transaction.transactions.controller.spec.ts b/src/routes/transactions/__tests__/controllers/preview-transaction.transactions.controller.spec.ts index ef4ca8b95e..f5ae444c31 100644 --- a/src/routes/transactions/__tests__/controllers/preview-transaction.transactions.controller.spec.ts +++ b/src/routes/transactions/__tests__/controllers/preview-transaction.transactions.controller.spec.ts @@ -140,7 +140,6 @@ describe('Preview transaction - Transactions Controller (Unit)', () => { actionCount: null, isCancellation: false, humanDescription: null, - richDecodedInfo: null, }, txData: { hexData: previewTransactionDto.data, @@ -207,7 +206,6 @@ describe('Preview transaction - Transactions Controller (Unit)', () => { actionCount: null, isCancellation: false, humanDescription: null, - richDecodedInfo: null, }, txData: { hexData: previewTransactionDto.data, @@ -273,7 +271,6 @@ describe('Preview transaction - Transactions Controller (Unit)', () => { actionCount: null, isCancellation: false, humanDescription: null, - richDecodedInfo: null, }, txData: { hexData: previewTransactionDto.data, @@ -354,7 +351,6 @@ describe('Preview transaction - Transactions Controller (Unit)', () => { actionCount: null, isCancellation: false, humanDescription: null, - richDecodedInfo: null, }, txData: { hexData: previewTransactionDto.data, diff --git a/src/routes/transactions/entities/__tests__/human-description.builder.ts b/src/routes/transactions/entities/__tests__/human-description.builder.ts deleted file mode 100644 index 48958e4c6e..0000000000 --- a/src/routes/transactions/entities/__tests__/human-description.builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { IBuilder } from '@/__tests__/builder'; -import { Builder } from '@/__tests__/builder'; -import type { - RichAddressFragment, - RichTokenValueFragment, - RichTextFragment, - RichDecodedInfoFragment, -} from '@/routes/transactions/entities/human-description.entity'; -import { RichFragmentType } from '@/routes/transactions/entities/human-description.entity'; -import { faker } from '@faker-js/faker'; - -function richTokenValueFragmentBuilder(): IBuilder { - return new Builder() - .with('type', RichFragmentType.TokenValue) - .with('value', faker.string.numeric()) - .with('symbol', faker.finance.currencySymbol()) - .with('logoUri', faker.image.avatar()); -} - -function richTextFragmentBuilder(): IBuilder { - return new Builder() - .with('type', RichFragmentType.Text) - .with('value', faker.word.words()); -} - -function richAddressFragmentBuilder(): IBuilder { - return new Builder() - .with('type', RichFragmentType.Address) - .with('value', faker.finance.ethereumAddress()); -} - -const humanDescriptionBuilders: Array<() => IBuilder> = - [ - richTokenValueFragmentBuilder, - richTextFragmentBuilder, - richAddressFragmentBuilder, - ]; - -export function buildHumanDescription(): RichDecodedInfoFragment[] { - return Array.from({ length: faker.number.int({ min: 0, max: 6 }) }, () => - faker.helpers.arrayElement(humanDescriptionBuilders)().build(), - ); -} diff --git a/src/routes/transactions/entities/creation-transaction-info.entity.ts b/src/routes/transactions/entities/creation-transaction-info.entity.ts index de73662660..62fd47b2b6 100644 --- a/src/routes/transactions/entities/creation-transaction-info.entity.ts +++ b/src/routes/transactions/entities/creation-transaction-info.entity.ts @@ -24,7 +24,7 @@ export class CreationTransactionInfo extends TransactionInfo { factory: AddressInfo | null, saltNonce: string | null, ) { - super(TransactionInfoType.Creation, null, null); + super(TransactionInfoType.Creation, null); this.creator = creator; this.transactionHash = transactionHash; this.implementation = implementation; diff --git a/src/routes/transactions/entities/custom-transaction.entity.ts b/src/routes/transactions/entities/custom-transaction.entity.ts index 74939905ab..6fbe28c68d 100644 --- a/src/routes/transactions/entities/custom-transaction.entity.ts +++ b/src/routes/transactions/entities/custom-transaction.entity.ts @@ -1,6 +1,5 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { AddressInfo } from '@/routes/common/entities/address-info.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { TransactionInfo, TransactionInfoType, @@ -28,9 +27,8 @@ export class CustomTransactionInfo extends TransactionInfo { actionCount: number | null, isCancellation: boolean, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ) { - super(TransactionInfoType.Custom, humanDescription, richDecodedInfo); + super(TransactionInfoType.Custom, humanDescription); this.to = to; this.dataSize = dataSize; this.value = value; diff --git a/src/routes/transactions/entities/settings-change-transaction.entity.ts b/src/routes/transactions/entities/settings-change-transaction.entity.ts index 3c7cee02ac..708efe21dd 100644 --- a/src/routes/transactions/entities/settings-change-transaction.entity.ts +++ b/src/routes/transactions/entities/settings-change-transaction.entity.ts @@ -1,6 +1,5 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { DataDecoded } from '@/routes/data-decode/entities/data-decoded.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { SettingsChange } from '@/routes/transactions/entities/settings-changes/settings-change.entity'; import { TransactionInfo, @@ -17,13 +16,8 @@ export class SettingsChangeTransaction extends TransactionInfo { dataDecoded: DataDecoded, settingsInfo: SettingsChange | null, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ) { - super( - TransactionInfoType.SettingsChange, - humanDescription, - richDecodedInfo, - ); + super(TransactionInfoType.SettingsChange, humanDescription); this.dataDecoded = dataDecoded; this.settingsInfo = settingsInfo; } diff --git a/src/routes/transactions/entities/staking/native-staking-deposit-info.entity.ts b/src/routes/transactions/entities/staking/native-staking-deposit-info.entity.ts index a17c527f3c..86e6e0e6f2 100644 --- a/src/routes/transactions/entities/staking/native-staking-deposit-info.entity.ts +++ b/src/routes/transactions/entities/staking/native-staking-deposit-info.entity.ts @@ -86,7 +86,7 @@ export class NativeStakingDepositTransactionInfo tokenInfo: TokenInfo; validators: Array<`0x${string}`> | null; }) { - super(TransactionInfoType.NativeStakingDeposit, null, null); + super(TransactionInfoType.NativeStakingDeposit, null); this.status = args.status; this.estimatedEntryTime = args.estimatedEntryTime; this.estimatedExitTime = args.estimatedExitTime; diff --git a/src/routes/transactions/entities/staking/native-staking-validators-exit-info.entity.ts b/src/routes/transactions/entities/staking/native-staking-validators-exit-info.entity.ts index c2f71bb425..557e062dd5 100644 --- a/src/routes/transactions/entities/staking/native-staking-validators-exit-info.entity.ts +++ b/src/routes/transactions/entities/staking/native-staking-validators-exit-info.entity.ts @@ -40,7 +40,7 @@ export class NativeStakingValidatorsExitTransactionInfo extends TransactionInfo tokenInfo: TokenInfo; validators: Array<`0x${string}`>; }) { - super(TransactionInfoType.NativeStakingValidatorsExit, null, null); + super(TransactionInfoType.NativeStakingValidatorsExit, null); this.status = args.status; this.estimatedExitTime = args.estimatedExitTime; this.estimatedWithdrawalTime = args.estimatedWithdrawalTime; diff --git a/src/routes/transactions/entities/staking/native-staking-withdraw-info.entity.ts b/src/routes/transactions/entities/staking/native-staking-withdraw-info.entity.ts index cdf2591824..1d1760a4bd 100644 --- a/src/routes/transactions/entities/staking/native-staking-withdraw-info.entity.ts +++ b/src/routes/transactions/entities/staking/native-staking-withdraw-info.entity.ts @@ -23,7 +23,7 @@ export class NativeStakingWithdrawTransactionInfo extends TransactionInfo { tokenInfo: TokenInfo; validators: Array<`0x${string}`>; }) { - super(TransactionInfoType.NativeStakingWithdraw, null, null); + super(TransactionInfoType.NativeStakingWithdraw, null); this.value = args.value; this.tokenInfo = args.tokenInfo; this.validators = args.validators; diff --git a/src/routes/transactions/entities/swaps/swap-order-info.entity.ts b/src/routes/transactions/entities/swaps/swap-order-info.entity.ts index 214be39aed..e8b3bb19ee 100644 --- a/src/routes/transactions/entities/swaps/swap-order-info.entity.ts +++ b/src/routes/transactions/entities/swaps/swap-order-info.entity.ts @@ -134,7 +134,7 @@ export class SwapOrderTransactionInfo owner: `0x${string}`; fullAppData: Record | null; }) { - super(TransactionInfoType.SwapOrder, null, null); + super(TransactionInfoType.SwapOrder, null); this.uid = args.uid; this.status = args.orderStatus; this.kind = args.kind; diff --git a/src/routes/transactions/entities/swaps/twap-order-info.entity.ts b/src/routes/transactions/entities/swaps/twap-order-info.entity.ts index 7a629bcc48..94a9871c58 100644 --- a/src/routes/transactions/entities/swaps/twap-order-info.entity.ts +++ b/src/routes/transactions/entities/swaps/twap-order-info.entity.ts @@ -195,7 +195,7 @@ export class TwapOrderTransactionInfo durationOfPart: DurationOfPart; startTime: StartTime; }) { - super(TransactionInfoType.SwapOrder, null, null); + super(TransactionInfoType.SwapOrder, null); this.status = args.status; this.kind = args.kind; this.class = args.class; diff --git a/src/routes/transactions/entities/transaction-info.entity.ts b/src/routes/transactions/entities/transaction-info.entity.ts index 99115fdc27..1883b962db 100644 --- a/src/routes/transactions/entities/transaction-info.entity.ts +++ b/src/routes/transactions/entities/transaction-info.entity.ts @@ -1,5 +1,4 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; export enum TransactionInfoType { Creation = 'Creation', @@ -19,16 +18,12 @@ export class TransactionInfo { type: TransactionInfoType; @ApiPropertyOptional({ type: String, nullable: true }) humanDescription: string | null; - @ApiPropertyOptional({ type: RichDecodedInfo, nullable: true }) - richDecodedInfo: RichDecodedInfo | null; protected constructor( type: TransactionInfoType, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ) { this.type = type; this.humanDescription = humanDescription; - this.richDecodedInfo = richDecodedInfo; } } diff --git a/src/routes/transactions/entities/transfer-transaction-info.entity.ts b/src/routes/transactions/entities/transfer-transaction-info.entity.ts index 1c8f608912..48265c87e6 100644 --- a/src/routes/transactions/entities/transfer-transaction-info.entity.ts +++ b/src/routes/transactions/entities/transfer-transaction-info.entity.ts @@ -1,6 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; import { AddressInfo } from '@/routes/common/entities/address-info.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { TransactionInfo, TransactionInfoType, @@ -29,9 +28,8 @@ export class TransferTransactionInfo extends TransactionInfo { direction: TransferDirection, transferInfo: Transfer, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ) { - super(TransactionInfoType.Transfer, humanDescription, richDecodedInfo); + super(TransactionInfoType.Transfer, humanDescription); this.sender = sender; this.recipient = recipient; this.direction = direction; diff --git a/src/routes/transactions/mappers/common/custom-transaction.mapper.spec.ts b/src/routes/transactions/mappers/common/custom-transaction.mapper.spec.ts index d87e8fc87b..9601071659 100644 --- a/src/routes/transactions/mappers/common/custom-transaction.mapper.spec.ts +++ b/src/routes/transactions/mappers/common/custom-transaction.mapper.spec.ts @@ -7,7 +7,6 @@ import { import type { AddressInfoHelper } from '@/routes/common/address-info/address-info.helper'; import { NULL_ADDRESS } from '@/routes/common/constants'; import { AddressInfo } from '@/routes/common/entities/address-info.entity'; -import { buildHumanDescription } from '@/routes/transactions/entities/__tests__/human-description.builder'; import { CustomTransactionInfo } from '@/routes/transactions/entities/custom-transaction.entity'; import { CustomTransactionMapper } from '@/routes/transactions/mappers/common/custom-transaction.mapper'; import { getAddress } from 'viem'; @@ -38,7 +37,6 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { dataSize, chainId, null, - null, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -67,7 +65,6 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { dataSize, chainId, null, - null, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -96,7 +93,6 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { dataSize, chainId, null, - null, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -140,7 +136,6 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { dataSize, chainId, null, - null, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -179,7 +174,6 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { dataSize, chainId, null, - null, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -200,16 +194,12 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { const chainId = faker.string.numeric(); const transaction = multisigTransactionBuilder().build(); const humanDescription = 'Send 10 ETH to vitalik.eth'; - const richDecodedInfo = { - fragments: buildHumanDescription(), - }; const customTransaction = await mapper.mapCustomTransaction( transaction, dataSize, chainId, humanDescription, - richDecodedInfo, ); expect(customTransaction).toBeInstanceOf(CustomTransactionInfo); @@ -218,8 +208,5 @@ describe('Multisig Custom Transaction mapper (Unit)', () => { humanDescription, }), ); - expect(customTransaction).toEqual( - expect.objectContaining({ richDecodedInfo }), - ); }); }); diff --git a/src/routes/transactions/mappers/common/custom-transaction.mapper.ts b/src/routes/transactions/mappers/common/custom-transaction.mapper.ts index 7f250e114c..1b5ed4920e 100644 --- a/src/routes/transactions/mappers/common/custom-transaction.mapper.ts +++ b/src/routes/transactions/mappers/common/custom-transaction.mapper.ts @@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common'; import { ModuleTransaction } from '@/domain/safe/entities/module-transaction.entity'; import { MultisigTransaction } from '@/domain/safe/entities/multisig-transaction.entity'; import { isMultisigTransaction } from '@/domain/safe/entities/transaction.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { AddressInfoHelper } from '@/routes/common/address-info/address-info.helper'; import { NULL_ADDRESS } from '@/routes/common/constants'; import { @@ -21,7 +20,6 @@ export class CustomTransactionMapper { dataSize: number, chainId: string, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ): Promise { const toAddressInfo = await this.addressInfoHelper.getOrDefault( chainId, @@ -37,7 +35,6 @@ export class CustomTransactionMapper { this.getActionCount(transaction), this.isCancellation(transaction, dataSize), humanDescription, - richDecodedInfo, ); } diff --git a/src/routes/transactions/mappers/common/erc20-transfer.mapper.ts b/src/routes/transactions/mappers/common/erc20-transfer.mapper.ts index 497876e01a..ca5adfa9e5 100644 --- a/src/routes/transactions/mappers/common/erc20-transfer.mapper.ts +++ b/src/routes/transactions/mappers/common/erc20-transfer.mapper.ts @@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common'; import { ModuleTransaction } from '@/domain/safe/entities/module-transaction.entity'; import { MultisigTransaction } from '@/domain/safe/entities/multisig-transaction.entity'; import { Token } from '@/domain/tokens/entities/token.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { AddressInfoHelper } from '@/routes/common/address-info/address-info.helper'; import { NULL_ADDRESS } from '@/routes/common/constants'; import { TransferTransactionInfo } from '@/routes/transactions/entities/transfer-transaction-info.entity'; @@ -23,7 +22,6 @@ export class Erc20TransferMapper { chainId: string, transaction: MultisigTransaction | ModuleTransaction, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ): Promise { const { dataDecoded } = transaction; const sender = this.dataDecodedParamHelper.getFromParam( @@ -60,7 +58,6 @@ export class Erc20TransferMapper { token.decimals, ), humanDescription, - richDecodedInfo, ); } } diff --git a/src/routes/transactions/mappers/common/erc721-transfer.mapper.ts b/src/routes/transactions/mappers/common/erc721-transfer.mapper.ts index db672a87a4..4cd763c6fa 100644 --- a/src/routes/transactions/mappers/common/erc721-transfer.mapper.ts +++ b/src/routes/transactions/mappers/common/erc721-transfer.mapper.ts @@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common'; import { ModuleTransaction } from '@/domain/safe/entities/module-transaction.entity'; import { MultisigTransaction } from '@/domain/safe/entities/multisig-transaction.entity'; import { Token } from '@/domain/tokens/entities/token.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { AddressInfoHelper } from '@/routes/common/address-info/address-info.helper'; import { NULL_ADDRESS } from '@/routes/common/constants'; import { TransferTransactionInfo } from '@/routes/transactions/entities/transfer-transaction-info.entity'; @@ -23,7 +22,6 @@ export class Erc721TransferMapper { chainId: string, transaction: MultisigTransaction | ModuleTransaction, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ): Promise { const { dataDecoded } = transaction; const sender = this.dataDecodedParamHelper.getFromParam( @@ -59,7 +57,6 @@ export class Erc721TransferMapper { token.logoUri, ), humanDescription, - richDecodedInfo, ); } } diff --git a/src/routes/transactions/mappers/common/human-description.mapper.ts b/src/routes/transactions/mappers/common/human-description.mapper.ts index 0b1259e9fd..a39ab6c3c9 100644 --- a/src/routes/transactions/mappers/common/human-description.mapper.ts +++ b/src/routes/transactions/mappers/common/human-description.mapper.ts @@ -25,6 +25,7 @@ import { } from '@/routes/transactions/entities/human-description.entity'; import { SafeAppInfoMapper } from '@/routes/transactions/mappers/common/safe-app-info.mapper'; import { asError } from '@/logging/utils'; +import { truncateAddress } from '@/domain/common/utils/utils'; @Injectable() export class HumanDescriptionMapper { @@ -38,7 +39,36 @@ export class HumanDescriptionMapper { private readonly safeAppInfoMapper: SafeAppInfoMapper, ) {} - async mapRichDecodedInfo( + public async mapHumanDescription( + transaction: MultisigTransaction | ModuleTransaction, + chainId: string, + ): Promise { + const richDecodedInfo = await this.mapRichDecodedInfo(transaction, chainId); + + if (!richDecodedInfo?.fragments) return null; + + return richDecodedInfo.fragments + .map((fragment) => { + if (fragment instanceof RichTokenValueFragment) { + return fragment.symbol + ? `${fragment.value} ${fragment.symbol}` + : fragment.value; + } + + if (fragment instanceof RichAddressFragment) { + if (!isAddress(fragment.value)) { + throw Error('Invalid address'); + } + + return truncateAddress(fragment.value); + } + + return fragment.value; + }) + .join(' '); + } + + private async mapRichDecodedInfo( transaction: MultisigTransaction | ModuleTransaction, chainId: string, ): Promise { @@ -79,26 +109,6 @@ export class HumanDescriptionMapper { } } - mapHumanDescription(richDecodedInfo: RichDecodedInfo | null): string | null { - if (!richDecodedInfo?.fragments) return null; - - return richDecodedInfo.fragments - .map((fragment) => { - if (fragment instanceof RichTokenValueFragment) { - return fragment.symbol - ? `${fragment.value} ${fragment.symbol}` - : fragment.value; - } - - if (fragment instanceof RichAddressFragment) { - return this.shortenAddress(fragment.value); - } - - return fragment.value; - }) - .join(' '); - } - private async enrichFragments( fragments: HumanDescriptionFragment[], transaction: MultisigTransaction | ModuleTransaction, @@ -148,7 +158,7 @@ export class HumanDescriptionMapper { ); } - async enrichSafeAppInfo( + private async enrichSafeAppInfo( fragments: RichDecodedInfoFragment[], transaction: MultisigTransaction | ModuleTransaction, chainId: string, @@ -168,20 +178,6 @@ export class HumanDescriptionMapper { return fragments; } - private shortenAddress(address: string, length = 4): string { - if (!isAddress(address)) { - throw Error('Invalid address'); - } - - const visibleCharactersLength = length * 2 + 2; - - if (address.length < visibleCharactersLength) { - return address; - } - - return `${address.slice(0, length + 2)}...${address.slice(-length)}`; - } - private getSigHash(data: Hex): Hex | null { const dataStart = data.slice(0, HumanDescriptionMapper.SIG_HASH_INDEX); diff --git a/src/routes/transactions/mappers/common/human-descriptions.mapper.spec.ts b/src/routes/transactions/mappers/common/human-descriptions.mapper.spec.ts index 976bd3de97..87688a1ba2 100644 --- a/src/routes/transactions/mappers/common/human-descriptions.mapper.spec.ts +++ b/src/routes/transactions/mappers/common/human-descriptions.mapper.spec.ts @@ -15,6 +15,7 @@ import { MAX_UINT256 } from '@/routes/transactions/constants'; import { SafeAppInfo } from '@/routes/transactions/entities/safe-app-info.entity'; import { HumanDescriptionMapper } from '@/routes/transactions/mappers/common/human-description.mapper'; import type { SafeAppInfoMapper } from '@/routes/transactions/mappers/common/safe-app-info.mapper'; +import { truncateAddress } from '@/domain/common/utils/utils'; const tokenRepository = jest.mocked({ getToken: jest.fn(), @@ -79,7 +80,7 @@ describe('Human descriptions mapper (Unit)', () => { it('should return null if there is no data', async () => { const transaction = multisigTransactionBuilder().with('data', null).build(); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); @@ -94,7 +95,7 @@ describe('Human descriptions mapper (Unit)', () => { .with('data', data as `0x${string}`) .build(); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); @@ -105,24 +106,14 @@ describe('Human descriptions mapper (Unit)', () => { it('should return a human-readable description for erc20 transfers', async () => { tokenRepository.getToken.mockImplementation(() => Promise.resolve(token)); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); - const expectedResult = [ - { type: 'text', value: 'Send' }, - { - type: 'tokenValue', - value: formatUnits(mockAmount, token.decimals!), - symbol: token.symbol, - logoUri: token.logoUri, - }, - { type: 'text', value: 'to' }, - { type: 'address', value: mockAddress }, - ]; - - expect(humanDescription).toEqual({ fragments: expectedResult }); + expect(humanDescription).toEqual( + `Send ${formatUnits(mockAmount, token.decimals!)} ${token.symbol} to ${truncateAddress(mockAddress)}`, + ); }); it('should return null for corrupt data', async () => { @@ -134,7 +125,7 @@ describe('Human descriptions mapper (Unit)', () => { .with('data', corruptedData as `0x${string}`) .build(); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); @@ -147,24 +138,14 @@ describe('Human descriptions mapper (Unit)', () => { return Promise.reject(); }); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); - const expectedResult = [ - { type: 'text', value: 'Send' }, - { - type: 'tokenValue', - value: mockAmount.toString(), - symbol: null, - logoUri: null, - }, - { type: 'text', value: 'to' }, - { type: 'address', value: mockAddress }, - ]; - - expect(humanDescription).toEqual({ fragments: expectedResult }); + expect(humanDescription).toEqual( + `Send ${mockAmount} to ${truncateAddress(mockAddress)}`, + ); }); it('should return a description for unlimited token approvals', async () => { @@ -182,22 +163,12 @@ describe('Human descriptions mapper (Unit)', () => { .with('data', mockApprovalData) .build(); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); - const expectedResult = [ - { type: 'text', value: 'Approve' }, - { - type: 'tokenValue', - value: 'unlimited', - symbol: token.symbol, - logoUri: token.logoUri, - }, - ]; - - expect(humanDescription).toEqual({ fragments: expectedResult }); + expect(humanDescription).toEqual(`Approve unlimited ${token.symbol}`); }); it('should append the safe app name to the description if it exists', async () => { @@ -212,24 +183,13 @@ describe('Human descriptions mapper (Unit)', () => { Promise.resolve(mockSafeAppInfo), ); - const humanDescription = await mapper.mapRichDecodedInfo( + const humanDescription = await mapper.mapHumanDescription( transaction, chainId, ); - const expectedResult = [ - { type: 'text', value: 'Send' }, - { - type: 'tokenValue', - value: formatUnits(mockAmount, token.decimals!), - symbol: token.symbol, - logoUri: token.logoUri, - }, - { type: 'text', value: 'to' }, - { type: 'address', value: mockAddress }, - { type: 'text', value: `via ${mockSafeAppName}` }, - ]; - - expect(humanDescription).toEqual({ fragments: expectedResult }); + expect(humanDescription).toEqual( + `Send ${formatUnits(mockAmount, token.decimals!)} ${token.symbol} to ${truncateAddress(mockAddress)} via ${mockSafeAppName}`, + ); }); }); diff --git a/src/routes/transactions/mappers/common/native-coin-transfer.mapper.ts b/src/routes/transactions/mappers/common/native-coin-transfer.mapper.ts index 6ea54d3340..257c05e3f6 100644 --- a/src/routes/transactions/mappers/common/native-coin-transfer.mapper.ts +++ b/src/routes/transactions/mappers/common/native-coin-transfer.mapper.ts @@ -8,7 +8,6 @@ import { TransferDirection, } from '@/routes/transactions/entities/transfer-transaction-info.entity'; import { NativeCoinTransfer } from '@/routes/transactions/entities/transfers/native-coin-transfer.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; @Injectable() export class NativeCoinTransferMapper { @@ -18,7 +17,6 @@ export class NativeCoinTransferMapper { chainId: string, transaction: MultisigTransaction | ModuleTransaction, humanDescription: string | null, - richDecodedInfo: RichDecodedInfo | null, ): Promise { const recipient = await this.addressInfoHelper.getOrDefault( chainId, @@ -32,7 +30,6 @@ export class NativeCoinTransferMapper { TransferDirection.Outgoing, new NativeCoinTransfer(transaction.value), humanDescription, - richDecodedInfo, ); } } diff --git a/src/routes/transactions/mappers/common/transaction-info.mapper.ts b/src/routes/transactions/mappers/common/transaction-info.mapper.ts index 923fb66559..3949d5fdb3 100644 --- a/src/routes/transactions/mappers/common/transaction-info.mapper.ts +++ b/src/routes/transactions/mappers/common/transaction-info.mapper.ts @@ -86,15 +86,12 @@ export class MultisigTransactionInfoMapper { const dataSize = dataByteLength >= 2 ? Math.floor((dataByteLength - 2) / 2) : 0; - const richDecodedInfo = - await this.humanDescriptionMapper.mapRichDecodedInfo( + const humanDescription = + await this.humanDescriptionMapper.mapHumanDescription( transaction, chainId, ); - const humanDescription = - this.humanDescriptionMapper.mapHumanDescription(richDecodedInfo); - const swapOrder: SwapOrderTransactionInfo | null = await this.mapSwapOrder( chainId, transaction, @@ -141,7 +138,6 @@ export class MultisigTransactionInfoMapper { dataSize, chainId, humanDescription, - richDecodedInfo, ); } @@ -150,7 +146,6 @@ export class MultisigTransactionInfoMapper { chainId, transaction, humanDescription, - richDecodedInfo, ); } @@ -181,7 +176,6 @@ export class MultisigTransactionInfoMapper { new DataDecoded(transaction.dataDecoded.method, dataDecodedParameters), settingsInfo, humanDescription, - richDecodedInfo, ); } @@ -197,7 +191,6 @@ export class MultisigTransactionInfoMapper { chainId, transaction, humanDescription, - richDecodedInfo, ); case TokenType.Erc721: return this.erc721TransferMapper.mapErc721Transfer( @@ -205,7 +198,6 @@ export class MultisigTransactionInfoMapper { chainId, transaction, humanDescription, - richDecodedInfo, ); } } @@ -215,7 +207,6 @@ export class MultisigTransactionInfoMapper { dataSize, chainId, humanDescription, - richDecodedInfo, ); } diff --git a/src/routes/transactions/mappers/common/twap-order.mapper.spec.ts b/src/routes/transactions/mappers/common/twap-order.mapper.spec.ts index 0366d4843f..b12abed9b2 100644 --- a/src/routes/transactions/mappers/common/twap-order.mapper.spec.ts +++ b/src/routes/transactions/mappers/common/twap-order.mapper.spec.ts @@ -158,7 +158,6 @@ describe('TwapOrderMapper', () => { owner: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', partSellAmount: '500000000000000000', receiver: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', - richDecodedInfo: null, sellAmount: '1000000000000000000', sellToken: { address: sellToken.address, @@ -341,7 +340,6 @@ describe('TwapOrderMapper', () => { owner: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', partSellAmount: '213586875483862141750', receiver: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', - richDecodedInfo: null, sellAmount: '427173750967724283500', sellToken: { address: sellToken.address, @@ -486,7 +484,6 @@ describe('TwapOrderMapper', () => { owner: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', partSellAmount: '213586875483862141750', receiver: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', - richDecodedInfo: null, sellAmount: '427173750967724283500', sellToken: { address: sellToken.address, @@ -886,7 +883,6 @@ describe('TwapOrderMapper', () => { owner: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', partSellAmount: '500000000000000000', receiver: '0x31eaC7F0141837B266De30f4dc9aF15629Bd5381', - richDecodedInfo: null, sellAmount: '1000000000000000000', sellToken: { address: sellToken.address, diff --git a/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.spec.ts b/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.spec.ts index fe488840a8..dc27571796 100644 --- a/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.spec.ts +++ b/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.spec.ts @@ -151,7 +151,6 @@ describe('SwapTransferInfoMapper', () => { owner: safeAddress, receiver: order.receiver, recipient, - richDecodedInfo: null, sellAmount: order.sellAmount.toString(), sellToken: token, sender, @@ -233,7 +232,6 @@ describe('SwapTransferInfoMapper', () => { owner: safeAddress, receiver: order.receiver, recipient, - richDecodedInfo: null, sellAmount: order.sellAmount.toString(), sellToken: token, sender, @@ -394,7 +392,6 @@ describe('SwapTransferInfoMapper', () => { owner: orders[0].owner, receiver: orders[0].receiver, recipient, - richDecodedInfo: null, sellAmount: orders[0].sellAmount.toString(), sellToken: token, sender, diff --git a/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.ts b/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.ts index 7a09cd5004..74ce5f7b9c 100644 --- a/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.ts +++ b/src/routes/transactions/mappers/transfers/swap-transfer-info.mapper.ts @@ -90,7 +90,7 @@ export class SwapTransferInfoMapper { direction: args.direction, transferInfo: args.transferInfo, humanDescription: null, - richDecodedInfo: null, + // SwapOrderTransactionInfo uid: order.uid, orderStatus: order.status, diff --git a/src/routes/transactions/mappers/transfers/transfer-info.mapper.ts b/src/routes/transactions/mappers/transfers/transfer-info.mapper.ts index 00b7b8a690..5ed09abf83 100644 --- a/src/routes/transactions/mappers/transfers/transfer-info.mapper.ts +++ b/src/routes/transactions/mappers/transfers/transfer-info.mapper.ts @@ -64,7 +64,6 @@ export class TransferInfoMapper { direction, transferInfo, null, - null, ); } diff --git a/src/routes/transactions/mappers/transfers/transfer.mapper.spec.ts b/src/routes/transactions/mappers/transfers/transfer.mapper.spec.ts index e7120c329c..db44346c3b 100644 --- a/src/routes/transactions/mappers/transfers/transfer.mapper.spec.ts +++ b/src/routes/transactions/mappers/transfers/transfer.mapper.spec.ts @@ -337,7 +337,6 @@ describe('Transfer mapper (Unit)', () => { swapTransferInfoMapper.mapSwapTransferInfo.mockResolvedValue({ type: TransactionInfoType.SwapTransfer, humanDescription: null, - richDecodedInfo: null, sender: { value: '0x9008D19f58AAbD9eD0D60971565AA8510560ab41', name: 'GPv2Settlement', @@ -460,7 +459,6 @@ describe('Transfer mapper (Unit)', () => { swapTransferInfoMapper.mapSwapTransferInfo.mockResolvedValue({ type: TransactionInfoType.SwapTransfer, humanDescription: null, - richDecodedInfo: null, sender: { value: '0x9008D19f58AAbD9eD0D60971565AA8510560ab41', name: 'GPv2Settlement', @@ -581,7 +579,6 @@ describe('Transfer mapper (Unit)', () => { swapTransferInfoMapper.mapSwapTransferInfo.mockResolvedValue({ type: TransactionInfoType.SwapTransfer, humanDescription: null, - richDecodedInfo: null, sender: { value: '0x9008D19f58AAbD9eD0D60971565AA8510560ab41', name: 'GPv2Settlement', diff --git a/src/routes/transactions/swap-transfer-transaction-info.entity.ts b/src/routes/transactions/swap-transfer-transaction-info.entity.ts index 54a2a45e61..d6e06a5f67 100644 --- a/src/routes/transactions/swap-transfer-transaction-info.entity.ts +++ b/src/routes/transactions/swap-transfer-transaction-info.entity.ts @@ -1,6 +1,5 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { AddressInfo } from '@/routes/common/entities/address-info.entity'; -import { RichDecodedInfo } from '@/routes/transactions/entities/human-description.entity'; import { TransactionInfo, TransactionInfoType, @@ -120,7 +119,6 @@ export class SwapTransferTransactionInfo direction: TransferDirection; transferInfo: Transfer; humanDescription: string | null; - richDecodedInfo: RichDecodedInfo | null; // SwapOrderTransactionInfo properties uid: string; orderStatus: OrderStatus; @@ -140,11 +138,7 @@ export class SwapTransferTransactionInfo fullAppData: Record | null; }) { // TransferTransactionInfo constructor - super( - TransactionInfoType.SwapTransfer, - args.humanDescription, - args.richDecodedInfo, - ); + super(TransactionInfoType.SwapTransfer, args.humanDescription); this.sender = args.sender; this.recipient = args.recipient; this.direction = args.direction; 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 a077f468e6..9846ebc218 100644 --- a/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts +++ b/src/routes/transactions/transactions-history.imitation-transactions.controller.spec.ts @@ -385,7 +385,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -431,7 +430,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -471,7 +469,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -518,7 +515,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -563,7 +559,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -661,7 +656,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -702,7 +696,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -749,7 +742,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -795,7 +787,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -840,7 +831,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -943,7 +933,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -989,7 +978,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1034,7 +1022,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1132,7 +1119,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1173,7 +1159,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1220,7 +1205,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1266,7 +1250,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1311,7 +1294,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1435,7 +1417,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1485,7 +1466,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1527,7 +1507,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1578,7 +1557,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1623,7 +1601,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1720,7 +1697,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1767,7 +1743,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1818,7 +1793,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1864,7 +1838,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -1909,7 +1882,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2006,7 +1978,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2056,7 +2027,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2098,7 +2068,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2149,7 +2118,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2194,7 +2162,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2291,7 +2258,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2338,7 +2304,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: imitationAddress, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2389,7 +2354,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2435,7 +2399,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2480,7 +2443,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2619,7 +2581,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2666,7 +2627,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2908,7 +2868,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -2954,7 +2913,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3046,7 +3004,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3093,7 +3050,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3139,7 +3095,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3185,7 +3140,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3230,7 +3184,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3314,7 +3267,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3406,7 +3358,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3453,7 +3404,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3499,7 +3449,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3545,7 +3494,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3590,7 +3538,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3710,7 +3657,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3756,7 +3702,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3856,7 +3801,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: safe.address, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3903,7 +3847,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3949,7 +3892,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -3995,7 +3937,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: notImitatedMultisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null, @@ -4040,7 +3981,6 @@ describe('Transactions History Controller (Unit) - Imitation Transactions', () = name: null, value: multisigTransfer.to, }, - richDecodedInfo: null, sender: { logoUri: null, name: null,