From f3a17c548775a286202ff63c97adaf2f0655f95e Mon Sep 17 00:00:00 2001 From: Monte Lai Date: Thu, 3 Aug 2023 12:25:51 +0800 Subject: [PATCH] fix: eth-overview test --- .../app/wallet-overview/eth-overview.test.js | 23 +++++++++++++++---- ui/ducks/send/send.js | 1 - 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ui/components/app/wallet-overview/eth-overview.test.js b/ui/components/app/wallet-overview/eth-overview.test.js index 5a1c8c2aa113..8acc1a39a62f 100644 --- a/ui/components/app/wallet-overview/eth-overview.test.js +++ b/ui/components/app/wallet-overview/eth-overview.test.js @@ -241,12 +241,25 @@ describe('EthOverview', () => { const mockedStoreWithCustodyKeyring = { metamask: { ...mockStore.metamask, - keyrings: [ - { - type: 'Custody', - accounts: ['0x1'], + internalAccounts: { + ...mockStore.metamask.internalAccounts, + accounts: { + ...mockStore.metamask.internalAccounts.accounts, + [mockStore.metamask.internalAccounts.selectedAccount]: { + ...mockStore.metamask.internalAccounts.accounts[ + mockStore.metamask.internalAccounts.selectedAccount + ], + metadata: { + ...mockStore.metamask.internalAccounts.accounts[ + mockStore.metamask.internalAccounts.selectedAccount + ].metadata, + keyring: { + type: 'Custody', + }, + }, + }, }, - ], + }, }, }; diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 76ab5a140361..a685244920f8 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -29,7 +29,6 @@ import { getCurrentChainId, getGasPriceInHexWei, getIsMainnet, - getTargetAccount, getIsNonStandardEthChain, checkNetworkAndAccountSupports1559, getUseTokenDetection,