From cc8d48775703306ae5ead0a9f276051e234a9d9d Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Fri, 30 Aug 2024 09:15:46 +0000 Subject: [PATCH 01/41] Version v12.4.0 --- CHANGELOG.md | 411 ++++++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 411 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f3091f878e..4a26b1fb619d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,414 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.4.0] +### Uncategorized +- fix: flaky test `Test Snap Interactive UI test interactive ui elements` ([#26792](https://github.com/MetaMask/metamask-extension/pull/26792)) +- feat: Update Polygon from `MATIC` to `POL` ([#26671](https://github.com/MetaMask/metamask-extension/pull/26671)) +- feat: implement client side malicious network request detection ([#25839](https://github.com/MetaMask/metamask-extension/pull/25839)) +- fix: Improve migration 121.1 state validation ([#26773](https://github.com/MetaMask/metamask-extension/pull/26773)) +- chore: Bump Snaps dependencies ([#26675](https://github.com/MetaMask/metamask-extension/pull/26675)) +- refactor: extract Send-specific functionality out of AssetPicker ([#26558](https://github.com/MetaMask/metamask-extension/pull/26558)) +- fix: rename migration 126 to 121.1 ([#26742](https://github.com/MetaMask/metamask-extension/pull/26742)) +- chore: Bump `storybook`, `@storybook/*` to `^7.6.20`, `storybook-dark-mode` from `^3.0.3` to `^4.0.2` ([#26703](https://github.com/MetaMask/metamask-extension/pull/26703)) +- fix: Sentry app state null data to show null as value. ([#26522](https://github.com/MetaMask/metamask-extension/pull/26522)) +- chore: Master sync ([#26737](https://github.com/MetaMask/metamask-extension/pull/26737)) +- fix: Stop using a hardcoded Snap ID for notifications ([#26739](https://github.com/MetaMask/metamask-extension/pull/26739)) +- chore: MMI Fixes passing the state to route using history.push ([#26722](https://github.com/MetaMask/metamask-extension/pull/26722)) +- Merge origin/develop into master-sync +- test: Add integration test for insufficient gas ([#26711](https://github.com/MetaMask/metamask-extension/pull/26711)) +- test: [Snaps E2E] Add changes to fix flakiness in Snaps UI Images test ([#26725](https://github.com/MetaMask/metamask-extension/pull/26725)) +- test: Add integration test for gas estimate failed alert ([#26681](https://github.com/MetaMask/metamask-extension/pull/26681)) +- fix: flaky test `Click bridge button @no-mmi loads portfolio tab from asset overview when flag is turned off` ([#26654](https://github.com/MetaMask/metamask-extension/pull/26654)) +- fix: flaky test `Navigation Signature - Different signature types initiates and queues multiple signatures and confirms` ([#26707](https://github.com/MetaMask/metamask-extension/pull/26707)) +- feat: adding context to get current confirmation in re-designed confirmation pages PR-1 ([#26587](https://github.com/MetaMask/metamask-extension/pull/26587)) +- fix: `wallet_addEthereumChain` does not attach a `result` under certain conditions ([#26726](https://github.com/MetaMask/metamask-extension/pull/26726)) +- fix: Add IOTX icon ([#26723](https://github.com/MetaMask/metamask-extension/pull/26723)) +- test: Add integration tests for network busy alert ([#26679](https://github.com/MetaMask/metamask-extension/pull/26679)) +- feat: Temporarily hide Approve redesigned pages ([#26676](https://github.com/MetaMask/metamask-extension/pull/26676)) +- perf: use an interstitial page to load `popup.html`; load scripts using `defer`ed script tags ([#26555](https://github.com/MetaMask/metamask-extension/pull/26555)) +- feat: Add metrics to track where signature rejection occurred ([#26469](https://github.com/MetaMask/metamask-extension/pull/26469)) +- chore: update @metamask/bitcoin-wallet-snap to 0.5.0 ([#26701](https://github.com/MetaMask/metamask-extension/pull/26701)) +- fix: adding missing token images ([#26708](https://github.com/MetaMask/metamask-extension/pull/26708)) +- feat: Added Edit networks screen modal ([#26097](https://github.com/MetaMask/metamask-extension/pull/26097)) +- perf: add trace for UI startup ([#26636](https://github.com/MetaMask/metamask-extension/pull/26636)) +- fix: Address design review on contract interaction and deployment red… ([#26659](https://github.com/MetaMask/metamask-extension/pull/26659)) +- test: [Snaps E2E] Add test cases for signature confirmations redesign to signature insights snaps test ([#26691](https://github.com/MetaMask/metamask-extension/pull/26691)) +- feat: updated ui for adding chain id screen ([#25777](https://github.com/MetaMask/metamask-extension/pull/25777)) +- fix: update moonbeam and moonriver network and token logos ([#26677](https://github.com/MetaMask/metamask-extension/pull/26677)) +- chore: MMI adds back the current Tx confirmation view to MMI ([#26539](https://github.com/MetaMask/metamask-extension/pull/26539)) +- fix(snaps): Use ApprovalType instead DIALOG_APPROVAL_TYPES in confirmation page ([#26655](https://github.com/MetaMask/metamask-extension/pull/26655)) +- fix: catch error for getTokenStandardAndDetails ([#26269](https://github.com/MetaMask/metamask-extension/pull/26269)) +- chore: Master sync ([#26641](https://github.com/MetaMask/metamask-extension/pull/26641)) +- chore: update gitignore ([#26642](https://github.com/MetaMask/metamask-extension/pull/26642)) +- fix: flaky test `Phishing Detection should navigate the user to PhishFort to dispute a Phishfort Block` ([#26651](https://github.com/MetaMask/metamask-extension/pull/26651)) +- fix: flaky tests `Sentry errors before initialization, after opting into metrics @no-mmi should capture UI application state`... ([#26648](https://github.com/MetaMask/metamask-extension/pull/26648)) +- fix: flaky test `Vault Decryptor Page is able to decrypt the vault us..` due to empty file load ([#26612](https://github.com/MetaMask/metamask-extension/pull/26612)) +- Merge branch 'develop' into master-sync +- fix: flaky test `Increase Token Allowance increases token spending ca..` ([#26640](https://github.com/MetaMask/metamask-extension/pull/26640)) +- chore: bump smart transactions controller ([#26644](https://github.com/MetaMask/metamask-extension/pull/26644)) +- chore: Polish multichain token list styles ([#26300](https://github.com/MetaMask/metamask-extension/pull/26300)) +- Merge origin/develop into master-sync +- feat: upgrade network controller to v20 ([#26150](https://github.com/MetaMask/metamask-extension/pull/26150)) +- docs: Add publish a release to Sentry flow steps ([#26605](https://github.com/MetaMask/metamask-extension/pull/26605)) +- chore: set bridge network allowlists from feature flags ([#26147](https://github.com/MetaMask/metamask-extension/pull/26147)) +- chore: anonymize send analytic properties #26627 ([#26628](https://github.com/MetaMask/metamask-extension/pull/26628)) +- chore: add user IDs to send page analytics ([#26600](https://github.com/MetaMask/metamask-extension/pull/26600)) +- fix: bump accounts controller and migration to fix undefined selectedAccount ([#26573](https://github.com/MetaMask/metamask-extension/pull/26573)) +- feat: Integrate Snaps into the redesigned confirmations ([#26435](https://github.com/MetaMask/metamask-extension/pull/26435)) +- refactor: Replace usages of the deprecated `setProviderType` ([#22619](https://github.com/MetaMask/metamask-extension/pull/22619)) +- refactor: Use generic helper function to initiate signatures ([#26584](https://github.com/MetaMask/metamask-extension/pull/26584)) +- test: [Snaps E2E] Update snaps dialog test to include Custom dialog type ([#26598](https://github.com/MetaMask/metamask-extension/pull/26598)) +- feat: new receive flow ([#26148](https://github.com/MetaMask/metamask-extension/pull/26148)) +- fix: remove speed up and cancel controller validation ([#26492](https://github.com/MetaMask/metamask-extension/pull/26492)) +- fix: flaky test `Test Snap Name Lookup tests name-lookup functionalit...` ([#26583](https://github.com/MetaMask/metamask-extension/pull/26583)) +- feat: Add contract deployment redesigned transaction screen ([#26382](https://github.com/MetaMask/metamask-extension/pull/26382)) +- feat: add transaction performance metrics ([#26332](https://github.com/MetaMask/metamask-extension/pull/26332)) +- test: add tests for insufficient funds alert ([#26512](https://github.com/MetaMask/metamask-extension/pull/26512)) +- feat: account watcher e2e ([#26524](https://github.com/MetaMask/metamask-extension/pull/26524)) +- feat: update add team label workflow ([#26548](https://github.com/MetaMask/metamask-extension/pull/26548)) +- feat: Add approval static simulation ([#26514](https://github.com/MetaMask/metamask-extension/pull/26514)) +- fix: Snapshot unit tests ([#26585](https://github.com/MetaMask/metamask-extension/pull/26585)) +- chore: Rename `permittedChains` permission to `endowment:permitted-chains` ([#26534](https://github.com/MetaMask/metamask-extension/pull/26534)) +- feat: Redesign Approve confirmation ([#26464](https://github.com/MetaMask/metamask-extension/pull/26464)) +- feat: Enable hardware wallets for smart transactions, sign a transaction only once ([#26251](https://github.com/MetaMask/metamask-extension/pull/26251)) +- fix: Allowlist Snap UI card component ([#26565](https://github.com/MetaMask/metamask-extension/pull/26565)) +- fix(deps): Bump `@metamask/eth-json-rpc-middleware` to `^14.0.0`, `@metamask/transaction-controller` to `^35.1.1` ([#26143](https://github.com/MetaMask/metamask-extension/pull/26143)) +- fix: adding warning for origin on redesigned pages ([#26306](https://github.com/MetaMask/metamask-extension/pull/26306)) +- fix: track `swapAndSend` transaction type ([#26535](https://github.com/MetaMask/metamask-extension/pull/26535)) +- feat: added AccountWatcher as preinstalled snap and added to menu list ([#26402](https://github.com/MetaMask/metamask-extension/pull/26402)) +- fix: stick add team label version to commit hash ([#26540](https://github.com/MetaMask/metamask-extension/pull/26540)) +- fix: correct duplicate notifications event tracking in global menu ([#26525](https://github.com/MetaMask/metamask-extension/pull/26525)) +- feat: migrate protect intrinsics test to e2e ([#26197](https://github.com/MetaMask/metamask-extension/pull/26197)) +- fix: NetworkChangeToast width in wide screen mode ([#26532](https://github.com/MetaMask/metamask-extension/pull/26532)) +- fix: missing deadline in swaps stx status screen ([#25779](https://github.com/MetaMask/metamask-extension/pull/25779)) +- fix: Snap Address component UI/UX (Snaps custom UI) ([#26477](https://github.com/MetaMask/metamask-extension/pull/26477)) +- feat(snaps): Removed Snaps name-lookup permission code fences ([#26393](https://github.com/MetaMask/metamask-extension/pull/26393)) +- docs: Include MV2 build commands in README ([#26486](https://github.com/MetaMask/metamask-extension/pull/26486)) +- test: add `driver.clickElementAndWaitForWindowToClose` helper method ([#26449](https://github.com/MetaMask/metamask-extension/pull/26449)) +- chore: Integrate SnapInsightsController ([#26411](https://github.com/MetaMask/metamask-extension/pull/26411)) +- feat: Update @blockaid/ppom_release to release 1.5.2 ([#26494](https://github.com/MetaMask/metamask-extension/pull/26494)) +- chore: Master sync ([#26497](https://github.com/MetaMask/metamask-extension/pull/26497)) +- Merge origin/develop into master-sync +- feat(notifications): use shared libraries NotificationServicesController ([#26480](https://github.com/MetaMask/metamask-extension/pull/26480)) +- perf: add parallel fetching for the network fee dropdown ([#26489](https://github.com/MetaMask/metamask-extension/pull/26489)) +- chore: remove token and nft detection modals ([#26403](https://github.com/MetaMask/metamask-extension/pull/26403)) +- chore: Add Near Icon ([#26459](https://github.com/MetaMask/metamask-extension/pull/26459)) +- fix: Restore `responsive` e2e driver option ([#25932](https://github.com/MetaMask/metamask-extension/pull/25932)) +- chore: downgrade prettier-eslint to match prettier version ([#26145](https://github.com/MetaMask/metamask-extension/pull/26145)) +- test: Add manual scenario for upgrade testing ([#26317](https://github.com/MetaMask/metamask-extension/pull/26317)) +- build(chore): switch to `defer` since it guarantees execution order once chunked ([#26425](https://github.com/MetaMask/metamask-extension/pull/26425)) +- fix: Update send transactions with custom nonce.csv ([#26451](https://github.com/MetaMask/metamask-extension/pull/26451)) +- fix: `rpcIdentifierUtility` client side grouping before emitting CustomRPC event ([#26266](https://github.com/MetaMask/metamask-extension/pull/26266)) +- feat(notifications): use notification services push controller ([#26448](https://github.com/MetaMask/metamask-extension/pull/26448)) +- feat: Add footers to Snap home pages ([#26463](https://github.com/MetaMask/metamask-extension/pull/26463)) +- fix: Remove double padding on Snap home page ([#26462](https://github.com/MetaMask/metamask-extension/pull/26462)) +- chore(webpack): update `html-bundler-webpack-plugin` from `v3.6.5` to `v3.17.3` ([#26371](https://github.com/MetaMask/metamask-extension/pull/26371)) +- chore: Master sync ([#26395](https://github.com/MetaMask/metamask-extension/pull/26395)) +- chore: Bump Snaps packages ([#26086](https://github.com/MetaMask/metamask-extension/pull/26086)) +- fix: Improve AccountListMenu/Item performance ([#26379](https://github.com/MetaMask/metamask-extension/pull/26379)) +- fix: Codespaces `corepack enable` ([#25161](https://github.com/MetaMask/metamask-extension/pull/25161)) +- fix: display toast message if user quickly sends transaction on different networks ([#26114](https://github.com/MetaMask/metamask-extension/pull/26114)) +- fix: problem with origins in the Snaps permission UI ([#26422](https://github.com/MetaMask/metamask-extension/pull/26422)) +- feat: Add abstraction for Snaps permissions ([#25175](https://github.com/MetaMask/metamask-extension/pull/25175)) +- test: add transaction contract interaction integration tests ([#26272](https://github.com/MetaMask/metamask-extension/pull/26272)) +- fix: timeout and "Rerun failed tests" ([#26239](https://github.com/MetaMask/metamask-extension/pull/26239)) +- chore: migrate BridgeController to BaseController v2 ([#26109](https://github.com/MetaMask/metamask-extension/pull/26109)) +- feat: Enable why did you render ([#26339](https://github.com/MetaMask/metamask-extension/pull/26339)) +- fix: Delete invalid `SelectedNetworkController` state ([#26428](https://github.com/MetaMask/metamask-extension/pull/26428)) +- test: ensure bridge button handles clicks according to feature flags ([#25812](https://github.com/MetaMask/metamask-extension/pull/25812)) +- build(webpack): polyfill `setImmediate` ([#26398](https://github.com/MetaMask/metamask-extension/pull/26398)) +- feat: feature-flagged cross-chain swaps route [METABRIDGE-867] ([#25811](https://github.com/MetaMask/metamask-extension/pull/25811)) +- chore: Remove i18n translations from Developer Options Settings Page ([#26380](https://github.com/MetaMask/metamask-extension/pull/26380)) +- fix: Do not break application if no token details are found using getTokenStandardAndDetails ([#26324](https://github.com/MetaMask/metamask-extension/pull/26324)) +- fix: Flaky contract interaction test ([#26420](https://github.com/MetaMask/metamask-extension/pull/26420)) +- fix: Enter key on Create Account checkbox should not trigger show/hide ([#26394](https://github.com/MetaMask/metamask-extension/pull/26394)) +- fix: notifications use better events ([#26410](https://github.com/MetaMask/metamask-extension/pull/26410)) +- fix: Restore snaps-controllers version following patch ([#26412](https://github.com/MetaMask/metamask-extension/pull/26412)) +- fix: Improve hex copy button ([#26384](https://github.com/MetaMask/metamask-extension/pull/26384)) +- refactor: use core profile syncing controllers. ([#26370](https://github.com/MetaMask/metamask-extension/pull/26370)) +- test: snap account contract interaction ([#26234](https://github.com/MetaMask/metamask-extension/pull/26234)) +- feat: updated SSK version in e2e and added test for creating multiple… ([#26378](https://github.com/MetaMask/metamask-extension/pull/26378)) +- Merge origin/develop into master-sync +- chore: MMI move duck and selector to TS ([#26125](https://github.com/MetaMask/metamask-extension/pull/26125)) +- refactor(notifications): use contentful package as dev dependency ([#26381](https://github.com/MetaMask/metamask-extension/pull/26381)) +- fix: remove submitRequest from dapp permission ([#26319](https://github.com/MetaMask/metamask-extension/pull/26319)) +- feat: Add integration test for blockaid on contract interaction ([#26366](https://github.com/MetaMask/metamask-extension/pull/26366)) +- refactor: add performance tracing infrastructure ([#26044](https://github.com/MetaMask/metamask-extension/pull/26044)) +- refactor: replace deprecated mixins with Text component in slippage-buttons ([#25638](https://github.com/MetaMask/metamask-extension/pull/25638)) +- refactor: replace deprecated mixins with text component in loading-swaps-quotes ([#25553](https://github.com/MetaMask/metamask-extension/pull/25553)) +- feat: Add metrics for alerts (transactions redesign) ([#26121](https://github.com/MetaMask/metamask-extension/pull/26121)) +- fix(25350): fix flakey token importing e2e test ([#26351](https://github.com/MetaMask/metamask-extension/pull/26351)) +- fix: enable Save button on Add Contact page for address input ([#26155](https://github.com/MetaMask/metamask-extension/pull/26155)) +- test: Add test for migration 120.2 and fix docs ([#26333](https://github.com/MetaMask/metamask-extension/pull/26333)) +- chore: normalize separator in `content` on the `viewport` `meta` tag ([#26268](https://github.com/MetaMask/metamask-extension/pull/26268)) +- fix: Stop logging pipeline stream errors in the service worker if they match 'Premature close' ([#26336](https://github.com/MetaMask/metamask-extension/pull/26336)) +- build: add alternative build process to enable faster developer builds ([#22506](https://github.com/MetaMask/metamask-extension/pull/22506)) +- fix: issue where `setNetworkClientIdForDomain` was called without checking whether the origin was eligible for setting its own network ([#26323](https://github.com/MetaMask/metamask-extension/pull/26323)) +- fix: get permit and order signatures token decimals ([#26292](https://github.com/MetaMask/metamask-extension/pull/26292)) +- feat: Update Redesign Signature Permit to show ellipsis at max 15 digits ([#26227](https://github.com/MetaMask/metamask-extension/pull/26227)) +- fix: remove the ability to send to btc accounts in send page ([#26271](https://github.com/MetaMask/metamask-extension/pull/26271)) +- fix: Adding migration 125 to remove Deprecated TxController Key from state ([#26267](https://github.com/MetaMask/metamask-extension/pull/26267)) +- fix: Revert "fix: remove submitRequest from dapp permission" ([#26293](https://github.com/MetaMask/metamask-extension/pull/26293)) +- refactor: convert `icon-factory.js` to typescript ([#23823](https://github.com/MetaMask/metamask-extension/pull/23823)) +- fix(26065): remove persisted state mostRecentRetrievedState after initialization if no errors ([#26206](https://github.com/MetaMask/metamask-extension/pull/26206)) +- refactor: ENABLE_MV3 flag cleanup ([#26059](https://github.com/MetaMask/metamask-extension/pull/26059)) +- test: fix flaky test Import flow @no-mmi Import wallet using Secret Recovery Phrase ([#26275](https://github.com/MetaMask/metamask-extension/pull/26275)) +- chore: Fully remove `eth_sign` ([#24756](https://github.com/MetaMask/metamask-extension/pull/24756)) +- fix: remove submitRequest from dapp permission ([#26276](https://github.com/MetaMask/metamask-extension/pull/26276)) +- chore: Update `actions/cache` from v3 to v4 ([#26020](https://github.com/MetaMask/metamask-extension/pull/26020)) +- feat: QR-based add NGRAVE ZERO Hardware ([#25080](https://github.com/MetaMask/metamask-extension/pull/25080)) +- fix: Fix GitHub release description ([#26247](https://github.com/MetaMask/metamask-extension/pull/26247)) +- feat(btc): use new snap account flow for Bitcoin accounts ([#26183](https://github.com/MetaMask/metamask-extension/pull/26183)) +- refactor: replace deprecated mixins with text component in transaction-confirmed ([#25551](https://github.com/MetaMask/metamask-extension/pull/25551)) +- fix: improve warning in add network modal ([#26250](https://github.com/MetaMask/metamask-extension/pull/26250)) +- fix: Fix `create_release_pull_request` OOM error ([#26249](https://github.com/MetaMask/metamask-extension/pull/26249)) +- chore: Create a story for TokenCurrencyDisplay component ([#26172](https://github.com/MetaMask/metamask-extension/pull/26172)) +- chore: refactoring onboarding to remove deprecated components ([#26207](https://github.com/MetaMask/metamask-extension/pull/26207)) +- fix: Fix CircleCI `create_release_pull_request` job ([#26246](https://github.com/MetaMask/metamask-extension/pull/26246)) +- fix: flaky test `Import flow @no-mmi Import Account using json file` ([#26240](https://github.com/MetaMask/metamask-extension/pull/26240)) +- fix: sentry sessions ([#26192](https://github.com/MetaMask/metamask-extension/pull/26192)) +- test: [Page Object Model] rename process to flow ([#26228](https://github.com/MetaMask/metamask-extension/pull/26228)) +- test: header integration test for contract interaction ([#25981](https://github.com/MetaMask/metamask-extension/pull/25981)) +- chore: Pass along hashed `rpcUrl` during `CustomNetworkAdded` event ([#26203](https://github.com/MetaMask/metamask-extension/pull/26203)) +- chore: Create a story for PageContainerHeader component ([#26031](https://github.com/MetaMask/metamask-extension/pull/26031)) +- chore: Create a story for GasTiming component ([#25557](https://github.com/MetaMask/metamask-extension/pull/25557)) +- New Crowdin translations by Github Action ([#26230](https://github.com/MetaMask/metamask-extension/pull/26230)) +- chore: update @metamask/bitcoin-wallet-snap to 0.4.0 ([#26229](https://github.com/MetaMask/metamask-extension/pull/26229)) +- fix: flaky test `Sentry errors before initialization, after opting into metrics @no-mmi should send error events in background` ([#26216](https://github.com/MetaMask/metamask-extension/pull/26216)) +- chore: Create a story for NftCollectionImage component ([#26069](https://github.com/MetaMask/metamask-extension/pull/26069)) +- fix: update icons ([#26180](https://github.com/MetaMask/metamask-extension/pull/26180)) +- refactor: replace Typography with Text component in restore-vault.js ([#25636](https://github.com/MetaMask/metamask-extension/pull/25636)) +- chore: Create a story for convert-token-to-nft-modal component ([#25561](https://github.com/MetaMask/metamask-extension/pull/25561)) +- refactor: replace deprecated mixins with Text component in qr-code-view ([#25637](https://github.com/MetaMask/metamask-extension/pull/25637)) +- test: Add manual scenario for network polling scenario ([#26195](https://github.com/MetaMask/metamask-extension/pull/26195)) +- feat: Add experimental settings toggle for transactions redesign ([#26010](https://github.com/MetaMask/metamask-extension/pull/26010)) +- feat: Support Permit variants: PermitSingle, PermitBatch, PermitTransferFrom, PermitBatchTransferFrom, TradeOrder, Seaport ([#26107](https://github.com/MetaMask/metamask-extension/pull/26107)) +- feat: updated dapp permission screen ([#25703](https://github.com/MetaMask/metamask-extension/pull/25703)) +- fix: improve performance in large signature request confirmations ([#26209](https://github.com/MetaMask/metamask-extension/pull/26209)) +- refactor: remove password manager mention ([#25985](https://github.com/MetaMask/metamask-extension/pull/25985)) +- New Crowdin translations by Github Action ([#25939](https://github.com/MetaMask/metamask-extension/pull/25939)) +- chore: remove opera manifest files as they are not used ([#26200](https://github.com/MetaMask/metamask-extension/pull/26200)) +- fix(deps): bump fast-xml-parser from 4.3.4 to 4.4.1. ([#26202](https://github.com/MetaMask/metamask-extension/pull/26202)) +- test: [Snaps E2E] remove unnecessary steps from snaps UI Images test ([#25640](https://github.com/MetaMask/metamask-extension/pull/25640)) +- fix: truncate long tokenId ([#26179](https://github.com/MetaMask/metamask-extension/pull/26179)) +- chore: Add en_GB locale ([#26196](https://github.com/MetaMask/metamask-extension/pull/26196)) +- chore: upgrade to Sentry 8 ([#25999](https://github.com/MetaMask/metamask-extension/pull/25999)) +- refactor: add unlock checks for notification related controllers ([#26189](https://github.com/MetaMask/metamask-extension/pull/26189)) +- fix: interpret multipart errors correctly and allow ignore ([#26113](https://github.com/MetaMask/metamask-extension/pull/26113)) +- feat: migrate global unit tests from Mocha to Jest ([#26104](https://github.com/MetaMask/metamask-extension/pull/26104)) +- fix: node being setup twice ([#26052](https://github.com/MetaMask/metamask-extension/pull/26052)) +- fix: setupControllerConnection outstream end event listener ([#26141](https://github.com/MetaMask/metamask-extension/pull/26141)) +- fix: Address performance issues with 'Portfolio Dashboard' loading in test environment ([#26182](https://github.com/MetaMask/metamask-extension/pull/26182)) +- chore: migrating interactive-replacement-token-page to ts ([#26115](https://github.com/MetaMask/metamask-extension/pull/26115)) +- chore: update @metamask/bitcoin-wallet-snap to 0.3.0 ([#26168](https://github.com/MetaMask/metamask-extension/pull/26168)) +- test: fix potential api-spec test race condition when adding to task queue ([#26171](https://github.com/MetaMask/metamask-extension/pull/26171)) +- fix(user-preference-currency-display): remove unused prop ethLogoHeight ([#24517](https://github.com/MetaMask/metamask-extension/pull/24517)) +- fix: update logos for flare-mainnet and songbird ([#25560](https://github.com/MetaMask/metamask-extension/pull/25560)) +- feat: define account name during creation ([#25191](https://github.com/MetaMask/metamask-extension/pull/25191)) +- chore: MMI move custody component to TS ([#26096](https://github.com/MetaMask/metamask-extension/pull/26096)) +- chore: add portfolio ephemeral domain URL ([#26163](https://github.com/MetaMask/metamask-extension/pull/26163)) +- fix: Flaky test `4byte setting ` ([#26111](https://github.com/MetaMask/metamask-extension/pull/26111)) +- fix: PPOM blockaid update ([#26154](https://github.com/MetaMask/metamask-extension/pull/26154)) +- fix: flaky BTC e2e tests ([#26082](https://github.com/MetaMask/metamask-extension/pull/26082)) +- chore: Add extra event props ([#26123](https://github.com/MetaMask/metamask-extension/pull/26123)) +- refactor: fix event names used to track notifications ([#25521](https://github.com/MetaMask/metamask-extension/pull/25521)) +- test: [Snaps E2E] Create test for snap dialog JSX functionality ([#25493](https://github.com/MetaMask/metamask-extension/pull/25493)) +- chore: update BNB logos ([#26140](https://github.com/MetaMask/metamask-extension/pull/26140)) +- chore: cleanup `.prettierignore` file ([#24828](https://github.com/MetaMask/metamask-extension/pull/24828)) +- chore: Bump `@metamask/ens-controller` to v12 ([#26127](https://github.com/MetaMask/metamask-extension/pull/26127)) +- chore: Bump `@metamask/transaction-controller` to v34 ([#26124](https://github.com/MetaMask/metamask-extension/pull/26124)) +- chore: Create a story for Snackbar component ([#25515](https://github.com/MetaMask/metamask-extension/pull/25515)) +- fix: add new helper function for `openMenuSafe` to mitigate all ocurrences for opening menu with MMI build ([#26079](https://github.com/MetaMask/metamask-extension/pull/26079)) +- feat: make add-team-label use the reusable workflow ([#25807](https://github.com/MetaMask/metamask-extension/pull/25807)) +- chore: MMI-5301 adds enums for custody type and status ([#26006](https://github.com/MetaMask/metamask-extension/pull/26006)) +- fix: remove btc account from permission connect lists ([#25980](https://github.com/MetaMask/metamask-extension/pull/25980)) +- feat: update network list item to include start accessory and end ([#25507](https://github.com/MetaMask/metamask-extension/pull/25507)) +- chore: mmi 5305 mmi pages typescript migration ([#26081](https://github.com/MetaMask/metamask-extension/pull/26081)) +- fix: Move Snaps hooks out of code fence ([#26120](https://github.com/MetaMask/metamask-extension/pull/26120)) +- feat: Mitigate risk for distracted users on queued transactions from different dApps ([#25852](https://github.com/MetaMask/metamask-extension/pull/25852)) +- feat: Add metrics event for advanced details section toggling ([#26083](https://github.com/MetaMask/metamask-extension/pull/26083)) +- fix: display link to privacy-policy explanation in onboarding flow ([#26038](https://github.com/MetaMask/metamask-extension/pull/26038)) +- chore: Create a story for InvalidCustomNetworkAlert component ([#25600](https://github.com/MetaMask/metamask-extension/pull/25600)) +- fix: number formatting on swap + send tx detail ([#26029](https://github.com/MetaMask/metamask-extension/pull/26029)) +- fix: Flaky test `Account Custom Name..` ([#26062](https://github.com/MetaMask/metamask-extension/pull/26062)) +- fix: snap flakiness on `installSnapSimpleKeyring` function ([#26039](https://github.com/MetaMask/metamask-extension/pull/26039)) +- fix: lock Chrome version to 126 ([#26101](https://github.com/MetaMask/metamask-extension/pull/26101)) +- fix: remove halo for tokens ([#26016](https://github.com/MetaMask/metamask-extension/pull/26016)) +- refactor: replace typography with text component in creation-successful.js ([#25552](https://github.com/MetaMask/metamask-extension/pull/25552)) +- fix: `vault decryption` broken tests due to update on window handling ([#26074](https://github.com/MetaMask/metamask-extension/pull/26074)) +- docs: Centralize Author/Team Mapping for Commit Tracking ([#25986](https://github.com/MetaMask/metamask-extension/pull/25986)) +- fix: flaky test: Check the toggle for hex data ([#25899](https://github.com/MetaMask/metamask-extension/pull/25899)) +- chore: migrated institutional ui components to ts ([#25858](https://github.com/MetaMask/metamask-extension/pull/25858)) +- chore: removed unused component ([#26000](https://github.com/MetaMask/metamask-extension/pull/26000)) +- chore: update Bitcoin Snap to version 0.2.5 ([#26058](https://github.com/MetaMask/metamask-extension/pull/26058)) +- refactor: replace Typography with Text component in metametrics.js ([#25630](https://github.com/MetaMask/metamask-extension/pull/25630)) +- refactor: replace typography with text component in review recovery phrase ([#25265](https://github.com/MetaMask/metamask-extension/pull/25265)) +- test: new switchToWindowWithTitle w/ Extension communication ([#25362](https://github.com/MetaMask/metamask-extension/pull/25362)) +- ci: Trimming the gitdiff output before writing to output file ([#26057](https://github.com/MetaMask/metamask-extension/pull/26057)) +- chore: tweak send page styling ([#25982](https://github.com/MetaMask/metamask-extension/pull/25982)) +- fix: mmi flaky tests `Reveal SRP through settings completes quiz and reveals SRP QR after wrong answers` , `Sign Typed Data Signature Request can initiate and reject a Signature Request of Sign Typed Data`, `Sign Typed Data Signature Request can queue multiple Signature Requests of Sign Typed Data and confirm` ([#26055](https://github.com/MetaMask/metamask-extension/pull/26055)) +- chore: Create a story for IconButton component ([#25277](https://github.com/MetaMask/metamask-extension/pull/25277)) +- fix: center token icon ([#26013](https://github.com/MetaMask/metamask-extension/pull/26013)) +- fix: flaky test `Import flow @no-mmi Import wallet using Secret Recovery Phrase with pasting word by word` ([#26049](https://github.com/MetaMask/metamask-extension/pull/26049)) +- fix: flaky test 25912 ([#25913](https://github.com/MetaMask/metamask-extension/pull/25913)) +- chore: add privacy query params to portfolio navigation ([#25958](https://github.com/MetaMask/metamask-extension/pull/25958)) +- chore: Temporarily disable Playwright Swaps tests ([#26050](https://github.com/MetaMask/metamask-extension/pull/26050)) +- fix: Remove special reject button case from api spec tests ([#26048](https://github.com/MetaMask/metamask-extension/pull/26048)) +- test(e2e): unlock trezor account ([#25824](https://github.com/MetaMask/metamask-extension/pull/25824)) +- fix: Flaky "Signature Approved Event" e2e test ([#26040](https://github.com/MetaMask/metamask-extension/pull/26040)) +- feat: Migration #122 set redesignedConfirmationsEnabled to true ([#25769](https://github.com/MetaMask/metamask-extension/pull/25769)) +- fix: Revert "refactor: use withKeyring method (#25435)" ([#25435](https://github.com/MetaMask/metamask-extension/pull/25435)) +- fix: :label: update the text in the popup to enable notifications ([#26026](https://github.com/MetaMask/metamask-extension/pull/26026)) +- fix: map the supported block explorers ([#25908](https://github.com/MetaMask/metamask-extension/pull/25908)) +- fix: update css for modals ([#25961](https://github.com/MetaMask/metamask-extension/pull/25961)) +- fix: Fix permssions for `update-attributions` workflow ([#26019](https://github.com/MetaMask/metamask-extension/pull/26019)) +- fix: add migration for profile syncing controller ([#26004](https://github.com/MetaMask/metamask-extension/pull/26004)) +- test: Adding e2e for SIWE and re-enabling redesign for SIWE ([#25831](https://github.com/MetaMask/metamask-extension/pull/25831)) +- test: UX: Multichain: Add E2E for signaling network change from Network menu to dapp, Autoswitching networks ([#25765](https://github.com/MetaMask/metamask-extension/pull/25765)) +- feat: Move ENABLE_CONFIRMATION_REDESIGN feature flag to the developer settings page ([#25520](https://github.com/MetaMask/metamask-extension/pull/25520)) +- fix: `yarn:start:test:flask` is broken `Lavapack is not defined` ([#25995](https://github.com/MetaMask/metamask-extension/pull/25995)) +- feat: add utility function to get supported chains from the Security Alerts API ([#25716](https://github.com/MetaMask/metamask-extension/pull/25716)) +- fix: `vault-decryption` test since the order of announcement modals changed ([#25997](https://github.com/MetaMask/metamask-extension/pull/25997)) +- fix: updated switch to this account condition ([#25609](https://github.com/MetaMask/metamask-extension/pull/25609)) +- fix: flaky test Settings Redirects to ENS domains when user inputs ENS into address bar ([#25782](https://github.com/MetaMask/metamask-extension/pull/25782)) +- chore: MMI-5248 introduce the token allowance functionality for MMI ([#25967](https://github.com/MetaMask/metamask-extension/pull/25967)) +- fix: vertically align asset image ([#25988](https://github.com/MetaMask/metamask-extension/pull/25988)) +- feat: Adding state per window in e2e, excluding null state ([#25900](https://github.com/MetaMask/metamask-extension/pull/25900)) +- fix: attribution link ([#25947](https://github.com/MetaMask/metamask-extension/pull/25947)) +- feat: Enable hardware wallets for smart transactions in swaps ([#25742](https://github.com/MetaMask/metamask-extension/pull/25742)) +- fix: fix link redirection ([#25983](https://github.com/MetaMask/metamask-extension/pull/25983)) +- fix: fix overlapping modals ([#25962](https://github.com/MetaMask/metamask-extension/pull/25962)) +- feat: Show the Close extension button on the Smart Transaction Status Page for a pending dapp transaction ([#25965](https://github.com/MetaMask/metamask-extension/pull/25965)) +- fix(multichain): use accounts{Added,Removed} to fetch/clear balances ([#25884](https://github.com/MetaMask/metamask-extension/pull/25884)) +- test: Add integration tests for permit simulation section ([#25856](https://github.com/MetaMask/metamask-extension/pull/25856)) +- fix: fixed max width for permissions page ([#25870](https://github.com/MetaMask/metamask-extension/pull/25870)) +- fix: show current network if domains are undefined ([#25960](https://github.com/MetaMask/metamask-extension/pull/25960)) +- fix: notification slowness and crashes ([#25946](https://github.com/MetaMask/metamask-extension/pull/25946)) +- ci: Disabling non-lint CI on the l10n_crowdin_action branch ([#25809](https://github.com/MetaMask/metamask-extension/pull/25809)) +- refactor: use `withKeyring` method ([#25435](https://github.com/MetaMask/metamask-extension/pull/25435)) +- feat: add BTC support survey link ([#25875](https://github.com/MetaMask/metamask-extension/pull/25875)) +- fix: re-organize files under assets folder ([#25897](https://github.com/MetaMask/metamask-extension/pull/25897)) +- fix: fix css nft detail ([#25931](https://github.com/MetaMask/metamask-extension/pull/25931)) +- fix: Implement Auto-Enable Feature for Basic Functionality in Metamask Extension v12.1.0 ([#25944](https://github.com/MetaMask/metamask-extension/pull/25944)) +- fix: Handle error when offscreen document already exists ([#25138](https://github.com/MetaMask/metamask-extension/pull/25138)) +- test: Expand coverage of sourcemap validator ([#25115](https://github.com/MetaMask/metamask-extension/pull/25115)) +- feat: Add full screen Snap Home and Dialog ([#25670](https://github.com/MetaMask/metamask-extension/pull/25670)) +- chore: swaps codeowners reorg ([#24803](https://github.com/MetaMask/metamask-extension/pull/24803)) +- fix: track token detection enabled ([#25822](https://github.com/MetaMask/metamask-extension/pull/25822)) +- fix: rm locales in other languages ([#25936](https://github.com/MetaMask/metamask-extension/pull/25936)) +- fix: fix ([#25907](https://github.com/MetaMask/metamask-extension/pull/25907)) +- fix: password reset ([#25847](https://github.com/MetaMask/metamask-extension/pull/25847)) +- New Crowdin translations by Github Action ([#24889](https://github.com/MetaMask/metamask-extension/pull/24889)) +- fix: Remove abandoned test:unit:jest command ([#25905](https://github.com/MetaMask/metamask-extension/pull/25905)) +- fix(22851): check if active device to prevent autoconnect for hw ([#25503](https://github.com/MetaMask/metamask-extension/pull/25503)) +- test: Removed step from e2e tests ([#25910](https://github.com/MetaMask/metamask-extension/pull/25910)) +- fix: calcTokenAmount BigNumber more than 15 digits error ([#25799](https://github.com/MetaMask/metamask-extension/pull/25799)) +- feat: add custom form check alerts ([#25259](https://github.com/MetaMask/metamask-extension/pull/25259)) +- fix: test failure on firefox ([#25895](https://github.com/MetaMask/metamask-extension/pull/25895)) +- fix: disables "swap and send" for MMI ([#25886](https://github.com/MetaMask/metamask-extension/pull/25886)) +- fix: Fixed flaky test 24645 ([#25786](https://github.com/MetaMask/metamask-extension/pull/25786)) +- chore: refactor SwapsController so it extends from BaseControllerV2 ([#25681](https://github.com/MetaMask/metamask-extension/pull/25681)) +- feat: Replace "Manage in settings" with "No thanks" in the STX Opt In modal, only show the modal for non-zero balances ([#25848](https://github.com/MetaMask/metamask-extension/pull/25848)) +- feat: Display advanced section within confirmation by default for some users ([#25687](https://github.com/MetaMask/metamask-extension/pull/25687)) +- chore: bump assets-controllers to v36.0.0 ([#25857](https://github.com/MetaMask/metamask-extension/pull/25857)) +- fix: add name to scuttling exception list ([#25849](https://github.com/MetaMask/metamask-extension/pull/25849)) +- fix: update build version to align with firefox's newer version restrictions ([#25456](https://github.com/MetaMask/metamask-extension/pull/25456)) +- feat: regression label ([#25691](https://github.com/MetaMask/metamask-extension/pull/25691)) +- chore: Master sync ([#25816](https://github.com/MetaMask/metamask-extension/pull/25816)) +- fix: contract data in metrics ([#25759](https://github.com/MetaMask/metamask-extension/pull/25759)) +- fix: flaky test `ERC721 NFTs testdapp interaction` ([#25854](https://github.com/MetaMask/metamask-extension/pull/25854)) +- fix: flaky test `Create BTC Account cannot create multiple BTC accounts...` ([#25861](https://github.com/MetaMask/metamask-extension/pull/25861)) +- feat: support creation of Bitcoin testnet accounts ([#25772](https://github.com/MetaMask/metamask-extension/pull/25772)) +- fix: use of an header in a dedicated call ([#25828](https://github.com/MetaMask/metamask-extension/pull/25828)) +- feat(tests): add btc e2e tests ([#25663](https://github.com/MetaMask/metamask-extension/pull/25663)) +- feat: NFT details new design ([#25524](https://github.com/MetaMask/metamask-extension/pull/25524)) +- feat: Add fuzzy matching for name lookup ([#25264](https://github.com/MetaMask/metamask-extension/pull/25264)) +- fix: edit path to dist folder ([#25826](https://github.com/MetaMask/metamask-extension/pull/25826)) +- chore: Patch security issue in snaps-utils ([#25827](https://github.com/MetaMask/metamask-extension/pull/25827)) +- feat: add option of copy to info row component ([#25682](https://github.com/MetaMask/metamask-extension/pull/25682)) +- fix: skip blockaid validations for users internal accounts ([#25695](https://github.com/MetaMask/metamask-extension/pull/25695)) +- chore: refactor custody component ([#25684](https://github.com/MetaMask/metamask-extension/pull/25684)) +- Merge origin/develop into master-sync +- chore: update @metamask/bitcoin-wallet-snap to 0.2.4 ([#25808](https://github.com/MetaMask/metamask-extension/pull/25808)) +- chore: removed unused getCustodianAccountsByAddress method ([#25798](https://github.com/MetaMask/metamask-extension/pull/25798)) +- feat: Make Jest unit tests run faster in GitHub actions ([#25726](https://github.com/MetaMask/metamask-extension/pull/25726)) +- revert: un-revert metrics and signature refactor test ([#25758](https://github.com/MetaMask/metamask-extension/pull/25758)) +- feat: Add `ui_customizations` metric for transactions ([#25736](https://github.com/MetaMask/metamask-extension/pull/25736)) +- test: add e2e tests for navigation (#25652) ([#25652](https://github.com/MetaMask/metamask-extension/pull/25652)) +- chore: remove `BTC_BETA_SUPPORT` flag ([#25776](https://github.com/MetaMask/metamask-extension/pull/25776)) +- chore: update @metamask/bitcoin-wallet-snap to 0.2.3 ([#25775](https://github.com/MetaMask/metamask-extension/pull/25775)) +- feat: add more whitelisted portfolio URLs ([#25767](https://github.com/MetaMask/metamask-extension/pull/25767)) +- fix: Fix page width for fullscreen mode send page ([#25639](https://github.com/MetaMask/metamask-extension/pull/25639)) +- chore: Update Snaps codeowners list ([#25581](https://github.com/MetaMask/metamask-extension/pull/25581)) +- fix: fine-tune for `Delineator` component styles ([#25760](https://github.com/MetaMask/metamask-extension/pull/25760)) +- feat: decode transaction data ([#25597](https://github.com/MetaMask/metamask-extension/pull/25597)) +- feat: add `Delineator` component ([#25610](https://github.com/MetaMask/metamask-extension/pull/25610)) +- feat(ramps): update isNativeTokenBuyable to include BTC ([#25621](https://github.com/MetaMask/metamask-extension/pull/25621)) +- fix: Fix issue 25285 max insufficient funds for gas ([#25574](https://github.com/MetaMask/metamask-extension/pull/25574)) +- feat: add BTC experimental toggle ([#25672](https://github.com/MetaMask/metamask-extension/pull/25672)) +- build: bump gas-fee-controller to v18 and remove patch ([#25679](https://github.com/MetaMask/metamask-extension/pull/25679)) +- fix: show correct asset and balance when BTC account is the selected account ([#25719](https://github.com/MetaMask/metamask-extension/pull/25719)) +- feat(btc): add BTC account creation menu entry ([#25625](https://github.com/MetaMask/metamask-extension/pull/25625)) +- fix: flaky test `Test Snap Metrics test snap update rejected metric` ([#25744](https://github.com/MetaMask/metamask-extension/pull/25744)) +- chore(deps): bump @metamask/accounts-controller from ^17.0.0 to ^17.2.0 ([#25676](https://github.com/MetaMask/metamask-extension/pull/25676)) +- fix: use LAVAMOAT_UPDATE_TOKEN in attributions workflow ([#25731](https://github.com/MetaMask/metamask-extension/pull/25731)) +- fix: caveat mutations for non-EVM accounts ([#25739](https://github.com/MetaMask/metamask-extension/pull/25739)) +- test: Add UI integration tests ([#24428](https://github.com/MetaMask/metamask-extension/pull/24428)) +- fix: revert "test: add e2e tests for navigation (#25652)" ([#25652](https://github.com/MetaMask/metamask-extension/pull/25652)) +- chore: Revert "test: e2e metrics test and refactor" ([#25722](https://github.com/MetaMask/metamask-extension/pull/25722)) +- feat: bundle pre-installed Bitcoin Wallet Snap ([#25715](https://github.com/MetaMask/metamask-extension/pull/25715)) +- fix: protect against phishing domain redirects in main/sub frames for http(s) requests ([#25153](https://github.com/MetaMask/metamask-extension/pull/25153)) +- fix: Fix crash of Transaction screen with smart transaction ([#25717](https://github.com/MetaMask/metamask-extension/pull/25717)) +- fix: Hide MMI Account Mistmatch BannerAlert from Sign-in with Ethereum (SIWE) Redesign Page ([#25662](https://github.com/MetaMask/metamask-extension/pull/25662)) +- fix: flaky test `Create token, approve token and approve token without gas approves an already created token and displays the token approval data` ([#25706](https://github.com/MetaMask/metamask-extension/pull/25706)) +- feat: Enable SIWE Signature Redesign ([#25660](https://github.com/MetaMask/metamask-extension/pull/25660)) +- fix: flaky test `Request-queue UI changes handles three confirmations on three confirmations concurrently` ([#25675](https://github.com/MetaMask/metamask-extension/pull/25675)) +- feat: move unit tests from Circleci to Github actions ([#25570](https://github.com/MetaMask/metamask-extension/pull/25570)) +- test: e2e metrics test and refactor ([#25632](https://github.com/MetaMask/metamask-extension/pull/25632)) +- test: add e2e tests for navigation ([#25652](https://github.com/MetaMask/metamask-extension/pull/25652)) +- feat: support security alerts API ([#25544](https://github.com/MetaMask/metamask-extension/pull/25544)) +- feat(ramps): add flag to ensure ramp networks are only fetched once ([#25686](https://github.com/MetaMask/metamask-extension/pull/25686)) +- fix: allow ramps dev environment on Flask ([#25659](https://github.com/MetaMask/metamask-extension/pull/25659)) +- feat: added check for if the selected account is BTC in transaction-list ([#25642](https://github.com/MetaMask/metamask-extension/pull/25642)) +- feat: Gas Fees Redesign PoC ([#24714](https://github.com/MetaMask/metamask-extension/pull/24714)) +- fix: show connected toast only for EVM accounts ([#25628](https://github.com/MetaMask/metamask-extension/pull/25628)) +- fix: changed logic to use the new banner alert ([#25626](https://github.com/MetaMask/metamask-extension/pull/25626)) +- fix: set network client id for domain ([#25646](https://github.com/MetaMask/metamask-extension/pull/25646)) +- feat: improvement for how we display big and small numbers ([#25438](https://github.com/MetaMask/metamask-extension/pull/25438)) +- chore: restore bot workflow to update attributions ([#25211](https://github.com/MetaMask/metamask-extension/pull/25211)) +- test: add swap e2e tests on Tenderly network ([#25060](https://github.com/MetaMask/metamask-extension/pull/25060)) +- fix: UX: Multichain: Add safeguard to throw error when confirmation chainId doesn't match current chainId ([#25634](https://github.com/MetaMask/metamask-extension/pull/25634)) +- chore: updates MMI custody controller ([#25631](https://github.com/MetaMask/metamask-extension/pull/25631)) +- fix: flaky test `Test Snap Get Locale test snap_getLocale functionality` ([#25648](https://github.com/MetaMask/metamask-extension/pull/25648)) +- fix: Skip blockaid validation for SIWE signature types ([#25612](https://github.com/MetaMask/metamask-extension/pull/25612)) +- feat: Add support for security alerts on zkSync, Berachain, Scroll and Metachain One on extension ([#25555](https://github.com/MetaMask/metamask-extension/pull/25555)) +- fix: Multichain: UX: Check for transactions on all networks and QueuedRequestCount ([#25614](https://github.com/MetaMask/metamask-extension/pull/25614)) +- feat: define which keyring methods Portfolio can call ([#25633](https://github.com/MetaMask/metamask-extension/pull/25633)) +- chore: flaky E2E tests improved ([#25565](https://github.com/MetaMask/metamask-extension/pull/25565)) +- feat: add SIWE mismatch account warning alert ([#25613](https://github.com/MetaMask/metamask-extension/pull/25613)) +- fix: support multichain in blockexplorer and qr code ([#25526](https://github.com/MetaMask/metamask-extension/pull/25526)) +- fix: decimal places displayed on token value on permit pages ([#25410](https://github.com/MetaMask/metamask-extension/pull/25410)) +- feat: added BTC variant to ramps-card and illustration image ([#25615](https://github.com/MetaMask/metamask-extension/pull/25615)) +- fix: Remove unused fixtures and fix test name in smart swaps disabled spec ([#25616](https://github.com/MetaMask/metamask-extension/pull/25616)) +- chore: Update @metamask/smart-transactions-controller from 10.1.2 to 10.1.6 ([#25611](https://github.com/MetaMask/metamask-extension/pull/25611)) +- fix: Fix issue 22837 about unknown error during ledger pair ([#25462](https://github.com/MetaMask/metamask-extension/pull/25462)) +- test: add e2e to swap with snap account ([#25558](https://github.com/MetaMask/metamask-extension/pull/25558)) +- chore: exclude running git diff job for the e2e quality gate in `develop`, `master` and release branches ([#25605](https://github.com/MetaMask/metamask-extension/pull/25605)) +- chore: [Delivery] Update author mapping list for PR ([#25606](https://github.com/MetaMask/metamask-extension/pull/25606)) +- fix: page object selector not found ([#25624](https://github.com/MetaMask/metamask-extension/pull/25624)) +- test: Initial PR for integrating the Page Object Model (POM) into e2e test suite ([#25373](https://github.com/MetaMask/metamask-extension/pull/25373)) +- refactor: Replace deprecated mixins with Text component in selected-account.component.js ([#25262](https://github.com/MetaMask/metamask-extension/pull/25262)) +- refactor: Replace deprecated mixins with Text component in unlock-page.component.js ([#25227](https://github.com/MetaMask/metamask-extension/pull/25227)) +- chore: Create a story for RestoreVaultPage component ([#25284](https://github.com/MetaMask/metamask-extension/pull/25284)) +- fix(snaps): Fix alignment of install origin is `snap-authorship-expanded` ([#25583](https://github.com/MetaMask/metamask-extension/pull/25583)) +- feat: Remove blockaid migration BannerAlert ([#25556](https://github.com/MetaMask/metamask-extension/pull/25556)) +- fix: failingt e2e `Click bridge button from asset page @no-mmi loads portfolio tab when flag is turned off` ([#25607](https://github.com/MetaMask/metamask-extension/pull/25607)) +- chore: adds quality gate for rerunning e2e spec files that are new or have been modified ([#24556](https://github.com/MetaMask/metamask-extension/pull/24556)) +- chore(deps): bump assets controller to v34.0.0 ([#25540](https://github.com/MetaMask/metamask-extension/pull/25540)) +- chore: add bridge controller, store and api utils ([#25044](https://github.com/MetaMask/metamask-extension/pull/25044)) +- fix: add eth_signTypedData and eth_signTypedData_v3 to `methodsRequiringNetworkSwitch` ([#25562](https://github.com/MetaMask/metamask-extension/pull/25562)) + ## [12.1.0] ### Added - Launched a feature displaying the percentage increase or decrease for tokens within the UI ([#24223](https://github.com/MetaMask/metamask-extension/pull/24223)) @@ -4996,7 +5404,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.4.0...HEAD +[12.4.0]: https://github.com/MetaMask/metamask-extension/compare/v12.1.0...v12.4.0 [12.1.0]: https://github.com/MetaMask/metamask-extension/compare/v12.0.6...v12.1.0 [12.0.6]: https://github.com/MetaMask/metamask-extension/compare/v12.0.5...v12.0.6 [12.0.5]: https://github.com/MetaMask/metamask-extension/compare/v12.0.4...v12.0.5 diff --git a/package.json b/package.json index ce10cc9eda9a..f9fafd91540d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.1.0", + "version": "12.4.0", "private": true, "repository": { "type": "git", From bdc819ae9aa954e625b48e8c6fdb7a871e894379 Mon Sep 17 00:00:00 2001 From: Jony Bursztyn Date: Wed, 4 Sep 2024 17:11:59 +0100 Subject: [PATCH 02/41] fix: move porfolio button next to price amount (#26867) (#26897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry picks: https://github.com/MetaMask/metamask-extension/pull/26867 into V12.5.0 ## **Description** Moves the portfolio button so that it's next to the token price amount. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26867?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3201 ## **Manual testing steps** 1. Go to the portfolio page 2. Check that the Portfolio button is present next to the price amount of token 3. Click it to test it works fine ## **Screenshots/Recordings** Screenshot 2024-09-03 at 22 57 32 Screenshot 2024-09-03 at 22 58 54 ### **Before** Screenshot 2024-09-03 at 15 46 36 ### **After** Screenshot 2024-09-03 at 22 58 54 ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] 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-extension/blob/develop/.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. --- .../app/wallet-overview/coin-buttons.tsx | 32 ++++++------ .../app/wallet-overview/coin-overview.tsx | 51 +++++++++++-------- ui/components/app/wallet-overview/index.scss | 6 +++ .../__snapshots__/asset-page.test.tsx.snap | 24 ++++----- 4 files changed, 63 insertions(+), 50 deletions(-) diff --git a/ui/components/app/wallet-overview/coin-buttons.tsx b/ui/components/app/wallet-overview/coin-buttons.tsx index 1bd24c23ecdb..73b0679b49a7 100644 --- a/ui/components/app/wallet-overview/coin-buttons.tsx +++ b/ui/components/app/wallet-overview/coin-buttons.tsx @@ -326,22 +326,6 @@ const CoinButtons = ({ ///: END:ONLY_INCLUDE_IF } - - } - disabled={!isSigningEnabled} - label={t('send')} - onClick={handleSendOnClick} - tooltipRender={(contents: React.ReactElement) => - generateTooltip('sendButton', contents) - } - /> ///: END:ONLY_INCLUDE_IF } + + } + disabled={!isSigningEnabled} + label={t('send')} + onClick={handleSendOnClick} + tooltipRender={(contents: React.ReactElement) => + generateTooltip('sendButton', contents) + } + /> { <> {showReceiveModal && ( diff --git a/ui/components/app/wallet-overview/coin-overview.tsx b/ui/components/app/wallet-overview/coin-overview.tsx index 547ef107b05d..1a5e408bcac5 100644 --- a/ui/components/app/wallet-overview/coin-overview.tsx +++ b/ui/components/app/wallet-overview/coin-overview.tsx @@ -4,7 +4,7 @@ import classnames from 'classnames'; import { zeroAddress } from 'ethereumjs-util'; import { CaipChainId } from '@metamask/utils'; import type { Hex } from '@metamask/utils'; -import { Icon, IconName } from '../../component-library'; +import { Icon, IconName, IconSize } from '../../component-library'; import { IconColor } from '../../../helpers/constants/design-system'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { @@ -122,14 +122,6 @@ export const CoinOverview = ({ disabled={!balanceIsCached} >
-
- {t('portfolio')} - -
{balance ? ( )}
- {showFiat && isOriginalNativeSymbol && balance && ( - - )} +
+ {showFiat && isOriginalNativeSymbol && balance && ( + + )} +
+ {t('portfolio')} + +
+
{isEvm && ( -
@@ -42,20 +28,6 @@ exports[`Import Token Link should match snapshot for mainnet chainId 1`] = `
{ const t = useI18nContext(); @@ -39,32 +34,6 @@ export const ConnectionListItem = ({ connection, onClick }) => { getPermittedChainsForSelectedTab(state, connection.origin), ); - const renderListItem = process.env.CHAIN_PERMISSIONS ? ( - - ) : ( - - } - > - - - ); - return ( { avatarSize={IconSize.Md} /> ) : ( - <>{renderListItem} + )} { alignItems={AlignItems.center} gap={1} > - {process.env.CHAIN_PERMISSIONS ? ( - - {connection.addresses.length} {t('accountsSmallCase')}  - •  - {connectedNetworks.length} {t('networksSmallCase')} - - ) : ( - <> - - {t('connectedWith')} - - - - - )} + + {connection.addresses.length} {t('accountsSmallCase')}  + •  + {connectedNetworks.length} {t('networksSmallCase')} + )} diff --git a/ui/components/multichain/pages/permissions-page/connection-list-item.test.js b/ui/components/multichain/pages/permissions-page/connection-list-item.test.js index 7e9205517cd5..ffec0e4a3b28 100644 --- a/ui/components/multichain/pages/permissions-page/connection-list-item.test.js +++ b/ui/components/multichain/pages/permissions-page/connection-list-item.test.js @@ -37,6 +37,10 @@ describe('ConnectionListItem', () => { iconUrl: 'https://metamask.github.io/test-dapp/metamask-fox.svg', networkIconUrl: 'https://metamask.github.io/test-dapp/metamask-fox.svg', networkName: 'Test Dapp Network', + addresses: [ + '0xaaaF07C80ce267F3132cE7e6048B66E6E669365B', + '0xbbbD671F1Fcc94bCF0ebC6Ec4790Da35E8d5e1E1', + ], }; const { getByText, getByTestId } = renderWithProvider( @@ -70,36 +74,4 @@ describe('ConnectionListItem', () => { fireEvent.click(getByTestId('connection-list-item')); expect(onClickMock).toHaveBeenCalledTimes(1); }); - - it('renders badgewrapper correctly for non-Snap connection', () => { - const onClickMock = jest.fn(); - const mockConnection2 = { - extensionId: null, - iconUrl: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - name: 'MM Test Dapp', - origin: 'https://metamask.github.io', - subjectType: 'website', - addresses: ['0x0836f5ed6b62baf60706fe3adc0ff0fd1df833da'], - addressToNameMap: { - '0x0836f5ed6b62baf60706fe3adc0ff0fd1df833da': - 'Unreasonably long account name', - }, - networkIconUrl: './images/eth_logo.svg', - networkName: 'Ethereum Mainnet', - }; - const { getByTestId } = renderWithProvider( - , - store, - ); - - expect( - getByTestId('connection-list-item__avatar-network-badge'), - ).toBeInTheDocument(); - - expect( - document - .querySelector('.mm-avatar-network__network-image') - .getAttribute('src'), - ).toBe(mockConnection2.networkIconUrl); - }); }); diff --git a/ui/components/multichain/pages/permissions-page/permissions-page.js b/ui/components/multichain/pages/permissions-page/permissions-page.js index 2b5a99fc55f5..491e041d7ac5 100644 --- a/ui/components/multichain/pages/permissions-page/permissions-page.js +++ b/ui/components/multichain/pages/permissions-page/permissions-page.js @@ -23,7 +23,6 @@ import { TextVariant, } from '../../../../helpers/constants/design-system'; import { - CONNECTIONS, DEFAULT_ROUTE, REVIEW_PERMISSIONS, } from '../../../../helpers/constants/routes'; @@ -34,6 +33,7 @@ import { } from '../../../../selectors'; import { ProductTour } from '../../product-tour-popover'; import { hidePermissionsTour } from '../../../../store/actions'; +import { isSnapId } from '../../../../helpers/utils/snaps'; import { ConnectionListItem } from './connection-list-item'; export const PermissionsPage = () => { @@ -54,16 +54,14 @@ export const PermissionsPage = () => { const handleConnectionClick = (connection) => { const hostName = connection.origin; const safeEncodedHost = encodeURIComponent(hostName); - if (process.env.CHAIN_PERMISSIONS) { - history.push(`${REVIEW_PERMISSIONS}/${safeEncodedHost}`); - } else { - history.push(`${CONNECTIONS}/${safeEncodedHost}`); - } + + history.push(`${REVIEW_PERMISSIONS}/${safeEncodedHost}`); }; const renderConnectionsList = (connectionList) => Object.entries(connectionList).map(([itemKey, connection]) => { - return ( + const isSnap = isSnapId(connection.origin); + return isSnap ? null : ( { startIconName={IconName.Logout} danger onClick={() => setShowDisconnectAllModal(true)} + data-test-id="disconnect-all" > {t('disconnect')} diff --git a/ui/pages/permissions-connect/__snapshots__/permissions-connect.test.tsx.snap b/ui/pages/permissions-connect/__snapshots__/permissions-connect.test.tsx.snap deleted file mode 100644 index 3115caf5af16..000000000000 --- a/ui/pages/permissions-connect/__snapshots__/permissions-connect.test.tsx.snap +++ /dev/null @@ -1,236 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`PermissionApprovalContainer ConnectPath renders correctly 1`] = ` -
-
-
-
-
-
- m -
-
-
-

- metamask.io -

-

- https://metamask.io -

-
-
-
- - -
-
-`; diff --git a/ui/pages/permissions-connect/permissions-connect.component.js b/ui/pages/permissions-connect/permissions-connect.component.js index 09befa7218cd..417a82777b36 100644 --- a/ui/pages/permissions-connect/permissions-connect.component.js +++ b/ui/pages/permissions-connect/permissions-connect.component.js @@ -19,6 +19,7 @@ import { // TODO: Remove restricted import // eslint-disable-next-line import/no-restricted-paths import { PermissionNames } from '../../../app/scripts/controllers/permissions'; +import { isSnapId } from '../../helpers/utils/snaps'; import ChooseAccount from './choose-account'; import PermissionsRedirect from './redirect'; import SnapsConnect from './snaps/snaps-connect'; @@ -328,6 +329,8 @@ export default class PermissionConnect extends Component { snapsInstallPrivacyWarningShown, } = this.state; + const isRequestingSnap = isSnapId(permissionsRequest?.metadata?.origin); + return (
{!hideTopBar && this.renderTopBar(permissionsRequestId)} @@ -339,17 +342,7 @@ export default class PermissionConnect extends Component { path={connectPath} exact render={() => - process.env.CHAIN_PERMISSIONS ? ( - - this.cancelPermissionsRequest(requestId) - } - activeTabOrigin={this.state.origin} - request={permissionsRequest} - permissionsRequestId={permissionsRequestId} - approveConnection={this.approveConnection} - /> - ) : ( + isRequestingSnap ? ( + ) : ( + + this.cancelPermissionsRequest(requestId) + } + activeTabOrigin={this.state.origin} + request={permissionsRequest} + permissionsRequestId={permissionsRequestId} + approveConnection={this.approveConnection} + /> ) } /> diff --git a/ui/pages/permissions-connect/permissions-connect.test.tsx b/ui/pages/permissions-connect/permissions-connect.test.tsx deleted file mode 100644 index 05b1120cf5d8..000000000000 --- a/ui/pages/permissions-connect/permissions-connect.test.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import React from 'react'; -import configureStore from 'redux-mock-store'; -import thunk from 'redux-thunk'; - -import { ApprovalType } from '@metamask/controller-utils'; -import { BtcAccountType } from '@metamask/keyring-api'; -import { fireEvent } from '@testing-library/react'; -// TODO: Remove restricted import -// eslint-disable-next-line import/no-restricted-paths -import messages from '../../../app/_locales/en/messages.json'; -import { renderWithProvider } from '../../../test/lib/render-helpers'; -import mockState from '../../../test/data/mock-state.json'; -import { CONNECT_ROUTE } from '../../helpers/constants/routes'; -import { createMockInternalAccount } from '../../../test/jest/mocks'; -import { shortenAddress } from '../../helpers/utils/util'; -import PermissionApprovalContainer from './permissions-connect.container'; - -const mockPermissionRequestId = '0cbc1f26-8772-4512-8ad7-f547d6e8b72c'; - -jest.mock('../../store/actions', () => { - return { - ...jest.requireActual('../../store/actions'), - getRequestAccountTabIds: jest.fn().mockReturnValue({ - type: 'SET_REQUEST_ACCOUNT_TABS', - payload: {}, - }), - }; -}); - -const mockAccount = createMockInternalAccount({ name: 'Account 1' }); -const mockBtcAccount = createMockInternalAccount({ - name: 'BTC Account', - address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq', - type: BtcAccountType.P2wpkh, -}); - -const defaultProps = { - history: { - location: { - pathname: `${CONNECT_ROUTE}/${mockPermissionRequestId}`, - }, - }, - location: { - pathname: `${CONNECT_ROUTE}/${mockPermissionRequestId}`, - }, - match: { - params: { - id: mockPermissionRequestId, - }, - }, -}; - -const render = ( - props = defaultProps, - type: ApprovalType = ApprovalType.WalletRequestPermissions, -) => { - let pendingPermission; - if (type === ApprovalType.WalletRequestPermissions) { - pendingPermission = { - id: mockPermissionRequestId, - origin: 'https://metamask.io', - type: ApprovalType.WalletRequestPermissions, - time: 1721376328642, - requestData: { - metadata: { - id: mockPermissionRequestId, - origin: 'https://metamask.io', - }, - permissions: { - eth_accounts: {}, - }, - }, - requestState: null, - expectsResult: false, - }; - } - - const state = { - ...mockState, - metamask: { - ...mockState.metamask, - internalAccounts: { - accounts: { - [mockAccount.id]: mockAccount, - [mockBtcAccount.id]: mockBtcAccount, - }, - selectedAccount: mockAccount.id, - }, - keyrings: [ - { - type: 'HD Key Tree', - accounts: [mockAccount.address], - }, - { - type: 'Snap Keyring', - accounts: [mockBtcAccount.address], - }, - ], - accounts: { - [mockAccount.address]: { - address: mockAccount.address, - balance: '0x0', - }, - }, - balances: { - [mockBtcAccount.id]: {}, - }, - pendingApprovals: { - [mockPermissionRequestId]: pendingPermission, - }, - }, - }; - const middlewares = [thunk]; - const mockStore = configureStore(middlewares); - const store = mockStore(state); - - return { - render: renderWithProvider( - , - store, - `${CONNECT_ROUTE}/${mockPermissionRequestId}`, - ), - store, - }; -}; - -describe('PermissionApprovalContainer', () => { - describe('ConnectPath', () => { - it('renders correctly', () => { - const { - render: { container, getByText }, - } = render(); - expect(getByText(messages.next.message)).toBeInTheDocument(); - expect(getByText(messages.cancel.message)).toBeInTheDocument(); - expect(container).toMatchSnapshot(); - }); - - it('renders the list without BTC accounts', async () => { - const { - render: { getByText, queryByText }, - } = render(); - expect( - getByText( - `${mockAccount.metadata.name} (${shortenAddress( - mockAccount.address, - )})`, - ), - ).toBeInTheDocument(); - expect( - queryByText( - `${mockBtcAccount.metadata.name} (${shortenAddress( - mockBtcAccount.address, - )})`, - ), - ).not.toBeInTheDocument(); - }); - }); - - describe('Add new account', () => { - it('displays the correct account number', async () => { - const { - render: { getByText }, - store, - } = render(); - fireEvent.click(getByText(messages.newAccount.message)); - - const dispatchedActions = store.getActions(); - - expect(dispatchedActions).toHaveLength(2); // first action is 'SET_REQUEST_ACCOUNT_TABS' - expect(dispatchedActions[1]).toStrictEqual({ - type: 'UI_MODAL_OPEN', - payload: { - name: 'NEW_ACCOUNT', - onCreateNewAccount: expect.any(Function), - newAccountNumber: 2, - }, - }); - }); - }); -}); diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index 1fdbad27ed67..25c41ca37c82 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -787,7 +787,7 @@ export default class Routes extends Component { /> ) : null} - {process.env.CHAIN_PERMISSIONS && isPermittedNetworkToastOpen ? ( + {isPermittedNetworkToastOpen ? ( Date: Thu, 10 Oct 2024 14:16:41 +0200 Subject: [PATCH 29/41] chore: bump profile-sync-controller to 0.9.7 (#27749) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR bumps `@metamask/profile-sync-controller` to version `0.9.7`. This version fixes an account sync bug where we would save imported accounts in user storage. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27749?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/NOTIFY-1215 ## **Manual testing steps** 1. Create a new SRP 2. Add new accounts, rename some 3. Uninstall extension and reinstall 4. Import your previously created SRP 5. All your previously created accounts and respective names should be there! ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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. --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 416b3e1b0420..d3f7cf42a1dc 100644 --- a/package.json +++ b/package.json @@ -344,7 +344,7 @@ "@metamask/post-message-stream": "^8.0.0", "@metamask/ppom-validator": "0.34.0", "@metamask/preinstalled-example-snap": "^0.1.0", - "@metamask/profile-sync-controller": "^0.9.6", + "@metamask/profile-sync-controller": "^0.9.7", "@metamask/providers": "^14.0.2", "@metamask/queued-request-controller": "^2.0.0", "@metamask/rate-limit-controller": "^6.0.0", diff --git a/yarn.lock b/yarn.lock index 1e00e14c6cf8..4b5ad861cc3d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6066,9 +6066,9 @@ __metadata: languageName: node linkType: hard -"@metamask/profile-sync-controller@npm:^0.9.6": - version: 0.9.6 - resolution: "@metamask/profile-sync-controller@npm:0.9.6" +"@metamask/profile-sync-controller@npm:^0.9.7": + version: 0.9.7 + resolution: "@metamask/profile-sync-controller@npm:0.9.7" dependencies: "@metamask/base-controller": "npm:^7.0.1" "@metamask/keyring-api": "npm:^8.1.3" @@ -6084,7 +6084,7 @@ __metadata: "@metamask/accounts-controller": ^18.1.1 "@metamask/keyring-controller": ^17.2.0 "@metamask/snaps-controllers": ^9.7.0 - checksum: 10/102572a8805dde33eb318bf87ff2cd14cd5d5eae9139f18641c72a166ffa42dd4365d7617407d98521f3ec5e9b1d46517b283742be32825faf276141413bab51 + checksum: 10/e53888533b2aae937bbe4e385dca2617c324b34e3e60af218cd98c26d514fb725f4c67b649f126e055f6a50a554817b229d37488115b98d70e8aee7b3a910bde languageName: node linkType: hard @@ -26149,7 +26149,7 @@ __metadata: "@metamask/post-message-stream": "npm:^8.0.0" "@metamask/ppom-validator": "npm:0.34.0" "@metamask/preinstalled-example-snap": "npm:^0.1.0" - "@metamask/profile-sync-controller": "npm:^0.9.6" + "@metamask/profile-sync-controller": "npm:^0.9.7" "@metamask/providers": "npm:^14.0.2" "@metamask/queued-request-controller": "npm:^2.0.0" "@metamask/rate-limit-controller": "npm:^6.0.0" From 04ba878198df5f3d0af4c6b2dc0b0ce3da1db806 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 10 Oct 2024 14:35:42 +0200 Subject: [PATCH 30/41] fix(btc): fix jazzicons generations (#27662) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The jazzicons were all the same for mainnet/testnet accounts. It was probably due to the fact that the namespace being used was `eip155` for all addresses, but Bitcoin addresses have a different format. Here's the technical details: 1. The current "icon factory" being in used is the ethereum one: - https://github.com/MetaMask/metamask-extension/blob/develop/ui/components/ui/jazzicon/jazzicon.component.tsx#L25 - https://github.com/MetaMask/metamask-extension/blob/develop/ui/components/ui/jazzicon/jazzicon.component.tsx#L64 - `namespace` always defaults to `eip155` 2. The default constructor used for the ethereum factory uses the `jsNumberForAddress` which is ethereum-specific (or more like, "hex-specific" here): - https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/utils/icon-factory.ts#L40 - https://github.com/MetaMask/metamask-extension/blob/develop/ui/helpers/utils/icon-factory.ts#L150-L154 - It slices the first 2 characters (probably to remove the `0x` prefix) + `parseInt(addr, 16)` will only work hex-strings, but Bitcoin is not using this format - the `parseInt` here will only consider the first valid hex-characters of its input To fix this, we check for the current address used for the jazzicon and change the namespace based on this. Ideally, we would want to use the `InternalAccount` object directly, but that would require quite a lot of changes, so for now we keep this simple. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27662?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** 1. `yarn start:flask` 2. Settings > Experimental > "Enable Bitcoin support" 3. Create a Bitcoin mainnet account 4. Create a Bitcoin testnet account 5. Check that both jazzicons are different for those 2 Bitcoin accounts 6. Remove your Bitcoin accounts 7. Re-create them 8. Re-check that jazzicons are the same than step 5 9. "Hard"-restart your extension 10. Re-check that jazzicons are the same than step 5 ## **Screenshots/Recordings** ### **Before** ![Screenshot 2024-10-07 at 16 17 35](https://github.com/user-attachments/assets/0a2e28e8-a81d-4468-9261-f1b0c8c3f02d) ### **After** ![Screenshot 2024-10-07 at 16 18 57](https://github.com/user-attachments/assets/81d378c9-6941-4067-9022-660e7dffb7b2) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --- package.json | 2 +- shared/lib/multichain.test.ts | 105 ++++++++++++------ shared/lib/multichain.ts | 15 +++ .../account-list-item.test.js.snap | 56 +++++----- .../ui/jazzicon/jazzicon.component.tsx | 11 +- yarn.lock | 10 +- 6 files changed, 130 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index d3f7cf42a1dc..fad9fae96418 100644 --- a/package.json +++ b/package.json @@ -361,7 +361,7 @@ "@metamask/snaps-utils": "^8.1.1", "@metamask/transaction-controller": "^37.2.0", "@metamask/user-operation-controller": "^13.0.0", - "@metamask/utils": "^9.1.0", + "@metamask/utils": "^9.3.0", "@ngraveio/bc-ur": "^1.1.12", "@noble/hashes": "^1.3.3", "@popperjs/core": "^2.4.0", diff --git a/shared/lib/multichain.test.ts b/shared/lib/multichain.test.ts index 3b982ff8aff3..4c1bab12d03b 100644 --- a/shared/lib/multichain.test.ts +++ b/shared/lib/multichain.test.ts @@ -1,4 +1,9 @@ -import { isBtcMainnetAddress, isBtcTestnetAddress } from './multichain'; +import { KnownCaipNamespace } from '@metamask/utils'; +import { + getCaipNamespaceFromAddress, + isBtcMainnetAddress, + isBtcTestnetAddress, +} from './multichain'; const BTC_MAINNET_ADDRESSES = [ // P2WPKH @@ -20,35 +25,71 @@ const SOL_ADDRESSES = [ ]; describe('multichain', () => { - // @ts-expect-error This is missing from the Mocha type definitions - it.each(BTC_MAINNET_ADDRESSES)( - 'returns true if address is compatible with BTC mainnet: %s', - (address: string) => { - expect(isBtcMainnetAddress(address)).toBe(true); - }, - ); - - // @ts-expect-error This is missing from the Mocha type definitions - it.each([...BTC_TESTNET_ADDRESSES, ...ETH_ADDRESSES, ...SOL_ADDRESSES])( - 'returns false if address is not compatible with BTC mainnet: %s', - (address: string) => { - expect(isBtcMainnetAddress(address)).toBe(false); - }, - ); - - // @ts-expect-error This is missing from the Mocha type definitions - it.each(BTC_TESTNET_ADDRESSES)( - 'returns true if address is compatible with BTC testnet: %s', - (address: string) => { - expect(isBtcTestnetAddress(address)).toBe(true); - }, - ); - - // @ts-expect-error This is missing from the Mocha type definitions - it.each([...BTC_MAINNET_ADDRESSES, ...ETH_ADDRESSES, ...SOL_ADDRESSES])( - 'returns false if address is compatible with BTC testnet: %s', - (address: string) => { - expect(isBtcTestnetAddress(address)).toBe(false); - }, - ); + describe('isBtcMainnetAddress', () => { + // @ts-expect-error This is missing from the Mocha type definitions + it.each(BTC_MAINNET_ADDRESSES)( + 'returns true if address is compatible with BTC mainnet: %s', + (address: string) => { + expect(isBtcMainnetAddress(address)).toBe(true); + }, + ); + + // @ts-expect-error This is missing from the Mocha type definitions + it.each([...BTC_TESTNET_ADDRESSES, ...ETH_ADDRESSES, ...SOL_ADDRESSES])( + 'returns false if address is not compatible with BTC mainnet: %s', + (address: string) => { + expect(isBtcMainnetAddress(address)).toBe(false); + }, + ); + }); + + describe('isBtcTestnetAddress', () => { + // @ts-expect-error This is missing from the Mocha type definitions + it.each(BTC_TESTNET_ADDRESSES)( + 'returns true if address is compatible with BTC testnet: %s', + (address: string) => { + expect(isBtcTestnetAddress(address)).toBe(true); + }, + ); + + // @ts-expect-error This is missing from the Mocha type definitions + it.each([...BTC_MAINNET_ADDRESSES, ...ETH_ADDRESSES, ...SOL_ADDRESSES])( + 'returns false if address is compatible with BTC testnet: %s', + (address: string) => { + expect(isBtcTestnetAddress(address)).toBe(false); + }, + ); + }); + + describe('getChainTypeFromAddress', () => { + // @ts-expect-error This is missing from the Mocha type definitions + it.each([...BTC_MAINNET_ADDRESSES, ...BTC_TESTNET_ADDRESSES])( + 'returns ChainType.Bitcoin for bitcoin address: %s', + (address: string) => { + expect(getCaipNamespaceFromAddress(address)).toBe( + KnownCaipNamespace.Bip122, + ); + }, + ); + + // @ts-expect-error This is missing from the Mocha type definitions + it.each(ETH_ADDRESSES)( + 'returns ChainType.Ethereum for ethereum address: %s', + (address: string) => { + expect(getCaipNamespaceFromAddress(address)).toBe( + KnownCaipNamespace.Eip155, + ); + }, + ); + + // @ts-expect-error This is missing from the Mocha type definitions + it.each(SOL_ADDRESSES)( + 'returns ChainType.Ethereum for non-supported address: %s', + (address: string) => { + expect(getCaipNamespaceFromAddress(address)).toBe( + KnownCaipNamespace.Eip155, + ); + }, + ); + }); }); diff --git a/shared/lib/multichain.ts b/shared/lib/multichain.ts index 8ef03509541b..942a9ce6c964 100644 --- a/shared/lib/multichain.ts +++ b/shared/lib/multichain.ts @@ -1,3 +1,4 @@ +import { CaipNamespace, KnownCaipNamespace } from '@metamask/utils'; import { validate, Network } from 'bitcoin-address-validation'; /** @@ -26,3 +27,17 @@ export function isBtcMainnetAddress(address: string): boolean { export function isBtcTestnetAddress(address: string): boolean { return validate(address, Network.testnet); } + +/** + * Returns the associated chain's type for the given address. + * + * @param address - The address to check. + * @returns The chain's type for that address. + */ +export function getCaipNamespaceFromAddress(address: string): CaipNamespace { + if (isBtcMainnetAddress(address) || isBtcTestnetAddress(address)) { + return KnownCaipNamespace.Bip122; + } + // Defaults to "Ethereum" for all other cases for now. + return KnownCaipNamespace.Eip155; +} diff --git a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap index c14fb8a0c42d..51f6f2e905f9 100644 --- a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap +++ b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap @@ -32,7 +32,7 @@ exports[`AccountListItem renders AccountListItem component and shows account nam class="mm-avatar-account__jazzicon" >
Date: Thu, 10 Oct 2024 05:43:27 -0700 Subject: [PATCH 31/41] feat: add network picker to AssetPicker (#26559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Changes included in this PR: * Add a network picker to the AssetPicker modal component so that it can be reused within the cross-chain swaps experience * Update AssetPicker components to enable displaying network and asset data when the selected network is not the same as the wallet's active network. Example usecase: destination asset for cross-chain swaps. Specifically: - when selected `network` is not the same as wallet's network, display - selected network's icons in asset list - selected network's native token icons - add `customTokenListGenerator` prop to AssetPicker that allows upstream components to override the default displayed token list Figma design: https://www.figma.com/design/bC6RgeriyERMtMlZE8xwkm/Cross-Chain-Swaps?node-id=1490-18690&t=pnpoVVaJTqh15I0a-0 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26559?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/METABRIDGE-866 ## **Manual testing steps** 1. Swap+Send asset selection experience should not change 2. Storybook should show an AssetPicker variation that has a network picker ## **Screenshots/Recordings** ### **Before** Screenshot 2024-08-21 at 2 10 06 PM ### **After** ![Screenshot 2024-10-02 at 4 09 51 PM](https://github.com/user-attachments/assets/ff3f2854-7120-4f3d-9e55-88a325a5b3db)Screenshot 2024-08-21 at 2 09 04 PM ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] 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. --- app/_locales/en/messages.json | 3 + .../multichain/asset-picker-send.spec.ts | 4 +- .../asset-picker-modal/Asset.test.tsx | 5 +- .../asset-picker-modal/Asset.tsx | 14 +- .../asset-picker-modal/AssetList.tsx | 48 +-- .../asset-picker-modal-network.test.tsx.snap | 392 ++++++++++++++++++ .../asset-picker-modal-network.test.tsx | 132 ++++++ .../asset-picker-modal-network.tsx | 111 +++++ .../asset-picker-modal.test.tsx | 65 +++ .../asset-picker-modal/asset-picker-modal.tsx | 183 +++++--- .../asset-picker-modal/index.scss | 19 + .../__snapshots__/asset-picker.test.tsx.snap | 72 ++++ .../asset-picker/asset-picker.stories.tsx | 91 +++- .../asset-picker/asset-picker.test.tsx | 96 ++++- .../asset-picker/asset-picker.tsx | 168 +++++--- .../asset-picker/index.scss | 5 + .../token-list-item/token-list-item.tsx | 12 +- 17 files changed, 1251 insertions(+), 169 deletions(-) create mode 100644 ui/components/multichain/asset-picker-amount/asset-picker-modal/__snapshots__/asset-picker-modal-network.test.tsx.snap create mode 100644 ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-network.test.tsx create mode 100644 ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal-network.tsx diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index ecaedb3201d0..5f6a977c1cf4 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -870,6 +870,9 @@ "bridgeDontSend": { "message": "Bridge, don't send" }, + "bridgeSelectNetwork": { + "message": "Select network" + }, "browserNotSupported": { "message": "Your browser is not supported..." }, diff --git a/test/e2e/tests/multichain/asset-picker-send.spec.ts b/test/e2e/tests/multichain/asset-picker-send.spec.ts index 5accb14c6074..a071bec9426d 100644 --- a/test/e2e/tests/multichain/asset-picker-send.spec.ts +++ b/test/e2e/tests/multichain/asset-picker-send.spec.ts @@ -71,7 +71,7 @@ describe('AssetPickerSendFlow @no-mmi', function () { ) ).getText(); - assert.equal(tokenListValue, '25 ETH'); + assert.equal(tokenListValue, '$250,000.00'); const tokenListSecondaryValue = await ( await driver.findElement( @@ -79,7 +79,7 @@ describe('AssetPickerSendFlow @no-mmi', function () { ) ).getText(); - assert.equal(tokenListSecondaryValue, '$250,000.00'); + assert.equal(tokenListSecondaryValue, '25 ETH'); // Search for CHZ const searchInputField = await driver.waitForSelector( diff --git a/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.test.tsx b/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.test.tsx index f35bc8196724..0b641101c5dd 100644 --- a/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.test.tsx +++ b/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.test.tsx @@ -77,10 +77,11 @@ describe('Asset', () => { expect.objectContaining({ tokenSymbol: 'WETH', tokenImage: 'token-icon-url', - primary: '10', - secondary: '$10.10', + primary: '$10.10', + secondary: '10 WETH', title: 'Token', tooltipText: 'tooltip', + isPrimaryTokenSymbolHidden: true, }), {}, ); diff --git a/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.tsx b/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.tsx index 83229689f055..f384ef8fd96f 100644 --- a/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.tsx +++ b/ui/components/multichain/asset-picker-amount/asset-picker-modal/Asset.tsx @@ -40,18 +40,22 @@ export default function Asset({ {}, true, ); + const formattedAmount = decimalTokenAmount + ? `${formatAmount( + locale, + new BigNumber(decimalTokenAmount || '0', 10), + )} ${symbol}` + : undefined; return ( ); } diff --git a/ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx b/ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx index 9061592cf37c..fa071740b51d 100644 --- a/ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx +++ b/ui/components/multichain/asset-picker-amount/asset-picker-modal/AssetList.tsx @@ -1,10 +1,11 @@ import React from 'react'; import { useSelector } from 'react-redux'; import classnames from 'classnames'; -import { getSelectedAccountCachedBalance } from '../../../../selectors'; +import { + getCurrentCurrency, + getSelectedAccountCachedBalance, +} from '../../../../selectors'; import { getNativeCurrency } from '../../../../ducks/metamask/metamask'; -import { useUserPreferencedCurrency } from '../../../../hooks/useUserPreferencedCurrency'; -import { PRIMARY, SECONDARY } from '../../../../helpers/constants/common'; import { useCurrencyDisplay } from '../../../../hooks/useCurrencyDisplay'; import { AssetType } from '../../../../../shared/constants/transaction'; import { Box } from '../../../component-library'; @@ -43,28 +44,16 @@ export default function AssetList({ const nativeCurrency = useSelector(getNativeCurrency); const balanceValue = useSelector(getSelectedAccountCachedBalance); + const currentCurrency = useSelector(getCurrentCurrency); - const { - currency: primaryCurrency, - numberOfDecimals: primaryNumberOfDecimals, - } = useUserPreferencedCurrency(PRIMARY, { ethNumberOfDecimals: 4 }); - - const { - currency: secondaryCurrency, - numberOfDecimals: secondaryNumberOfDecimals, - } = useUserPreferencedCurrency(SECONDARY, { ethNumberOfDecimals: 4 }); - - const [, primaryCurrencyProperties] = useCurrencyDisplay(balanceValue, { - numberOfDecimals: primaryNumberOfDecimals, - currency: primaryCurrency, + const [primaryCurrencyValue] = useCurrencyDisplay(balanceValue, { + currency: currentCurrency, + hideLabel: true, }); - const [secondaryCurrencyDisplay, secondaryCurrencyProperties] = - useCurrencyDisplay(balanceValue, { - numberOfDecimals: secondaryNumberOfDecimals, - currency: secondaryCurrency, - hideLabel: true, - }); + const [secondaryCurrencyValue] = useCurrencyDisplay(balanceValue, { + currency: nativeCurrency, + }); return ( @@ -72,6 +61,7 @@ export default function AssetList({ const tokenAddress = token.address?.toLowerCase(); const isSelected = tokenAddress === selectedToken?.toLowerCase(); const isDisabled = isTokenDisabled?.(token) ?? false; + return ( {token.type === AssetType.native ? ( ) : ( +
+
+
+