From 5a4e78e0850122b46293155947013dc4a6a4c9ee Mon Sep 17 00:00:00 2001 From: "runway-github[bot]" <73448015+runway-github[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:38:58 +0000 Subject: [PATCH] temp+fix: Reapply migration 52 to fix undefined selectedAccount (#12115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR fixes https://github.com/MetaMask/metamask-mobile/issues/11866 where it ensures that selectedAccount in the AccountsController is defined. ## **Related issues** Fixes: #11866 ## **Manual testing steps** 1. Run `main` and create a wallet with 3 accounts, select account 1 2. Kill the app and apply a migration that sets `selectedAccount` in the AccountsController to undefined, re-run yarn watch and re-open app 3. Notice that the app is stuck on the splash screen 4. Kill the app and run this branch, which applies the migration that fixes the issue. Notice that the app is now accessible again ## **Screenshots/Recordings** ### **Before** Screenshot 2024-10-30 at 4 42 44 PM Screenshot 2024-10-30 at 4 43 07 PM ### **After** App is accessible again Screenshot 2024-10-30 at 10 11 24 PM ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- .android.env.example | 2 +- .depcheckrc.yml | 8 +- .detoxrc.js | 37 +- .eslintrc.js | 6 - .git-blame-ignore-revs | 2 - .github/CODEOWNERS | 34 +- .github/workflows/add-release-label.yml | 2 +- .github/workflows/ci.yml | 16 +- .github/workflows/create-release-draft.yml | 29 - .github/workflows/create-release-pr.yml | 10 +- .gitignore | 4 - .ios.env.example | 2 +- .iyarc | 7 + .js.env.example | 14 +- .nvmrc | 2 +- .storybook/storybook.requires.js | 5 +- .vscode/settings.json | 4 +- CHANGELOG.md | 27 +- README.md | 26 +- android/app/build.gradle | 6 +- android/app/google-services-example.json | 32 +- app/actions/notification/constants/index.ts | 1 - app/actions/notification/helpers/index.ts | 17 - app/actions/onboarding/index.ts | 2 +- app/actions/security/index.ts | 16 +- app/actions/settings/index.js | 7 - .../AccountBase/AccountBase.styles.ts | 1 + .../Accounts/AccountBase/AccountBase.tsx | 8 +- .../CellSelectWithMenu/CellSelectWithMenu.tsx | 16 +- .../CellSelectWithMenu.test.tsx.snap | 12 +- .../ContractBoxBase/ContractBoxBase.tsx | 29 +- .../ContractBoxBase.test.tsx.snap | 17 +- .../KeyValueLabel/KeyValueLabel.tsx | 34 +- .../KeyValueRow/KeyValueRow.stories.tsx | 67 +- .../KeyValueRow/KeyValueRow.test.tsx | 24 +- .../KeyValueRow/KeyValueRow.tsx | 17 +- .../KeyValueRow/KeyValueRow.types.ts | 39 +- .../KeyValueRow/KeyValueRow.utils.ts | 15 +- .../__snapshots__/KeyValueRow.test.tsx.snap | 16 +- .../ListItemMultiSelectButton.constants.ts | 1 - .../ListItemMultiSelectButton.styles.ts | 7 +- .../ListItemMultiSelectButton.test.tsx | 8 +- .../ListItemMultiSelectButton.tsx | 40 +- .../ListItemMultiSelectButton.types.ts | 24 +- .../ListItemMultiSelectButton.test.tsx.snap | 12 +- .../AggregatedPercentage.constants.ts | 2 - .../AggregatedPercentage.test.tsx | 22 - .../AggregatedPercentage.tsx | 43 +- .../AggregatedPercentage.test.tsx.snap | 2 - .../Form/TextField/foundation/Input/Input.tsx | 4 +- .../Input/__snapshots__/Input.test.tsx.snap | 2 +- .../Pickers/PickerBase/PickerBase.stories.tsx | 57 - .../Pickers/PickerBase/PickerBase.styles.ts | 12 +- .../Pickers/PickerBase/PickerBase.test.tsx | 68 +- .../Pickers/PickerBase/PickerBase.tsx | 9 +- .../Pickers/PickerBase/PickerBase.types.ts | 16 +- .../components/Pickers/PickerBase/README.md | 56 +- .../__snapshots__/PickerBase.test.tsx.snap | 6 +- .../PickerNetwork/PickerNetwork.stories.tsx | 10 +- .../PickerNetwork/PickerNetwork.styles.ts | 3 - .../PickerNetwork/PickerNetwork.test.tsx | 34 +- .../Pickers/PickerNetwork/PickerNetwork.tsx | 35 +- .../PickerNetwork/PickerNetwork.types.ts | 4 - .../Pickers/PickerNetwork/README.md | 40 +- .../__snapshots__/PickerNetwork.test.tsx.snap | 46 +- .../components/Texts/SensitiveText/README.md | 57 - .../SensitiveText/SensitiveText.stories.tsx | 89 - .../SensitiveText/SensitiveText.test.tsx | 116 - .../Texts/SensitiveText/SensitiveText.tsx | 39 - .../SensitiveText/SensitiveText.types.ts | 47 - .../__snapshots__/SensitiveText.test.tsx.snap | 19 - .../components/Texts/SensitiveText/index.ts | 3 - .../PermissionApproval.test.tsx | 1 - .../SignatureApproval/SignatureApproval.tsx | 11 +- app/components/Base/DetailsModal.js | 2 +- .../{index.tsx => index.js} | 160 +- app/components/Base/RemoteImage/index.js | 37 +- .../Base/RemoteImage/index.test.tsx | 20 +- app/components/Base/Title/Title.tsx | 15 +- app/components/Nav/App/index.js | 543 +- app/components/Nav/Main/MainNavigator.js | 23 +- app/components/Nav/Main/index.js | 64 +- .../Nav/Main/useConnectionHandler.test.ts | 137 - app/components/UI/AccountApproval/index.js | 6 +- .../UI/AccountInfoCard/index.test.tsx | 23 +- .../AccountSelector.test.tsx | 8 +- .../AccountSelectorList.styles.ts | 1 - .../AccountSelectorList.tsx | 69 +- .../AccountSelector.test.tsx.snap | 90 +- .../UI/ApprovalTagUrl/ApprovalTagUrl.test.tsx | 34 - .../UI/ApprovalTagUrl/ApprovalTagUrl.tsx | 6 +- .../ApprovalTagUrl.test.tsx.snap | 69 - .../UI/AssetElement/index.constants.ts | 2 - app/components/UI/AssetElement/index.test.tsx | 33 +- app/components/UI/AssetElement/index.tsx | 32 +- app/components/UI/AssetIcon/index.test.tsx | 5 +- .../UI/AssetOverview/AssetOverview.test.tsx | 2 +- .../UI/AssetOverview/AssetOverview.tsx | 9 +- .../UI/AssetOverview/AssetOverview.types.ts | 2 +- .../UI/AssetOverview/Balance/Balance.tsx | 6 +- .../Balance/__snapshots__/index.test.tsx.snap | 3 - .../UI/AssetOverview/Balance/index.test.tsx | 2 +- .../UI/AssetOverview/Price/Price.tsx | 4 +- .../AssetOverview/PriceChart/PriceChart.tsx | 1 - .../StakingEarnings.styles.tsx | 2 +- .../StakingEarnings/StakingEarnings.test.tsx | 32 + .../StakingEarnings.test.tsx.snap | 8 +- .../StakingEarnings/index.tsx | 81 +- .../TokenDetails/TokenDetails.test.tsx | 2 +- .../TokenDetails/TokenDetails.tsx | 18 +- .../TokenDetailsList/TokenDetailsList.tsx | 3 +- .../__snapshots__/AssetOverview.test.tsx.snap | 1 - .../UI/BottomModal/BottomModal.test.tsx | 2 +- .../UI/BottomModal/BottomModal.tsx | 8 +- .../__snapshots__/BottomModal.test.tsx.snap | 0 .../components => }/UI/BottomModal/index.tsx | 0 app/components/UI/BrowserBottomBar/index.js | 22 +- .../UI/CollectibleContracts/index.test.tsx | 4 +- .../__snapshots__/index.test.tsx.snap | 24 +- app/components/UI/EditGasFee1559/index.js | 279 +- .../__snapshots__/index.test.tsx.snap | 2 - app/components/UI/EditGasFeeLegacy/index.js | 173 +- .../EnableAutomaticSecurityChecksModal.tsx | 19 +- app/components/UI/Fox/{index.tsx => index.js} | 29 +- .../UI/InfoRow/InfoRow.stories.tsx | 12 +- .../UI/InfoRow/InfoRow.test.tsx | 0 app/components/UI/InfoRow/InfoRow.tsx | 30 + .../InfoRow/InfoSection/InfoSection.test.tsx | 0 .../UI/InfoRow/InfoSection/InfoSection.tsx | 18 + .../__snapshots__/InfoSection.test.tsx.snap | 1 - .../UI/InfoRow/InfoSection/index.ts | 0 .../UI/InfoRow/InfoSection/style.ts | 4 +- .../__snapshots__/InfoRow.test.tsx.snap | 24 +- .../components => }/UI/InfoRow/index.ts | 0 app/components/UI/InfoRow/style.ts | 31 + .../LedgerConfirmationModal.test.tsx | 22 +- .../LedgerModals/LedgerConfirmationModal.tsx | 9 +- .../LoginOptionsSwitch/LoginOptionsSwitch.tsx | 7 +- .../UI/ManageNetworks/ManageNetworks.tsx | 2 +- .../__snapshots__/ManageNetworks.test.js.snap | 50 +- app/components/UI/Name/Name.tsx | 14 +- app/components/UI/Name/Name.types.ts | 3 - app/components/UI/Navbar/index.js | 137 +- .../UI/NetworkCell/NetworkCell.styles.ts | 11 - .../UI/NetworkCell/NetworkCell.test.tsx | 68 - app/components/UI/NetworkCell/NetworkCell.tsx | 72 - .../__snapshots__/NetworkCell.test.tsx.snap | 146 - .../UI/NetworkModal/NetworkAdded/index.tsx | 5 +- .../UI/NetworkModal/NetworkDetails/index.tsx | 6 +- .../__snapshots__/index.test.tsx.snap | 48 +- app/components/UI/NetworkModal/index.tsx | 220 +- .../NetworkVerificationInfo.test.tsx.snap | 50 +- .../ResetNotificationsModal.test.tsx.snap | 2 +- .../ResetNotificationsModal/index.tsx | 31 +- app/components/UI/OptinMetrics/index.test.tsx | 2 + app/components/UI/PaymentRequest/index.js | 2 +- .../UI/PaymentRequestSuccess/index.js | 2 +- .../PermissionsSummary.test.tsx | 18 - .../PermissionsSummary/PermissionsSummary.tsx | 136 +- .../PermissionsSummary.types.ts | 7 - .../PermissionsSummary.test.tsx.snap | 567 +- .../UI/Ramp/Views/BuildQuote/BuildQuote.tsx | 71 +- .../__snapshots__/BuildQuote.test.tsx.snap | 3914 +++-- .../__snapshots__/GetStarted.test.tsx.snap | 57 +- .../LoadingNetworksSkeleton.tsx | 32 +- .../NetworkSwitcher/NetworkSwitcher.test.tsx | 2 +- .../Views/NetworkSwitcher/NetworkSwitcher.tsx | 18 +- .../NetworkSwitcher.test.tsx.snap | 2475 ++- .../__snapshots__/OrderDetails.test.tsx.snap | 13482 ++++++++++------ .../__snapshots__/OrdersList.test.tsx.snap | 3524 ++-- .../PaymentMethods.test.tsx.snap | 10170 +++++++----- .../Quotes/__snapshots__/Quotes.test.tsx.snap | 2403 +-- .../UI/Ramp/Views/Regions/Regions.tsx | 31 +- .../__snapshots__/Regions.test.tsx.snap | 1120 +- .../Views/SendTransaction/SendTransaction.tsx | 63 +- .../SendTransaction.test.tsx.snap | 3 - .../Ramp/Views/Settings/ActivationKeyForm.tsx | 1 - .../UI/Ramp/Views/Settings/Settings.tsx | 32 +- .../ActivationKeyForm.test.tsx.snap | 2 +- .../__snapshots__/Settings.test.tsx.snap | 318 +- .../UI/Ramp/components/AmountInput.tsx | 38 +- .../Ramp/components/AssetSelectorButton.tsx | 56 +- app/components/UI/Ramp/components/Box.tsx | 14 +- .../UI/Ramp/components/ListItemColumnEnd.tsx | 25 - .../UI/Ramp/components/OrderDetails.tsx | 288 +- .../OrderListItem/OrderListItem.tsx | 98 +- .../__snapshots__/OrderListItem.test.tsx.snap | 2200 ++- .../UI/Ramp/components/PaymentMethod.tsx | 98 +- .../Ramp/components/PaymentMethodSelector.tsx | 39 +- .../UI/Ramp/components/Quote/Quote.tsx | 240 +- .../UI/Ramp/components/RegionModal.tsx | 65 +- .../SkeletonPaymentMethod.tsx | 47 +- .../SkeletonQuote/SkeletonQuote.tsx | 45 +- .../UI/Ramp/components/TokenSelectModal.tsx | 70 +- .../components/modals/FiatSelectModal.tsx | 33 +- app/components/UI/ReceiveRequest/index.js | 8 +- .../UI/ReceiveRequest/index.test.tsx | 20 +- .../UI/ReusableModal/ReusableModal.types.ts | 8 - app/components/UI/ReusableModal/index.tsx | 18 +- .../SimulationDetails/AssetPill/AssetPill.tsx | 1 - .../UI/SimulationDetails/useBalanceChanges.ts | 5 +- .../StakeInputView.styles.ts | 17 + .../StakeInputView.test.tsx} | 81 +- .../Stake/Views/InputView/StakeInputView.tsx | 264 + .../StakeInputView.test.tsx.snap | 80 +- .../StakeConfirmationView.styles.ts | 23 - .../StakeConfirmationView.test.tsx | 100 - .../StakeConfirmationView.tsx | 60 - .../StakeConfirmationView.types.ts | 13 - .../StakeConfirmationView.test.tsx.snap | 1555 -- .../StakeInputView/StakeInputView.test.tsx | 207 - .../Views/StakeInputView/StakeInputView.tsx | 153 - .../UnstakeConfirmationView.styles.ts | 23 - .../UnstakeConfirmationView.test.tsx | 87 - .../UnstakeConfirmationView.tsx | 61 - .../UnstakeConfirmationView.types.ts | 10 - .../UnstakeConfirmationView.test.tsx.snap | 1516 -- .../Views/UnstakeInputView/UnstakeBanner.tsx | 25 - .../UnstakeInputView.styles.ts | 31 - .../UnstakeInputView/UnstakeInputView.tsx | 110 - .../UnstakeInputView.types.ts | 9 - .../UnstakeInputView.test.tsx.snap | 1600 -- app/components/UI/Stake/__mocks__/mockData.ts | 138 - .../components/EstimatedAnnualRewardsCard.tsx | 26 +- .../UI/Stake/components/InputDisplay.tsx | 93 - .../MaxInputModal/MaxInputModal.styles.ts | 23 - .../MaxInputModal/MaxInputModal.test.tsx | 67 - .../__snapshots__/MaxInputModal.test.tsx.snap | 656 - .../Stake/components/MaxInputModal/index.tsx | 79 - .../UI/Stake/components/QuickAmounts.tsx | 47 +- .../StakeButton/StakeButton.test.tsx | 86 - .../UI/Stake/components/StakeButton/index.tsx | 104 - .../StakingBalance/StakingBalance.test.tsx | 154 +- .../StakingBalance/StakingBalance.tsx | 100 +- .../ClaimBanner/ClaimBanner.test.tsx | 63 - .../ClaimBanner/ClaimBanner.tsx | 62 +- .../__snapshots__/ClaimBanner.test.tsx.snap | 103 - .../StakingButtons/StakingButtons.tsx | 35 +- .../StakingBalance/StakingCta/StakingCta.tsx | 6 +- .../__snapshots__/StakingCta.test.tsx.snap | 2 +- .../StakingBalance.test.tsx.snap | 1241 +- .../components/StakingBalance/mockData.ts | 75 + .../AccountCard/AccountCard.styles.ts | 40 - .../AccountCard/AccountCard.test.tsx | 74 - .../AccountCard/AccountCard.tsx | 95 - .../AccountCard/AccountCard.types.ts | 5 - .../__snapshots__/AccountCard.test.tsx.snap | 748 - .../AccountTag/AccountTag.test.tsx | 31 - .../AccountTag/AccountTag.tsx | 38 - .../AccountTag/AccountTag.types.ts | 5 - .../__snapshots__/AccountTag.test.tsx.snap | 395 - .../ConfirmationFooter.styles.ts | 114 - .../ConfirmationFooter.test.tsx | 55 - .../ConfirmationFooter/ConfirmationFooter.tsx | 20 - .../ConfirmationFooter.types.ts | 6 - .../FooterButtonGroup.styles.ts | 18 - .../FooterButtonGroup.test.tsx | 153 - .../FooterButtonGroup/FooterButtonGroup.tsx | 148 - .../FooterButtonGroup.types.ts | 9 - .../FooterButtonGroup.test.tsx.snap | 367 - .../LegalLinks/LegalLinks.styles.ts | 14 - .../LegalLinks/LegalLinks.test.tsx | 61 - .../LegalLinks/LegalLinks.tsx | 52 - .../__snapshots__/LegalLinks.test.tsx.snap | 187 - .../ConfirmationFooter.test.tsx.snap | 165 - .../ContractTag/ContractTag.test.tsx | 22 - .../ContractTag/ContractTag.tsx | 39 - .../ContractTag/ContractTag.types.ts | 5 - .../__snapshots__/ContractTag.test.tsx.snap | 197 - .../RewardsCard/RewardsCard.styles.ts | 16 - .../RewardsCard/RewardsCard.test.tsx | 98 - .../RewardsCard/RewardsCard.tsx | 73 - .../RewardsCard/RewardsCard.types.ts | 5 - .../__snapshots__/RewardsCard.test.tsx.snap | 1255 -- .../TokenValueStack/TokenValueStack.styles.ts | 23 - .../TokenValueStack/TokenValueStack.test.tsx | 33 - .../TokenValueStack/TokenValueStack.tsx | 54 - .../TokenValueStack/TokenValueStack.types.ts | 7 - .../TokenValueStack.test.tsx.snap | 212 - .../UnstakeTimeCard/UnstakeTimeCard.styles.ts | 12 - .../UnstakeTimeCard/UnstakeTimeCard.test.tsx | 32 - .../UnstakeTimeCard/UnstakeTimeCard.tsx | 39 - .../UnstakeTimeCard.test.tsx.snap | 155 - .../YouReceiveCard/YouReceiveCard.styles.ts | 38 - .../YouReceiveCard/YouReceiveCard.test.tsx | 38 - .../YouReceiveCard/YouReceiveCard.tsx | 70 - .../YouReceiveCard/YouReceiveCard.types.ts | 4 - .../YouReceiveCard.test.tsx.snap | 229 - .../StakingEarnings/StakingEarnings.test.tsx | 77 - .../UI/Stake/hooks/useBalance.test.tsx | 144 - app/components/UI/Stake/hooks/useBalance.ts | 49 +- .../UI/Stake/hooks/useInputHandler.ts | 160 - .../Stake/hooks/usePoolStakedClaim/index.ts | 130 - .../usePoolStakedClaim.test.tsx | 146 - .../usePoolStakedClaim.types.ts | 1 - .../Stake/hooks/usePoolStakedClaim/utils.ts | 65 - .../Stake/hooks/usePoolStakedDeposit/index.ts | 83 - .../usePoolStakedDeposit.test.tsx | 127 - .../Stake/hooks/usePoolStakedUnstake/index.ts | 73 - .../usePoolStakedUnstake.test.tsx | 133 - .../UI/Stake/hooks/usePooledStakes.test.tsx | 217 - .../UI/Stake/hooks/usePooledStakes.ts | 120 - .../UI/Stake/hooks/useStakeContext.ts | 10 - .../UI/Stake/hooks/useStakingChain.test.tsx | 59 - .../UI/Stake/hooks/useStakingChain.ts | 16 - .../Stake/hooks/useStakingEarnings.test.tsx | 101 - .../UI/Stake/hooks/useStakingEarnings.ts | 56 - .../hooks/useStakingEligibility.test.tsx | 128 - .../UI/Stake/hooks/useStakingEligibility.ts | 52 - .../UI/Stake/hooks/useStakingGasFee.test.tsx | 162 - .../UI/Stake/hooks/useStakingGasFee.ts | 94 - .../UI/Stake/hooks/useStakingInput.ts | 128 - .../UI/Stake/hooks/useUnstakingInput.ts | 48 - .../UI/Stake/hooks/useVaultData.test.tsx | 105 - app/components/UI/Stake/hooks/useVaultData.ts | 59 - app/components/UI/Stake/routes/index.tsx | 54 +- .../stakeSdkProvider.test.tsx.snap | 21 - .../UI/Stake/sdk/stakeSdkProvider.test.tsx | 67 - .../UI/Stake/sdk/stakeSdkProvider.tsx | 81 - ...dButtonStyles.ts => styledButtonStyles.js} | 5 +- app/components/UI/Swaps/QuotesView.js | 58 +- .../{InfoModal.tsx => InfoModal.js} | 114 +- .../UI/Swaps/components/TokenIcon.test.js | 4 +- .../components/TokenSelectButton.test.js | 4 +- .../__snapshots__/TokenIcon.test.js.snap | 4 +- .../TokenSelectButton.test.js.snap | 4 +- app/components/UI/Tabs/TabCountIcon/index.js | 5 +- app/components/UI/Tabs/index.js | 15 +- .../PortfolioBalance/index.constants.ts | 2 - .../TokenList/PortfolioBalance/index.test.tsx | 239 - .../TokenList/PortfolioBalance/index.tsx | 183 - .../TokenList/ScamWarningIcon/index.tsx | 48 - .../TokenList/ScamWarningModal/index.tsx | 81 - .../TokenList/TokenListFooter/index.tsx | 125 - .../Tokens/TokenList/TokenListItem/index.tsx | 238 - app/components/UI/Tokens/TokenList/index.tsx | 111 - .../TokenSortBottomSheet.test.tsx | 131 - .../TokenSortBottomSheet.tsx | 104 - .../UI/Tokens/TokensBottomSheet/index.ts | 8 - .../Tokens/__snapshots__/index.test.tsx.snap | 957 +- app/components/UI/Tokens/index.test.tsx | 174 +- app/components/UI/Tokens/index.tsx | 795 +- app/components/UI/Tokens/styles.ts | 46 +- app/components/UI/Tokens/types.ts | 2 +- ...eriveBalanceFromAssetMarketDetails.test.ts | 159 - .../deriveBalanceFromAssetMarketDetails.ts | 71 - app/components/UI/Tokens/util/index.ts | 2 - .../UI/Tokens/util/sortAssets.test.ts | 263 - app/components/UI/Tokens/util/sortAssets.ts | 84 - app/components/UI/Transactions/index.js | 3 +- .../Views/AccountActions/AccountActions.tsx | 62 +- .../Views/AccountConnect/AccountConnect.tsx | 48 +- .../AccountConnectMultiSelector.styles.ts | 3 +- .../AccountConnectMultiSelector.tsx | 86 +- .../AccountConnectMultiSelector.types.ts | 2 - .../AccountConnectSingle.tsx | 7 +- .../AccountPermissions/AccountPermissions.tsx | 165 +- .../AccountPermissionsConnected.tsx | 4 +- .../AccountPermissionsRevoke.tsx | 2 +- .../AccountPermissions.test.tsx.snap | 50 +- .../{index.tsx => index.js} | 27 +- .../Asset/__snapshots__/index.test.js.snap | 1 + .../AssetDetailsActions.test.tsx | 18 +- .../AssetDetailsActions.tsx | 21 +- .../__snapshots__/index.test.tsx.snap | 40 - .../Views/AssetDetails/index.test.tsx | 44 - app/components/Views/AssetDetails/index.tsx | 9 +- app/components/Views/Browser/index.js | 5 +- app/components/Views/BrowserTab/index.js | 53 +- app/components/Views/ChoosePassword/index.js | 4 +- .../Views/EditAccountName/EditAccountName.tsx | 2 - .../EditAccountName.test.tsx.snap | 4 +- .../Views/ImportPrivateKey/index.tsx | 10 +- .../Views/LedgerConnect/Scan.test.tsx | 45 - app/components/Views/LedgerConnect/Scan.tsx | 8 +- app/components/Views/LockScreen/index.js | 18 +- .../Login/__snapshots__/index.test.tsx.snap | 422 +- app/components/Views/Login/index.js | 115 +- app/components/Views/Login/index.test.tsx | 30 +- .../MultiRpcModal/MultiRpcModal.constants.ts | 30 - .../MultiRpcModal/MultiRpcModal.styles.ts | 40 - .../MultiRpcModal/MultiRpcModal.test.tsx | 61 - .../Views/MultiRpcModal/MultiRpcModal.tsx | 146 - .../__snapshots__/MultiRpcModal.test.tsx.snap | 595 - app/components/Views/MultiRpcModal/index.ts | 1 - .../NFTAutoDetectionModal.tsx | 46 +- .../__snapshots__/TestScreen2.test.js.snap | 309 +- .../Views/NavigationUnitTest/index.js | 79 +- .../NetworkSelector/NetworkSelector.styles.ts | 2 +- .../NetworkSelector/NetworkSelector.test.tsx | 304 +- .../Views/NetworkSelector/NetworkSelector.tsx | 508 +- .../RpcSelectionModal.test.tsx | 189 - .../RpcSelectionModal/RpcSelectionModal.tsx | 138 - .../RpcSelectionModal.test.tsx.snap | 379 - .../RpcSelectionModal/index.tsx | 1 - .../NetworkSelector.test.tsx.snap | 2821 ---- .../Badge/__snapshots__/index.test.tsx.snap | 2 +- .../Details/Fields/NetworkFeeField.tsx | 87 +- .../Fields/Skeletons/NetworkFeeField.tsx | 34 - .../NetworkFeeField.test.tsx.snap | 76 +- .../Details/Footers/BlockExplorerFooter.tsx | 2 +- .../Details/__snapshots__/index.test.tsx.snap | 73 - app/components/Views/Onboarding/index.js | 38 +- .../Views/Onboarding/index.test.tsx | 20 - .../__snapshots__/index.test.js.snap} | 84 +- .../__snapshots__/index.test.tsx.snap | 337 - .../DefaultSettings/index.styles.ts | 50 +- .../index.test.js} | 16 +- .../DefaultSettings/index.test.tsx | 76 - .../DefaultSettings/index.tsx | 126 +- .../__snapshots__/index.test.tsx.snap | 1404 -- .../OnboardingAssetsSettings/index.styles.ts | 16 - .../OnboardingAssetsSettings/index.test.tsx | 55 - .../OnboardingAssetsSettings/index.tsx | 33 - .../OnboardingGeneralSettings/index.tsx | 73 - .../__snapshots__/index.test.tsx.snap | 120 - .../OnboardingSecuritySettings/index.test.tsx | 42 - .../OnboardingSecuritySettings/index.tsx | 19 - .../__snapshots__/index.test.js.snap | 1 - .../Views/OnboardingSuccess/index.styles.ts | 1 - .../__snapshots__/index.test.tsx.snap | 90 - .../index.constants.ts | 3 - .../index.styles.ts | 26 - .../index.test.tsx | 120 - .../BatchAccountBalanceSettings/index.tsx | 74 - .../__snapshots__/index.test.tsx.snap | 89 - .../index.constants.ts | 1 - .../DisplayNFTMediaSettings/index.styles.ts | 26 - .../DisplayNFTMediaSettings/index.test.tsx | 74 - .../DisplayNFTMediaSettings/index.tsx | 61 - .../Settings/ExperimentalSettings/index.tsx | 14 +- .../__snapshots__/index.test.tsx.snap | 129 - .../IPFSGatewaySettings/index.constants.ts | 4 - .../IPFSGatewaySettings/index.styles.ts | 42 - .../IPFSGatewaySettings/index.test.tsx | 120 - .../Settings/IPFSGatewaySettings/index.tsx | 138 - .../IPFSGatewaySettings/index.types.ts | 12 - .../__snapshots__/index.test.tsx.snap | 346 - .../index.constants.ts | 5 - .../index.styles.ts | 18 - .../index.test.tsx | 155 - .../IncomingTransactionsSettings/index.tsx | 153 - .../index.types.ts | 13 - .../__snapshots__/index.test.tsx.snap | 108 - .../index.constants.ts | 3 - .../index.styles.ts | 26 - .../index.test.tsx | 90 - .../NetworkDetailsCheckSettings/index.tsx | 63 - .../NetworksSettings/NetworkSettings/index.js | 1271 +- .../NetworkSettings/index.test.tsx | 1374 +- .../__snapshots__/index.test.tsx.snap | 5 +- .../Views/Settings/NetworksSettings/index.js | 77 +- .../AccountsList.test.tsx | 88 - .../NotificationsSettings/AccountsList.tsx | 53 - .../NotificationOptionToggle/index.tsx | 8 +- .../NotificationsSettings.styles.ts | 8 - .../__snapshots__/AccountsList.test.tsx.snap | 520 - .../__snapshots__/index.test.tsx.snap | 2 +- .../NotificationsSettings/index.test.tsx | 150 +- .../Settings/NotificationsSettings/index.tsx | 116 +- .../useToggleNotifications.test.tsx | 125 - .../useToggleNotifications.ts | 70 - ...taMetricsAndDataCollectionSection.test.tsx | 4 + .../SecuritySettings.constants.ts | 10 + .../SecuritySettings.styles.ts | 5 + .../SecuritySettings.test.tsx | 11 + .../SecuritySettings/SecuritySettings.tsx | 526 +- .../SecuritySettings.types.ts | 19 + .../SecuritySettings.test.tsx.snap | 609 +- .../SmartTransactionStatus.tsx | 12 +- .../SmartTranactionsOptInModal.tsx | 20 +- .../KeyringSnapRemovalWarning.constants.ts | 9 - .../KeyringSnapRemovalWarning.styles.ts | 43 - .../KeyringSnapRemovalWarning.tsx | 226 - .../Snaps/KeyringSnapRemovalWarning/index.ts | 3 - .../test/KeyringSnapRemovalWarning.test.tsx | 337 - .../Views/Snaps/SnapSettings/SnapSettings.tsx | 168 +- .../SnapSettings/test/SnapSettings.test.tsx | 419 +- .../KeyringAccountListItem.constants.ts | 4 - .../KeyringAccountListItem.styles.ts | 36 - .../KeyringAccountListItem.tsx | 74 - .../KeyringAccountListItem/index.ts | 3 - .../test/KeyringAccountListItem.test.tsx | 42 - .../Views/TooltipModal/ToolTipModal.styles.ts | 7 +- .../Views/TooltipModal/ToolTipModal.types.ts | 4 +- app/components/Views/TooltipModal/index.tsx | 10 +- .../Wallet/__snapshots__/index.test.tsx.snap | 52 +- app/components/Views/Wallet/index.tsx | 122 +- .../confirmations/Confirm/Confirm.styles.ts | 23 - .../Views/confirmations/Confirm/Confirm.tsx | 18 +- .../__snapshots__/Confirm.test.tsx.snap | 561 +- .../Views/confirmations/Confirm/style.ts | 19 + .../Send/__snapshots__/index.test.tsx.snap | 4 +- .../Views/confirmations/Send/index.test.tsx | 2 +- .../confirmations/SendFlow/Amount/index.js | 18 +- .../SendFlow/Amount/index.test.tsx | 31 +- .../Confirm/__snapshots__/index.test.tsx.snap | 2 +- .../CustomGasModal.test.tsx.snap | 1 - .../confirmations/SendFlow/Confirm/index.js | 64 +- .../SendFlow/Confirm/index.test.tsx | 80 +- .../SendFlow/Confirm/validation.test.ts | 48 +- .../SendFlow/Confirm/validation.ts | 30 +- .../confirmations/SendFlow/SendTo/index.js | 11 +- .../ApproveTransactionHeader.tsx | 9 +- .../ApproveTransactionHeader.test.tsx.snap | 8 +- .../AddNickname/types.ts | 2 +- .../ShowBlockExplorer/index.tsx | 6 +- .../VerifyContractDetails.types.ts | 2 +- .../__snapshots__/index.test.tsx.snap | 2 +- .../ApproveTransactionReview/index.js | 20 +- .../ApproveTransactionReview/index.test.tsx | 142 - .../AccountNetworkInfo.test.tsx | 14 - .../AccountNetworkInfo/AccountNetworkInfo.tsx | 25 - .../AccountNetworkInfoCollapsed.styles.ts | 33 - .../AccountNetworkInfoCollapsed.test.tsx | 14 - .../AccountNetworkInfoCollapsed.tsx | 62 - .../AccountNetworkInfoCollapsed.test.tsx.snap | 161 - .../AccountNetworkInfoCollapsed/index.ts | 1 - .../AccountNetworkInfoExpanded.test.tsx | 14 - .../AccountNetworkInfoExpanded.tsx | 52 - .../AccountNetworkInfoExpanded.test.tsx.snap | 376 - .../AccountNetworkInfoExpanded/index.ts | 1 - .../AccountNetworkInfo.test.tsx.snap | 198 - .../Confirm/AccountNetworkInfo/index.ts | 1 - .../Confirm/Footer/Footer.styles.ts | 30 - .../components/Confirm/Footer/Footer.tsx | 8 +- .../components/Confirm/Footer/style.ts | 27 + .../components/Confirm/Info/Info.test.tsx | 14 - .../components/Confirm/Info/Info.tsx | 26 - .../PersonalSign/Message/Message.styles.ts | 46 - .../PersonalSign/Message/Message.test.tsx | 30 - .../Info/PersonalSign/Message/Message.tsx | 45 - .../__snapshots__/Message.test.tsx.snap | 75 - .../Info/PersonalSign/Message/index.ts | 1 - .../Info/PersonalSign/PersonalSign.test.tsx | 14 - .../Info/PersonalSign/PersonalSign.tsx | 34 - .../Simulation/Simulation.test.tsx | 32 - .../PersonalSign/Simulation/Simulation.tsx | 30 - .../__snapshots__/Simulation.test.tsx.snap | 131 - .../Info/PersonalSign/Simulation/index.ts | 1 - .../__snapshots__/PersonalSign.test.tsx.snap | 337 - .../Confirm/Info/PersonalSign/index.ts | 1 - .../Info/__snapshots__/Info.test.tsx.snap | 337 - .../components/Confirm/Info/index.ts | 1 - .../components/Confirm/Title/Title.styles.ts | 23 - .../components/Confirm/Title/Title.test.tsx | 2 +- .../components/Confirm/Title/Title.tsx | 7 +- .../Title/__snapshots__/Title.test.tsx.snap | 3 +- .../components/Confirm/Title/style.ts | 19 + .../components/EditGasFee1559Update/index.tsx | 1 - .../EditGasFeeLegacyUpdate.test.tsx.snap | 1 - .../EditGasFeeLegacyUpdate/index.tsx | 3 +- .../components/PersonalSign/PersonalSign.tsx | 4 +- .../components/PersonalSign/index.test.tsx | 4 +- .../components/SignatureRequest/Root/Root.tsx | 2 +- .../components/SignatureRequest/index.js | 6 +- .../TransactionReviewInformation/index.js | 2 +- .../components/TransactionReview/index.js | 4 +- .../components/TypedSign/index.js | 4 +- .../components/TypedSign/index.test.tsx | 20 +- .../UI/CopyButton/CopyButton.stories.tsx | 8 - .../UI/CopyButton/CopyButton.test.tsx | 20 - .../components/UI/CopyButton/CopyButton.tsx | 36 - .../__snapshots__/CopyButton.test.tsx.snap | 36 - .../components/UI/CopyButton/index.tsx | 1 - .../ExpandableSection.stories.tsx | 25 - .../ExpandableSection.styles.ts | 47 - .../ExpandableSection.test.tsx | 70 - .../ExpandableSection/ExpandableSection.tsx | 73 - .../ExpandableSection.test.tsx.snap | 46 - .../components/UI/ExpandableSection/index.ts | 1 - .../components/UI/InfoRow/InfoRow.styles.ts | 39 - .../components/UI/InfoRow/InfoRow.tsx | 32 - .../InfoRow/InfoSection/InfoSection.styles.ts | 20 - .../UI/InfoRow/InfoSection/InfoSection.tsx | 17 - .../InfoValue/Address/Address.test.tsx | 30 - .../UI/InfoRow/InfoValue/Address/Address.tsx | 14 - .../__snapshots__/Address.test.tsx.snap | 50 - .../UI/InfoRow/InfoValue/Address/index.ts | 1 - .../InfoValue/DisplayURL/DisplayURL.styles.ts | 39 - .../InfoValue/DisplayURL/DisplayURL.test.tsx | 16 - .../InfoValue/DisplayURL/DisplayURL.tsx | 50 - .../__snapshots__/DisplayURL.test.tsx.snap | 27 - .../UI/InfoRow/InfoValue/DisplayURL/index.ts | 1 - .../InfoValue/Network/Network.styles.ts | 24 - .../InfoValue/Network/Network.test.tsx | 33 - .../UI/InfoRow/InfoValue/Network/Network.tsx | 37 - .../__snapshots__/Network.test.tsx.snap | 59 - .../UI/InfoRow/InfoValue/Network/index.ts | 1 - .../UI/InfoRow/InfoValue/Network/style.ts | 36 - .../components/UI/Tooltip/Tooltip.stories.tsx | 18 - .../components/UI/Tooltip/Tooltip.styles.ts | 45 - .../components/UI/Tooltip/Tooltip.test.tsx | 37 - .../components/UI/Tooltip/Tooltip.tsx | 64 - .../__snapshots__/Tooltip.test.tsx.snap | 67 - .../components/UI/Tooltip/index.ts | 1 - .../components/WatchAssetRequest/index.js | 2 +- .../hooks/useAccountInfo.test.ts | 51 - .../confirmations/hooks/useAccountInfo.ts | 26 - .../hooks/useNetworkInfo.test.ts | 47 - .../confirmations/hooks/useNetworkInfo.ts | 40 - .../hooks/Ledger/useBluetoothDevices.test.ts | 61 - .../hooks/Ledger/useBluetoothDevices.ts | 55 +- .../hooks/Ledger/useLedgerBluetooth.ts | 1 - .../useMinimumVersions.test.ts | 68 - .../MinimumVersions/useMinimumVersions.tsx | 29 +- .../useAddressBalance/useAddressBalance.ts | 2 +- app/components/hooks/useBlockExplorer.test.ts | 30 +- app/components/hooks/useBlockExplorer.ts | 3 +- .../hooks/useCheckMultiRpcModal/index.ts | 1 - .../useCheckMultiRpcModal.test.ts | 93 - .../useCheckMultiRpcModal.ts | 38 - .../useCheckNftAutoDetectionModal/index.ts | 1 - .../useCheckNftAutoDetectionModal.test.ts | 76 - .../useCheckNftAutoDetectionModal.ts | 42 - .../hooks/useMetrics/useMetrics.test.tsx | 16 +- app/components/hooks/useMetrics/useMetrics.ts | 128 +- .../hooks/useMetrics/useMetrics.types.ts | 17 - app/components/hooks/useOnboardingHeader.tsx | 44 - app/components/hooks/useTooltipModal.tsx | 3 +- app/constants/navigation/Routes.ts | 8 - app/constants/network.js | 2 +- app/constants/permissions.ts | 1 - app/core/Analytics/MetaMetrics.events.ts | 22 - app/core/Analytics/MetaMetrics.ts | 112 +- app/core/Analytics/MetaMetrics.types.ts | 84 +- .../Analytics/MetricsEventBuilder.test.ts | 158 - app/core/Analytics/MetricsEventBuilder.ts | 168 - app/core/AppConstants.ts | 9 +- app/core/AppStateEventListener.test.ts | 58 +- app/core/AppStateEventListener.ts | 17 +- app/core/BackgroundBridge/BackgroundBridge.js | 10 +- .../Handlers/switchNetwork.test.ts | 10 +- .../DeeplinkManager/Handlers/switchNetwork.ts | 17 +- .../ParseManager/extractURLParams.test.ts | 4 - .../ParseManager/extractURLParams.ts | 2 - app/core/Encryptor/Encryptor.test.ts | 6 +- app/core/Encryptor/lib.test.ts | 43 +- app/core/Engine.test.js | 214 + app/core/Engine.test.ts | 390 - app/core/Engine.ts | 526 +- app/core/EngineService/EngineService.ts | 16 +- app/core/ErrorHandler/ErrorHandler.test.ts | 32 - app/core/ErrorHandler/ErrorHandler.ts | 25 - app/core/ErrorHandler/index.ts | 1 - app/core/NotificationManager.js | 7 +- app/core/Permissions/constants.ts | 1 - app/core/Permissions/specifications.js | 100 +- app/core/Permissions/specifications.test.js | 8 +- .../RPCMethods/RPCMethodMiddleware.test.ts | 212 +- app/core/RPCMethods/RPCMethodMiddleware.ts | 34 +- .../RPCMethods/lib/ethereum-chain-utils.js | 311 - .../RPCMethods/wallet_addEthereumChain.js | 358 +- .../wallet_addEthereumChain.test.js | 205 +- .../RPCMethods/wallet_switchEthereumChain.js | 116 +- .../wallet_switchEthereumChain.test.js | 188 - app/core/RPCMethods/wallet_watchAsset.test.ts | 24 +- .../handlers/handleConnectionMessage.test.ts | 10 +- .../SnapKeyring/utils/getAccountsBySnapId.ts | 17 - app/core/Snaps/SnapBridge.ts | 6 +- app/core/__mocks__/MockedEngine.ts | 1 - .../createTracingMiddleware/index.test.ts | 39 - app/core/createTracingMiddleware/index.ts | 45 - app/core/processAttribution.test.tsx | 77 +- app/core/processAttribution.tsx | 50 +- app/core/redux/slices/notifications/index.ts | 9 +- app/images/ape-network.png | Bin 42185 -> 0 bytes app/images/ape-token.png | Bin 51726 -> 0 bytes app/images/flare-mainnet.png | Bin 15256 -> 0 bytes app/images/gravity.png | Bin 80926 -> 0 bytes app/images/image-icons.js | 4 - app/images/networks1.png | Bin 5923 -> 0 bytes app/images/songbird.png | Bin 67703 -> 0 bytes app/lib/ens-ipfs/resolver.js | 4 +- app/lib/ppom/ppom-util.test.ts | 52 +- app/lib/ppom/security-alerts-api.ts | 5 +- app/lib/snaps/SnapsExecutionWebView.tsx | 10 +- app/reducers/collectibles/index.js | 8 +- app/reducers/fiatOrders/index.test.ts | 243 +- app/reducers/index.ts | 4 +- app/reducers/security/index.ts | 9 - app/reducers/swaps/index.js | 2 +- .../accountTrackerController.test.ts | 18 +- app/selectors/accountTrackerController.ts | 8 +- ...accountTrackerControllerReRenders.test.tsx | 147 +- app/selectors/accountsController.ts | 11 - app/selectors/currencyRateController.ts | 18 +- app/selectors/networkController.ts | 141 +- app/selectors/nftController.ts | 18 +- app/selectors/preferencesController.ts | 18 - app/selectors/selectedNetworkController.ts | 46 +- app/selectors/tokenRatesController.ts | 4 +- app/selectors/tokensController.ts | 32 +- app/selectors/types.ts | 16 +- app/store/index.ts | 38 +- app/store/migrations/023.test.js | 22 - app/store/migrations/029.ts | 30 +- app/store/migrations/031.ts | 8 +- app/store/migrations/035.test.ts | 6 +- app/store/migrations/043.test.ts | 5 +- app/store/migrations/051.test.ts | 1 - app/store/migrations/054.test.ts | 521 - app/store/migrations/054.ts | 39 - app/store/migrations/055.test.ts | 576 - app/store/migrations/055.ts | 400 - app/store/migrations/056.test.ts | 119 - app/store/migrations/056.ts | 31 - app/store/migrations/index.ts | 6 - app/store/storage-wrapper.js | 69 + app/store/storage-wrapper.test.ts | 95 - app/store/storage-wrapper.ts | 158 - app/util/address/index.test.ts | 62 +- app/util/address/index.ts | 13 +- app/util/browser/webViewFocus.test.ts | 74 + app/util/browser/webViewFocus.ts | 32 + app/util/dappTransactions/index.test.ts | 2 +- app/util/hideKeyFromUrl.test.ts | 70 +- app/util/hideKeyFromUrl.ts | 8 - app/util/ipfs-gateways.json | 5 - .../TrackError/trackErrorAsAnalytics.ts | 2 +- app/util/navigation/useConnectionHandler.tsx | 41 - app/util/networks/customNetworks.test.ts | 8 +- app/util/networks/customNetworks.tsx | 16 +- app/util/networks/handleNetworkSwitch.test.ts | 92 +- app/util/networks/handleNetworkSwitch.ts | 28 +- app/util/networks/index.js | 46 +- app/util/networks/index.test.ts | 139 +- .../networks/isNetworkUiRedesignEnabled.ts | 3 +- .../notifications/androidChannels.test.ts | 10 +- app/util/notifications/hooks/index.test.ts | 198 +- app/util/notifications/hooks/index.ts | 4 +- app/util/notifications/hooks/types.ts | 4 +- .../hooks/useNotifications.test.tsx | 37 - .../notifications/hooks/useNotifications.ts | 16 +- .../hooks/useSwitchNotifications.test.tsx | 134 +- .../hooks/useSwitchNotifications.ts | 104 +- .../hooks/useUpdateAccountSetting.tsx | 12 +- app/util/number/index.js | 2 +- app/util/regex/index.test.ts | 8 +- app/util/regex/index.ts | 4 +- .../sentry/__snapshots__/utils.test.ts.snap | 2 +- app/util/sentry/tags/index.test.ts | 229 - app/util/sentry/tags/index.ts | 30 - app/util/sentry/utils.js | 9 +- app/util/sentry/utils.test.ts | 4 +- app/util/smart-transactions/index.test.ts | 130 - app/util/smart-transactions/index.ts | 52 +- .../smart-transactions/smart-publish-hook.ts | 1 - app/util/test/accountsControllerTestUtils.ts | 31 - app/util/test/initial-background-state.json | 109 +- app/util/test/network-store.js | 5 - app/util/test/network.ts | 77 +- app/util/trace.test.ts | 54 +- app/util/trace.ts | 163 +- ...pers.ts => transaction-reducer-helpers.js} | 29 +- attribution.txt | 1939 ++- babel.config.js | 4 - bitrise.yml | 86 +- docs/readme/testing.md | 2 +- e2e/api-mocking/mock-config/mock-events.js | 57 - .../mock-config/mockUrlCollection.json | 3 - .../mock-responses/gas-api-responses.json | 36 - e2e/api-mocking/mock-server.js | 81 - e2e/api-specs/ConfirmationsRejectionRule.js | 14 +- e2e/fixtures/fixture-builder.js | 236 +- e2e/fixtures/utils.js | 6 - e2e/mockServer/mockServer.js | 40 + e2e/mockServer/mockUrlCollection.json | 7 + e2e/pages/AccountListView.js | 4 +- .../{Transactions => }/ActivitiesView.js | 10 +- e2e/pages/Browser/BrowserView.js | 21 +- e2e/pages/Browser/SigningBottomSheet.js | 35 - e2e/pages/CommonView.js | 13 +- e2e/pages/EditAccountNameView.js | 20 +- .../EnableAutomaticSecurityChecksView.js | 25 + e2e/pages/ImportAccountView.js | 53 + e2e/pages/LoginView.js | 37 +- e2e/pages/Ramps/BuildQuoteView.js | 27 - e2e/pages/Ramps/BuyGetStartedView.js | 15 - e2e/pages/Ramps/SelectPaymentMethodView.js | 22 - e2e/pages/Ramps/SelectRegionView.js | 28 - e2e/pages/Ramps/SellGetStartedView.js | 15 - .../Receive/PaymentRequestQrBottomSheet.js | 19 - e2e/pages/Receive/SendLinkView.js | 33 - e2e/pages/{Receive => }/RequestPaymentView.js | 6 +- e2e/pages/Send/AmountView.js | 9 +- e2e/pages/Send/TransactionConfirmView.js | 6 +- e2e/pages/SendLinkView.js | 34 + e2e/pages/Settings/NetworksView.js | 70 +- .../RevealSecretRecoveryPhrase.js | 18 + e2e/pages/TokenOverview.js | 117 +- .../Transactions/AssetWatchBottomSheet.js | 15 - e2e/pages/importAccount/ImportAccountView.js | 32 - .../importAccount/SuccessImportAccountView.js | 19 - e2e/pages/modals/AssetWatchModal.js | 21 + .../ConnectModal.js} | 22 +- .../ConnectedAccountsModal.js | 2 +- .../ContractApprovalModal.js} | 26 +- .../DetailsModal.js} | 6 +- .../EnableAutomaticSecurityChecksView.js | 19 - e2e/pages/modals/NetworkApprovalModal.js | 3 +- e2e/pages/modals/NetworkListModal.js | 67 +- .../RequestPaymentModal.js | 4 +- e2e/pages/modals/SigningModal.js | 35 + .../{Browser => modals}/SpamFilterModal.js | 2 +- .../TransactionProtectionModal.js | 2 +- e2e/pages/modals/WalletActionsModal.js | 16 - e2e/pages/wallet/WalletView.js | 22 +- e2e/resources/networks.e2e.js | 3 +- .../ActivitiesView.selectors.js | 2 +- .../Browser/BrowserView.selectors.js | 10 +- e2e/selectors/EditGasView.selectors.js | 1 - .../ImportAccountFromPrivateKey.selectors.js | 6 - .../SuccessImportAccount.selectors.js | 4 - .../ImportAccountFromPrivateKey.selectors.js | 6 + e2e/selectors/LoginView.selectors.js | 4 +- .../Modals/AccountActionsModal.selectors.js | 5 +- .../AssetWatcher.selectors.js | 0 .../ConnectAccountModal.selectors.js} | 5 +- .../ConnectedAccountModal.selectors.js | 1 - .../ContractApprovalModal.selectors.js} | 4 +- ...EnableAutomaticSecurityChecks.selectors.js | 4 - .../Modals/NetworkListModal.selectors.js | 4 - .../Modals/RequestPaymentModal.selectors.js | 6 + .../SigningModal.selectors.js} | 2 +- .../SpamFilterModal.selectors.js | 0 .../TransactionDetailsModal.selectors.js | 1 + .../TransactionProtectionModal.selectors.js | 0 e2e/selectors/Ramps/BuildQuote.selectors.js | 8 - e2e/selectors/Ramps/GetStarted.selectors.js | 5 - .../Ramps/SelectPaymentMethod.selectors.js | 5 - e2e/selectors/Ramps/SelectRegion.selectors.js | 6 - .../Receive/RequestPaymentModal.selectors.js | 3 - .../RequestPaymentView.selectors.js | 1 + .../{Receive => }/SendLinkView.selectors.js | 0 .../Settings/AdvancedView.selectors.js | 1 - .../Settings/NetworksView.selectors.js | 6 - .../RevealSeedView.selectors.js | 1 + .../SecurityPrivacyView.selectors.js | 1 + e2e/selectors/TokenOverview.selectors.js | 21 - .../TransactionConfirmView.selectors.js | 1 + .../wallet/ImportTokenView.selectors.js | 1 + e2e/selectors/wallet/WalletView.selectors.js | 5 - e2e/specs/accounts/auto-lock.spec.js | 2 +- .../accounts/change-account-name.spec.js | 4 +- .../accounts/import-wallet-account.spec.js | 12 +- ...imported-account-remove-and-import.spec.js | 9 +- e2e/specs/assets/import-tokens.spec.js | 16 +- e2e/specs/assets/nft-detection-modal.spec.js | 17 +- ...mock.spec.js => advanced-gas-fees.spec.js} | 28 +- .../approve-custom-erc20.spec.js | 16 +- .../approve-default-erc20.spec.js | 18 +- .../increase-allowance-erc20.spec.js | 16 +- .../send-erc20-with-dapp.spec.js | 2 +- e2e/specs/confirmations/send-erc721.spec.js | 2 +- .../set-approve-for-all-erc721.spec.js | 10 +- .../signatures/personal-sign.spec.js | 18 +- .../signatures/typed-sign-v3.spec.js | 16 +- .../signatures/typed-sign-v4.spec.js | 16 +- .../signatures/typed-sign.spec.js | 18 +- .../suggestedGasApi.mock.spec.js | 97 - e2e/specs/networks/add-custom-rpc.spec.js | 101 +- .../networks/add-popular-networks.spec.js | 17 +- .../networks/connect-test-network.spec.js | 4 - e2e/specs/networks/networks-search.spec.js | 41 +- .../onboarding-wizard-opt-in.spec.js | 7 +- .../permission-system-delete-wallet.spec.js | 10 +- ...ssion-system-revoke-single-account.spec.js | 2 +- ...-system-revoking-multiple-accounts.spec.js | 103 +- e2e/specs/quarantine/deeplinks.failing.js | 18 +- ...ystem-removing-imported-account.failing.js | 33 +- .../portfolio-connect-account.failing.js} | 8 +- .../quarantine/swap-token-chart.failing.js | 22 +- .../term-of-use.broken.js} | 9 +- e2e/specs/ramps/offramp.spec.js | 76 - e2e/specs/ramps/onramp.spec.js | 66 - e2e/specs/settings/delete-wallet.spec.js | 2 +- .../swaps/swap-action-regression.spec.js | 20 +- e2e/specs/swaps/swap-action-smoke.spec.js | 18 +- e2e/specs/swaps/token-details.spec.js | 32 +- e2e/specs/wallet/request-token-flow.spec.js | 13 +- e2e/specs/wallet/send-ERC-token.spec.js | 2 - e2e/specs/wallet/start-exploring.spec.js | 4 +- e2e/specs/wallet/suggestedGasApi.mock.spec.js | 89 + e2e/utils/Gestures.js | 2 +- e2e/viewHelper.js | 20 +- index.js | 19 +- .../GoogleService-Info-example.plist | 30 - ios/GoogleServices/GoogleService-Info.plist | 26 - ios/MetaMask.xcodeproj/project.pbxproj | 32 +- .../xcschemes/MetaMask-QA.xcscheme | 20 +- .../xcshareddata/xcschemes/MetaMask.xcscheme | 20 +- ios/MetaMask/AppDelegate.h | 1 - ios/MetaMask/AppDelegate.m | 3 +- ios/Podfile | 2 +- ios/Podfile.lock | 17 +- jest.config.js | 2 +- locales/languages/de.json | 229 +- locales/languages/el.json | 233 +- locales/languages/en.json | 166 +- locales/languages/es.json | 233 +- locales/languages/fr.json | 237 +- locales/languages/hi.json | 237 +- locales/languages/id.json | 227 +- locales/languages/ja.json | 235 +- locales/languages/ko.json | 237 +- locales/languages/pt.json | 235 +- locales/languages/ru.json | 237 +- locales/languages/tl.json | 229 +- locales/languages/tr.json | 237 +- locales/languages/vi.json | 235 +- locales/languages/zh.json | 231 +- package.json | 68 +- .../@metamask+approval-controller+7.0.2.patch | 404 + ...ets-controllers++multiformats+13.3.0.patch | 12 - .../@metamask+assets-controllers+30.0.0.patch | 1160 ++ .../@metamask+assets-controllers+37.0.0.patch | 485 - .../@metamask+controller-utils+11.3.0.patch | 18 - patches/@metamask+ethjs-contract+0.4.1.patch | 13 - patches/@metamask+ethjs-query+0.7.1.patch | 13 - patches/@metamask+nonce-tracker+5.0.0.patch | 30 + ...@metamask+post-message-stream+8.1.0.patch} | 4 +- ...tamask+preferences-controller+11.0.0.patch | 215 + ...tamask+preferences-controller+13.1.0.patch | 229 - ...tamask+transaction-controller+35.0.0.patch | 4109 +++++ ...etox+20.27.5.patch => detox+20.23.1.patch} | 0 patches/ethjs-contract+0.2.3.patch | 13 + patches/ethjs-query+0.3.8.patch | 13 + scripts/build.sh | 57 +- scripts/create-release-draft.sh | 45 - scripts/create-release-pr.sh | 36 +- scripts/docker/Dockerfile | 4 +- scripts/generate-attributions/package.json | 2 +- .../get-next-semver-version.sh | 2 +- shim.js | 2 +- sonar-project.properties | 2 +- .../BrowserObject/AddressBarScreen.js | 6 +- .../BrowserObject/BrowserScreen.js | 1 + .../BrowserObject/MultiTabScreen.js | 16 +- .../EnableSecurityChecksScreen.js | 9 +- wdio/screen-objects/ImportAccountScreen.js | 15 +- wdio/screen-objects/ImportSuccessScreen.js | 9 +- wdio/screen-objects/LoginScreen.js | 25 +- .../Modals/AccountApprovalModal.js | 22 +- .../Modals/ConnectedAccountsModal.js | 9 +- wdio/screen-objects/RequestTokenScreen.js | 15 +- wdio/screen-objects/SendLinkScreen.js | 9 +- wdio/screen-objects/TokenOverviewScreen.js | 18 +- .../BrowserScreen/AddressBar.testIds.js | 6 + .../BrowserScreen/BrowserScreen.testIds.js | 22 + .../testIDs/BrowserScreen/MultiTab.testIds.js | 7 + .../BrowserScreen/OptionMenu.testIds.js | 2 - .../AccountApprovalModal.testIds.js | 5 + .../AccountListComponent.testIds.js | 3 + .../ConnectedAccountsModal.testIds.js | 8 + ...leAutomaticSecurityChecksScreen.testIds.js | 4 + .../Screens/ImportAccountScreen.testIds.js | 5 + .../Screens/ImportSuccessScreen.testIds.js | 2 + .../testIDs/Screens/LoginScreen.testIds.js | 11 + .../testIDs/Screens/RequestToken.testIds.js | 8 + .../RevelSecretRecoveryPhrase.testIds.js | 16 + .../Screens/SecurityPrivacy.testIds.js | 3 + .../Screens/TokenOverviewScreen.testIds.js | 9 + wdio/step-definitions/send-flow.steps.js | 1 + yarn.lock | 1534 +- 965 files changed, 44891 insertions(+), 72650 deletions(-) delete mode 100644 .github/workflows/create-release-draft.yml delete mode 100644 app/component-library/components-temp/Price/AggregatedPercentage/AggregatedPercentage.constants.ts delete mode 100644 app/component-library/components/Pickers/PickerBase/PickerBase.stories.tsx delete mode 100644 app/component-library/components/Texts/SensitiveText/README.md delete mode 100644 app/component-library/components/Texts/SensitiveText/SensitiveText.stories.tsx delete mode 100644 app/component-library/components/Texts/SensitiveText/SensitiveText.test.tsx delete mode 100644 app/component-library/components/Texts/SensitiveText/SensitiveText.tsx delete mode 100644 app/component-library/components/Texts/SensitiveText/SensitiveText.types.ts delete mode 100644 app/component-library/components/Texts/SensitiveText/__snapshots__/SensitiveText.test.tsx.snap delete mode 100644 app/component-library/components/Texts/SensitiveText/index.ts rename app/components/Base/HorizontalSelector/{index.tsx => index.js} (73%) delete mode 100644 app/components/Nav/Main/useConnectionHandler.test.ts delete mode 100644 app/components/UI/ApprovalTagUrl/ApprovalTagUrl.test.tsx delete mode 100644 app/components/UI/ApprovalTagUrl/__snapshots__/ApprovalTagUrl.test.tsx.snap delete mode 100644 app/components/UI/AssetElement/index.constants.ts rename app/components/UI/{Stake/components => AssetOverview}/StakingEarnings/StakingEarnings.styles.tsx (92%) create mode 100644 app/components/UI/AssetOverview/StakingEarnings/StakingEarnings.test.tsx rename app/components/UI/{Stake/components => AssetOverview}/StakingEarnings/__snapshots__/StakingEarnings.test.tsx.snap (98%) rename app/components/UI/{Stake/components => AssetOverview}/StakingEarnings/index.tsx (59%) rename app/components/{Views/confirmations/components => }/UI/BottomModal/BottomModal.test.tsx (83%) rename app/components/{Views/confirmations/components => }/UI/BottomModal/BottomModal.tsx (73%) rename app/components/{Views/confirmations/components => }/UI/BottomModal/__snapshots__/BottomModal.test.tsx.snap (100%) rename app/components/{Views/confirmations/components => }/UI/BottomModal/index.tsx (100%) rename app/components/UI/Fox/{index.tsx => index.js} (98%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoRow.stories.tsx (71%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoRow.test.tsx (100%) create mode 100644 app/components/UI/InfoRow/InfoRow.tsx rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoSection/InfoSection.test.tsx (100%) create mode 100644 app/components/UI/InfoRow/InfoSection/InfoSection.tsx rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoSection/__snapshots__/InfoSection.test.tsx.snap (93%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoSection/index.ts (100%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/InfoSection/style.ts (73%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/__snapshots__/InfoRow.test.tsx.snap (65%) rename app/components/{Views/confirmations/components => }/UI/InfoRow/index.ts (100%) create mode 100644 app/components/UI/InfoRow/style.ts delete mode 100644 app/components/UI/NetworkCell/NetworkCell.styles.ts delete mode 100644 app/components/UI/NetworkCell/NetworkCell.test.tsx delete mode 100644 app/components/UI/NetworkCell/NetworkCell.tsx delete mode 100644 app/components/UI/NetworkCell/__snapshots__/NetworkCell.test.tsx.snap delete mode 100644 app/components/UI/Ramp/components/ListItemColumnEnd.tsx rename app/components/UI/Stake/Views/{StakeInputView => InputView}/StakeInputView.styles.ts (65%) rename app/components/UI/Stake/Views/{UnstakeInputView/UnstakeInputView.test.tsx => InputView/StakeInputView.test.tsx} (67%) create mode 100644 app/components/UI/Stake/Views/InputView/StakeInputView.tsx rename app/components/UI/Stake/Views/{StakeInputView => InputView}/__snapshots__/StakeInputView.test.tsx.snap (96%) delete mode 100644 app/components/UI/Stake/Views/StakeConfirmationView/StakeConfirmationView.styles.ts delete mode 100644 app/components/UI/Stake/Views/StakeConfirmationView/StakeConfirmationView.test.tsx delete mode 100644 app/components/UI/Stake/Views/StakeConfirmationView/StakeConfirmationView.tsx delete mode 100644 app/components/UI/Stake/Views/StakeConfirmationView/StakeConfirmationView.types.ts delete mode 100644 app/components/UI/Stake/Views/StakeConfirmationView/__snapshots__/StakeConfirmationView.test.tsx.snap delete mode 100644 app/components/UI/Stake/Views/StakeInputView/StakeInputView.test.tsx delete mode 100644 app/components/UI/Stake/Views/StakeInputView/StakeInputView.tsx delete mode 100644 app/components/UI/Stake/Views/UnstakeConfirmationView/UnstakeConfirmationView.styles.ts delete mode 100644 app/components/UI/Stake/Views/UnstakeConfirmationView/UnstakeConfirmationView.test.tsx delete mode 100644 app/components/UI/Stake/Views/UnstakeConfirmationView/UnstakeConfirmationView.tsx delete mode 100644 app/components/UI/Stake/Views/UnstakeConfirmationView/UnstakeConfirmationView.types.ts delete mode 100644 app/components/UI/Stake/Views/UnstakeConfirmationView/__snapshots__/UnstakeConfirmationView.test.tsx.snap delete mode 100644 app/components/UI/Stake/Views/UnstakeInputView/UnstakeBanner.tsx delete mode 100644 app/components/UI/Stake/Views/UnstakeInputView/UnstakeInputView.styles.ts delete mode 100644 app/components/UI/Stake/Views/UnstakeInputView/UnstakeInputView.tsx delete mode 100644 app/components/UI/Stake/Views/UnstakeInputView/UnstakeInputView.types.ts delete mode 100644 app/components/UI/Stake/Views/UnstakeInputView/__snapshots__/UnstakeInputView.test.tsx.snap delete mode 100644 app/components/UI/Stake/__mocks__/mockData.ts delete mode 100644 app/components/UI/Stake/components/InputDisplay.tsx delete mode 100644 app/components/UI/Stake/components/MaxInputModal/MaxInputModal.styles.ts delete mode 100644 app/components/UI/Stake/components/MaxInputModal/MaxInputModal.test.tsx delete mode 100644 app/components/UI/Stake/components/MaxInputModal/__snapshots__/MaxInputModal.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/MaxInputModal/index.tsx delete mode 100644 app/components/UI/Stake/components/StakeButton/StakeButton.test.tsx delete mode 100644 app/components/UI/Stake/components/StakeButton/index.tsx delete mode 100644 app/components/UI/Stake/components/StakingBalance/StakingBanners/ClaimBanner/ClaimBanner.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingBalance/StakingBanners/ClaimBanner/__snapshots__/ClaimBanner.test.tsx.snap create mode 100644 app/components/UI/Stake/components/StakingBalance/mockData.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountCard/AccountCard.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountCard/AccountCard.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountCard/AccountCard.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountCard/AccountCard.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountCard/__snapshots__/AccountCard.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountTag/AccountTag.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountTag/AccountTag.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountTag/AccountTag.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/AccountTag/__snapshots__/AccountTag.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/ConfirmationFooter.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/ConfirmationFooter.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/ConfirmationFooter.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/ConfirmationFooter.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/FooterButtonGroup/FooterButtonGroup.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/FooterButtonGroup/FooterButtonGroup.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/FooterButtonGroup/FooterButtonGroup.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/FooterButtonGroup/FooterButtonGroup.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/FooterButtonGroup/__snapshots__/FooterButtonGroup.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/LegalLinks/LegalLinks.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/LegalLinks/LegalLinks.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/LegalLinks/LegalLinks.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/LegalLinks/__snapshots__/LegalLinks.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ConfirmationFooter/__snapshots__/ConfirmationFooter.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ContractTag/ContractTag.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ContractTag/ContractTag.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ContractTag/ContractTag.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/ContractTag/__snapshots__/ContractTag.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/RewardsCard/RewardsCard.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/RewardsCard/RewardsCard.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/RewardsCard/RewardsCard.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/RewardsCard/RewardsCard.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/RewardsCard/__snapshots__/RewardsCard.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/TokenValueStack/TokenValueStack.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/TokenValueStack/TokenValueStack.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/TokenValueStack/TokenValueStack.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/TokenValueStack/TokenValueStack.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/TokenValueStack/__snapshots__/TokenValueStack.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/UnstakeTimeCard/UnstakeTimeCard.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/UnstakeTimeCard/UnstakeTimeCard.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/UnstakeTimeCard/UnstakeTimeCard.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/UnstakeTimeCard/__snapshots__/UnstakeTimeCard.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/YouReceiveCard/YouReceiveCard.styles.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/YouReceiveCard/YouReceiveCard.test.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/YouReceiveCard/YouReceiveCard.tsx delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/YouReceiveCard/YouReceiveCard.types.ts delete mode 100644 app/components/UI/Stake/components/StakingConfirmation/YouReceiveCard/__snapshots__/YouReceiveCard.test.tsx.snap delete mode 100644 app/components/UI/Stake/components/StakingEarnings/StakingEarnings.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useBalance.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useInputHandler.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedClaim/index.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedClaim/usePoolStakedClaim.test.tsx delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedClaim/usePoolStakedClaim.types.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedClaim/utils.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedDeposit/index.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedDeposit/usePoolStakedDeposit.test.tsx delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedUnstake/index.ts delete mode 100644 app/components/UI/Stake/hooks/usePoolStakedUnstake/usePoolStakedUnstake.test.tsx delete mode 100644 app/components/UI/Stake/hooks/usePooledStakes.test.tsx delete mode 100644 app/components/UI/Stake/hooks/usePooledStakes.ts delete mode 100644 app/components/UI/Stake/hooks/useStakeContext.ts delete mode 100644 app/components/UI/Stake/hooks/useStakingChain.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useStakingChain.ts delete mode 100644 app/components/UI/Stake/hooks/useStakingEarnings.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useStakingEarnings.ts delete mode 100644 app/components/UI/Stake/hooks/useStakingEligibility.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useStakingEligibility.ts delete mode 100644 app/components/UI/Stake/hooks/useStakingGasFee.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useStakingGasFee.ts delete mode 100644 app/components/UI/Stake/hooks/useStakingInput.ts delete mode 100644 app/components/UI/Stake/hooks/useUnstakingInput.ts delete mode 100644 app/components/UI/Stake/hooks/useVaultData.test.tsx delete mode 100644 app/components/UI/Stake/hooks/useVaultData.ts delete mode 100644 app/components/UI/Stake/sdk/__snapshots__/stakeSdkProvider.test.tsx.snap delete mode 100644 app/components/UI/Stake/sdk/stakeSdkProvider.test.tsx delete mode 100644 app/components/UI/Stake/sdk/stakeSdkProvider.tsx rename app/components/UI/StyledButton/{styledButtonStyles.ts => styledButtonStyles.js} (97%) rename app/components/UI/Swaps/components/{InfoModal.tsx => InfoModal.js} (56%) delete mode 100644 app/components/UI/Tokens/TokenList/PortfolioBalance/index.constants.ts delete mode 100644 app/components/UI/Tokens/TokenList/PortfolioBalance/index.test.tsx delete mode 100644 app/components/UI/Tokens/TokenList/PortfolioBalance/index.tsx delete mode 100644 app/components/UI/Tokens/TokenList/ScamWarningIcon/index.tsx delete mode 100644 app/components/UI/Tokens/TokenList/ScamWarningModal/index.tsx delete mode 100644 app/components/UI/Tokens/TokenList/TokenListFooter/index.tsx delete mode 100644 app/components/UI/Tokens/TokenList/TokenListItem/index.tsx delete mode 100644 app/components/UI/Tokens/TokenList/index.tsx delete mode 100644 app/components/UI/Tokens/TokensBottomSheet/TokenSortBottomSheet.test.tsx delete mode 100644 app/components/UI/Tokens/TokensBottomSheet/TokenSortBottomSheet.tsx delete mode 100644 app/components/UI/Tokens/TokensBottomSheet/index.ts delete mode 100644 app/components/UI/Tokens/util/deriveBalanceFromAssetMarketDetails.test.ts delete mode 100644 app/components/UI/Tokens/util/deriveBalanceFromAssetMarketDetails.ts delete mode 100644 app/components/UI/Tokens/util/index.ts delete mode 100644 app/components/UI/Tokens/util/sortAssets.test.ts delete mode 100644 app/components/UI/Tokens/util/sortAssets.ts rename app/components/Views/AndroidBackHandler/{index.tsx => index.js} (67%) delete mode 100644 app/components/Views/AssetDetails/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/AssetDetails/index.test.tsx delete mode 100644 app/components/Views/MultiRpcModal/MultiRpcModal.constants.ts delete mode 100644 app/components/Views/MultiRpcModal/MultiRpcModal.styles.ts delete mode 100644 app/components/Views/MultiRpcModal/MultiRpcModal.test.tsx delete mode 100644 app/components/Views/MultiRpcModal/MultiRpcModal.tsx delete mode 100644 app/components/Views/MultiRpcModal/__snapshots__/MultiRpcModal.test.tsx.snap delete mode 100644 app/components/Views/MultiRpcModal/index.ts delete mode 100644 app/components/Views/NetworkSelector/RpcSelectionModal/RpcSelectionModal.test.tsx delete mode 100644 app/components/Views/NetworkSelector/RpcSelectionModal/RpcSelectionModal.tsx delete mode 100644 app/components/Views/NetworkSelector/RpcSelectionModal/__snapshots__/RpcSelectionModal.test.tsx.snap delete mode 100644 app/components/Views/NetworkSelector/RpcSelectionModal/index.tsx delete mode 100644 app/components/Views/Notifications/Details/Fields/Skeletons/NetworkFeeField.tsx rename app/components/Views/OnboardingSuccess/{OnboardingGeneralSettings/__snapshots__/index.test.tsx.snap => DefaultSettings/__snapshots__/index.test.js.snap} (78%) delete mode 100644 app/components/Views/OnboardingSuccess/DefaultSettings/__snapshots__/index.test.tsx.snap rename app/components/Views/OnboardingSuccess/{OnboardingGeneralSettings/index.test.tsx => DefaultSettings/index.test.js} (73%) delete mode 100644 app/components/Views/OnboardingSuccess/DefaultSettings/index.test.tsx delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingAssetsSettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingAssetsSettings/index.styles.ts delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingAssetsSettings/index.test.tsx delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingAssetsSettings/index.tsx delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingGeneralSettings/index.tsx delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingSecuritySettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingSecuritySettings/index.test.tsx delete mode 100644 app/components/Views/OnboardingSuccess/OnboardingSecuritySettings/index.tsx delete mode 100644 app/components/Views/Settings/BatchAccountBalanceSettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/Settings/BatchAccountBalanceSettings/index.constants.ts delete mode 100644 app/components/Views/Settings/BatchAccountBalanceSettings/index.styles.ts delete mode 100644 app/components/Views/Settings/BatchAccountBalanceSettings/index.test.tsx delete mode 100644 app/components/Views/Settings/BatchAccountBalanceSettings/index.tsx delete mode 100644 app/components/Views/Settings/DisplayNFTMediaSettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/Settings/DisplayNFTMediaSettings/index.constants.ts delete mode 100644 app/components/Views/Settings/DisplayNFTMediaSettings/index.styles.ts delete mode 100644 app/components/Views/Settings/DisplayNFTMediaSettings/index.test.tsx delete mode 100644 app/components/Views/Settings/DisplayNFTMediaSettings/index.tsx delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/index.constants.ts delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/index.styles.ts delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/index.test.tsx delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/index.tsx delete mode 100644 app/components/Views/Settings/IPFSGatewaySettings/index.types.ts delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/index.constants.ts delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/index.styles.ts delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/index.test.tsx delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/index.tsx delete mode 100644 app/components/Views/Settings/IncomingTransactionsSettings/index.types.ts delete mode 100644 app/components/Views/Settings/NetworkDetailsCheckSettings/__snapshots__/index.test.tsx.snap delete mode 100644 app/components/Views/Settings/NetworkDetailsCheckSettings/index.constants.ts delete mode 100644 app/components/Views/Settings/NetworkDetailsCheckSettings/index.styles.ts delete mode 100644 app/components/Views/Settings/NetworkDetailsCheckSettings/index.test.tsx delete mode 100644 app/components/Views/Settings/NetworkDetailsCheckSettings/index.tsx delete mode 100644 app/components/Views/Settings/NotificationsSettings/AccountsList.test.tsx delete mode 100644 app/components/Views/Settings/NotificationsSettings/AccountsList.tsx delete mode 100644 app/components/Views/Settings/NotificationsSettings/__snapshots__/AccountsList.test.tsx.snap delete mode 100644 app/components/Views/Settings/NotificationsSettings/useToggleNotifications.test.tsx delete mode 100644 app/components/Views/Settings/NotificationsSettings/useToggleNotifications.ts delete mode 100644 app/components/Views/Snaps/KeyringSnapRemovalWarning/KeyringSnapRemovalWarning.constants.ts delete mode 100644 app/components/Views/Snaps/KeyringSnapRemovalWarning/KeyringSnapRemovalWarning.styles.ts delete mode 100644 app/components/Views/Snaps/KeyringSnapRemovalWarning/KeyringSnapRemovalWarning.tsx delete mode 100644 app/components/Views/Snaps/KeyringSnapRemovalWarning/index.ts delete mode 100644 app/components/Views/Snaps/KeyringSnapRemovalWarning/test/KeyringSnapRemovalWarning.test.tsx delete mode 100644 app/components/Views/Snaps/components/KeyringAccountListItem/KeyringAccountListItem.constants.ts delete mode 100644 app/components/Views/Snaps/components/KeyringAccountListItem/KeyringAccountListItem.styles.ts delete mode 100644 app/components/Views/Snaps/components/KeyringAccountListItem/KeyringAccountListItem.tsx delete mode 100644 app/components/Views/Snaps/components/KeyringAccountListItem/index.ts delete mode 100644 app/components/Views/Snaps/components/KeyringAccountListItem/test/KeyringAccountListItem.test.tsx delete mode 100644 app/components/Views/confirmations/Confirm/Confirm.styles.ts create mode 100644 app/components/Views/confirmations/Confirm/style.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfo.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.styles.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/AccountNetworkInfoCollapsed.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/__snapshots__/AccountNetworkInfoCollapsed.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoCollapsed/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/AccountNetworkInfoExpanded.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/__snapshots__/AccountNetworkInfoExpanded.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/AccountNetworkInfoExpanded/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/__snapshots__/AccountNetworkInfo.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/AccountNetworkInfo/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Footer/Footer.styles.ts create mode 100644 app/components/Views/confirmations/components/Confirm/Footer/style.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/Info.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/Info.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Message/Message.styles.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Message/Message.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Message/Message.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Message/__snapshots__/Message.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Message/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/PersonalSign.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Simulation/Simulation.test.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Simulation/Simulation.tsx delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Simulation/__snapshots__/Simulation.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/Simulation/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/__snapshots__/PersonalSign.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/PersonalSign/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/__snapshots__/Info.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/Confirm/Info/index.ts delete mode 100644 app/components/Views/confirmations/components/Confirm/Title/Title.styles.ts create mode 100644 app/components/Views/confirmations/components/Confirm/Title/style.ts delete mode 100644 app/components/Views/confirmations/components/UI/CopyButton/CopyButton.stories.tsx delete mode 100644 app/components/Views/confirmations/components/UI/CopyButton/CopyButton.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/CopyButton/CopyButton.tsx delete mode 100644 app/components/Views/confirmations/components/UI/CopyButton/__snapshots__/CopyButton.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/CopyButton/index.tsx delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.stories.tsx delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.tsx delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/__snapshots__/ExpandableSection.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/ExpandableSection/index.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoRow.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoRow.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoSection/InfoSection.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/Address.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/Address.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/__snapshots__/Address.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/index.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/DisplayURL/DisplayURL.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/DisplayURL/DisplayURL.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/DisplayURL/DisplayURL.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/DisplayURL/__snapshots__/DisplayURL.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/DisplayURL/index.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/Network.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/Network.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/Network.tsx delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/__snapshots__/Network.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/index.ts delete mode 100644 app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Network/style.ts delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/Tooltip.stories.tsx delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/Tooltip.styles.ts delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/Tooltip.test.tsx delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/Tooltip.tsx delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/__snapshots__/Tooltip.test.tsx.snap delete mode 100644 app/components/Views/confirmations/components/UI/Tooltip/index.ts delete mode 100644 app/components/Views/confirmations/hooks/useAccountInfo.test.ts delete mode 100644 app/components/Views/confirmations/hooks/useAccountInfo.ts delete mode 100644 app/components/Views/confirmations/hooks/useNetworkInfo.test.ts delete mode 100644 app/components/Views/confirmations/hooks/useNetworkInfo.ts delete mode 100644 app/components/hooks/Ledger/useBluetoothDevices.test.ts delete mode 100644 app/components/hooks/MinimumVersions/useMinimumVersions.test.ts delete mode 100644 app/components/hooks/useCheckMultiRpcModal/index.ts delete mode 100644 app/components/hooks/useCheckMultiRpcModal/useCheckMultiRpcModal.test.ts delete mode 100644 app/components/hooks/useCheckMultiRpcModal/useCheckMultiRpcModal.ts delete mode 100644 app/components/hooks/useCheckNftAutoDetectionModal/index.ts delete mode 100644 app/components/hooks/useCheckNftAutoDetectionModal/useCheckNftAutoDetectionModal.test.ts delete mode 100644 app/components/hooks/useCheckNftAutoDetectionModal/useCheckNftAutoDetectionModal.ts delete mode 100644 app/components/hooks/useOnboardingHeader.tsx delete mode 100644 app/core/Analytics/MetricsEventBuilder.test.ts delete mode 100644 app/core/Analytics/MetricsEventBuilder.ts create mode 100644 app/core/Engine.test.js delete mode 100644 app/core/Engine.test.ts delete mode 100644 app/core/ErrorHandler/ErrorHandler.test.ts delete mode 100644 app/core/ErrorHandler/ErrorHandler.ts delete mode 100644 app/core/ErrorHandler/index.ts delete mode 100644 app/core/RPCMethods/lib/ethereum-chain-utils.js delete mode 100644 app/core/SnapKeyring/utils/getAccountsBySnapId.ts delete mode 100644 app/core/createTracingMiddleware/index.test.ts delete mode 100644 app/core/createTracingMiddleware/index.ts delete mode 100644 app/images/ape-network.png delete mode 100644 app/images/ape-token.png delete mode 100644 app/images/flare-mainnet.png delete mode 100644 app/images/gravity.png delete mode 100644 app/images/networks1.png delete mode 100644 app/images/songbird.png delete mode 100644 app/store/migrations/054.test.ts delete mode 100644 app/store/migrations/054.ts delete mode 100644 app/store/migrations/055.test.ts delete mode 100644 app/store/migrations/055.ts delete mode 100644 app/store/migrations/056.test.ts delete mode 100644 app/store/migrations/056.ts create mode 100644 app/store/storage-wrapper.js delete mode 100644 app/store/storage-wrapper.test.ts delete mode 100644 app/store/storage-wrapper.ts create mode 100644 app/util/browser/webViewFocus.test.ts create mode 100644 app/util/browser/webViewFocus.ts delete mode 100644 app/util/navigation/useConnectionHandler.tsx delete mode 100644 app/util/sentry/tags/index.test.ts delete mode 100644 app/util/sentry/tags/index.ts rename app/util/{transaction-reducer-helpers.ts => transaction-reducer-helpers.js} (64%) delete mode 100644 e2e/api-mocking/mock-config/mock-events.js delete mode 100644 e2e/api-mocking/mock-config/mockUrlCollection.json delete mode 100644 e2e/api-mocking/mock-responses/gas-api-responses.json delete mode 100644 e2e/api-mocking/mock-server.js create mode 100644 e2e/mockServer/mockServer.js create mode 100644 e2e/mockServer/mockUrlCollection.json rename e2e/pages/{Transactions => }/ActivitiesView.js (73%) delete mode 100644 e2e/pages/Browser/SigningBottomSheet.js create mode 100644 e2e/pages/EnableAutomaticSecurityChecksView.js create mode 100644 e2e/pages/ImportAccountView.js delete mode 100644 e2e/pages/Ramps/BuildQuoteView.js delete mode 100644 e2e/pages/Ramps/BuyGetStartedView.js delete mode 100644 e2e/pages/Ramps/SelectPaymentMethodView.js delete mode 100644 e2e/pages/Ramps/SelectRegionView.js delete mode 100644 e2e/pages/Ramps/SellGetStartedView.js delete mode 100644 e2e/pages/Receive/PaymentRequestQrBottomSheet.js delete mode 100644 e2e/pages/Receive/SendLinkView.js rename e2e/pages/{Receive => }/RequestPaymentView.js (86%) create mode 100644 e2e/pages/SendLinkView.js delete mode 100644 e2e/pages/Transactions/AssetWatchBottomSheet.js delete mode 100644 e2e/pages/importAccount/ImportAccountView.js delete mode 100644 e2e/pages/importAccount/SuccessImportAccountView.js create mode 100644 e2e/pages/modals/AssetWatchModal.js rename e2e/pages/{Browser/ConnectBottomSheet.js => modals/ConnectModal.js} (68%) rename e2e/pages/{Browser => modals}/ConnectedAccountsModal.js (95%) rename e2e/pages/{Browser/ContractApprovalBottomSheet.js => modals/ContractApprovalModal.js} (60%) rename e2e/pages/{Transactions/TransactionDetailsModal.js => modals/DetailsModal.js} (87%) delete mode 100644 e2e/pages/modals/EnableAutomaticSecurityChecksView.js rename e2e/pages/{Receive => modals}/RequestPaymentModal.js (84%) create mode 100644 e2e/pages/modals/SigningModal.js rename e2e/pages/{Browser => modals}/SpamFilterModal.js (82%) rename e2e/pages/{Transactions => modals}/TransactionProtectionModal.js (90%) rename e2e/selectors/{Transactions => }/ActivitiesView.selectors.js (90%) delete mode 100644 e2e/selectors/ImportAccount/ImportAccountFromPrivateKey.selectors.js delete mode 100644 e2e/selectors/ImportAccount/SuccessImportAccount.selectors.js create mode 100644 e2e/selectors/ImportAccountFromPrivateKey.selectors.js rename e2e/selectors/{Transactions => Modals}/AssetWatcher.selectors.js (100%) rename e2e/selectors/{Browser/ConnectAccountBottomSheet.selectors.js => Modals/ConnectAccountModal.selectors.js} (74%) rename e2e/selectors/{Browser => Modals}/ConnectedAccountModal.selectors.js (91%) rename e2e/selectors/{Browser/ContractApprovalBottomSheet.selectors.js => Modals/ContractApprovalModal.selectors.js} (79%) delete mode 100644 e2e/selectors/Modals/EnableAutomaticSecurityChecks.selectors.js create mode 100644 e2e/selectors/Modals/RequestPaymentModal.selectors.js rename e2e/selectors/{Browser/SigningBottomSheet.selectors.js => Modals/SigningModal.selectors.js} (80%) rename e2e/selectors/{Browser => Modals}/SpamFilterModal.selectors.js (100%) rename e2e/selectors/{Transactions => Modals}/TransactionDetailsModal.selectors.js (87%) rename e2e/selectors/{Transactions => Modals}/TransactionProtectionModal.selectors.js (100%) delete mode 100644 e2e/selectors/Ramps/BuildQuote.selectors.js delete mode 100644 e2e/selectors/Ramps/GetStarted.selectors.js delete mode 100644 e2e/selectors/Ramps/SelectPaymentMethod.selectors.js delete mode 100644 e2e/selectors/Ramps/SelectRegion.selectors.js delete mode 100644 e2e/selectors/Receive/RequestPaymentModal.selectors.js rename e2e/selectors/{Receive => }/RequestPaymentView.selectors.js (84%) rename e2e/selectors/{Receive => }/SendLinkView.selectors.js (100%) delete mode 100644 e2e/selectors/TokenOverview.selectors.js rename e2e/specs/confirmations/{advanced-gas-fees.mock.spec.js => advanced-gas-fees.spec.js} (82%) delete mode 100644 e2e/specs/confirmations/suggestedGasApi.mock.spec.js rename e2e/specs/{wallet/portfolio-connect-account.spec.js => quarantine/portfolio-connect-account.failing.js} (91%) rename e2e/specs/{onboarding/term-of-use.spec.js => quarantine/term-of-use.broken.js} (92%) delete mode 100644 e2e/specs/ramps/offramp.spec.js delete mode 100644 e2e/specs/ramps/onramp.spec.js create mode 100644 e2e/specs/wallet/suggestedGasApi.mock.spec.js delete mode 100644 ios/GoogleServices/GoogleService-Info-example.plist delete mode 100644 ios/GoogleServices/GoogleService-Info.plist create mode 100644 patches/@metamask+approval-controller+7.0.2.patch delete mode 100644 patches/@metamask+assets-controllers++multiformats+13.3.0.patch create mode 100644 patches/@metamask+assets-controllers+30.0.0.patch delete mode 100644 patches/@metamask+assets-controllers+37.0.0.patch delete mode 100644 patches/@metamask+controller-utils+11.3.0.patch delete mode 100644 patches/@metamask+ethjs-contract+0.4.1.patch delete mode 100644 patches/@metamask+ethjs-query+0.7.1.patch create mode 100644 patches/@metamask+nonce-tracker+5.0.0.patch rename patches/{@metamask+post-message-stream+8.1.1.patch => @metamask+post-message-stream+8.1.0.patch} (95%) create mode 100644 patches/@metamask+preferences-controller+11.0.0.patch delete mode 100644 patches/@metamask+preferences-controller+13.1.0.patch create mode 100644 patches/@metamask+transaction-controller+35.0.0.patch rename patches/{detox+20.27.5.patch => detox+20.23.1.patch} (100%) create mode 100644 patches/ethjs-contract+0.2.3.patch create mode 100644 patches/ethjs-query+0.3.8.patch delete mode 100755 scripts/create-release-draft.sh rename {.github/scripts => scripts}/get-next-semver-version.sh (93%) create mode 100644 wdio/screen-objects/testIDs/BrowserScreen/BrowserScreen.testIds.js create mode 100644 wdio/screen-objects/testIDs/BrowserScreen/MultiTab.testIds.js create mode 100644 wdio/screen-objects/testIDs/Components/AccountApprovalModal.testIds.js create mode 100644 wdio/screen-objects/testIDs/Components/AccountListComponent.testIds.js create mode 100644 wdio/screen-objects/testIDs/Components/ConnectedAccountsModal.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/EnableAutomaticSecurityChecksScreen.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/ImportAccountScreen.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/ImportSuccessScreen.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/LoginScreen.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/RequestToken.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/RevelSecretRecoveryPhrase.testIds.js create mode 100644 wdio/screen-objects/testIDs/Screens/TokenOverviewScreen.testIds.js diff --git a/.android.env.example b/.android.env.example index 5c769312cca5..93b4a8c334e2 100644 --- a/.android.env.example +++ b/.android.env.example @@ -9,7 +9,7 @@ export FCM_CONFIG_PROJECT_ID= export FCM_CONFIG_STORAGE_BUCKET= export FCM_CONFIG_MESSAGING_SENDER_ID= export FCM_CONFIG_APP_ID= -export GOOGLE_SERVICES_B64_ANDROID= +export GOOGLE_SERVICES_B64= #Notifications Feature Announcements export FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN= export FEATURES_ANNOUNCEMENTS_SPACE_ID= diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 36e2bc04bb1b..e8fe7a446ec7 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -6,7 +6,6 @@ ignores: - '@react-native-community/slider' - 'patch-package' - '@lavamoat/allow-scripts' - - 'babel-plugin-inline-import' # This is used on the patch for TokenRatesController of Assets controllers, for we to be able to use the last version of it - cockatiel @@ -49,17 +48,22 @@ ignores: - 'rn-nodeify' ## Unused devDependencies to investigate + - '@ethersproject/abi' - '@metamask/swappable-obj-proxy' + - '@react-native-picker/picker' + - '@rnhooks/keyboard' - '@segment/sovran-react-native' - '@tradle/react-native-http' - 'asyncstorage-down' - 'buffer' - 'd3-shape' + - 'dnode' - 'eciesjs' - 'eth-block-tracker' - 'eth-json-rpc-infura' - 'events' - 'https-browserify' + - 'obs-store' - 'path' - 'pbkdf2' - 'pify' @@ -68,9 +72,11 @@ ignores: - 'react-native-aes-crypto' - 'react-native-aes-crypto-forked' - 'react-native-crypto' + - 'react-native-flash-message' - 'react-native-level-fs' - 'react-native-os' - 'react-native-randombytes' + - 'react-native-redash' - 'react-native-swipe-gestures' - 'react-native-tcp' - 'socket.io-client' diff --git a/.detoxrc.js b/.detoxrc.js index 46f0b4441e10..d637d3c937c0 100644 --- a/.detoxrc.js +++ b/.detoxrc.js @@ -1,7 +1,7 @@ /** @type {Detox.DetoxConfig} */ module.exports = { artifacts: { - rootDir: "./artifacts", + rootDir: "./artifacts/screenshots", plugins: { screenshot: { shouldTakeAutomaticSnapshots: true, @@ -9,15 +9,10 @@ module.exports = { takeWhen: { testStart: false, testDone: false, - }, - }, - video: { - enabled: true, // Enable video recording - keepOnlyFailedTestsArtifacts: true, // Keep only failed tests' videos + } }, }, }, - testRunner: { args: { $0: 'jest', @@ -31,7 +26,7 @@ module.exports = { configurations: { 'ios.sim.apiSpecs': { device: 'ios.simulator', - app: process.env.CI ? 'ios.qa' :'ios.debug', + app: 'ios.debug', testRunner: { args: { "$0": "node e2e/api-specs/run-api-spec-tests.js", @@ -46,9 +41,10 @@ module.exports = { device: 'ios.simulator', app: 'ios.release', }, - 'ios.sim.qa': { - device: 'ios.simulator', - app: 'ios.qa', + // because e2e run on debug mode in bitrise + 'android.emu.bitrise.debug': { + device: 'android.bitrise.emulator', + app: 'android.bitrise.debug', }, 'android.emu.debug': { @@ -90,21 +86,32 @@ module.exports = { binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/MetaMask.app', build: 'yarn start:ios:e2e', }, - 'ios.qa': { + 'ios.release': { type: 'ios.app', binaryPath: - 'ios/build/Build/Products/Release-iphonesimulator/MetaMask-QA.app', - build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:ios:qa", + 'ios/build/Build/Products/Release-iphonesimulator/MetaMask.app', + build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:release:e2e", + }, + 'android.bitrise.debug': { + type: 'android.apk', + binaryPath: 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk', + build: 'yarn start:android:e2e', }, 'android.debug': { type: 'android.apk', binaryPath: 'android/app/build/outputs/apk/prod/debug/app-prod-debug.apk', build: 'yarn start:android:e2e', }, + 'android.release': { + type: 'android.apk', + binaryPath: + 'android/app/build/outputs/apk/prod/release/app-prod-release.apk', + build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:release:e2e", + }, 'android.qa': { type: 'android.apk', binaryPath: 'android/app/build/outputs/apk/qa/release/app-qa-release.apk', - build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:android:qa", + build: "METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='qa' yarn build:android:qa:e2e", }, }, }; diff --git a/.eslintrc.js b/.eslintrc.js index edbe2143bb07..fc724dd4a95d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -51,12 +51,6 @@ module.exports = { rules: { // under discussion 'no-unused-vars': 'off', - 'react/no-unstable-nested-components': [ - 'warn', - { - allowAsProps: true, - }, - ], }, }, { diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 594f7f4bf175..9de39ff6af2a 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -2,5 +2,3 @@ 57afe4ca921d85a51a923470239ca977fccbd1ae # Standardize prettier configuration https://github.com/MetaMask/metamask-mobile/pull/4182 bdb7f37c90e4fc923881a07fca38d4e77c73a579 -# Fix mixed tabs and spaces https://github.com/MetaMask/metamask-mobile/pull/1379 -9f9a1121c6899e06d4aeef29017bb479df142adb diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4931485e00b5..727f5b7c4d0f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,15 +4,12 @@ * @MetaMask/mobile-devs # Design System Team -app/component-library/ @MetaMask/design-system-engineers +app/component-library/ @MetaMask/design-system-engineers @MetaMask/mobile-platform # Platform Team patches/ @MetaMask/mobile-platform app/core/Engine.ts @MetaMask/mobile-platform app/core/Engine.test.js @MetaMask/mobile-platform -app/core/Analytics/ @MetaMask/mobile-platform -app/util/metrics/ @MetaMask/mobile-platform -app/components/hooks/useMetrics/ @MetaMask/mobile-platform # Supply Chain Team bitrise.yml @MetaMask/supply-chain @MetaMask/mobile-platform @@ -97,25 +94,10 @@ app/components/Views/NftDetails @MetaMask/metamask-assets app/reducers/collectibles @MetaMask/metamask-assets # UX Team -app/components/Views/AccountActions @MetaMask/wallet-ux -app/components/Views/AccountSelector @MetaMask/wallet-ux -app/components/Views/AddressQRCode @MetaMask/wallet-ux -app/components/Views/EditAccountName @MetaMask/wallet-ux -app/components/Views/LockScreen @MetaMask/wallet-ux -app/components/Views/Login @MetaMask/wallet-ux -app/components/Views/NetworkConnect @MetaMask/wallet-ux -app/components/Views/NetworkSelector @MetaMask/wallet-ux -app/components/Views/Onboarding @MetaMask/wallet-ux -app/components/Views/OnboardingCarousel @MetaMask/wallet-ux -app/components/Views/OnboardingSuccess @MetaMask/wallet-ux -app/components/Views/QRAccountDisplay @MetaMask/wallet-ux -app/components/Views/QRScanner @MetaMask/wallet-ux -app/components/Views/Settings @MetaMask/wallet-ux -app/components/Views/TermsAndConditions @MetaMask/wallet-ux - -app/reducers/experimentalSettings @MetaMask/wallet-ux -app/reducers/modals @MetaMask/wallet-ux -app/reducers/navigation @MetaMask/wallet-ux -app/reducers/onboarding @MetaMask/wallet-ux -app/reducers/privacy @MetaMask/wallet-ux -app/reducers/settings @MetaMask/wallet-ux +app/components @MetaMask/wallet-ux +app/reducers/experimentalSettings @MetaMask/wallet-ux +app/reducers/modals @MetaMask/wallet-ux +app/reducers/navigation @MetaMask/wallet-ux +app/reducers/onboarding @MetaMask/wallet-ux +app/reducers/privacy @MetaMask/wallet-ux +app/reducers/settings @MetaMask/wallet-ux diff --git a/.github/workflows/add-release-label.yml b/.github/workflows/add-release-label.yml index 80941c645364..a5a4daa71037 100644 --- a/.github/workflows/add-release-label.yml +++ b/.github/workflows/add-release-label.yml @@ -30,7 +30,7 @@ jobs: id: get-next-semver-version env: FORCE_NEXT_SEMVER_VERSION: ${{ vars.FORCE_NEXT_SEMVER_VERSION }} - run: ./get-next-semver-version.sh "$FORCE_NEXT_SEMVER_VERSION" + run: ./scripts/get-next-semver-version.sh "$FORCE_NEXT_SEMVER_VERSION" working-directory: '.github/scripts' - name: Add release label to PR and linked issues diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75b4cf336b97..5864ba001ec0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,18 @@ jobs: bundler-cache: true env: BUNDLE_GEMFILE: ios/Gemfile + - name: Determine whether the current PR is a draft + id: set-is-draft + if: github.event_name == 'pull_request' && github.event.pull_request.number + run: echo "IS_DRAFT=$(gh pr view --json isDraft --jq '.isDraft' "${PR_NUMBER}")" >> "$GITHUB_OUTPUT" + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup registry config for using package previews on draft PRs + if: github.event_name == 'pull_request' && steps.set-is-draft.outputs.IS_DRAFT == 'true' + run: printf '%s\n\n%s' '@metamask:registry=https://npm.pkg.github.com' "//npm.pkg.github.com/:_authToken=${PACKAGE_READ_TOKEN}" > .npmrc + env: + PACKAGE_READ_TOKEN: ${{ secrets.PACKAGE_READ_TOKEN }} - run: yarn setup - name: Require clean working directory shell: bash @@ -167,14 +179,14 @@ jobs: with: name: ios-bundle path: ios/main.jsbundle - + ship-js-bundle-size-check: runs-on: ubuntu-latest needs: [js-bundle-size-check] if: ${{ github.ref == 'refs/heads/main' }} steps: - uses: actions/checkout@v4 - + - name: Download iOS bundle uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/create-release-draft.yml b/.github/workflows/create-release-draft.yml deleted file mode 100644 index 9069da82b4e2..000000000000 --- a/.github/workflows/create-release-draft.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: create-release-draft - -on: - push: - tags: - - 'v*' - -permissions: - contents: write - pull-requests: read - -jobs: - draft_release: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: ${{ github.ref }} # Explicitly specifies the tag ref - - - - name: Setup GitHub CLI - run: | - sudo apt update - sudo apt install gh - echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - - - name: Create Draft Release - run: ./scripts/create-release-draft.sh ${{ github.ref_name }} ${{ github.workspace }} \ No newline at end of file diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 6065f84b868d..58c8c4152d26 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -43,10 +43,14 @@ jobs: cache: yarn - name: Install dependencies run: yarn --immutable - - name: Create Release & Changelog PR - id: create-release-changelog-pr + - name: Set Versions + id: set-versions + shell: bash + run: SEMVER_VERSION=${{ github.event.inputs.semver-version }} VERSION_NUMBER=${{ github.event.inputs.version-number }} yarn set-version + - name: Create Release PR + id: create-release-pr shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} ${{ github.event.inputs.version-number }} \ No newline at end of file + ./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index c98f331e0da2..18fa57f9d473 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,6 @@ android/app/_build* # if we ever want to add google services android/app/google-services.json -ios/GoogleService-Info.plist # node.js node_modules/ @@ -125,6 +124,3 @@ app/util/termsOfUse/termsOfUseContent.ts docs/assets/termsOfUse.html /app/images/branding - -# build metadata -android/app/src/main/assets/modules.json diff --git a/.ios.env.example b/.ios.env.example index cc449b8b6e10..05aadc9b3597 100644 --- a/.ios.env.example +++ b/.ios.env.example @@ -8,7 +8,7 @@ FCM_CONFIG_PROJECT_ID= FCM_CONFIG_STORAGE_BUCKET= FCM_CONFIG_MESSAGING_SENDER_ID= FCM_CONFIG_APP_ID= -GOOGLE_SERVICES_B64_IOS= +GOOGLE_SERVICES_B64= #Notifications Feature Announcements FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN= FEATURES_ANNOUNCEMENTS_SPACE_ID= diff --git a/.iyarc b/.iyarc index e69de29bb2d1..7fb6e40287c9 100644 --- a/.iyarc +++ b/.iyarc @@ -0,0 +1,7 @@ +# ReDoS vulnerability, no impact to this application, and fix not backported yet to the versions we use + +GHSA-c2qf-rxjj-qqgw + +# Sentry SDK Prototype Pollution gadget in JavaScript SDKs + +GHSA-593m-55hh-j8gv diff --git a/.js.env.example b/.js.env.example index 6c0d0e327b04..68e8316f034e 100644 --- a/.js.env.example +++ b/.js.env.example @@ -68,10 +68,10 @@ export SEGMENT_FLUSH_INTERVAL="1" export SEGMENT_FLUSH_EVENT_LIMIT="1" # URL of security alerts API used to validate dApp requests. -export SECURITY_ALERTS_API_URL="https://security-alerts.api.cx.metamask.io" +export SECURITY_ALERTS_API_URL="http://localhost:3000" # Temporary mechanism to enable security alerts API prior to release. -export MM_SECURITY_ALERTS_API_ENABLED="true" +export SECURITY_ALERTS_API_ENABLED="true" # Firebase export FCM_CONFIG_API_KEY="" export FCM_CONFIG_AUTH_DOMAIN="" @@ -79,8 +79,7 @@ export FCM_CONFIG_PROJECT_ID="" export FCM_CONFIG_STORAGE_BUCKET="" export FCM_CONFIG_MESSAGING_SENDER_ID="" export FCM_CONFIG_APP_ID="" -export GOOGLE_SERVICES_B64_ANDROID="" -export GOOGLE_SERVICES_B64_IOS="" +export GOOGLE_SERVICES_B64="" #Notifications Feature Announcements export FEATURES_ANNOUNCEMENTS_ACCESS_TOKEN= export FEATURES_ANNOUNCEMENTS_SPACE_ID= @@ -91,10 +90,7 @@ export MM_ENABLE_SETTINGS_PAGE_DEV_OPTIONS="true" # The endpoint used to submit errors and tracing data to Sentry for dev environment. # export MM_SENTRY_DSN_DEV= -# Per dapp selected network (Amon Hen) feature flag -export MM_PER_DAPP_SELECTED_NETWORK="" - -export MM_CHAIN_PERMISSIONS="" - +# Multichain Feature flag +export MULTICHAIN_V1="" #Multichain feature flag specific to UI changes export MM_MULTICHAIN_V1_ENABLED="" diff --git a/.nvmrc b/.nvmrc index 3516580bbbc0..87834047a6fa 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.17.0 +20.12.2 diff --git a/.storybook/storybook.requires.js b/.storybook/storybook.requires.js index c08c085d9a97..31f1669fd928 100644 --- a/.storybook/storybook.requires.js +++ b/.storybook/storybook.requires.js @@ -123,10 +123,7 @@ const getStories = () => { "./app/component-library/base-components/TagBase/TagBase.stories.tsx": require("../app/component-library/base-components/TagBase/TagBase.stories.tsx"), "./app/component-library/components-temp/TagColored/TagColored.stories.tsx": require("../app/component-library/components-temp/TagColored/TagColored.stories.tsx"), "./app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx": require("../app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx"), - "./app/components/Views/confirmations/components/UI/InfoRow/InfoRow.stories.tsx": require("../app/components/Views/confirmations/components/UI/InfoRow/InfoRow.stories.tsx"), - "./app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.stories.tsx": require("../app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.stories.tsx"), - "./app/components/Views/confirmations/components/UI/Tooltip/Tooltip.stories.tsx": require("../app/components/Views/confirmations/components/UI/Tooltip/Tooltip.stories.tsx"), - "./app/component-library/components/Texts/SensitiveText/SensitiveText.stories.tsx": require("../app/component-library/components/Texts/SensitiveText/SensitiveText.stories.tsx"), + "./app/components/UI/InfoRow/InfoRow.stories.tsx": require("../app/components/UI/InfoRow/InfoRow.stories.tsx"), }; }; diff --git a/.vscode/settings.json b/.vscode/settings.json index c74344a36370..5eb140d7b1fd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,5 @@ "cucumberautocomplete.steps": ["wdio/step-definitions/**/*.js"], "cucumberautocomplete.syncfeatures": "wdio/to/features/*.feature", "cucumberautocomplete.strictGherkinCompletion": true, - "typescript.tsdk": "node_modules/typescript/lib", - "javascript.preferences.importModuleSpecifier": "relative", - "typescript.preferences.importModuleSpecifier": "relative" + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8db93d47c3ad..e724d84ec235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,20 @@ ## Current Main Branch -## 7.33.0 - Oct 17, 2024 +## 7.33.1 - Oct 29, 2024 +### Fixed +- [#12073](https://github.com/MetaMask/metamask-mobile/pull/12073): feat: Simulation re-trigger (#12073) + +## 7.33.0 - Oct 3, 2024 ### Added - [#11507](https://github.com/MetaMask/metamask-mobile/pull/11507): feat: 10550 Re-introduce test for measuring cold app start + JS bundle load time (#11507) +- [#11347](https://github.com/MetaMask/metamask-mobile/pull/11347): "chore: revert ""feat: react native fast crypto for notifications"" (#11347)" - [#11318](https://github.com/MetaMask/metamask-mobile/pull/11318): feat: app event manager and attribution id parameters (#11318) - [#11445](https://github.com/MetaMask/metamask-mobile/pull/11445): feat: add the abilty to hide the disconnect all button as well as showing and hiding the accounts row when necessary (#11445) - [#11386](https://github.com/MetaMask/metamask-mobile/pull/11386): feat(3299): add tracking to network switching and confirmation (#11386) +- [#11379](https://github.com/MetaMask/metamask-mobile/pull/11379): refactor: rename the feature flag since it had a typo (#11379) - [#11239](https://github.com/MetaMask/metamask-mobile/pull/11239): feat(2739): permission summary view gets the ability to disconnect all (#11239) +- [#11382](https://github.com/MetaMask/metamask-mobile/pull/11382): chore(runway): cherry-pick feat: app event manager and attribution id parameters (#11382) - [#11497](https://github.com/MetaMask/metamask-mobile/pull/11497): feat: simple key-> value component for text value type (#11497) - [#11478](https://github.com/MetaMask/metamask-mobile/pull/11478): feat: adding title to confirmation page (#11478) - [#11477](https://github.com/MetaMask/metamask-mobile/pull/11477): feat: adding footer section to confirmation page (#11477) @@ -20,20 +27,21 @@ - [#11399](https://github.com/MetaMask/metamask-mobile/pull/11399): feat: add learn more modal component for staking (#11399) - [#11261](https://github.com/MetaMask/metamask-mobile/pull/11261): feat: STAKE-822 build your balance component (#11261) - [#11294](https://github.com/MetaMask/metamask-mobile/pull/11294): feat: added KeyValueRow to component-library/components-temp (#11294) -- [#11185](https://github.com/MetaMask/metamask-mobile/pull/11185): feat: display ""Snaps (Beta)"" decorator tag in accounts list (#11185) +- [#11185](https://github.com/MetaMask/metamask-mobile/pull/11185): "feat: display ""Snaps (Beta)"" decorator tag in accounts list (#11185)" - [#10829](https://github.com/MetaMask/metamask-mobile/pull/10829): feat: Eth snap keyring (#10829) - [#11455](https://github.com/MetaMask/metamask-mobile/pull/11455): feat: bootstrap a reset notifications feat (#11455) - [#11466](https://github.com/MetaMask/metamask-mobile/pull/11466): feat: add support for external links (#11466) - [#11429](https://github.com/MetaMask/metamask-mobile/pull/11429): feat: add timeout handler (#11429) - [#11427](https://github.com/MetaMask/metamask-mobile/pull/11427): feat: add feature announcements channel for android (#11427) +- [#11250](https://github.com/MetaMask/metamask-mobile/pull/11250): fix: push notifications (#11250) - [#11069](https://github.com/MetaMask/metamask-mobile/pull/11069): feat: react native fast crypto for notifications (#11069) ### Changed -- [#11379](https://github.com/MetaMask/metamask-mobile/pull/11379): refactor: rename the feature flag since it had a typo (#11379) - [#11615](https://github.com/MetaMask/metamask-mobile/pull/11615): chore: exclude temporarily sentry SDK advisory (#11615) - [#11577](https://github.com/MetaMask/metamask-mobile/pull/11577): ci: disable swaps e2e workflow (#11577) - [#11350](https://github.com/MetaMask/metamask-mobile/pull/11350): chore: replace Segment patch by plugin (#11350) - [#11287](https://github.com/MetaMask/metamask-mobile/pull/11287): chore: remove unused events (#11287) +- [#11512](https://github.com/MetaMask/metamask-mobile/pull/11512): fix: android firebase docs template (#11512) - [#11517](https://github.com/MetaMask/metamask-mobile/pull/11517): chore: delete swaps token charts test (#11517) - [#11515](https://github.com/MetaMask/metamask-mobile/pull/11515): test: disable swaps token charts regression tests (#11515) - [#11504](https://github.com/MetaMask/metamask-mobile/pull/11504): chore: revert measuring with react native performance (#11504) @@ -79,15 +87,13 @@ - [#11104](https://github.com/MetaMask/metamask-mobile/pull/11104): chore(deps): Bump `@metamask/address-book-controller` from `^4.0.1` to `^6.0.1` (#11104) - [#10917](https://github.com/MetaMask/metamask-mobile/pull/10917): chore(ci): split out ci scripts and devDeps into separate project (#10917) - [#11081](https://github.com/MetaMask/metamask-mobile/pull/11081): chore: Prevent redundant Sentry sourcemap uploads (#11081) +- [#11430](https://github.com/MetaMask/metamask-mobile/pull/11430): fix: refactor Logger usage (#11430) - [#11470](https://github.com/MetaMask/metamask-mobile/pull/11470): chore: [Design quality] Update token details (#11470) -- [#11439](https://github.com/MetaMask/metamask-mobile/pull/11439): chore: cherry-pick fix: ""chore(deps): Bump @metamask/base-controller from ^6.0.0 to ^7.0.0 (#11207)"" (#11439) -- [#11169](https://github.com/MetaMask/metamask-mobile/pull/11169): chore(deps): Bump `@metamask/signature-controller` from `^17.0.0` to `^19.1.0` -- [#11352](https://github.com/MetaMask/metamask-mobile/pull/11352): chore(deps): Bump `@metamask/accounts-controller` to `^18.2.1` +- [#11439](https://github.com/MetaMask/metamask-mobile/pull/11439): "chore: cherry-pick fix: ""chore(deps): Bump @metamask/base-controller from ^6.0.0 to ^7.0.0 (#11207)"" (#11439)" +- [#11169](https://github.com/MetaMask/metamask-mobile/pull/11169): "chore(deps): Bump `@metamask/signature-controller` from `^17.0.0` to `^19.1.0` +- [#11352](https://github.com/MetaMask/metamask-mobile/pull/11352): "chore(deps): Bump `@metamask/accounts-controller` to `^18.2.1` ### Fixed -- [#11512](https://github.com/MetaMask/metamask-mobile/pull/11512): fix: android firebase docs template (#11512) -- [#11430](https://github.com/MetaMask/metamask-mobile/pull/11430): fix: refactor Logger usage (#11430) -- [#11250](https://github.com/MetaMask/metamask-mobile/pull/11250): fix: push notifications (#11250) - [#11581](https://github.com/MetaMask/metamask-mobile/pull/11581): fix: Fix invalid browser url crash (#11581) - [#11467](https://github.com/MetaMask/metamask-mobile/pull/11467): fix: Reorder prep_environment (#11467) - [#11367](https://github.com/MetaMask/metamask-mobile/pull/11367): fix: Update steps of the methods that are no longer valid (#11367) @@ -468,7 +474,10 @@ - [#10383](https://github.com/MetaMask/metamask-mobile/pull/10383): fix: race condition issues when doing batch-rpc calls in the DeeplinkProtocolService (#10383) - [#10365](https://github.com/MetaMask/metamask-mobile/pull/10365): fix: attribution link (#10365) - [#10303](https://github.com/MetaMask/metamask-mobile/pull/10303): fix: page navigation during QR accounts selection (#10303) +<<<<<<< HEAD +======= +>>>>>>> main ## 7.28.1 - Aug 15, 2024 ### Fixed - [#10637](https://github.com/MetaMask/metamask-mobile/pull/10637): fix: swap button blocked by SwapsController polling issue (#10637) diff --git a/README.md b/README.md index 815748fcafd0..2c4a6de04453 100644 --- a/README.md +++ b/README.md @@ -41,31 +41,23 @@ cd metamask-mobile **Firebase Messaging Setup** -Before running the app, keep in mind that MetaMask uses FCM (Firebase Cloud Message) to empower communications. Based on this, as an external contributor you would preferably need to provide your own FREE Firebase project config file with a matching client for package name `io.metamask`, and update your `google-services.json` file in the `android/app` or `GoogleService-Info.plist` file in the `ios` directory. +Before running the app, keep in mind that MetaMask uses FCM (Firebase Cloud Message) to empower communications. Based on this, as an external contributor you would preferably need to provide your own FREE Firebase project config file with a matching client for package name `io.metamask`, and update your `google-services.json` file in the `android/app` directory as well your `.env` files (`.ios.env`, `.js.env`, `.android.env`), adding `GOOGLE_SERVICES_B64` variable depending on the environment you are running the app (ios/android). -**External Contributors** -In case you don't have FCM account, you can use `./android/app/google-services-example.json` for Android or `./ios/GoogleServices/GoogleService-Info-example.plist` for iOS and follow the steps below to populate the correct environment variables in the `.env` files (`.ios.env`, `.js.env`, `.android.env`), adding `GOOGLE_SERVICES_B64_ANDROID` or `GOOGLE_SERVICES_B64_IOS` variable depending on the environment you are running the app (ios/android). +The value you should provide to `GOOGLE_SERVICES_B64` is the base64 encoded version of your Firebase project config file, which can be generated as follows: -**Internal Contributors** - -We should access the Firebase project config file from 1Password. - -The value you should provide to `GOOGLE_SERVICES_B64_ANDROID` or `GOOGLE_SERVICES_B64_IOS` is the base64 encoded version of your Firebase project config file, which can be generated as follows: - -**For Android** ```bash -export GOOGLE_SERVICES_B64_ANDROID="$(base64 -w0 -i ./android/app/google-services-example.json)" && echo "export GOOGLE_SERVICES_B64_ANDROID=\"$GOOGLE_SERVICES_B64_ANDROID\"" | tee -a .js.env .ios.env +base64 -i ./android/app/google-services-example.json ``` -**For iOS** -```bash -export GOOGLE_SERVICES_B64_IOS="$(base64 -w0 -i ./ios/GoogleServices/GoogleService-Info-example.plist)" && echo "export GOOGLE_SERVICES_B64_IOS=\"$GOOGLE_SERVICES_B64_IOS\"" | tee -a .js.env .ios.env -``` +Copy the result to your clipboard and paste it in the `GOOGLE_SERVICES_B64` variable in the `.env` file you are running the app. + +> [!CAUTION] +> In case you don't provide your own Firebase project config file, you will face the error `No matching client found for package name 'io.metamask'`. -[!CAUTION] -> In case you don't provide your own Firebase project config file or run the steps above, you will face the error `No matching client found for package name 'io.metamask'`. +You can make usage of a mock file at `android/app/google-services-example.json`, following the same steps above from the root of the project. In case of any doubt, please follow the instructions in the link below to get your Firebase project config file. + [Firebase Project Quickstart](https://firebaseopensource.com/projects/firebase/quickstart-js/messaging/readme/#getting_started) **Install dependencies** diff --git a/android/app/build.gradle b/android/app/build.gradle index f2379b86e805..3ab7f178c3ea 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -173,8 +173,8 @@ android { applicationId "io.metamask" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionName "7.33.0" - versionCode 1460 + versionName "7.33.1" + versionCode 1471 testBuildType System.getProperty('testBuildType', 'debug') missingDimensionStrategy 'react-native-camera', 'general' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -229,7 +229,7 @@ android { release { manifestPlaceholders.isDebug = false minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro", "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro", "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules.pro" + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } diff --git a/android/app/google-services-example.json b/android/app/google-services-example.json index 02ea42cea0e9..f7765f0ad2ac 100644 --- a/android/app/google-services-example.json +++ b/android/app/google-services-example.json @@ -7,7 +7,11 @@ }, "client": [ { - "api_key": [{ "current_key": "" }], + "api_key": [ + { + "current_key": "" + } + ], "client_info": { "mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063", "client_id": "android:io.metamask", @@ -17,31 +21,7 @@ "certificate_hash": [] } } - }, - { - "api_key": [{ "current_key": "" }], - "client_info": { - "mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063", - "client_id": "android:io.metamask.qa", - "client_type": 1, - "android_client_info": { - "package_name": "io.metamask.qa", - "certificate_hash": [] - } - } - }, - { - "api_key": [{ "current_key": "" }], - "client_info": { - "mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063", - "client_id": "android:io.metamask.flask", - "client_type": 1, - "android_client_info": { - "package_name": "io.metamask.flask", - "certificate_hash": [] - } - } } ], "configuration_version": "1" -} +} \ No newline at end of file diff --git a/app/actions/notification/constants/index.ts b/app/actions/notification/constants/index.ts index ee8c63fdffa7..c75c9eb00820 100644 --- a/app/actions/notification/constants/index.ts +++ b/app/actions/notification/constants/index.ts @@ -19,7 +19,6 @@ export enum notificationsErrors { UPDATE_TRIGGER_PUSH_NOTIFICATIONS = 'Error while trying to update trigger push notifications', ENABLE_NOTIFICATIONS_SERVICES = 'Error while trying to enable notifications services', DISABLE_NOTIFICATIONS_SERVICES = 'Error while trying to disable notifications services', - DELETE_STORAGE_KEY = 'Error while trying to delete storage key', } export default notificationsErrors; diff --git a/app/actions/notification/helpers/index.ts b/app/actions/notification/helpers/index.ts index 9f47da07f88e..0cd827ad3ef5 100644 --- a/app/actions/notification/helpers/index.ts +++ b/app/actions/notification/helpers/index.ts @@ -171,20 +171,3 @@ export const markMetamaskNotificationsAsRead = async ( return getErrorMessage(error); } }; -/** - * Perform the deletion of the notifications storage key and the creation of on chain triggers to reset the notifications. - * - * @returns {Promise} A promise that resolves to a string error message or undefined if successful. - */ -export const performDeleteStorage = async (): Promise => { - try { - await Engine.context.UserStorageController.performDeleteStorage('notifications.notification_settings'); - await Engine.context.NotificationServicesController.createOnChainTriggers( - { - resetNotifications: true, - }, - ); - } catch (error) { - return getErrorMessage(error); - } -}; diff --git a/app/actions/onboarding/index.ts b/app/actions/onboarding/index.ts index e85dd902fe3c..9866cf8d17b5 100644 --- a/app/actions/onboarding/index.ts +++ b/app/actions/onboarding/index.ts @@ -25,4 +25,4 @@ export function clearOnboardingEvents(): ClearEventsAction { return { type: CLEAR_EVENTS, }; -} +} \ No newline at end of file diff --git a/app/actions/security/index.ts b/app/actions/security/index.ts index 661c1d1119d0..e0e87a0ef550 100644 --- a/app/actions/security/index.ts +++ b/app/actions/security/index.ts @@ -8,7 +8,6 @@ export enum ActionType { SET_AUTOMATIC_SECURITY_CHECKS_MODAL_OPEN = 'SET_AUTOMATIC_SECURITY_CHECKS_MODAL_OPEN', SET_DATA_COLLECTION_FOR_MARKETING = 'SET_DATA_COLLECTION_FOR_MARKETING', SET_NFT_AUTO_DETECTION_MODAL_OPEN = 'SET_NFT_AUTO_DETECTION_MODAL_OPEN', - SET_MULTI_RPC_MIGRATION_MODAL_OPEN = 'SET_MULTI_RPC_MIGRATION_MODAL_OPEN', } export interface AllowLoginWithRememberMeUpdated @@ -36,11 +35,6 @@ export interface SetNftAutoDetectionModalOpen open: boolean; } -export interface SetMultiRpcMigrationModalOpen - extends ReduxAction { - open: boolean; -} - export interface SetDataCollectionForMarketing extends ReduxAction { enabled: boolean; @@ -52,8 +46,7 @@ export type Action = | UserSelectedAutomaticSecurityChecksOptions | SetAutomaticSecurityChecksModalOpen | SetDataCollectionForMarketing - | SetNftAutoDetectionModalOpen - | SetMultiRpcMigrationModalOpen; + | SetNftAutoDetectionModalOpen; export const setAllowLoginWithRememberMe = ( enabled: boolean, @@ -89,13 +82,6 @@ export const setNftAutoDetectionModalOpen = ( open, }); -export const setMultiRpcMigrationModalOpen = ( - open: boolean, -): SetMultiRpcMigrationModalOpen => ({ - type: ActionType.SET_MULTI_RPC_MIGRATION_MODAL_OPEN, - open, -}); - export const setDataCollectionForMarketing = (enabled: boolean) => ({ type: ActionType.SET_DATA_COLLECTION_FOR_MARKETING, enabled, diff --git a/app/actions/settings/index.js b/app/actions/settings/index.js index 0686f3e06aa0..787a70f6d387 100644 --- a/app/actions/settings/index.js +++ b/app/actions/settings/index.js @@ -67,10 +67,3 @@ export function toggleDeviceNotification(deviceNotificationEnabled) { deviceNotificationEnabled, }; } - -export function setTokenSortConfig(tokenSortConfig) { - return { - type: 'SET_TOKEN_SORT_CONFIG', - tokenSortConfig, - }; -} diff --git a/app/component-library/components-temp/Accounts/AccountBase/AccountBase.styles.ts b/app/component-library/components-temp/Accounts/AccountBase/AccountBase.styles.ts index f755c07b3ebe..cda7d7fe2485 100644 --- a/app/component-library/components-temp/Accounts/AccountBase/AccountBase.styles.ts +++ b/app/component-library/components-temp/Accounts/AccountBase/AccountBase.styles.ts @@ -29,6 +29,7 @@ const styleSheet = StyleSheet.create({ justifyContent: 'flex-start', }, accountNameLabelText: { + marginLeft: 4, paddingHorizontal: 8, borderWidth: 1, borderRadius: 8, diff --git a/app/component-library/components-temp/Accounts/AccountBase/AccountBase.tsx b/app/component-library/components-temp/Accounts/AccountBase/AccountBase.tsx index 88e0f809d051..14f619c98e0a 100644 --- a/app/component-library/components-temp/Accounts/AccountBase/AccountBase.tsx +++ b/app/component-library/components-temp/Accounts/AccountBase/AccountBase.tsx @@ -49,17 +49,15 @@ const AccountBase = ({ {accountName} - - {accountTypeLabel && ( - + {accountTypeLabel && ( {strings(accountTypeLabel)} + )} - )} diff --git a/app/component-library/components-temp/CellSelectWithMenu/CellSelectWithMenu.tsx b/app/component-library/components-temp/CellSelectWithMenu/CellSelectWithMenu.tsx index e18ed0465956..ff8df60913ae 100644 --- a/app/component-library/components-temp/CellSelectWithMenu/CellSelectWithMenu.tsx +++ b/app/component-library/components-temp/CellSelectWithMenu/CellSelectWithMenu.tsx @@ -33,7 +33,6 @@ const CellSelectWithMenu = ({ tagLabel, isSelected = false, children, - withAvatar = true, ...props }: CellSelectWithMenuProps) => { const { styles } = useStyles(styleSheet, { style }); @@ -47,15 +46,12 @@ const CellSelectWithMenu = ({ > {/* DEV Note: Account Avatar should be replaced with Avatar with Badge whenever available */} - {withAvatar ? ( - - ) : null} - + @@ -14,10 +16,10 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] = disabled={false} style={ { - "flex": 1, "opacity": 1, "padding": 16, "position": "relative", + "width": "95%", "zIndex": 1, } } @@ -285,13 +287,7 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] = - + ( + const IconView = ({ onPress, name, size, testID }: IconViewProps) => ( @@ -78,19 +78,20 @@ const ContractBoxBase = ({ )} - {renderIconView({ - onPress: onCopyAddress, - name: IconName.Copy, - size: IconSize.Lg, - testID: COPY_ICON_TEST_ID, - })} - {hasBlockExplorer && - renderIconView({ - onPress: onExportAddress, - name: IconName.Export, - size: IconSize.Md, - testID: EXPORT_ICON_TEST_ID, - })} + + {hasBlockExplorer && ( + + )} ); diff --git a/app/component-library/components-temp/Contracts/ContractBoxBase/__snapshots__/ContractBoxBase.test.tsx.snap b/app/component-library/components-temp/Contracts/ContractBoxBase/__snapshots__/ContractBoxBase.test.tsx.snap index 56c4c78ddc2d..01c380bb58a3 100644 --- a/app/component-library/components-temp/Contracts/ContractBoxBase/__snapshots__/ContractBoxBase.test.tsx.snap +++ b/app/component-library/components-temp/Contracts/ContractBoxBase/__snapshots__/ContractBoxBase.test.tsx.snap @@ -65,21 +65,12 @@ exports[`Component ContractBoxBase should render correctly 1`] = ` } } > - - - + /> `; diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx b/app/component-library/components-temp/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx index bfc064931ee8..aefa71eecbc4 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx +++ b/app/component-library/components-temp/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx @@ -14,48 +14,46 @@ import React from 'react'; import { View } from 'react-native'; import { KeyValueRowLabelProps, TooltipSizes } from '../KeyValueRow.types'; import styleSheet from './KeyValueLabel.styles'; -import { isPreDefinedKeyValueRowLabel } from '../KeyValueRow.utils'; /** * A label and tooltip component. * * @param {Object} props - Component props. - * @param {PreDefinedKeyValueRowLabel | ReactNode} props.label - The label content to display. - * @param {KeyValueRowTooltip} [props.tooltip] - Optional tooltip to render to the right of the label. + * @param {TextVariant} [props.variant] - Optional text variant. Defaults to TextVariant.BodyMDMedium. + * @param {TextVariant} [props.color] - Optional text color. Defaults to TextColor.Default. + * @param {TextVariant} [props.tooltip] - Optional tooltip to render to the right of the label text. * * @returns {JSX.Element} The rendered KeyValueRowLabel component. */ -const KeyValueRowLabel = ({ label, tooltip }: KeyValueRowLabelProps) => { +const KeyValueRowLabel = ({ + label, + variant = TextVariant.BodyMDMedium, + color = TextColor.Default, + tooltip, +}: KeyValueRowLabelProps) => { const { styles } = useStyles(styleSheet, {}); const { openTooltipModal } = useTooltipModal(); - const hasTooltip = tooltip?.title && tooltip?.content; + const hasTooltip = tooltip?.title && tooltip?.text; const onNavigateToTooltipModal = () => { if (!hasTooltip) return; - openTooltipModal(tooltip.title, tooltip.content); + openTooltipModal(tooltip.title, tooltip.text); }; return ( - {isPreDefinedKeyValueRowLabel(label) ? ( - - ) : ( - label - )} + {hasTooltip && ( )} diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx b/app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx index ee34ef3c4b43..e5a440b32763 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx +++ b/app/component-library/components-temp/KeyValueRow/KeyValueRow.stories.tsx @@ -8,7 +8,6 @@ import KeyValueRowComponent, { import Text, { TextColor, TextVariant } from '../../components/Texts/Text'; import Title from '../../../components/Base/Title'; import { IconColor, IconName, IconSize } from '../../components/Icons/Icon'; -import Button, { ButtonVariants } from '../../components/Buttons/Button'; const KeyValueRowMeta = { title: 'Components Temp / KeyValueRow', @@ -39,56 +38,42 @@ export const KeyValueRow = { - {/* Using Custom ReactNode */} - alert('test')} - /> - ), - }} - /> ), diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueRow.test.tsx b/app/component-library/components-temp/KeyValueRow/KeyValueRow.test.tsx index 389a3213db5f..a9b00ece7e86 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueRow.test.tsx +++ b/app/component-library/components-temp/KeyValueRow/KeyValueRow.test.tsx @@ -19,8 +19,8 @@ describe('KeyValueRow', () => { it('should render when there is only text', () => { const { toJSON } = render( , ); @@ -31,17 +31,17 @@ describe('KeyValueRow', () => { const { toJSON } = render( , @@ -54,13 +54,13 @@ describe('KeyValueRow', () => { const { toJSON } = render( { const { toJSON } = render( , diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueRow.tsx b/app/component-library/components-temp/KeyValueRow/KeyValueRow.tsx index 212396f888e6..18c6300b1cfa 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueRow.tsx +++ b/app/component-library/components-temp/KeyValueRow/KeyValueRow.tsx @@ -8,6 +8,7 @@ import { } from './KeyValueRow.types'; import Icon from '../../components/Icons/Icon'; import { View } from 'react-native'; +import { areKeyValueRowPropsEqual } from './KeyValueRow.utils'; import KeyValueSection from './KeyValueSection/KeyValueSection'; import KeyValueRowLabel from './KeyValueLabel/KeyValueLabel'; import KeyValueRowRoot from './KeyValueRoot/KeyValueRoot'; @@ -44,7 +45,12 @@ const KeyValueRow = React.memo(({ field, value, style }: KeyValueRowProps) => { (fieldIcon.side === KeyValueRowFieldIconSides.LEFT || fieldIcon.side === KeyValueRowFieldIconSides.BOTH || !fieldIcon?.side) && } - + {shouldShowFieldIcon && (fieldIcon?.side === KeyValueRowFieldIconSides.RIGHT || fieldIcon?.side === KeyValueRowFieldIconSides.BOTH) && ( @@ -58,7 +64,12 @@ const KeyValueRow = React.memo(({ field, value, style }: KeyValueRowProps) => { (valueIcon?.side === KeyValueRowFieldIconSides.LEFT || valueIcon?.side === KeyValueRowFieldIconSides.BOTH || !valueIcon?.side) && } - + {shouldShowValueIcon && (valueIcon?.side === KeyValueRowFieldIconSides.RIGHT || valueIcon?.side === KeyValueRowFieldIconSides.BOTH) && ( @@ -68,7 +79,7 @@ const KeyValueRow = React.memo(({ field, value, style }: KeyValueRowProps) => { ); -}); +}, areKeyValueRowPropsEqual); /** * Exported sub-components to provide a base for new KeyValueRow variants. diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueRow.types.ts b/app/component-library/components-temp/KeyValueRow/KeyValueRow.types.ts index fc4e825921e4..0e9c864d3095 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueRow.types.ts +++ b/app/component-library/components-temp/KeyValueRow/KeyValueRow.types.ts @@ -19,9 +19,9 @@ interface KeyValueRowTooltip { */ title: string; /** - * The content displayed within the tooltip body. + * The text displayed within the tooltip body. */ - content: string | ReactNode; + text: string; /** * Optional size of the tooltip icon. * @default TooltipSizes.Md @@ -47,9 +47,19 @@ export enum KeyValueRowFieldIconSides { */ interface KeyValueRowField { /** - * The label content displayed. + * The text to display. + */ + text: string; + /** + * Optional text variant. + * @default TextVariant.BodyMDMedium */ - label: PreDefinedKeyValueRowLabel | ReactNode; + variant?: TextProps['variant']; + /** + * Optional text color. + * @default TextColor.Default + */ + color?: TextProps['color']; /** * Optional icon to display. If undefined, no icon is displayed. */ @@ -64,11 +74,16 @@ export const IconSizes = IconSize; export const TooltipSizes = ButtonIconSizes; -export interface PreDefinedKeyValueRowLabel { +/** + * The KeyValueRowLabel prop interface. + * + * @see KeyValueRowLabel in ./KeyValueRow.tsx + */ +export interface KeyValueRowLabelProps { /** * Text to display. */ - text: string; + label: string; /** * Optional text variant. * @default TextVariant.BodyMDMedium @@ -79,18 +94,6 @@ export interface PreDefinedKeyValueRowLabel { * @default TextColor.Default */ color?: TextProps['color']; -} - -/** - * The KeyValueRowLabel prop interface. - * - * @see KeyValueRowLabel in ./KeyValueRow.tsx - */ -export interface KeyValueRowLabelProps { - /** - * The label content displayed. - */ - label: PreDefinedKeyValueRowLabel | ReactNode; /** * Optional tooltip. If undefined, the tooltip won't be displayed. */ diff --git a/app/component-library/components-temp/KeyValueRow/KeyValueRow.utils.ts b/app/component-library/components-temp/KeyValueRow/KeyValueRow.utils.ts index 3361cb4d66f5..bf4c38843e43 100644 --- a/app/component-library/components-temp/KeyValueRow/KeyValueRow.utils.ts +++ b/app/component-library/components-temp/KeyValueRow/KeyValueRow.utils.ts @@ -1,9 +1,8 @@ -import { - KeyValueRowLabelProps, - PreDefinedKeyValueRowLabel, -} from './KeyValueRow.types'; +import { KeyValueRowProps } from './KeyValueRow.types'; -export const isPreDefinedKeyValueRowLabel = ( - label: KeyValueRowLabelProps['label'], -): label is PreDefinedKeyValueRowLabel => - !!label && typeof label === 'object' && 'text' in label; +export const areKeyValueRowPropsEqual = ( + prevProps: KeyValueRowProps, + newProps: KeyValueRowProps, +) => + JSON.stringify(prevProps.field) === JSON.stringify(newProps.field) && + JSON.stringify(prevProps.value) === JSON.stringify(newProps.value); diff --git a/app/component-library/components-temp/KeyValueRow/__snapshots__/KeyValueRow.test.tsx.snap b/app/component-library/components-temp/KeyValueRow/__snapshots__/KeyValueRow.test.tsx.snap index a4c9e5f6bfef..c83d3a4fd5fa 100644 --- a/app/component-library/components-temp/KeyValueRow/__snapshots__/KeyValueRow.test.tsx.snap +++ b/app/component-library/components-temp/KeyValueRow/__snapshots__/KeyValueRow.test.tsx.snap @@ -201,7 +201,7 @@ exports[`KeyValueRow Prebuilt Component KeyValueRow should render text with icon Key Text { const { getByRole } = render( , @@ -66,9 +64,7 @@ describe('ListItemMultiSelectButton', () => { const { getByTestId } = render( , diff --git a/app/component-library/components-temp/ListItemMultiSelectButton/ListItemMultiSelectButton.tsx b/app/component-library/components-temp/ListItemMultiSelectButton/ListItemMultiSelectButton.tsx index a3cb0d079ffc..e8610e457352 100644 --- a/app/component-library/components-temp/ListItemMultiSelectButton/ListItemMultiSelectButton.tsx +++ b/app/component-library/components-temp/ListItemMultiSelectButton/ListItemMultiSelectButton.tsx @@ -20,12 +20,6 @@ import { IconColor, IconName, } from '../../../component-library/components/Icons/Icon'; -import Button, { - ButtonSize, - ButtonVariants, - ButtonWidthTypes, -} from '../../../component-library/components/Buttons/Button'; -import { TextVariant } from '../../../component-library/components/Texts/Text'; const ListItemMultiSelectButton: React.FC = ({ style, @@ -33,9 +27,7 @@ const ListItemMultiSelectButton: React.FC = ({ isDisabled = false, children, gap = DEFAULT_LISTITEMMULTISELECT_GAP, - showButtonIcon = true, buttonIcon = IconName.MoreVertical, - buttonProps, ...props }) => { const { styles } = useStyles(styleSheet, { @@ -63,29 +55,15 @@ const ListItemMultiSelectButton: React.FC = ({ )} - {showButtonIcon ? ( - - - - ) : null} - {buttonProps?.textButton ? ( - - - ); - /** * Render non-homepage options menu */ const renderNonHomeOptions = () => { - if (isHomepage()) return renderGoToFavorites(); + if (isHomepage()) return null; return ( @@ -1343,7 +1325,7 @@ export const BrowserTab = (props) => { {!isBookmark() && ( )} - {renderGoToFavorites()} diff --git a/app/components/Views/Login/index.test.tsx b/app/components/Views/Login/index.test.tsx index b1e9b78248f6..07938c549841 100644 --- a/app/components/Views/Login/index.test.tsx +++ b/app/components/Views/Login/index.test.tsx @@ -1,16 +1,28 @@ import React from 'react'; +import { shallow } from 'enzyme'; import Login from './'; -import renderWithProvider from '../../../util/test/renderWithProvider'; -// eslint-disable-next-line import/no-namespace -import * as traceObj from '../../../util/trace'; +import configureMockStore from 'redux-mock-store'; +import { Provider } from 'react-redux'; +import { backgroundState } from '../../../util/test/initial-root-state'; + +const mockStore = configureMockStore(); +const initialState = { + engine: { + backgroundState, + }, + user: { + passwordSet: true, + }, +}; +const store = mockStore(initialState); describe('Login', () => { it('should render correctly', () => { - const spyFetch = jest - .spyOn(traceObj, 'trace') - .mockImplementation(() => undefined); - const { toJSON } = renderWithProvider(); - expect(toJSON()).toMatchSnapshot(); - expect(spyFetch).toHaveBeenCalledTimes(1); + const wrapper = shallow( + + + , + ); + expect(wrapper).toMatchSnapshot(); }); }); diff --git a/app/components/Views/MultiRpcModal/MultiRpcModal.constants.ts b/app/components/Views/MultiRpcModal/MultiRpcModal.constants.ts deleted file mode 100644 index 8746e74f4dd7..000000000000 --- a/app/components/Views/MultiRpcModal/MultiRpcModal.constants.ts +++ /dev/null @@ -1,30 +0,0 @@ -export const SAMPLE_NETWORK_CONFIGURATIONS = { - '0x1': { - blockExplorerUrls: [], - chainId: '0x1', - defaultRpcEndpointIndex: 0, - name: 'Mainnet', - nativeCurrency: 'ETH', - rpcEndpoints: [ - { - networkClientId: 'mainnet', - type: 'infura', - url: 'https://mainnet.infura.io/v3/{infuraProjectId}', - }, - ], - }, - '0x5': { - blockExplorerUrls: [], - chainId: '0x5', - defaultRpcEndpointIndex: 0, - name: 'Goerli', - nativeCurrency: 'GoerliETH', - rpcEndpoints: [ - { - networkClientId: 'goerli', - type: 'infura', - url: 'https://goerli.infura.io/v3/{infuraProjectId}', - }, - ], - }, -}; diff --git a/app/components/Views/MultiRpcModal/MultiRpcModal.styles.ts b/app/components/Views/MultiRpcModal/MultiRpcModal.styles.ts deleted file mode 100644 index 45839816a57e..000000000000 --- a/app/components/Views/MultiRpcModal/MultiRpcModal.styles.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { StyleSheet } from 'react-native'; - -/** - * Style sheet function for NFT auto detection modal component. - * - * @returns StyleSheet object. - */ -const styleSheet = () => - StyleSheet.create({ - container: { - alignItems: 'center', - }, - image: { - width: 102.64, - height: 102.64, - }, - description: { - marginLeft: 32, - marginRight: 32, - }, - content: { - height: '80%', - }, - textDescription: { - textAlign: 'center', - }, - textContainer: { - marginLeft: 16, - marginRight: 16, - paddingVertical: 16, - }, - buttonsContainer: { - marginLeft: 16, - marginRight: 16, - paddingVertical: 16, - }, - spacer: { height: 8 }, - }); - -export default styleSheet; diff --git a/app/components/Views/MultiRpcModal/MultiRpcModal.test.tsx b/app/components/Views/MultiRpcModal/MultiRpcModal.test.tsx deleted file mode 100644 index 60d6cc8789aa..000000000000 --- a/app/components/Views/MultiRpcModal/MultiRpcModal.test.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react'; -import MultiRpcModal from './MultiRpcModal'; -import renderWithProvider, { - DeepPartial, -} from '../../../util/test/renderWithProvider'; -import { createStackNavigator } from '@react-navigation/stack'; -import Routes from '../../../constants/navigation/Routes'; -import Engine from '../../../core/Engine'; -import { fireEvent } from '@testing-library/react-native'; -import { RootState } from 'app/reducers'; -import { backgroundState } from '../../../util/test/initial-root-state'; - -const setShowMultiRpcModalSpy = jest.spyOn( - Engine.context.PreferencesController, - 'setShowMultiRpcModal', -); - -jest.mock('../../../core/Engine', () => ({ - context: { - PreferencesController: { - setShowMultiRpcModal: jest.fn(), - }, - }, -})); - -const initialState = { - engine: { - backgroundState, - }, -}; - -const Stack = createStackNavigator(); - -const renderComponent = (state: DeepPartial = {}) => - renderWithProvider( - - - {() => } - - , - { state }, - ); - -describe('MultiRpcModal', () => { - afterEach(() => { - jest.clearAllMocks(); - }); - - it('render matches snapshot', () => { - const { toJSON } = renderComponent(initialState); - expect(toJSON()).toMatchSnapshot(); - }); - - it('calls setShowMultiRpcModal and trackEvent when clicking on allow button', () => { - const { getByTestId } = renderComponent(initialState); - const allowButton = getByTestId('allow'); - - fireEvent.press(allowButton); - expect(setShowMultiRpcModalSpy).toHaveBeenCalledWith(false); - }); -}); diff --git a/app/components/Views/MultiRpcModal/MultiRpcModal.tsx b/app/components/Views/MultiRpcModal/MultiRpcModal.tsx deleted file mode 100644 index 7925bd6c862e..000000000000 --- a/app/components/Views/MultiRpcModal/MultiRpcModal.tsx +++ /dev/null @@ -1,146 +0,0 @@ -import React, { useRef, useCallback } from 'react'; -import { ScrollView } from 'react-native-gesture-handler'; -import BottomSheet, { - BottomSheetRef, -} from '../../../component-library/components/BottomSheets/BottomSheet'; -import { strings } from '../../../../locales/i18n'; -import { useStyles } from '../../../component-library/hooks'; -import styleSheet from './MultiRpcModal.styles'; -import SheetHeader from '../../../component-library/components/Sheet/SheetHeader'; -import Text from '../../../component-library/components/Texts/Text'; -import { View, Image } from 'react-native'; -import { NftDetectionModalSelectorsIDs } from '../../../../e2e/selectors/Modals/NftDetectionModal.selectors'; - -import Button, { - ButtonSize, - ButtonVariants, - ButtonWidthTypes, -} from '../../../component-library/components/Buttons/Button'; -import { useNavigation } from '@react-navigation/native'; -import Engine from '../../../core/Engine'; -import { useMetrics } from '../../../components/hooks/useMetrics'; -import { MetaMetricsEvents } from '../../../core/Analytics'; -import { - selectChainId, - selectNetworkConfigurations, -} from '../../../selectors/networkController'; -import { useSelector } from 'react-redux'; -import Cell, { - CellVariant, -} from '../../../component-library/components/Cells/Cell'; -import { NetworkConfiguration } from '@metamask/network-controller'; -import { - AvatarSize, - AvatarVariant, -} from '../../../component-library/components/Avatars/Avatar'; -import { IconName } from '../../../component-library/components/Icons/Icon'; -import { getNetworkImageSource } from '../../../util/networks'; -import Routes from '../../../constants/navigation/Routes'; - -// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, import/no-commonjs -const networkImage = require('../../../images/networks1.png'); - -const MultiRpcModal = () => { - const { styles } = useStyles(styleSheet, {}); - const sheetRef = useRef(null); - const navigation = useNavigation(); - const chainId = useSelector(selectChainId); - const networkConfigurations = useSelector(selectNetworkConfigurations); - const { trackEvent } = useMetrics(); - const { navigate } = useNavigation(); - - const dismissMultiRpcModalMigration = useCallback(() => { - const { PreferencesController } = Engine.context; - PreferencesController.setShowMultiRpcModal(false); - trackEvent(MetaMetricsEvents.MULTI_RPC_MIGRATION_MODAL_ACCEPTED, { - chainId, - }); - - if (sheetRef?.current) { - sheetRef.current.onCloseBottomSheet(); - } else { - navigation.goBack(); - } - }, [trackEvent, chainId, navigation]); - - return ( - - - - - - - {strings('multi_rpc_migration_modal.description')} - - - - - - - - {Object.values(networkConfigurations).map( - (networkConfiguration: NetworkConfiguration, index) => - networkConfiguration.rpcEndpoints.length > 1 ? ( - { - sheetRef.current?.onCloseBottomSheet(() => { - navigate(Routes.ADD_NETWORK, { - shouldNetworkSwitchPopToWallet: false, - shouldShowPopularNetworks: false, - network: - networkConfiguration?.rpcEndpoints?.[ - networkConfiguration?.defaultRpcEndpointIndex - ].url, - }); - }); - }, - }} - /> - ) : null, - )} - - - - ); - const renderSecondaryButton = () => ( + const SecondaryButton = () => (