From c72199a1a6e4151c40c22f79d0f3b6ed7a2d59a7 Mon Sep 17 00:00:00 2001 From: Brad Decker Date: Sun, 31 Jul 2022 13:26:40 -0500 Subject: [PATCH] update prettier (#15360) --- app/scripts/background.js | 8 +- app/scripts/controllers/detect-tokens.js | 9 +- app/scripts/controllers/detect-tokens.test.js | 10 +- .../controllers/incoming-transactions.test.js | 109 +-- app/scripts/controllers/metametrics.js | 19 +- app/scripts/controllers/metametrics.test.js | 10 +- .../network/network-controller.test.js | 13 +- .../network/pending-middleware.test.js | 3 +- app/scripts/controllers/network/util.test.js | 12 +- .../permissions/caveat-mutators.test.js | 5 +- app/scripts/controllers/swaps.js | 31 +- app/scripts/controllers/swaps.test.js | 66 +- app/scripts/controllers/threebox.js | 5 +- app/scripts/controllers/transactions/index.js | 62 +- .../controllers/transactions/index.test.js | 6 +- .../transactions/pending-tx-tracker.js | 9 +- .../transactions/pending-tx-tracker.test.js | 39 +- .../controllers/transactions/tx-gas-utils.js | 7 +- app/scripts/lib/buy-url.js | 5 +- app/scripts/lib/buy-url.test.js | 5 +- app/scripts/lib/ens-ipfs/resolver.js | 5 +- app/scripts/lib/personal-message-manager.js | 5 +- app/scripts/lib/typed-message-manager.js | 5 +- app/scripts/metamask-controller.js | 745 +++++++++--------- app/scripts/metamask-controller.test.js | 58 +- app/scripts/migrations/022.test.js | 7 +- app/scripts/migrations/030.js | 3 +- app/scripts/migrations/047.js | 3 +- app/scripts/migrations/049.js | 10 +- app/scripts/migrations/052.js | 7 +- app/scripts/migrations/055.js | 17 +- app/scripts/migrations/056.js | 9 +- app/scripts/migrations/064.test.js | 18 +- app/scripts/migrations/065.js | 6 +- app/scripts/migrations/067.js | 11 +- app/scripts/migrations/068.js | 5 +- app/scripts/migrations/068.test.js | 6 +- app/scripts/platforms/extension.js | 6 +- .../build/transforms/remove-fenced-code.js | 10 +- .../transforms/remove-fenced-code.test.js | 5 +- development/verify-locale-strings.js | 3 +- package.json | 6 +- shared/constants/tokens.js | 6 +- shared/modules/contract-utils.test.js | 11 +- shared/modules/transaction.utils.js | 6 +- shared/modules/transaction.utils.test.js | 9 +- test/e2e/metamask-ui.spec.js | 24 +- test/e2e/tests/chain-interactions.spec.js | 7 +- test/e2e/tests/custom-rpc-history.spec.js | 3 +- .../tests/custom-token-add-approve.spec.js | 15 +- ui/components/app/add-network/add-network.js | 7 +- .../advanced-gas-fee-defaults.js | 7 +- .../advanced-gas-fee-gas-limit.js | 12 +- .../base-fee-input/base-fee-input.js | 15 +- .../priority-fee-input/priority-fee-input.js | 15 +- .../advanced-gas-fee-save.js | 8 +- ui/components/app/asset-list/asset-list.js | 12 +- .../app/cancel-button/cancel-button.js | 3 +- .../cancel-speedup-popover.test.js | 17 +- .../collectible-options.js | 6 +- .../collectibles-items/collectibles-items.js | 21 +- .../app/collectibles-tab/collectibles-tab.js | 7 +- .../collectibles-tab/collectibles-tab.test.js | 6 +- ...onfirm-page-container-summary.component.js | 5 +- .../connected-accounts-list.component.js | 7 +- .../connected-accounts-permissions.js | 3 +- .../recipient-group.component.js | 6 +- .../detected-token-selection-popover.js | 5 +- .../app/detected-token/detected-token.js | 17 +- .../app/dropdowns/network-dropdown.js | 5 +- .../edit-gas-display.component.js | 5 +- .../edit-gas-fee-popover.js | 8 +- .../edit-gas-item/useGasItemFeeDetails.js | 5 +- .../edit-gas-popover.component.js | 6 +- .../experimental-area/experimental-area.js | 6 +- .../advanced-gas-inputs.component.js | 27 +- .../advanced-tab-content-component.test.js | 5 +- .../gas-modal-page-container.container.js | 5 +- .../gas-price-button-group-component.test.js | 79 +- .../gas-timing/gas-timing.component.test.js | 32 +- .../ledger-instruction-field.js | 7 +- .../loading-network-screen.component.js | 7 +- ui/components/app/menu-bar/menu-bar.js | 6 +- .../metamask-template-renderer.stories.js | 3 +- .../cancel-transaction.container.js | 8 +- .../edit-approval-permission.component.js | 24 +- .../permissions-connect-footer.component.js | 3 +- .../signature-request-original.component.js | 3 +- .../signature-request-original.container.js | 6 +- .../signature-request.container.js | 13 +- .../signature-request.container.test.js | 3 +- ui/components/app/srp-input/srp-input.test.js | 52 +- ...transaction-activity-log.component.test.js | 24 +- .../transaction-activity-log.container.js | 6 +- .../transaction-activity-log.util.test.js | 18 +- .../transaction-detail-item.component.js | 3 +- .../smart-transaction-list-item.component.js | 16 +- .../transaction-list-item.component.js | 5 +- .../app/whats-new-popup/whats-new-popup.js | 3 +- .../definition-list.stories.js | 3 +- .../ui/identicon/identicon.component.js | 10 +- .../truncated-definition-list.stories.js | 3 +- .../ui/unit-input/unit-input.component.js | 9 +- .../confirm-transaction.duck.js | 19 +- ui/ducks/metamask/metamask.js | 5 +- ui/ducks/send/send.js | 6 +- ui/ducks/swaps/swaps.js | 30 +- ui/ducks/swaps/swaps.test.js | 3 +- ui/helpers/constants/routes.js | 36 +- .../utils/optimism/fetchEstimatedL1Fee.js | 5 +- ui/hooks/gasFeeInput/test-utils.js | 110 +-- ui/hooks/gasFeeInput/useGasEstimates.js | 6 +- ui/hooks/gasFeeInput/useGasEstimates.test.js | 10 +- ui/hooks/gasFeeInput/useGasFeeInputs.js | 40 +- ui/hooks/gasFeeInput/useMaxFeePerGasInput.js | 6 +- .../useMaxPriorityFeePerGasInput.js | 6 +- .../gasFeeInput/useTransactionFunctions.js | 13 +- ui/hooks/useGasFeeErrors.test.js | 26 +- ui/hooks/useGasFeeEstimates.test.js | 38 +- ui/hooks/useTokenData.test.js | 9 +- ui/hooks/useTokenFiatAmount.js | 6 +- ui/index.js | 15 +- ui/pages/asset/components/asset-options.js | 5 +- .../confirm-approve-content.component.test.js | 3 +- .../confirm-approve-content.stories.js | 3 +- ui/pages/confirm-approve/confirm-approve.js | 5 +- .../confirm-decrypt-message.component.js | 3 +- .../confirm-transaction-base.container.js | 6 +- .../confirm-token-transaction-switch.js | 5 +- ui/pages/confirmation/confirmation.js | 5 +- .../templates/add-ethereum-chain.js | 10 +- .../flask/snap-confirm/snap-confirm.js | 3 +- ui/pages/confirmation/templates/index.js | 5 +- .../connected-sites.container.js | 4 +- .../create-account/connect-hardware/index.js | 7 +- .../create-account/import-account/index.js | 3 +- .../create-account/new-account.component.js | 8 +- .../import-with-seed-phrase.component.js | 8 +- .../new-account/new-account.component.js | 8 +- .../first-time-flow-switch.container.js | 8 +- .../confirm-seed-phrase.component.js | 14 +- .../welcome/welcome.container.js | 7 +- ui/pages/mobile-sync/mobile-sync.component.js | 9 +- .../privacy-settings/privacy-settings.js | 5 +- .../secure-your-wallet/secure-your-wallet.js | 5 +- .../flask/snap-install/snap-install.js | 16 +- .../add-recipient/add-recipient.container.js | 5 +- .../send-asset-row.component.js | 8 +- .../send-content/send-content.container.js | 10 +- .../advanced-tab/advanced-tab.component.js | 12 +- .../add-contact/add-contact.component.js | 3 +- .../experimental-tab.component.js | 6 +- .../experimental-tab.container.js | 7 +- .../networks-form/networks-form.test.js | 5 +- .../networks-list-item/networks-list-item.js | 3 +- .../networks-list/networks-list.js | 10 +- .../networks-tab-content.test.js | 5 +- .../security-tab/security-tab.component.js | 12 +- .../settings-tab/settings-tab.component.js | 13 +- .../settings-tab/settings-tab.container.js | 6 +- ui/pages/settings/settings.component.js | 8 +- ui/pages/swaps/awaiting-swap/awaiting-swap.js | 5 +- ui/pages/swaps/build-quote/build-quote.js | 5 +- .../dropdown-input-pair.stories.js | 6 +- .../dropdown-search-list.js | 3 +- ui/pages/swaps/fee-card/fee-card.stories.js | 9 +- ui/pages/swaps/index.js | 6 +- .../loading-swaps-quotes-stories-metadata.js | 18 +- .../loading-swaps-quotes.js | 8 +- .../main-quote-summary/main-quote-summary.js | 5 +- .../select-quote-popover.js | 7 +- ui/pages/swaps/swaps-footer/swaps-footer.js | 3 +- ui/pages/swaps/swaps-util-test-constants.js | 12 +- ui/pages/swaps/swaps.util.js | 28 +- ui/pages/swaps/swaps.util.test.js | 6 +- .../view-quote-price-difference.test.js | 3 +- ui/pages/swaps/view-quote/view-quote.js | 42 +- ui/pages/swaps/view-quote/view-quote.test.js | 5 +- ui/selectors/confirm-transaction.js | 21 +- ui/selectors/custom-gas.js | 19 +- ui/selectors/selectors.test.js | 20 +- ui/selectors/transactions.js | 5 +- ui/store/actions.js | 53 +- ui/store/actions.test.js | 25 +- yarn.lock | 23 +- 185 files changed, 1343 insertions(+), 1712 deletions(-) diff --git a/app/scripts/background.js b/app/scripts/background.js index cb6e4e093..ac1b59d30 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -615,11 +615,11 @@ function setupController(initState, initLangCode, remoteSourcePort) { const { unapprovedMsgCount } = controller.messageManager; const { unapprovedPersonalMsgCount } = controller.personalMessageManager; const { unapprovedDecryptMsgCount } = controller.decryptMessageManager; - const { - unapprovedEncryptionPublicKeyMsgCount, - } = controller.encryptionPublicKeyManager; + const { unapprovedEncryptionPublicKeyMsgCount } = + controller.encryptionPublicKeyManager; const { unapprovedTypedMessagesCount } = controller.typedMessageManager; - const pendingApprovalCount = controller.approvalController.getTotalApprovalCount(); + const pendingApprovalCount = + controller.approvalController.getTotalApprovalCount(); const waitingForUnlockCount = controller.appStateController.waitingForUnlock.length; return ( diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index d7edf6f84..806e87155 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -174,13 +174,8 @@ export default class DetectTokensController { if (result) { const nonZeroTokenAddresses = Object.keys(result); for (const nonZeroTokenAddress of nonZeroTokenAddresses) { - const { - address, - symbol, - decimals, - iconUrl, - aggregators, - } = tokenList[nonZeroTokenAddress]; + const { address, symbol, decimals, iconUrl, aggregators } = + tokenList[nonZeroTokenAddress]; eventTokensDetails.push(`${symbol} - ${address}`); diff --git a/app/scripts/controllers/detect-tokens.test.js b/app/scripts/controllers/detect-tokens.test.js index 5161cf44b..9c52c2e0a 100644 --- a/app/scripts/controllers/detect-tokens.test.js +++ b/app/scripts/controllers/detect-tokens.test.js @@ -291,9 +291,8 @@ describe('DetectTokensController', function () { const contractAddressesToDetect = erc20ContractAddresses.filter( (address) => address !== existingTokenAddress, ); - const indexOfTokenToAdd = contractAddressesToDetect.indexOf( - tokenAddressToAdd, - ); + const indexOfTokenToAdd = + contractAddressesToDetect.indexOf(tokenAddressToAdd); const balances = new Array(contractAddressesToDetect.length); balances[indexOfTokenToAdd] = new BigNumber(10); @@ -353,9 +352,8 @@ describe('DetectTokensController', function () { const contractAddressesToDetect = erc20ContractAddresses.filter( (address) => address !== existingTokenAddress, ); - const indexOfTokenToAdd = contractAddressesToDetect.indexOf( - tokenAddressToAdd, - ); + const indexOfTokenToAdd = + contractAddressesToDetect.indexOf(tokenAddressToAdd); const balances = new Array(contractAddressesToDetect.length); balances[indexOfTokenToAdd] = new BigNumber(10); diff --git a/app/scripts/controllers/incoming-transactions.test.js b/app/scripts/controllers/incoming-transactions.test.js index fd5f9d9cf..ee6f559e9 100644 --- a/app/scripts/controllers/incoming-transactions.test.js +++ b/app/scripts/controllers/incoming-transactions.test.js @@ -190,9 +190,8 @@ describe('IncomingTransactionsController', function () { ); assert(mockedNetworkMethods.onNetworkDidChange.calledOnce); - const networkControllerListenerCallback = mockedNetworkMethods.onNetworkDidChange.getCall( - 0, - ).args[0]; + const networkControllerListenerCallback = + mockedNetworkMethods.onNetworkDidChange.getCall(0).args[0]; assert.strictEqual(incomingTransactionsController._update.callCount, 0); networkControllerListenerCallback('testNetworkType'); assert.strictEqual(incomingTransactionsController._update.callCount, 1); @@ -253,8 +252,10 @@ describe('IncomingTransactionsController', function () { initState: getNonEmptyInitState(), }, ); - const startBlock = getNonEmptyInitState() - .incomingTxLastFetchedBlockByChainId[ROPSTEN_CHAIN_ID]; + const startBlock = + getNonEmptyInitState().incomingTxLastFetchedBlockByChainId[ + ROPSTEN_CHAIN_ID + ]; nock('https://api-ropsten.etherscan.io') .get( `/api?module=account&action=txlist&address=${MOCK_SELECTED_ADDRESS}&tag=latest&page=1&startBlock=${startBlock}`, @@ -546,8 +547,10 @@ describe('IncomingTransactionsController', function () { }, ); const NEW_MOCK_SELECTED_ADDRESS = `${MOCK_SELECTED_ADDRESS}9`; - const startBlock = getNonEmptyInitState() - .incomingTxLastFetchedBlockByChainId[ROPSTEN_CHAIN_ID]; + const startBlock = + getNonEmptyInitState().incomingTxLastFetchedBlockByChainId[ + ROPSTEN_CHAIN_ID + ]; nock('https://api-ropsten.etherscan.io') .get( `/api?module=account&action=txlist&address=${NEW_MOCK_SELECTED_ADDRESS}&tag=latest&page=1&startBlock=${startBlock}`, @@ -572,9 +575,10 @@ describe('IncomingTransactionsController', function () { incomingTransactionsController.store, ); - const subscription = incomingTransactionsController.preferencesController.store.subscribe.getCall( - 1, - ).args[0]; + const subscription = + incomingTransactionsController.preferencesController.store.subscribe.getCall( + 1, + ).args[0]; // The incoming transactions controller will always skip the first event // We need to call subscription twice to test the event handling // TODO: stop skipping the first event @@ -658,9 +662,10 @@ describe('IncomingTransactionsController', function () { incomingTransactionsController.store, ); - const subscription = incomingTransactionsController.preferencesController.store.subscribe.getCall( - 1, - ).args[0]; + const subscription = + incomingTransactionsController.preferencesController.store.subscribe.getCall( + 1, + ).args[0]; // The incoming transactions controller will always skip the first event // We need to call subscription twice to test the event handling // TODO: stop skipping the first event @@ -682,9 +687,8 @@ describe('IncomingTransactionsController', function () { }); it('should update when switching to a supported network', async function () { - const mockedNetworkMethods = getMockNetworkControllerMethods( - ROPSTEN_CHAIN_ID, - ); + const mockedNetworkMethods = + getMockNetworkControllerMethods(ROPSTEN_CHAIN_ID); const incomingTransactionsController = new IncomingTransactionsController( { blockTracker: getMockBlockTracker(), @@ -693,8 +697,10 @@ describe('IncomingTransactionsController', function () { initState: getNonEmptyInitState(), }, ); - const startBlock = getNonEmptyInitState() - .incomingTxLastFetchedBlockByChainId[ROPSTEN_CHAIN_ID]; + const startBlock = + getNonEmptyInitState().incomingTxLastFetchedBlockByChainId[ + ROPSTEN_CHAIN_ID + ]; nock('https://api-ropsten.etherscan.io') .get( `/api?module=account&action=txlist&address=${MOCK_SELECTED_ADDRESS}&tag=latest&page=1&startBlock=${startBlock}`, @@ -715,8 +721,8 @@ describe('IncomingTransactionsController', function () { incomingTransactionsController.store, ); - const subscription = mockedNetworkMethods.onNetworkDidChange.getCall(0) - .args[0]; + const subscription = + mockedNetworkMethods.onNetworkDidChange.getCall(0).args[0]; await subscription(ROPSTEN_CHAIN_ID); await updateStateCalled(); @@ -763,9 +769,8 @@ describe('IncomingTransactionsController', function () { }); it('should not update when switching to an unsupported network', async function () { - const mockedNetworkMethods = getMockNetworkControllerMethods( - ROPSTEN_CHAIN_ID, - ); + const mockedNetworkMethods = + getMockNetworkControllerMethods(ROPSTEN_CHAIN_ID); const incomingTransactionsController = new IncomingTransactionsController( { blockTracker: getMockBlockTracker(), @@ -796,8 +801,8 @@ describe('IncomingTransactionsController', function () { incomingTransactionsController.store, ); - const subscription = mockedNetworkMethods.onNetworkDidChange.getCall(0) - .args[0]; + const subscription = + mockedNetworkMethods.onNetworkDidChange.getCall(0).args[0]; incomingTransactionsController.getCurrentChainId = () => FAKE_CHAIN_ID; await subscription(); @@ -820,15 +825,14 @@ describe('IncomingTransactionsController', function () { describe('_update', function () { describe('when state is empty (initialized)', function () { it('should use provided block number and update the latest block seen', async function () { - const incomingTransactionsController = new IncomingTransactionsController( - { + const incomingTransactionsController = + new IncomingTransactionsController({ blockTracker: getMockBlockTracker(), ...getMockNetworkControllerMethods(ROPSTEN_CHAIN_ID), preferencesController: getMockPreferencesController(), initState: getEmptyInitState(), getCurrentChainId: () => ROPSTEN_CHAIN_ID, - }, - ); + }); sinon.spy(incomingTransactionsController.store, 'updateState'); incomingTransactionsController._getNewIncomingTransactions = sinon @@ -857,15 +861,14 @@ describe('IncomingTransactionsController', function () { }); it('should update the last fetched block for network to highest block seen in incoming txs', async function () { - const incomingTransactionsController = new IncomingTransactionsController( - { + const incomingTransactionsController = + new IncomingTransactionsController({ blockTracker: getMockBlockTracker(), ...getMockNetworkControllerMethods(ROPSTEN_CHAIN_ID), preferencesController: getMockPreferencesController(), initState: getEmptyInitState(), getCurrentChainId: () => ROPSTEN_CHAIN_ID, - }, - ); + }); const NEW_TRANSACTION_ONE = { id: 555, @@ -911,15 +914,14 @@ describe('IncomingTransactionsController', function () { describe('when state is populated with prior data for network', function () { it('should use the last fetched block for the current network and increment by 1 in state', async function () { - const incomingTransactionsController = new IncomingTransactionsController( - { + const incomingTransactionsController = + new IncomingTransactionsController({ blockTracker: getMockBlockTracker(), ...getMockNetworkControllerMethods(ROPSTEN_CHAIN_ID), preferencesController: getMockPreferencesController(), initState: getNonEmptyInitState(), getCurrentChainId: () => ROPSTEN_CHAIN_ID, - }, - ); + }); sinon.spy(incomingTransactionsController.store, 'updateState'); incomingTransactionsController._getNewIncomingTransactions = sinon .stub() @@ -1105,11 +1107,12 @@ describe('IncomingTransactionsController', function () { }, ); - const result = await incomingTransactionsController._getNewIncomingTransactions( - ADDRESS_TO_FETCH_FOR, - '789', - ROPSTEN_CHAIN_ID, - ); + const result = + await incomingTransactionsController._getNewIncomingTransactions( + ADDRESS_TO_FETCH_FOR, + '789', + ROPSTEN_CHAIN_ID, + ); assert(mockFetch.calledOnce); assert.deepStrictEqual(result, [ @@ -1137,11 +1140,12 @@ describe('IncomingTransactionsController', function () { }, ); - const result = await incomingTransactionsController._getNewIncomingTransactions( - ADDRESS_TO_FETCH_FOR, - '789', - ROPSTEN_CHAIN_ID, - ); + const result = + await incomingTransactionsController._getNewIncomingTransactions( + ADDRESS_TO_FETCH_FOR, + '789', + ROPSTEN_CHAIN_ID, + ); assert.deepStrictEqual(result, []); window.fetch = tempFetchStatusZero; mockFetchStatusZero.reset(); @@ -1164,11 +1168,12 @@ describe('IncomingTransactionsController', function () { }, ); - const result = await incomingTransactionsController._getNewIncomingTransactions( - ADDRESS_TO_FETCH_FOR, - '789', - ROPSTEN_CHAIN_ID, - ); + const result = + await incomingTransactionsController._getNewIncomingTransactions( + ADDRESS_TO_FETCH_FOR, + '789', + ROPSTEN_CHAIN_ID, + ); assert.deepStrictEqual(result, []); window.fetch = tempFetchEmptyResult; mockFetchEmptyResult.reset(); diff --git a/app/scripts/controllers/metametrics.js b/app/scripts/controllers/metametrics.js index 67c879c94..4fa9ee2a3 100644 --- a/app/scripts/controllers/metametrics.js +++ b/app/scripts/controllers/metametrics.js @@ -558,15 +558,16 @@ export default class MetaMetricsController { [TRAITS.NETWORKS_ADDED]: metamaskState.frequentRpcListDetail.map( (rpc) => rpc.chainId, ), - [TRAITS.NETWORKS_WITHOUT_TICKER]: metamaskState.frequentRpcListDetail.reduce( - (networkList, currentNetwork) => { - if (!currentNetwork.ticker) { - networkList.push(currentNetwork.chainId); - } - return networkList; - }, - [], - ), + [TRAITS.NETWORKS_WITHOUT_TICKER]: + metamaskState.frequentRpcListDetail.reduce( + (networkList, currentNetwork) => { + if (!currentNetwork.ticker) { + networkList.push(currentNetwork.chainId); + } + return networkList; + }, + [], + ), [TRAITS.NFT_AUTODETECTION_ENABLED]: metamaskState.useCollectibleDetection, [TRAITS.NUMBER_OF_ACCOUNTS]: Object.values(metamaskState.identities) .length, diff --git a/app/scripts/controllers/metametrics.test.js b/app/scripts/controllers/metametrics.test.js index 804132295..57f4c5c3c 100644 --- a/app/scripts/controllers/metametrics.test.js +++ b/app/scripts/controllers/metametrics.test.js @@ -132,12 +132,10 @@ function getMetaMetricsController({ } = {}) { return new MetaMetricsController({ segment, - getNetworkIdentifier: networkController.getNetworkIdentifier.bind( - networkController, - ), - getCurrentChainId: networkController.getCurrentChainId.bind( - networkController, - ), + getNetworkIdentifier: + networkController.getNetworkIdentifier.bind(networkController), + getCurrentChainId: + networkController.getCurrentChainId.bind(networkController), onNetworkDidChange: networkController.on.bind( networkController, NETWORK_EVENTS.NETWORK_DID_CHANGE, diff --git a/app/scripts/controllers/network/network-controller.test.js b/app/scripts/controllers/network/network-controller.test.js index 260d30187..0ff8f938f 100644 --- a/app/scripts/controllers/network/network-controller.test.js +++ b/app/scripts/controllers/network/network-controller.test.js @@ -34,8 +34,8 @@ describe('NetworkController', () => { describe('#provider', () => { it('provider should be updatable without reassignment', () => { networkController.initializeProvider(networkControllerProviderConfig); - const providerProxy = networkController.getProviderAndBlockTracker() - .provider; + const providerProxy = + networkController.getProviderAndBlockTracker().provider; expect(providerProxy.test).toBeUndefined(); providerProxy.setTarget({ test: true }); expect(providerProxy.test).toStrictEqual(true); @@ -79,7 +79,8 @@ describe('NetworkController', () => { describe('#getEIP1559Compatibility', () => { it('should return false when baseFeePerGas is not in the block header', async () => { networkController.initializeProvider(networkControllerProviderConfig); - const supportsEIP1559 = await networkController.getEIP1559Compatibility(); + const supportsEIP1559 = + await networkController.getEIP1559Compatibility(); expect(supportsEIP1559).toStrictEqual(false); }); @@ -88,7 +89,8 @@ describe('NetworkController', () => { getLatestBlockStub.callsFake(() => Promise.resolve({ baseFeePerGas: '0xa ' }), ); - const supportsEIP1559 = await networkController.getEIP1559Compatibility(); + const supportsEIP1559 = + await networkController.getEIP1559Compatibility(); expect(supportsEIP1559).toStrictEqual(true); }); @@ -98,7 +100,8 @@ describe('NetworkController', () => { Promise.resolve({ baseFeePerGas: '0xa ' }), ); await networkController.getEIP1559Compatibility(); - const supportsEIP1559 = await networkController.getEIP1559Compatibility(); + const supportsEIP1559 = + await networkController.getEIP1559Compatibility(); expect(getLatestBlockStub.calledOnce).toStrictEqual(true); expect(supportsEIP1559).toStrictEqual(true); }); diff --git a/app/scripts/controllers/network/pending-middleware.test.js b/app/scripts/controllers/network/pending-middleware.test.js index be0289648..9544dc792 100644 --- a/app/scripts/controllers/network/pending-middleware.test.js +++ b/app/scripts/controllers/network/pending-middleware.test.js @@ -68,8 +68,7 @@ describe('PendingNonceMiddleware', () => { from: '0xf231d46dd78806e1dd93442cf33c7671f8538748', gas: GAS_LIMITS.SIMPLE, gasPrice: '0x1e8480', - hash: - '0x2cc5a25744486f7383edebbf32003e5a66e18135799593d6b5cdd2bb43674f09', + hash: '0x2cc5a25744486f7383edebbf32003e5a66e18135799593d6b5cdd2bb43674f09', input: '0x', nonce: '0x4', type: TRANSACTION_ENVELOPE_TYPES.LEGACY, diff --git a/app/scripts/controllers/network/util.test.js b/app/scripts/controllers/network/util.test.js index 4e650f3db..4ca1768cb 100644 --- a/app/scripts/controllers/network/util.test.js +++ b/app/scripts/controllers/network/util.test.js @@ -25,8 +25,7 @@ describe('network utils', () => { chainId: '0x3', time: 1624408066355, metamaskNetworkId: '3', - hash: - '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', + hash: '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', r: '0x4c3111e42ed5eec3dcecba1e234700f387e8693c373c61c3e54a762a26f1570e', s: '0x18bfc4eeb7ebcfacc3bd59ea100a6834ea3265e65945dbec69aa2a06564fafff', v: '0x29', @@ -38,8 +37,7 @@ describe('network utils', () => { from: '0xc684832530fcbddae4b4230a47e991ddcec2831d', gas: '0x7b0d', gasPrice: '0x77359400', - hash: - '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', + hash: '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', input: '0x', maxFeePerGas: '0x77359400', maxPriorityFeePerGas: '0x77359400', @@ -72,8 +70,7 @@ describe('network utils', () => { chainId: '0x3', time: 1624408066355, metamaskNetworkId: '3', - hash: - '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', + hash: '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', r: '0x4c3111e42ed5eec3dcecba1e234700f387e8693c373c61c3e54a762a26f1570e', s: '0x18bfc4eeb7ebcfacc3bd59ea100a6834ea3265e65945dbec69aa2a06564fafff', v: '0x29', @@ -84,8 +81,7 @@ describe('network utils', () => { blockNumber: null, from: '0xc684832530fcbddae4b4230a47e991ddcec2831d', gas: '0x7b0d', - hash: - '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', + hash: '0x4bcb6cd6b182209585f8ad140260ddb35c81a575dd40f508d9767e652a9f60e7', input: '0x', gasPrice: '0x77359400', nonce: '0x4b', diff --git a/app/scripts/controllers/permissions/caveat-mutators.test.js b/app/scripts/controllers/permissions/caveat-mutators.test.js index 476b3e1f6..23b140163 100644 --- a/app/scripts/controllers/permissions/caveat-mutators.test.js +++ b/app/scripts/controllers/permissions/caveat-mutators.test.js @@ -4,9 +4,8 @@ import { CaveatMutatorFactories } from './caveat-mutators'; describe('caveat mutators', () => { describe('restrictReturnedAccounts', () => { - const { removeAccount } = CaveatMutatorFactories[ - CaveatTypes.restrictReturnedAccounts - ]; + const { removeAccount } = + CaveatMutatorFactories[CaveatTypes.restrictReturnedAccounts]; describe('removeAccount', () => { it('returns the no-op operation if the target account is not permitted', () => { diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index 01ccf0b38..e49eff3c5 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -90,7 +90,8 @@ const initialState = { swapsQuoteRefreshTime: FALLBACK_QUOTE_REFRESH_TIME, swapsQuotePrefetchingRefreshTime: FALLBACK_QUOTE_REFRESH_TIME, swapsStxBatchStatusRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxGetTransactionsRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, + swapsStxGetTransactionsRefreshTime: + FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, swapsStxMaxFeeMultiplier: FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, swapsFeatureFlags: {}, }, @@ -336,10 +337,8 @@ export default class SwapsController { if (Object.values(newQuotes).length === 0) { this.setSwapsErrorKey(QUOTES_NOT_AVAILABLE_ERROR); } else { - const [ - _topAggId, - quotesWithSavingsAndFeeData, - ] = await this._findTopQuoteAndCalculateSavings(newQuotes); + const [_topAggId, quotesWithSavingsAndFeeData] = + await this._findTopQuoteAndCalculateSavings(newQuotes); topAggId = _topAggId; newQuotes = quotesWithSavingsAndFeeData; } @@ -486,10 +485,8 @@ export default class SwapsController { const quoteToUpdate = { ...swapsState.quotes[initialAggId] }; - const { - gasLimit: newGasEstimate, - simulationFails, - } = await this.timedoutGasReturn(quoteToUpdate.trade); + const { gasLimit: newGasEstimate, simulationFails } = + await this.timedoutGasReturn(quoteToUpdate.trade); if (newGasEstimate && !simulationFails) { const gasEstimateWithRefund = calculateGasEstimateWithRefund( @@ -637,9 +634,8 @@ export default class SwapsController { } async _findTopQuoteAndCalculateSavings(quotes = {}) { - const { - contractExchangeRates: tokenConversionRates, - } = this.getTokenRatesState(); + const { contractExchangeRates: tokenConversionRates } = + this.getTokenRatesState(); const { swapsState: { customGasPrice, customMaxPriorityFeePerGas }, } = this.store.getState(); @@ -652,10 +648,8 @@ export default class SwapsController { const newQuotes = cloneDeep(quotes); - const { - gasFeeEstimates, - gasEstimateType, - } = await this._getEIP1559GasFeeEstimates(); + const { gasFeeEstimates, gasEstimateType } = + await this._getEIP1559GasFeeEstimates(); let usedGasPrice = '0x0'; @@ -756,9 +750,8 @@ export default class SwapsController { const tokenPercentageOfPreFeeDestAmount = new BigNumber(100, 10) .minus(metaMaskFee, 10) .div(100); - const destinationAmountBeforeMetaMaskFee = decimalAdjustedDestinationAmount.div( - tokenPercentageOfPreFeeDestAmount, - ); + const destinationAmountBeforeMetaMaskFee = + decimalAdjustedDestinationAmount.div(tokenPercentageOfPreFeeDestAmount); const metaMaskFeeInTokens = destinationAmountBeforeMetaMaskFee.minus( decimalAdjustedDestinationAmount, ); diff --git a/app/scripts/controllers/swaps.test.js b/app/scripts/controllers/swaps.test.js index f8f580c4d..e34dff016 100644 --- a/app/scripts/controllers/swaps.test.js +++ b/app/scripts/controllers/swaps.test.js @@ -42,8 +42,7 @@ const TEST_AGG_ID_APPROVAL = 'TEST_AGG_APPROVAL'; const POLLING_TIMEOUT = SECOND * 1000; const MOCK_APPROVAL_NEEDED = { - data: - '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', + data: '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', to: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', amount: '0', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', @@ -139,7 +138,8 @@ const EMPTY_INIT_STATE = { swapsQuoteRefreshTime: 60000, swapsQuotePrefetchingRefreshTime: 60000, swapsStxBatchStatusRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxGetTransactionsRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, + swapsStxGetTransactionsRefreshTime: + FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, swapsStxMaxFeeMultiplier: FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, swapsUserFeeLevel: '', saveFetchedQuotes: false, @@ -370,13 +370,10 @@ describe('SwapsController', function () { baseGasEstimate, ); - const { - gasLimit: bufferedGasLimit, - } = await swapsController.getBufferedGasLimit(); - const { - gasEstimate, - gasEstimateWithRefund, - } = swapsController.store.getState().swapsState.quotes[initialAggId]; + const { gasLimit: bufferedGasLimit } = + await swapsController.getBufferedGasLimit(); + const { gasEstimate, gasEstimateWithRefund } = + swapsController.store.getState().swapsState.quotes[initialAggId]; assert.strictEqual(gasEstimate, bufferedGasLimit); assert.strictEqual( gasEstimateWithRefund, @@ -416,12 +413,10 @@ describe('SwapsController', function () { }); it('returns the top aggId and quotes with savings and fee values if passed necessary data and an even number of quotes', async function () { - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings( - getTopQuoteAndSavingsMockQuotes(), - ); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings( + getTopQuoteAndSavingsMockQuotes(), + ); assert.equal(topAggId, TEST_AGG_ID_1); assert.deepStrictEqual( resultQuotes, @@ -442,10 +437,8 @@ describe('SwapsController', function () { medianMetaMaskFee: '0.0202', }; - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings(testInput); assert.equal(topAggId, TEST_AGG_ID_1); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); @@ -485,10 +478,8 @@ describe('SwapsController', function () { }, }; - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings(testInput); assert.equal(topAggId, TEST_AGG_ID_1); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); @@ -503,7 +494,8 @@ describe('SwapsController', function () { trade: { value: '0x8ac7230489e80000' }, }), ); - const baseExpectedResultQuotes = getTopQuoteAndSavingsBaseExpectedResults(); + const baseExpectedResultQuotes = + getTopQuoteAndSavingsBaseExpectedResults(); const expectedResultQuotes = { [TEST_AGG_ID_1]: { ...baseExpectedResultQuotes[TEST_AGG_ID_1], @@ -549,10 +541,8 @@ describe('SwapsController', function () { }, }; - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings(testInput); assert.equal(topAggId, TEST_AGG_ID_1); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); @@ -569,7 +559,8 @@ describe('SwapsController', function () { ); // 0.04 ETH fee included in trade value testInput[TEST_AGG_ID_1].trade.value = '0x8b553ece48ec0000'; - const baseExpectedResultQuotes = getTopQuoteAndSavingsBaseExpectedResults(); + const baseExpectedResultQuotes = + getTopQuoteAndSavingsBaseExpectedResults(); const expectedResultQuotes = { [TEST_AGG_ID_1]: { ...baseExpectedResultQuotes[TEST_AGG_ID_1], @@ -626,10 +617,8 @@ describe('SwapsController', function () { delete expectedResultQuotes[TEST_AGG_ID_1].isBestQuote; delete expectedResultQuotes[TEST_AGG_ID_1].savings; - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings(testInput); assert.equal(topAggId, TEST_AGG_ID_2); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); @@ -638,7 +627,8 @@ describe('SwapsController', function () { const testInput = getTopQuoteAndSavingsMockQuotes(); // 0.04 ETH fee included in trade value testInput[TEST_AGG_ID_1].trade.value = '0x8e1bc9bf040000'; - const baseExpectedResultQuotes = getTopQuoteAndSavingsBaseExpectedResults(); + const baseExpectedResultQuotes = + getTopQuoteAndSavingsBaseExpectedResults(); const expectedResultQuotes = { ...baseExpectedResultQuotes, [TEST_AGG_ID_1]: { @@ -662,10 +652,8 @@ describe('SwapsController', function () { delete expectedResultQuotes[TEST_AGG_ID_1].isBestQuote; delete expectedResultQuotes[TEST_AGG_ID_1].savings; - const [ - topAggId, - resultQuotes, - ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); + const [topAggId, resultQuotes] = + await swapsController._findTopQuoteAndCalculateSavings(testInput); assert.equal(topAggId, TEST_AGG_ID_2); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); diff --git a/app/scripts/controllers/threebox.js b/app/scripts/controllers/threebox.js index fc278d0b2..6af4b9711 100644 --- a/app/scripts/controllers/threebox.js +++ b/app/scripts/controllers/threebox.js @@ -225,9 +225,8 @@ export default class ThreeBoxController { PreferencesController: preferences, AddressBookController: addressBook, }; - const initialMigrationState = migrator.generateInitialState( - formattedStateBackup, - ); + const initialMigrationState = + migrator.generateInitialState(formattedStateBackup); const migratedState = await migrator.migrateData(initialMigrationState); return { preferences: migratedState.data.PreferencesController, diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index d9d09a14c..6f5151822 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -174,9 +174,8 @@ export default class TransactionController extends EventEmitter { ); return [...pendingTransactions, ...externalPendingTransactions]; }, - getConfirmedTransactions: this.txStateManager.getConfirmedTransactions.bind( - this.txStateManager, - ), + getConfirmedTransactions: + this.txStateManager.getConfirmedTransactions.bind(this.txStateManager), }); this.pendingTxTracker = new PendingTransactionTracker({ @@ -189,9 +188,8 @@ export default class TransactionController extends EventEmitter { return [...pending, ...approved]; }, approveTransaction: this.approveTransaction.bind(this), - getCompletedTransactions: this.txStateManager.getConfirmedTransactions.bind( - this.txStateManager, - ), + getCompletedTransactions: + this.txStateManager.getConfirmedTransactions.bind(this.txStateManager), }); this.txStateManager.store.subscribe(() => @@ -227,10 +225,10 @@ export default class TransactionController extends EventEmitter { } async getEIP1559Compatibility(fromAddress) { - const currentNetworkIsCompatible = await this._getCurrentNetworkEIP1559Compatibility(); - const fromAccountIsCompatible = await this._getCurrentAccountEIP1559Compatibility( - fromAddress, - ); + const currentNetworkIsCompatible = + await this._getCurrentNetworkEIP1559Compatibility(); + const fromAccountIsCompatible = + await this._getCurrentAccountEIP1559Compatibility(fromAddress); return currentNetworkIsCompatible && fromAccountIsCompatible; } @@ -815,10 +813,8 @@ export default class TransactionController extends EventEmitter { maxFeePerGas: defaultMaxFeePerGas, maxPriorityFeePerGas: defaultMaxPriorityFeePerGas, } = await this._getDefaultGasFees(txMeta, eip1559Compatibility); - const { - gasLimit: defaultGasLimit, - simulationFails, - } = await this._getDefaultGasLimit(txMeta, getCodeResponse); + const { gasLimit: defaultGasLimit, simulationFails } = + await this._getDefaultGasLimit(txMeta, getCodeResponse); // eslint-disable-next-line no-param-reassign txMeta = this.txStateManager.getTransaction(txMeta.id); @@ -960,10 +956,8 @@ export default class TransactionController extends EventEmitter { } try { - const { - gasFeeEstimates, - gasEstimateType, - } = await this._getEIP1559GasFeeEstimates(); + const { gasFeeEstimates, gasEstimateType } = + await this._getEIP1559GasFeeEstimates(); if ( eip1559Compatibility && gasEstimateType === GAS_ESTIMATE_TYPES.FEE_MARKET @@ -1038,11 +1032,8 @@ export default class TransactionController extends EventEmitter { return { gasLimit: GAS_LIMITS.SIMPLE }; } - const { - blockGasLimit, - estimatedGasHex, - simulationFails, - } = await this.txGasUtil.analyzeGasUsage(txMeta); + const { blockGasLimit, estimatedGasHex, simulationFails } = + await this.txGasUtil.analyzeGasUsage(txMeta); // add additional gas buffer to our estimation for safety const gasLimit = this.txGasUtil.addGasBuffer( @@ -1545,9 +1536,8 @@ export default class TransactionController extends EventEmitter { const metricsParams = { gas_used: gasUsed }; if (submittedTime) { - metricsParams.completion_time = this._getTransactionCompletionTime( - submittedTime, - ); + metricsParams.completion_time = + this._getTransactionCompletionTime(submittedTime); } if (txReceipt.status === '0x0') { @@ -1606,9 +1596,8 @@ export default class TransactionController extends EventEmitter { const metricsParams = { gas_used: gasUsed }; if (submittedTime) { - metricsParams.completion_time = this._getTransactionCompletionTime( - submittedTime, - ); + metricsParams.completion_time = + this._getTransactionCompletionTime(submittedTime); } if (txReceipt.status === '0x0') { @@ -1673,10 +1662,8 @@ export default class TransactionController extends EventEmitter { */ async createTransactionEventFragment(transactionId, event) { const txMeta = this.txStateManager.getTransaction(transactionId); - const { - properties, - sensitiveProperties, - } = await this._buildEventFragmentProperties(txMeta); + const { properties, sensitiveProperties } = + await this._buildEventFragmentProperties(txMeta); this._createTransactionEventFragment( txMeta, event, @@ -2052,7 +2039,8 @@ export default class TransactionController extends EventEmitter { if (gasFeeEstimates?.[estimateType]?.suggestedMaxPriorityFeePerGas) { defaultMaxPriorityFeePerGas = gasFeeEstimates[estimateType]?.suggestedMaxPriorityFeePerGas; - gasParams.default_max_priority_fee_per_gas = defaultMaxPriorityFeePerGas; + gasParams.default_max_priority_fee_per_gas = + defaultMaxPriorityFeePerGas; } } } @@ -2272,10 +2260,8 @@ export default class TransactionController extends EventEmitter { if (!txMeta) { return; } - const { - properties, - sensitiveProperties, - } = await this._buildEventFragmentProperties(txMeta, extraParams); + const { properties, sensitiveProperties } = + await this._buildEventFragmentProperties(txMeta, extraParams); // Create event fragments for event types that spawn fragments, and ensure // existence of fragments for event types that act upon them. diff --git a/app/scripts/controllers/transactions/index.test.js b/app/scripts/controllers/transactions/index.test.js index a0c59165f..4c235af8d 100644 --- a/app/scripts/controllers/transactions/index.test.js +++ b/app/scripts/controllers/transactions/index.test.js @@ -2291,8 +2291,7 @@ describe('Transaction Controller', function () { providerResultStub.eth_getCode = '0xab'; // test update gasFees await txController.updateEditableParams('1', { - data: - '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', + data: '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', }); const result = txStateManager.getTransaction('1'); assert.equal( @@ -2316,8 +2315,7 @@ describe('Transaction Controller', function () { // maxFeePerGas: '0x004', to: VALID_ADDRESS, from: VALID_ADDRESS, - data: - '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', + data: '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', }, estimateUsed: '0x005', estimatedBaseFee: '0x006', diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.js b/app/scripts/controllers/transactions/pending-tx-tracker.js index 7fbaca8ce..e5a56b8ab 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.js @@ -198,13 +198,8 @@ export default class PendingTransactionTracker extends EventEmitter { try { const transactionReceipt = await this.query.getTransactionReceipt(txHash); if (transactionReceipt?.blockNumber) { - const { - baseFeePerGas, - timestamp: blockTimestamp, - } = await this.query.getBlockByHash( - transactionReceipt?.blockHash, - false, - ); + const { baseFeePerGas, timestamp: blockTimestamp } = + await this.query.getBlockByHash(transactionReceipt?.blockHash, false); this.emit( 'tx:confirmed', diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.test.js b/app/scripts/controllers/transactions/pending-tx-tracker.test.js index b359b25f9..572837fe7 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.test.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.test.js @@ -154,8 +154,7 @@ describe('PendingTransactionTracker', function () { it('should call _checkPendingTx for each pending transaction', async function () { const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SIGNED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -212,8 +211,7 @@ describe('PendingTransactionTracker', function () { it('should publish a new transaction', async function () { const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SIGNED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -257,8 +255,7 @@ describe('PendingTransactionTracker', function () { it('should publish the given transaction if more than 2**retryCount blocks have passed', async function () { const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SIGNED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -304,8 +301,7 @@ describe('PendingTransactionTracker', function () { it('should NOT publish the given transaction if fewer than 2**retryCount blocks have passed', async function () { const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SIGNED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -404,8 +400,7 @@ describe('PendingTransactionTracker', function () { assert.ok( await pendingTxTracker._checkIfTxWasDropped({ id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SUBMITTED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -437,8 +432,7 @@ describe('PendingTransactionTracker', function () { const dropped = await pendingTxTracker._checkIfTxWasDropped({ id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SUBMITTED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -458,8 +452,7 @@ describe('PendingTransactionTracker', function () { const confirmedTxList = [ { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.CONFIRMED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -471,8 +464,7 @@ describe('PendingTransactionTracker', function () { }, { id: 2, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.CONFIRMED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -517,8 +509,7 @@ describe('PendingTransactionTracker', function () { const confirmedTxList = [ { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.CONFIRMED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -530,8 +521,7 @@ describe('PendingTransactionTracker', function () { }, { id: 2, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.CONFIRMED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -577,8 +567,7 @@ describe('PendingTransactionTracker', function () { it("should emit 'tx:warning' if getTransactionReceipt rejects", async function () { const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SUBMITTED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', @@ -730,8 +719,7 @@ describe('PendingTransactionTracker', function () { txParams: { nonce: '0x1' }, id: '123', value: '0x02', - hash: - '0x2a919d2512ec963f524bfd9730fb66b6d5a2e399d1dd957abb5e2b544a12644b', + hash: '0x2a919d2512ec963f524bfd9730fb66b6d5a2e399d1dd957abb5e2b544a12644b', }, ]; const pendingTxTracker = new PendingTransactionTracker({ @@ -774,8 +762,7 @@ describe('PendingTransactionTracker', function () { const nonceBN = new BN(2); const txMeta = { id: 1, - hash: - '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', + hash: '0x0593ee121b92e10d63150ad08b4b8f9c7857d1bd160195ee648fb9a0f8d00eeb', status: TRANSACTION_STATUSES.SUBMITTED, txParams: { from: '0x1678a085c290ebd122dc42cba69373b5953b831d', diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index 350cb1eaa..cddcfc946 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -102,11 +102,8 @@ export default class TxGasUtil { } async getBufferedGasLimit(txMeta, multiplier) { - const { - blockGasLimit, - estimatedGasHex, - simulationFails, - } = await this.analyzeGasUsage(txMeta); + const { blockGasLimit, estimatedGasHex, simulationFails } = + await this.analyzeGasUsage(txMeta); // add additional gas buffer to our estimation for safety const gasLimit = this.addGasBuffer( diff --git a/app/scripts/lib/buy-url.js b/app/scripts/lib/buy-url.js index c8fe6701b..579e0c51c 100644 --- a/app/scripts/lib/buy-url.js +++ b/app/scripts/lib/buy-url.js @@ -82,9 +82,8 @@ const createTransakUrl = (walletAddress, chainId) => { * @returns String */ const createMoonPayUrl = async (walletAddress, chainId) => { - const { - moonPay: { defaultCurrencyCode, showOnlyCurrencies } = {}, - } = BUYABLE_CHAINS_MAP[chainId]; + const { moonPay: { defaultCurrencyCode, showOnlyCurrencies } = {} } = + BUYABLE_CHAINS_MAP[chainId]; const moonPayQueryParams = new URLSearchParams({ apiKey: MOONPAY_API_KEY, walletAddress, diff --git a/app/scripts/lib/buy-url.test.js b/app/scripts/lib/buy-url.test.js index b582bae19..21c3a3498 100644 --- a/app/scripts/lib/buy-url.test.js +++ b/app/scripts/lib/buy-url.test.js @@ -116,9 +116,8 @@ describe('buy-url', () => { }); it('returns a MoonPay url with a prefilled wallet address for the Ethereum network', async () => { - const { - moonPay: { defaultCurrencyCode, showOnlyCurrencies } = {}, - } = BUYABLE_CHAINS_MAP[MAINNET.chainId]; + const { moonPay: { defaultCurrencyCode, showOnlyCurrencies } = {} } = + BUYABLE_CHAINS_MAP[MAINNET.chainId]; const moonPayQueryParams = new URLSearchParams({ apiKey: MOONPAY_API_KEY, walletAddress: MAINNET.address, diff --git a/app/scripts/lib/ens-ipfs/resolver.js b/app/scripts/lib/ens-ipfs/resolver.js index 95073b908..297b3e555 100644 --- a/app/scripts/lib/ens-ipfs/resolver.js +++ b/app/scripts/lib/ens-ipfs/resolver.js @@ -35,9 +35,8 @@ export default async function resolveEnsToIpfsContentId({ provider, name }) { const type = contentHash.getCodec(rawContentHash); if (type === 'ipfs-ns' || type === 'ipns-ns') { - decodedContentHash = contentHash.helpers.cidV0ToV1Base32( - decodedContentHash, - ); + decodedContentHash = + contentHash.helpers.cidV0ToV1Base32(decodedContentHash); } return { type, hash: decodedContentHash }; diff --git a/app/scripts/lib/personal-message-manager.js b/app/scripts/lib/personal-message-manager.js index 00017bc37..67924bef3 100644 --- a/app/scripts/lib/personal-message-manager.js +++ b/app/scripts/lib/personal-message-manager.js @@ -314,8 +314,9 @@ export default class PersonalMessageManager extends EventEmitter { */ _saveMsgList() { const unapprovedPersonalMsgs = this.getUnapprovedMsgs(); - const unapprovedPersonalMsgCount = Object.keys(unapprovedPersonalMsgs) - .length; + const unapprovedPersonalMsgCount = Object.keys( + unapprovedPersonalMsgs, + ).length; this.memStore.updateState({ unapprovedPersonalMsgs, unapprovedPersonalMsgCount, diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js index 8d5562c47..60356ba8a 100644 --- a/app/scripts/lib/typed-message-manager.js +++ b/app/scripts/lib/typed-message-manager.js @@ -391,8 +391,9 @@ export default class TypedMessageManager extends EventEmitter { */ _saveMsgList() { const unapprovedTypedMessages = this.getUnapprovedMsgs(); - const unapprovedTypedMessagesCount = Object.keys(unapprovedTypedMessages) - .length; + const unapprovedTypedMessagesCount = Object.keys( + unapprovedTypedMessages, + ).length; this.memStore.updateState({ unapprovedTypedMessages, unapprovedTypedMessagesCount, diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 8b484aba3..669c4f421 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -229,8 +229,10 @@ export default class MetamaskController extends EventEmitter { // now we can initialize the RPC provider, which other controllers require this.initializeProvider(); - this.provider = this.networkController.getProviderAndBlockTracker().provider; - this.blockTracker = this.networkController.getProviderAndBlockTracker().blockTracker; + this.provider = + this.networkController.getProviderAndBlockTracker().provider; + this.blockTracker = + this.networkController.getProviderAndBlockTracker().blockTracker; this.preferencesController = new PreferencesController({ initState: initState.PreferencesController, @@ -276,30 +278,35 @@ export default class MetamaskController extends EventEmitter { this.collectiblesController = new CollectiblesController( { - onPreferencesStateChange: this.preferencesController.store.subscribe.bind( - this.preferencesController.store, - ), + onPreferencesStateChange: + this.preferencesController.store.subscribe.bind( + this.preferencesController.store, + ), onNetworkStateChange: this.networkController.store.subscribe.bind( this.networkController.store, ), - getERC721AssetName: this.assetsContractController.getERC721AssetName.bind( - this.assetsContractController, - ), - getERC721AssetSymbol: this.assetsContractController.getERC721AssetSymbol.bind( - this.assetsContractController, - ), + getERC721AssetName: + this.assetsContractController.getERC721AssetName.bind( + this.assetsContractController, + ), + getERC721AssetSymbol: + this.assetsContractController.getERC721AssetSymbol.bind( + this.assetsContractController, + ), getERC721TokenURI: this.assetsContractController.getERC721TokenURI.bind( this.assetsContractController, ), getERC721OwnerOf: this.assetsContractController.getERC721OwnerOf.bind( this.assetsContractController, ), - getERC1155BalanceOf: this.assetsContractController.getERC1155BalanceOf.bind( - this.assetsContractController, - ), - getERC1155TokenURI: this.assetsContractController.getERC1155TokenURI.bind( - this.assetsContractController, - ), + getERC1155BalanceOf: + this.assetsContractController.getERC1155BalanceOf.bind( + this.assetsContractController, + ), + getERC1155TokenURI: + this.assetsContractController.getERC1155TokenURI.bind( + this.assetsContractController, + ), onCollectibleAdded: ({ address, symbol, tokenId, standard, source }) => this.metaMetricsController.trackEvent({ event: EVENT_NAMES.NFT_ADDED, @@ -327,16 +334,18 @@ export default class MetamaskController extends EventEmitter { { onCollectiblesStateChange: (listener) => this.collectiblesController.subscribe(listener), - onPreferencesStateChange: this.preferencesController.store.subscribe.bind( - this.preferencesController.store, - ), + onPreferencesStateChange: + this.preferencesController.store.subscribe.bind( + this.preferencesController.store, + ), onNetworkStateChange: this.networkController.store.subscribe.bind( this.networkController.store, ), getOpenSeaApiKey: () => this.collectiblesController.openSeaApiKey, - getBalancesInSingleCall: this.assetsContractController.getBalancesInSingleCall.bind( - this.assetsContractController, - ), + getBalancesInSingleCall: + this.assetsContractController.getBalancesInSingleCall.bind( + this.assetsContractController, + ), addCollectible: this.collectiblesController.addCollectible.bind( this.collectiblesController, ), @@ -385,12 +394,12 @@ export default class MetamaskController extends EventEmitter { this.networkController, NETWORK_EVENTS.NETWORK_DID_CHANGE, ), - getCurrentNetworkEIP1559Compatibility: this.networkController.getEIP1559Compatibility.bind( - this.networkController, - ), - getCurrentAccountEIP1559Compatibility: this.getCurrentAccountEIP1559Compatibility.bind( - this, - ), + getCurrentNetworkEIP1559Compatibility: + this.networkController.getEIP1559Compatibility.bind( + this.networkController, + ), + getCurrentAccountEIP1559Compatibility: + this.getCurrentAccountEIP1559Compatibility.bind(this), legacyAPIEndpoint: `${gasApiBaseUrl}/networks//gasPrices`, EIP1559APIEndpoint: `${gasApiBaseUrl}/networks//suggestedGasFees`, getCurrentNetworkLegacyGasAPICompatibility: () => { @@ -587,10 +596,11 @@ export default class MetamaskController extends EventEmitter { const accountsMissingIdentities = accounts.filter( (address) => !identities[address], ); - const keyringTypesWithMissingIdentities = accountsMissingIdentities.map( - (address) => - this.keyringController.getKeyringForAccount(address)?.type, - ); + const keyringTypesWithMissingIdentities = + accountsMissingIdentities.map( + (address) => + this.keyringController.getKeyringForAccount(address)?.type, + ); const identitiesCount = Object.keys(identities || {}).length; @@ -790,12 +800,12 @@ export default class MetamaskController extends EventEmitter { getProviderConfig: this.networkController.getProviderConfig.bind( this.networkController, ), - getCurrentNetworkEIP1559Compatibility: this.networkController.getEIP1559Compatibility.bind( - this.networkController, - ), - getCurrentAccountEIP1559Compatibility: this.getCurrentAccountEIP1559Compatibility.bind( - this, - ), + getCurrentNetworkEIP1559Compatibility: + this.networkController.getEIP1559Compatibility.bind( + this.networkController, + ), + getCurrentAccountEIP1559Compatibility: + this.getCurrentAccountEIP1559Compatibility.bind(this), networkStore: this.networkController.networkStore, getCurrentChainId: this.networkController.getCurrentChainId.bind( this.networkController, @@ -813,28 +823,29 @@ export default class MetamaskController extends EventEmitter { updateEventFragment: this.metaMetricsController.updateEventFragment.bind( this.metaMetricsController, ), - finalizeEventFragment: this.metaMetricsController.finalizeEventFragment.bind( - this.metaMetricsController, - ), - getEventFragmentById: this.metaMetricsController.getEventFragmentById.bind( - this.metaMetricsController, - ), + finalizeEventFragment: + this.metaMetricsController.finalizeEventFragment.bind( + this.metaMetricsController, + ), + getEventFragmentById: + this.metaMetricsController.getEventFragmentById.bind( + this.metaMetricsController, + ), trackMetaMetricsEvent: this.metaMetricsController.trackEvent.bind( this.metaMetricsController, ), getParticipateInMetrics: () => this.metaMetricsController.state.participateInMetaMetrics, - getEIP1559GasFeeEstimates: this.gasFeeController.fetchGasFeeEstimates.bind( - this.gasFeeController, - ), - getExternalPendingTransactions: this.getExternalPendingTransactions.bind( - this, - ), + getEIP1559GasFeeEstimates: + this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController), + getExternalPendingTransactions: + this.getExternalPendingTransactions.bind(this), getAccountType: this.getAccountType.bind(this), getDeviceModel: this.getDeviceModel.bind(this), - getTokenStandardAndDetails: this.assetsContractController.getTokenStandardAndDetails.bind( - this.assetsContractController, - ), + getTokenStandardAndDetails: + this.assetsContractController.getTokenStandardAndDetails.bind( + this.assetsContractController, + ), }); this.txController.on('newUnapprovedTx', () => opts.showUserConfirmation()); @@ -844,7 +855,8 @@ export default class MetamaskController extends EventEmitter { status === TRANSACTION_STATUSES.FAILED ) { const txMeta = this.txController.txStateManager.getTransaction(txId); - const frequentRpcListDetail = this.preferencesController.getFrequentRpcListDetail(); + const frequentRpcListDetail = + this.preferencesController.getFrequentRpcListDetail(); let rpcPrefs = {}; if (txMeta.chainId) { const rpcSettings = frequentRpcListDetail.find( @@ -971,9 +983,8 @@ export default class MetamaskController extends EventEmitter { getCurrentChainId: this.networkController.getCurrentChainId.bind( this.networkController, ), - getEIP1559GasFeeEstimates: this.gasFeeController.fetchGasFeeEstimates.bind( - this.gasFeeController, - ), + getEIP1559GasFeeEstimates: + this.gasFeeController.fetchGasFeeEstimates.bind(this.gasFeeController), }); this.smartTransactionsController = new SmartTransactionsController( { @@ -986,9 +997,8 @@ export default class MetamaskController extends EventEmitter { getNonceLock: this.txController.nonceTracker.getNonceLock.bind( this.txController.nonceTracker, ), - confirmExternalTransaction: this.txController.confirmExternalTransaction.bind( - this.txController, - ), + confirmExternalTransaction: + this.txController.confirmExternalTransaction.bind(this.txController), provider: this.provider, trackMetaMetricsEvent: this.metaMetricsController.trackEvent.bind( this.metaMetricsController, @@ -1065,8 +1075,8 @@ export default class MetamaskController extends EventEmitter { CurrencyController: this.currencyRateController, AlertController: this.alertController.store, OnboardingController: this.onboardingController.store, - IncomingTransactionsController: this.incomingTransactionsController - .store, + IncomingTransactionsController: + this.incomingTransactionsController.store, PermissionController: this.permissionController, PermissionLogController: this.permissionLogController.store, SubjectMetadataController: this.subjectMetadataController, @@ -1353,7 +1363,8 @@ export default class MetamaskController extends EventEmitter { { suppressUnauthorizedError = true } = {}, ) => { if (origin === ORIGIN_METAMASK) { - const selectedAddress = this.preferencesController.getSelectedAddress(); + const selectedAddress = + this.preferencesController.getSelectedAddress(); return selectedAddress ? [selectedAddress] : []; } else if (this.isUnlocked()) { return await this.getPermittedAccounts(origin, { @@ -1381,9 +1392,8 @@ export default class MetamaskController extends EventEmitter { }, })[0], }; - const providerProxy = this.networkController.initializeProvider( - providerOpts, - ); + const providerProxy = + this.networkController.initializeProvider(providerOpts); return providerProxy; } @@ -1525,18 +1535,20 @@ export default class MetamaskController extends EventEmitter { setUseTokenDetection: preferencesController.setUseTokenDetection.bind( preferencesController, ), - setUseCollectibleDetection: preferencesController.setUseCollectibleDetection.bind( - preferencesController, - ), + setUseCollectibleDetection: + preferencesController.setUseCollectibleDetection.bind( + preferencesController, + ), setOpenSeaEnabled: preferencesController.setOpenSeaEnabled.bind( preferencesController, ), setIpfsGateway: preferencesController.setIpfsGateway.bind( preferencesController, ), - setParticipateInMetaMetrics: metaMetricsController.setParticipateInMetaMetrics.bind( - metaMetricsController, - ), + setParticipateInMetaMetrics: + metaMetricsController.setParticipateInMetaMetrics.bind( + metaMetricsController, + ), setCurrentLocale: preferencesController.setCurrentLocale.bind( preferencesController, ), @@ -1559,32 +1571,24 @@ export default class MetamaskController extends EventEmitter { forgetDevice: this.forgetDevice.bind(this), checkHardwareStatus: this.checkHardwareStatus.bind(this), unlockHardwareWalletAccount: this.unlockHardwareWalletAccount.bind(this), - setLedgerTransportPreference: this.setLedgerTransportPreference.bind( - this, - ), - attemptLedgerTransportCreation: this.attemptLedgerTransportCreation.bind( - this, - ), - establishLedgerTransportPreference: this.establishLedgerTransportPreference.bind( - this, - ), + setLedgerTransportPreference: + this.setLedgerTransportPreference.bind(this), + attemptLedgerTransportCreation: + this.attemptLedgerTransportCreation.bind(this), + establishLedgerTransportPreference: + this.establishLedgerTransportPreference.bind(this), // qr hardware devices - submitQRHardwareCryptoHDKey: qrHardwareKeyring.submitCryptoHDKey.bind( - qrHardwareKeyring, - ), - submitQRHardwareCryptoAccount: qrHardwareKeyring.submitCryptoAccount.bind( - qrHardwareKeyring, - ), - cancelSyncQRHardware: qrHardwareKeyring.cancelSync.bind( - qrHardwareKeyring, - ), - submitQRHardwareSignature: qrHardwareKeyring.submitSignature.bind( - qrHardwareKeyring, - ), - cancelQRHardwareSignRequest: qrHardwareKeyring.cancelSignRequest.bind( - qrHardwareKeyring, - ), + submitQRHardwareCryptoHDKey: + qrHardwareKeyring.submitCryptoHDKey.bind(qrHardwareKeyring), + submitQRHardwareCryptoAccount: + qrHardwareKeyring.submitCryptoAccount.bind(qrHardwareKeyring), + cancelSyncQRHardware: + qrHardwareKeyring.cancelSync.bind(qrHardwareKeyring), + submitQRHardwareSignature: + qrHardwareKeyring.submitSignature.bind(qrHardwareKeyring), + cancelQRHardwareSignRequest: + qrHardwareKeyring.cancelSignRequest.bind(qrHardwareKeyring), // mobile fetchInfoToSync: this.fetchInfoToSync.bind(this), @@ -1594,12 +1598,10 @@ export default class MetamaskController extends EventEmitter { verifyPassword: this.verifyPassword.bind(this), // network management - setProviderType: networkController.setProviderType.bind( - networkController, - ), - rollbackToPreviousProvider: networkController.rollbackToPreviousProvider.bind( - networkController, - ), + setProviderType: + networkController.setProviderType.bind(networkController), + rollbackToPreviousProvider: + networkController.rollbackToPreviousProvider.bind(networkController), setCustomRpc: this.setCustomRpc.bind(this), updateAndSetCustomRpc: this.updateAndSetCustomRpc.bind(this), delCustomRpc: this.delCustomRpc.bind(this), @@ -1610,12 +1612,10 @@ export default class MetamaskController extends EventEmitter { preferencesController, ), addToken: tokensController.addToken.bind(tokensController), - rejectWatchAsset: tokensController.rejectWatchAsset.bind( - tokensController, - ), - acceptWatchAsset: tokensController.acceptWatchAsset.bind( - tokensController, - ), + rejectWatchAsset: + tokensController.rejectWatchAsset.bind(tokensController), + acceptWatchAsset: + tokensController.acceptWatchAsset.bind(tokensController), updateTokenType: tokensController.updateTokenType.bind(tokensController), setAccountLabel: preferencesController.setAccountLabel.bind( preferencesController, @@ -1630,9 +1630,10 @@ export default class MetamaskController extends EventEmitter { addKnownMethodData: preferencesController.addKnownMethodData.bind( preferencesController, ), - setDismissSeedBackUpReminder: preferencesController.setDismissSeedBackUpReminder.bind( - preferencesController, - ), + setDismissSeedBackUpReminder: + preferencesController.setDismissSeedBackUpReminder.bind( + preferencesController, + ), setAdvancedGasFee: preferencesController.setAdvancedGasFee.bind( preferencesController, ), @@ -1640,9 +1641,10 @@ export default class MetamaskController extends EventEmitter { preferencesController, ), setTheme: preferencesController.setTheme.bind(preferencesController), - setCustomNetworkListEnabled: preferencesController.setCustomNetworkListEnabled.bind( - preferencesController, - ), + setCustomNetworkListEnabled: + preferencesController.setCustomNetworkListEnabled.bind( + preferencesController, + ), // AssetsContractController getTokenStandardAndDetails: this.getTokenStandardAndDetails.bind(this), @@ -1651,25 +1653,29 @@ export default class MetamaskController extends EventEmitter { collectiblesController, ), - addCollectibleVerifyOwnership: collectiblesController.addCollectibleVerifyOwnership.bind( - collectiblesController, - ), + addCollectibleVerifyOwnership: + collectiblesController.addCollectibleVerifyOwnership.bind( + collectiblesController, + ), - removeAndIgnoreCollectible: collectiblesController.removeAndIgnoreCollectible.bind( - collectiblesController, - ), + removeAndIgnoreCollectible: + collectiblesController.removeAndIgnoreCollectible.bind( + collectiblesController, + ), removeCollectible: collectiblesController.removeCollectible.bind( collectiblesController, ), - checkAndUpdateAllCollectiblesOwnershipStatus: collectiblesController.checkAndUpdateAllCollectiblesOwnershipStatus.bind( - collectiblesController, - ), + checkAndUpdateAllCollectiblesOwnershipStatus: + collectiblesController.checkAndUpdateAllCollectiblesOwnershipStatus.bind( + collectiblesController, + ), - checkAndUpdateSingleCollectibleOwnershipStatus: collectiblesController.checkAndUpdateSingleCollectibleOwnershipStatus.bind( - collectiblesController, - ), + checkAndUpdateSingleCollectibleOwnershipStatus: + collectiblesController.checkAndUpdateSingleCollectibleOwnershipStatus.bind( + collectiblesController, + ), isCollectibleOwner: collectiblesController.isCollectibleOwner.bind( collectiblesController, @@ -1682,37 +1688,41 @@ export default class MetamaskController extends EventEmitter { ), // AppStateController - setLastActiveTime: appStateController.setLastActiveTime.bind( - appStateController, - ), - setDefaultHomeActiveTabName: appStateController.setDefaultHomeActiveTabName.bind( - appStateController, - ), - setConnectedStatusPopoverHasBeenShown: appStateController.setConnectedStatusPopoverHasBeenShown.bind( - appStateController, - ), - setRecoveryPhraseReminderHasBeenShown: appStateController.setRecoveryPhraseReminderHasBeenShown.bind( - appStateController, - ), - setRecoveryPhraseReminderLastShown: appStateController.setRecoveryPhraseReminderLastShown.bind( - appStateController, - ), - setShowTestnetMessageInDropdown: appStateController.setShowTestnetMessageInDropdown.bind( - appStateController, - ), - setCollectiblesDetectionNoticeDismissed: appStateController.setCollectiblesDetectionNoticeDismissed.bind( - appStateController, - ), - setEnableEIP1559V2NoticeDismissed: appStateController.setEnableEIP1559V2NoticeDismissed.bind( - appStateController, - ), - updateCollectibleDropDownState: appStateController.updateCollectibleDropDownState.bind( - appStateController, - ), + setLastActiveTime: + appStateController.setLastActiveTime.bind(appStateController), + setDefaultHomeActiveTabName: + appStateController.setDefaultHomeActiveTabName.bind(appStateController), + setConnectedStatusPopoverHasBeenShown: + appStateController.setConnectedStatusPopoverHasBeenShown.bind( + appStateController, + ), + setRecoveryPhraseReminderHasBeenShown: + appStateController.setRecoveryPhraseReminderHasBeenShown.bind( + appStateController, + ), + setRecoveryPhraseReminderLastShown: + appStateController.setRecoveryPhraseReminderLastShown.bind( + appStateController, + ), + setShowTestnetMessageInDropdown: + appStateController.setShowTestnetMessageInDropdown.bind( + appStateController, + ), + setCollectiblesDetectionNoticeDismissed: + appStateController.setCollectiblesDetectionNoticeDismissed.bind( + appStateController, + ), + setEnableEIP1559V2NoticeDismissed: + appStateController.setEnableEIP1559V2NoticeDismissed.bind( + appStateController, + ), + updateCollectibleDropDownState: + appStateController.updateCollectibleDropDownState.bind( + appStateController, + ), // EnsController - tryReverseResolveAddress: ensController.reverseResolveAddress.bind( - ensController, - ), + tryReverseResolveAddress: + ensController.reverseResolveAddress.bind(ensController), // KeyringController setLocked: this.setLocked.bind(this), @@ -1723,44 +1733,34 @@ export default class MetamaskController extends EventEmitter { // txController cancelTransaction: txController.cancelTransaction.bind(txController), updateTransaction: txController.updateTransaction.bind(txController), - updateAndApproveTransaction: txController.updateAndApproveTransaction.bind( - txController, - ), - approveTransactionsWithSameNonce: txController.approveTransactionsWithSameNonce.bind( - txController, - ), + updateAndApproveTransaction: + txController.updateAndApproveTransaction.bind(txController), + approveTransactionsWithSameNonce: + txController.approveTransactionsWithSameNonce.bind(txController), createCancelTransaction: this.createCancelTransaction.bind(this), createSpeedUpTransaction: this.createSpeedUpTransaction.bind(this), estimateGas: this.estimateGas.bind(this), getNextNonce: this.getNextNonce.bind(this), - addUnapprovedTransaction: txController.addUnapprovedTransaction.bind( - txController, - ), - createTransactionEventFragment: txController.createTransactionEventFragment.bind( - txController, - ), + addUnapprovedTransaction: + txController.addUnapprovedTransaction.bind(txController), + createTransactionEventFragment: + txController.createTransactionEventFragment.bind(txController), getTransactions: txController.getTransactions.bind(txController), - updateEditableParams: txController.updateEditableParams.bind( - txController, - ), - updateTransactionGasFees: txController.updateTransactionGasFees.bind( - txController, - ), - updateTransactionSendFlowHistory: txController.updateTransactionSendFlowHistory.bind( - txController, - ), + updateEditableParams: + txController.updateEditableParams.bind(txController), + updateTransactionGasFees: + txController.updateTransactionGasFees.bind(txController), + updateTransactionSendFlowHistory: + txController.updateTransactionSendFlowHistory.bind(txController), - updateSwapApprovalTransaction: txController.updateSwapApprovalTransaction.bind( - txController, - ), - updateSwapTransaction: txController.updateSwapTransaction.bind( - txController, - ), + updateSwapApprovalTransaction: + txController.updateSwapApprovalTransaction.bind(txController), + updateSwapTransaction: + txController.updateSwapTransaction.bind(txController), - updatePreviousGasParams: txController.updatePreviousGasParams.bind( - txController, - ), + updatePreviousGasParams: + txController.updatePreviousGasParams.bind(txController), // messageManager signMessage: this.signMessage.bind(this), cancelMessage: this.cancelMessage.bind(this), @@ -1783,55 +1783,47 @@ export default class MetamaskController extends EventEmitter { cancelEncryptionPublicKey: this.cancelEncryptionPublicKey.bind(this), // onboarding controller - setSeedPhraseBackedUp: onboardingController.setSeedPhraseBackedUp.bind( - onboardingController, - ), - completeOnboarding: onboardingController.completeOnboarding.bind( - onboardingController, - ), - setFirstTimeFlowType: onboardingController.setFirstTimeFlowType.bind( - onboardingController, - ), + setSeedPhraseBackedUp: + onboardingController.setSeedPhraseBackedUp.bind(onboardingController), + completeOnboarding: + onboardingController.completeOnboarding.bind(onboardingController), + setFirstTimeFlowType: + onboardingController.setFirstTimeFlowType.bind(onboardingController), // alert controller - setAlertEnabledness: alertController.setAlertEnabledness.bind( - alertController, - ), - setUnconnectedAccountAlertShown: alertController.setUnconnectedAccountAlertShown.bind( - alertController, - ), - setWeb3ShimUsageAlertDismissed: alertController.setWeb3ShimUsageAlertDismissed.bind( - alertController, - ), + setAlertEnabledness: + alertController.setAlertEnabledness.bind(alertController), + setUnconnectedAccountAlertShown: + alertController.setUnconnectedAccountAlertShown.bind(alertController), + setWeb3ShimUsageAlertDismissed: + alertController.setWeb3ShimUsageAlertDismissed.bind(alertController), // 3Box - setThreeBoxSyncingPermission: threeBoxController.setThreeBoxSyncingPermission.bind( - threeBoxController, - ), - restoreFromThreeBox: threeBoxController.restoreFromThreeBox.bind( - threeBoxController, - ), - setShowRestorePromptToFalse: threeBoxController.setShowRestorePromptToFalse.bind( - threeBoxController, - ), - getThreeBoxLastUpdated: threeBoxController.getLastUpdated.bind( - threeBoxController, - ), - turnThreeBoxSyncingOn: threeBoxController.turnThreeBoxSyncingOn.bind( - threeBoxController, - ), + setThreeBoxSyncingPermission: + threeBoxController.setThreeBoxSyncingPermission.bind( + threeBoxController, + ), + restoreFromThreeBox: + threeBoxController.restoreFromThreeBox.bind(threeBoxController), + setShowRestorePromptToFalse: + threeBoxController.setShowRestorePromptToFalse.bind(threeBoxController), + getThreeBoxLastUpdated: + threeBoxController.getLastUpdated.bind(threeBoxController), + turnThreeBoxSyncingOn: + threeBoxController.turnThreeBoxSyncingOn.bind(threeBoxController), initializeThreeBox: this.initializeThreeBox.bind(this), // permissions - removePermissionsFor: permissionController.revokePermissions.bind( - permissionController, - ), - approvePermissionsRequest: permissionController.acceptPermissionsRequest.bind( - permissionController, - ), - rejectPermissionsRequest: permissionController.rejectPermissionsRequest.bind( - permissionController, - ), + removePermissionsFor: + permissionController.revokePermissions.bind(permissionController), + approvePermissionsRequest: + permissionController.acceptPermissionsRequest.bind( + permissionController, + ), + rejectPermissionsRequest: + permissionController.rejectPermissionsRequest.bind( + permissionController, + ), ...getPermissionBackgroundApiMethods(permissionController), ///: BEGIN:ONLY_INCLUDE_IN(flask) @@ -1847,81 +1839,72 @@ export default class MetamaskController extends EventEmitter { ///: END:ONLY_INCLUDE_IN // swaps - fetchAndSetQuotes: swapsController.fetchAndSetQuotes.bind( - swapsController, - ), - setSelectedQuoteAggId: swapsController.setSelectedQuoteAggId.bind( - swapsController, - ), + fetchAndSetQuotes: + swapsController.fetchAndSetQuotes.bind(swapsController), + setSelectedQuoteAggId: + swapsController.setSelectedQuoteAggId.bind(swapsController), resetSwapsState: swapsController.resetSwapsState.bind(swapsController), setSwapsTokens: swapsController.setSwapsTokens.bind(swapsController), clearSwapsQuotes: swapsController.clearSwapsQuotes.bind(swapsController), setApproveTxId: swapsController.setApproveTxId.bind(swapsController), setTradeTxId: swapsController.setTradeTxId.bind(swapsController), - setSwapsTxGasPrice: swapsController.setSwapsTxGasPrice.bind( - swapsController, - ), - setSwapsTxGasLimit: swapsController.setSwapsTxGasLimit.bind( - swapsController, - ), - setSwapsTxMaxFeePerGas: swapsController.setSwapsTxMaxFeePerGas.bind( - swapsController, - ), - setSwapsTxMaxFeePriorityPerGas: swapsController.setSwapsTxMaxFeePriorityPerGas.bind( - swapsController, - ), - safeRefetchQuotes: swapsController.safeRefetchQuotes.bind( - swapsController, - ), - stopPollingForQuotes: swapsController.stopPollingForQuotes.bind( - swapsController, - ), - setBackgroundSwapRouteState: swapsController.setBackgroundSwapRouteState.bind( - swapsController, - ), - resetPostFetchState: swapsController.resetPostFetchState.bind( - swapsController, - ), + setSwapsTxGasPrice: + swapsController.setSwapsTxGasPrice.bind(swapsController), + setSwapsTxGasLimit: + swapsController.setSwapsTxGasLimit.bind(swapsController), + setSwapsTxMaxFeePerGas: + swapsController.setSwapsTxMaxFeePerGas.bind(swapsController), + setSwapsTxMaxFeePriorityPerGas: + swapsController.setSwapsTxMaxFeePriorityPerGas.bind(swapsController), + safeRefetchQuotes: + swapsController.safeRefetchQuotes.bind(swapsController), + stopPollingForQuotes: + swapsController.stopPollingForQuotes.bind(swapsController), + setBackgroundSwapRouteState: + swapsController.setBackgroundSwapRouteState.bind(swapsController), + resetPostFetchState: + swapsController.resetPostFetchState.bind(swapsController), setSwapsErrorKey: swapsController.setSwapsErrorKey.bind(swapsController), - setInitialGasEstimate: swapsController.setInitialGasEstimate.bind( - swapsController, - ), - setCustomApproveTxData: swapsController.setCustomApproveTxData.bind( - swapsController, - ), + setInitialGasEstimate: + swapsController.setInitialGasEstimate.bind(swapsController), + setCustomApproveTxData: + swapsController.setCustomApproveTxData.bind(swapsController), setSwapsLiveness: swapsController.setSwapsLiveness.bind(swapsController), - setSwapsFeatureFlags: swapsController.setSwapsFeatureFlags.bind( - swapsController, - ), - setSwapsUserFeeLevel: swapsController.setSwapsUserFeeLevel.bind( - swapsController, - ), - setSwapsQuotesPollingLimitEnabled: swapsController.setSwapsQuotesPollingLimitEnabled.bind( - swapsController, - ), + setSwapsFeatureFlags: + swapsController.setSwapsFeatureFlags.bind(swapsController), + setSwapsUserFeeLevel: + swapsController.setSwapsUserFeeLevel.bind(swapsController), + setSwapsQuotesPollingLimitEnabled: + swapsController.setSwapsQuotesPollingLimitEnabled.bind(swapsController), // Smart Transactions - setSmartTransactionsOptInStatus: smartTransactionsController.setOptInState.bind( - smartTransactionsController, - ), + setSmartTransactionsOptInStatus: + smartTransactionsController.setOptInState.bind( + smartTransactionsController, + ), fetchSmartTransactionFees: smartTransactionsController.getFees.bind( smartTransactionsController, ), - submitSignedTransactions: smartTransactionsController.submitSignedTransactions.bind( - smartTransactionsController, - ), - cancelSmartTransaction: smartTransactionsController.cancelSmartTransaction.bind( - smartTransactionsController, - ), - fetchSmartTransactionsLiveness: smartTransactionsController.fetchLiveness.bind( - smartTransactionsController, - ), - updateSmartTransaction: smartTransactionsController.updateSmartTransaction.bind( - smartTransactionsController, - ), - setStatusRefreshInterval: smartTransactionsController.setStatusRefreshInterval.bind( - smartTransactionsController, - ), + submitSignedTransactions: + smartTransactionsController.submitSignedTransactions.bind( + smartTransactionsController, + ), + cancelSmartTransaction: + smartTransactionsController.cancelSmartTransaction.bind( + smartTransactionsController, + ), + fetchSmartTransactionsLiveness: + smartTransactionsController.fetchLiveness.bind( + smartTransactionsController, + ), + updateSmartTransaction: + smartTransactionsController.updateSmartTransaction.bind( + smartTransactionsController, + ), + setStatusRefreshInterval: + smartTransactionsController.setStatusRefreshInterval.bind( + smartTransactionsController, + ), // MetaMetrics trackMetaMetricsEvent: metaMetricsController.trackEvent.bind( @@ -1941,9 +1924,8 @@ export default class MetamaskController extends EventEmitter { ), // approval controller - resolvePendingApproval: approvalController.accept.bind( - approvalController, - ), + resolvePendingApproval: + approvalController.accept.bind(approvalController), rejectPendingApproval: async (id, error) => { approvalController.reject( id, @@ -1957,25 +1939,22 @@ export default class MetamaskController extends EventEmitter { ), // GasFeeController - getGasFeeEstimatesAndStartPolling: gasFeeController.getGasFeeEstimatesAndStartPolling.bind( - gasFeeController, - ), + getGasFeeEstimatesAndStartPolling: + gasFeeController.getGasFeeEstimatesAndStartPolling.bind( + gasFeeController, + ), - disconnectGasFeeEstimatePoller: gasFeeController.disconnectPoller.bind( - gasFeeController, - ), + disconnectGasFeeEstimatePoller: + gasFeeController.disconnectPoller.bind(gasFeeController), - getGasFeeTimeEstimate: gasFeeController.getTimeEstimate.bind( - gasFeeController, - ), + getGasFeeTimeEstimate: + gasFeeController.getTimeEstimate.bind(gasFeeController), - addPollingTokenToAppState: appStateController.addPollingToken.bind( - appStateController, - ), + addPollingTokenToAppState: + appStateController.addPollingToken.bind(appStateController), - removePollingTokenFromAppState: appStateController.removePollingToken.bind( - appStateController, - ), + removePollingTokenFromAppState: + appStateController.removePollingToken.bind(appStateController), // DetectTokenController detectNewTokens: detectTokensController.detectNewTokens.bind( @@ -1990,23 +1969,24 @@ export default class MetamaskController extends EventEmitter { : null, /** Token Detection V2 */ - addDetectedTokens: tokensController.addDetectedTokens.bind( - tokensController, - ), + addDetectedTokens: + tokensController.addDetectedTokens.bind(tokensController), addImportedTokens: tokensController.addTokens.bind(tokensController), ignoreTokens: tokensController.ignoreTokens.bind(tokensController), - getBalancesInSingleCall: assetsContractController.getBalancesInSingleCall.bind( - assetsContractController, - ), + getBalancesInSingleCall: + assetsContractController.getBalancesInSingleCall.bind( + assetsContractController, + ), }; } async getTokenStandardAndDetails(address, userAddress, tokenId) { - const details = await this.assetsContractController.getTokenStandardAndDetails( - address, - userAddress, - tokenId, - ); + const details = + await this.assetsContractController.getTokenStandardAndDetails( + address, + userAddress, + tokenId, + ); return { ...details, decimals: details?.decimals?.toString(10), @@ -2159,9 +2139,8 @@ export default class MetamaskController extends EventEmitter { ethQuery, ); - const primaryKeyring = keyringController.getKeyringsByType( - 'HD Key Tree', - )[0]; + const primaryKeyring = + keyringController.getKeyringsByType('HD Key Tree')[0]; if (!primaryKeyring) { throw new Error('MetamaskController - No HD Key Tree found'); } @@ -2186,7 +2165,8 @@ export default class MetamaskController extends EventEmitter { // keyring's iframe and have the setting initialized properly // Optimistically called to not block MetaMask login due to // Ledger Keyring GitHub downtime - const transportPreference = this.preferencesController.getLedgerTransportPreference(); + const transportPreference = + this.preferencesController.getLedgerTransportPreference(); this.setLedgerTransportPreference(transportPreference); // set new identities @@ -2280,12 +2260,10 @@ export default class MetamaskController extends EventEmitter { }); // Accounts - const hdKeyring = this.keyringController.getKeyringsByType( - 'HD Key Tree', - )[0]; - const simpleKeyPairKeyrings = this.keyringController.getKeyringsByType( - 'Simple Key Pair', - ); + const hdKeyring = + this.keyringController.getKeyringsByType('HD Key Tree')[0]; + const simpleKeyPairKeyrings = + this.keyringController.getKeyringsByType('Simple Key Pair'); const hdAccounts = await hdKeyring.getAccounts(); const simpleKeyPairKeyringAccounts = await Promise.all( simpleKeyPairKeyrings.map((keyring) => keyring.getAccounts()), @@ -2342,7 +2320,8 @@ export default class MetamaskController extends EventEmitter { } try { - const threeBoxSyncingAllowed = this.threeBoxController.getThreeBoxSyncingState(); + const threeBoxSyncingAllowed = + this.threeBoxController.getThreeBoxSyncingState(); if (threeBoxSyncingAllowed && !this.threeBoxController.box) { // 'await' intentionally omitted to avoid waiting for initialization this.threeBoxController.init(); @@ -2358,7 +2337,8 @@ export default class MetamaskController extends EventEmitter { // keyring's iframe and have the setting initialized properly // Optimistically called to not block MetaMask login due to // Ledger Keyring GitHub downtime - const transportPreference = this.preferencesController.getLedgerTransportPreference(); + const transportPreference = + this.preferencesController.getLedgerTransportPreference(); this.setLedgerTransportPreference(transportPreference); @@ -2454,7 +2434,8 @@ export default class MetamaskController extends EventEmitter { } async establishLedgerTransportPreference() { - const transportPreference = this.preferencesController.getLedgerTransportPreference(); + const transportPreference = + this.preferencesController.getLedgerTransportPreference(); return await this.setLedgerTransportPreference(transportPreference); } @@ -2626,9 +2607,8 @@ export default class MetamaskController extends EventEmitter { * @returns {} keyState */ async addNewAccount() { - const primaryKeyring = this.keyringController.getKeyringsByType( - 'HD Key Tree', - )[0]; + const primaryKeyring = + this.keyringController.getKeyringsByType('HD Key Tree')[0]; if (!primaryKeyring) { throw new Error('MetamaskController - No HD Key Tree found'); } @@ -2661,9 +2641,8 @@ export default class MetamaskController extends EventEmitter { * encoded as an array of UTF-8 bytes. */ async verifySeedPhrase() { - const primaryKeyring = this.keyringController.getKeyringsByType( - 'HD Key Tree', - )[0]; + const primaryKeyring = + this.keyringController.getKeyringsByType('HD Key Tree')[0]; if (!primaryKeyring) { throw new Error('MetamaskController - No HD Key Tree found'); } @@ -3098,10 +3077,11 @@ export default class MetamaskController extends EventEmitter { } default: { - const promise = this.encryptionPublicKeyManager.addUnapprovedMessageAsync( - msgParams, - req, - ); + const promise = + this.encryptionPublicKeyManager.addUnapprovedMessageAsync( + msgParams, + req, + ); this.sendUpdate(); this.opts.showUserConfirmation(); return promise; @@ -3640,9 +3620,10 @@ export default class MetamaskController extends EventEmitter { subjectType, // Miscellaneous - addSubjectMetadata: this.subjectMetadataController.addSubjectMetadata.bind( - this.subjectMetadataController, - ), + addSubjectMetadata: + this.subjectMetadataController.addSubjectMetadata.bind( + this.subjectMetadataController, + ), getProviderState: this.getProviderState.bind(this), getUnlockPromise: this.appStateController.getUnlockPromise.bind( this.appStateController, @@ -3650,9 +3631,10 @@ export default class MetamaskController extends EventEmitter { handleWatchAssetRequest: this.tokensController.watchAsset.bind( this.tokensController, ), - requestUserApproval: this.approvalController.addAndShowApprovalRequest.bind( - this.approvalController, - ), + requestUserApproval: + this.approvalController.addAndShowApprovalRequest.bind( + this.approvalController, + ), sendMetrics: this.metaMetricsController.trackEvent.bind( this.metaMetricsController, ), @@ -3667,15 +3649,17 @@ export default class MetamaskController extends EventEmitter { this.permissionController, origin, ), - requestAccountsPermission: this.permissionController.requestPermissions.bind( - this.permissionController, - { origin }, - { eth_accounts: {} }, - ), - requestPermissionsForOrigin: this.permissionController.requestPermissions.bind( - this.permissionController, - { origin }, - ), + requestAccountsPermission: + this.permissionController.requestPermissions.bind( + this.permissionController, + { origin }, + { eth_accounts: {} }, + ), + requestPermissionsForOrigin: + this.permissionController.requestPermissions.bind( + this.permissionController, + { origin }, + ), // Custom RPC-related addCustomRpc: async ({ @@ -3718,9 +3702,10 @@ export default class MetamaskController extends EventEmitter { getWeb3ShimUsageState: this.alertController.getWeb3ShimUsageState.bind( this.alertController, ), - setWeb3ShimUsageRecorded: this.alertController.setWeb3ShimUsageRecorded.bind( - this.alertController, - ), + setWeb3ShimUsageRecorded: + this.alertController.setWeb3ShimUsageRecorded.bind( + this.alertController, + ), }), ); @@ -3736,12 +3721,11 @@ export default class MetamaskController extends EventEmitter { origin, ), requestPermissions: async (requestedPermissions) => { - const [ - approvedPermissions, - ] = await this.permissionController.requestPermissions( - { origin }, - requestedPermissions, - ); + const [approvedPermissions] = + await this.permissionController.requestPermissions( + { origin }, + requestedPermissions, + ); return Object.values(approvedPermissions); }, @@ -4031,10 +4015,8 @@ export default class MetamaskController extends EventEmitter { * @returns {Promise} */ async getPendingNonce(address) { - const { - nonceDetails, - releaseLock, - } = await this.txController.nonceTracker.getNonceLock(address); + const { nonceDetails, releaseLock } = + await this.txController.nonceTracker.getNonceLock(address); const pendingNonce = nonceDetails.params.highestSuggested; releaseLock(); @@ -4150,7 +4132,8 @@ export default class MetamaskController extends EventEmitter { nickname = '', rpcPrefs = {}, ) { - const frequentRpcListDetail = this.preferencesController.getFrequentRpcListDetail(); + const frequentRpcListDetail = + this.preferencesController.getFrequentRpcListDetail(); const rpcSettings = frequentRpcListDetail.find( (rpc) => rpcUrl === rpc.rpcUrl, ); @@ -4199,7 +4182,8 @@ export default class MetamaskController extends EventEmitter { * @returns {object} rpcInfo found in the frequentRpcList */ findCustomRpcBy(rpcInfo) { - const frequentRpcListDetail = this.preferencesController.getFrequentRpcListDetail(); + const frequentRpcListDetail = + this.preferencesController.getFrequentRpcListDetail(); for (const existingRpcInfo of frequentRpcListDetail) { for (const key of Object.keys(rpcInfo)) { if (existingRpcInfo[key] === rpcInfo[key]) { @@ -4220,10 +4204,10 @@ export default class MetamaskController extends EventEmitter { * @param {string} transportType - The Ledger transport type. */ async setLedgerTransportPreference(transportType) { - const currentValue = this.preferencesController.getLedgerTransportPreference(); - const newValue = this.preferencesController.setLedgerTransportPreference( - transportType, - ); + const currentValue = + this.preferencesController.getLedgerTransportPreference(); + const newValue = + this.preferencesController.setLedgerTransportPreference(transportType); const keyring = await this.getKeyringForDevice(DEVICE_NAMES.LEDGER); if (keyring?.updateTransportMethod) { @@ -4289,9 +4273,8 @@ export default class MetamaskController extends EventEmitter { onEnvironmentTypeClosed(environmentType) { const appStatePollingTokenType = POLLING_TOKEN_ENVIRONMENT_TYPES[environmentType]; - const pollingTokensToDisconnect = this.appStateController.store.getState()[ - appStatePollingTokenType - ]; + const pollingTokensToDisconnect = + this.appStateController.store.getState()[appStatePollingTokenType]; pollingTokensToDisconnect.forEach((pollingToken) => { this.gasFeeController.disconnectPoller(pollingToken); this.appStateController.removePollingToken( diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index c0e1a08b9..ccdd0f38f 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -221,9 +221,10 @@ describe('MetaMaskController', function () { }); it('adds private key to keyrings in KeyringController', async function () { - const simpleKeyrings = metamaskController.keyringController.getKeyringsByType( - 'Simple Key Pair', - ); + const simpleKeyrings = + metamaskController.keyringController.getKeyringsByType( + 'Simple Key Pair', + ); const privKeyBuffer = simpleKeyrings[0].wallets[0].privateKey; const pubKeyBuffer = simpleKeyrings[0].wallets[0].publicKey; const addressBuffer = pubToAddress(pubKeyBuffer); @@ -234,7 +235,8 @@ describe('MetaMaskController', function () { }); it('adds 1 account', async function () { - const keyringAccounts = await metamaskController.keyringController.getAccounts(); + const keyringAccounts = + await metamaskController.keyringController.getAccounts(); assert.equal( keyringAccounts[keyringAccounts.length - 1], '0xe18035bf8712672935fdb4e5e431b1a0183d2dfc', @@ -259,7 +261,8 @@ describe('MetaMaskController', function () { const identities = Object.keys( metamaskController.preferencesController.store.getState().identities, ); - const addresses = await metamaskController.keyringController.getAccounts(); + const addresses = + await metamaskController.keyringController.getAccounts(); identities.forEach((identity) => { assert.ok( @@ -486,7 +489,8 @@ describe('MetaMaskController', function () { }); it('changes preferences controller select address', function () { - const preferenceControllerState = metamaskController.preferencesController.store.getState(); + const preferenceControllerState = + metamaskController.preferencesController.store.getState(); assert.equal(preferenceControllerState.selectedAddress, address); }); @@ -517,9 +521,10 @@ describe('MetaMaskController', function () { await metamaskController .connectHardware(DEVICE_NAMES.TREZOR, 0) .catch(() => null); - const keyrings = await metamaskController.keyringController.getKeyringsByType( - KEYRING_TYPES.TREZOR, - ); + const keyrings = + await metamaskController.keyringController.getKeyringsByType( + KEYRING_TYPES.TREZOR, + ); assert.deepEqual( metamaskController.keyringController.addNewKeyring.getCall(0).args, [KEYRING_TYPES.TREZOR], @@ -532,9 +537,10 @@ describe('MetaMaskController', function () { await metamaskController .connectHardware(DEVICE_NAMES.LEDGER, 0) .catch(() => null); - const keyrings = await metamaskController.keyringController.getKeyringsByType( - KEYRING_TYPES.LEDGER, - ); + const keyrings = + await metamaskController.keyringController.getKeyringsByType( + KEYRING_TYPES.LEDGER, + ); assert.deepEqual( metamaskController.keyringController.addNewKeyring.getCall(0).args, [KEYRING_TYPES.LEDGER], @@ -586,9 +592,10 @@ describe('MetaMaskController', function () { .connectHardware(DEVICE_NAMES.TREZOR, 0) .catch(() => null); await metamaskController.forgetDevice(DEVICE_NAMES.TREZOR); - const keyrings = await metamaskController.keyringController.getKeyringsByType( - KEYRING_TYPES.TREZOR, - ); + const keyrings = + await metamaskController.keyringController.getKeyringsByType( + KEYRING_TYPES.TREZOR, + ); assert.deepEqual(keyrings[0].accounts, []); assert.deepEqual(keyrings[0].page, 0); @@ -645,9 +652,10 @@ describe('MetaMaskController', function () { }); it('should set unlockedAccount in the keyring', async function () { - const keyrings = await metamaskController.keyringController.getKeyringsByType( - KEYRING_TYPES.TREZOR, - ); + const keyrings = + await metamaskController.keyringController.getKeyringsByType( + KEYRING_TYPES.TREZOR, + ); assert.equal(keyrings[0].unlockedAccount, accountToUnlock); }); @@ -690,7 +698,8 @@ describe('MetaMaskController', function () { CUSTOM_RPC_URL, CUSTOM_RPC_CHAIN_ID, ); - const networkControllerState = metamaskController.networkController.store.getState(); + const networkControllerState = + metamaskController.networkController.store.getState(); assert.equal(networkControllerState.provider.rpcUrl, CUSTOM_RPC_URL); }); }); @@ -726,7 +735,8 @@ describe('MetaMaskController', function () { it('#addNewAccount', async function () { await metamaskController.addNewAccount(); - const getAccounts = await metamaskController.keyringController.getAccounts(); + const getAccounts = + await metamaskController.keyringController.getAccounts(); assert.equal(getAccounts.length, 2); }); }); @@ -959,7 +969,8 @@ describe('MetaMaskController', function () { // handle the promise so it doesn't throw an unhandledRejection promise.then(noop).catch(noop); - metamaskPersonalMsgs = metamaskController.personalMessageManager.getUnapprovedMsgs(); + metamaskPersonalMsgs = + metamaskController.personalMessageManager.getUnapprovedMsgs(); personalMessages = metamaskController.personalMessageManager.messages; msgId = Object.keys(metamaskPersonalMsgs)[0]; personalMessages[0].msgParams.metamaskId = parseInt(msgId, 10); @@ -1250,9 +1261,8 @@ describe('MetaMaskController', function () { describe('markNotificationsAsRead', function () { it('marks the notification as read', function () { metamaskController.markNotificationsAsRead([NOTIFICATION_ID]); - const readNotification = metamaskController.getState().notifications[ - NOTIFICATION_ID - ]; + const readNotification = + metamaskController.getState().notifications[NOTIFICATION_ID]; assert.notEqual(readNotification.readDate, null); }); }); diff --git a/app/scripts/migrations/022.test.js b/app/scripts/migrations/022.test.js index c4e91aac5..c2950b0ac 100644 --- a/app/scripts/migrations/022.test.js +++ b/app/scripts/migrations/022.test.js @@ -18,11 +18,8 @@ const storage = { describe('storage is migrated successfully where transactions that are submitted have submittedTimes', () => { it('should add submittedTime key on the txMeta if appropriate', async () => { const migratedData = await migration22.migrate(storage); - const [ - txMeta1, - txMeta2, - txMeta3, - ] = migratedData.data.TransactionController.transactions; + const [txMeta1, txMeta2, txMeta3] = + migratedData.data.TransactionController.transactions; expect(migratedData.meta.version).toStrictEqual(22); // should have written a submitted time diff --git a/app/scripts/migrations/030.js b/app/scripts/migrations/030.js index 31dc1cf6e..41f00bf66 100644 --- a/app/scripts/migrations/030.js +++ b/app/scripts/migrations/030.js @@ -33,7 +33,8 @@ function transformState(state) { delete frequentRpcListDetail[index].chainId; } }); - newState.PreferencesController.frequentRpcListDetail = frequentRpcListDetail; + newState.PreferencesController.frequentRpcListDetail = + frequentRpcListDetail; } } if (state.NetworkController) { diff --git a/app/scripts/migrations/047.js b/app/scripts/migrations/047.js index b3d2a6fd7..a08da313a 100644 --- a/app/scripts/migrations/047.js +++ b/app/scripts/migrations/047.js @@ -21,7 +21,8 @@ function transformState(state) { if (Array.isArray(transactions)) { transactions.forEach((transaction) => { if (typeof transaction.metamaskNetworkId === 'number') { - transaction.metamaskNetworkId = transaction.metamaskNetworkId.toString(); + transaction.metamaskNetworkId = + transaction.metamaskNetworkId.toString(); } }); } diff --git a/app/scripts/migrations/049.js b/app/scripts/migrations/049.js index 6b3013d82..a420886e0 100644 --- a/app/scripts/migrations/049.js +++ b/app/scripts/migrations/049.js @@ -18,11 +18,8 @@ export default { function transformState(state = {}) { if (state.PreferencesController) { - const { - metaMetricsId, - participateInMetaMetrics, - metaMetricsSendCount, - } = state.PreferencesController; + const { metaMetricsId, participateInMetaMetrics, metaMetricsSendCount } = + state.PreferencesController; state.MetaMetricsController = state.MetaMetricsController ?? {}; if (metaMetricsId !== undefined) { @@ -31,7 +28,8 @@ function transformState(state = {}) { } if (participateInMetaMetrics !== undefined) { - state.MetaMetricsController.participateInMetaMetrics = participateInMetaMetrics; + state.MetaMetricsController.participateInMetaMetrics = + participateInMetaMetrics; delete state.PreferencesController.participateInMetaMetrics; } diff --git a/app/scripts/migrations/052.js b/app/scripts/migrations/052.js index 4b5de7d22..f2469106e 100644 --- a/app/scripts/migrations/052.js +++ b/app/scripts/migrations/052.js @@ -34,11 +34,8 @@ export default { function transformState(state = {}) { if (state.PreferencesController) { - const { - accountTokens, - accountHiddenTokens, - frequentRpcListDetail, - } = state.PreferencesController; + const { accountTokens, accountHiddenTokens, frequentRpcListDetail } = + state.PreferencesController; const newAccountTokens = {}; const newAccountHiddenTokens = {}; diff --git a/app/scripts/migrations/055.js b/app/scripts/migrations/055.js index 98676bc63..b0ab2a844 100644 --- a/app/scripts/migrations/055.js +++ b/app/scripts/migrations/055.js @@ -23,13 +23,16 @@ function transformState(state) { if ( state?.IncomingTransactionsController?.incomingTxLastFetchedBlocksByNetwork ) { - state.IncomingTransactionsController.incomingTxLastFetchedBlockByChainId = mapKeys( - state.IncomingTransactionsController.incomingTxLastFetchedBlocksByNetwork, - // using optional chaining in case user's state has fetched blocks for - // RPC network types (which don't map to a single chainId). This should - // not be possible, but it's safer - (_, key) => NETWORK_TYPE_TO_ID_MAP[key]?.chainId ?? UNKNOWN_CHAIN_ID_KEY, - ); + state.IncomingTransactionsController.incomingTxLastFetchedBlockByChainId = + mapKeys( + state.IncomingTransactionsController + .incomingTxLastFetchedBlocksByNetwork, + // using optional chaining in case user's state has fetched blocks for + // RPC network types (which don't map to a single chainId). This should + // not be possible, but it's safer + (_, key) => + NETWORK_TYPE_TO_ID_MAP[key]?.chainId ?? UNKNOWN_CHAIN_ID_KEY, + ); // Now that mainnet and test net last fetched blocks are keyed by their // respective chainIds, we can safely delete anything we had for custom // networks. Any custom network that shares a chainId with one of the diff --git a/app/scripts/migrations/056.js b/app/scripts/migrations/056.js index 70300f363..48e75eaa4 100644 --- a/app/scripts/migrations/056.js +++ b/app/scripts/migrations/056.js @@ -30,11 +30,10 @@ export default { PreferencesController.accountTokens[account], ); chains.forEach((chain) => { - PreferencesController.accountTokens[account][ - chain - ] = PreferencesController.accountTokens[account][chain].filter( - ({ address }) => address, - ); + PreferencesController.accountTokens[account][chain] = + PreferencesController.accountTokens[account][chain].filter( + ({ address }) => address, + ); }); }); } diff --git a/app/scripts/migrations/064.test.js b/app/scripts/migrations/064.test.js index 94228ad9b..227d4d11d 100644 --- a/app/scripts/migrations/064.test.js +++ b/app/scripts/migrations/064.test.js @@ -95,8 +95,7 @@ describe('migration #64', () => { s: '0x49f74084dd8c517b305a2e60b39ae9002176a5244cb06de8f9ea3757811f5ec6', status: 'confirmed', estimatedBaseFee: 'b', - hash: - '0x4d8543f12afd3795b94d723dcd0e20bfc3740e1af668e5e90a0c5ec49f36ba12', + hash: '0x4d8543f12afd3795b94d723dcd0e20bfc3740e1af668e5e90a0c5ec49f36ba12', }, 1: { type: SENT_ETHER, @@ -118,8 +117,7 @@ describe('migration #64', () => { status: 'unapproved', time: 1631118004776, txParams: { - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', + data: '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', from: '0x0f002c95c041f003be01c3e4f52cae1f6ab3ba6e', gas: '0x31413', value: '0x0', @@ -159,8 +157,7 @@ describe('migration #64', () => { gas: '0xa9fe', }, estimatedBaseFee: 'b', - hash: - '0x19ffab8a9467df9afbef82d8907f9e39f0696c7a774ed5473ecf7337adcc674b', + hash: '0x19ffab8a9467df9afbef82d8907f9e39f0696c7a774ed5473ecf7337adcc674b', origin: 'https://metamask.github.io', r: '0xc2b2901f3593536d21e9b136c469b9b8f91a944f18a29a3cdf3a2eaadf660e71', rawTx: @@ -277,8 +274,7 @@ describe('migration #64', () => { s: '0x49f74084dd8c517b305a2e60b39ae9002176a5244cb06de8f9ea3757811f5ec6', status: 'confirmed', estimatedBaseFee: 'b', - hash: - '0x4d8543f12afd3795b94d723dcd0e20bfc3740e1af668e5e90a0c5ec49f36ba12', + hash: '0x4d8543f12afd3795b94d723dcd0e20bfc3740e1af668e5e90a0c5ec49f36ba12', }, 1: { type: TRANSACTION_TYPES.SIMPLE_SEND, @@ -300,8 +296,7 @@ describe('migration #64', () => { status: 'unapproved', time: 1631118004776, txParams: { - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', + data: '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', from: '0x0f002c95c041f003be01c3e4f52cae1f6ab3ba6e', gas: '0x31413', value: '0x0', @@ -341,8 +336,7 @@ describe('migration #64', () => { gas: '0xa9fe', }, estimatedBaseFee: 'b', - hash: - '0x19ffab8a9467df9afbef82d8907f9e39f0696c7a774ed5473ecf7337adcc674b', + hash: '0x19ffab8a9467df9afbef82d8907f9e39f0696c7a774ed5473ecf7337adcc674b', origin: 'https://metamask.github.io', r: '0xc2b2901f3593536d21e9b136c469b9b8f91a944f18a29a3cdf3a2eaadf660e71', rawTx: diff --git a/app/scripts/migrations/065.js b/app/scripts/migrations/065.js index 96e9820e1..c1422d8ae 100644 --- a/app/scripts/migrations/065.js +++ b/app/scripts/migrations/065.js @@ -19,10 +19,8 @@ export default { function transformState(state) { if (state.PreferencesController) { - const { - completedOnboarding, - firstTimeFlowType, - } = state.PreferencesController; + const { completedOnboarding, firstTimeFlowType } = + state.PreferencesController; state.OnboardingController = state.OnboardingController ?? {}; if (completedOnboarding !== undefined) { diff --git a/app/scripts/migrations/067.js b/app/scripts/migrations/067.js index 98150edf7..b635a0643 100644 --- a/app/scripts/migrations/067.js +++ b/app/scripts/migrations/067.js @@ -36,14 +36,13 @@ function transformState(state) { const cachedBalances = state.CachedBalancesController?.cachedBalances || {}; const userIsCurrentlyOnATestNet = TEST_CHAINS.includes(provider?.chainId); - const userHasMadeATestNetTransaction = Object.values( - transactions, - ).some(({ chainId }) => TEST_CHAINS.includes(chainId)); + const userHasMadeATestNetTransaction = Object.values(transactions).some( + ({ chainId }) => TEST_CHAINS.includes(chainId), + ); const userHasACachedBalanceOnATestnet = TEST_CHAINS.some((chainId) => { const cachedBalancesForChain = Object.values(cachedBalances[chainId] || {}); - const userHasABalanceGreaterThanZeroOnThisChain = cachedBalancesForChain.some( - hexNumberIsGreaterThanZero, - ); + const userHasABalanceGreaterThanZeroOnThisChain = + cachedBalancesForChain.some(hexNumberIsGreaterThanZero); return userHasABalanceGreaterThanZeroOnThisChain; }); const userHasUsedATestnet = diff --git a/app/scripts/migrations/068.js b/app/scripts/migrations/068.js index c2abbef76..a08dbcaea 100644 --- a/app/scripts/migrations/068.js +++ b/app/scripts/migrations/068.js @@ -38,9 +38,8 @@ function transformState(state) { permissionActivityLog: permissionsLog, permissionHistory: permissionsHistory, }, - SubjectMetadataController: getSubjectMetadataControllerState( - domainMetadata, - ), + SubjectMetadataController: + getSubjectMetadataControllerState(domainMetadata), }; } diff --git a/app/scripts/migrations/068.test.js b/app/scripts/migrations/068.test.js index 0540c5b48..b5aad374a 100644 --- a/app/scripts/migrations/068.test.js +++ b/app/scripts/migrations/068.test.js @@ -119,10 +119,8 @@ describe('migration #68', () => { }; const newStorage = await migration68.migrate(oldStorage); - const { - PermissionLogController, - SubjectMetadataController, - } = newStorage.data; + const { PermissionLogController, SubjectMetadataController } = + newStorage.data; const expected = getOldState().PermissionsMetadata; expect(PermissionLogController.permissionHistory).toStrictEqual( diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 8f1d49600..7381fab9d 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -80,10 +80,8 @@ export default class ExtensionPlatform { } getVersion() { - const { - version, - version_name: versionName, - } = browser.runtime.getManifest(); + const { version, version_name: versionName } = + browser.runtime.getManifest(); const versionParts = version.split('.'); if (versionName) { diff --git a/development/build/transforms/remove-fenced-code.js b/development/build/transforms/remove-fenced-code.js index 90d49972e..6a95adf17 100644 --- a/development/build/transforms/remove-fenced-code.js +++ b/development/build/transforms/remove-fenced-code.js @@ -320,9 +320,8 @@ function removeFencedCode(filePath, typeOfCurrentBuild, fileContent) { let currentCommand; for (let i = 0; i < parsedDirectives.length; i++) { - const { line, indices, terminus, command, parameters } = parsedDirectives[ - i - ]; + const { line, indices, terminus, command, parameters } = + parsedDirectives[i]; if (i % 2 === 0) { if (terminus !== DirectiveTerminuses.BEGIN) { throw new Error( @@ -368,9 +367,8 @@ function removeFencedCode(filePath, typeOfCurrentBuild, fileContent) { } // Forbid empty fences - const { line: previousLine, indices: previousIndices } = parsedDirectives[ - i - 1 - ]; + const { line: previousLine, indices: previousIndices } = + parsedDirectives[i - 1]; if (fileContent.substring(previousIndices[1], indices[0]).trim() === '') { throw new Error( `Empty fence found in file "${filePath}":\n${previousLine}\n${line}\n`, diff --git a/development/build/transforms/remove-fenced-code.test.js b/development/build/transforms/remove-fenced-code.test.js index 3be3e401a..d185ee6f5 100644 --- a/development/build/transforms/remove-fenced-code.test.js +++ b/development/build/transforms/remove-fenced-code.test.js @@ -289,9 +289,8 @@ describe('build/transforms/remove-fenced-code', () => { ), ).toStrictEqual([ignoredLine, true]); - const modifiedInputWithoutFences = testData.validInputs.withoutFences.concat( - ignoredLine, - ); + const modifiedInputWithoutFences = + testData.validInputs.withoutFences.concat(ignoredLine); // These inputs will not be transformed expect( diff --git a/development/verify-locale-strings.js b/development/verify-locale-strings.js index 6a3d330e9..7044d68ec 100644 --- a/development/verify-locale-strings.js +++ b/development/verify-locale-strings.js @@ -183,7 +183,8 @@ async function verifyEnglishLocale() { ignore: [testGlob], }); - const strictSearchRegex = /\bt\(\s*'(\w+)'\s*\)|\btranslationKey:\s*'(\w+)'/gu; + const strictSearchRegex = + /\bt\(\s*'(\w+)'\s*\)|\btranslationKey:\s*'(\w+)'/gu; // match "t(`...`)" because constructing message keys from template strings // prevents this script from finding the messages, and then inappropriately // deletes them diff --git a/package.json b/package.json index 2d12a00c4..df33cb3b4 100644 --- a/package.json +++ b/package.json @@ -296,7 +296,7 @@ "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.1", "eslint": "^8.20.0", - "eslint-config-prettier": "^8.1.0", + "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-node": "^0.3.4", "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-import": "^2.22.1", @@ -304,7 +304,7 @@ "eslint-plugin-jsdoc": "^39.3.3", "eslint-plugin-mocha": "^8.1.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.23.1", "eslint-plugin-react-hooks": "^4.2.0", "fancy-log": "^1.3.3", @@ -343,7 +343,7 @@ "nyc": "^15.0.0", "patch-package": "^6.4.7", "polyfill-crypto.getrandomvalues": "^1.0.0", - "prettier": "^2.2.1", + "prettier": "^2.7.1", "prettier-plugin-sort-json": "^0.0.1", "proxyquire": "^2.1.3", "pumpify": "^2.0.1", diff --git a/shared/constants/tokens.js b/shared/constants/tokens.js index 86a960a13..d430c81bc 100644 --- a/shared/constants/tokens.js +++ b/shared/constants/tokens.js @@ -5,9 +5,9 @@ import contractMap from '@metamask/contract-metadata'; * `@metamask/contract-metadata`. Used primarily to validate if manually entered * contract addresses do not match one of our listed tokens */ -export const LISTED_CONTRACT_ADDRESSES = Object.keys( - contractMap, -).map((address) => address.toLowerCase()); +export const LISTED_CONTRACT_ADDRESSES = Object.keys(contractMap).map( + (address) => address.toLowerCase(), +); /** * @typedef {object} TokenDetails diff --git a/shared/modules/contract-utils.test.js b/shared/modules/contract-utils.test.js index 602a2a3b3..ccdbf328c 100644 --- a/shared/modules/contract-utils.test.js +++ b/shared/modules/contract-utils.test.js @@ -19,12 +19,11 @@ describe('Contract Utils', () => { }, }; - const { - isContractAddress: isNotContractAddress, - } = await readAddressAsContract( - mockEthQuery, - '0x76B4aa9Fc4d351a0062c6af8d186DF959D564A84', - ); + const { isContractAddress: isNotContractAddress } = + await readAddressAsContract( + mockEthQuery, + '0x76B4aa9Fc4d351a0062c6af8d186DF959D564A84', + ); expect(isNotContractAddress).toStrictEqual(false); }); }); diff --git a/shared/modules/transaction.utils.js b/shared/modules/transaction.utils.js index 630b3e73a..001b8beb8 100644 --- a/shared/modules/transaction.utils.js +++ b/shared/modules/transaction.utils.js @@ -157,10 +157,8 @@ export async function determineTransactionType(txParams, query) { if (data && !to) { result = TRANSACTION_TYPES.DEPLOY_CONTRACT; } else { - const { - contractCode: resultCode, - isContractAddress, - } = await readAddressAsContract(query, to); + const { contractCode: resultCode, isContractAddress } = + await readAddressAsContract(query, to); contractCode = resultCode; diff --git a/shared/modules/transaction.utils.test.js b/shared/modules/transaction.utils.test.js index 6998022e4..906cdb2bb 100644 --- a/shared/modules/transaction.utils.test.js +++ b/shared/modules/transaction.utils.test.js @@ -149,8 +149,7 @@ describe('Transaction.utils', function () { const result = await determineTransactionType( { to: '0x9e673399f795D01116e9A8B2dD2F156705131ee9', - data: - '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', + data: '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', }, new EthQuery(_provider), ); @@ -174,8 +173,7 @@ describe('Transaction.utils', function () { const result = await determineTransactionType( { to: '0x9e673399f795D01116e9A8B2dD2F156705131ee9', - data: - '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', + data: '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', }, new EthQuery(_provider), ); @@ -199,8 +197,7 @@ describe('Transaction.utils', function () { const result = await determineTransactionType( { to: '0x9e673399f795D01116e9A8B2dD2F156705131ee9', - data: - '0x095ea7b30000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C9700000000000000000000000000000000000000000000000000000000000000005', + data: '0x095ea7b30000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C9700000000000000000000000000000000000000000000000000000000000000005', }, new EthQuery(_provider), ); diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js index 9e85bff84..f83e6f34f 100644 --- a/test/e2e/metamask-ui.spec.js +++ b/test/e2e/metamask-ui.spec.js @@ -405,8 +405,7 @@ describe('MetaMask', function () { it('finds the transaction in the transactions list', async function () { await driver.waitForSelector( { - css: - '.transaction-list__completed-transactions .transaction-list-item__primary-currency', + css: '.transaction-list__completed-transactions .transaction-list-item__primary-currency', text: '-1 TST', }, { timeout: 10000 }, @@ -488,8 +487,7 @@ describe('MetaMask', function () { it('finds the transaction in the transactions list', async function () { await driver.waitForSelector({ - css: - '.transaction-list__completed-transactions .transaction-list-item__primary-currency', + css: '.transaction-list__completed-transactions .transaction-list-item__primary-currency', text: '-1.5 TST', }); @@ -545,8 +543,7 @@ describe('MetaMask', function () { await driver.waitForSelector({ // Selects only the very first transaction list item immediately following the 'Pending' header - css: - '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', + css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', text: 'Approve TST spend limit', }); @@ -638,8 +635,7 @@ describe('MetaMask', function () { it('finds the transaction in the transactions list', async function () { await driver.waitForSelector({ // Select only the heading of the first entry in the transaction list. - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', text: 'Approve TST spend limit', }); }); @@ -691,14 +687,12 @@ describe('MetaMask', function () { await driver.waitForSelector({ // Select the heading of the first transaction list item in the // completed transaction list with text matching Send TST - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', text: 'Send TST', }); await driver.waitForSelector({ - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .transaction-list-item__primary-currency', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .transaction-list-item__primary-currency', text: '-1.5 TST', }); }); @@ -735,8 +729,7 @@ describe('MetaMask', function () { await driver.waitForSelector({ // Selects only the very first transaction list item immediately following the 'Pending' header - css: - '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', + css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', text: 'Approve TST spend limit', }); @@ -760,8 +753,7 @@ describe('MetaMask', function () { it('finds the transaction in the transactions list', async function () { await driver.waitForSelector({ - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', text: 'Approve TST spend limit', }); }); diff --git a/test/e2e/tests/chain-interactions.spec.js b/test/e2e/tests/chain-interactions.spec.js index 3b7d57408..c95d3d211 100644 --- a/test/e2e/tests/chain-interactions.spec.js +++ b/test/e2e/tests/chain-interactions.spec.js @@ -39,11 +39,8 @@ describe('Chain Interactions', function () { ); // verify chain details - const [ - networkName, - networkUrl, - chainIdElement, - ] = await driver.findElements('.definition-list dd'); + const [networkName, networkUrl, chainIdElement] = + await driver.findElements('.definition-list dd'); assert.equal(await networkName.getText(), `Localhost ${port}`); assert.equal(await networkUrl.getText(), `http://127.0.0.1:${port}`); assert.equal(await chainIdElement.getText(), chainId.toString()); diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index dad19482c..a6de80ef5 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -132,8 +132,7 @@ describe('Stores custom RPC history', function () { await chainIdInput.clear(); await chainIdInput.sendKeys(duplicateChainId); await driver.findElement({ - text: - 'This Chain ID is currently used by the Localhost 8545 network.', + text: 'This Chain ID is currently used by the Localhost 8545 network.', tag: 'h6', }); diff --git a/test/e2e/tests/custom-token-add-approve.spec.js b/test/e2e/tests/custom-token-add-approve.spec.js index 0f366784c..d7d0429a9 100644 --- a/test/e2e/tests/custom-token-add-approve.spec.js +++ b/test/e2e/tests/custom-token-add-approve.spec.js @@ -171,8 +171,7 @@ describe.skip('Create token, approve token and approve token without gas', funct await driver.waitForSelector({ // Selects only the very first transaction list item immediately following the 'Pending' header - css: - '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', + css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', text: 'Approve Token spend limit', }); }, @@ -230,8 +229,7 @@ describe.skip('Create token, approve token and approve token without gas', funct await driver.clickElement({ text: 'Save', tag: 'button' }); await driver.waitForSelector({ - css: - '.confirm-approve-content__transaction-details-content__secondary-fee', + css: '.confirm-approve-content__transaction-details-content__secondary-fee', text: '0.0006 ETH', }); @@ -269,8 +267,7 @@ describe.skip('Create token, approve token and approve token without gas', funct await driver.clickElement({ tag: 'button', text: 'Activity' }); await driver.waitForSelector({ // Select only the heading of the first entry in the transaction list. - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', text: 'Approve Token spend limit', }); }, @@ -331,8 +328,7 @@ describe.skip('Create token, approve token and approve token without gas', funct await driver.waitForSelector({ // Selects only the very first transaction list item immediately following the 'Pending' header - css: - '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', + css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', text: 'Approve Token spend limit', }); @@ -347,8 +343,7 @@ describe.skip('Create token, approve token and approve token without gas', funct await driver.clickElement({ text: 'Confirm', tag: 'button' }); await driver.waitForSelector({ - css: - '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', + css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', text: 'Approve Token spend limit', }); }, diff --git a/ui/components/app/add-network/add-network.js b/ui/components/app/add-network/add-network.js index 183d7e8e7..fb915b13e 100644 --- a/ui/components/app/add-network/add-network.js +++ b/ui/components/app/add-network/add-network.js @@ -58,14 +58,13 @@ const AddNetwork = () => { const [showPopover, setShowPopover] = useState(false); useEffect(() => { - const anAddNetworkConfirmationFromMetaMaskExists = unapprovedConfirmations?.find( - (confirmation) => { + const anAddNetworkConfirmationFromMetaMaskExists = + unapprovedConfirmations?.find((confirmation) => { return ( confirmation.origin === 'metamask' && confirmation.type === MESSAGE_TYPE.ADD_ETHEREUM_CHAIN ); - }, - ); + }); if (!showPopover && anAddNetworkConfirmationFromMetaMaskExists) { setShowPopover(true); } diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js index 24e688407..59428a649 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js @@ -22,11 +22,8 @@ import { useI18nContext } from '../../../../hooks/useI18nContext'; const AdvancedGasFeeDefaults = () => { const t = useI18nContext(); const dispatch = useDispatch(); - const { - gasErrors, - maxBaseFee, - maxPriorityFeePerGas, - } = useAdvancedGasFeePopoverContext(); + const { gasErrors, maxBaseFee, maxPriorityFeePerGas } = + useAdvancedGasFeePopoverContext(); const advancedGasFeeValues = useSelector(getAdvancedGasFeeValues); const { updateTransactionEventFragment } = useTransactionEventFragment(); const { editGasMode } = useGasFeeContext(); diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js index 1be16963d..40963467a 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js @@ -20,14 +20,10 @@ const validateGasLimit = (gasLimit, minimumGasLimitDec) => { const AdvancedGasFeeGasLimit = () => { const t = useI18nContext(); - const { - setGasLimit: setGasLimitInContext, - setErrorValue, - } = useAdvancedGasFeePopoverContext(); - const { - gasLimit: gasLimitInTransaction, - minimumGasLimitDec, - } = useGasFeeContext(); + const { setGasLimit: setGasLimitInContext, setErrorValue } = + useAdvancedGasFeePopoverContext(); + const { gasLimit: gasLimitInTransaction, minimumGasLimitDec } = + useGasFeeContext(); const [isEditing, setEditing] = useState(false); const [gasLimit, setGasLimit] = useState(gasLimitInTransaction); const [gasLimitError, setGasLimitError] = useState(); diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js index 466a96532..3b897d737 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js @@ -45,12 +45,8 @@ const validateBaseFee = (value, gasFeeEstimates, maxPriorityFeePerGas) => { const BaseFeeInput = () => { const t = useI18nContext(); - const { - gasFeeEstimates, - estimateUsed, - maxFeePerGas, - editGasMode, - } = useGasFeeContext(); + const { gasFeeEstimates, estimateUsed, maxFeePerGas, editGasMode } = + useGasFeeContext(); const { gasLimit, maxPriorityFeePerGas, @@ -59,11 +55,8 @@ const BaseFeeInput = () => { setMaxBaseFee, } = useAdvancedGasFeePopoverContext(); - const { - estimatedBaseFee, - historicalBaseFeeRange, - baseFeeTrend, - } = gasFeeEstimates; + const { estimatedBaseFee, historicalBaseFeeRange, baseFeeTrend } = + gasFeeEstimates; const [baseFeeError, setBaseFeeError] = useState(); const { currency, numberOfDecimals } = useUserPreferencedCurrency(PRIMARY); diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js index b06798b81..d5691273b 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js @@ -46,17 +46,10 @@ const validatePriorityFee = (value, gasFeeEstimates) => { const PriorityFeeInput = () => { const t = useI18nContext(); const advancedGasFeeValues = useSelector(getAdvancedGasFeeValues); - const { - gasLimit, - setErrorValue, - setMaxPriorityFeePerGas, - } = useAdvancedGasFeePopoverContext(); - const { - editGasMode, - estimateUsed, - gasFeeEstimates, - maxPriorityFeePerGas, - } = useGasFeeContext(); + const { gasLimit, setErrorValue, setMaxPriorityFeePerGas } = + useAdvancedGasFeePopoverContext(); + const { editGasMode, estimateUsed, gasFeeEstimates, maxPriorityFeePerGas } = + useGasFeeContext(); const { latestPriorityFeeRange, historicalPriorityFeeRange, diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js index ee0ecaf08..347ff23d0 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-save/advanced-gas-fee-save.js @@ -15,12 +15,8 @@ const AdvancedGasFeeSaveButton = () => { const { updateTransactionEventFragment } = useTransactionEventFragment(); const { updateTransaction } = useGasFeeContext(); const t = useI18nContext(); - const { - gasLimit, - hasErrors, - maxFeePerGas, - maxPriorityFeePerGas, - } = useAdvancedGasFeePopoverContext(); + const { gasLimit, hasErrors, maxFeePerGas, maxPriorityFeePerGas } = + useAdvancedGasFeePopoverContext(); const onSave = () => { updateTransaction({ diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 08f8c6169..842572066 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -57,13 +57,11 @@ const AssetList = ({ onClickAsset }) => { }, ); - const [ - secondaryCurrencyDisplay, - secondaryCurrencyProperties, - ] = useCurrencyDisplay(selectedAccountBalance, { - numberOfDecimals: secondaryNumberOfDecimals, - currency: secondaryCurrency, - }); + const [secondaryCurrencyDisplay, secondaryCurrencyProperties] = + useCurrencyDisplay(selectedAccountBalance, { + numberOfDecimals: secondaryNumberOfDecimals, + currency: secondaryCurrency, + }); const primaryTokenImage = useSelector(getNativeCurrencyImage); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; diff --git a/ui/components/app/cancel-button/cancel-button.js b/ui/components/app/cancel-button/cancel-button.js index 0efce2212..5898fdcde 100644 --- a/ui/components/app/cancel-button/cancel-button.js +++ b/ui/components/app/cancel-button/cancel-button.js @@ -36,7 +36,8 @@ export default function CancelButton({ type="secondary" className={classnames({ 'transaction-list-item__header-button': !detailsModal, - 'transaction-list-item-details__header-button-rounded-button': detailsModal, + 'transaction-list-item-details__header-button-rounded-button': + detailsModal, })} disabled={!hasEnoughCancelGas} > diff --git a/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.test.js b/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.test.js index d753a9350..a6343d7db 100644 --- a/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.test.js +++ b/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.test.js @@ -24,10 +24,8 @@ const MAXGASCOST_ABOVE_MOCK_MEDIUM_BN = new BigNumber( MAXFEEPERGAS_ABOVE_MOCK_MEDIUM_HEX, 16, ).times(21000, 10); -const MAXGASCOST_ABOVE_MOCK_MEDIUM_BN_PLUS_TEN_PCT_HEX = MAXGASCOST_ABOVE_MOCK_MEDIUM_BN.times( - 1.1, - 10, -).toString(16); +const MAXGASCOST_ABOVE_MOCK_MEDIUM_BN_PLUS_TEN_PCT_HEX = + MAXGASCOST_ABOVE_MOCK_MEDIUM_BN.times(1.1, 10).toString(16); const EXPECTED_ETH_FEE_1 = hexWEIToDecETH( MAXGASCOST_ABOVE_MOCK_MEDIUM_BN_PLUS_TEN_PCT_HEX, @@ -40,18 +38,15 @@ const MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI = new BigNumber( decGWEIToHexWEI(MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_DEC_GWEI), 16, ); -const MAXFEEPERGAS_BELOW_MOCK_MEDIUM_HEX = MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI.div( - 10, - 10, -).toString(16); +const MAXFEEPERGAS_BELOW_MOCK_MEDIUM_HEX = + MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI.div(10, 10).toString(16); const EXPECTED_ETH_FEE_2 = hexWEIToDecETH( MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI.times(21000, 10).toString(16), ); -const MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_HEX_WEI = MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI.toString( - 16, -); +const MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_HEX_WEI = + MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_BN_WEI.toString(16); jest.mock('../../../store/actions', () => ({ disconnectGasFeeEstimatePoller: jest.fn(), diff --git a/ui/components/app/collectible-options/collectible-options.js b/ui/components/app/collectible-options/collectible-options.js index 5df1b2019..358cf00fb 100644 --- a/ui/components/app/collectible-options/collectible-options.js +++ b/ui/components/app/collectible-options/collectible-options.js @@ -6,10 +6,8 @@ import { Menu, MenuItem } from '../../ui/menu'; const CollectibleOptions = ({ onRemove, onViewOnOpensea }) => { const t = useContext(I18nContext); - const [ - collectibleOptionsButtonElement, - setCollectibleOptionsButtonElement, - ] = useState(null); + const [collectibleOptionsButtonElement, setCollectibleOptionsButtonElement] = + useState(null); const [collectibleOptionsOpen, setCollectibleOptionsOpen] = useState(false); return ( diff --git a/ui/components/app/collectibles-items/collectibles-items.js b/ui/components/app/collectibles-items/collectibles-items.js index 2f3eeb211..d4d7d9d51 100644 --- a/ui/components/app/collectibles-items/collectibles-items.js +++ b/ui/components/app/collectibles-items/collectibles-items.js @@ -118,9 +118,8 @@ export default function CollectiblesItems({ [key]: !isExpanded, }; - collectiblesDropdownState[selectedAddress][ - chainId - ] = newCurrentAccountState; + collectiblesDropdownState[selectedAddress][chainId] = + newCurrentAccountState; dispatch(updateCollectibleDropDownState(collectiblesDropdownState)); }; @@ -186,13 +185,8 @@ export default function CollectiblesItems({ {isExpanded ? ( {collectibles.map((collectible, i) => { - const { - image, - address, - tokenId, - backgroundColor, - name, - } = collectible; + const { image, address, tokenId, backgroundColor, name } = + collectible; const collectibleImage = getAssetImageURL(image, ipfsGateway); const handleImageClick = () => history.push(`${ASSET_ROUTE}/${address}/${tokenId}`); @@ -249,11 +243,8 @@ export default function CollectiblesItems({ > <> {collectionsKeys.map((key) => { - const { - collectibles, - collectionName, - collectionImage, - } = collections[key]; + const { collectibles, collectionName, collectionImage } = + collections[key]; return renderCollection({ collectibles, diff --git a/ui/components/app/collectibles-tab/collectibles-tab.js b/ui/components/app/collectibles-tab/collectibles-tab.js index 85e0498c7..d9350759a 100644 --- a/ui/components/app/collectibles-tab/collectibles-tab.js +++ b/ui/components/app/collectibles-tab/collectibles-tab.js @@ -36,11 +36,8 @@ export default function CollectiblesTab({ onAddNFT }) { const t = useI18nContext(); const dispatch = useDispatch(); - const { - collectiblesLoading, - collections, - previouslyOwnedCollection, - } = useCollectiblesCollections(); + const { collectiblesLoading, collections, previouslyOwnedCollection } = + useCollectiblesCollections(); const onEnableAutoDetect = () => { history.push(EXPERIMENTAL_ROUTE); diff --git a/ui/components/app/collectibles-tab/collectibles-tab.test.js b/ui/components/app/collectibles-tab/collectibles-tab.test.js index 27f655b81..80d55cabc 100644 --- a/ui/components/app/collectibles-tab/collectibles-tab.test.js +++ b/ui/components/app/collectibles-tab/collectibles-tab.test.js @@ -182,10 +182,12 @@ describe('Collectible Items', () => { const checkAndUpdateAllCollectiblesOwnershipStatusStub = jest.fn(); const updateCollectibleDropDownStateStub = jest.fn(); setBackgroundConnection({ - setCollectiblesDetectionNoticeDismissed: setCollectiblesDetectionNoticeDismissedStub, + setCollectiblesDetectionNoticeDismissed: + setCollectiblesDetectionNoticeDismissedStub, detectCollectibles: detectCollectiblesStub, getState: getStateStub, - checkAndUpdateAllCollectiblesOwnershipStatus: checkAndUpdateAllCollectiblesOwnershipStatusStub, + checkAndUpdateAllCollectiblesOwnershipStatus: + checkAndUpdateAllCollectiblesOwnershipStatusStub, updateCollectibleDropDownState: updateCollectibleDropDownStateStub, }); const historyPushMock = jest.fn(); diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js index e31e81bce..442329497 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js @@ -42,9 +42,8 @@ const ConfirmPageContainerSummary = (props) => { TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER_FROM, TRANSACTION_TYPES.TOKEN_METHOD_SAFE_TRANSFER_FROM, ]; - const isContractTypeTransaction = contractInitiatedTransactionType.includes( - transactionType, - ); + const isContractTypeTransaction = + contractInitiatedTransactionType.includes(transactionType); let contractAddress; if (isContractTypeTransaction) { // If the transaction is TOKEN_METHOD_TRANSFER or TOKEN_METHOD_TRANSFER_FROM diff --git a/ui/components/app/connected-accounts-list/connected-accounts-list.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list.component.js index 20d4cdf91..ee5945600 100644 --- a/ui/components/app/connected-accounts-list/connected-accounts-list.component.js +++ b/ui/components/app/connected-accounts-list/connected-accounts-list.component.js @@ -125,11 +125,8 @@ export default class ConnectedAccountsList extends PureComponent { } render() { - const { - connectedAccounts, - selectedAddress, - shouldRenderListOptions, - } = this.props; + const { connectedAccounts, selectedAddress, shouldRenderListOptions } = + this.props; const { t } = this.context; return ( diff --git a/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.js b/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.js index dce984c47..8d7ae1bde 100644 --- a/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.js +++ b/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.js @@ -36,7 +36,8 @@ const ConnectedAccountsPermissions = ({ permissions }) => { className={classnames( 'connected-accounts-permissions__list-container', { - 'connected-accounts-permissions__list-container--expanded': expanded, + 'connected-accounts-permissions__list-container--expanded': + expanded, }, )} > diff --git a/ui/components/app/contact-list/recipient-group/recipient-group.component.js b/ui/components/app/contact-list/recipient-group/recipient-group.component.js index a8fd589db..9edd49a3c 100644 --- a/ui/components/app/contact-list/recipient-group/recipient-group.component.js +++ b/ui/components/app/contact-list/recipient-group/recipient-group.component.js @@ -37,10 +37,8 @@ export default function RecipientGroup({ address, selectedAddress, ), - 'send__select-recipient-wrapper__group-item--selected': addressesEqual( - address, - selectedAddress, - ), + 'send__select-recipient-wrapper__group-item--selected': + addressesEqual(address, selectedAddress), })} > diff --git a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js b/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js index afabb4ead..79a5b14b6 100644 --- a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js +++ b/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js @@ -27,9 +27,8 @@ const DetectedTokenSelectionPopover = ({ const trackEvent = useContext(MetaMetricsContext); const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork); - const { selected: selectedTokens = [] } = sortingBasedOnTokenSelection( - tokensListDetected, - ); + const { selected: selectedTokens = [] } = + sortingBasedOnTokenSelection(tokensListDetected); const numOfTokensImporting = selectedTokens.length === detectedTokens.length ? `All` diff --git a/ui/components/app/detected-token/detected-token.js b/ui/components/app/detected-token/detected-token.js index 02416ec37..b08c1cdd2 100644 --- a/ui/components/app/detected-token/detected-token.js +++ b/ui/components/app/detected-token/detected-token.js @@ -45,10 +45,8 @@ const DetectedToken = ({ setShowDetectedTokens }) => { return tokenObj; }, {}), ); - const [ - showDetectedTokenIgnoredPopover, - setShowDetectedTokenIgnoredPopover, - ] = useState(false); + const [showDetectedTokenIgnoredPopover, setShowDetectedTokenIgnoredPopover] = + useState(false); const importSelectedTokens = async (selectedTokens) => { selectedTokens.forEach((importedToken) => { @@ -71,10 +69,8 @@ const DetectedToken = ({ setShowDetectedTokens }) => { }; const handleClearTokensSelection = async () => { - const { - selected: selectedTokens = [], - deselected: deSelectedTokens = [], - } = sortingBasedOnTokenSelection(tokensListDetected); + const { selected: selectedTokens = [], deselected: deSelectedTokens = [] } = + sortingBasedOnTokenSelection(tokensListDetected); if (deSelectedTokens.length < detectedTokens.length) { await importSelectedTokens(selectedTokens); @@ -115,9 +111,8 @@ const DetectedToken = ({ setShowDetectedTokens }) => { }; const onImport = async () => { - const { selected: selectedTokens = [] } = sortingBasedOnTokenSelection( - tokensListDetected, - ); + const { selected: selectedTokens = [] } = + sortingBasedOnTokenSelection(tokensListDetected); if (selectedTokens.length < detectedTokens.length) { setShowDetectedTokenIgnoredPopover(true); diff --git a/ui/components/app/dropdowns/network-dropdown.js b/ui/components/app/dropdowns/network-dropdown.js index 54af45b12..a19dae151 100644 --- a/ui/components/app/dropdowns/network-dropdown.js +++ b/ui/components/app/dropdowns/network-dropdown.js @@ -295,9 +295,8 @@ class NetworkDropdown extends Component { onClickOutside={(event) => { const { classList } = event.target; const isInClassList = (className) => classList.contains(className); - const notToggleElementIndex = notToggleElementClassnames.findIndex( - isInClassList, - ); + const notToggleElementIndex = + notToggleElementClassnames.findIndex(isInClassList); if (notToggleElementIndex === -1) { event.stopPropagation(); diff --git a/ui/components/app/edit-gas-display/edit-gas-display.component.js b/ui/components/app/edit-gas-display/edit-gas-display.component.js index 2025ee30a..a083b913d 100644 --- a/ui/components/app/edit-gas-display/edit-gas-display.component.js +++ b/ui/components/app/edit-gas-display/edit-gas-display.component.js @@ -99,9 +99,8 @@ export default function EditGasDisplay({ } }, [showAdvancedForm]); - const dappSuggestedAndTxParamGasFeesAreTheSame = areDappSuggestedAndTxParamGasFeesTheSame( - transaction, - ); + const dappSuggestedAndTxParamGasFeesAreTheSame = + areDappSuggestedAndTxParamGasFeesTheSame(transaction); const requireDappAcknowledgement = Boolean( transaction?.dappSuggestedGasFees && diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.js b/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.js index af4da536b..55907ba95 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-fee-popover.js @@ -21,12 +21,8 @@ import NetworkStatistics from './network-statistics'; const EditGasFeePopover = () => { const { balanceError, editGasMode } = useGasFeeContext(); const t = useI18nContext(); - const { - closeAllModals, - closeModal, - currentModal, - openModalCount, - } = useTransactionModalContext(); + const { closeAllModals, closeModal, currentModal, openModalCount } = + useTransactionModalContext(); if (currentModal !== 'editGasFee') { return null; diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js b/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js index 983b260a2..6db074514 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js @@ -29,9 +29,8 @@ export const useGasItemFeeDetails = (priorityLevel) => { maxPriorityFeePerGas: maxPriorityFeePerGasValue, transaction, } = useGasFeeContext(); - const [estimateGreaterThanGasUse, setEstimateGreaterThanGasUse] = useState( - false, - ); + const [estimateGreaterThanGasUse, setEstimateGreaterThanGasUse] = + useState(false); const advancedGasFeeValues = useSelector(getAdvancedGasFeeValues); let maxFeePerGas; diff --git a/ui/components/app/edit-gas-popover/edit-gas-popover.component.js b/ui/components/app/edit-gas-popover/edit-gas-popover.component.js index 9d8ca4ac1..cf4c21301 100644 --- a/ui/components/app/edit-gas-popover/edit-gas-popover.component.js +++ b/ui/components/app/edit-gas-popover/edit-gas-popover.component.js @@ -63,10 +63,8 @@ export default function EditGasPopover({ supportsEIP1559; const [showEducationContent, setShowEducationContent] = useState(false); - const [ - dappSuggestedGasFeeAcknowledged, - setDappSuggestedGasFeeAcknowledged, - ] = useState(false); + const [dappSuggestedGasFeeAcknowledged, setDappSuggestedGasFeeAcknowledged] = + useState(false); const minimumGasLimitDec = hexToDecimal(minimumGasLimit); const updatedCustomGasSettings = useIncrementedGasFees(transaction); diff --git a/ui/components/app/flask/experimental-area/experimental-area.js b/ui/components/app/flask/experimental-area/experimental-area.js index 15160c395..b6b05f5da 100644 --- a/ui/components/app/flask/experimental-area/experimental-area.js +++ b/ui/components/app/flask/experimental-area/experimental-area.js @@ -15,7 +15,8 @@ function lineBreaksToBr(source) { }); } -const METAMASK_LOGO = lineBreaksToBr(`MMm*mmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmm*mMM +const METAMASK_LOGO = + lineBreaksToBr(`MMm*mmMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmm*mMM MM*./***mMMMMMMMMMMMMMMMMMMMMMMMMMMm***/.*MM MM/...///*mMMMMMMMMMMMMMMMMMMMMMMm*///.../MM Mm.....//../*mMMMMMMMMMMMMMMMMm*/..//.....mM @@ -57,7 +58,8 @@ MMMMMMMMMMMMMMMMMm/....../mMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMmmmmmmmmMMMMMMMMMMMMMMMMMM`); /* eslint-disable no-irregular-whitespace */ -const EXPERIMENTAL_AREA = lineBreaksToBr(`█▄█ █▀█ █░█ ▀ █▀█ █▀▀   █▀▀ █▄░█ ▀█▀ █▀▀ █▀█ █ █▄░█ █▀▀   ▄▀█ █▄░█ +const EXPERIMENTAL_AREA = + lineBreaksToBr(`█▄█ █▀█ █░█ ▀ █▀█ █▀▀   █▀▀ █▄░█ ▀█▀ █▀▀ █▀█ █ █▄░█ █▀▀   ▄▀█ █▄░█ ░█░ █▄█ █▄█ ░ █▀▄ ██▄   ██▄ █░▀█ ░█░ ██▄ █▀▄ █ █░▀█ █▄█   █▀█ █░▀█ █▀▀ ▀▄▀ █▀█ █▀▀ █▀█ █ █▀▄▀█ █▀▀ █▄░█ ▀█▀ ▄▀█ █░░   ▄▀█ █▀█ █▀▀ ▄▀█ diff --git a/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js index 9de986699..60bb65648 100644 --- a/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js +++ b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js @@ -166,7 +166,8 @@ export default class AdvancedGasInputs extends Component { errorType === 'error', 'advanced-gas-inputs__gas-edit-row__input--warning': errorType === 'warning', - 'advanced-gas-inputs__gas-edit-row__input-arrows--hidden': disabled, + 'advanced-gas-inputs__gas-edit-row__input-arrows--hidden': + disabled, }, )} > @@ -210,16 +211,14 @@ export default class AdvancedGasInputs extends Component { return null; } - const { - errorText: gasPriceErrorText, - errorType: gasPriceErrorType, - } = this.gasPriceError({ - insufficientBalance, - customPriceIsSafe, - isSpeedUp, - gasPrice, - customPriceIsExcessive, - }); + const { errorText: gasPriceErrorText, errorType: gasPriceErrorType } = + this.gasPriceError({ + insufficientBalance, + customPriceIsSafe, + isSpeedUp, + gasPrice, + customPriceIsExcessive, + }); const gasPriceErrorComponent = gasPriceErrorType ? (
) : null; - const { - errorText: gasLimitErrorText, - errorType: gasLimitErrorType, - } = this.gasLimitError({ insufficientBalance, gasLimit, minimumGasLimit }); + const { errorText: gasLimitErrorText, errorType: gasLimitErrorType } = + this.gasLimitError({ insufficientBalance, gasLimit, minimumGasLimit }); const gasLimitErrorComponent = gasLimitErrorType ? (
{ }); it('should call renderDataSummary with the expected params', () => { - const renderDataSummaryArgs = AdvancedTabContent.prototype.renderDataSummary.getCall( - 0, - ).args; + const renderDataSummaryArgs = + AdvancedTabContent.prototype.renderDataSummary.getCall(0).args; expect(renderDataSummaryArgs).toStrictEqual(['$0.25']); }); }); diff --git a/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js index db2d30768..e7126b6d3 100644 --- a/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js @@ -138,9 +138,8 @@ const mapStateToProps = (state, ownProps) => { conversionRate, }); const isGasEstimate = getIsGasEstimatesFetched(state); - const customNetworkEstimateWasFetched = getIsCustomNetworkGasPriceFetched( - state, - ); + const customNetworkEstimateWasFetched = + getIsCustomNetworkGasPriceFetched(state); let customPriceIsSafe = true; if ((isMainnet || process.env.IN_TEST) && isGasEstimate) { diff --git a/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js index 2391c23a6..1015e7c3a 100644 --- a/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js +++ b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js @@ -69,11 +69,8 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render the correct props on the ButtonGroup', () => { - const { - className, - defaultActiveButtonIndex, - noButtonActiveByDefault, - } = wrapper.props(); + const { className, defaultActiveButtonIndex, noButtonActiveByDefault } = + wrapper.props(); expect(className).toStrictEqual('gas-price-button-group'); expect(defaultActiveButtonIndex).toStrictEqual(2); expect(noButtonActiveByDefault).toStrictEqual(true); @@ -195,14 +192,15 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render a feeInPrimaryCurrency if passed a feeInPrimaryCurrency', () => { - const renderButtonContentResult = GasPriceButtonGroup.prototype.renderButtonContent( - { - feeInPrimaryCurrency: 'mockFeeInPrimaryCurrency', - }, - { - className: 'someClass', - }, - ); + const renderButtonContentResult = + GasPriceButtonGroup.prototype.renderButtonContent( + { + feeInPrimaryCurrency: 'mockFeeInPrimaryCurrency', + }, + { + className: 'someClass', + }, + ); const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); @@ -217,14 +215,15 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render a feeInSecondaryCurrency if passed a feeInSecondaryCurrency', () => { - const renderButtonContentResult = GasPriceButtonGroup.prototype.renderButtonContent( - { - feeInSecondaryCurrency: 'mockFeeInSecondaryCurrency', - }, - { - className: 'someClass', - }, - ); + const renderButtonContentResult = + GasPriceButtonGroup.prototype.renderButtonContent( + { + feeInSecondaryCurrency: 'mockFeeInSecondaryCurrency', + }, + { + className: 'someClass', + }, + ); const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); @@ -239,14 +238,15 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render a timeEstimate if passed a timeEstimate', () => { - const renderButtonContentResult = GasPriceButtonGroup.prototype.renderButtonContent( - { - timeEstimate: 'mockTimeEstimate', - }, - { - className: 'someClass', - }, - ); + const renderButtonContentResult = + GasPriceButtonGroup.prototype.renderButtonContent( + { + timeEstimate: 'mockTimeEstimate', + }, + { + className: 'someClass', + }, + ); const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); @@ -261,13 +261,14 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render a check if showCheck is true', () => { - const renderButtonContentResult = GasPriceButtonGroup.prototype.renderButtonContent( - {}, - { - className: 'someClass', - showCheck: true, - }, - ); + const renderButtonContentResult = + GasPriceButtonGroup.prototype.renderButtonContent( + {}, + { + className: 'someClass', + showCheck: true, + }, + ); const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); @@ -296,10 +297,8 @@ describe('GasPriceButtonGroup Component', () => { }); it('should render no elements if all args passed', () => { - const renderButtonContentResult = GasPriceButtonGroup.prototype.renderButtonContent( - {}, - {}, - ); + const renderButtonContentResult = + GasPriceButtonGroup.prototype.renderButtonContent({}, {}); const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); diff --git a/ui/components/app/gas-timing/gas-timing.component.test.js b/ui/components/app/gas-timing/gas-timing.component.test.js index bed11b08b..fd2a003f8 100644 --- a/ui/components/app/gas-timing/gas-timing.component.test.js +++ b/ui/components/app/gas-timing/gas-timing.component.test.js @@ -61,21 +61,23 @@ const DEFAULT_OPTS = { isGasEstimatesLoading: true, }; -const generateUseSelectorRouter = (opts = DEFAULT_OPTS) => (selector) => { - if (selector === checkNetworkAndAccountSupports1559) { - return true; - } - if (selector === getGasEstimateType) { - return opts.gasEstimateType ?? DEFAULT_OPTS.gasEstimateType; - } - if (selector === getGasFeeEstimates) { - return opts.gasFeeEstimates ?? DEFAULT_OPTS.gasFeeEstimates; - } - if (selector === getIsGasEstimatesLoading) { - return opts.isGasEstimatesLoading ?? DEFAULT_OPTS.isGasEstimatesLoading; - } - return undefined; -}; +const generateUseSelectorRouter = + (opts = DEFAULT_OPTS) => + (selector) => { + if (selector === checkNetworkAndAccountSupports1559) { + return true; + } + if (selector === getGasEstimateType) { + return opts.gasEstimateType ?? DEFAULT_OPTS.gasEstimateType; + } + if (selector === getGasFeeEstimates) { + return opts.gasFeeEstimates ?? DEFAULT_OPTS.gasFeeEstimates; + } + if (selector === getIsGasEstimatesLoading) { + return opts.isGasEstimatesLoading ?? DEFAULT_OPTS.isGasEstimatesLoading; + } + return undefined; + }; describe('Gas timing', () => { beforeEach(() => { diff --git a/ui/components/app/ledger-instruction-field/ledger-instruction-field.js b/ui/components/app/ledger-instruction-field/ledger-instruction-field.js index 8ac942f52..c9c703f04 100644 --- a/ui/components/app/ledger-instruction-field/ledger-instruction-field.js +++ b/ui/components/app/ledger-instruction-field/ledger-instruction-field.js @@ -173,11 +173,10 @@ export default function LedgerInstructionField({ showDataInstruction }) { type="link" onClick={async () => { if (environmentTypeIsFullScreen) { - const connectedDevices = await window.navigator.hid.requestDevice( - { + const connectedDevices = + await window.navigator.hid.requestDevice({ filters: [{ vendorId: LEDGER_USB_VENDOR_ID }], - }, - ); + }); const webHidIsConnected = connectedDevices.some( (device) => device.vendorId === Number(LEDGER_USB_VENDOR_ID), diff --git a/ui/components/app/loading-network-screen/loading-network-screen.component.js b/ui/components/app/loading-network-screen/loading-network-screen.component.js index 0b3f05229..3da052d14 100644 --- a/ui/components/app/loading-network-screen/loading-network-screen.component.js +++ b/ui/components/app/loading-network-screen/loading-network-screen.component.js @@ -59,11 +59,8 @@ export default class LoadingNetworkScreen extends PureComponent { }; renderErrorScreenContent = () => { - const { - showNetworkDropdown, - setProviderArgs, - setProviderType, - } = this.props; + const { showNetworkDropdown, setProviderArgs, setProviderType } = + this.props; return (
diff --git a/ui/components/app/menu-bar/menu-bar.js b/ui/components/app/menu-bar/menu-bar.js index 2a6f0425a..ba69dd3dc 100644 --- a/ui/components/app/menu-bar/menu-bar.js +++ b/ui/components/app/menu-bar/menu-bar.js @@ -17,10 +17,8 @@ export default function MenuBar() { const t = useI18nContext(); const trackEvent = useContext(MetaMetricsContext); const history = useHistory(); - const [ - accountOptionsButtonElement, - setAccountOptionsButtonElement, - ] = useState(null); + const [accountOptionsButtonElement, setAccountOptionsButtonElement] = + useState(null); const [accountOptionsMenuOpen, setAccountOptionsMenuOpen] = useState(false); const origin = useSelector(getOriginOfCurrentTab); diff --git a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js index 511a6bb56..50075ee5d 100644 --- a/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js +++ b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js @@ -40,8 +40,7 @@ const SECTIONS = { key: 'TDL', props: { dictionary: { - term: - 'a word or phrase used to describe a thing or to express a concept, especially in a particular kind of language or branch of study.', + term: 'a word or phrase used to describe a thing or to express a concept, especially in a particular kind of language or branch of study.', definition: 'a statement of the exact meaning of a word, especially in a dictionary.', dl: 'HTML tag denoting a definition list', diff --git a/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js index 6e16a9d32..3145a6f15 100644 --- a/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js +++ b/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js @@ -6,12 +6,8 @@ import CancelTransaction from './cancel-transaction.component'; const mapStateToProps = (state, ownProps) => { const { metamask } = state; - const { - transactionId, - originalGasPrice, - newGasFee, - customGasSettings, - } = ownProps; + const { transactionId, originalGasPrice, newGasFee, customGasSettings } = + ownProps; const { currentNetworkTxList } = metamask; const transaction = currentNetworkTxList.find( ({ id }) => id === transactionId, diff --git a/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js index 73f81ed0c..c95e9460a 100644 --- a/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js +++ b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js @@ -87,8 +87,10 @@ export default class EditApprovalPermission extends PureComponent { >
@@ -99,8 +101,10 @@ export default class EditApprovalPermission extends PureComponent {
{new BigNumber(tokenAmount).equals( @@ -126,8 +130,10 @@ export default class EditApprovalPermission extends PureComponent { >
@@ -138,8 +144,10 @@ export default class EditApprovalPermission extends PureComponent {
{t('customSpendLimit')} diff --git a/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js b/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js index b1a36435b..948296914 100644 --- a/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js +++ b/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js @@ -16,8 +16,7 @@ export default class PermissionsConnectFooter extends Component { className="permissions-connect-footer__text--link" onClick={() => { global.platform.openTab({ - url: - 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps', + url: 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps', }); }} > diff --git a/ui/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js index 6b878ac33..2e511e7dd 100644 --- a/ui/components/app/signature-request-original/signature-request-original.component.js +++ b/ui/components/app/signature-request-original/signature-request-original.component.js @@ -228,8 +228,7 @@ export default class SignatureRequestOriginal extends Component { className="request-signature__help-link" onClick={() => { global.platform.openTab({ - url: - 'https://consensys.net/blog/metamask/the-seal-of-approval-know-what-youre-consenting-to-with-permissions-and-approvals-in-metamask/', + url: 'https://consensys.net/blog/metamask/the-seal-of-approval-know-what-youre-consenting-to-with-permissions-and-approvals-in-metamask/', }); }} > diff --git a/ui/components/app/signature-request-original/signature-request-original.container.js b/ui/components/app/signature-request-original/signature-request-original.container.js index f30310358..b49ed923c 100644 --- a/ui/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/components/app/signature-request-original/signature-request-original.container.js @@ -26,10 +26,8 @@ function mapStateToProps(state, ownProps) { msgParams: { from }, } = ownProps.txData; - const hardwareWalletRequiresConnection = doesAddressRequireLedgerHidConnection( - state, - from, - ); + const hardwareWalletRequiresConnection = + doesAddressRequireLedgerHidConnection(state, from); const isLedgerWallet = isAddressLedger(state, from); const messagesList = unconfirmedMessagesHashSelector(state); const messagesCount = getTotalUnapprovedMessagesCount(state); diff --git a/ui/components/app/signature-request/signature-request.container.js b/ui/components/app/signature-request/signature-request.container.js index 11da8ab42..35a62561d 100644 --- a/ui/components/app/signature-request/signature-request.container.js +++ b/ui/components/app/signature-request/signature-request.container.js @@ -13,10 +13,8 @@ function mapStateToProps(state, ownProps) { const { msgParams: { from }, } = txData; - const hardwareWalletRequiresConnection = doesAddressRequireLedgerHidConnection( - state, - from, - ); + const hardwareWalletRequiresConnection = + doesAddressRequireLedgerHidConnection(state, from); const isLedgerWallet = isAddressLedger(state, from); return { @@ -28,11 +26,8 @@ function mapStateToProps(state, ownProps) { } function mergeProps(stateProps, dispatchProps, ownProps) { - const { - allAccounts, - isLedgerWallet, - hardwareWalletRequiresConnection, - } = stateProps; + const { allAccounts, isLedgerWallet, hardwareWalletRequiresConnection } = + stateProps; const { signPersonalMessage, signTypedMessage, diff --git a/ui/components/app/signature-request/signature-request.container.test.js b/ui/components/app/signature-request/signature-request.container.test.js index 5ed1888ae..ab4944825 100644 --- a/ui/components/app/signature-request/signature-request.container.test.js +++ b/ui/components/app/signature-request/signature-request.container.test.js @@ -40,8 +40,7 @@ describe('Signature Request', () => { txData: { msgParams: { id: 1, - data: - '{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Person":[{"name":"name","type":"string"},{"name":"wallet","type":"address"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person"},{"name":"contents","type":"string"}]},"primaryType":"Mail","domain":{"name":"Ether Mail","version":"1","chainId":"4","verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},"message":{"from":{"name":"Cow","wallet":"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},"to":{"name":"Bob","wallet":"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},"contents":"Hello, Bob!"}}', + data: '{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Person":[{"name":"name","type":"string"},{"name":"wallet","type":"address"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person"},{"name":"contents","type":"string"}]},"primaryType":"Mail","domain":{"name":"Ether Mail","version":"1","chainId":"4","verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},"message":{"from":{"name":"Cow","wallet":"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},"to":{"name":"Bob","wallet":"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},"contents":"Hello, Bob!"}}', from: '0xd8f6a2ffb0fc5952d16c9768b71cfd35b6399aa5', origin: 'test.domain', }, diff --git a/ui/components/app/srp-input/srp-input.test.js b/ui/components/app/srp-input/srp-input.test.js index bd7c22f55..de353e170 100644 --- a/ui/components/app/srp-input/srp-input.test.js +++ b/ui/components/app/srp-input/srp-input.test.js @@ -1738,16 +1738,13 @@ describe('srp-input', () => { it('should be updated on paste to allow room for a longer SRP', async () => { const onChange = jest.fn(); - const { - getByTestId, - queryByTestId, - queryByRole, - } = renderWithLocalization( - , - ); + const { getByTestId, queryByTestId, queryByRole } = + renderWithLocalization( + , + ); getByTestId('import-srp__srp-word-0').focus(); await userEvent.paste(new Array(15).fill('test').join(' ')); @@ -1764,17 +1761,13 @@ describe('srp-input', () => { it('should be updated on paste to match the size of a shorter SRP', async () => { const onChange = jest.fn(); - const { - getByRole, - getByTestId, - queryByTestId, - queryByRole, - } = renderWithLocalization( - , - ); + const { getByRole, getByTestId, queryByTestId, queryByRole } = + renderWithLocalization( + , + ); await userEvent.selectOptions(getByRole('combobox'), '15'); getByTestId('import-srp__srp-word-0').focus(); await userEvent.paste(correct); @@ -1792,16 +1785,13 @@ describe('srp-input', () => { it('should round up to nearest valid size on paste when SRP has an invalid number of words', async () => { const onChange = jest.fn(); - const { - getByTestId, - queryByTestId, - queryByRole, - } = renderWithLocalization( - , - ); + const { getByTestId, queryByTestId, queryByRole } = + renderWithLocalization( + , + ); getByTestId('import-srp__srp-word-0').focus(); await userEvent.paste(invalidWordCount); diff --git a/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js index a4331aac5..1c80d9fa9 100644 --- a/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js @@ -7,32 +7,28 @@ describe('TransactionActivityLog Component', () => { const activities = [ { eventKey: 'transactionCreated', - hash: - '0xe46c7f9b39af2fbf1c53e66f72f80343ab54c2c6dba902d51fb98ada08fe1a63', + hash: '0xe46c7f9b39af2fbf1c53e66f72f80343ab54c2c6dba902d51fb98ada08fe1a63', id: 2005383477493174, timestamp: 1543957986150, value: '0x2386f26fc10000', }, { eventKey: 'transactionSubmitted', - hash: - '0xe46c7f9b39af2fbf1c53e66f72f80343ab54c2c6dba902d51fb98ada08fe1a63', + hash: '0xe46c7f9b39af2fbf1c53e66f72f80343ab54c2c6dba902d51fb98ada08fe1a63', id: 2005383477493174, timestamp: 1543957987853, value: '0x1319718a5000', }, { eventKey: 'transactionResubmitted', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 2005383477493175, timestamp: 1543957991563, value: '0x1502634b5800', }, { eventKey: 'transactionConfirmed', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 2005383477493175, timestamp: 1543958029960, value: '0x1502634b5800', @@ -75,16 +71,14 @@ describe('TransactionActivityLog Component', () => { }, { eventKey: 'transactionResubmitted', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 2, timestamp: 3, value: '0x1', }, { eventKey: 'transactionCancelAttempted', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 3, timestamp: 4, value: '0x1', @@ -131,16 +125,14 @@ describe('TransactionActivityLog Component', () => { }, { eventKey: 'transactionResubmitted', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 2, timestamp: 3, value: '0x1', }, { eventKey: 'transactionCancelAttempted', - hash: - '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', + hash: '0x7d09d337fc6f5d6fe2dbf3a6988d69532deb0a82b665f9180b5a20db377eea87', id: 3, timestamp: 4, value: '0x1', diff --git a/ui/components/app/transaction-activity-log/transaction-activity-log.container.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.js index dad4e1ee7..a0768b053 100644 --- a/ui/components/app/transaction-activity-log/transaction-activity-log.container.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.container.js @@ -12,8 +12,10 @@ import { TRANSACTION_CANCEL_ATTEMPTED_EVENT, } from './transaction-activity-log.constants'; -const matchesEventKey = (matchEventKey) => ({ eventKey }) => - eventKey === matchEventKey; +const matchesEventKey = + (matchEventKey) => + ({ eventKey }) => + eventKey === matchEventKey; const mapStateToProps = (state) => { return { diff --git a/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js index 50a221a9e..2cf586a0e 100644 --- a/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js @@ -21,8 +21,7 @@ describe('TransactionActivityLog utils', () => { it('should return activities for an array of transactions', () => { const transactions = [ { - hash: - '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', + hash: '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', history: [ { id: 6400627574331058, @@ -92,8 +91,7 @@ describe('TransactionActivityLog utils', () => { type: TRANSACTION_TYPES.STANDARD, }, { - hash: - '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', + hash: '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', history: [ { id: 6400627574331060, @@ -195,8 +193,7 @@ describe('TransactionActivityLog utils', () => { id: 6400627574331058, metamaskNetworkId: ROPSTEN_NETWORK_ID, chainId: ROPSTEN_CHAIN_ID, - hash: - '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', + hash: '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', eventKey: 'transactionCreated', timestamp: 1543958845581, value: '0x2386f26fc10000', @@ -205,8 +202,7 @@ describe('TransactionActivityLog utils', () => { id: 6400627574331058, metamaskNetworkId: ROPSTEN_NETWORK_ID, chainId: ROPSTEN_CHAIN_ID, - hash: - '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', + hash: '0xa14f13d36b3901e352ce3a7acb9b47b001e5a3370f06232a0953c6fc6fad91b3', eventKey: 'transactionSubmitted', timestamp: 1543958848147, value: '0x1319718a5000', @@ -215,8 +211,7 @@ describe('TransactionActivityLog utils', () => { id: 6400627574331060, metamaskNetworkId: ROPSTEN_NETWORK_ID, chainId: ROPSTEN_CHAIN_ID, - hash: - '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', + hash: '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', eventKey: 'transactionResubmitted', timestamp: 1543958860061, value: '0x171c3a061400', @@ -225,8 +220,7 @@ describe('TransactionActivityLog utils', () => { id: 6400627574331060, metamaskNetworkId: ROPSTEN_NETWORK_ID, chainId: ROPSTEN_CHAIN_ID, - hash: - '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', + hash: '0xecbe181ee67c4291d04a7cb9ffbf1d5d831e4fbaa89994fd06bab5dd4cc79b33', eventKey: 'transactionConfirmed', timestamp: 1543958897165, value: '0x171c3a061400', diff --git a/ui/components/app/transaction-detail-item/transaction-detail-item.component.js b/ui/components/app/transaction-detail-item/transaction-detail-item.component.js index d3968679d..cceacdc30 100644 --- a/ui/components/app/transaction-detail-item/transaction-detail-item.component.js +++ b/ui/components/app/transaction-detail-item/transaction-detail-item.component.js @@ -40,7 +40,8 @@ export default function TransactionDetailItem({
{detailText && ( diff --git a/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js b/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js index 8b103c4e0..2e2f2ccb1 100644 --- a/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js @@ -27,18 +27,10 @@ export default function SmartTransactionListItem({ const t = useI18nContext(); const [cancelSwapLinkClicked, setCancelSwapLinkClicked] = useState(false); const [showDetails, setShowDetails] = useState(false); - const { - primaryCurrency, - recipientAddress, - isPending, - senderAddress, - } = useTransactionDisplayData(transactionGroup); - const { - sourceTokenSymbol, - destinationTokenSymbol, - time, - status, - } = smartTransaction; + const { primaryCurrency, recipientAddress, isPending, senderAddress } = + useTransactionDisplayData(transactionGroup); + const { sourceTokenSymbol, destinationTokenSymbol, time, status } = + smartTransaction; const category = TRANSACTION_GROUP_CATEGORIES.SWAP; const title = t('swapTokenToToken', [ sourceTokenSymbol, diff --git a/ui/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js index 867d236f9..3d462c14e 100644 --- a/ui/components/app/transaction-list-item/transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js @@ -50,9 +50,8 @@ function TransactionListItemInner({ const history = useHistory(); const { hasCancelled } = transactionGroup; const [showDetails, setShowDetails] = useState(false); - const [showCancelEditGasPopover, setShowCancelEditGasPopover] = useState( - false, - ); + const [showCancelEditGasPopover, setShowCancelEditGasPopover] = + useState(false); const [showRetryEditGasPopover, setShowRetryEditGasPopover] = useState(false); const { supportsEIP1559V2 } = useGasFeeContext(); const { openModal } = useTransactionModalContext(); diff --git a/ui/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js index 87670992f..b554e4f1d 100644 --- a/ui/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -23,8 +23,7 @@ function getActionFunctionById(id, history) { const actionFunctions = { 2: () => { global.platform.openTab({ - url: - 'https://survey.alchemer.com/s3/6173069/MetaMask-Extension-NPS-January-2021', + url: 'https://survey.alchemer.com/s3/6173069/MetaMask-Extension-NPS-January-2021', }); }, 3: () => { diff --git a/ui/components/ui/definition-list/definition-list.stories.js b/ui/components/ui/definition-list/definition-list.stories.js index 702598ff5..6494b71e5 100644 --- a/ui/components/ui/definition-list/definition-list.stories.js +++ b/ui/components/ui/definition-list/definition-list.stories.js @@ -7,8 +7,7 @@ import { import DefinitionList from './definition-list'; const basic = { - term: - 'a word or phrase used to describe a thing or to express a concept, especially in a particular kind of language or branch of study.', + term: 'a word or phrase used to describe a thing or to express a concept, especially in a particular kind of language or branch of study.', definition: 'a statement of the exact meaning of a word, especially in a dictionary.', dl: 'HTML tag denoting a definition list', diff --git a/ui/components/ui/identicon/identicon.component.js b/ui/components/ui/identicon/identicon.component.js index cf2c45700..1a6f700f9 100644 --- a/ui/components/ui/identicon/identicon.component.js +++ b/ui/components/ui/identicon/identicon.component.js @@ -102,14 +102,8 @@ export default class Identicon extends Component { } renderJazzicon() { - const { - address, - className, - diameter, - alt, - useTokenDetection, - tokenList, - } = this.props; + const { address, className, diameter, alt, useTokenDetection, tokenList } = + this.props; return ( { const state = getState(); - const unconfirmedTransactionsHash = unconfirmedTransactionsHashSelector( - state, - ); + const unconfirmedTransactionsHash = + unconfirmedTransactionsHashSelector(state); const transaction = unconfirmedTransactionsHash[transactionId]; if (!transaction) { diff --git a/ui/ducks/metamask/metamask.js b/ui/ducks/metamask/metamask.js index 8e7c899c1..a76ecddf2 100644 --- a/ui/ducks/metamask/metamask.js +++ b/ui/ducks/metamask/metamask.js @@ -355,9 +355,8 @@ export function getEstimatedGasFeeTimeBounds(state) { } export function getIsGasEstimatesLoading(state) { - const networkAndAccountSupports1559 = checkNetworkAndAccountSupports1559( - state, - ); + const networkAndAccountSupports1559 = + checkNetworkAndAccountSupports1559(state); const gasEstimateType = getGasEstimateType(state); // We consider the gas estimate to be loading if the gasEstimateType is diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 91d9606bf..108d39152 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -1365,7 +1365,8 @@ const slice = createSlice({ checkExistingAddresses(state.recipientInput, tokens))) || isProbablyAnAssetContract ) { - draftTransaction.recipient.warning = KNOWN_RECIPIENT_ADDRESS_WARNING; + draftTransaction.recipient.warning = + KNOWN_RECIPIENT_ADDRESS_WARNING; } else { draftTransaction.recipient.warning = null; } @@ -1593,7 +1594,8 @@ const slice = createSlice({ }); } } else { - draftTransaction.recipient.error = INVALID_RECIPIENT_ADDRESS_ERROR; + draftTransaction.recipient.error = + INVALID_RECIPIENT_ADDRESS_ERROR; } } } diff --git a/ui/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js index 30a3b65b9..f8bffbaad 100644 --- a/ui/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -316,9 +316,8 @@ export const getSmartTransactionsErrorMessageDismissed = (state) => export const getSmartTransactionsEnabled = (state) => { const hardwareWalletUsed = isHardwareWallet(state); const chainId = getCurrentChainId(state); - const isAllowedNetwork = ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS.includes( - chainId, - ); + const isAllowedNetwork = + ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS.includes(chainId); const smartTransactionsFeatureFlagEnabled = state.metamask.swapsState?.swapsFeatureFlags?.smartTransactions ?.extensionActive; @@ -717,14 +716,12 @@ export const fetchQuotesAndSetQuoteState = ( const hardwareWalletUsed = isHardwareWallet(state); const hardwareWalletType = getHardwareWalletType(state); - const networkAndAccountSupports1559 = checkNetworkAndAccountSupports1559( - state, - ); + const networkAndAccountSupports1559 = + checkNetworkAndAccountSupports1559(state); const smartTransactionsOptInStatus = getSmartTransactionsOptInStatus(state); const smartTransactionsEnabled = getSmartTransactionsEnabled(state); - const currentSmartTransactionsEnabled = getCurrentSmartTransactionsEnabled( - state, - ); + const currentSmartTransactionsEnabled = + getCurrentSmartTransactionsEnabled(state); trackEvent({ event: 'Quotes Requested', category: EVENT.CATEGORIES.SWAPS, @@ -875,9 +872,8 @@ export const signAndSendSwapsSmartTransaction = ({ ).toPrecision(8); const smartTransactionsOptInStatus = getSmartTransactionsOptInStatus(state); const smartTransactionsEnabled = getSmartTransactionsEnabled(state); - const currentSmartTransactionsEnabled = getCurrentSmartTransactionsEnabled( - state, - ); + const currentSmartTransactionsEnabled = + getCurrentSmartTransactionsEnabled(state); const swapMetaData = { token_from: sourceTokenInfo.symbol, token_from_amount: String(swapTokenValue), @@ -1013,9 +1009,8 @@ export const signAndSendTransactions = ( const state = getState(); const chainId = getCurrentChainId(state); const hardwareWalletUsed = isHardwareWallet(state); - const networkAndAccountSupports1559 = checkNetworkAndAccountSupports1559( - state, - ); + const networkAndAccountSupports1559 = + checkNetworkAndAccountSupports1559(state); let swapsLivenessForNetwork = { swapsFeatureIsLive: false, }; @@ -1121,9 +1116,8 @@ export const signAndSendTransactions = ( }); const smartTransactionsOptInStatus = getSmartTransactionsOptInStatus(state); const smartTransactionsEnabled = getSmartTransactionsEnabled(state); - const currentSmartTransactionsEnabled = getCurrentSmartTransactionsEnabled( - state, - ); + const currentSmartTransactionsEnabled = + getCurrentSmartTransactionsEnabled(state); const swapMetaData = { token_from: sourceTokenInfo.symbol, token_from_amount: String(swapTokenValue), diff --git a/ui/ducks/swaps/swaps.test.js b/ui/ducks/swaps/swaps.test.js index 39e4ea25b..027e4d479 100644 --- a/ui/ducks/swaps/swaps.test.js +++ b/ui/ducks/swaps/swaps.test.js @@ -203,7 +203,8 @@ describe('Ducks - Swaps', () => { it('returns "customMaxPriorityFeePerGas"', () => { const state = createSwapsMockStore(); const customMaxPriorityFeePerGas = '3'; - state.metamask.swapsState.customMaxPriorityFeePerGas = customMaxPriorityFeePerGas; + state.metamask.swapsState.customMaxPriorityFeePerGas = + customMaxPriorityFeePerGas; expect(swaps.getCustomMaxPriorityFeePerGas(state)).toBe( customMaxPriorityFeePerGas, ); diff --git a/ui/helpers/constants/routes.js b/ui/helpers/constants/routes.js index fa816e412..45677b223 100644 --- a/ui/helpers/constants/routes.js +++ b/ui/helpers/constants/routes.js @@ -134,24 +134,36 @@ const PATH_NAME_MAP = { [SEND_ROUTE]: 'Send Page', [`${TOKEN_DETAILS}/:address`]: 'Token Details Page', [`${CONNECT_ROUTE}/:id`]: 'Connect To Site Confirmation Page', - [`${CONNECT_ROUTE}/:id${CONNECT_CONFIRM_PERMISSIONS_ROUTE}`]: 'Grant Connected Site Permissions Confirmation Page', + [`${CONNECT_ROUTE}/:id${CONNECT_CONFIRM_PERMISSIONS_ROUTE}`]: + 'Grant Connected Site Permissions Confirmation Page', [CONNECTED_ROUTE]: 'Sites Connected To This Account Page', [CONNECTED_ACCOUNTS_ROUTE]: 'Accounts Connected To This Site Page', [`${CONFIRM_TRANSACTION_ROUTE}/:id`]: 'Confirmation Root Page', [CONFIRM_TRANSACTION_ROUTE]: 'Confirmation Root Page', // TODO: rename when this is the only confirmation page [CONFIRMATION_V_NEXT_ROUTE]: 'New Confirmation Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TOKEN_METHOD_PATH}`]: 'Confirm Token Method Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_ETHER_PATH}`]: 'Confirm Send Ether Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_TOKEN_PATH}`]: 'Confirm Send Token Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_DEPLOY_CONTRACT_PATH}`]: 'Confirm Deploy Contract Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_APPROVE_PATH}`]: 'Confirm Approve Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SET_APPROVAL_FOR_ALL_PATH}`]: 'Confirm Set Approval For All Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TRANSFER_FROM_PATH}`]: 'Confirm Transfer From Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SAFE_TRANSFER_FROM_PATH}`]: 'Confirm Safe Transfer From Transaction Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${SIGNATURE_REQUEST_PATH}`]: 'Signature Request Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${DECRYPT_MESSAGE_REQUEST_PATH}`]: 'Decrypt Message Request Page', - [`${CONFIRM_TRANSACTION_ROUTE}/:id${ENCRYPTION_PUBLIC_KEY_REQUEST_PATH}`]: 'Encryption Public Key Request Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TOKEN_METHOD_PATH}`]: + 'Confirm Token Method Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_ETHER_PATH}`]: + 'Confirm Send Ether Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_TOKEN_PATH}`]: + 'Confirm Send Token Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_DEPLOY_CONTRACT_PATH}`]: + 'Confirm Deploy Contract Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_APPROVE_PATH}`]: + 'Confirm Approve Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SET_APPROVAL_FOR_ALL_PATH}`]: + 'Confirm Set Approval For All Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TRANSFER_FROM_PATH}`]: + 'Confirm Transfer From Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SAFE_TRANSFER_FROM_PATH}`]: + 'Confirm Safe Transfer From Transaction Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${SIGNATURE_REQUEST_PATH}`]: + 'Signature Request Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${DECRYPT_MESSAGE_REQUEST_PATH}`]: + 'Decrypt Message Request Page', + [`${CONFIRM_TRANSACTION_ROUTE}/:id${ENCRYPTION_PUBLIC_KEY_REQUEST_PATH}`]: + 'Encryption Public Key Request Page', [INITIALIZE_ROUTE]: 'Initialization Page', [INITIALIZE_WELCOME_ROUTE]: 'Install Welcome Page', [INITIALIZE_UNLOCK_ROUTE]: 'Initialization Unlock page', diff --git a/ui/helpers/utils/optimism/fetchEstimatedL1Fee.js b/ui/helpers/utils/optimism/fetchEstimatedL1Fee.js index f255ab767..211dc5f9b 100644 --- a/ui/helpers/utils/optimism/fetchEstimatedL1Fee.js +++ b/ui/helpers/utils/optimism/fetchEstimatedL1Fee.js @@ -17,9 +17,8 @@ function buildOVMGasPriceOracleContract(eth) { export default async function fetchEstimatedL1Fee(eth, txMeta) { const contract = buildOVMGasPriceOracleContract(eth); - const serializedTransaction = buildUnserializedTransaction( - txMeta, - ).serialize(); + const serializedTransaction = + buildUnserializedTransaction(txMeta).serialize(); const result = await contract.getL1Fee(serializedTransaction); return result?.[0]?.toString(16); } diff --git a/ui/hooks/gasFeeInput/test-utils.js b/ui/hooks/gasFeeInput/test-utils.js index 73693c2a4..5b365be8f 100644 --- a/ui/hooks/gasFeeInput/test-utils.js +++ b/ui/hooks/gasFeeInput/test-utils.js @@ -96,60 +96,62 @@ export const HIGH_FEE_MARKET_ESTIMATE_RETURN_VALUE = { estimatedGasFeeTimeBounds: {}, }; -export const generateUseSelectorRouter = ({ - checkNetworkAndAccountSupports1559Response, - shouldShowFiat = true, - eip1559V2Enabled = false, -} = {}) => (selector) => { - if (selector === getConversionRate) { - return MOCK_ETH_USD_CONVERSION_RATE; - } - if (selector === getNativeCurrency) { - return ETH; - } - if (selector === getPreferences) { - return { - useNativeCurrencyAsPrimaryCurrency: true, - }; - } - if (selector === getCurrentCurrency) { - return 'USD'; - } - if (selector === getShouldShowFiat) { - return shouldShowFiat; - } - if (selector === txDataSelector) { - return { - txParams: { - value: '0x5555', - }, - }; - } - if (selector === getSelectedAccount) { - return { - balance: '0x440aa47cc2556', - }; - } - if (selector === getCustomMaxFeePerGas) { - return '0x5208'; - } - if (selector === getCustomMaxPriorityFeePerGas) { - return '0x5208'; - } - if (selector === checkNetworkAndAccountSupports1559) { - return checkNetworkAndAccountSupports1559Response; - } - if (selector === getEIP1559V2Enabled) { - return eip1559V2Enabled; - } - if (selector === getCurrentKeyring) { - return { type: '' }; - } - if (selector === getTokenExchangeRates) { - return { '0x1': '1' }; - } - return undefined; -}; +export const generateUseSelectorRouter = + ({ + checkNetworkAndAccountSupports1559Response, + shouldShowFiat = true, + eip1559V2Enabled = false, + } = {}) => + (selector) => { + if (selector === getConversionRate) { + return MOCK_ETH_USD_CONVERSION_RATE; + } + if (selector === getNativeCurrency) { + return ETH; + } + if (selector === getPreferences) { + return { + useNativeCurrencyAsPrimaryCurrency: true, + }; + } + if (selector === getCurrentCurrency) { + return 'USD'; + } + if (selector === getShouldShowFiat) { + return shouldShowFiat; + } + if (selector === txDataSelector) { + return { + txParams: { + value: '0x5555', + }, + }; + } + if (selector === getSelectedAccount) { + return { + balance: '0x440aa47cc2556', + }; + } + if (selector === getCustomMaxFeePerGas) { + return '0x5208'; + } + if (selector === getCustomMaxPriorityFeePerGas) { + return '0x5208'; + } + if (selector === checkNetworkAndAccountSupports1559) { + return checkNetworkAndAccountSupports1559Response; + } + if (selector === getEIP1559V2Enabled) { + return eip1559V2Enabled; + } + if (selector === getCurrentKeyring) { + return { type: '' }; + } + if (selector === getTokenExchangeRates) { + return { '0x1': '1' }; + } + return undefined; + }; export function getTotalCostInETH(gwei, gasLimit) { return multiplyCurrencies(gwei, gasLimit, { diff --git a/ui/hooks/gasFeeInput/useGasEstimates.js b/ui/hooks/gasFeeInput/useGasEstimates.js index 8ba3fab6e..351401954 100644 --- a/ui/hooks/gasFeeInput/useGasEstimates.js +++ b/ui/hooks/gasFeeInput/useGasEstimates.js @@ -66,10 +66,8 @@ export function useGasEstimates({ useSelector(checkNetworkAndAccountSupports1559) && !isLegacyTransaction(transaction?.txParams); - const { - currency: fiatCurrency, - numberOfDecimals: fiatNumberOfDecimals, - } = useUserPreferencedCurrency(SECONDARY); + const { currency: fiatCurrency, numberOfDecimals: fiatNumberOfDecimals } = + useUserPreferencedCurrency(SECONDARY); const showFiat = useSelector(getShouldShowFiat); diff --git a/ui/hooks/gasFeeInput/useGasEstimates.test.js b/ui/hooks/gasFeeInput/useGasEstimates.test.js index 9d58faa0e..4826adbd2 100644 --- a/ui/hooks/gasFeeInput/useGasEstimates.test.js +++ b/ui/hooks/gasFeeInput/useGasEstimates.test.js @@ -61,9 +61,8 @@ describe('useGasEstimates', () => { const gasLimit = '21000'; const maxFeePerGas = '100'; const maxPriorityFeePerGas = '10'; - const { - estimatedBaseFee, - } = FEE_MARKET_ESTIMATE_RETURN_VALUE.gasFeeEstimates; + const { estimatedBaseFee } = + FEE_MARKET_ESTIMATE_RETURN_VALUE.gasFeeEstimates; const { result } = renderHook(() => useGasEstimatesHook({ gasLimit, maxFeePerGas, maxPriorityFeePerGas }), ); @@ -119,9 +118,8 @@ describe('useGasEstimates', () => { }); it('uses gasFeeEstimates.estimatedBaseFee prop to calculate estimatedBaseFee', () => { - const { - estimatedBaseFee, - } = FEE_MARKET_ESTIMATE_RETURN_VALUE.gasFeeEstimates; + const { estimatedBaseFee } = + FEE_MARKET_ESTIMATE_RETURN_VALUE.gasFeeEstimates; const { result } = renderHook(() => useGasEstimatesHook()); expect(result.current.estimatedBaseFee).toBe( decGWEIToHexWEI(estimatedBaseFee), diff --git a/ui/hooks/gasFeeInput/useGasFeeInputs.js b/ui/hooks/gasFeeInput/useGasFeeInputs.js index efa6782d5..1b1840c22 100644 --- a/ui/hooks/gasFeeInput/useGasFeeInputs.js +++ b/ui/hooks/gasFeeInput/useGasFeeInputs.js @@ -186,30 +186,24 @@ export function useGasFeeInputs( transaction, ]); - const { - gasPrice, - setGasPrice, - setGasPriceHasBeenManuallySet, - } = useGasPriceInput({ - estimateToUse, - gasEstimateType, - gasFeeEstimates, - transaction, - }); + const { gasPrice, setGasPrice, setGasPriceHasBeenManuallySet } = + useGasPriceInput({ + estimateToUse, + gasEstimateType, + gasFeeEstimates, + transaction, + }); - const { - maxFeePerGas, - maxFeePerGasFiat, - setMaxFeePerGas, - } = useMaxFeePerGasInput({ - estimateToUse, - gasEstimateType, - gasFeeEstimates, - gasLimit, - gasPrice, - supportsEIP1559V2, - transaction, - }); + const { maxFeePerGas, maxFeePerGasFiat, setMaxFeePerGas } = + useMaxFeePerGasInput({ + estimateToUse, + gasEstimateType, + gasFeeEstimates, + gasLimit, + gasPrice, + supportsEIP1559V2, + transaction, + }); const { maxPriorityFeePerGas, diff --git a/ui/hooks/gasFeeInput/useMaxFeePerGasInput.js b/ui/hooks/gasFeeInput/useMaxFeePerGasInput.js index dc530bf8c..08c7afec4 100644 --- a/ui/hooks/gasFeeInput/useMaxFeePerGasInput.js +++ b/ui/hooks/gasFeeInput/useMaxFeePerGasInput.js @@ -59,10 +59,8 @@ export function useMaxFeePerGasInput({ useSelector(checkNetworkAndAccountSupports1559) && !isLegacyTransaction(transaction?.txParams); - const { - currency: fiatCurrency, - numberOfDecimals: fiatNumberOfDecimals, - } = useUserPreferencedCurrency(SECONDARY); + const { currency: fiatCurrency, numberOfDecimals: fiatNumberOfDecimals } = + useUserPreferencedCurrency(SECONDARY); const showFiat = useSelector(getShouldShowFiat); diff --git a/ui/hooks/gasFeeInput/useMaxPriorityFeePerGasInput.js b/ui/hooks/gasFeeInput/useMaxPriorityFeePerGasInput.js index f202d2031..3d3104866 100644 --- a/ui/hooks/gasFeeInput/useMaxPriorityFeePerGasInput.js +++ b/ui/hooks/gasFeeInput/useMaxPriorityFeePerGasInput.js @@ -63,10 +63,8 @@ export function useMaxPriorityFeePerGasInput({ useSelector(checkNetworkAndAccountSupports1559) && !isLegacyTransaction(transaction?.txParams); - const { - currency: fiatCurrency, - numberOfDecimals: fiatNumberOfDecimals, - } = useUserPreferencedCurrency(SECONDARY); + const { currency: fiatCurrency, numberOfDecimals: fiatNumberOfDecimals } = + useUserPreferencedCurrency(SECONDARY); const showFiat = useSelector(getShouldShowFiat); diff --git a/ui/hooks/gasFeeInput/useTransactionFunctions.js b/ui/hooks/gasFeeInput/useTransactionFunctions.js index 673fb9200..107dd076d 100644 --- a/ui/hooks/gasFeeInput/useTransactionFunctions.js +++ b/ui/hooks/gasFeeInput/useTransactionFunctions.js @@ -135,8 +135,11 @@ export const useTransactionFunctions = ({ const updateTransactionToTenPercentIncreasedGasFee = useCallback( (initTransaction = false) => { - const { gas: gasLimit, maxFeePerGas, maxPriorityFeePerGas } = - transaction.previousGas || transaction.txParams; + const { + gas: gasLimit, + maxFeePerGas, + maxPriorityFeePerGas, + } = transaction.previousGas || transaction.txParams; updateTransaction({ estimateSuggested: initTransaction @@ -156,10 +159,8 @@ export const useTransactionFunctions = ({ if (!gasFeeEstimates[gasFeeEstimateToUse]) { return; } - const { - suggestedMaxFeePerGas, - suggestedMaxPriorityFeePerGas, - } = gasFeeEstimates[gasFeeEstimateToUse]; + const { suggestedMaxFeePerGas, suggestedMaxPriorityFeePerGas } = + gasFeeEstimates[gasFeeEstimateToUse]; updateTransaction({ estimateUsed: gasFeeEstimateToUse, maxFeePerGas: decGWEIToHexWEI(suggestedMaxFeePerGas), diff --git a/ui/hooks/useGasFeeErrors.test.js b/ui/hooks/useGasFeeErrors.test.js index 7e3c0e832..eedcfc915 100644 --- a/ui/hooks/useGasFeeErrors.test.js +++ b/ui/hooks/useGasFeeErrors.test.js @@ -59,19 +59,19 @@ const FEE_MARKET_ESTIMATE_RETURN_VALUE = { estimatedGasFeeTimeBounds: {}, }; -const generateUseSelectorRouter = ({ - checkNetworkAndAccountSupports1559Response, -} = {}) => (selector) => { - if (selector === getSelectedAccount) { - return { - balance: '0x440aa47cc2556', - }; - } - if (selector === checkNetworkAndAccountSupports1559) { - return checkNetworkAndAccountSupports1559Response; - } - return undefined; -}; +const generateUseSelectorRouter = + ({ checkNetworkAndAccountSupports1559Response } = {}) => + (selector) => { + if (selector === getSelectedAccount) { + return { + balance: '0x440aa47cc2556', + }; + } + if (selector === checkNetworkAndAccountSupports1559) { + return checkNetworkAndAccountSupports1559Response; + } + return undefined; + }; const configureEIP1559 = () => { useSelector.mockImplementation( diff --git a/ui/hooks/useGasFeeEstimates.test.js b/ui/hooks/useGasFeeEstimates.test.js index 574bb7904..16af8ff38 100644 --- a/ui/hooks/useGasFeeEstimates.test.js +++ b/ui/hooks/useGasFeeEstimates.test.js @@ -42,24 +42,26 @@ const DEFAULT_OPTS = { isGasEstimatesLoading: true, }; -const generateUseSelectorRouter = (opts = DEFAULT_OPTS) => (selector) => { - if (selector === checkNetworkAndAccountSupports1559) { - return ( - opts.checkNetworkAndAccountSupports1559 ?? - DEFAULT_OPTS.checkNetworkAndAccountSupports1559 - ); - } - if (selector === getGasEstimateType) { - return opts.gasEstimateType ?? DEFAULT_OPTS.gasEstimateType; - } - if (selector === getGasFeeEstimates) { - return opts.gasFeeEstimates ?? DEFAULT_OPTS.gasFeeEstimates; - } - if (selector === getIsGasEstimatesLoading) { - return opts.isGasEstimatesLoading ?? DEFAULT_OPTS.isGasEstimatesLoading; - } - return undefined; -}; +const generateUseSelectorRouter = + (opts = DEFAULT_OPTS) => + (selector) => { + if (selector === checkNetworkAndAccountSupports1559) { + return ( + opts.checkNetworkAndAccountSupports1559 ?? + DEFAULT_OPTS.checkNetworkAndAccountSupports1559 + ); + } + if (selector === getGasEstimateType) { + return opts.gasEstimateType ?? DEFAULT_OPTS.gasEstimateType; + } + if (selector === getGasFeeEstimates) { + return opts.gasFeeEstimates ?? DEFAULT_OPTS.gasFeeEstimates; + } + if (selector === getIsGasEstimatesLoading) { + return opts.isGasEstimatesLoading ?? DEFAULT_OPTS.isGasEstimatesLoading; + } + return undefined; + }; describe('useGasFeeEstimates', () => { let tokens = []; diff --git a/ui/hooks/useTokenData.test.js b/ui/hooks/useTokenData.test.js index ada5ec287..01bf7f712 100644 --- a/ui/hooks/useTokenData.test.js +++ b/ui/hooks/useTokenData.test.js @@ -6,8 +6,7 @@ import { useTokenData } from './useTokenData'; const tests = [ { - data: - '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a970000000000000000000000000000000000000000000000000000000000003a98', + data: '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a970000000000000000000000000000000000000000000000000000000000003a98', tokenData: { name: TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER, args: [ @@ -17,8 +16,7 @@ const tests = [ }, }, { - data: - '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a9700000000000000000000000000000000000000000000000000000000000061a8', + data: '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a9700000000000000000000000000000000000000000000000000000000000061a8', tokenData: { name: TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER, args: [ @@ -28,8 +26,7 @@ const tests = [ }, }, { - data: - '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a970000000000000000000000000000000000000000000000000000000000002710', + data: '0xa9059cbb000000000000000000000000ffe5bc4e8f1f969934d773fa67da095d2e491a970000000000000000000000000000000000000000000000000000000000002710', tokenData: { name: TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER, args: [ diff --git a/ui/hooks/useTokenFiatAmount.js b/ui/hooks/useTokenFiatAmount.js index fc216e346..2efe07076 100644 --- a/ui/hooks/useTokenFiatAmount.js +++ b/ui/hooks/useTokenFiatAmount.js @@ -37,9 +37,9 @@ export function useTokenFiatAmount( const currentCurrency = useSelector(getCurrentCurrency); const userPrefersShownFiat = useSelector(getShouldShowFiat); const showFiat = overrides.showFiat ?? userPrefersShownFiat; - const contractExchangeTokenKey = Object.keys( - contractExchangeRates, - ).find((key) => isEqualCaseInsensitive(key, tokenAddress)); + const contractExchangeTokenKey = Object.keys(contractExchangeRates).find( + (key) => isEqualCaseInsensitive(key, tokenAddress), + ); const tokenExchangeRate = overrides.exchangeRate ?? (contractExchangeTokenKey && diff --git a/ui/index.js b/ui/index.js index 842d0f2a9..5f1cf589e 100644 --- a/ui/index.js +++ b/ui/index.js @@ -94,16 +94,13 @@ async function startApp(metamaskState, backgroundConnection, opts) { if (getEnvironmentType() === ENVIRONMENT_TYPE_POPUP) { const { origin } = draftInitialState.activeTab; - const permittedAccountsForCurrentTab = getPermittedAccountsForCurrentTab( - draftInitialState, - ); + const permittedAccountsForCurrentTab = + getPermittedAccountsForCurrentTab(draftInitialState); const selectedAddress = getSelectedAddress(draftInitialState); - const unconnectedAccountAlertShownOrigins = getUnconnectedAccountAlertShown( - draftInitialState, - ); - const unconnectedAccountAlertIsEnabled = getUnconnectedAccountAlertEnabledness( - draftInitialState, - ); + const unconnectedAccountAlertShownOrigins = + getUnconnectedAccountAlertShown(draftInitialState); + const unconnectedAccountAlertIsEnabled = + getUnconnectedAccountAlertEnabledness(draftInitialState); if ( origin && diff --git a/ui/pages/asset/components/asset-options.js b/ui/pages/asset/components/asset-options.js index 4d7aef44f..6624eb3c5 100644 --- a/ui/pages/asset/components/asset-options.js +++ b/ui/pages/asset/components/asset-options.js @@ -14,9 +14,8 @@ const AssetOptions = ({ isEthNetwork, }) => { const t = useContext(I18nContext); - const [assetOptionsButtonElement, setAssetOptionsButtonElement] = useState( - null, - ); + const [assetOptionsButtonElement, setAssetOptionsButtonElement] = + useState(null); const [assetOptionsOpen, setAssetOptionsOpen] = useState(false); return ( diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js index 56824d377..bb00cc95a 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js @@ -22,8 +22,7 @@ const props = { tokenBalance: '15', showCustomizeGasModal: jest.fn(), showEditApprovalPermissionModal: jest.fn(), - data: - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', + data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', currentCurrency: 'TST', nativeCurrency: 'ETH', diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js index ca30abe1d..d2c6d59ca 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js @@ -120,8 +120,7 @@ export default { assetStandard: ERC20, tokenImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', tokenBalance: '15', - data: - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', + data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', currentCurrency: 'TST', nativeCurrency: 'ETH', diff --git a/ui/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js index fba2d62f3..90eeb7e0c 100644 --- a/ui/pages/confirm-approve/confirm-approve.js +++ b/ui/pages/confirm-approve/confirm-approve.js @@ -155,9 +155,8 @@ export default function ConfirmApprove({ }) : null; - const parsedTransactionData = parseStandardTokenTransactionData( - transactionData, - ); + const parsedTransactionData = + parseStandardTokenTransactionData(transactionData); const setApproveForAllArg = getTokenApprovedParam(parsedTransactionData); return tokenSymbol === undefined && assetName === undefined ? ( diff --git a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js index 88fe8a04c..336278261 100644 --- a/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js +++ b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js @@ -219,7 +219,8 @@ export default class ConfirmDecryptMessage extends Component {
this.copyMessage()} onMouseDown={() => this.setState({ copyToClipboardPressed: true })} diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js index 7321d2793..65382aefb 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -202,10 +202,8 @@ const mapStateToProps = (state, ownProps) => { const fromAddressIsLedger = isAddressLedger(state, fromAddress); const nativeCurrency = getNativeCurrency(state); - const hardwareWalletRequiresConnection = doesAddressRequireLedgerHidConnection( - state, - fromAddress, - ); + const hardwareWalletRequiresConnection = + doesAddressRequireLedgerHidConnection(state, fromAddress); const isMultiLayerFeeNetwork = getIsMultiLayerFeeNetwork(state); const eip1559V2Enabled = getEIP1559V2Enabled(state); diff --git a/ui/pages/confirm-transaction/confirm-token-transaction-switch.js b/ui/pages/confirm-transaction/confirm-token-transaction-switch.js index 43b554595..5e3f4b85a 100644 --- a/ui/pages/confirm-transaction/confirm-token-transaction-switch.js +++ b/ui/pages/confirm-transaction/confirm-token-transaction-switch.js @@ -19,9 +19,8 @@ import ConfirmTransactionSwitch from '../confirm-transaction-switch'; import { useAssetDetails } from '../../hooks/useAssetDetails'; export default function ConfirmTokenTransactionSwitch({ transaction }) { - const { - txParams: { data, to: tokenAddress, from: userAddress } = {}, - } = transaction; + const { txParams: { data, to: tokenAddress, from: userAddress } = {} } = + transaction; const { assetStandard, diff --git a/ui/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js index 2fcb95788..c10439c9a 100644 --- a/ui/pages/confirmation/confirmation.js +++ b/ui/pages/confirmation/confirmation.js @@ -127,9 +127,8 @@ export default function ConfirmationPage({ getUnapprovedTemplatedConfirmations, isEqual, ); - const [currentPendingConfirmation, setCurrentPendingConfirmation] = useState( - 0, - ); + const [currentPendingConfirmation, setCurrentPendingConfirmation] = + useState(0); const pendingConfirmation = pendingConfirmations[currentPendingConfirmation]; const originMetadata = useOriginMetadata(pendingConfirmation?.origin) || {}; const [alertState, dismissAlert] = useAlertState(pendingConfirmation); diff --git a/ui/pages/confirmation/templates/add-ethereum-chain.js b/ui/pages/confirmation/templates/add-ethereum-chain.js index 5805210c4..b6526d045 100644 --- a/ui/pages/confirmation/templates/add-ethereum-chain.js +++ b/ui/pages/confirmation/templates/add-ethereum-chain.js @@ -40,8 +40,7 @@ const MISMATCHED_CHAIN_RECOMMENDATION = { element: 'a', key: 'mismatchedChainLink', props: { - href: - 'https://metamask.zendesk.com/hc/en-us/articles/360057142392', + href: 'https://metamask.zendesk.com/hc/en-us/articles/360057142392', target: '__blank', tabIndex: 0, }, @@ -267,8 +266,7 @@ function getValues(pendingApproval, t, actions, history) { children: t('addEthereumChainConfirmationRisksLearnMoreLink'), key: 'addEthereumChainConfirmationRisksLearnMoreLink', props: { - href: - 'https://metamask.zendesk.com/hc/en-us/articles/4404424659995', + href: 'https://metamask.zendesk.com/hc/en-us/articles/4404424659995', target: '__blank', }, }, @@ -308,8 +306,8 @@ function getValues(pendingApproval, t, actions, history) { : pendingApproval.requestData.rpcUrl, [t('chainId')]: parseInt(pendingApproval.requestData.chainId, 16), [t('currencySymbol')]: pendingApproval.requestData.ticker, - [t('blockExplorerUrl')]: pendingApproval.requestData - .blockExplorerUrl, + [t('blockExplorerUrl')]: + pendingApproval.requestData.blockExplorerUrl, }, prefaceKeys: [ t('networkName'), diff --git a/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js b/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js index b6a2dcfbe..19f8a3b78 100644 --- a/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js +++ b/ui/pages/confirmation/templates/flask/snap-confirm/snap-confirm.js @@ -76,8 +76,7 @@ function getValues(pendingApproval, t, actions) { children: t('learnMoreUpperCase'), key: 'learnMore-a-href', props: { - href: - 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps', + href: 'https://metamask.zendesk.com/hc/en-us/articles/4405506066331-User-guide-Dapps', target: '__blank', }, }, diff --git a/ui/pages/confirmation/templates/index.js b/ui/pages/confirmation/templates/index.js index 1e1e9bc5c..732b28d71 100644 --- a/ui/pages/confirmation/templates/index.js +++ b/ui/pages/confirmation/templates/index.js @@ -19,9 +19,8 @@ const APPROVAL_TEMPLATES = { ///: END:ONLY_INCLUDE_IN }; -export const TEMPLATED_CONFIRMATION_MESSAGE_TYPES = Object.keys( - APPROVAL_TEMPLATES, -); +export const TEMPLATED_CONFIRMATION_MESSAGE_TYPES = + Object.keys(APPROVAL_TEMPLATES); const ALLOWED_TEMPLATE_KEYS = [ 'content', diff --git a/ui/pages/connected-sites/connected-sites.container.js b/ui/pages/connected-sites/connected-sites.container.js index 6385bd849..7e7b2a9c4 100644 --- a/ui/pages/connected-sites/connected-sites.container.js +++ b/ui/pages/connected-sites/connected-sites.container.js @@ -25,8 +25,8 @@ const mapStateToProps = (state) => { const permittedAccountsByOrigin = getPermittedAccountsByOrigin(state); const selectedAddress = getSelectedAddress(state); - const currentTabHasNoAccounts = !permittedAccountsByOrigin[originOfCurrentTab] - ?.length; + const currentTabHasNoAccounts = + !permittedAccountsByOrigin[originOfCurrentTab]?.length; let tabToConnect; if (originOfCurrentTab && currentTabHasNoAccounts && !openMetaMaskTabs[id]) { diff --git a/ui/pages/create-account/connect-hardware/index.js b/ui/pages/create-account/connect-hardware/index.js index b59e97932..1b359c5dd 100644 --- a/ui/pages/create-account/connect-hardware/index.js +++ b/ui/pages/create-account/connect-hardware/index.js @@ -232,11 +232,8 @@ class ConnectHardwareForm extends Component { }; onUnlockAccounts = (device, path) => { - const { - history, - mostRecentOverviewPage, - unlockHardwareWalletAccounts, - } = this.props; + const { history, mostRecentOverviewPage, unlockHardwareWalletAccounts } = + this.props; const { selectedAccounts } = this.state; if (selectedAccounts.length === 0) { diff --git a/ui/pages/create-account/import-account/index.js b/ui/pages/create-account/import-account/index.js index d8003b4e9..4a138a7d0 100644 --- a/ui/pages/create-account/import-account/index.js +++ b/ui/pages/create-account/import-account/index.js @@ -48,8 +48,7 @@ export default class AccountImportSubview extends Component { className="new-account-info-link" onClick={() => { global.platform.openTab({ - url: - 'https://metamask.zendesk.com/hc/en-us/articles/360015289932', + url: 'https://metamask.zendesk.com/hc/en-us/articles/360015289932', }); }} > diff --git a/ui/pages/create-account/new-account.component.js b/ui/pages/create-account/new-account.component.js index 7ffd00d5d..7b0d68395 100644 --- a/ui/pages/create-account/new-account.component.js +++ b/ui/pages/create-account/new-account.component.js @@ -18,12 +18,8 @@ export default class NewAccountCreateForm extends Component { render() { const { newAccountName, defaultAccountName } = this.state; - const { - history, - createAccount, - mostRecentOverviewPage, - accounts, - } = this.props; + const { history, createAccount, mostRecentOverviewPage, accounts } = + this.props; const createClick = (_) => { createAccount(newAccountName || defaultAccountName) diff --git a/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js index bf96c0e89..da7eec5af 100644 --- a/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js +++ b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js @@ -40,12 +40,8 @@ export default class ImportWithSeedPhrase extends PureComponent { } handleImport = async (password, seedPhrase) => { - const { - history, - onSubmit, - setSeedPhraseBackedUp, - initializeThreeBox, - } = this.props; + const { history, onSubmit, setSeedPhraseBackedUp, initializeThreeBox } = + this.props; await onSubmit(password, seedPhrase); this.context.trackEvent({ diff --git a/ui/pages/first-time-flow/create-password/new-account/new-account.component.js b/ui/pages/first-time-flow/create-password/new-account/new-account.component.js index d51e2daaa..68f98564f 100644 --- a/ui/pages/first-time-flow/create-password/new-account/new-account.component.js +++ b/ui/pages/first-time-flow/create-password/new-account/new-account.component.js @@ -28,12 +28,8 @@ export default class NewAccount extends PureComponent { }; isValid() { - const { - password, - confirmPassword, - passwordError, - confirmPasswordError, - } = this.state; + const { password, confirmPassword, passwordError, confirmPasswordError } = + this.state; if (!password || !confirmPassword || password !== confirmPassword) { return false; diff --git a/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js index 265c51ff0..427556d10 100644 --- a/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js +++ b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js @@ -2,12 +2,8 @@ import { connect } from 'react-redux'; import FirstTimeFlowSwitch from './first-time-flow-switch.component'; const mapStateToProps = ({ metamask }) => { - const { - completedOnboarding, - isInitialized, - isUnlocked, - seedPhraseBackedUp, - } = metamask; + const { completedOnboarding, isInitialized, isUnlocked, seedPhraseBackedUp } = + metamask; return { completedOnboarding, diff --git a/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js index eb35680f1..ebef3fd58 100644 --- a/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js +++ b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js @@ -126,11 +126,8 @@ export default class ConfirmSeedPhrase extends PureComponent { render() { const { t } = this.context; const { history } = this.props; - const { - selectedSeedIndices, - sortedSeedWords, - draggingSeedIndex, - } = this.state; + const { selectedSeedIndices, sortedSeedWords, draggingSeedIndex } = + this.state; return (
@@ -201,11 +198,8 @@ export default class ConfirmSeedPhrase extends PureComponent { } renderSelectedSeeds() { - const { - sortedSeedWords, - selectedSeedIndices, - draggingSeedIndex, - } = this.state; + const { sortedSeedWords, selectedSeedIndices, draggingSeedIndex } = + this.state; return EMPTY_SEEDS.map((_, index) => { const seedIndex = selectedSeedIndices[index]; const word = sortedSeedWords[seedIndex]; diff --git a/ui/pages/first-time-flow/welcome/welcome.container.js b/ui/pages/first-time-flow/welcome/welcome.container.js index 27bd2e198..c667413c1 100644 --- a/ui/pages/first-time-flow/welcome/welcome.container.js +++ b/ui/pages/first-time-flow/welcome/welcome.container.js @@ -5,11 +5,8 @@ import { closeWelcomeScreen } from '../../../store/actions'; import Welcome from './welcome.component'; const mapStateToProps = ({ metamask }) => { - const { - welcomeScreenSeen, - participateInMetaMetrics, - isInitialized, - } = metamask; + const { welcomeScreenSeen, participateInMetaMetrics, isInitialized } = + metamask; return { welcomeScreenSeen, diff --git a/ui/pages/mobile-sync/mobile-sync.component.js b/ui/pages/mobile-sync/mobile-sync.component.js index 45f37a2ff..f23badab4 100644 --- a/ui/pages/mobile-sync/mobile-sync.component.js +++ b/ui/pages/mobile-sync/mobile-sync.component.js @@ -219,13 +219,8 @@ export default class MobileSyncPage extends Component { this.syncing = true; this.setState({ syncing: true }); - const { - accounts, - network, - preferences, - transactions, - tokens, - } = await this.props.fetchInfoToSync(); + const { accounts, network, preferences, transactions, tokens } = + await this.props.fetchInfoToSync(); const { t } = this.context; const allDataStr = JSON.stringify({ diff --git a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js index d73571bff..9b8a6ac1a 100644 --- a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js +++ b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js @@ -24,9 +24,8 @@ export default function PrivacySettings() { const history = useHistory(); const [usePhishingDetection, setUsePhishingDetection] = useState(true); const [turnOnTokenDetection, setTurnOnTokenDetection] = useState(true); - const [showIncomingTransactions, setShowIncomingTransactions] = useState( - true, - ); + const [showIncomingTransactions, setShowIncomingTransactions] = + useState(true); const handleSubmit = () => { dispatch( diff --git a/ui/pages/onboarding-flow/secure-your-wallet/secure-your-wallet.js b/ui/pages/onboarding-flow/secure-your-wallet/secure-your-wallet.js index 04eb17812..42dfc94f5 100644 --- a/ui/pages/onboarding-flow/secure-your-wallet/secure-your-wallet.js +++ b/ui/pages/onboarding-flow/secure-your-wallet/secure-your-wallet.js @@ -24,9 +24,8 @@ export default function SecureYourWallet() { const history = useHistory(); const t = useI18nContext(); const currentLocale = useSelector(getCurrentLocale); - const [showSkipSRPBackupPopover, setShowSkipSRPBackupPopover] = useState( - false, - ); + const [showSkipSRPBackupPopover, setShowSkipSRPBackupPopover] = + useState(false); const handleClickRecommended = () => { history.push(ONBOARDING_REVIEW_SRP_ROUTE); diff --git a/ui/pages/permissions-connect/flask/snap-install/snap-install.js b/ui/pages/permissions-connect/flask/snap-install/snap-install.js index 466a874fa..5ae4ea987 100644 --- a/ui/pages/permissions-connect/flask/snap-install/snap-install.js +++ b/ui/pages/permissions-connect/flask/snap-install/snap-install.js @@ -27,15 +27,15 @@ export default function SnapInstall({ const [isShowingWarning, setIsShowingWarning] = useState(false); - const onCancel = useCallback(() => rejectSnapInstall(request.metadata.id), [ - request, - rejectSnapInstall, - ]); + const onCancel = useCallback( + () => rejectSnapInstall(request.metadata.id), + [request, rejectSnapInstall], + ); - const onSubmit = useCallback(() => approveSnapInstall(request), [ - request, - approveSnapInstall, - ]); + const onSubmit = useCallback( + () => approveSnapInstall(request), + [request, approveSnapInstall], + ); const shouldShowWarning = useMemo( () => diff --git a/ui/pages/send/send-content/add-recipient/add-recipient.container.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.js index e3ac928fd..4491ef56c 100644 --- a/ui/pages/send/send-content/add-recipient/add-recipient.container.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.container.js @@ -46,9 +46,8 @@ function mapStateToProps(state) { ensWarning: getEnsWarning(state), nonContacts: addressBook.filter(({ name }) => !name), ownedAccounts, - isUsingMyAccountsForRecipientSearch: getIsUsingMyAccountForRecipientSearch( - state, - ), + isUsingMyAccountsForRecipientSearch: + getIsUsingMyAccountForRecipientSearch(state), userInput: getRecipientUserInput(state), recipient: getRecipient(state), }; diff --git a/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js index 138ad06ed..98d7eecdf 100644 --- a/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js +++ b/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js @@ -184,12 +184,8 @@ export default class SendAssetRow extends Component { renderNativeCurrency(insideDropdown = false) { const { t } = this.context; - const { - accounts, - selectedAddress, - nativeCurrency, - nativeCurrencyImage, - } = this.props; + const { accounts, selectedAddress, nativeCurrency, nativeCurrencyImage } = + this.props; const { sendableTokens, sendableCollectibles } = this.state; diff --git a/ui/pages/send/send-content/send-content.container.js b/ui/pages/send/send-content/send-content.container.js index 53fca7530..07ac323ad 100644 --- a/ui/pages/send/send-content/send-content.container.js +++ b/ui/pages/send/send-content/send-content.container.js @@ -22,9 +22,8 @@ function mapStateToProps(state) { const ownedAccounts = accountsWithSendEtherInfoSelector(state); const to = getSendTo(state); const recipient = getRecipient(state); - const recipientWarningAcknowledged = getRecipientWarningAcknowledgement( - state, - ); + const recipientWarningAcknowledged = + getRecipientWarningAcknowledgement(state); return { isOwnedAccount: Boolean( ownedAccounts.find( @@ -35,9 +34,8 @@ function mapStateToProps(state) { isEthGasPrice: getIsEthGasPriceFetched(state), noGasPrice: getNoGasPriceFetched(state), to, - networkOrAccountNotSupports1559: checkNetworkOrAccountNotSupports1559( - state, - ), + networkOrAccountNotSupports1559: + checkNetworkOrAccountNotSupports1559(state), getIsBalanceInsufficient: getIsBalanceInsufficient(state), asset: getSendAsset(state), assetError: getAssetError(state), diff --git a/ui/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js index f673f77f5..a9f0fa20b 100644 --- a/ui/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -291,10 +291,8 @@ export default class AdvancedTab extends PureComponent { renderShowConversionInTestnets() { const { t } = this.context; - const { - showFiatInTestnets, - setShowFiatConversionOnTestnetsPreference, - } = this.props; + const { showFiatInTestnets, setShowFiatConversionOnTestnetsPreference } = + this.props; return (
diff --git a/ui/pages/settings/experimental-tab/experimental-tab.container.js b/ui/pages/settings/experimental-tab/experimental-tab.container.js index 244de6198..354bb714b 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.container.js +++ b/ui/pages/settings/experimental-tab/experimental-tab.container.js @@ -21,9 +21,10 @@ import ExperimentalTab from './experimental-tab.component'; const mapStateToProps = (state) => { return { - useTokenDetection: getUseTokenDetection( - state, - ) /** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */, + useTokenDetection: + getUseTokenDetection( + state, + ) /** TODO: Remove during TOKEN_DETECTION_V2 feature flag clean up */, useCollectibleDetection: getUseCollectibleDetection(state), openSeaEnabled: getOpenSeaEnabled(state), eip1559V2Enabled: getEIP1559V2Enabled(state), diff --git a/ui/pages/settings/networks-tab/networks-form/networks-form.test.js b/ui/pages/settings/networks-tab/networks-form/networks-form.test.js index 5c2a5d5ce..182de7398 100644 --- a/ui/pages/settings/networks-tab/networks-form/networks-form.test.js +++ b/ui/pages/settings/networks-tab/networks-form/networks-form.test.js @@ -121,9 +121,8 @@ describe('NetworkForm Component', () => { }); it('should render network form correctly', () => { - const { queryByText, getByDisplayValue } = renderComponent( - propNetworkDisplay, - ); + const { queryByText, getByDisplayValue } = + renderComponent(propNetworkDisplay); expect(queryByText('Network Name')).toBeInTheDocument(); expect(queryByText('New RPC URL')).toBeInTheDocument(); expect(queryByText('Chain ID')).toBeInTheDocument(); diff --git a/ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js b/ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js index b6b13089c..61d9fbfb6 100644 --- a/ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js +++ b/ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js @@ -114,7 +114,8 @@ const NetworksListItem = ({ )}
!network.isATestNetwork, - ); - const searchedNetworksToRenderThatAreTestNetworks = searchedNetworksToRender.filter( - (network) => network.isATestNetwork, - ); + const searchedNetworksToRenderThatAreNotTestNetworks = + searchedNetworksToRender.filter((network) => !network.isATestNetwork); + const searchedNetworksToRenderThatAreTestNetworks = + searchedNetworksToRender.filter((network) => network.isATestNetwork); return (
{ it('should render networks tab content correctly', async () => { - const { queryByText, getByDisplayValue, getAllByText } = renderComponent( - props, - ); + const { queryByText, getByDisplayValue, getAllByText } = + renderComponent(props); expect(queryByText('Ethereum Mainnet')).toBeInTheDocument(); expect(queryByText('Ropsten Test Network')).toBeInTheDocument(); diff --git a/ui/pages/settings/security-tab/security-tab.component.js b/ui/pages/settings/security-tab/security-tab.component.js index 92888c7ca..fefd932c4 100644 --- a/ui/pages/settings/security-tab/security-tab.component.js +++ b/ui/pages/settings/security-tab/security-tab.component.js @@ -84,10 +84,8 @@ export default class SecurityTab extends PureComponent { renderMetaMetricsOptIn() { const { t } = this.context; - const { - participateInMetaMetrics, - setParticipateInMetaMetrics, - } = this.props; + const { participateInMetaMetrics, setParticipateInMetaMetrics } = + this.props; return (
@@ -113,10 +111,8 @@ export default class SecurityTab extends PureComponent { renderIncomingTransactionsOptIn() { const { t } = this.context; - const { - showIncomingTransactions, - setShowIncomingTransactionsFeatureFlag, - } = this.props; + const { showIncomingTransactions, setShowIncomingTransactionsFeatureFlag } = + this.props; return (
diff --git a/ui/pages/settings/settings-tab/settings-tab.component.js b/ui/pages/settings/settings-tab/settings-tab.component.js index fe117ee06..ff163d228 100644 --- a/ui/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/pages/settings/settings-tab/settings-tab.component.js @@ -78,11 +78,8 @@ export default class SettingsTab extends PureComponent { renderCurrentConversion() { const { t } = this.context; - const { - currentCurrency, - setCurrentCurrency, - lastFetchedConversionDate, - } = this.props; + const { currentCurrency, setCurrentCurrency, lastFetchedConversionDate } = + this.props; return (
@@ -209,7 +206,8 @@ export default class SettingsTab extends PureComponent { className={classnames( 'settings-page__content-item__identicon__item__icon', { - 'settings-page__content-item__identicon__item__icon--active': !useBlockie, + 'settings-page__content-item__identicon__item__icon--active': + !useBlockie, }, )} > @@ -242,7 +240,8 @@ export default class SettingsTab extends PureComponent { className={classnames( 'settings-page__content-item__identicon__item__icon', { - 'settings-page__content-item__identicon__item__icon--active': useBlockie, + 'settings-page__content-item__identicon__item__icon--active': + useBlockie, }, )} > diff --git a/ui/pages/settings/settings-tab/settings-tab.container.js b/ui/pages/settings/settings-tab/settings-tab.container.js index ae74a976f..15dbc51dd 100644 --- a/ui/pages/settings/settings-tab/settings-tab.container.js +++ b/ui/pages/settings/settings-tab/settings-tab.container.js @@ -24,10 +24,8 @@ const mapStateToProps = (state, ownProps) => { useTokenDetection, tokenList, } = metamask; - const { - useNativeCurrencyAsPrimaryCurrency, - hideZeroBalanceTokens, - } = getPreferences(state); + const { useNativeCurrencyAsPrimaryCurrency, hideZeroBalanceTokens } = + getPreferences(state); const { lastFetchedConversionDate } = ownProps; diff --git a/ui/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js index 64995b15c..1ce7c9043 100644 --- a/ui/pages/settings/settings.component.js +++ b/ui/pages/settings/settings.component.js @@ -173,12 +173,8 @@ class SettingsPage extends PureComponent { renderTitle() { const { t } = this.context; - const { - isPopup, - pathnameI18nKey, - addressName, - isSnapViewPage, - } = this.props; + const { isPopup, pathnameI18nKey, addressName, isSnapViewPage } = + this.props; let titleText; if (isSnapViewPage) { titleText = t('snaps'); diff --git a/ui/pages/swaps/awaiting-swap/awaiting-swap.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.js index 5456c1067..e912b65ae 100644 --- a/ui/pages/swaps/awaiting-swap/awaiting-swap.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.js @@ -83,9 +83,8 @@ export default function AwaitingSwap({ const usdConversionRate = useSelector(getUSDConversionRate); const chainId = useSelector(getCurrentChainId); const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider, shallowEqual); - const [trackedQuotesExpiredEvent, setTrackedQuotesExpiredEvent] = useState( - false, - ); + const [trackedQuotesExpiredEvent, setTrackedQuotesExpiredEvent] = + useState(false); let feeinUnformattedFiat; diff --git a/ui/pages/swaps/build-quote/build-quote.js b/ui/pages/swaps/build-quote/build-quote.js index 01f5535f9..529981d3a 100644 --- a/ui/pages/swaps/build-quote/build-quote.js +++ b/ui/pages/swaps/build-quote/build-quote.js @@ -130,9 +130,8 @@ export default function BuildQuote({ const history = useHistory(); const trackEvent = useContext(MetaMetricsContext); - const [fetchedTokenExchangeRate, setFetchedTokenExchangeRate] = useState( - undefined, - ); + const [fetchedTokenExchangeRate, setFetchedTokenExchangeRate] = + useState(undefined); const [verificationClicked, setVerificationClicked] = useState(false); const isFeatureFlagLoaded = useSelector(getIsFeatureFlagLoaded); diff --git a/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js index 6959991c9..ac5d4ff08 100644 --- a/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js +++ b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js @@ -150,10 +150,8 @@ const tokensToSearch = tokens.map((token) => ({ })); export const DefaultStory = (args) => { - const [ - { inputValue, selectedItem = tokensToSearch[0] }, - updateArgs, - ] = useArgs(); + const [{ inputValue, selectedItem = tokensToSearch[0] }, updateArgs] = + useArgs(); return ( diff --git a/ui/pages/swaps/fee-card/fee-card.stories.js b/ui/pages/swaps/fee-card/fee-card.stories.js index 1175d8f09..45dfea10e 100644 --- a/ui/pages/swaps/fee-card/fee-card.stories.js +++ b/ui/pages/swaps/fee-card/fee-card.stories.js @@ -103,13 +103,8 @@ export default { export const DefaultStory = (args) => { // Please note, currently nested arg types are not possible, but discussions are open: // https://github.com/storybookjs/storybook/issues/11486 - const { - primaryFee, - primaryMaxFee, - secondaryFee, - secondaryMaxFee, - ...rest - } = args; + const { primaryFee, primaryMaxFee, secondaryFee, secondaryMaxFee, ...rest } = + args; return (
diff --git a/ui/pages/swaps/index.js b/ui/pages/swaps/index.js index 861d0292e..128ae7474 100644 --- a/ui/pages/swaps/index.js +++ b/ui/pages/swaps/index.js @@ -173,10 +173,8 @@ export default function Swap() { // This will pre-load gas fees before going to the View Quote page. useGasFeeEstimates(); - const { - balance: ethBalance, - address: selectedAccountAddress, - } = selectedAccount; + const { balance: ethBalance, address: selectedAccountAddress } = + selectedAccount; const { destinationTokenAddedForSwap } = fetchParams || {}; diff --git a/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js index aae2acd8a..0915fe3b5 100644 --- a/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js +++ b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js @@ -1,32 +1,26 @@ export const storiesMetadata = { totle: { color: '#283B4C', - icon: - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA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GSxUoTxU8SBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQBEEQLin+Dz5IwjUsPBVBAAAAAElFTkSuQmCC', }, }; diff --git a/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js index 8472cd616..ca0e53a65 100644 --- a/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js +++ b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js @@ -105,12 +105,8 @@ export default function LoadingSwapsQuotes({ useEffect(() => { if (currentMascotContainer) { - const { - top, - left, - width, - height, - } = currentMascotContainer.getBoundingClientRect(); + const { top, left, width, height } = + currentMascotContainer.getBoundingClientRect(); const center = { x: left + width / 2, y: top + height / 2 }; setMidpointTarget(center); } diff --git a/ui/pages/swaps/main-quote-summary/main-quote-summary.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.js index 33a1f8fdc..d186cdfae 100644 --- a/ui/pages/swaps/main-quote-summary/main-quote-summary.js +++ b/ui/pages/swaps/main-quote-summary/main-quote-summary.js @@ -39,9 +39,8 @@ export default function MainQuoteSummary({ const amountToDisplay = formatSwapsValueForDisplay(destinationAmount); const amountDigitLength = amountToDisplay.match(/\d+/gu).join('').length; - const [numberFontSize, lineHeight] = getFontSizesAndLineHeights( - amountDigitLength, - ); + const [numberFontSize, lineHeight] = + getFontSizesAndLineHeights(amountDigitLength); let ellipsedAmountToDisplay = amountToDisplay; if (amountDigitLength > 20) { diff --git a/ui/pages/swaps/select-quote-popover/select-quote-popover.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.js index 1b19bfecb..b88642ff9 100644 --- a/ui/pages/swaps/select-quote-popover/select-quote-popover.js +++ b/ui/pages/swaps/select-quote-popover/select-quote-popover.js @@ -35,9 +35,10 @@ const SelectQuotePopover = ({ setContentView('sortList'); }, []); - const onRowClick = useCallback((aggId) => setSelectedAggId(aggId), [ - setSelectedAggId, - ]); + const onRowClick = useCallback( + (aggId) => setSelectedAggId(aggId), + [setSelectedAggId], + ); const onCaretClick = useCallback( (aggId) => { diff --git a/ui/pages/swaps/swaps-footer/swaps-footer.js b/ui/pages/swaps/swaps-footer/swaps-footer.js index 422b32da6..ea7bc2c4d 100644 --- a/ui/pages/swaps/swaps-footer/swaps-footer.js +++ b/ui/pages/swaps/swaps-footer/swaps-footer.js @@ -38,7 +38,8 @@ export default function SwapsFooter({ footerButtonClassName={classnames( 'swaps-footer__custom-page-container-footer-button-class', { - 'swaps-footer__custom-page-container-footer-button-class--single': hideCancel, + 'swaps-footer__custom-page-container-footer-button-class--single': + hideCancel, }, )} disabled={disabled} diff --git a/ui/pages/swaps/swaps-util-test-constants.js b/ui/pages/swaps/swaps-util-test-constants.js index 54c0b1e34..aa02f6a92 100644 --- a/ui/pages/swaps/swaps-util-test-constants.js +++ b/ui/pages/swaps/swaps-util-test-constants.js @@ -92,8 +92,7 @@ export const MOCK_TRADE_RESPONSE_1 = [ { trade: { // the ethereum transaction data for the swap - data: - '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', + data: '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', value: '5700000000000000', to: '0x61935cbdd02287b511119ddb11aeb42f1593b7ef', @@ -111,8 +110,7 @@ export const MOCK_TRADE_RESPONSE_1 = [ aggType: 'AGG', approvalNeeded: { // the ethereum transaction data for the approval (if needed) - data: - '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', + data: '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', to: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', amount: '0', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', @@ -131,8 +129,7 @@ export const MOCK_TRADE_RESPONSE_1 = [ aggType: 'AGG', approvalNeeded: { // the ethereum transaction data for the approval (if needed) - data: - '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', + data: '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', to: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', value: '0', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', @@ -141,8 +138,7 @@ export const MOCK_TRADE_RESPONSE_1 = [ { trade: { // the ethereum transaction data for the swap - data: - '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', + data: '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', value: '5700000000000000', to: '0x61935cbdd02287b511119ddb11aeb42f1593b7ef', diff --git a/ui/pages/swaps/swaps.util.js b/ui/pages/swaps/swaps.util.js index a45009416..71bb2669f 100644 --- a/ui/pages/swaps/swaps.util.js +++ b/ui/pages/swaps/swaps.util.js @@ -646,22 +646,18 @@ export function quotesToRenderableData( let rawNetworkFees = null; let rawEthFee = null; - ({ - feeInFiat, - feeInEth, - rawNetworkFees, - rawEthFee, - } = getRenderableNetworkFeesForQuote({ - tradeGas: gasEstimateWithRefund || decimalToHex(averageGas || 800000), - approveGas, - gasPrice, - currentCurrency, - conversionRate, - tradeValue: trade.value, - sourceSymbol: sourceTokenInfo.symbol, - sourceAmount, - chainId, - })); + ({ feeInFiat, feeInEth, rawNetworkFees, rawEthFee } = + getRenderableNetworkFeesForQuote({ + tradeGas: gasEstimateWithRefund || decimalToHex(averageGas || 800000), + approveGas, + gasPrice, + currentCurrency, + conversionRate, + tradeValue: trade.value, + sourceSymbol: sourceTokenInfo.symbol, + sourceAmount, + chainId, + })); if (smartTransactionEstimatedGas) { ({ feeInFiat, feeInEth } = getFeeForSmartTransaction({ diff --git a/ui/pages/swaps/swaps.util.test.js b/ui/pages/swaps/swaps.util.test.js index 8abff8171..755998f53 100644 --- a/ui/pages/swaps/swaps.util.test.js +++ b/ui/pages/swaps/swaps.util.test.js @@ -58,8 +58,7 @@ describe('Swaps Util', () => { zeroEx: { trade: { // the ethereum transaction data for the swap - data: - '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', + data: '0xa6c3bf330000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021486a000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005efe3c3b5dfc3a75ffc8add04bbdbac1e42fa234bf4549d8dab1bc44c8056eaf0e1dfe8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000001c4dc1600f3000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005591360f8c7640fea5771c9682d6b5ecb776e1f800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000140000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000036691c4f426eb8f42f150ebde43069a31cb080ad000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000000000000021486a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000005efe201b', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', value: '0x14401eab384000', to: '0x61935cbdd02287b511119ddb11aeb42f1593b7ef', @@ -76,8 +75,7 @@ describe('Swaps Util', () => { aggregator: 'zeroEx', aggType: 'AGG', approvalNeeded: { - data: - '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', + data: '0x095ea7b300000000000000000000000095e6f48254609a6ee006f7d493c8e5fb97094cef0000000000000000000000000000000000000000004a817c7ffffffdabf41c00', to: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', value: '0x0', from: '0x2369267687A84ac7B494daE2f1542C40E37f4455', diff --git a/ui/pages/swaps/view-quote/view-quote-price-difference.test.js b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js index 085cb8ea2..3053f5fbe 100644 --- a/ui/pages/swaps/view-quote/view-quote-price-difference.test.js +++ b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js @@ -25,8 +25,7 @@ describe('View Price Quote Difference', () => { const DEFAULT_PROPS = { usedQuote: { trade: { - data: - '0x5f575529000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000007756e69737761700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000000dc1a09f859b20000000000000000000000000000000000000000000000000024855454cb32d335f0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000005fc7b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f161421c8e0000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca', + data: '0x5f575529000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000007756e69737761700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000000dc1a09f859b20000000000000000000000000000000000000000000000000024855454cb32d335f0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000005fc7b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f161421c8e0000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca', from: '0xd7440fdcb70a9fba55dfe06942ddbc17679c90ac', value: '0xde0b6b3a7640000', gas: '0xbbfd0', diff --git a/ui/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js index b39048d6c..6755d3ee3 100644 --- a/ui/pages/swaps/view-quote/view-quote.js +++ b/ui/pages/swaps/view-quote/view-quote.js @@ -129,10 +129,8 @@ export default function ViewQuote() { // We need to have currentTimestamp in state, otherwise it would change with each rerender. const [currentTimestamp] = useState(Date.now()); - const [ - acknowledgedPriceDifference, - setAcknowledgedPriceDifference, - ] = useState(false); + const [acknowledgedPriceDifference, setAcknowledgedPriceDifference] = + useState(false); const priceDifferenceRiskyBuckets = [ GAS_RECOMMENDATIONS.HIGH, GAS_RECOMMENDATIONS.MEDIUM, @@ -335,26 +333,22 @@ export default function ViewQuote() { sourceTokenIconUrl, } = renderableDataForUsedQuote; - let { - feeInFiat, - feeInEth, - rawEthFee, - feeInUsd, - } = getRenderableNetworkFeesForQuote({ - tradeGas: usedGasLimit, - approveGas, - gasPrice: networkAndAccountSupports1559 - ? baseAndPriorityFeePerGas - : gasPrice, - currentCurrency, - conversionRate, - USDConversionRate, - tradeValue, - sourceSymbol: sourceTokenSymbol, - sourceAmount: usedQuote.sourceAmount, - chainId, - nativeCurrencySymbol, - }); + let { feeInFiat, feeInEth, rawEthFee, feeInUsd } = + getRenderableNetworkFeesForQuote({ + tradeGas: usedGasLimit, + approveGas, + gasPrice: networkAndAccountSupports1559 + ? baseAndPriorityFeePerGas + : gasPrice, + currentCurrency, + conversionRate, + USDConversionRate, + tradeValue, + sourceSymbol: sourceTokenSymbol, + sourceAmount: usedQuote.sourceAmount, + chainId, + nativeCurrencySymbol, + }); additionalTrackingParams.reg_tx_fee_in_usd = Number(feeInUsd); additionalTrackingParams.reg_tx_fee_in_eth = Number(rawEthFee); diff --git a/ui/pages/swaps/view-quote/view-quote.test.js b/ui/pages/swaps/view-quote/view-quote.test.js index 855ff0222..c1aa42849 100644 --- a/ui/pages/swaps/view-quote/view-quote.test.js +++ b/ui/pages/swaps/view-quote/view-quote.test.js @@ -10,8 +10,9 @@ import { } from '../../../../test/jest'; import ViewQuote from '.'; -jest.mock('../../../components/ui/info-tooltip/info-tooltip-icon', () => () => - '', +jest.mock( + '../../../components/ui/info-tooltip/info-tooltip-icon', + () => () => '', ); jest.mock('../../../hooks/gasFeeInput/useGasFeeInputs', () => { diff --git a/ui/selectors/confirm-transaction.js b/ui/selectors/confirm-transaction.js index e502d473c..2094bb032 100644 --- a/ui/selectors/confirm-transaction.js +++ b/ui/selectors/confirm-transaction.js @@ -263,9 +263,8 @@ export const transactionFeeSelector = function (state, txData) { const nativeCurrency = getNativeCurrency(state); const gasFeeEstimates = getGasFeeEstimates(state) || {}; const gasEstimateType = getGasEstimateType(state); - const networkAndAccountSupportsEIP1559 = checkNetworkAndAccountSupports1559( - state, - ); + const networkAndAccountSupportsEIP1559 = + checkNetworkAndAccountSupports1559(state); const gasEstimationObject = { gasLimit: txData.txParams?.gas ?? '0x0', @@ -278,10 +277,8 @@ export const transactionFeeSelector = function (state, txData) { gasEstimationObject.gasPrice = txData.txParams?.gasPrice ?? decGWEIToHexWEI(gasPrice); } else { - const { - suggestedMaxPriorityFeePerGas, - suggestedMaxFeePerGas, - } = selectedGasEstimates; + const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } = + selectedGasEstimates; gasEstimationObject.maxFeePerGas = txData.txParams?.maxFeePerGas && (txData.userFeeLevel === CUSTOM_GAS_ESTIMATE || !suggestedMaxFeePerGas) @@ -337,12 +334,10 @@ export const transactionFeeSelector = function (state, txData) { numberOfDecimals: 6, }); - const hexMinimumTransactionFee = getMinimumGasTotalInHexWei( - gasEstimationObject, - ); - const hexMaximumTransactionFee = getMaximumGasTotalInHexWei( - gasEstimationObject, - ); + const hexMinimumTransactionFee = + getMinimumGasTotalInHexWei(gasEstimationObject); + const hexMaximumTransactionFee = + getMaximumGasTotalInHexWei(gasEstimationObject); const fiatMinimumTransactionFee = getTransactionFee({ value: hexMinimumTransactionFee, diff --git a/ui/selectors/custom-gas.js b/ui/selectors/custom-gas.js index 3edc9b20b..326df611d 100644 --- a/ui/selectors/custom-gas.js +++ b/ui/selectors/custom-gas.js @@ -301,17 +301,14 @@ export function getRenderableBasicEstimateData(state, gasLimit) { const { conversionRate } = state.metamask; const currentCurrency = getCurrentCurrency(state); - const { - slowEstimateData, - averageEstimateData, - fastEstimateData, - } = getRenderableGasButtonData( - getGasFeeEstimates(state), - gasLimit, - showFiat, - conversionRate, - currentCurrency, - ); + const { slowEstimateData, averageEstimateData, fastEstimateData } = + getRenderableGasButtonData( + getGasFeeEstimates(state), + gasLimit, + showFiat, + conversionRate, + currentCurrency, + ); return [slowEstimateData, averageEstimateData, fastEstimateData]; } diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js index 385bd2a56..1aaa65420 100644 --- a/ui/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -135,9 +135,8 @@ describe('Selectors', () => { }); it('returns accounts with balance, address, and name from identity and accounts in state', () => { - const accountsWithSendEther = selectors.accountsWithSendEtherInfoSelector( - mockState, - ); + const accountsWithSendEther = + selectors.accountsWithSendEtherInfoSelector(mockState); expect(accountsWithSendEther).toHaveLength(2); expect(accountsWithSendEther[0].balance).toStrictEqual('0x0'); expect(accountsWithSendEther[0].address).toStrictEqual( @@ -147,9 +146,8 @@ describe('Selectors', () => { }); it('returns selected account with balance, address, and name from accountsWithSendEtherInfoSelector', () => { - const currentAccountwithSendEther = selectors.getCurrentAccountWithSendEtherInfo( - mockState, - ); + const currentAccountwithSendEther = + selectors.getCurrentAccountWithSendEtherInfo(mockState); expect(currentAccountwithSendEther.balance).toStrictEqual('0x0'); expect(currentAccountwithSendEther.address).toStrictEqual( '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', @@ -235,9 +233,8 @@ describe('Selectors', () => { }); }); it('#getIsAdvancedGasFeeDefault', () => { - const isAdvancedGasFeeDefault = selectors.getIsAdvancedGasFeeDefault( - mockState, - ); + const isAdvancedGasFeeDefault = + selectors.getIsAdvancedGasFeeDefault(mockState); expect(isAdvancedGasFeeDefault).toStrictEqual(true); }); it('#getAppIsLoading', () => { @@ -253,9 +250,8 @@ describe('Selectors', () => { ]); }); it('#getUnreadNotificationsCount', () => { - const unreadNotificationCount = selectors.getUnreadNotificationsCount( - mockState, - ); + const unreadNotificationCount = + selectors.getUnreadNotificationsCount(mockState); expect(unreadNotificationCount).toStrictEqual(1); }); diff --git a/ui/selectors/transactions.js b/ui/selectors/transactions.js index a80147451..0afd68a0a 100644 --- a/ui/selectors/transactions.js +++ b/ui/selectors/transactions.js @@ -193,9 +193,8 @@ const insertTransactionByTime = (transactions, transaction) => { * array of transactionGroups. */ const insertTransactionGroupByTime = (transactionGroups, transactionGroup) => { - const { - primaryTransaction: { time: groupToInsertTime } = {}, - } = transactionGroup; + const { primaryTransaction: { time: groupToInsertTime } = {} } = + transactionGroup; let insertIndex = transactionGroups.length; diff --git a/ui/store/actions.js b/ui/store/actions.js index 153d56f46..8e79b69bd 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -718,10 +718,11 @@ export function updateSwapApprovalTransaction(txId, txSwapApproval) { return async (dispatch) => { let updatedTransaction; try { - updatedTransaction = await promisifiedBackground.updateSwapApprovalTransaction( - txId, - txSwapApproval, - ); + updatedTransaction = + await promisifiedBackground.updateSwapApprovalTransaction( + txId, + txSwapApproval, + ); } catch (error) { dispatch(txError(error)); log.error(error.message); @@ -762,10 +763,11 @@ export function updateTransactionSendFlowHistory(txId, sendFlowHistory) { return async (dispatch) => { let updatedTransaction; try { - updatedTransaction = await promisifiedBackground.updateTransactionSendFlowHistory( - txId, - sendFlowHistory, - ); + updatedTransaction = + await promisifiedBackground.updateTransactionSendFlowHistory( + txId, + sendFlowHistory, + ); } catch (error) { dispatch(txError(error)); log.error(error.message); @@ -1522,14 +1524,12 @@ export function showAccountDetail(address) { log.debug(`background.setSelectedAddress`); const state = getState(); - const unconnectedAccountAccountAlertIsEnabled = getUnconnectedAccountAlertEnabledness( - state, - ); + const unconnectedAccountAccountAlertIsEnabled = + getUnconnectedAccountAlertEnabledness(state); const activeTabOrigin = state.activeTab.origin; const selectedAddress = getSelectedAddress(state); - const permittedAccountsForCurrentTab = getPermittedAccountsForCurrentTab( - state, - ); + const permittedAccountsForCurrentTab = + getPermittedAccountsForCurrentTab(state); const currentTabIsConnectedToPreviousAddress = Boolean(activeTabOrigin) && permittedAccountsForCurrentTab.includes(selectedAddress); @@ -2806,13 +2806,11 @@ export function setSwapsFeatureFlags(featureFlags) { export function fetchAndSetQuotes(fetchParams, fetchParamsMetaData) { return async (dispatch) => { - const [ - quotes, - selectedAggId, - ] = await promisifiedBackground.fetchAndSetQuotes( - fetchParams, - fetchParamsMetaData, - ); + const [quotes, selectedAggId] = + await promisifiedBackground.fetchAndSetQuotes( + fetchParams, + fetchParamsMetaData, + ); await forceUpdateMetamaskState(dispatch); return [quotes, selectedAggId]; }; @@ -3357,7 +3355,8 @@ export function setRequestAccountTabIds(requestAccountTabIds) { export function getRequestAccountTabIds() { return async (dispatch) => { - const requestAccountTabIds = await promisifiedBackground.getRequestAccountTabIds(); + const requestAccountTabIds = + await promisifiedBackground.getRequestAccountTabIds(); dispatch(setRequestAccountTabIds(requestAccountTabIds)); }; } @@ -3371,7 +3370,8 @@ export function setOpenMetamaskTabsIDs(openMetaMaskTabIDs) { export function getOpenMetamaskTabsIds() { return async (dispatch) => { - const openMetaMaskTabIDs = await promisifiedBackground.getOpenMetamaskTabsIds(); + const openMetaMaskTabIDs = + await promisifiedBackground.getOpenMetamaskTabsIds(); dispatch(setOpenMetamaskTabsIDs(openMetaMaskTabIDs)); }; } @@ -3613,9 +3613,10 @@ const createSignedTransactions = async ( } return unsignedTransactionWithFees; }); - const signedTransactions = await promisifiedBackground.approveTransactionsWithSameNonce( - unsignedTransactionsWithFees, - ); + const signedTransactions = + await promisifiedBackground.approveTransactionsWithSameNonce( + unsignedTransactionsWithFees, + ); return signedTransactions; }; diff --git a/ui/store/actions.test.js b/ui/store/actions.test.js index d79b7d5c2..f217d08c7 100644 --- a/ui/store/actions.test.js +++ b/ui/store/actions.test.js @@ -103,9 +103,8 @@ describe('Actions', () => { it('calls createNewVaultAndRestore', async () => { const store = mockStore(); - const createNewVaultAndRestore = background.createNewVaultAndRestore.callsFake( - (_, __, cb) => cb(), - ); + const createNewVaultAndRestore = + background.createNewVaultAndRestore.callsFake((_, __, cb) => cb()); background.unMarkPasswordForgotten.callsFake((cb) => cb()); @@ -341,11 +340,10 @@ describe('Actions', () => { it('calls importAccountWithStrategies in background', async () => { const store = mockStore(); - const importAccountWithStrategy = background.importAccountWithStrategy.callsFake( - (_, __, cb) => { + const importAccountWithStrategy = + background.importAccountWithStrategy.callsFake((_, __, cb) => { cb(); - }, - ); + }); actions._setBackgroundConnection(background); @@ -563,9 +561,10 @@ describe('Actions', () => { it('calls unlockHardwareWalletAccount in background', async () => { const store = mockStore(); - const unlockHardwareWalletAccount = background.unlockHardwareWalletAccount.callsFake( - (_, __, ___, ____, cb) => cb(), - ); + const unlockHardwareWalletAccount = + background.unlockHardwareWalletAccount.callsFake( + (_, __, ___, ____, cb) => cb(), + ); actions._setBackgroundConnection(background); @@ -639,8 +638,7 @@ describe('Actions', () => { const msgParams = { metamaskId: 123, from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - data: - '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0', + data: '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0', }; afterEach(() => { @@ -684,8 +682,7 @@ describe('Actions', () => { describe('#signPersonalMsg', () => { const msgParams = { from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - data: - '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0', + data: '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0', }; afterEach(() => { diff --git a/yarn.lock b/yarn.lock index 75eeacd8f..40eb44787 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10655,10 +10655,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6" - integrity sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw== +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== eslint-import-resolver-node@^0.3.4, eslint-import-resolver-node@^0.3.6: version "0.3.6" @@ -10759,10 +10759,10 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" - integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -21650,7 +21650,12 @@ prettier-plugin-sort-json@^0.0.1: "@types/prettier" "^2.1.0" prettier "^2.1.1" -prettier@^2.1.1, prettier@^2.2.1, prettier@~2.2.1: +prettier@^2.1.1, prettier@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + +prettier@~2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==