From 7b09fdd16fa174480ae6bfc57104e191d39d8d6f Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Fri, 13 Dec 2024 00:56:31 +0000 Subject: [PATCH 01/65] Version v12.10.0 --- CHANGELOG.md | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eda15db00496..94959f9e5a8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,128 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure that the correct fallback letter is used for network icons within the token list ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) - Ensure users have to click through a blocking red warning before submitting multiple Smart Transactions while one is already pending ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140)) - Prevent users from being stuck on an "Invalid string length" error screen, by deleting tokens from their state of the data was invalid because the `decimals` property of the token was `null` ([#29245](https://github.com/MetaMask/metamask-extension/pull/29245)) +## [12.10.0] +### Uncategorized +- chore: Master sync PR following v12.8.0 and v12.9.0 ([#28912](https://github.com/MetaMask/metamask-extension/pull/28912)) +- Merge origin/main into master-sync +- feat: add websocket support for c2 detection ([#29150](https://github.com/MetaMask/metamask-extension/pull/29150)) +- feat: Adding Skeleton component to component-library ([#29082](https://github.com/MetaMask/metamask-extension/pull/29082)) +- feat: add background-muted color to design system ([#29117](https://github.com/MetaMask/metamask-extension/pull/29117)) +- feat: routing for failed transactions ([#29158](https://github.com/MetaMask/metamask-extension/pull/29158)) +- fix: show only 6 decimals max to reduce text cutoff in activity item ([#29153](https://github.com/MetaMask/metamask-extension/pull/29153)) +- chore: disable button while submiting, use finally set submitting to … ([#29149](https://github.com/MetaMask/metamask-extension/pull/29149)) +- ci: Only check attributions on release candidates ([#29043](https://github.com/MetaMask/metamask-extension/pull/29043)) +- feat: hardware wallet confirmation screen ([#29113](https://github.com/MetaMask/metamask-extension/pull/29113)) +- chore: calc the max total gas fee as well ([#29116](https://github.com/MetaMask/metamask-extension/pull/29116)) +- refactor: Refactor how manifest flags are set ([#28686](https://github.com/MetaMask/metamask-extension/pull/28686)) +- chore: delay linea bridge tx to make it less flaky ([#29109](https://github.com/MetaMask/metamask-extension/pull/29109)) +- fix: Use correct selector to pull name from non-popular networks ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) +- feat: update bridge tx details ([#29075](https://github.com/MetaMask/metamask-extension/pull/29075)) +- feat: Remove scroll to the bottom requirement for all personal sign requests ([#29053](https://github.com/MetaMask/metamask-extension/pull/29053)) +- chore: Add App Opened Metric Event ([#28927](https://github.com/MetaMask/metamask-extension/pull/28927)) +- feat: Add new metric sending_value to Transaction * events ([#29134](https://github.com/MetaMask/metamask-extension/pull/29134)) +- test: [POM] Migrate hardware wallet e2e tests to follow Page Object Model ([#28768](https://github.com/MetaMask/metamask-extension/pull/28768)) +- fix: design related fixes in confirmation pages ([#29137](https://github.com/MetaMask/metamask-extension/pull/29137)) +- feat: Permission page tour removal ([#28966](https://github.com/MetaMask/metamask-extension/pull/28966)) +- fix: Fix in label displayed for state change in signature decoding section ([#29020](https://github.com/MetaMask/metamask-extension/pull/29020)) +- fix: Change visibility of `AmountRow` in contract interaction ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131)) +- fix: Revert gridplus sdk version bumps ([#29125](https://github.com/MetaMask/metamask-extension/pull/29125)) +- fix: solana balance on accounts selector ([#29054](https://github.com/MetaMask/metamask-extension/pull/29054)) +- feat: Add link to pending transaction alert ([#28721](https://github.com/MetaMask/metamask-extension/pull/28721)) +- fix: send up requestId for squid ([#29042](https://github.com/MetaMask/metamask-extension/pull/29042)) +- chore: Revert "feat: add websocket support for c2 detection (#28782)" ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) +- fix: (MMS-1789) bridge api called when external services disabled ([#29077](https://github.com/MetaMask/metamask-extension/pull/29077)) +- chore: add autofocus prop to AssetPicker ([#29118](https://github.com/MetaMask/metamask-extension/pull/29118)) +- fix: Specify popular network icons in token network filter ([#29112](https://github.com/MetaMask/metamask-extension/pull/29112)) +- feat: carousel component ([#28956](https://github.com/MetaMask/metamask-extension/pull/28956)) +- chore: enable multiselect in asset-picker network modal ([#28975](https://github.com/MetaMask/metamask-extension/pull/28975)) +- chore: update CODEOWNERS for bridge related code ([#29029](https://github.com/MetaMask/metamask-extension/pull/29029)) +- fix: token.icon possibly null, update validators and types ([#29065](https://github.com/MetaMask/metamask-extension/pull/29065)) +- fix: token detection across multiple networks ([#29108](https://github.com/MetaMask/metamask-extension/pull/29108)) +- feat: add websocket support for c2 detection ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) +- test: fix flaky confirmation E2E tests ([#29104](https://github.com/MetaMask/metamask-extension/pull/29104)) +- chore: bump {profile-sync,notification-services}-controller ([#29088](https://github.com/MetaMask/metamask-extension/pull/29088)) +- fix: SonarCloud branch information ([#29072](https://github.com/MetaMask/metamask-extension/pull/29072)) +- chore: change default network avatar style ([#28976](https://github.com/MetaMask/metamask-extension/pull/28976)) +- chore: pass the Extension Version to the Uninstall URL ([#28935](https://github.com/MetaMask/metamask-extension/pull/28935)) +- feat: log-merge-group-failure ([#28799](https://github.com/MetaMask/metamask-extension/pull/28799)) +- fix: replace hardcoded slippage + expire bridge quotes ([#29028](https://github.com/MetaMask/metamask-extension/pull/29028)) +- fix: Remove Storybook theme flex style ([#27783](https://github.com/MetaMask/metamask-extension/pull/27783)) +- refactor: Init getTokenNetworkFilter selector ([#29068](https://github.com/MetaMask/metamask-extension/pull/29068)) +- chore: emit cross-chain swaps metrics + validation error logic ([#28713](https://github.com/MetaMask/metamask-extension/pull/28713)) +- fix: fix sticky autodetection banner ([#29061](https://github.com/MetaMask/metamask-extension/pull/29061)) +- fix: incorrect cross chain swaps activity item values ([#28899](https://github.com/MetaMask/metamask-extension/pull/28899)) +- refactor: decouple extension config from bridge API feature flags ([#28983](https://github.com/MetaMask/metamask-extension/pull/28983)) +- fix: cross chain swap tx order ([#28939](https://github.com/MetaMask/metamask-extension/pull/28939)) +- feat: unified confirmation navigation ([#28761](https://github.com/MetaMask/metamask-extension/pull/28761)) +- chore: update bug template to include feature branches ([#28878](https://github.com/MetaMask/metamask-extension/pull/28878)) +- test: fix flaky send eth transaction test ([#29050](https://github.com/MetaMask/metamask-extension/pull/29050)) +- feat: Add new gas_fee_selected property on Transaction * events ([#29027](https://github.com/MetaMask/metamask-extension/pull/29027)) +- feat: upgrade transaction controller to get incoming transactions using accounts API ([#28597](https://github.com/MetaMask/metamask-extension/pull/28597)) +- fix: Copy change on NFT approve confirmation title ([#29017](https://github.com/MetaMask/metamask-extension/pull/29017)) +- feat: show banner for delayed bridge tx ([#28849](https://github.com/MetaMask/metamask-extension/pull/28849)) +- chore: hide cancel button if bridge tx ([#28902](https://github.com/MetaMask/metamask-extension/pull/28902)) +- fix: wiping txHistory on both source and dest chains ([#29000](https://github.com/MetaMask/metamask-extension/pull/29000)) +- chore: eliminate direct `cross-spawn` dependency ([#28570](https://github.com/MetaMask/metamask-extension/pull/28570)) +- feat: various profile syncing improvements ([#29022](https://github.com/MetaMask/metamask-extension/pull/29022)) +- chore: Branch off of "New Crowdin translations by Github Action" ([#29011](https://github.com/MetaMask/metamask-extension/pull/29011)) +- fix: only display `Signing in with` for SIWE ([#28984](https://github.com/MetaMask/metamask-extension/pull/28984)) +- fix: add source when local PPOM fails ([#28726](https://github.com/MetaMask/metamask-extension/pull/28726)) +- feat: bump @metamask/message-signing-snap to ^0.6.0 ([#28877](https://github.com/MetaMask/metamask-extension/pull/28877)) +- fix: Support decimal point on advanced gas modal on mac ([#28869](https://github.com/MetaMask/metamask-extension/pull/28869)) +- fix: hide first time interaction alert if internal account ([#28990](https://github.com/MetaMask/metamask-extension/pull/28990)) +- feat: Integrate JSX into snap notifications ([#27407](https://github.com/MetaMask/metamask-extension/pull/27407)) +- chore: Update signature controller ([#28988](https://github.com/MetaMask/metamask-extension/pull/28988)) +- fix: Add origin row to transfer confirmations ([#28936](https://github.com/MetaMask/metamask-extension/pull/28936)) +- chore: Renumber migration 135 to 131.1 ([#28979](https://github.com/MetaMask/metamask-extension/pull/28979)) +- feat: add B3 logo svg ([#27778](https://github.com/MetaMask/metamask-extension/pull/27778)) +- fix: Fix create metric fragment ([#28970](https://github.com/MetaMask/metamask-extension/pull/28970)) +- test: fix flaky erc20 send token e2e ([#28775](https://github.com/MetaMask/metamask-extension/pull/28775)) +- chore: bump `@metamask/account-watcher` to `^4.2.2` ([#28915](https://github.com/MetaMask/metamask-extension/pull/28915)) +- chore: bump `@metamask/ppom-validator` to `0.36.0` ([#28958](https://github.com/MetaMask/metamask-extension/pull/28958)) +- fix: remove extension from webpack config import ([#28111](https://github.com/MetaMask/metamask-extension/pull/28111)) +- chore: bump `@metamask/preferences-controller` to `15.0.1` ([#28960](https://github.com/MetaMask/metamask-extension/pull/28960)) +- feat: cross chain swap STX ([#28460](https://github.com/MetaMask/metamask-extension/pull/28460)) +- chore: Update CODEOWNERS to remove ownership from most ([#28941](https://github.com/MetaMask/metamask-extension/pull/28941)) +- fix: sanitizes the token marketplace URL ([#28898](https://github.com/MetaMask/metamask-extension/pull/28898)) +- feat: Migrate remaining e2e tests to redesigned confirmations ([#28780](https://github.com/MetaMask/metamask-extension/pull/28780)) +- chore: transfer ownership of auth & profile sync e2e to identity ([#28946](https://github.com/MetaMask/metamask-extension/pull/28946)) +- chore: adds ramp-dev-team to codeowners ([#28933](https://github.com/MetaMask/metamask-extension/pull/28933)) +- chore: Bump Snaps packages ([#28922](https://github.com/MetaMask/metamask-extension/pull/28922)) +- feat: Add 'transaction_internal_id' property on all transaction events ([#28919](https://github.com/MetaMask/metamask-extension/pull/28919)) +- fix: Capture raw 4byte hex ([#28773](https://github.com/MetaMask/metamask-extension/pull/28773)) +- test: fix flaky ppom test ([#28923](https://github.com/MetaMask/metamask-extension/pull/28923)) +- test: Add integration test for signing and submitting alert and fix b… ([#28616](https://github.com/MetaMask/metamask-extension/pull/28616)) +- test: Fixed e2e swap tests test failures ([#28913](https://github.com/MetaMask/metamask-extension/pull/28913)) +- fix: fix check for undefined marketData ([#28870](https://github.com/MetaMask/metamask-extension/pull/28870)) +- chore: Update coverage.json ([#28092](https://github.com/MetaMask/metamask-extension/pull/28092)) +- chore: Skip flaky smart-transactions.spec.ts until we determine the root cau… ([#28943](https://github.com/MetaMask/metamask-extension/pull/28943)) +- feat: Adding production URL for signature decoding ([#28918](https://github.com/MetaMask/metamask-extension/pull/28918)) +- chore: update controllers as of core release v244 ([#28905](https://github.com/MetaMask/metamask-extension/pull/28905)) +- feat: migrate `AppStateController` to inherit from BaseController V2 ([#28784](https://github.com/MetaMask/metamask-extension/pull/28784)) +- chore: change ownership of profile sync from notifications to identity ([#28901](https://github.com/MetaMask/metamask-extension/pull/28901)) +- chore: force `@solana/web3.js` version resolution ([#28926](https://github.com/MetaMask/metamask-extension/pull/28926)) +- chore: Update a mock for tests ([#28934](https://github.com/MetaMask/metamask-extension/pull/28934)) +- fix: decoding data display for ERC-1155 tokens ([#28921](https://github.com/MetaMask/metamask-extension/pull/28921)) +- fix: updated analytics preferences to be logged during onboarding ([#28897](https://github.com/MetaMask/metamask-extension/pull/28897)) +- fix: check if a user is signed in before attempting to sign them out ([#28874](https://github.com/MetaMask/metamask-extension/pull/28874)) +- feat(27256): implement remote feature flag feature ([#28684](https://github.com/MetaMask/metamask-extension/pull/28684)) +- test: [POM] improve homepage class implementation ([#28797](https://github.com/MetaMask/metamask-extension/pull/28797)) +- chore: cleanup on some names and scripts in ci ([#28844](https://github.com/MetaMask/metamask-extension/pull/28844)) +- chore: Improvements to codeowners ([#28851](https://github.com/MetaMask/metamask-extension/pull/28851)) +- ci: pin image versions used in CI so it remains deterministic ([#28779](https://github.com/MetaMask/metamask-extension/pull/28779)) +- feat: cross chain swaps - tx status - UI ([#28657](https://github.com/MetaMask/metamask-extension/pull/28657)) +- test: Allow token balance to populate after swap ([#28744](https://github.com/MetaMask/metamask-extension/pull/28744)) +- fix: optimize helper methods for signature e2e ([#28810](https://github.com/MetaMask/metamask-extension/pull/28810)) +- chore: Reduce MMI trigger machine size ([#28689](https://github.com/MetaMask/metamask-extension/pull/28689)) +- fix: Replace `AvatarAccount` with `Identicon` ([#28645](https://github.com/MetaMask/metamask-extension/pull/28645)) +- chore: Rename `develop` to `main` ([#28821](https://github.com/MetaMask/metamask-extension/pull/28821)) +- chore: accept regex expression for rerun-from-failed trigger from circle ci UI, so we can add multiple triggers following the name convention ([#28804](https://github.com/MetaMask/metamask-extension/pull/28804)) +- fix: fix asset-list e2e test ([#28822](https://github.com/MetaMask/metamask-extension/pull/28822)) +- chore: remove unused `usedNetworks` state property from `AppStateController` ([#28813](https://github.com/MetaMask/metamask-extension/pull/28813)) +- refactor: remove global network from transaction controller ([#28449](https://github.com/MetaMask/metamask-extension/pull/28449)) +- test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) +- fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) ## [12.9.1] ### Changed @@ -5489,6 +5611,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...HEAD [12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...HEAD +[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.10.0 [12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1 [12.9.0]: https://github.com/MetaMask/metamask-extension/compare/v12.8.1...v12.9.0 [12.8.1]: https://github.com/MetaMask/metamask-extension/compare/v12.8.0...v12.8.1 diff --git a/package.json b/package.json index c5b53c79326d..b5837f3aa1f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.9.2", + "version": "12.10.0", "private": true, "repository": { "type": "git", From b0e603385b3196781742deea2f059cf7175c1a81 Mon Sep 17 00:00:00 2001 From: chloeYue <105063779+chloeYue@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:54:14 +0100 Subject: [PATCH 02/65] chore: fix changelog lint 12.10.0 (#29186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29186?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- CHANGELOG.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94959f9e5a8e..85d41aa54c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [12.9.2] -### Changed -- Display the "Amount" row within the advanced view of contract interaction confirmations, and whenever the amount being sent differs from the "You Send" row of the transaction simulation information by more than 5% ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131)) -- Improved phishing detection protections ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) - -### Fixed -- Ensure that the correct fallback letter is used for network icons within the token list ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) -- Ensure users have to click through a blocking red warning before submitting multiple Smart Transactions while one is already pending ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140)) -- Prevent users from being stuck on an "Invalid string length" error screen, by deleting tokens from their state of the data was invalid because the `decimals` property of the token was `null` ([#29245](https://github.com/MetaMask/metamask-extension/pull/29245)) ## [12.10.0] -### Uncategorized +### Fixed - chore: Master sync PR following v12.8.0 and v12.9.0 ([#28912](https://github.com/MetaMask/metamask-extension/pull/28912)) - Merge origin/main into master-sync - feat: add websocket support for c2 detection ([#29150](https://github.com/MetaMask/metamask-extension/pull/29150)) @@ -138,6 +129,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) - fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) +## [12.9.2] +### Changed +- Display the "Amount" row within the advanced view of contract interaction confirmations, and whenever the amount being sent differs from the "You Send" row of the transaction simulation information by more than 5% ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131)) +- Improved phishing detection protections ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) + +### Fixed +- Ensure that the correct fallback letter is used for network icons within the token list ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) +- Ensure users have to click through a blocking red warning before submitting multiple Smart Transactions while one is already pending ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140)) +- Prevent users from being stuck on an "Invalid string length" error screen, by deleting tokens from their state of the data was invalid because the `decimals` property of the token was `null` ([#29245](https://github.com/MetaMask/metamask-extension/pull/29245)) + ## [12.9.1] ### Changed - The 'All Networks' view of assets on the home screen will now only get data across the 9 'popular networks' ([#29071](https://github.com/MetaMask/metamask-extension/pull/29071)) @@ -5609,10 +5610,9 @@ 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.9.2...HEAD -[12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...HEAD -[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.10.0 +[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.10.0 +[12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 [12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1 [12.9.0]: https://github.com/MetaMask/metamask-extension/compare/v12.8.1...v12.9.0 [12.8.1]: https://github.com/MetaMask/metamask-extension/compare/v12.8.0...v12.8.1 From 99c393ed75ad40ed3511088d83114144728183f3 Mon Sep 17 00:00:00 2001 From: Ramon AC <36987446+racitores@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:09:18 +0100 Subject: [PATCH 03/65] fix: remove mmi tests from ci (#29201) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Remove all MMI tests [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29201?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- .circleci/config.yml | 264 +------------------------------------------ 1 file changed, 1 insertion(+), 263 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 552aa3305509..c83da321a2ed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,18 +87,6 @@ aliases: cat ${HOME}/project/.circleci/scripts/enable-vnc.sh >> ~/.bashrc fi - # Check if MMI tests should run - - &check-mmi-trigger - name: Check if MMI tests should run - command: | - source mmi_trigger.env - if [ "${run_mmi_tests}" == "true" ]; then - echo "Running MMI tests" - else - echo "Skipping MMI tests" - circleci step halt - fi - workflows: test_and_release: when: @@ -118,7 +106,6 @@ workflows: - trigger-beta-build: requires: - prep-deps - - check-mmi-trigger - prep-deps - get-changed-files-with-git-diff: filters: @@ -148,9 +135,6 @@ workflows: build-type: [main, beta, flask, mmi] requires: - prep-deps - - prep-build-mmi: - requires: - - prep-deps - prep-build: requires: - prep-deps @@ -179,14 +163,6 @@ workflows: <<: *main_master_rc_only requires: - prep-deps - - prep-build-test-mmi: - requires: - - prep-deps - - check-mmi-trigger - - prep-build-test-mmi-playwright: - requires: - - prep-deps - - check-mmi-trigger - prep-build-storybook: requires: - prep-deps @@ -237,20 +213,9 @@ workflows: <<: *main_master_rc_only requires: - prep-build-test-flask-mv2 - - test-e2e-chrome-mmi: - requires: - - prep-build-test-mmi - - get-changed-files-with-git-diff - - test-e2e-mmi-playwright: - requires: - - prep-build-test-mmi-playwright - test-e2e-swap-playwright - OPTIONAL: requires: - prep-build - - test-e2e-chrome-rpc-mmi: - requires: - - prep-build-test-mmi - - get-changed-files-with-git-diff - test-e2e-chrome-vault-decryption: filters: branches: @@ -272,9 +237,6 @@ workflows: - validate-source-maps-beta: requires: - trigger-beta-build - - validate-source-maps-mmi: - requires: - - prep-build-mmi - validate-source-maps-flask: requires: - prep-build-flask @@ -302,7 +264,6 @@ workflows: - validate-source-maps - validate-source-maps-beta - validate-source-maps-flask - - validate-source-maps-mmi - test-mozilla-lint-mv2 - test-mozilla-lint-flask-mv2 - test-e2e-chrome @@ -310,8 +271,6 @@ workflows: - test-e2e-firefox - test-e2e-chrome-flask - test-e2e-firefox-flask - - test-e2e-chrome-mmi - - test-e2e-chrome-rpc-mmi - test-e2e-chrome-vault-decryption - test-e2e-chrome-webpack - test-storybook @@ -330,7 +289,6 @@ workflows: - prep-build - prep-build-mv2 - trigger-beta-build - - prep-build-mmi - prep-build-flask - prep-build-flask-mv2 - prep-build-storybook @@ -347,7 +305,6 @@ workflows: - prep-deps - prep-build - prep-build-mv2 - - prep-build-mmi - prep-build-flask - prep-build-flask-mv2 - all-tests-pass @@ -634,50 +591,6 @@ jobs: - dist-mv2 - builds-mv2 - prep-build-mmi: - executor: node-linux-medium - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: corepack enable - - attach_workspace: - at: . - - when: - condition: - not: - matches: - pattern: /^master$/ - value: << pipeline.git.branch >> - steps: - - run: - name: build:dist - command: yarn build --build-type mmi dist - - when: - condition: - matches: - pattern: /^master$/ - value: << pipeline.git.branch >> - steps: - - run: - name: build:prod - command: yarn build --build-type mmi prod - - run: - name: build:debug - command: find dist/ -type f -exec md5sum {} \; | sort -k 2 - - run: - name: Move mmi build to 'dist-mmi' to avoid conflict with production build - command: mv ./dist ./dist-mmi - - run: - name: Move mmi zips to 'builds-mmi' to avoid conflict with production build - command: mv ./builds ./builds-mmi - - persist_to_workspace: - root: . - paths: - - dist-mmi - - builds-mmi - - store_artifacts: - path: builds-mmi - destination: builds-mmi - prep-build-flask: executor: node-linux-medium steps: @@ -804,57 +717,6 @@ jobs: - dist-test-flask-mv2 - builds-test-flask-mv2 - prep-build-test-mmi: - executor: node-linux-medium - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: corepack enable - - attach_workspace: - at: . - - run: *check-mmi-trigger - - run: - name: Build extension for testing - command: yarn build:test:mmi - - run: - name: Move test build to 'dist-test' to avoid conflict with production build - command: mv ./dist ./dist-test-mmi - - run: - name: Move test zips to 'builds-test' to avoid conflict with production build - command: mv ./builds ./builds-test-mmi - - persist_to_workspace: - root: . - paths: - - dist-test-mmi - - builds-test-mmi - - prep-build-test-mmi-playwright: - executor: node-linux-medium - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: corepack enable - - attach_workspace: - at: . - - run: *check-mmi-trigger - - run: - name: Build MMI extension for Playwright e2e - command: | - export MMI_CONFIGURATION_SERVICE_URL=$MMI_DEV_CONFIGURATION_SERVICE_URL - yarn dist:mmi - - run: - name: Move test build to 'dist-test' to avoid conflict with production build - command: mv ./dist ./dist-test-mmi-playwright - - run: - name: Move test zips to 'builds-test' to avoid conflict with production build - command: mv ./builds ./builds-test-mmi-playwright - - persist_to_workspace: - root: . - paths: - - dist-test-mmi-playwright - - builds-test-mmi-playwright - - store_artifacts: - path: builds-test-mmi-playwright - destination: builds-test-mmi-playwright - prep-build-test: executor: node-linux-medium steps: @@ -1199,30 +1061,6 @@ jobs: - store_test_results: path: test/test-results/e2e - test-e2e-chrome-rpc-mmi: - executor: node-browsers-medium - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: sudo corepack enable - - attach_workspace: - at: . - - run: *check-mmi-trigger - - run: - name: Move test build to dist - command: mv ./dist-test-mmi ./dist - - run: - name: Move test zips to builds - command: mv ./builds-test-mmi ./builds - - run: - name: test:e2e:chrome:rpc - command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:rpc --build-type=mmi - no_output_timeout: 5m - - store_artifacts: - path: test-artifacts - destination: test-artifacts - - store_test_results: - path: test/test-results/e2e - test-e2e-chrome-vault-decryption: executor: node-browsers-medium-plus steps: @@ -1288,72 +1126,6 @@ jobs: - store_test_results: path: test/test-results/e2e - test-e2e-chrome-mmi: - executor: node-browsers-medium-plus - parallelism: 12 - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: sudo corepack enable - - attach_workspace: - at: . - - run: *check-mmi-trigger - - run: - name: Move test build to dist - command: mv ./dist-test-mmi ./dist - - run: - name: Move test zips to builds - command: mv ./builds-test-mmi ./builds - - run: - name: test:e2e:chrome:mmi - command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:mmi --build-type=mmi - no_output_timeout: 5m - - store_artifacts: - path: test-artifacts - destination: test-artifacts - - store_test_results: - path: test/test-results/e2e - - test-e2e-mmi-playwright: - executor: playwright - parallelism: 2 - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: corepack enable - - attach_workspace: - at: . - - run: *check-mmi-trigger - - run: - name: Move test build to dist - command: mv ./dist-test-mmi-playwright ./dist - - run: - name: Install chromium - command: yarn playwright install chromium - - run: - name: test:e2e:chrome:mmi - command: | - TESTFILES=$(circleci tests glob "test/e2e/playwright/mmi/**/*.spec.ts") - echo "$TESTFILES" - echo "$TESTFILES" | timeout 20m circleci tests run --command="xvfb-run xargs yarn playwright test --project=mmi" verbose --split-by=timings - no_output_timeout: 10m - - slack/notify: - branch_pattern: Version-v* - event: fail - mentions: <@antonio.regadas>, @ramon.acitores134 - template: basic_fail_1 - channel: C01LUJL3T98 - - slack/notify: - branch_pattern: main - event: fail - mentions: <@antonio.regadas>, @ramon.acitores134 - template: basic_fail_1 - channel: C05QXJA7NP8 - - store_artifacts: - name: html-report and artifacts - path: public/playwright/playwright-reports - - store_test_results: - name: report for pipeline integration - path: public/playwright/playwright-reports/junit/test-results.xml - test-e2e-swap-playwright - OPTIONAL: executor: playwright parallelism: 2 @@ -1525,9 +1297,7 @@ jobs: - store_artifacts: path: builds-flask-mv2 destination: builds-flask-mv2 - - store_artifacts: - path: builds-mmi - destination: builds-mmi + - store_artifacts: path: builds-mv2 destination: builds-mv2 @@ -1642,23 +1412,6 @@ jobs: name: Validate source maps command: .circleci/scripts/validate-source-maps-beta.sh - validate-source-maps-mmi: - executor: node-browsers-small - steps: - - run: *shallow-git-clone-and-enable-vnc - - run: sudo corepack enable - - attach_workspace: - at: . - - run: - name: Move mmi build to dist - command: mv ./dist-mmi ./dist - - run: - name: Move mmi zips to builds - command: mv ./builds-mmi ./builds - - run: - name: Validate source maps - command: yarn validate-source-maps - validate-source-maps-flask: executor: node-browsers-small steps: @@ -1750,18 +1503,3 @@ jobs: - run: name: All Tests Passed command: echo 'whew - everything passed!' - - check-mmi-trigger: - executor: node-browsers-small - steps: - - checkout - - run: - name: Check for MMI Team Label or Reviewer - command: ./.circleci/scripts/check_mmi_trigger.sh - - store_artifacts: - path: mmi_trigger.env - destination: mmi_trigger.env - - persist_to_workspace: - root: . - paths: - - mmi_trigger.env From 9e42c34699f5566ee88c80590b651d476c926cfb Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 19 Dec 2024 17:10:49 +0000 Subject: [PATCH 04/65] Version v12.9.3 --- CHANGELOG.md | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eda15db00496..65ffb876707e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.9.3] + ## [12.9.2] ### Changed - Display the "Amount" row within the advanced view of contract interaction confirmations, and whenever the amount being sent differs from the "You Send" row of the transaction simulation information by more than 5% ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131)) @@ -5487,7 +5489,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.9.2...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.3...HEAD +[12.9.3]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.9.3 [12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 [12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1 [12.9.0]: https://github.com/MetaMask/metamask-extension/compare/v12.8.1...v12.9.0 diff --git a/package.json b/package.json index 446133b81a48..5b6de0a41550 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.9.2", + "version": "12.9.3", "private": true, "repository": { "type": "git", From a2f4ee5aba89aca52997a47f1fd93cb354158e21 Mon Sep 17 00:00:00 2001 From: micaelae <100321200+micaelae@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:38:33 -0800 Subject: [PATCH 05/65] fix [cherry-pick]: sentry e2e test fix for bridge loading states (#29360) --- app/scripts/constants/sentry-state.ts | 4 ++-- .../errors-after-init-opt-in-background-state.json | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/scripts/constants/sentry-state.ts b/app/scripts/constants/sentry-state.ts index 68926c02dc89..ab53ffb3f22d 100644 --- a/app/scripts/constants/sentry-state.ts +++ b/app/scripts/constants/sentry-state.ts @@ -104,10 +104,10 @@ export const SENTRY_BACKGROUND_STATE = { }, destTokens: {}, destTopAssets: [], - destTokensLoadingStatus: false, + destTokensLoadingStatus: true, srcTokens: {}, srcTopAssets: [], - srcTokensLoadingStatus: false, + srcTokensLoadingStatus: true, quoteRequest: { walletAddress: false, srcTokenAddress: true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index b00f37993b78..cae1a6ae8951 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -76,8 +76,6 @@ "srcTokens": {}, "srcTopAssets": {}, "destTokens": {}, - "destTokensLoadingStatus": "undefined", - "srcTokensLoadingStatus": "undefined", "destTopAssets": {}, "quoteRequest": { "srcTokenAddress": "0x0000000000000000000000000000000000000000", From 46562e0e21ee7e1f6322f1ab5c77b2c8e42d37a3 Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Thu, 19 Dec 2024 14:34:18 -0800 Subject: [PATCH 06/65] chore(cherry-pick): fix erc20 token balances showing 0 (#29365) cherry picks https://github.com/MetaMask/metamask-extension/pull/29361 to v12.9.3 --- ...-assets-controllers-patch-d6ed5f8213.patch | 61 ++++++ app/scripts/migrations/133.2.test.ts | 185 ++++++++++++++++++ app/scripts/migrations/133.2.ts | 53 +++++ app/scripts/migrations/index.js | 1 + package.json | 2 +- yarn.lock | 43 +++- 6 files changed, 342 insertions(+), 3 deletions(-) create mode 100644 .yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch create mode 100644 app/scripts/migrations/133.2.test.ts create mode 100644 app/scripts/migrations/133.2.ts diff --git a/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch b/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch new file mode 100644 index 000000000000..02e6d3f694e5 --- /dev/null +++ b/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch @@ -0,0 +1,61 @@ +diff --git a/dist/multicall.cjs b/dist/multicall.cjs +index bf9aa5e86573fc1651f421cc0b64f5af121c3ab2..43a0531ed86cd3ee1774dcda3f990dd40f7f52de 100644 +--- a/dist/multicall.cjs ++++ b/dist/multicall.cjs +@@ -342,9 +342,22 @@ const multicallOrFallback = async (calls, chainId, provider, maxCallsPerMultical + return []; + } + const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId]; +- return await (multicallAddress +- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall) +- : fallback(calls, maxCallsParallel)); ++ if (multicallAddress) { ++ try { ++ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall); ++ } ++ catch (error) { ++ // Fallback only on revert ++ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION ++ if (!error || ++ typeof error !== 'object' || ++ !('code' in error) || ++ error.code !== 'CALL_EXCEPTION') { ++ throw error; ++ } ++ } ++ } ++ return await fallback(calls, maxCallsParallel); + }; + exports.multicallOrFallback = multicallOrFallback; + //# sourceMappingURL=multicall.cjs.map +\ No newline at end of file +diff --git a/dist/multicall.mjs b/dist/multicall.mjs +index 8fbe0112303d5df1d868e0357a9d31e43a3b6cf9..860dfdbddd813659cb2be5f7faed5d4016db5966 100644 +--- a/dist/multicall.mjs ++++ b/dist/multicall.mjs +@@ -339,8 +339,21 @@ export const multicallOrFallback = async (calls, chainId, provider, maxCallsPerM + return []; + } + const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId]; +- return await (multicallAddress +- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall) +- : fallback(calls, maxCallsParallel)); ++ if (multicallAddress) { ++ try { ++ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall); ++ } ++ catch (error) { ++ // Fallback only on revert ++ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION ++ if (!error || ++ typeof error !== 'object' || ++ !('code' in error) || ++ error.code !== 'CALL_EXCEPTION') { ++ throw error; ++ } ++ } ++ } ++ return await fallback(calls, maxCallsParallel); + }; + //# sourceMappingURL=multicall.mjs.map +\ No newline at end of file diff --git a/app/scripts/migrations/133.2.test.ts b/app/scripts/migrations/133.2.test.ts new file mode 100644 index 000000000000..18251d8f4b2b --- /dev/null +++ b/app/scripts/migrations/133.2.test.ts @@ -0,0 +1,185 @@ +import { migrate, version } from './133.2'; + +const oldVersion = 133.1; + +describe(`migration #${version}`, () => { + it('updates the version metadata', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: {}, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.meta).toStrictEqual({ version }); + }); + + it('does nothing if theres no tokens controller state defined', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: {}, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); + + it('does nothing if theres empty tokens controller state', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: {}, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); + + it('does nothing if theres empty tokens controller state for allTokens', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: {}, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); + + it('does nothing if theres empty tokens controller state for mainnet', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: { + '0x1': {}, + }, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); + + it('Does nothing if theres no tokens with empty address', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: { + '0x1': { + '0x123': [ + { address: '0x1', symbol: 'TOKEN1', decimals: 18 }, + { address: '0x2', symbol: 'TOKEN2', decimals: 18 }, + ], + '0x123456': [ + { address: '0x3', symbol: 'TOKEN3', decimals: 18 }, + { address: '0x4', symbol: 'TOKEN4', decimals: 18 }, + ], + }, + }, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); + + it('Removes tokens with empty address', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: { + '0x1': { + '0x123': [ + { + address: '0x0000000000000000000000000000000000000000', + symbol: 'eth', + decimals: 18, + }, + { address: '0x2', symbol: 'TOKEN2', decimals: 18 }, + ], + }, + }, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual({ + TokensController: { + allTokens: { + '0x1': { + '0x123': [{ address: '0x2', symbol: 'TOKEN2', decimals: 18 }], + }, + }, + }, + }); + }); + + it('Removes tokens with empty address across multiple accounts', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: { + '0x1': { + '0x123': [ + { + address: '0x0000000000000000000000000000000000000000', + symbol: 'eth', + decimals: 18, + }, + { address: '0x2', symbol: 'TOKEN2', decimals: 18 }, + ], + '0x456': [ + { + address: '0x0000000000000000000000000000000000000000', + symbol: 'eth', + decimals: 18, + }, + { address: '0x3', symbol: 'TOKEN3', decimals: 18 }, + ], + '0x789': [{ address: '0x4', symbol: 'TOKEN4', decimals: 18 }], + }, + }, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual({ + TokensController: { + allTokens: { + '0x1': { + '0x123': [{ address: '0x2', symbol: 'TOKEN2', decimals: 18 }], + '0x456': [{ address: '0x3', symbol: 'TOKEN3', decimals: 18 }], + '0x789': [{ address: '0x4', symbol: 'TOKEN4', decimals: 18 }], + }, + }, + }, + }); + }); + + it('Does not change state on chains other than mainnet', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + TokensController: { + allTokens: { + '0x999': { + '0x123': [ + { + address: '0x0000000000000000000000000000000000000000', + symbol: 'eth', + decimals: 18, + }, + { address: '0x2', symbol: 'TOKEN2', decimals: 18 }, + ], + }, + }, + }, + }, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.data).toStrictEqual(oldStorage.data); + }); +}); diff --git a/app/scripts/migrations/133.2.ts b/app/scripts/migrations/133.2.ts new file mode 100644 index 000000000000..6ad8ff888cfd --- /dev/null +++ b/app/scripts/migrations/133.2.ts @@ -0,0 +1,53 @@ +import { hasProperty, isObject } from '@metamask/utils'; +import { cloneDeep } from 'lodash'; + +type VersionedData = { + meta: { version: number }; + data: Record; +}; + +export const version = 133.2; + +/** + * This migration removes tokens on mainnet with the + * zero address, since this is not a valid erc20 token. + * + * @param originalVersionedData - Versioned MetaMask extension state, exactly + * what we persist to disk. + * @returns Updated versioned MetaMask extension state. + */ +export async function migrate( + originalVersionedData: VersionedData, +): Promise { + const versionedData = cloneDeep(originalVersionedData); + versionedData.meta.version = version; + transformState(versionedData.data); + return versionedData; +} + +function transformState(state: Record): void { + if ( + !hasProperty(state, 'TokensController') || + !isObject(state.TokensController) || + !isObject(state.TokensController.allTokens) + ) { + return; + } + + const chainIds = ['0x1']; + + for (const chainId of chainIds) { + const allTokensOnChain = state.TokensController.allTokens[chainId]; + + if (isObject(allTokensOnChain)) { + for (const [account, tokens] of Object.entries(allTokensOnChain)) { + if (Array.isArray(tokens)) { + allTokensOnChain[account] = tokens.filter( + (token) => + token?.address !== '0x0000000000000000000000000000000000000000', + ); + } + } + } + } +} diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js index fbee63b7f7f2..3783cfa0b8bd 100644 --- a/app/scripts/migrations/index.js +++ b/app/scripts/migrations/index.js @@ -156,6 +156,7 @@ const migrations = [ require('./132'), require('./133'), require('./133.1'), + require('./133.2'), ]; export default migrations; diff --git a/package.json b/package.json index 5b6de0a41550..790a47a6adef 100644 --- a/package.json +++ b/package.json @@ -286,7 +286,7 @@ "@metamask/address-book-controller": "^6.0.0", "@metamask/announcement-controller": "^7.0.0", "@metamask/approval-controller": "^7.0.0", - "@metamask/assets-controllers": "patch:@metamask/assets-controllers@npm%3A45.1.0#~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch", + "@metamask/assets-controllers": "patch:@metamask/assets-controllers@patch%3A@metamask/assets-controllers@npm%253A45.1.0%23~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch%3A%3Aversion=45.1.0&hash=cfcadc#~/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch", "@metamask/base-controller": "^7.0.0", "@metamask/bitcoin-wallet-snap": "^0.8.2", "@metamask/browser-passworder": "^4.3.0", diff --git a/yarn.lock b/yarn.lock index 70482a79a761..7eaa7689b391 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4985,7 +4985,7 @@ __metadata: languageName: node linkType: hard -"@metamask/assets-controllers@patch:@metamask/assets-controllers@npm%3A45.1.0#~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch": +"@metamask/assets-controllers@patch:@metamask/assets-controllers@npm%3A45.1.0#~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch::version=45.1.0&hash=cfcadc": version: 45.1.0 resolution: "@metamask/assets-controllers@patch:@metamask/assets-controllers@npm%3A45.1.0#~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch::version=45.1.0&hash=cfcadc" dependencies: @@ -5024,6 +5024,45 @@ __metadata: languageName: node linkType: hard +"@metamask/assets-controllers@patch:@metamask/assets-controllers@patch%3A@metamask/assets-controllers@npm%253A45.1.0%23~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch%3A%3Aversion=45.1.0&hash=cfcadc#~/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch": + version: 45.1.0 + resolution: "@metamask/assets-controllers@patch:@metamask/assets-controllers@patch%3A@metamask/assets-controllers@npm%253A45.1.0%23~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch%3A%3Aversion=45.1.0&hash=cfcadc#~/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch::version=45.1.0&hash=4e79dd" + dependencies: + "@ethereumjs/util": "npm:^8.1.0" + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/address": "npm:^5.7.0" + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/contracts": "npm:^5.7.0" + "@ethersproject/providers": "npm:^5.7.0" + "@metamask/abi-utils": "npm:^2.0.3" + "@metamask/base-controller": "npm:^7.0.2" + "@metamask/contract-metadata": "npm:^2.4.0" + "@metamask/controller-utils": "npm:^11.4.3" + "@metamask/eth-query": "npm:^4.0.0" + "@metamask/metamask-eth-abis": "npm:^3.1.1" + "@metamask/polling-controller": "npm:^12.0.1" + "@metamask/rpc-errors": "npm:^7.0.1" + "@metamask/utils": "npm:^10.0.0" + "@types/bn.js": "npm:^5.1.5" + "@types/uuid": "npm:^8.3.0" + async-mutex: "npm:^0.5.0" + bn.js: "npm:^5.2.1" + cockatiel: "npm:^3.1.2" + immer: "npm:^9.0.6" + lodash: "npm:^4.17.21" + multiformats: "npm:^13.1.0" + single-call-balance-checker-abi: "npm:^1.0.0" + uuid: "npm:^8.3.2" + peerDependencies: + "@metamask/accounts-controller": ^20.0.0 + "@metamask/approval-controller": ^7.0.0 + "@metamask/keyring-controller": ^19.0.0 + "@metamask/network-controller": ^22.0.0 + "@metamask/preferences-controller": ^15.0.0 + checksum: 10/26260472e67d0995b3730870fed99ba081c421ea64e8ca70f02ca8184fb9350fd2c607b75f45507743ba73d7336e831cc55a7aaf9a32f569a58eb7abb9275451 + languageName: node + linkType: hard + "@metamask/auto-changelog@npm:^2.1.0": version: 2.6.1 resolution: "@metamask/auto-changelog@npm:2.6.1" @@ -26596,7 +26635,7 @@ __metadata: "@metamask/announcement-controller": "npm:^7.0.0" "@metamask/api-specs": "npm:^0.9.3" "@metamask/approval-controller": "npm:^7.0.0" - "@metamask/assets-controllers": "patch:@metamask/assets-controllers@npm%3A45.1.0#~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch" + "@metamask/assets-controllers": "patch:@metamask/assets-controllers@patch%3A@metamask/assets-controllers@npm%253A45.1.0%23~/.yarn/patches/@metamask-assets-controllers-npm-45.1.0-d914c453f0.patch%3A%3Aversion=45.1.0&hash=cfcadc#~/.yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch" "@metamask/auto-changelog": "npm:^2.1.0" "@metamask/base-controller": "npm:^7.0.0" "@metamask/bitcoin-wallet-snap": "npm:^0.8.2" From 317b923c2f250fca38bd5f4c60d167ff65bc569b Mon Sep 17 00:00:00 2001 From: OGPoyraz Date: Fri, 20 Dec 2024 12:04:25 +0100 Subject: [PATCH 07/65] chore: Cherry pick `29343` (#29376) This PR cherry picks https://github.com/MetaMask/metamask-extension/pull/29343 --- app/scripts/lib/ppom/ppom-util.test.ts | 50 +++++++++++++++++++++++++- app/scripts/lib/ppom/ppom-util.ts | 20 ++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/ppom/ppom-util.test.ts b/app/scripts/lib/ppom/ppom-util.test.ts index 8acb6dd9788c..d3ab62b09d88 100644 --- a/app/scripts/lib/ppom/ppom-util.test.ts +++ b/app/scripts/lib/ppom/ppom-util.test.ts @@ -10,7 +10,7 @@ import { SignatureController, SignatureRequest, } from '@metamask/signature-controller'; -import { Hex } from '@metamask/utils'; +import { Hex, JsonRpcRequest } from '@metamask/utils'; import { BlockaidReason, BlockaidResultType, @@ -22,6 +22,8 @@ import { AppStateController } from '../../controllers/app-state-controller'; import { generateSecurityAlertId, isChainSupported, + METHOD_SIGN_TYPED_DATA_V3, + METHOD_SIGN_TYPED_DATA_V4, updateSecurityAlertResponse, validateRequestWithPPOM, } from './ppom-util'; @@ -57,6 +59,10 @@ const TRANSACTION_PARAMS_MOCK_1: TransactionParams = { value: '0x123', }; +const SIGN_TYPED_DATA_PARAMS_MOCK_1 = '0x123'; +const SIGN_TYPED_DATA_PARAMS_MOCK_2 = + '{"primaryType":"Permit","domain":{},"types":{}}'; + const TRANSACTION_PARAMS_MOCK_2: TransactionParams = { ...TRANSACTION_PARAMS_MOCK_1, to: '0x456', @@ -259,6 +265,48 @@ describe('PPOM Utils', () => { ); }); + // @ts-expect-error This is missing from the Mocha type definitions + it.each([METHOD_SIGN_TYPED_DATA_V3, METHOD_SIGN_TYPED_DATA_V4])( + 'sanitizes request params if method is %s', + async (method: string) => { + const ppom = createPPOMMock(); + const ppomController = createPPOMControllerMock(); + + ppomController.usePPOM.mockImplementation( + (callback) => + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback(ppom as any) as any, + ); + + const firstTwoParams = [ + SIGN_TYPED_DATA_PARAMS_MOCK_1, + SIGN_TYPED_DATA_PARAMS_MOCK_2, + ]; + + const unwantedParams = [{}, undefined, 1, null]; + + const params = [...firstTwoParams, ...unwantedParams]; + + const request = { + ...REQUEST_MOCK, + method, + params, + } as unknown as JsonRpcRequest; + + await validateRequestWithPPOM({ + ...validateRequestWithPPOMOptionsBase, + ppomController, + request, + }); + + expect(ppom.validateJsonRpc).toHaveBeenCalledTimes(1); + expect(ppom.validateJsonRpc).toHaveBeenCalledWith({ + ...request, + params: firstTwoParams, + }); + }, + ); + it('updates response indicating chain is not supported', async () => { const ppomController = {} as PPOMController; const CHAIN_ID_UNSUPPORTED_MOCK = '0x2'; diff --git a/app/scripts/lib/ppom/ppom-util.ts b/app/scripts/lib/ppom/ppom-util.ts index d27ec6c8e505..6572aa3c3839 100644 --- a/app/scripts/lib/ppom/ppom-util.ts +++ b/app/scripts/lib/ppom/ppom-util.ts @@ -29,6 +29,8 @@ import { const { sentry } = global; const METHOD_SEND_TRANSACTION = 'eth_sendTransaction'; +export const METHOD_SIGN_TYPED_DATA_V3 = 'eth_signTypedData_v3'; +export const METHOD_SIGN_TYPED_DATA_V4 = 'eth_signTypedData_v4'; const SECURITY_ALERT_RESPONSE_ERROR = { result_type: BlockaidResultType.Errored, @@ -169,7 +171,7 @@ function normalizePPOMRequest( request, ) ) { - return request; + return sanitizeRequest(request); } const transactionParams = request.params[0]; @@ -181,6 +183,22 @@ function normalizePPOMRequest( }; } +function sanitizeRequest(request: JsonRpcRequest): JsonRpcRequest { + // This is a temporary fix to prevent a PPOM bypass + if ( + request.method === METHOD_SIGN_TYPED_DATA_V4 || + request.method === METHOD_SIGN_TYPED_DATA_V3 + ) { + if (Array.isArray(request.params)) { + return { + ...request, + params: request.params.slice(0, 2), + }; + } + } + return request; +} + function getErrorMessage(error: unknown) { if (error instanceof Error) { return `${error.name}: ${error.message}`; From 1712e287c0df901a475d8c4c4cbf6c20d1c30e28 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Fri, 20 Dec 2024 17:25:52 +0000 Subject: [PATCH 08/65] fix (cherry-pick): remove reliance on transaction decode in confirmations #29341 (#29397) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Cherry-pick of #29341 for release 12.9.3. Difference to `main` is that redesigned transactions are disabled if the `Decode smart contracts` toggle is disabled. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29397?quickstart=1) ## **Related issues** ## **Manual testing steps** ## **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/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-extension/blob/main/.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. --- shared/lib/confirmation.utils.test.ts | 22 ++++++++++++++++ shared/lib/confirmation.utils.ts | 6 +++++ .../hooks/useDecodedTransactionData.test.ts | 26 +++++++++++++++++++ .../info/hooks/useDecodedTransactionData.ts | 12 ++++++++- .../hooks/useCurrentConfirmation.test.ts | 16 ++++++++++++ .../hooks/useCurrentConfirmation.ts | 3 +++ 6 files changed, 84 insertions(+), 1 deletion(-) diff --git a/shared/lib/confirmation.utils.test.ts b/shared/lib/confirmation.utils.test.ts index 552d78827a2e..add03a95813d 100644 --- a/shared/lib/confirmation.utils.test.ts +++ b/shared/lib/confirmation.utils.test.ts @@ -43,6 +43,17 @@ describe('confirmation.utils', () => { }), ).toBe(false); }); + + it('should return false if decoding is disabled', () => { + expect( + shouldUseRedesignForTransactions({ + transactionMetadataType: unsupportedTransactionType, + isRedesignedTransactionsUserSettingEnabled: true, // user setting enabled + isRedesignedConfirmationsDeveloperEnabled: false, // developer mode disabled + isDecodingEnabled: false, + }), + ).toBe(false); + }); }); describe('when developer mode is enabled', () => { @@ -93,6 +104,17 @@ describe('confirmation.utils', () => { }), ).toBe(false); }); + + it('should return false if decoding is disabled', () => { + expect( + shouldUseRedesignForTransactions({ + transactionMetadataType: unsupportedTransactionType, + isRedesignedTransactionsUserSettingEnabled: false, // user setting disabled + isRedesignedConfirmationsDeveloperEnabled: true, // developer mode enabled + isDecodingEnabled: false, + }), + ).toBe(false); + }); }); describe('when both user setting and developer mode are disabled', () => { diff --git a/shared/lib/confirmation.utils.ts b/shared/lib/confirmation.utils.ts index 24c5f258a5d0..1813211582be 100644 --- a/shared/lib/confirmation.utils.ts +++ b/shared/lib/confirmation.utils.ts @@ -37,11 +37,17 @@ export function shouldUseRedesignForTransactions({ transactionMetadataType, isRedesignedTransactionsUserSettingEnabled, isRedesignedConfirmationsDeveloperEnabled, + isDecodingEnabled, }: { transactionMetadataType?: TransactionType; isRedesignedTransactionsUserSettingEnabled: boolean; isRedesignedConfirmationsDeveloperEnabled: boolean; + isDecodingEnabled?: boolean; }): boolean { + if (isDecodingEnabled === false) { + return false; + } + return ( shouldUseRedesignForTransactionsUserMode( isRedesignedTransactionsUserSettingEnabled, diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts index 32a711abf754..c12ce7025cb5 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts @@ -76,6 +76,32 @@ describe('useDecodedTransactionData', () => { expect(result).toStrictEqual({ pending: false, value: undefined }); }); + it('returns undefined if decode disabled', async () => { + decodeTransactionDataMock.mockResolvedValue(TRANSACTION_DECODE_SOURCIFY); + + const result = await runHook( + getMockConfirmStateForTransaction( + { + id: '123', + chainId: CHAIN_ID_MOCK, + type: TransactionType.contractInteraction, + status: TransactionStatus.unapproved, + txParams: { + data: TRANSACTION_DATA_UNISWAP, + to: CONTRACT_ADDRESS_MOCK, + } as TransactionParams, + }, + { + metamask: { + use4ByteResolution: false, + }, + }, + ), + ); + + expect(result).toStrictEqual({ pending: false, value: undefined }); + }); + it('returns the decoded data', async () => { decodeTransactionDataMock.mockResolvedValue(TRANSACTION_DECODE_SOURCIFY); diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts index 5276e02eaad1..3486f16ed864 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts @@ -1,6 +1,7 @@ import { Hex } from '@metamask/utils'; import { TransactionMeta } from '@metamask/transaction-controller'; +import { useSelector } from 'react-redux'; import { AsyncResult, useAsyncResult, @@ -9,11 +10,13 @@ import { decodeTransactionData } from '../../../../../../store/actions'; import { DecodedTransactionDataResponse } from '../../../../../../../shared/types/transaction-decode'; import { useConfirmContext } from '../../../../context/confirm'; import { hasTransactionData } from '../../../../../../../shared/modules/transaction.utils'; +import { use4ByteResolutionSelector } from '../../../../../../selectors'; export function useDecodedTransactionData( transactionTypeFilter?: string, ): AsyncResult { const { currentConfirmation } = useConfirmContext(); + const isDecodeEnabled = useSelector(use4ByteResolutionSelector); const currentTransactionType = currentConfirmation?.type; const chainId = currentConfirmation?.chainId as Hex; @@ -23,6 +26,7 @@ export function useDecodedTransactionData( return useAsyncResult(async () => { if ( + !isDecodeEnabled || !hasTransactionData(transactionData) || !transactionTo || (transactionTypeFilter && @@ -36,5 +40,11 @@ export function useDecodedTransactionData( chainId, contractAddress, }); - }, [transactionData, transactionTo, chainId, contractAddress]); + }, [ + isDecodeEnabled, + transactionData, + transactionTo, + chainId, + contractAddress, + ]); } diff --git a/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts b/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts index 8c66873d448c..efd26d14da39 100644 --- a/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts +++ b/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts @@ -59,6 +59,7 @@ function buildState({ redesignedTransactionsEnabled, transaction, isRedesignedConfirmationsDeveloperEnabled, + isDecodingEnabled, }: { // eslint-disable-next-line @typescript-eslint/no-explicit-any message?: Partial; @@ -67,6 +68,7 @@ function buildState({ redesignedTransactionsEnabled?: boolean; transaction?: Partial; isRedesignedConfirmationsDeveloperEnabled?: boolean; + isDecodingEnabled?: boolean; }) { return { ...mockState, @@ -83,6 +85,7 @@ function buildState({ unapprovedPersonalMsgs: message ? { [message.id as string]: message } : {}, + use4ByteResolution: isDecodingEnabled ?? true, }, }; } @@ -290,6 +293,19 @@ describe('useCurrentConfirmation', () => { expect(currentConfirmation).toStrictEqual(TRANSACTION_MOCK); }); + it('returns undefined if transaction type correct and redesign enabled but decoding disabled', () => { + const currentConfirmation = runHook({ + pendingApprovals: [{ ...APPROVAL_MOCK, type: ApprovalType.Transaction }], + redesignedConfirmationsEnabled: true, + transaction: TRANSACTION_MOCK, + redesignedTransactionsEnabled: true, + isRedesignedConfirmationsDeveloperEnabled: false, + isDecodingEnabled: false, + }); + + expect(currentConfirmation).toBeUndefined(); + }); + describe('useCurrentConfirmation with env var', () => { beforeAll(() => { jest.resetModules(); diff --git a/ui/pages/confirmations/hooks/useCurrentConfirmation.ts b/ui/pages/confirmations/hooks/useCurrentConfirmation.ts index 1771f807de25..b2ccc5fd4594 100644 --- a/ui/pages/confirmations/hooks/useCurrentConfirmation.ts +++ b/ui/pages/confirmations/hooks/useCurrentConfirmation.ts @@ -11,6 +11,7 @@ import { getUnapprovedTransaction, oldestPendingConfirmationSelector, selectPendingApproval, + use4ByteResolutionSelector, } from '../../../selectors'; import { selectUnapprovedMessage } from '../../../selectors/signatures'; import { @@ -30,6 +31,7 @@ const useCurrentConfirmation = () => { const { id: paramsConfirmationId } = useParams<{ id: string }>(); const oldestPendingApproval = useSelector(oldestPendingConfirmationSelector); const confirmationId = paramsConfirmationId ?? oldestPendingApproval?.id; + const isDecodingEnabled = Boolean(useSelector(use4ByteResolutionSelector)); const isRedesignedSignaturesUserSettingEnabled = useSelector( getRedesignedConfirmationsEnabled, @@ -66,6 +68,7 @@ const useCurrentConfirmation = () => { transactionMetadataType: transactionMetadata?.type, isRedesignedTransactionsUserSettingEnabled, isRedesignedConfirmationsDeveloperEnabled, + isDecodingEnabled, }); const shouldUseRedesign = From 611f3bbbabda9dfbe2ae998e7e8153bcaa81b758 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 20 Dec 2024 14:32:49 -0330 Subject: [PATCH 09/65] chore (cherry-pick): fix: nanoid audit issue (#29268) (#29398) Cherry pick 0e10bab6bc (#29268) to v12.9.3 Co-authored-by: Alejandro Garcia Anglada Co-authored-by: MetaMask Bot --- .../controllers/permissions/background-api.js | 2 +- app/scripts/metamask-controller.js | 2 +- lavamoat/browserify/beta/policy.json | 14 ++++++-------- lavamoat/browserify/flask/policy.json | 14 ++++++-------- lavamoat/browserify/main/policy.json | 14 ++++++-------- lavamoat/browserify/mmi/policy.json | 14 ++++++-------- lavamoat/build-system/policy.json | 2 +- package.json | 2 +- yarn.lock | 12 ++++++------ 9 files changed, 34 insertions(+), 42 deletions(-) diff --git a/app/scripts/controllers/permissions/background-api.js b/app/scripts/controllers/permissions/background-api.js index b778ff42385d..8a0942667f17 100644 --- a/app/scripts/controllers/permissions/background-api.js +++ b/app/scripts/controllers/permissions/background-api.js @@ -1,4 +1,4 @@ -import nanoid from 'nanoid'; +import { nanoid } from 'nanoid'; import { CaveatTypes, RestrictedMethods, diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index d60d937e1c3c..41687031aec5 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -47,7 +47,7 @@ import { rawChainData } from 'eth-chainlist'; import { MetaMaskKeyring as QRHardwareKeyring } from '@keystonehq/metamask-airgapped-keyring'; import EthQuery from '@metamask/eth-query'; import EthJSQuery from '@metamask/ethjs-query'; -import nanoid from 'nanoid'; +import { nanoid } from 'nanoid'; import { captureException } from '@sentry/browser'; import { AddressBookController } from '@metamask/address-book-controller'; import { diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index b3b118eb6bb8..ddd7640564ab 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -629,9 +629,9 @@ "console.info": true }, "packages": { - "@metamask/approval-controller>nanoid": true, "@metamask/base-controller": true, - "@metamask/rpc-errors": true + "@metamask/rpc-errors": true, + "nanoid": true } }, "@metamask/approval-controller>nanoid": { @@ -2044,11 +2044,11 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, - "@metamask/permission-controller>nanoid": true, "@metamask/rpc-errors": true, "@metamask/utils": true, "deep-freeze-strict": true, - "immer": true + "immer": true, + "nanoid": true } }, "@metamask/permission-controller>nanoid": { @@ -2506,7 +2506,6 @@ "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, - "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-rpc-methods": true, @@ -2517,6 +2516,7 @@ "browserify>browserify-zlib": true, "eslint>fast-deep-equal": true, "immer": true, + "nanoid": true, "readable-stream": true, "semver": true } @@ -4601,9 +4601,7 @@ }, "nanoid": { "globals": { - "crypto": true, - "msCrypto": true, - "navigator": true + "crypto.getRandomValues": true } }, "nock>debug": { diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index b3b118eb6bb8..ddd7640564ab 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -629,9 +629,9 @@ "console.info": true }, "packages": { - "@metamask/approval-controller>nanoid": true, "@metamask/base-controller": true, - "@metamask/rpc-errors": true + "@metamask/rpc-errors": true, + "nanoid": true } }, "@metamask/approval-controller>nanoid": { @@ -2044,11 +2044,11 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, - "@metamask/permission-controller>nanoid": true, "@metamask/rpc-errors": true, "@metamask/utils": true, "deep-freeze-strict": true, - "immer": true + "immer": true, + "nanoid": true } }, "@metamask/permission-controller>nanoid": { @@ -2506,7 +2506,6 @@ "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, - "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-rpc-methods": true, @@ -2517,6 +2516,7 @@ "browserify>browserify-zlib": true, "eslint>fast-deep-equal": true, "immer": true, + "nanoid": true, "readable-stream": true, "semver": true } @@ -4601,9 +4601,7 @@ }, "nanoid": { "globals": { - "crypto": true, - "msCrypto": true, - "navigator": true + "crypto.getRandomValues": true } }, "nock>debug": { diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index b3b118eb6bb8..ddd7640564ab 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -629,9 +629,9 @@ "console.info": true }, "packages": { - "@metamask/approval-controller>nanoid": true, "@metamask/base-controller": true, - "@metamask/rpc-errors": true + "@metamask/rpc-errors": true, + "nanoid": true } }, "@metamask/approval-controller>nanoid": { @@ -2044,11 +2044,11 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, - "@metamask/permission-controller>nanoid": true, "@metamask/rpc-errors": true, "@metamask/utils": true, "deep-freeze-strict": true, - "immer": true + "immer": true, + "nanoid": true } }, "@metamask/permission-controller>nanoid": { @@ -2506,7 +2506,6 @@ "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, - "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-rpc-methods": true, @@ -2517,6 +2516,7 @@ "browserify>browserify-zlib": true, "eslint>fast-deep-equal": true, "immer": true, + "nanoid": true, "readable-stream": true, "semver": true } @@ -4601,9 +4601,7 @@ }, "nanoid": { "globals": { - "crypto": true, - "msCrypto": true, - "navigator": true + "crypto.getRandomValues": true } }, "nock>debug": { diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index b4f5e137de6b..e9a50dd8057d 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -721,9 +721,9 @@ "console.info": true }, "packages": { - "@metamask/approval-controller>nanoid": true, "@metamask/base-controller": true, - "@metamask/rpc-errors": true + "@metamask/rpc-errors": true, + "nanoid": true } }, "@metamask/approval-controller>nanoid": { @@ -2136,11 +2136,11 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, - "@metamask/permission-controller>nanoid": true, "@metamask/rpc-errors": true, "@metamask/utils": true, "deep-freeze-strict": true, - "immer": true + "immer": true, + "nanoid": true } }, "@metamask/permission-controller>nanoid": { @@ -2598,7 +2598,6 @@ "@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, - "@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-rpc-methods": true, @@ -2609,6 +2608,7 @@ "browserify>browserify-zlib": true, "eslint>fast-deep-equal": true, "immer": true, + "nanoid": true, "readable-stream": true, "semver": true } @@ -4693,9 +4693,7 @@ }, "nanoid": { "globals": { - "crypto": true, - "msCrypto": true, - "navigator": true + "crypto.getRandomValues": true } }, "nock>debug": { diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 5338922720ef..32f1b088ad71 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -6560,7 +6560,7 @@ "process.env.NODE_ENV": true }, "packages": { - "postcss>nanoid": true, + "nanoid": true, "postcss>picocolors": true, "postcss>source-map-js": true } diff --git a/package.json b/package.json index 790a47a6adef..4532335b3aa1 100644 --- a/package.json +++ b/package.json @@ -397,7 +397,7 @@ "loglevel": "^1.8.1", "lottie-web": "^5.12.2", "luxon": "^3.2.1", - "nanoid": "^2.1.6", + "nanoid": "^3.3.8", "pify": "^5.0.0", "promise-to-callback": "^1.0.0", "prop-types": "^15.6.1", diff --git a/yarn.lock b/yarn.lock index 7eaa7689b391..5ee17e2614d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26910,7 +26910,7 @@ __metadata: mocha: "npm:^10.2.0" mocha-junit-reporter: "npm:^2.2.1" mockttp: "npm:^3.10.1" - nanoid: "npm:^2.1.6" + nanoid: "npm:^3.3.8" nock: "patch:nock@npm%3A13.5.4#~/.yarn/patches/nock-npm-13.5.4-2c4f77b249.patch" node-fetch: "npm:^2.6.1" nyc: "npm:^15.1.0" @@ -28062,19 +28062,19 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^2.0.0, nanoid@npm:^2.1.6": +"nanoid@npm:^2.0.0": version: 2.1.11 resolution: "nanoid@npm:2.1.11" checksum: 10/cf2a2eedcf9d8893a4687f11743ccf8381f047bc2b3d3887a23721bbef8fe64c5759b9cba6eb945e40efeb4a7e7379b3417e4dc5f6cc03050322d2c24a7ff69b languageName: node linkType: hard -"nanoid@npm:^3.1.31, nanoid@npm:^3.3.7": - version: 3.3.7 - resolution: "nanoid@npm:3.3.7" +"nanoid@npm:^3.1.31, nanoid@npm:^3.3.7, nanoid@npm:^3.3.8": + version: 3.3.8 + resolution: "nanoid@npm:3.3.8" bin: nanoid: bin/nanoid.cjs - checksum: 10/ac1eb60f615b272bccb0e2b9cd933720dad30bf9708424f691b8113826bb91aca7e9d14ef5d9415a6ba15c266b37817256f58d8ce980c82b0ba3185352565679 + checksum: 10/2d1766606cf0d6f47b6f0fdab91761bb81609b2e3d367027aff45e6ee7006f660fb7e7781f4a34799fe6734f1268eeed2e37a5fdee809ade0c2d4eb11b0f9c40 languageName: node linkType: hard From 506995095c53ee3d144fc0f727df73fe13ec6c8f Mon Sep 17 00:00:00 2001 From: AugmentedMode <31675118+AugmentedMode@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:39:19 -0500 Subject: [PATCH 10/65] fix (cherry-pick):Add main frame URL property to req object whenever req is triggered from an iframe #29337 (#29405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chery pick PR: #29337 into `V12.9.3` ## **Description** See the attached issue in metamask planning for more details. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29337?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to `https://develop.d3bkcslj57l47p.amplifyapp.com/` 2. Click on Proceed anyways (This phishing warning page here is expected) 3. Open the network tab to monitor network requests 4. Connect your wallet and click on a signature or transaction 5. Verify that mainFrameOrigin is included in the payload of the network request to the security alerts API Screenshot 2024-12-20 at 10 46 05 AM ## **Screenshots/Recordings** Below are screenshots demonstrating the behavior of a test HTML page I created: 1. In the first screenshot, before the iframe is loaded, the console shows only the origin of the main frame. 2. In the second screenshot, after clicking the button to load an iframe pointing to example.com, the solution correctly identifies both the mainFrameOrigin (main frame) and the origin (iframe). Screenshot 2024-12-18 at 10 24 48 PM Screenshot 2024-12-18 at 10 24 54 PM ### **Before** ### **After** ## **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/main/.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/main/.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. --- .../lib/createMainFrameOriginMiddleware.ts | 24 +++++++++++++++++++ app/scripts/metamask-controller.js | 22 ++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 app/scripts/lib/createMainFrameOriginMiddleware.ts diff --git a/app/scripts/lib/createMainFrameOriginMiddleware.ts b/app/scripts/lib/createMainFrameOriginMiddleware.ts new file mode 100644 index 000000000000..bcbc2cb7d6fd --- /dev/null +++ b/app/scripts/lib/createMainFrameOriginMiddleware.ts @@ -0,0 +1,24 @@ +// Request and responses are currently untyped. +/* eslint-disable @typescript-eslint/no-explicit-any */ + +/** + * Returns a middleware that appends the mainFrameOrigin to request + * + * @param {{ mainFrameOrigin: string }} opts - The middleware options + * @returns {Function} + */ + +export default function createMainFrameOriginMiddleware({ + mainFrameOrigin, +}: { + mainFrameOrigin: string; +}) { + return function mainFrameOriginMiddleware( + req: any, + _res: any, + next: () => void, + ) { + req.mainFrameOrigin = mainFrameOrigin; + next(); + }; +} diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 41687031aec5..3d73379dfc93 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -296,6 +296,7 @@ import { createUnsupportedMethodMiddleware, } from './lib/rpc-method-middleware'; import createOriginMiddleware from './lib/createOriginMiddleware'; +import createMainFrameOriginMiddleware from './lib/createMainFrameOriginMiddleware'; import createTabIdMiddleware from './lib/createTabIdMiddleware'; import { NetworkOrderController } from './controllers/network-order'; import { AccountOrderController } from './controllers/account-order'; @@ -5669,11 +5670,18 @@ export default class MetamaskController extends EventEmitter { tabId = sender.tab.id; } + let mainFrameOrigin = origin; + if (sender.tab && sender.tab.url) { + // If sender origin is an iframe, then get the top-level frame's origin + mainFrameOrigin = new URL(sender.tab.url).origin; + } + const engine = this.setupProviderEngineEip1193({ origin, sender, subjectType, tabId, + mainFrameOrigin, }); const dupeReqFilterStream = createDupeReqFilterStream(); @@ -5794,13 +5802,25 @@ export default class MetamaskController extends EventEmitter { * @param {MessageSender | SnapSender} options.sender - The sender object. * @param {string} options.subjectType - The type of the sender subject. * @param {tabId} [options.tabId] - The tab ID of the sender - if the sender is within a tab + * @param {mainFrameOrigin} [options.mainFrameOrigin] - The origin of the main frame if the sender is an iframe */ - setupProviderEngineEip1193({ origin, subjectType, sender, tabId }) { + setupProviderEngineEip1193({ + origin, + subjectType, + sender, + tabId, + mainFrameOrigin, + }) { const engine = new JsonRpcEngine(); // Append origin to each request engine.push(createOriginMiddleware({ origin })); + // Append mainFrameOrigin to each request if present + if (mainFrameOrigin) { + engine.push(createMainFrameOriginMiddleware({ mainFrameOrigin })); + } + // Append selectedNetworkClientId to each request engine.push(createSelectedNetworkMiddleware(this.controllerMessenger)); From 9788cef6e16072b073b5163b57fad9c75508a3fa Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 20 Dec 2024 16:57:56 -0330 Subject: [PATCH 11/65] Changelog v12.9.3 (#29407) --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ffb876707e..869e3a70a93a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [12.9.3] +### Fixed +- Fix some cases where users were incorrectly seeing 0 token balances ([#29361](https://github.com/MetaMask/metamask-extension/pull/29361)) +- Ensure users that opt out of smart transaction decoding don't send network requests to related APIs ([#29341](https://github.com/ +MetaMask/metamask-extension/pull/29341)) ## [12.9.2] ### Changed From 19635b434187363920226f3541c666209daeaee7 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Fri, 20 Dec 2024 20:39:21 +0000 Subject: [PATCH 12/65] Update Attributions --- attribution.txt | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/attribution.txt b/attribution.txt index aaeef31a2fbe..30695b63c042 100644 --- a/attribution.txt +++ b/attribution.txt @@ -21249,33 +21249,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** nanoid -2.1.11 -The MIT License (MIT) - -Copyright 2017 Andrey Sitnik - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -nanoid -3.3.7 +3.3.8 The MIT License (MIT) Copyright 2017 Andrey Sitnik From b24c4e95915973a715b761ede457ea61911b63b9 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Fri, 20 Dec 2024 22:34:31 +0000 Subject: [PATCH 13/65] fix (cherry-pick): navigation between watch asset approvals #29279 (#29401) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Cherry-pick of #29279 for release `12.10.0`. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29401?quickstart=1) ## **Related issues** ## **Manual testing steps** ## **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/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-extension/blob/main/.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. --- .../usePendingTransactionAlerts.test.ts | 48 +------- .../hooks/useConfirmationNavigation.test.ts | 104 +++++++++++++++--- .../hooks/useConfirmationNavigation.ts | 4 +- ui/pages/home/home.container.js | 4 +- ui/selectors/approvals.ts | 46 +++++++- 5 files changed, 138 insertions(+), 68 deletions(-) diff --git a/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.test.ts b/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.test.ts index f7be0f93e2c1..e045a648f484 100644 --- a/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.test.ts +++ b/ui/pages/confirmations/hooks/alerts/transactions/usePendingTransactionAlerts.test.ts @@ -4,34 +4,18 @@ import { TransactionStatus, TransactionType, } from '@metamask/transaction-controller'; -import { useSelector } from 'react-redux'; -import { useParams } from 'react-router-dom'; import { genUnapprovedContractInteractionConfirmation } from '../../../../../../test/data/confirmations/contract-interaction'; import { getMockConfirmState } from '../../../../../../test/data/confirmations/helper'; import { renderHookWithConfirmContextProvider } from '../../../../../../test/lib/confirmations/render-helpers'; import { RowAlertKey } from '../../../../../components/app/confirm/info/row/constants'; import { Severity } from '../../../../../helpers/constants/design-system'; -import { - getRedesignedTransactionsEnabled, - submittedPendingTransactionsSelector, -} from '../../../../../selectors'; import { PendingTransactionAlertMessage } from './PendingTransactionAlertMessage'; import { usePendingTransactionAlerts } from './usePendingTransactionAlerts'; -jest.mock('react-redux', () => ({ - ...jest.requireActual('react-redux'), - useSelector: jest.fn(), -})); - jest.mock('./PendingTransactionAlertMessage', () => ({ PendingTransactionAlertMessage: () => 'PendingTransactionAlertMessage', })); -jest.mock('react-router-dom', () => ({ - ...jest.requireActual('react-router-dom'), - useParams: jest.fn().mockReturnValue({ id: 'mock-transaction-id' }), -})); - const ACCOUNT_ADDRESS = '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc'; const TRANSACTION_ID_MOCK = '123-456'; @@ -59,6 +43,7 @@ function runHook({ transactions?: TransactionMeta[]; } = {}) { let pendingApprovals = {}; + if (currentConfirmation) { pendingApprovals = { [currentConfirmation.id as string]: { @@ -68,12 +53,14 @@ function runHook({ }; transactions.push(currentConfirmation); } + const state = getMockConfirmState({ metamask: { pendingApprovals, transactions, }, }); + const response = renderHookWithConfirmContextProvider( usePendingTransactionAlerts, state, @@ -83,19 +70,8 @@ function runHook({ } describe('usePendingTransactionAlerts', () => { - const useSelectorMock = useSelector as jest.Mock; - beforeEach(() => { jest.resetAllMocks(); - - (useParams as jest.Mock).mockReturnValue({ id: 'mock-transaction-id' }); - - useSelectorMock.mockImplementation((selector) => { - if (selector.toString().includes('pendingApprovalsSortedSelector')) { - return []; - } - return undefined; - }); }); it('returns no alerts if no confirmation', () => { @@ -152,24 +128,6 @@ describe('usePendingTransactionAlerts', () => { }); it('returns alert if submitted transaction', () => { - useSelectorMock.mockImplementation((selector) => { - if (selector === submittedPendingTransactionsSelector) { - return [ - { name: 'first transaction', id: '1' }, - { name: 'second transaction', id: '2' }, - ]; - } else if (selector === getRedesignedTransactionsEnabled) { - return true; - } else if (selector.toString().includes('getUnapprovedTransaction')) { - return { type: TransactionType.contractInteraction }; - } else if ( - selector.toString().includes('pendingApprovalsSortedSelector') - ) { - return []; - } - return undefined; - }); - const alerts = runHook({ currentConfirmation: CONFIRMATION_MOCK, transactions: [TRANSACTION_META_MOCK], diff --git a/ui/pages/confirmations/hooks/useConfirmationNavigation.test.ts b/ui/pages/confirmations/hooks/useConfirmationNavigation.test.ts index edaddc0e520f..9804e14a0e00 100644 --- a/ui/pages/confirmations/hooks/useConfirmationNavigation.test.ts +++ b/ui/pages/confirmations/hooks/useConfirmationNavigation.test.ts @@ -28,34 +28,40 @@ jest.mock('../confirmation/templates', () => ({ const APPROVAL_ID_MOCK = '123-456'; const APPROVAL_ID_2_MOCK = '456-789'; -function renderHook( - approvalType: ApprovalType, - requestData?: Json, - approvalFlows?: ApprovalFlowState[], -) { +function renderHookWithState(state: Record) { const { result } = renderHookWithProvider(() => useConfirmationNavigation(), { ...mockState, metamask: { ...mockState.metamask, - pendingApprovals: { - [APPROVAL_ID_MOCK]: { - id: APPROVAL_ID_MOCK, - type: approvalType, - requestData, - }, - [APPROVAL_ID_2_MOCK]: { - id: APPROVAL_ID_2_MOCK, - type: approvalType, - requestData, - }, - }, - approvalFlows, + ...state, }, }); return result.current; } +function renderHook( + approvalType: ApprovalType, + requestData?: Json, + approvalFlows?: ApprovalFlowState[], +) { + return renderHookWithState({ + pendingApprovals: { + [APPROVAL_ID_MOCK]: { + id: APPROVAL_ID_MOCK, + type: approvalType, + requestData, + }, + [APPROVAL_ID_2_MOCK]: { + id: APPROVAL_ID_2_MOCK, + type: approvalType, + requestData, + }, + }, + approvalFlows, + }); +} + describe('useConfirmationNavigation', () => { const useHistoryMock = jest.mocked(useHistory); const history = { replace: jest.fn() }; @@ -202,6 +208,36 @@ describe('useConfirmationNavigation', () => { const result = renderHook(ApprovalType.Transaction); expect(result.count).toBe(2); }); + + // @ts-expect-error This function is missing from the Mocha type definitions + it.each([ + ['token', undefined], + ['NFT', '123'], + ])( + 'ignores additional watch %s approvals', + (_title: string, tokenId?: string) => { + const result = renderHookWithState({ + pendingApprovals: { + [APPROVAL_ID_MOCK]: { + id: APPROVAL_ID_MOCK, + type: ApprovalType.WatchAsset, + requestData: { asset: { tokenId } }, + }, + [APPROVAL_ID_2_MOCK]: { + id: APPROVAL_ID_2_MOCK, + type: ApprovalType.Transaction, + }, + duplicate: { + id: 'duplicate', + type: ApprovalType.WatchAsset, + requestData: { asset: { tokenId } }, + }, + }, + }); + + expect(result.count).toBe(2); + }, + ); }); describe('getIndex', () => { @@ -224,5 +260,37 @@ describe('useConfirmationNavigation', () => { APPROVAL_ID_2_MOCK, ]); }); + + // @ts-expect-error This function is missing from the Mocha type definitions + it.each([ + ['token', undefined], + ['NFT', '123'], + ])( + 'ignores additional watch %s approvals', + (_title: string, tokenId?: string) => { + const result = renderHookWithState({ + pendingApprovals: { + [APPROVAL_ID_MOCK]: { + id: APPROVAL_ID_MOCK, + type: ApprovalType.WatchAsset, + requestData: { asset: { tokenId } }, + }, + [APPROVAL_ID_2_MOCK]: { + id: APPROVAL_ID_2_MOCK, + type: ApprovalType.Transaction, + }, + duplicate: { + id: 'duplicate', + type: ApprovalType.WatchAsset, + requestData: { asset: { tokenId } }, + }, + }, + }); + + expect( + result.confirmations.map(({ id }: { id: string }) => id), + ).toEqual([APPROVAL_ID_MOCK, APPROVAL_ID_2_MOCK]); + }, + ); }); }); diff --git a/ui/pages/confirmations/hooks/useConfirmationNavigation.ts b/ui/pages/confirmations/hooks/useConfirmationNavigation.ts index 9a5cdfc5cd9e..95bc1d93cd34 100644 --- a/ui/pages/confirmations/hooks/useConfirmationNavigation.ts +++ b/ui/pages/confirmations/hooks/useConfirmationNavigation.ts @@ -19,7 +19,7 @@ import { import { isSignatureTransactionType } from '../utils'; import { getApprovalFlows, - pendingApprovalsSortedSelector, + selectPendingApprovalsForNavigation, } from '../../../selectors'; const CONNECT_APPROVAL_TYPES = [ @@ -30,7 +30,7 @@ const CONNECT_APPROVAL_TYPES = [ ]; export function useConfirmationNavigation() { - const confirmations = useSelector(pendingApprovalsSortedSelector, isEqual); + const confirmations = useSelector(selectPendingApprovalsForNavigation); const approvalFlows = useSelector(getApprovalFlows, isEqual); const history = useHistory(); diff --git a/ui/pages/home/home.container.js b/ui/pages/home/home.container.js index 4fb46ccc1744..cae73b180f4d 100644 --- a/ui/pages/home/home.container.js +++ b/ui/pages/home/home.container.js @@ -40,7 +40,7 @@ import { getSelectedInternalAccount, getQueuedRequestCount, getEditedNetwork, - pendingApprovalsSortedSelector, + selectPendingApprovalsForNavigation, ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) getAccountType, ///: END:ONLY_INCLUDE_IF @@ -108,7 +108,7 @@ const mapStateToProps = (state) => { const totalUnapprovedAndQueuedRequestCount = totalUnapprovedCount + queuedRequestCount; const swapsEnabled = getSwapsFeatureIsLive(state); - const pendingApprovals = pendingApprovalsSortedSelector(state); + const pendingApprovals = selectPendingApprovalsForNavigation(state); ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) const institutionalConnectRequests = getInstitutionalConnectRequests(state); diff --git a/ui/selectors/approvals.ts b/ui/selectors/approvals.ts index 55a5d052579c..f8f937bb2f34 100644 --- a/ui/selectors/approvals.ts +++ b/ui/selectors/approvals.ts @@ -1,6 +1,10 @@ -import { ApprovalControllerState } from '@metamask/approval-controller'; +import { + ApprovalControllerState, + ApprovalRequest, +} from '@metamask/approval-controller'; import { ApprovalType } from '@metamask/controller-utils'; import { createSelector } from 'reselect'; +import { Json } from '@metamask/utils'; import { createDeepEqualSelector } from '../../shared/modules/selectors/util'; export type ApprovalsMetaMaskState = { @@ -58,6 +62,32 @@ export function pendingApprovalsSortedSelector(state: ApprovalsMetaMaskState) { return getPendingApprovals(state).sort((a1, a2) => a1.time - a2.time); } +/** + * Returns pending approvals sorted by time for use in confirmation navigation. + * Excludes duplicate watch asset approvals as they are combined into a single confirmation. + */ +export const selectPendingApprovalsForNavigation = createDeepEqualSelector( + pendingApprovalsSortedSelector, + (sortedPendingApprovals) => + sortedPendingApprovals.filter((approval, index) => { + if ( + isWatchNftApproval(approval) && + sortedPendingApprovals.findIndex(isWatchNftApproval) !== index + ) { + return false; + } + + if ( + isWatchTokenApproval(approval) && + sortedPendingApprovals.findIndex(isWatchTokenApproval) !== index + ) { + return false; + } + + return true; + }), +); + const internalSelectPendingApproval = createSelector( getPendingApprovals, (_state: ApprovalsMetaMaskState, id: string) => id, @@ -68,3 +98,17 @@ export const selectPendingApproval = createDeepEqualSelector( internalSelectPendingApproval, (approval) => approval, ); + +function isWatchTokenApproval(approval: ApprovalRequest>) { + const tokenId = (approval.requestData?.asset as Record) + ?.tokenId; + + return approval.type === ApprovalType.WatchAsset && !tokenId; +} + +function isWatchNftApproval(approval: ApprovalRequest>) { + const tokenId = (approval.requestData?.asset as Record) + ?.tokenId; + + return approval.type === ApprovalType.WatchAsset && Boolean(tokenId); +} From 34fbdc277e32eb051e9c3bc4fa63588d99fb660a Mon Sep 17 00:00:00 2001 From: Alejandro Garcia Anglada Date: Mon, 6 Jan 2025 12:33:55 +0100 Subject: [PATCH 14/65] [cherry-pick to Version-v12.10.0] feat: bump solana snap (#29350) (#29378) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cherry picks https://github.com/MetaMask/metamask-extension/pull/29350 ## **Description** Solana snap bump https://github.com/MetaMask/snap-solana-wallet/releases/tag/v1.0.4 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29350?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --------- ## **Description** [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29378?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. Co-authored-by: Antonio Regadas Co-authored-by: Javier --- package.json | 2 +- privacy-snapshot.json | 2 ++ yarn.lock | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b5837f3aa1f4..9dd6da396f92 100644 --- a/package.json +++ b/package.json @@ -346,7 +346,7 @@ "@metamask/snaps-rpc-methods": "^11.7.0", "@metamask/snaps-sdk": "^6.13.0", "@metamask/snaps-utils": "^8.6.1", - "@metamask/solana-wallet-snap": "^1.0.3", + "@metamask/solana-wallet-snap": "^1.0.4", "@metamask/transaction-controller": "^42.0.0", "@metamask/user-operation-controller": "^19.0.0", "@metamask/utils": "^10.0.1", diff --git a/privacy-snapshot.json b/privacy-snapshot.json index fc5dafb7333c..24c6e9ae27da 100644 --- a/privacy-snapshot.json +++ b/privacy-snapshot.json @@ -3,6 +3,7 @@ "accounts.api.cx.metamask.io", "acl.execution.metamask.io", "api.blockchair.com", + "api.devnet.solana.com", "api.lens.dev", "api.segment.io", "api.web3modal.com", @@ -59,6 +60,7 @@ "sepolia.infura.io", "signature-insights.api.cx.metamask.io", "snaps.metamask.io", + "solana.rpc.grove.city", "sourcify.dev", "start.metamask.io", "static.cx.metamask.io", diff --git a/yarn.lock b/yarn.lock index 0359c83c1da9..a66542a4a9f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6346,10 +6346,10 @@ __metadata: languageName: node linkType: hard -"@metamask/solana-wallet-snap@npm:^1.0.3": - version: 1.0.3 - resolution: "@metamask/solana-wallet-snap@npm:1.0.3" - checksum: 10/4c7c0f05676e7bb84140226c1a3bd716493a6f3582142de83575df682e8351c7583fc5db6209fbde1b43f376fd4eda4d2063f0e651d8209e92001514fc8caf81 +"@metamask/solana-wallet-snap@npm:^1.0.4": + version: 1.0.4 + resolution: "@metamask/solana-wallet-snap@npm:1.0.4" + checksum: 10/4d3b2a400607299fb4200e409f151e999e980e30521e63dcbbb5b658a4fdcfd6be341452695de32d985e14e8f8d4c5c24169f84dfd1a2063d3bc35f0c4903f74 languageName: node linkType: hard @@ -26598,7 +26598,7 @@ __metadata: "@metamask/snaps-rpc-methods": "npm:^11.7.0" "@metamask/snaps-sdk": "npm:^6.13.0" "@metamask/snaps-utils": "npm:^8.6.1" - "@metamask/solana-wallet-snap": "npm:^1.0.3" + "@metamask/solana-wallet-snap": "npm:^1.0.4" "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:8.13.0" "@metamask/transaction-controller": "npm:^42.0.0" From 8a0684371fe188c8c83ab2613fccd7135d4d139c Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Mon, 6 Jan 2025 15:12:38 +0000 Subject: [PATCH 15/65] fix (cherry-pick): remove reliance on transaction decode in confirmations #29341 (#29399) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Cherry-pick of #29341 for release `12.10.0`. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29399?quickstart=1) ## **Related issues** ## **Manual testing steps** ## **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/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-extension/blob/main/.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/de/messages.json | 3 - app/_locales/el/messages.json | 3 - app/_locales/en/messages.json | 6 +- app/_locales/es/messages.json | 3 - app/_locales/fr/messages.json | 3 - app/_locales/hi/messages.json | 3 - app/_locales/id/messages.json | 3 - app/_locales/ja/messages.json | 3 - app/_locales/ko/messages.json | 3 - app/_locales/pt/messages.json | 3 - app/_locales/ru/messages.json | 3 - app/_locales/tl/messages.json | 3 - app/_locales/tr/messages.json | 3 - app/_locales/vi/messages.json | 3 - app/_locales/zh_CN/messages.json | 3 - .../confirmations/set-approval-for-all.ts | 5 +- test/data/confirmations/token-approve.ts | 4 +- test/data/confirmations/token-transfer.ts | 7 +- .../transactions/increase-allowance.test.tsx | 6 +- .../set-approval-for-all.test.tsx | 2 +- ui/helpers/constants/settings.js | 2 +- .../info/__snapshots__/info.test.tsx.snap | 304 +++++++++++++++- .../approve-details.test.tsx.snap | 336 +++++++++++++----- .../approve-details/approve-details.test.tsx | 22 +- .../approve-details/approve-details.tsx | 22 +- .../confirm/info/approve/approve.test.tsx | 7 +- .../use-approve-token-simulation.test.ts | 173 ++------- .../hooks/use-approve-token-simulation.ts | 36 +- .../info/hooks/use-token-values.test.ts | 98 ++--- .../confirm/info/hooks/use-token-values.ts | 68 +--- .../hooks/useDecodedTransactionData.test.ts | 26 ++ .../info/hooks/useDecodedTransactionData.ts | 12 +- .../hooks/useTokenTransactionData.test.ts | 94 +++++ .../info/hooks/useTokenTransactionData.ts | 14 + .../native-transfer.test.tsx.snap | 175 +++++++++ .../nft-token-transfer.test.tsx.snap | 175 +++++++++ .../set-approval-for-all-info.test.tsx.snap | 100 +++++- .../set-approval-for-all-info.test.tsx | 5 - .../set-approval-for-all-info.tsx | 17 +- .../__snapshots__/send-heading.test.tsx.snap | 58 ++- .../shared/send-heading/send-heading.test.tsx | 6 + .../info/shared/send-heading/send-heading.tsx | 6 - .../token-transfer.test.tsx.snap | 239 ++++++++++--- .../token-transfer/token-transfer.test.tsx | 8 +- .../transaction-flow-section.test.tsx | 45 +-- .../transaction-flow-section.tsx | 15 +- .../components/confirm/info/utils.test.ts | 33 +- .../components/confirm/info/utils.ts | 12 +- .../components/confirm/title/title.tsx | 27 +- .../privacy-settings/privacy-settings.js | 2 +- .../__snapshots__/security-tab.test.js.snap | 2 +- .../security-tab/security-tab.component.js | 2 +- 52 files changed, 1542 insertions(+), 671 deletions(-) create mode 100644 ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.test.ts create mode 100644 ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index a738b56b0fe0..50fd55d9ee78 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Smart Contracts dekodieren" }, - "use4ByteResolutionDescription": { - "message": "Um das Benutzererlebnis zu verbessern, passen wir die Aktivitätsregisterkarte mit Nachrichten an, die auf den Smart Contracts basieren, mit denen Sie interagieren. MetaMask verwendet einen Dienst namens 4byte.directory, um Daten zu entschlüsseln und Ihnen eine Version eines Smart Contracts anzuzeigen, die leichter zu lesen ist. Dies trägt dazu bei, die Wahrscheinlichkeit zu verringern, dass Sie bösartige Smart-Contract-Aktionen genehmigen, kann aber dazu führen, dass Ihre IP-Adresse weitergegeben wird." - }, "useMultiAccountBalanceChecker": { "message": "Kontoguthaben-Anfragen sammeln" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 7992443a500a..34962464e64a 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Αποκωδικοποίηση έξυπνων συμβολαίων" }, - "use4ByteResolutionDescription": { - "message": "Για να βελτιώσουμε την εμπειρία του χρήστη, προσαρμόζουμε την καρτέλα δραστηριότητας με μηνύματα που βασίζονται στα έξυπνα συμβόλαια με τα οποία αλληλεπιδράτε. Το MetaMask χρησιμοποιεί μια υπηρεσία που ονομάζεται 4byte.directory για την αποκωδικοποίηση δεδομένων και την εμφάνιση μιας έκδοσης ενός έξυπνου συμβολαίου που είναι πιο ευανάγνωστο. Αυτό συμβάλλει στη μείωση των πιθανοτήτων σας να εγκρίνετε κακόβουλες ενέργειες έξυπνων συμβολαίων, αλλά μπορεί να έχει ως αποτέλεσμα την κοινοποίηση της διεύθυνσης IP σας." - }, "useMultiAccountBalanceChecker": { "message": "Μαζικά αιτήματα υπολοίπου λογαριασμού" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 12df50e257d7..f435cd4a1eea 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -6293,6 +6293,9 @@ "message": "To: $1", "description": "$1 is the address to include in the To label. It is typically shortened first using shortenAddress" }, + "toggleDecodeDescription": { + "message": "We use 4byte.directory and Sourcify services to decode and display more readable transaction data. This helps you understand the outcome of pending and past transactions, but can result in your IP address being shared." + }, "toggleRequestQueueDescription": { "message": "This allows you to select a network for each site instead of a single selected network for all sites. This feature will prevent you from switching networks manually, which may break your user experience on certain sites." }, @@ -6659,9 +6662,6 @@ "use4ByteResolution": { "message": "Decode smart contracts" }, - "use4ByteResolutionDescription": { - "message": "To improve user experience, we customize the activity tab with messages based on the smart contracts you interact with. MetaMask uses a service called 4byte.directory to decode data and show you a version of a smart contract that's easier to read. This helps reduce your chances of approving malicious smart contract actions, but can result in your IP address being shared." - }, "useMultiAccountBalanceChecker": { "message": "Batch account balance requests" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 2475977d0794..d32128e8ca43 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Decodificar contratos inteligentes" }, - "use4ByteResolutionDescription": { - "message": "Para mejorar la experiencia del usuario, personalizamos la pestaña de actividad con mensajes basados en los contratos inteligentes con los que interactúa. MetaMask usa un servicio llamado 4byte.directory para decodificar datos y mostrarle una versión de un contrato inteligente que es más fácil de leer. Esto ayuda a reducir sus posibilidades de aprobar acciones de contratos inteligentes maliciosos, pero puede resultar en que se comparta su dirección IP." - }, "useMultiAccountBalanceChecker": { "message": "Solicitudes de saldo de cuenta por lotes" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index abe83f8ea900..728dd0a8bf2d 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Décoder les contrats intelligents" }, - "use4ByteResolutionDescription": { - "message": "Pour améliorer l’expérience utilisateur, nous personnalisons les messages qui s’affichent dans l’onglet d’activité en fonction des contrats intelligents avec lesquels vous interagissez. MetaMask utilise un service appelé 4byte.directory pour décoder les données et vous montrer une version plus facile à lire des contrats intelligents. Ainsi vous aurez moins de chances d’approuver l’exécution de contrats intelligents malveillants, mais cela peut nécessiter le partage de votre adresse IP." - }, "useMultiAccountBalanceChecker": { "message": "Demandes d’informations concernant le solde de plusieurs comptes" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 4eaf54f8b012..863257ee1178 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "स्मार्ट कॉन्ट्रैक्ट्स को डीकोड करें" }, - "use4ByteResolutionDescription": { - "message": "यूज़र के अनुभव को बेहतर बनाने के लिए, आपके द्वारा इंटरैक्ट किए गए स्मार्ट कॉन्ट्रैक्ट्स के आधार पर हम एक्टिविटी टैब को मैसेज के साथ कस्टमाइज़ करते हैं। डेटा को डीकोड करने और आसानी से पढ़े जा सकने वाले स्मार्ट कॉन्ट्रैक्ट्स का एक वर्शन आपको दिखाने के लिए MetaMask एक सर्विस इस्तेमाल करता है जिसका नाम 4byte.directory है। इससे आपके द्वारा बुरी नीयत वाले स्मार्ट कॉन्ट्रैक्ट एक्शन को मंजूरी देने की संभावनाओं को कम करने में मदद मिलती है। हालांकि, इसमें आपका IP एड्रेस शेयर होने का खतरा हो सकता है।" - }, "useMultiAccountBalanceChecker": { "message": "अकाउंट के बैलेंस के रिक्वेस्ट्स को बैच करें" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index c93bd496ac12..418ca4b60489 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Uraikan kode kontrak cerdas" }, - "use4ByteResolutionDescription": { - "message": "Untuk meningkatkan pengalaman pengguna, kami menyesuaikan tab aktivitas dengan pesan berdasarkan kontrak cerdas yang berinteraksi dengan Anda. MetaMask menggunakan layanan yang disebut 4byte.directory untuk menguraikan kode data dan menampilkan versi kontrak cerdas yang lebih mudah dibaca. Ini membantu mengurangi peluang Anda untuk menyetujui tindakan kontrak cerdas yang berbahaya, tetapi dapat menyebabkan alamat IP Anda tersebar." - }, "useMultiAccountBalanceChecker": { "message": "Kelompokkan permintaan saldo akun" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 24a2f60314cd..41e34d26dd2d 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "スマートコントラクトのデコード" }, - "use4ByteResolutionDescription": { - "message": "ユーザーエクスペリエンスの向上のため、ユーザーがやり取りするスマートコントラクトに応じたメッセージで、アクティビティタブをカスタマイズします。MetaMaskは、4byte.directoryと呼ばれるサービスを利用してデータをデコードし、より読みやすいバージョンのスマートコントラクトを表示します。これにより、悪質なスマートコントラクトの操作を承認する可能性は減りますが、IPアドレスが公開されます。" - }, "useMultiAccountBalanceChecker": { "message": "アカウント残高の一括リクエスト" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index c261f74b4b5c..8c0f26b8cad7 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "스마트 계약 디코딩" }, - "use4ByteResolutionDescription": { - "message": "인터렉션하는 스마트 계약에 따라 메시지를 이용하여 활동 탭을 사용자 맞춤하여 사용자 경험을 개선합니다. MetaMask는 4byte.directory라는 서비스를 통해 데이터를 디코딩하여 스마트 계약을 읽기 쉬운 버전으로 보여 줍니다. 이는 악의적인 스마트 계약을 승인할 가능성을 줄이는 데 도움이 되지만 IP 주소가 공유될 수 있습니다." - }, "useMultiAccountBalanceChecker": { "message": "일괄 계정 잔액 요청" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 5a1389a0d4d6..77312d33bb07 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "Decodificar contratos inteligentes" }, - "use4ByteResolutionDescription": { - "message": "Para melhorar a experiência do usuário, personalizamos a guia de atividades com mensagens baseadas nos contratos inteligentes com os quais você interage. A MetaMask usa um serviço chamado 4byte.directory para decodificar os dados e exibir a você uma versão de um contrato inteligente que é mais fácil de ler. Isso ajuda a reduzir suas chances de aprovar ações de contratos inteligentes mal-intencionados, mas pode resultar no compartilhamento do seu endereço IP." - }, "useMultiAccountBalanceChecker": { "message": "Agrupar solicitações de saldo de contas" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 37a672ec798a..89ba6f0d0bd9 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -6378,9 +6378,6 @@ "use4ByteResolution": { "message": "Расшифровать смарт-контракты" }, - "use4ByteResolutionDescription": { - "message": "Чтобы улучшить взаимодействие с пользователем, мы настраиваем вкладку действий, добавляя сообщения на основе смарт-контрактов, с которыми вы взаимодействуете. MetaMask использует службу под названием 4byte.directory для декодирования данных и показа версии смарт-контакта, которую легче читать. Это помогает снизить шансы того, что вы одобрите вредоносные действия смарт-контракта, но может привести к раскрытию вашего IP-адреса." - }, "useMultiAccountBalanceChecker": { "message": "Пакетные запросы баланса счета" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 20b318456d77..d235dc123943 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "I-decode ang mga smart na kontrata" }, - "use4ByteResolutionDescription": { - "message": "Upang mapabuti ang karanasan ng user, kino-customize namin ang tab ng mga aktibidad gamit ang mga mensahe ayon sa mga smart na kontrata kung saan ka nakikipag-ugnayan. Gumagamit ang MetaMask ng serbisyong tinatawag na 4byte.directory para i-decode ang datos at ipakita sa iyo ang bersyon ng smart na kontrata na mas madaling basahin. Tumutulong ito na bawasan ang pagkakataon na aprubahan mo ang mga mapaminsalang aksyon sa smart na kontrata, ngunit maaaring magresulta sa pagbabahagi ng iyong IP address." - }, "useMultiAccountBalanceChecker": { "message": "Maramihang kahilingan sa balanse ng account" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 470bb934f74b..cf65b516f6eb 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "Akıllı sözleşmelerin şifresini çöz" }, - "use4ByteResolutionDescription": { - "message": "Kullanıcı deneyiminizi iyileştirmek amacıyla aktivite sekmesini etkileşimde bulunduğunuz akıllı sözleşmelere bağlı mesajlarla kişiselleştiririz. MetaMask, verileri çözmek ve size okunması daha kolay olan bir akıllı sözleşme sürümü göstermek için 4byte.directory adlı bir hizmet kullanır. Böylece kötü amaçlı akıllı sözleşme eylemlerini onaylama ihtimalinizi düşürmeye yardımcı olur ancak IP adresinizin paylaşılmasına neden olabilir." - }, "useMultiAccountBalanceChecker": { "message": "Toplu hesap bakiyesi talepleri" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index d331ab42b9b5..024a91858cc2 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "Giải mã hợp đồng thông minh" }, - "use4ByteResolutionDescription": { - "message": "Để cải thiện trải nghiệm người dùng, chúng tôi sẽ tùy chỉnh thẻ hoạt động bằng các thông báo dựa trên các hợp đồng thông minh mà bạn tương tác. MetaMask sử dụng một dịch vụ có tên là 4byte.directory để giải mã dữ liệu và cho bạn thấy một phiên bản hợp đồng thông minh dễ đọc hơn. Điều này giúp giảm nguy cơ chấp thuận các hành động hợp đồng thông minh độc hại, nhưng có thể khiến địa chỉ IP của bạn bị chia sẻ." - }, "useMultiAccountBalanceChecker": { "message": "Xử lý hàng loạt yêu cầu số dư tài khoản" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 52941dcc24f9..719d2f102faf 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -6379,9 +6379,6 @@ "use4ByteResolution": { "message": "对智能合约进行解码" }, - "use4ByteResolutionDescription": { - "message": "为了改善用户体验,我们根据与您交互的智能合约消息,自定义活动选项卡。MetaMask 使用名为 4byte.directory 的服务来对数据进行解码,并向您显示更方便阅读的智能合约版本。这有助于减少您批准恶意智能合约操作的机会,但可能导致您的 IP 地址被共享。" - }, "useMultiAccountBalanceChecker": { "message": "账户余额分批请求" }, diff --git a/test/data/confirmations/set-approval-for-all.ts b/test/data/confirmations/set-approval-for-all.ts index ca997f6212af..ec1889a7b16b 100644 --- a/test/data/confirmations/set-approval-for-all.ts +++ b/test/data/confirmations/set-approval-for-all.ts @@ -6,6 +6,9 @@ import { genUnapprovedContractInteractionConfirmation, } from './contract-interaction'; +export const INCREASE_ALLOWANCE_TRANSACTION_DATA = + '0x395093510000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b0000000000000000000000000000000000000000000000000000000000000123'; + export const genUnapprovedSetApprovalForAllConfirmation = ({ address = CONTRACT_INTERACTION_SENDER_ADDRESS, chainId = CHAIN_ID, @@ -16,7 +19,7 @@ export const genUnapprovedSetApprovalForAllConfirmation = ({ ...genUnapprovedContractInteractionConfirmation({ chainId }), txParams: { from: address, - data: '0x095ea7b30000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b0000000000000000000000000000000000000000000000000000000000000001', + data: '0xa22cb4650000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b0000000000000000000000000000000000000000000000000000000000000001', gas: '0x16a92', to: '0x076146c765189d51be3160a2140cf80bfc73ad68', value: '0x0', diff --git a/test/data/confirmations/token-approve.ts b/test/data/confirmations/token-approve.ts index c77d59101a99..f10a2c9c92d3 100644 --- a/test/data/confirmations/token-approve.ts +++ b/test/data/confirmations/token-approve.ts @@ -9,14 +9,16 @@ import { export const genUnapprovedApproveConfirmation = ({ address = CONTRACT_INTERACTION_SENDER_ADDRESS, chainId = CHAIN_ID, + amountHex = '0000000000000000000000000000000000000000000000000000000000000001', }: { address?: Hex; chainId?: string; + amountHex?: string; } = {}) => ({ ...genUnapprovedContractInteractionConfirmation({ chainId }), txParams: { from: address, - data: '0x095ea7b30000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b0000000000000000000000000000000000000000000000000000000000000001', + data: `0x095ea7b30000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b${amountHex}`, gas: '0x16a92', to: '0x076146c765189d51be3160a2140cf80bfc73ad68', value: '0x0', diff --git a/test/data/confirmations/token-transfer.ts b/test/data/confirmations/token-transfer.ts index 22d0cb2d00b4..9228373bdf3e 100644 --- a/test/data/confirmations/token-transfer.ts +++ b/test/data/confirmations/token-transfer.ts @@ -6,19 +6,24 @@ import { genUnapprovedContractInteractionConfirmation, } from './contract-interaction'; +export const TRANSFER_FROM_TRANSACTION_DATA = + '0x23b872dd0000000000000000000000002e0D7E8c45221FcA00d74a3609A0f7097035d09B0000000000000000000000002e0D7E8c45221FcA00d74a3609A0f7097035d09C0000000000000000000000000000000000000000000000000000000000000123'; + export const genUnapprovedTokenTransferConfirmation = ({ address = CONTRACT_INTERACTION_SENDER_ADDRESS, chainId = CHAIN_ID, isWalletInitiatedConfirmation = false, + amountHex = '0000000000000000000000000000000000000000000000000000000000000001', }: { address?: Hex; chainId?: string; isWalletInitiatedConfirmation?: boolean; + amountHex?: string; } = {}) => ({ ...genUnapprovedContractInteractionConfirmation({ chainId }), txParams: { from: address, - data: '0x095ea7b30000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b0000000000000000000000000000000000000000000000000000000000000001', + data: `0xa9059cbb0000000000000000000000002e0d7e8c45221fca00d74a3609a0f7097035d09b${amountHex}`, gas: '0x16a92', to: '0x076146c765189d51be3160a2140cf80bfc73ad68', value: '0x0', diff --git a/test/integration/confirmations/transactions/increase-allowance.test.tsx b/test/integration/confirmations/transactions/increase-allowance.test.tsx index 810477d3a3a5..fb2ef9cf2629 100644 --- a/test/integration/confirmations/transactions/increase-allowance.test.tsx +++ b/test/integration/confirmations/transactions/increase-allowance.test.tsx @@ -198,7 +198,7 @@ describe('ERC20 increaseAllowance Confirmation', () => { 'simulation-token-value', ); expect(simulationSection).toContainElement(spendingCapValue); - expect(spendingCapValue).toHaveTextContent('1'); + expect(spendingCapValue).toHaveTextContent('3'); expect(simulationSection).toHaveTextContent('0x07614...3ad68'); }); @@ -225,7 +225,7 @@ describe('ERC20 increaseAllowance Confirmation', () => { expect(approveDetails).toContainElement(approveDetailsSpender); expect(approveDetailsSpender).toHaveTextContent(tEn('spender') as string); - expect(approveDetailsSpender).toHaveTextContent('0x2e0D7...5d09B'); + expect(approveDetailsSpender).toHaveTextContent('0x9bc5b...AfEF4'); const spenderTooltip = await screen.findByTestId( 'confirmation__approve-spender-tooltip', ); @@ -286,7 +286,7 @@ describe('ERC20 increaseAllowance Confirmation', () => { ); expect(spendingCapSection).toContainElement(spendingCapGroup); expect(spendingCapGroup).toHaveTextContent(tEn('spendingCap') as string); - expect(spendingCapGroup).toHaveTextContent('1'); + expect(spendingCapGroup).toHaveTextContent('3'); const spendingCapGroupTooltip = await screen.findByTestId( 'confirmation__approve-spending-cap-group-tooltip', diff --git a/test/integration/confirmations/transactions/set-approval-for-all.test.tsx b/test/integration/confirmations/transactions/set-approval-for-all.test.tsx index ebe680983a6c..51cb991ac3b2 100644 --- a/test/integration/confirmations/transactions/set-approval-for-all.test.tsx +++ b/test/integration/confirmations/transactions/set-approval-for-all.test.tsx @@ -231,7 +231,7 @@ describe('ERC721 setApprovalForAll Confirmation', () => { expect(approveDetailsSpender).toHaveTextContent( tEn('permissionFor') as string, ); - expect(approveDetailsSpender).toHaveTextContent('0x2e0D7...5d09B'); + expect(approveDetailsSpender).toHaveTextContent('0x9bc5b...AfEF4'); const spenderTooltip = await screen.findByTestId( 'confirmation__approve-spender-tooltip', ); diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index 232bcdae5aff..adb3102da571 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -212,7 +212,7 @@ const SETTINGS_CONSTANTS = [ { tabMessage: (t) => t('securityAndPrivacy'), sectionMessage: (t) => t('use4ByteResolution'), - descriptionMessage: (t) => t('use4ByteResolutionDescription'), + descriptionMessage: (t) => t('toggleDecodeDescription'), route: `${SECURITY_ROUTE}#decode-smart-contracts`, icon: 'fa fa-lock', }, diff --git a/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap index 2ff281c5186e..480ef57d7097 100644 --- a/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap @@ -2,10 +2,208 @@ exports[`Info renders info section for approve request 1`] = `
+
+
+
+
+

+ Estimated changes +

+
+
+ +
+
+
+
+
+

+ You're giving someone else permission to withdraw NFTs from your account. +

+
+
+
+
+
+

+ Withdraw +

+
+
+
+
+
+

+ #1 +

+
+
+
+ +

+ 0x07614...3ad68 +

+
+
+
+
+
+
+
+
+
+

+ Spender +

+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
+
+
+

+ Permission for +

+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
renders component for approve details 1`] = ` data-testid="confirmation__approve-details" >
-
-

+

+
- Data -

+ +
+
+
- - - - - - + + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
+
+
+

+ Request from +

+
+
- - - +
+
+
+

+ metamask.github.io +

+
@@ -83,70 +157,144 @@ exports[` renders component for approve details for setApprova data-testid="confirmation__approve-details" >
-
-

+

+
- Data -

+ +
+
+
- - - - - - + + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
+
+
+

+ Request from +

+
+
- - - +
+
+
+

+ metamask.github.io +

+
diff --git a/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.test.tsx b/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.test.tsx index daec14c166af..df6147914304 100644 --- a/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.test.tsx +++ b/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.test.tsx @@ -1,15 +1,29 @@ import React from 'react'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import mockState from '../../../../../../../../test/data/mock-state.json'; import { renderWithConfirmContextProvider } from '../../../../../../../../test/lib/confirmations/render-helpers'; +import { genUnapprovedApproveConfirmation } from '../../../../../../../../test/data/confirmations/token-approve'; +import { getMockConfirmStateForTransaction } from '../../../../../../../../test/data/confirmations/helper'; import { ApproveDetails } from './approve-details'; +jest.mock( + '../../../../../../../components/app/alert-system/contexts/alertMetricsContext.tsx', + () => ({ + useAlertMetrics: () => ({ + trackInlineAlertClicked: jest.fn(), + trackAlertRender: jest.fn(), + trackAlertActionClicked: jest.fn(), + }), + }), +); + describe('', () => { const middleware = [thunk]; it('renders component for approve details', () => { - const state = mockState; + const state = getMockConfirmStateForTransaction( + genUnapprovedApproveConfirmation(), + ); const mockStore = configureMockStore(middleware)(state); const { container } = renderWithConfirmContextProvider( , @@ -19,7 +33,9 @@ describe('', () => { }); it('renders component for approve details for setApprovalForAll', () => { - const state = mockState; + const state = getMockConfirmStateForTransaction( + genUnapprovedApproveConfirmation(), + ); const mockStore = configureMockStore(middleware)(state); const { container } = renderWithConfirmContextProvider( , diff --git a/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx b/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx index e46b581220a4..1d552db45930 100644 --- a/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx +++ b/ui/pages/confirmations/components/confirm/info/approve/approve-details/approve-details.tsx @@ -11,8 +11,6 @@ import { useI18nContext } from '../../../../../../../hooks/useI18nContext'; import { useConfirmContext } from '../../../../../context/confirm'; import { selectConfirmationAdvancedDetailsOpen } from '../../../../../selectors/preferences'; import { SigningInWithRow } from '../../shared/sign-in-with-row/sign-in-with-row'; -import { useDecodedTransactionData } from '../../hooks/useDecodedTransactionData'; -import { Container } from '../../shared/transaction-data/transaction-data'; import { MethodDataRow, OriginRow, @@ -20,6 +18,7 @@ import { } from '../../shared/transaction-details/transaction-details'; import { getIsRevokeSetApprovalForAll } from '../../utils'; import { useIsNFT } from '../hooks/use-is-nft'; +import { useTokenTransactionData } from '../../hooks/useTokenTransactionData'; const Spender = ({ isSetApprovalForAll = false, @@ -32,23 +31,20 @@ const Spender = ({ useConfirmContext(); const { isNFT } = useIsNFT(transactionMeta); + const parsedTransactionData = useTokenTransactionData(); - const decodedResponse = useDecodedTransactionData(); - - const { value, pending } = decodedResponse; - - if (pending) { - return ; - } - - if (!value) { + if (!parsedTransactionData) { return null; } - const spender = value.data[0].params[0].value; + const spender = + parsedTransactionData.args?._spender ?? // ERC-20 - approve + parsedTransactionData.args?._operator ?? // ERC-721 - setApprovalForAll + parsedTransactionData.args?.spender; // Fiat Token V2 - increaseAllowance + const { chainId } = transactionMeta; - if (getIsRevokeSetApprovalForAll(value)) { + if (getIsRevokeSetApprovalForAll(parsedTransactionData)) { return null; } diff --git a/ui/pages/confirmations/components/confirm/info/approve/approve.test.tsx b/ui/pages/confirmations/components/confirm/info/approve/approve.test.tsx index 914e276369f5..bf26a6e1abc0 100644 --- a/ui/pages/confirmations/components/confirm/info/approve/approve.test.tsx +++ b/ui/pages/confirmations/components/confirm/info/approve/approve.test.tsx @@ -1,8 +1,9 @@ import React from 'react'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { getMockApproveConfirmState } from '../../../../../../../test/data/confirmations/helper'; +import { getMockConfirmStateForTransaction } from '../../../../../../../test/data/confirmations/helper'; import { renderWithConfirmContextProvider } from '../../../../../../../test/lib/confirmations/render-helpers'; +import { genUnapprovedApproveConfirmation } from '../../../../../../../test/data/confirmations/token-approve'; import ApproveInfo from './approve'; jest.mock('../../../../../../store/actions', () => ({ @@ -72,7 +73,9 @@ describe('', () => { const middleware = [thunk]; it('renders component for approve request', async () => { - const state = getMockApproveConfirmState(); + const state = getMockConfirmStateForTransaction( + genUnapprovedApproveConfirmation(), + ); const mockStore = configureMockStore(middleware)(state); diff --git a/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.test.ts b/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.test.ts index e0a5a8165dfb..26ca44587ce4 100644 --- a/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.test.ts +++ b/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.test.ts @@ -1,11 +1,7 @@ import { TransactionMeta } from '@metamask/transaction-controller'; -import { - CONTRACT_INTERACTION_SENDER_ADDRESS, - genUnapprovedContractInteractionConfirmation, -} from '../../../../../../../../test/data/confirmations/contract-interaction'; -import mockState from '../../../../../../../../test/data/mock-state.json'; -import { renderHookWithProvider } from '../../../../../../../../test/lib/render-helpers'; -import { useDecodedTransactionData } from '../../hooks/useDecodedTransactionData'; +import { renderHookWithConfirmContextProvider } from '../../../../../../../../test/lib/confirmations/render-helpers'; +import { genUnapprovedApproveConfirmation } from '../../../../../../../../test/data/confirmations/token-approve'; +import { getMockConfirmStateForTransaction } from '../../../../../../../../test/data/confirmations/helper'; import { useApproveTokenSimulation } from './use-approve-token-simulation'; import { useIsNFT } from './use-is-nft'; @@ -14,11 +10,6 @@ jest.mock('./use-is-nft', () => ({ useIsNFT: jest.fn(), })); -jest.mock('../../hooks/useDecodedTransactionData', () => ({ - ...jest.requireActual('../../hooks/useDecodedTransactionData'), - useDecodedTransactionData: jest.fn(), -})); - describe('useApproveTokenSimulation', () => { beforeEach(() => { jest.resetAllMocks(); @@ -27,40 +18,16 @@ describe('useApproveTokenSimulation', () => { it('returns the token id for NFT', async () => { const useIsNFTMock = jest.fn().mockImplementation(() => ({ isNFT: true })); - const useDecodedTransactionDataMock = jest.fn().mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: 'approve', - params: [ - { - type: 'address', - value: '0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4', - }, - { - type: 'uint256', - value: 70000, - }, - ], - }, - ], - source: 'FourByte', - }, - })); - (useIsNFT as jest.Mock).mockImplementation(useIsNFTMock); - (useDecodedTransactionData as jest.Mock).mockImplementation( - useDecodedTransactionDataMock, - ); - const transactionMeta = genUnapprovedContractInteractionConfirmation({ - address: CONTRACT_INTERACTION_SENDER_ADDRESS, + const transactionMeta = genUnapprovedApproveConfirmation({ + amountHex: + '0000000000000000000000000000000000000000000000000000000000011170', }) as TransactionMeta; - const { result } = renderHookWithProvider( + const { result } = renderHookWithConfirmContextProvider( () => useApproveTokenSimulation(transactionMeta, '4'), - mockState, + getMockConfirmStateForTransaction(transactionMeta), ); expect(result.current).toMatchInlineSnapshot(` @@ -70,22 +37,8 @@ describe('useApproveTokenSimulation', () => { "pending": undefined, "spendingCap": "#7", "value": { - "data": [ - { - "name": "approve", - "params": [ - { - "type": "address", - "value": "0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4", - }, - { - "type": "uint256", - "value": 70000, - }, - ], - }, - ], - "source": "FourByte", + "hex": "0x011170", + "type": "BigNumber", }, } `); @@ -94,40 +47,16 @@ describe('useApproveTokenSimulation', () => { it('returns "UNLIMITED MESSAGE" token amount for fungible tokens approvals equal or over the total number of tokens in circulation', async () => { const useIsNFTMock = jest.fn().mockImplementation(() => ({ isNFT: false })); - const useDecodedTransactionDataMock = jest.fn().mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: 'approve', - params: [ - { - type: 'address', - value: '0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4', - }, - { - type: 'uint256', - value: 10 ** 15, - }, - ], - }, - ], - source: 'FourByte', - }, - })); - (useIsNFT as jest.Mock).mockImplementation(useIsNFTMock); - (useDecodedTransactionData as jest.Mock).mockImplementation( - useDecodedTransactionDataMock, - ); - const transactionMeta = genUnapprovedContractInteractionConfirmation({ - address: CONTRACT_INTERACTION_SENDER_ADDRESS, + const transactionMeta = genUnapprovedApproveConfirmation({ + amountHex: + '00000000000000000000000000000000000000000000000000038D7EA4C68000', }) as TransactionMeta; - const { result } = renderHookWithProvider( + const { result } = renderHookWithConfirmContextProvider( () => useApproveTokenSimulation(transactionMeta, '0'), - mockState, + getMockConfirmStateForTransaction(transactionMeta), ); expect(result.current).toMatchInlineSnapshot(` @@ -137,22 +66,8 @@ describe('useApproveTokenSimulation', () => { "pending": undefined, "spendingCap": "1000000000000000", "value": { - "data": [ - { - "name": "approve", - "params": [ - { - "type": "address", - "value": "0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4", - }, - { - "type": "uint256", - "value": 1000000000000000, - }, - ], - }, - ], - "source": "FourByte", + "hex": "0x038d7ea4c68000", + "type": "BigNumber", }, } `); @@ -161,40 +76,14 @@ describe('useApproveTokenSimulation', () => { it('returns correct small decimal number token amount for fungible tokens', async () => { const useIsNFTMock = jest.fn().mockImplementation(() => ({ isNFT: false })); - const useDecodedTransactionDataMock = jest.fn().mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: 'approve', - params: [ - { - type: 'address', - value: '0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4', - }, - { - type: 'uint256', - value: 10 ** 5, - }, - ], - }, - ], - source: 'FourByte', - }, - })); - (useIsNFT as jest.Mock).mockImplementation(useIsNFTMock); - (useDecodedTransactionData as jest.Mock).mockImplementation( - useDecodedTransactionDataMock, - ); - const transactionMeta = genUnapprovedContractInteractionConfirmation({ - address: CONTRACT_INTERACTION_SENDER_ADDRESS, - }) as TransactionMeta; + const transactionMeta = + genUnapprovedApproveConfirmation() as TransactionMeta; - const { result } = renderHookWithProvider( + const { result } = renderHookWithConfirmContextProvider( () => useApproveTokenSimulation(transactionMeta, '18'), - mockState, + getMockConfirmStateForTransaction(transactionMeta), ); expect(result.current).toMatchInlineSnapshot(` @@ -202,24 +91,10 @@ describe('useApproveTokenSimulation', () => { "formattedSpendingCap": "<0.000001", "isUnlimitedSpendingCap": false, "pending": undefined, - "spendingCap": "0.0000000000001", + "spendingCap": "0.000000000000000001", "value": { - "data": [ - { - "name": "approve", - "params": [ - { - "type": "address", - "value": "0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4", - }, - { - "type": "uint256", - "value": 100000, - }, - ], - }, - ], - "source": "FourByte", + "hex": "0x01", + "type": "BigNumber", }, } `); diff --git a/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts b/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts index acd470ba8822..442bfca3881c 100644 --- a/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts +++ b/ui/pages/confirmations/components/confirm/info/approve/hooks/use-approve-token-simulation.ts @@ -1,13 +1,11 @@ import { TransactionMeta } from '@metamask/transaction-controller'; -import { isHexString } from '@metamask/utils'; import { BigNumber } from 'bignumber.js'; -import { isBoolean } from 'lodash'; import { useMemo } from 'react'; import { useSelector } from 'react-redux'; import { calcTokenAmount } from '../../../../../../../../shared/lib/transactions-controller-utils'; import { getIntlLocale } from '../../../../../../../ducks/locale/locale'; import { formatAmount } from '../../../../simulation-details/formatAmount'; -import { useDecodedTransactionData } from '../../hooks/useDecodedTransactionData'; +import { useTokenTransactionData } from '../../hooks/useTokenTransactionData'; import { useIsNFT } from './use-is-nft'; const UNLIMITED_THRESHOLD = 10 ** 15; @@ -22,30 +20,18 @@ export const useApproveTokenSimulation = ( ) => { const locale = useSelector(getIntlLocale); const { isNFT, pending: isNFTPending } = useIsNFT(transactionMeta); - const decodedResponse = useDecodedTransactionData(); - const { value, pending } = decodedResponse; + const { args: parsedArgs } = useTokenTransactionData() ?? {}; - const decodedSpendingCap = useMemo(() => { - if (!value) { - return '0'; - } + const parsedValue = + parsedArgs?._value ?? // ERC-20 - approve + parsedArgs?.increment; // Fiat Token V2 - increaseAllowance - const paramIndex = value.data[0].params.findIndex( - (param) => - param.value !== undefined && - !isHexString(param.value) && - param.value.length === undefined && - !isBoolean(param.value), - ); - if (paramIndex === -1) { - return '0'; - } + const value = parsedValue ?? new BigNumber(0); - return calcTokenAmount( - value.data[0].params[paramIndex].value, - Number(decimals), - ).toFixed(); - }, [value, decimals]); + const decodedSpendingCap = calcTokenAmount( + value, + Number(decimals ?? '0'), + ).toFixed(); const tokenPrefix = isNFT ? '#' : ''; @@ -70,6 +56,6 @@ export const useApproveTokenSimulation = ( spendingCap, formattedSpendingCap, value, - pending: pending || isNFTPending, + pending: isNFTPending, }; }; diff --git a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.test.ts index f7f9dd25d4b8..43be106de1f2 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.test.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.test.ts @@ -1,31 +1,23 @@ import { TransactionMeta } from '@metamask/transaction-controller'; import { Numeric } from '../../../../../../../shared/modules/Numeric'; -import { genUnapprovedTokenTransferConfirmation } from '../../../../../../../test/data/confirmations/token-transfer'; -import mockState from '../../../../../../../test/data/mock-state.json'; import { renderHookWithConfirmContextProvider } from '../../../../../../../test/lib/confirmations/render-helpers'; import useTokenExchangeRate from '../../../../../../components/app/currency-input/hooks/useTokenExchangeRate'; import { useAssetDetails } from '../../../../hooks/useAssetDetails'; +import { getMockConfirmStateForTransaction } from '../../../../../../../test/data/confirmations/helper'; +import { genUnapprovedTokenTransferConfirmation } from '../../../../../../../test/data/confirmations/token-transfer'; import { useTokenValues } from './use-token-values'; -import { useDecodedTransactionData } from './useDecodedTransactionData'; jest.mock('../../../../hooks/useAssetDetails', () => ({ ...jest.requireActual('../../../../hooks/useAssetDetails'), useAssetDetails: jest.fn(), })); -jest.mock('./useDecodedTransactionData', () => ({ - ...jest.requireActual('./useDecodedTransactionData'), - useDecodedTransactionData: jest.fn(), -})); - jest.mock( '../../../../../../components/app/currency-input/hooks/useTokenExchangeRate', - () => jest.fn(), ); describe('useTokenValues', () => { const useAssetDetailsMock = jest.mocked(useAssetDetails); - const useDecodedTransactionDataMock = jest.mocked(useDecodedTransactionData); const useTokenExchangeRateMock = jest.mocked(useTokenExchangeRate); beforeEach(() => { @@ -34,97 +26,51 @@ describe('useTokenValues', () => { it('returns native and fiat balances', async () => { (useAssetDetailsMock as jest.Mock).mockImplementation(() => ({ - decimals: '10', - })); - (useDecodedTransactionDataMock as jest.Mock).mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: 'transfer', - params: [ - { - type: 'address', - value: '0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4', - }, - { - type: 'uint256', - value: 70000000000, - }, - ], - }, - ], - source: 'FourByte', - }, + decimals: '4', })); - (useTokenExchangeRateMock as jest.Mock).mockResolvedValue( - new Numeric(0.91, 10), - ); - const transactionMeta = genUnapprovedTokenTransferConfirmation( - {}, - ) as TransactionMeta; + useTokenExchangeRateMock.mockReturnValue(new Numeric(0.91, 10)); - const { result, waitForNextUpdate } = renderHookWithConfirmContextProvider( + const transactionMeta = genUnapprovedTokenTransferConfirmation({ + amountHex: + '0000000000000000000000000000000000000000000000000000000000011170', + }) as TransactionMeta; + + const { result } = renderHookWithConfirmContextProvider( () => useTokenValues(transactionMeta), - mockState, + getMockConfirmStateForTransaction(transactionMeta), ); - await waitForNextUpdate(); - expect(result.current).toEqual({ decodedTransferValue: '7', displayTransferValue: '7', fiatDisplayValue: '$6.37', fiatValue: 6.37, - pending: false, }); }); it('returns undefined fiat balance if no token rate is returned', async () => { (useAssetDetailsMock as jest.Mock).mockImplementation(() => ({ - decimals: '10', - })); - (useDecodedTransactionDataMock as jest.Mock).mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: 'transfer', - params: [ - { - type: 'address', - value: '0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4', - }, - { - type: 'uint256', - value: 70000000000, - }, - ], - }, - ], - source: 'FourByte', - }, + decimals: '4', })); - (useTokenExchangeRateMock as jest.Mock).mockResolvedValue(null); - const transactionMeta = genUnapprovedTokenTransferConfirmation( - {}, - ) as TransactionMeta; + useTokenExchangeRateMock.mockReturnValue(undefined); - const { result, waitForNextUpdate } = renderHookWithConfirmContextProvider( + const transactionMeta = genUnapprovedTokenTransferConfirmation({ + amountHex: + '0000000000000000000000000000000000000000000000000000000000011170', + }) as TransactionMeta; + + const { result } = renderHookWithConfirmContextProvider( () => useTokenValues(transactionMeta), - mockState, + getMockConfirmStateForTransaction(transactionMeta), ); - await waitForNextUpdate(); - expect(result.current).toEqual({ decodedTransferValue: '7', displayTransferValue: '7', - fiatDisplayValue: null, - fiatValue: null, - pending: false, + fiatDisplayValue: undefined, + fiatValue: undefined, }); }); }); diff --git a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts index b53e2842e5e7..b38dfd2be8ce 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts @@ -1,19 +1,20 @@ import { TransactionMeta } from '@metamask/transaction-controller'; -import { isHexString } from '@metamask/utils'; import { BigNumber } from 'bignumber.js'; -import { isBoolean } from 'lodash'; -import { useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; import { calcTokenAmount } from '../../../../../../../shared/lib/transactions-controller-utils'; -import { Numeric } from '../../../../../../../shared/modules/Numeric'; import useTokenExchangeRate from '../../../../../../components/app/currency-input/hooks/useTokenExchangeRate'; import { getIntlLocale } from '../../../../../../ducks/locale/locale'; import { useFiatFormatter } from '../../../../../../hooks/useFiatFormatter'; import { useAssetDetails } from '../../../../hooks/useAssetDetails'; import { formatAmount } from '../../../simulation-details/formatAmount'; -import { useDecodedTransactionData } from './useDecodedTransactionData'; +import { useTokenTransactionData } from './useTokenTransactionData'; export const useTokenValues = (transactionMeta: TransactionMeta) => { + const locale = useSelector(getIntlLocale); + const parsedTransactionData = useTokenTransactionData(); + const exchangeRate = useTokenExchangeRate(transactionMeta?.txParams?.to); + const fiatFormatter = useFiatFormatter(); + const { decimals } = useAssetDetails( transactionMeta.txParams.to, transactionMeta.txParams.from, @@ -21,65 +22,21 @@ export const useTokenValues = (transactionMeta: TransactionMeta) => { transactionMeta.chainId, ); - const decodedResponse = useDecodedTransactionData(); - const { value, pending } = decodedResponse; - - const { decodedTransferValue, isDecodedTransferValuePending } = - useMemo(() => { - if (!value) { - return { - decodedTransferValue: '0', - isDecodedTransferValuePending: false, - }; - } - - if (!decimals) { - return { - decodedTransferValue: '0', - isDecodedTransferValuePending: true, - }; - } - - const paramIndex = value.data[0].params.findIndex( - (param) => - param.value !== undefined && - !isHexString(param.value) && - param.value.length === undefined && - !isBoolean(param.value), - ); - if (paramIndex === -1) { - return { - decodedTransferValue: '0', - isDecodedTransferValuePending: false, - }; - } + const value = parsedTransactionData?.args?._value as BigNumber | undefined; - return { - decodedTransferValue: calcTokenAmount( - value.data[0].params[paramIndex].value, - decimals, - ).toFixed(), - isDecodedTransferValuePending: false, - }; - }, [value, decimals]); - - const [exchangeRate, setExchangeRate] = useState(); - const fetchExchangeRate = async () => { - const result = await useTokenExchangeRate(transactionMeta?.txParams?.to); - - setExchangeRate(result); - }; - fetchExchangeRate(); + const decodedTransferValue = + decimals !== undefined && value + ? calcTokenAmount(value, Number(decimals)).toFixed() + : '0'; const fiatValue = exchangeRate && decodedTransferValue && exchangeRate.times(decodedTransferValue, 10).toNumber(); - const fiatFormatter = useFiatFormatter(); + const fiatDisplayValue = fiatValue && fiatFormatter(fiatValue, { shorten: true }); - const locale = useSelector(getIntlLocale); const displayTransferValue = formatAmount( locale, new BigNumber(decodedTransferValue), @@ -90,6 +47,5 @@ export const useTokenValues = (transactionMeta: TransactionMeta) => { displayTransferValue, fiatDisplayValue, fiatValue, - pending: pending || isDecodedTransferValuePending, }; }; diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts index 32a711abf754..c12ce7025cb5 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.test.ts @@ -76,6 +76,32 @@ describe('useDecodedTransactionData', () => { expect(result).toStrictEqual({ pending: false, value: undefined }); }); + it('returns undefined if decode disabled', async () => { + decodeTransactionDataMock.mockResolvedValue(TRANSACTION_DECODE_SOURCIFY); + + const result = await runHook( + getMockConfirmStateForTransaction( + { + id: '123', + chainId: CHAIN_ID_MOCK, + type: TransactionType.contractInteraction, + status: TransactionStatus.unapproved, + txParams: { + data: TRANSACTION_DATA_UNISWAP, + to: CONTRACT_ADDRESS_MOCK, + } as TransactionParams, + }, + { + metamask: { + use4ByteResolution: false, + }, + }, + ), + ); + + expect(result).toStrictEqual({ pending: false, value: undefined }); + }); + it('returns the decoded data', async () => { decodeTransactionDataMock.mockResolvedValue(TRANSACTION_DECODE_SOURCIFY); diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts index 5276e02eaad1..3486f16ed864 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/useDecodedTransactionData.ts @@ -1,6 +1,7 @@ import { Hex } from '@metamask/utils'; import { TransactionMeta } from '@metamask/transaction-controller'; +import { useSelector } from 'react-redux'; import { AsyncResult, useAsyncResult, @@ -9,11 +10,13 @@ import { decodeTransactionData } from '../../../../../../store/actions'; import { DecodedTransactionDataResponse } from '../../../../../../../shared/types/transaction-decode'; import { useConfirmContext } from '../../../../context/confirm'; import { hasTransactionData } from '../../../../../../../shared/modules/transaction.utils'; +import { use4ByteResolutionSelector } from '../../../../../../selectors'; export function useDecodedTransactionData( transactionTypeFilter?: string, ): AsyncResult { const { currentConfirmation } = useConfirmContext(); + const isDecodeEnabled = useSelector(use4ByteResolutionSelector); const currentTransactionType = currentConfirmation?.type; const chainId = currentConfirmation?.chainId as Hex; @@ -23,6 +26,7 @@ export function useDecodedTransactionData( return useAsyncResult(async () => { if ( + !isDecodeEnabled || !hasTransactionData(transactionData) || !transactionTo || (transactionTypeFilter && @@ -36,5 +40,11 @@ export function useDecodedTransactionData( chainId, contractAddress, }); - }, [transactionData, transactionTo, chainId, contractAddress]); + }, [ + isDecodeEnabled, + transactionData, + transactionTo, + chainId, + contractAddress, + ]); } diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.test.ts new file mode 100644 index 000000000000..f73372d9391f --- /dev/null +++ b/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.test.ts @@ -0,0 +1,94 @@ +import { Hex } from '@metamask/utils'; +import { TransactionDescription } from '@ethersproject/abi'; +import { genUnapprovedContractInteractionConfirmation } from '../../../../../../../test/data/confirmations/contract-interaction'; +import { getMockConfirmStateForTransaction } from '../../../../../../../test/data/confirmations/helper'; +import { + genUnapprovedTokenTransferConfirmation, + TRANSFER_FROM_TRANSACTION_DATA, +} from '../../../../../../../test/data/confirmations/token-transfer'; +import { renderHookWithConfirmContextProvider } from '../../../../../../../test/lib/confirmations/render-helpers'; +import { genUnapprovedApproveConfirmation } from '../../../../../../../test/data/confirmations/token-approve'; +import { + genUnapprovedSetApprovalForAllConfirmation, + INCREASE_ALLOWANCE_TRANSACTION_DATA, +} from '../../../../../../../test/data/confirmations/set-approval-for-all'; +import { useTokenTransactionData } from './useTokenTransactionData'; + +function runHook(transactionData: string) { + const transaction = genUnapprovedContractInteractionConfirmation({ + txData: transactionData as Hex, + }); + + const state = getMockConfirmStateForTransaction(transaction); + + const { result } = renderHookWithConfirmContextProvider( + useTokenTransactionData, + state, + ); + + return result.current as TransactionDescription; +} + +describe('useTokenTransactionData', () => { + it('parses transfer transaction', () => { + const transactionData = + genUnapprovedTokenTransferConfirmation().txParams.data; + + const result = runHook(transactionData); + + expect(result.name).toBe('transfer'); + expect(result.args._to).toBe('0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B'); + expect(result.args._value.toHexString()).toBe('0x01'); + }); + + it('parses transferFrom transaction', () => { + const result = runHook(TRANSFER_FROM_TRANSACTION_DATA); + + expect(result.name).toBe('transferFrom'); + expect(result.args._from).toBe( + '0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B', + ); + expect(result.args._to).toBe('0x2e0d7E8c45221fCa00d74A3609A0F7097035D09c'); + expect(result.args._value.toHexString()).toEqual('0x0123'); + }); + + it('parses approve transaction', () => { + const transactionData = genUnapprovedApproveConfirmation().txParams.data; + + const result = runHook(transactionData); + + expect(result.name).toBe('approve'); + expect(result.args._spender).toBe( + '0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B', + ); + expect(result.args._value.toHexString()).toBe('0x01'); + }); + + it('parses setApprovalForAll transaction', () => { + const transactionData = + genUnapprovedSetApprovalForAllConfirmation().txParams.data; + + const result = runHook(transactionData); + + expect(result.name).toBe('setApprovalForAll'); + expect(result.args._operator).toBe( + '0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B', + ); + expect(result.args._approved).toBe(true); + }); + + it('parses increaseAllowance transaction', () => { + const result = runHook(INCREASE_ALLOWANCE_TRANSACTION_DATA); + + expect(result.name).toBe('increaseAllowance'); + expect(result.args.spender).toBe( + '0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B', + ); + expect(result.args.increment.toHexString()).toBe('0x0123'); + }); + + it('returns undefined if no transaction data', () => { + const result = runHook(undefined as never); + expect(result).toBeUndefined(); + }); +}); diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts b/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts new file mode 100644 index 000000000000..c7ca2af1c19c --- /dev/null +++ b/ui/pages/confirmations/components/confirm/info/hooks/useTokenTransactionData.ts @@ -0,0 +1,14 @@ +import { TransactionMeta } from '@metamask/transaction-controller'; +import { useConfirmContext } from '../../../../context/confirm'; +import { parseStandardTokenTransactionData } from '../../../../../../../shared/modules/transaction.utils'; + +export function useTokenTransactionData() { + const { currentConfirmation } = useConfirmContext(); + const transactionData = currentConfirmation?.txParams?.data; + + if (!transactionData) { + return undefined; + } + + return parseStandardTokenTransactionData(transactionData); +} diff --git a/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap index 4fe5c3f41bbd..bd992e954422 100644 --- a/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap @@ -16,6 +16,181 @@ exports[`NativeTransferInfo renders correctly 1`] = ` 0 ETH
+
+
+
+
+
+

+ From +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+ +
+
+
+

+ To +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
+
diff --git a/ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap index 5ce090406606..3e9233e5c742 100644 --- a/ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap @@ -44,6 +44,181 @@ exports[`NFTTokenTransferInfo renders correctly 1`] = ` #undefined

+
+
+
+
+
+

+ From +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+ +
+
+
+

+ To +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
+
diff --git a/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/__snapshots__/set-approval-for-all-info.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/__snapshots__/set-approval-for-all-info.test.tsx.snap index a3f8724e7561..034bb47c38cb 100644 --- a/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/__snapshots__/set-approval-for-all-info.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/__snapshots__/set-approval-for-all-info.test.tsx.snap @@ -110,6 +110,102 @@ exports[` renders component for approve request 1`] = ` class="mm-box mm-box--margin-bottom-4 mm-box--padding-2 mm-box--background-color-background-default mm-box--rounded-md" data-testid="confirmation__approve-details" > +
+
+
+

+ Permission for +

+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
renders component for approve request 1`] = `

renders component for approve request 1`] = `

', () => { mockStore, ); - await waitFor(() => { - expect(screen.getByText('Data')).toBeInTheDocument(); - }); - expect(container).toMatchSnapshot(); }); diff --git a/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx b/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx index 6902a6da9b1f..e2371d09454d 100644 --- a/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx +++ b/ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/set-approval-for-all-info.tsx @@ -2,11 +2,10 @@ import { TransactionMeta } from '@metamask/transaction-controller'; import React from 'react'; import { useConfirmContext } from '../../../../context/confirm'; import { ApproveDetails } from '../approve/approve-details/approve-details'; -import { useDecodedTransactionData } from '../hooks/useDecodedTransactionData'; import { AdvancedDetails } from '../shared/advanced-details/advanced-details'; -import { ConfirmLoader } from '../shared/confirm-loader/confirm-loader'; import { GasFeesSection } from '../shared/gas-fees-section/gas-fees-section'; import { getIsRevokeSetApprovalForAll } from '../utils'; +import { useTokenTransactionData } from '../hooks/useTokenTransactionData'; import { RevokeSetApprovalForAllStaticSimulation } from './revoke-set-approval-for-all-static-simulation/revoke-set-approval-for-all-static-simulation'; import { SetApprovalForAllStaticSimulation } from './set-approval-for-all-static-simulation/set-approval-for-all-static-simulation'; @@ -14,22 +13,18 @@ const SetApprovalForAllInfo = () => { const { currentConfirmation: transactionMeta } = useConfirmContext(); - const decodedResponse = useDecodedTransactionData(); + const parsedTransactionData = useTokenTransactionData(); - const { value, pending } = decodedResponse; + const spender = parsedTransactionData?.args?._operator; - const isRevokeSetApprovalForAll = getIsRevokeSetApprovalForAll(value); - - const spender = value?.data[0].params[0].value; + const isRevokeSetApprovalForAll = getIsRevokeSetApprovalForAll( + parsedTransactionData, + ); if (!transactionMeta?.txParams) { return null; } - if (pending) { - return ; - } - return ( <> {isRevokeSetApprovalForAll ? ( diff --git a/ui/pages/confirmations/components/confirm/info/shared/send-heading/__snapshots__/send-heading.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/shared/send-heading/__snapshots__/send-heading.test.tsx.snap index fdc069a399dc..a2dd153305ed 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/send-heading/__snapshots__/send-heading.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/info/shared/send-heading/__snapshots__/send-heading.test.tsx.snap @@ -3,47 +3,29 @@ exports[` renders component 1`] = `
- - - +
+
- - - - - - +

+ <0.000001 Unknown +

+
+
`; diff --git a/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.test.tsx b/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.test.tsx index 613930f9901d..40a9842c9491 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.test.tsx +++ b/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.test.tsx @@ -5,6 +5,12 @@ import { getMockTokenTransferConfirmState } from '../../../../../../../../test/d import { renderWithConfirmContextProvider } from '../../../../../../../../test/lib/confirmations/render-helpers'; import SendHeading from './send-heading'; +jest.mock('../../../../../hooks/useAssetDetails', () => ({ + useAssetDetails: jest.fn(() => ({ + decimals: 18, + })), +})); + describe('', () => { const middleware = [thunk]; const state = getMockTokenTransferConfirmState({}); diff --git a/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx b/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx index cbba12835073..4e7f86e0ac8b 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx +++ b/ui/pages/confirmations/components/confirm/info/shared/send-heading/send-heading.tsx @@ -24,7 +24,6 @@ import { useConfirmContext } from '../../../../../context/confirm'; import { useTokenValues } from '../../hooks/use-token-values'; import { useSendingValueMetric } from '../../hooks/useSendingValueMetric'; import { useTokenDetails } from '../../hooks/useTokenDetails'; -import { ConfirmLoader } from '../confirm-loader/confirm-loader'; const SendHeading = () => { const t = useI18nContext(); @@ -36,7 +35,6 @@ const SendHeading = () => { displayTransferValue, fiatDisplayValue, fiatValue, - pending, } = useTokenValues(transactionMeta); type TestNetChainId = (typeof TEST_CHAINS)[number]; @@ -89,10 +87,6 @@ const SendHeading = () => { useSendingValueMetric({ transactionMeta, fiatValue }); - if (pending) { - return ; - } - return (
- - - +
+
- - - + <0.000001 Unknown + +
+
+
+
+
+
+
+
+

+ From +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+ +
- - - +
+
+

+ To +

+
+
+
+
+
+
+
+
+ + + + + +
+
+
+

+ 0x2e0D7...5d09B +

+
+
+
+
+
({ }), })); +jest.mock('../../../../hooks/useAssetDetails', () => ({ + useAssetDetails: jest.fn(() => ({ + decimals: 18, + })), +})); + describe('TokenTransferInfo', () => { it('renders correctly', () => { const state = getMockTokenTransferConfirmState({}); - const mockStore = configureMockStore([])(state); + const mockStore = configureMockStore()(state); const { container } = renderWithConfirmContextProvider( , mockStore, diff --git a/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.test.tsx b/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.test.tsx index bdc6ed30678a..866dd3c2805f 100644 --- a/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.test.tsx +++ b/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.test.tsx @@ -1,51 +1,38 @@ import { TransactionType } from '@metamask/transaction-controller'; import React from 'react'; import configureMockStore from 'redux-mock-store'; +import { TransactionDescription } from '@ethersproject/abi'; import { getMockTokenTransferConfirmState } from '../../../../../../../test/data/confirmations/helper'; import { renderWithConfirmContextProvider } from '../../../../../../../test/lib/confirmations/render-helpers'; -import { useDecodedTransactionData } from '../hooks/useDecodedTransactionData'; +import { useTokenTransactionData } from '../hooks/useTokenTransactionData'; import { TransactionFlowSection } from './transaction-flow-section'; -jest.mock('../hooks/useDecodedTransactionData', () => ({ - ...jest.requireActual('../hooks/useDecodedTransactionData'), - useDecodedTransactionData: jest.fn(), -})); +jest.mock('../hooks/useTokenTransactionData'); jest.mock( '../../../../../../components/app/alert-system/contexts/alertMetricsContext.tsx', () => ({ - useAlertMetrics: jest.fn(() => ({ + useAlertMetrics: () => ({ trackInlineAlertClicked: jest.fn(), trackAlertRender: jest.fn(), trackAlertActionClicked: jest.fn(), - })), + }), }), ); describe('', () => { - const useDecodedTransactionDataMock = jest.fn().mockImplementation(() => ({ - pending: false, - value: { - data: [ - { - name: TransactionType.tokenMethodTransfer, - params: [ - { - name: 'dst', - type: 'address', - value: '0x6B175474E89094C44Da98b954EedeAC495271d0F', - }, - { name: 'wad', type: 'uint256', value: 0 }, - ], - }, - ], - source: 'Sourcify', - }, - })); + const useTokenTransactionDataMock = jest.mocked(useTokenTransactionData); - (useDecodedTransactionData as jest.Mock).mockImplementation( - useDecodedTransactionDataMock, - ); + beforeEach(() => { + jest.resetAllMocks(); + + useTokenTransactionDataMock.mockReturnValue({ + name: TransactionType.tokenMethodTransfer, + args: { + _to: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + }, + } as unknown as TransactionDescription); + }); it('renders correctly', () => { const state = getMockTokenTransferConfirmState({}); diff --git a/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx b/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx index b874999d3956..fe9b9f319c9f 100644 --- a/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx +++ b/ui/pages/confirmations/components/confirm/info/token-transfer/transaction-flow-section.tsx @@ -22,27 +22,20 @@ import { ConfirmInfoAlertRow } from '../../../../../../components/app/confirm/in import { RowAlertKey } from '../../../../../../components/app/confirm/info/row/constants'; import { useI18nContext } from '../../../../../../hooks/useI18nContext'; import { useConfirmContext } from '../../../../context/confirm'; -import { useDecodedTransactionData } from '../hooks/useDecodedTransactionData'; +import { useTokenTransactionData } from '../hooks/useTokenTransactionData'; export const TransactionFlowSection = () => { const t = useI18nContext(); + const { currentConfirmation: transactionMeta } = useConfirmContext(); - const { value, pending } = useDecodedTransactionData(); + const parsedTransactionData = useTokenTransactionData(); - const addresses = value?.data[0].params.filter( - (param) => param.type === 'address', - ); const recipientAddress = transactionMeta.type === TransactionType.simpleSend ? transactionMeta.txParams.to - : // sometimes there's more than one address, in which case we want the last one - addresses?.[addresses.length - 1].value; - - if (pending) { - return null; - } + : parsedTransactionData?.args?._to; const { chainId } = transactionMeta; diff --git a/ui/pages/confirmations/components/confirm/info/utils.test.ts b/ui/pages/confirmations/components/confirm/info/utils.test.ts index 9c12b9127811..b9752da7f1a8 100644 --- a/ui/pages/confirmations/components/confirm/info/utils.test.ts +++ b/ui/pages/confirmations/components/confirm/info/utils.test.ts @@ -1,6 +1,6 @@ import { TransactionMeta } from '@metamask/transaction-controller'; import { toHex } from '@metamask/controller-utils'; -import { DecodedTransactionDataSource } from '../../../../../../shared/types/transaction-decode'; +import { TransactionDescription } from '@ethersproject/abi'; import { getIsRevokeSetApprovalForAll, hasValueAndNativeBalanceMismatch, @@ -9,33 +9,22 @@ import { describe('getIsRevokeSetApprovalForAll', () => { it('returns false if no data is passed as an argument', () => { const testValue = { - data: [], - source: DecodedTransactionDataSource.FourByte, - }; + args: {}, + } as TransactionDescription; + const actual = getIsRevokeSetApprovalForAll(testValue); expect(actual).toEqual(false); }); - it('returns true if no setApprovalForAll decoded tx is passed as an argument', () => { + it('returns true if setApprovalForAll decoded tx is passed as an argument', () => { const testValue = { - data: [ - { - name: 'setApprovalForAll', - params: [ - { - type: 'address', - value: '0x2e0D7E8c45221FcA00d74a3609A0f7097035d09B', - }, - { - type: 'boolean', - value: false, - }, - ], - }, - ], - source: DecodedTransactionDataSource.FourByte, - }; + name: 'setApprovalForAll', + args: { + _approved: false, + }, + } as unknown as TransactionDescription; + const actual = getIsRevokeSetApprovalForAll(testValue); expect(actual).toEqual(true); diff --git a/ui/pages/confirmations/components/confirm/info/utils.ts b/ui/pages/confirmations/components/confirm/info/utils.ts index 1af918aea74e..f0f2f6fbeade 100644 --- a/ui/pages/confirmations/components/confirm/info/utils.ts +++ b/ui/pages/confirmations/components/confirm/info/utils.ts @@ -2,7 +2,7 @@ import { TransactionMeta } from '@metamask/transaction-controller'; import type { Hex } from '@metamask/utils'; import { remove0x } from '@metamask/utils'; import { BN } from 'bn.js'; -import { DecodedTransactionDataResponse } from '../../../../../../shared/types/transaction-decode'; +import { TransactionDescription } from '@ethersproject/abi'; import { BackgroundColor, TextColor, @@ -11,13 +11,11 @@ import { const VALUE_COMPARISON_PERCENT_THRESHOLD = 5; export function getIsRevokeSetApprovalForAll( - value: DecodedTransactionDataResponse | undefined, + value: TransactionDescription | undefined, ): boolean { - const isRevokeSetApprovalForAll = - value?.data?.[0]?.name === 'setApprovalForAll' && - value?.data?.[0]?.params?.[1]?.value === false; - - return isRevokeSetApprovalForAll; + return ( + value?.name === 'setApprovalForAll' && value?.args?._approved === false + ); } export const getAmountColors = (credit?: boolean, debit?: boolean) => { diff --git a/ui/pages/confirmations/components/confirm/title/title.tsx b/ui/pages/confirmations/components/confirm/title/title.tsx index e8148912cac1..7be6c59be50d 100644 --- a/ui/pages/confirmations/components/confirm/title/title.tsx +++ b/ui/pages/confirmations/components/confirm/title/title.tsx @@ -20,8 +20,8 @@ import { Confirmation, SignatureRequestType } from '../../../types/confirm'; import { isSIWESignatureRequest } from '../../../utils'; import { useTypedSignSignatureInfo } from '../../../hooks/useTypedSignSignatureInfo'; import { useIsNFT } from '../info/approve/hooks/use-is-nft'; -import { useDecodedTransactionData } from '../info/hooks/useDecodedTransactionData'; import { getIsRevokeSetApprovalForAll } from '../info/utils'; +import { useTokenTransactionData } from '../info/hooks/useTokenTransactionData'; import { useCurrentSpendingCap } from './hooks/useCurrentSpendingCap'; function ConfirmBannerAlert({ ownerId }: { ownerId: string }) { @@ -173,19 +173,12 @@ const ConfirmTitle: React.FC = memo(() => { const { customSpendingCap, pending: spendingCapPending } = useCurrentSpendingCap(currentConfirmation); - let isRevokeSetApprovalForAll = false; - let revokePending = false; - const decodedResponse = useDecodedTransactionData( - TransactionType.tokenMethodSetApprovalForAll, - ); - if ( - currentConfirmation?.type === TransactionType.tokenMethodSetApprovalForAll - ) { - isRevokeSetApprovalForAll = getIsRevokeSetApprovalForAll( - decodedResponse.value, - ); - revokePending = decodedResponse.pending; - } + const parsedTransactionData = useTokenTransactionData(); + + const isRevokeSetApprovalForAll = + currentConfirmation?.type === + TransactionType.tokenMethodSetApprovalForAll && + getIsRevokeSetApprovalForAll(parsedTransactionData); const title = useMemo( () => @@ -195,7 +188,7 @@ const ConfirmTitle: React.FC = memo(() => { isNFT, customSpendingCap, isRevokeSetApprovalForAll, - spendingCapPending || revokePending, + spendingCapPending, primaryType, tokenStandard, ), @@ -205,7 +198,6 @@ const ConfirmTitle: React.FC = memo(() => { customSpendingCap, isRevokeSetApprovalForAll, spendingCapPending, - revokePending, primaryType, tokenStandard, ], @@ -219,7 +211,7 @@ const ConfirmTitle: React.FC = memo(() => { isNFT, customSpendingCap, isRevokeSetApprovalForAll, - spendingCapPending || revokePending, + spendingCapPending, primaryType, tokenStandard, ), @@ -229,7 +221,6 @@ const ConfirmTitle: React.FC = memo(() => { customSpendingCap, isRevokeSetApprovalForAll, spendingCapPending, - revokePending, primaryType, tokenStandard, ], diff --git a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js index 163091e41958..b7c4e07aa9d6 100644 --- a/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js +++ b/ui/pages/onboarding-flow/privacy-settings/privacy-settings.js @@ -721,7 +721,7 @@ export default function PrivacySettings() { value={turnOn4ByteResolution} setValue={setTurnOn4ByteResolution} title={t('use4ByteResolution')} - description={t('use4ByteResolutionDescription')} + description={t('toggleDecodeDescription')} /> - To improve user experience, we customize the activity tab with messages based on the smart contracts you interact with. MetaMask uses a service called 4byte.directory to decode data and show you a version of a smart contract that's easier to read. This helps reduce your chances of approving malicious smart contract actions, but can result in your IP address being shared. + We use 4byte.directory and Sourcify services to decode and display more readable transaction data. This helps you understand the outcome of pending and past transactions, but can result in your IP address being shared.
{t('use4ByteResolution')}
- {t('use4ByteResolutionDescription')} + {t('toggleDecodeDescription')}
From 3e6410225026c26661e1f807fe069da00eaa5b03 Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Tue, 7 Jan 2025 13:40:30 -0500 Subject: [PATCH 16/65] fix bad merge in changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 563927a7e75f..c844c1b0b248 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5617,7 +5617,6 @@ Update styles and spacing on the critical error page ([#20350](https://github.c [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...HEAD [12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.10.0 -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.3...HEAD [12.9.3]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.9.3 [12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 [12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1 From 32529a0a1c2d63010e0e746db151428d16255701 Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Tue, 7 Jan 2025 13:45:44 -0500 Subject: [PATCH 17/65] fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c844c1b0b248..c77ed583132a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5616,7 +5616,7 @@ Update styles and spacing on the critical error page ([#20350](https://github.c [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...HEAD -[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.10.0 +[12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.3...v12.10.0 [12.9.3]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.9.3 [12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 [12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1 From f4f82ecb350e7a4876bc7429899e0b8640baf225 Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Tue, 7 Jan 2025 13:50:42 -0500 Subject: [PATCH 18/65] lint package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15f176e87cfb..000fe0cd4f9e 100644 --- a/package.json +++ b/package.json @@ -764,4 +764,4 @@ } }, "packageManager": "yarn@4.5.1" -} \ No newline at end of file +} From e665f5e18fa814e8ef178e9db18d4c287c9df486 Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Tue, 7 Jan 2025 13:56:47 -0500 Subject: [PATCH 19/65] lint changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c77ed583132a..83d63cf09d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,6 +128,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - refactor: remove global network from transaction controller ([#28449](https://github.com/MetaMask/metamask-extension/pull/28449)) - test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) - fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) + ## [12.9.3] ### Fixed - Fix some cases where users were incorrectly seeing 0 token balances ([#29361](https://github.com/MetaMask/metamask-extension/pull/29361)) From 7a4fa94a26874bbf743199f034e056a0be349360 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Wed, 8 Jan 2025 14:40:37 +0100 Subject: [PATCH 20/65] cherry-pick: Correct theme value for Snap UI footer buttons (#29495) ## **Description** Cherry-pick https://github.com/MetaMask/metamask-extension/commit/1fbb63cc4e2c15ffc344155f8fa6e6f240d8dd74 to the RC. The Snap UI footer buttons use the DS button which forces light theme, this does not work for the colors used in the Snap buttons, therefore we revert back to using the actually selected theme. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29434?quickstart=1) --- .../app/snaps/snap-ui-footer-button/snap-ui-footer-button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/components/app/snaps/snap-ui-footer-button/snap-ui-footer-button.tsx b/ui/components/app/snaps/snap-ui-footer-button/snap-ui-footer-button.tsx index 240024bb673a..04a858a9cd41 100644 --- a/ui/components/app/snaps/snap-ui-footer-button/snap-ui-footer-button.tsx +++ b/ui/components/app/snaps/snap-ui-footer-button/snap-ui-footer-button.tsx @@ -84,6 +84,7 @@ export const SnapUIFooterButton: FunctionComponent< alignItems: AlignItems.center, flexDirection: FlexDirection.Row, }} + data-theme={null} > {isSnapAction && !hideSnapBranding && ( From 36fc9598623b3d8c1e2bd906c3983b325c553945 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 9 Jan 2025 20:28:17 +0000 Subject: [PATCH 21/65] Update Attributions --- attribution.txt | 13220 +++++++++++++++++++++------------------------- 1 file changed, 6153 insertions(+), 7067 deletions(-) diff --git a/attribution.txt b/attribution.txt index 27347fadec5c..7a428ae89588 100644 --- a/attribution.txt +++ b/attribution.txt @@ -50,6 +50,61 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@adraffy/ens-normalize +1.10.1 +MIT License + +Copyright (c) 2021 Andrew Raffensperger + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +aes-js +3.0.0 +The MIT License (MIT) + +Copyright (c) 2015 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + ****************************** aes-js @@ -78,6 +133,34 @@ THE SOFTWARE. +****************************** + +aes-js +4.0.0-beta.5 +The MIT License (MIT) + +Copyright (c) 2022 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + ****************************** agent-base @@ -337,21 +420,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -ansi-regex -6.0.1 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** ansi-styles @@ -382,54 +450,14 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -ansi-styles -6.2.1 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -any-promise -1.3.0 -Copyright (C) 2014-2016 Kevin Beaty - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - ****************************** apg-js -4.1.1 +4.4.0 ## [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause)

-Copyright (c) 2021 Lowell D. Thomas
+Copyright (c) 2024 Lowell D. Thomas
All rights reserved. Redistribution and use in source and binary forms, with or without @@ -459,7 +487,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************** array-buffer-byte-length -1.0.0 +1.0.1 MIT License Copyright (c) 2023 Inspect JS @@ -534,33 +562,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -async-mutex -0.2.6 -The MIT License (MIT) - -Copyright (c) 2016 Christian Speckner - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - ****************************** async-mutex @@ -618,7 +619,7 @@ THE SOFTWARE. ****************************** available-typed-arrays -1.0.5 +1.0.7 MIT License Copyright (c) 2020 Inspect JS @@ -672,14 +673,26 @@ SOFTWARE. ****************************** axios -1.6.8 -# Copyright (c) 2014-present Matt Zabriskie & Collaborators +0.28.1 +Copyright (c) 2014-present Matt Zabriskie -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** @@ -706,7 +719,7 @@ PERFORMANCE OF THIS SOFTWARE. ****************************** @babel/code-frame -7.10.4 +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -733,8 +746,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/code-frame -7.24.2 +@babel/compat-data +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -761,8 +774,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/compat-data -7.23.2 +@babel/core +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -789,8 +802,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/core -7.23.2 +@babel/generator +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -817,8 +830,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/generator -7.24.5 +@babel/helper-annotate-as-pure +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -845,8 +858,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-annotate-as-pure -7.22.5 +@babel/helper-compilation-targets +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -873,8 +886,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-compilation-targets -7.22.15 +@babel/helper-create-class-features-plugin +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -901,8 +914,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-create-class-features-plugin -7.24.5 +@babel/helper-member-expression-to-functions +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -929,8 +942,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-environment-visitor -7.22.20 +@babel/helper-module-imports +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -957,8 +970,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-function-name -7.23.0 +@babel/helper-module-transforms +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -985,8 +998,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-hoist-variables -7.22.5 +@babel/helper-optimise-call-expression +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1013,8 +1026,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-member-expression-to-functions -7.24.5 +@babel/helper-plugin-utils +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1041,8 +1054,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-module-imports -7.24.3 +@babel/helper-replace-supers +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1069,8 +1082,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-module-transforms -7.24.5 +@babel/helpers +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1097,8 +1110,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-optimise-call-expression -7.22.5 +@babel/helper-simple-access +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1125,8 +1138,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-plugin-utils -7.24.5 +@babel/helper-skip-transparent-expression-wrappers +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1153,8 +1166,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-replace-supers -7.24.1 +@babel/helper-string-parser +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1181,8 +1194,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helpers -7.23.2 +@babel/helper-validator-identifier +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1209,8 +1222,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-simple-access -7.24.5 +@babel/helper-validator-option +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1237,8 +1250,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-skip-transparent-expression-wrappers -7.22.5 +@babel/highlight +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1265,8 +1278,33 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-split-export-declaration -7.24.5 +@babel/parser +7.25.9 +Copyright (C) 2012-2014 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@babel/plugin-syntax-jsx +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1293,8 +1331,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-string-parser -7.24.1 +@babel/plugin-syntax-typescript +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1321,8 +1359,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-validator-identifier -7.24.5 +@babel/plugin-transform-modules-commonjs +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1349,8 +1387,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/helper-validator-option -7.23.5 +@babel/plugin-transform-typescript +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1377,8 +1415,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/highlight -7.24.5 +@babel/preset-typescript +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1405,204 +1443,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@babel/parser -7.24.5 -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +@babel/runtime +7.25.9 +MIT License -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -@babel/plugin-syntax-jsx -7.24.1 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/plugin-syntax-typescript -7.24.1 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/plugin-transform-modules-commonjs -7.24.1 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/plugin-transform-typescript -7.24.5 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/preset-typescript -7.24.1 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/runtime -7.24.0 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@babel/runtime -7.24.5 -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -1627,7 +1472,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** @babel/template -7.22.15 +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1655,7 +1500,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** @babel/traverse -7.24.5 +7.25.9 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1683,7 +1528,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** @babel/types -7.24.5 +7.26.0 MIT License Copyright (c) 2014-present Sebastian McKenzie and other contributors @@ -1790,6 +1635,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +base58-js +1.0.5 +MIT License + +Copyright (c) 2021 pur3miish + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** base64-js @@ -1817,6 +1689,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +base-x +3.0.10 +The MIT License (MIT) + +Copyright (c) 2018 base-x contributors +Copyright (c) 2014-2018 The Bitcoin Core developers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** base-x @@ -2293,6 +2193,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +bitcoin-address-validation +2.2.3 +The MIT License (MIT) + +Copyright (c) 2018 Rui Gomes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** bitcoin-ops @@ -2410,7 +2337,7 @@ SOFTWARE. ****************************** @blockaid/ppom_release -1.4.6 <> +1.5.3 <> Blockaid BSL License, Version 1.0 (EPL-1.0) Licensor: Blockaid, Inc. @@ -2765,69 +2692,11 @@ Original Author, when distributed with the Software. ****************************** -bplist-creator -0.1.1 -(The MIT License) +brace-expansion +1.1.11 +MIT License -Copyright (c) 2012 Near Infinity Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -bplist-parser -0.3.2 -license: MIT -authors: Joe Ferner - -****************************** - -brace-expansion -1.1.11 -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -brace-expansion -2.0.1 -MIT License - -Copyright (c) 2013 Julian Gruber +Copyright (c) 2013 Julian Gruber Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2961,7 +2830,7 @@ IN THE SOFTWARE. ****************************** browserslist -4.23.0 +4.24.2 The MIT License (MIT) Copyright 2014 Andrey Sitnik and other contributors @@ -3295,7 +3164,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** call-bind -1.0.6 +1.0.7 MIT License Copyright (c) 2020 Jordan Harband @@ -3322,7 +3191,7 @@ SOFTWARE. ****************************** caniuse-lite -1.0.30001600 +1.0.30001669 Attribution 4.0 International ======================================================================= @@ -4091,6 +3960,21 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +chalk +5.3.0 +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ****************************** character-entities @@ -4175,6 +4059,21 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +chart.js +4.4.1 +The MIT License (MIT) + +Copyright (c) 2014-2022 Chart.js Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ****************************** cids @@ -4504,7 +4403,7 @@ THE SOFTWARE. ****************************** commander -2.20.3 +12.1.0 (The MIT License) Copyright (c) 2011 TJ Holowaychuk @@ -4532,7 +4431,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** commander -4.1.1 +2.20.3 (The MIT License) Copyright (c) 2011 TJ Holowaychuk @@ -4645,64 +4544,10 @@ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -contentful -10.8.7 -The MIT License (MIT) - -Copyright (c) 2016 Contentful - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -contentful-resolve-response -1.8.1 -MIT License - -Copyright (c) 2018 Contentful - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** @contentful/rich-text-html-renderer -16.3.5 +16.6.8 MIT License Copyright (c) 2018 Contentful @@ -4729,7 +4574,7 @@ SOFTWARE. ****************************** @contentful/rich-text-types -16.3.5 +16.8.3 MIT License Copyright (c) 2018 Contentful @@ -4753,33 +4598,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -contentful-sdk-core -8.1.2 -The MIT License (MIT) - -Copyright (c) 2016 Contentful - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** convert-source-map @@ -5238,7 +5056,7 @@ THE SOFTWARE. ****************************** debug -4.3.4 +4.3.5 (The MIT License) Copyright (c) 2014-2017 TJ Holowaychuk @@ -5337,7 +5155,7 @@ THE SOFTWARE. ****************************** define-data-property -1.1.2 +1.1.4 MIT License Copyright (c) 2023 Jordan Harband @@ -5570,13 +5388,6 @@ authors: Raynos ****************************** -eastasianwidth -0.2.0 -license: MIT -authors: Masaki Komagata - -****************************** - ecdsa-sig-formatter 1.0.11 Apache License @@ -5784,11 +5595,11 @@ Apache License ****************************** -eciesjs -0.3.16 +eip55 +2.1.1 MIT License -Copyright (c) 2019-2022 Weiliang Li +Copyright (c) 2018 Daniel Cousens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5812,7 +5623,7 @@ SOFTWARE. ****************************** electron-to-chromium -1.4.715 +1.5.45 Copyright 2018 Kilian Valkhof Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. @@ -5829,34 +5640,15 @@ authors: Fedor Indutny ****************************** -emoji-regex -8.0.0 -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - +elliptic +6.6.1 +license: MIT +authors: Fedor Indutny ****************************** emoji-regex -9.2.2 +8.0.0 Copyright Mathias Bynens Permission is hereby granted, free of charge, to any person obtaining @@ -6195,32 +5987,6 @@ SOFTWARE. limitations under the License. -****************************** - -end-of-stream -1.4.4 -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ****************************** @ensdomains/content-hash @@ -6276,7 +6042,7 @@ authors: Mike Hall ****************************** escalade -3.1.1 +3.2.0 MIT License Copyright (c) Luke Edwards (lukeed.com) @@ -6345,6 +6111,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +es-define-property +1.0.0 +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** es-errors @@ -6742,6 +6535,32 @@ eslint-visitor-keys limitations under the License. +****************************** + +eth-chainlist +0.0.498 +The MIT License (MIT) + +Copyright (c) 2022 Zane J. Chua + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + ****************************** eth-eip712-util-browser @@ -6817,7 +6636,7 @@ THE SOFTWARE. ****************************** ethereum-cryptography -2.1.3 +2.2.1 The MIT License (MIT) Copyright (c) 2021 Patricio Palladino, Paul Miller, ethereum-cryptography contributors @@ -6842,13 +6661,6 @@ THE SOFTWARE. ****************************** -ethereum-ens-network-map -1.0.2 -license: ISC -authors: Dan Finlay - -****************************** - @ethereumjs/common 3.1.1 The MIT License (MIT) @@ -6906,7 +6718,7 @@ SOFTWARE. ****************************** @ethereumjs/common -4.3.0 +4.4.0 The MIT License (MIT) Copyright (c) 2015 @@ -8450,7 +8262,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice ****************************** @ethereumjs/tx -5.3.0 +5.4.0 Mozilla Public License Version 2.0 ================================== @@ -9208,7 +9020,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice ****************************** @ethereumjs/util -9.0.3 +9.1.0 Mozilla Public License Version 2.0 ================================== @@ -9990,6 +9802,60 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +ethers +5.7.2 +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +ethers +6.13.2 +MIT License + +Copyright (c) 2016-2023 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** @ethersproject/abi @@ -10324,6 +10190,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@ethersproject/json-wallets +5.7.0 +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** @ethersproject/keccak256 @@ -10574,6 +10467,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@ethersproject/solidity +5.7.0 +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** @ethersproject/strings @@ -10628,6 +10548,60 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@ethersproject/units +5.7.0 +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +@ethersproject/wallet +5.7.0 +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** @ethersproject/web @@ -10784,65 +10758,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -eth-phishing-detect -1.2.0 -# DON'T BE A DICK PUBLIC LICENSE - -> Version 1.1, December 2016 - -> Copyright (C) 2018 kumavis - -Everyone is permitted to copy and distribute verbatim or modified -copies of this license document. - -> DON'T BE A DICK PUBLIC LICENSE -> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -1. Do whatever you like with the original work, just don't be a dick. - - Being a dick includes - but is not limited to - the following instances: - - 1a. Outright copyright infringement - Don't just copy this and change the name. - 1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. - 1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. - -2. If you become rich through modifications, related works/services, or supporting the original work, -share the love. Only a dick would make loads off this work and not buy the original work's -creator(s) a pint. - -3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes -you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back. - - -****************************** - -eth-rpc-errors -4.0.3 -MIT License - -Copyright (c) 2019 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** eventemitter3 @@ -10974,247 +10889,58 @@ Copyright (C) 2015-present SheetJS ****************************** -@expo/config -8.5.6 +extend +3.0.2 The MIT License (MIT) -Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) +Copyright (c) 2014 Stefan Thomas -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@expo/config-plugins -7.9.2 -The MIT License (MIT) +extension-port-stream +3.0.0 +ISC License -Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) +Copyright (c) 2020 MetaMask -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -****************************** - -@expo/config-types -50.0.1 -The MIT License (MIT) - -Copyright (c) 2020-present 650 Industries, Inc. (aka Expo) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -****************************** - -expo-constants -15.4.5 -license: MIT -authors: 650 Industries, Inc. - -****************************** - -@expo/fingerprint -0.6.1 -The MIT License (MIT) - -Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -****************************** - -@expo/json-file -8.3.3 -The MIT License (MIT) - -Copyright (c) 2015-present 650 Industries, Inc. (aka Expo) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -****************************** - -@expo/plist -0.1.3 -license: MIT -authors: undefined - -****************************** - -@expo/sdk-runtime-versions -1.0.0 <> -license: MIT -authors: Expo - -****************************** - -@expo/spawn-async -1.7.2 -The MIT License (MIT) - -Copyright (c) 2015 650 Industries - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -****************************** - -extend -3.0.2 -The MIT License (MIT) - -Copyright (c) 2014 Stefan Thomas - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -****************************** - -extension-port-stream -2.1.1 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** extension-port-stream -3.0.0 +4.2.0 ISC License Copyright (c) 2020 MetaMask @@ -11260,11 +10986,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -fast-copy -2.1.7 +fast-deep-equal +3.1.3 MIT License -Copyright (c) 2018 Tony Quetano +Copyright (c) 2017 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -11287,11 +11013,11 @@ SOFTWARE. ****************************** -fast-deep-equal -3.1.3 +fastest-levenshtein +1.0.16 MIT License -Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2020 Kasper Unn Weihe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -11311,7 +11037,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ****************************** fast-fifo @@ -11418,37 +11143,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -fast-levenshtein -2.0.6 -(MIT License) - -Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.com/) - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - - ****************************** fast-safe-stringify @@ -11508,7 +11202,7 @@ SOFTWARE. ****************************** fast-xml-parser -4.3.4 +4.4.1 MIT License Copyright (c) 2017 Amit Kumar Gupta @@ -11576,21 +11270,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -find-up -5.0.0 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** firebase @@ -11929,7 +11608,7 @@ SOFTWARE. ****************************** follow-redirects -1.15.6 +1.15.9 Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -11978,27 +11657,6 @@ SOFTWARE. -****************************** - -foreground-child -3.1.1 -The ISC License - -Copyright (c) 2015-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** form-data @@ -12326,226 +11984,18 @@ fuse.js ****************************** -futoin-hkdf -1.5.1 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +gensync +1.0.0-beta.2 +Copyright 2018 Logan Smyth - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - 1. Definitions. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -****************************** - -gensync -1.0.0-beta.2 -Copyright 2018 Logan Smyth - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** +****************************** get-caller-file 2.0.5 @@ -12557,32 +12007,6 @@ Permission to use, copy, modify, and/or distribute this software for any purpose THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -getenv -1.0.0 -The MIT License (MIT) -Copyright (c) 2012-2019 Christoph Tavan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** get-intrinsic @@ -12688,27 +12112,6 @@ freely, subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. -****************************** - -glob -10.4.1 -The ISC License - -Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** globals @@ -12790,27 +12193,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -graceful-fs -4.2.11 -The ISC License - -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** gridplus-sdk @@ -12841,7 +12223,7 @@ SOFTWARE. ****************************** @grpc/grpc-js -1.9.14 +1.9.15 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -13252,13 +12634,6 @@ SOFTWARE. limitations under the License. -****************************** - -gud -1.0.0 -license: MIT -authors: Jamie Kyle - ****************************** has-bigints @@ -13353,7 +12728,7 @@ authors: Fedor Indutny ****************************** hasown -2.0.0 +2.0.2 MIT License Copyright (c) Jordan Harband and contributors @@ -13380,7 +12755,7 @@ SOFTWARE. ****************************** has-property-descriptors -1.0.1 +1.0.2 MIT License Copyright (c) 2022 Inspect JS @@ -13407,7 +12782,7 @@ SOFTWARE. ****************************** has-proto -1.0.1 +1.0.3 MIT License Copyright (c) 2022 Inspect JS @@ -13461,7 +12836,7 @@ SOFTWARE. ****************************** has-tostringtag -1.0.0 +1.0.2 MIT License Copyright (c) 2021 Inspect JS @@ -13565,6 +12940,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +history +5.3.0 +MIT License + +Copyright (c) React Training 2016-2020 +Copyright (c) Remix Software 2020-2021 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** hmac-drbg @@ -13610,7 +13013,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************** http-parser-js -0.4.9 +0.5.8 Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other contributors. All rights reserved. @@ -13955,13 +13358,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -imurmurhash -0.1.4 -license: MIT -authors: Jens Taylor - ****************************** inherits @@ -14022,7 +13418,7 @@ SOFTWARE. ****************************** internal-slot -1.0.6 +1.0.7 MIT License Copyright (c) 2019 Jordan Harband @@ -14071,26 +13467,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -@isaacs/cliui -8.0.2 -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** is-alphabetical @@ -14217,7 +13593,7 @@ SOFTWARE. ****************************** is-array-buffer -3.0.2 +3.0.4 MIT License Copyright (c) 2015 Chen Gengyuan, Inspect JS @@ -14447,27 +13823,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -isexe -2.0.0 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** is-fn @@ -14807,7 +14162,7 @@ SOFTWARE. ****************************** is-shared-array-buffer -1.0.2 +1.0.3 MIT License Copyright (c) 2021 Inspect JS @@ -14905,7 +14260,7 @@ SOFTWARE. ****************************** is-typed-array -1.1.10 +1.1.13 The MIT License (MIT) Copyright (c) 2015 Jordan Harband @@ -14984,71 +14339,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -jackspeak -3.1.2 -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -***As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim.*** - - ****************************** jayson -4.1.0 +4.1.1 (The MIT License) Copyright (c) 2011-2012 Tedde Lundgren @@ -15731,7 +15025,7 @@ Address all questions regarding this license to: ****************************** jsesc -2.5.2 +3.0.2 Copyright Mathias Bynens Permission is hereby granted, free of charge, to any person obtaining @@ -15783,13 +15077,6 @@ SOFTWARE. [others]: https://github.com/json5/json5/contributors -****************************** - -jsonify -0.0.1 -license: Public Domain -authors: Douglas Crockford - ****************************** jsonparse @@ -15820,48 +15107,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -json-rpc-engine -6.1.0 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -json-rpc-middleware-stream -5.0.1 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** json-rpc-random-id @@ -15899,7 +15144,7 @@ SOFTWARE. ****************************** jsonschema -1.2.4 +1.4.1 jsonschema is licensed under MIT license. Copyright (C) 2012-2015 Tom de Grunt @@ -15923,33 +15168,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -json-stable-stringify -1.1.1 -MIT License - -Copyright (c) 2013 contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** JSONStream @@ -16059,38 +15277,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -jssha -3.2.0 -Copyright (c) 2008-2020 Brian Turek, 1998-2009 Paul Johnston & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - ****************************** js-sha3 @@ -16291,7 +15477,7 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL ****************************** keccak -3.0.2 +3.0.4 The MIT License (MIT) Copyright (c) 2016-2019 https://github.com/cryptocoinjs/keccak contributors @@ -16566,7 +15752,7 @@ authors: soralit ****************************** @keystonehq/metamask-airgapped-keyring -0.13.1 +0.14.1 license: MIT authors: aaronisme @@ -16585,6 +15771,21 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@kurkle/color +0.3.2 +The MIT License (MIT) + +Copyright (c) 2018-2021 Jukka Kurkela + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ****************************** @kwsites/file-exists @@ -16697,7 +15898,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** @lavamoat/snow -2.0.1 +2.0.2 The MIT License (MIT) Copyright (c) 2020 Consensys Software @@ -16711,23 +15912,38 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** -lie -3.1.1 -#Copyright (c) 2014 Calvin Metcalf +@ledgerhq/cryptoassets-evm-signatures +13.5.0 +The MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright (c) 2017-present Ledger https://www.ledger.com/ -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.** ****************************** -lines-and-columns -1.1.6 -The MIT License (MIT) +@ledgerhq/devices +8.4.4 +The MIT License -Copyright (c) 2015 Brian Donovan +Copyright (c) 2017-present Ledger https://www.ledger.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16750,32 +15966,267 @@ THE SOFTWARE. ****************************** -locale-currency -0.0.1 -license: BSD-2-Clause -authors: Thomas Deegan +@ledgerhq/domain-service +1.2.6 +The MIT License -****************************** +Copyright (c) 2017-present Ledger https://www.ledger.com/ -localforage -1.10.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - 1. Definitions. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +****************************** - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, +@ledgerhq/errors +6.19.1 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/evm-tools +1.2.3 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/hw-app-eth +6.39.0 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/hw-transport +6.31.4 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/hw-transport-mocker +6.29.4 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/live-env +2.3.0 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +@ledgerhq/logs +6.12.0 +license: Apache-2.0 +authors: undefined + +****************************** + +@ledgerhq/types-live +6.52.0 +The MIT License + +Copyright (c) 2017-present Ledger https://www.ledger.com/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +lie +3.1.1 +#Copyright (c) 2014 Calvin Metcalf + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.** + +****************************** + +locale-currency +0.0.1 +license: BSD-2-Clause +authors: Thomas Deegan + +****************************** + +localforage +1.10.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the @@ -16962,21 +16413,6 @@ localforage limitations under the License. -****************************** - -locate-path -6.0.0 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** lodash @@ -17138,99 +16574,18 @@ terms above. ****************************** -lodash.isplainobject -4.0.6 -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== +loglevel +1.9.1 +Copyright (c) 2013 Tim Perry -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - -****************************** - -lodash.isstring -4.0.1 -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -loglevel -1.9.1 -Copyright (c) 2013 Tim Perry - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -17690,24 +17045,29 @@ THE SOFTWARE. ****************************** -lru-cache -10.2.2 -The ISC License +lottie-web +5.12.2 +The MIT License (MIT) -Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors +Copyright (c) 2015 Bodymovin -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** @@ -17730,27 +17090,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -lru-cache -6.0.0 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** luxon @@ -18155,14 +17494,14 @@ authors: Egor Gumenyuk ****************************** @metamask/abi-utils -2.0.2 +2.0.4 license: (Apache-2.0 AND MIT) authors: Maarten Zuidhoorn ****************************** @metamask/accounts-controller -14.0.0 +20.0.0 MIT License Copyright (c) 2018 MetaMask @@ -18187,86 +17526,215 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/address-book-controller -4.0.1 -MIT License - -Copyright (c) 2018 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +@metamask/account-watcher +4.1.2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -****************************** + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -@metamask/announcement-controller -6.1.0 -MIT License + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -Copyright (c) 2018 MetaMask + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -****************************** + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -@metamask/approval-controller -6.0.2 -MIT License + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -Copyright (c) 2018 MetaMask + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -****************************** + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -@metamask/approval-controller -7.0.0 + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 ConsenSys Software Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +****************************** + +@metamask/address-book-controller +6.0.0 MIT License Copyright (c) 2018 MetaMask @@ -18291,8 +17759,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/assets-controllers -29.0.0 +@metamask/announcement-controller +7.0.0 MIT License Copyright (c) 2018 MetaMask @@ -18317,8 +17785,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/base-controller -3.2.3 +@metamask/approval-controller +7.1.1 MIT License Copyright (c) 2018 MetaMask @@ -18343,8 +17811,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/base-controller -4.1.1 +@metamask/assets-controllers +45.1.0 MIT License Copyright (c) 2018 MetaMask @@ -18370,7 +17838,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/base-controller -5.0.2 +6.0.3 MIT License Copyright (c) 2018 MetaMask @@ -18396,7 +17864,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/base-controller -6.0.0 +7.0.2 MIT License Copyright (c) 2018 MetaMask @@ -18419,6 +17887,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +****************************** + +@metamask/bitcoin-wallet-snap +0.8.2 +license: (MIT-0 OR Apache-2.0) +authors: undefined + ****************************** @metamask/browser-passworder @@ -18464,7 +17939,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/controller-utils -11.0.0 +11.4.4 MIT License Copyright (c) 2018 MetaMask @@ -18489,11 +17964,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/controller-utils -8.0.4 +@metamask/design-tokens +4.2.0 MIT License -Copyright (c) 2018 MetaMask +Copyright (c) 2024 MetaMask Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18515,8 +17990,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/controller-utils -9.1.0 +@metamask/ens-controller +15.0.0 MIT License Copyright (c) 2018 MetaMask @@ -18541,78 +18016,251 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/design-tokens -3.0.0 -license: MIT -authors: undefined +@metamask/ens-resolver-snap +0.1.2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -****************************** + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -@metamask/desktop -0.3.0 -MIT License + 1. Definitions. -Copyright (c) 2018 MetaMask + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -****************************** + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -@metamask/ens-controller -10.0.1 -MIT License + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -Copyright (c) 2018 MetaMask + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -****************************** + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -@metamask/eth-block-tracker -9.0.3 -MIT License + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -Copyright (c) 2018 MetaMask + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 ConsenSys Software Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +****************************** + +@metamask/eth-block-tracker +10.0.0 +MIT License + +Copyright (c) 2018 MetaMask + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + + +****************************** + +@metamask/eth-block-tracker +11.0.3 +MIT License + +Copyright (c) 2018 MetaMask + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18649,7 +18297,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-hd-keyring -7.0.1 +7.0.4 ISC License Copyright (c) 2020 MetaMask @@ -18778,7 +18426,7 @@ THE SOFTWARE. ****************************** @metamask/eth-json-rpc-filters -7.0.0 +9.0.0 ISC License Copyright (c) 2020 MetaMask @@ -18799,7 +18447,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-json-rpc-infura -9.1.0 +10.0.0 ISC License Copyright (c) 2020 MetaMask @@ -18820,7 +18468,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-json-rpc-middleware -12.1.1 +15.0.1 ISC License Copyright (c) 2020 MetaMask @@ -18841,28 +18489,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-json-rpc-provider -2.3.2 -ISC License - -Copyright (c) 2022 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -@metamask/eth-json-rpc-provider -3.0.2 +4.1.6 ISC License Copyright (c) 2022 MetaMask @@ -19018,7 +18645,7 @@ THE SOFTWARE. ****************************** @metamask/eth-ledger-bridge-keyring -2.0.1 +5.0.1 ISC License Copyright (c) 2020 MetaMask @@ -19039,21 +18666,35 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-query -3.0.1 +4.0.0 license: ISC authors: undefined ****************************** -@metamask/eth-query -4.0.0 -license: ISC -authors: undefined +@metamask/eth-sig-util +7.0.3 +ISC License + +Copyright (c) 2020 MetaMask + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + ****************************** @metamask/eth-sig-util -7.0.1 +8.0.0 ISC License Copyright (c) 2020 MetaMask @@ -19074,7 +18715,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-simple-keyring -6.0.1 +6.0.5 ISC License Copyright (c) 2020 MetaMask @@ -19095,14 +18736,31 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-snap-keyring -4.2.1 -license: Custom: https://metamask.github.io/eth-snap-keyring/latest/ -authors: undefined +5.0.1 +Copyright ConsenSys Software Inc. 2022. All rights reserved. + +You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. + +Subject to the limited license below, you may not (and you may not permit anyone else to) distribute, publish, copy, modify, merge, combine with another program, create derivative works of, reverse engineer, decompile or otherwise attempt to extract the source code of, the Program or any part thereof, except that you may contribute to this repository. + +You are granted a non-exclusive, non-transferable, non-sublicensable license to distribute, publish, copy, modify, merge, combine with another program or create derivative works of the Program (such resulting program, collectively, the “Resulting Program”) solely for Non-Commercial Use as long as you: + 1. give prominent notice (“Notice”) with each copy of the Resulting Program that the Program is used in the Resulting Program and that the Program is the copyright of ConsenSys; and + 2. subject the Resulting Program and any distribution, publication, copy, modification, merger therewith, combination with another program or derivative works thereof to the same Notice requirement and Non-Commercial Use restriction set forth herein. + +“Non-Commercial Use” means each use as described in clauses (1)-(3) below, as reasonably determined by ConsenSys in its sole discretion: + 1. personal use for research, personal study, private entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial application; + 2. use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution; or + 3. the number of monthly active users of the Resulting Program across all versions thereof and platforms globally do not exceed 10,000 at any time. + +You will not use any trade mark, service mark, trade name, logo of ConsenSys or any other company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos. + +If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at communications@metamask.io. + ****************************** @metamask/eth-token-tracker -8.0.0 +9.0.0 ISC License Copyright (c) 2020 MetaMask @@ -19123,7 +18781,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/eth-trezor-keyring -3.1.0 +3.1.3 ISC License Copyright (c) 2020 MetaMask @@ -19144,33 +18802,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/gas-fee-controller -15.1.2 -MIT License - -Copyright (c) 2018 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - - -****************************** - -@metamask/gas-fee-controller -17.0.0 +22.0.1 MIT License Copyright (c) 2018 MetaMask @@ -19223,7 +18855,7 @@ SOFTWARE. ****************************** @metamask-institutional/custody-controller -0.2.27 +0.3.0 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19250,7 +18882,7 @@ SOFTWARE. ****************************** @metamask-institutional/custody-keyring -2.0.0 +2.1.1 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19277,7 +18909,7 @@ SOFTWARE. ****************************** @metamask-institutional/extension -0.3.24 +0.3.28 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19304,7 +18936,7 @@ SOFTWARE. ****************************** @metamask-institutional/institutional-features -1.3.2 +1.3.6 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19385,7 +19017,7 @@ SOFTWARE. ****************************** @metamask-institutional/sdk -0.1.27 +0.2.0 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19439,7 +19071,7 @@ SOFTWARE. ****************************** @metamask-institutional/transaction-update -0.2.2 +0.2.6 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19466,7 +19098,7 @@ SOFTWARE. ****************************** @metamask-institutional/types -1.1.0 +1.2.0 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19493,7 +19125,7 @@ SOFTWARE. ****************************** @metamask-institutional/websocket-client -0.2.2 +0.2.6 MIT License Copyright (c) 2023 ConsenSys Vertical Apps @@ -19541,7 +19173,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/json-rpc-engine -7.3.3 +10.0.1 ISC License Copyright (c) 2022 MetaMask @@ -19562,7 +19194,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/json-rpc-engine -8.0.2 +9.0.3 ISC License Copyright (c) 2022 MetaMask @@ -19583,7 +19215,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/json-rpc-middleware-stream -7.0.1 +8.0.5 ISC License Copyright (c) 2020 MetaMask @@ -19604,26 +19236,60 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/keyring-api -5.1.0 -license: Custom: https://docs.metamask.io/snaps/ -authors: undefined - -****************************** +10.1.0 +Copyright ConsenSys Software Inc. 2022. All rights reserved. + +You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. + +Subject to the limited license below, you may not (and you may not permit anyone else to) distribute, publish, copy, modify, merge, combine with another program, create derivative works of, reverse engineer, decompile or otherwise attempt to extract the source code of, the Program or any part thereof, except that you may contribute to this repository. + +You are granted a non-exclusive, non-transferable, non-sublicensable license to distribute, publish, copy, modify, merge, combine with another program or create derivative works of the Program (such resulting program, collectively, the “Resulting Program”) solely for Non-Commercial Use as long as you: + 1. give prominent notice (“Notice”) with each copy of the Resulting Program that the Program is used in the Resulting Program and that the Program is the copyright of ConsenSys; and + 2. subject the Resulting Program and any distribution, publication, copy, modification, merger therewith, combination with another program or derivative works thereof to the same Notice requirement and Non-Commercial Use restriction set forth herein. + +“Non-Commercial Use” means each use as described in clauses (1)-(3) below, as reasonably determined by ConsenSys in its sole discretion: + 1. personal use for research, personal study, private entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial application; + 2. use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution; or + 3. the number of monthly active users of the Resulting Program across all versions thereof and platforms globally do not exceed 10,000 at any time. + +You will not use any trade mark, service mark, trade name, logo of ConsenSys or any other company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos. + +If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at communications@metamask.io. -@metamask/keyring-api -6.3.1 -license: Custom: https://docs.metamask.io/snaps/ -authors: undefined ****************************** -@metamask/keyring-controller -15.0.0 -MIT License - -Copyright (c) 2018 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy +@metamask/keyring-api +12.0.0 +Copyright ConsenSys Software Inc. 2022. All rights reserved. + +You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. + +Subject to the limited license below, you may not (and you may not permit anyone else to) distribute, publish, copy, modify, merge, combine with another program, create derivative works of, reverse engineer, decompile or otherwise attempt to extract the source code of, the Program or any part thereof, except that you may contribute to this repository. + +You are granted a non-exclusive, non-transferable, non-sublicensable license to distribute, publish, copy, modify, merge, combine with another program or create derivative works of the Program (such resulting program, collectively, the “Resulting Program”) solely for Non-Commercial Use as long as you: + 1. give prominent notice (“Notice”) with each copy of the Resulting Program that the Program is used in the Resulting Program and that the Program is the copyright of ConsenSys; and + 2. subject the Resulting Program and any distribution, publication, copy, modification, merger therewith, combination with another program or derivative works thereof to the same Notice requirement and Non-Commercial Use restriction set forth herein. + +“Non-Commercial Use” means each use as described in clauses (1)-(3) below, as reasonably determined by ConsenSys in its sole discretion: + 1. personal use for research, personal study, private entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial application; + 2. use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution; or + 3. the number of monthly active users of the Resulting Program across all versions thereof and platforms globally do not exceed 10,000 at any time. + +You will not use any trade mark, service mark, trade name, logo of ConsenSys or any other company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos. + +If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at communications@metamask.io. + + +****************************** + +@metamask/keyring-controller +19.0.2 +MIT License + +Copyright (c) 2018 MetaMask + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -19641,10 +19307,24 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +****************************** + +@metamask/keyring-internal-api +1.0.0 +license: Custom: https://github.com/MetaMask/accounts +authors: undefined + +****************************** + +@metamask/keyring-utils +1.0.0 +license: Custom: https://github.com/MetaMask/accounts +authors: undefined + ****************************** @metamask/key-tree -9.1.1 +10.0.1 MIT License Copyright (c) 2021 MetaMask @@ -19671,7 +19351,7 @@ SOFTWARE. ****************************** @metamask/logging-controller -3.0.1 +6.0.0 license: MIT authors: undefined @@ -19699,7 +19379,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/message-manager -7.3.9 +11.0.3 MIT License Copyright (c) 2018 MetaMask @@ -19724,36 +19404,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** -@metamask/message-manager -8.0.2 -MIT License +@metamask/message-signing-snap +0.6.0 +Copyright ConsenSys Software Inc. 2024. All rights reserved. -Copyright (c) 2018 MetaMask +You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Subject to the limited license below, you may not (and you may not permit anyone else to) distribute, publish, copy, modify, merge, combine with another program, create derivative works of, reverse engineer, decompile or otherwise attempt to extract the source code of, the Program or any part thereof, except that you may contribute to this repository. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +You are granted a non-exclusive, non-transferable, non-sublicensable license to distribute, publish, copy, modify, merge, combine with another program or create derivative works of the Program (such resulting program, collectively, the “Resulting Program”) solely for Non-Commercial Use as long as you: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +1. give prominent notice (“Notice”) with each copy of the Resulting Program that the Program is used in the Resulting Program and that the Program is the copyright of ConsenSys; and +2. subject the Resulting Program and any distribution, publication, copy, modification, merger therewith, combination with another program or derivative works thereof to the same Notice requirement and Non-Commercial Use restriction set forth herein. +“Non-Commercial Use” means each use as described in clauses (1)-(3) below, as reasonably determined by ConsenSys in its sole discretion: -****************************** +1. personal use for research, personal study, private entertainment, hobby projects or amateur pursuits, in each case without any anticipated commercial application; +2. use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization or government institution; or +3. the number of monthly active users of the Resulting Program across all versions thereof and platforms globally do not exceed 10,000 at any time. -@metamask/message-signing-snap -0.3.3 -license: Custom: http://localhost -authors: undefined +You will not use any trade mark, service mark, trade name, logo of ConsenSys or any other company or organization in a way that is likely or intended to cause confusion about the owner or authorized user of such marks, names or logos. + +If you have any questions, comments or interest in pursuing any other use cases, please reach out to us at metamask.license@consensys.net. ****************************** @@ -19778,7 +19450,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/name-controller -6.0.1 +8.0.0 MIT License Copyright (c) 2023 MetaMask @@ -19804,7 +19476,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/network-controller -18.1.2 +22.1.0 MIT License Copyright (c) 2018 MetaMask @@ -19830,7 +19502,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/nonce-tracker -5.0.0 +6.0.0 MIT License Copyright (c) 2019 MetaMask @@ -19856,11 +19528,11 @@ SOFTWARE. ****************************** -@metamask/notification-controller -3.0.0 +@metamask/notification-services-controller +0.15.0 MIT License -Copyright (c) 2018 MetaMask +Copyright (c) 2024 MetaMask Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19928,69 +19600,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -@metamask/obs-store -5.0.0 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -@metamask/obs-store -7.0.0 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -@metamask/obs-store -8.1.0 -ISC License - -Copyright (c) 2020 MetaMask - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** @metamask/obs-store @@ -20015,7 +19624,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/permission-controller -9.0.2 +11.0.3 MIT License Copyright (c) 2018 MetaMask @@ -20041,7 +19650,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/permission-log-controller -2.0.1 +3.0.1 Copyright ConsenSys Software Inc. 2022. All rights reserved. You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. @@ -20065,33 +19674,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/phishing-controller -9.0.2 -MIT License - -Copyright (c) 2018 MetaMask - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - - -****************************** - -@metamask/polling-controller -6.0.2 +12.3.0 MIT License Copyright (c) 2018 MetaMask @@ -20117,7 +19700,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/polling-controller -8.0.0 +12.0.1 MIT License Copyright (c) 2018 MetaMask @@ -20143,7 +19726,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/post-message-stream -8.1.0 +8.1.1 ISC License Copyright (c) 2020 MetaMask @@ -20164,67 +19747,247 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/ppom-validator -0.30.0 +0.36.0 license: Custom: https://nodejs.org authors: undefined ****************************** -@metamask/preferences-controller -11.0.0 -MIT License +@metamask/preinstalled-example-snap +0.2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2018 MetaMask + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 1. Definitions. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -****************************** + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -@metamask/providers -14.0.2 -MIT License + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -Copyright (c) 2020 MetaMask + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -****************************** + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -@metamask/providers -16.1.0 + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2024 Consensys Software Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +****************************** + +@metamask/profile-sync-controller +3.1.1 +MIT License + +Copyright (c) 2024 MetaMask + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + + +****************************** + +@metamask/providers +18.2.0 MIT License Copyright (c) 2020 MetaMask @@ -20251,7 +20014,7 @@ SOFTWARE. ****************************** @metamask/queued-request-controller -0.10.0 +7.0.1 MIT License Copyright (c) 2023 MetaMask @@ -20277,7 +20040,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/rate-limit-controller -5.0.1 +6.0.0 MIT License Copyright (c) 2018 MetaMask @@ -20300,10 +20063,21 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +****************************** + +@metamask/remote-feature-flag-controller +1.1.0 +This project is licensed under either of + + * MIT license ([LICENSE.MIT](LICENSE.MIT)) + * Apache License, Version 2.0 ([LICENSE.APACHE2](LICENSE.APACHE2)) + +at your option. + ****************************** @metamask/rpc-errors -6.2.1 +6.4.0 MIT License Copyright (c) 2019 MetaMask @@ -20329,23 +20103,29 @@ SOFTWARE. ****************************** -@metamask/safe-event-emitter -2.0.0 <> -ISC License +@metamask/rpc-errors +7.0.1 +MIT License -Copyright (c) 2020 MetaMask +Copyright (c) 2019 MetaMask -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** @@ -20399,7 +20179,7 @@ THE SOFTWARE. ****************************** @metamask/selected-network-controller -13.0.0 +19.0.0 MIT License Copyright (c) 2023 MetaMask @@ -20425,7 +20205,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/signature-controller -14.0.1 +23.1.0 MIT License Copyright (c) 2023 MetaMask @@ -20451,14 +20231,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/slip44 -3.1.0 +4.1.0 license: ISC authors: Dan Finlay ****************************** @metamask/smart-transactions-controller -10.0.1 +15.0.0 Copyright ConsenSys Software Inc. 2020. All rights reserved. You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. @@ -20482,7 +20262,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/snaps-controllers -8.2.0 +9.15.0 Copyright ConsenSys Software Inc. 2021. All rights reserved. You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. @@ -20506,7 +20286,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/snaps-execution-environments -6.2.0 +6.10.0 Copyright ConsenSys Software Inc. 2022. All rights reserved. You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. @@ -20532,7 +20312,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/snaps-registry -3.1.0 +3.2.2 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -20739,7 +20519,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/snaps-rpc-methods -9.1.0 +11.7.0 Copyright ConsenSys Software Inc. 2021. All rights reserved. You acknowledge and agree that ConsenSys Software Inc. (“ConsenSys”) (or ConsenSys’s licensors) own all legal right, title and interest in and to the work, software, application, source code, documentation and any other documents in this repository (collectively, the “Program”), including any intellectual property rights which subsist in the Program (whether those rights happen to be registered or not, and wherever in the world those rights may exist), whether in source code or any other form. @@ -20763,7 +20543,7 @@ If you have any questions, comments or interest in pursuing any other use cases, ****************************** @metamask/snaps-sdk -4.3.0 +6.13.0 ISC License Copyright (c) 2023 MetaMask @@ -20784,7 +20564,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/snaps-utils -7.4.0 +8.6.1 ISC License Copyright (c) 2022 MetaMask @@ -20802,17 +20582,39 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +****************************** + +@metamask/solana-wallet-snap +1.0.4 +license: (MIT-0 OR Apache-2.0) +authors: undefined + +****************************** + +@metamask/superstruct +3.1.0 +The MIT License + +Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ****************************** @metamask/swappable-obj-proxy -2.2.0 +2.3.0 license: ISC authors: undefined ****************************** @metamask/transaction-controller -32.0.0 +42.0.0 MIT License Copyright (c) 2018 MetaMask @@ -20838,7 +20640,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/user-operation-controller -10.0.0 +19.0.0 MIT License Copyright (c) 2023 MetaMask @@ -20864,7 +20666,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ****************************** @metamask/utils -5.0.2 +10.0.1 +ISC License + +Copyright (c) 2022 MetaMask + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +****************************** + +@metamask/utils +8.5.0 ISC License Copyright (c) 2022 MetaMask @@ -20885,7 +20708,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** @metamask/utils -8.4.0 +9.3.0 ISC License Copyright (c) 2022 MetaMask @@ -21015,33 +20838,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -mini-create-react-context -0.3.2 -Copyright (c) 2019-present StringEpsilon - -Copyright (c) 2017-2019 James Kyle - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** minimalistic-assert @@ -21088,48 +20884,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -minimatch -9.0.4 -The ISC License - -Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -minipass -7.1.2 -The ISC License - -Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** mkdirp @@ -21345,6 +21099,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +multiformats +13.2.2 +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + + ****************************** multiformats @@ -21446,34 +21210,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -mz -2.7.0 - -The MIT License (MIT) - -Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - ****************************** nan @@ -21549,7 +21285,7 @@ SOFTWARE. ****************************** @noble/ciphers -0.5.2 +0.5.3 The MIT License (MIT) Copyright (c) 2022 Paul Miller (https://paulmillr.com) @@ -21576,7 +21312,7 @@ THE SOFTWARE. ****************************** @noble/curves -1.3.0 +1.2.0 The MIT License (MIT) Copyright (c) 2022 Paul Miller (https://paulmillr.com) @@ -21602,7 +21338,7 @@ THE SOFTWARE. ****************************** @noble/curves -1.4.0 +1.4.2 The MIT License (MIT) Copyright (c) 2022 Paul Miller (https://paulmillr.com) @@ -21679,6 +21415,32 @@ THE SOFTWARE. ****************************** +@noble/hashes +1.3.2 +The MIT License (MIT) + +Copyright (c) 2022 Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +****************************** + @noble/hashes 1.3.3 The MIT License (MIT) @@ -21819,6 +21581,24 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** +node-addon-api +5.1.0 +The MIT License (MIT) +===================== + +Copyright (c) 2017 Node.js API collaborators +----------------------------------- + +*Node.js API collaborators listed at * + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************** + node-addon-api 7.1.0 The MIT License (MIT) @@ -21890,7 +21670,7 @@ THE SOFTWARE. ****************************** node-releases -2.0.14 +2.0.18 The MIT License Copyright (c) 2017 Sergey Rubanov (https://github.com/chicoxyzzy) @@ -21971,7 +21751,7 @@ THE SOFTWARE. ****************************** object.assign -4.1.4 +4.1.5 The MIT License (MIT) Copyright (c) 2014 Jordan Harband @@ -21997,7 +21777,7 @@ SOFTWARE. ****************************** object-inspect -1.12.3 +1.13.2 MIT License Copyright (c) 2013 James Halliday @@ -22075,13 +21855,6 @@ THE SOFTWARE. ****************************** -obj-multiplex -1.0.0 <> -license: ISC -authors: undefined - -****************************** - once 1.4.0 The ISC License @@ -22101,34 +21874,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -otpauth -8.0.3 -The MIT License (MIT) -===================== - -Copyright © 2022 Héctor Molinero Fernández - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** pako @@ -22184,36 +21929,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -path-exists -4.0.0 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -path-key -3.1.1 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** path-parse @@ -22241,71 +21956,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -path-scurry -1.11.1 -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -***As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim.*** - - ****************************** path-to-regexp -1.7.0 +1.9.0 The MIT License (MIT) Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) @@ -22383,10 +22037,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** picocolors -1.0.0 +1.1.1 ISC License -Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov +Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -22418,11 +22072,71 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ****************************** -pirates -4.0.6 +pony-cause +2.1.10 +BSD Zero Clause License (0BSD) + +Copyright (c) 2020 Pelle Wessman + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +****************************** + +popper.js +1.15.0 +license: MIT +authors: Federico Zivolo + +****************************** + +popper.js +1.16.1-lts +license: MIT +authors: Federico Zivolo + +****************************** + +@popperjs/core +2.9.2 +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +****************************** + +possible-typed-array-names +1.0.0 MIT License -Copyright (c) 2016-2018 Ari Porad +Copyright (c) 2024 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22445,336 +22159,9 @@ SOFTWARE. ****************************** -@pkgjs/parseargs -0.11.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -****************************** - -p-limit -3.1.0 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -plist -3.1.0 -(The MIT License) - -Copyright (c) 2010-2017 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -p-locate -5.0.0 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -pony-cause -2.1.10 -BSD Zero Clause License (0BSD) - -Copyright (c) 2020 Pelle Wessman - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -popper.js -1.15.0 -license: MIT -authors: Federico Zivolo - -****************************** - -popper.js -1.16.1-lts -license: MIT -authors: Federico Zivolo - -****************************** - -@popperjs/core -2.9.2 -The MIT License (MIT) - -Copyright (c) 2019 Federico Zivolo - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -printj -1.1.2 -Copyright (C) 2016-present SheetJS +printj +1.1.2 +Copyright (C) 2016-present SheetJS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23341,21 +22728,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -p-throttle -4.1.1 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** punycode @@ -23445,7 +22817,7 @@ authors: Kazuhiko Arase ****************************** qrcode.react -1.0.1 +3.1.0 ISC License Copyright (c) 2015, Paul O’Shannessy @@ -23462,53 +22834,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -****************************** - -qr.js -0.0.0 -Copyright (c) 2013 Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -qs -6.11.2 -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +This product bundles QR Code Generator, which is available under a +"MIT" license. For details, see src/third-party/qrcodegen. ****************************** @@ -23626,6 +22953,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +react +18.2.0 +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** react-beautiful-dnd @@ -23645,6 +22999,19 @@ See the License for the specific language governing permissions and limitations under the License. +****************************** + +react-chartjs-2 +5.2.0 +Copyright 2020 Jeremy Ayerst + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ****************************** react-clientside-effect @@ -23700,6 +23067,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +react-dom +18.2.0 +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** react-easy-swipe @@ -23925,13 +23319,6 @@ SOFTWARE. -****************************** - -@react-native/normalize-color -2.1.0 -license: MIT -authors: undefined - ****************************** react-popper @@ -23962,7 +23349,7 @@ SOFTWARE. ****************************** react-redux -7.2.0 +7.2.9 The MIT License (MIT) Copyright (c) 2015-present Dan Abramov @@ -24016,10 +23403,40 @@ SOFTWARE. ****************************** react-router -5.1.2 +5.3.4 MIT License -Copyright (c) React Training 2016-2018 +Copyright (c) React Training 2015-2019 +Copyright (c) Remix Software 2020-2022 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +react-router +6.26.2 +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -24043,10 +23460,40 @@ SOFTWARE. ****************************** react-router-dom -5.1.2 +5.3.4 MIT License -Copyright (c) React Training 2016-2018 +Copyright (c) React Training 2015-2019 +Copyright (c) Remix Software 2020-2022 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +react-router-dom-v5-compat +6.26.2 +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -24428,7 +23875,7 @@ SOFTWARE. ****************************** regexp.prototype.flags -1.5.1 +1.5.2 The MIT License (MIT) Copyright (C) 2014 Jordan Harband @@ -24488,6 +23935,35 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** + +@remix-run/router +1.19.2 +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + ****************************** remove-trailing-slash @@ -24538,52 +24014,25 @@ distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -require-from-string -2.0.2 -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** reselect -3.0.1 +4.1.8 The MIT License (MIT) -Copyright (c) 2015-2016 Reselect Contributors +Copyright (c) 2015-2018 Reselect Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -24607,7 +24056,7 @@ SOFTWARE. ****************************** reselect -4.1.8 +5.1.1 The MIT License (MIT) Copyright (c) 2015-2018 Reselect Contributors @@ -24658,21 +24107,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -resolve-from -5.0.0 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ****************************** resolve-pathname @@ -25778,326 +25212,270 @@ If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - - -****************************** - -rpc-websockets -7.11.1 -Copyright (c) Elpheria j.d.o.o. - -rpc-websockets is an Open Source project licensed under the terms of -the LGPLv3 license. Please see -for license text. - -rpc-websockets Pro has a commercial-friendly license allowing private forks -and modifications of rpc-websockets. -Please see https://www.elpheria.com/products/rpc-websockets-pro.html -or email us at info@elpheria.com for more detail. - - -****************************** - -safe-buffer -5.1.2 -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -safe-buffer -5.2.1 -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -safer-buffer -2.1.2 -MIT License - -Copyright (c) 2018 Nikita Skovoroda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -safe-stable-stringify -2.4.3 -The MIT License (MIT) - -Copyright (c) Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -sax -1.3.0 -The ISC License - -Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -==== - -`String.fromCodePoint` by Mathias Bynens used according to terms of MIT -License, as follows: - -Copyright (c) 2010-2022 Mathias Bynens - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -scheduler -0.18.0 -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -scrypt-js -3.0.1 -The MIT License (MIT) - -Copyright (c) 2016 Richard Moore - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +such modified license differs from this License). +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. -****************************** +Exhibit A - Source Code Form License Notice +------------------------------------------- -@scure/base -1.1.6 -The MIT License (MIT) + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright (c) 2022 Paul Miller (https://paulmillr.com) +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +You may add additional accurate notices of copyright ownership. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. ****************************** -@scure/bip32 -1.1.0 -The MIT License (MIT) +rpc-websockets +8.0.1 +Copyright (c) Elpheria j.d.o.o. -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) +rpc-websockets is an Open Source project licensed under the terms of +the LGPLv3 license. Please see +for license text. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +rpc-websockets Pro has a commercial-friendly license allowing private forks +and modifications of rpc-websockets. +Please see https://www.elpheria.com/products/rpc-websockets-pro.html +or email us at info@elpheria.com for more detail. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +****************************** + +rxjs +7.8.1 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ****************************** -@scure/bip32 -1.3.3 +safe-buffer +5.1.2 The MIT License (MIT) -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) +Copyright (c) Feross Aboukhadijeh Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal +of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is @@ -26106,7 +25484,7 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER @@ -26117,14 +25495,14 @@ THE SOFTWARE. ****************************** -@scure/bip39 -1.1.0 +safe-buffer +5.2.1 The MIT License (MIT) -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) +Copyright (c) Feross Aboukhadijeh Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal +of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is @@ -26133,7 +25511,7 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER @@ -26144,41 +25522,38 @@ THE SOFTWARE. ****************************** -@scure/bip39 -1.2.2 -The MIT License (MIT) +safer-buffer +2.1.2 +MIT License -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) +Copyright (c) 2018 Nikita Skovoroda Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal +of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -secp256k1 -4.0.2 +safe-stable-stringify +2.4.3 The MIT License (MIT) -Copyright (c) 2014-2016 secp256k1-node contributors - -Parts of this software are based on bn.js, elliptic, hash.js -Copyright (c) 2014-2016 Fedor Indutny +Copyright (c) Ruben Bridgewater Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26187,28 +25562,25 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -secp256k1 -4.0.3 -The MIT License (MIT) - -Copyright (c) 2014-2016 secp256k1-node contributors +scheduler +0.18.0 +MIT License -Parts of this software are based on bn.js, elliptic, hash.js -Copyright (c) 2014-2016 Fedor Indutny +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26217,25 +25589,25 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@segment/loosely-validate-event -2.0.0 <> -The MIT License +scheduler +0.23.0 +MIT License -Copyright (c) 2017 Segment.io friends@segment.com +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26244,435 +25616,218 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -semver -6.3.1 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -semver -7.5.3 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -semver -7.6.2 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -****************************** - -@sentry/browser -7.53.0 -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@sentry/core -7.53.0 -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@sentry/integrations -7.53.0 -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -@sentry-internal/tracing -7.53.0 -Copyright (c) 2020 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@sentry/replay -7.53.0 -Copyright (c) 2022 Sentry (https://sentry.io) and individual contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - +scrypt-js +3.0.1 +The MIT License (MIT) -****************************** +Copyright (c) 2016 Richard Moore -@sentry/types -7.53.0 -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@sentry/utils -7.53.0 -Copyright (c) 2019 Sentry (https://sentry.io) and individual contributors. All rights reserved. +@scure/base +1.1.7 +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright (c) 2022 Paul Miller (https://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -ses -1.1.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +@scure/bip32 +1.1.0 +The MIT License (MIT) - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) - 1. Definitions. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +****************************** - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +@scure/bip32 +1.4.0 +The MIT License (MIT) - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +****************************** - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +@scure/bip39 +1.1.0 +The MIT License (MIT) - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +****************************** - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +@scure/bip39 +1.3.0 +The MIT License (MIT) - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS +****************************** - APPENDIX: How to apply the Apache License to your work. +secp256k1 +4.0.4 +The MIT License (MIT) - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +Copyright (c) 2014-2016 secp256k1-node contributors - Copyright [yyyy] [name of copyright owner] +Parts of this software are based on bn.js, elliptic, hash.js +Copyright (c) 2014-2016 Fedor Indutny - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - http://www.apache.org/licenses/LICENSE-2.0 +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -set-function-length -1.2.1 -MIT License +@segment/loosely-validate-event +2.0.0 <> +The MIT License -Copyright (c) Jordan Harband and contributors +Copyright (c) 2017 Segment.io friends@segment.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26681,6 +25836,75 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +****************************** + +semver +6.3.1 +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +****************************** + +semver +7.6.3 +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +****************************** + +@sentry/browser +8.33.1 +MIT License + +Copyright (c) 2019-2024 Functional Software, Inc. dba Sentry + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26695,18 +25919,18 @@ SOFTWARE. ****************************** -set-function-name -2.0.1 +@sentry/core +8.33.1 MIT License -Copyright (c) Jordan Harband and contributors +Copyright (c) 2019-2024 Functional Software, Inc. dba Sentry -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26722,49 +25946,45 @@ SOFTWARE. ****************************** -setimmediate -1.0.5 -Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +@sentry-internal/browser-utils +8.33.1 +MIT License -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Copyright (c) 2020-2024 Functional Software, Inc. dba Sentry -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -****************************** +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -set-immediate-shim -1.0.1 -license: MIT -authors: Sindre Sorhus ****************************** -sha.js -2.4.11 -Copyright (c) 2013-2018 sha.js contributors +@sentry-internal/feedback +8.33.1 +MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Copyright (c) 2023-2024 Functional Software, Inc. dba Sentry + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26778,80 +25998,101 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Copyright (c) 1998 - 2009, Paul Johnston & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +****************************** -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +@sentry-internal/replay +8.33.1 +MIT License -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. +Copyright (c) 2022-2024 Functional Software, Inc. dba Sentry -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -shebang-command -2.0.0 +@sentry-internal/replay-canvas +8.33.1 MIT License -Copyright (c) Kevin Mårtensson (github.com/kevva) +Copyright (c) 2024 Functional Software, Inc. dba Sentry -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -shebang-regex -3.0.0 +@sentry/types +8.33.1 MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) 2019-2024 Functional Software, Inc. dba Sentry -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -side-channel -1.0.4 +@sentry/utils +8.33.1 MIT License -Copyright (c) 2019 Jordan Harband +Copyright (c) 2019-2024 Functional Software, Inc. dba Sentry -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -26867,138 +26108,218 @@ SOFTWARE. ****************************** -signal-exit -3.0.7 -The ISC License - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. +ses +1.1.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + 1. Definitions. -****************************** + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -signal-exit -4.0.2 -The ISC License + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -****************************** + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -simple-git -3.20.0 -license: MIT -authors: Steve King + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -****************************** + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -simple-plist -1.4.0 -The MIT License (MIT) + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -Copyright (c) 2013 Joe Wollard + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -****************************** + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -@sinclair/typebox -0.31.28 -TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -The MIT License (MIT) + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -Copyright (c) 2017-2023 Haydn Paterson (sinclair) + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -****************************** + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -single-call-balance-checker-abi -1.0.0 <> -license: MIT -authors: Will O'Beirne + END OF TERMS AND CONDITIONS -****************************** + APPENDIX: How to apply the Apache License to your work. -slash -3.0.0 -MIT License + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -Copyright (c) Sindre Sorhus (sindresorhus.com) + Copyright [yyyy] [name of copyright owner] -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + http://www.apache.org/licenses/LICENSE-2.0 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. ****************************** -slugify -1.6.6 -The MIT License (MIT) +set-function-length +1.2.2 +MIT License -Copyright (c) Simeon Velichkov +Copyright (c) Jordan Harband and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27021,70 +26342,11 @@ SOFTWARE. ****************************** -smart-buffer -4.2.0 -The MIT License (MIT) - -Copyright (c) 2013-2017 Josh Glazebrook - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -socks -2.8.1 -The MIT License (MIT) - -Copyright (c) 2013 Josh Glazebrook - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -socks-proxy-agent -6.1.1 -license: MIT -authors: Nathan Rajlich (http://n8.io/) - -****************************** - -@solana/buffer-layout -4.0.1 -The MIT License (MIT) +set-function-name +2.0.2 +MIT License -Copyright (c) 2015-2018 Peter A. Bigot +Copyright (c) Jordan Harband and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27093,23 +26355,23 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@solana/web3.js -1.91.8 -Copyright (c) 2023 Solana Labs, Inc +setimmediate +1.0.5 +Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -27122,171 +26384,29 @@ the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -space-separated-tokens -1.1.5 -(The MIT License) - -Copyright (c) 2016 Titus Wormer - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -sprintf-js -1.1.3 -Copyright (c) 2007-present, Alexandru Mărășteanu -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of this software nor the names of its contributors may be - used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -****************************** - -@spruceid/siwe-parser -2.1.0 -license: Apache-2.0 -authors: Spruce Systems Inc. - -****************************** - -stop-iteration-iterator -1.0.0 -MIT License - -Copyright (c) 2023 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -stream-browserify -3.0.0 -MIT License - -Copyright (c) James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -stream-buffers -2.2.0 -license: Unlicense -authors: Sam Day - -****************************** - -stream-splicer -2.0.0 -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** +set-immediate-shim +1.0.1 +license: MIT +authors: Sindre Sorhus ****************************** -streamx -2.15.1 -The MIT License (MIT) +sha256-uint8array +0.10.7 +MIT License -Copyright (c) 2019 Mathias Buus +Copyright (c) 2020-2023 Yusuke Kawasaki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27295,247 +26415,239 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -string_decoder -1.1.1 -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. +sha.js +2.4.11 +Copyright (c) 2013-2018 sha.js contributors Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Copyright (c) 1998 - 2009, Paul Johnston & Contributors +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. -****************************** +Neither the name of the author nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. -string_decoder -1.3.0 -Node.js is licensed for use as follows: +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -""" -Copyright Node.js contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +****************************** -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" +side-channel +1.0.4 +MIT License -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: +Copyright (c) 2019 Jordan Harband -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -string-width -4.2.3 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - +simple-git +3.20.0 +license: MIT +authors: Steve King ****************************** -string-width -5.1.2 -MIT License +@sinclair/typebox +0.31.28 +TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Copyright (c) 2017-2023 Haydn Paterson (sinclair) -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -strip-ansi -6.0.1 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +single-call-balance-checker-abi +1.0.0 <> +license: MIT +authors: Will O'Beirne -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +****************************** +siwe +2.3.2 +license: Apache-2.0 +authors: Spruce Systems Inc. ****************************** -strip-ansi -7.1.0 -MIT License +smart-buffer +4.2.0 +The MIT License (MIT) -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) 2013-2017 Josh Glazebrook -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -strip-hex-prefix -1.0.0 -The MIT License +socks +2.8.1 +The MIT License (MIT) -Copyright (c) 2016 Nick Dodson. nickdodson.com +Copyright (c) 2013 Josh Glazebrook -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -strnum -1.0.5 -MIT License +socks-proxy-agent +6.1.1 +license: MIT +authors: Nathan Rajlich (http://n8.io/) -Copyright (c) 2021 Natural Intelligence +****************************** -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +@solana/addresses +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -style-to-object -0.3.0 -The MIT License (MIT) - -Copyright (c) 2017 Menglin "Mark" Xu +@solana/assertions +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -27559,11 +26671,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -sucrase -3.35.0 +@solana/buffer-layout +4.0.1 The MIT License (MIT) -Copyright (c) 2012-2018 various contributors (see AUTHORS) +Copyright (c) 2015-2018 Peter A. Bigot Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27572,272 +26684,288 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -superstruct -0.14.2 -The MIT License - -Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -superstruct -1.0.3 -The MIT License - -Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -supports-color -5.5.0 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) +@solana/codecs-core +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -supports-color -7.1.0 -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) +@solana/codecs-numbers +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -supports-preserve-symlinks-flag -1.0.0 -MIT License - -Copyright (c) 2022 Inspect JS +@solana/codecs-strings +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -tar-stream -3.1.7 -The MIT License (MIT) +@solana/errors +2.0.0-rc.4 +Copyright (c) 2023 Solana Labs, Inc -Copyright (c) 2014 Mathias Buus +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. ****************************** -text-encoding-utf-8 -1.0.2 -The encoding indexes, algorithms, and many comments in the code -derive from the Encoding Standard https://encoding.spec.whatwg.org/ - -Otherwise... - -This is free and unencumbered software released into the public domain. +@solana/web3.js +1.95.8 +Copyright (c) 2023 Solana Labs, Inc -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -thenify -3.3.1 - -The MIT License (MIT) +space-separated-tokens +1.1.5 +(The MIT License) -Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and contributors +Copyright (c) 2016 Titus Wormer -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -thenify-all -1.6.0 +sprintf-js +1.1.3 +Copyright (c) 2007-present, Alexandru Mărășteanu +All rights reserved. -The MIT License (MIT) +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of this software nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. -Copyright (c) 2014 Jonathan Ong me@jongleberry.com +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +****************************** -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +@spruceid/siwe-parser +2.1.0 +license: Apache-2.0 +authors: Spruce Systems Inc. + +****************************** +@spruceid/siwe-parser +2.1.2 +license: Apache-2.0 +authors: Spruce Systems Inc. ****************************** -through -2.3.8 -Apache License, Version 2.0 +@stablelib/binary +1.0.1 +This software is licensed under the MIT license: -Copyright (c) 2011 Dominic Tarr +Copyright (C) 2016 Dmitry Chestnykh -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: - http://www.apache.org/licenses/LICENSE-2.0 +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -through2 -2.0.5 -# The MIT License (MIT) +@stablelib/int +1.0.1 +This software is licensed under the MIT license: -**Copyright (c) Rod Vagg (the "Original Author") and additional contributors** +Copyright (C) 2016 Dmitry Chestnykh -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -tiny-invariant -1.3.3 -MIT License +@stablelib/random +1.0.2 +This software is licensed under the MIT license: -Copyright (c) 2019 Alexander Reardon +Copyright (C) 2016 Dmitry Chestnykh -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -27850,20 +26978,21 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ****************************** -tiny-secp256k1 -1.1.6 -MIT License +@stablelib/wipe +1.0.1 +This software is licensed under the MIT license: -Copyright (c) 2018 bitcoinjs contributors +Copyright (C) 2016 Dmitry Chestnykh -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -27879,11 +27008,11 @@ SOFTWARE. ****************************** -tiny-warning -1.0.3 +stop-iteration-iterator +1.0.0 MIT License -Copyright (c) 2019 Alexander Reardon +Copyright (c) 2023 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27903,561 +27032,917 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************** - -to-data-view -1.1.0 -license: MIT -authors: undefined ****************************** -to-fast-properties -2.0.0 +stream-browserify +3.0.0 MIT License -Copyright (c) 2014 Petka Antonov - 2015 Sindre Sorhus +Copyright (c) James Halliday -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -toggle-selection -1.0.6 -license: MIT -authors: sudodoki (sudodoki.name) +stream-splicer +2.0.0 +This software is released under the MIT license: -****************************** +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -tr46 -0.0.3 -license: MIT -authors: Sebastian Mayr +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -****************************** +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@trezor/analytics -1.0.16 <> -license: Custom: https://data.trezor.io -authors: undefined ****************************** -@trezor/blockchain-link -2.1.28 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) - -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. - -## 1. Definitions +streamx +2.15.1 +The MIT License (MIT) -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +Copyright (c) 2019 Mathias Buus -"You" means the licensee of the software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -"Your company" means the company you worked for when you downloaded the -software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. -## 2. Grant of Rights +****************************** -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +string_decoder +1.1.1 +Node.js is licensed for use as follows: -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +""" +Copyright Node.js contributors. All rights reserved. -## 3. Limitations +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -****************************** +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -@trezor/blockchain-link-types -1.0.15 <> -license: UNKNOWN -authors: undefined +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" -****************************** -@trezor/blockchain-link-utils -1.0.16 <> -license: UNKNOWN -authors: undefined ****************************** -@trezor/connect -9.2.2 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +string_decoder +1.3.0 +Node.js is licensed for use as follows: -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +""" +Copyright Node.js contributors. All rights reserved. -## 1. Definitions +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -"You" means the licensee of the software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" -"Your company" means the company you worked for when you downloaded the -software. +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -## 2. Grant of Rights +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. -## 3. Limitations +****************************** -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +string-width +4.2.3 +MIT License -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +Copyright (c) Sindre Sorhus (sindresorhus.com) -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -****************************** +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@trezor/connect-analytics -1.0.14 <> -license: UNKNOWN -authors: undefined ****************************** -@trezor/connect-common -0.0.31 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +strip-ansi +6.0.1 +MIT License -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +Copyright (c) Sindre Sorhus (sindresorhus.com) -## 1. Definitions +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -"You" means the licensee of the software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -"Your company" means the company you worked for when you downloaded the -software. -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +****************************** -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +strip-hex-prefix +1.0.0 +The MIT License -## 2. Grant of Rights +Copyright (c) 2016 Nick Dodson. nickdodson.com -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -## 3. Limitations +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +****************************** -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +strnum +1.0.5 +MIT License +Copyright (c) 2021 Natural Intelligence + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -****************************** +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -@trezor/connect-plugin-ethereum -9.0.3 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. -## 1. Definitions +****************************** -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +style-to-object +0.3.0 +The MIT License (MIT) -"You" means the licensee of the software. +Copyright (c) 2017 Menglin "Mark" Xu -"Your company" means the company you worked for when you downloaded the -software. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## 2. Grant of Rights -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +****************************** -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +superstruct +2.0.2 +The MIT License -## 3. Limitations +Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com) -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@trezor/connect-web -9.2.2 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +supports-color +5.5.0 +MIT License -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +Copyright (c) Sindre Sorhus (sindresorhus.com) -## 1. Definitions +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -"You" means the licensee of the software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -"Your company" means the company you worked for when you downloaded the -software. -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +****************************** -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +supports-color +7.1.0 +MIT License -## 2. Grant of Rights +Copyright (c) Sindre Sorhus (sindresorhus.com) -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -## 3. Limitations +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +****************************** -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +supports-preserve-symlinks-flag +1.0.0 +MIT License +Copyright (c) 2022 Inspect JS -****************************** +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -@trezor/env-utils -1.0.15 -license: UNKNOWN -authors: undefined +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -****************************** +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -@trezor/protobuf -1.0.11 -license: UNKNOWN -authors: undefined ****************************** -@trezor/protocol -1.0.7 -license: UNKNOWN -authors: undefined - -****************************** +@swc/core +1.4.11 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -@trezor/schema-utils -1.0.3 <> -license: Custom: https://github.com/sinclairzx81/typebox -authors: undefined +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -****************************** +1. Definitions. -@trezor/transport -1.1.27 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +END OF TERMS AND CONDITIONS -## 1. Definitions +APPENDIX: How to apply the Apache License to your work. -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -"You" means the licensee of the software. +Copyright [yyyy] [name of copyright owner] -"Your company" means the company you worked for when you downloaded the -software. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. + http://www.apache.org/licenses/LICENSE-2.0 -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -## 2. Grant of Rights +****************************** -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +@swc/core-linux-x64-gnu +1.4.11 +license: Apache-2.0 AND MIT +authors: 강동윤 -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +****************************** -## 3. Limitations +@swc/counter +0.1.3 +license: Apache-2.0 +authors: 강동윤 -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +****************************** -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +@swc/types +0.1.12 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +1. Definitions. -****************************** + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -@trezor/type-utils -1.0.5 <> -license: UNKNOWN -authors: undefined +END OF TERMS AND CONDITIONS -****************************** +APPENDIX: How to apply the Apache License to your work. -@trezor/utils -9.0.23 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +Copyright [yyyy] [name of copyright owner] -## 1. Definitions +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. + http://www.apache.org/licenses/LICENSE-2.0 -"You" means the licensee of the software. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -"Your company" means the company you worked for when you downloaded the -software. +****************************** -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +tar-stream +3.1.7 +The MIT License (MIT) -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. +Copyright (c) 2014 Mathias Buus -## 2. Grant of Rights +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -## 3. Limitations +****************************** -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +text-encoding-utf-8 +1.0.2 +The encoding indexes, algorithms, and many comments in the code +derive from the Encoding Standard https://encoding.spec.whatwg.org/ -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +Otherwise... -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. -****************************** +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. -@trezor/utxo-lib -2.0.8 -# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +For more information, please refer to -## 1. Definitions -The terms "reproduce," "reproduction" and "distribution" have the same meaning -here as under U.S. copyright law. +****************************** -"You" means the licensee of the software. +through +2.3.8 +Apache License, Version 2.0 -"Your company" means the company you worked for when you downloaded the -software. +Copyright (c) 2011 Dominic Tarr -"Reference use" means use of the software within your company as a reference, -in read only form, for the sole purposes of debugging your products, -maintaining your products, or enhancing the interoperability of your products -with the software, and specifically excludes the right to distribute the -software outside of your company. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -"Licensed patents" means any Licensor patent claims which read directly on the -software as distributed by the Licensor under this license. + http://www.apache.org/licenses/LICENSE-2.0 -## 2. Grant of Rights +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -(A) Copyright Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free copyright -license to reproduce the software for reference use. -(B) Patent Grant - Subject to the terms of this license, the Licensor grants -you a non-transferable, non-exclusive, worldwide, royalty-free patent license -under licensed patents for reference use. +****************************** -## 3. Limitations +tiny-invariant +1.3.3 +MIT License -(A) No Trademark License - This license does not grant you any rights to use -the Licensor's name, logo, or trademarks. +Copyright (c) 2019 Alexander Reardon -(B) If you begin patent litigation against the Licensor over patents that you -think may apply to the software (including a cross-claim or counterclaim in -a lawsuit), your license to the software ends automatically. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -(C) The software is licensed "as-is." You bear the risk of using it. The -Licensor gives no express warranties, guarantees or conditions. You may have -additional consumer rights under your local laws which this license cannot -change. To the extent permitted under your local laws, the Licensor excludes -the implied warranties of merchantability, fitness for a particular purpose and -non-infringement. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -trough -1.0.1 -(The MIT License) +tiny-secp256k1 +1.1.6 +MIT License -Copyright (c) 2016 Titus Wormer +Copyright (c) 2018 bitcoinjs contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28466,25 +27951,25 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -ts-custom-error -3.3.1 -The MIT License +tiny-warning +1.0.3 +MIT License -Copyright (c) 2019 Adrien Gibrat https://github.com/adriengibrat +Copyright (c) 2019 Alexander Reardon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -28493,879 +27978,781 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +****************************** + +to-data-view +1.1.0 +license: MIT +authors: undefined ****************************** -ts-interface-checker -0.1.13 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +toggle-selection +1.0.6 +license: MIT +authors: sudodoki (sudodoki.name) - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +****************************** - 1. Definitions. +tr46 +0.0.3 +license: MIT +authors: Sebastian Mayr - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +****************************** - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +@trezor/analytics +1.2.0 <> +license: Custom: https://data.trezor.io +authors: undefined - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +****************************** - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +@trezor/blockchain-link +2.3.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +## 1. Definitions - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +"You" means the licensee of the software. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +"Your company" means the company you worked for when you downloaded the +software. + +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. + +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +## 2. Grant of Rights - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +## 3. Limitations - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +****************************** - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +@trezor/blockchain-link-types +1.2.0 <> +license: UNKNOWN +authors: undefined - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +****************************** - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +@trezor/blockchain-link-utils +1.2.0 <> +license: UNKNOWN +authors: undefined - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +****************************** - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +@trezor/connect +9.4.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) - END OF TERMS AND CONDITIONS +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. - APPENDIX: How to apply the Apache License to your work. +## 1. Definitions - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. - Copyright {yyyy} {name of copyright owner} +"You" means the licensee of the software. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +"Your company" means the company you worked for when you downloaded the +software. - http://www.apache.org/licenses/LICENSE-2.0 +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. +## 2. Grant of Rights -****************************** +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. -tslib -1.14.1 -Copyright (c) Microsoft Corporation. +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. +## 3. Limitations -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. -****************************** +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. -tslib -2.6.2 -Copyright (c) Microsoft Corporation. +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +****************************** + +@trezor/connect-analytics +1.2.0 <> +license: UNKNOWN +authors: undefined ****************************** -ts-mixer -6.0.4 -MIT License +@trezor/connect-common +0.2.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) -Copyright (c) 2024 Tanner Nielsen +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +## 1. Definitions -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +"You" means the licensee of the software. + +"Your company" means the company you worked for when you downloaded the +software. + +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. + +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. +## 2. Grant of Rights -****************************** +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. -tweetnacl -1.0.3 -This is free and unencumbered software released into the public domain. +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +## 3. Limitations -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. -For more information, please refer to +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. ****************************** -tweetnacl-util -0.15.1 -This is free and unencumbered software released into the public domain. +@trezor/connect-plugin-ethereum +9.0.3 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. +## 1. Definitions -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. -For more information, please refer to +"You" means the licensee of the software. +"Your company" means the company you worked for when you downloaded the +software. -****************************** +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. -typedarray -0.0.6 -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2012, Joshua Bell +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +## 2. Grant of Rights - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - $/LicenseInfo$ - */ +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill +## 3. Limitations -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. -****************************** +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. -type-fest -0.20.2 -MIT License -Copyright (c) Sindre Sorhus (https:/sindresorhus.com) +****************************** -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +@trezor/connect-web +9.4.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## 1. Definitions +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. -****************************** +"You" means the licensee of the software. -type-fest -4.15.0 -license: (MIT OR CC0-1.0) -authors: Sindre Sorhus +"Your company" means the company you worked for when you downloaded the +software. -****************************** +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. -typeforce -1.18.0 -MIT License +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. -Copyright (c) 2018 Daniel Cousens +## 2. Grant of Rights -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +## 3. Limitations +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. -****************************** +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. -@types/bn.js -5.1.5 - MIT License +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. - Copyright (c) Microsoft Corporation. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +****************************** - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +@trezor/env-utils +1.2.0 +license: UNKNOWN +authors: undefined - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +****************************** +@trezor/protobuf +1.2.0 +license: Custom: https://github.com/trezor/trezor-firmware/tree/main/common/protob +authors: undefined ****************************** -@types/color-name -1.1.1 - MIT License +@trezor/protocol +1.2.0 +license: UNKNOWN +authors: undefined - Copyright (c) Microsoft Corporation. All rights reserved. +****************************** - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +@trezor/schema-utils +1.2.0 <> +license: Custom: https://github.com/sinclairzx81/typebox +authors: undefined - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +****************************** - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +@trezor/transport +1.3.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. -****************************** +## 1. Definitions -@types/connect -3.4.38 - MIT License +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. - Copyright (c) Microsoft Corporation. +"You" means the licensee of the software. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +"Your company" means the company you worked for when you downloaded the +software. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. +## 2. Grant of Rights -****************************** +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. -@types/debug -4.1.7 - MIT License +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. - Copyright (c) Microsoft Corporation. +## 3. Limitations - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. ****************************** -@types/deep-freeze-strict -1.1.0 -license: MIT -authors: Mohamed Hegazy +@trezor/type-utils +1.1.0 <> +license: UNKNOWN +authors: undefined ****************************** -@types/hast -2.3.1 - MIT License +@trezor/utils +9.2.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) - Copyright (c) Microsoft Corporation. +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +## 1. Definitions - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +"You" means the licensee of the software. +"Your company" means the company you worked for when you downloaded the +software. -****************************** +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. -@types/jsonwebtoken -9.0.2 - MIT License +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. - Copyright (c) Microsoft Corporation. +## 2. Grant of Rights - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +## 3. Limitations + +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. + +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. + +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. ****************************** -@types/lodash -4.14.184 - MIT License +@trezor/utxo-lib +2.2.0 +# TREZOR REFERENCE SOURCE LICENSE (T-RSL) - Copyright (c) Microsoft Corporation. +This license governs use of the accompanying software. If you use the software, +you accept this license. If you do not accept the license, do not use the +software. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +## 1. Definitions - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The terms "reproduce," "reproduction" and "distribution" have the same meaning +here as under U.S. copyright law. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +"You" means the licensee of the software. + +"Your company" means the company you worked for when you downloaded the +software. +"Reference use" means use of the software within your company as a reference, +in read only form, for the sole purposes of debugging your products, +maintaining your products, or enhancing the interoperability of your products +with the software, and specifically excludes the right to distribute the +software outside of your company. -****************************** +"Licensed patents" means any Licensor patent claims which read directly on the +software as distributed by the Licensor under this license. -@types/mdast -3.0.10 - MIT License +## 2. Grant of Rights - Copyright (c) Microsoft Corporation. +(A) Copyright Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free copyright +license to reproduce the software for reference use. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +(B) Patent Grant - Subject to the terms of this license, the Licensor grants +you a non-transferable, non-exclusive, worldwide, royalty-free patent license +under licensed patents for reference use. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +## 3. Limitations - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +(A) No Trademark License - This license does not grant you any rights to use +the Licensor's name, logo, or trademarks. +(B) If you begin patent litigation against the Licensor over patents that you +think may apply to the software (including a cross-claim or counterclaim in +a lawsuit), your license to the software ends automatically. -****************************** +(C) The software is licensed "as-is." You bear the risk of using it. The +Licensor gives no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the Licensor excludes +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. -@types/ms -0.7.31 - MIT License - Copyright (c) Microsoft Corporation. All rights reserved. +****************************** - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +trough +1.0.1 +(The MIT License) + +Copyright (c) 2016 Titus Wormer - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -@types/node -12.20.55 - MIT License +ts-custom-error +3.3.1 +The MIT License - Copyright (c) Microsoft Corporation. +Copyright (c) 2019 Adrien Gibrat https://github.com/adriengibrat - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -@types/node -20.12.7 - MIT License +tslib +2.4.0 +Copyright (c) Microsoft Corporation. - Copyright (c) Microsoft Corporation. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +****************************** - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +tslib +2.6.2 +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. ****************************** -@types/pbkdf2 -3.1.0 - MIT License +ts-mixer +6.0.4 +MIT License - Copyright (c) Microsoft Corporation. +Copyright (c) 2024 Tanner Nielsen - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@types/prop-types -15.7.3 - MIT License +tweetnacl +1.0.3 +This is free and unencumbered software released into the public domain. - Copyright (c) Microsoft Corporation. All rights reserved. +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +For more information, please refer to ****************************** -@types/punycode -2.1.0 - MIT License +typedarray +0.0.6 +/* + Copyright (c) 2010, Linden Research, Inc. + Copyright (c) 2012, Joshua Bell - Copyright (c) Microsoft Corporation. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + $/LicenseInfo$ + */ - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +// Original can be found at: +// https://bitbucket.org/lindenlab/llsd +// Modifications by Joshua Bell inexorabletash@gmail.com +// https://github.com/inexorabletash/polyfill + +// ES3/ES5 implementation of the Krhonos Typed Array Specification +// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ +// Date: 2011-02-01 +// +// Variations: +// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) ****************************** -@types/react -16.9.53 - MIT License +type-fest +0.20.2 +MIT License - Copyright (c) Microsoft Corporation. +Copyright (c) Sindre Sorhus (https:/sindresorhus.com) - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@types/react-transition-group -4.4.6 - MIT License +typeforce +1.18.0 +MIT License - Copyright (c) Microsoft Corporation. +Copyright (c) 2018 Daniel Cousens - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@types/secp256k1 -4.0.3 +@types/bn.js +5.1.5 MIT License Copyright (c) Microsoft Corporation. @@ -29391,11 +28778,11 @@ authors: Mohamed Hegazy ****************************** -@types/unist -2.0.6 +@types/color-name +1.1.1 MIT License - Copyright (c) Microsoft Corporation. + Copyright (c) Microsoft Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29418,8 +28805,8 @@ authors: Mohamed Hegazy ****************************** -@types/uuid -8.3.0 +@types/connect +3.4.38 MIT License Copyright (c) Microsoft Corporation. @@ -29445,8 +28832,8 @@ authors: Mohamed Hegazy ****************************** -@types/uuid -9.0.8 +@types/debug +4.1.7 MIT License Copyright (c) Microsoft Corporation. @@ -29472,8 +28859,15 @@ authors: Mohamed Hegazy ****************************** -@types/w3c-web-usb -1.0.10 +@types/deep-freeze-strict +1.1.0 +license: MIT +authors: Mohamed Hegazy + +****************************** + +@types/hast +2.3.1 MIT License Copyright (c) Microsoft Corporation. @@ -29499,72 +28893,11 @@ authors: Mohamed Hegazy ****************************** -@types/web -0.0.138 -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - - -****************************** - -@types/ws -7.4.7 +@types/hoist-non-react-statics +3.3.1 MIT License - Copyright (c) Microsoft Corporation. + Copyright (c) Microsoft Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29587,681 +28920,585 @@ END OF TERMS AND CONDITIONS ****************************** -ua-parser-js -1.0.37 -MIT License - -Copyright (c) 2012-2023 Faisal Salman <> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -uint8arrays -2.1.5 -license: MIT -authors: Alex Potsides - -****************************** - -uint8arrays -3.1.1 -license: MIT -authors: Alex Potsides - -****************************** - -undici -5.28.4 -MIT License - -Copyright (c) Matteo Collina and Undici contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -undici-types -5.26.5 -license: MIT -authors: Daniele Belardi , Ethan Arrowood , Matteo Collina , Matthew Aitken , Robert Nagy , Szymon Marczak , Tomas Della Vedova - -****************************** - -unicode-confusables -0.1.1 <> -MIT License - -Copyright (c) 2020 Ty - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -****************************** - -unified -9.2.0 -(The MIT License) +@types/jsonwebtoken +9.0.2 + MIT License -Copyright (c) 2015 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-builder -2.0.3 -The MIT License (MIT) +@types/lodash +4.17.0 + MIT License -Copyright (c) 2015 Eugene Sharygin + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-generated -1.1.6 -(The MIT License) +@types/mdast +3.0.10 + MIT License -Copyright (c) 2016 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-is -4.0.2 -(The MIT license) +@types/ms +0.7.31 + MIT License -Copyright (c) 2015 Titus Wormer + Copyright (c) Microsoft Corporation. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-position -3.1.0 -(The MIT License) +@types/node +12.20.55 + MIT License -Copyright (c) 2015 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-stringify-position -2.0.1 -(The MIT License) +@types/node +18.15.13 + MIT License -Copyright (c) 2016 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-visit -2.0.3 -(The MIT License) +@types/node +20.16.11 + MIT License -Copyright (c) 2015 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -unist-util-visit-parents -3.1.0 -(The MIT License) +@types/pbkdf2 +3.1.0 + MIT License -Copyright (c) 2016 Titus Wormer + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -update-browserslist-db -1.0.13 -The MIT License (MIT) +@types/prop-types +15.7.3 + MIT License -Copyright 2022 Andrey Sitnik and other contributors + Copyright (c) Microsoft Corporation. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -uri-js -4.4.1 -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +@types/punycode +2.1.0 + MIT License -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Copyright (c) Microsoft Corporation. All rights reserved. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -usb -2.12.0 -Copyright (c) 2012 Nonolith Labs, LLC +@types/react +16.9.53 + MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + Copyright (c) Microsoft Corporation. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -use-callback-ref -1.3.0 -MIT License +@types/react-redux +7.1.33 + MIT License -Copyright (c) 2017 Anton Korzunov + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -use-memo-one -1.1.3 -MIT License +@types/react-transition-group +4.4.6 + MIT License -Copyright (c) 2019 Alexander Reardon + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ****************************** -use-sidecar -1.1.2 -MIT License +@types/secp256k1 +4.0.3 + MIT License -Copyright (c) 2017 Anton Korzunov + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -utf8 -3.0.0 -Copyright Mathias Bynens +@types/unist +2.0.6 + MIT License -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -utf-8-validate -5.0.10 -This project is licensed for use as follows: +@types/uuid +8.3.0 + MIT License -""" -Copyright (c) 2011 Einar Otto Stangvik (http://2x.io) + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -""" + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE -This license applies to parts originating from -https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c: -""" -Markus Kuhn -- 2005-03-30 -License: http://www.cl.cam.ac.uk/~mgk25/short-license.html -""" +****************************** +@types/uuid +9.0.8 + MIT License -****************************** + Copyright (c) Microsoft Corporation. -util -0.12.5 -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -util-deprecate -1.0.2 -(The MIT License) +@types/w3c-web-usb +1.0.10 + MIT License -Copyright (c) 2014 Nathan Rajlich + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -uuid -7.0.3 -The MIT License (MIT) +@types/web +0.0.138 +Apache License -Copyright (c) 2010-2016 Robert Kieffer and other contributors +Version 2.0, January 2004 -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +http://www.apache.org/licenses/ -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -****************************** +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -uuid -8.3.2 -The MIT License (MIT) +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -Copyright (c) 2010-2020 Robert Kieffer and other contributors +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -****************************** +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -uuid -9.0.1 -The MIT License (MIT) +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -Copyright (c) 2010-2020 Robert Kieffer and other contributors +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and -****************************** +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -validate-npm-package-name -5.0.0 -Copyright (c) 2015, npm, Inc +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS ****************************** -valid-url -1.0.9 -Copyright (c) 2013 Odysseas Tsatalos and oDesk Corporation +@types/ws +7.4.7 + MIT License -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Copyright (c) Microsoft Corporation. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE ****************************** -value-equal -1.0.1 +ua-parser-js +1.0.37 MIT License -Copyright (c) Michael Jackson 2016-2018 +Copyright (c) 2012-2023 Faisal Salman <> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30284,28 +29521,25 @@ SOFTWARE. ****************************** -varint -5.0.2 +uint8arrays +2.1.5 license: MIT -authors: Chris Dickinson +authors: Alex Potsides ****************************** -varint -6.0.0 +uint8arrays +3.1.1 license: MIT -authors: Chris Dickinson +authors: Alex Potsides ****************************** -varuint-bitcoin -1.1.2 -The MIT License (MIT) - -Copyright (c) 2016 Kirill Fomichev +undici +5.28.4 +MIT License -Parts of this software are based on https://github.com/mappum/bitcoin-protocol -Copyright (c) 2016 Matt Bell +Copyright (c) Matteo Collina and Undici contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30314,25 +29548,25 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -vfile -4.0.1 -(The MIT License) +undici-types +6.19.8 +MIT License -Copyright (c) 2015 Titus Wormer +Copyright (c) Matteo Collina and Undici contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30341,90 +29575,25 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -****************************** - -vfile-message -2.0.1 -(The MIT License) - -Copyright (c) 2017 Titus Wormer - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -warning -3.0.0 -BSD License - -For React software - -Copyright (c) 2013-2015, Facebook, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -warning -4.0.3 +unicode-confusables +0.1.1 <> MIT License -Copyright (c) 2013-present, Facebook, Inc. +Copyright (c) 2020 Ty Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -30447,845 +29616,650 @@ SOFTWARE. ****************************** -web3-stream-provider -5.0.0 -license: ISC -authors: kumavis - -****************************** - -web-encoding -1.1.5 <> -license: MIT -authors: Irakli Gozalishvili - -****************************** - -webextension-polyfill -0.10.0 -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. +unified +9.2.0 +(The MIT License) -2.2. Effective Date +Copyright (c) 2015 Titus Wormer -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -2.3. Limitations on Grant Scope +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -(a) for any code that a Contributor has removed from Covered Software; - or -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or +****************************** -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. +unist-builder +2.0.3 +The MIT License (MIT) -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). +Copyright (c) 2015 Eugene Sharygin -2.4. Subsequent Licenses +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -2.5. Representation +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. -2.6. Fair Use +****************************** -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. +unist-util-generated +1.1.6 +(The MIT License) -2.7. Conditions +Copyright (c) 2016 Titus Wormer -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -3. Responsibilities -------------------- +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -3.1. Distribution of Source Form +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. -3.2. Distribution of Executable Form +****************************** -If You distribute Covered Software in Executable Form then: +unist-util-is +4.0.2 +(The MIT license) -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and +Copyright (c) 2015 Titus Wormer -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -3.3. Distribution of a Larger Work +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -3.4. Notices -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. +****************************** -3.5. Application of Additional Terms +unist-util-position +3.1.0 +(The MIT License) -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. +Copyright (c) 2015 Titus Wormer -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -5. Termination --------------- +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. +****************************** -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. +unist-util-stringify-position +2.0.1 +(The MIT License) -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ +Copyright (c) 2016 Titus Wormer -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -8. Litigation -------------- +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -9. Miscellaneous ----------------- -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. +****************************** -10. Versions of the License ---------------------------- +unist-util-visit +2.0.3 +(The MIT License) -10.1. New Versions +Copyright (c) 2015 Titus Wormer -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -10.2. Effect of New Versions +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -10.3. Modified Versions -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). +****************************** -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses +unist-util-visit-parents +3.1.0 +(The MIT License) -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. +Copyright (c) 2016 Titus Wormer -Exhibit A - Source Code Form License Notice -------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -You may add additional accurate notices of copyright ownership. -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- +****************************** - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. +update-browserslist-db +1.1.1 +The MIT License (MIT) +Copyright 2022 Andrey Sitnik and other contributors -****************************** +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -webextension-polyfill -0.8.0 -Mozilla Public License Version 2.0 -================================== +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -1. Definitions --------------- +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. +****************************** -1.3. "Contribution" - means Covered Software of a particular Contributor. +uri-js +4.4.1 +Copyright 2011 Gary Court. All rights reserved. -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1.5. "Incompatible With Secondary Licenses" - means +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. +THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -1.6. "Executable Form" - means any form of the work other than Source Code Form. +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. -1.8. "License" - means this document. +****************************** -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. +usb +2.12.0 +Copyright (c) 2012 Nonolith Labs, LLC -1.10. "Modifications" - means any of the following: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - (b) any new file in Source Code Form that contains any Covered - Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. +****************************** -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. +use-callback-ref +1.3.0 +MIT License -1.13. "Source Code Form" - means the form of the work preferred for making modifications. +Copyright (c) 2017 Anton Korzunov -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -2. License Grants and Conditions --------------------------------- +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -2.1. Grants +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and +****************************** -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. +use-memo-one +1.1.3 +MIT License -2.2. Effective Date +Copyright (c) 2019 Alexander Reardon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -2.3. Limitations on Grant Scope +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: +****************************** -(a) for any code that a Contributor has removed from Covered Software; - or +use-sidecar +1.1.2 +MIT License -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or +Copyright (c) 2017 Anton Korzunov -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -2.4. Subsequent Licenses +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). -2.5. Representation +****************************** -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. +utf8 +3.0.0 +Copyright Mathias Bynens -2.6. Fair Use +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -2.7. Conditions +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. -3. Responsibilities -------------------- +****************************** -3.1. Distribution of Source Form +utf-8-validate +5.0.10 +This project is licensed for use as follows: -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. +""" +Copyright (c) 2011 Einar Otto Stangvik (http://2x.io) -3.2. Distribution of Executable Form +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -If You distribute Covered Software in Executable Form then: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. +This license applies to parts originating from +https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c: -3.3. Distribution of a Larger Work +""" +Markus Kuhn -- 2005-03-30 +License: http://www.cl.cam.ac.uk/~mgk25/short-license.html +""" -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). -3.4. Notices +****************************** -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. +util +0.12.5 +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -3.5. Application of Additional Terms +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. +****************************** -5. Termination --------------- +util-deprecate +1.0.2 +(The MIT License) -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. +Copyright (c) 2014 Nathan Rajlich -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ -8. Litigation -------------- +****************************** -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. +utility-types +3.11.0 +MIT License -9. Miscellaneous ----------------- +Copyright (c) 2016 Piotr Witek (http://piotrwitek.github.io) -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -10. Versions of the License ---------------------------- +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -10.1. New Versions +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. -10.2. Effect of New Versions +****************************** -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. +uuid +8.3.2 +The MIT License (MIT) -10.3. Modified Versions +Copyright (c) 2010-2020 Robert Kieffer and other contributors -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Exhibit A - Source Code Form License Notice -------------------------------------------- - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. +****************************** -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. +uuid +9.0.1 +The MIT License (MIT) -You may add additional accurate notices of copyright ownership. +Copyright (c) 2010-2020 Robert Kieffer and other contributors -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -webidl-conversions -3.0.1 -# The BSD 2-Clause License +validate-npm-package-name +5.0.0 +Copyright (c) 2015, npm, Inc -Copyright (c) 2014, Domenic Denicola -All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +****************************** + +valid-url +1.0.9 +Copyright (c) 2013 Odysseas Tsatalos and oDesk Corporation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -websocket-driver -0.7.0 -# The MIT License +value-equal +1.0.1 +MIT License -Copyright (c) 2010-2017 James Coglan +Copyright (c) Michael Jackson 2016-2018 -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the 'Software'), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -websocket-extensions -0.1.4 -Copyright 2014-2020 James Coglan +varint +5.0.2 +license: MIT +authors: Chris Dickinson -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at +****************************** - http://www.apache.org/licenses/LICENSE-2.0 +varint +6.0.0 +license: MIT +authors: Chris Dickinson -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. +****************************** + +varuint-bitcoin +1.1.2 +The MIT License (MIT) + +Copyright (c) 2016 Kirill Fomichev + +Parts of this software are based on https://github.com/mappum/bitcoin-protocol +Copyright (c) 2016 Matt Bell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -whatwg-url -5.0.0 -The MIT License (MIT) +vfile +4.0.1 +(The MIT License) -Copyright (c) 2015–2016 Sebastian Mayr +Copyright (c) 2015 Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31308,32 +30282,76 @@ THE SOFTWARE. ****************************** -which -2.0.2 -The ISC License +vfile-message +2.0.1 +(The MIT License) + +Copyright (c) 2017 Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +****************************** + +warning +3.0.0 +BSD License -Copyright (c) Isaac Z. Schlueter and Contributors +For React software -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Copyright (c) 2013-2015, Facebook, Inc. +All rights reserved. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************** -which-boxed-primitive -1.0.2 +warning +4.0.3 MIT License -Copyright (c) 2019 Jordan Harband +Copyright (c) 2013-present, Facebook, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31356,522 +30374,539 @@ SOFTWARE. ****************************** -which-collection -1.0.1 -MIT License +web3-stream-provider +5.0.0 +license: ISC +authors: kumavis -Copyright (c) 2019 Inspect JS +****************************** -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +web-encoding +1.1.5 <> +license: MIT +authors: Irakli Gozalishvili -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +****************************** -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +webextension-polyfill +0.12.0 +Mozilla Public License Version 2.0 +================================== +1. Definitions +-------------- -****************************** +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. -which-typed-array -1.1.9 -The MIT License (MIT) +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. -Copyright (c) 2015 Jordan Harband +1.3. "Contribution" + means Covered Software of a particular Contributor. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1.5. "Incompatible With Secondary Licenses" + means -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. +1.8. "License" + means this document. -****************************** +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. -wif -4.0.0 -The MIT License (MIT) +1.10. "Modifications" + means any of the following: -Copyright (c) 2015 Daniel Cousens + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + (b) any new file in Source Code Form that contains any Covered + Software. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. +1.13. "Source Code Form" + means the form of the work preferred for making modifications. -****************************** +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. -wrap-ansi -7.0.0 -MIT License +2. License Grants and Conditions +-------------------------------- -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +2.1. Grants -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. +2.2. Effective Date -****************************** +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. -wrap-ansi -8.1.0 -MIT License +2.3. Limitations on Grant Scope -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +(a) for any code that a Contributor has removed from Covered Software; + or -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). -****************************** +2.4. Subsequent Licenses -wrappy -1.0.2 -The ISC License +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). -Copyright (c) Isaac Z. Schlueter and Contributors +2.5. Representation -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. +2.7. Conditions -****************************** +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. -write-file-atomic -2.4.3 -Copyright (c) 2015, Rebecca Turner +3. Responsibilities +------------------- -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +3.1. Distribution of Source Form -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. +3.2. Distribution of Executable Form +If You distribute Covered Software in Executable Form then: -****************************** +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and -ws -7.4.6 -The MIT License (MIT) +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. -Copyright (c) 2011 Einar Otto Stangvik +3.3. Distribution of a Larger Work -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +3.4. Notices -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. +3.5. Application of Additional Terms -****************************** +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. -ws -7.5.9 -The MIT License (MIT) +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- -Copyright (c) 2011 Einar Otto Stangvik +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +5. Termination +-------------- -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. -****************************** +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ -ws -8.16.0 -Copyright (c) 2011 Einar Otto Stangvik -Copyright (c) 2013 Arnout Kazemier and contributors -Copyright (c) 2016 Luigi Pinca and contributors +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +8. Litigation +------------- -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +9. Miscellaneous +---------------- +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. -****************************** +10. Versions of the License +--------------------------- -xcode -3.0.1 +10.1. New Versions - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +10.2. Effect of New Versions - 1. Definitions. +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +10.3. Modified Versions - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +Exhibit A - Source Code Form License Notice +------------------------------------------- - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +You may add additional accurate notices of copyright ownership. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +****************************** - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +webidl-conversions +3.0.1 +# The BSD 2-Clause License - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +Copyright (c) 2014, Domenic Denicola +All rights reserved. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +****************************** - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +websocket-driver +0.7.4 +Copyright 2010-2020 James Coglan - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + http://www.apache.org/licenses/LICENSE-2.0 - END OF TERMS AND CONDITIONS +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. - APPENDIX: How to apply the Apache License to your work. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +****************************** - Copyright [yyyy] [name of copyright owner] +websocket-extensions +0.1.4 +Copyright 2014-2020 James Coglan - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. ****************************** -xhr2 -0.2.1 -Copyright (c) 2013 Victor Costan +whatwg-url +5.0.0 +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: +Copyright (c) 2015–2016 Sebastian Mayr -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ****************************** -xml -1.0.1 -(The MIT License) - -Copyright (c) 2011-2016 Dylan Greene - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +which-boxed-primitive +1.0.2 +MIT License -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Copyright (c) 2019 Jordan Harband -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -xml2js -0.6.0 -Copyright 2010, 2011, 2012, 2013. All rights reserved. +which-collection +1.0.1 +MIT License + +Copyright (c) 2019 Inspect JS Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -xmlbuilder -11.0.1 +which-typed-array +1.1.15 The MIT License (MIT) -Copyright (c) 2013 Ozgur Ozcitak +Copyright (c) 2015 Jordan Harband Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31880,25 +30915,26 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ****************************** -xmlbuilder -14.0.0 +wif +4.0.0 The MIT License (MIT) -Copyright (c) 2013 Ozgur Ozcitak +Copyright (c) 2015 Daniel Cousens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31907,25 +30943,61 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +wrap-ansi +7.0.0 +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +****************************** + +wrappy +1.0.2 +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************** -xmlbuilder -15.1.1 +ws +7.5.10 The MIT License (MIT) -Copyright (c) 2013 Ozgur Ozcitak +Copyright (c) 2011 Einar Otto Stangvik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -31934,44 +31006,121 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ****************************** -@xmldom/xmldom -0.7.13 -Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors -Copyright 2012 - 2017 @jindw and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors +ws +8.17.1 +Copyright (c) 2011 Einar Otto Stangvik +Copyright (c) 2013 Arnout Kazemier and contributors +Copyright (c) 2016 Luigi Pinca and contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +****************************** + +ws +8.18.0 +Copyright (c) 2011 Einar Otto Stangvik +Copyright (c) 2013 Arnout Kazemier and contributors +Copyright (c) 2016 Luigi Pinca and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** -@xmldom/xmldom -0.8.10 -Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors -Copyright 2012 - 2017 @jindw and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors +xhr2 +0.2.1 +Copyright (c) 2013 Victor Costan -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +****************************** + +xml +1.0.1 +(The MIT License) + +Copyright (c) 2011-2016 Dylan Greene + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************** @@ -32068,27 +31217,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -yallist -4.0.0 -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ****************************** yargs @@ -32136,48 +31264,6 @@ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -****************************** - -yocto-queue -0.1.0 -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -****************************** - -zod -3.22.4 -MIT License - -Copyright (c) 2020 Colin McDonnell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ****************************** zxcvbn From b5f4ce18f7a5028ae35dd777615cf1cda6a25dcb Mon Sep 17 00:00:00 2001 From: infiniteflower <139582705+infiniteflower@users.noreply.github.com> Date: Fri, 10 Jan 2025 05:36:03 +0900 Subject: [PATCH 22/65] cherrypick fix: xchain linea bugs (#29409) (#29511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29409?quickstart=1) This PR cherry picks [481505f](https://github.com/MetaMask/metamask-extension/commit/481505f692bccd7bb2f4f78d0f40d4b7c1799b13) into 12.10.0 RC. This fixes the bug: https://github.com/MetaMask/metamask-extension/issues/29591 This PR fixes a couple of issues and does the following: 1. Shows a loading spinner on the Bridge button after submitting 2. Does not wait 5 sec to submit a bridge tx on Linea if there is no approval tx ## **Related issues** Fixes: ## **Manual testing steps** Gas token 1. Start a bridge from Linea to any chain for ETH 3. Observe that you are redirected to Activity page almost instantly ERC20 1. Start a bridge from Linea to any chain for an ERC20 2. Observe that a loading spinner shows on the button 4. Observe you are redirected to Activity page after 5 sec ## **Screenshots/Recordings** ### **Before** ### **After** https://github.com/user-attachments/assets/24445f52-ddaf-4d08-b3ce-755c10b3f976 https://github.com/user-attachments/assets/ae93204d-80f6-4beb-aff5-b8274e4541e7 ## **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/main/.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/main/.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. ## **Description** [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29511?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts | 3 ++- ui/pages/bridge/prepare/bridge-cta-button.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts index 6f8ec559a6a5..eb9cd3c440d8 100644 --- a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts +++ b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts @@ -90,7 +90,8 @@ export default function useSubmitBridgeTransaction() { CHAIN_IDS.LINEA_GOERLI, CHAIN_IDS.LINEA_SEPOLIA, ] as Hex[] - ).includes(srcChainId) + ).includes(srcChainId) && + quoteResponse?.approval ) { debugLog( 'Delaying submitting bridge tx to make Linea confirmation more likely', diff --git a/ui/pages/bridge/prepare/bridge-cta-button.tsx b/ui/pages/bridge/prepare/bridge-cta-button.tsx index 8812e26eb099..97e6c6680d9f 100644 --- a/ui/pages/bridge/prepare/bridge-cta-button.tsx +++ b/ui/pages/bridge/prepare/bridge-cta-button.tsx @@ -156,7 +156,7 @@ export const BridgeCTAButton = () => { variant={TextVariant.bodyMd} data-testid="bridge-cta-button" style={{ boxShadow: 'none' }} - onClick={() => { + onClick={async () => { if (activeQuote && isTxSubmittable && !isSubmitting) { try { // We don't need to worry about setting to false if the tx submission succeeds @@ -174,7 +174,7 @@ export const BridgeCTAButton = () => { ...tradeProperties, }, }); - submitBridgeTransaction(activeQuote); + await submitBridgeTransaction(activeQuote); } finally { setIsSubmitting(false); } From c067a247a3defb5a8db32a4c41615ab351a946a6 Mon Sep 17 00:00:00 2001 From: Marina Boboc <120041701+benjisclowder@users.noreply.github.com> Date: Fri, 10 Jan 2025 21:09:49 +0200 Subject: [PATCH 23/65] chore: V12.10.0 changelog (#29635) ## **Description** RC 12.10.0 Changelog [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29635?quickstart=1) --- CHANGELOG.md | 179 +++++++++++++++++---------------------------------- 1 file changed, 58 insertions(+), 121 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83d63cf09d2c..de3b081c4a20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,127 +7,64 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [12.10.0] -### Fixed -- chore: Master sync PR following v12.8.0 and v12.9.0 ([#28912](https://github.com/MetaMask/metamask-extension/pull/28912)) -- Merge origin/main into master-sync -- feat: add websocket support for c2 detection ([#29150](https://github.com/MetaMask/metamask-extension/pull/29150)) -- feat: Adding Skeleton component to component-library ([#29082](https://github.com/MetaMask/metamask-extension/pull/29082)) -- feat: add background-muted color to design system ([#29117](https://github.com/MetaMask/metamask-extension/pull/29117)) -- feat: routing for failed transactions ([#29158](https://github.com/MetaMask/metamask-extension/pull/29158)) -- fix: show only 6 decimals max to reduce text cutoff in activity item ([#29153](https://github.com/MetaMask/metamask-extension/pull/29153)) -- chore: disable button while submiting, use finally set submitting to … ([#29149](https://github.com/MetaMask/metamask-extension/pull/29149)) -- ci: Only check attributions on release candidates ([#29043](https://github.com/MetaMask/metamask-extension/pull/29043)) -- feat: hardware wallet confirmation screen ([#29113](https://github.com/MetaMask/metamask-extension/pull/29113)) -- chore: calc the max total gas fee as well ([#29116](https://github.com/MetaMask/metamask-extension/pull/29116)) -- refactor: Refactor how manifest flags are set ([#28686](https://github.com/MetaMask/metamask-extension/pull/28686)) -- chore: delay linea bridge tx to make it less flaky ([#29109](https://github.com/MetaMask/metamask-extension/pull/29109)) -- fix: Use correct selector to pull name from non-popular networks ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) -- feat: update bridge tx details ([#29075](https://github.com/MetaMask/metamask-extension/pull/29075)) -- feat: Remove scroll to the bottom requirement for all personal sign requests ([#29053](https://github.com/MetaMask/metamask-extension/pull/29053)) -- chore: Add App Opened Metric Event ([#28927](https://github.com/MetaMask/metamask-extension/pull/28927)) -- feat: Add new metric sending_value to Transaction * events ([#29134](https://github.com/MetaMask/metamask-extension/pull/29134)) -- test: [POM] Migrate hardware wallet e2e tests to follow Page Object Model ([#28768](https://github.com/MetaMask/metamask-extension/pull/28768)) -- fix: design related fixes in confirmation pages ([#29137](https://github.com/MetaMask/metamask-extension/pull/29137)) -- feat: Permission page tour removal ([#28966](https://github.com/MetaMask/metamask-extension/pull/28966)) -- fix: Fix in label displayed for state change in signature decoding section ([#29020](https://github.com/MetaMask/metamask-extension/pull/29020)) -- fix: Change visibility of `AmountRow` in contract interaction ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131)) -- fix: Revert gridplus sdk version bumps ([#29125](https://github.com/MetaMask/metamask-extension/pull/29125)) -- fix: solana balance on accounts selector ([#29054](https://github.com/MetaMask/metamask-extension/pull/29054)) -- feat: Add link to pending transaction alert ([#28721](https://github.com/MetaMask/metamask-extension/pull/28721)) -- fix: send up requestId for squid ([#29042](https://github.com/MetaMask/metamask-extension/pull/29042)) -- chore: Revert "feat: add websocket support for c2 detection (#28782)" ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) -- fix: (MMS-1789) bridge api called when external services disabled ([#29077](https://github.com/MetaMask/metamask-extension/pull/29077)) -- chore: add autofocus prop to AssetPicker ([#29118](https://github.com/MetaMask/metamask-extension/pull/29118)) -- fix: Specify popular network icons in token network filter ([#29112](https://github.com/MetaMask/metamask-extension/pull/29112)) -- feat: carousel component ([#28956](https://github.com/MetaMask/metamask-extension/pull/28956)) -- chore: enable multiselect in asset-picker network modal ([#28975](https://github.com/MetaMask/metamask-extension/pull/28975)) -- chore: update CODEOWNERS for bridge related code ([#29029](https://github.com/MetaMask/metamask-extension/pull/29029)) -- fix: token.icon possibly null, update validators and types ([#29065](https://github.com/MetaMask/metamask-extension/pull/29065)) -- fix: token detection across multiple networks ([#29108](https://github.com/MetaMask/metamask-extension/pull/29108)) -- feat: add websocket support for c2 detection ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782)) -- test: fix flaky confirmation E2E tests ([#29104](https://github.com/MetaMask/metamask-extension/pull/29104)) -- chore: bump {profile-sync,notification-services}-controller ([#29088](https://github.com/MetaMask/metamask-extension/pull/29088)) -- fix: SonarCloud branch information ([#29072](https://github.com/MetaMask/metamask-extension/pull/29072)) -- chore: change default network avatar style ([#28976](https://github.com/MetaMask/metamask-extension/pull/28976)) -- chore: pass the Extension Version to the Uninstall URL ([#28935](https://github.com/MetaMask/metamask-extension/pull/28935)) -- feat: log-merge-group-failure ([#28799](https://github.com/MetaMask/metamask-extension/pull/28799)) -- fix: replace hardcoded slippage + expire bridge quotes ([#29028](https://github.com/MetaMask/metamask-extension/pull/29028)) -- fix: Remove Storybook theme flex style ([#27783](https://github.com/MetaMask/metamask-extension/pull/27783)) -- refactor: Init getTokenNetworkFilter selector ([#29068](https://github.com/MetaMask/metamask-extension/pull/29068)) -- chore: emit cross-chain swaps metrics + validation error logic ([#28713](https://github.com/MetaMask/metamask-extension/pull/28713)) -- fix: fix sticky autodetection banner ([#29061](https://github.com/MetaMask/metamask-extension/pull/29061)) -- fix: incorrect cross chain swaps activity item values ([#28899](https://github.com/MetaMask/metamask-extension/pull/28899)) -- refactor: decouple extension config from bridge API feature flags ([#28983](https://github.com/MetaMask/metamask-extension/pull/28983)) -- fix: cross chain swap tx order ([#28939](https://github.com/MetaMask/metamask-extension/pull/28939)) -- feat: unified confirmation navigation ([#28761](https://github.com/MetaMask/metamask-extension/pull/28761)) -- chore: update bug template to include feature branches ([#28878](https://github.com/MetaMask/metamask-extension/pull/28878)) -- test: fix flaky send eth transaction test ([#29050](https://github.com/MetaMask/metamask-extension/pull/29050)) -- feat: Add new gas_fee_selected property on Transaction * events ([#29027](https://github.com/MetaMask/metamask-extension/pull/29027)) -- feat: upgrade transaction controller to get incoming transactions using accounts API ([#28597](https://github.com/MetaMask/metamask-extension/pull/28597)) -- fix: Copy change on NFT approve confirmation title ([#29017](https://github.com/MetaMask/metamask-extension/pull/29017)) -- feat: show banner for delayed bridge tx ([#28849](https://github.com/MetaMask/metamask-extension/pull/28849)) -- chore: hide cancel button if bridge tx ([#28902](https://github.com/MetaMask/metamask-extension/pull/28902)) -- fix: wiping txHistory on both source and dest chains ([#29000](https://github.com/MetaMask/metamask-extension/pull/29000)) -- chore: eliminate direct `cross-spawn` dependency ([#28570](https://github.com/MetaMask/metamask-extension/pull/28570)) -- feat: various profile syncing improvements ([#29022](https://github.com/MetaMask/metamask-extension/pull/29022)) -- chore: Branch off of "New Crowdin translations by Github Action" ([#29011](https://github.com/MetaMask/metamask-extension/pull/29011)) -- fix: only display `Signing in with` for SIWE ([#28984](https://github.com/MetaMask/metamask-extension/pull/28984)) -- fix: add source when local PPOM fails ([#28726](https://github.com/MetaMask/metamask-extension/pull/28726)) -- feat: bump @metamask/message-signing-snap to ^0.6.0 ([#28877](https://github.com/MetaMask/metamask-extension/pull/28877)) -- fix: Support decimal point on advanced gas modal on mac ([#28869](https://github.com/MetaMask/metamask-extension/pull/28869)) -- fix: hide first time interaction alert if internal account ([#28990](https://github.com/MetaMask/metamask-extension/pull/28990)) -- feat: Integrate JSX into snap notifications ([#27407](https://github.com/MetaMask/metamask-extension/pull/27407)) -- chore: Update signature controller ([#28988](https://github.com/MetaMask/metamask-extension/pull/28988)) -- fix: Add origin row to transfer confirmations ([#28936](https://github.com/MetaMask/metamask-extension/pull/28936)) -- chore: Renumber migration 135 to 131.1 ([#28979](https://github.com/MetaMask/metamask-extension/pull/28979)) -- feat: add B3 logo svg ([#27778](https://github.com/MetaMask/metamask-extension/pull/27778)) -- fix: Fix create metric fragment ([#28970](https://github.com/MetaMask/metamask-extension/pull/28970)) -- test: fix flaky erc20 send token e2e ([#28775](https://github.com/MetaMask/metamask-extension/pull/28775)) -- chore: bump `@metamask/account-watcher` to `^4.2.2` ([#28915](https://github.com/MetaMask/metamask-extension/pull/28915)) -- chore: bump `@metamask/ppom-validator` to `0.36.0` ([#28958](https://github.com/MetaMask/metamask-extension/pull/28958)) -- fix: remove extension from webpack config import ([#28111](https://github.com/MetaMask/metamask-extension/pull/28111)) -- chore: bump `@metamask/preferences-controller` to `15.0.1` ([#28960](https://github.com/MetaMask/metamask-extension/pull/28960)) -- feat: cross chain swap STX ([#28460](https://github.com/MetaMask/metamask-extension/pull/28460)) -- chore: Update CODEOWNERS to remove ownership from most ([#28941](https://github.com/MetaMask/metamask-extension/pull/28941)) -- fix: sanitizes the token marketplace URL ([#28898](https://github.com/MetaMask/metamask-extension/pull/28898)) -- feat: Migrate remaining e2e tests to redesigned confirmations ([#28780](https://github.com/MetaMask/metamask-extension/pull/28780)) -- chore: transfer ownership of auth & profile sync e2e to identity ([#28946](https://github.com/MetaMask/metamask-extension/pull/28946)) -- chore: adds ramp-dev-team to codeowners ([#28933](https://github.com/MetaMask/metamask-extension/pull/28933)) -- chore: Bump Snaps packages ([#28922](https://github.com/MetaMask/metamask-extension/pull/28922)) -- feat: Add 'transaction_internal_id' property on all transaction events ([#28919](https://github.com/MetaMask/metamask-extension/pull/28919)) -- fix: Capture raw 4byte hex ([#28773](https://github.com/MetaMask/metamask-extension/pull/28773)) -- test: fix flaky ppom test ([#28923](https://github.com/MetaMask/metamask-extension/pull/28923)) -- test: Add integration test for signing and submitting alert and fix b… ([#28616](https://github.com/MetaMask/metamask-extension/pull/28616)) -- test: Fixed e2e swap tests test failures ([#28913](https://github.com/MetaMask/metamask-extension/pull/28913)) -- fix: fix check for undefined marketData ([#28870](https://github.com/MetaMask/metamask-extension/pull/28870)) -- chore: Update coverage.json ([#28092](https://github.com/MetaMask/metamask-extension/pull/28092)) -- chore: Skip flaky smart-transactions.spec.ts until we determine the root cau… ([#28943](https://github.com/MetaMask/metamask-extension/pull/28943)) -- feat: Adding production URL for signature decoding ([#28918](https://github.com/MetaMask/metamask-extension/pull/28918)) -- chore: update controllers as of core release v244 ([#28905](https://github.com/MetaMask/metamask-extension/pull/28905)) -- feat: migrate `AppStateController` to inherit from BaseController V2 ([#28784](https://github.com/MetaMask/metamask-extension/pull/28784)) -- chore: change ownership of profile sync from notifications to identity ([#28901](https://github.com/MetaMask/metamask-extension/pull/28901)) -- chore: force `@solana/web3.js` version resolution ([#28926](https://github.com/MetaMask/metamask-extension/pull/28926)) -- chore: Update a mock for tests ([#28934](https://github.com/MetaMask/metamask-extension/pull/28934)) -- fix: decoding data display for ERC-1155 tokens ([#28921](https://github.com/MetaMask/metamask-extension/pull/28921)) -- fix: updated analytics preferences to be logged during onboarding ([#28897](https://github.com/MetaMask/metamask-extension/pull/28897)) -- fix: check if a user is signed in before attempting to sign them out ([#28874](https://github.com/MetaMask/metamask-extension/pull/28874)) -- feat(27256): implement remote feature flag feature ([#28684](https://github.com/MetaMask/metamask-extension/pull/28684)) -- test: [POM] improve homepage class implementation ([#28797](https://github.com/MetaMask/metamask-extension/pull/28797)) -- chore: cleanup on some names and scripts in ci ([#28844](https://github.com/MetaMask/metamask-extension/pull/28844)) -- chore: Improvements to codeowners ([#28851](https://github.com/MetaMask/metamask-extension/pull/28851)) -- ci: pin image versions used in CI so it remains deterministic ([#28779](https://github.com/MetaMask/metamask-extension/pull/28779)) -- feat: cross chain swaps - tx status - UI ([#28657](https://github.com/MetaMask/metamask-extension/pull/28657)) -- test: Allow token balance to populate after swap ([#28744](https://github.com/MetaMask/metamask-extension/pull/28744)) -- fix: optimize helper methods for signature e2e ([#28810](https://github.com/MetaMask/metamask-extension/pull/28810)) -- chore: Reduce MMI trigger machine size ([#28689](https://github.com/MetaMask/metamask-extension/pull/28689)) -- fix: Replace `AvatarAccount` with `Identicon` ([#28645](https://github.com/MetaMask/metamask-extension/pull/28645)) -- chore: Rename `develop` to `main` ([#28821](https://github.com/MetaMask/metamask-extension/pull/28821)) -- chore: accept regex expression for rerun-from-failed trigger from circle ci UI, so we can add multiple triggers following the name convention ([#28804](https://github.com/MetaMask/metamask-extension/pull/28804)) -- fix: fix asset-list e2e test ([#28822](https://github.com/MetaMask/metamask-extension/pull/28822)) -- chore: remove unused `usedNetworks` state property from `AppStateController` ([#28813](https://github.com/MetaMask/metamask-extension/pull/28813)) -- refactor: remove global network from transaction controller ([#28449](https://github.com/MetaMask/metamask-extension/pull/28449)) -- test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) -- fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) +### Added +- Added B3 network logo for improved identification ([#27778](https://github.com/MetaMask/metamask-extension/pull/27778)) +- Enabled multi-network selection and token address search in the Asset Picker ([#28975](https://github.com/MetaMask/metamask-extension/pull/28975)) +- Removed scroll-to-bottom requirement for confirming personal sign requests ([#29053](https://github.com/MetaMask/metamask-extension/pull/29053)) +- Added a hyperlink to the pending transaction alert for quick access to documentation ([#28721](https://github.com/MetaMask/metamask-extension/pull/28721)) +- Implemented unified confirmation navigation for seamless handling of multiple pending confirmations ([#28761](https://github.com/MetaMask/metamask-extension/pull/28761)) +- Upgraded transaction controller to retrieve incoming transactions via the accounts API instead of Etherscan ([#28597](https://github.com/MetaMask/metamask-extension/pull/28597)) +- Added expanded view support for Snap notifications ([#27407](https://github.com/MetaMask/metamask-extension/pull/27407)) +- Added an info message to clarify redirection when a hardware wallet user declines a transaction during the bridge process ([#29198](https://github.com/MetaMask/metamask-extension/pull/29198)) +- Implemented proper routing for failed transactions ([#29158](https://github.com/MetaMask/metamask-extension/pull/29158)) +- Added hardware wallet confirmation screen for Bridge transactions ([#29113](https://github.com/MetaMask/metamask-extension/pull/29113)) +- Added calculation for max total gas fee ([#29116](https://github.com/MetaMask/metamask-extension/pull/29116)) +- Added a banner to notify users to contact Support if a Bridge transaction is delayed ([#28849](https://github.com/MetaMask/metamask-extension/pull/28849)) +- Enhanced cross-chain swap support for Smart Transactions (STX) ([#28460](https://github.com/MetaMask/metamask-extension/pull/28460)) +- Added UI components for Bridge Transaction Details ([#28657](https://github.com/MetaMask/metamask-extension/pull/28657)) +- Introduced a carousel component on the homepage to display up to 5 banners about new changes ([#28956](https://github.com/MetaMask/metamask-extension/pull/28956)) +- [FLASK] Enabled Solana feature in Flask build with account creation support in experimental settings ([#29147](https://github.com/MetaMask/metamask-extension/pull/29147)) + +### Changed +- Redesigned cross-chain swaps UI with updated layout, styling, asset picker, advanced settings, and enhanced quote validation ([#28373](https://github.com/MetaMask/metamask-extension/pull/28373)) +- Migrated Base Mainnet RPC to Infura for improved reliability and performance ([#28974](https://github.com/MetaMask/metamask-extension/pull/28974)) +- Updated default network avatar style to a rounded square shape positioned at the bottom right of tokens ([#28976](https://github.com/MetaMask/metamask-extension/pull/28976)) +- Replaced Spinner component with Preloader component in Snaps ([#29143](https://github.com/MetaMask/metamask-extension/pull/29143)) +- Updated Swaps to redirect Bridge links to the native Bridge experience instead of the Portfolio Bridge. ([#29175](https://github.com/MetaMask/metamask-extension/pull/29175)) +- Updated Bridge carousel cards to direct users to the in-app Bridge experience instead of the Portfolio ([#29169](https://github.com/MetaMask/metamask-extension/pull/29169)) +- Disabled buttons during submission and ensured proper state reset after submission completion ([#29149](https://github.com/MetaMask/metamask-extension/pull/29149)) +- Introduced a delay for Linea bridge transactions to improve reliability and reduce flakiness ([#29109](https://github.com/MetaMask/metamask-extension/pull/29109)) +- Enhanced Bridge transaction details screen ([#29075](https://github.com/MetaMask/metamask-extension/pull/29075)) +- Removed the Cancel button for Bridge transactions in the activity list ([#28902](https://github.com/MetaMask/metamask-extension/pull/28902)) +- Removed the product tour from the Permissions Page ([#28966](https://github.com/MetaMask/metamask-extension/pull/28966)) +- [FLASK] Added support to display selected currencies for non-EVM accounts like BTC ([#28963](https://github.com/MetaMask/metamask-extension/pull/28963)) + +### Fixed +- Replaced hardcoded slippage with dynamic values and disabled transaction submission 30 seconds after final quote fetch ([#29028](https://github.com/MetaMask/metamask-extension/pull/29028)) +- Fixed fallback icon to correctly display the first letter of the network name for non-popular networks ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121)) +- Fixed token network filter to display icons and tooltips for 9 popular networks only ([#29112](https://github.com/MetaMask/metamask-extension/pull/29112)) +- Fixed token detection to display results across multiple networks when 'popular networks' filter is selected ([#29108](https://github.com/MetaMask/metamask-extension/pull/29108)) +- Fixed token list to respect the 'hide zero balance' setting for both native and ERC20 tokens across network filters ([#29058](https://github.com/MetaMask/metamask-extension/pull/29058)) +- Fixed sticky behavior of the autodetection banner and updated 'ignore all' functionality ([#29061](https://github.com/MetaMask/metamask-extension/pull/29061)) +- Fixed app crash when re-adding a network and interacting with the import token banner ([#28870](https://github.com/MetaMask/metamask-extension/pull/28870)) +- Applied design fixes to re-designed confirmation pages for improved user experience ([#29137](https://github.com/MetaMask/metamask-extension/pull/29137)) +- Fixed duplicate labels in the signature decoding section for multiple asset state changes ([#29020](https://github.com/MetaMask/metamask-extension/pull/29020)) +- Updated "Amount" Row visibility in transaction details for better clarity in contract interactions ([#3783](https://github.com/MetaMask/MetaMask-planning/issues/3783)) +- Updated NFT approve confirmation title to 'Withdrawal request' for consistency ([#29017](https://github.com/MetaMask/metamask-extension/pull/29017)) +- Increased alert severity to 'Danger' for pending Smart Transaction requests and blocked confirm button until resolved ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140)) +- Updated 'Signing in with' label to display exclusively for SIWE requests, improving clarity in signature requests ([#28984](https://github.com/MetaMask/metamask-extension/pull/28984)) +- Fixed decimal input issue on advanced gas modal for macOS and improved validation for custom nonce and gas limit inputs ([#28869](https://github.com/MetaMask/metamask-extension/pull/28869)) +- Hid the first-time interaction alert for transactions involving internal accounts ([#28990](https://github.com/MetaMask/metamask-extension/pull/28990)) +- Added an origin row and content divider to transfer confirmations, and fixed a margin issue in the simulation details UI ([#28936](https://github.com/MetaMask/metamask-extension/pull/28936)) +- Fixed signature decoding data display for ERC-1155 tokens ([#28921](https://github.com/MetaMask/metamask-extension/pull/28921)) +- Updated confirmations to display Identicons ([#28645](https://github.com/MetaMask/metamask-extension/pull/28645)) +- Disabled link out modal for preinstalled Snap links ([#29142](https://github.com/MetaMask/metamask-extension/pull/29142)) +- Fixed app crash issue occurring after submitting a bridge transaction ([#29203](https://github.com/MetaMask/metamask-extension/pull/29203)) +- Limited Bridge transaction amounts to 6 decimal places to prevent text cutoff in activity items ([#29153](https://github.com/MetaMask/metamask-extension/pull/29153)) +- Fixed incorrect token symbol, token amount, and currency display in cross-chain swaps activity items ([#28899](https://github.com/MetaMask/metamask-extension/pull/28899)) +- Fixed transaction order for cross-chain swaps ([#28939](https://github.com/MetaMask/metamask-extension/pull/28939)) +- Fixed issue where clearing Activity tab data wiped txHistory for both source and destination chains in Bridge transactions ([#29000](https://github.com/MetaMask/metamask-extension/pull/29000)) +- [FLASK] Fixed Solana native balance display in the account selector ([#29054](https://github.com/MetaMask/metamask-extension/pull/29054)) ## [12.9.3] ### Fixed From 1e7fe77a46a0bd547ca68fd424f4c688ce7af879 Mon Sep 17 00:00:00 2001 From: Matthew Walsh Date: Mon, 13 Jan 2025 20:14:05 +0000 Subject: [PATCH 24/65] fix (cherry-pick): duplicate content in multiple pending connect confirmations (#29653) (#29670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Cherry-pick of #29653 for release `12.10.0`. ## **Related issues** ## **Manual testing steps** ## **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/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-extension/blob/main/.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. --- .../permissions-connect.component.js | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ui/pages/permissions-connect/permissions-connect.component.js b/ui/pages/permissions-connect/permissions-connect.component.js index 17f73d633953..abb75ad747df 100644 --- a/ui/pages/permissions-connect/permissions-connect.component.js +++ b/ui/pages/permissions-connect/permissions-connect.component.js @@ -126,9 +126,6 @@ export default class PermissionConnect extends Component { this.props.permissionsRequest, ), permissionsApproved: null, - origin: this.props.origin, - targetSubjectMetadata: this.props.targetSubjectMetadata || {}, - snapsInstallPrivacyWarningShown: this.props.snapsInstallPrivacyWarningShown, }; componentDidMount() { @@ -180,8 +177,8 @@ export default class PermissionConnect extends Component { } componentDidUpdate(prevProps) { - const { permissionsRequest, lastConnectedInfo } = this.props; - const { redirecting, origin } = this.state; + const { permissionsRequest, lastConnectedInfo, origin } = this.props; + const { redirecting } = this.state; if (!permissionsRequest && prevProps.permissionsRequest && !redirecting) { const accountsLastApprovedTime = @@ -267,7 +264,7 @@ export default class PermissionConnect extends Component { } renderTopBar(permissionsRequestId) { - const { targetSubjectMetadata } = this.state; + const { targetSubjectMetadata } = this.props; const handleCancelFromHeader = () => { this.cancelPermissionsRequest(permissionsRequestId); }; @@ -324,13 +321,12 @@ export default class PermissionConnect extends Component { rejectPendingApproval, setSnapsInstallPrivacyWarningShownStatus, approvePermissionsRequest, - } = this.props; - const { - selectedAccountAddresses, - permissionsApproved, - redirecting, snapsInstallPrivacyWarningShown, - } = this.state; + origin, + history, + } = this.props; + const { selectedAccountAddresses, permissionsApproved, redirecting } = + this.state; const isRequestingSnap = isSnapId(permissionsRequest?.metadata?.origin); @@ -372,7 +368,7 @@ export default class PermissionConnect extends Component { rejectPermissionsRequest={(requestId) => this.cancelPermissionsRequest(requestId) } - activeTabOrigin={this.state.origin} + activeTabOrigin={origin} request={permissionsRequest} permissionsRequestId={permissionsRequestId} approveConnection={this.approveConnection} @@ -397,7 +393,7 @@ export default class PermissionConnect extends Component { selectedAccountAddresses.has(account.address), )} targetSubjectMetadata={targetSubjectMetadata} - history={this.props.history} + history={history} connectPath={connectPath} snapsInstallPrivacyWarningShown={ snapsInstallPrivacyWarningShown From da25fe581c50076275ea134fabcbdf2d6fb5a84c Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Wed, 15 Jan 2025 16:58:32 +0000 Subject: [PATCH 25/65] Version v12.10.1 --- CHANGELOG.md | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de3b081c4a20..5580fc9a6fab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,119 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.10.1] +### Uncategorized +- Version v12.10.0 RC ([#29330](https://github.com/MetaMask/metamask-extension/pull/29330)) +- fix (cherry-pick): duplicate content in multiple pending connect confirmations (#29653) ([#29653](https://github.com/MetaMask/metamask-extension/pull/29653)) +- chore: V12.10.0 changelog ([#29635](https://github.com/MetaMask/metamask-extension/pull/29635)) +- cherrypick fix: xchain linea bugs (#29409) ([#29409](https://github.com/MetaMask/metamask-extension/pull/29409)) +- Update Attributions +- cherry-pick: Correct theme value for Snap UI footer buttons ([#29495](https://github.com/MetaMask/metamask-extension/pull/29495)) +- Merge master into v12.10.0 ([#29484](https://github.com/MetaMask/metamask-extension/pull/29484)) +- lint changelog +- lint package.json +- fix changelog +- fix bad merge in changelog +- Merge remote-tracking branch 'origin/master' into Version-v12.10.0-merge-master1 +- fix (cherry-pick): remove reliance on transaction decode in confirmations #29341 ([#29399](https://github.com/MetaMask/metamask-extension/pull/29399)) +- [cherry-pick to Version-v12.10.0] feat: bump solana snap (#29350) ([#29350](https://github.com/MetaMask/metamask-extension/pull/29350)) +- fix (cherry-pick): navigation between watch asset approvals #29279 ([#29401](https://github.com/MetaMask/metamask-extension/pull/29401)) +- fix [cherry-pick]: sentry e2e test fix for bridge loading states ([#29360](https://github.com/MetaMask/metamask-extension/pull/29360)) +- fix: remove mmi tests from ci ([#29201](https://github.com/MetaMask/metamask-extension/pull/29201)) +- chore: fix changelog lint 12.10.0 ([#29186](https://github.com/MetaMask/metamask-extension/pull/29186)) +- Version v12.10.0 +- Merge remote-tracking branch 'origin/master' into Version-v12.10.0 +- fix: nanoid audit issue ([#29268](https://github.com/MetaMask/metamask-extension/pull/29268)) +- test: [POM] Create permission pages base classes and methods for e2e tests ([#29097](https://github.com/MetaMask/metamask-extension/pull/29097)) +- build(webpack): fix `--zip` in Node.js 22 by cloning assets into `Uint8Array`s before zipping ([#29177](https://github.com/MetaMask/metamask-extension/pull/29177)) +- fix: Prevent loss of focus when using UI inputs without labels ([#29238](https://github.com/MetaMask/metamask-extension/pull/29238)) +- fix: `FileInput` displaying wrong outside of `Field` ([#29243](https://github.com/MetaMask/metamask-extension/pull/29243)) +- test: [POM] Basic functionality spec migration ([#29229](https://github.com/MetaMask/metamask-extension/pull/29229)) +- fix: correct a typo ([#29207](https://github.com/MetaMask/metamask-extension/pull/29207)) +- ci: add flags.circleci.timeoutMinutes ([#29156](https://github.com/MetaMask/metamask-extension/pull/29156)) +- feat: decouple authentication logic from `useMetametrics` ([#29070](https://github.com/MetaMask/metamask-extension/pull/29070)) +- chore: bump profile-sync-controller to version v3.1.1 ([#29100](https://github.com/MetaMask/metamask-extension/pull/29100)) +- chore: Bump `reselect` to `^5.1.1` for heterogenously-typed selectors support ([#29094](https://github.com/MetaMask/metamask-extension/pull/29094)) +- fix: Fix not set `estimate_type` and rename `dappSuggested` transaction metric property value ([#29052](https://github.com/MetaMask/metamask-extension/pull/29052)) +- feat: Migrate signature e2e tests for redesigned screens ([#29023](https://github.com/MetaMask/metamask-extension/pull/29023)) +- chore: Master sync PR following v12.8.0 and v12.9.0 ([#28912](https://github.com/MetaMask/metamask-extension/pull/28912)) +- Merge origin/main into master-sync +- feat: add websocket support for c2 detection ([#29150](https://github.com/MetaMask/metamask-extension/pull/29150)) +- feat: Adding Skeleton component to component-library ([#29082](https://github.com/MetaMask/metamask-extension/pull/29082)) +- feat: add background-muted color to design system ([#29117](https://github.com/MetaMask/metamask-extension/pull/29117)) +- ci: Only check attributions on release candidates ([#29043](https://github.com/MetaMask/metamask-extension/pull/29043)) +- refactor: Refactor how manifest flags are set ([#28686](https://github.com/MetaMask/metamask-extension/pull/28686)) +- chore: Add App Opened Metric Event ([#28927](https://github.com/MetaMask/metamask-extension/pull/28927)) +- feat: Add new metric sending_value to Transaction * events ([#29134](https://github.com/MetaMask/metamask-extension/pull/29134)) +- test: [POM] Migrate hardware wallet e2e tests to follow Page Object Model ([#28768](https://github.com/MetaMask/metamask-extension/pull/28768)) +- fix: Revert gridplus sdk version bumps ([#29125](https://github.com/MetaMask/metamask-extension/pull/29125)) +- fix: send up requestId for squid ([#29042](https://github.com/MetaMask/metamask-extension/pull/29042)) +- fix: (MMS-1789) bridge api called when external services disabled ([#29077](https://github.com/MetaMask/metamask-extension/pull/29077)) +- chore: add autofocus prop to AssetPicker ([#29118](https://github.com/MetaMask/metamask-extension/pull/29118)) +- chore: update CODEOWNERS for bridge related code ([#29029](https://github.com/MetaMask/metamask-extension/pull/29029)) +- fix: token.icon possibly null, update validators and types ([#29065](https://github.com/MetaMask/metamask-extension/pull/29065)) +- test: fix flaky confirmation E2E tests ([#29104](https://github.com/MetaMask/metamask-extension/pull/29104)) +- chore: bump {profile-sync,notification-services}-controller ([#29088](https://github.com/MetaMask/metamask-extension/pull/29088)) +- fix: SonarCloud branch information ([#29072](https://github.com/MetaMask/metamask-extension/pull/29072)) +- chore: pass the Extension Version to the Uninstall URL ([#28935](https://github.com/MetaMask/metamask-extension/pull/28935)) +- feat: log-merge-group-failure ([#28799](https://github.com/MetaMask/metamask-extension/pull/28799)) +- fix: Remove Storybook theme flex style ([#27783](https://github.com/MetaMask/metamask-extension/pull/27783)) +- refactor: Init getTokenNetworkFilter selector ([#29068](https://github.com/MetaMask/metamask-extension/pull/29068)) +- chore: emit cross-chain swaps metrics + validation error logic ([#28713](https://github.com/MetaMask/metamask-extension/pull/28713)) +- refactor: decouple extension config from bridge API feature flags ([#28983](https://github.com/MetaMask/metamask-extension/pull/28983)) +- chore: update bug template to include feature branches ([#28878](https://github.com/MetaMask/metamask-extension/pull/28878)) +- test: fix flaky send eth transaction test ([#29050](https://github.com/MetaMask/metamask-extension/pull/29050)) +- feat: Add new gas_fee_selected property on Transaction * events ([#29027](https://github.com/MetaMask/metamask-extension/pull/29027)) +- chore: eliminate direct `cross-spawn` dependency ([#28570](https://github.com/MetaMask/metamask-extension/pull/28570)) +- feat: various profile syncing improvements ([#29022](https://github.com/MetaMask/metamask-extension/pull/29022)) +- chore: Branch off of "New Crowdin translations by Github Action" ([#29011](https://github.com/MetaMask/metamask-extension/pull/29011)) +- fix: add source when local PPOM fails ([#28726](https://github.com/MetaMask/metamask-extension/pull/28726)) +- feat: bump @metamask/message-signing-snap to ^0.6.0 ([#28877](https://github.com/MetaMask/metamask-extension/pull/28877)) +- chore: Update signature controller ([#28988](https://github.com/MetaMask/metamask-extension/pull/28988)) +- chore: Renumber migration 135 to 131.1 ([#28979](https://github.com/MetaMask/metamask-extension/pull/28979)) +- fix: Fix create metric fragment ([#28970](https://github.com/MetaMask/metamask-extension/pull/28970)) +- test: fix flaky erc20 send token e2e ([#28775](https://github.com/MetaMask/metamask-extension/pull/28775)) +- chore: bump `@metamask/account-watcher` to `^4.2.2` ([#28915](https://github.com/MetaMask/metamask-extension/pull/28915)) +- chore: bump `@metamask/ppom-validator` to `0.36.0` ([#28958](https://github.com/MetaMask/metamask-extension/pull/28958)) +- fix: remove extension from webpack config import ([#28111](https://github.com/MetaMask/metamask-extension/pull/28111)) +- chore: bump `@metamask/preferences-controller` to `15.0.1` ([#28960](https://github.com/MetaMask/metamask-extension/pull/28960)) +- chore: Update CODEOWNERS to remove ownership from most ([#28941](https://github.com/MetaMask/metamask-extension/pull/28941)) +- fix: sanitizes the token marketplace URL ([#28898](https://github.com/MetaMask/metamask-extension/pull/28898)) +- feat: Migrate remaining e2e tests to redesigned confirmations ([#28780](https://github.com/MetaMask/metamask-extension/pull/28780)) +- chore: transfer ownership of auth & profile sync e2e to identity ([#28946](https://github.com/MetaMask/metamask-extension/pull/28946)) +- chore: adds ramp-dev-team to codeowners ([#28933](https://github.com/MetaMask/metamask-extension/pull/28933)) +- chore: Bump Snaps packages ([#28922](https://github.com/MetaMask/metamask-extension/pull/28922)) +- feat: Add 'transaction_internal_id' property on all transaction events ([#28919](https://github.com/MetaMask/metamask-extension/pull/28919)) +- fix: Capture raw 4byte hex ([#28773](https://github.com/MetaMask/metamask-extension/pull/28773)) +- test: fix flaky ppom test ([#28923](https://github.com/MetaMask/metamask-extension/pull/28923)) +- test: Add integration test for signing and submitting alert and fix b… ([#28616](https://github.com/MetaMask/metamask-extension/pull/28616)) +- test: Fixed e2e swap tests test failures ([#28913](https://github.com/MetaMask/metamask-extension/pull/28913)) +- chore: Update coverage.json ([#28092](https://github.com/MetaMask/metamask-extension/pull/28092)) +- chore: Skip flaky smart-transactions.spec.ts until we determine the root cau… ([#28943](https://github.com/MetaMask/metamask-extension/pull/28943)) +- feat: Adding production URL for signature decoding ([#28918](https://github.com/MetaMask/metamask-extension/pull/28918)) +- chore: update controllers as of core release v244 ([#28905](https://github.com/MetaMask/metamask-extension/pull/28905)) +- feat: migrate `AppStateController` to inherit from BaseController V2 ([#28784](https://github.com/MetaMask/metamask-extension/pull/28784)) +- chore: change ownership of profile sync from notifications to identity ([#28901](https://github.com/MetaMask/metamask-extension/pull/28901)) +- chore: force `@solana/web3.js` version resolution ([#28926](https://github.com/MetaMask/metamask-extension/pull/28926)) +- chore: Update a mock for tests ([#28934](https://github.com/MetaMask/metamask-extension/pull/28934)) +- fix: updated analytics preferences to be logged during onboarding ([#28897](https://github.com/MetaMask/metamask-extension/pull/28897)) +- fix: check if a user is signed in before attempting to sign them out ([#28874](https://github.com/MetaMask/metamask-extension/pull/28874)) +- feat(27256): implement remote feature flag feature ([#28684](https://github.com/MetaMask/metamask-extension/pull/28684)) +- test: [POM] improve homepage class implementation ([#28797](https://github.com/MetaMask/metamask-extension/pull/28797)) +- chore: cleanup on some names and scripts in ci ([#28844](https://github.com/MetaMask/metamask-extension/pull/28844)) +- chore: Improvements to codeowners ([#28851](https://github.com/MetaMask/metamask-extension/pull/28851)) +- ci: pin image versions used in CI so it remains deterministic ([#28779](https://github.com/MetaMask/metamask-extension/pull/28779)) +- test: Allow token balance to populate after swap ([#28744](https://github.com/MetaMask/metamask-extension/pull/28744)) +- fix: optimize helper methods for signature e2e ([#28810](https://github.com/MetaMask/metamask-extension/pull/28810)) +- chore: Reduce MMI trigger machine size ([#28689](https://github.com/MetaMask/metamask-extension/pull/28689)) +- chore: Rename `develop` to `main` ([#28821](https://github.com/MetaMask/metamask-extension/pull/28821)) +- chore: accept regex expression for rerun-from-failed trigger from circle ci UI, so we can add multiple triggers following the name convention ([#28804](https://github.com/MetaMask/metamask-extension/pull/28804)) +- fix: fix asset-list e2e test ([#28822](https://github.com/MetaMask/metamask-extension/pull/28822)) +- chore: remove unused `usedNetworks` state property from `AppStateController` ([#28813](https://github.com/MetaMask/metamask-extension/pull/28813)) +- refactor: remove global network from transaction controller ([#28449](https://github.com/MetaMask/metamask-extension/pull/28449)) +- test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) +- fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) + ## [12.10.0] ### Added - Added B3 network logo for improved identification ([#27778](https://github.com/MetaMask/metamask-extension/pull/27778)) @@ -5553,7 +5666,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.10.0...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.10.1...HEAD +[12.10.1]: https://github.com/MetaMask/metamask-extension/compare/v12.10.0...v12.10.1 [12.10.0]: https://github.com/MetaMask/metamask-extension/compare/v12.9.3...v12.10.0 [12.9.3]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...v12.9.3 [12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2 diff --git a/package.json b/package.json index 000fe0cd4f9e..b7be2b7423c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.10.0", + "version": "12.10.1", "private": true, "repository": { "type": "git", From 6b433e64df209b21eeb21a876f3d76bb46eb1ebd Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Wed, 15 Jan 2025 13:03:06 -0500 Subject: [PATCH 26/65] cherry-pick: remove mmi tests into v12.10.1 (#29732) Cherry-pick 7a78bf271bb556a3528d88964354a418fc16dc0a, #29233 into v12.10.1 Conflicts: `.circleci/config.yml` Co-authored-by: Ramon AC <36987446+racitores@users.noreply.github.com> --- .circleci/config.yml | 3 --- .circleci/scripts/release-create-gh-release.sh | 4 ---- 2 files changed, 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c83da321a2ed..6d04a1de6c37 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1349,9 +1349,6 @@ jobs: - run: name: Publish Flask MV2 release to Sentry command: yarn sentry:publish --build-type flask --dist mv2 - - run: - name: Publish MMI release to Sentry - command: yarn sentry:publish --build-type mmi - run: name: Create GitHub release command: .circleci/scripts/release-create-gh-release.sh diff --git a/.circleci/scripts/release-create-gh-release.sh b/.circleci/scripts/release-create-gh-release.sh index 29118f57b756..d8ade6686ec6 100755 --- a/.circleci/scripts/release-create-gh-release.sh +++ b/.circleci/scripts/release-create-gh-release.sh @@ -61,7 +61,6 @@ if [[ $current_commit_msg =~ Version[-[:space:]](v[[:digit:]]+.[[:digit:]]+.[[:d then tag="${BASH_REMATCH[1]}" flask_version="$(print_build_version 'flask')" - mmi_version="$(print_build_version 'mmi')" install_github_cli @@ -72,15 +71,12 @@ then --attach builds-mv2/metamask-firefox-*.zip \ --attach builds-flask/metamask-flask-chrome-*.zip \ --attach builds-flask-mv2/metamask-flask-firefox-*.zip \ - --attach builds-mmi/metamask-mmi-chrome-*.zip \ - --attach builds-mmi/metamask-mmi-firefox-*.zip \ --message "Version ${tag##v}" \ --message "$release_body" \ --commitish "$CIRCLE_SHA1" \ "$tag" publish_tag 'Flask' "${flask_version}" - publish_tag 'MMI' "${mmi_version}" else printf '%s\n' 'Version not found in commit message; skipping GitHub Release' exit 0 From 5c45c3c036e5be105aaa581c5725c735bd938955 Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Wed, 15 Jan 2025 13:57:08 -0500 Subject: [PATCH 27/65] chore: Update changelog for v12.10.1 (#29735) Update changelog for v12.10.1 --- CHANGELOG.md | 113 +-------------------------------------------------- 1 file changed, 2 insertions(+), 111 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5580fc9a6fab..9f78659c6afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,117 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [12.10.1] -### Uncategorized -- Version v12.10.0 RC ([#29330](https://github.com/MetaMask/metamask-extension/pull/29330)) -- fix (cherry-pick): duplicate content in multiple pending connect confirmations (#29653) ([#29653](https://github.com/MetaMask/metamask-extension/pull/29653)) -- chore: V12.10.0 changelog ([#29635](https://github.com/MetaMask/metamask-extension/pull/29635)) -- cherrypick fix: xchain linea bugs (#29409) ([#29409](https://github.com/MetaMask/metamask-extension/pull/29409)) -- Update Attributions -- cherry-pick: Correct theme value for Snap UI footer buttons ([#29495](https://github.com/MetaMask/metamask-extension/pull/29495)) -- Merge master into v12.10.0 ([#29484](https://github.com/MetaMask/metamask-extension/pull/29484)) -- lint changelog -- lint package.json -- fix changelog -- fix bad merge in changelog -- Merge remote-tracking branch 'origin/master' into Version-v12.10.0-merge-master1 -- fix (cherry-pick): remove reliance on transaction decode in confirmations #29341 ([#29399](https://github.com/MetaMask/metamask-extension/pull/29399)) -- [cherry-pick to Version-v12.10.0] feat: bump solana snap (#29350) ([#29350](https://github.com/MetaMask/metamask-extension/pull/29350)) -- fix (cherry-pick): navigation between watch asset approvals #29279 ([#29401](https://github.com/MetaMask/metamask-extension/pull/29401)) -- fix [cherry-pick]: sentry e2e test fix for bridge loading states ([#29360](https://github.com/MetaMask/metamask-extension/pull/29360)) -- fix: remove mmi tests from ci ([#29201](https://github.com/MetaMask/metamask-extension/pull/29201)) -- chore: fix changelog lint 12.10.0 ([#29186](https://github.com/MetaMask/metamask-extension/pull/29186)) -- Version v12.10.0 -- Merge remote-tracking branch 'origin/master' into Version-v12.10.0 -- fix: nanoid audit issue ([#29268](https://github.com/MetaMask/metamask-extension/pull/29268)) -- test: [POM] Create permission pages base classes and methods for e2e tests ([#29097](https://github.com/MetaMask/metamask-extension/pull/29097)) -- build(webpack): fix `--zip` in Node.js 22 by cloning assets into `Uint8Array`s before zipping ([#29177](https://github.com/MetaMask/metamask-extension/pull/29177)) -- fix: Prevent loss of focus when using UI inputs without labels ([#29238](https://github.com/MetaMask/metamask-extension/pull/29238)) -- fix: `FileInput` displaying wrong outside of `Field` ([#29243](https://github.com/MetaMask/metamask-extension/pull/29243)) -- test: [POM] Basic functionality spec migration ([#29229](https://github.com/MetaMask/metamask-extension/pull/29229)) -- fix: correct a typo ([#29207](https://github.com/MetaMask/metamask-extension/pull/29207)) -- ci: add flags.circleci.timeoutMinutes ([#29156](https://github.com/MetaMask/metamask-extension/pull/29156)) -- feat: decouple authentication logic from `useMetametrics` ([#29070](https://github.com/MetaMask/metamask-extension/pull/29070)) -- chore: bump profile-sync-controller to version v3.1.1 ([#29100](https://github.com/MetaMask/metamask-extension/pull/29100)) -- chore: Bump `reselect` to `^5.1.1` for heterogenously-typed selectors support ([#29094](https://github.com/MetaMask/metamask-extension/pull/29094)) -- fix: Fix not set `estimate_type` and rename `dappSuggested` transaction metric property value ([#29052](https://github.com/MetaMask/metamask-extension/pull/29052)) -- feat: Migrate signature e2e tests for redesigned screens ([#29023](https://github.com/MetaMask/metamask-extension/pull/29023)) -- chore: Master sync PR following v12.8.0 and v12.9.0 ([#28912](https://github.com/MetaMask/metamask-extension/pull/28912)) -- Merge origin/main into master-sync -- feat: add websocket support for c2 detection ([#29150](https://github.com/MetaMask/metamask-extension/pull/29150)) -- feat: Adding Skeleton component to component-library ([#29082](https://github.com/MetaMask/metamask-extension/pull/29082)) -- feat: add background-muted color to design system ([#29117](https://github.com/MetaMask/metamask-extension/pull/29117)) -- ci: Only check attributions on release candidates ([#29043](https://github.com/MetaMask/metamask-extension/pull/29043)) -- refactor: Refactor how manifest flags are set ([#28686](https://github.com/MetaMask/metamask-extension/pull/28686)) -- chore: Add App Opened Metric Event ([#28927](https://github.com/MetaMask/metamask-extension/pull/28927)) -- feat: Add new metric sending_value to Transaction * events ([#29134](https://github.com/MetaMask/metamask-extension/pull/29134)) -- test: [POM] Migrate hardware wallet e2e tests to follow Page Object Model ([#28768](https://github.com/MetaMask/metamask-extension/pull/28768)) -- fix: Revert gridplus sdk version bumps ([#29125](https://github.com/MetaMask/metamask-extension/pull/29125)) -- fix: send up requestId for squid ([#29042](https://github.com/MetaMask/metamask-extension/pull/29042)) -- fix: (MMS-1789) bridge api called when external services disabled ([#29077](https://github.com/MetaMask/metamask-extension/pull/29077)) -- chore: add autofocus prop to AssetPicker ([#29118](https://github.com/MetaMask/metamask-extension/pull/29118)) -- chore: update CODEOWNERS for bridge related code ([#29029](https://github.com/MetaMask/metamask-extension/pull/29029)) -- fix: token.icon possibly null, update validators and types ([#29065](https://github.com/MetaMask/metamask-extension/pull/29065)) -- test: fix flaky confirmation E2E tests ([#29104](https://github.com/MetaMask/metamask-extension/pull/29104)) -- chore: bump {profile-sync,notification-services}-controller ([#29088](https://github.com/MetaMask/metamask-extension/pull/29088)) -- fix: SonarCloud branch information ([#29072](https://github.com/MetaMask/metamask-extension/pull/29072)) -- chore: pass the Extension Version to the Uninstall URL ([#28935](https://github.com/MetaMask/metamask-extension/pull/28935)) -- feat: log-merge-group-failure ([#28799](https://github.com/MetaMask/metamask-extension/pull/28799)) -- fix: Remove Storybook theme flex style ([#27783](https://github.com/MetaMask/metamask-extension/pull/27783)) -- refactor: Init getTokenNetworkFilter selector ([#29068](https://github.com/MetaMask/metamask-extension/pull/29068)) -- chore: emit cross-chain swaps metrics + validation error logic ([#28713](https://github.com/MetaMask/metamask-extension/pull/28713)) -- refactor: decouple extension config from bridge API feature flags ([#28983](https://github.com/MetaMask/metamask-extension/pull/28983)) -- chore: update bug template to include feature branches ([#28878](https://github.com/MetaMask/metamask-extension/pull/28878)) -- test: fix flaky send eth transaction test ([#29050](https://github.com/MetaMask/metamask-extension/pull/29050)) -- feat: Add new gas_fee_selected property on Transaction * events ([#29027](https://github.com/MetaMask/metamask-extension/pull/29027)) -- chore: eliminate direct `cross-spawn` dependency ([#28570](https://github.com/MetaMask/metamask-extension/pull/28570)) -- feat: various profile syncing improvements ([#29022](https://github.com/MetaMask/metamask-extension/pull/29022)) -- chore: Branch off of "New Crowdin translations by Github Action" ([#29011](https://github.com/MetaMask/metamask-extension/pull/29011)) -- fix: add source when local PPOM fails ([#28726](https://github.com/MetaMask/metamask-extension/pull/28726)) -- feat: bump @metamask/message-signing-snap to ^0.6.0 ([#28877](https://github.com/MetaMask/metamask-extension/pull/28877)) -- chore: Update signature controller ([#28988](https://github.com/MetaMask/metamask-extension/pull/28988)) -- chore: Renumber migration 135 to 131.1 ([#28979](https://github.com/MetaMask/metamask-extension/pull/28979)) -- fix: Fix create metric fragment ([#28970](https://github.com/MetaMask/metamask-extension/pull/28970)) -- test: fix flaky erc20 send token e2e ([#28775](https://github.com/MetaMask/metamask-extension/pull/28775)) -- chore: bump `@metamask/account-watcher` to `^4.2.2` ([#28915](https://github.com/MetaMask/metamask-extension/pull/28915)) -- chore: bump `@metamask/ppom-validator` to `0.36.0` ([#28958](https://github.com/MetaMask/metamask-extension/pull/28958)) -- fix: remove extension from webpack config import ([#28111](https://github.com/MetaMask/metamask-extension/pull/28111)) -- chore: bump `@metamask/preferences-controller` to `15.0.1` ([#28960](https://github.com/MetaMask/metamask-extension/pull/28960)) -- chore: Update CODEOWNERS to remove ownership from most ([#28941](https://github.com/MetaMask/metamask-extension/pull/28941)) -- fix: sanitizes the token marketplace URL ([#28898](https://github.com/MetaMask/metamask-extension/pull/28898)) -- feat: Migrate remaining e2e tests to redesigned confirmations ([#28780](https://github.com/MetaMask/metamask-extension/pull/28780)) -- chore: transfer ownership of auth & profile sync e2e to identity ([#28946](https://github.com/MetaMask/metamask-extension/pull/28946)) -- chore: adds ramp-dev-team to codeowners ([#28933](https://github.com/MetaMask/metamask-extension/pull/28933)) -- chore: Bump Snaps packages ([#28922](https://github.com/MetaMask/metamask-extension/pull/28922)) -- feat: Add 'transaction_internal_id' property on all transaction events ([#28919](https://github.com/MetaMask/metamask-extension/pull/28919)) -- fix: Capture raw 4byte hex ([#28773](https://github.com/MetaMask/metamask-extension/pull/28773)) -- test: fix flaky ppom test ([#28923](https://github.com/MetaMask/metamask-extension/pull/28923)) -- test: Add integration test for signing and submitting alert and fix b… ([#28616](https://github.com/MetaMask/metamask-extension/pull/28616)) -- test: Fixed e2e swap tests test failures ([#28913](https://github.com/MetaMask/metamask-extension/pull/28913)) -- chore: Update coverage.json ([#28092](https://github.com/MetaMask/metamask-extension/pull/28092)) -- chore: Skip flaky smart-transactions.spec.ts until we determine the root cau… ([#28943](https://github.com/MetaMask/metamask-extension/pull/28943)) -- feat: Adding production URL for signature decoding ([#28918](https://github.com/MetaMask/metamask-extension/pull/28918)) -- chore: update controllers as of core release v244 ([#28905](https://github.com/MetaMask/metamask-extension/pull/28905)) -- feat: migrate `AppStateController` to inherit from BaseController V2 ([#28784](https://github.com/MetaMask/metamask-extension/pull/28784)) -- chore: change ownership of profile sync from notifications to identity ([#28901](https://github.com/MetaMask/metamask-extension/pull/28901)) -- chore: force `@solana/web3.js` version resolution ([#28926](https://github.com/MetaMask/metamask-extension/pull/28926)) -- chore: Update a mock for tests ([#28934](https://github.com/MetaMask/metamask-extension/pull/28934)) -- fix: updated analytics preferences to be logged during onboarding ([#28897](https://github.com/MetaMask/metamask-extension/pull/28897)) -- fix: check if a user is signed in before attempting to sign them out ([#28874](https://github.com/MetaMask/metamask-extension/pull/28874)) -- feat(27256): implement remote feature flag feature ([#28684](https://github.com/MetaMask/metamask-extension/pull/28684)) -- test: [POM] improve homepage class implementation ([#28797](https://github.com/MetaMask/metamask-extension/pull/28797)) -- chore: cleanup on some names and scripts in ci ([#28844](https://github.com/MetaMask/metamask-extension/pull/28844)) -- chore: Improvements to codeowners ([#28851](https://github.com/MetaMask/metamask-extension/pull/28851)) -- ci: pin image versions used in CI so it remains deterministic ([#28779](https://github.com/MetaMask/metamask-extension/pull/28779)) -- test: Allow token balance to populate after swap ([#28744](https://github.com/MetaMask/metamask-extension/pull/28744)) -- fix: optimize helper methods for signature e2e ([#28810](https://github.com/MetaMask/metamask-extension/pull/28810)) -- chore: Reduce MMI trigger machine size ([#28689](https://github.com/MetaMask/metamask-extension/pull/28689)) -- chore: Rename `develop` to `main` ([#28821](https://github.com/MetaMask/metamask-extension/pull/28821)) -- chore: accept regex expression for rerun-from-failed trigger from circle ci UI, so we can add multiple triggers following the name convention ([#28804](https://github.com/MetaMask/metamask-extension/pull/28804)) -- fix: fix asset-list e2e test ([#28822](https://github.com/MetaMask/metamask-extension/pull/28822)) -- chore: remove unused `usedNetworks` state property from `AppStateController` ([#28813](https://github.com/MetaMask/metamask-extension/pull/28813)) -- refactor: remove global network from transaction controller ([#28449](https://github.com/MetaMask/metamask-extension/pull/28449)) -- test: [POM] fix change language flaky tests and migrate tests to Page Object Model ([#28777](https://github.com/MetaMask/metamask-extension/pull/28777)) -- fix: Correct preferences controller usage for `isOnPhishingList` hook ([#28803](https://github.com/MetaMask/metamask-extension/pull/28803)) +### Changed +- Stop publishing MMI builds to the release page ([#29732](https://github.com/MetaMask/metamask-extension/pull/29732)) ## [12.10.0] ### Added From 77243cb0aecdfc408ecbcd3dabec61a97cd99d67 Mon Sep 17 00:00:00 2001 From: Christian Montoya Date: Wed, 15 Jan 2025 16:08:29 -0500 Subject: [PATCH 28/65] docs: fix developer docs link in README (#29734) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The URL in the main README was pointing to a dead site, this fixes the URL [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29734?quickstart=1) ## **Related issues** N/A ## **Manual testing steps** 1. Go to https://github.com/MetaMask/metamask-extension/blob/main/README.md 2. Click Developer Docs ## **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/main/.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/main/.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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85d1b3f91ba3..f76e913a6b6c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ MetaMask supports Firefox, Google Chrome, and Chromium-based browsers. We recomm For up to the minute news, follow us on [X](https://x.com/MetaMask). -To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://metamask.github.io/metamask-docs/). +To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://docs.metamask.io/). To learn how to contribute to the MetaMask codebase, visit our [Contributor Docs](https://github.com/MetaMask/contributor-docs). From b2581f432d2baa1662af1623a150453cc7d5f778 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Wed, 15 Jan 2025 13:20:40 -0800 Subject: [PATCH 29/65] lint --- app/scripts/migrations/138.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/migrations/138.ts b/app/scripts/migrations/138.ts index fd2df99a7b27..eb4a724dd281 100644 --- a/app/scripts/migrations/138.ts +++ b/app/scripts/migrations/138.ts @@ -238,7 +238,7 @@ function transformState(oldState: Record) { } } if (malformedDataErrorFound) { - return; + return undefined; } if (matchingChainId) { From 6a6b1bf01ed194f078db2265b56f3da7e84cdc2a Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Wed, 15 Jan 2025 13:40:00 -0800 Subject: [PATCH 30/65] Trigger From b213d942e5b04a3baf7c4c772b94aef02d83d5c0 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Wed, 15 Jan 2025 14:04:09 -0800 Subject: [PATCH 31/65] add isNonEmptyArrayOfStrings to migration --- app/scripts/migrations/138.ts | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/scripts/migrations/138.ts b/app/scripts/migrations/138.ts index eb4a724dd281..bc8ec717d38b 100644 --- a/app/scripts/migrations/138.ts +++ b/app/scripts/migrations/138.ts @@ -1,5 +1,11 @@ import { hasProperty, hexToBigInt, isObject } from '@metamask/utils'; -import type { CaipChainId, CaipAccountId, Json, Hex } from '@metamask/utils'; +import type { + CaipChainId, + CaipAccountId, + Json, + Hex, + NonEmptyArray, +} from '@metamask/utils'; import { cloneDeep } from 'lodash'; import type { Caveat, @@ -72,6 +78,14 @@ function isPermissionConstraint(obj: unknown): obj is PermissionConstraint { ); } +function isNonEmptyArrayOfStrings(obj: unknown): obj is NonEmptyArray { + return ( + Array.isArray(obj) && + obj.length > 0 && + obj.every((item) => typeof item === 'string') + ); +} + /** * This migration transforms `eth_accounts` and `permittedChains` permissions into * an equivalent CAIP-25 permission. @@ -312,11 +326,7 @@ function transformState(oldState: Record) { return oldState; } const accountsCaveatValue = ethAccountsPermission.caveats?.[0]?.value; - if ( - !Array.isArray(accountsCaveatValue) || - accountsCaveatValue.length === 0 || - !accountsCaveatValue.every((item) => typeof item === 'string') - ) { + if (!isNonEmptyArrayOfStrings(accountsCaveatValue)) { global.sentry?.captureException?.( new Error( `Migration ${version}: Invalid state.PermissionController.subjects[${origin}].permissions[${ @@ -346,11 +356,7 @@ function transformState(oldState: Record) { return oldState; } const chainsCaveatValue = permittedChainsPermission.caveats?.[0]?.value; - if ( - !Array.isArray(chainsCaveatValue) || - chainsCaveatValue.length === 0 || - !chainsCaveatValue.every((item) => typeof item === 'string') - ) { + if (!isNonEmptyArrayOfStrings(chainsCaveatValue)) { global.sentry?.captureException?.( new Error( `Migration ${version}: Invalid state.PermissionController.subjects[${origin}].permissions[${ From 0de03ccbbe41db347350220c69f694aa044e3625 Mon Sep 17 00:00:00 2001 From: jiexi Date: Wed, 15 Jan 2025 15:18:24 -0800 Subject: [PATCH 32/65] Update test/e2e/tests/request-queuing/ui.spec.js --- test/e2e/tests/request-queuing/ui.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/request-queuing/ui.spec.js b/test/e2e/tests/request-queuing/ui.spec.js index f0adb3f6fb28..dd8fa26122bb 100644 --- a/test/e2e/tests/request-queuing/ui.spec.js +++ b/test/e2e/tests/request-queuing/ui.spec.js @@ -61,7 +61,7 @@ async function openDappAndSwitchChain(driver, dappUrl, chainId) { (permission) => permission.parentCapability === PermissionNames.permittedChains, ) - ?.caveats?.find( + ?.caveats.find( (caveat) => caveat.type === CaveatTypes.restrictNetworkSwitching, )?.value || []; From 9233f06dbb2031d82cb5b1d96d6f96405cacc36a Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Wed, 15 Jan 2025 15:52:13 -0800 Subject: [PATCH 33/65] Revert ui/ducks/bridge/selectors.ts --- ui/ducks/bridge/selectors.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/ducks/bridge/selectors.ts b/ui/ducks/bridge/selectors.ts index ac3c620b3a14..f86745e69ae3 100644 --- a/ui/ducks/bridge/selectors.ts +++ b/ui/ducks/bridge/selectors.ts @@ -20,23 +20,23 @@ import { BRIDGE_PREFERRED_GAS_ESTIMATE, BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE, } from '../../../shared/constants/bridge'; +import type { BridgeControllerState } from '../../../shared/types/bridge'; +import { createDeepEqualSelector } from '../../../shared/modules/selectors/util'; +import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP } from '../../../shared/constants/swaps'; +import { + getProviderConfig, + getNetworkConfigurationsByChainId, +} from '../../../shared/modules/selectors/networks'; +import { getConversionRate, getGasFeeEstimates } from '../metamask/metamask'; import { - type BridgeControllerState, - type BridgeToken, type L1GasFees, + type BridgeToken, type QuoteMetadata, type QuoteResponse, SortOrder, BridgeFeatureFlagsKey, RequestStatus, } from '../../../shared/types/bridge'; -import { createDeepEqualSelector } from '../../../shared/modules/selectors/util'; -import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP } from '../../../shared/constants/swaps'; -import { - getProviderConfig, - getNetworkConfigurationsByChainId, -} from '../../../shared/modules/selectors/networks'; -import { getConversionRate, getGasFeeEstimates } from '../metamask/metamask'; import { calcAdjustedReturn, calcCost, From 6b765baea8c3de40f4a8fbab202c2e8ce5a50bb3 Mon Sep 17 00:00:00 2001 From: Daniel <80175477+dan437@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:16:14 +0100 Subject: [PATCH 34/65] feat: Use a dynamic interval value for smart transaction status polling (#29703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** We want to use a dynamic interval value for smart transaction status polling, which is returned by backend. That way we can easily change it if needed and use the most optimal value. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29703?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Make sure smart transactions are enabled in Advanced Settings 2. Be on Ethereum Mainnet 3. Submit a smart transaction 4. Check that a network request for checking smart transaction status happens every second ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- ui/ducks/swaps/swaps.js | 5 +- .../confirm-transaction-base.component.js | 9 ++- .../confirm-transaction-base.container.js | 3 + .../confirm-transaction-base.test.js | 77 ++++++++++++++++++- .../useSmartTransactionFeatureFlags.test.ts | 37 +++++++++ .../hooks/useSmartTransactionFeatureFlags.ts | 6 ++ ui/store/actions.test.js | 55 +++++++++++++ ui/store/actions.ts | 3 + 8 files changed, 191 insertions(+), 4 deletions(-) diff --git a/ui/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js index 845a84ffb8cd..dc9662fe5fcf 100644 --- a/ui/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -57,6 +57,7 @@ import { hexWEIToDecGWEI, } from '../../../shared/modules/conversion.utils'; import { getCurrentChainId } from '../../../shared/modules/selectors/networks'; +import { getFeatureFlagsByChainId } from '../../../shared/modules/selectors/feature-flags'; import { getSelectedAccount, getTokenExchangeRates, @@ -896,12 +897,12 @@ export const signAndSendSwapsSmartTransaction = ({ const { metaData, value: swapTokenValue, slippage } = fetchParams; const { sourceTokenInfo = {}, destinationTokenInfo = {} } = metaData; const usedQuote = getUsedQuote(state); - const swapsNetworkConfig = getSwapsNetworkConfig(state); const selectedNetwork = getSelectedNetwork(state); + const swapsFeatureFlags = getFeatureFlagsByChainId(state); dispatch( setSmartTransactionsRefreshInterval( - swapsNetworkConfig?.stxBatchStatusRefreshTime, + swapsFeatureFlags?.smartTransactions?.batchStatusPollingInterval, ), ); diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js index bf90043c9778..30e0ff6d2033 100644 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js @@ -184,6 +184,7 @@ export default class ConfirmTransactionBase extends Component { isSmartTransactionsEnabled: PropTypes.bool, hasPriorityApprovalRequest: PropTypes.bool, chainId: PropTypes.string, + setSmartTransactionsRefreshInterval: PropTypes.func, }; state = { @@ -1023,6 +1024,7 @@ export default class ConfirmTransactionBase extends Component { currentChainSupportsSmartTransactions, setSwapsFeatureFlags, fetchSmartTransactionsLiveness, + setSmartTransactionsRefreshInterval, } = this.props; const { trackEvent } = this.context; @@ -1071,7 +1073,12 @@ export default class ConfirmTransactionBase extends Component { Promise.all([ fetchSwapsFeatureFlags(), fetchSmartTransactionsLiveness(), - ]).then(([swapsFeatureFlags]) => setSwapsFeatureFlags(swapsFeatureFlags)); + ]).then(([swapsFeatureFlags]) => { + setSwapsFeatureFlags(swapsFeatureFlags); + setSmartTransactionsRefreshInterval( + swapsFeatureFlags?.smartTransactions?.batchStatusPollingInterval, + ); + }); } } diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js index d9a04ace67a9..54295addf7a6 100644 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js @@ -30,6 +30,7 @@ import { setSwapsFeatureFlags, fetchSmartTransactionsLiveness, setNextNonce, + setSmartTransactionsRefreshInterval, } from '../../../store/actions'; import { isBalanceSufficient } from '../send/send.utils'; import { shortenAddress, valuesFor } from '../../../helpers/utils/util'; @@ -486,6 +487,8 @@ export const mapDispatchToProps = (dispatch) => { setWaitForConfirmDeepLinkDialog: (wait) => dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(wait)), ///: END:ONLY_INCLUDE_IF + setSmartTransactionsRefreshInterval: (interval) => + dispatch(setSmartTransactionsRefreshInterval(interval)), }; }; diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js index 112f1c5652e7..81612995b707 100644 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js +++ b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js @@ -1,7 +1,8 @@ import React from 'react'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { fireEvent } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; +import nock from 'nock'; import { EthAccountType } from '@metamask/keyring-api'; import { TransactionStatus, @@ -23,6 +24,7 @@ import { import { defaultBuyableChains } from '../../../ducks/ramps/constants'; import { ETH_EOA_METHODS } from '../../../../shared/constants/eth-methods'; import { mockNetworkState } from '../../../../test/stub/networks'; +import { setStorageItem } from '../../../../shared/lib/storage-helpers'; import ConfirmTransactionBase from './confirm-transaction-base.container'; jest.mock('../components/simulation-details/useSimulationMetrics'); @@ -43,6 +45,7 @@ setBackgroundConnection({ updateTransaction: jest.fn(), getLastInteractedConfirmationInfo: jest.fn(), setAlertEnabledness: jest.fn(), + setSwapsFeatureFlags: jest.fn(), }); const mockTxParamsFromAddress = '0x123456789'; @@ -1032,4 +1035,76 @@ describe('Confirm Transaction Base', () => { expect(updateTransactionValue).toHaveBeenCalledTimes(0); }); }); + + describe('Smart Transactions Refresh Interval', () => { + const cleanFeatureFlagApiCache = () => { + setStorageItem( + 'cachedFetch:https://swap.api.cx.metamask.io/featureFlags', + null, + ); + }; + + beforeEach(() => { + cleanFeatureFlagApiCache(); + nock.cleanAll(); + }); + + it('calls setSmartTransactionsRefreshInterval when smart transactions are enabled', async () => { + nock('https://swap.api.cx.metamask.io') + .get('/featureFlags') + .reply(200, { + smartTransactions: { + batchStatusPollingInterval: 1000, + }, + }); + + const state = { + ...baseStore, + metamask: { + ...baseStore.metamask, + smartTransactionsState: { + fees: {}, + liveness: true, + }, + }, + }; + + const setSmartTransactionsRefreshInterval = jest.fn(); + const props = { + setSmartTransactionsRefreshInterval, + smartTransactionsPreferenceEnabled: true, + currentChainSupportsSmartTransactions: true, + }; + + await render({ props, state }); + + await waitFor(() => { + expect(setSmartTransactionsRefreshInterval).toHaveBeenCalledWith(1000); + }); + }); + + it('does not call setSmartTransactionsRefreshInterval when smart transactions are disabled', async () => { + const state = { + ...baseStore, + metamask: { + ...baseStore.metamask, + smartTransactionsState: { + fees: {}, + liveness: false, + }, + }, + }; + + const setSmartTransactionsRefreshInterval = jest.fn(); + const props = { + setSmartTransactionsRefreshInterval, + smartTransactionsPreferenceEnabled: false, + currentChainSupportsSmartTransactions: false, + }; + + await render({ props, state }); + + expect(setSmartTransactionsRefreshInterval).not.toHaveBeenCalled(); + }); + }); }); diff --git a/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.test.ts b/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.test.ts index 708a78b5b1eb..7cb5b4a7c6c2 100644 --- a/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.test.ts +++ b/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.test.ts @@ -5,6 +5,7 @@ import { Hex } from '@metamask/utils'; import { fetchSmartTransactionsLiveness, setSwapsFeatureFlags, + setSmartTransactionsRefreshInterval, } from '../../../store/actions'; import { renderHookWithConfirmContextProvider } from '../../../../test/lib/confirmations/render-helpers'; import { genUnapprovedContractInteractionConfirmation } from '../../../../test/data/confirmations/contract-interaction'; @@ -22,6 +23,7 @@ jest.mock('../../../store/actions', () => ({ ...jest.requireActual('../../../store/actions'), setSwapsFeatureFlags: jest.fn(), fetchSmartTransactionsLiveness: jest.fn(), + setSmartTransactionsRefreshInterval: jest.fn(), })); jest.mock('../../swaps/swaps.util', () => ({ @@ -66,6 +68,9 @@ async function runHook({ describe('useSmartTransactionFeatureFlags', () => { const setSwapsFeatureFlagsMock = jest.mocked(setSwapsFeatureFlags); + const setSmartTransactionsRefreshIntervalMock = jest.mocked( + setSmartTransactionsRefreshInterval, + ); const fetchSwapsFeatureFlagsMock = jest.mocked(fetchSwapsFeatureFlags); const fetchSmartTransactionsLivenessMock = jest.mocked( fetchSmartTransactionsLiveness, @@ -116,4 +121,36 @@ describe('useSmartTransactionFeatureFlags', () => { expect(setSwapsFeatureFlagsMock).not.toHaveBeenCalled(); }); + + it('updates refresh interval when feature flags include interval', async () => { + fetchSwapsFeatureFlagsMock.mockResolvedValue({ + smartTransactions: { + batchStatusPollingInterval: 1000, + }, + }); + + await runHook({ + smartTransactionsOptInStatus: true, + chainId: CHAIN_IDS.MAINNET, + }); + + expect(setSmartTransactionsRefreshIntervalMock).toHaveBeenCalledTimes(1); + expect(setSmartTransactionsRefreshIntervalMock).toHaveBeenCalledWith(1000); + }); + + it('does not update refresh interval when feature flags do not include interval', async () => { + fetchSwapsFeatureFlagsMock.mockResolvedValue({ + smartTransactions: {}, + }); + + await runHook({ + smartTransactionsOptInStatus: true, + chainId: CHAIN_IDS.MAINNET, + }); + + expect(setSmartTransactionsRefreshIntervalMock).toHaveBeenCalledTimes(1); + expect(setSmartTransactionsRefreshIntervalMock).toHaveBeenCalledWith( + undefined, + ); + }); }); diff --git a/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.ts b/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.ts index 099327eb211f..648698b7b57d 100644 --- a/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.ts +++ b/ui/pages/confirmations/hooks/useSmartTransactionFeatureFlags.ts @@ -10,6 +10,7 @@ import { fetchSwapsFeatureFlags } from '../../swaps/swaps.util'; import { fetchSmartTransactionsLiveness, setSwapsFeatureFlags, + setSmartTransactionsRefreshInterval, } from '../../../store/actions'; import { useConfirmContext } from '../context/confirm'; @@ -40,6 +41,11 @@ export function useSmartTransactionFeatureFlags() { Promise.all([fetchSwapsFeatureFlags(), fetchSmartTransactionsLiveness()()]) .then(([swapsFeatureFlags]) => { dispatch(setSwapsFeatureFlags(swapsFeatureFlags)); + dispatch( + setSmartTransactionsRefreshInterval( + swapsFeatureFlags.smartTransactions?.batchStatusPollingInterval, + ), + ); }) .catch((error) => { log.debug('Error updating smart transaction feature flags', error); diff --git a/ui/store/actions.test.js b/ui/store/actions.test.js index c16df9838916..769f78f50e07 100644 --- a/ui/store/actions.test.js +++ b/ui/store/actions.test.js @@ -2734,4 +2734,59 @@ describe('Actions', () => { expect(store.getActions()).toStrictEqual([]); }); }); + + describe('setSmartTransactionsRefreshInterval', () => { + afterEach(() => { + sinon.restore(); + }); + + it('calls setStatusRefreshInterval in the background with provided interval', async () => { + const store = mockStore(); + const refreshInterval = 1000; + + background = { + setStatusRefreshInterval: sinon.stub().callsFake((_, cb) => cb()), + }; + setBackgroundConnection(background); + + await store.dispatch( + actions.setSmartTransactionsRefreshInterval(refreshInterval), + ); + + expect( + background.setStatusRefreshInterval.calledWith( + refreshInterval, + sinon.match.func, + ), + ).toBe(true); + }); + + it('does not call background if refresh interval is undefined', async () => { + const store = mockStore(); + + background = { + setStatusRefreshInterval: sinon.stub().callsFake((_, cb) => cb()), + }; + setBackgroundConnection(background); + + await store.dispatch( + actions.setSmartTransactionsRefreshInterval(undefined), + ); + + expect(background.setStatusRefreshInterval.called).toBe(false); + }); + + it('does not call background if refresh interval is null', async () => { + const store = mockStore(); + + background = { + setStatusRefreshInterval: sinon.stub().callsFake((_, cb) => cb()), + }; + setBackgroundConnection(background); + + await store.dispatch(actions.setSmartTransactionsRefreshInterval(null)); + + expect(background.setStatusRefreshInterval.called).toBe(false); + }); + }); }); diff --git a/ui/store/actions.ts b/ui/store/actions.ts index b6dc0bc0a7c2..c2660b8d74d9 100644 --- a/ui/store/actions.ts +++ b/ui/store/actions.ts @@ -5084,6 +5084,9 @@ export function setSmartTransactionsRefreshInterval( refreshInterval: number, ): ThunkAction { return async () => { + if (refreshInterval === undefined || refreshInterval === null) { + return; + } try { await submitRequestToBackground('setStatusRefreshInterval', [ refreshInterval, From f6b163afcb80bfff6412ca412c1219ab0d49670c Mon Sep 17 00:00:00 2001 From: Pedro Figueiredo Date: Thu, 16 Jan 2025 10:47:20 +0000 Subject: [PATCH 35/65] feat: Add new completion_time_onchain property to Transaction Finalized events (#29474) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The new property `completion_time_onchain` has the number of seconds (rounded to the hundredths) between submitted time and the block timestamp. This number is necessarily lower than the previously existing `completion_time` property, which captures the time between block validation and UI finalization and depends on the polling interval. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29474?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3503 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** Screenshot 2025-01-07 at 13 39 29 ## **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/main/.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/main/.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/scripts/lib/transaction/metrics.test.ts | 62 +++++++++++++++++++++ app/scripts/lib/transaction/metrics.ts | 33 ++++++++++- 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/app/scripts/lib/transaction/metrics.test.ts b/app/scripts/lib/transaction/metrics.test.ts index 8e2924a0e30f..58f2c9c8fc20 100644 --- a/app/scripts/lib/transaction/metrics.test.ts +++ b/app/scripts/lib/transaction/metrics.test.ts @@ -25,6 +25,7 @@ import { BlockaidReason, BlockaidResultType, } from '../../../../shared/constants/security-provider'; +import { decimalToHex } from '../../../../shared/modules/conversion.utils'; import { handleTransactionAdded, handleTransactionApproved, @@ -828,6 +829,67 @@ describe('Transaction metrics', () => { mockTransactionMetricsRequest.finalizeEventFragment, ).toHaveBeenCalledWith(expectedUniqueId); }); + + it('should create, update, finalize event fragment with completion_time_onchain', async () => { + mockTransactionMeta.txReceipt = { + gasUsed: '0x123', + status: '0x0', + }; + mockTransactionMeta.blockTimestamp = decimalToHex(124); + mockTransactionMeta.submittedTime = 123123; + + await handleTransactionConfirmed(mockTransactionMetricsRequest, { + ...mockTransactionMeta, + actionId: mockActionId, + // TODO: Replace `any` with type + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any); + + const expectedUniqueId = 'transaction-submitted-1'; + + expect(mockTransactionMetricsRequest.createEventFragment).toBeCalledTimes( + 1, + ); + expect(mockTransactionMetricsRequest.createEventFragment).toBeCalledWith({ + actionId: mockActionId, + category: MetaMetricsEventCategory.Transactions, + successEvent: TransactionMetaMetricsEvent.finalized, + uniqueIdentifier: expectedUniqueId, + persist: true, + properties: expectedProperties, + sensitiveProperties: { + ...expectedSensitiveProperties, + completion_time: expect.any(String), + completion_time_onchain: '0.88', + gas_used: '0.000000291', + status: METRICS_STATUS_FAILED, + }, + }); + + expect(mockTransactionMetricsRequest.updateEventFragment).toBeCalledTimes( + 1, + ); + expect(mockTransactionMetricsRequest.updateEventFragment).toBeCalledWith( + expectedUniqueId, + { + properties: expectedProperties, + sensitiveProperties: { + ...expectedSensitiveProperties, + completion_time: expect.any(String), + completion_time_onchain: '0.88', + gas_used: '0.000000291', + status: METRICS_STATUS_FAILED, + }, + }, + ); + + expect( + mockTransactionMetricsRequest.finalizeEventFragment, + ).toBeCalledTimes(1); + expect( + mockTransactionMetricsRequest.finalizeEventFragment, + ).toBeCalledWith(expectedUniqueId); + }); }); describe('handleTransactionDropped', () => { diff --git a/app/scripts/lib/transaction/metrics.ts b/app/scripts/lib/transaction/metrics.ts index f6f7c8c19373..02b03fc93ba3 100644 --- a/app/scripts/lib/transaction/metrics.ts +++ b/app/scripts/lib/transaction/metrics.ts @@ -232,12 +232,19 @@ export const handleTransactionConfirmed = async ( extraParams.block_number = txReceipt?.blockNumber && hexToDecimal(txReceipt.blockNumber); - const { submittedTime } = transactionMeta; + const { submittedTime, blockTimestamp } = transactionMeta; if (submittedTime) { extraParams.completion_time = getTransactionCompletionTime(submittedTime); } + if (submittedTime && blockTimestamp) { + extraParams.completion_time_onchain = getTransactionOnchainCompletionTime( + submittedTime, + blockTimestamp, + ); + } + if (txReceipt?.status === '0x0') { extraParams.status = METRICS_STATUS_FAILED; } @@ -1135,6 +1142,30 @@ function getTransactionCompletionTime(submittedTime: number) { return Math.round((Date.now() - submittedTime) / 1000).toString(); } +/** + * Returns number of seconds (rounded to the hundredths) between submitted time + * and the block timestamp. + * + * @param submittedTimeMs - The UNIX timestamp in milliseconds in which the + * transaction has been submitted + * @param blockTimestampHex - The UNIX timestamp in seconds in hexadecimal in which + * the transaction has been confirmed in a block + */ +function getTransactionOnchainCompletionTime( + submittedTimeMs: number, + blockTimestampHex: string, +): string { + const DECIMAL_DIGITS = 2; + + const blockTimestampSeconds = Number(hexToDecimal(blockTimestampHex)); + const completionTimeSeconds = blockTimestampSeconds - submittedTimeMs / 1000; + const completionTimeSecondsRounded = + Math.round(completionTimeSeconds * 10 ** DECIMAL_DIGITS) / + 10 ** DECIMAL_DIGITS; + + return completionTimeSecondsRounded.toString(); +} + /** * The allowance amount in relation to the dapp proposed amount for specific token * From 5786e7a02217ce12ae9bc9c6681f330565f9d9d3 Mon Sep 17 00:00:00 2001 From: javiergarciavera <76975121+javiergarciavera@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:19:52 +0100 Subject: [PATCH 36/65] feat: check balance switching networks e2e tests (#29345) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR covers the Solana e2e coverage with the below scenarios: - Sending SOL flow (different scenarios) - Switching accounts between different EVM and Solana - Check solana balance (there is a bug open, hence only one scenario is running) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29345?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** Test executed in chrome browser yarn build:test:flask yarn test:e2e:single test/e2e/flask/solana/check-balance.spec.ts --browser=chrome yarn test:e2e:single test/e2e/flask/solana/send-flow.spec.ts --browser=chrome yarn test:e2e:single test/e2e/flask/solana/switching-network-accounts.spec.ts --browser=chrome Test executed in firefox browser yarn build:test:flask:mv2 ENABLE_MV3=false yarn test:e2e:single test/e2e/flask/solana/check-balance.spec.ts --browser=firefox ENABLE_MV3=false yarn test:e2e:single test/e2e/flask/solana/send-flow.spec.ts --browser=firefox ENABLE_MV3=false yarn test:e2e:single test/e2e/flask/solana/switching-network-accounts.spec.ts --browser=firefox ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --------- Co-authored-by: Ulisses Ferreira Co-authored-by: Dan J Miller --- privacy-snapshot.json | 1 + test/e2e/fixture-builder.js | 5 - test/e2e/flask/btc/common-btc.ts | 2 +- test/e2e/flask/create-watch-account.spec.ts | 12 +- test/e2e/flask/solana/check-balance.spec.ts | 61 +++ test/e2e/flask/solana/common-solana.ts | 241 +++++++++- test/e2e/flask/solana/send-flow.spec.ts | 447 ++++++++++++++++++ .../solana/switching-network-accounts.spec.ts | 24 + .../page-objects/pages/account-list-page.ts | 79 +++- test/e2e/page-objects/pages/header-navbar.ts | 1 + .../pages/home/non-evm-homepage.ts | 67 +++ .../pages/send/solana-confirm-tx-page.ts | 90 ++++ .../pages/send/solana-send-page.ts | 98 ++++ .../pages/send/solana-tx-result-page.ts | 82 ++++ 14 files changed, 1178 insertions(+), 32 deletions(-) create mode 100644 test/e2e/flask/solana/check-balance.spec.ts create mode 100644 test/e2e/flask/solana/send-flow.spec.ts create mode 100644 test/e2e/flask/solana/switching-network-accounts.spec.ts create mode 100644 test/e2e/page-objects/pages/home/non-evm-homepage.ts create mode 100644 test/e2e/page-objects/pages/send/solana-confirm-tx-page.ts create mode 100644 test/e2e/page-objects/pages/send/solana-send-page.ts create mode 100644 test/e2e/page-objects/pages/send/solana-tx-result-page.ts diff --git a/privacy-snapshot.json b/privacy-snapshot.json index 24c6e9ae27da..5cd9d9d399d1 100644 --- a/privacy-snapshot.json +++ b/privacy-snapshot.json @@ -35,6 +35,7 @@ "linea-sepolia.infura.io", "localhost:8000", "localhost:8545", + "mainnet.helius-rpc.com", "mainnet.infura.io", "metamask-sdk.api.cx.metamask.io", "metamask.eth", diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 957ade6e3b98..3c1128331ba6 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -722,11 +722,6 @@ class FixtureBuilder { }); } - withPreferencesControllerAndFeatureFlag(flags) { - merge(this.fixture.data.PreferencesController, flags); - return this; - } - withAccountsController(data) { merge(this.fixture.data.AccountsController, data); return this; diff --git a/test/e2e/flask/btc/common-btc.ts b/test/e2e/flask/btc/common-btc.ts index ea9cb6b1f2e6..a9b87f11499a 100644 --- a/test/e2e/flask/btc/common-btc.ts +++ b/test/e2e/flask/btc/common-btc.ts @@ -193,7 +193,7 @@ export async function withBtcAccountSnap( await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ bitcoinSupportEnabled: bitcoinSupportEnabled ?? true, }) .build(), diff --git a/test/e2e/flask/create-watch-account.spec.ts b/test/e2e/flask/create-watch-account.spec.ts index 5cfca1dda5ef..6d0956ae4e72 100644 --- a/test/e2e/flask/create-watch-account.spec.ts +++ b/test/e2e/flask/create-watch-account.spec.ts @@ -23,7 +23,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() @@ -47,7 +47,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() @@ -113,7 +113,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() @@ -146,7 +146,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() @@ -176,7 +176,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() @@ -205,7 +205,7 @@ describe('Account-watcher snap', function (this: Suite) { await withFixtures( { fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ + .withPreferencesController({ watchEthereumAccountEnabled: true, }) .withNetworkControllerOnMainnet() diff --git a/test/e2e/flask/solana/check-balance.spec.ts b/test/e2e/flask/solana/check-balance.spec.ts new file mode 100644 index 000000000000..266c33b6de53 --- /dev/null +++ b/test/e2e/flask/solana/check-balance.spec.ts @@ -0,0 +1,61 @@ +import { Suite } from 'mocha'; +import NonEvmHomepage from '../../page-objects/pages/home/non-evm-homepage'; +import { withSolanaAccountSnap } from './common-solana'; + +describe('Check balance', function (this: Suite) { + this.timeout(300000); + it('Just created Solana account shows 0 SOL when native token is enabled', async function () { + await withSolanaAccountSnap( + { title: this.test?.fullTitle(), showNativeTokenAsMainBalance: true }, + async (driver) => { + await driver.refresh(); + const homePage = new NonEvmHomepage(driver); + await homePage.check_getBalance('0 SOL'); + }, + ); + }); + it.skip('Just created Solana account shows 0 USD when native token is not enabled', async function () { + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + solanaSupportEnabled: true, + showNativeTokenAsMainBalance: false, + }, + async (driver) => { + await driver.refresh(); + const homePage = new NonEvmHomepage(driver); + await homePage.check_getBalance(`0.00\nUSD`); + }, + ); + }); + it.skip('For a non 0 balance account - SOL balance', async function () { + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + solanaSupportEnabled: true, + showNativeTokenAsMainBalance: true, + mockCalls: true, + }, + async (driver) => { + await driver.refresh(); + const homePage = new NonEvmHomepage(driver); + await homePage.check_getBalance(`50\nSOL`); + }, + ); + }); + it.skip('For a non 0 balance account - USD balance', async function () { + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + solanaSupportEnabled: true, + showNativeTokenAsMainBalance: false, + mockCalls: true, + }, + async (driver) => { + await driver.refresh(); + const homePage = new NonEvmHomepage(driver); + await homePage.check_getBalance(`11294\nUSD`); + }, + ); + }); +}); diff --git a/test/e2e/flask/solana/common-solana.ts b/test/e2e/flask/solana/common-solana.ts index ac36d5ebed86..3c3390b55a31 100644 --- a/test/e2e/flask/solana/common-solana.ts +++ b/test/e2e/flask/solana/common-solana.ts @@ -7,31 +7,216 @@ import FixtureBuilder from '../../fixture-builder'; import { ACCOUNT_TYPE } from '../../constants'; import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow'; -const SOLANA_URL_REGEX = /^https:\/\/.*\.solana.*/u; - +const SOLANA_URL_REGEX = /.*/u; +// const SOLANA_RPC_PROVIDER = 'https://api.devnet.solana.com/'; +const SOLANA_PRICE_REGEX = + /^https:\/\/price-api\.metamask-institutional\.io\/v2\/chains\/solana:/u; +const SOLANA_BITCOIN_MIN_API = + /^https:\/\/min-api\.cryptocompare\.com\/data\/pricemulti/u; export enum SendFlowPlaceHolders { AMOUNT = 'Enter amount to send', RECIPIENT = 'Enter receiving address', LOADING = 'Preparing transaction', } +export const SOL_BALANCE = 50000000000; + +export const SOL_TO_USD_RATE = 225.88; + +export const USD_BALANCE = SOL_BALANCE * SOL_TO_USD_RATE; + +export const LAMPORTS_PER_SOL = 1_000_000_000; + +export async function mockMultiCoinPrice(mockServer: Mockttp) { + return await mockServer.forGet(SOLANA_BITCOIN_MIN_API).thenCallback(() => { + return { + statusCode: 200, + json: { + BTC: { + USD: 96155.06, + }, + SOL: { + USD: 180.5, + }, + }, + }; + }); +} + export async function mockSolanaBalanceQuote(mockServer: Mockttp) { + const response = { + statusCode: 200, + json: { + result: { + context: { + apiVersion: '2.0.18', + slot: 308460925, + }, + value: SOL_BALANCE, + }, + id: 1337, + }, + }; return await mockServer .forPost(SOLANA_URL_REGEX) .withJsonBodyIncluding({ method: 'getBalance', }) + .thenCallback(() => { + return response; + }); +} + +export async function mockGetLatestBlockhash(mockServer: Mockttp) { + const response = { + statusCode: 200, + json: { + result: { + context: { + apiVersion: '2.0.18', + slot: 308460925, + }, + value: { + blockhash: '6E9FiVcuvavWyKTfYC7N9ezJWkNgJVQsroDTHvqApncg', + lastValidBlockHeight: 341034515, + }, + }, + id: 1337, + }, + }; + return await mockServer + .forPost(SOLANA_URL_REGEX) + .withJsonBodyIncluding({ + method: 'getLatestBlockhash', + }) + .thenCallback(() => { + return response; + }); +} +export async function mockGetSignaturesForAddress(mockServer: Mockttp) { + return await mockServer + .forPost(SOLANA_URL_REGEX) + .withBodyIncluding('getSignaturesForAddress') .thenCallback(() => { return { statusCode: 200, json: { - result: { - context: { - apiVersion: '2.0.15', - slot: 305352614, + result: [ + { + blockTime: 1734620122, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '5THAXC3pHCRwwwrMHR6PJiSqFfgSkZrBhn59C7YEbTMVbiAnjZhqpPvJYs4v5aRcqUiokunfbdTgo9HLfv6bogNR', + slot: 348093552, + }, + { + blockTime: 1734619950, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '5KHuDsTMjre6rWU5Qkf8ugG31PjWoZ8NbV21ThY8RwcHpn3dKbTafdizUkEj4sU2AfrRzVxgyGkX8MLxK5nWHJ6J', + slot: 348093088, + }, + { + blockTime: 1734619916, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '2RcW9iJCGnYuGVbDbaDi93t2f2347a6gzjoQf9idDdfFTjHsC7yMYcUvGqNzouKgA8T8tdYqjNUtDf4vR4e9iUoF', + slot: 348092996, + }, + { + blockTime: 1734619899, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '2kCcoXZxe14384c8JTvq1g63pSjmmyuDnye9y3ReBMEiaZeGWspsmooEdC4RoyzP6uTfaDyFpCupBAKXnZwXCKMg', + slot: 348092952, + }, + { + blockTime: 1734619885, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '4fzwGY4Tw5C4nYMaVAY7e3ZMwz691CbT7By4F4YFdukzBxd7yspmZEHhBtuPhFrqLj1yBn6zpc4kh1GLzgcovEbx', + slot: 348092914, + }, + { + blockTime: 1734619758, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '2vgL59tfVa2VJkf7kmsGhbdBFjHdspLa1wfL72zZqHfJuzhmKfqS4YoLofpMTnZzzZfiA6712pwURheMUh5S2RXd', + slot: 348092568, }, - value: 0, - }, + { + blockTime: 1734619697, + confirmationStatus: 'finalized', + err: null, + memo: null, + signature: + '32fqeHudeNBuDmyCrmRemFppVPpWmXwT4cbfai5D7G2Vzah1BvVguLqkNuk9Pdu4xVyBD32dhnSV8AN9k4qnffSB', + slot: 348092404, + }, + ], + }, + }; + }); +} + +export async function mockSendSolanaTransaction(mockServer: Mockttp) { + const response = { + statusCode: 200, + json: { + result: + '3nqGKH1ef8WkTgKXZ8q3xKsvjktWmHHhJpZMSdbB6hBqy5dA7aLVSAUjw5okezZjKMHiNg2MF5HAqtpmsesQtnpj', + id: 1337, + }, + }; + return await mockServer + .forPost(SOLANA_URL_REGEX) + .withJsonBodyIncluding({ + method: 'sendTransaction', + }) + .thenCallback(() => { + return response; + }); +} + +export async function mockSolanaRatesCall(mockServer: Mockttp) { + return await mockServer + .forGet(SOLANA_PRICE_REGEX) + .withQuery({ vsCurrency: 'usd' }) + .thenCallback(() => { + return { + statusCode: 200, + json: { + id: 'wrapped-solana', + price: 210.57, + marketCap: 0, + allTimeHigh: 263.68, + allTimeLow: 8.11, + totalVolume: 3141761864, + high1d: 218.26, + low1d: 200.85, + circulatingSupply: 0, + dilutedMarketCap: 124394527657, + marketCapPercentChange1d: 0, + priceChange1d: -7.68288033909846, + pricePercentChange1h: 0.5794201955743261, + pricePercentChange1d: -3.520101943578202, + pricePercentChange7d: -8.192700158252544, + pricePercentChange14d: -12.477367449577399, + pricePercentChange30d: -14.588630064677465, + pricePercentChange200d: 28.111509321033513, + pricePercentChange1y: 181.48381055890258, }, }; }); @@ -41,22 +226,46 @@ export async function withSolanaAccountSnap( { title, solanaSupportEnabled, - }: { title?: string; solanaSupportEnabled?: boolean }, + showNativeTokenAsMainBalance, + mockCalls, + mockSendTransaction, + }: { + title?: string; + solanaSupportEnabled?: boolean; + showNativeTokenAsMainBalance?: boolean; + mockCalls?: boolean; + mockSendTransaction?: boolean; + }, test: (driver: Driver, mockServer: Mockttp) => Promise, ) { console.log('Starting withSolanaAccountSnap'); + let fixtures = new FixtureBuilder().withPreferencesController({ + solanaSupportEnabled: solanaSupportEnabled ?? true, + }); + if (!showNativeTokenAsMainBalance) { + fixtures = + fixtures.withPreferencesControllerShowNativeTokenAsMainBalanceDisabled(); + } await withFixtures( { - fixtures: new FixtureBuilder() - .withPreferencesControllerAndFeatureFlag({ - solanaSupportEnabled: solanaSupportEnabled ?? true, - }) - .build(), + fixtures: fixtures.build(), title, dapp: true, testSpecificMock: async (mockServer: Mockttp) => { - console.log('Setting up test-specific mocks'); - return [await mockSolanaBalanceQuote(mockServer)]; + const mockList = []; + if (mockCalls) { + mockList.push([ + await mockSolanaBalanceQuote(mockServer), + await mockSolanaRatesCall(mockServer), + await mockGetSignaturesForAddress(mockServer), + await mockMultiCoinPrice(mockServer), + await mockGetLatestBlockhash(mockServer), + ]); + } + if (mockSendTransaction) { + mockList.push(await mockSendSolanaTransaction(mockServer)); + } + return mockList; }, }, async ({ driver, mockServer }: { driver: Driver; mockServer: Mockttp }) => { diff --git a/test/e2e/flask/solana/send-flow.spec.ts b/test/e2e/flask/solana/send-flow.spec.ts new file mode 100644 index 000000000000..faeb5e1eeb21 --- /dev/null +++ b/test/e2e/flask/solana/send-flow.spec.ts @@ -0,0 +1,447 @@ +import { strict as assert } from 'assert'; +import { Suite } from 'mocha'; + +import SendSolanaPage from '../../page-objects/pages/send/solana-send-page'; +import ConfirmSolanaTxPage from '../../page-objects/pages/send/solana-confirm-tx-page'; +import SolanaTxresultPage from '../../page-objects/pages/send/solana-tx-result-page'; +import NonEvmHomepage from '../../page-objects/pages/home/non-evm-homepage'; +import { withSolanaAccountSnap } from './common-solana'; + +const commonSolanaAddress = 'GYP1hGem9HBkYKEWNUQUxEwfmu4hhjuujRgGnj5LrHna'; +describe('Send flow', function (this: Suite) { + it('with some field validation', async function () { + this.timeout(120000); + await withSolanaAccountSnap( + { title: this.test?.fullTitle(), showNativeTokenAsMainBalance: true }, + async (driver) => { + await driver.refresh(); // workaround to not get an error due to https://consensyssoftware.atlassian.net/browse/SOL-87 + const homePage = new NonEvmHomepage(driver); + await homePage.check_pageIsLoaded(); + await homePage.clickOnSendButton(); + const sendSolanaPage = new SendSolanaPage(driver); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled and it shouldn`t', + ); + await sendSolanaPage.setToAddress('2433asd'); + assert.equal( + await sendSolanaPage.check_validationErrorAppears( + 'Invalid Solana address', + ), + true, + 'Invalid Solana address should appear and it does not', + ); + await sendSolanaPage.setToAddress(''); + assert.equal( + await sendSolanaPage.check_validationErrorAppears( + 'To address is required', + ), + true, + 'To address is required should appear and it does not', + ); + await sendSolanaPage.setToAddress(commonSolanaAddress); + await sendSolanaPage.setAmount('0.1'); + assert.equal( + await sendSolanaPage.check_validationErrorAppears( + 'Insufficient balance', + ), + true, + 'Insufficient balance text is not displayed', + ); + await sendSolanaPage.setAmount('0'); + assert.equal( + await sendSolanaPage.check_validationErrorAppears( + 'Amount must be greater than 0', + ), + true, + 'Amount must be greater than 0 text is not displayed', + ); + }, + ); + }); +}); +describe('Send full flow of USD', function (this: Suite) { + it.skip('with a positive balance account', async function () { + // skipped due tohttps://consensyssoftware.atlassian.net/browse/SOL-100 + this.timeout(120000); + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + showNativeTokenAsMainBalance: true, + mockCalls: true, + mockSendTransaction: true, + }, + async (driver) => { + await driver.refresh(); // workaround to not get an error due to https://consensyssoftware.atlassian.net/browse/SOL-87 + const homePage = new NonEvmHomepage(driver); + await homePage.check_pageIsLoaded(); + assert.equal( + await homePage.check_ifSendButtonIsClickable(), + true, + 'Send button is not enabled and it should', + ); + assert.equal( + await homePage.check_ifSwapButtonIsClickable(), + false, + 'Swap button is enabled and it shouldn`t', + ); + assert.equal( + await homePage.check_ifBridgeButtonIsClickable(), + false, + 'Bridge button is enabled and it should`t', + ); + await homePage.clickOnSendButton(); + const sendSolanaPage = new SendSolanaPage(driver); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled when no address nor amount', + ); + await sendSolanaPage.setToAddress(commonSolanaAddress); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled when no address', + ); + await sendSolanaPage.clickOnSwapCurrencyButton(); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled when no address nor amount', + ); + await sendSolanaPage.setAmount('0.1'); + const confirmSolanaPage = new ConfirmSolanaTxPage(driver); + await sendSolanaPage.clickOnContinue(); + assert.equal( + await confirmSolanaPage.checkAmountDisplayed('0.1', 'USD'), + true, + 'Check amount displayed is wrong', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('From'), + true, + 'From is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Amount'), + true, + 'Amount is not displayed and it should', + ); + + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Recipient'), + true, + 'Recipient is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Network'), + true, + 'Network is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed( + 'Transaction speed', + ), + true, + 'Transaction speed is not displayed and it should', + ); + + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Network fee'), + true, + 'Network fee is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Total'), + true, + 'Total is not displayed and it should', + ); + await confirmSolanaPage.clickOnSend(); + const sentTxPage = new SolanaTxresultPage(driver); + assert.equal( + await sentTxPage.check_TransactionStatusText('0.1', true), + true, + 'Transaction amount is not correct', + ); + assert.equal( + await sentTxPage.check_TransactionStatus(true), + true, + 'Transaction was not sent as expected', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('From'), + true, + 'From field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Amount'), + true, + 'Amount field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Recipient'), + true, + 'Recipient field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Network'), + true, + 'Network field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Transaction speed'), + true, + 'Transaction field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Network fee'), + true, + 'Network fee field not displayed', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Total'), + true, + 'Total field not displayed and it should', + ); + assert.equal( + await sentTxPage.check_isViewTransactionLinkDisplayed(), + true, + 'View transaction link is not displayed and it should', + ); + }, + ); + }); +}); +describe('Send full flow of SOL', function (this: Suite) { + it('with a positive balance account', async function () { + this.timeout(120000); + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + showNativeTokenAsMainBalance: true, + mockCalls: true, + mockSendTransaction: true, + }, + async (driver) => { + await driver.refresh(); // workaround to not get an error due to https://consensyssoftware.atlassian.net/browse/SOL-87 + const homePage = new NonEvmHomepage(driver); + await homePage.check_pageIsLoaded(); + assert.equal( + await homePage.check_ifSendButtonIsClickable(), + true, + 'Send button is not enabled and it should', + ); + assert.equal( + await homePage.check_ifSwapButtonIsClickable(), + false, + 'Swap button is enabled and it shouldn`t', + ); + assert.equal( + await homePage.check_ifBridgeButtonIsClickable(), + false, + 'Bridge button is enabled and it should`t', + ); + await homePage.clickOnSendButton(); + const sendSolanaPage = new SendSolanaPage(driver); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled when no address nor amount', + ); + await sendSolanaPage.setToAddress(commonSolanaAddress); + assert.equal( + await sendSolanaPage.isContinueButtonEnabled(), + false, + 'Continue button is enabled when no address', + ); + await sendSolanaPage.setAmount('0.1'); + const confirmSolanaPage = new ConfirmSolanaTxPage(driver); + await sendSolanaPage.clickOnContinue(); + assert.equal( + await confirmSolanaPage.checkAmountDisplayed('0.1'), + true, + 'Check amount displayed is wrong', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('From'), + true, + 'From is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Amount'), + true, + 'Amount is not displayed and it should', + ); + + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Recipient'), + true, + 'Recipient is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Network'), + true, + 'Network is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed( + 'Transaction speed', + ), + true, + 'Transaction speed is not displayed and it should', + ); + + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Network fee'), + true, + 'Network fee is not displayed and it should', + ); + assert.equal( + await confirmSolanaPage.isTransactionDetailDisplayed('Total'), + true, + 'Total is not displayed and it should', + ); + await confirmSolanaPage.clickOnSend(); + const sentTxPage = new SolanaTxresultPage(driver); + assert.equal( + await sentTxPage.check_TransactionStatusText('0.1', true), + true, + 'Transaction amount is not correct', + ); + assert.equal( + await sentTxPage.check_TransactionStatus(true), + true, + 'Transaction was not sent as expected', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('From'), + true, + 'From field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Amount'), + true, + 'Amount field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Recipient'), + true, + 'Recipient field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Network'), + true, + 'Network field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Transaction speed'), + true, + 'Transaction field not displayed and it should', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Network fee'), + true, + 'Network fee field not displayed', + ); + assert.equal( + await sentTxPage.isTransactionDetailDisplayed('Total'), + true, + 'Total field not displayed and it should', + ); + assert.equal( + await sentTxPage.check_isViewTransactionLinkDisplayed(), + true, + 'View transaction link is not displayed and it should', + ); + }, + ); + }); +}); +describe('Send flow flow', function (this: Suite) { + it('and Transaction fails', async function () { + this.timeout(120000); // there is a bug open for this big timeout https://consensyssoftware.atlassian.net/browse/SOL-90 + await withSolanaAccountSnap( + { + title: this.test?.fullTitle(), + showNativeTokenAsMainBalance: true, + mockCalls: true, + mockSendTransaction: false, + }, + async (driver) => { + await driver.refresh(); // workaround to not get an error due to https://consensyssoftware.atlassian.net/browse/SOL-87 + const homePage = new NonEvmHomepage(driver); + assert.equal( + await homePage.check_ifSendButtonIsClickable(), + true, + 'Send button is not enabled and it should', + ); + assert.equal( + await homePage.check_ifSwapButtonIsClickable(), + false, + 'Swap button is enabled and it should`t', + ); + assert.equal( + await homePage.check_ifBridgeButtonIsClickable(), + false, + 'Bridge button is enabled and it should`t', + ); + await homePage.clickOnSendButton(); + const sendSolanaPage = new SendSolanaPage(driver); + await sendSolanaPage.setToAddress(commonSolanaAddress); + await sendSolanaPage.setAmount('0.1'); + // assert.equal(await sendSolanaPage.isContinueButtonEnabled(), true, "Continue button is not enabled when address and amount are set"); + await sendSolanaPage.clickOnContinue(); + const confirmSolanaPage = new ConfirmSolanaTxPage(driver); + + await confirmSolanaPage.clickOnSend(); + const failedTxPage = new SolanaTxresultPage(driver); + assert.equal( + await failedTxPage.check_TransactionStatusText('0.1', false), + true, + 'Transaction amount is not correct', + ); + assert.equal( + await failedTxPage.check_TransactionStatus(false), + true, + 'Transaction did not fail as expected', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('From'), + true, + 'From field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Amount'), + true, + 'Amount field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Recipient'), + true, + 'Recipient field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Network'), + true, + 'Network field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Transaction speed'), + true, + 'Transaction field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Network fee'), + true, + 'Network fee field not displayed and it should', + ); + assert.equal( + await failedTxPage.isTransactionDetailDisplayed('Total'), + true, + 'Total field not displayed and it should', + ); + }, + ); + }); +}); diff --git a/test/e2e/flask/solana/switching-network-accounts.spec.ts b/test/e2e/flask/solana/switching-network-accounts.spec.ts new file mode 100644 index 000000000000..f630495ca705 --- /dev/null +++ b/test/e2e/flask/solana/switching-network-accounts.spec.ts @@ -0,0 +1,24 @@ +import { Suite } from 'mocha'; +import HeaderNavbar from '../../page-objects/pages/header-navbar'; +import AccountListPage from '../../page-objects/pages/account-list-page'; +import { withSolanaAccountSnap } from './common-solana'; + +describe('Switching between account from different networks', function (this: Suite) { + it('Switch from Solana account to another Network account', async function () { + await withSolanaAccountSnap( + { title: this.test?.fullTitle() }, + async (driver) => { + const headerNavbar = new HeaderNavbar(driver); + await headerNavbar.check_pageIsLoaded(); + await headerNavbar.check_accountLabel('Solana 1'); + await headerNavbar.check_ifNetworkPickerClickable(false); + await headerNavbar.check_currentSelectedNetwork('Solana'); + await headerNavbar.openAccountMenu(); + const accountListPage = new AccountListPage(driver); + await accountListPage.selectAccount('Account 1'); + await headerNavbar.check_ifNetworkPickerClickable(true); + await headerNavbar.check_currentSelectedNetwork('Localhost 8545'); + }, + ); + }); +}); diff --git a/test/e2e/page-objects/pages/account-list-page.ts b/test/e2e/page-objects/pages/account-list-page.ts index 92eede81652b..8f24cfffede3 100644 --- a/test/e2e/page-objects/pages/account-list-page.ts +++ b/test/e2e/page-objects/pages/account-list-page.ts @@ -129,6 +129,9 @@ class AccountListPage { tag: 'h4', }; + private readonly selectAccountSelector = + '.multichain-account-list-item__account-name'; + constructor(driver: Driver) { this.driver = driver; } @@ -206,6 +209,49 @@ class AccountListPage { } } + /** + * Adds a new Solana account with optional custom name. + * + * @param options - Options for creating the Solana account + * @param [options.solanaAccountCreationEnabled] - Whether Solana account creation is enabled. If false, verifies the create button is disabled. + * @param [options.accountName] - Optional custom name for the new account + * @returns Promise that resolves when account creation is complete + */ + async addNewSolanaAccount({ + solanaAccountCreationEnabled = true, + accountName = '', + }: { + solanaAccountCreationEnabled?: boolean; + accountName?: string; + } = {}): Promise { + console.log( + `Adding new Solana account${ + accountName ? ` with custom name: ${accountName}` : ' with default name' + }`, + ); + if (solanaAccountCreationEnabled) { + await this.driver.clickElement(this.addSolanaAccountButton); + // needed to mitigate a race condition with the state update + // there is no condition we can wait for in the UI + if (accountName) { + await this.driver.fill(this.accountNameInput, accountName); + } + await this.driver.clickElementAndWaitToDisappear( + this.addAccountConfirmButton, + // Longer timeout than usual, this reduces the flakiness + // around Bitcoin account creation (mainly required for + // Firefox) + 5000, + ); + } else { + const createButton = await this.driver.findElement( + this.addSolanaAccountButton, + ); + assert.equal(await createButton.isEnabled(), false); + await this.driver.clickElement(this.closeAccountModalButton); + } + } + /** * Adds a new account of the specified type with an optional custom name. * @@ -343,10 +389,16 @@ class AccountListPage { console.log( `Check that account value and suffix ${expectedValueAndSuffix} is displayed in account list`, ); - await this.driver.waitForSelector({ - css: this.accountValueAndSuffix, - text: expectedValueAndSuffix, - }); + await this.driver.findElement(this.accountValueAndSuffix, 5000); + await this.driver.waitForSelector( + { + css: this.accountValueAndSuffix, + text: expectedValueAndSuffix, + }, + { + timeout: 20000, + }, + ); } async check_addBitcoinAccountAvailable( @@ -483,6 +535,18 @@ class AccountListPage { }); } + async check_accountNotDisplayedInAccountList( + expectedLabel: string = 'Account', + ): Promise { + console.log( + `Check that account label ${expectedLabel} is not displayed in account list`, + ); + await this.driver.assertElementNotPresent({ + css: this.accountListItem, + text: expectedLabel, + }); + } + /** * Checks that the account with the specified label is not displayed in the account list. * @@ -606,6 +670,13 @@ class AccountListPage { await this.openAccountOptionsInAccountList(accountLabel); await this.driver.assertElementNotPresent(this.removeAccountButton); } + + async selectAccount(accountLabel: string): Promise { + await this.driver.clickElement({ + css: this.selectAccountSelector, + text: accountLabel, + }); + } } export default AccountListPage; diff --git a/test/e2e/page-objects/pages/header-navbar.ts b/test/e2e/page-objects/pages/header-navbar.ts index e64fdc5a4cd7..5324def49aab 100644 --- a/test/e2e/page-objects/pages/header-navbar.ts +++ b/test/e2e/page-objects/pages/header-navbar.ts @@ -54,6 +54,7 @@ class HeaderNavbar { async openAccountMenu(): Promise { await this.driver.clickElement(this.accountMenuButton); + await this.driver.waitForSelector('.multichain-account-menu-popover__list'); } async openAccountDetailsModal(): Promise { diff --git a/test/e2e/page-objects/pages/home/non-evm-homepage.ts b/test/e2e/page-objects/pages/home/non-evm-homepage.ts new file mode 100644 index 000000000000..20e37f28595b --- /dev/null +++ b/test/e2e/page-objects/pages/home/non-evm-homepage.ts @@ -0,0 +1,67 @@ +import HomePage from './homepage'; + +class NonEvmHomepage extends HomePage { + protected readonly buySellButton = '[data-testid="coin-overview-buy"]'; + + protected readonly receiveButton = '[data-testid="coin-overview-receive"]'; + + protected readonly sendButton = '[data-testid="coin-overview-send"]'; + + protected readonly swapButton = '[data-testid="token-overview-button-swap"]'; + + /** + * Clicks the send button on the non-EVM account homepage. + */ + async clickOnSendButton(): Promise { + await this.driver.waitForControllersLoaded(); + await this.driver.clickElement(this.sendButton); + } + + /** + * Checks if the expected balance is displayed on homepage. + * + * @param balance + */ + async check_getBalance(balance: string): Promise { + console.log(`Getting Non-evm account balance`); + await this.driver.waitForSelector( + { + css: 'div', + text: balance, + }, + { timeout: 5000 }, + ); + } + + /** + * Checks if the receive button is enabled on a non-evm account homepage. + */ + async check_isReceiveButtonEnabled(): Promise { + try { + await this.driver.waitForSelector(this.receiveButton, { timeout: 5000 }); + } catch (e) { + console.log('Receive button not enabled', e); + return false; + } + console.log('Receive button is enabled'); + return true; + } + + /** + * Checks if the buy/sell button is enabled on a non-evm account homepage. + */ + async check_ifBuySellButtonIsClickable(): Promise { + try { + await this.driver.waitForSelector(this.buySellButton, { timeout: 5000 }); + const buySellButton = await this.driver.findClickableElement( + this.buySellButton, + ); + return await buySellButton.isEnabled(); + } catch (e) { + console.log('Buy/Sell button not enabled', e); + return false; + } + } +} + +export default NonEvmHomepage; diff --git a/test/e2e/page-objects/pages/send/solana-confirm-tx-page.ts b/test/e2e/page-objects/pages/send/solana-confirm-tx-page.ts new file mode 100644 index 000000000000..85086cd36659 --- /dev/null +++ b/test/e2e/page-objects/pages/send/solana-confirm-tx-page.ts @@ -0,0 +1,90 @@ +import { Driver } from '../../../webdriver/driver'; + +class ConfirmSolanaTxPage { + private driver: Driver; + + private readonly toAddressInput = '#send-to'; + + private readonly sendButton = { + text: 'Send', + tag: 'span', + }; + + private readonly cancelButton = { + text: 'Cancel', + tag: 'span', + }; + + constructor(driver: Driver) { + this.driver = driver; + } + + async checkAmountDisplayed( + amount: string, + currency: string = 'SOL', + ): Promise { + try { + await this.driver.waitForSelector({ + text: `Sending ${amount} ${currency}`, + tag: 'h2', + }); + return true; + } catch (err) { + console.log('Amount summary text incorrect'); + return false; + } + } + + async isTransactionDetailDisplayed(text: string): Promise { + const detail = await this.driver.findElement( + { + text, + tag: 'p', + }, + 200, + ); + return await detail.isDisplayed(); + } + + async setToAddress(toAddress: string): Promise { + await this.driver.pasteIntoField(this.toAddressInput, toAddress); + } + + /** + * Clicks the send button on the Solana transaction confirmation page + */ + async clickOnSend(): Promise { + const sendButton = await this.driver.findElement(this.sendButton); + await sendButton.click(); + } + + async isSendButtonEnabled(): Promise { + try { + await this.driver.findClickableElement(this.sendButton, 1000); + } catch (e) { + console.log('Send button not enabled', e); + return false; + } + console.log('Send button is enabled'); + return true; + } + + async isInsufficientBalanceDisplayed(): Promise { + try { + await this.driver.findClickableElement( + { + text: 'Insufficient balance', + tag: 'p', + }, + 1000, + ); + } catch (e) { + console.log('Insufficient balance message not displayed', e); + return false; + } + console.log('Insufficient balance message displayed'); + return true; + } +} + +export default ConfirmSolanaTxPage; diff --git a/test/e2e/page-objects/pages/send/solana-send-page.ts b/test/e2e/page-objects/pages/send/solana-send-page.ts new file mode 100644 index 000000000000..e048bd5c63df --- /dev/null +++ b/test/e2e/page-objects/pages/send/solana-send-page.ts @@ -0,0 +1,98 @@ +import { Driver } from '../../../webdriver/driver'; + +class SendSolanaPage { + private driver: Driver; + + private readonly sendAmountInput = '#send-amount-input'; + + private readonly toAddressInput = '#send-to'; + + private readonly continueButton = { + text: 'Continue', + tag: 'button', + }; + + private readonly swapCurrencyButton = '#send-swap-currency'; + + private readonly cancelButton = { + text: 'Cancel', + tag: 'button', + }; + + constructor(driver: Driver) { + this.driver = driver; + } + + async clickOnSwapCurrencyButton(): Promise { + await this.driver.waitForControllersLoaded(); + const swapCurrencyButton = await this.driver.waitForSelector( + this.swapCurrencyButton, + { timeout: 10000 }, + ); + await swapCurrencyButton.click(); + } + + async check_validationErrorAppears( + validationErrorText: string, + ): Promise { + try { + await this.driver.waitForSelector( + { + text: validationErrorText, + tag: 'p', + }, + { timeout: 5000 }, + ); + return true; + } catch (e) { + console.log(`${validationErrorText} is not displayed`); + return false; + } + } + + async setAmount(amount: string): Promise { + await this.driver.waitForControllersLoaded(); + await this.driver.waitForSelector(this.sendAmountInput, { timeout: 10000 }); + await this.driver.pasteIntoField(this.sendAmountInput, amount); + } + + async setToAddress(toAddress: string): Promise { + await this.driver.waitForControllersLoaded(); + await this.driver.waitForSelector(this.toAddressInput, { timeout: 10000 }); + await this.driver.pasteIntoField(this.toAddressInput, toAddress); + } + + async clickOnContinue(): Promise { + const continueButton = await this.driver.waitForSelector( + { + text: 'Continue', + tag: 'span', + }, + { timeout: 5000 }, + ); // Since the buttons takes a bit to get enabled, this avoid test flakiness + const clickableButton = await this.driver.findElement( + '.confirmation-page button:nth-of-type(2)', + ); + await this.driver.wait(() => clickableButton.isEnabled()); + await continueButton.click(); + } + + async isContinueButtonEnabled(): Promise { + try { + const continueButton = await this.driver.findClickableElement( + this.continueButton, + 2000, + ); + await this.driver.wait( + async () => await continueButton.isEnabled(), + 5000, + ); + return await continueButton.isEnabled(); + } catch (e) { + console.log('Continue button not enabled', e); + return false; + } + } +} + +export default SendSolanaPage; diff --git a/test/e2e/page-objects/pages/send/solana-tx-result-page.ts b/test/e2e/page-objects/pages/send/solana-tx-result-page.ts new file mode 100644 index 000000000000..41d029df2cd6 --- /dev/null +++ b/test/e2e/page-objects/pages/send/solana-tx-result-page.ts @@ -0,0 +1,82 @@ +import { Driver } from '../../../webdriver/driver'; + +class SolanaTxresultPage { + private driver: Driver; + + private readonly closeButton = { + text: 'Close', + tag: 'span', + }; + + private readonly viewTransactionLink = { + text: 'View transaction', + tag: 'span', + }; + + constructor(driver: Driver) { + this.driver = driver; + } + + async check_isViewTransactionLinkDisplayed() { + try { + await this.driver.findClickableElement(this.viewTransactionLink); + return true; + } catch (err) { + console.log('View transaction link not displayed'); + return false; + } + } + + async check_TransactionStatus(sent: boolean): Promise { + const statusText = sent ? 'Sent' : 'Transaction failed'; + try { + await this.driver.findElement({ + text: statusText, + tag: 'h2', + }); + return true; + } catch (err) { + console.log('Transaction status incorrect'); + return false; + } + } + + async check_TransactionStatusText( + amount: string, + sent: boolean, + ): Promise { + const displayedText = sent + ? `${amount} SOL was successfully sent` + : `Unable to send ${amount} SOL`; + const txStatusText = { + text: displayedText, + tag: 'p', + }; + try { + await this.driver.waitForSelector( + txStatusText, + { timeout: 5000 }, // even the tx is being mock, there is an spinner that sometimes is slow to disappear + ); + return true; + } catch (err) { + console.log( + `Transaction status text incorrect, expected ${displayedText} did not match`, + ); + return false; + } + } + + async isTransactionDetailDisplayed(text: string): Promise { + const detail = await this.driver.waitForSelector({ + text, + tag: 'p', + }); + return await detail.isDisplayed(); + } + + async clickOnClose(): Promise { + await this.driver.clickElement(this.closeButton); + } +} + +export default SolanaTxresultPage; From 66c994ac4ffae3bbdde98482d0aa09f162355b9e Mon Sep 17 00:00:00 2001 From: Pedro Figueiredo Date: Thu, 16 Jan 2025 13:17:54 +0000 Subject: [PATCH 37/65] feat: Remove 'Improved transactions requests' toggle (#29695) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** We [recently enabled the transaction redesign for all users by default](https://github.com/MetaMask/metamask-extension/pull/28321). We also [migrated some existing e2e tests to corresponding e2e tests for redesigned flows](https://github.com/MetaMask/metamask-extension/pull/28780). This PR removes the toggle that allowed users to opt out of the redesigned confirmations. It also removes the e2e tests for old confirmation flows that are no longer visible in any scenario. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29695?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3030 ## **Manual testing steps** 1. Open experimental settings. 2. The option toggle shouldn't be there. 3. Create a new transaction confirmation 4. It should be redesigned. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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/de/messages.json | 6 - app/_locales/el/messages.json | 6 - app/_locales/en/messages.json | 6 - app/_locales/es/messages.json | 6 - app/_locales/fr/messages.json | 6 - app/_locales/hi/messages.json | 6 - app/_locales/id/messages.json | 6 - app/_locales/ja/messages.json | 6 - app/_locales/ko/messages.json | 6 - app/_locales/pt/messages.json | 6 - app/_locales/ru/messages.json | 6 - app/_locales/tl/messages.json | 6 - app/_locales/tr/messages.json | 6 - app/_locales/vi/messages.json | 6 - app/_locales/zh_CN/messages.json | 6 - app/scripts/constants/sentry-state.ts | 1 - .../preferences-controller.test.ts | 2 - .../controllers/preferences-controller.ts | 2 - app/scripts/lib/transaction/metrics.test.ts | 1 - app/scripts/lib/transaction/metrics.ts | 3 - app/scripts/metamask-controller.js | 7 - app/scripts/migrations/138.test.ts | 79 + app/scripts/migrations/138.ts | 47 + app/scripts/migrations/index.js | 1 + shared/lib/confirmation.utils.test.ts | 54 - shared/lib/confirmation.utils.ts | 15 +- shared/modules/metametrics.test.ts | 1 - test/data/confirmations/helper.ts | 5 - test/e2e/helpers.js | 41 - test/e2e/json-rpc/eth_sendTransaction.spec.js | 246 +-- test/e2e/json-rpc/switchEthereumChain.spec.js | 929 +++++----- .../e2e/snaps/test-snap-txinsights-v2.spec.js | 174 -- test/e2e/snaps/test-snap-txinsights.spec.js | 322 ++-- test/e2e/tests/account/add-account.spec.ts | 305 ++-- .../account/snap-account-transfers.spec.ts | 435 ++--- .../contract-interactions.spec.js | 97 - .../dapp-interactions/dapp-tx-edit.spec.js | 81 - .../failing-contract.spec.js | 161 -- ...rs-after-init-opt-in-background-state.json | 1 - .../errors-after-init-opt-in-ui-state.json | 1 - test/e2e/tests/network/network-error.spec.js | 83 - .../petnames/petnames-transactions.spec.js | 270 +-- ...lockaid-alert-contract-interaction.spec.js | 1 - .../ppom-blockaid-alert-simple-send.spec.js | 255 ++- .../batch-txs-per-dapp-diff-network.spec.js | 299 +--- .../batch-txs-per-dapp-extra-tx.spec.js | 465 ++--- .../batch-txs-per-dapp-same-network.spec.js | 389 ++-- .../dapp1-send-dapp2-signTypedData.spec.js | 427 ++--- ...-switch-dapp2-eth-request-accounts.spec.js | 322 ++-- .../dapp1-switch-dapp2-send.spec.js | 775 +++----- ...multi-dapp-sendTx-revokePermission.spec.js | 349 ++-- .../multiple-networks-dapps-txs.spec.js | 340 ++-- .../request-queuing/switch-network.spec.js | 215 +-- test/e2e/tests/request-queuing/ui.spec.js | 1570 ++++++----------- .../metamask-responsive-ui.spec.js | 380 ++-- .../tests/settings/4byte-directory.spec.js | 100 -- test/e2e/tests/settings/show-hex-data.spec.js | 97 - .../tokens/custom-token-add-approve.spec.js | 458 ----- .../tokens/custom-token-send-transfer.spec.js | 558 ++---- .../tokens/increase-token-allowance.spec.js | 316 ---- .../tokens/nft/erc1155-interaction.spec.js | 331 ---- .../tokens/nft/erc721-interaction.spec.js | 1027 ----------- test/e2e/tests/tokens/nft/send-nft.spec.js | 170 -- .../tests/transaction/change-assets.spec.js | 1051 ++++------- .../tests/transaction/edit-gas-fee.spec.js | 668 +++---- .../tests/transaction/gas-estimates.spec.js | 699 +++----- .../transaction/multiple-transactions.spec.js | 343 ++-- .../transaction/navigate-transactions.spec.js | 475 ++--- test/e2e/tests/transaction/send-edit.spec.js | 523 ++---- test/e2e/tests/transaction/send-eth.spec.js | 1000 ++++------- .../transaction/send-hex-address.spec.js | 582 +++--- .../e2e/tests/transaction/simple-send.spec.ts | 49 - ui/helpers/constants/settings.js | 8 - ui/helpers/utils/settings-search.test.js | 2 +- .../hooks/useCurrentConfirmation.test.ts | 33 +- .../hooks/useCurrentConfirmation.ts | 6 - .../experimental-tab.component.tsx | 20 - .../experimental-tab.container.ts | 5 - .../experimental-tab/experimental-tab.test.js | 2 +- ui/selectors/selectors.js | 5 - ui/store/actions.ts | 4 - 81 files changed, 4901 insertions(+), 12872 deletions(-) create mode 100644 app/scripts/migrations/138.test.ts create mode 100644 app/scripts/migrations/138.ts delete mode 100644 test/e2e/snaps/test-snap-txinsights-v2.spec.js delete mode 100644 test/e2e/tests/dapp-interactions/contract-interactions.spec.js delete mode 100644 test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js delete mode 100644 test/e2e/tests/dapp-interactions/failing-contract.spec.js delete mode 100644 test/e2e/tests/network/network-error.spec.js delete mode 100644 test/e2e/tests/settings/4byte-directory.spec.js delete mode 100644 test/e2e/tests/settings/show-hex-data.spec.js delete mode 100644 test/e2e/tests/tokens/custom-token-add-approve.spec.js delete mode 100644 test/e2e/tests/tokens/increase-token-allowance.spec.js delete mode 100644 test/e2e/tests/tokens/nft/erc1155-interaction.spec.js delete mode 100644 test/e2e/tests/tokens/nft/erc721-interaction.spec.js delete mode 100644 test/e2e/tests/tokens/nft/send-nft.spec.js delete mode 100644 test/e2e/tests/transaction/simple-send.spec.ts diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 982c32b4ebde..738bd2e9c993 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Schalten Sie dies ein, um sich Unterschriftsanfragen in einem erweiterten Format anzeigen zu lassen." }, - "redesignedTransactionsEnabledToggle": { - "message": "Verbesserte Transaktionsanfragen" - }, - "redesignedTransactionsToggleDescription": { - "message": "Schalten Sie dies ein, um sich Transaktionsanfragen in einem erweiterten Format anzeigen zu lassen." - }, "refreshList": { "message": "Liste aktualisieren" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 1d3f561a6b67..3699ca150767 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Ενεργοποιήστε το για να δείτε αιτήματα υπογραφών σε βελτιωμένη μορφή." }, - "redesignedTransactionsEnabledToggle": { - "message": "Βελτιωμένα αιτήματα συναλλαγών" - }, - "redesignedTransactionsToggleDescription": { - "message": "Ενεργοποιήστε το για να δείτε τα αιτήματα συναλλαγών σε βελτιωμένη μορφή." - }, "refreshList": { "message": "Ανανέωση λίστας" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index bc681b5fec49..96201a041778 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -4551,12 +4551,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Turn this on to see signature requests in an enhanced format." }, - "redesignedTransactionsEnabledToggle": { - "message": "Improved transaction requests" - }, - "redesignedTransactionsToggleDescription": { - "message": "Turn this on to see transactions requests in an enhanced format." - }, "refreshList": { "message": "Refresh list" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index a4c72cf9b1f2..756afb982bd6 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Active esta opción para ver las solicitudes de firma en un formato mejorado." }, - "redesignedTransactionsEnabledToggle": { - "message": "Solicitudes de transacción mejoradas" - }, - "redesignedTransactionsToggleDescription": { - "message": "Active esta opción para ver las solicitudes de transacciones en un formato mejorado." - }, "refreshList": { "message": "Actualizar lista" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 5e164aabd8ed..42a95559f56b 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Activez cette option pour afficher les demandes de signature dans un format amélioré." }, - "redesignedTransactionsEnabledToggle": { - "message": "Demandes de transaction améliorées" - }, - "redesignedTransactionsToggleDescription": { - "message": "Activez cette option pour afficher les demandes de transaction dans un format amélioré." - }, "refreshList": { "message": "Rafraîchir la liste" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 609997fbfaab..50125ec0d79c 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "उन्नत फॉर्मेट में सिग्नेचर अनुरोध देखने के लिए इसे चालू करें।" }, - "redesignedTransactionsEnabledToggle": { - "message": "बेहतर ट्रांसेक्शन के अनुरोध" - }, - "redesignedTransactionsToggleDescription": { - "message": "उन्नत फॉर्मेट में ट्रांसेक्शन के अनुरोध देखने के लिए इसे चालू करें।" - }, "refreshList": { "message": "लिस्ट रिफ्रेश करें" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 9c6316598714..071326a6c1a1 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Aktifkan ini untuk melihat permintaan tanda tangan dalam format yang disempurnakan." }, - "redesignedTransactionsEnabledToggle": { - "message": "Penyempurnaan permintaan transaksi" - }, - "redesignedTransactionsToggleDescription": { - "message": "Aktifkan ini untuk melihat permintaan transaksi dalam format yang disempurnakan." - }, "refreshList": { "message": "Segarkan daftar" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 70185fd0d249..bf75f9942957 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "この機能をオンにすると、強化された形式で署名要求が表示されます。" }, - "redesignedTransactionsEnabledToggle": { - "message": "改善されたトランザクション要求" - }, - "redesignedTransactionsToggleDescription": { - "message": "トランザクション要求を強化された形式で表示するには、この機能をオンにします。" - }, "refreshList": { "message": "リストを更新" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 7201073a4fb8..94cefdda4a2a 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "이 기능을 켜면 개선된 형식의 서명 요청을 확인할 수 있습니다." }, - "redesignedTransactionsEnabledToggle": { - "message": "개선된 트랜잭션 요청" - }, - "redesignedTransactionsToggleDescription": { - "message": "이 기능을 켜면 개선된 형식의 트랜잭션 요청을 확인할 수 있습니다." - }, "refreshList": { "message": "새로 고침 목록" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 84391c664ac8..a253965e5c49 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -4316,12 +4316,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Ative para ver as solicitações de assinatura em um formato aprimorado." }, - "redesignedTransactionsEnabledToggle": { - "message": "Solicitações de transação aprimoradas" - }, - "redesignedTransactionsToggleDescription": { - "message": "Ative esta opção para ver as solicitações de transação em formato aprimorado." - }, "refreshList": { "message": "Atualizar lista" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index db2cea40a211..94152af78d86 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Включите эту опцию, чтобы видеть запросы на подпись в расширенном формате." }, - "redesignedTransactionsEnabledToggle": { - "message": "Улучшенные запросы транзакций" - }, - "redesignedTransactionsToggleDescription": { - "message": "Включите эту опцию, чтобы видеть запросы транзакций в расширенном формате." - }, "refreshList": { "message": "Обновить список" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 4a6f19d620cb..6f143d4adcd5 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "I-on ito upang makita ang mga hiling sa pirma sa isang pinahusay na format." }, - "redesignedTransactionsEnabledToggle": { - "message": "Pinahusay na mga hiling sa transaksyon" - }, - "redesignedTransactionsToggleDescription": { - "message": "I-on ito upang makita ang mga hiling sa transaksyon sa isang pinahusay na format." - }, "refreshList": { "message": "I-refresh ang listahan" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 4a204d6e5780..fd4b226a10e8 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "İmza taleplerini geliştirilmiş bir biçimde görmek için bunu açın." }, - "redesignedTransactionsEnabledToggle": { - "message": "İşlem talepleri iyileştirildi" - }, - "redesignedTransactionsToggleDescription": { - "message": "İşlem taleplerini gelişmiş bir biçimde görmek için bunu açın." - }, "refreshList": { "message": "Listeyi yenile" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 596fbe6bbb53..86d8bfd7f6f3 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "Bật tính năng này để xem các yêu cầu chữ ký ở định dạng nâng cao." }, - "redesignedTransactionsEnabledToggle": { - "message": "Yêu cầu giao dịch được cải thiện" - }, - "redesignedTransactionsToggleDescription": { - "message": "Bật tính năng này để xem các yêu cầu giao dịch ở định dạng nâng cao." - }, "refreshList": { "message": "Làm mới danh sách" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 6c422cad61fe..7b26302aa8d8 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -4313,12 +4313,6 @@ "redesignedConfirmationsToggleDescription": { "message": "开启此选项以查看增强格式的签名请求。" }, - "redesignedTransactionsEnabledToggle": { - "message": "经过改进的交易请求" - }, - "redesignedTransactionsToggleDescription": { - "message": "开启此选项以查看增强格式的交易请求。" - }, "refreshList": { "message": "刷新列表" }, diff --git a/app/scripts/constants/sentry-state.ts b/app/scripts/constants/sentry-state.ts index 2ffe46898225..91fb10f4efc7 100644 --- a/app/scripts/constants/sentry-state.ts +++ b/app/scripts/constants/sentry-state.ts @@ -249,7 +249,6 @@ export const SENTRY_BACKGROUND_STATE = { autoLockTimeLimit: true, hideZeroBalanceTokens: true, redesignedConfirmationsEnabled: true, - redesignedTransactionsEnabled: false, isRedesignedConfirmationsDeveloperEnabled: false, showExtensionInFullSizeView: true, showFiatInTestnets: true, diff --git a/app/scripts/controllers/preferences-controller.test.ts b/app/scripts/controllers/preferences-controller.test.ts index eac95430ec3a..a9049bec7758 100644 --- a/app/scripts/controllers/preferences-controller.test.ts +++ b/app/scripts/controllers/preferences-controller.test.ts @@ -726,7 +726,6 @@ describe('preferences controller', () => { hideZeroBalanceTokens: false, petnamesEnabled: true, redesignedConfirmationsEnabled: true, - redesignedTransactionsEnabled: true, shouldShowAggregatedBalancePopover: true, featureNotificationsEnabled: false, isRedesignedConfirmationsDeveloperEnabled: false, @@ -757,7 +756,6 @@ describe('preferences controller', () => { petnamesEnabled: true, privacyMode: false, redesignedConfirmationsEnabled: true, - redesignedTransactionsEnabled: true, shouldShowAggregatedBalancePopover: true, featureNotificationsEnabled: false, isRedesignedConfirmationsDeveloperEnabled: false, diff --git a/app/scripts/controllers/preferences-controller.ts b/app/scripts/controllers/preferences-controller.ts index 8a09539ea917..447d9ec0847f 100644 --- a/app/scripts/controllers/preferences-controller.ts +++ b/app/scripts/controllers/preferences-controller.ts @@ -110,7 +110,6 @@ export type Preferences = { hideZeroBalanceTokens: boolean; petnamesEnabled: boolean; redesignedConfirmationsEnabled: boolean; - redesignedTransactionsEnabled: boolean; featureNotificationsEnabled: boolean; showMultiRpcModal: boolean; privacyMode: boolean; @@ -223,7 +222,6 @@ export const getDefaultPreferencesControllerState = hideZeroBalanceTokens: false, petnamesEnabled: true, redesignedConfirmationsEnabled: true, - redesignedTransactionsEnabled: true, featureNotificationsEnabled: false, isRedesignedConfirmationsDeveloperEnabled: false, showConfirmationAdvancedDetails: false, diff --git a/app/scripts/lib/transaction/metrics.test.ts b/app/scripts/lib/transaction/metrics.test.ts index 58f2c9c8fc20..ad28d22967f3 100644 --- a/app/scripts/lib/transaction/metrics.test.ts +++ b/app/scripts/lib/transaction/metrics.test.ts @@ -75,7 +75,6 @@ const mockTransactionMetricsRequest = { trackEvent: jest.fn(), getIsSmartTransaction: jest.fn(), getSmartTransactionByMinedTxHash: jest.fn(), - getRedesignedTransactionsEnabled: jest.fn(), getMethodData: jest.fn(), getIsRedesignedConfirmationsDeveloperEnabled: jest.fn(), getIsConfirmationAdvancedDetailsOpen: jest.fn(), diff --git a/app/scripts/lib/transaction/metrics.ts b/app/scripts/lib/transaction/metrics.ts index 02b03fc93ba3..ddea334562ba 100644 --- a/app/scripts/lib/transaction/metrics.ts +++ b/app/scripts/lib/transaction/metrics.ts @@ -102,7 +102,6 @@ export type TransactionMetricsRequest = { getSmartTransactionByMinedTxHash: ( txhash: string | undefined, ) => SmartTransaction; - getRedesignedTransactionsEnabled: () => boolean; getMethodData: (data: string) => Promise<{ name: string }>; getIsRedesignedConfirmationsDeveloperEnabled: () => boolean; getIsConfirmationAdvancedDetailsOpen: () => boolean; @@ -1024,8 +1023,6 @@ async function buildEventFragmentProperties({ const isRedesignedForTransaction = shouldUseRedesignForTransactions({ transactionMetadataType: transactionMeta.type as TransactionType, - isRedesignedTransactionsUserSettingEnabled: - transactionMetricsRequest.getRedesignedTransactionsEnabled(), isRedesignedConfirmationsDeveloperEnabled: transactionMetricsRequest.getIsRedesignedConfirmationsDeveloperEnabled(), }); diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 8f911a8a7b2c..b33e05b9f2c0 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -6665,11 +6665,6 @@ export default class MetamaskController extends EventEmitter { .redesignedConfirmationsEnabled; } - isTransactionsRedesignEnabled() { - return this.preferencesController.state.preferences - .redesignedTransactionsEnabled; - } - isConfirmationRedesignDeveloperEnabled() { return this.preferencesController.state.preferences .isRedesignedConfirmationsDeveloperEnabled; @@ -6861,8 +6856,6 @@ export default class MetamaskController extends EventEmitter { }, getRedesignedConfirmationsEnabled: this.isConfirmationRedesignEnabled.bind(this), - getRedesignedTransactionsEnabled: - this.isTransactionsRedesignEnabled.bind(this), getMethodData: (data) => { if (!data) { return null; diff --git a/app/scripts/migrations/138.test.ts b/app/scripts/migrations/138.test.ts new file mode 100644 index 000000000000..1084d6b08136 --- /dev/null +++ b/app/scripts/migrations/138.test.ts @@ -0,0 +1,79 @@ +import { migrate, version } from './138'; + +const oldVersion = 137; + +describe(`migration #${version}`, () => { + it('updates the version metadata', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: {}, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.meta).toStrictEqual({ version }); + }); + + describe(`migration #${version}`, () => { + it('removes the redesignedTransactionsEnabled preference if it is set to true', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + PreferencesController: { + preferences: { + redesignedTransactionsEnabled: true, + }, + }, + }, + }; + const expectedData = { + PreferencesController: { + preferences: {}, + }, + }; + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + + it('removes the redesignedTransactionsEnabled preference if it is set to false', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + PreferencesController: { + preferences: { + redesignedTransactionsEnabled: false, + }, + }, + }, + }; + const expectedData = { + PreferencesController: { + preferences: {}, + }, + }; + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + + it('does nothing to other PreferencesController state if there is not a redesignedTransactionsEnabled preference', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + PreferencesController: { + existingPreference: true, + }, + }, + }; + + const expectedData = { + PreferencesController: { + existingPreference: true, + }, + }; + + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + }); +}); diff --git a/app/scripts/migrations/138.ts b/app/scripts/migrations/138.ts new file mode 100644 index 000000000000..a4a51348bffc --- /dev/null +++ b/app/scripts/migrations/138.ts @@ -0,0 +1,47 @@ +import { hasProperty } from '@metamask/utils'; +import { cloneDeep } from 'lodash'; + +type VersionedData = { + meta: { version: number }; + data: Record; +}; + +export const version = 138; + +/** + * This migration deletes the preference `redesignedTransactionsEnabled` if the + * user has existing data. + * + * @param originalVersionedData - Versioned MetaMask extension state, exactly + * what we persist to dist. + * @param originalVersionedData.meta - State metadata. + * @param originalVersionedData.meta.version - The current state version. + * @param originalVersionedData.data - The persisted MetaMask state, keyed by + * controller. + * @returns Updated versioned MetaMask extension state. + */ +export async function migrate( + originalVersionedData: VersionedData, +): Promise { + const versionedData = cloneDeep(originalVersionedData); + versionedData.meta.version = version; + transformState(versionedData.data); + return versionedData; +} + +function transformState(state: Record) { + const preferencesControllerState = state?.PreferencesController as + | Record + | undefined; + + const preferences = preferencesControllerState?.preferences as + | Record + | undefined; + + if ( + preferences && + hasProperty(preferences, 'redesignedTransactionsEnabled') + ) { + delete preferences.redesignedTransactionsEnabled; + } +} diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js index 67fb73bdaae6..20abaecd4b3b 100644 --- a/app/scripts/migrations/index.js +++ b/app/scripts/migrations/index.js @@ -161,6 +161,7 @@ const migrations = [ require('./135'), require('./136'), require('./137'), + require('./138'), ]; export default migrations; diff --git a/shared/lib/confirmation.utils.test.ts b/shared/lib/confirmation.utils.test.ts index 552d78827a2e..bce20ec4f4db 100644 --- a/shared/lib/confirmation.utils.test.ts +++ b/shared/lib/confirmation.utils.test.ts @@ -21,30 +21,6 @@ describe('confirmation.utils', () => { const unsupportedTransactionType = TransactionType.swap; - describe('when user setting is enabled', () => { - it('should return true for supported transaction types', () => { - supportedTransactionTypes.forEach((transactionType) => { - expect( - shouldUseRedesignForTransactions({ - transactionMetadataType: transactionType, - isRedesignedTransactionsUserSettingEnabled: true, // user setting enabled - isRedesignedConfirmationsDeveloperEnabled: false, // developer mode disabled - }), - ).toBe(true); - }); - }); - - it('should return false for unsupported transaction types', () => { - expect( - shouldUseRedesignForTransactions({ - transactionMetadataType: unsupportedTransactionType, - isRedesignedTransactionsUserSettingEnabled: true, // user setting enabled - isRedesignedConfirmationsDeveloperEnabled: false, // developer mode disabled - }), - ).toBe(false); - }); - }); - describe('when developer mode is enabled', () => { const originalEnv = process.env; @@ -63,7 +39,6 @@ describe('confirmation.utils', () => { expect( shouldUseRedesignForTransactions({ transactionMetadataType: transactionType, - isRedesignedTransactionsUserSettingEnabled: false, // user setting disabled isRedesignedConfirmationsDeveloperEnabled: false, // developer setting disabled }), ).toBe(true); @@ -75,7 +50,6 @@ describe('confirmation.utils', () => { expect( shouldUseRedesignForTransactions({ transactionMetadataType: transactionType, - isRedesignedTransactionsUserSettingEnabled: false, // user setting disabled isRedesignedConfirmationsDeveloperEnabled: true, // developer setting enabled }), ).toBe(true); @@ -88,39 +62,11 @@ describe('confirmation.utils', () => { expect( shouldUseRedesignForTransactions({ transactionMetadataType: unsupportedTransactionType, - isRedesignedTransactionsUserSettingEnabled: false, // user setting disabled isRedesignedConfirmationsDeveloperEnabled: true, // developer setting enabled }), ).toBe(false); }); }); - - describe('when both user setting and developer mode are disabled', () => { - const originalEnv = process.env; - - beforeEach(() => { - process.env = { ...originalEnv }; - process.env.ENABLE_CONFIRMATION_REDESIGN = 'false'; - }); - - afterEach(() => { - process.env = originalEnv; - }); - - it('should return false for all transaction types', () => { - [...supportedTransactionTypes, unsupportedTransactionType].forEach( - (transactionType) => { - expect( - shouldUseRedesignForTransactions({ - transactionMetadataType: transactionType, - isRedesignedTransactionsUserSettingEnabled: false, // user setting disabled - isRedesignedConfirmationsDeveloperEnabled: false, // developer setting disabled - }), - ).toBe(false); - }, - ); - }); - }); }); describe('shouldUseRedesignForSignatures', () => { diff --git a/shared/lib/confirmation.utils.ts b/shared/lib/confirmation.utils.ts index 24c5f258a5d0..380845c396f3 100644 --- a/shared/lib/confirmation.utils.ts +++ b/shared/lib/confirmation.utils.ts @@ -30,23 +30,17 @@ const REDESIGN_DEV_TRANSACTION_TYPES = [...REDESIGN_USER_TRANSACTION_TYPES]; * based on user settings and developer mode * * @param opts.transactionMetadataType - The type of transaction to check - * @param opts.isRedesignedTransactionsUserSettingEnabled - Whether the user has enabled the redesigned flow * @param opts.isRedesignedConfirmationsDeveloperEnabled - Whether developer mode is enabled */ export function shouldUseRedesignForTransactions({ transactionMetadataType, - isRedesignedTransactionsUserSettingEnabled, isRedesignedConfirmationsDeveloperEnabled, }: { transactionMetadataType?: TransactionType; - isRedesignedTransactionsUserSettingEnabled: boolean; isRedesignedConfirmationsDeveloperEnabled: boolean; }): boolean { return ( - shouldUseRedesignForTransactionsUserMode( - isRedesignedTransactionsUserSettingEnabled, - transactionMetadataType, - ) || + shouldUseRedesignForTransactionsUserMode(transactionMetadataType) || shouldUseRedesignForTransactionsDeveloperMode( isRedesignedConfirmationsDeveloperEnabled, transactionMetadataType, @@ -155,15 +149,10 @@ function shouldUseRedesignForTransactionsDeveloperMode( * Determines if the redesigned confirmation flow should be used for transactions * when in user mode * - * @param isRedesignedTransactionsUserSettingEnabled - Whether the user has enabled the redesigned flow * @param transactionMetadataType - The type of transaction to check */ function shouldUseRedesignForTransactionsUserMode( - isRedesignedTransactionsUserSettingEnabled: boolean, transactionMetadataType?: TransactionType, ): boolean { - return ( - isRedesignedTransactionsUserSettingEnabled && - isCorrectUserTransactionType(transactionMetadataType) - ); + return isCorrectUserTransactionType(transactionMetadataType); } diff --git a/shared/modules/metametrics.test.ts b/shared/modules/metametrics.test.ts index b6fe2f8ac0a2..a77afb4132d3 100644 --- a/shared/modules/metametrics.test.ts +++ b/shared/modules/metametrics.test.ts @@ -41,7 +41,6 @@ const createTransactionMetricsRequest = (customProps = {}) => { trackEvent: jest.fn(), getIsSmartTransaction: jest.fn(), getSmartTransactionByMinedTxHash: jest.fn(), - getRedesignedTransactionsEnabled: jest.fn(), getMethodData: jest.fn(), getIsRedesignedConfirmationsDeveloperEnabled: jest.fn(), getIsConfirmationAdvancedDetailsOpen: jest.fn(), diff --git a/test/data/confirmations/helper.ts b/test/data/confirmations/helper.ts index b8bd8a634588..e4f0d58ea29d 100644 --- a/test/data/confirmations/helper.ts +++ b/test/data/confirmations/helper.ts @@ -29,7 +29,6 @@ export const getMockTypedSignConfirmState = ( ...args.metamask, preferences: { ...mockState.metamask.preferences, - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, @@ -56,7 +55,6 @@ export const getMockTypedSignConfirmStateForRequest = ( ...args.metamask, preferences: { ...mockState.metamask.preferences, - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, @@ -82,7 +80,6 @@ export const getMockPersonalSignConfirmState = ( ...args.metamask, preferences: { ...mockState.metamask.preferences, - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, @@ -109,7 +106,6 @@ export const getMockPersonalSignConfirmStateForRequest = ( ...args.metamask, preferences: { ...mockState.metamask.preferences, - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, @@ -134,7 +130,6 @@ export const getMockConfirmState = (args: RootState = { metamask: {} }) => ({ preferences: { ...mockState.metamask.preferences, ...(args.metamask?.preferences as Record), - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index 7d675788f5bd..046622514727 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -928,46 +928,6 @@ async function tempToggleSettingRedesignedConfirmations(driver) { ); } -/** - * Rather than using the FixtureBuilder#withPreferencesController to set the setting - * we need to manually set the setting because the migration #132 overrides this. - * We should be able to remove this when we delete the redesignedTransactionsEnabled setting. - * - * @param driver - */ -async function tempToggleSettingRedesignedTransactionConfirmations(driver) { - // Ensure we are on the extension window - await driver.switchToWindowWithTitle(WINDOW_TITLES.ExtensionInFullScreenView); - - // Open settings menu button - await driver.clickElement('[data-testid="account-options-menu-button"]'); - - // fix race condition with mmi build - if (process.env.MMI) { - await driver.waitForSelector('[data-testid="global-menu-mmi-portfolio"]'); - } - - // Click settings from dropdown menu - await driver.clickElement('[data-testid="global-menu-settings"]'); - - // Click Experimental tab - const experimentalTabRawLocator = { - text: 'Experimental', - tag: 'div', - }; - await driver.clickElement(experimentalTabRawLocator); - - // Click redesigned transactions toggle - await driver.clickElement( - '[data-testid="toggle-redesigned-transactions-container"]', - ); - - // Close settings page - await driver.clickElement( - '.settings-page__header__title-container__close-button', - ); -} - /** * Opens the account options menu safely, handling potential race conditions * with the MMI build. @@ -1037,7 +997,6 @@ module.exports = { editGasFeeForm, clickNestedButton, tempToggleSettingRedesignedConfirmations, - tempToggleSettingRedesignedTransactionConfirmations, openMenuSafe, sentryRegEx, createWebSocketConnection, diff --git a/test/e2e/json-rpc/eth_sendTransaction.spec.js b/test/e2e/json-rpc/eth_sendTransaction.spec.js index 2167fe6586c5..6d135683c3ad 100644 --- a/test/e2e/json-rpc/eth_sendTransaction.spec.js +++ b/test/e2e/json-rpc/eth_sendTransaction.spec.js @@ -4,7 +4,6 @@ const { unlockWallet, WINDOW_TITLES, generateGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../helpers'); const FixtureBuilder = require('../fixture-builder'); @@ -12,165 +11,104 @@ describe('eth_sendTransaction', function () { const expectedHash = '0x855951a65dcf5949dc54beb032adfb604c52a0a548a0f616799d6873a9521470'; - describe('Old confirmation screens', function () { - it('rejects a new transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + it('confirms a new transaction', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // eth_sendTransaction + await driver.openNewPage(`http://127.0.0.1:8080`); + const request = JSON.stringify({ + jsonrpc: '2.0', + method: 'eth_sendTransaction', + params: [ + { + to: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + from: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + value: '0x0', + maxPriorityFeePerGas: '0x3b9aca00', + maxFeePerGas: '0x2540be400', + }, + ], + id: 0, + }); + await driver.executeScript( + `window.transactionHash = window.ethereum.request(${request})`, + ); - // eth_sendTransaction - await driver.openNewPage(`http://127.0.0.1:8080`); - const request = JSON.stringify({ - jsonrpc: '2.0', - method: 'eth_sendTransaction', - params: [ - { - to: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - from: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - value: '0x0', - maxPriorityFeePerGas: '0x3b9aca00', - maxFeePerGas: '0x2540be400', - }, - ], - id: 0, - }); - await driver.executeScript( - `window.transactionHash = window.ethereum.request(${request})`, - ); - - // reject transaction in mm popup - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Reject', tag: 'button' }); - await driver.switchToWindowWithTitle('E2E Test Dapp'); - const result = await driver - .executeScript(`return window.transactionHash;`) - .then((data) => { - return data; - }) - .catch((err) => { - return err; - }); - assert.ok( - result.message.includes( - 'MetaMask Tx Signature: User denied transaction signature.', - ), - ); - }, - ); - }); + // confirm transaction in mm popup + await driver.waitUntilXWindowHandles(3); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.switchToWindowWithTitle('E2E Test Dapp'); + const actualHash = await driver.executeScript( + `return window.transactionHash;`, + ); + assert.equal(actualHash, expectedHash); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('confirms a new transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // eth_sendTransaction - await driver.openNewPage(`http://127.0.0.1:8080`); - const request = JSON.stringify({ - jsonrpc: '2.0', - method: 'eth_sendTransaction', - params: [ - { - to: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - from: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - value: '0x0', - maxPriorityFeePerGas: '0x3b9aca00', - maxFeePerGas: '0x2540be400', - }, - ], - id: 0, - }); - await driver.executeScript( - `window.transactionHash = window.ethereum.request(${request})`, - ); - - // confirm transaction in mm popup - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.switchToWindowWithTitle('E2E Test Dapp'); - const actualHash = await driver.executeScript( - `return window.transactionHash;`, - ); - assert.equal(actualHash, expectedHash); - }, - ); - }); + it('rejects a new transaction', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - it('rejects a new transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + // eth_sendTransaction + await driver.openNewPage(`http://127.0.0.1:8080`); + const request = JSON.stringify({ + jsonrpc: '2.0', + method: 'eth_sendTransaction', + params: [ + { + to: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + from: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + value: '0x0', + maxPriorityFeePerGas: '0x3b9aca00', + maxFeePerGas: '0x2540be400', + }, + ], + id: 0, + }); + await driver.executeScript( + `window.transactionHash = window.ethereum.request(${request})`, + ); - // eth_sendTransaction - await driver.openNewPage(`http://127.0.0.1:8080`); - const request = JSON.stringify({ - jsonrpc: '2.0', - method: 'eth_sendTransaction', - params: [ - { - to: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - from: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - value: '0x0', - maxPriorityFeePerGas: '0x3b9aca00', - maxFeePerGas: '0x2540be400', - }, - ], - id: 0, + // reject transaction in mm popup + await driver.waitUntilXWindowHandles(3); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + await driver.switchToWindowWithTitle('E2E Test Dapp'); + const result = await driver + .executeScript(`return window.transactionHash;`) + .then((data) => { + return data; + }) + .catch((err) => { + return err; }); - await driver.executeScript( - `window.transactionHash = window.ethereum.request(${request})`, - ); - - // reject transaction in mm popup - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.switchToWindowWithTitle('E2E Test Dapp'); - const result = await driver - .executeScript(`return window.transactionHash;`) - .then((data) => { - return data; - }) - .catch((err) => { - return err; - }); - assert.ok( - result.message.includes( - 'MetaMask Tx Signature: User denied transaction signature.', - ), - ); - }, - ); - }); + assert.ok( + result.message.includes( + 'MetaMask Tx Signature: User denied transaction signature.', + ), + ); + }, + ); }); }); diff --git a/test/e2e/json-rpc/switchEthereumChain.spec.js b/test/e2e/json-rpc/switchEthereumChain.spec.js index 8395a3ef9603..77c1589411ac 100644 --- a/test/e2e/json-rpc/switchEthereumChain.spec.js +++ b/test/e2e/json-rpc/switchEthereumChain.spec.js @@ -8,549 +8,412 @@ const { unlockWallet, switchToNotificationWindow, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../helpers'); const FixtureBuilder = require('../fixture-builder'); const { isManifestV3 } = require('../../../shared/modules/mv3.utils'); describe('Switch Ethereum Chain for two dapps', function () { - describe('Old confirmation screens', function () { - it('queues send tx after switchEthereum request with a warning, if switchEthereum request is cancelled should show pending tx', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [{ port: 8546, chainId: 1338 }], - }, - title: this.test.fullTitle(), + it('switches the chainId of two dapps when switchEthereumChain of one dapp is confirmed', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [{ port: 8546, chainId: 1338 }], }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // open two dapps - const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); - const dappOne = await openDapp(driver, undefined, DAPP_URL); - - // Connect Dapp One - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Switch and connect Dapp Two - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - const editButtons = await driver.findElements('[data-testid="edit"]'); - - // Click the edit button for networks - await editButtons[1].click(); - - // Disconnect Mainnet - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); - - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp Two - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Switch to notification of switchEthereumChain - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - - // Switch back to dapp one - await driver.switchToWindow(dappOne); - assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); - - // Initiate send tx on dapp one - await driver.clickElement('#sendButton'); - await driver.delay(2000); - - // Switch to notification that should still be switchEthereumChain request but with an warning. - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // THIS IS BROKEN - // await driver.findElement({ - // span: 'span', - // text: 'Switching networks will cancel all pending confirmations', - // }); - - // Cancel switchEthereumChain with queued pending tx - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - - // Delay for second notification of the pending tx - await driver.delay(1000); - - // Switch to new pending tx notification - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findElement({ - text: 'Sending ETH', - tag: 'span', - }); - - // Confirm pending tx - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - }, - ); - }); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + // open two dapps + const dappOne = await openDapp(driver, undefined, DAPP_URL); + const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); + + // switchEthereumChain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x53a' }], + }); + + // Initiate switchEthereumChain on Dapp Two + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + + // Confirm switchEthereumChain + await switchToNotificationWindow(driver, 4); + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // Switch to Dapp One + await driver.switchToWindow(dappOne); + assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); + + // Wait for chain id element to change, there's a page reload. + await driver.waitForSelector({ + css: '#chainId', + text: '0x53a', + }); + + // Dapp One ChainId assertion + await driver.findElement({ css: '#chainId', text: '0x53a' }); + + // Switch to Dapp Two + await driver.switchToWindow(dappTwo); + assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); + + // Dapp Two ChainId Assertion + await driver.findElement({ css: '#chainId', text: '0x53a' }); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('switches the chainId of two dapps when switchEthereumChain of one dapp is confirmed', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [{ port: 8546, chainId: 1338 }], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - // open two dapps - const dappOne = await openDapp(driver, undefined, DAPP_URL); - const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Initiate switchEthereumChain on Dapp Two - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Confirm switchEthereumChain - await switchToNotificationWindow(driver, 4); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // Switch to Dapp One - await driver.switchToWindow(dappOne); - assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); - - // Wait for chain id element to change, there's a page reload. - await driver.waitForSelector({ - css: '#chainId', - text: '0x53a', - }); - - // Dapp One ChainId assertion - await driver.findElement({ css: '#chainId', text: '0x53a' }); - - // Switch to Dapp Two - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - // Dapp Two ChainId Assertion - await driver.findElement({ css: '#chainId', text: '0x53a' }); - }, - ); - }); - - it('queues switchEthereumChain request from second dapp after send tx request', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPreferencesControllerSmartTransactionsOptedOut() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [{ port: 8546, chainId: 1338 }], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // open two dapps - await openDapp(driver, undefined, DAPP_URL); - await openDapp(driver, undefined, DAPP_ONE_URL); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Switch to Dapp One and connect it - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findClickableElement({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - const editButtons = await driver.findElements('[data-testid="edit"]'); - - await editButtons[1].click(); - - // Disconnect Localhost 8545 - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); - - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Switch to Dapp Two - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - // Initiate send transaction on Dapp two - await driver.clickElement('#sendButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - - // Switch to Dapp One - await driver.switchToWindowWithUrl(DAPP_URL); - - // Switch Ethereum chain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp One - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - await switchToNotificationWindow(driver, 4); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - // Delay here after notification for second notification popup for switchEthereumChain - await driver.delay(1000); - - // Switch and confirm to queued notification for switchEthereumChain - await switchToNotificationWindow(driver, 4); - - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ css: '#chainId', text: '0x539' }); - }, - ); - }); - - it('queues send tx after switchEthereum request with a warning, confirming removes pending tx', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [{ port: 8546, chainId: 1338 }], - }, - title: this.test.fullTitle(), + it('queues switchEthereumChain request from second dapp after send tx request', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withPreferencesControllerSmartTransactionsOptedOut() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [{ port: 8546, chainId: 1338 }], }, - async ({ driver }) => { - await unlockWallet(driver); - - // open two dapps - const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); - const dappOne = await openDapp(driver, undefined, DAPP_URL); - - // Connect Dapp One - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Switch and connect Dapp Two - - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - const editButtons = await driver.findElements('[data-testid="edit"]'); - - // Click the edit button for networks - await editButtons[1].click(); - - // Disconnect Mainnet - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); - - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp Two - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - // Switch back to dapp one - await driver.switchToWindow(dappOne); - assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); - - // Initiate send tx on dapp one - await driver.clickElement('#sendButton'); - await driver.delay(2000); - - // Switch to notification that should still be switchEthereumChain request but with a warning. - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // THIS IS BROKEN - // await driver.findElement({ - // span: 'span', - // text: 'Switching networks will cancel all pending confirmations', - // }); - - // Confirm switchEthereumChain with queued pending tx - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // Window handles should only be expanded mm, dapp one, dapp 2, and the offscreen document - // if this is an MV3 build(3 or 4 total) - await driver.wait(async () => { - const windowHandles = await driver.getAllWindowHandles(); - const numberOfWindowHandlesToExpect = isManifestV3 ? 4 : 3; - return windowHandles.length === numberOfWindowHandlesToExpect; - }); - }, - ); - }); - - it('queues send tx after switchEthereum request with a warning, if switchEthereum request is cancelled should show pending tx', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [{ port: 8546, chainId: 1338 }], - }, - title: this.test.fullTitle(), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // open two dapps + await openDapp(driver, undefined, DAPP_URL); + await openDapp(driver, undefined, DAPP_ONE_URL); + + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // Switch to Dapp One and connect it + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findClickableElement({ + text: 'Connect', + tag: 'button', + }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + const editButtons = await driver.findElements('[data-testid="edit"]'); + + await editButtons[1].click(); + + // Disconnect Localhost 8545 + await driver.clickElement({ + text: 'Localhost 8545', + tag: 'p', + }); + + await driver.clickElement('[data-testid="connect-more-chains-button"]'); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // Switch to Dapp Two + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + // Initiate send transaction on Dapp two + await driver.clickElement('#sendButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + + // Switch to Dapp One + await driver.switchToWindowWithUrl(DAPP_URL); + + // Switch Ethereum chain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x539' }], + }); + + // Initiate switchEthereumChain on Dapp One + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + await switchToNotificationWindow(driver, 4); + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + await driver.clickElement({ + text: 'Confirm', + tag: 'button', + }); + // Delay here after notification for second notification popup for switchEthereumChain + await driver.delay(1000); + + // Switch and confirm to queued notification for switchEthereumChain + await switchToNotificationWindow(driver, 4); + + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Confirm', + tag: 'button', + }); + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findElement({ css: '#chainId', text: '0x539' }); + }, + ); + }); + + it('queues send tx after switchEthereum request with a warning, confirming removes pending tx', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [{ port: 8546, chainId: 1338 }], }, - async ({ driver }) => { - await unlockWallet(driver); - - // open two dapps - const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); - const dappOne = await openDapp(driver, undefined, DAPP_URL); - - // Connect Dapp One - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Switch and connect Dapp Two - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - const editButtons = await driver.findElements('[data-testid="edit"]'); - - // Click the edit button for networks - await editButtons[1].click(); - - // Disconnect Mainnet - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); - - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - await driver.switchToWindow(dappTwo); - assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp Two - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Switch to notification of switchEthereumChain - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - - // Switch back to dapp one - await driver.switchToWindow(dappOne); - assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); - - // Initiate send tx on dapp one - await driver.clickElement('#sendButton'); - await driver.delay(2000); - - // Switch to notification that should still be switchEthereumChain request but with an warning. - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Cancel switchEthereumChain with queued pending tx - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - - // Delay for second notification of the pending tx - await driver.delay(1000); - - // Switch to new pending tx notification - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findElement({ - text: 'Transfer request', - tag: 'h3', - }); - - await driver.findElement({ - text: '0 ETH', - tag: 'h2', - }); - - // Confirm pending tx - await driver.findClickableElements({ - text: 'Confirm', - tag: 'button', - }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // open two dapps + const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); + const dappOne = await openDapp(driver, undefined, DAPP_URL); + + // Connect Dapp One + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // Switch and connect Dapp Two + + await driver.switchToWindow(dappTwo); + assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); + + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + const editButtons = await driver.findElements('[data-testid="edit"]'); + + // Click the edit button for networks + await editButtons[1].click(); + + // Disconnect Mainnet + await driver.clickElement({ + text: 'Localhost 8545', + tag: 'p', + }); + + await driver.clickElement('[data-testid="connect-more-chains-button"]'); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + await driver.switchToWindow(dappTwo); + assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); + + // switchEthereumChain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x539' }], + }); + + // Initiate switchEthereumChain on Dapp Two + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + // Switch back to dapp one + await driver.switchToWindow(dappOne); + assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); + + // Initiate send tx on dapp one + await driver.clickElement('#sendButton'); + await driver.delay(2000); + + // Switch to notification that should still be switchEthereumChain request but with a warning. + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // THIS IS BROKEN + // await driver.findElement({ + // span: 'span', + // text: 'Switching networks will cancel all pending confirmations', + // }); + + // Confirm switchEthereumChain with queued pending tx + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // Window handles should only be expanded mm, dapp one, dapp 2, and the offscreen document + // if this is an MV3 build(3 or 4 total) + await driver.wait(async () => { + const windowHandles = await driver.getAllWindowHandles(); + const numberOfWindowHandlesToExpect = isManifestV3 ? 4 : 3; + return windowHandles.length === numberOfWindowHandlesToExpect; + }); + }, + ); + }); + + it('queues send tx after switchEthereum request with a warning, if switchEthereum request is cancelled should show pending tx', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [{ port: 8546, chainId: 1338 }], }, - ); - }); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // open two dapps + const dappTwo = await openDapp(driver, undefined, DAPP_ONE_URL); + const dappOne = await openDapp(driver, undefined, DAPP_URL); + + // Connect Dapp One + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // Switch and connect Dapp Two + await driver.switchToWindow(dappTwo); + assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); + + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + const editButtons = await driver.findElements('[data-testid="edit"]'); + + // Click the edit button for networks + await editButtons[1].click(); + + // Disconnect Mainnet + await driver.clickElement({ + text: 'Localhost 8545', + tag: 'p', + }); + + await driver.clickElement('[data-testid="connect-more-chains-button"]'); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + await driver.switchToWindow(dappTwo); + assert.equal(await driver.getCurrentUrl(), `${DAPP_ONE_URL}/`); + + // switchEthereumChain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x539' }], + }); + + // Initiate switchEthereumChain on Dapp Two + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + + // Switch to notification of switchEthereumChain + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + + // Switch back to dapp one + await driver.switchToWindow(dappOne); + assert.equal(await driver.getCurrentUrl(), `${DAPP_URL}/`); + + // Initiate send tx on dapp one + await driver.clickElement('#sendButton'); + await driver.delay(2000); + + // Switch to notification that should still be switchEthereumChain request but with an warning. + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // Cancel switchEthereumChain with queued pending tx + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + + // Delay for second notification of the pending tx + await driver.delay(1000); + + // Switch to new pending tx notification + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.findElement({ + text: 'Transfer request', + tag: 'h3', + }); + + await driver.findElement({ + text: '0 ETH', + tag: 'h2', + }); + + // Confirm pending tx + await driver.findClickableElements({ + text: 'Confirm', + tag: 'button', + }); + await driver.clickElement({ + text: 'Confirm', + tag: 'button', + }); + }, + ); }); }); diff --git a/test/e2e/snaps/test-snap-txinsights-v2.spec.js b/test/e2e/snaps/test-snap-txinsights-v2.spec.js deleted file mode 100644 index ba2d468a870a..000000000000 --- a/test/e2e/snaps/test-snap-txinsights-v2.spec.js +++ /dev/null @@ -1,174 +0,0 @@ -const { - defaultGanacheOptions, - withFixtures, - unlockWallet, - WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../helpers'); -const FixtureBuilder = require('../fixture-builder'); -const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); - -describe('Test Snap TxInsights-v2', function () { - describe('Old confirmation screens', function () { - it('tests tx insights v2 functionality', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // navigate to test snaps page and connect - await driver.openNewPage(TEST_SNAPS_WEBSITE_URL); - - // wait for page to load - await driver.waitForSelector({ - text: 'Installed Snaps', - tag: 'h2', - }); - - // find and scroll to the transaction-insights test snap - const snapButton1 = await driver.findElement( - '#connecttransaction-insights', - ); - await driver.scrollToElement(snapButton1); - - // added delay for firefox (deflake) - await driver.delayFirefox(1000); - - // wait for and click connect - await driver.waitForSelector('#connecttransaction-insights'); - await driver.clickElement('#connecttransaction-insights'); - - // switch to metamask extension - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click connect - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // wait for and click connect - await driver.waitForSelector({ text: 'Confirm' }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - - // wait for and click ok and wait for window to close - await driver.waitForSelector({ text: 'OK' }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'OK', - tag: 'button', - }); - - // switch to test-snaps page - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - - // wait for and click get accounts - await driver.waitForSelector('#getAccounts'); - await driver.clickElement('#getAccounts'); - - // switch back to MetaMask window - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click confirm and wait for window to close - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // switch to test-snaps page and send tx - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - await driver.clickElement('#sendInsights'); - - // delay added for rendering (deflake) - await driver.delay(2000); - - // switch back to MetaMask window and switch to tx insights pane - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // find confirm button - await driver.findClickableElement({ - text: 'Confirm', - tag: 'button', - }); - - // wait for and click insights snap tab - await driver.waitForSelector({ - text: 'Insights Example Snap', - tag: 'button', - }); - await driver.clickElement({ - text: 'Insights Example Snap', - tag: 'button', - }); - - // check that txinsightstest tab contains the right info - await driver.waitForSelector({ - css: '.snap-ui-renderer__content', - text: 'ERC-20', - }); - - // click confirm to continue - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - - // check for warning from txinsights - await driver.waitForSelector({ - css: '.snap-delineator__header__text', - text: 'Warning from Insights Example Snap', - }); - - // check info in warning - await driver.waitForSelector({ - css: '.snap-ui-renderer__text', - text: 'ERC-20', - }); - - // click the warning confirm checkbox - await driver.clickElement('.mm-checkbox__input'); - - // click confirm button to send transaction - await driver.clickElement({ - css: '.mm-box--color-error-inverse', - text: 'Confirm', - tag: 'button', - }); - - // switch back to MetaMask tab - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // switch to activity pane - await driver.clickElement({ - tag: 'button', - text: 'Activity', - }); - - // wait for transaction confirmation - await driver.waitForSelector({ - css: '.transaction-status-label', - text: 'Confirmed', - }); - }, - ); - }); - }); -}); diff --git a/test/e2e/snaps/test-snap-txinsights.spec.js b/test/e2e/snaps/test-snap-txinsights.spec.js index 0171759587b5..c599bb124c52 100644 --- a/test/e2e/snaps/test-snap-txinsights.spec.js +++ b/test/e2e/snaps/test-snap-txinsights.spec.js @@ -3,229 +3,113 @@ const { withFixtures, unlockWallet, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../helpers'); const FixtureBuilder = require('../fixture-builder'); const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); describe('Test Snap TxInsights', function () { - describe('Old confirmation screens', function () { - it('tests tx insights functionality', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); - - // wait for page to load - await driver.waitForSelector({ - text: 'Installed Snaps', - tag: 'h2', - }); - - // find and scroll to the transaction-insights test snap - const snapButton1 = await driver.findElement( - '#connecttransaction-insights', - ); - await driver.scrollToElement(snapButton1); - - // added delay for firefox (deflake) - await driver.delayFirefox(1000); - - // wait for and click connect - await driver.waitForSelector('#connecttransaction-insights'); - await driver.clickElement('#connecttransaction-insights'); - - // switch to metamask extension - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click connect - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // wait for and click confirm - await driver.waitForSelector({ text: 'Confirm' }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - - // wait for and click ok and wait for window to close - await driver.waitForSelector({ text: 'OK' }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'OK', - tag: 'button', - }); - - // switch to test-snaps page and get accounts - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - - // click get accounts - await driver.clickElement('#getAccounts'); - - // switch back to MetaMask window - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click next and wait for window to close - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // switch to test-snaps page - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - - // click send tx - await driver.clickElement('#sendInsights'); - - // delay added for rendering (deflake) - await driver.delay(2000); - - // switch back to MetaMask window - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and switch to insight snap pane - await driver.waitForSelector({ - text: 'Insights Example Snap', - tag: 'button', - }); - await driver.clickElement({ - text: 'Insights Example Snap', - tag: 'button', - }); - - // check that txinsightstest tab contains the right info - await driver.waitForSelector({ - css: '.snap-ui-renderer__content', - text: 'ERC-20', - }); - }, - ); - }); - }); - - describe('Redesigned confirmation screens', function () { - it('tests tx insights functionality', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); - - // wait for page to load - await driver.waitForSelector({ - text: 'Installed Snaps', - tag: 'h2', - }); - - // find and scroll to the transaction-insights test snap - const snapButton1 = await driver.findElement( - '#connecttransaction-insights', - ); - await driver.scrollToElement(snapButton1); - - // added delay for firefox (deflake) - await driver.delayFirefox(1000); - - // wait for and click connect - await driver.waitForSelector('#connecttransaction-insights'); - await driver.clickElement('#connecttransaction-insights'); - - // switch to metamask extension - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click connect - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // wait for and click confirm - await driver.waitForSelector({ text: 'Confirm' }); - await driver.clickElement({ - text: 'Confirm', - tag: 'button', - }); - - // wait for and click ok and wait for window to close - await driver.waitForSelector({ text: 'OK' }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'OK', - tag: 'button', - }); - - // switch to test-snaps page and get accounts - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - - // click get accounts - await driver.clickElement('#getAccounts'); - - // switch back to MetaMask window - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and click next and wait for window to close - await driver.waitForSelector({ - text: 'Connect', - tag: 'button', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // switch to test-snaps page - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - - // click send tx - await driver.clickElement('#sendInsights'); - - // delay added for rendering (deflake) - await driver.delay(2000); - - // switch back to MetaMask window - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for and switch to insight snap pane - await driver.waitForSelector({ - text: 'Insights Example Snap', - tag: 'span', - }); - - // check that txinsightstest tab contains the right info - await driver.waitForSelector({ - css: 'p', - text: 'ERC-20', - }); - }, - ); - }); + it('tests tx insights functionality', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // navigate to test snaps page and connect + await driver.driver.get(TEST_SNAPS_WEBSITE_URL); + + // wait for page to load + await driver.waitForSelector({ + text: 'Installed Snaps', + tag: 'h2', + }); + + // find and scroll to the transaction-insights test snap + const snapButton1 = await driver.findElement( + '#connecttransaction-insights', + ); + await driver.scrollToElement(snapButton1); + + // added delay for firefox (deflake) + await driver.delayFirefox(1000); + + // wait for and click connect + await driver.waitForSelector('#connecttransaction-insights'); + await driver.clickElement('#connecttransaction-insights'); + + // switch to metamask extension + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // wait for and click connect + await driver.waitForSelector({ + text: 'Connect', + tag: 'button', + }); + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); + + // wait for and click confirm + await driver.waitForSelector({ text: 'Confirm' }); + await driver.clickElement({ + text: 'Confirm', + tag: 'button', + }); + + // wait for and click ok and wait for window to close + await driver.waitForSelector({ text: 'OK' }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'OK', + tag: 'button', + }); + + // switch to test-snaps page and get accounts + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); + + // click get accounts + await driver.clickElement('#getAccounts'); + + // switch back to MetaMask window + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // wait for and click next and wait for window to close + await driver.waitForSelector({ + text: 'Connect', + tag: 'button', + }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // switch to test-snaps page + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); + + // click send tx + await driver.clickElement('#sendInsights'); + + // delay added for rendering (deflake) + await driver.delay(2000); + + // switch back to MetaMask window + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // wait for and switch to insight snap pane + await driver.waitForSelector({ + text: 'Insights Example Snap', + tag: 'span', + }); + + // check that txinsightstest tab contains the right info + await driver.waitForSelector({ + css: 'p', + text: 'ERC-20', + }); + }, + ); }); }); diff --git a/test/e2e/tests/account/add-account.spec.ts b/test/e2e/tests/account/add-account.spec.ts index 2df140899212..ea0a52ed5f83 100644 --- a/test/e2e/tests/account/add-account.spec.ts +++ b/test/e2e/tests/account/add-account.spec.ts @@ -4,15 +4,11 @@ import { ACCOUNT_TYPE } from '../../constants'; import { WALLET_PASSWORD, defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, withFixtures, } from '../../helpers'; import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow'; import { completeImportSRPOnboardingFlow } from '../../page-objects/flows/onboarding.flow'; -import { - sendRedesignedTransactionToAccount, - sendTransactionToAccount, -} from '../../page-objects/flows/send-transaction.flow'; +import { sendRedesignedTransactionToAccount } from '../../page-objects/flows/send-transaction.flow'; import AccountListPage from '../../page-objects/pages/account-list-page'; import ActivityListPage from '../../page-objects/pages/home/activity-list'; import HeaderNavbar from '../../page-objects/pages/header-navbar'; @@ -21,195 +17,118 @@ import LoginPage from '../../page-objects/pages/login-page'; import ResetPasswordPage from '../../page-objects/pages/reset-password-page'; describe('Add account', function () { - describe('Old confirmation screens', function () { - it('should not affect public address when using secret recovery phrase to recover account with non-zero balance @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder({ onboarding: true }).build(), - ganacheOptions: defaultGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await completeImportSRPOnboardingFlow({ driver }); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - const homePage = new HomePage(driver); - await homePage.check_pageIsLoaded(); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.openAccountMenu(); - - // Create new account with default name `newAccountName` - const newAccountName = 'Account 2'; - const accountListPage = new AccountListPage(driver); - await accountListPage.check_pageIsLoaded(); - await accountListPage.addAccount({ - accountType: ACCOUNT_TYPE.Ethereum, - }); - await headerNavbar.check_accountLabel(newAccountName); - await homePage.check_expectedBalanceIsDisplayed(); - - // Switch back to the first account and transfer some balance to 2nd account so they will not be removed after recovering SRP - await headerNavbar.openAccountMenu(); - await accountListPage.check_pageIsLoaded(); - await accountListPage.check_accountDisplayedInAccountList( - 'Account 1', - ); - await accountListPage.switchToAccount('Account 1'); - await headerNavbar.check_accountLabel('Account 1'); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - await sendTransactionToAccount({ - driver, - recipientAccount: newAccountName, - amount: '2.8', - gasFee: '0.000042', - totalFee: '2.800042', - }); - await homePage.check_pageIsLoaded(); - const activityList = new ActivityListPage(driver); - await activityList.check_confirmedTxNumberDisplayedInActivity(); - await activityList.check_txAmountInActivity('-2.8 ETH'); - - // Lock wallet and recover via SRP in "forget password" option - await headerNavbar.lockMetaMask(); - await new LoginPage(driver).gotoResetPasswordPage(); - const resetPasswordPage = new ResetPasswordPage(driver); - await resetPasswordPage.check_pageIsLoaded(); - await resetPasswordPage.resetPassword(E2E_SRP, WALLET_PASSWORD); - - // Check wallet balance for both accounts - await homePage.check_pageIsLoaded(); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - await headerNavbar.openAccountMenu(); - await accountListPage.check_pageIsLoaded(); - await accountListPage.check_accountDisplayedInAccountList( - newAccountName, - ); - await accountListPage.switchToAccount(newAccountName); - await headerNavbar.check_accountLabel(newAccountName); - await homePage.check_expectedBalanceIsDisplayed('2.8'); - }, - ); - }); + it('should not affect public address when using secret recovery phrase to recover account with non-zero balance @no-mmi', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder({ onboarding: true }).build(), + ganacheOptions: defaultGanacheOptions, + title: this.test?.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await completeImportSRPOnboardingFlow({ driver }); + + const homePage = new HomePage(driver); + await homePage.check_pageIsLoaded(); + await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); + const headerNavbar = new HeaderNavbar(driver); + await headerNavbar.openAccountMenu(); + + // Create new account with default name `newAccountName` + const newAccountName = 'Account 2'; + const accountListPage = new AccountListPage(driver); + await accountListPage.check_pageIsLoaded(); + await accountListPage.addAccount({ + accountType: ACCOUNT_TYPE.Ethereum, + }); + await headerNavbar.check_accountLabel(newAccountName); + await homePage.check_expectedBalanceIsDisplayed(); + + // Switch back to the first account and transfer some balance to 2nd account so they will not be removed after recovering SRP + await headerNavbar.openAccountMenu(); + await accountListPage.check_pageIsLoaded(); + await accountListPage.check_accountDisplayedInAccountList('Account 1'); + await accountListPage.switchToAccount('Account 1'); + await headerNavbar.check_accountLabel('Account 1'); + await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); + + await sendRedesignedTransactionToAccount({ + driver, + recipientAccount: newAccountName, + amount: '2.8', + }); + + await homePage.check_pageIsLoaded(); + const activityList = new ActivityListPage(driver); + await activityList.check_confirmedTxNumberDisplayedInActivity(); + await activityList.check_txAmountInActivity('-2.8 ETH'); + + // Lock wallet and recover via SRP in "forget password" option + await headerNavbar.lockMetaMask(); + await new LoginPage(driver).gotoResetPasswordPage(); + const resetPasswordPage = new ResetPasswordPage(driver); + await resetPasswordPage.check_pageIsLoaded(); + await resetPasswordPage.resetPassword(E2E_SRP, WALLET_PASSWORD); + + // Check wallet balance for both accounts + await homePage.check_pageIsLoaded(); + await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); + await headerNavbar.openAccountMenu(); + await accountListPage.check_pageIsLoaded(); + await accountListPage.check_accountDisplayedInAccountList( + newAccountName, + ); + await accountListPage.switchToAccount(newAccountName); + await headerNavbar.check_accountLabel(newAccountName); + await homePage.check_expectedBalanceIsDisplayed('2.8'); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should not affect public address when using secret recovery phrase to recover account with non-zero balance @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder({ onboarding: true }).build(), - ganacheOptions: defaultGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await completeImportSRPOnboardingFlow({ driver }); - - const homePage = new HomePage(driver); - await homePage.check_pageIsLoaded(); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.openAccountMenu(); - - // Create new account with default name `newAccountName` - const newAccountName = 'Account 2'; - const accountListPage = new AccountListPage(driver); - await accountListPage.check_pageIsLoaded(); - await accountListPage.addAccount({ - accountType: ACCOUNT_TYPE.Ethereum, - }); - await headerNavbar.check_accountLabel(newAccountName); - await homePage.check_expectedBalanceIsDisplayed(); - - // Switch back to the first account and transfer some balance to 2nd account so they will not be removed after recovering SRP - await headerNavbar.openAccountMenu(); - await accountListPage.check_pageIsLoaded(); - await accountListPage.check_accountDisplayedInAccountList( - 'Account 1', - ); - await accountListPage.switchToAccount('Account 1'); - await headerNavbar.check_accountLabel('Account 1'); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - - await sendRedesignedTransactionToAccount({ - driver, - recipientAccount: newAccountName, - amount: '2.8', - }); - - await homePage.check_pageIsLoaded(); - const activityList = new ActivityListPage(driver); - await activityList.check_confirmedTxNumberDisplayedInActivity(); - await activityList.check_txAmountInActivity('-2.8 ETH'); - - // Lock wallet and recover via SRP in "forget password" option - await headerNavbar.lockMetaMask(); - await new LoginPage(driver).gotoResetPasswordPage(); - const resetPasswordPage = new ResetPasswordPage(driver); - await resetPasswordPage.check_pageIsLoaded(); - await resetPasswordPage.resetPassword(E2E_SRP, WALLET_PASSWORD); - - // Check wallet balance for both accounts - await homePage.check_pageIsLoaded(); - await homePage.check_localBlockchainBalanceIsDisplayed(ganacheServer); - await headerNavbar.openAccountMenu(); - await accountListPage.check_pageIsLoaded(); - await accountListPage.check_accountDisplayedInAccountList( - newAccountName, - ); - await accountListPage.switchToAccount(newAccountName); - await headerNavbar.check_accountLabel(newAccountName); - await homePage.check_expectedBalanceIsDisplayed('2.8'); - }, - ); - }); - - it('should be possible to remove an account imported with a private key, but should not be possible to remove an account generated from the SRP imported in onboarding @no-mmi', async function () { - const testPrivateKey: string = - '14abe6f4aab7f9f626fe981c864d0adeb5685f289ac9270c27b8fd790b4235d6'; - - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - title: this.test?.fullTitle(), - }, - async ({ driver }) => { - await loginWithBalanceValidation(driver); - const headerNavbar = new HeaderNavbar(driver); - const homePage = new HomePage(driver); - await headerNavbar.openAccountMenu(); - - // Create new account with default name Account 2 - const accountListPage = new AccountListPage(driver); - await accountListPage.check_pageIsLoaded(); - await accountListPage.addAccount({ - accountType: ACCOUNT_TYPE.Ethereum, - }); - await headerNavbar.check_accountLabel('Account 2'); - await homePage.check_expectedBalanceIsDisplayed(); - - // Check user cannot delete 2nd account generated from the SRP imported in onboarding - await headerNavbar.openAccountMenu(); - await accountListPage.check_removeAccountButtonIsNotDisplayed( - 'Account 1', - ); - - // Create 3rd account with private key - await accountListPage.addNewImportedAccount(testPrivateKey); - await headerNavbar.check_accountLabel('Account 3'); - await homePage.check_expectedBalanceIsDisplayed(); - - // Remove the 3rd account imported with a private key - await headerNavbar.openAccountMenu(); - await accountListPage.removeAccount('Account 3'); - await homePage.check_pageIsLoaded(); - await homePage.check_expectedBalanceIsDisplayed(); - await headerNavbar.openAccountMenu(); - await accountListPage.check_accountIsNotDisplayedInAccountList( - 'Account 3', - ); - }, - ); - }); + it('should be possible to remove an account imported with a private key, but should not be possible to remove an account generated from the SRP imported in onboarding @no-mmi', async function () { + const testPrivateKey: string = + '14abe6f4aab7f9f626fe981c864d0adeb5685f289ac9270c27b8fd790b4235d6'; + + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + title: this.test?.fullTitle(), + }, + async ({ driver }) => { + await loginWithBalanceValidation(driver); + const headerNavbar = new HeaderNavbar(driver); + const homePage = new HomePage(driver); + await headerNavbar.openAccountMenu(); + + // Create new account with default name Account 2 + const accountListPage = new AccountListPage(driver); + await accountListPage.check_pageIsLoaded(); + await accountListPage.addAccount({ + accountType: ACCOUNT_TYPE.Ethereum, + }); + await headerNavbar.check_accountLabel('Account 2'); + await homePage.check_expectedBalanceIsDisplayed(); + + // Check user cannot delete 2nd account generated from the SRP imported in onboarding + await headerNavbar.openAccountMenu(); + await accountListPage.check_removeAccountButtonIsNotDisplayed( + 'Account 1', + ); + + // Create 3rd account with private key + await accountListPage.addNewImportedAccount(testPrivateKey); + await headerNavbar.check_accountLabel('Account 3'); + await homePage.check_expectedBalanceIsDisplayed(); + + // Remove the 3rd account imported with a private key + await headerNavbar.openAccountMenu(); + await accountListPage.removeAccount('Account 3'); + await homePage.check_pageIsLoaded(); + await homePage.check_expectedBalanceIsDisplayed(); + await headerNavbar.openAccountMenu(); + await accountListPage.check_accountIsNotDisplayedInAccountList( + 'Account 3', + ); + }, + ); }); }); diff --git a/test/e2e/tests/account/snap-account-transfers.spec.ts b/test/e2e/tests/account/snap-account-transfers.spec.ts index d6ebff34d642..2a0aa78e9825 100644 --- a/test/e2e/tests/account/snap-account-transfers.spec.ts +++ b/test/e2e/tests/account/snap-account-transfers.spec.ts @@ -2,7 +2,6 @@ import { Suite } from 'mocha'; import { multipleGanacheOptions, PRIVATE_KEY_TWO, - tempToggleSettingRedesignedTransactionConfirmations, WINDOW_TITLES, withFixtures, } from '../../helpers'; @@ -17,313 +16,149 @@ import HomePage from '../../page-objects/pages/home/homepage'; import SnapSimpleKeyringPage from '../../page-objects/pages/snap-simple-keyring-page'; import { installSnapSimpleKeyring } from '../../page-objects/flows/snap-simple-keyring.flow'; import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow'; -import { - sendRedesignedTransactionWithSnapAccount, - sendTransactionWithSnapAccount, -} from '../../page-objects/flows/send-transaction.flow'; +import { sendRedesignedTransactionWithSnapAccount } from '../../page-objects/flows/send-transaction.flow'; describe('Snap Account Transfers @no-mmi', function (this: Suite) { - // TODO: Remove the old confirmations screen tests once migration has been complete. - // See: https://github.com/MetaMask/MetaMask-planning/issues/3030 - describe('Old confirmation screens', function () { - it('can import a private key and transfer 1 ETH (sync flow)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ + it('can import a private key and transfer 1 ETH (sync flow)', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: multipleGanacheOptions, + title: this.test?.fullTitle(), + }, + async ({ + driver, + ganacheServer, + }: { + driver: Driver; + ganacheServer?: Ganache; + }) => { + await loginWithBalanceValidation(driver, ganacheServer); + + await installSnapSimpleKeyring(driver); + const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); + + // import snap account with private key on snap simple keyring page. + await snapSimpleKeyringPage.importAccountWithPrivateKey( + PRIVATE_KEY_TWO, + ); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + const headerNavbar = new HeaderNavbar(driver); + await headerNavbar.check_accountLabel('SSK Account'); + + // send 1 ETH from snap account to account 1 + await sendRedesignedTransactionWithSnapAccount({ driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await installSnapSimpleKeyring(driver); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 - await sendTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - gasFee: '0.000042', - totalFee: '1.000042', - }); - await headerNavbar.check_pageIsLoaded(); - await headerNavbar.openAccountMenu(); - const accountList = new AccountListPage(driver); - await accountList.check_pageIsLoaded(); - - // check the balance of the 2 accounts are updated - await accountList.check_accountBalanceDisplayed('26'); - await accountList.check_accountBalanceDisplayed('24'); - }, - ); - }); - - it('can import a private key and transfer 1 ETH (async flow approve)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ - driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await installSnapSimpleKeyring(driver, false); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 and approve the transaction - await sendTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - gasFee: '0.000042', - totalFee: '1.000042', - isSyncFlow: false, - }); - await headerNavbar.check_pageIsLoaded(); - await headerNavbar.openAccountMenu(); - const accountList = new AccountListPage(driver); - await accountList.check_pageIsLoaded(); - - // check the balance of the 2 accounts are updated - await accountList.check_accountBalanceDisplayed('26'); - await accountList.check_accountBalanceDisplayed('24'); - }, - ); - }); - - it('can import a private key and transfer 1 ETH (async flow reject)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - ignoredConsoleErrors: ['Request rejected by user or snap.'], - }, - async ({ - driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await installSnapSimpleKeyring(driver, false); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // Import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 and reject the transaction - await sendTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - gasFee: '0.000042', - totalFee: '1.000042', - isSyncFlow: false, - approveTransaction: false, - }); - - // check the transaction is failed in MetaMask activity list - await new HomePage(driver).check_pageIsLoaded(); - await new ActivityListPage( - driver, - ).check_failedTxNumberDisplayedInActivity(); - }, - ); - }); + recipientAddress: DEFAULT_FIXTURE_ACCOUNT, + amount: '1', + }); + await headerNavbar.check_pageIsLoaded(); + await headerNavbar.openAccountMenu(); + const accountList = new AccountListPage(driver); + await accountList.check_pageIsLoaded(); + + // check the balance of the 2 accounts are updated + await accountList.check_accountBalanceDisplayed('26'); + await accountList.check_accountBalanceDisplayed('24'); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('can import a private key and transfer 1 ETH (sync flow)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ + it('can import a private key and transfer 1 ETH (async flow approve)', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: multipleGanacheOptions, + title: this.test?.fullTitle(), + }, + async ({ + driver, + ganacheServer, + }: { + driver: Driver; + ganacheServer?: Ganache; + }) => { + await loginWithBalanceValidation(driver, ganacheServer); + + await installSnapSimpleKeyring(driver, false); + const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); + + // import snap account with private key on snap simple keyring page. + await snapSimpleKeyringPage.importAccountWithPrivateKey( + PRIVATE_KEY_TWO, + ); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + const headerNavbar = new HeaderNavbar(driver); + await headerNavbar.check_accountLabel('SSK Account'); + + // send 1 ETH from snap account to account 1 and approve the transaction + await sendRedesignedTransactionWithSnapAccount({ driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await installSnapSimpleKeyring(driver); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 - await sendRedesignedTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - }); - await headerNavbar.check_pageIsLoaded(); - await headerNavbar.openAccountMenu(); - const accountList = new AccountListPage(driver); - await accountList.check_pageIsLoaded(); - - // check the balance of the 2 accounts are updated - await accountList.check_accountBalanceDisplayed('26'); - await accountList.check_accountBalanceDisplayed('24'); - }, - ); - }); + recipientAddress: DEFAULT_FIXTURE_ACCOUNT, + amount: '1', + isSyncFlow: false, + }); + await headerNavbar.check_pageIsLoaded(); + await headerNavbar.openAccountMenu(); + const accountList = new AccountListPage(driver); + await accountList.check_pageIsLoaded(); + + // check the balance of the 2 accounts are updated + await accountList.check_accountBalanceDisplayed('26'); + await accountList.check_accountBalanceDisplayed('24'); + }, + ); + }); - it('can import a private key and transfer 1 ETH (async flow approve)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ + it('can import a private key and transfer 1 ETH (async flow reject)', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: multipleGanacheOptions, + title: this.test?.fullTitle(), + ignoredConsoleErrors: ['Request rejected by user or snap.'], + }, + async ({ + driver, + ganacheServer, + }: { + driver: Driver; + ganacheServer?: Ganache; + }) => { + await loginWithBalanceValidation(driver, ganacheServer); + + await installSnapSimpleKeyring(driver, false); + const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); + + // Import snap account with private key on snap simple keyring page. + await snapSimpleKeyringPage.importAccountWithPrivateKey( + PRIVATE_KEY_TWO, + ); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + const headerNavbar = new HeaderNavbar(driver); + await headerNavbar.check_accountLabel('SSK Account'); + + // send 1 ETH from snap account to account 1 and reject the transaction + await sendRedesignedTransactionWithSnapAccount({ driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await installSnapSimpleKeyring(driver, false); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 and approve the transaction - await sendRedesignedTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - isSyncFlow: false, - }); - await headerNavbar.check_pageIsLoaded(); - await headerNavbar.openAccountMenu(); - const accountList = new AccountListPage(driver); - await accountList.check_pageIsLoaded(); - - // check the balance of the 2 accounts are updated - await accountList.check_accountBalanceDisplayed('26'); - await accountList.check_accountBalanceDisplayed('24'); - }, - ); - }); - - it('can import a private key and transfer 1 ETH (async flow reject)', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: multipleGanacheOptions, - title: this.test?.fullTitle(), - ignoredConsoleErrors: ['Request rejected by user or snap.'], - }, - async ({ + recipientAddress: DEFAULT_FIXTURE_ACCOUNT, + amount: '1', + isSyncFlow: false, + approveTransaction: false, + }); + + // check the transaction is failed in MetaMask activity list + await new HomePage(driver).check_pageIsLoaded(); + await new ActivityListPage( driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await installSnapSimpleKeyring(driver, false); - const snapSimpleKeyringPage = new SnapSimpleKeyringPage(driver); - - // Import snap account with private key on snap simple keyring page. - await snapSimpleKeyringPage.importAccountWithPrivateKey( - PRIVATE_KEY_TWO, - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const headerNavbar = new HeaderNavbar(driver); - await headerNavbar.check_accountLabel('SSK Account'); - - // send 1 ETH from snap account to account 1 and reject the transaction - await sendRedesignedTransactionWithSnapAccount({ - driver, - recipientAddress: DEFAULT_FIXTURE_ACCOUNT, - amount: '1', - isSyncFlow: false, - approveTransaction: false, - }); - - // check the transaction is failed in MetaMask activity list - await new HomePage(driver).check_pageIsLoaded(); - await new ActivityListPage( - driver, - ).check_failedTxNumberDisplayedInActivity(); - }, - ); - }); + ).check_failedTxNumberDisplayedInActivity(); + }, + ); }); }); diff --git a/test/e2e/tests/dapp-interactions/contract-interactions.spec.js b/test/e2e/tests/dapp-interactions/contract-interactions.spec.js deleted file mode 100644 index a685954b5857..000000000000 --- a/test/e2e/tests/dapp-interactions/contract-interactions.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -const { - defaultGanacheOptions, - withFixtures, - openDapp, - unlockWallet, - largeDelayMs, - WINDOW_TITLES, - locateAccountBalanceDOM, - clickNestedButton, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); -const FixtureBuilder = require('../../fixture-builder'); - -describe('Deploy contract and call contract methods', function () { - const smartContract = SMART_CONTRACTS.PIGGYBANK; - - it('should display the correct account balance after contract interactions', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // deploy contract - await openDapp(driver, contractAddress); - - // wait for deployed contract, calls and confirms a contract method where ETH is sent - await driver.delay(largeDelayMs); - await driver.clickElement('#depositButton'); - - await driver.waitForSelector({ - css: 'span', - text: 'Deposit initiated', - }); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-4 ETH', - }); - - // calls and confirms a contract method where ETH is received - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.clickElement('#withdrawButton'); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(2)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-0 ETH', - }); - - // renders the correct ETH balance - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await locateAccountBalanceDOM(driver, ganacheServer); - }, - ); - }); -}); diff --git a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js b/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js deleted file mode 100644 index ad168a2b9332..000000000000 --- a/test/e2e/tests/dapp-interactions/dapp-tx-edit.spec.js +++ /dev/null @@ -1,81 +0,0 @@ -const { - defaultGanacheOptions, - logInWithBalanceValidation, - openDapp, - WINDOW_TITLES, - withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); -const FixtureBuilder = require('../../fixture-builder'); - -describe('Editing confirmations of dapp initiated contract interactions', function () { - const smartContract = SMART_CONTRACTS.PIGGYBANK; - it('should NOT show an edit button on a contract interaction confirmation initiated by a dapp', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // deploy contract - await openDapp(driver, contractAddress); - // wait for deployed contract, calls and confirms a contract method where ETH is sent - await driver.findClickableElement('#deployButton'); - await driver.clickElement('#depositButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.assertElementNotPresent( - '[data-testid="confirm-page-back-edit-button"]', - ); - }, - ); - }); - - it('should NOT show an edit button on a simple ETH send initiated by a dapp', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await logInWithBalanceValidation(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver); - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Sending ETH', - }); - await driver.assertElementNotPresent( - '[data-testid="confirm-page-back-edit-button"]', - ); - }, - ); - }); -}); diff --git a/test/e2e/tests/dapp-interactions/failing-contract.spec.js b/test/e2e/tests/dapp-interactions/failing-contract.spec.js deleted file mode 100644 index c02a279adb3f..000000000000 --- a/test/e2e/tests/dapp-interactions/failing-contract.spec.js +++ /dev/null @@ -1,161 +0,0 @@ -const { strict: assert } = require('assert'); -const { - withFixtures, - openDapp, - unlockWallet, - WINDOW_TITLES, - generateGanacheOptions, - clickNestedButton, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); -const FixtureBuilder = require('../../fixture-builder'); - -describe('Failing contract interaction ', function () { - const smartContract = SMART_CONTRACTS.FAILING; - it('should display a warning when the contract interaction is expected to fail', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver, contractAddress); - let windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - - // waits for deployed contract and calls failing contract method - await driver.findClickableElement('#deployButton'); - await driver.clickElement('#sendFailingButton'); - await driver.waitUntilXWindowHandles(3); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - // display warning when transaction is expected to fail - const warningText = - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.'; - await driver.waitForSelector({ - css: '.mm-banner-alert .mm-text', - text: warningText, - }); - const confirmButton = await driver.findElement( - '[data-testid="page-container-footer-next"]', - ); - assert.equal(await confirmButton.isEnabled(), false); - - // dismiss warning and confirm the transaction - await driver.clickElement({ - text: 'I want to proceed anyway', - tag: 'button', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - - await driver.findElement({ - css: '.activity-list-item .transaction-status-label', - text: 'Failed', - }); - // inspect transaction details - await driver.clickElement({ - css: '.activity-list-item .transaction-status-label', - text: 'Failed', - }); - await driver.waitForSelector('.transaction-list-item-details'); - await driver.waitForSelector( - '[data-testid="transaction-list-item-details-banner-error-message"]', - ); - }, - ); - }); -}); - -describe('Failing contract interaction on non-EIP1559 network', function () { - const smartContract = SMART_CONTRACTS.FAILING; - it('should display a warning when the contract interaction is expected to fail', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'berlin' }), - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver, contractAddress); - let windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - // waits for deployed contract and calls failing contract method - await driver.findClickableElement('#deployButton'); - - await driver.fill('#toInput', contractAddress); - await driver.fill('#amountInput', '0'); - await driver.fill('#gasInput', '100'); - - await driver.clickElement('#submitForm'); - - await driver.waitUntilXWindowHandles(3); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - // display warning when transaction is expected to fail - const warningText = - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.'; - await driver.waitForSelector({ - css: '.mm-banner-alert .mm-text', - text: warningText, - }); - const confirmButton = await driver.findElement( - '[data-testid="page-container-footer-next"]', - ); - assert.equal(await confirmButton.isEnabled(), false); - - // dismiss warning and confirm the transaction - await driver.clickElement({ - text: 'I want to proceed anyway', - tag: 'button', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - await driver.findElement({ - css: '.activity-list-item .transaction-status-label', - text: 'Failed', - }); - }, - ); - }); -}); diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 460aa14595bf..0ddcd35e09a1 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -239,7 +239,6 @@ "shouldShowAggregatedBalancePopover": "boolean", "tokenNetworkFilter": { "0x539": "boolean" }, "redesignedConfirmationsEnabled": true, - "redesignedTransactionsEnabled": "boolean", "smartTransactionsMigrationApplied": "boolean" }, "ipfsGateway": "string", diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index 19000925eebe..fd7e43cb4308 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -97,7 +97,6 @@ "shouldShowAggregatedBalancePopover": "boolean", "tokenNetworkFilter": { "0x539": "boolean" }, "redesignedConfirmationsEnabled": true, - "redesignedTransactionsEnabled": "boolean", "smartTransactionsMigrationApplied": "boolean" }, "firstTimeFlowType": "import", diff --git a/test/e2e/tests/network/network-error.spec.js b/test/e2e/tests/network/network-error.spec.js deleted file mode 100644 index 61842f482151..000000000000 --- a/test/e2e/tests/network/network-error.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -const { strict: assert } = require('assert'); -const { - withFixtures, - logInWithBalanceValidation, - openActionMenuAndStartSendFlow, - generateGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const FixtureBuilder = require('../../fixture-builder'); -const { GAS_API_BASE_URL } = require('../../../../shared/constants/swaps'); - -describe('Gas API fallback', function () { - async function mockGasApiDown(mockServer) { - await mockServer - .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) - .always() - .thenCallback(() => { - return { - statusCode: 200, - json: { - low: { - minWaitTimeEstimate: 180000, - maxWaitTimeEstimate: 300000, - suggestedMaxPriorityFeePerGas: '3', - suggestedMaxFeePerGas: '53', - }, - medium: { - minWaitTimeEstimate: 15000, - maxWaitTimeEstimate: 60000, - suggestedMaxPriorityFeePerGas: '7', - suggestedMaxFeePerGas: '70', - }, - high: { - minWaitTimeEstimate: 0, - maxWaitTimeEstimate: 15000, - suggestedMaxPriorityFeePerGas: '10', - suggestedMaxFeePerGas: '100', - }, - estimatedBaseFee: '50', - networkCongestion: 0.9, - latestPriorityFeeRange: ['1', '20'], - historicalPriorityFeeRange: ['2', '125'], - historicalBaseFeeRange: ['50', '100'], - priorityFeeTrend: 'up', - baseFeeTrend: 'down', - }, - }; - }); - } - - it('network error message is displayed if network is congested', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - testSpecificMock: mockGasApiDown, - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - const inputAmount = await driver.findElement('input[placeholder="0"]'); - await inputAmount.fill('1'); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - const error = await driver.isElementPresent( - '[data-testid="network-busy-tooltip"]', - ); - - assert.equal(error, true, 'Network error is present'); - }, - ); - }); -}); diff --git a/test/e2e/tests/petnames/petnames-transactions.spec.js b/test/e2e/tests/petnames/petnames-transactions.spec.js index 5546de0b4b82..e6ddf0229e99 100644 --- a/test/e2e/tests/petnames/petnames-transactions.spec.js +++ b/test/e2e/tests/petnames/petnames-transactions.spec.js @@ -5,13 +5,11 @@ const { unlockWallet, defaultGanacheOptions, openActionMenuAndStartSendFlow, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); const { expectName, focusTestDapp, - rejectSignatureOrTransactionRequest, saveName, rejectRedesignedSignatureOrTransactionRequest, } = require('./petnames-helpers'); @@ -38,196 +36,86 @@ const CUSTOM_NAME_MOCK = 'Custom Name'; const PROPOSED_NAME_MOCK = 'test4.lens'; describe('Petnames - Transactions', function () { - describe('Old confirmation screens', function () { - it('can save petnames for addresses in dapp send transactions', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withNoNames() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); - - // Test custom name. - await saveName( - driver, - ABBREVIATED_ADDRESS_MOCK, - CUSTOM_NAME_MOCK, - undefined, - ); - await rejectSignatureOrTransactionRequest(driver); - await focusTestDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, CUSTOM_NAME_MOCK, true); - - // Test proposed name. - await saveName( - driver, - CUSTOM_NAME_MOCK, - undefined, - PROPOSED_NAME_MOCK, - ); - await rejectSignatureOrTransactionRequest(driver); - await focusTestDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, PROPOSED_NAME_MOCK, true); - }, - ); - }); - - it('can save petnames for addresses in wallet send transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .withNoNames() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); - - // Test custom name. - await saveName( - driver, - ABBREVIATED_ADDRESS_MOCK, - CUSTOM_NAME_MOCK, - undefined, - ); - await rejectSignatureOrTransactionRequest(driver); - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, CUSTOM_NAME_MOCK, true); - - // Test proposed name. - await saveName( - driver, - CUSTOM_NAME_MOCK, - undefined, - PROPOSED_NAME_MOCK, - ); - await rejectSignatureOrTransactionRequest(driver); - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, PROPOSED_NAME_MOCK, true); - }, - ); - }); + it('can save petnames for addresses in dapp send transactions', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .withNoNames() + .build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await openDapp(driver); + await createDappSendTransaction(driver); + await switchToNotificationWindow(driver, 3); + await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); + + // Test custom name. + await saveName( + driver, + ABBREVIATED_ADDRESS_MOCK, + CUSTOM_NAME_MOCK, + undefined, + ); + await rejectRedesignedSignatureOrTransactionRequest(driver); + await focusTestDapp(driver); + await createDappSendTransaction(driver); + await switchToNotificationWindow(driver, 3); + await expectName(driver, CUSTOM_NAME_MOCK, true); + + // Test proposed name. + await saveName(driver, CUSTOM_NAME_MOCK, undefined, PROPOSED_NAME_MOCK); + await rejectRedesignedSignatureOrTransactionRequest(driver); + await focusTestDapp(driver); + await createDappSendTransaction(driver); + await switchToNotificationWindow(driver, 3); + await expectName(driver, PROPOSED_NAME_MOCK, true); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('can save petnames for addresses in dapp send transactions', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withNoNames() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await openDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); - - // Test custom name. - await saveName( - driver, - ABBREVIATED_ADDRESS_MOCK, - CUSTOM_NAME_MOCK, - undefined, - ); - await rejectRedesignedSignatureOrTransactionRequest(driver); - await focusTestDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, CUSTOM_NAME_MOCK, true); - - // Test proposed name. - await saveName( - driver, - CUSTOM_NAME_MOCK, - undefined, - PROPOSED_NAME_MOCK, - ); - await rejectRedesignedSignatureOrTransactionRequest(driver); - await focusTestDapp(driver); - await createDappSendTransaction(driver); - await switchToNotificationWindow(driver, 3); - await expectName(driver, PROPOSED_NAME_MOCK, true); - }, - ); - }); - - it('can save petnames for addresses in wallet send transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .withNoNames() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); - - // Test custom name. - await saveName( - driver, - ABBREVIATED_ADDRESS_MOCK, - CUSTOM_NAME_MOCK, - undefined, - ); - await rejectRedesignedSignatureOrTransactionRequest(driver); - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, CUSTOM_NAME_MOCK, true); - - // Test proposed name. - await saveName( - driver, - CUSTOM_NAME_MOCK, - undefined, - PROPOSED_NAME_MOCK, - ); - await rejectRedesignedSignatureOrTransactionRequest(driver); - await createWalletSendTransaction(driver, ADDRESS_MOCK); - await expectName(driver, PROPOSED_NAME_MOCK, true); - }, - ); - }); + it('can save petnames for addresses in wallet send transactions', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesController({ + featureFlags: { + sendHexData: true, + }, + }) + .withNoNames() + .build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createWalletSendTransaction(driver, ADDRESS_MOCK); + await expectName(driver, ABBREVIATED_ADDRESS_MOCK, false); + + // Test custom name. + await saveName( + driver, + ABBREVIATED_ADDRESS_MOCK, + CUSTOM_NAME_MOCK, + undefined, + ); + await rejectRedesignedSignatureOrTransactionRequest(driver); + await createWalletSendTransaction(driver, ADDRESS_MOCK); + await expectName(driver, CUSTOM_NAME_MOCK, true); + + // Test proposed name. + await saveName(driver, CUSTOM_NAME_MOCK, undefined, PROPOSED_NAME_MOCK); + await rejectRedesignedSignatureOrTransactionRequest(driver); + await createWalletSendTransaction(driver, ADDRESS_MOCK); + await expectName(driver, PROPOSED_NAME_MOCK, true); + }, + ); }); }); diff --git a/test/e2e/tests/ppom/ppom-blockaid-alert-contract-interaction.spec.js b/test/e2e/tests/ppom/ppom-blockaid-alert-contract-interaction.spec.js index e35c23f22c49..f499bd13abbc 100644 --- a/test/e2e/tests/ppom/ppom-blockaid-alert-contract-interaction.spec.js +++ b/test/e2e/tests/ppom/ppom-blockaid-alert-contract-interaction.spec.js @@ -195,7 +195,6 @@ describe('PPOM Blockaid Alert - Malicious Contract interaction @no-mmi', functio .withPreferencesController({ securityAlertsEnabled: true, preferences: { - redesignedTransactionsEnabled: true, redesignedConfirmationsEnabled: true, isRedesignedConfirmationsDeveloperEnabled: true, }, diff --git a/test/e2e/tests/ppom/ppom-blockaid-alert-simple-send.spec.js b/test/e2e/tests/ppom/ppom-blockaid-alert-simple-send.spec.js index 370aab17a499..d3d0da9020cd 100644 --- a/test/e2e/tests/ppom/ppom-blockaid-alert-simple-send.spec.js +++ b/test/e2e/tests/ppom/ppom-blockaid-alert-simple-send.spec.js @@ -6,7 +6,6 @@ const { sendScreenToConfirmScreen, logInWithBalanceValidation, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const { mockMultiNetworkBalancePolling, @@ -119,157 +118,113 @@ async function mockInfuraWithFailedResponses(mockServer) { * @see {@link https://wobbly-nutmeg-8a5.notion.site/MM-E2E-Testing-1e51b617f79240a49cd3271565c6e12d} */ describe('Simple Send Security Alert - Blockaid @no-mmi', function () { - describe('Old confirmation screens', function () { - it('should show "Be careful" if the PPOM request fails to check transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerOnMainnet() - .withPreferencesController({ - securityAlertsEnabled: true, - }) - .build(), - defaultGanacheOptions, - testSpecificMock: mockInfuraWithFailedResponses, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await logInWithBalanceValidation(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await sendScreenToConfirmScreen( - driver, - '0xB8c77482e45F1F44dE1745F52C74426C631bDD52', - '1.1', - ); - const expectedTitle = 'Be careful'; - - const bannerAlert = await driver.findElement({ - css: bannerAlertSelector, - text: expectedTitle, - }); - - assert( - bannerAlert, - `Banner alert not found. Expected Title: ${expectedTitle}`, - ); - }, - ); - }); + it('should not show security alerts for benign requests', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerOnMainnet() + .withPreferencesController({ + securityAlertsEnabled: true, + }) + .build(), + defaultGanacheOptions, + testSpecificMock: mockInfuraWithBenignResponses, + title: this.test.fullTitle(), + }, + + async ({ driver }) => { + await logInWithBalanceValidation(driver); + + await sendScreenToConfirmScreen(driver, mockBenignAddress, '1'); + + const isPresent = await driver.isElementPresent(bannerAlertSelector); + assert.equal(isPresent, false, `Banner alert unexpectedly found.`); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should not show security alerts for benign requests', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerOnMainnet() - .withPreferencesController({ - securityAlertsEnabled: true, - }) - .build(), - defaultGanacheOptions, - testSpecificMock: mockInfuraWithBenignResponses, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await logInWithBalanceValidation(driver); - - await sendScreenToConfirmScreen(driver, mockBenignAddress, '1'); - - const isPresent = await driver.isElementPresent(bannerAlertSelector); - assert.equal(isPresent, false, `Banner alert unexpectedly found.`); - }, - ); - }); - - /** - * Disclaimer: This test does not test all reason types. e.g. 'blur_farming', - * 'malicious_domain'. Some other tests are found in other files: - * e.g. test/e2e/flask/ppom-blockaid-alert-.spec.js - */ - it('should show security alerts for malicious requests', async function () { - await withFixtures( - // we need to use localhost instead of the ip - // see issue: https://github.com/MetaMask/MetaMask-planning/issues/3560 - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerOnMainnet() - .withPermissionControllerConnectedToTestDapp({ - useLocalhostHostname: true, - }) - .withPreferencesController({ - securityAlertsEnabled: true, - }) - .build(), - defaultGanacheOptions, - testSpecificMock: mockInfuraWithMaliciousResponses, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await logInWithBalanceValidation(driver); - - await driver.openNewPage('http://localhost:8080'); - - await driver.clickElement('#maliciousRawEthButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector({ - css: '.mm-text--body-lg-medium', - text: expectedMaliciousTitle, - }); - - await driver.waitForSelector({ - css: '.mm-text--body-md', - text: expectedMaliciousDescription, - }); - }, - ); - }); - - it('should show "Be careful" if the PPOM request fails to check transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerOnMainnet() - .withPreferencesController({ - securityAlertsEnabled: true, - }) - .build(), - defaultGanacheOptions, - testSpecificMock: mockInfuraWithFailedResponses, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await logInWithBalanceValidation(driver); - - await sendScreenToConfirmScreen( - driver, - '0xB8c77482e45F1F44dE1745F52C74426C631bDD52', - '1.1', - ); - const expectedTitle = 'Be careful'; - - const bannerAlert = await driver.findElement({ - css: '[data-testid="confirm-banner-alert"]', - text: expectedTitle, - }); + /** + * Disclaimer: This test does not test all reason types. e.g. 'blur_farming', + * 'malicious_domain'. Some other tests are found in other files: + * e.g. test/e2e/flask/ppom-blockaid-alert-.spec.js + */ + it('should show security alerts for malicious requests', async function () { + await withFixtures( + // we need to use localhost instead of the ip + // see issue: https://github.com/MetaMask/MetaMask-planning/issues/3560 + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerOnMainnet() + .withPermissionControllerConnectedToTestDapp({ + useLocalhostHostname: true, + }) + .withPreferencesController({ + securityAlertsEnabled: true, + }) + .build(), + defaultGanacheOptions, + testSpecificMock: mockInfuraWithMaliciousResponses, + title: this.test.fullTitle(), + }, + + async ({ driver }) => { + await logInWithBalanceValidation(driver); + + await driver.openNewPage('http://localhost:8080'); + + await driver.clickElement('#maliciousRawEthButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.waitForSelector({ + css: '.mm-text--body-lg-medium', + text: expectedMaliciousTitle, + }); + + await driver.waitForSelector({ + css: '.mm-text--body-md', + text: expectedMaliciousDescription, + }); + }, + ); + }); - assert( - bannerAlert, - `Banner alert not found. Expected Title: ${expectedTitle}`, - ); - }, - ); - }); + it('should show "Be careful" if the PPOM request fails to check transaction', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerOnMainnet() + .withPreferencesController({ + securityAlertsEnabled: true, + }) + .build(), + defaultGanacheOptions, + testSpecificMock: mockInfuraWithFailedResponses, + title: this.test.fullTitle(), + }, + + async ({ driver }) => { + await logInWithBalanceValidation(driver); + + await sendScreenToConfirmScreen( + driver, + '0xB8c77482e45F1F44dE1745F52C74426C631bDD52', + '1.1', + ); + const expectedTitle = 'Be careful'; + + const bannerAlert = await driver.findElement({ + css: '[data-testid="confirm-banner-alert"]', + text: expectedTitle, + }); + + assert( + bannerAlert, + `Banner alert not found. Expected Title: ${expectedTitle}`, + ); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js b/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js index e23db3855609..659ed4cfbc41 100644 --- a/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js +++ b/test/e2e/tests/request-queuing/batch-txs-per-dapp-diff-network.spec.js @@ -9,244 +9,119 @@ const { WINDOW_TITLES, defaultGanacheOptions, largeDelayMs, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing for Multiple Dapps and Txs on different networks', function () { - describe('Old confirmation screens', function () { - it('should batch confirmation txs for different dapps on different networks.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should batch confirmation txs for different dapps on different networks.', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, + title: this.test.fullTitle(), + }, - async ({ driver }) => { - await unlockWallet(driver); + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Connect to dapp 1 + await driver.clickElement({ text: 'Connect', tag: 'button' }); - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); + // Wait for the first dapp's connect confirmation to disappear + await driver.waitUntilXWindowHandles(2); - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); + // Connect to dapp 2 + await driver.clickElement({ text: 'Connect', tag: 'button' }); - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + // Dapp one send tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); - // Dapp one send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); + await driver.delay(largeDelayMs); - await driver.delay(largeDelayMs); + // Dapp two send tx + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); - // Dapp two send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Reject all', + tag: 'button', + }); - // Reject All Transactions - await driver.clickElement('.page-container__footer-secondary a'); + // Wait for confirmation to close + await driver.delay(2000); - // TODO: Do we want to confirm here? - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); + // Wait for new confirmations queued from second dapp to open + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Wait for confirmation to close - // TODO: find a better way to handle different dialog ids - await driver.delay(2000); + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); - // Wait for new confirmations queued from second dapp to open - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - }, - ); - }); - }); - - describe('Redesigned confirmation screens', function () { - it('should batch confirmation txs for different dapps on different networks.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Dapp one send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.delay(largeDelayMs); - - // Dapp two send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); - - // Wait for confirmation to close - await driver.delay(2000); - - // Wait for new confirmations queued from second dapp to open - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); - }, - ); - }); + // Check correct network on confirm tx. + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/batch-txs-per-dapp-extra-tx.spec.js b/test/e2e/tests/request-queuing/batch-txs-per-dapp-extra-tx.spec.js index 898fe4cf3d90..2c56b23e03cc 100644 --- a/test/e2e/tests/request-queuing/batch-txs-per-dapp-extra-tx.spec.js +++ b/test/e2e/tests/request-queuing/batch-txs-per-dapp-extra-tx.spec.js @@ -9,324 +9,159 @@ const { unlockWallet, WINDOW_TITLES, withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing for Multiple Dapps and Txs on different networks', function () { - describe('Old confirmation flows', function () { - it('should batch confirmation txs for different dapps on different networks adds extra tx after.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should batch confirmation txs for different dapps on different networks adds extra tx after.', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Ensure Dapp One is on Localhost 8546 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Should auto switch without prompt since already approved via connect - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // Dapp 1 send 2 tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); - - // Dapp 2 send 2 tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - // We cannot wait for the dialog, since it is already opened from before - await driver.delay(largeDelayMs); - - // Dapp 1 send 1 tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - // We cannot switch directly, as the dialog is sometimes closed and re-opened - await driver.delay(largeDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); - - // Reject All Transactions - await driver.clickElement('.page-container__footer-secondary a'); - - // TODO: Do we want to confirm here? - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - // Wait for new confirmations queued from second dapp to open - // We need a big delay to make sure dialog is not invalidated - // TODO: find a better way to handle different dialog ids - await driver.delay(2000); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - - // Reject All Transactions - await driver.clickElement('.page-container__footer-secondary a'); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); - - // Wait for new confirmations queued from second dapp to open - // We need a big delay to make sure dialog is not invalidated - // TODO: find a better way to handle different dialog ids - await driver.delay(2000); - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - }, - ); - }); - }); - - describe('Redesigned confirmation flows', function () { - it('should batch confirmation txs for different dapps on different networks adds extra tx after.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Ensure Dapp One is on Localhost 8546 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Should auto switch without prompt since already approved via connect - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // Dapp 1 send 2 tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); - - // Dapp 2 send 2 tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - // We cannot wait for the dialog, since it is already opened from before - await driver.delay(largeDelayMs); - - // Dapp 1 send 1 tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - // We cannot switch directly, as the dialog is sometimes closed and re-opened - await driver.delay(largeDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - // Reject All Transactions - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - // Wait for new confirmations queued from second dapp to open - // We need a big delay to make sure dialog is not invalidated - // TODO: find a better way to handle different dialog ids - await driver.delay(2000); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); - - // Reject All Transactions - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject all', - tag: 'button', - }); - - // Wait for new confirmations queued from second dapp to open - // We need a big delay to make sure dialog is not invalidated - // TODO: find a better way to handle different dialog ids - await driver.delay(2000); - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - }, - ); - }); + title: this.test.fullTitle(), + }, + + async ({ driver }) => { + await unlockWallet(driver); + + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); + + // Connect to dapp 1 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); + + await driver.switchToWindowWithUrl(DAPP_URL); + + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x53a' }], + }); + + // Ensure Dapp One is on Localhost 8546 + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + + // Should auto switch without prompt since already approved via connect + + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + + // Wait for the first dapp's connect confirmation to disappear + await driver.waitUntilXWindowHandles(2); + + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); + + // Connect to dapp 2 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); + + // Dapp 1 send 2 tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x53a', + }); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); + + await driver.waitUntilXWindowHandles(4); + + // Dapp 2 send 2 tx + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x53a', + }); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); + // We cannot wait for the dialog, since it is already opened from before + await driver.delay(largeDelayMs); + + // Dapp 1 send 1 tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x53a', + }); + await driver.clickElement('#sendButton'); + // We cannot switch directly, as the dialog is sometimes closed and re-opened + await driver.delay(largeDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); + + // Reject All Transactions + await driver.clickElementAndWaitForWindowToClose({ + text: 'Reject all', + tag: 'button', + }); + + await driver.switchToWindowWithUrl(DAPP_URL); + + // Wait for new confirmations queued from second dapp to open + // We need a big delay to make sure dialog is not invalidated + // TODO: find a better way to handle different dialog ids + await driver.delay(2000); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); + + // Check correct network on confirm tx. + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); + + // Reject All Transactions + await driver.clickElementAndWaitForWindowToClose({ + text: 'Reject all', + tag: 'button', + }); + + // Wait for new confirmations queued from second dapp to open + // We need a big delay to make sure dialog is not invalidated + // TODO: find a better way to handle different dialog ids + await driver.delay(2000); + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/batch-txs-per-dapp-same-network.spec.js b/test/e2e/tests/request-queuing/batch-txs-per-dapp-same-network.spec.js index c85631d32800..7ba5ca579298 100644 --- a/test/e2e/tests/request-queuing/batch-txs-per-dapp-same-network.spec.js +++ b/test/e2e/tests/request-queuing/batch-txs-per-dapp-same-network.spec.js @@ -10,315 +10,156 @@ const { WINDOW_TITLES, defaultGanacheOptions, largeDelayMs, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing for Multiple Dapps and Txs on same networks', function () { - describe('Old confirmation screens', function () { - it('should batch confirmation txs for different dapps on same networks ', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .build(), - dappOptions: { numberOfDapps: 3 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should batch confirmation txs for different dapps on same networks ', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerTripleGanache() + .build(), + dappOptions: { numberOfDapps: 3 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + { + port: 7777, + chainId: 1000, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, + title: this.test.fullTitle(), + }, - async ({ driver }) => { - await unlockWallet(driver); + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Connect to dapp 1 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - // Connect to dapp 1 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + await driver.delay(regularDelayMs); - await driver.delay(regularDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithUrl(DAPP_URL); - await driver.switchToWindowWithUrl(DAPP_URL); + let switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x3e8' }], + }); - let switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x3e8' }], - }); + // Ensure Dapp One is on Localhost 7777 + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); - // Ensure Dapp One is on Localhost 7777 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); + // Should auto switch without prompt since already approved via connect - // Should auto switch without prompt since already approved via connect + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + // Wait for the first dapp's connect confirmation to disappear + await driver.waitUntilXWindowHandles(2); - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); + // Connect to dapp 2 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + await driver.delay(regularDelayMs); - await driver.delay(regularDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); + switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x53a' }], + }); - switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); + // Ensure Dapp Two is on Localhost 8545 + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); - // Ensure Dapp Two is on Localhost 8545 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); + // Should auto switch without prompt since already approved via connect - // Should auto switch without prompt since already approved via connect + // Dapp one send two tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); - // Dapp one send two tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); + await driver.delay(largeDelayMs); - await driver.delay(largeDelayMs); + // Dapp two send two tx + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); - // Dapp two send two tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); + // Check correct network on confirm tx. + await driver.findElement({ + css: 'p', + text: 'Localhost 7777', + }); - // Check correct network on confirm tx. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 7777', - }); + // Reject All Transactions + await driver.clickElement({ text: 'Reject all', tag: 'button' }); - // Reject All Transactions - await driver.clickElement('.page-container__footer-secondary a'); + // Wait for confirmation to close + await driver.waitUntilXWindowHandles(4); - await driver.clickElement({ text: 'Reject all', tag: 'button' }); // TODO: Do we want to confirm here? + // Wait for new confirmations queued from second dapp to open + await driver.delay(largeDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Wait for confirmation to close - await driver.waitUntilXWindowHandles(4); + await driver.waitForSelector( + By.xpath("//p[normalize-space(.)='1 of 2']"), + ); - // Wait for new confirmations queued from second dapp to open - await driver.delay(largeDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//div[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - }, - ); - }); - }); - - describe('Redesigned confirmation screens', function () { - it('should batch confirmation txs for different dapps on same networks ', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .build(), - dappOptions: { numberOfDapps: 3 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - let switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x3e8' }], - }); - - // Ensure Dapp One is on Localhost 7777 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Should auto switch without prompt since already approved via connect - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Ensure Dapp Two is on Localhost 8545 - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - // Should auto switch without prompt since already approved via connect - - // Dapp one send two tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.delay(largeDelayMs); - - // Dapp two send two tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: 'p', - text: 'Localhost 7777', - }); - - // Reject All Transactions - await driver.clickElement({ text: 'Reject all', tag: 'button' }); - - // Wait for confirmation to close - await driver.waitUntilXWindowHandles(4); - - // Wait for new confirmations queued from second dapp to open - await driver.delay(largeDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector( - By.xpath("//p[normalize-space(.)='1 of 2']"), - ); - - // Check correct network on confirm tx. - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); - }, - ); - }); + // Check correct network on confirm tx. + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/dapp1-send-dapp2-signTypedData.spec.js b/test/e2e/tests/request-queuing/dapp1-send-dapp2-signTypedData.spec.js index 9d7fb364f21c..d716b8bf1f12 100644 --- a/test/e2e/tests/request-queuing/dapp1-send-dapp2-signTypedData.spec.js +++ b/test/e2e/tests/request-queuing/dapp1-send-dapp2-signTypedData.spec.js @@ -7,301 +7,148 @@ const { DAPP_ONE_URL, regularDelayMs, defaultGanacheOptions, - tempToggleSettingRedesignedConfirmations, WINDOW_TITLES, largeDelayMs, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); -const { PAGES } = require('../../webdriver/driver'); describe('Request Queuing Dapp 1, Switch Tx -> Dapp 2 Send Tx', function () { - describe('Old confirmation screens', function () { - it('should queue signTypedData tx after eth_sendTransaction confirmation and signTypedData confirmation should target the correct network after eth_sendTransaction is confirmed @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should queue signTypedData tx after eth_sendTransaction confirmation and signTypedData confirmation should target the correct network after eth_sendTransaction is confirmed @no-mmi', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerTripleGanache() + .withSelectedNetworkControllerPerDomain() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + { + port: 7777, + chainId: 1000, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); - await tempToggleSettingRedesignedConfirmations(driver); - - // Navigate to extension home screen - await driver.navigate(PAGES.HOME); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open and connect Dapp One - await openDapp(driver, undefined, DAPP_URL); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - // Open and connect to Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // Switch Dapp Two to Localhost 8546 - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - let switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Initiate switchEthereumChain on Dapp one - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x53a', - }); - - // Should auto switch without prompt since already approved via connect - - // Switch back to Dapp One - await driver.switchToWindowWithUrl(DAPP_URL); - - // switch chain for Dapp One - switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x3e8' }], - }); - - // Initiate switchEthereumChain on Dapp one - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x3e8', - }); - // Should auto switch without prompt since already approved via connect - - await driver.switchToWindowWithUrl(DAPP_URL); - - // eth_sendTransaction request - await driver.clickElement('#sendButton'); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - // signTypedData request - await driver.clickElement('#signTypedData'); - - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the send confirmation. - await driver.waitForSelector({ - css: '[data-testid="network-display"]', - text: 'Localhost 7777', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.delay(largeDelayMs); - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the signTypedData confirmation. - await driver.waitForSelector({ - css: '[data-testid="signature-request-network-display"]', - text: 'Localhost 8546', - }); - - await driver.clickElement({ text: 'Reject', tag: 'button' }); - }, - ); - }); - }); - - describe('Redesigned confirmation screens', function () { - it('should queue signTypedData tx after eth_sendTransaction confirmation and signTypedData confirmation should target the correct network after eth_sendTransaction is confirmed @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open and connect Dapp One - await openDapp(driver, undefined, DAPP_URL); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - // Open and connect to Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - // Switch Dapp Two to Localhost 8546 - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - let switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x53a' }], - }); - - // Initiate switchEthereumChain on Dapp one - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x53a', - }); - - // Should auto switch without prompt since already approved via connect - - // Switch back to Dapp One - await driver.switchToWindowWithUrl(DAPP_URL); - - // switch chain for Dapp One - switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x3e8' }], - }); - - // Initiate switchEthereumChain on Dapp one - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x3e8', - }); - // Should auto switch without prompt since already approved via connect - - await driver.switchToWindowWithUrl(DAPP_URL); - - // eth_sendTransaction request - await driver.clickElement('#sendButton'); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - // signTypedData request - await driver.clickElement('#signTypedData'); - - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the send confirmation. - await driver.waitForSelector({ - css: 'p', - text: 'Localhost 7777', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.delay(largeDelayMs); - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the signTypedData confirmation. - await driver.waitForSelector({ - css: 'p', - text: 'Localhost 8546', - }); - - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - }, - ); - }); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // Open and connect Dapp One + await openDapp(driver, undefined, DAPP_URL); + + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.delay(regularDelayMs); + + await driver.waitUntilXWindowHandles(3); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); + // Open and connect to Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); + + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); + + await driver.delay(regularDelayMs); + + await driver.waitUntilXWindowHandles(4); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); + + // Switch Dapp Two to Localhost 8546 + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + let switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x53a' }], + }); + + // Initiate switchEthereumChain on Dapp one + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + + await driver.waitForSelector({ + css: '[id="chainId"]', + text: '0x53a', + }); + + // Should auto switch without prompt since already approved via connect + + // Switch back to Dapp One + await driver.switchToWindowWithUrl(DAPP_URL); + + // switch chain for Dapp One + switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x3e8' }], + }); + + // Initiate switchEthereumChain on Dapp one + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); + await driver.waitForSelector({ + css: '[id="chainId"]', + text: '0x3e8', + }); + // Should auto switch without prompt since already approved via connect + + await driver.switchToWindowWithUrl(DAPP_URL); + + // eth_sendTransaction request + await driver.clickElement('#sendButton'); + await driver.waitUntilXWindowHandles(3); + + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + + // signTypedData request + await driver.clickElement('#signTypedData'); + + await driver.waitUntilXWindowHandles(4); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // Check correct network on the send confirmation. + await driver.waitForSelector({ + css: 'p', + text: 'Localhost 7777', + }); + + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.delay(largeDelayMs); + await driver.waitUntilXWindowHandles(4); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // Check correct network on the signTypedData confirmation. + await driver.waitForSelector({ + css: 'p', + text: 'Localhost 8546', + }); + + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/dapp1-switch-dapp2-eth-request-accounts.spec.js b/test/e2e/tests/request-queuing/dapp1-switch-dapp2-eth-request-accounts.spec.js index bd61fe8d00b9..d6a95d44e530 100644 --- a/test/e2e/tests/request-queuing/dapp1-switch-dapp2-eth-request-accounts.spec.js +++ b/test/e2e/tests/request-queuing/dapp1-switch-dapp2-eth-request-accounts.spec.js @@ -9,244 +9,148 @@ const { regularDelayMs, WINDOW_TITLES, defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing Dapp 1 Send Tx -> Dapp 2 Request Accounts Tx', function () { - describe('Old confirmation screens', function () { - it('should queue `eth_requestAccounts` requests when the requesting dapp does not already have connected accounts', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPermissionControllerConnectedToTestDapp() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should queue `eth_requestAccounts` requests when the requesting dapp does not already have connected accounts', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withPermissionControllerConnectedToTestDapp() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Dapp Send Button + await driver.clickElement('#sendButton'); + await driver.delay(regularDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Dapp Send Button - await driver.clickElement('#sendButton'); - await driver.delay(regularDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.waitForSelector({ + text: 'Cancel', + tag: 'button', + }); - await driver.waitForSelector({ - text: 'Reject', - tag: 'button', - }); + await driver.delay(regularDelayMs); - await driver.delay(regularDelayMs); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + // Leave the confirmation pending + await openDapp(driver, undefined, DAPP_ONE_URL); - // Leave the confirmation pending - await openDapp(driver, undefined, DAPP_ONE_URL); + const accountsOnload = await ( + await driver.findElement('#accounts') + ).getText(); + assert.deepStrictEqual(accountsOnload, ''); - const accountsOnload = await ( - await driver.findElement('#accounts') - ).getText(); - assert.deepStrictEqual(accountsOnload, ''); + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + await driver.delay(regularDelayMs); - await driver.delay(regularDelayMs); + const accountsBeforeConnect = await ( + await driver.findElement('#accounts') + ).getText(); + assert.deepStrictEqual(accountsBeforeConnect, ''); - const accountsBeforeConnect = await ( - await driver.findElement('#accounts') - ).getText(); - assert.deepStrictEqual(accountsBeforeConnect, ''); + // Reject the pending confirmation from the first dapp + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Reject the pending confirmation from the first dapp - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Reject', - tag: 'button', - }); + await driver.clickElement({ + text: 'Cancel', + tag: 'button', + }); - // Wait for switch confirmation to close then request accounts confirmation to show for the second dapp - await driver.delay(regularDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // Wait for switch confirmation to close then request accounts confirmation to show for the second dapp + await driver.delay(regularDelayMs); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.waitForSelector({ - text: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - css: '#accounts', - }); - }, - ); - }); + await driver.waitForSelector({ + text: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + css: '#accounts', + }); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should queue `eth_requestAccounts` requests when the requesting dapp does not already have connected accounts', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPermissionControllerConnectedToTestDapp() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Dapp Send Button - await driver.clickElement('#sendButton'); - await driver.delay(regularDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector({ - text: 'Cancel', - tag: 'button', - }); - - await driver.delay(regularDelayMs); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Leave the confirmation pending - await openDapp(driver, undefined, DAPP_ONE_URL); - - const accountsOnload = await ( - await driver.findElement('#accounts') - ).getText(); - assert.deepStrictEqual(accountsOnload, ''); - - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.delay(regularDelayMs); - - const accountsBeforeConnect = await ( - await driver.findElement('#accounts') - ).getText(); - assert.deepStrictEqual(accountsBeforeConnect, ''); - - // Reject the pending confirmation from the first dapp - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Cancel', - tag: 'button', - }); - - // Wait for switch confirmation to close then request accounts confirmation to show for the second dapp - await driver.delay(regularDelayMs); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - await driver.waitForSelector({ - text: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - css: '#accounts', - }); + it('should not queue the `eth_requestAccounts` requests when the requesting dapp already has connected accounts', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withPermissionControllerConnectedToTwoTestDapps() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - ); - }); - - it('should not queue the `eth_requestAccounts` requests when the requesting dapp already has connected accounts', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPermissionControllerConnectedToTwoTestDapps() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Dapp Send Button - await driver.clickElement('#sendButton'); + // Dapp Send Button + await driver.clickElement('#sendButton'); - // Leave the confirmation pending + // Leave the confirmation pending - await openDapp(driver, undefined, DAPP_ONE_URL); + await openDapp(driver, undefined, DAPP_ONE_URL); - const ethRequestAccounts = JSON.stringify({ - jsonrpc: '2.0', - method: 'eth_requestAccounts', - }); + const ethRequestAccounts = JSON.stringify({ + jsonrpc: '2.0', + method: 'eth_requestAccounts', + }); - const accounts = await driver.executeScript( - `return window.ethereum.request(${ethRequestAccounts})`, - ); + const accounts = await driver.executeScript( + `return window.ethereum.request(${ethRequestAccounts})`, + ); - assert.deepStrictEqual(accounts, [ - '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - ]); - }, - ); - }); + assert.deepStrictEqual(accounts, [ + '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', + ]); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js b/test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js index e2b5bb0ca9b1..e0aa4f7fa538 100644 --- a/test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js +++ b/test/e2e/tests/request-queuing/dapp1-switch-dapp2-send.spec.js @@ -7,615 +7,302 @@ const { unlockWallet, WINDOW_TITLES, withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing Dapp 1, Switch Tx -> Dapp 2 Send Tx', function () { - describe('Old confirmation screens', function () { - it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is confirmed', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is confirmed', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerTripleGanache() + .withSelectedNetworkControllerPerDomain() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + { + port: 7777, + chainId: 1000, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Connect to dapp + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - // Connect to dapp - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + const editButtons = await driver.findElements('[data-testid="edit"]'); - const editButtons = await driver.findElements('[data-testid="edit"]'); + await editButtons[1].click(); - await editButtons[1].click(); + // Disconnect Localhost 8545 + await driver.clickElement({ + text: 'Localhost 8545', + tag: 'p', + }); - // Disconnect Localhost 8545 - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); + await driver.clickElement('[data-testid="connect-more-chains-button"]'); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp One - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findElement({ - text: 'Use your enabled networks', - tag: 'p', - }); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - // Wait for switch confirmation to close then tx confirmation to show. - // There is an extra window appearing and disappearing - // so we leave this delay until the issue is fixed (#27360) - await driver.delay(5000); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - // Check correct network on the send confirmation. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); + // Connect to dapp 2 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); - - it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is cancelled.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + await driver.switchToWindowWithUrl(DAPP_URL); - // Connect to dapp - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + // switchEthereumChain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x539' }], + }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - const editButtons = await driver.findElements('[data-testid="edit"]'); + // Initiate switchEthereumChain on Dapp One + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); - await editButtons[1].click(); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.findElement({ + text: 'Use your enabled networks', + tag: 'p', + }); - // Disconnect Localhost 8545 - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.clickElement('#sendButton'); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); + // Wait for switch confirmation to close then tx confirmation to show. + // There is an extra window appearing and disappearing + // so we leave this delay until the issue is fixed (#27360) + await driver.delay(5000); - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // Check correct network on the send confirmation. + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Confirm', + tag: 'button', + }); - await driver.switchToWindowWithUrl(DAPP_URL); + // Switch back to the extension + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); - // Initiate switchEthereumChain on Dapp One - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, + // Check for transaction + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - // Wait for switch confirmation to close then tx confirmation to show. - // There is an extra window appearing and disappearing - // so we leave this delay until the issue is fixed (#27360) - await driver.delay(5000); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the send confirmation. - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); + return confirmedTxes.length === 1; + }, 10000); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is confirmed', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is cancelled.', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerTripleGanache() + .withSelectedNetworkControllerPerDomain() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + { + port: 7777, + chainId: 1000, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Connect to dapp - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + // Connect to dapp + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + const editButtons = await driver.findElements('[data-testid="edit"]'); - const editButtons = await driver.findElements('[data-testid="edit"]'); + await editButtons[1].click(); - await editButtons[1].click(); + // Disconnect Localhost 8545 + await driver.clickElement({ + text: 'Localhost 8545', + tag: 'p', + }); - // Disconnect Localhost 8545 - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); + await driver.clickElement('[data-testid="connect-more-chains-button"]'); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // Connect to dapp 2 + await driver.findClickableElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement('#connectButton'); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithUrl(DAPP_URL); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); + await driver.switchToWindowWithUrl(DAPP_URL); - // Initiate switchEthereumChain on Dapp One - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); + // switchEthereumChain request + const switchEthereumChainRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_switchEthereumChain', + params: [{ chainId: '0x539' }], + }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.findElement({ - text: 'Use your enabled networks', - tag: 'p', - }); + // Initiate switchEthereumChain on Dapp One + await driver.executeScript( + `window.ethereum.request(${switchEthereumChainRequest})`, + ); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.clickElement('#sendButton'); + await driver.clickElement('#sendButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); + // Wait for switch confirmation to close then tx confirmation to show. + // There is an extra window appearing and disappearing + // so we leave this delay until the issue is fixed (#27360) + await driver.delay(5000); - // Wait for switch confirmation to close then tx confirmation to show. - // There is an extra window appearing and disappearing - // so we leave this delay until the issue is fixed (#27360) - await driver.delay(5000); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // Check correct network on the send confirmation. + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); - // Check correct network on the send confirmation. - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Confirm', + tag: 'button', + }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); + // Switch back to the extension + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', + // Check for transaction + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); - - it('should queue send tx after switch network confirmation and transaction should target the correct network after switch is cancelled.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - const editButtons = await driver.findElements('[data-testid="edit"]'); - - await editButtons[1].click(); - - // Disconnect Localhost 8545 - await driver.clickElement({ - text: 'Localhost 8545', - tag: 'p', - }); - - await driver.clickElement( - '[data-testid="connect-more-chains-button"]', - ); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.findClickableElement({ text: 'Connect', tag: 'button' }); - await driver.clickElement('#connectButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithUrl(DAPP_URL); - - // switchEthereumChain request - const switchEthereumChainRequest = JSON.stringify({ - jsonrpc: '2.0', - method: 'wallet_switchEthereumChain', - params: [{ chainId: '0x539' }], - }); - - // Initiate switchEthereumChain on Dapp One - await driver.executeScript( - `window.ethereum.request(${switchEthereumChainRequest})`, - ); - - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - await driver.clickElement('#sendButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - - // Wait for switch confirmation to close then tx confirmation to show. - // There is an extra window appearing and disappearing - // so we leave this delay until the issue is fixed (#27360) - await driver.delay(5000); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Check correct network on the send confirmation. - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); + return confirmedTxes.length === 1; + }, 10000); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/multi-dapp-sendTx-revokePermission.spec.js b/test/e2e/tests/request-queuing/multi-dapp-sendTx-revokePermission.spec.js index 66e1b8963731..f147b8d87fc8 100644 --- a/test/e2e/tests/request-queuing/multi-dapp-sendTx-revokePermission.spec.js +++ b/test/e2e/tests/request-queuing/multi-dapp-sendTx-revokePermission.spec.js @@ -7,245 +7,122 @@ const { DAPP_ONE_URL, WINDOW_TITLES, defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing for Multiple Dapps and Txs on different networks revokePermissions', function () { - describe('Old confirmation screens', function () { - it('should close transaction for revoked permission of eth_accounts but show queued tx from second dapp on a different network.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should close transaction for revoked permission of eth_accounts but show queued tx from second dapp on a different network.', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Dapp 1 send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x539', - }); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); - await driver.delay(3000); - - // Dapp 2 send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.waitUntilXWindowHandles(4); - - // Dapp 1 revokePermissions - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x539', - }); - await driver.assertElementNotPresent({ - css: '[id="chainId"]', - text: '0x53a', - }); - - // Confirmation will close then reopen - await driver.clickElement('#revokeAccountsPermission'); - // TODO: find a better way to handle different dialog ids - await driver.delay(3000); - - // Check correct network on confirm tx. - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - }, - ); - }); - }); - - describe('New confirmation screens', function () { - it('should close transaction for revoked permission of eth_accounts but show queued tx from second dapp on a different network.', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - - async ({ driver }) => { - await unlockWallet(driver); - - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); - - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // Wait for the first dapp's connect confirmation to disappear - await driver.waitUntilXWindowHandles(2); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Dapp 1 send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x539', - }); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); - await driver.delay(3000); - - // Dapp 2 send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x53a', - }); - await driver.clickElement('#sendButton'); - await driver.waitUntilXWindowHandles(4); - - // Dapp 1 revokePermissions - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.findElement({ - css: '[id="chainId"]', - text: '0x539', - }); - await driver.assertElementNotPresent({ - css: '[id="chainId"]', - text: '0x53a', - }); - - // Confirmation will close then reopen - await driver.clickElement('#revokeAccountsPermission'); - // TODO: find a better way to handle different dialog ids - await driver.delay(3000); - - // Check correct network on confirm tx. - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.findElement({ - css: 'p', - text: 'Localhost 8546', - }); - }, - ); - }); + title: this.test.fullTitle(), + }, + + async ({ driver }) => { + await unlockWallet(driver); + + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); + + // Connect to dapp 1 + await driver.clickElement({ text: 'Connect', tag: 'button' }); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); + + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); + + // Wait for the first dapp's connect confirmation to disappear + await driver.waitUntilXWindowHandles(2); + + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); + + // Connect to dapp 2 + await driver.clickElement({ text: 'Connect', tag: 'button' }); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); + + // Dapp 1 send tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x539', + }); + await driver.clickElement('#sendButton'); + + await driver.waitUntilXWindowHandles(4); + await driver.delay(3000); + + // Dapp 2 send tx + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x53a', + }); + await driver.clickElement('#sendButton'); + await driver.waitUntilXWindowHandles(4); + + // Dapp 1 revokePermissions + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.findElement({ + css: '[id="chainId"]', + text: '0x539', + }); + await driver.assertElementNotPresent({ + css: '[id="chainId"]', + text: '0x53a', + }); + + // Confirmation will close then reopen + await driver.clickElement('#revokeAccountsPermission'); + // TODO: find a better way to handle different dialog ids + await driver.delay(3000); + + // Check correct network on confirm tx. + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await driver.findElement({ + css: 'p', + text: 'Localhost 8546', + }); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js b/test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js index fec528a84c60..000727f8bd5c 100644 --- a/test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js +++ b/test/e2e/tests/request-queuing/multiple-networks-dapps-txs.spec.js @@ -8,275 +8,135 @@ const { WINDOW_TITLES, defaultGanacheOptions, largeDelayMs, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); describe('Request Queuing for Multiple Dapps and Txs on different networks.', function () { - describe('Old confirmation screens', function () { - it('should switch to the dapps network automatically when handling sendTransaction calls @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should switch to the dapps network automatically when handling sendTransaction calls @no-mmi', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withSelectedNetworkControllerPerDomain() + .build(), + dappOptions: { numberOfDapps: 2 }, + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open Dapp One + await openDapp(driver, undefined, DAPP_URL); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Connect to dapp 1 + await driver.clickElement({ text: 'Connect', tag: 'button' }); - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Dapp one send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); - // Dapp two send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); - // First switch network - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. + // Open Dapp Two + await openDapp(driver, undefined, DAPP_ONE_URL); - // Wait for confirm tx after switch network confirmation. - await driver.delay(largeDelayMs); + // Connect to dapp 2 + await driver.clickElement({ text: 'Connect', tag: 'button' }); - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Reject Transaction - await driver.findClickableElement({ text: 'Reject', tag: 'button' }); - await driver.clickElement( - '[data-testid="page-container-footer-cancel"]', - ); - - // TODO: No second confirmation from dapp two will show, have to go back to the extension to see the switch chain & dapp two's tx. - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // Check for unconfirmed transaction in tx list - await driver.wait(async () => { - const unconfirmedTxes = await driver.findElements( - '.transaction-list-item--unconfirmed', - ); - return unconfirmedTxes.length === 1; - }, 10000); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Connect', + tag: 'button', + }); - // Click Unconfirmed Tx - await driver.clickElement('.transaction-list-item--unconfirmed'); + // Dapp one send tx + await driver.switchToWindowWithUrl(DAPP_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); - await driver.assertElementNotPresent({ - tag: 'p', - text: 'Network switched to Localhost 8546', - }); + await driver.waitUntilXWindowHandles(4); - // Confirm Tx - await driver.clickElement( - '[data-testid="page-container-footer-next"]', - ); - - // Check for Confirmed Transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); - }); + // Dapp two send tx + await driver.switchToWindowWithUrl(DAPP_ONE_URL); + await driver.delay(largeDelayMs); + await driver.clickElement('#sendButton'); - describe('Redesigned confirmation screens', function () { - it('should switch to the dapps network automatically when handling sendTransaction calls @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withSelectedNetworkControllerPerDomain() - .build(), - dappOptions: { numberOfDapps: 2 }, - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + // First switch network + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Open Dapp One - await openDapp(driver, undefined, DAPP_URL); + // Wait for confirm tx after switch network confirmation. + await driver.delay(largeDelayMs); - // Connect to dapp 1 - await driver.clickElement({ text: 'Connect', tag: 'button' }); + await driver.waitUntilXWindowHandles(4); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + // Reject Transaction + await driver.findClickableElement({ text: 'Cancel', tag: 'button' }); + await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); + // TODO: No second confirmation from dapp two will show, have to go back to the extension to see the switch chain & dapp two's tx. + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, + // Check for unconfirmed transaction in tx list + await driver.wait(async () => { + const unconfirmedTxes = await driver.findElements( + '.transaction-list-item--unconfirmed', ); + return unconfirmedTxes.length === 1; + }, 10000); - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - // TODO: Request Queuing bug when opening both dapps at the same time will have them stuck on the same network, with will be incorrect for one of them. - // Open Dapp Two - await openDapp(driver, undefined, DAPP_ONE_URL); - - // Connect to dapp 2 - await driver.clickElement({ text: 'Connect', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Connect', - tag: 'button', - }); - - // Dapp one send tx - await driver.switchToWindowWithUrl(DAPP_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); - - await driver.waitUntilXWindowHandles(4); - - // Dapp two send tx - await driver.switchToWindowWithUrl(DAPP_ONE_URL); - await driver.delay(largeDelayMs); - await driver.clickElement('#sendButton'); + // Click Unconfirmed Tx + await driver.clickElement('.transaction-list-item--unconfirmed'); - // First switch network - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.assertElementNotPresent({ + tag: 'p', + text: 'Network switched to Localhost 8546', + }); - // Wait for confirm tx after switch network confirmation. - await driver.delay(largeDelayMs); + // Confirm Tx + await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(4); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Reject Transaction - await driver.findClickableElement({ text: 'Cancel', tag: 'button' }); - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - - // TODO: No second confirmation from dapp two will show, have to go back to the extension to see the switch chain & dapp two's tx. - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', + // Check for Confirmed Transaction + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - - // Check for unconfirmed transaction in tx list - await driver.wait(async () => { - const unconfirmedTxes = await driver.findElements( - '.transaction-list-item--unconfirmed', - ); - return unconfirmedTxes.length === 1; - }, 10000); - - // Click Unconfirmed Tx - await driver.clickElement('.transaction-list-item--unconfirmed'); - - await driver.assertElementNotPresent({ - tag: 'p', - text: 'Network switched to Localhost 8546', - }); - - // Confirm Tx - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // Check for Confirmed Transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); + return confirmedTxes.length === 1; + }, 10000); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/switch-network.spec.js b/test/e2e/tests/request-queuing/switch-network.spec.js index d0a72be430ca..8e813869ca6d 100644 --- a/test/e2e/tests/request-queuing/switch-network.spec.js +++ b/test/e2e/tests/request-queuing/switch-network.spec.js @@ -7,176 +7,87 @@ const { regularDelayMs, WINDOW_TITLES, defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const { PAGES } = require('../../webdriver/driver'); describe('Request Queuing Switch Network on Dapp Send Tx while on different networks.', function () { - describe('Old confirmation screens', function () { - it('should switch to the dapps network automatically when mm network differs, dapp tx is on correct network', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), + it('should switch to the dapps network automatically when mm network differs, dapp tx is on correct network', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + // Open dapp + await openDapp(driver, undefined, DAPP_URL); - // Open dapp - await openDapp(driver, undefined, DAPP_URL); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); + // Network Selector + await driver.clickElement('[data-testid="network-display"]'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); + // Switch to second network + await driver.clickElement({ + text: 'Localhost 8546', + css: 'p', + }); - // Queue confirm tx should first auto switch network - await driver.clickElement('#sendButton'); + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm Transaction - await driver.findClickableElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="page-container-footer-next"]', - ); + // Queue confirm tx should first auto switch network + await driver.clickElement('#sendButton'); - await driver.delay(regularDelayMs); + await driver.delay(regularDelayMs); - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.navigate(PAGES.HOME); + await driver.waitUntilXWindowHandles(3); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - // Check correct network switched and on the correct network - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8545', - }); + // Confirm Transaction + await driver.findClickableElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); - }); + await driver.delay(regularDelayMs); - describe('Redesigned confirmation screens', function () { - it('should switch to the dapps network automatically when mm network differs, dapp tx is on correct network', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + // Switch back to the extension + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.navigate(PAGES.HOME); - // Open dapp - await openDapp(driver, undefined, DAPP_URL); + // Check correct network switched and on the correct network + await driver.findElement({ + css: '[data-testid="network-display"]', + text: 'Localhost 8545', + }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, + // Check for transaction + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - - // Network Selector - await driver.clickElement('[data-testid="network-display"]'); - - // Switch to second network - await driver.clickElement({ - text: 'Localhost 8546', - css: 'p', - }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - // Queue confirm tx should first auto switch network - await driver.clickElement('#sendButton'); - - await driver.delay(regularDelayMs); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm Transaction - await driver.findClickableElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.delay(regularDelayMs); - - // Switch back to the extension - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.navigate(PAGES.HOME); - - // Check correct network switched and on the correct network - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8545', - }); - - // Check for transaction - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - }, - ); - }); + return confirmedTxes.length === 1; + }, 10000); + }, + ); }); }); diff --git a/test/e2e/tests/request-queuing/ui.spec.js b/test/e2e/tests/request-queuing/ui.spec.js index dd8fa26122bb..a2b36784e65b 100644 --- a/test/e2e/tests/request-queuing/ui.spec.js +++ b/test/e2e/tests/request-queuing/ui.spec.js @@ -11,10 +11,8 @@ const { regularDelayMs, WINDOW_TITLES, defaultGanacheOptions, - tempToggleSettingRedesignedConfirmations, veryLargeDelayMs, DAPP_TWO_URL, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const { PAGES } = require('../../webdriver/driver'); const { @@ -103,40 +101,6 @@ async function selectDappClickPersonalSign(driver, dappUrl) { await driver.clickElement('#personalSign'); } -async function switchToDialogPopoverValidateDetails(driver, expectedDetails) { - // Switches to the MetaMask Dialog window for confirmation - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.findElement({ - css: '[data-testid="network-display"], [data-testid="signature-request-network-display"]', - text: expectedDetails.networkText, - }); - - await driver.findElement({ - css: '.confirm-page-container-summary__origin bdi, .request-signature__origin .chip__label', - text: expectedDetails.originText, - }); - - // Get state details - await driver.waitForControllersLoaded(); - const notificationWindowState = await driver.executeScript(() => - window.stateHooks?.getCleanAppState?.(), - ); - - const { - metamask: { selectedNetworkClientId, networkConfigurationsByChainId }, - } = notificationWindowState; - - const { chainId } = Object.values(networkConfigurationsByChainId).find( - ({ rpcEndpoints }) => - rpcEndpoints.some( - ({ networkClientId }) => networkClientId === selectedNetworkClientId, - ), - ); - - assert.equal(chainId, expectedDetails.chainId); -} - async function switchToDialogPopoverValidateDetailsRedesign( driver, expectedDetails, @@ -169,13 +133,6 @@ async function switchToDialogPopoverValidateDetailsRedesign( assert.equal(chainId, expectedDetails.chainId); } -async function rejectTransaction(driver) { - await driver.clickElementAndWaitForWindowToClose({ - tag: 'button', - text: 'Reject', - }); -} - async function rejectTransactionRedesign(driver) { await driver.clickElementAndWaitForWindowToClose({ tag: 'button', @@ -230,1029 +187,552 @@ async function validateBalanceAndActivity( } describe('Request-queue UI changes', function () { - describe('Old confirmation screens', function () { - it('should show network specific to domain @no-mmi', async function () { - const port = 8546; - const chainId = 1338; // 0x53a - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - - // Go to the first dapp, ensure it uses localhost - await selectDappClickSend(driver, DAPP_URL); - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); - await rejectTransaction(driver); - - // Go to the second dapp, ensure it uses Ethereum Mainnet - await selectDappClickSend(driver, DAPP_ONE_URL); - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x53a', - networkText: 'Localhost 8546', - originText: DAPP_ONE_URL, - }); - await rejectTransaction(driver); - }, - ); - }); - - it('handles three confirmations on three confirmations concurrently @no-mmi', async function () { - const port = 8546; - const chainId = 1338; // 0x53a - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - // Ganache for network 1 - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - // Ganache for network 3 - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 3 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); - - if (!IS_FIREFOX) { - // Open the third dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_TWO_URL, '0x3e8'); - } - - // Trigger a send confirmation on the first dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_URL); - - // Trigger a send confirmation on the second dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_ONE_URL); - - if (!IS_FIREFOX) { - // Trigger a send confirmation on the third dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_TWO_URL); - } - - // Switch to the Notification window, ensure first transaction still showing - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); - - // Confirm transaction, wait for first confirmation window to close, second to display - await confirmTransaction(driver); - await driver.delay(veryLargeDelayMs); - - // Switch to the new Notification window, ensure second transaction showing - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x53a', - networkText: 'Localhost 8546', - originText: DAPP_ONE_URL, - }); - - // Reject this transaction, wait for second confirmation window to close, third to display - await rejectTransaction(driver); - await driver.delay(veryLargeDelayMs); - - if (!IS_FIREFOX) { - // Switch to the new Notification window, ensure third transaction showing - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x3e8', - networkText: 'Localhost 7777', - originText: DAPP_TWO_URL, - }); - - // Confirm transaction - await confirmTransaction(driver); - } - - // With first and last confirmations confirmed, and second rejected, - // Ensure only first and last network balances were affected - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Wait for transaction to be completed on final confirmation - await driver.delay(veryLargeDelayMs); - - if (!IS_FIREFOX) { - // Start on the last joined network, whose send transaction was just confirmed - await validateBalanceAndActivity(driver, '24.9998'); - } - - // Switch to second network, ensure full balance - await switchToNetworkByName(driver, 'Localhost 8546'); - await validateBalanceAndActivity(driver, '25', 0); - - // Turn on test networks in Networks menu so Localhost 8545 is available - await driver.clickElement('[data-testid="network-display"]'); - await driver.clickElement('.mm-modal-content__dialog .toggle-button'); - await driver.clickElement( - '.mm-modal-content__dialog button[aria-label="Close"]', - ); - - // Switch to first network, whose send transaction was just confirmed - await switchToNetworkByName(driver, 'Localhost 8545'); - await validateBalanceAndActivity(driver, '24.9998'); - }, - ); - }); - - it('should gracefully handle deleted network @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPreferencesController({ - preferences: { showTestNetworks: true }, - }) - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - await driver.clickElement('[data-testid="network-display"]'); - - const networkRow = await driver.findElement({ - css: '.multichain-network-list-item', - text: 'Localhost 8545', - }); - - const networkMenu = await driver.findNestedElement( - networkRow, - `[data-testid="network-list-item-options-button-${CHAIN_IDS.LOCALHOST}"]`, - ); - - await networkMenu.click(); - await driver.clickElement( - '[data-testid="network-list-item-options-delete"]', - ); - - await driver.clickElement({ tag: 'button', text: 'Delete' }); - - // Go back to first dapp, try an action, ensure deleted network doesn't block UI - // The current globally selected network, Ethereum Mainnet, should be used - await selectDappClickSend(driver, DAPP_URL); - await driver.delay(veryLargeDelayMs); - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x1', - networkText: 'Ethereum Mainnet', - originText: DAPP_URL, - }); - }, - ); - }); - - it('should autoswitch networks when last confirmation from another network is rejected', async function () { - const port = 8546; - const chainId = 1338; - - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - driverOptions: { constrainWindowSize: true }, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp which starts on chain '0x539 - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open tab 2, switch to Ethereum Mainnet - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - await driver.waitForSelector({ - css: '.error-message-text', - text: 'You are on the Ethereum Mainnet.', - }); - await driver.delay(veryLargeDelayMs); - - // Start a Send on Ethereum Mainnet - await driver.clickElement('#sendButton'); - await driver.delay(regularDelayMs); - - // Open the popup with shimmed activeTabOrigin - await openPopupWithActiveTabOrigin(driver, DAPP_URL); - - // Ensure the confirmation pill shows Ethereum Mainnet - await driver.waitForSelector({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - // Reject the confirmation - await driver.clickElement( - '[data-testid="page-container-footer-cancel"]', - ); - - // Wait for network to automatically change to localhost - await driver.waitForSelector({ - css: '.multichain-app-header__contents--avatar-network .mm-text', - text: 'Localhost 8545', - }); - - // Ensure toast is shown to the user - await driver.waitForSelector({ - css: '.toast-text', - text: 'Localhost 8545 is now active on 127.0.0.1:8080', - }); - }, - ); - }); - - it('should gracefully handle network connectivity failure for signatures @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - // This test intentionally quits Ganache while the extension is using it, causing - // PollingBlockTracker errors and others. These are expected. - ignoredConsoleErrors: ['ignore-all'], - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer, secondaryGanacheServer }) => { - await unlockWallet(driver); - await tempToggleSettingRedesignedConfirmations(driver); - - // Navigate to extension home screen - await driver.navigate(PAGES.HOME); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.waitForSelector({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - // Kill ganache servers - await ganacheServer.quit(); - await secondaryGanacheServer[0].quit(); - - // Go back to first dapp, try an action, ensure network connection failure doesn't block UI - await selectDappClickPersonalSign(driver, DAPP_URL); - - // When the network is down, there is a performance degradation that causes the - // popup to take a few seconds to open in MV3 (issue #25690) - await driver.waitUntilXWindowHandles(4, 1000, 15000); - - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); + it('should show network specific to domain @no-mmi', async function () { + const port = 8546; + const chainId = 1338; // 0x53a + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - ); - }); - - it('should gracefully handle network connectivity failure for confirmations @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - // Presently confirmations take up to 10 seconds to display on a dead network - driverOptions: { timeOut: 30000 }, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - // This test intentionally quits Ganache while the extension is using it, causing - // PollingBlockTracker errors and others. These are expected. - ignoredConsoleErrors: ['ignore-all'], - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer, secondaryGanacheServer }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - // Kill ganache servers - await ganacheServer.quit(); - await secondaryGanacheServer[0].quit(); - - // Go back to first dapp, try an action, ensure network connection failure doesn't block UI - await selectDappClickSend(driver, DAPP_URL); - - // When the network is down, there is a performance degradation that causes the - // popup to take a few seconds to open in MV3 (issue #25690) - await driver.waitUntilXWindowHandles(4, 1000, 15000); - - await switchToDialogPopoverValidateDetails(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); - }, - ); - }); + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // Open the first dapp + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open the second dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); + + // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.findElement({ + css: '[data-testid="network-display"]', + text: 'Localhost 8546', + }); + + // Go to the first dapp, ensure it uses localhost + await selectDappClickSend(driver, DAPP_URL); + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x539', + networkText: 'Localhost 8545', + originText: DAPP_URL, + }); + await rejectTransactionRedesign(driver); + + // Go to the second dapp, ensure it uses Ethereum Mainnet + await selectDappClickSend(driver, DAPP_ONE_URL); + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x53a', + networkText: 'Localhost 8546', + originText: DAPP_ONE_URL, + }); + await rejectTransactionRedesign(driver); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should show network specific to domain @no-mmi', async function () { - const port = 8546; - const chainId = 1338; // 0x53a - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Localhost 8546', - }); - - // Go to the first dapp, ensure it uses localhost - await selectDappClickSend(driver, DAPP_URL); - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); - await rejectTransactionRedesign(driver); - - // Go to the second dapp, ensure it uses Ethereum Mainnet - await selectDappClickSend(driver, DAPP_ONE_URL); - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x53a', - networkText: 'Localhost 8546', - originText: DAPP_ONE_URL, - }); - await rejectTransactionRedesign(driver); - }, - ); - }); - - it('handles three confirmations on three confirmations concurrently @no-mmi', async function () { - const port = 8546; - const chainId = 1338; // 0x53a - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerTripleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - // Ganache for network 1 - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - // Ganache for network 3 - { - port: 7777, - chainId: 1000, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 3 }, - title: this.test.fullTitle(), + it('handles three confirmations on three confirmations concurrently @no-mmi', async function () { + const port = 8546; + const chainId = 1338; // 0x53a + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerTripleGanache() + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + // Ganache for network 1 + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + // Ganache for network 3 + { + port: 7777, + chainId: 1000, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); - - if (!IS_FIREFOX) { - // Open the third dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_TWO_URL, '0x3e8'); - } - - // Trigger a send confirmation on the first dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_URL); - - // Trigger a send confirmation on the second dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_ONE_URL); - - if (!IS_FIREFOX) { - // Trigger a send confirmation on the third dapp, do not confirm or reject - await selectDappClickSend(driver, DAPP_TWO_URL); - } - - // Switch to the Notification window, ensure first transaction still showing + dappOptions: { numberOfDapps: 3 }, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // Open the first dapp + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open the second dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x53a'); + + if (!IS_FIREFOX) { + // Open the third dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_TWO_URL, '0x3e8'); + } + + // Trigger a send confirmation on the first dapp, do not confirm or reject + await selectDappClickSend(driver, DAPP_URL); + + // Trigger a send confirmation on the second dapp, do not confirm or reject + await selectDappClickSend(driver, DAPP_ONE_URL); + + if (!IS_FIREFOX) { + // Trigger a send confirmation on the third dapp, do not confirm or reject + await selectDappClickSend(driver, DAPP_TWO_URL); + } + + // Switch to the Notification window, ensure first transaction still showing + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x539', + networkText: 'Localhost 8545', + originText: DAPP_URL, + }); + + // Confirm transaction, wait for first confirmation window to close, second to display + await confirmTransaction(driver); + await driver.delay(veryLargeDelayMs); + + // Switch to the new Notification window, ensure second transaction showing + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x53a', + networkText: 'Localhost 8546', + originText: DAPP_ONE_URL, + }); + + // Reject this transaction, wait for second confirmation window to close, third to display + await rejectTransactionRedesign(driver); + await driver.delay(veryLargeDelayMs); + + if (!IS_FIREFOX) { + // Switch to the new Notification window, ensure third transaction showing await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, + chainId: '0x3e8', + networkText: 'Localhost 7777', + originText: DAPP_TWO_URL, }); - // Confirm transaction, wait for first confirmation window to close, second to display + // Confirm transaction await confirmTransaction(driver); - await driver.delay(veryLargeDelayMs); + } - // Switch to the new Notification window, ensure second transaction showing - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x53a', - networkText: 'Localhost 8546', - originText: DAPP_ONE_URL, - }); - - // Reject this transaction, wait for second confirmation window to close, third to display - await rejectTransactionRedesign(driver); - await driver.delay(veryLargeDelayMs); - - if (!IS_FIREFOX) { - // Switch to the new Notification window, ensure third transaction showing - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x3e8', - networkText: 'Localhost 7777', - originText: DAPP_TWO_URL, - }); - - // Confirm transaction - await confirmTransaction(driver); - } - - // With first and last confirmations confirmed, and second rejected, - // Ensure only first and last network balances were affected - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // Wait for transaction to be completed on final confirmation - await driver.delay(veryLargeDelayMs); - - if (!IS_FIREFOX) { - // Start on the last joined network, whose send transaction was just confirmed - await validateBalanceAndActivity(driver, '24.9998'); - } - - // Switch to second network, ensure full balance - await switchToNetworkByName(driver, 'Localhost 8546'); - await validateBalanceAndActivity(driver, '25', 0); - - // Turn on test networks in Networks menu so Localhost 8545 is available - await driver.clickElement('[data-testid="network-display"]'); - await driver.clickElement('.mm-modal-content__dialog .toggle-button'); - await driver.clickElement( - '.mm-modal-content__dialog button[aria-label="Close"]', - ); - - // Switch to first network, whose send transaction was just confirmed - await switchToNetworkByName(driver, 'Localhost 8545'); - await validateBalanceAndActivity(driver, '24.9998'); - }, - ); - }); - - it('should gracefully handle deleted network @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - .withPreferencesController({ - preferences: { showTestNetworks: true }, - }) - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - await driver.clickElement('[data-testid="network-display"]'); - - const networkRow = await driver.findElement({ - css: '.multichain-network-list-item', - text: 'Localhost 8545', - }); - - const networkMenu = await driver.findNestedElement( - networkRow, - `[data-testid="network-list-item-options-button-${CHAIN_IDS.LOCALHOST}"]`, - ); - - await networkMenu.click(); - await driver.clickElement( - '[data-testid="network-list-item-options-delete"]', - ); + // With first and last confirmations confirmed, and second rejected, + // Ensure only first and last network balances were affected + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); - await driver.clickElement({ tag: 'button', text: 'Delete' }); + // Wait for transaction to be completed on final confirmation + await driver.delay(veryLargeDelayMs); - // Go back to first dapp, try an action, ensure deleted network doesn't block UI - // The current globally selected network, Ethereum Mainnet, should be used - await selectDappClickSend(driver, DAPP_URL); - await driver.delay(veryLargeDelayMs); - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x1', - networkText: 'Ethereum Mainnet', - originText: DAPP_URL, - }); - }, - ); - }); - - it('should signal from UI to dapp the network change @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - driverOptions: { constrainWindowSize: true }, - }, - async ({ driver }) => { - // Navigate to extension home screen - await unlockWallet(driver); - - // Open the first dapp which starts on chain '0x539 - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Ensure the dapp starts on the correct network - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x539', - }); - - // Open the popup with shimmed activeTabOrigin - await openPopupWithActiveTabOrigin(driver, DAPP_URL); - - // Switch to mainnet - await switchToNetworkByName(driver, 'Ethereum Mainnet'); - - // Switch back to the Dapp tab - await driver.switchToWindowWithUrl(DAPP_URL); - - // Check to make sure the dapp network changed - await driver.waitForSelector({ - css: '[id="chainId"]', - text: '0x1', - }); - }, - ); - }); - - it('should autoswitch networks to the last used network for domain', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - // Open fullscreen - await unlockWallet(driver); - - // Open the first dapp which starts on chain '0x539 - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open tab 2, switch to Ethereum Mainnet - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Open the popup with shimmed activeTabOrigin - await openPopupWithActiveTabOrigin(driver, DAPP_URL); - - // Ensure network was reset to original - await driver.findElement({ - css: '.multichain-app-header__contents--avatar-network .mm-text', - text: 'Localhost 8545', - }); - - // Ensure toast is shown to the user - await driver.findElement({ - css: '.toast-text', - text: 'Localhost 8545 is now active on 127.0.0.1:8080', - }); - }, - ); - }); + if (!IS_FIREFOX) { + // Start on the last joined network, whose send transaction was just confirmed + await validateBalanceAndActivity(driver, '24.9998'); + } + + // Switch to second network, ensure full balance + await switchToNetworkByName(driver, 'Localhost 8546'); + await validateBalanceAndActivity(driver, '25', 0); + + // Turn on test networks in Networks menu so Localhost 8545 is available + await driver.clickElement('[data-testid="network-display"]'); + await driver.clickElement('.mm-modal-content__dialog .toggle-button'); + await driver.clickElement( + '.mm-modal-content__dialog button[aria-label="Close"]', + ); + + // Switch to first network, whose send transaction was just confirmed + await switchToNetworkByName(driver, 'Localhost 8545'); + await validateBalanceAndActivity(driver, '24.9998'); + }, + ); + }); - it('should autoswitch networks when last confirmation from another network is rejected', async function () { - const port = 8546; - const chainId = 1338; - - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), - driverOptions: { constrainWindowSize: true }, + it('should gracefully handle deleted network @no-mmi', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + .withPreferencesController({ + preferences: { showTestNetworks: true }, + }) + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver }) => { - await unlockWallet(driver); - - // Open the first dapp which starts on chain '0x539 - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open tab 2, switch to Ethereum Mainnet - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - await driver.waitForSelector({ - css: '.error-message-text', - text: 'You are on the Ethereum Mainnet.', - }); - await driver.delay(veryLargeDelayMs); - - // Start a Send on Ethereum Mainnet - await driver.clickElement('#sendButton'); - await driver.delay(regularDelayMs); - - // Open the popup with shimmed activeTabOrigin - await openPopupWithActiveTabOrigin(driver, DAPP_URL); - - // Ensure the confirmation pill shows Ethereum Mainnet - await driver.waitForSelector({ - css: 'p', - text: 'Ethereum Mainnet', - }); - - // Reject the confirmation - await driver.clickElement({ css: 'button', text: 'Cancel' }); - - // Wait for network to automatically change to localhost - await driver.waitForSelector({ - css: '.multichain-app-header__contents--avatar-network .mm-text', - text: 'Localhost 8545', - }); + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // Open the first dapp + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open the second dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); + + // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.findElement({ + css: '[data-testid="network-display"]', + text: 'Ethereum Mainnet', + }); + + await driver.clickElement('[data-testid="network-display"]'); + + const networkRow = await driver.findElement({ + css: '.multichain-network-list-item', + text: 'Localhost 8545', + }); + + const networkMenu = await driver.findNestedElement( + networkRow, + `[data-testid="network-list-item-options-button-${CHAIN_IDS.LOCALHOST}"]`, + ); + + await networkMenu.click(); + await driver.clickElement( + '[data-testid="network-list-item-options-delete"]', + ); + + await driver.clickElement({ tag: 'button', text: 'Delete' }); + + // Go back to first dapp, try an action, ensure deleted network doesn't block UI + // The current globally selected network, Ethereum Mainnet, should be used + await selectDappClickSend(driver, DAPP_URL); + await driver.delay(veryLargeDelayMs); + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x1', + networkText: 'Ethereum Mainnet', + originText: DAPP_URL, + }); + }, + ); + }); - // Ensure toast is shown to the user - await driver.waitForSelector({ - css: '.toast-text', - text: 'Localhost 8545 is now active on 127.0.0.1:8080', - }); - }, - ); - }); + it('should signal from UI to dapp the network change @no-mmi', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + driverOptions: { constrainWindowSize: true }, + }, + async ({ driver }) => { + // Navigate to extension home screen + await unlockWallet(driver); + + // Open the first dapp which starts on chain '0x539 + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Ensure the dapp starts on the correct network + await driver.waitForSelector({ + css: '[id="chainId"]', + text: '0x539', + }); + + // Open the popup with shimmed activeTabOrigin + await openPopupWithActiveTabOrigin(driver, DAPP_URL); + + // Switch to mainnet + await switchToNetworkByName(driver, 'Ethereum Mainnet'); + + // Switch back to the Dapp tab + await driver.switchToWindowWithUrl(DAPP_URL); + + // Check to make sure the dapp network changed + await driver.waitForSelector({ + css: '[id="chainId"]', + text: '0x1', + }); + }, + ); + }); - it('should gracefully handle network connectivity failure for signatures @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - // This test intentionally quits Ganache while the extension is using it, causing - // PollingBlockTracker errors and others. These are expected. - ignoredConsoleErrors: ['ignore-all'], - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), + it('should autoswitch networks to the last used network for domain', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver, ganacheServer, secondaryGanacheServer }) => { - await unlockWallet(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.waitForSelector({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - // Kill ganache servers - await ganacheServer.quit(); - await secondaryGanacheServer[0].quit(); - - // Go back to first dapp, try an action, ensure network connection failure doesn't block UI - await selectDappClickPersonalSign(driver, DAPP_URL); - - // When the network is down, there is a performance degradation that causes the - // popup to take a few seconds to open in MV3 (issue #25690) - await driver.waitUntilXWindowHandles(4, 1000, 15000); + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + // Open fullscreen + await unlockWallet(driver); + + // Open the first dapp which starts on chain '0x539 + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open tab 2, switch to Ethereum Mainnet + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); + + // Open the popup with shimmed activeTabOrigin + await openPopupWithActiveTabOrigin(driver, DAPP_URL); + + // Ensure network was reset to original + await driver.findElement({ + css: '.multichain-app-header__contents--avatar-network .mm-text', + text: 'Localhost 8545', + }); + + // Ensure toast is shown to the user + await driver.findElement({ + css: '.toast-text', + text: 'Localhost 8545 is now active on 127.0.0.1:8080', + }); + }, + ); + }); - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); + it('should autoswitch networks when last confirmation from another network is rejected', async function () { + const port = 8546; + const chainId = 1338; + + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - ); - }); + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + driverOptions: { constrainWindowSize: true }, + }, + async ({ driver }) => { + await unlockWallet(driver); + + // Open the first dapp which starts on chain '0x539 + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open tab 2, switch to Ethereum Mainnet + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); + await driver.waitForSelector({ + css: '.error-message-text', + text: 'You are on the Ethereum Mainnet.', + }); + await driver.delay(veryLargeDelayMs); + + // Start a Send on Ethereum Mainnet + await driver.clickElement('#sendButton'); + await driver.delay(regularDelayMs); + + // Open the popup with shimmed activeTabOrigin + await openPopupWithActiveTabOrigin(driver, DAPP_URL); + + // Ensure the confirmation pill shows Ethereum Mainnet + await driver.waitForSelector({ + css: 'p', + text: 'Ethereum Mainnet', + }); + + // Reject the confirmation + await driver.clickElement({ css: 'button', text: 'Cancel' }); + + // Wait for network to automatically change to localhost + await driver.waitForSelector({ + css: '.multichain-app-header__contents--avatar-network .mm-text', + text: 'Localhost 8545', + }); + + // Ensure toast is shown to the user + await driver.waitForSelector({ + css: '.toast-text', + text: 'Localhost 8545 is now active on 127.0.0.1:8080', + }); + }, + ); + }); - it('should gracefully handle network connectivity failure for confirmations @no-mmi', async function () { - const port = 8546; - const chainId = 1338; - await withFixtures( - { - dapp: true, - // Presently confirmations take up to 10 seconds to display on a dead network - driverOptions: { timeOut: 30000 }, - fixtures: new FixtureBuilder() - .withNetworkControllerDoubleGanache() - - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - concurrent: [ - { - port, - chainId, - ganacheOptions2: defaultGanacheOptions, - }, - ], - }, - // This test intentionally quits Ganache while the extension is using it, causing - // PollingBlockTracker errors and others. These are expected. - ignoredConsoleErrors: ['ignore-all'], - dappOptions: { numberOfDapps: 2 }, - title: this.test.fullTitle(), + it('should gracefully handle network connectivity failure for signatures @no-mmi', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - async ({ driver, ganacheServer, secondaryGanacheServer }) => { - await unlockWallet(driver); - - // Open the first dapp - await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); - - // Open the second dapp and switch chains - await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); - - // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.findElement({ - css: '[data-testid="network-display"]', - text: 'Ethereum Mainnet', - }); - - // Kill ganache servers - await ganacheServer.quit(); - await secondaryGanacheServer[0].quit(); - - // Go back to first dapp, try an action, ensure network connection failure doesn't block UI - await selectDappClickSend(driver, DAPP_URL); - - // When the network is down, there is a performance degradation that causes the - // popup to take a few seconds to open in MV3 (issue #25690) - await driver.waitUntilXWindowHandles(4, 1000, 15000); + // This test intentionally quits Ganache while the extension is using it, causing + // PollingBlockTracker errors and others. These are expected. + ignoredConsoleErrors: ['ignore-all'], + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer, secondaryGanacheServer }) => { + await unlockWallet(driver); + + // Open the first dapp + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open the second dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); + + // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.waitForSelector({ + css: '[data-testid="network-display"]', + text: 'Ethereum Mainnet', + }); + + // Kill ganache servers + await ganacheServer.quit(); + await secondaryGanacheServer[0].quit(); + + // Go back to first dapp, try an action, ensure network connection failure doesn't block UI + await selectDappClickPersonalSign(driver, DAPP_URL); + + // When the network is down, there is a performance degradation that causes the + // popup to take a few seconds to open in MV3 (issue #25690) + await driver.waitUntilXWindowHandles(4, 1000, 15000); + + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x539', + networkText: 'Localhost 8545', + originText: DAPP_URL, + }); + }, + ); + }); - await switchToDialogPopoverValidateDetailsRedesign(driver, { - chainId: '0x539', - networkText: 'Localhost 8545', - originText: DAPP_URL, - }); + it('should gracefully handle network connectivity failure for confirmations @no-mmi', async function () { + const port = 8546; + const chainId = 1338; + await withFixtures( + { + dapp: true, + // Presently confirmations take up to 10 seconds to display on a dead network + driverOptions: { timeOut: 30000 }, + fixtures: new FixtureBuilder() + .withNetworkControllerDoubleGanache() + + .build(), + ganacheOptions: { + ...defaultGanacheOptions, + concurrent: [ + { + port, + chainId, + ganacheOptions2: defaultGanacheOptions, + }, + ], }, - ); - }); + // This test intentionally quits Ganache while the extension is using it, causing + // PollingBlockTracker errors and others. These are expected. + ignoredConsoleErrors: ['ignore-all'], + dappOptions: { numberOfDapps: 2 }, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer, secondaryGanacheServer }) => { + await unlockWallet(driver); + + // Open the first dapp + await openDappAndSwitchChain(driver, DAPP_URL, '0x539'); + + // Open the second dapp and switch chains + await openDappAndSwitchChain(driver, DAPP_ONE_URL, '0x1'); + + // Go to wallet fullscreen, ensure that the global network changed to Ethereum Mainnet + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.findElement({ + css: '[data-testid="network-display"]', + text: 'Ethereum Mainnet', + }); + + // Kill ganache servers + await ganacheServer.quit(); + await secondaryGanacheServer[0].quit(); + + // Go back to first dapp, try an action, ensure network connection failure doesn't block UI + await selectDappClickSend(driver, DAPP_URL); + + // When the network is down, there is a performance degradation that causes the + // popup to take a few seconds to open in MV3 (issue #25690) + await driver.waitUntilXWindowHandles(4, 1000, 15000); + + await switchToDialogPopoverValidateDetailsRedesign(driver, { + chainId: '0x539', + networkText: 'Localhost 8545', + originText: DAPP_URL, + }); + }, + ); }); }); diff --git a/test/e2e/tests/responsive-ui/metamask-responsive-ui.spec.js b/test/e2e/tests/responsive-ui/metamask-responsive-ui.spec.js index 54236d84f2f5..4c682fafa402 100644 --- a/test/e2e/tests/responsive-ui/metamask-responsive-ui.spec.js +++ b/test/e2e/tests/responsive-ui/metamask-responsive-ui.spec.js @@ -6,239 +6,167 @@ const { logInWithBalanceValidation, openActionMenuAndStartSendFlow, withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); describe('MetaMask Responsive UI', function () { - describe('Old confirmation screens', function () { - it('Send Transaction from responsive window', async function () { - const driverOptions = { constrainWindowSize: true }; - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - driverOptions, - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Send ETH from inside MetaMask - // starts to send a transaction - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - const inputAmount = await driver.fill('input[placeholder="0"]', '1'); - - const inputValue = await inputAmount.getProperty('value'); - assert.equal(inputValue, '1'); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // wait for transaction value to be rendered and confirm - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '1.000042', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // finds the transaction in the transactions list - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1 ETH', - }); - }, - ); - }); + it('Creating a new wallet @no-mmi', async function () { + const driverOptions = { constrainWindowSize: true }; + + await withFixtures( + { + fixtures: new FixtureBuilder({ onboarding: true }).build(), + driverOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await driver.navigate(); + + // agree to terms of use + await driver.clickElement('[data-testid="onboarding-terms-checkbox"]'); + + // welcome + await driver.clickElement('[data-testid="onboarding-create-wallet"]'); + + // metrics + await driver.clickElement('[data-testid="metametrics-no-thanks"]'); + + // create password + await driver.fill( + '[data-testid="create-password-new"]', + 'correct horse battery staple', + ); + await driver.fill( + '[data-testid="create-password-confirm"]', + 'correct horse battery staple', + ); + await driver.clickElement('[data-testid="create-password-terms"]'); + await driver.clickElement('[data-testid="create-password-wallet"]'); + + // secure wallet + await driver.clickElement('[data-testid="secure-wallet-recommended"]'); + + // review + await driver.clickElement('[data-testid="recovery-phrase-reveal"]'); + const chipTwo = await ( + await driver.findElement('[data-testid="recovery-phrase-chip-2"]') + ).getText(); + const chipThree = await ( + await driver.findElement('[data-testid="recovery-phrase-chip-3"]') + ).getText(); + const chipSeven = await ( + await driver.findElement('[data-testid="recovery-phrase-chip-7"]') + ).getText(); + await driver.clickElement('[data-testid="recovery-phrase-next"]'); + + // confirm + await driver.fill('[data-testid="recovery-phrase-input-2"]', chipTwo); + await driver.fill('[data-testid="recovery-phrase-input-3"]', chipThree); + await driver.fill('[data-testid="recovery-phrase-input-7"]', chipSeven); + await driver.clickElement('[data-testid="recovery-phrase-confirm"]'); + + // complete + await driver.clickElement('[data-testid="onboarding-complete-done"]'); + + // pin extension + await driver.clickElement('[data-testid="pin-extension-next"]'); + await driver.clickElement('[data-testid="pin-extension-done"]'); + await driver.assertElementNotPresent('.loading-overlay__spinner'); + // assert balance + await driver.waitForSelector({ + css: '[data-testid="eth-overview__primary-currency"]', + text: '0', + }); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('Creating a new wallet @no-mmi', async function () { - const driverOptions = { constrainWindowSize: true }; - - await withFixtures( - { - fixtures: new FixtureBuilder({ onboarding: true }).build(), - driverOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await driver.navigate(); - - // agree to terms of use - await driver.clickElement( - '[data-testid="onboarding-terms-checkbox"]', - ); - - // welcome - await driver.clickElement('[data-testid="onboarding-create-wallet"]'); - - // metrics - await driver.clickElement('[data-testid="metametrics-no-thanks"]'); - - // create password - await driver.fill( - '[data-testid="create-password-new"]', - 'correct horse battery staple', - ); - await driver.fill( - '[data-testid="create-password-confirm"]', - 'correct horse battery staple', - ); - await driver.clickElement('[data-testid="create-password-terms"]'); - await driver.clickElement('[data-testid="create-password-wallet"]'); - - // secure wallet - await driver.clickElement( - '[data-testid="secure-wallet-recommended"]', - ); - - // review - await driver.clickElement('[data-testid="recovery-phrase-reveal"]'); - const chipTwo = await ( - await driver.findElement('[data-testid="recovery-phrase-chip-2"]') - ).getText(); - const chipThree = await ( - await driver.findElement('[data-testid="recovery-phrase-chip-3"]') - ).getText(); - const chipSeven = await ( - await driver.findElement('[data-testid="recovery-phrase-chip-7"]') - ).getText(); - await driver.clickElement('[data-testid="recovery-phrase-next"]'); - - // confirm - await driver.fill('[data-testid="recovery-phrase-input-2"]', chipTwo); - await driver.fill( - '[data-testid="recovery-phrase-input-3"]', - chipThree, - ); - await driver.fill( - '[data-testid="recovery-phrase-input-7"]', - chipSeven, - ); - await driver.clickElement('[data-testid="recovery-phrase-confirm"]'); - - // complete - await driver.clickElement('[data-testid="onboarding-complete-done"]'); - - // pin extension - await driver.clickElement('[data-testid="pin-extension-next"]'); - await driver.clickElement('[data-testid="pin-extension-done"]'); - await driver.assertElementNotPresent('.loading-overlay__spinner'); - // assert balance - await driver.waitForSelector({ - css: '[data-testid="eth-overview__primary-currency"]', - text: '0', - }); - }, - ); - }); - - it('Importing existing wallet from lock page', async function () { - const driverOptions = { constrainWindowSize: true }; - - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - driverOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await driver.navigate(); - - // Import Secret Recovery Phrase - await driver.waitForSelector({ - tag: 'p', - text: 'Localhost 8545', - }); - await driver.clickElement({ - css: '.unlock-page__link', - text: 'Forgot password?', - }); - - await driver.pasteIntoField( - '[data-testid="import-srp__srp-word-0"]', - TEST_SEED_PHRASE_TWO, - ); - - await driver.fill('#password', 'correct horse battery staple'); - await driver.fill( - '#confirm-password', - 'correct horse battery staple', - ); - await driver.press('#confirm-password', driver.Key.ENTER); - - // balance renders - await locateAccountBalanceDOM(driver, ganacheServer); - }, - ); - }); - - it('Send Transaction from responsive window', async function () { - const driverOptions = { constrainWindowSize: true }; - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - driverOptions, - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Send ETH from inside MetaMask - // starts to send a transaction - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - const inputAmount = await driver.fill('input[placeholder="0"]', '1'); - - const inputValue = await inputAmount.getProperty('value'); - assert.equal(inputValue, '1'); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // wait for transaction value to be rendered and confirm - await driver.waitForSelector({ - css: 'h2', - text: '1 ETH', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); + it('Importing existing wallet from lock page', async function () { + const driverOptions = { constrainWindowSize: true }; + + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + driverOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await driver.navigate(); + + // Import Secret Recovery Phrase + await driver.waitForSelector({ + tag: 'p', + text: 'Localhost 8545', + }); + await driver.clickElement({ + css: '.unlock-page__link', + text: 'Forgot password?', + }); + + await driver.pasteIntoField( + '[data-testid="import-srp__srp-word-0"]', + TEST_SEED_PHRASE_TWO, + ); + + await driver.fill('#password', 'correct horse battery staple'); + await driver.fill('#confirm-password', 'correct horse battery staple'); + await driver.press('#confirm-password', driver.Key.ENTER); + + // balance renders + await locateAccountBalanceDOM(driver, ganacheServer); + }, + ); + }); - // finds the transaction in the transactions list - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', + it('Send Transaction from responsive window', async function () { + const driverOptions = { constrainWindowSize: true }; + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + driverOptions, + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Send ETH from inside MetaMask + // starts to send a transaction + await openActionMenuAndStartSendFlow(driver); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + const inputAmount = await driver.fill('input[placeholder="0"]', '1'); + + const inputValue = await inputAmount.getProperty('value'); + assert.equal(inputValue, '1'); + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // wait for transaction value to be rendered and confirm + await driver.waitForSelector({ + css: 'h2', + text: '1 ETH', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // finds the transaction in the transactions list + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1 ETH', - }); - }, - ); - }); + return confirmedTxes.length === 1; + }, 10000); + + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-1 ETH', + }); + }, + ); }); }); diff --git a/test/e2e/tests/settings/4byte-directory.spec.js b/test/e2e/tests/settings/4byte-directory.spec.js deleted file mode 100644 index b36f72f0575c..000000000000 --- a/test/e2e/tests/settings/4byte-directory.spec.js +++ /dev/null @@ -1,100 +0,0 @@ -const FixtureBuilder = require('../../fixture-builder'); -const { - logInWithBalanceValidation, - openDapp, - openMenuSafe, - unlockWallet, - withFixtures, - WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); - -describe('4byte setting', function () { - it('makes a call to 4byte when the setting is on', async function () { - const smartContract = SMART_CONTRACTS.PIGGYBANK; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // deploy contract - await openDapp(driver, contractAddress); - - // wait for deployed contract, calls and confirms a contract method where ETH is sent - await driver.clickElement('#depositButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - tag: 'span', - text: 'Deposit', - }); - await driver.assertElementNotPresent({ - tag: 'span', - text: 'Contract interaction', - }); - }, - ); - }); - - it('does not try to get contract method name from 4byte when the setting is off', async function () { - const smartContract = SMART_CONTRACTS.PIGGYBANK; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // goes to the settings screen - await openMenuSafe(driver); - await driver.clickElement({ text: 'Settings', tag: 'div' }); - await driver.clickElement({ text: 'Security & privacy', tag: 'div' }); - - // turns off 4Byte Directory contract method name resolution - await driver.clickElement( - '[data-testid="4byte-resolution-container"] .toggle-button', - ); - - // deploy contract - await openDapp(driver, contractAddress); - - // wait for deployed contract, calls and confirms a contract method where ETH is sent - await driver.clickElement('#depositButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.assertElementNotPresent({ - tag: 'span', - text: 'Deposit', - }); - await driver.waitForSelector({ - tag: 'span', - text: 'Contract interaction', - }); - }, - ); - }); -}); diff --git a/test/e2e/tests/settings/show-hex-data.spec.js b/test/e2e/tests/settings/show-hex-data.spec.js deleted file mode 100644 index 353847a544b4..000000000000 --- a/test/e2e/tests/settings/show-hex-data.spec.js +++ /dev/null @@ -1,97 +0,0 @@ -const { - defaultGanacheOptions, - withFixtures, - logInWithBalanceValidation, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const FixtureBuilder = require('../../fixture-builder'); - -const selectors = { - accountOptionsMenu: '[data-testid="account-options-menu-button"]', - settingsDiv: '[data-testid="global-menu-settings"]', - portfolioMenuOption: '[data-testid="global-menu-mmi-portfolio"]', - advancedDiv: { text: 'Advanced', tag: 'div' }, - hexDataToggle: '[data-testid="advanced-setting-hex-data"] .toggle-button', - appHeaderLogo: '[data-testid="app-header-logo"]', - ethOverviewSend: '[data-testid="eth-overview-send"]', - ensInput: '[data-testid="ens-input"]', - quantity: 'input[placeholder="0"]', - hexDataInput: '[data-testid="send-hex-textarea"]', - nextPageButton: { text: 'Continue', tag: 'button' }, - hexButton: { text: 'Hex', tag: 'button' }, - detailsTab: { text: 'Details', tag: 'button' }, - containerContent: '.confirm-page-container-content', - confirmButton: { text: 'Confirm', tag: 'button' }, -}; - -const inputData = { - recipientAddress: '0x985c30949c92df7a0bd42e0f3e3d539ece98db24', - hexDataText: '0x0abc', -}; - -// Function to click elements in sequence -async function clickElementsInSequence(driver, clickSelectors) { - for (const selector of clickSelectors) { - if (process.env.MMI && selector === selectors.settingsDiv) { - await driver.waitForSelector(selectors.portfolioMenuOption); - } else { - await driver.waitForSelector(selector); - } - await driver.clickElement(selector); - } -} - -// Function to perform the hex data toggle -async function toggleHexData(driver) { - const sequence = [ - selectors.accountOptionsMenu, - selectors.settingsDiv, - selectors.advancedDiv, - selectors.hexDataToggle, - ]; - - await clickElementsInSequence(driver, sequence); -} - -// Function to click on the app logo -async function clickOnLogo(driver) { - await driver.clickElement(selectors.appHeaderLogo); -} - -// Function to send a transaction and verify hex data text area appears. -async function sendTransactionAndVerifyHexData(driver) { - await driver.clickElement(selectors.ethOverviewSend); - await driver.fill(selectors.ensInput, inputData.recipientAddress); - await driver.fill(selectors.quantity, 1); - await driver.fill(selectors.hexDataInput, inputData.hexDataText); - await driver.clickElement(selectors.nextPageButton); - await driver.clickElement(selectors.hexButton); -} - -// Main test suite -describe('Check the toggle for hex data', function () { - it('Setting the hex data toggle and verify that the textbox appears', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await toggleHexData(driver); - await clickOnLogo(driver); - await sendTransactionAndVerifyHexData(driver); - - // Verify hex data in the container content - await driver.waitForSelector({ - tag: 'p', - text: '0x0abc', - }); - }, - ); - }); -}); diff --git a/test/e2e/tests/tokens/custom-token-add-approve.spec.js b/test/e2e/tests/tokens/custom-token-add-approve.spec.js deleted file mode 100644 index 9226ad1a36f1..000000000000 --- a/test/e2e/tests/tokens/custom-token-add-approve.spec.js +++ /dev/null @@ -1,458 +0,0 @@ -const { strict: assert } = require('assert'); -const { - clickNestedButton, - defaultGanacheOptions, - editGasFeeForm, - logInWithBalanceValidation, - openDapp, - WINDOW_TITLES, - withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const FixtureBuilder = require('../../fixture-builder'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); - -describe('Create token, approve token and approve token without gas', function () { - const smartContract = SMART_CONTRACTS.HST; - - it('imports and renders the balance for the new token', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver, ganacheServer); - - // imports custom token from extension - await driver.clickElement( - `[data-testid="account-overview__asset-tab"]`, - ); - await clickNestedButton(driver, 'Tokens'); - - await driver.clickElement(`[data-testid="import-token-button"]`); - await driver.clickElement(`[data-testid="importTokens"]`); - await clickNestedButton(driver, 'Custom token'); - await driver.fill( - '[data-testid="import-tokens-modal-custom-address"]', - contractAddress, - ); - await driver.waitForSelector( - '[data-testid="import-tokens-modal-custom-decimals"]', - ); - - await driver.clickElement({ - text: 'Next', - tag: 'button', - }); - - await driver.clickElement( - '[data-testid="import-tokens-modal-import-button"]', - ); - - // renders balance for newly created token - await driver.clickElement('.app-header__logo-container'); - - await clickNestedButton(driver, 'Tokens'); - await driver.waitForSelector({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '10 TST', - }); - }, - ); - }); - - it('approves an already created token and displays the token approval data @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // create token - await openDapp(driver, contractAddress); - - let windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - - await driver.findClickableElement('#deployButton'); - // approve token from dapp - await driver.clickElement('#approveTokens'); - - await driver.waitUntilXWindowHandles(3); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - await driver.clickElement({ - text: 'Verify third-party details', - css: '.token-allowance-container__verify-link', - }); - - // Verification modal is opened - await driver.waitForSelector({ - text: 'Third-party details', - tag: 'h5', - }); - - await driver.clickElementAndWaitToDisappear({ - text: 'Got it', - tag: 'button', - }); - // back to approval modal - await driver.clickElement({ - text: 'View details', - css: '.token-allowance-container__view-details', - }); - - // Validate elements on approve token popup - await driver.waitForSelector({ - text: 'Function: Approve', - tag: 'h6', - }); - const confirmDataDiv = await driver.findElement( - '.approve-content-card-container__data__data-block', - ); - const confirmDataText = await confirmDataDiv.getText(); - assert( - confirmDataText.match( - /0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef4/u, - ), - ); - - await driver.clickElement({ text: 'Next', tag: 'button' }); - // Spending cap modal is opened - await driver.waitForSelector({ - text: '7 TST', - css: '.mm-box > h6', - }); - - await driver.clickElement({ - text: 'Approve', - tag: 'button', - }); - - // We want to wait until txn is finished, and the dialog is closed - // before checking it in the expanded view of extension - await driver.waitUntilXWindowHandles(2); - - // Moved to expanded window to validate the txn - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - // wait for txn in activity section - await driver.waitForSelector( - '[data-testid="activity-list-item-action"]', - ); - await driver.waitForSelector('.transaction-status-label--confirmed'); - }, - ); - }); - - it('set custom spending cap, customizes gas, edit spending cap and checks transaction in transaction list @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // create token - await openDapp(driver, contractAddress); - - let windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - - await driver.findClickableElement('#deployButton'); - - // approve token from dapp - await driver.clickElement({ text: 'Approve Tokens', tag: 'button' }); - - await driver.waitUntilXWindowHandles(3); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - // set custom spending cap - let setSpendingCap = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - await setSpendingCap.fill('5'); - - await driver.clickElement({ - text: 'View details', - css: '.token-allowance-container__view-details', - }); - - await driver.clickElement({ - text: 'Next', - tag: 'button', - }); - - let spendingCap = await driver.findElement({ - text: '5 TST', - css: '.mm-box > h6', - }); - - assert.equal( - await spendingCap.getText(), - '5 TST', - 'Default value is not correctly set', - ); - - // editing gas fee - const editBtn = await driver.findElement({ - text: 'Edit', - tag: 'h6', - }); - - editBtn.click(); - - await driver.waitForSelector({ - text: 'Edit priority', - tag: 'header', - }); - - await editGasFeeForm(driver, '60001', '10'); - - await driver.waitForSelector( - { - css: '.box--flex-direction-row > h6', - text: '0.0006 ETH', - }, - { timeout: 15000 }, - ); - - // editing spending cap - await driver.clickElement({ - class: '.review-spending-cap__heading-detail__button', - text: 'Edit', - }); - - setSpendingCap = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - await setSpendingCap.fill('9'); - - await driver.clickElement({ - text: 'Next', - tag: 'button', - }); - - spendingCap = await driver.findElement({ - text: '9 TST', - css: '.mm-box > h6', - }); - assert.equal( - await spendingCap.getText(), - '9 TST', - 'Default value is not correctly set', - ); - - // submits the transaction - await driver.clickElement({ text: 'Approve', tag: 'button' }); - - // finds the transaction in transaction list - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - - await driver.wait(async () => { - const pendingTxes = await driver.findElements('.activity-list-item'); - return pendingTxes.length === 1; - }, 10000); - const approveTokenTask = await driver.waitForSelector({ - // Select only the heading of the first entry in the transaction list. - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Approve TST spending cap', - }); - assert.equal( - await approveTokenTask.getText(), - 'Approve TST spending cap', - ); - }, - ); - }); - - it('set maximum spending cap, submits the transaction and finds the transaction in the transactions list @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // create token - await openDapp(driver, contractAddress); - const windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - - await driver.findClickableElement('#deployButton'); - - // approve token from dapp - await driver.clickElement({ text: 'Approve Tokens', tag: 'button' }); - - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - - const pendingTxes = await driver.findElements( - '.transaction-list__pending-transactions .activity-list-item', - ); - pendingTxes[0].click(); - - // set max spending cap - await driver.clickElement({ - css: '[data-testid="custom-spending-cap-max-button"]', - text: 'Max', - }); - - await driver.clickElement({ - tag: 'button', - text: 'Next', - }); - - // checks the balance - const balance = await driver.findElement({ - css: '.box--display-flex > h6', - text: '10 TST', - }); - - const maxSpendingCap = await driver.findElement({ - text: '10 TST', - css: '.mm-box > h6', - }); - - assert.equal( - await maxSpendingCap.getText(), - await balance.getText(), - 'Max spending cap is not set corectly', - ); - - await driver.clickElement({ - tag: 'button', - text: 'Approve', - }); - - const approveTokenTask = await driver.waitForSelector({ - // Select only the heading of the first entry in the transaction list. - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Approve TST spending cap', - }); - assert.equal( - await approveTokenTask.getText(), - 'Approve TST spending cap', - ); - }, - ); - }); - - it('approves token without gas, set site suggested spending cap, submits the transaction and finds the transaction in the transactions list @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry, ganacheServer }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver, contractAddress); - const windowHandles = await driver.getAllWindowHandles(); - const extension = windowHandles[0]; - - await driver.findClickableElement('#deployButton'); - // approve token without gas from dapp - await driver.clickElement({ - text: 'Approve Tokens Without Gas', - tag: 'button', - }); - - // switch to extension - await driver.switchToWindow(extension); - await clickNestedButton(driver, 'Activity'); - - const pendingTxes = await driver.findElements('.activity-list-item'); - pendingTxes[0].click(); - - // set custom spending cap - const spendingCap = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - await spendingCap.fill('5'); - - // set site suggested spending cap - await driver.clickElement({ - text: 'Use site suggestion', - css: '.mm-button-link', - }); - await driver.clickElement({ - text: 'Next', - tag: 'button', - }); - - await driver.delay(500); - await driver.clickElement({ text: 'Approve', tag: 'button' }); - - // check transaction in Activity tab - const approveTokenTask = await driver.waitForSelector({ - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Approve TST spending cap', - }); - assert.equal( - await approveTokenTask.getText(), - 'Approve TST spending cap', - ); - }, - ); - }); -}); diff --git a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js index 16ba368e16ce..ccb2a821825b 100644 --- a/test/e2e/tests/tokens/custom-token-send-transfer.spec.js +++ b/test/e2e/tests/tokens/custom-token-send-transfer.spec.js @@ -1,4 +1,3 @@ -const { strict: assert } = require('assert'); const { mockedSourcifyTokenSend, } = require('../confirmations/transactions/erc20-token-send-redesign.spec'); @@ -11,7 +10,6 @@ const { editGasFeeForm, WINDOW_TITLES, clickNestedButton, - tempToggleSettingRedesignedTransactionConfirmations, veryLargeDelayMs, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); @@ -22,392 +20,184 @@ const recipientAddress = '0x2f318C334780961FB129D2a6c30D0763d9a5C970'; describe('Transfer custom tokens @no-mmi', function () { const smartContract = SMART_CONTRACTS.HST; - describe('Old confirmation screens', function () { - it('send custom tokens from extension customizing gas values', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withTokensControllerERC20().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // go to custom tokens view on extension, perform send tokens - await driver.clickElement({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '10 TST', - }); - await driver.delay(500); - await driver.clickElement('[data-testid="eth-overview-send"]'); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - recipientAddress, - ); - await driver.waitForSelector({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - await driver.fill('input[placeholder="0"]', '1'); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // check transaction details - await driver.waitForSelector({ - text: '1 TST', - tag: 'h1', - }); - await driver.waitForSelector({ - text: 'Transfer', - css: '.confirm-page-container-summary__action__name', - }); - const estimatedGasFee = await driver.findElements( - '.currency-display-component__text', - ); - assert.notEqual( - await estimatedGasFee[1].getText(), - '0', - 'Estimated gas fee should not be 0', - ); - - // check function name and hex data details in hex tab - await clickNestedButton(driver, 'Hex'); - await driver.waitForSelector({ - text: 'Transfer', - tag: 'span', - }); - await driver.waitForSelector({ - tag: 'p', - text: '0xa9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c97', - }); - - // edit gas fee - await clickNestedButton(driver, 'Details'); - await driver.clickElement({ text: 'Edit', tag: 'button' }); - await editGasFeeForm(driver, '60000', '10'); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // check that transaction has completed correctly and is displayed in the activity list - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Send TST', - }); - await driver.waitForSelector( - { - css: '.transaction-list__completed-transactions [data-testid="transaction-list-item-primary-currency"]', - text: '-1 TST', - }, - { timeout: 10000 }, - ); - }, - ); - }); - - it('transfer custom tokens from dapp customizing gas values', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // transfer token from dapp - await openDapp(driver, contractAddress); - await driver.delay(veryLargeDelayMs); - - await driver.clickElement({ text: 'Transfer Tokens', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' }); - - // edit gas fee - await driver.clickElement({ text: 'Edit', tag: 'button' }); - await editGasFeeForm(driver, '60000', '10'); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // in extension, check that transaction has completed correctly and is displayed in the activity list - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1.5 TST', - }); - - // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" - await driver.waitForSelector({ - text: 'Confirmed', - tag: 'div', - }); - - // check token amount is correct after transaction - await clickNestedButton(driver, 'Tokens'); - await driver.waitForSelector({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '8.5 TST', - }); - }, - ); - }); - - it('transfer custom tokens from dapp without specifying gas', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // transfer token from dapp - await openDapp(driver, contractAddress); - await driver.delay(veryLargeDelayMs); - await driver.clickElement({ - text: 'Transfer Tokens Without Gas', - tag: 'button', - }); - await switchToNotificationWindow(driver); - await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // in extension, check that transaction has completed correctly and is displayed in the activity list - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1.5 TST', - }); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Send TST', - }); - - // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" - await driver.waitForSelector({ - text: 'Confirmed', - tag: 'div', - }); - - // check token amount is correct after transaction - await clickNestedButton(driver, 'Tokens'); - await driver.waitForSelector({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '8.5 TST', - }); - }, - ); - }); + it('send custom tokens from extension customizing gas values', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder().withTokensControllerERC20().build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + testSpecificMock: mocks, + }, + async ({ driver }) => { + await unlockWallet(driver); + + // go to custom tokens view on extension, perform send tokens + await driver.clickElement({ + css: '[data-testid="multichain-token-list-item-value"]', + text: '10 TST', + }); + await driver.delay(500); + await driver.clickElement('[data-testid="eth-overview-send"]'); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + recipientAddress, + ); + await driver.waitForSelector({ + css: '.ens-input__selected-input__title', + text: '0x2f318...5C970', + }); + await driver.fill('input[placeholder="0"]', '1'); + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // check transaction details + await driver.waitForSelector({ + text: '1 TST', + tag: 'h2', + }); + + // edit gas fee + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await editGasFeeForm(driver, '60000', '10'); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // check that transaction has completed correctly and is displayed in the activity list + await driver.waitForSelector({ + css: '[data-testid="activity-list-item-action"]', + text: 'Send TST', + }); + await driver.waitForSelector( + { + css: '.transaction-list__completed-transactions [data-testid="transaction-list-item-primary-currency"]', + text: '-1 TST', + }, + { timeout: 10000 }, + ); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('send custom tokens from extension customizing gas values', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withTokensControllerERC20().build(), - ganacheOptions: defaultGanacheOptions, + it('transfer custom tokens from dapp customizing gas values', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .withTokensControllerERC20() + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + testSpecificMock: mocks, + }, + async ({ driver, contractRegistry }) => { + const contractAddress = await contractRegistry.getContractAddress( smartContract, - title: this.test.fullTitle(), - testSpecificMock: mocks, - }, - async ({ driver }) => { - await unlockWallet(driver); - - // go to custom tokens view on extension, perform send tokens - await driver.clickElement({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '10 TST', - }); - await driver.delay(500); - await driver.clickElement('[data-testid="eth-overview-send"]'); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - recipientAddress, - ); - await driver.waitForSelector({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - await driver.fill('input[placeholder="0"]', '1'); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // check transaction details - await driver.waitForSelector({ - text: '1 TST', - tag: 'h2', - }); - - // edit gas fee - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await editGasFeeForm(driver, '60000', '10'); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // check that transaction has completed correctly and is displayed in the activity list - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Send TST', - }); - await driver.waitForSelector( - { - css: '.transaction-list__completed-transactions [data-testid="transaction-list-item-primary-currency"]', - text: '-1 TST', - }, - { timeout: 10000 }, - ); - }, - ); - }); - - it('transfer custom tokens from dapp customizing gas values', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - testSpecificMock: mocks, - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - // transfer token from dapp - await openDapp(driver, contractAddress); - await driver.delay(veryLargeDelayMs); - - await driver.clickElement({ text: 'Transfer Tokens', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ text: '1.5 TST', tag: 'h2' }); - - // edit gas fee - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await editGasFeeForm(driver, '60000', '10'); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // in extension, check that transaction has completed correctly and is displayed in the activity list - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1.5 TST', - }); - - // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" - await driver.waitForSelector({ - text: 'Confirmed', - tag: 'div', - }); - - // check token amount is correct after transaction - await clickNestedButton(driver, 'Tokens'); - await driver.waitForSelector({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '8.5 TST', - }); - }, - ); - }); + ); + await unlockWallet(driver); + + // transfer token from dapp + await openDapp(driver, contractAddress); + await driver.delay(veryLargeDelayMs); + + await driver.clickElement({ text: 'Transfer Tokens', tag: 'button' }); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.waitForSelector({ text: '1.5 TST', tag: 'h2' }); + + // edit gas fee + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await editGasFeeForm(driver, '60000', '10'); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // in extension, check that transaction has completed correctly and is displayed in the activity list + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await clickNestedButton(driver, 'Activity'); + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-1.5 TST', + }); + + // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" + await driver.waitForSelector({ + text: 'Confirmed', + tag: 'div', + }); + + // check token amount is correct after transaction + await clickNestedButton(driver, 'Tokens'); + await driver.waitForSelector({ + css: '[data-testid="multichain-token-list-item-value"]', + text: '8.5 TST', + }); + }, + ); + }); - it('transfer custom tokens from dapp without specifying gas', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, + it('transfer custom tokens from dapp without specifying gas', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .withTokensControllerERC20() + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + testSpecificMock: mocks, + }, + async ({ driver, contractRegistry }) => { + const contractAddress = await contractRegistry.getContractAddress( smartContract, - title: this.test.fullTitle(), - testSpecificMock: mocks, - }, - async ({ driver, contractRegistry }) => { - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await unlockWallet(driver); - - // transfer token from dapp - await openDapp(driver, contractAddress); - await driver.delay(veryLargeDelayMs); - await driver.clickElement({ - text: 'Transfer Tokens Without Gas', - tag: 'button', - }); - await switchToNotificationWindow(driver); - await driver.waitForSelector({ text: '1.5 TST', tag: 'h2' }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // in extension, check that transaction has completed correctly and is displayed in the activity list - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1.5 TST', - }); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Send TST', - }); - - // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" - await driver.waitForSelector({ - text: 'Confirmed', - tag: 'div', - }); - - // check token amount is correct after transaction - await clickNestedButton(driver, 'Tokens'); - await driver.waitForSelector({ - css: '[data-testid="multichain-token-list-item-value"]', - text: '8.5 TST', - }); - }, - ); - }); - - async function mocks(server) { - return [await mockedSourcifyTokenSend(server)]; - } + ); + await unlockWallet(driver); + + // transfer token from dapp + await openDapp(driver, contractAddress); + await driver.delay(veryLargeDelayMs); + await driver.clickElement({ + text: 'Transfer Tokens Without Gas', + tag: 'button', + }); + await switchToNotificationWindow(driver); + await driver.waitForSelector({ text: '1.5 TST', tag: 'h2' }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // in extension, check that transaction has completed correctly and is displayed in the activity list + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await clickNestedButton(driver, 'Activity'); + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-1.5 TST', + }); + await driver.waitForSelector({ + css: '[data-testid="activity-list-item-action"]', + text: 'Send TST', + }); + + // this selector helps prevent flakiness. it allows driver to wait until send transfer is "confirmed" + await driver.waitForSelector({ + text: 'Confirmed', + tag: 'div', + }); + + // check token amount is correct after transaction + await clickNestedButton(driver, 'Tokens'); + await driver.waitForSelector({ + css: '[data-testid="multichain-token-list-item-value"]', + text: '8.5 TST', + }); + }, + ); }); + + async function mocks(server) { + return [await mockedSourcifyTokenSend(server)]; + } }); diff --git a/test/e2e/tests/tokens/increase-token-allowance.spec.js b/test/e2e/tests/tokens/increase-token-allowance.spec.js deleted file mode 100644 index e0bd0f894897..000000000000 --- a/test/e2e/tests/tokens/increase-token-allowance.spec.js +++ /dev/null @@ -1,316 +0,0 @@ -const { strict: assert } = require('assert'); -const FixtureBuilder = require('../../fixture-builder'); -const { - defaultGanacheOptions, - openDapp, - sendTransaction, - unlockWallet, - withFixtures, - ACCOUNT_1, - ACCOUNT_2, - WINDOW_TITLES, - clickNestedButton, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../helpers'); -const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); - -const DEFAULT_TEST_DAPP_INCREASE_ALLOWANCE_SPENDING_CAP = '1'; - -describe('Increase Token Allowance', function () { - const smartContract = SMART_CONTRACTS.HST; - - it('increases token spending cap to allow other accounts to transfer tokens @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withKeyringControllerAdditionalAccountVault() - .withPreferencesControllerAdditionalAccountIdentities() - .withAccountsControllerAdditionalAccountIdentities() - .withPermissionControllerConnectedToTestDappWithTwoAccounts() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, contractRegistry }) => { - const ACCOUNT_1_NAME = 'Account 1'; - const ACCOUNT_2_NAME = 'Account 2'; - - const initialSpendingCap = '1'; - const additionalSpendingCap = '1'; - - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await switchToAccountWithName(driver, ACCOUNT_1_NAME); - - const contractAddress = await contractRegistry.getContractAddress( - smartContract, - ); - await openDapp(driver, contractAddress); - - await deployTokenContract(driver); - await approveTokenSpendingCapTo(driver, ACCOUNT_2, initialSpendingCap); - - await sendTransaction(driver, ACCOUNT_2, '1'); - - await triggerTransferFromTokens(driver, ACCOUNT_1, ACCOUNT_2); - // 'Transfer From Tokens' on the test dApp attempts to transfer 1.5 TST. - // Since this is higher than the 'initialSpendingCap', it should fail. - await pollForTokenAddressesError( - driver, - 'reverted ERC20: insufficient allowance', - ); - - await switchToAccountWithName(driver, ACCOUNT_1_NAME); - - await increaseTokenAllowance(driver, additionalSpendingCap); - - await switchToAccountWithName(driver, ACCOUNT_2_NAME); - await triggerTransferFromTokens(driver, ACCOUNT_1, ACCOUNT_2); - await confirmTransferFromTokensSuccess(driver); - }, - ); - }); - - async function deployTokenContract(driver) { - await driver.findClickableElement('#deployButton'); - } - - async function approveTokenSpendingCapTo( - driver, - accountToApproveFor, - initialSpendingCap, - ) { - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - const approveToFillEl = await driver.findElement('[id="approveTo"]'); - await approveToFillEl.clear(); - await approveToFillEl.fill(accountToApproveFor); - - await driver.clickElement({ text: 'Approve Tokens', tag: 'button' }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - - const pendingTransactions = await driver.findElements( - '.transaction-list__pending-transactions .activity-list-item', - ); - pendingTransactions[0].click(); - - const setSpendingCap = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - await setSpendingCap.fill(initialSpendingCap); - - await driver.clickElement({ - tag: 'button', - text: 'Next', - }); - await driver.waitForSelector({ - css: '.box--display-flex > h6', - text: `10 TST`, - }); - await driver.waitForSelector({ - text: `${initialSpendingCap} TST`, - css: '.mm-box > h6', - }); - await driver.clickElement({ - tag: 'button', - text: 'Approve', - }); - - await driver.waitForSelector({ - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Approve TST spending cap', - }); - } - - async function triggerTransferFromTokens( - driver, - senderAccount, - recipientAccount, - ) { - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - const transferFromSenderInputEl = await driver.findElement( - '[id="transferFromSenderInput"]', - ); - await transferFromSenderInputEl.clear(); - await transferFromSenderInputEl.fill(senderAccount); - - const transferFromRecipientInputEl = await driver.findElement( - '[id="transferFromRecipientInput"]', - ); - await transferFromRecipientInputEl.clear(); - await transferFromRecipientInputEl.fill(recipientAccount); - - await driver.clickElement('#transferFromTokens'); - await driver.delay(2000); - } - - async function pollForTokenAddressesError( - driver, - errorMessagePart, - timeout = driver.timeout, - ) { - const pollInterval = 500; - let elapsedTime = 0; - - await new Promise((resolve, reject) => { - const pollInsufficientAllowanceError = setInterval(async () => { - try { - const tokenAddressesElement = await driver.findElement( - '#tokenMethodsResult', - ); - const tokenAddressesMsgText = await tokenAddressesElement.getText(); - const isErrorThrown = - tokenAddressesMsgText.includes(errorMessagePart); - - if (isErrorThrown) { - // Condition satisfied, stopping poll. - clearInterval(pollInsufficientAllowanceError); - resolve(); - } else { - elapsedTime += pollInterval; - if (elapsedTime >= timeout) { - // Timeout reached, stopping poll. - clearInterval(pollInsufficientAllowanceError); - reject( - new Error( - `Did not throw '${errorMessagePart}' error as expected. Timeout reached, stopping poll.`, - ), - ); - } - } - } catch (error) { - clearInterval(pollInsufficientAllowanceError); - reject(error); - } - }, pollInterval); - }); - } - - async function switchToAccountWithName(driver, accountName) { - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement('[data-testid="account-menu-icon"]'); - - await driver.findElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: accountName, - }); - - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: accountName, - }); - } - - async function increaseTokenAllowance(driver, finalSpendingCap) { - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.clickElement({ - text: 'Increase Token Allowance', - tag: 'button', - }); - await driver.delay(2000); - - // Windows: MetaMask, Test Dapp and Dialog - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - let spendingCapElement = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - - let spendingCapValue = await spendingCapElement.getProperty('value'); - assert.equal( - spendingCapValue, - DEFAULT_TEST_DAPP_INCREASE_ALLOWANCE_SPENDING_CAP, - 'Default Test Dapp Increase Allowance Spending Cap is unexpected', - ); - - spendingCapElement = await driver.findElement( - '[data-testid="custom-spending-cap-input"]', - ); - await spendingCapElement.clear(); - - await spendingCapElement.fill('0'); - - await driver.clickElement({ - text: 'Use site suggestion', - tag: 'button', - }); - - spendingCapValue = await spendingCapElement.getProperty('value'); - assert.equal( - spendingCapValue, - DEFAULT_TEST_DAPP_INCREASE_ALLOWANCE_SPENDING_CAP, - 'Test Dapp Suggestion Increase Allowance Spending Cap is unexpected', - ); - - await spendingCapElement.fill(finalSpendingCap); - - await driver.clickElement({ - tag: 'button', - text: 'Next', - }); - await driver.waitForSelector({ - css: '.box--display-flex > h6', - text: `10 TST`, - }); - await driver.assertElementNotPresent( - { - tag: 'h6', - text: '0.000054 ETH', - }, - { - waitAtLeastGuard: 2000, - }, - ); - await driver.waitForSelector({ - tag: 'h6', - text: '0.000062 ETH', - }); - await driver.waitForSelector({ - text: `${finalSpendingCap} TST`, - css: '.mm-box > h6', - }); - await driver.clickElementAndWaitForWindowToClose({ - tag: 'button', - text: 'Approve', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - await driver.waitForSelector({ - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Increase TST spending cap', - }); - - await driver.delay(2000); - } - - async function confirmTransferFromTokensSuccess(driver) { - // Windows: MetaMask, Test Dapp and Dialog - await driver.waitUntilXWindowHandles(3, 1000, 10000); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ text: '1.5 TST', tag: 'h1' }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'Activity'); - - await driver.waitForSelector({ - css: '.transaction-list__completed-transactions .activity-list-item [data-testid="activity-list-item-action"]', - text: 'Send TST', - }); - } -}); diff --git a/test/e2e/tests/tokens/nft/erc1155-interaction.spec.js b/test/e2e/tests/tokens/nft/erc1155-interaction.spec.js deleted file mode 100644 index 388247bb3fcd..000000000000 --- a/test/e2e/tests/tokens/nft/erc1155-interaction.spec.js +++ /dev/null @@ -1,331 +0,0 @@ -const { strict: assert } = require('assert'); -const { mockNetworkStateOld } = require('../../../../stub/networks'); -const { - withFixtures, - DAPP_URL, - openDapp, - unlockWallet, - WINDOW_TITLES, - defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, - veryLargeDelayMs, -} = require('../../../helpers'); -const { SMART_CONTRACTS } = require('../../../seeder/smart-contracts'); -const FixtureBuilder = require('../../../fixture-builder'); - -describe('ERC1155 NFTs testdapp interaction', function () { - const smartContract = SMART_CONTRACTS.ERC1155; - - it('should mint ERC1155 token', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withNetworkController( - mockNetworkStateOld({ - chainId: '0x539', - nickname: 'Localhost 8545', - rpcUrl: 'http://localhost:8545', - ticker: 'ETH', - blockExplorerUrl: 'https://etherscan.io/', - }), - ) - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Mint - await driver.fill('#batchMintTokenIds', '1, 2, 3'); - await driver.fill('#batchMintIdAmounts', '1, 1, 1000000000000000'); - await driver.clickElement('#batchMintButton'); - - // Notification - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm Mint - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - await driver.clickElement('[data-testid="activity-list-item-action"]'); - await driver.clickElement({ - text: 'View on block explorer', - tag: 'a', - }); - - // Switch to block explorer - await driver.switchToWindowWithTitle('E2E Test Page'); - await driver.findElement('[data-testid="empty-page-body"]'); - // Verify block explorer - await driver.waitForUrl({ - url: 'https://etherscan.io/tx/0xfe4428397f7913875783c5c0dad182937b596148295bc33c7f08d74fdee8897f', - }); - - // switch to Dapp - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.fill('#watchAssetInput', '1'); - await driver.clickElement('#watchAssetButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElementAndWaitForWindowToClose( - '[data-testid="page-container-footer-next"]', - ); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - await driver.clickElementSafe('[data-testid="popover-close"]'); - await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); - await driver.clickElement('[data-testid="nft-item"]'); - }, - ); - }); - - it('should batch transfers ERC1155 token', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openDapp(driver, contract); - - await driver.fill('#batchTransferTokenIds', '1, 2, 3'); - await driver.fill('#batchTransferTokenAmounts', '1, 1, 1000000000000'); - await driver.clickElement('#batchTransferFromButton'); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm Transfer - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - }, - ); - }); - - it('should enable approval for a third party address to manage all ERC1155 token', async function () { - // ERC1155 is the name of the test-dapp ERC1155 contract - const expectedMessageTitle = - 'Allow access to and transfer all of your NFTs from ERC1155?'; - const expectedDescription = - 'This allows a third party to access and transfer all of your NFTs from ERC1155 without further notice until you revoke its access.'; - const expectedWarningMessage = 'Your NFT may be at risk'; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Create a set approval for all erc1155 token request in test dapp - await openDapp(driver, contract); - await driver.clickElement('#setApprovalForAllERC1155Button'); - - // Wait for notification popup and check the displayed message - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '[data-testid="confirm-approve-title"]', - text: expectedMessageTitle, - }); - await driver.waitForSelector({ - css: '.confirm-approve-content h6', - text: DAPP_URL, - }); - - await driver.waitForSelector({ - css: '.confirm-approve-content__description', - text: expectedDescription, - }); - - // Check displayed transaction details - await driver.clickElement({ - text: 'View full transaction details', - css: '.confirm-approve-content__small-blue-text', - }); - const [func, params] = await driver.findElements( - '.confirm-approve-content__data .confirm-approve-content__small-text', - ); - assert.equal(await func.getText(), 'Function: SetApprovalForAll'); - assert.equal(await params.getText(), 'Parameters: true'); - - // Check the warning message and confirm set approval for all - await driver.clickElement('[data-testid="page-container-footer-next"]'); - const displayedWarning = await driver.findElement( - '.set-approval-for-all-warning__content__header', - ); - assert.equal(await displayedWarning.getText(), expectedWarningMessage); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Approve', - tag: 'button', - }); - - // Switch to extension and check set approval for all transaction is displayed in activity tab - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '.transaction-list__completed-transactions', - text: 'Approve Token with no spend limit', - }); - - // Switch back to the dapp and verify that set approval for all action completed message is displayed - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.waitForSelector({ - css: '#erc1155Status', - text: 'Set Approval For All completed', - }); - }, - ); - }); - - it('should revoke approval for a third party address to manage all ERC1155 token', async function () { - // ERC1155 is the name of the test-dapp ERC1155 contract - const expectedMessageTitle = - 'Revoke permission to access and transfer all of your NFTs from ERC1155?'; - const expectedDescription = - 'This revokes the permission for a third party to access and transfer all of your NFTs from ERC1155 without further notice.'; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Create a revoke approval for all erc1155 token request in test dapp - await openDapp(driver, contract); - - await driver.delay(veryLargeDelayMs); - - await driver.clickElement('#revokeERC1155Button'); - - // Wait for notification popup and check the displayed message - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await driver.waitForSelector({ - css: '.confirm-approve-content__title', - text: expectedMessageTitle, - }); - - await driver.waitForSelector({ - css: '.confirm-approve-content h6', - text: DAPP_URL, - }); - - await driver.waitForSelector({ - css: '.confirm-approve-content__description', - text: expectedDescription, - }); - - // Check displayed transaction details - await driver.clickElement({ - text: 'View full transaction details', - css: '.confirm-approve-content__small-blue-text', - }); - const [func, params] = await driver.findElements( - '.confirm-approve-content__data .confirm-approve-content__small-text', - ); - assert.equal(await func.getText(), 'Function: SetApprovalForAll'); - assert.equal(await params.getText(), 'Parameters: false'); - - // Click on extension popup to confirm revoke approval for all - await driver.clickElementAndWaitForWindowToClose( - '[data-testid="page-container-footer-next"]', - ); - - // Switch to extension and check revoke approval transaction is displayed in activity tab - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '.transaction-list__completed-transactions', - text: 'Approve Token with no spend limit', - }); - - // Switch back to the dapp and verify that revoke approval for all message is displayed - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - const revokeApprovalStatus = await driver.findElement({ - css: '#erc1155Status', - text: 'Revoke completed', - }); - assert.equal(await revokeApprovalStatus.isDisplayed(), true); - }, - ); - }); -}); diff --git a/test/e2e/tests/tokens/nft/erc721-interaction.spec.js b/test/e2e/tests/tokens/nft/erc721-interaction.spec.js deleted file mode 100644 index 2a32a8191d59..000000000000 --- a/test/e2e/tests/tokens/nft/erc721-interaction.spec.js +++ /dev/null @@ -1,1027 +0,0 @@ -const { strict: assert } = require('assert'); -const { - withFixtures, - openDapp, - unlockWallet, - WINDOW_TITLES, - defaultGanacheOptions, - clickNestedButton, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../../helpers'); -const { SMART_CONTRACTS } = require('../../../seeder/smart-contracts'); -const FixtureBuilder = require('../../../fixture-builder'); - -// describe('Old confirmation screens', function () { -// // ... -// }); - -// describe('Redesigned confirmation screens', function () { -// // ... -// }); - -describe('ERC721 NFTs testdapp interaction', function () { - const smartContract = SMART_CONTRACTS.NFTS; - - describe('Old confirmation screens', function () { - it('should add NFTs to state by parsing tx logs without having to click on watch NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFTs - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.waitForSelector({ - css: '#nftsStatus', - text: 'Mint completed', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsFirstCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsFirstCheck.length, 5); - }, - ); - }); - - it('should prompt users to add their NFTs to their wallet (one by one) @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFT - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - const nftsMintStatus = await driver.findElement({ - css: '#nftsStatus', - text: 'Mint completed', - }); - assert.equal(await nftsMintStatus.isDisplayed(), true); - - // watch 3 of the nfts - await driver.fill('#watchNFTInput', '1'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '2'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '3'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // avoid race condition - await driver.waitForSelector({ - css: '.confirm-add-suggested-nft__nft-tokenId', - text: '#3', - }); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - await driver.clickElement({ text: 'Add NFTs', tag: 'button' }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsFirstCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsFirstCheck.length, 6); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.fill('#watchNFTInput', '4'); - - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '5'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '6'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // avoid race condition - await driver.waitForSelector({ - css: '.confirm-add-suggested-nft__nft-tokenId', - text: '#6', - }); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - await driver.clickElement({ text: 'Add NFTs', tag: 'button' }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsSecondCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsSecondCheck.length, 6); - }, - ); - }); - - it('should prompt users to add their NFTs to their wallet (all at once)', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFT - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - css: '.confirm-page-container-summary__action__name', - text: 'Deposit', - }); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // We need to wait until the transaction is confirmed before looking for the tx - // otherwise the element becomes stale, as it updates from 'pending' to 'confirmed' - await driver.waitForSelector('.transaction-status-label--confirmed'); - - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.waitForSelector({ - css: '#nftsStatus', - text: 'Mint completed', - }); - - // watch all nfts - await driver.clickElement({ text: 'Watch all NFTs', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - - await driver.findElements( - '.confirm-add-suggested-nft__nft-list-item', - ); - const suggestedNftListItems = await driver.findElements( - '.confirm-add-suggested-nft__nft-list-item', - ); - // there are 6 nfts to add because one is minted as part of the fixture - assert.equal(suggestedNftListItems.length, 6); - - // remove one nft from the list - const removeButtons = await driver.findElements( - '.confirm-add-suggested-nft__nft-remove', - ); - await removeButtons[0].click(); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Add NFTs', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsSecondCheck = await driver.findElements( - '.nft-item__container', - ); - - assert.equal(nftsListItemsSecondCheck.length, 5); - }, - ); - }); - - it('should transfer a single ERC721 NFT from one account to another', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Click Transfer - await driver.fill('#transferTokenInput', '1'); - await driver.clickElement('#transferFromButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm transfer - await driver.waitForSelector({ - css: '.mm-text--heading-md', - text: 'TestDappNFTs', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.findElement({ text: 'Send TDN' }); - }, - ); - }); - - it('should approve an address to transfer a single ERC721 NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Click Approve - const approveInput = await driver.findElement('#approveTokenInput'); - await approveInput.clear(); - await approveInput.sendKeys('1'); - await driver.clickElement('#approveButton'); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Verify dialog - const title = await driver.findElement( - '[data-testid="confirm-approve-title"]', - ); - await driver.clickElement({ - text: 'View full transaction details', - css: '.confirm-approve-content__small-blue-text', - }); - const [func] = await driver.findElements( - '.confirm-approve-content__data .confirm-approve-content__small-text', - ); - assert.equal( - await title.getText(), - 'Allow access to and transfer of your TestDappNFTs (#1)?', - ); - assert.equal(await func.getText(), 'Function: Approve'); - - // Confirm approval - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN spending cap', - }); - }, - ); - }); - - it('should enable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Enable Set approval for all - await driver.clickElement('#setApprovalForAllButton'); - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Verify dialog - const title = await driver.findElement( - '[data-testid="confirm-approve-title"]', - ); - await driver.clickElement({ - text: 'View full transaction details', - css: '.confirm-approve-content__small-blue-text', - }); - const [func, params] = await driver.findElements( - '.confirm-approve-content__data .confirm-approve-content__small-text', - ); - assert.equal( - await title.getText(), - 'Allow access to and transfer of all your TestDappNFTs?', - ); - assert.equal(await func.getText(), 'Function: SetApprovalForAll'); - assert.equal(await params.getText(), 'Parameters: true'); - - // Confirm enabling set approval for all - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement({ text: 'Approve', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN with no spend limit', - }); - }, - ); - }); - - it('should disable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Disable Set approval for all - await driver.clickElement('#revokeButton'); - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Verify dialog - const title = await driver.findElement( - '[data-testid="confirm-approve-title"]', - ); - await driver.clickElement({ - text: 'View full transaction details', - css: '.confirm-approve-content__small-blue-text', - }); - const [func, params] = await driver.findElements( - '.confirm-approve-content__data .confirm-approve-content__small-text', - ); - const proceedWithCautionIsDisplayed = await driver.isElementPresent( - '.dialog--error', - ); - assert.equal( - await title.getText(), - 'Revoke permission to access and transfer all of your TestDappNFTs?', - ); - assert.equal(await func.getText(), 'Function: SetApprovalForAll'); - assert.equal(await params.getText(), 'Parameters: false'); - assert.equal(proceedWithCautionIsDisplayed, false); - - // Confirm disabling set approval for all - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN with no spend limit', - }); - }, - ); - }); - }); - - describe('Redesigned confirmation screens', function () { - it('should add NFTs to state by parsing tx logs without having to click on watch NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFTs - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.waitForSelector({ - css: '#nftsStatus', - text: 'Mint completed', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsFirstCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsFirstCheck.length, 5); - }, - ); - }); - - it('should prompt users to add their NFTs to their wallet (one by one) @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFT - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - const nftsMintStatus = await driver.findElement({ - css: '#nftsStatus', - text: 'Mint completed', - }); - assert.equal(await nftsMintStatus.isDisplayed(), true); - - // watch 3 of the nfts - await driver.fill('#watchNFTInput', '1'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '2'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '3'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // avoid race condition - await driver.waitForSelector({ - css: '.confirm-add-suggested-nft__nft-tokenId', - text: '#3', - }); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - await driver.clickElement({ text: 'Add NFTs', tag: 'button' }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsFirstCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsFirstCheck.length, 6); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.fill('#watchNFTInput', '4'); - - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '5'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - await driver.fill('#watchNFTInput', '6'); - await driver.clickElement({ text: 'Watch NFT', tag: 'button' }); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // avoid race condition - await driver.waitForSelector({ - css: '.confirm-add-suggested-nft__nft-tokenId', - text: '#6', - }); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - await driver.clickElement({ text: 'Add NFTs', tag: 'button' }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - const nftsListItemsSecondCheck = await driver.findElements( - '.nft-item__container', - ); - assert.equal(nftsListItemsSecondCheck.length, 6); - }, - ); - }); - - it('should prompt users to add their NFTs to their wallet (all at once)', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // mint NFT - await driver.fill('#mintAmountInput', '5'); - await driver.clickElement({ text: 'Mint', tag: 'button' }); - - // Notification - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElementAndWaitForWindowToClose({ - text: 'Confirm', - tag: 'button', - }); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // We need to wait until the transaction is confirmed before looking for the tx - // otherwise the element becomes stale, as it updates from 'pending' to 'confirmed' - await driver.waitForSelector('.transaction-status-label--confirmed'); - - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Deposit', - }); - // verify the mint transaction has finished - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - await driver.waitForSelector({ - css: '#nftsStatus', - text: 'Mint completed', - }); - - // watch all nfts - await driver.clickElement({ text: 'Watch all NFTs', tag: 'button' }); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // confirm watchNFT - await driver.waitForSelector({ - css: '.mm-text--heading-lg', - text: 'Add suggested NFTs', - }); - - await driver.findElements( - '.confirm-add-suggested-nft__nft-list-item', - ); - const suggestedNftListItems = await driver.findElements( - '.confirm-add-suggested-nft__nft-list-item', - ); - // there are 6 nfts to add because one is minted as part of the fixture - assert.equal(suggestedNftListItems.length, 6); - - // remove one nft from the list - const removeButtons = await driver.findElements( - '.confirm-add-suggested-nft__nft-remove', - ); - await removeButtons[0].click(); - - await driver.clickElementAndWaitForWindowToClose({ - text: 'Add NFTs', - tag: 'button', - }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await clickNestedButton(driver, 'NFTs'); - const nftsListItemsSecondCheck = await driver.findElements( - '.nft-item__container', - ); - - assert.equal(nftsListItemsSecondCheck.length, 5); - }, - ); - }); - - it('should transfer a single ERC721 NFT from one account to another', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Click Transfer - await driver.fill('#transferTokenInput', '1'); - await driver.clickElement('#transferFromButton'); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm transfer - await driver.waitForSelector({ - css: 'h2', - text: 'TestDappNFTs', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.findElement({ text: 'Send TDN' }); - }, - ); - }); - - it('should approve an address to transfer a single ERC721 NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Click Approve - const approveInput = await driver.findElement('#approveTokenInput'); - await approveInput.clear(); - await approveInput.sendKeys('1'); - await driver.clickElement('#approveButton'); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm approval - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN spending cap', - }); - }, - ); - }); - - it('should enable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Enable Set approval for all - await driver.clickElement('#setApprovalForAllButton'); - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm enabling set approval for all - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN with no spend limit', - }); - }, - ); - }); - - it('should disable approval for a third party address to manage all ERC721 NFTs @no-mmi', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, _, contractRegistry }) => { - const contract = contractRegistry.getContractAddress(smartContract); - await unlockWallet(driver); - - // Open Dapp and wait for deployed contract - await openDapp(driver, contract); - await driver.findClickableElement('#deployButton'); - - // Disable Set approval for all - await driver.clickElement('#revokeButton'); - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // Confirm disabling set approval for all - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .transaction-list-item:nth-of-type(1)', - ); - - // Verify transaction - await driver.waitForSelector({ - css: '[data-testid="activity-list-item-action"]', - text: 'Approve TDN with no spend limit', - }); - }, - ); - }); - }); -}); diff --git a/test/e2e/tests/tokens/nft/send-nft.spec.js b/test/e2e/tests/tokens/nft/send-nft.spec.js deleted file mode 100644 index 56344ed00ff7..000000000000 --- a/test/e2e/tests/tokens/nft/send-nft.spec.js +++ /dev/null @@ -1,170 +0,0 @@ -const { strict: assert } = require('assert'); -const { - defaultGanacheOptions, - logInWithBalanceValidation, - unlockWallet, - withFixtures, - tempToggleSettingRedesignedTransactionConfirmations, -} = require('../../../helpers'); -const { SMART_CONTRACTS } = require('../../../seeder/smart-contracts'); -const FixtureBuilder = require('../../../fixture-builder'); - -describe('Send NFT', function () { - const smartContract = SMART_CONTRACTS.NFTS; - const erc1155SmartContract = SMART_CONTRACTS.ERC1155; - - it('should be able to send ERC721 NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC721().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Fill the send NFT form and confirm the transaction - await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); - await driver.clickElement('.nft-item__container'); - // TODO: Update Test when Multichain Send Flow is added - await driver.clickElement({ text: 'Send', tag: 'button' }); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - ); - await driver.clickElement({ - text: 'Continue', - tag: 'button', - }); - - // Edit the NFT, ensure same address, and move forward - await driver.clickElement( - '[data-testid="confirm-page-back-edit-button"]', - ); - - const recipient = await driver.findElement( - '.ens-input__selected-input__title', - ); - - assert.equal( - await recipient.getText(), - '0xc427D...Acd28\n0xc427D...Acd28', - ); - - await driver.clickElement({ - text: 'Continue', - tag: 'button', - }); - - // Confirm the send - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // When transaction complete, check the send NFT is displayed in activity tab - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const sendNftItem = await driver.findElement({ - css: '[data-testid="activity-list-item-action"]', - text: 'Send Test Dapp NFTs', - }); - assert.equal(await sendNftItem.isDisplayed(), true); - }, - ); - }); - - it('should be able to send ERC1155 NFT', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC1155().build(), - ganacheOptions: defaultGanacheOptions, - smartContract: erc1155SmartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Fill the send NFT form and confirm the transaction - await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); - - await driver.clickElement('[data-testid="nft-network-badge"]'); - - await driver.clickElement({ text: 'Send', tag: 'button' }); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ - text: 'Continue', - tag: 'button', - }); - - // Confirm the send - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // When transaction complete, check the send NFT is displayed in activity tab - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const sendNftItem = await driver.findElement({ - css: '[data-testid="activity-list-item-action"]', - text: 'Safe transfer from', - }); - assert.equal(await sendNftItem.isDisplayed(), true); - }, - ); - }); - - it('should not be able to send ERC1155 NFT with invalid amount', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC1155().build(), - ganacheOptions: defaultGanacheOptions, - smartContract: erc1155SmartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Fill the send NFT form and confirm the transaction - await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); - - await driver.clickElement('[data-testid="nft-network-badge"]'); - - await driver.clickElement({ text: 'Send', tag: 'button' }); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - ); - - await driver.assertElementNotPresent( - '[data-testid="send-page-amount-error"]', - ); - await driver.fill('input[placeholder="0"]', '0'); - assert.ok( - await driver.findElement({ - text: '1 NFT. Cannot send negative or zero amounts of asset.', - tag: 'p', - }), - ); - }, - ); - }); -}); diff --git a/test/e2e/tests/transaction/change-assets.spec.js b/test/e2e/tests/transaction/change-assets.spec.js index 33944f7a2160..391d64e28369 100644 --- a/test/e2e/tests/transaction/change-assets.spec.js +++ b/test/e2e/tests/transaction/change-assets.spec.js @@ -3,728 +3,349 @@ const { defaultGanacheOptions, withFixtures, logInWithBalanceValidation, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); const { tEn } = require('../../../lib/i18n-helpers'); describe('Change assets', function () { - describe('Old confirmation screens', function () { - it('sends the correct asset when switching from native currency to NFT', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC721().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Wait for balance to load - await driver.delay(500); - - // Click the Send button - await driver.clickElement('[data-testid="eth-overview-send"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '2.000042', - }); - - // Click edit - await driver.clickElement( - '[data-testid="confirm-page-back-edit-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose an NFT instead - await driver.clickElement({ css: 'button', text: 'NFTs' }); - await driver.clickElement('[data-testid="nft-default-image"]'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Click continue - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector( - '.confirm-page-container-summary__title img', - ); - await driver.waitForSelector({ - css: 'h3', - text: 'Test Dapp NFTs #1', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ - css: 'p', - text: 'Send Test Dapp NFTs #1', - }); - }, - ); - }); - - it('sends the correct asset when switching from ERC20 to NFT', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - const tokenContract = SMART_CONTRACTS.HST; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withTokensControllerERC20() - .withNftControllerERC721() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract: [smartContract, tokenContract], - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Click the Send button - await driver.clickElement({ - css: '[data-testid="multichain-token-list-button"] p', - text: 'TST', - }); - - // Wait for balance to load - await driver.delay(500); - - await driver.clickElement('[data-testid="eth-overview-send"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '0'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.00008455', - }); - - // Click edit - await driver.clickElement( - '[data-testid="confirm-page-back-edit-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose an NFT instead - await driver.clickElement({ css: 'button', text: 'NFTs' }); - await driver.clickElement('[data-testid="nft-default-image"]'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Click continue - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector( - '.confirm-page-container-summary__title img', - ); - await driver.waitForSelector({ - css: 'h3', - text: 'Test Dapp NFTs #1', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ - css: 'p', - text: 'Send Test Dapp NFTs #1', - }); - }, - ); - }); - - it('sends the correct asset when switching from NFT to native currency', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC721().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Choose the nft - await driver.clickElement( - '[data-testid="account-overview__nfts-tab"]', - ); - await driver.clickElement('[data-testid="nft-default-image"]'); - await driver.clickElement('[data-testid="nft-send-button"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector( - '.confirm-page-container-summary__title img', - ); - await driver.waitForSelector({ - css: 'h3', - text: 'Test Dapp NFTs #1', - }); - - // Click edit - await driver.clickElement( - '[data-testid="confirm-page-back-edit-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose tokens - await driver.clickElement({ css: 'button', text: 'Tokens' }); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - - // Ensure correct token selected - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '2.000042', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ css: 'p', text: 'Send' }); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-2 ETH', - }); - }, - ); - }); - - it('changes to native currency when switching accounts during a NFT send', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNftControllerERC721() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Create second account - await driver.clickElement('[data-testid="account-menu-icon"]'); - await driver.clickElement( - '[data-testid="multichain-account-menu-popover-action-button"]', - ); - await driver.clickElement( - '[data-testid="multichain-account-menu-popover-add-account"]', - ); - await driver.fill('[placeholder="Account 2"]', 'Account 2'); - await driver.clickElement({ text: tEn('addAccount'), tag: 'button' }); - - // Go back to Account 1 - await driver.clickElement('[data-testid="account-menu-icon"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 1', - }); - - // Choose the nft - await driver.clickElement( - '[data-testid="account-overview__nfts-tab"]', - ); - await driver.clickElement('[data-testid="nft-default-image"]'); - await driver.clickElement('[data-testid="nft-send-button"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Switch to Account 2 - await driver.clickElement('[data-testid="send-page-account-picker"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 2', - }); - - // Ensure that the AssetPicker shows native currency and 0 value - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Go back to Account 1 - await driver.clickElement('[data-testid="send-page-account-picker"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 1', - }); - - // Ensure that the AssetPicker shows native currency and 0 value - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - - // Make sure hex data is cleared after switching assets - const hexDataLocator = await driver.findElement( - '[data-testid="send-hex-textarea"]', - ); - const hexDataValue = await hexDataLocator.getProperty('value'); - assert.equal( - hexDataValue, - '', - 'Hex data has not been cleared after switching assets.', - ); - - // Make sure gas is updated by resetting amount and hex data - // Note: this is needed until the race condition is fixed on the wallet level (issue #25243) - await driver.fill('[data-testid="currency-input"]', '2.000042'); - await hexDataLocator.fill('0x'); - await hexDataLocator.fill(''); - - // Go to the last confirmation screen - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '2.000042', - }); - }, - ); - }); + it('sends the correct asset when switching from native currency to NFT', async function () { + const smartContract = SMART_CONTRACTS.NFTS; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder().withNftControllerERC721().build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Wait for balance to load + await driver.delay(500); + + // Click the Send button + await driver.clickElement('[data-testid="eth-overview-send"]'); + + // Chose a recipient + await driver.clickElement('.multichain-account-list-item'); + + // Populate an amount, continue + await driver.clickElement('[data-testid="currency-input"]'); + await driver.press('[data-testid="currency-input"]', '2'); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Click edit + await driver.clickElement( + '[data-testid="wallet-initiated-header-back-button"]', + ); + + // Open the Amount modal + await driver.clickElement('.asset-picker__symbol'); + + // Choose an NFT instead + await driver.clickElement({ css: 'button', text: 'NFTs' }); + await driver.clickElement('[data-testid="nft-default-image"]'); + + // Validate that an NFT is chosen in the AssetAmountPicker + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'TDN', + }); + await driver.waitForSelector({ css: 'p', text: '#1' }); + + // Click continue + await driver.assertElementNotPresent('.mm-modal-content'); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Ensure NFT is showing + await driver.waitForSelector('[data-testid="nft-default-image"]'); + await driver.waitForSelector({ + css: 'h2', + text: 'Test Dapp NFTs #1', + }); + + // Send it! + await driver.clickElement({ text: 'Confirm', css: 'button' }); + + // Ensure it was sent + await driver.waitForSelector({ + css: 'p', + text: 'Send Test Dapp NFTs #1', + }); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('sends the correct asset when switching from native currency to NFT', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC721().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Wait for balance to load - await driver.delay(500); - - // Click the Send button - await driver.clickElement('[data-testid="eth-overview-send"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Click edit - await driver.clickElement( - '[data-testid="wallet-initiated-header-back-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose an NFT instead - await driver.clickElement({ css: 'button', text: 'NFTs' }); - await driver.clickElement('[data-testid="nft-default-image"]'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Click continue - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector('[data-testid="nft-default-image"]'); - await driver.waitForSelector({ - css: 'h2', - text: 'Test Dapp NFTs #1', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ - css: 'p', - text: 'Send Test Dapp NFTs #1', - }); - }, - ); - }); - - it('sends the correct asset when switching from ERC20 to NFT', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - const tokenContract = SMART_CONTRACTS.HST; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withTokensControllerERC20() - .withNftControllerERC721() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract: [smartContract, tokenContract], - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Click the Send button - await driver.clickElement({ - css: '[data-testid="multichain-token-list-button"] p', - text: 'TST', - }); - - // Wait for balance to load - await driver.delay(500); - - await driver.clickElement('[data-testid="eth-overview-send"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '0'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Click edit - await driver.clickElement( - '[data-testid="wallet-initiated-header-back-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose an NFT instead - await driver.clickElement({ css: 'button', text: 'NFTs' }); - await driver.clickElement('[data-testid="nft-default-image"]'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Click continue - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector('[data-testid="nft-default-image"]'); - await driver.waitForSelector({ - css: 'h2', - text: 'Test Dapp NFTs #1', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ - css: 'p', - text: 'Send Test Dapp NFTs #1', - }); - }, - ); - }); - - it('sends the correct asset when switching from NFT to native currency', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder().withNftControllerERC721().build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Choose the nft - await driver.clickElement( - '[data-testid="account-overview__nfts-tab"]', - ); - await driver.clickElement('[data-testid="nft-default-image"]'); - await driver.clickElement('[data-testid="nft-send-button"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Ensure NFT is showing - await driver.waitForSelector('[data-testid="nft-default-image"]'); - await driver.waitForSelector({ - css: 'h2', - text: 'Test Dapp NFTs #1', - }); - - // Click edit - await driver.clickElement( - '[data-testid="wallet-initiated-header-back-button"]', - ); - - // Open the Amount modal - await driver.clickElement('.asset-picker__symbol'); - - // Choose tokens - await driver.clickElement({ css: 'button', text: 'Tokens' }); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - - // Ensure correct token selected - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - await driver.assertElementNotPresent('.mm-modal-content'); - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: 'h2', - text: '2', - }); - - // Send it! - await driver.clickElement({ text: 'Confirm', css: 'button' }); - - // Ensure it was sent - await driver.waitForSelector({ css: 'p', text: 'Send' }); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-2 ETH', - }); - }, - ); - }); - - it('changes to native currency when switching accounts during a NFT send', async function () { - const smartContract = SMART_CONTRACTS.NFTS; - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withNftControllerERC721() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Create second account - await driver.clickElement('[data-testid="account-menu-icon"]'); - await driver.clickElement( - '[data-testid="multichain-account-menu-popover-action-button"]', - ); - await driver.clickElement( - '[data-testid="multichain-account-menu-popover-add-account"]', - ); - await driver.fill('[placeholder="Account 2"]', 'Account 2'); - await driver.clickElement({ text: tEn('addAccount'), tag: 'button' }); - - // Go back to Account 1 - await driver.clickElement('[data-testid="account-menu-icon"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 1', - }); - - // Choose the nft - await driver.clickElement( - '[data-testid="account-overview__nfts-tab"]', - ); - await driver.clickElement('[data-testid="nft-default-image"]'); - await driver.clickElement('[data-testid="nft-send-button"]'); - - // Chose a recipient - await driver.clickElement('.multichain-account-list-item'); - - // Validate that an NFT is chosen in the AssetAmountPicker - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'TDN', - }); - await driver.waitForSelector({ css: 'p', text: '#1' }); - - // Switch to Account 2 - await driver.clickElement('[data-testid="send-page-account-picker"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 2', - }); - - // Ensure that the AssetPicker shows native currency and 0 value - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Go back to Account 1 - await driver.clickElement('[data-testid="send-page-account-picker"]'); - await driver.clickElement({ - css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, - text: 'Account 1', - }); - - // Ensure that the AssetPicker shows native currency and 0 value - await driver.waitForSelector({ - css: '.asset-picker__symbol', - text: 'ETH', - }); - - // Populate an amount, continue - await driver.clickElement('[data-testid="currency-input"]'); - await driver.press('[data-testid="currency-input"]', '2'); - - // Make sure hex data is cleared after switching assets - const hexDataLocator = await driver.findElement( - '[data-testid="send-hex-textarea"]', - ); - const hexDataValue = await hexDataLocator.getProperty('value'); - assert.equal( - hexDataValue, - '', - 'Hex data has not been cleared after switching assets.', - ); - - // Make sure gas is updated by resetting amount and hex data - // Note: this is needed until the race condition is fixed on the wallet level (issue #25243) - await driver.fill('[data-testid="currency-input"]', '2.000042'); - await hexDataLocator.fill('0x'); - await hexDataLocator.fill(''); - - // Go to the last confirmation screen - await driver.clickElement({ text: 'Continue', css: 'button' }); - - // Validate the send amount - await driver.waitForSelector({ - css: 'h2', - text: '2 ETH', - }); - }, - ); - }); + it('sends the correct asset when switching from ERC20 to NFT', async function () { + const smartContract = SMART_CONTRACTS.NFTS; + const tokenContract = SMART_CONTRACTS.HST; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withTokensControllerERC20() + .withNftControllerERC721() + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract: [smartContract, tokenContract], + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Click the Send button + await driver.clickElement({ + css: '[data-testid="multichain-token-list-button"] p', + text: 'TST', + }); + + // Wait for balance to load + await driver.delay(500); + + await driver.clickElement('[data-testid="eth-overview-send"]'); + + // Chose a recipient + await driver.clickElement('.multichain-account-list-item'); + + // Populate an amount, continue + await driver.clickElement('[data-testid="currency-input"]'); + await driver.press('[data-testid="currency-input"]', '0'); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Click edit + await driver.clickElement( + '[data-testid="wallet-initiated-header-back-button"]', + ); + + // Open the Amount modal + await driver.clickElement('.asset-picker__symbol'); + + // Choose an NFT instead + await driver.clickElement({ css: 'button', text: 'NFTs' }); + await driver.clickElement('[data-testid="nft-default-image"]'); + + // Validate that an NFT is chosen in the AssetAmountPicker + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'TDN', + }); + await driver.waitForSelector({ css: 'p', text: '#1' }); + + // Click continue + await driver.assertElementNotPresent('.mm-modal-content'); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Ensure NFT is showing + await driver.waitForSelector('[data-testid="nft-default-image"]'); + await driver.waitForSelector({ + css: 'h2', + text: 'Test Dapp NFTs #1', + }); + + // Send it! + await driver.clickElement({ text: 'Confirm', css: 'button' }); + + // Ensure it was sent + await driver.waitForSelector({ + css: 'p', + text: 'Send Test Dapp NFTs #1', + }); + }, + ); + }); + + it('sends the correct asset when switching from NFT to native currency', async function () { + const smartContract = SMART_CONTRACTS.NFTS; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder().withNftControllerERC721().build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Choose the nft + await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); + await driver.clickElement('[data-testid="nft-default-image"]'); + await driver.clickElement('[data-testid="nft-send-button"]'); + + // Chose a recipient + await driver.clickElement('.multichain-account-list-item'); + + // Validate that an NFT is chosen in the AssetAmountPicker + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'TDN', + }); + await driver.waitForSelector({ css: 'p', text: '#1' }); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Ensure NFT is showing + await driver.waitForSelector('[data-testid="nft-default-image"]'); + await driver.waitForSelector({ + css: 'h2', + text: 'Test Dapp NFTs #1', + }); + + // Click edit + await driver.clickElement( + '[data-testid="wallet-initiated-header-back-button"]', + ); + + // Open the Amount modal + await driver.clickElement('.asset-picker__symbol'); + + // Choose tokens + await driver.clickElement({ css: 'button', text: 'Tokens' }); + await driver.clickElement( + '[data-testid="multichain-token-list-button"]', + ); + + // Ensure correct token selected + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'ETH', + }); + + // Populate an amount, continue + await driver.clickElement('[data-testid="currency-input"]'); + await driver.press('[data-testid="currency-input"]', '2'); + await driver.assertElementNotPresent('.mm-modal-content'); + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Validate the send amount + await driver.waitForSelector({ + css: 'h2', + text: '2', + }); + + // Send it! + await driver.clickElement({ text: 'Confirm', css: 'button' }); + + // Ensure it was sent + await driver.waitForSelector({ css: 'p', text: 'Send' }); + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-2 ETH', + }); + }, + ); + }); + + it('changes to native currency when switching accounts during a NFT send', async function () { + const smartContract = SMART_CONTRACTS.NFTS; + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withNftControllerERC721() + .withPreferencesController({ + featureFlags: { + sendHexData: true, + }, + }) + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Create second account + await driver.clickElement('[data-testid="account-menu-icon"]'); + await driver.clickElement( + '[data-testid="multichain-account-menu-popover-action-button"]', + ); + await driver.clickElement( + '[data-testid="multichain-account-menu-popover-add-account"]', + ); + await driver.fill('[placeholder="Account 2"]', 'Account 2'); + await driver.clickElement({ text: tEn('addAccount'), tag: 'button' }); + + // Go back to Account 1 + await driver.clickElement('[data-testid="account-menu-icon"]'); + await driver.clickElement({ + css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, + text: 'Account 1', + }); + + // Choose the nft + await driver.clickElement('[data-testid="account-overview__nfts-tab"]'); + await driver.clickElement('[data-testid="nft-default-image"]'); + await driver.clickElement('[data-testid="nft-send-button"]'); + + // Chose a recipient + await driver.clickElement('.multichain-account-list-item'); + + // Validate that an NFT is chosen in the AssetAmountPicker + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'TDN', + }); + await driver.waitForSelector({ css: 'p', text: '#1' }); + + // Switch to Account 2 + await driver.clickElement('[data-testid="send-page-account-picker"]'); + await driver.clickElement({ + css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, + text: 'Account 2', + }); + + // Ensure that the AssetPicker shows native currency and 0 value + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'ETH', + }); + + // Go back to Account 1 + await driver.clickElement('[data-testid="send-page-account-picker"]'); + await driver.clickElement({ + css: `.multichain-account-list-item .multichain-account-list-item__account-name__button`, + text: 'Account 1', + }); + + // Ensure that the AssetPicker shows native currency and 0 value + await driver.waitForSelector({ + css: '.asset-picker__symbol', + text: 'ETH', + }); + + // Populate an amount, continue + await driver.clickElement('[data-testid="currency-input"]'); + await driver.press('[data-testid="currency-input"]', '2'); + + // Make sure hex data is cleared after switching assets + const hexDataLocator = await driver.findElement( + '[data-testid="send-hex-textarea"]', + ); + const hexDataValue = await hexDataLocator.getProperty('value'); + assert.equal( + hexDataValue, + '', + 'Hex data has not been cleared after switching assets.', + ); + + // Make sure gas is updated by resetting amount and hex data + // Note: this is needed until the race condition is fixed on the wallet level (issue #25243) + await driver.fill('[data-testid="currency-input"]', '2.000042'); + await hexDataLocator.fill('0x'); + await hexDataLocator.fill(''); + + // Go to the last confirmation screen + await driver.clickElement({ text: 'Continue', css: 'button' }); + + // Validate the send amount + await driver.waitForSelector({ + css: 'h2', + text: '2 ETH', + }); + }, + ); }); }); diff --git a/test/e2e/tests/transaction/edit-gas-fee.spec.js b/test/e2e/tests/transaction/edit-gas-fee.spec.js index 4e30fb8c0be1..76bc1a82fd37 100644 --- a/test/e2e/tests/transaction/edit-gas-fee.spec.js +++ b/test/e2e/tests/transaction/edit-gas-fee.spec.js @@ -9,461 +9,231 @@ const { unlockWallet, generateGanacheOptions, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); describe('Editing Confirm Transaction', function () { - describe('Old confirmation screens', function () { - it('allows selecting high, medium, low gas estimates on edit gas fee popover @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1', - }); - - // update estimates to high - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.waitForSelector({ - text: 'sec', - tag: 'span', - }); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-high"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Aggressive', - }); - - // update estimates to medium - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-medium"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Market', - }); - - // update estimates to low - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-low"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Slow', - }); - await driver.waitForSelector('[data-testid="low-gas-fee-alert"]'); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('allows accessing advance gas fee popover from edit gas fee popover', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1', - }); - - // update estimates to high - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.waitForSelector({ - text: 'sec', - tag: 'span', - }); - await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); - - // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8.5'); - - // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8.5'); - - // save default values - await driver.clickElement('input[type="checkbox"]'); - - // edit gas limit - await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); - - // Submit gas fee changes - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.00085', - }); - await driver.waitForSelector({ - css: '.currency-display-component__suffix', - text: 'ETH', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('should use dapp suggested estimates for transaction coming from dapp @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - // login to extension - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createDappTransaction(driver, { - maxFeePerGas: '0x2000000000', - maxPriorityFeePerGas: '0x1000000000', - }); - - // check transaction in extension popup - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - text: 'Site suggested', - }); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - // -- should render the popover with no error - // this is to test in MV3 a racing issue when request for suggestedGasFees is not fetched properly - // some data would not be defined yet - await driver.waitForSelector('.edit-gas-fee-popover'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-dappSuggested"]', - ); - - const transactionAmounts = await driver.findElements( - '.currency-display-component__text', - ); - const transactionAmount = transactionAmounts[0]; - assert.equal(await transactionAmount.getText(), '0.001'); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.00185144', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - // transaction should correct values in activity tab - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-0.001\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); + it('allows selecting high, medium, low gas estimates on edit gas fee popover @no-mmi', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createInternalTransaction(driver); + + await driver.findElement({ + css: 'h2', + text: '1 ETH', + }); + + // update estimates to high + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.waitForSelector({ + text: 'sec', + tag: 'span', + }); + await driver.clickElement( + '[data-testid="edit-gas-fee-item-high"] > span:first-child', + ); + + await driver.waitForSelector({ + text: 'Aggressive', + }); + + // update estimates to medium + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.clickElement( + '[data-testid="edit-gas-fee-item-medium"] > span:first-child', + ); + + await driver.waitForSelector({ + text: 'Market', + }); + + // update estimates to low + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.clickElement( + '[data-testid="edit-gas-fee-item-low"] > span:first-child', + ); + + await driver.waitForSelector({ + text: 'Slow', + }); + await driver.waitForSelector('[data-testid="inline-alert"]'); + + // confirms the transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + return confirmedTxes.length === 1; + }, 10000); + + const txValues = await driver.findElements( + '[data-testid="transaction-list-item-primary-currency"]', + ); + assert.equal(txValues.length, 1); + assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('allows selecting high, medium, low gas estimates on edit gas fee popover @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: 'h2', - text: '1 ETH', - }); - - // update estimates to high - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.waitForSelector({ - text: 'sec', - tag: 'span', - }); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-high"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Aggressive', - }); - - // update estimates to medium - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-medium"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Market', - }); - - // update estimates to low - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-low"] > span:first-child', - ); - - await driver.waitForSelector({ - text: 'Slow', - }); - await driver.waitForSelector('[data-testid="inline-alert"]'); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('allows accessing advance gas fee popover from edit gas fee popover', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: 'h2', - text: '1 ETH', - }); - - // update estimates to high - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.waitForSelector({ - text: 'sec', - tag: 'span', - }); - await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); - - // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8.5'); - - // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8.5'); - - // save default values - await driver.clickElement('input[type="checkbox"]'); - - // edit gas limit - await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); - - // Submit gas fee changes - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '[data-testid="first-gas-field"]', - text: '0.0008 ETH', - }); - - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$1.44', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('should use dapp suggested estimates for transaction coming from dapp @no-mmi', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - // login to extension - await unlockWallet(driver); - - await createDappTransaction(driver, { - maxFeePerGas: '0x2000000000', - maxPriorityFeePerGas: '0x1000000000', - }); - - // check transaction in extension popup - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.waitForSelector({ - text: 'Site suggested', - }); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - // -- should render the popover with no error - // this is to test in MV3 a racing issue when request for suggestedGasFees is not fetched properly - // some data would not be defined yet - await driver.waitForSelector('.edit-gas-fee-popover'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-dappSuggested"]', - ); - - await driver.findElements({ - css: 'h2', - text: '0.001 ETH', - }); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '[data-testid="first-gas-field"]', - text: '0.0019', - }); - - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$3.15', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); + it('allows accessing advance gas fee popover from edit gas fee popover', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createInternalTransaction(driver); + + await driver.findElement({ + css: 'h2', + text: '1 ETH', + }); + + // update estimates to high + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.waitForSelector({ + text: 'sec', + tag: 'span', + }); + await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); + + // enter max fee + await driver.fill('[data-testid="base-fee-input"]', '8.5'); + + // enter priority fee + await driver.fill('[data-testid="priority-fee-input"]', '8.5'); + + // save default values + await driver.clickElement('input[type="checkbox"]'); + + // edit gas limit + await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); + await driver.fill('[data-testid="gas-limit-input"]', '100000'); + + // Submit gas fee changes + await driver.clickElement({ text: 'Save', tag: 'button' }); + + // has correct updated value on the confirm screen the transaction + await driver.waitForSelector({ + css: '[data-testid="first-gas-field"]', + text: '0.0008 ETH', + }); + + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$1.44', + }); + + // confirms the transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + return confirmedTxes.length === 1; + }, 10000); + + const txValues = await driver.findElements( + '[data-testid="transaction-list-item-primary-currency"]', + ); + assert.equal(txValues.length, 1); + assert.ok(/-1\s*ETH/u.test(await txValues[0].getText())); + }, + ); + }); - // transaction should correct values in activity tab - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-0.001\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); + it('should use dapp suggested estimates for transaction coming from dapp @no-mmi', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + dapp: true, + }, + async ({ driver }) => { + // login to extension + await unlockWallet(driver); + + await createDappTransaction(driver, { + maxFeePerGas: '0x2000000000', + maxPriorityFeePerGas: '0x1000000000', + }); + + // check transaction in extension popup + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.waitForSelector({ + text: 'Site suggested', + }); + + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + // -- should render the popover with no error + // this is to test in MV3 a racing issue when request for suggestedGasFees is not fetched properly + // some data would not be defined yet + await driver.waitForSelector('.edit-gas-fee-popover'); + await driver.clickElement( + '[data-testid="edit-gas-fee-item-dappSuggested"]', + ); + + await driver.findElements({ + css: 'h2', + text: '0.001 ETH', + }); + + // has correct updated value on the confirm screen the transaction + await driver.waitForSelector({ + css: '[data-testid="first-gas-field"]', + text: '0.0019', + }); + + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$3.15', + }); + + // confirms the transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + // transaction should correct values in activity tab + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + return confirmedTxes.length === 1; + }, 10000); + + const txValues = await driver.findElements( + '[data-testid="transaction-list-item-primary-currency"]', + ); + assert.equal(txValues.length, 1); + assert.ok(/-0.001\s*ETH/u.test(await txValues[0].getText())); + }, + ); }); }); diff --git a/test/e2e/tests/transaction/gas-estimates.spec.js b/test/e2e/tests/transaction/gas-estimates.spec.js index 77027bc67901..e65ee39dcea6 100644 --- a/test/e2e/tests/transaction/gas-estimates.spec.js +++ b/test/e2e/tests/transaction/gas-estimates.spec.js @@ -3,7 +3,6 @@ const { logInWithBalanceValidation, openActionMenuAndStartSendFlow, generateGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); const { CHAIN_IDS } = require('../../../../shared/constants/network'); @@ -17,488 +16,250 @@ describe('Gas estimates generated by MetaMask', function () { hardfork: 'london', }); - describe('Old confirmation screens', function () { - describe('Send on a network that is EIP-1559 compatible', function () { - it('show expected gas defaults', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.00043983', - }); - }, - ); - }); - - it('show expected gas defaults when API is down', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - testSpecificMock: (mockServer) => { - mockServer - .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) - .thenCallback(() => { - return { - json: { - error: 'cannot get gas prices for chain id 1337', - }, - statusCode: 503, - }; - }); - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.00043983', - }); - }, - ); - }); - - it('show expected gas defaults when the network is not supported', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - testSpecificMock: (mockServer) => { - mockServer - .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) - .thenCallback(() => { - return { - statusCode: 422, - }; - }); - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.00043983', - }); - }, - ); - }); + describe('Send on a network that is EIP-1559 compatible', function () { + it('show expected gas defaults', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: postLondonGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.0004 ETH', + }); + + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.75', + }); + }, + ); }); - describe('Send on a network that is not EIP-1559 compatible', function () { - it('show expected gas defaults on a network supported by legacy gas API', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: { - ...preLondonGanacheOptions, - chainId: parseInt(CHAIN_IDS.BSC, 16), - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.000042', - }); - }, - ); - }); - - it('show expected gas defaults on a network supported by legacy gas API when that API is down', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: { - ...preLondonGanacheOptions, - chainId: parseInt(CHAIN_IDS.BSC, 16), - }, - testSpecificMock: (mockServer) => { - mockServer - .forGet( - `${GAS_API_BASE_URL}/networks/${parseInt( - CHAIN_IDS.BSC, - 16, - )}/gasPrices`, - ) - .thenCallback(() => { - return { - statusCode: 422, - }; - }); - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.000042', - }); + it('show expected gas defaults when API is down', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: postLondonGanacheOptions, + testSpecificMock: (mockServer) => { + mockServer + .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) + .thenCallback(() => { + return { + json: { + error: 'cannot get gas prices for chain id 1337', + }, + statusCode: 503, + }; + }); }, - ); - }); - - it('show expected gas defaults on a network not supported by legacy gas API', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: preLondonGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + }, + ); + }); - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="confirm-gas-display"]', - text: '0.000042', - }); + it('show expected gas defaults when the network is not supported', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: postLondonGanacheOptions, + testSpecificMock: (mockServer) => { + mockServer + .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) + .thenCallback(() => { + return { + statusCode: 422, + }; + }); }, - ); - }); + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + }, + ); }); }); - describe('Redesigned confirmation screens', function () { - describe('Send on a network that is EIP-1559 compatible', function () { - it('show expected gas defaults', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.0004 ETH', - }); - - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.75', - }); - }, - ); - }); - - it('show expected gas defaults when API is down', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - testSpecificMock: (mockServer) => { - mockServer - .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) - .thenCallback(() => { - return { - json: { - error: 'cannot get gas prices for chain id 1337', - }, - statusCode: 503, - }; - }); - }, - title: this.test.fullTitle(), + describe('Send on a network that is not EIP-1559 compatible', function () { + it('show expected gas defaults on a network supported by legacy gas API', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: { + ...preLondonGanacheOptions, + chainId: parseInt(CHAIN_IDS.BSC, 16), }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + }, + ); + }); - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); + it('show expected gas defaults on a network supported by legacy gas API when that API is down', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: { + ...preLondonGanacheOptions, + chainId: parseInt(CHAIN_IDS.BSC, 16), }, - ); - }); - - it('show expected gas defaults when the network is not supported', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: postLondonGanacheOptions, - testSpecificMock: (mockServer) => { - mockServer - .forGet(`${GAS_API_BASE_URL}/networks/1337/suggestedGasFees`) - .thenCallback(() => { - return { - statusCode: 422, - }; - }); - }, - title: this.test.fullTitle(), + testSpecificMock: (mockServer) => { + mockServer + .forGet( + `${GAS_API_BASE_URL}/networks/${parseInt( + CHAIN_IDS.BSC, + 16, + )}/gasPrices`, + ) + .thenCallback(() => { + return { + statusCode: 422, + }; + }); }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); - }, - ); - }); + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + }, + ); }); - describe('Send on a network that is not EIP-1559 compatible', function () { - it('show expected gas defaults on a network supported by legacy gas API', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: { - ...preLondonGanacheOptions, - chainId: parseInt(CHAIN_IDS.BSC, 16), - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); - }, - ); - }); - - it('show expected gas defaults on a network supported by legacy gas API when that API is down', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: { - ...preLondonGanacheOptions, - chainId: parseInt(CHAIN_IDS.BSC, 16), - }, - testSpecificMock: (mockServer) => { - mockServer - .forGet( - `${GAS_API_BASE_URL}/networks/${parseInt( - CHAIN_IDS.BSC, - 16, - )}/gasPrices`, - ) - .thenCallback(() => { - return { - statusCode: 422, - }; - }); - }, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); - }, - ); - }); - - it('show expected gas defaults on a network not supported by legacy gas API', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: preLondonGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); - - await driver.fill('input[placeholder="0"]', '1'); - - await driver.clickElement({ css: 'button', text: 'Continue' }); - - // Check that the gas estimation is what we expect - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - await driver.waitForSelector({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); - }, - ); - }); + it('show expected gas defaults on a network not supported by legacy gas API', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: preLondonGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); + + await driver.fill('input[placeholder="0"]', '1'); + + await driver.clickElement({ css: 'button', text: 'Continue' }); + + // Check that the gas estimation is what we expect + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + await driver.waitForSelector({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + }, + ); }); }); }); diff --git a/test/e2e/tests/transaction/multiple-transactions.spec.js b/test/e2e/tests/transaction/multiple-transactions.spec.js index 72dbbe638e3b..16c921fab65f 100644 --- a/test/e2e/tests/transaction/multiple-transactions.spec.js +++ b/test/e2e/tests/transaction/multiple-transactions.spec.js @@ -6,245 +6,122 @@ const { unlockWallet, generateGanacheOptions, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); describe('Multiple transactions', function () { - describe('Old confirmation screens', function () { - it('creates multiple queued transactions, then confirms', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - // creates first transaction - await createDappTransaction(driver); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - // creates second transaction - await createDappTransaction(driver); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // confirms second transaction - await driver.waitForSelector({ - text: 'Reject 2 transactions', - tag: 'a', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for the "Reject 2 transactions" to disappear - await driver.assertElementNotPresent( - '.page-container__footer-secondary a', - ); - - // confirms first transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.delay(regularDelayMs); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(2)', - ); - - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - - assert.equal(confirmedTxes.length, 2); - }, - ); - }); - - it('creates multiple queued transactions, then rejects', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - // creates first transaction - await createDappTransaction(driver); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - // creates second transaction - await createDappTransaction(driver); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // rejects second transaction - await driver.waitForSelector({ - text: 'Reject 2 transactions', - tag: 'a', - }); - await driver.clickElement({ text: 'Reject', tag: 'button' }); - await driver.assertElementNotPresent('.loading-overlay__spinner'); - // rejects first transaction - await driver.clickElement({ text: 'Reject', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.delay(regularDelayMs); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // The previous isTransactionListEmpty wait already serves as the guard here for the assertElementNotPresent - await driver.assertElementNotPresent( - '.transaction-list__completed-transactions .activity-list-item', - ); - }, - ); - }); + it('creates multiple queued transactions, then confirms', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // initiates a transaction from the dapp + await openDapp(driver); + // creates first transaction + await createDappTransaction(driver); + await driver.waitUntilXWindowHandles(3); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); + + // creates second transaction + await createDappTransaction(driver); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // confirms second transaction + await driver.waitForSelector({ + text: 'Reject all', + tag: 'button', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // wait for the "Reject 2 transactions" to disappear + await driver.assertElementNotPresent( + '.page-container__footer-secondary a', + ); + + // confirms first transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.waitUntilXWindowHandles(2); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.delay(regularDelayMs); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.waitForSelector( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(2)', + ); + + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + + assert.equal(confirmedTxes.length, 2); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('creates multiple queued transactions, then confirms', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - // creates first transaction - await createDappTransaction(driver); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - // creates second transaction - await createDappTransaction(driver); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // confirms second transaction - await driver.waitForSelector({ - text: 'Reject all', - tag: 'button', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // wait for the "Reject 2 transactions" to disappear - await driver.assertElementNotPresent( - '.page-container__footer-secondary a', - ); - - // confirms first transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.delay(regularDelayMs); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(2)', - ); - - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - - assert.equal(confirmedTxes.length, 2); - }, - ); - }); - - it('creates multiple queued transactions, then rejects', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - // creates first transaction - await createDappTransaction(driver); - await driver.waitUntilXWindowHandles(3); - - await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); - - // creates second transaction - await createDappTransaction(driver); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - // rejects second transaction - await driver.waitForSelector({ - text: 'Reject all', - tag: 'button', - }); - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.assertElementNotPresent('.loading-overlay__spinner'); - // rejects first transaction - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await driver.delay(regularDelayMs); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - - // The previous isTransactionListEmpty wait already serves as the guard here for the assertElementNotPresent - await driver.assertElementNotPresent( - '.transaction-list__completed-transactions .activity-list-item', - ); - }, - ); - }); + it('creates multiple queued transactions, then rejects', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // initiates a transaction from the dapp + await openDapp(driver); + // creates first transaction + await createDappTransaction(driver); + await driver.waitUntilXWindowHandles(3); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); + + // creates second transaction + await createDappTransaction(driver); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // rejects second transaction + await driver.waitForSelector({ + text: 'Reject all', + tag: 'button', + }); + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + await driver.assertElementNotPresent('.loading-overlay__spinner'); + // rejects first transaction + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + + await driver.waitUntilXWindowHandles(2); + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await driver.delay(regularDelayMs); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + + // The previous isTransactionListEmpty wait already serves as the guard here for the assertElementNotPresent + await driver.assertElementNotPresent( + '.transaction-list__completed-transactions .activity-list-item', + ); + }, + ); }); }); diff --git a/test/e2e/tests/transaction/navigate-transactions.spec.js b/test/e2e/tests/transaction/navigate-transactions.spec.js index eb8465fb47a7..0773756c66f0 100644 --- a/test/e2e/tests/transaction/navigate-transactions.spec.js +++ b/test/e2e/tests/transaction/navigate-transactions.spec.js @@ -4,9 +4,6 @@ const { const { createDappTransaction, } = require('../../page-objects/flows/transaction'); -const { - default: ConfirmationNavigation, -} = require('../../page-objects/pages/confirmations/legacy/navigation'); const { withFixtures, @@ -15,347 +12,163 @@ const { unlockWallet, generateGanacheOptions, WINDOW_TITLES, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); const TRANSACTION_COUNT = 4; describe('Navigate transactions', function () { - describe('Old confirmation screens', function () { - it('should navigate the unapproved transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createMultipleTransactions(driver, TRANSACTION_COUNT); - - const navigation = new ConfirmationNavigation(driver); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(2, 4); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(3, 4); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(4, 4); - - await navigation.clickFirstPage(); - await navigation.check_pageNumbers(1, 4); - - await navigation.clickLastPage(); - await navigation.check_pageNumbers(4, 4); - - await navigation.clickPreviousPage(); - await navigation.check_pageNumbers(3, 4); - - await navigation.clickPreviousPage(); - await navigation.check_pageNumbers(2, 4); - }, - ); - }); - - it('should add a transaction while the confirm page is in focus', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withPreferencesControllerTxSimulationsDisabled() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createMultipleTransactions(driver, TRANSACTION_COUNT); - - const navigation = new ConfirmationNavigation(driver); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(2, 4); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // add transaction - await openDapp(driver); - await driver.clickElement({ text: 'Send', tag: 'button' }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await navigation.check_pageNumbers(2, 5); - }, - ); - }); - - it('should reject and remove an unapproved transaction', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createMultipleTransactions(driver, TRANSACTION_COUNT); - - // reject transaction - await driver.clickElement({ text: 'Reject', tag: 'button' }); - - const navigation = new ConfirmationNavigation(driver); - await navigation.check_pageNumbers(1, 3); - }, - ); - }); - - it('should confirm and remove an unapproved transaction', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createMultipleTransactions(driver, TRANSACTION_COUNT); - - // confirm transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - const navigation = new ConfirmationNavigation(driver); - await navigation.check_pageNumbers(1, 3); - }, - ); - }); - - it('should reject and remove all unapproved transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver, ganacheServer }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createMultipleTransactions(driver, TRANSACTION_COUNT); - - // reject transactions - await driver.clickElement({ text: 'Reject 4', tag: 'a' }); - await driver.clickElement({ text: 'Reject all', tag: 'button' }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await locateAccountBalanceDOM(driver, ganacheServer); - }, - ); - }); + it('should navigate the unapproved transactions', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerTxSimulationsDisabled() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + dapp: true, + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); + + const navigation = new Confirmation(driver); + + await navigation.clickNextPage(); + await navigation.check_pageNumbers(2, 4); + + await navigation.clickNextPage(); + await navigation.check_pageNumbers(3, 4); + + await navigation.clickNextPage(); + await navigation.check_pageNumbers(4, 4); + + await navigation.clickPreviousPage(); + await navigation.check_pageNumbers(3, 4); + + await navigation.clickPreviousPage(); + await navigation.check_pageNumbers(2, 4); + + await navigation.clickPreviousPage(); + await navigation.check_pageNumbers(1, 4); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('should navigate the unapproved transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); - - const navigation = new Confirmation(driver); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(2, 4); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(3, 4); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(4, 4); - - await navigation.clickPreviousPage(); - await navigation.check_pageNumbers(3, 4); - - await navigation.clickPreviousPage(); - await navigation.check_pageNumbers(2, 4); - - await navigation.clickPreviousPage(); - await navigation.check_pageNumbers(1, 4); - }, - ); - }); - - it('should add a transaction while the confirm page is in focus', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withPreferencesControllerTxSimulationsDisabled() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); - - const navigation = new Confirmation(driver); - - await navigation.clickNextPage(); - await navigation.check_pageNumbers(2, 4); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - - // add transaction - await openDapp(driver); - await driver.clickElement({ text: 'Send', tag: 'button' }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await navigation.check_pageNumbers(2, 5); - }, - ); - }); - - it('should reject and remove an unapproved transaction', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); - - // reject transaction - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - - const navigation = new Confirmation(driver); - await navigation.check_pageNumbers(1, 3); - }, - ); - }); - - it('should confirm and remove an unapproved transaction', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); - - // confirm transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - const navigation = new Confirmation(driver); - await navigation.check_pageNumbers(1, 3); - }, - ); - }); - - it('should reject and remove all unapproved transactions', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerTxSimulationsDisabled() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - dapp: true, - }, - async ({ driver, ganacheServer }) => { - await unlockWallet(driver); - - await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); - - // reject transactions - await driver.clickElement({ text: 'Reject all', tag: 'button' }); - - await driver.switchToWindowWithTitle( - WINDOW_TITLES.ExtensionInFullScreenView, - ); - await locateAccountBalanceDOM(driver, ganacheServer); - }, - ); - }); + it('should add a transaction while the confirm page is in focus', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .withPreferencesControllerTxSimulationsDisabled() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); + + const navigation = new Confirmation(driver); + + await navigation.clickNextPage(); + await navigation.check_pageNumbers(2, 4); + + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + + // add transaction + await openDapp(driver); + await driver.clickElement({ text: 'Send', tag: 'button' }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + await navigation.check_pageNumbers(2, 5); + }, + ); }); -}); -async function createMultipleTransactions(driver, count) { - for (let i = 0; i < count; i++) { - await createDappTransaction(driver); - } + it('should reject and remove an unapproved transaction', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerTxSimulationsDisabled() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + dapp: true, + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); + + // reject transaction + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + + const navigation = new Confirmation(driver); + await navigation.check_pageNumbers(1, 3); + }, + ); + }); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + it('should confirm and remove an unapproved transaction', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerTxSimulationsDisabled() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + dapp: true, + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); + + // confirm transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + const navigation = new Confirmation(driver); + await navigation.check_pageNumbers(1, 3); + }, + ); + }); - // Wait until total amount is loaded to mitigate flakiness on reject - await driver.findElement({ - tag: 'span', - text: '0.001', + it('should reject and remove all unapproved transactions', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerTxSimulationsDisabled() + .withPermissionControllerConnectedToTestDapp() + .build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + dapp: true, + }, + async ({ driver, ganacheServer }) => { + await unlockWallet(driver); + + await createRedesignedMultipleTransactions(driver, TRANSACTION_COUNT); + + // reject transactions + await driver.clickElement({ text: 'Reject all', tag: 'button' }); + + await driver.switchToWindowWithTitle( + WINDOW_TITLES.ExtensionInFullScreenView, + ); + await locateAccountBalanceDOM(driver, ganacheServer); + }, + ); }); -} +}); async function createRedesignedMultipleTransactions(driver, count) { for (let i = 0; i < count; i++) { diff --git a/test/e2e/tests/transaction/send-edit.spec.js b/test/e2e/tests/transaction/send-edit.spec.js index 2180d65b3ec4..bdf044bde36e 100644 --- a/test/e2e/tests/transaction/send-edit.spec.js +++ b/test/e2e/tests/transaction/send-edit.spec.js @@ -8,362 +8,183 @@ const { withFixtures, unlockWallet, generateGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); describe('Editing Confirm Transaction', function () { - describe('Old confirmation screens', function () { - it('goes back from confirm page to edit eth value, gas price and gas limit', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().withConversionRateDisabled().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); - await createInternalTransaction(driver); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1', - }); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1.000042', - }); - - await driver.clickElement( - '.confirm-page-container-header__back-button', - ); - - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press('2'); - await inputAmount.press('.'); - await inputAmount.press('2'); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - await driver.clickElement({ text: 'Edit', tag: 'button' }); - - const [gasLimitInput, gasPriceInput] = await driver.findElements( - 'input[type="number"]', - ); - await gasPriceInput.fill('8'); - await gasLimitInput.fill('100000'); - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.0008', - }); - await driver.waitForSelector({ - css: '.currency-display-component__suffix', - text: 'ETH', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('goes back from confirm page to edit eth value, baseFee, priorityFee and gas limit - 1559 V2', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().withConversionRateDisabled().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1', - }); - - await driver.findElement({ - css: '.currency-display-component__text', - text: '1.00043983', - }); - - await driver.clickElement( - '.confirm-page-container-header__back-button', - ); - - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press('2'); - await inputAmount.press('.'); - await inputAmount.press('2'); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // open gas fee popover - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - - await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); - - // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8'); - - // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8'); - - // edit gas limit - await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); - - // save default values - await driver.clickElement('input[type="checkbox"]'); - - // Submit gas fee changes - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.0008', - }); - await driver.waitForSelector({ - css: '.currency-display-component__suffix', - text: 'ETH', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); + it('goes back from confirm page to edit eth value, gas price and gas limit', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().withConversionRateDisabled().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createInternalTransaction(driver); + + await driver.findElement({ + css: 'h2', + text: '1 ETH', + }); + + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0 ETH', + }); + + await driver.findElement({ + css: '[data-testid="native-currency"]', + text: '$0.07', + }); + + await driver.clickElement( + '[data-testid="wallet-initiated-header-back-button"]', + ); + + const inputAmount = await driver.findElement('input[placeholder="0"]'); + + await inputAmount.press(driver.Key.BACK_SPACE); + await inputAmount.press('2'); + await inputAmount.press('.'); + await inputAmount.press('2'); + + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + + const [gasLimitInput, gasPriceInput] = await driver.findElements( + 'input[type="number"]', + ); + await gasPriceInput.fill('8'); + await gasLimitInput.fill('100000'); + await driver.clickElement({ text: 'Save', tag: 'button' }); + + // has correct updated value on the confirm screen the transaction + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.0008 ETH', + }); + + await driver.findElement({ + css: '[data-testid="native-currency"]', + text: '$1.36', + }); + + // confirms the transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + return confirmedTxes.length === 1; + }, 10000); + + const txValues = await driver.findElements( + '[data-testid="transaction-list-item-primary-currency"]', + ); + assert.equal(txValues.length, 1); + assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); + }, + ); }); - describe('Redesigned confirmation screens', function () { - it('goes back from confirm page to edit eth value, gas price and gas limit', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().withConversionRateDisabled().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: 'h2', - text: '1 ETH', - }); - - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$0.07', - }); - - await driver.clickElement( - '[data-testid="wallet-initiated-header-back-button"]', - ); - - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press('2'); - await inputAmount.press('.'); - await inputAmount.press('2'); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - - const [gasLimitInput, gasPriceInput] = await driver.findElements( - 'input[type="number"]', - ); - await gasPriceInput.fill('8'); - await gasLimitInput.fill('100000'); - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.0008 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$1.36', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); - - it('goes back from confirm page to edit eth value, baseFee, priorityFee and gas limit - 1559 V2', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().withConversionRateDisabled().build(), - ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - // await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await createInternalTransaction(driver); - - await driver.findElement({ - css: 'h2', - text: '1 ETH', - }); - - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.0004 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$0.75', - }); - - await driver.clickElement( - '[data-testid="wallet-initiated-header-back-button"]', - ); - - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press('2'); - await inputAmount.press('.'); - await inputAmount.press('2'); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // open gas fee popover - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - - await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); - - // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8'); - - // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8'); - - // edit gas limit - await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); - - // save default values - await driver.clickElement('input[type="checkbox"]'); - - // Submit gas fee changes - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // has correct updated value on the confirm screen the transaction - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.0008 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$1.36', - }); - - // confirms the transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - - const txValues = await driver.findElements( - '[data-testid="transaction-list-item-primary-currency"]', - ); - assert.equal(txValues.length, 1); - assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); - }, - ); - }); + it('goes back from confirm page to edit eth value, baseFee, priorityFee and gas limit - 1559 V2', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().withConversionRateDisabled().build(), + ganacheOptions: generateGanacheOptions({ hardfork: 'london' }), + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await createInternalTransaction(driver); + + await driver.findElement({ + css: 'h2', + text: '1 ETH', + }); + + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.0004 ETH', + }); + + await driver.findElement({ + css: '[data-testid="native-currency"]', + text: '$0.75', + }); + + await driver.clickElement( + '[data-testid="wallet-initiated-header-back-button"]', + ); + + const inputAmount = await driver.findElement('input[placeholder="0"]'); + + await inputAmount.press(driver.Key.BACK_SPACE); + await inputAmount.press('2'); + await inputAmount.press('.'); + await inputAmount.press('2'); + + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // open gas fee popover + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + + await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); + + // enter max fee + await driver.fill('[data-testid="base-fee-input"]', '8'); + + // enter priority fee + await driver.fill('[data-testid="priority-fee-input"]', '8'); + + // edit gas limit + await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); + await driver.fill('[data-testid="gas-limit-input"]', '100000'); + + // save default values + await driver.clickElement('input[type="checkbox"]'); + + // Submit gas fee changes + await driver.clickElement({ text: 'Save', tag: 'button' }); + + // has correct updated value on the confirm screen the transaction + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.0008 ETH', + }); + + await driver.findElement({ + css: '[data-testid="native-currency"]', + text: '$1.36', + }); + + // confirms the transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', + ); + return confirmedTxes.length === 1; + }, 10000); + + const txValues = await driver.findElements( + '[data-testid="transaction-list-item-primary-currency"]', + ); + assert.equal(txValues.length, 1); + assert.ok(/-2.2\s*ETH/u.test(await txValues[0].getText())); + }, + ); }); }); diff --git a/test/e2e/tests/transaction/send-eth.spec.js b/test/e2e/tests/transaction/send-eth.spec.js index badeb2d88540..7f5d1c198049 100644 --- a/test/e2e/tests/transaction/send-eth.spec.js +++ b/test/e2e/tests/transaction/send-eth.spec.js @@ -9,403 +9,241 @@ const { editGasFeeForm, WINDOW_TITLES, defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const FixtureBuilder = require('../../fixture-builder'); describe('Send ETH', function () { - describe('Old confirmation screens', function () { - describe('from inside MetaMask', function () { - /* eslint-disable-next-line mocha/max-top-level-suites */ - it('finds the transaction in the transactions list using advanced gas modal', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); + describe('from inside MetaMask', function () { + it('finds the transaction in the transactions list using default gas', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + await openActionMenuAndStartSendFlow(driver); + + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); - await tempToggleSettingRedesignedTransactionConfirmations(driver); + const inputAmount = await driver.findElement( + 'input[placeholder="0"]', + ); - await driver.delay(1000); + await inputAmount.press('1'); + await inputAmount.press('0'); + await inputAmount.press('0'); + await inputAmount.press('0'); - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', - ); + await driver.findElement({ + css: '[data-testid="send-page-amount-error"]', + text: '. Insufficient funds.', + }); - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - await inputAmount.press('1'); + await inputAmount.press(driver.Key.BACK_SPACE); + await inputAmount.press(driver.Key.BACK_SPACE); + await inputAmount.press(driver.Key.BACK_SPACE); - const inputValue = await inputAmount.getProperty('value'); - assert.equal(inputValue, '1'); + await driver.assertElementNotPresent('.send-v2__error-amount', { + waitAtLeastGuard: 100, // A waitAtLeastGuard of 100ms is the best choice here + }); - // Continue to next screen - await driver.clickElement({ text: 'Continue', tag: 'button' }); + const amountMax = await driver.findClickableElement( + '[data-testid="max-clear-button"]', + ); + await amountMax.click(); - await driver.delay(1000); - const transactionAmounts = await driver.findElements( - '.currency-display-component__text', - ); - const transactionAmount = transactionAmounts[0]; - assert.equal(await transactionAmount.getText(), '1'); + let inputValue = await inputAmount.getProperty('value'); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); + assert(Number(inputValue) > 24); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); + await amountMax.click(); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1 ETH', - }); - }, - ); - }); + assert.equal(await inputAmount.isEnabled(), true); - describe('from dapp using advanced gas controls', function () { - it('should display the correct gas price on the legacy transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // initiates a send from the dapp - await openDapp(driver); - await driver.clickElement({ text: 'Send', tag: 'button' }); - const windowHandles = await driver.waitUntilXWindowHandles(3); - const extension = windowHandles[0]; - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - await driver.assertElementNotPresent( - { text: 'Data', tag: 'li' }, - { findElementGuard: { text: 'Estimated gas fee', tag: 'h6' } }, // make sure the Dialog has loaded - ); - - await driver.clickElement({ text: 'Edit', tag: 'button' }); - await driver.waitForSelector({ - text: '0.00021 ETH', - }); - await driver.clickElement({ - text: 'Edit suggested gas fee', - tag: 'button', - }); - await driver.waitForSelector({ - text: 'Edit priority', - tag: 'header', - }); - await editGasFeeForm(driver, '21000', '100'); - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(1) h6:nth-of-type(2)', - text: '0.0021 ETH', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - - // finds the transaction in the transactions list - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-0 ETH', - }); - - // the transaction has the expected gas price - await driver.clickElement( - '[data-testid="transaction-list-item-primary-currency"]', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-breakdown__gas-price"]', - text: '100', - }); - }, - ); - }); - - it('should display correct gas values for EIP-1559 transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - hardfork: 'london', - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - await driver.clickElement({ - text: 'Create Token', - tag: 'button', - }); - const windowHandles = await driver.waitUntilXWindowHandles(3); - - const extension = windowHandles[0]; - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - await driver.assertElementNotPresent( - { text: 'Data', tag: 'li' }, - { findElementGuard: { text: 'Estimated fee' } }, // make sure the Dialog has loaded - ); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-custom"]', - ); - - const baseFeeInput = await driver.findElement( - '[data-testid="base-fee-input"]', - ); - await baseFeeInput.fill('25'); - const priorityFeeInput = await driver.findElement( - '[data-testid="priority-fee-input"]', - ); - await priorityFeeInput.fill('1'); - - await driver.clickElement({ text: 'Save', tag: 'button' }); - - await driver.waitForSelector({ - css: '.currency-display-component__text', - text: '0.0550741', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - - // Identify the transaction in the transactions list - await driver.waitForSelector( - '[data-testid="eth-overview__primary-currency"]', - ); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-0 ETH', - }); - - // the transaction has the expected gas value - await driver.clickElement( - '[data-testid="transaction-list-item-primary-currency"]', - ); - - await driver.waitForSelector({ - xpath: "//div[contains(text(), 'Base fee')]", - }); - - const allFeeValues = await driver.findElements( - '.currency-display-component__text', - ); - - /** - * Below lines check that fee values are numeric. - * Because these values change for every e2e run, - * It's better to just check that the values are there and are numeric - */ - assert.equal(allFeeValues.length > 0, true); - - allFeeValues.forEach(async (feeValue) => { - assert.equal(/\d+\.?\d*/u.test(await feeValue.getText()), true); - }); - }, - ); - }); - }); + await inputAmount.fill('1'); - describe('to non-contract address with data that matches ERC20 transfer data signature', function () { - it('renders the correct recipient on the confirmation screen', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .withPreferencesControllerPetnamesDisabled() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await driver.assertElementNotPresent('.loading-overlay__spinner'); - const balance = await driver.findElement( - '[data-testid="eth-overview__primary-currency"]', - ); - assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - ); - - await driver.fill( - 'textarea[placeholder="Optional', - '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', - ); - - await driver.findClickableElement({ - text: 'Continue', - tag: 'button', - }); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - await driver.findClickableElement( - '[data-testid="sender-to-recipient__name"]', - ); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - const recipientAddress = await driver.findElements({ - text: '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - }); - - assert.equal(recipientAddress.length, 1); - }, - ); - }); - }); - }); - }); + inputValue = await inputAmount.getProperty('value'); + assert.equal(inputValue, '1'); - describe('Redesigned confirmation screens', function () { - describe('from inside MetaMask', function () { - it('finds the transaction in the transactions list using default gas', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); + // Continue to next screen + await driver.clickElement({ text: 'Continue', tag: 'button' }); - await openActionMenuAndStartSendFlow(driver); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); + return confirmedTxes.length === 1; + }, 10000); + + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-1 ETH', + }); + }, + ); + }); - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); + /* eslint-disable-next-line mocha/max-top-level-suites */ + it('finds the transaction in the transactions list using advanced gas modal', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await driver.delay(1000); + + await openActionMenuAndStartSendFlow(driver); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + ); - await inputAmount.press('1'); - await inputAmount.press('0'); - await inputAmount.press('0'); - await inputAmount.press('0'); + const inputAmount = await driver.findElement( + 'input[placeholder="0"]', + ); + await inputAmount.press('1'); - await driver.findElement({ - css: '[data-testid="send-page-amount-error"]', - text: '. Insufficient funds.', - }); + const inputValue = await inputAmount.getProperty('value'); + assert.equal(inputValue, '1'); - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press(driver.Key.BACK_SPACE); - await inputAmount.press(driver.Key.BACK_SPACE); + // Continue to next screen + await driver.clickElement({ text: 'Continue', tag: 'button' }); - await driver.assertElementNotPresent('.send-v2__error-amount', { - waitAtLeastGuard: 100, // A waitAtLeastGuard of 100ms is the best choice here - }); + await driver.delay(1000); + + // Transaction Amount + await driver.findElement({ + css: 'h2', + text: '1 ETH', + }); - const amountMax = await driver.findClickableElement( - '[data-testid="max-clear-button"]', + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + + await driver.wait(async () => { + const confirmedTxes = await driver.findElements( + '.transaction-list__completed-transactions .activity-list-item', ); - await amountMax.click(); + return confirmedTxes.length === 1; + }, 10000); + + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-1 ETH', + }); + }, + ); + }); - let inputValue = await inputAmount.getProperty('value'); + it('finds the transaction in the transactions list when sending to a Multisig Address', async function () { + const smartContract = SMART_CONTRACTS.MULTISIG; + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: { + ...defaultGanacheOptions, + hardfork: 'london', + }, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); - assert(Number(inputValue) > 24); + // Wait for balance to load + await driver.delay(500); - await amountMax.click(); + await driver.clickElement('[data-testid="eth-overview-send"]'); + await driver.clickElement({ text: 'Account 1', tag: 'button' }); - assert.equal(await inputAmount.isEnabled(), true); + const inputAmount = await driver.findElement( + 'input[placeholder="0"]', + ); + await inputAmount.sendKeys('1'); - await inputAmount.fill('1'); + // Continue to next screen + await driver.clickElement({ text: 'Continue', tag: 'button' }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); - inputValue = await inputAmount.getProperty('value'); - assert.equal(inputValue, '1'); + // Go back to home screen to check txn + const balance = await driver.findElement( + '[data-testid="eth-overview__primary-currency"]', + ); - // Continue to next screen - await driver.clickElement({ text: 'Continue', tag: 'button' }); + assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); + await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item', + ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1 ETH', - }); - }, - ); - }); + // The previous findElement already serves as the guard here for the assertElementNotPresent + await driver.assertElementNotPresent( + '.transaction-status-label--failed', + ); + }, + ); + }); + + it('shows no error when cancel transaction when sending via QR code', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + await driver.assertElementNotPresent('.loading-overlay__spinner'); + const balance = await driver.findElement( + '[data-testid="eth-overview__primary-currency"]', + ); + assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); + + await openActionMenuAndStartSendFlow(driver); + // choose to scan via QR code + await driver.clickElement('[data-testid="ens-qr-scan-button"]'); + await driver.findVisibleElement('[data-testid="qr-scanner-modal"]'); + // cancel action will close the dialog and shut down camera initialization + await driver.waitForSelector({ + css: '.qr-scanner__error', + text: "We couldn't access your camera. Please give it another try.", + }); + await driver.clickElement({ text: 'Cancel', tag: 'button' }); + await driver.assertElementNotPresent( + '[data-testid="qr-scanner-modal"]', + ); + }, + ); + }); - /* eslint-disable-next-line mocha/max-top-level-suites */ - it('finds the transaction in the transactions list using advanced gas modal', async function () { + describe('from dapp using advanced gas controls', function () { + it('should display the correct gas price on the legacy transaction', async function () { await withFixtures( { - fixtures: new FixtureBuilder().build(), + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), ganacheOptions: defaultGanacheOptions, defaultGanacheOptions, title: this.test.fullTitle(), @@ -413,107 +251,183 @@ describe('Send ETH', function () { async ({ driver }) => { await unlockWallet(driver); - await driver.delay(1000); - - await openActionMenuAndStartSendFlow(driver); - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0x2f318C334780961FB129D2a6c30D0763d9a5C970', + // initiates a send from the dapp + await openDapp(driver); + await driver.clickElement({ text: 'Send', tag: 'button' }); + const windowHandles = await driver.waitUntilXWindowHandles(3); + const extension = windowHandles[0]; + await driver.switchToWindowWithTitle( + WINDOW_TITLES.Dialog, + windowHandles, ); - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', - ); - await inputAmount.press('1'); - - const inputValue = await inputAmount.getProperty('value'); - assert.equal(inputValue, '1'); - - // Continue to next screen - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - await driver.delay(1000); + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.waitForSelector({ + text: '0.00021 ETH', + }); + await driver.clickElement({ + text: 'Edit suggested gas fee', + tag: 'button', + }); + await driver.waitForSelector({ + text: 'Edit priority', + tag: 'header', + }); + await editGasFeeForm(driver, '21000', '100'); + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.0021 ETH', + }); - // Transaction Amount await driver.findElement({ - css: 'h2', - text: '1 ETH', + css: '[data-testid="native-currency"]', + text: '$3.57', }); await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.waitUntilXWindowHandles(2); + await driver.switchToWindow(extension); - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .activity-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - + // finds the transaction in the transactions list + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.waitForSelector( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); await driver.waitForSelector({ css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-1 ETH', + text: '-0 ETH', + }); + + // the transaction has the expected gas price + await driver.clickElement( + '[data-testid="transaction-list-item-primary-currency"]', + ); + await driver.waitForSelector({ + css: '[data-testid="transaction-breakdown__gas-price"]', + text: '100', }); }, ); }); - it('finds the transaction in the transactions list when sending to a Multisig Address', async function () { - const smartContract = SMART_CONTRACTS.MULTISIG; + it('should display correct gas values for EIP-1559 transaction', async function () { await withFixtures( { - fixtures: new FixtureBuilder().build(), + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDapp() + .build(), ganacheOptions: { ...defaultGanacheOptions, hardfork: 'london', }, - smartContract, title: this.test.fullTitle(), }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); + async ({ driver }) => { + await unlockWallet(driver); - // Wait for balance to load - await driver.delay(500); + // initiates a transaction from the dapp + await openDapp(driver); + await driver.clickElement({ + text: 'Create Token', + tag: 'button', + }); + const windowHandles = await driver.waitUntilXWindowHandles(3); - await driver.clickElement('[data-testid="eth-overview-send"]'); - await driver.clickElement({ text: 'Account 1', tag: 'button' }); + const extension = windowHandles[0]; + await driver.switchToWindowWithTitle( + WINDOW_TITLES.Dialog, + windowHandles, + ); - const inputAmount = await driver.findElement( - 'input[placeholder="0"]', + await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); + await driver.clickElement( + '[data-testid="edit-gas-fee-item-custom"]', ); - await inputAmount.sendKeys('1'); - // Continue to next screen - await driver.clickElement({ text: 'Continue', tag: 'button' }); + const baseFeeInput = await driver.findElement( + '[data-testid="base-fee-input"]', + ); + await baseFeeInput.fill('25'); + const priorityFeeInput = await driver.findElement( + '[data-testid="priority-fee-input"]', + ); + await priorityFeeInput.fill('1'); + + await driver.clickElement({ text: 'Save', tag: 'button' }); + + await driver.findElement({ + css: '[data-testid="first-gas-field"]', + text: '0.045 ETH', + }); + + await driver.findElement({ + css: '[data-testid="native-currency"]', + text: '$76.57', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.waitUntilXWindowHandles(2); + await driver.switchToWindow(extension); - // Go back to home screen to check txn - const balance = await driver.findElement( + // Identify the transaction in the transactions list + await driver.waitForSelector( '[data-testid="eth-overview__primary-currency"]', ); - assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); - await driver.clickElement( '[data-testid="account-overview__activity-tab"]', ); + await driver.waitForSelector( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + await driver.waitForSelector({ + css: '[data-testid="transaction-list-item-primary-currency"]', + text: '-0 ETH', + }); - await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item', + // the transaction has the expected gas value + await driver.clickElement( + '[data-testid="transaction-list-item-primary-currency"]', ); - // The previous findElement already serves as the guard here for the assertElementNotPresent - await driver.assertElementNotPresent( - '.transaction-status-label--failed', + await driver.waitForSelector({ + xpath: "//div[contains(text(), 'Base fee')]", + }); + + const allFeeValues = await driver.findElements( + '.currency-display-component__text', ); + + /** + * Below lines check that fee values are numeric. + * Because these values change for every e2e run, + * It's better to just check that the values are there and are numeric + */ + assert.equal(allFeeValues.length > 0, true); + + allFeeValues.forEach(async (feeValue) => { + assert.equal(/\d+\.?\d*/u.test(await feeValue.getText()), true); + }); }, ); }); + }); - it('shows no error when cancel transaction when sending via QR code', async function () { + describe('to non-contract address with data that matches ERC20 transfer data signature', function () { + it('renders the correct recipient on the confirmation screen', async function () { await withFixtures( { - fixtures: new FixtureBuilder().build(), + fixtures: new FixtureBuilder() + .withPreferencesController({ + featureFlags: { + sendHexData: true, + }, + }) + .withPreferencesControllerPetnamesDisabled() + .build(), ganacheOptions: defaultGanacheOptions, title: this.test.fullTitle(), }, @@ -527,254 +441,32 @@ describe('Send ETH', function () { assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); await openActionMenuAndStartSendFlow(driver); - // choose to scan via QR code - await driver.clickElement('[data-testid="ens-qr-scan-button"]'); - await driver.findVisibleElement('[data-testid="qr-scanner-modal"]'); - // cancel action will close the dialog and shut down camera initialization - await driver.waitForSelector({ - css: '.qr-scanner__error', - text: "We couldn't access your camera. Please give it another try.", - }); - await driver.clickElement({ text: 'Cancel', tag: 'button' }); - await driver.assertElementNotPresent( - '[data-testid="qr-scanner-modal"]', - ); - }, - ); - }); - - describe('from dapp using advanced gas controls', function () { - it('should display the correct gas price on the legacy transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: defaultGanacheOptions, - defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // initiates a send from the dapp - await openDapp(driver); - await driver.clickElement({ text: 'Send', tag: 'button' }); - const windowHandles = await driver.waitUntilXWindowHandles(3); - const extension = windowHandles[0]; - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.waitForSelector({ - text: '0.00021 ETH', - }); - await driver.clickElement({ - text: 'Edit suggested gas fee', - tag: 'button', - }); - await driver.waitForSelector({ - text: 'Edit priority', - tag: 'header', - }); - await editGasFeeForm(driver, '21000', '100'); - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.0021 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$3.57', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - - // finds the transaction in the transactions list - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-0 ETH', - }); - - // the transaction has the expected gas price - await driver.clickElement( - '[data-testid="transaction-list-item-primary-currency"]', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-breakdown__gas-price"]', - text: '100', - }); - }, - ); - }); - - it('should display correct gas values for EIP-1559 transaction', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .build(), - ganacheOptions: { - ...defaultGanacheOptions, - hardfork: 'london', - }, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - // initiates a transaction from the dapp - await openDapp(driver); - await driver.clickElement({ - text: 'Create Token', - tag: 'button', - }); - const windowHandles = await driver.waitUntilXWindowHandles(3); - - const extension = windowHandles[0]; - await driver.switchToWindowWithTitle( - WINDOW_TITLES.Dialog, - windowHandles, - ); - - await driver.clickElement('[data-testid="edit-gas-fee-icon"]'); - await driver.clickElement( - '[data-testid="edit-gas-fee-item-custom"]', - ); - - const baseFeeInput = await driver.findElement( - '[data-testid="base-fee-input"]', - ); - await baseFeeInput.fill('25'); - const priorityFeeInput = await driver.findElement( - '[data-testid="priority-fee-input"]', - ); - await priorityFeeInput.fill('1'); - - await driver.clickElement({ text: 'Save', tag: 'button' }); - - await driver.findElement({ - css: '[data-testid="first-gas-field"]', - text: '0.045 ETH', - }); - - await driver.findElement({ - css: '[data-testid="native-currency"]', - text: '$76.57', - }); - - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.waitUntilXWindowHandles(2); - await driver.switchToWindow(extension); - - // Identify the transaction in the transactions list - await driver.waitForSelector( - '[data-testid="eth-overview__primary-currency"]', - ); - - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.waitForSelector( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await driver.waitForSelector({ - css: '[data-testid="transaction-list-item-primary-currency"]', - text: '-0 ETH', - }); - - // the transaction has the expected gas value - await driver.clickElement( - '[data-testid="transaction-list-item-primary-currency"]', - ); - - await driver.waitForSelector({ - xpath: "//div[contains(text(), 'Base fee')]", - }); - - const allFeeValues = await driver.findElements( - '.currency-display-component__text', - ); - - /** - * Below lines check that fee values are numeric. - * Because these values change for every e2e run, - * It's better to just check that the values are there and are numeric - */ - assert.equal(allFeeValues.length > 0, true); - - allFeeValues.forEach(async (feeValue) => { - assert.equal(/\d+\.?\d*/u.test(await feeValue.getText()), true); - }); - }, - ); - }); - }); - describe('to non-contract address with data that matches ERC20 transfer data signature', function () { - it('renders the correct recipient on the confirmation screen', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesController({ - featureFlags: { - sendHexData: true, - }, - }) - .withPreferencesControllerPetnamesDisabled() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver }) => { - await unlockWallet(driver); - - await driver.assertElementNotPresent('.loading-overlay__spinner'); - const balance = await driver.findElement( - '[data-testid="eth-overview__primary-currency"]', - ); - assert.ok(/^[\d.]+\sETH$/u.test(await balance.getText())); - - await openActionMenuAndStartSendFlow(driver); - - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - ); + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + '0xc427D562164062a23a5cFf596A4a3208e72Acd28', + ); - await driver.fill( - 'textarea[placeholder="Optional', - '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', - ); + await driver.fill( + 'textarea[placeholder="Optional', + '0xa9059cbb0000000000000000000000002f318C334780961FB129D2a6c30D0763d9a5C970000000000000000000000000000000000000000000000000000000000000000a', + ); - await driver.findClickableElement({ - text: 'Continue', - tag: 'button', - }); - await driver.clickElement({ text: 'Continue', tag: 'button' }); + await driver.findClickableElement({ + text: 'Continue', + tag: 'button', + }); + await driver.clickElement({ text: 'Continue', tag: 'button' }); - await driver.clickElement('[data-testid="recipient-address"]'); + await driver.clickElement('[data-testid="recipient-address"]'); - const recipientAddress = await driver.findElements({ - text: '0xc427D562164062a23a5cFf596A4a3208e72Acd28', - }); + const recipientAddress = await driver.findElements({ + text: '0xc427D562164062a23a5cFf596A4a3208e72Acd28', + }); - assert.equal(recipientAddress.length, 1); - }, - ); - }); + assert.equal(recipientAddress.length, 1); + }, + ); }); }); }); diff --git a/test/e2e/tests/transaction/send-hex-address.spec.js b/test/e2e/tests/transaction/send-hex-address.spec.js index 64522c706f6b..f67f840c1688 100644 --- a/test/e2e/tests/transaction/send-hex-address.spec.js +++ b/test/e2e/tests/transaction/send-hex-address.spec.js @@ -3,7 +3,6 @@ const { withFixtures, logInWithBalanceValidation, openActionMenuAndStartSendFlow, - tempToggleSettingRedesignedTransactionConfirmations, } = require('../../helpers'); const { SMART_CONTRACTS } = require('../../seeder/smart-contracts'); const FixtureBuilder = require('../../fixture-builder'); @@ -11,377 +10,226 @@ const FixtureBuilder = require('../../fixture-builder'); const hexPrefixedAddress = '0x2f318C334780961FB129D2a6c30D0763d9a5C970'; const nonHexPrefixedAddress = hexPrefixedAddress.substring(2); -describe('Old confirmation screens', function () { - describe('Send ERC20 to a 40 character hexadecimal address', function () { - const smartContract = SMART_CONTRACTS.HST; - - it('should ensure the address is prefixed with 0x when pasted and should send TST to a valid hexadecimal address', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Send TST - await driver.clickElement( - '[data-testid="account-overview__asset-tab"]', - ); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - await driver.clickElement('[data-testid="coin-overview-send"]'); - // Paste address without hex prefix - await driver.pasteIntoField( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.findElement({ - css: '.confirm-page-container-summary__title', - text: '0', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - const sendTransactionListItem = await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await sendTransactionListItem.click(); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); - - it('should ensure the address is prefixed with 0x when typed and should send TST to a valid hexadecimal address', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - // Send TST - await driver.clickElement( - '[data-testid="account-overview__asset-tab"]', - ); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - await driver.clickElement('[data-testid="coin-overview-send"]'); - - // Type address without hex prefix - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.findElement({ - css: '.confirm-page-container-summary__title', - text: '0', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - const sendTransactionListItem = await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await sendTransactionListItem.click(); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); +describe('Send ETH to a 40 character hexadecimal address', function () { + it('should ensure the address is prefixed with 0x when pasted and should send ETH to a valid hexadecimal address', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerPetnamesDisabled() + .build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Send ETH + await openActionMenuAndStartSendFlow(driver); + // Paste address without hex prefix + await driver.pasteIntoField( + 'input[placeholder="Enter public address (0x) or domain name"]', + nonHexPrefixedAddress, + ); + await driver.findElement({ + css: '.ens-input__selected-input__title', + text: '0x2f318...5C970', + }); + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // Confirm transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + const sendTransactionListItem = await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item', + ); + await sendTransactionListItem.click(); + await driver.clickElement({ text: 'Activity log', tag: 'summary' }); + await driver.clickElement('[data-testid="sender-to-recipient__name"]'); + + // Verify address in activity log + await driver.findElement({ + css: '.nickname-popover__public-address', + text: hexPrefixedAddress, + }); + }, + ); + }); - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); + it('should ensure the address is prefixed with 0x when typed and should send ETH to a valid hexadecimal address', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder() + .withPreferencesControllerPetnamesDisabled() + .build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Send ETH + await openActionMenuAndStartSendFlow(driver); + // Type address without hex prefix + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + nonHexPrefixedAddress, + ); + await driver.findElement({ + css: '.ens-input__selected-input__title', + text: '0x2f318...5C970', + }); + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // Confirm transaction + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.clickElement( + '.transaction-list__completed-transactions .activity-list-item', + ); + await driver.clickElement({ text: 'Activity log', tag: 'summary' }); + await driver.clickElement('[data-testid="sender-to-recipient__name"]'); + + // Verify address in activity log + await driver.findElement({ + css: '.nickname-popover__public-address', + text: hexPrefixedAddress, + }); + }, + ); }); }); -describe('Redesigned confirmation screens', function () { - describe('Send ETH to a 40 character hexadecimal address', function () { - it('should ensure the address is prefixed with 0x when pasted and should send ETH to a valid hexadecimal address', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Send ETH - await openActionMenuAndStartSendFlow(driver); - // Paste address without hex prefix - await driver.pasteIntoField( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - const sendTransactionListItem = await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item', - ); - await sendTransactionListItem.click(); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); - - it('should ensure the address is prefixed with 0x when typed and should send ETH to a valid hexadecimal address', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .build(), - ganacheOptions: defaultGanacheOptions, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Send ETH - await openActionMenuAndStartSendFlow(driver); - // Type address without hex prefix - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.clickElement( - '.transaction-list__completed-transactions .activity-list-item', - ); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); +describe('Send ERC20 to a 40 character hexadecimal address', function () { + const smartContract = SMART_CONTRACTS.HST; + + it('should ensure the address is prefixed with 0x when pasted and should send TST to a valid hexadecimal address', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPreferencesControllerPetnamesDisabled() + .withTokensControllerERC20() + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Send TST + await driver.clickElement( + '[data-testid="account-overview__asset-tab"]', + ); + await driver.clickElement( + '[data-testid="multichain-token-list-button"]', + ); + await driver.clickElement('[data-testid="coin-overview-send"]'); + // Paste address without hex prefix + await driver.pasteIntoField( + 'input[placeholder="Enter public address (0x) or domain name"]', + nonHexPrefixedAddress, + ); + await driver.findElement({ + css: '.ens-input__selected-input__title', + text: '0x2f318...5C970', + }); + + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // Confirm transaction + await driver.findElement({ + css: 'h2', + text: '0 ETH', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + const sendTransactionListItem = await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + await sendTransactionListItem.click(); + await driver.clickElement({ text: 'Activity log', tag: 'summary' }); + await driver.clickElement('[data-testid="sender-to-recipient__name"]'); + + // Verify address in activity log + await driver.findElement({ + css: '.nickname-popover__public-address', + text: hexPrefixedAddress, + }); + }, + ); }); - describe('Send ERC20 to a 40 character hexadecimal address', function () { - const smartContract = SMART_CONTRACTS.HST; - - it('should ensure the address is prefixed with 0x when pasted and should send TST to a valid hexadecimal address', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Send TST - await driver.clickElement( - '[data-testid="account-overview__asset-tab"]', - ); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - await driver.clickElement('[data-testid="coin-overview-send"]'); - // Paste address without hex prefix - await driver.pasteIntoField( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.findElement({ - css: 'h2', - text: '0 ETH', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - const sendTransactionListItem = await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await sendTransactionListItem.click(); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); - - it('should ensure the address is prefixed with 0x when typed and should send TST to a valid hexadecimal address', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPreferencesControllerPetnamesDisabled() - .withTokensControllerERC20() - .build(), - ganacheOptions: defaultGanacheOptions, - smartContract, - title: this.test.fullTitle(), - }, - async ({ driver, ganacheServer }) => { - await logInWithBalanceValidation(driver, ganacheServer); - - // Send TST - await driver.clickElement( - '[data-testid="account-overview__asset-tab"]', - ); - await driver.clickElement( - '[data-testid="multichain-token-list-button"]', - ); - await driver.clickElement('[data-testid="coin-overview-send"]'); - - // Type address without hex prefix - await driver.fill( - 'input[placeholder="Enter public address (0x) or domain name"]', - nonHexPrefixedAddress, - ); - await driver.findElement({ - css: '.ens-input__selected-input__title', - text: '0x2f318...5C970', - }); - - await driver.clickElement({ text: 'Continue', tag: 'button' }); - - // Confirm transaction - await driver.findElement({ - css: 'h2', - text: '0 ETH', - }); - await driver.clickElement({ text: 'Confirm', tag: 'button' }); - await driver.clickElement( - '[data-testid="account-overview__activity-tab"]', - ); - await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - const sendTransactionListItem = await driver.findElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - await sendTransactionListItem.click(); - await driver.clickElement({ text: 'Activity log', tag: 'summary' }); - await driver.clickElement( - '[data-testid="sender-to-recipient__name"]', - ); - - // Verify address in activity log - await driver.findElement({ - css: '.nickname-popover__public-address', - text: hexPrefixedAddress, - }); - }, - ); - }); + it('should ensure the address is prefixed with 0x when typed and should send TST to a valid hexadecimal address', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPreferencesControllerPetnamesDisabled() + .withTokensControllerERC20() + .build(), + ganacheOptions: defaultGanacheOptions, + smartContract, + title: this.test.fullTitle(), + }, + async ({ driver, ganacheServer }) => { + await logInWithBalanceValidation(driver, ganacheServer); + + // Send TST + await driver.clickElement( + '[data-testid="account-overview__asset-tab"]', + ); + await driver.clickElement( + '[data-testid="multichain-token-list-button"]', + ); + await driver.clickElement('[data-testid="coin-overview-send"]'); + + // Type address without hex prefix + await driver.fill( + 'input[placeholder="Enter public address (0x) or domain name"]', + nonHexPrefixedAddress, + ); + await driver.findElement({ + css: '.ens-input__selected-input__title', + text: '0x2f318...5C970', + }); + + await driver.clickElement({ text: 'Continue', tag: 'button' }); + + // Confirm transaction + await driver.findElement({ + css: 'h2', + text: '0 ETH', + }); + await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.clickElement( + '[data-testid="account-overview__activity-tab"]', + ); + await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + const sendTransactionListItem = await driver.findElement( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + await sendTransactionListItem.click(); + await driver.clickElement({ text: 'Activity log', tag: 'summary' }); + await driver.clickElement('[data-testid="sender-to-recipient__name"]'); + + // Verify address in activity log + await driver.findElement({ + css: '.nickname-popover__public-address', + text: hexPrefixedAddress, + }); + }, + ); }); }); diff --git a/test/e2e/tests/transaction/simple-send.spec.ts b/test/e2e/tests/transaction/simple-send.spec.ts deleted file mode 100644 index 9ac091744974..000000000000 --- a/test/e2e/tests/transaction/simple-send.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Suite } from 'mocha'; -import { Driver } from '../../webdriver/driver'; -import { Ganache } from '../../seeder/ganache'; -import { - withFixtures, - defaultGanacheOptions, - tempToggleSettingRedesignedTransactionConfirmations, -} from '../../helpers'; -import FixtureBuilder from '../../fixture-builder'; -import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow'; -import { sendTransactionToAddress } from '../../page-objects/flows/send-transaction.flow'; -import ActivityListPage from '../../page-objects/pages/home/activity-list'; -import HomePage from '../../page-objects/pages/home/homepage'; - -describe('Simple send eth', function (this: Suite) { - it('can send a simple transaction from one account to another', async function () { - await withFixtures( - { - fixtures: new FixtureBuilder().build(), - ganacheOptions: defaultGanacheOptions, - title: this.test?.fullTitle(), - }, - async ({ - driver, - ganacheServer, - }: { - driver: Driver; - ganacheServer?: Ganache; - }) => { - await loginWithBalanceValidation(driver, ganacheServer); - - await tempToggleSettingRedesignedTransactionConfirmations(driver); - - await sendTransactionToAddress({ - driver, - recipientAddress: '0x985c30949c92df7a0bd42e0f3e3d539ece98db24', - amount: '1', - gasFee: '0.000042', - totalFee: '1.000042', - }); - const homePage = new HomePage(driver); - await homePage.check_pageIsLoaded(); - const activityList = new ActivityListPage(driver); - await activityList.check_confirmedTxNumberDisplayedInActivity(); - await activityList.check_txAmountInActivity(); - }, - ); - }); -}); diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index adb3102da571..b7a11a1df8f4 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -485,14 +485,6 @@ const SETTINGS_CONSTANTS = [ route: `${EXPERIMENTAL_ROUTE}#redesigned-confirmations`, icon: 'fas fa-flask', }, - // experimental settingsRefs[3] - { - tabMessage: (t) => t('experimental'), - sectionMessage: (t) => t('redesignedTransactionsEnabledToggle'), - descriptionMessage: (t) => t('redesignedTransactionsToggleDescription'), - route: `${EXPERIMENTAL_ROUTE}#redesigned-transactions`, - icon: 'fas fa-flask', - }, ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) // since this route is only included with keyring-snaps feature flag, this needs to be the last settingsRef for the experimental tab // experimental settingsRefs[4] diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js index 30af3ee6b9da..2c67ca598996 100644 --- a/ui/helpers/utils/settings-search.test.js +++ b/ui/helpers/utils/settings-search.test.js @@ -186,7 +186,7 @@ describe('Settings Search Utils', () => { it('returns "Experimental" section count', () => { expect(getNumberOfSettingRoutesInTab(t, t('experimental'))).toStrictEqual( - 5, + 4, ); }); diff --git a/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts b/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts index 8c66873d448c..3f85ee769b0c 100644 --- a/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts +++ b/ui/pages/confirmations/hooks/useCurrentConfirmation.test.ts @@ -56,7 +56,6 @@ function buildState({ message, pendingApprovals, redesignedConfirmationsEnabled, - redesignedTransactionsEnabled, transaction, isRedesignedConfirmationsDeveloperEnabled, }: { @@ -64,7 +63,6 @@ function buildState({ message?: Partial; pendingApprovals?: Partial>>[]; redesignedConfirmationsEnabled?: boolean; - redesignedTransactionsEnabled?: boolean; transaction?: Partial; isRedesignedConfirmationsDeveloperEnabled?: boolean; }) { @@ -74,7 +72,6 @@ function buildState({ ...mockState.metamask, pendingApprovals: pendingApprovals ? arrayToIdMap(pendingApprovals) : {}, preferences: { - redesignedTransactionsEnabled, redesignedConfirmationsEnabled, isRedesignedConfirmationsDeveloperEnabled: isRedesignedConfirmationsDeveloperEnabled || false, @@ -166,18 +163,6 @@ describe('useCurrentConfirmation', () => { expect(currentConfirmation).toStrictEqual(TRANSACTION_MOCK); }); - it('returns undefined if redesign preference disabled', () => { - const currentConfirmation = runHook({ - message: MESSAGE_MOCK, - pendingApprovals: [APPROVAL_MOCK], - redesignedConfirmationsEnabled: false, - redesignedTransactionsEnabled: false, - isRedesignedConfirmationsDeveloperEnabled: false, - }); - - expect(currentConfirmation).toBeUndefined(); - }); - it('returns undefined if approval for message has incorrect type', () => { const currentConfirmation = runHook({ message: MESSAGE_MOCK, @@ -248,7 +233,7 @@ describe('useCurrentConfirmation', () => { expect(currentConfirmation).toBeUndefined(); }); - it('returns undefined if redesign developer setting and user setting are disabled and transaction has correct type', () => { + it('returns if redesign developer setting is disabled and transaction has correct type', () => { const currentConfirmation = runHook({ pendingApprovals: [{ ...APPROVAL_MOCK, type: ApprovalType.Transaction }], redesignedConfirmationsEnabled: false, @@ -259,7 +244,12 @@ describe('useCurrentConfirmation', () => { isRedesignedConfirmationsDeveloperEnabled: false, }); - expect(currentConfirmation).toBeUndefined(); + expect(currentConfirmation).toEqual({ + chainId: '0x5', + id: '123-456', + status: 'unapproved', + type: 'contractInteraction', + }); }); it('returns if redesign developer and user settings are enabled and transaction has correct type', () => { @@ -300,7 +290,7 @@ describe('useCurrentConfirmation', () => { process.env.ENABLE_CONFIRMATION_REDESIGN = 'true'; }); - it('returns undefined if redesign developer setting is disabled, user setting is enabled and transaction has correct type', () => { + it('returns undefined if redesign developer setting is disabled and transaction has correct type', () => { const currentConfirmation = runHook({ pendingApprovals: [ { ...APPROVAL_MOCK, type: ApprovalType.Transaction }, @@ -313,7 +303,12 @@ describe('useCurrentConfirmation', () => { isRedesignedConfirmationsDeveloperEnabled: false, }); - expect(currentConfirmation).toBeUndefined(); + expect(currentConfirmation).toEqual({ + chainId: '0x5', + id: '123-456', + status: 'unapproved', + type: 'contractInteraction', + }); }); }); }); diff --git a/ui/pages/confirmations/hooks/useCurrentConfirmation.ts b/ui/pages/confirmations/hooks/useCurrentConfirmation.ts index 1771f807de25..c298245a3dbd 100644 --- a/ui/pages/confirmations/hooks/useCurrentConfirmation.ts +++ b/ui/pages/confirmations/hooks/useCurrentConfirmation.ts @@ -7,7 +7,6 @@ import { ApprovalsMetaMaskState, getIsRedesignedConfirmationsDeveloperEnabled, getRedesignedConfirmationsEnabled, - getRedesignedTransactionsEnabled, getUnapprovedTransaction, oldestPendingConfirmationSelector, selectPendingApproval, @@ -35,10 +34,6 @@ const useCurrentConfirmation = () => { getRedesignedConfirmationsEnabled, ); - const isRedesignedTransactionsUserSettingEnabled = useSelector( - getRedesignedTransactionsEnabled, - ); - const isRedesignedConfirmationsDeveloperEnabled = useSelector( getIsRedesignedConfirmationsDeveloperEnabled, ); @@ -64,7 +59,6 @@ const useCurrentConfirmation = () => { const useRedesignedForTransaction = shouldUseRedesignForTransactions({ transactionMetadataType: transactionMetadata?.type, - isRedesignedTransactionsUserSettingEnabled, isRedesignedConfirmationsDeveloperEnabled, }); diff --git a/ui/pages/settings/experimental-tab/experimental-tab.component.tsx b/ui/pages/settings/experimental-tab/experimental-tab.component.tsx index dd985eb469e7..8e008fa4d278 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.component.tsx +++ b/ui/pages/settings/experimental-tab/experimental-tab.component.tsx @@ -54,8 +54,6 @@ type ExperimentalTabProps = { setFeatureNotificationsEnabled: (value: boolean) => void; redesignedConfirmationsEnabled: boolean; setRedesignedConfirmationsEnabled: (value: boolean) => void; - redesignedTransactionsEnabled: boolean; - setRedesignedTransactionsEnabled: (value: boolean) => void; }; export default class ExperimentalTab extends PureComponent { @@ -166,23 +164,6 @@ export default class ExperimentalTab extends PureComponent }); } - renderToggleRedesignedTransactions() { - const { t } = this.context; - const { redesignedTransactionsEnabled, setRedesignedTransactionsEnabled } = - this.props; - - return this.renderToggleSection({ - title: t('redesignedTransactionsEnabledToggle'), - description: t('redesignedTransactionsToggleDescription'), - toggleValue: redesignedTransactionsEnabled, - toggleCallback: (value) => setRedesignedTransactionsEnabled(!value), - toggleContainerDataTestId: 'toggle-redesigned-transactions-container', - toggleDataTestId: 'toggle-redesigned-transactions', - toggleOffLabel: t('off'), - toggleOnLabel: t('on'), - }); - } - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) renderKeyringSnapsToggle() { const { t, trackEvent } = this.context; @@ -404,7 +385,6 @@ export default class ExperimentalTab extends PureComponent

{this.renderTogglePetnames()} {this.renderToggleRedesignedSignatures()} - {this.renderToggleRedesignedTransactions()} {process.env.NOTIFICATIONS ? this.renderNotificationsToggle() : null} {/* Section: Account Management Snaps */} { diff --git a/ui/pages/settings/experimental-tab/experimental-tab.container.ts b/ui/pages/settings/experimental-tab/experimental-tab.container.ts index e656b035dbbf..f2a7bf982241 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.container.ts +++ b/ui/pages/settings/experimental-tab/experimental-tab.container.ts @@ -10,7 +10,6 @@ import { setPetnamesEnabled, setFeatureNotificationsEnabled, setRedesignedConfirmationsEnabled, - setRedesignedTransactionsEnabled, setWatchEthereumAccountEnabled, ///: BEGIN:ONLY_INCLUDE_IF(solana) setSolanaSupportEnabled, @@ -28,7 +27,6 @@ import { getPetnamesEnabled, getFeatureNotificationsEnabled, getRedesignedConfirmationsEnabled, - getRedesignedTransactionsEnabled, getIsWatchEthereumAccountEnabled, } from '../../../selectors'; import type { @@ -53,7 +51,6 @@ const mapStateToProps = (state: MetaMaskReduxState) => { petnamesEnabled, featureNotificationsEnabled, redesignedConfirmationsEnabled: getRedesignedConfirmationsEnabled(state), - redesignedTransactionsEnabled: getRedesignedTransactionsEnabled(state), }; }; @@ -80,8 +77,6 @@ const mapDispatchToProps = (dispatch: MetaMaskReduxDispatch) => { }, setRedesignedConfirmationsEnabled: (value: boolean) => dispatch(setRedesignedConfirmationsEnabled(value)), - setRedesignedTransactionsEnabled: (value: boolean) => - dispatch(setRedesignedTransactionsEnabled(value)), }; }; diff --git a/ui/pages/settings/experimental-tab/experimental-tab.test.js b/ui/pages/settings/experimental-tab/experimental-tab.test.js index cda6b95c0a5d..b0c09f22f402 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.test.js +++ b/ui/pages/settings/experimental-tab/experimental-tab.test.js @@ -30,7 +30,7 @@ describe('ExperimentalTab', () => { const { getAllByRole } = render(); const toggle = getAllByRole('checkbox'); - expect(toggle).toHaveLength(8); + expect(toggle).toHaveLength(7); }); it('enables add account snap', async () => { diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 37a6fdb49f15..61f8c0ffa034 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1243,11 +1243,6 @@ export function getRedesignedConfirmationsEnabled(state) { return redesignedConfirmationsEnabled; } -export function getRedesignedTransactionsEnabled(state) { - const { redesignedTransactionsEnabled } = getPreferences(state); - return redesignedTransactionsEnabled; -} - export function getFeatureNotificationsEnabled(state) { const { featureNotificationsEnabled = false } = getPreferences(state); return featureNotificationsEnabled; diff --git a/ui/store/actions.ts b/ui/store/actions.ts index c2660b8d74d9..889b46e56ae4 100644 --- a/ui/store/actions.ts +++ b/ui/store/actions.ts @@ -3174,10 +3174,6 @@ export function setPrivacyMode(value: boolean) { return setPreference('privacyMode', value, false); } -export function setRedesignedTransactionsEnabled(value: boolean) { - return setPreference('redesignedTransactionsEnabled', value); -} - export function setFeatureNotificationsEnabled(value: boolean) { return setPreference('featureNotificationsEnabled', value); } From 77b7ba4ae91bf6f1c95450d668e93ca3598987dd Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 16 Jan 2025 14:30:49 +0100 Subject: [PATCH 38/65] chore: Bump Snaps packages (#29693) ## **Description** Bump Snaps packages and handle any required changes. Summary of Snaps changes: - Add `snap_getState`, `snap_setState`, `snap_clearState` RPC methods - Add support for non-recurring cronjobs scheduled via `snap_scheduleBackgroundEvent` - Cache snap state in memory for improved performance - Unblock `eth_signTypedData` - Add `hideBalances` property to `snap_getPreferences` - Allow usage of `Text` in `Value` props - Add `backgroundColor` property to `Container` component - Skip unnecesary provider initialization [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29693?quickstart=1) ## **Related issues** Closes https://github.com/MetaMask/snaps/issues/2977 Closes https://github.com/MetaMask/snaps/issues/2906 Closes https://github.com/MetaMask/metamask-extension/issues/29498 Closes https://github.com/MetaMask/metamask-extension/issues/29469 --------- Co-authored-by: Guillaume Roux Co-authored-by: Hassan Malik <41640681+hmalik88@users.noreply.github.com> Co-authored-by: David Drazic Co-authored-by: Maarten Zuidhoorn --- .../patches/luxon-npm-3.2.1-56f8d97395.patch | 40 --- .../controllers/permissions/specifications.js | 8 +- app/scripts/metamask-controller.js | 47 ++- builds.yml | 8 +- lavamoat/browserify/beta/policy.json | 176 ++++++++++- lavamoat/browserify/flask/policy.json | 176 ++++++++++- lavamoat/browserify/main/policy.json | 176 ++++++++++- lavamoat/browserify/mmi/policy.json | 176 ++++++++++- package.json | 16 +- test/e2e/snaps/enums.js | 2 +- test/e2e/snaps/test-snap-cronjob.spec.js | 2 + test/e2e/snaps/test-snap-ethprovider.spec.js | 35 ++- test/e2e/snaps/test-snap-managestate.spec.js | 149 ++++++++- test/e2e/snaps/test-snap-metrics.spec.js | 4 +- ...rs-after-init-opt-in-background-state.json | 2 +- .../errors-after-init-opt-in-ui-state.json | 1 + test/e2e/webdriver/driver.js | 10 +- .../app/confirm/info/row/value-double.tsx | 18 +- .../insight-warnings/insight-warnings.js | 1 + .../snap-home-page/snap-home-renderer.js | 1 - .../app/snaps/snap-insight/snap-insight.js | 2 + .../snap-ui-renderer/components/container.ts | 4 +- .../snap-ui-renderer/components/section.ts | 10 +- .../snap-ui-renderer/components/types.ts | 1 + .../snap-ui-renderer/components/value.ts | 36 ++- .../snap-ui-renderer/snap-ui-renderer.js | 13 +- .../app/snaps/snap-ui-renderer/utils.ts | 16 + .../app/snaps/snap-ui-selector/index.scss | 2 + .../__snapshots__/snaps-section.test.tsx.snap | 4 +- .../snaps/snaps-section/snap-insight.tsx | 2 + .../confirmation/confirmation.js | 2 - yarn.lock | 290 +++++++++--------- 32 files changed, 1152 insertions(+), 278 deletions(-) delete mode 100644 .yarn/patches/luxon-npm-3.2.1-56f8d97395.patch diff --git a/.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch b/.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch deleted file mode 100644 index 20ee46808781..000000000000 --- a/.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/build/cjs-browser/luxon.js b/build/cjs-browser/luxon.js -index 776c38ae1679eaed97ef5fa9a666e37e48747df6..336fb0ddfffd12604b5ab1609ba0685755739c9c 100644 ---- a/build/cjs-browser/luxon.js -+++ b/build/cjs-browser/luxon.js -@@ -4226,7 +4226,7 @@ var Interval = /*#__PURE__*/function () { - * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p - * @return {string} - */; -- _proto.toLocaleString = function toLocaleString(formatOpts, opts) { -+ Reflect.defineProperty(_proto, 'toLocaleString', { value: function toLocaleString(formatOpts, opts) { - if (formatOpts === void 0) { - formatOpts = DATE_SHORT; - } -@@ -4234,7 +4234,7 @@ var Interval = /*#__PURE__*/function () { - opts = {}; - } - return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1; -- } -+ }}) - - /** - * Returns an ISO 8601-compliant string representation of this Interval. -@@ -6598,7 +6598,7 @@ var DateTime = /*#__PURE__*/function () { - * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32' - * @return {string} - */; -- _proto.toLocaleString = function toLocaleString(formatOpts, opts) { -+ Reflect.defineProperty(_proto, 'toLocaleString', { value: function toLocaleString(formatOpts, opts) { - if (formatOpts === void 0) { - formatOpts = DATE_SHORT; - } -@@ -6606,7 +6606,7 @@ var DateTime = /*#__PURE__*/function () { - opts = {}; - } - return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID; -- } -+ }}) - - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. diff --git a/app/scripts/controllers/permissions/specifications.js b/app/scripts/controllers/permissions/specifications.js index 38a2bb002523..c56b8f06e9f0 100644 --- a/app/scripts/controllers/permissions/specifications.js +++ b/app/scripts/controllers/permissions/specifications.js @@ -408,13 +408,19 @@ export const unrestrictedMethods = Object.freeze([ 'wallet_invokeSnap', 'wallet_invokeKeyring', 'snap_getClientStatus', + 'snap_getCurrencyRate', + 'snap_clearState', 'snap_getFile', + 'snap_getState', 'snap_createInterface', 'snap_updateInterface', 'snap_getInterfaceState', 'snap_getInterfaceContext', 'snap_resolveInterface', - 'snap_getCurrencyRate', + 'snap_setState', + 'snap_scheduleBackgroundEvent', + 'snap_cancelBackgroundEvent', + 'snap_getBackgroundEvents', ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) 'metamaskinstitutional_authenticate', 'metamaskinstitutional_reauthenticate', diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index b33e05b9f2c0..fa714cc1847c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -1388,6 +1388,7 @@ export default class MetamaskController extends EventEmitter { 'ExecutionService:unhandledError', 'ExecutionService:outboundRequest', 'ExecutionService:outboundResponse', + 'KeyringController:lock', ], allowedActions: [ `${this.permissionController.name}:getEndowments`, @@ -2936,6 +2937,17 @@ export default class MetamaskController extends EventEmitter { return currentLocale; } + /** + * Gets whether the privacy mode is enabled from the PreferencesController. + * + * @returns {boolean} Whether the privacy mode is enabled. + */ + getPrivacyMode() { + const { privacyMode } = this.preferencesController.state; + + return privacyMode; + } + /** * Constructor helper for getting Snap permission specifications. */ @@ -2948,7 +2960,8 @@ export default class MetamaskController extends EventEmitter { getPreferences: () => { const locale = this.getLocale(); const currency = this.currencyRateController.state.currentCurrency; - return { locale, currency }; + const hideBalances = this.getPrivacyMode(); + return { locale, currency, hideBalances }; }, clearSnapState: this.controllerMessenger.call.bind( this.controllerMessenger, @@ -6262,6 +6275,11 @@ export default class MetamaskController extends EventEmitter { engine.push( createSnapsMethodMiddleware(subjectType === SubjectType.Snap, { + clearSnapState: this.controllerMessenger.call.bind( + this.controllerMessenger, + 'SnapController:clearSnapState', + origin, + ), getUnlockPromise: this.appStateController.getUnlockPromise.bind( this.appStateController, ), @@ -6284,6 +6302,16 @@ export default class MetamaskController extends EventEmitter { 'SnapController:getFile', origin, ), + getSnapState: this.controllerMessenger.call.bind( + this.controllerMessenger, + 'SnapController:getSnapState', + origin, + ), + updateSnapState: this.controllerMessenger.call.bind( + this.controllerMessenger, + 'SnapController:updateSnapState', + origin, + ), installSnaps: this.controllerMessenger.call.bind( this.controllerMessenger, 'SnapController:install', @@ -6345,11 +6373,26 @@ export default class MetamaskController extends EventEmitter { currency: fiatCurrency, }; }, - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) hasPermission: this.permissionController.hasPermission.bind( this.permissionController, origin, ), + scheduleBackgroundEvent: (event) => + this.controllerMessenger.call( + 'CronjobController:scheduleBackgroundEvent', + { ...event, snapId: origin }, + ), + cancelBackgroundEvent: this.controllerMessenger.call.bind( + this.controllerMessenger, + 'CronjobController:cancelBackgroundEvent', + origin, + ), + getBackgroundEvents: this.controllerMessenger.call.bind( + this.controllerMessenger, + 'CronjobController:getBackgroundEvents', + origin, + ), + ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) handleSnapRpcRequest: (args) => this.handleSnapRequest({ ...args, origin }), getAllowedKeyringMethods: keyringSnapPermissionsBuilder( diff --git a/builds.yml b/builds.yml index ddc4858eb973..2f5a287bba4d 100644 --- a/builds.yml +++ b/builds.yml @@ -27,7 +27,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.11.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html - ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management # Main build uses the default browser manifest manifestOverrides: false @@ -48,7 +48,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.11.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html - ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management # Modifies how the version is displayed. # eg. instead of 10.25.0 -> 10.25.0-beta.2 @@ -71,7 +71,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: true - REQUIRE_SNAPS_ALLOWLIST: false - REJECT_INVALID_SNAPS_PLATFORM_VERSION: false - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.11.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html - SUPPORT_LINK: https://support.metamask.io/ - SUPPORT_REQUEST_LINK: https://support.metamask.io/ - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID @@ -95,7 +95,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.11.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html - MMI_CONFIGURATION_SERVICE_URL: https://configuration.metamask-institutional.io/v2/configuration/default - SUPPORT_LINK: https://support.metamask-institutional.io - SUPPORT_REQUEST_LINK: https://support.metamask-institutional.io diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 37558c422c25..c4985af54a1d 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -972,7 +972,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/util": true, "@metamask/controller-utils>@metamask/ethjs-unit": true, - "@metamask/utils": true, + "@metamask/controller-utils>@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, "bn.js": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ }, "packages": { "@metamask/safe-event-emitter": true, - "@metamask/utils": true, + "@metamask/json-rpc-middleware-stream>@metamask/utils": true, "readable-stream": true } }, @@ -1338,7 +1338,7 @@ }, "packages": { "@metamask/scure-bip39": true, - "@metamask/utils": true, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true @@ -1517,7 +1517,7 @@ "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, - "@metamask/utils": true, + "@metamask/permission-controller>@metamask/utils": true, "deep-freeze-strict": true, "immer": true, "nanoid": true @@ -1744,13 +1744,15 @@ "@metamask/snaps-rpc-methods": true, "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, - "@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/name-controller>async-mutex": true, "browserify>browserify-zlib": true, "@metamask/snaps-controllers>concat-stream": true, "eslint>fast-deep-equal": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, "immer": true, + "luxon": true, "nanoid": true, "readable-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, @@ -1765,13 +1767,14 @@ "packages": { "@metamask/post-message-stream": true, "@metamask/snaps-utils": true, - "@metamask/utils": true + "@metamask/utils": true, + "@metamask/snaps-execution-environments>@metamask/utils": true } }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } @@ -1784,8 +1787,9 @@ "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, - "@noble/hashes": true + "@metamask/snaps-rpc-methods>@metamask/utils": true, + "@noble/hashes": true, + "luxon": true } }, "@metamask/snaps-sdk": { @@ -1795,7 +1799,7 @@ "packages": { "@metamask/rpc-errors": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true + "@metamask/snaps-sdk>@metamask/utils": true } }, "@metamask/snaps-utils": { @@ -1820,7 +1824,7 @@ "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-sdk": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/utils": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true, "chalk": true, @@ -1961,6 +1965,21 @@ "semver": true } }, + "@metamask/controller-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2156,6 +2175,36 @@ "semver": true } }, + "@metamask/json-rpc-middleware-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/keyring-api>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2231,6 +2280,21 @@ "semver": true } }, + "@metamask/permission-controller>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/permission-log-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2306,6 +2370,96 @@ "semver": true } }, + "@metamask/snaps-controllers>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-execution-environments>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-rpc-methods>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/transaction-controller>@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 37558c422c25..c4985af54a1d 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -972,7 +972,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/util": true, "@metamask/controller-utils>@metamask/ethjs-unit": true, - "@metamask/utils": true, + "@metamask/controller-utils>@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, "bn.js": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ }, "packages": { "@metamask/safe-event-emitter": true, - "@metamask/utils": true, + "@metamask/json-rpc-middleware-stream>@metamask/utils": true, "readable-stream": true } }, @@ -1338,7 +1338,7 @@ }, "packages": { "@metamask/scure-bip39": true, - "@metamask/utils": true, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true @@ -1517,7 +1517,7 @@ "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, - "@metamask/utils": true, + "@metamask/permission-controller>@metamask/utils": true, "deep-freeze-strict": true, "immer": true, "nanoid": true @@ -1744,13 +1744,15 @@ "@metamask/snaps-rpc-methods": true, "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, - "@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/name-controller>async-mutex": true, "browserify>browserify-zlib": true, "@metamask/snaps-controllers>concat-stream": true, "eslint>fast-deep-equal": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, "immer": true, + "luxon": true, "nanoid": true, "readable-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, @@ -1765,13 +1767,14 @@ "packages": { "@metamask/post-message-stream": true, "@metamask/snaps-utils": true, - "@metamask/utils": true + "@metamask/utils": true, + "@metamask/snaps-execution-environments>@metamask/utils": true } }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } @@ -1784,8 +1787,9 @@ "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, - "@noble/hashes": true + "@metamask/snaps-rpc-methods>@metamask/utils": true, + "@noble/hashes": true, + "luxon": true } }, "@metamask/snaps-sdk": { @@ -1795,7 +1799,7 @@ "packages": { "@metamask/rpc-errors": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true + "@metamask/snaps-sdk>@metamask/utils": true } }, "@metamask/snaps-utils": { @@ -1820,7 +1824,7 @@ "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-sdk": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/utils": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true, "chalk": true, @@ -1961,6 +1965,21 @@ "semver": true } }, + "@metamask/controller-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2156,6 +2175,36 @@ "semver": true } }, + "@metamask/json-rpc-middleware-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/keyring-api>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2231,6 +2280,21 @@ "semver": true } }, + "@metamask/permission-controller>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/permission-log-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2306,6 +2370,96 @@ "semver": true } }, + "@metamask/snaps-controllers>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-execution-environments>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-rpc-methods>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/transaction-controller>@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 37558c422c25..c4985af54a1d 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -972,7 +972,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/util": true, "@metamask/controller-utils>@metamask/ethjs-unit": true, - "@metamask/utils": true, + "@metamask/controller-utils>@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, "bn.js": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ }, "packages": { "@metamask/safe-event-emitter": true, - "@metamask/utils": true, + "@metamask/json-rpc-middleware-stream>@metamask/utils": true, "readable-stream": true } }, @@ -1338,7 +1338,7 @@ }, "packages": { "@metamask/scure-bip39": true, - "@metamask/utils": true, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true @@ -1517,7 +1517,7 @@ "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, - "@metamask/utils": true, + "@metamask/permission-controller>@metamask/utils": true, "deep-freeze-strict": true, "immer": true, "nanoid": true @@ -1744,13 +1744,15 @@ "@metamask/snaps-rpc-methods": true, "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, - "@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/name-controller>async-mutex": true, "browserify>browserify-zlib": true, "@metamask/snaps-controllers>concat-stream": true, "eslint>fast-deep-equal": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, "immer": true, + "luxon": true, "nanoid": true, "readable-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, @@ -1765,13 +1767,14 @@ "packages": { "@metamask/post-message-stream": true, "@metamask/snaps-utils": true, - "@metamask/utils": true + "@metamask/utils": true, + "@metamask/snaps-execution-environments>@metamask/utils": true } }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } @@ -1784,8 +1787,9 @@ "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, - "@noble/hashes": true + "@metamask/snaps-rpc-methods>@metamask/utils": true, + "@noble/hashes": true, + "luxon": true } }, "@metamask/snaps-sdk": { @@ -1795,7 +1799,7 @@ "packages": { "@metamask/rpc-errors": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true + "@metamask/snaps-sdk>@metamask/utils": true } }, "@metamask/snaps-utils": { @@ -1820,7 +1824,7 @@ "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-sdk": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/utils": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true, "chalk": true, @@ -1961,6 +1965,21 @@ "semver": true } }, + "@metamask/controller-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2156,6 +2175,36 @@ "semver": true } }, + "@metamask/json-rpc-middleware-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/keyring-api>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2231,6 +2280,21 @@ "semver": true } }, + "@metamask/permission-controller>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/permission-log-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2306,6 +2370,96 @@ "semver": true } }, + "@metamask/snaps-controllers>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-execution-environments>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-rpc-methods>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/transaction-controller>@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index b2e8066d6465..bc5be17e5a64 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1064,7 +1064,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/util": true, "@metamask/controller-utils>@metamask/ethjs-unit": true, - "@metamask/utils": true, + "@metamask/controller-utils>@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, "bn.js": true, "browserify>buffer": true, @@ -1420,7 +1420,7 @@ }, "packages": { "@metamask/safe-event-emitter": true, - "@metamask/utils": true, + "@metamask/json-rpc-middleware-stream>@metamask/utils": true, "readable-stream": true } }, @@ -1430,7 +1430,7 @@ }, "packages": { "@metamask/scure-bip39": true, - "@metamask/utils": true, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true @@ -1609,7 +1609,7 @@ "@metamask/controller-utils": true, "@metamask/json-rpc-engine": true, "@metamask/rpc-errors": true, - "@metamask/utils": true, + "@metamask/permission-controller>@metamask/utils": true, "deep-freeze-strict": true, "immer": true, "nanoid": true @@ -1836,13 +1836,15 @@ "@metamask/snaps-rpc-methods": true, "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, - "@metamask/utils": true, + "@metamask/snaps-controllers>@metamask/utils": true, "@metamask/snaps-controllers>@xstate/fsm": true, + "@metamask/name-controller>async-mutex": true, "browserify>browserify-zlib": true, "@metamask/snaps-controllers>concat-stream": true, "eslint>fast-deep-equal": true, "@metamask/snaps-controllers>get-npm-tarball-url": true, "immer": true, + "luxon": true, "nanoid": true, "readable-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true, @@ -1857,13 +1859,14 @@ "packages": { "@metamask/post-message-stream": true, "@metamask/snaps-utils": true, - "@metamask/utils": true + "@metamask/utils": true, + "@metamask/snaps-execution-environments>@metamask/utils": true } }, "@metamask/snaps-utils>@metamask/snaps-registry": { "packages": { "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": true, "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } @@ -1876,8 +1879,9 @@ "@metamask/snaps-sdk": true, "@metamask/snaps-utils": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, - "@noble/hashes": true + "@metamask/snaps-rpc-methods>@metamask/utils": true, + "@noble/hashes": true, + "luxon": true } }, "@metamask/snaps-sdk": { @@ -1887,7 +1891,7 @@ "packages": { "@metamask/rpc-errors": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true + "@metamask/snaps-sdk>@metamask/utils": true } }, "@metamask/snaps-utils": { @@ -1912,7 +1916,7 @@ "@metamask/snaps-utils>@metamask/slip44": true, "@metamask/snaps-sdk": true, "@metamask/utils>@metamask/superstruct": true, - "@metamask/utils": true, + "@metamask/snaps-utils>@metamask/utils": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true, "chalk": true, @@ -2053,6 +2057,21 @@ "semver": true } }, + "@metamask/controller-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/eth-token-tracker>@metamask/eth-block-tracker>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2248,6 +2267,36 @@ "semver": true } }, + "@metamask/json-rpc-middleware-stream>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/key-tree>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/keyring-api>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2323,6 +2372,21 @@ "semver": true } }, + "@metamask/permission-controller>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/permission-log-controller>@metamask/utils": { "globals": { "TextDecoder": true, @@ -2398,6 +2462,96 @@ "semver": true } }, + "@metamask/snaps-controllers>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-execution-environments>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/snaps-registry>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-rpc-methods>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-sdk>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, + "@metamask/snaps-utils>@metamask/utils": { + "globals": { + "TextDecoder": true, + "TextEncoder": true + }, + "packages": { + "@metamask/utils>@metamask/superstruct": true, + "@noble/hashes": true, + "@metamask/utils>@scure/base": true, + "browserify>buffer": true, + "nock>debug": true, + "@metamask/utils>pony-cause": true, + "semver": true + } + }, "@metamask/transaction-controller>@metamask/utils": { "globals": { "TextDecoder": true, diff --git a/package.json b/package.json index fae8b8573074..640ab9db47a4 100644 --- a/package.json +++ b/package.json @@ -205,8 +205,6 @@ "watchify@^4.0.0": "patch:watchify@npm%3A4.0.0#./.yarn/patches/watchify-npm-4.0.0-4fd965dd49.patch", "undeclared-identifiers@^1.1.2": "patch:undeclared-identifiers@npm%3A1.1.2#./.yarn/patches/undeclared-identifiers-npm-1.1.2-13d6792e9e.patch", "stylelint@^13.6.1": "patch:stylelint@npm%3A13.6.1#./.yarn/patches/stylelint-npm-13.6.1-47aaddf62b.patch", - "luxon@^3.0.1": "patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch", - "luxon@^3.2.1": "patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch", "symbol-observable": "^2.0.3", "async-done@~1.3.2": "patch:async-done@npm%3A1.3.2#./.yarn/patches/async-done-npm-1.3.2-1f0a4a8997.patch", "async-done@^1.2.0": "patch:async-done@npm%3A1.3.2#./.yarn/patches/async-done-npm-1.3.2-1f0a4a8997.patch", @@ -224,7 +222,7 @@ "@trezor/schema-utils@npm:1.0.2": "patch:@trezor/schema-utils@npm%3A1.0.2#~/.yarn/patches/@trezor-schema-utils-npm-1.0.2-7dd48689b2.patch", "lavamoat-core@npm:^15.1.1": "patch:lavamoat-core@npm%3A15.1.1#~/.yarn/patches/lavamoat-core-npm-15.1.1-51fbe39988.patch", "lavamoat-core@npm:^16.2.2": "patch:lavamoat-core@npm%3A16.2.2#~/.yarn/patches/lavamoat-core-npm-16.2.2-e361ff1f8a.patch", - "@metamask/snaps-sdk": "^6.14.0", + "@metamask/snaps-sdk": "^6.15.0", "@swc/types@0.1.5": "^0.1.6", "@babel/core": "patch:@babel/core@npm%3A7.25.9#~/.yarn/patches/@babel-core-npm-7.25.9-4ae3bff7f3.patch", "@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch", @@ -331,7 +329,7 @@ "@metamask/permission-log-controller": "^3.0.1", "@metamask/phishing-controller": "^12.3.0", "@metamask/polling-controller": "^12.0.1", - "@metamask/post-message-stream": "^8.0.0", + "@metamask/post-message-stream": "^9.0.0", "@metamask/ppom-validator": "0.36.0", "@metamask/preinstalled-example-snap": "^0.3.0", "@metamask/profile-sync-controller": "^4.1.0", @@ -345,11 +343,11 @@ "@metamask/selected-network-controller": "^19.0.0", "@metamask/signature-controller": "^23.1.0", "@metamask/smart-transactions-controller": "^16.0.1", - "@metamask/snaps-controllers": "^9.16.0", - "@metamask/snaps-execution-environments": "^6.11.0", - "@metamask/snaps-rpc-methods": "^11.8.0", - "@metamask/snaps-sdk": "^6.14.0", - "@metamask/snaps-utils": "^8.7.0", + "@metamask/snaps-controllers": "^9.17.0", + "@metamask/snaps-execution-environments": "^6.12.0", + "@metamask/snaps-rpc-methods": "^11.9.0", + "@metamask/snaps-sdk": "^6.15.0", + "@metamask/snaps-utils": "^8.8.0", "@metamask/solana-wallet-snap": "^1.0.4", "@metamask/transaction-controller": "^42.1.0", "@metamask/user-operation-controller": "^21.0.0", diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js index c17c4bd9eff7..8ac5dacd1f73 100644 --- a/test/e2e/snaps/enums.js +++ b/test/e2e/snaps/enums.js @@ -1,3 +1,3 @@ module.exports = { - TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.15.4', + TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.18.0', }; diff --git a/test/e2e/snaps/test-snap-cronjob.spec.js b/test/e2e/snaps/test-snap-cronjob.spec.js index 5fbc22d7ad71..73362b9df3ca 100644 --- a/test/e2e/snaps/test-snap-cronjob.spec.js +++ b/test/e2e/snaps/test-snap-cronjob.spec.js @@ -52,6 +52,8 @@ describe('Test Snap Cronjob', function () { tag: 'button', }); + await driver.clickElementSafe('[data-testid="snap-install-scroll"]'); + // wait for and click confirm await driver.waitForSelector({ text: 'Confirm' }); await driver.clickElement({ diff --git a/test/e2e/snaps/test-snap-ethprovider.spec.js b/test/e2e/snaps/test-snap-ethprovider.spec.js index 0e5ea68a09eb..0d4492d1fcc4 100644 --- a/test/e2e/snaps/test-snap-ethprovider.spec.js +++ b/test/e2e/snaps/test-snap-ethprovider.spec.js @@ -116,11 +116,44 @@ describe('Test Snap ethereum_provider', function () { // switch to test snap page await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); - // check the results of the message signature using waitForSelector + // check the results of the account selection using waitForSelector await driver.waitForSelector({ css: '#ethproviderResult', text: '"0x5cfe73b6021e818b776b421b1c4db2474086a7e1"', }); + + // Test personal_sign + await driver.pasteIntoField('#personalSignMessage', 'foo'); + await driver.clickElement('#signPersonalSignMessage'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Confirm', + tag: 'button', + }); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); + await driver.waitForSelector({ + css: '#personalSignResult', + text: '"0xf63c587cd42e7775e2e815a579f9744ea62944f263b3e69fad48535ba98a5ea107bc878088a99942733a59a89ef1d590eafdb467d59cf76564158d7e78351b751b"', + }); + + // Test eth_signTypedData + await driver.pasteIntoField('#signTypedData', 'bar'); + await driver.clickElement('#signTypedDataButton'); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElementSafe('.confirm-scroll-to-bottom__button'); + await driver.clickElementAndWaitForWindowToClose({ + text: 'Confirm', + tag: 'button', + }); + + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); + await driver.waitForSelector({ + css: '#signTypedDataResult', + text: '"0x18d05f8139ad66d581fb658aca4d41950c6f38a8daeb3adfdb18614e645bf73508a4c24d4fc4026b5d447d223fcf026a32947846205f663c536df8a7b4d841fe1c"', + }); }, ); }); diff --git a/test/e2e/snaps/test-snap-managestate.spec.js b/test/e2e/snaps/test-snap-managestate.spec.js index 4d6a58faa678..0ecdb1291da8 100644 --- a/test/e2e/snaps/test-snap-managestate.spec.js +++ b/test/e2e/snaps/test-snap-managestate.spec.js @@ -8,7 +8,152 @@ const FixtureBuilder = require('../fixture-builder'); const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); describe('Test Snap manageState', function () { - it('can pop up manageState snap and do update get and clear', async function () { + it('can use the new state API', async function () { + await withFixtures( + { + fixtures: new FixtureBuilder().build(), + ganacheOptions: defaultGanacheOptions, + title: this.test.fullTitle(), + }, + async ({ driver }) => { + await unlockWallet(driver); + + // navigate to test snaps page, then fill in the snapId + await driver.driver.get(TEST_SNAPS_WEBSITE_URL); + + // wait for page to load + await driver.waitForSelector({ + text: 'Installed Snaps', + tag: 'h2', + }); + + // scroll to manage-state snap + const snapButton1 = await driver.findElement('#connectstate'); + await driver.scrollToElement(snapButton1); + + // added delay for firefox (deflake) + await driver.delayFirefox(1000); + + // wait for and click connect + await driver.waitForSelector('#connectstate'); + await driver.clickElement('#connectstate'); + + // switch to metamask extension + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + + // wait for and click connect + await driver.waitForSelector({ + text: 'Connect', + tag: 'button', + }); + await driver.clickElement({ + text: 'Connect', + tag: 'button', + }); + + // wait for and click confirm + await driver.waitForSelector({ text: 'Confirm' }); + await driver.clickElement({ + text: 'Confirm', + tag: 'button', + }); + + // wait for and click ok and wait for window to close + await driver.waitForSelector({ text: 'OK' }); + await driver.clickElementAndWaitForWindowToClose({ + text: 'OK', + tag: 'button', + }); + + // fill and click send inputs on test snap page + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestSnaps); + + // wait for npm installation success + await driver.waitForSelector({ + css: '#connectstate', + text: 'Reconnect to State Snap', + }); + + // Enter data and click set + const sendEncrypted = await driver.findElement('#setStateKey'); + await driver.scrollToElement(sendEncrypted); + await driver.delayFirefox(1000); + await driver.pasteIntoField('#setStateKey', 'foo'); + await driver.pasteIntoField('#dataState', '"bar"'); + await driver.clickElement('#sendState'); + + // Check that the entire state blob was updated + await driver.waitForSelector({ + css: '#encryptedStateResult', + text: JSON.stringify({ foo: 'bar' }, null, 2), + }); + + // Check that we can retrieve one state key + const getKeyField = await driver.findElement('#getState'); + await driver.scrollToElement(getKeyField); + await driver.delayFirefox(1000); + await driver.pasteIntoField('#getState', 'foo'); + await driver.clickElement('#sendGetState'); + + await driver.waitForSelector({ + css: '#getStateResult', + text: '"bar"', + }); + + // click clear results + await driver.clickElement('#clearState'); + + // check result array is empty + await driver.waitForSelector({ + css: '#encryptedStateResult', + text: 'null', + }); + + // repeat the same above steps to check unencrypted state management + + // Enter data and click set + const sendUnencrypted = await driver.findElement( + '#setStateKeyUnencrypted', + ); + await driver.scrollToElement(sendUnencrypted); + await driver.delayFirefox(1000); + await driver.pasteIntoField('#setStateKeyUnencrypted', 'foo'); + await driver.pasteIntoField('#dataUnencryptedState', '"bar"'); + await driver.clickElement('#sendUnencryptedState'); + + // Check that the entire state blob was updated + await driver.waitForSelector({ + css: '#unencryptedStateResult', + text: JSON.stringify({ foo: 'bar' }, null, 2), + }); + + // Check that we can retrive one state key + const getUnencryptedKeyField = await driver.findElement( + '#getUnencryptedState', + ); + await driver.scrollToElement(getUnencryptedKeyField); + await driver.delayFirefox(1000); + await driver.pasteIntoField('#getUnencryptedState', 'foo'); + await driver.clickElement('#sendGetUnencryptedState'); + + await driver.waitForSelector({ + css: '#getStateUnencryptedResult', + text: '"bar"', + }); + + // click clear results + await driver.clickElement('#clearStateUnencrypted'); + + // check result array is empty + await driver.waitForSelector({ + css: '#unencryptedStateResult', + text: 'null', + }); + }, + ); + }); + + it('can use the legacy state API', async function () { await withFixtures( { fixtures: new FixtureBuilder().build(), @@ -71,7 +216,7 @@ describe('Test Snap manageState', function () { // wait for npm installation success await driver.waitForSelector({ css: '#connectmanage-state', - text: 'Reconnect to Manage State Snap', + text: 'Reconnect to Legacy State Snap', }); // enter data and click send managestate diff --git a/test/e2e/snaps/test-snap-metrics.spec.js b/test/e2e/snaps/test-snap-metrics.spec.js index 0b3ef8db2bf6..934bda718d43 100644 --- a/test/e2e/snaps/test-snap-metrics.spec.js +++ b/test/e2e/snaps/test-snap-metrics.spec.js @@ -245,7 +245,7 @@ describe('Test Snap Metrics', function () { assert.deepStrictEqual(events[1].properties, { snap_id: 'npm:@metamask/notification-example-snap', origin: 'https://metamask.github.io', - version: '2.2.0', + version: '2.3.0', category: 'Snaps', locale: 'en', chain_id: '0x539', @@ -545,7 +545,7 @@ describe('Test Snap Metrics', function () { const events = await getEventPayloads(driver, mockedEndpoints); assert.deepStrictEqual(events[0].properties, { snap_id: 'npm:@metamask/notification-example-snap', - version: '2.2.0', + version: '2.3.0', category: 'Snaps', locale: 'en', chain_id: '0x539', diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 0ddcd35e09a1..0df251bd7661 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -82,7 +82,7 @@ } }, "BridgeStatusController": { "bridgeStatusState": { "txHistory": "object" } }, - "CronjobController": { "jobs": "object" }, + "CronjobController": { "jobs": "object", "events": "object" }, "CurrencyController": { "currentCurrency": "usd", "currencyRates": { diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index fd7e43cb4308..ab3681c55088 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -262,6 +262,7 @@ "cryptocurrencies": ["btc", "sol"], "snaps": "object", "jobs": "object", + "events": "object", "database": null, "lastUpdated": null, "databaseUnavailable": "boolean", diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index 5bdf95d8322d..c035a6e6ba7d 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -836,15 +836,13 @@ class Driver { * @returns {Promise} promise that resolves to the WebElement */ async pasteIntoField(rawLocator, contentToPaste) { - // Throw if double-quote is present in content to paste - // so that we don't have to worry about escaping double-quotes - if (contentToPaste.includes('"')) { - throw new Error('Cannot paste content with double-quote'); - } // Click to focus the field await this.clickElement(rawLocator); await this.executeScript( - `navigator.clipboard.writeText("${contentToPaste}")`, + `navigator.clipboard.writeText("${contentToPaste.replace( + /"/gu, + '\\"', + )}")`, ); await this.fill(rawLocator, Key.chord(this.Key.MODIFIER, 'v')); } diff --git a/ui/components/app/confirm/info/row/value-double.tsx b/ui/components/app/confirm/info/row/value-double.tsx index b58016541c07..092ffe5ef7dd 100644 --- a/ui/components/app/confirm/info/row/value-double.tsx +++ b/ui/components/app/confirm/info/row/value-double.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { ReactNode } from 'react'; import { Box, Text } from '../../../../component-library'; import { AlignItems, @@ -12,8 +12,8 @@ import { useRowContext } from './hook'; import { ConfirmInfoRowVariant } from './row'; export type ConfirmInfoRowValueDoubleProps = { - left: string; - right: string; + left: ReactNode; + right: ReactNode; }; const LEFT_TEXT_COLORS = { @@ -35,8 +35,16 @@ export const ConfirmInfoRowValueDouble = ({ flexWrap={FlexWrap.Wrap} gap={1} > - {left} - {right} + {typeof left === 'string' ? ( + {left} + ) : ( + left + )} + {typeof right === 'string' ? ( + {right} + ) : ( + right + )} ); }; diff --git a/ui/components/app/snaps/insight-warnings/insight-warnings.js b/ui/components/app/snaps/insight-warnings/insight-warnings.js index b24b5fa8461b..22dce6365379 100644 --- a/ui/components/app/snaps/insight-warnings/insight-warnings.js +++ b/ui/components/app/snaps/insight-warnings/insight-warnings.js @@ -85,6 +85,7 @@ export default function InsightWarnings({ isCollapsable isCollapsed={warningState[snapId]} boxProps={{ marginBottom: idx === lastWarningIdx ? 0 : 4 }} + contentBackgroundColor={BackgroundColor.backgroundDefault} /> ); })} diff --git a/ui/components/app/snaps/snap-home-page/snap-home-renderer.js b/ui/components/app/snaps/snap-home-page/snap-home-renderer.js index d396ffc7e8c5..c8e54775117a 100644 --- a/ui/components/app/snaps/snap-home-page/snap-home-renderer.js +++ b/ui/components/app/snaps/snap-home-page/snap-home-renderer.js @@ -93,7 +93,6 @@ export const SnapHomeRenderer = ({ snapId }) => { isLoading={loading} useDelineator={false} useFooter - contentBackgroundColor={BackgroundColor.backgroundAlternative} /> ); }; diff --git a/ui/components/app/snaps/snap-insight/snap-insight.js b/ui/components/app/snaps/snap-insight/snap-insight.js index 4f243e265183..07630c3b0706 100644 --- a/ui/components/app/snaps/snap-insight/snap-insight.js +++ b/ui/components/app/snaps/snap-insight/snap-insight.js @@ -6,6 +6,7 @@ import { useSelector, useDispatch } from 'react-redux'; import { Text } from '../../../component-library'; import { AlignItems, + BackgroundColor, FLEX_DIRECTION, JustifyContent, TextAlign, @@ -69,6 +70,7 @@ export const SnapInsight = ({ snapId, data }) => { interfaceId={interfaceId} delineatorType={DelineatorType.Insights} isLoading={isLoading} + contentBackgroundColor={BackgroundColor.backgroundDefault} /> ) : ( = ({ +export const container: UIComponentFactory = ({ element, useFooter, onCancel, diff --git a/ui/components/app/snaps/snap-ui-renderer/components/section.ts b/ui/components/app/snaps/snap-ui-renderer/components/section.ts index 5e582936804c..e5c26ccbc51a 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/section.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/section.ts @@ -8,12 +8,20 @@ import { box } from './box'; export const section: UIComponentFactory = ({ element, + contentBackgroundColor, ...params }) => { const { children, props } = box({ element, ...params, } as unknown as UIComponentParams); + + // Reverse colors to improve visibility on certain backgrounds + const backgroundColor = + contentBackgroundColor === BackgroundColor.backgroundDefault + ? BackgroundColor.backgroundAlternative + : BackgroundColor.backgroundDefault; + return { element: 'Box', children, @@ -22,7 +30,7 @@ export const section: UIComponentFactory = ({ className: 'snap-ui-renderer__section', padding: 4, gap: 2, - backgroundColor: BackgroundColor.backgroundDefault, + backgroundColor, borderRadius: BorderRadius.LG, }, }; diff --git a/ui/components/app/snaps/snap-ui-renderer/components/types.ts b/ui/components/app/snaps/snap-ui-renderer/components/types.ts index 78d354f805a0..bba5296aa899 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/types.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/types.ts @@ -13,6 +13,7 @@ export type UIComponentParams = { placeholder?: string; }; t: (key: string) => string; + contentBackgroundColor: string | undefined; }; export type UIComponent = { diff --git a/ui/components/app/snaps/snap-ui-renderer/components/value.ts b/ui/components/app/snaps/snap-ui-renderer/components/value.ts index f365e30b1f39..70bb100daf62 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/value.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/value.ts @@ -1,10 +1,32 @@ import { ValueElement } from '@metamask/snaps-sdk/jsx'; +import { mapToTemplate } from '../utils'; import { UIComponentFactory } from './types'; -export const value: UIComponentFactory = ({ element }) => ({ - element: 'ConfirmInfoRowValueDouble', - props: { - left: element.props.extra, - right: element.props.value, - }, -}); +export const value: UIComponentFactory = ({ + element, + ...params +}) => { + return { + element: 'ConfirmInfoRowValueDouble', + props: { + left: + typeof element.props.extra === 'string' + ? element.props.extra + : undefined, + right: + typeof element.props.value === 'string' + ? element.props.value + : undefined, + }, + propComponents: { + left: + typeof element.props.extra === 'string' + ? undefined + : mapToTemplate({ element: element.props.extra, ...params }), + right: + typeof element.props.value === 'string' + ? undefined + : mapToTemplate({ element: element.props.value, ...params }), + }, + }; +}; diff --git a/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js b/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js index 179d0ca6f203..a11a77c9810b 100644 --- a/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js +++ b/ui/components/app/snaps/snap-ui-renderer/snap-ui-renderer.js @@ -14,12 +14,13 @@ import { SnapInterfaceContextProvider } from '../../../../contexts/snaps'; import PulseLoader from '../../../ui/pulse-loader'; import { AlignItems, + BackgroundColor, BlockSize, Display, JustifyContent, } from '../../../../helpers/constants/design-system'; import { useI18nContext } from '../../../../hooks/useI18nContext'; -import { mapToTemplate } from './utils'; +import { mapToExtensionCompatibleColor, mapToTemplate } from './utils'; // Component that maps Snaps UI JSON format to MetaMask Template Renderer format const SnapUIRendererComponent = ({ @@ -69,6 +70,11 @@ const SnapUIRendererComponent = ({ [inputValue, onInputChange, placeholder, isPrompt], ); + const backgroundColor = + contentBackgroundColor ?? + mapToExtensionCompatibleColor(content?.props?.backgroundColor) ?? + BackgroundColor.backgroundAlternative; + const sections = useMemo( () => content && @@ -79,8 +85,9 @@ const SnapUIRendererComponent = ({ useFooter, promptLegacyProps, t, + contentBackgroundColor: backgroundColor, }), - [content, onCancel, useFooter, promptLegacyProps, t], + [content, onCancel, useFooter, promptLegacyProps, t, backgroundColor], ); if (isLoading || !content) { @@ -134,7 +141,7 @@ const SnapUIRendererComponent = ({ string; + contentBackgroundColor?: string | undefined; }; /** @@ -140,3 +142,17 @@ export const FIELD_ELEMENT_TYPES = [ export const getPrimaryChildElementIndex = (children: JSXElement[]) => { return children.findIndex((c) => FIELD_ELEMENT_TYPES.includes(c.type)); }; + +/** + * Map Snap custom color to extension compatible color. + * + * @param color - Snap custom color. + * @returns String, representing color from design system. + */ +export const mapToExtensionCompatibleColor = (color: string) => { + const backgroundColorMapping: { [key: string]: string | undefined } = { + default: BackgroundColor.backgroundAlternative, // For Snaps, the default background color is the Alternative + alternative: BackgroundColor.backgroundDefault, + }; + return color ? backgroundColorMapping[color] : undefined; +}; diff --git a/ui/components/app/snaps/snap-ui-selector/index.scss b/ui/components/app/snaps/snap-ui-selector/index.scss index 96830bf6c9d5..8f7cec5702b1 100644 --- a/ui/components/app/snaps/snap-ui-selector/index.scss +++ b/ui/components/app/snaps/snap-ui-selector/index.scss @@ -1,6 +1,7 @@ .snap-ui-renderer { &__selector { width: 100%; + border: 1px solid var(--color-border-muted); & > span:first-child { width: 100%; @@ -12,6 +13,7 @@ &:hover { background-color: var(--color-background-alternative-hover); + border-color: var(--color-border-default); } } diff --git a/ui/pages/confirmations/components/confirm/snaps/snaps-section/__snapshots__/snaps-section.test.tsx.snap b/ui/pages/confirmations/components/confirm/snaps/snaps-section/__snapshots__/snaps-section.test.tsx.snap index 558011e68629..94b7ffe2325c 100644 --- a/ui/pages/confirmations/components/confirm/snaps/snaps-section/__snapshots__/snaps-section.test.tsx.snap +++ b/ui/pages/confirmations/components/confirm/snaps/snaps-section/__snapshots__/snaps-section.test.tsx.snap @@ -39,7 +39,7 @@ exports[`SnapsSection renders section for typed sign request 1`] = ` class="mm-box mm-box--padding-top-0 mm-box--padding-right-0 mm-box--padding-bottom-0 mm-box--padding-left-0 mm-box--flex-direction-column" >
= ({ interfaceId={interfaceId} isLoading={loading} useDelineator={false} + contentBackgroundColor={BackgroundColor.backgroundDefault} /> ); diff --git a/ui/pages/confirmations/confirmation/confirmation.js b/ui/pages/confirmations/confirmation/confirmation.js index d8d951871586..590cf5e09388 100644 --- a/ui/pages/confirmations/confirmation/confirmation.js +++ b/ui/pages/confirmations/confirmation/confirmation.js @@ -45,7 +45,6 @@ import { SnapUIRenderer } from '../../../components/app/snaps/snap-ui-renderer'; import { SNAP_MANAGE_ACCOUNTS_CONFIRMATION_TYPES } from '../../../../shared/constants/app'; ///: END:ONLY_INCLUDE_IF import { DAY } from '../../../../shared/constants/time'; -import { BackgroundColor } from '../../../helpers/constants/design-system'; import { Nav } from '../components/confirm/nav'; import { ConfirmContextProvider } from '../context/confirm'; import { useConfirmationNavigation } from '../hooks/useConfirmationNavigation'; @@ -523,7 +522,6 @@ export default function ConfirmationPage({ useDelineator={false} onCancel={handleSnapDialogCancel} useFooter={isSnapDefaultDialog} - contentBackgroundColor={BackgroundColor.backgroundAlternative} /> ) : ( diff --git a/yarn.lock b/yarn.lock index ec5a95738e13..6172816a2ad2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4942,15 +4942,15 @@ __metadata: languageName: node linkType: hard -"@metamask/approval-controller@npm:^7.0.0, @metamask/approval-controller@npm:^7.1.1": - version: 7.1.1 - resolution: "@metamask/approval-controller@npm:7.1.1" +"@metamask/approval-controller@npm:^7.0.0, @metamask/approval-controller@npm:^7.1.2": + version: 7.1.2 + resolution: "@metamask/approval-controller@npm:7.1.2" dependencies: - "@metamask/base-controller": "npm:^7.0.2" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/utils": "npm:^10.0.0" - nanoid: "npm:^3.1.31" - checksum: 10/10155e8c10be80a65bd99cc1aa83baf93900955aac35eb1cfc88c4ab8beff91de9db1168dd831b82378f26756e6f961296834d1703f9a727dd47402c735ee815 + "@metamask/base-controller": "npm:^7.1.1" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/utils": "npm:^11.0.1" + nanoid: "npm:^3.3.8" + checksum: 10/e5903e8c3799484a3f42b2683ed733e68aca5204070c84f6012ee3830b04ebffdc7fc21fe80d2ea46f2a9ee3557a38e4031186f47e84d9079c2c902361543b0d languageName: node linkType: hard @@ -5095,7 +5095,7 @@ __metadata: languageName: node linkType: hard -"@metamask/base-controller@npm:^7.0.0, @metamask/base-controller@npm:^7.0.1, @metamask/base-controller@npm:^7.0.2, @metamask/base-controller@npm:^7.1.0, @metamask/base-controller@npm:^7.1.1": +"@metamask/base-controller@npm:^7.0.0, @metamask/base-controller@npm:^7.0.1, @metamask/base-controller@npm:^7.0.2, @metamask/base-controller@npm:^7.0.3, @metamask/base-controller@npm:^7.1.0, @metamask/base-controller@npm:^7.1.1": version: 7.1.1 resolution: "@metamask/base-controller@npm:7.1.1" dependencies: @@ -5138,14 +5138,14 @@ __metadata: languageName: node linkType: hard -"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.1.0, @metamask/controller-utils@npm:^11.2.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.4.0, @metamask/controller-utils@npm:^11.4.1, @metamask/controller-utils@npm:^11.4.2, @metamask/controller-utils@npm:^11.4.3, @metamask/controller-utils@npm:^11.4.4": - version: 11.4.4 - resolution: "@metamask/controller-utils@npm:11.4.4" +"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.1.0, @metamask/controller-utils@npm:^11.2.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.4.0, @metamask/controller-utils@npm:^11.4.2, @metamask/controller-utils@npm:^11.4.3, @metamask/controller-utils@npm:^11.4.4, @metamask/controller-utils@npm:^11.4.5": + version: 11.4.5 + resolution: "@metamask/controller-utils@npm:11.4.5" dependencies: "@ethereumjs/util": "npm:^8.1.0" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-unit": "npm:^0.3.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" "@spruceid/siwe-parser": "npm:2.1.0" "@types/bn.js": "npm:^5.1.5" bignumber.js: "npm:^9.1.2" @@ -5154,7 +5154,7 @@ __metadata: fast-deep-equal: "npm:^3.1.3" peerDependencies: "@babel/runtime": ^7.0.0 - checksum: 10/0833800d4733f52fbf232efedc97ce66603430fd20ec10e71e6dc4c23295b3b59cc3c8109b86b8039b9ae0c0d2428815428924c367b88f9ea6013152a86d862b + checksum: 10/28c637197b569c437be116961a94f59f1476439484042f59b24573d70cdc575ba5ccc614d7062388945461c9c5af319a6004a0d98a07cadd3fa3fa623adb688d languageName: node linkType: hard @@ -5628,28 +5628,28 @@ __metadata: languageName: node linkType: hard -"@metamask/json-rpc-middleware-stream@npm:^8.0.4, @metamask/json-rpc-middleware-stream@npm:^8.0.5": - version: 8.0.5 - resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.5" +"@metamask/json-rpc-middleware-stream@npm:^8.0.4, @metamask/json-rpc-middleware-stream@npm:^8.0.6": + version: 8.0.6 + resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.6" dependencies: - "@metamask/json-rpc-engine": "npm:^10.0.1" + "@metamask/json-rpc-engine": "npm:^10.0.2" "@metamask/safe-event-emitter": "npm:^3.0.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" readable-stream: "npm:^3.6.2" - checksum: 10/486a4c64d445dc7ac7927ac5b9d01818ecef3fbb23d17eadada4748ed6cae9e259741e3c9380829b04a5c141d0972384647aedfde906dc83501b9d7f700ed621 + checksum: 10/4df2ddf068ee935b5ea29b833df243ee43e0a17ea0151bc312d4eaeec541612f7416761be2b66f316c0b12f577f0257831b83844f6b9addbaf5fe9d9c5638262 languageName: node linkType: hard -"@metamask/key-tree@npm:^10.0.1": - version: 10.0.1 - resolution: "@metamask/key-tree@npm:10.0.1" +"@metamask/key-tree@npm:^10.0.2": + version: 10.0.2 + resolution: "@metamask/key-tree@npm:10.0.2" dependencies: "@metamask/scure-bip39": "npm:^2.1.1" - "@metamask/utils": "npm:^10.0.1" + "@metamask/utils": "npm:^11.0.1" "@noble/curves": "npm:^1.2.0" "@noble/hashes": "npm:^1.3.2" "@scure/base": "npm:^1.0.0" - checksum: 10/a49902ef2b6f1f0c461eb4510b0c1a07d2bae2a13c4fd0f05e9c50116f6cf3db997ae9bc039197fa705e60ca410d32c52ded2d349d37452a3f2682263a1a6472 + checksum: 10/fd2e445c75dc3cd3976fdc38a5029ee71a6f4afcbbf5c9a17152bba70cf35df8095caa853ae62eef90a51b43f23eeb9546fc6eb7d93a099d82effe8dc7592259 languageName: node linkType: hard @@ -5921,13 +5921,13 @@ __metadata: languageName: node linkType: hard -"@metamask/object-multiplex@npm:^2.0.0": - version: 2.0.0 - resolution: "@metamask/object-multiplex@npm:2.0.0" +"@metamask/object-multiplex@npm:^2.0.0, @metamask/object-multiplex@npm:^2.1.0": + version: 2.1.0 + resolution: "@metamask/object-multiplex@npm:2.1.0" dependencies: once: "npm:^1.4.0" readable-stream: "npm:^3.6.2" - checksum: 10/54baea752a3ac7c2742c376512e00d4902d383e9da8787574d3b21eb0081523309e24e3915a98f3ae0341d65712b6832d2eb7eeb862f4ef0da1ead52dcde5387 + checksum: 10/e119f695e89eb20c3174f8ac6d74587498d85cff92c37e83e167cb758b3d3147d5b5e1a997d6198d430ebcf2cede6265bf5d4513fe96dbb2d82bbc6167752caa languageName: node linkType: hard @@ -5941,22 +5941,22 @@ __metadata: languageName: node linkType: hard -"@metamask/permission-controller@npm:^11.0.0, @metamask/permission-controller@npm:^11.0.3": - version: 11.0.3 - resolution: "@metamask/permission-controller@npm:11.0.3" +"@metamask/permission-controller@npm:^11.0.0, @metamask/permission-controller@npm:^11.0.5": + version: 11.0.5 + resolution: "@metamask/permission-controller@npm:11.0.5" dependencies: - "@metamask/base-controller": "npm:^7.0.2" - "@metamask/controller-utils": "npm:^11.4.1" - "@metamask/json-rpc-engine": "npm:^10.0.1" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/utils": "npm:^10.0.0" + "@metamask/base-controller": "npm:^7.1.1" + "@metamask/controller-utils": "npm:^11.4.5" + "@metamask/json-rpc-engine": "npm:^10.0.2" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/utils": "npm:^11.0.1" "@types/deep-freeze-strict": "npm:^1.1.0" deep-freeze-strict: "npm:^1.1.1" immer: "npm:^9.0.6" - nanoid: "npm:^3.1.31" + nanoid: "npm:^3.3.8" peerDependencies: "@metamask/approval-controller": ^7.0.0 - checksum: 10/e90411ae34410176945e79c8e863ff2d78a12c01e98837a7298dc94d4815c65fec2cd338d4ae0026f91899acfe21bfe8b857a3b2f12c3d96719e5afb68df0e68 + checksum: 10/e592f5da0a2efdf17f7d7a15e0acea5000f7c40ca6b97ab295d15e59c3d7950a0ec388f927ded8ec15f04d75393ba28f8b4858ed2c1da963a92dc360451d5d9a languageName: node linkType: hard @@ -5971,18 +5971,18 @@ __metadata: languageName: node linkType: hard -"@metamask/phishing-controller@npm:^12.0.2, @metamask/phishing-controller@npm:^12.3.0": - version: 12.3.0 - resolution: "@metamask/phishing-controller@npm:12.3.0" +"@metamask/phishing-controller@npm:^12.3.0, @metamask/phishing-controller@npm:^12.3.1": + version: 12.3.1 + resolution: "@metamask/phishing-controller@npm:12.3.1" dependencies: - "@metamask/base-controller": "npm:^7.0.1" - "@metamask/controller-utils": "npm:^11.4.0" + "@metamask/base-controller": "npm:^7.0.2" + "@metamask/controller-utils": "npm:^11.4.4" "@noble/hashes": "npm:^1.4.0" "@types/punycode": "npm:^2.1.0" ethereum-cryptography: "npm:^2.1.2" fastest-levenshtein: "npm:^1.0.16" punycode: "npm:^2.1.1" - checksum: 10/15e64adff57996486c36d0c73747a76543e8f7ad79020fc2746726f81f3858251b2e256c04e8d9caf1daf71c41f7ddf575c901d2a46174a5884d2836c60a3b2d + checksum: 10/b8060e7277239ea5ebeddb7589e26b7fb49114b8dc4b48e72393ea0efae28ff3eff17160585429ef33e9022ea146637c78b7cea6d927d62708dfdc0c0c544d5d languageName: node linkType: hard @@ -6017,7 +6017,7 @@ __metadata: languageName: node linkType: hard -"@metamask/post-message-stream@npm:^8.0.0, @metamask/post-message-stream@npm:^8.1.1": +"@metamask/post-message-stream@npm:^8.0.0": version: 8.1.1 resolution: "@metamask/post-message-stream@npm:8.1.1" dependencies: @@ -6027,6 +6027,16 @@ __metadata: languageName: node linkType: hard +"@metamask/post-message-stream@npm:^9.0.0": + version: 9.0.0 + resolution: "@metamask/post-message-stream@npm:9.0.0" + dependencies: + "@metamask/utils": "npm:^11.0.1" + readable-stream: "npm:3.6.2" + checksum: 10/5da711d3274e724452322939a5a77c60ed1d7ed73cdaa62e95c16debc443804d5a16de116dce742e05b3fbfa962e009dfeafc3a12a66f20e163617567f2cace5 + languageName: node + linkType: hard + "@metamask/ppom-validator@npm:0.36.0": version: 0.36.0 resolution: "@metamask/ppom-validator@npm:0.36.0" @@ -6092,16 +6102,16 @@ __metadata: languageName: node linkType: hard -"@metamask/providers@npm:^18.1.1, @metamask/providers@npm:^18.2.0": - version: 18.2.0 - resolution: "@metamask/providers@npm:18.2.0" +"@metamask/providers@npm:^18.2.0, @metamask/providers@npm:^18.3.1": + version: 18.3.1 + resolution: "@metamask/providers@npm:18.3.1" dependencies: - "@metamask/json-rpc-engine": "npm:^10.0.1" - "@metamask/json-rpc-middleware-stream": "npm:^8.0.5" + "@metamask/json-rpc-engine": "npm:^10.0.2" + "@metamask/json-rpc-middleware-stream": "npm:^8.0.6" "@metamask/object-multiplex": "npm:^2.0.0" - "@metamask/rpc-errors": "npm:^7.0.1" + "@metamask/rpc-errors": "npm:^7.0.2" "@metamask/safe-event-emitter": "npm:^3.1.1" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" detect-browser: "npm:^5.2.0" extension-port-stream: "npm:^4.1.0" fast-deep-equal: "npm:^3.1.3" @@ -6109,7 +6119,7 @@ __metadata: readable-stream: "npm:^3.6.2" peerDependencies: webextension-polyfill: ^0.10.0 || ^0.11.0 || ^0.12.0 - checksum: 10/d808f14fc5cf6e240abec61c6b0cb93c0a1d883078ee3d005b9cd49c44e65767a4227d828b19c31500da8e94d85c3632d6957ab35da20b250f6f3a52746ed6b3 + checksum: 10/0e21ba9cce926a49dedbfe30fc964cd2349ee6bf9156f525fb894dcbc147a3ae480384884131a6b1a0a508989b547d8c8d2aeb3d10e11f67a8ee5230c45631a8 languageName: node linkType: hard @@ -6225,10 +6235,10 @@ __metadata: languageName: node linkType: hard -"@metamask/slip44@npm:^4.0.0": - version: 4.0.0 - resolution: "@metamask/slip44@npm:4.0.0" - checksum: 10/3e47e8834b0fbdabe1f126fd78665767847ddc1f9ccc8defb23007dd71fcd2e4899c8ca04857491be3630668a3765bad1e40fdfca9a61ef33236d8d08e51535e +"@metamask/slip44@npm:^4.1.0": + version: 4.1.0 + resolution: "@metamask/slip44@npm:4.1.0" + checksum: 10/4265254a1800a24915bd1de15f86f196737132f9af2a084c2efc885decfc5dd87ad8f0687269d90b35e2ec64d3ea4fbff0caa793bcea6e585b1f3a290952b750 languageName: node linkType: hard @@ -6260,120 +6270,123 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^9.10.0, @metamask/snaps-controllers@npm:^9.16.0": - version: 9.16.0 - resolution: "@metamask/snaps-controllers@npm:9.16.0" +"@metamask/snaps-controllers@npm:^9.10.0, @metamask/snaps-controllers@npm:^9.17.0": + version: 9.17.0 + resolution: "@metamask/snaps-controllers@npm:9.17.0" dependencies: - "@metamask/approval-controller": "npm:^7.1.1" - "@metamask/base-controller": "npm:^7.0.2" - "@metamask/json-rpc-engine": "npm:^10.0.1" - "@metamask/json-rpc-middleware-stream": "npm:^8.0.5" - "@metamask/key-tree": "npm:^10.0.1" - "@metamask/object-multiplex": "npm:^2.0.0" - "@metamask/permission-controller": "npm:^11.0.3" - "@metamask/phishing-controller": "npm:^12.0.2" - "@metamask/post-message-stream": "npm:^8.1.1" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/snaps-registry": "npm:^3.2.2" - "@metamask/snaps-rpc-methods": "npm:^11.8.0" - "@metamask/snaps-sdk": "npm:^6.14.0" - "@metamask/snaps-utils": "npm:^8.7.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/approval-controller": "npm:^7.1.2" + "@metamask/base-controller": "npm:^7.0.3" + "@metamask/json-rpc-engine": "npm:^10.0.2" + "@metamask/json-rpc-middleware-stream": "npm:^8.0.6" + "@metamask/key-tree": "npm:^10.0.2" + "@metamask/object-multiplex": "npm:^2.1.0" + "@metamask/permission-controller": "npm:^11.0.5" + "@metamask/phishing-controller": "npm:^12.3.1" + "@metamask/post-message-stream": "npm:^9.0.0" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/snaps-registry": "npm:^3.2.3" + "@metamask/snaps-rpc-methods": "npm:^11.9.0" + "@metamask/snaps-sdk": "npm:^6.15.0" + "@metamask/snaps-utils": "npm:^8.8.0" + "@metamask/utils": "npm:^11.0.1" "@xstate/fsm": "npm:^2.0.0" + async-mutex: "npm:^0.5.0" browserify-zlib: "npm:^0.2.0" concat-stream: "npm:^2.0.0" fast-deep-equal: "npm:^3.1.3" get-npm-tarball-url: "npm:^2.0.3" immer: "npm:^9.0.6" + luxon: "npm:^3.5.0" nanoid: "npm:^3.1.31" readable-stream: "npm:^3.6.2" readable-web-to-node-stream: "npm:^3.0.2" semver: "npm:^7.5.4" tar-stream: "npm:^3.1.7" peerDependencies: - "@metamask/snaps-execution-environments": ^6.11.0 + "@metamask/snaps-execution-environments": ^6.12.0 peerDependenciesMeta: "@metamask/snaps-execution-environments": optional: true - checksum: 10/f0a9efaad8fac2aa833edd5df6a4929a84de31f3e11457d407f39793c9ecd3b94eff543135729691b125c32f4290183375ae6416bc04e4aad31466517727af4f + checksum: 10/c09eb4a31e685a9fbe41f2b407d9037785e572a7ef135ecfbede3cf015eaa87bef53c17e615a85ad8bbb757d8baf969cd14766dc70c04aa7645ef819ef03417d languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^6.11.0": - version: 6.11.0 - resolution: "@metamask/snaps-execution-environments@npm:6.11.0" +"@metamask/snaps-execution-environments@npm:^6.12.0": + version: 6.12.0 + resolution: "@metamask/snaps-execution-environments@npm:6.12.0" dependencies: - "@metamask/json-rpc-engine": "npm:^10.0.1" - "@metamask/object-multiplex": "npm:^2.0.0" - "@metamask/post-message-stream": "npm:^8.1.1" - "@metamask/providers": "npm:^18.1.1" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/snaps-sdk": "npm:^6.14.0" - "@metamask/snaps-utils": "npm:^8.7.0" + "@metamask/json-rpc-engine": "npm:^10.0.2" + "@metamask/object-multiplex": "npm:^2.1.0" + "@metamask/post-message-stream": "npm:^9.0.0" + "@metamask/providers": "npm:^18.3.1" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/snaps-sdk": "npm:^6.15.0" + "@metamask/snaps-utils": "npm:^8.8.0" "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" nanoid: "npm:^3.1.31" readable-stream: "npm:^3.6.2" - checksum: 10/3fc46e1b1d7e11996ce8c3694738d1cdab9b5d6c129a45e691b98f0d753e044869c3d0471729cba9e120bb2ff7ebd8e9aa644e608792903e74eee61213509b08 + checksum: 10/1c79214467e804b09b2889a7961f7907ef84797038d9970913e3fb310890ac8431010a28a77acf611a4aeea24358425a85cb57c3712264201b99fe6ee8011d0c languageName: node linkType: hard -"@metamask/snaps-registry@npm:^3.2.2": - version: 3.2.2 - resolution: "@metamask/snaps-registry@npm:3.2.2" +"@metamask/snaps-registry@npm:^3.2.3": + version: 3.2.3 + resolution: "@metamask/snaps-registry@npm:3.2.3" dependencies: "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" "@noble/curves": "npm:^1.2.0" "@noble/hashes": "npm:^1.3.2" - checksum: 10/ca8239e838bbb913435e166136bbc9bd7222c4bd87b1525fa7ae3cdf2e0b868b5d4d90a67d1ed49633d566bdef9243abdbf5f5937b85a85d24184087f555813e + checksum: 10/37760f29b7aaa337d815cf0c11fa34af5093d87fdc60a3750c494cf8bae6293cd52da03e7694b467b79733052d75ec6e3781ab3590d7259a050784e5be347d12 languageName: node linkType: hard -"@metamask/snaps-rpc-methods@npm:^11.8.0": - version: 11.8.0 - resolution: "@metamask/snaps-rpc-methods@npm:11.8.0" +"@metamask/snaps-rpc-methods@npm:^11.9.0": + version: 11.9.0 + resolution: "@metamask/snaps-rpc-methods@npm:11.9.0" dependencies: - "@metamask/key-tree": "npm:^10.0.1" - "@metamask/permission-controller": "npm:^11.0.3" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/snaps-sdk": "npm:^6.14.0" - "@metamask/snaps-utils": "npm:^8.7.0" + "@metamask/key-tree": "npm:^10.0.2" + "@metamask/permission-controller": "npm:^11.0.5" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/snaps-sdk": "npm:^6.15.0" + "@metamask/snaps-utils": "npm:^8.8.0" "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" "@noble/hashes": "npm:^1.3.1" - checksum: 10/a84c3648195efaeaeb021bd86c8a90e3f555236a8804cb2191778dddcf2acf7ea23ebc30f4670f6669dc881736c28f387b6ca2fc61050393411ee947a86cd47b + luxon: "npm:^3.5.0" + checksum: 10/44d47d3d8dcaa349863f2df2622c6fedc15e56e77d00ee97caadf3cebef6ddca06c8d4fa199b196a067bbdce59ec9a867446c133658b098216746bc23e7245f8 languageName: node linkType: hard -"@metamask/snaps-sdk@npm:^6.14.0": - version: 6.14.0 - resolution: "@metamask/snaps-sdk@npm:6.14.0" +"@metamask/snaps-sdk@npm:^6.15.0": + version: 6.15.0 + resolution: "@metamask/snaps-sdk@npm:6.15.0" dependencies: - "@metamask/key-tree": "npm:^10.0.1" - "@metamask/providers": "npm:^18.1.1" - "@metamask/rpc-errors": "npm:^7.0.1" + "@metamask/key-tree": "npm:^10.0.2" + "@metamask/providers": "npm:^18.3.1" + "@metamask/rpc-errors": "npm:^7.0.2" "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^10.0.0" - checksum: 10/dafe8618418c607c5d962bbcf675324651254631791a257898f4a939c58a8b2f56a743dcff534aa7889662d5fb1a4dd1048558f4b025404e0dcd507ff5a5e89a + "@metamask/utils": "npm:^11.0.1" + checksum: 10/0e561a0b3ae96521efbdb7223a46e42a634f84a61f271288b5c549ccc2a974247100925d551b359bd84d76aec75529dff726176e5379f446721c48f702cf2598 languageName: node linkType: hard -"@metamask/snaps-utils@npm:^8.3.0, @metamask/snaps-utils@npm:^8.7.0": - version: 8.7.0 - resolution: "@metamask/snaps-utils@npm:8.7.0" +"@metamask/snaps-utils@npm:^8.3.0, @metamask/snaps-utils@npm:^8.8.0": + version: 8.8.0 + resolution: "@metamask/snaps-utils@npm:8.8.0" dependencies: "@babel/core": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" - "@metamask/base-controller": "npm:^7.0.2" - "@metamask/key-tree": "npm:^10.0.1" - "@metamask/permission-controller": "npm:^11.0.3" - "@metamask/rpc-errors": "npm:^7.0.1" - "@metamask/slip44": "npm:^4.0.0" - "@metamask/snaps-registry": "npm:^3.2.2" - "@metamask/snaps-sdk": "npm:^6.14.0" + "@metamask/base-controller": "npm:^7.0.3" + "@metamask/key-tree": "npm:^10.0.2" + "@metamask/permission-controller": "npm:^11.0.5" + "@metamask/rpc-errors": "npm:^7.0.2" + "@metamask/slip44": "npm:^4.1.0" + "@metamask/snaps-registry": "npm:^3.2.3" + "@metamask/snaps-sdk": "npm:^6.15.0" "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^10.0.0" + "@metamask/utils": "npm:^11.0.1" "@noble/hashes": "npm:^1.3.1" "@scure/base": "npm:^1.1.1" chalk: "npm:^4.1.2" @@ -6386,7 +6399,7 @@ __metadata: semver: "npm:^7.5.4" ses: "npm:^1.1.0" validate-npm-package-name: "npm:^5.0.0" - checksum: 10/0681878e29c010853b610ed99569044feaa37b4cc92bafdba28b1eec68694d7779833fb4262a05a4d18182c6931d258531ed628e422d7c96567b61d1b710a95d + checksum: 10/567354cf09dc74fe392e281e836325bfec570428dd77101935fa443bcc987bfdee6a568a572b92269639fda30a7f02ff1047ad887aed52b73709ab7a6bf1cddd languageName: node linkType: hard @@ -25943,17 +25956,10 @@ __metadata: languageName: node linkType: hard -"luxon@npm:3.2.1": - version: 3.2.1 - resolution: "luxon@npm:3.2.1" - checksum: 10/16340e1b646c8170ff3c747e4ef7948ff9daad6fe2b442f344ccd685d853e2f81bd0b702c77a8dc600dbe9013e16af638ad334cd4551521337c2f19c32c8a527 - languageName: node - linkType: hard - -"luxon@patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch::locator=metamask-crx%40workspace%3A.": - version: 3.2.1 - resolution: "luxon@patch:luxon@npm%3A3.2.1#./.yarn/patches/luxon-npm-3.2.1-56f8d97395.patch::version=3.2.1&hash=58f222&locator=metamask-crx%40workspace%3A." - checksum: 10/76e36f076ea64e934c8fc3f654f956e27a18bf14f76fe9fbd865b59d135e3c5a3e175c565687fa8dd58f52ea9651241ec9133a4029e243d76978e8136bacb1be +"luxon@npm:^3.0.1, luxon@npm:^3.2.1, luxon@npm:^3.5.0": + version: 3.5.0 + resolution: "luxon@npm:3.5.0" + checksum: 10/48f86e6c1c96815139f8559456a3354a276ba79bcef0ae0d4f2172f7652f3ba2be2237b0e103b8ea0b79b47715354ac9fac04eb1db3485dcc72d5110491dd47f languageName: node linkType: hard @@ -26667,7 +26673,7 @@ __metadata: "@metamask/phishing-controller": "npm:^12.3.0" "@metamask/phishing-warning": "npm:^4.1.0" "@metamask/polling-controller": "npm:^12.0.1" - "@metamask/post-message-stream": "npm:^8.0.0" + "@metamask/post-message-stream": "npm:^9.0.0" "@metamask/ppom-validator": "npm:0.36.0" "@metamask/preferences-controller": "npm:^15.0.1" "@metamask/preinstalled-example-snap": "npm:^0.3.0" @@ -26682,11 +26688,11 @@ __metadata: "@metamask/selected-network-controller": "npm:^19.0.0" "@metamask/signature-controller": "npm:^23.1.0" "@metamask/smart-transactions-controller": "npm:^16.0.1" - "@metamask/snaps-controllers": "npm:^9.16.0" - "@metamask/snaps-execution-environments": "npm:^6.11.0" - "@metamask/snaps-rpc-methods": "npm:^11.8.0" - "@metamask/snaps-sdk": "npm:^6.14.0" - "@metamask/snaps-utils": "npm:^8.7.0" + "@metamask/snaps-controllers": "npm:^9.17.0" + "@metamask/snaps-execution-environments": "npm:^6.12.0" + "@metamask/snaps-rpc-methods": "npm:^11.9.0" + "@metamask/snaps-sdk": "npm:^6.15.0" + "@metamask/snaps-utils": "npm:^8.8.0" "@metamask/solana-wallet-snap": "npm:^1.0.4" "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:8.13.0" From 651a40c659663e8ff1c82c4108d9eb4b1e59b333 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 08:13:31 -0800 Subject: [PATCH 39/65] cleanup fixtures --- test/e2e/fixture-builder.js | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 90217388b272..fc6856fb066d 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -1237,6 +1237,9 @@ class FixtureBuilder { origin: 'https://app.ens.domains', permissions: { eth_accounts: { + id: 'oKXoF_MNlffiR2u1Y3mDE', + parentCapability: 'eth_accounts', + invoker: 'https://app.ens.domains', caveats: [ { type: 'restrictReturnedAccounts', @@ -1247,9 +1250,6 @@ class FixtureBuilder { }, ], date: 1708029792962, - id: 'oKXoF_MNlffiR2u1Y3mDE', - invoker: 'https://app.ens.domains', - parentCapability: 'eth_accounts', }, }, }, @@ -1257,6 +1257,9 @@ class FixtureBuilder { origin: 'https://app.uniswap.org', permissions: { eth_accounts: { + id: 'vaa88u5Iv3VmsJwG3bDKW', + invoker: 'https://app.uniswap.org', + parentCapability: 'eth_accounts', caveats: [ { type: 'restrictReturnedAccounts', @@ -1267,9 +1270,6 @@ class FixtureBuilder { }, ], date: 1708029870079, - id: 'vaa88u5Iv3VmsJwG3bDKW', - invoker: 'https://app.uniswap.org', - parentCapability: 'eth_accounts', }, }, }, @@ -1277,20 +1277,20 @@ class FixtureBuilder { origin: 'https://www.dextools.io', permissions: { eth_accounts: { + id: 'bvvPcFtIhkFyHyW0Tmwi4', + invoker: 'https://www.dextools.io', + parentCapability: 'eth_accounts', caveats: [ { type: 'restrictReturnedAccounts', value: [ - 'eip155:1337:0xbee150bdc171c7d4190891e78234f791a3ac7b24', - 'eip155:1337:0xa5c5293e124d04e2f85e8553851001fd2f192647', - 'eip155:1337:0xb9504634e5788208933b51ae7440b478bfadf865', + '0xbee150bdc171c7d4190891e78234f791a3ac7b24', + '0xa5c5293e124d04e2f85e8553851001fd2f192647', + '0xb9504634e5788208933b51ae7440b478bfadf865', ], }, ], date: 1708029948170, - id: 'bvvPcFtIhkFyHyW0Tmwi4', - invoker: 'https://www.dextools.io', - parentCapability: 'eth_accounts', }, }, }, @@ -1298,18 +1298,16 @@ class FixtureBuilder { origin: 'https://coinmarketcap.com', permissions: { eth_accounts: { + id: 'AiblK84K1Cic-Y0FDSzMD', + invoker: 'https://coinmarketcap.com', + parentCapability: 'eth_accounts', caveats: [ { type: 'restrictReturnedAccounts', - value: [ - 'eip155:1337:0xbee150bdc171c7d4190891e78234f791a3ac7b24', - ], + value: ['0xbee150bdc171c7d4190891e78234f791a3ac7b24'], }, ], date: 1708030049641, - id: 'AiblK84K1Cic-Y0FDSzMD', - invoker: 'https://coinmarketcap.com', - parentCapability: 'eth_accounts', }, }, }, From b0321013c117b92c4a6159642b024a3e993ccabc Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 09:11:08 -0800 Subject: [PATCH 40/65] clean fixtures deprecated-networks.spec.js and switch-custom-network.spec.js --- test/e2e/tests/network/deprecated-networks.spec.js | 9 --------- test/e2e/tests/network/switch-custom-network.spec.js | 3 --- 2 files changed, 12 deletions(-) diff --git a/test/e2e/tests/network/deprecated-networks.spec.js b/test/e2e/tests/network/deprecated-networks.spec.js index 80a11226a4df..26c2388e4b51 100644 --- a/test/e2e/tests/network/deprecated-networks.spec.js +++ b/test/e2e/tests/network/deprecated-networks.spec.js @@ -51,9 +51,6 @@ describe('Deprecated networks', function () { { dapp: true, fixtures: new FixtureBuilder() - .withKeyringControllerAdditionalAccountVault() - .withPreferencesControllerAdditionalAccountIdentities() - .withAccountsControllerAdditionalAccountIdentities() .withPermissionControllerConnectedToTestDapp() .withPreferencesController({ useSafeChainsListValidation: false }) .build(), @@ -133,9 +130,6 @@ describe('Deprecated networks', function () { { dapp: true, fixtures: new FixtureBuilder() - .withKeyringControllerAdditionalAccountVault() - .withPreferencesControllerAdditionalAccountIdentities() - .withAccountsControllerAdditionalAccountIdentities() .withPermissionControllerConnectedToTestDapp() .withPreferencesController({ useSafeChainsListValidation: false }) .build(), @@ -215,9 +209,6 @@ describe('Deprecated networks', function () { { dapp: true, fixtures: new FixtureBuilder() - .withKeyringControllerAdditionalAccountVault() - .withPreferencesControllerAdditionalAccountIdentities() - .withAccountsControllerAdditionalAccountIdentities() .withPermissionControllerConnectedToTestDapp() .withPreferencesController({ useSafeChainsListValidation: false }) .build(), diff --git a/test/e2e/tests/network/switch-custom-network.spec.js b/test/e2e/tests/network/switch-custom-network.spec.js index c5eb780a29db..09dedc3a62da 100644 --- a/test/e2e/tests/network/switch-custom-network.spec.js +++ b/test/e2e/tests/network/switch-custom-network.spec.js @@ -13,9 +13,6 @@ describe('Switch ethereum chain', function () { { dapp: true, fixtures: new FixtureBuilder() - .withKeyringControllerAdditionalAccountVault() - .withPreferencesControllerAdditionalAccountIdentities() - .withAccountsControllerAdditionalAccountIdentities() .withPermissionControllerConnectedToTestDapp() .build(), ganacheOptions: generateGanacheOptions({ From 4c700fd261135035fa27438940d1207c7889ae2e Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 09:14:05 -0800 Subject: [PATCH 41/65] remove ERC_4337_ACCOUNT from withPreferencesControllerAdditionalAccountIdentities --- test/e2e/fixture-builder.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index fc6856fb066d..b47d481e6346 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -643,11 +643,6 @@ class FixtureBuilder { lastSelected: 1665507800000, name: 'Account 2', }, - [ERC_4337_ACCOUNT]: { - address: ERC_4337_ACCOUNT, - lastSelected: 1665507600000, - name: 'Account 4', - }, }, }); } From 64aa03b8659f3cfe38a65e36265997fa88a710f9 Mon Sep 17 00:00:00 2001 From: Priya Date: Thu, 16 Jan 2025 19:03:02 +0100 Subject: [PATCH 42/65] chore: de-deuplicates the erc20 revoke allowance tests (#29658) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** The ERC 20 revoke allowance tests were using some exported methods from other tests (increase allowance and approve component) causing also those tests to be run along with the revoke tests. This PR moves the reusable methods to the shared file so that the tests are not duplicated [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29658?quickstart=1) ## **Related issues** Fixes: [#28486](https://github.com/MetaMask/metamask-extension/issues/28486) ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- test/e2e/helpers.js | 2 +- .../erc20-approve-redesign.spec.ts | 25 +------ .../increase-token-allowance-redesign.spec.ts | 48 ++----------- .../revoke-allowance-redesign.spec.ts | 7 +- .../confirmations/transactions/shared.ts | 67 ++++++++++++++++++- 5 files changed, 77 insertions(+), 72 deletions(-) diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index 046622514727..080a473b6608 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -748,7 +748,7 @@ async function clickSignOnRedesignedSignatureConfirmation({ if (snapSigInsights) { // there is no condition we can wait for to know the snap is ready, // so we have to add a small delay as the last alternative to avoid flakiness. - await driver.delay(regularDelayMs); + await driver.delay(largeDelayMs); } await driver.clickElement({ text: 'Confirm', tag: 'button' }); diff --git a/test/e2e/tests/confirmations/transactions/erc20-approve-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/erc20-approve-redesign.spec.ts index 4e340f5ef3ac..b75d71cda4c0 100644 --- a/test/e2e/tests/confirmations/transactions/erc20-approve-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/erc20-approve-redesign.spec.ts @@ -4,6 +4,7 @@ import { tinyDelayMs, veryLargeDelayMs, WINDOW_TITLES } from '../../../helpers'; import { Driver } from '../../../webdriver/driver'; import { scrollAndConfirmAndAssertConfirm } from '../helpers'; import { + mocked4BytesApprove, openDAppWithContract, TestSuiteArguments, toggleAdvancedDetails, @@ -87,30 +88,6 @@ describe('Confirmation Redesign ERC20 Approve Component', function () { }); }); -export async function mocked4BytesApprove(mockServer: MockttpServer) { - return await mockServer - .forGet('https://www.4byte.directory/api/v1/signatures/') - .always() - .withQuery({ hex_signature: '0x095ea7b3' }) - .thenCallback(() => ({ - statusCode: 200, - json: { - count: 1, - next: null, - previous: null, - results: [ - { - id: 149, - created_at: '2016-07-09T03:58:29.617584Z', - text_signature: 'approve(address,uint256)', - hex_signature: '0x095ea7b3', - bytes_signature: '\t^§³', - }, - ], - }, - })); -} - async function mocks(server: MockttpServer) { return [await mocked4BytesApprove(server)]; } diff --git a/test/e2e/tests/confirmations/transactions/increase-token-allowance-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/increase-token-allowance-redesign.spec.ts index 30c87080c3fc..82b995f217ed 100644 --- a/test/e2e/tests/confirmations/transactions/increase-token-allowance-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/increase-token-allowance-redesign.spec.ts @@ -2,8 +2,6 @@ import FixtureBuilder from '../../../fixture-builder'; import { defaultGanacheOptions, defaultGanacheOptionsForType2Transactions, - largeDelayMs, - veryLargeDelayMs, WINDOW_TITLES, withFixtures, } from '../../../helpers'; @@ -12,7 +10,12 @@ import ContractAddressRegistry from '../../../seeder/contract-address-registry'; import { SMART_CONTRACTS } from '../../../seeder/smart-contracts'; import { Driver } from '../../../webdriver/driver'; import { scrollAndConfirmAndAssertConfirm } from '../helpers'; -import { openDAppWithContract, TestSuiteArguments } from './shared'; +import { + assertChangedSpendingCap, + editSpendingCap, + openDAppWithContract, + TestSuiteArguments, +} from './shared'; describe('Confirmation Redesign ERC20 Increase Allowance', function () { describe('Submit an increase allowance transaction @no-mmi', function () { @@ -158,42 +161,3 @@ async function createERC20IncreaseAllowanceTransaction(driver: Driver) { await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); await driver.clickElement('#increaseTokenAllowance'); } - -export async function editSpendingCap(driver: Driver, newSpendingCap: string) { - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - await driver.clickElement('[data-testid="edit-spending-cap-icon"'); - - await driver.fill( - '[data-testid="custom-spending-cap-input"]', - newSpendingCap, - ); - - await driver.delay(largeDelayMs); - - await driver.clickElement({ text: 'Save', tag: 'button' }); - - // wait for the confirmation to be updated before submitting tx - await driver.delay(veryLargeDelayMs * 2); -} - -export async function assertChangedSpendingCap( - driver: Driver, - newSpendingCap: string, -) { - await driver.switchToWindowWithTitle(WINDOW_TITLES.ExtensionInFullScreenView); - - await driver.clickElement({ text: 'Activity', tag: 'button' }); - - await driver.delay(veryLargeDelayMs); - - await driver.clickElement( - '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', - ); - - await driver.waitForSelector({ - text: `${newSpendingCap} TST`, - tag: 'span', - }); - - await driver.waitForSelector({ text: 'Confirmed', tag: 'div' }); -} diff --git a/test/e2e/tests/confirmations/transactions/revoke-allowance-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/revoke-allowance-redesign.spec.ts index ba97d9cda4cd..227fdb14ec8f 100644 --- a/test/e2e/tests/confirmations/transactions/revoke-allowance-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/revoke-allowance-redesign.spec.ts @@ -3,12 +3,13 @@ import { MockttpServer } from 'mockttp'; import { WINDOW_TITLES } from '../../../helpers'; import { Driver } from '../../../webdriver/driver'; import { scrollAndConfirmAndAssertConfirm } from '../helpers'; -import { mocked4BytesApprove } from './erc20-approve-redesign.spec'; import { assertChangedSpendingCap, editSpendingCap, -} from './increase-token-allowance-redesign.spec'; -import { openDAppWithContract, TestSuiteArguments } from './shared'; + mocked4BytesApprove, + openDAppWithContract, + TestSuiteArguments, +} from './shared'; const { defaultGanacheOptions, diff --git a/test/e2e/tests/confirmations/transactions/shared.ts b/test/e2e/tests/confirmations/transactions/shared.ts index f984417fae94..d8f79a2053b2 100644 --- a/test/e2e/tests/confirmations/transactions/shared.ts +++ b/test/e2e/tests/confirmations/transactions/shared.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ -import { MockedEndpoint } from 'mockttp'; -import { veryLargeDelayMs } from '../../../helpers'; +import { MockedEndpoint, MockttpServer } from 'mockttp'; +import { largeDelayMs, veryLargeDelayMs } from '../../../helpers'; import { Ganache } from '../../../seeder/ganache'; import ContractAddressRegistry from '../../../seeder/contract-address-registry'; import { Driver } from '../../../webdriver/driver'; @@ -238,3 +238,66 @@ export async function assertAdvancedGasDetailsWithL2Breakdown(driver: Driver) { await driver.waitForSelector({ css: 'p', text: 'Speed' }); await driver.waitForSelector({ css: 'p', text: 'Max fee' }); } + +export async function editSpendingCap(driver: Driver, newSpendingCap: string) { + await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); + await driver.clickElement('[data-testid="edit-spending-cap-icon"'); + + await driver.fill( + '[data-testid="custom-spending-cap-input"]', + newSpendingCap, + ); + + await driver.delay(largeDelayMs); + + await driver.clickElement({ text: 'Save', tag: 'button' }); + + // wait for the confirmation to be updated before submitting tx + await driver.delay(veryLargeDelayMs * 2); +} + +export async function assertChangedSpendingCap( + driver: Driver, + newSpendingCap: string, +) { + await driver.switchToWindowWithTitle(WINDOW_TITLES.ExtensionInFullScreenView); + + await driver.clickElement({ text: 'Activity', tag: 'button' }); + + await driver.delay(veryLargeDelayMs); + + await driver.clickElement( + '.transaction-list__completed-transactions .activity-list-item:nth-of-type(1)', + ); + + await driver.waitForSelector({ + text: `${newSpendingCap} TST`, + tag: 'span', + }); + + await driver.waitForSelector({ text: 'Confirmed', tag: 'div' }); +} + +export async function mocked4BytesApprove(mockServer: MockttpServer) { + return await mockServer + .forGet('https://www.4byte.directory/api/v1/signatures/') + .always() + .withQuery({ hex_signature: '0x095ea7b3' }) + .thenCallback(() => ({ + statusCode: 200, + json: { + count: 1, + next: null, + previous: null, + results: [ + { + id: 149, + created_at: '2016-07-09T03:58:29.617584Z', + text_signature: 'approve(address,uint256)', + hex_signature: '0x095ea7b3', + bytes_signature: '\t^§³', + }, + ], + }, + })); +} From 933bd1bdc172c686d5c834382c59f4b12132396a Mon Sep 17 00:00:00 2001 From: Salim TOUBAL Date: Thu, 16 Jan 2025 19:41:22 +0100 Subject: [PATCH 43/65] fix: add soneium logo (#29713) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Adding Soneium Mainnet and Soneium Testnet [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29686?quickstart=1) ## **Related issues** Fixes: N/A ## **Manual testing steps** 1. Adding Soneium network to the metamask image 2. Click the Metamask icon to add network 3. Open Metamask extension to check the network and token icons Open Metamask extension to check the network and token icons ## **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/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 - [ ] 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/main/.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. Co-authored-by: sahar-fehri --- app/images/soneium.svg | 5 +++++ shared/constants/network.ts | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 app/images/soneium.svg diff --git a/app/images/soneium.svg b/app/images/soneium.svg new file mode 100644 index 000000000000..f045afaef99a --- /dev/null +++ b/app/images/soneium.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/shared/constants/network.ts b/shared/constants/network.ts index 38e687e180ce..9e520a08c7b3 100644 --- a/shared/constants/network.ts +++ b/shared/constants/network.ts @@ -233,6 +233,8 @@ export const CHAINLIST_CHAIN_IDS_MAP = { GRAVITY_ALPHA_TESTNET_SEPOLIA: '0x34c1', INK_SEPOLIA: '0xba5ed', INK: '0xdef1', + SONEIUM_MAINNET: '0x74c', + SONEIUM_TESTNET: '0x79a', } as const; // To add a deprecation warning to a network, add it to the array @@ -284,7 +286,7 @@ export const BERACHAIN_DISPLAY_NAME = 'Berachain Artio'; export const METACHAIN_ONE_DISPLAY_NAME = 'Metachain One Mainnet'; export const INK_SEPOLIA_DISPLAY_NAME = 'Ink Sepolia'; export const INK_DISPLAY_NAME = 'Ink Mainnet'; - +export const SONEIUM_DISPLAY_NAME = 'Soneium Mainnet'; export const infuraProjectId = process.env.INFURA_PROJECT_ID; export const getRpcUrl = ({ network, @@ -406,6 +408,8 @@ const CHAINLIST_CURRENCY_SYMBOLS_MAP = { ACALA_NETWORK: 'ACA', IOTEX_MAINNET: 'IOTX', APE: 'APE', + SONEIUM_MAINNET: 'ETH', + SONEIUM_TESTNET: 'ETH', } as const; export const CHAINLIST_CURRENCY_SYMBOLS_MAP_NETWORK_COLLISION = { @@ -491,6 +495,7 @@ export const GRAVITY_ALPHA_MAINNET_IMAGE_URL = './images/gravity.svg'; export const GRAVITY_ALPHA_TESTNET_SEPOLIA_IMAGE_URL = './images/gravity.svg'; export const INK_SEPOLIA_IMAGE_URL = './images/ink-sepolia.svg'; export const INK_IMAGE_URL = './images/ink.svg'; +export const SONEIUM_IMAGE_URL = './images/soneium.svg'; export const INFURA_PROVIDER_TYPES = [ NETWORK_TYPES.MAINNET, @@ -718,6 +723,10 @@ export const CHAIN_ID_TO_CURRENCY_SYMBOL_MAP = { CHAINLIST_CURRENCY_SYMBOLS_MAP.ACALA_NETWORK, [CHAINLIST_CHAIN_IDS_MAP.IOTEX_MAINNET]: CHAINLIST_CURRENCY_SYMBOLS_MAP.IOTEX_MAINNET, + [CHAINLIST_CHAIN_IDS_MAP.SONEIUM_MAINNET]: + CHAINLIST_CURRENCY_SYMBOLS_MAP.SONEIUM_MAINNET, + [CHAINLIST_CHAIN_IDS_MAP.SONEIUM_TESTNET]: + CHAINLIST_CURRENCY_SYMBOLS_MAP.SONEIUM_TESTNET, } as const; /** @@ -837,6 +846,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = { GRAVITY_ALPHA_TESTNET_SEPOLIA_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.INK_SEPOLIA]: INK_SEPOLIA_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.INK]: INK_IMAGE_URL, + [CHAINLIST_CHAIN_IDS_MAP.SONEIUM_MAINNET]: SONEIUM_IMAGE_URL, + [CHAINLIST_CHAIN_IDS_MAP.SONEIUM_TESTNET]: SONEIUM_IMAGE_URL, } as const; export const CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP = { From e825061d0eb7e79434b7b8db525dd6270320887b Mon Sep 17 00:00:00 2001 From: sahar-fehri Date: Thu, 16 Jan 2025 20:03:39 +0100 Subject: [PATCH 44/65] fix: remove check for changeX token from test (#29752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** PR to temporarily fix flakey test in [CI](https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/119494/workflows/3c063d9c-ca1f-49f2-82fd-f6a7ed3806d3/jobs/4457831/tests). The error suggests that its looking for token "Changex" in the [UI](https://circleci-tasks-prod.s3.us-east-1.amazonaws.com/storage/artifacts/fb281712-ea41-446f-b28f-c0bea18842cc/f44a10a1-324a-479a-a517-ac7449f04940/3/test-artifacts/undefined/Import%20flow%20allows%20importing%20multiple%20tokens%20from%20search/test-failure-screenshot-1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQVFQINEOHHHIDJFC%2F20250116%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250116T154238Z&X-Amz-Expires=60&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEFAaCXVzLWVhc3QtMSJIMEYCIQCs2Dbc66EZ3NDFwl31fBUwbUHDvig5d3rz7Gepa5PtKAIhAOFgadFo%2FY3lQAUmNRK7KNiJAxCUfG2i%2BCg25Xo2mYkcKqsCCEkQAxoMMDQ1NDY2ODA2NTU2Igy8sIzMomt82TDhPeMqiAKCPwJH6LSQMfhw3vc9jmERRbkspocJk0T4IiS8X%2FS2imb2LWD6242leJdrbg6V8V0WaR0s4V09Fc%2Fyncs6fp5fFGFp7VZ6FDY5ya1tRxkKjPhS1RlPwIHEWZz%2FOy%2BAJnkkKk4y6Zy%2F9%2B1sEYowXjUxkAfepTw%2BF62cXQakg3DpJKFTA0K01rEqg0bqGketptqF3xJwPiF%2BteDiDm1qZ3mWiPdgEzyGruxg9YIlXbdKoAQ9q3l%2Fwe%2Bl76RGVK84kyNZdCEim2NjdzRljDPM9im2rrvbgOKkrSjYt7U%2BEiHXV%2FH%2Fbz3sG%2BPbdF0eGa1B%2BaEAtdGrzr807A82qe4qY5v%2FEtxpoDGu3pMw%2F9CkvAY6nAFHOiiHsiyoFyynYILU5LwrACm1puVGJ6HdwXc5kTfP0tdKlVp03AfHIg2q%2BvYjYEQDE%2B%2FTlKRAvGWFlxwVmr45mc1R590X2wgazjuME9XeLbh6Xk2MCO0AowwPFcMTCYCObWY8LQb9%2FjeW9pNN83A80l8x1GyEyjnsEvLvyKF8C9mbs4euKXpWKBaIwUylIUzYjMzW3b3PPesUggk%3D&X-Amz-SignedHeaders=host&x-id=GetObject&X-Amz-Signature=ada9d7c63c7365144357b1e735a84dea6beb5f244aa0c1a03c57b8526b7b857d); while looking at the screenshot from CI the token imported is "changeX"; So the check in the test should be more like `await tokenList.check_tokenIsDisplayed('ChangeX');` and not `await tokenList.check_tokenIsDisplayed('Changex');` In this PR i have removed the check from the test to unblock CI. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29752?quickstart=1) ## **Related issues** Fixes: Related: https://github.com/MetaMask/metamask-extension/issues/29750 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- test/e2e/tests/tokens/import-tokens.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/tests/tokens/import-tokens.spec.ts b/test/e2e/tests/tokens/import-tokens.spec.ts index 0a840a1ee304..245381c8d285 100644 --- a/test/e2e/tests/tokens/import-tokens.spec.ts +++ b/test/e2e/tests/tokens/import-tokens.spec.ts @@ -82,7 +82,8 @@ describe('Import flow', function () { await tokenList.check_tokenItemNumber(5); // Linea & Mainnet Eth await tokenList.check_tokenIsDisplayed('Ethereum'); await tokenList.check_tokenIsDisplayed('Chain Games'); - await tokenList.check_tokenIsDisplayed('Changex'); + // TODO: add back this check once we figure out why tokens name displayed when running the test locally is changex but on CI it is ChangeX + // await tokenList.check_tokenIsDisplayed('Changex'); await tokenList.check_tokenIsDisplayed('Chai'); }, ); From fd6b18086ec775bca0d0bc7b6d205da0a15cf25d Mon Sep 17 00:00:00 2001 From: Priya Date: Thu, 16 Jan 2025 20:26:36 +0100 Subject: [PATCH 45/65] test: fix flaky erc1155 set approval for all tests (#29467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Fixes the flkay set approval for all tests. Also improved the click element retry logic to also include ElementClickInterceptedError and ElementNotInteractableError. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29467?quickstart=1) ## **Related issues** Fixes: [#28816](https://github.com/MetaMask/metamask-extension/issues/28816) ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- .vscode/cspell.json | 2 ++ ...erc1155-set-approval-for-all-redesign.spec.ts | 1 + test/e2e/webdriver/driver.js | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index a8c5ea9d864e..20c4fdd8c3ca 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -50,6 +50,7 @@ "FONTCONFIG", "hardfork", "hexstring", + "Interactable", "jazzicon", "keccak", "lavadome", @@ -69,6 +70,7 @@ "pipefail", "quickstart", "recompiles", + "retryable", "shellcheck", "SIWE", "sourcemaps", diff --git a/test/e2e/tests/confirmations/transactions/erc1155-set-approval-for-all-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/erc1155-set-approval-for-all-redesign.spec.ts index cbb85482e6f1..e2a78bac8fd3 100644 --- a/test/e2e/tests/confirmations/transactions/erc1155-set-approval-for-all-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/erc1155-set-approval-for-all-redesign.spec.ts @@ -86,6 +86,7 @@ async function createTransactionAssertDetailsAndConfirm( const testDapp = new TestDapp(driver); await testDapp.openTestDappPage({ contractAddress, url: DAPP_URL }); + await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp); await testDapp.clickERC1155SetApprovalForAllButton(); await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index c035a6e6ba7d..d4a454acb4f4 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -609,10 +609,18 @@ class Driver { await element.click(); return; } catch (error) { - if ( - error.name === 'StaleElementReferenceError' && - attempt < retries - 1 - ) { + const retryableErrors = [ + 'StaleElementReferenceError', + 'ElementClickInterceptedError', + 'ElementNotInteractableError', + ]; + + if (retryableErrors.includes(error.name) && attempt < retries - 1) { + console.warn( + `Retrying click (attempt ${attempt + 1}/${retries}) due to: ${ + error.name + }`, + ); await this.delay(1000); } else { throw error; From 08cc02fd63b04eb0fd861ced19701a1fec940e1f Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Thu, 16 Jan 2025 11:52:11 -0800 Subject: [PATCH 46/65] feat: add Lisk network logos (#29762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Adds logos for the list network. Taken from https://github.com/MetaMask/metamask-extension/pull/28763 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29762?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Add the lisk network (mainnet and testnet) from https://chainlist.org/?search=lisk&testnets=true 2. Verify they have icons in the network selector ## **Screenshots/Recordings** ### **Before** ### **After** Screenshot 2025-01-16 at 10 56 14 AM ## **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/main/.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/main/.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/images/lisk.svg | 5 +++++ app/images/lisk_sepolia.svg | 5 +++++ shared/constants/network.ts | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 app/images/lisk.svg create mode 100644 app/images/lisk_sepolia.svg diff --git a/app/images/lisk.svg b/app/images/lisk.svg new file mode 100644 index 000000000000..3f90844a8b5f --- /dev/null +++ b/app/images/lisk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/app/images/lisk_sepolia.svg b/app/images/lisk_sepolia.svg new file mode 100644 index 000000000000..e38de3c9c07a --- /dev/null +++ b/app/images/lisk_sepolia.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/shared/constants/network.ts b/shared/constants/network.ts index 9e520a08c7b3..a33fec836b20 100644 --- a/shared/constants/network.ts +++ b/shared/constants/network.ts @@ -169,6 +169,8 @@ export const CHAIN_IDS = { B3_TESTNET: '0x7c9', GRAVITY_ALPHA_MAINNET: '0x659', GRAVITY_ALPHA_TESTNET_SEPOLIA: '0x34c1', + LISK: '0x46f', + LISK_SEPOLIA: '0x106a', INK_SEPOLIA: '0xba5eD', INK: '0xdef1', } as const; @@ -284,6 +286,8 @@ export const SCROLL_SEPOLIA_DISPLAY_NAME = 'Scroll Sepolia'; export const OP_BNB_DISPLAY_NAME = 'opBNB'; export const BERACHAIN_DISPLAY_NAME = 'Berachain Artio'; export const METACHAIN_ONE_DISPLAY_NAME = 'Metachain One Mainnet'; +export const LISK_DISPLAY_NAME = 'Lisk'; +export const LISK_SEPOLIA_DISPLAY_NAME = 'Lisk Sepolia'; export const INK_SEPOLIA_DISPLAY_NAME = 'Ink Sepolia'; export const INK_DISPLAY_NAME = 'Ink Mainnet'; export const SONEIUM_DISPLAY_NAME = 'Soneium Mainnet'; @@ -408,6 +412,7 @@ const CHAINLIST_CURRENCY_SYMBOLS_MAP = { ACALA_NETWORK: 'ACA', IOTEX_MAINNET: 'IOTX', APE: 'APE', + LISK: 'ETH', SONEIUM_MAINNET: 'ETH', SONEIUM_TESTNET: 'ETH', } as const; @@ -493,6 +498,8 @@ export const B3_IMAGE_URL = './images/b3.svg'; export const APE_IMAGE_URL = './images/ape.svg'; export const GRAVITY_ALPHA_MAINNET_IMAGE_URL = './images/gravity.svg'; export const GRAVITY_ALPHA_TESTNET_SEPOLIA_IMAGE_URL = './images/gravity.svg'; +export const LISK_IMAGE_URL = './images/lisk.svg'; +export const LISK_SEPOLIA_IMAGE_URL = './images/lisk_sepolia.svg'; export const INK_SEPOLIA_IMAGE_URL = './images/ink-sepolia.svg'; export const INK_IMAGE_URL = './images/ink.svg'; export const SONEIUM_IMAGE_URL = './images/soneium.svg'; @@ -606,6 +613,8 @@ export const NETWORK_TO_NAME_MAP = { [CHAIN_IDS.ZKSYNC_ERA]: ZK_SYNC_ERA_DISPLAY_NAME, [CHAIN_IDS.BERACHAIN]: BERACHAIN_DISPLAY_NAME, [CHAIN_IDS.METACHAIN_ONE]: METACHAIN_ONE_DISPLAY_NAME, + [CHAIN_IDS.LISK]: LISK_DISPLAY_NAME, + [CHAIN_IDS.LISK_SEPOLIA]: LISK_SEPOLIA_DISPLAY_NAME, } as const; export const CHAIN_ID_TO_CURRENCY_SYMBOL_MAP = { @@ -844,6 +853,8 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = { GRAVITY_ALPHA_MAINNET_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.GRAVITY_ALPHA_TESTNET_SEPOLIA]: GRAVITY_ALPHA_TESTNET_SEPOLIA_IMAGE_URL, + [CHAINLIST_CHAIN_IDS_MAP.LISK]: LISK_IMAGE_URL, + [CHAINLIST_CHAIN_IDS_MAP.LISK_SEPOLIA]: LISK_SEPOLIA_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.INK_SEPOLIA]: INK_SEPOLIA_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.INK]: INK_IMAGE_URL, [CHAINLIST_CHAIN_IDS_MAP.SONEIUM_MAINNET]: SONEIUM_IMAGE_URL, From cdd603c56211d1d483d87e5ee3fea27aadd66fda Mon Sep 17 00:00:00 2001 From: jiexi Date: Thu, 16 Jan 2025 13:09:09 -0800 Subject: [PATCH 47/65] fix: Fix `EditAccountsModal` and `EditNetworkModal` checkboxes reseting back to default on rerender (#29755) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Fixes a bug in the `EditAccountsModal` and `EditNetworkModal` that occasionally causes any changes to the default selected checkboxes to be reset on component rerender. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29755?quickstart=1) ## **Related issues** See: https://github.com/MetaMask/metamask-extension/pull/27847#discussion_r1917444716 ## **Manual testing steps** 1. For a dapp with permissions 2. In the wallet UI, edit the dapp permissions 3. Open the edit network modal 4. Change some checkboxes to be different from what was default selected 5. Wait 6. The checkboxes should not revert back to the default selected Do the same for the edit accounts modal ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- .../multichain/edit-accounts-modal/edit-accounts-modal.tsx | 5 ++++- .../multichain/edit-networks-modal/edit-networks-modal.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx b/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx index ddc2749e2ee7..4343b646052d 100644 --- a/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx +++ b/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx @@ -60,7 +60,10 @@ export const EditAccountsModal: React.FC = ({ useEffect(() => { setSelectedAccountAddresses(defaultSelectedAccountAddresses); - }, [defaultSelectedAccountAddresses]); + }, [ + // TODO: Fix the source of this prop value to be the same array instance each render + JSON.stringify(defaultSelectedAccountAddresses), + ]); const selectAll = () => { const allNetworksAccountAddresses = accounts.map(({ address }) => address); diff --git a/ui/components/multichain/edit-networks-modal/edit-networks-modal.js b/ui/components/multichain/edit-networks-modal/edit-networks-modal.js index 0b86716af50a..ba10e2bc9a02 100644 --- a/ui/components/multichain/edit-networks-modal/edit-networks-modal.js +++ b/ui/components/multichain/edit-networks-modal/edit-networks-modal.js @@ -52,7 +52,10 @@ export const EditNetworksModal = ({ useEffect(() => { setSelectedChainIds(defaultSelectedChainIds); - }, [defaultSelectedChainIds]); + }, [ + // TODO: Fix the source of this prop value to be the same array instance each render + JSON.stringify(defaultSelectedChainIds), + ]); const selectAll = () => { const allNetworksChainIds = allNetworks.map(({ chainId }) => chainId); From f503a480980ecc22e4b9044fbd2d812844f167ee Mon Sep 17 00:00:00 2001 From: Micaela Estabillo <100321200+micaelae@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:42:23 -0800 Subject: [PATCH 48/65] chore: remove bridge src token list from controller state (#29492) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This reduces data stored in the BridgeController by removing stored bridge-specific token lists, and reusing token data from the assets controllers instead. Changes - **AssetList**: compare symbols in order to determine which token to highlight as "selected" - **AssetPickerModal**: fetch topAssets list on network change, yield tokens with balances first - **pages/bridge**: remove custom src token list (falls back to AssetPicker's default list) - **bridge-controller, ducks/bridge**: remove src token methods and states - **hooks/bridge**: remove allowlist check for tokens since these have moved to the bridge-api [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29492?quickstart=1) ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MMS-1825 Depends on https://github.com/consensys-vertical-apps/va-mmcx-bridge-api/pull/136 ## **Manual testing steps** 1. Verify that Swap+Send token allowlists have not changed 2. Verify that Send token allowlists have not changed 3. Bridging 137:BNB -> 10:USDC should result in no quotes 4. Bridging 10:USDC -> 137:USDC should result in no quotes 5. Bridge src token should be pre-filled when navigating from asset page 6. Bridge inputs should be restored after fetching quotes and reopening extension ## **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/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-extension/blob/main/.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/scripts/constants/sentry-state.ts | 3 - .../bridge/bridge-controller.test.ts | 35 +---- .../controllers/bridge/bridge-controller.ts | 20 --- app/scripts/controllers/bridge/constants.ts | 3 - app/scripts/controllers/bridge/types.ts | 1 - app/scripts/metamask-controller.js | 4 - shared/types/bridge.ts | 4 - test/e2e/default-fixture.js | 2 - test/e2e/fixture-builder.js | 2 - test/e2e/tests/metrics/errors.spec.js | 1 - ...rs-after-init-opt-in-background-state.json | 2 - .../errors-after-init-opt-in-ui-state.json | 2 - ...s-before-init-opt-in-background-state.json | 4 +- .../errors-before-init-opt-in-ui-state.json | 4 +- .../asset-picker-modal/AssetList.tsx | 9 +- .../asset-picker-modal/asset-picker-modal.tsx | 60 ++++--- ui/ducks/bridge/actions.ts | 11 -- ui/ducks/bridge/bridge.test.ts | 18 --- ui/ducks/bridge/selectors.test.ts | 37 ----- ui/ducks/bridge/selectors.ts | 36 ++--- ui/ducks/bridge/utils.ts | 3 +- .../useTokensWithFiltering.test.ts.snap | 147 +----------------- ui/hooks/bridge/useBridgeTokens.ts | 39 ----- .../bridge/useTokensWithFiltering.test.ts | 51 +----- ui/hooks/bridge/useTokensWithFiltering.ts | 18 +-- ui/hooks/useTokensToSearch.js | 1 + ui/pages/bridge/index.tsx | 17 +- .../bridge/prepare/prepare-bridge-page.tsx | 67 ++++---- 28 files changed, 109 insertions(+), 492 deletions(-) delete mode 100644 ui/hooks/bridge/useBridgeTokens.ts diff --git a/app/scripts/constants/sentry-state.ts b/app/scripts/constants/sentry-state.ts index 91fb10f4efc7..00cb8606b6a9 100644 --- a/app/scripts/constants/sentry-state.ts +++ b/app/scripts/constants/sentry-state.ts @@ -110,9 +110,6 @@ export const SENTRY_BACKGROUND_STATE = { destTokens: {}, destTopAssets: [], destTokensLoadingStatus: true, - srcTokens: {}, - srcTopAssets: [], - srcTokensLoadingStatus: true, quoteRequest: { walletAddress: false, srcTokenAddress: true, diff --git a/app/scripts/controllers/bridge/bridge-controller.test.ts b/app/scripts/controllers/bridge/bridge-controller.test.ts index e35d3c41e67c..1c4864370b6b 100644 --- a/app/scripts/controllers/bridge/bridge-controller.test.ts +++ b/app/scripts/controllers/bridge/bridge-controller.test.ts @@ -11,8 +11,8 @@ import mockBridgeQuotesErc20Native from '../../../../test/data/bridge/mock-quote import mockBridgeQuotesNativeErc20 from '../../../../test/data/bridge/mock-quotes-native-erc20.json'; import mockBridgeQuotesNativeErc20Eth from '../../../../test/data/bridge/mock-quotes-native-erc20-eth.json'; import { - type QuoteResponse, RequestStatus, + type QuoteResponse, } from '../../../../shared/types/bridge'; import { decimalToHex } from '../../../../shared/modules/conversion.utils'; import BridgeController from './bridge-controller'; @@ -198,39 +198,6 @@ describe('BridgeController', function () { }); }); - it('selectSrcNetwork should set the bridge src tokens and top assets', async function () { - await bridgeController.selectSrcNetwork('0xa'); - expect(bridgeController.state.bridgeState.srcTokens).toStrictEqual({ - '0x0000000000000000000000000000000000000000': { - address: '0x0000000000000000000000000000000000000000', - decimals: 18, - iconUrl: './images/eth_logo.svg', - name: 'Ether', - symbol: 'ETH', - }, - '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984': { - address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', - symbol: 'ABC', - decimals: 16, - aggregators: ['lifl', 'socket'], - }, - }); - expect( - bridgeController.state.bridgeState.srcTokensLoadingStatus, - ).toStrictEqual(RequestStatus.FETCHED); - expect(bridgeController.state.bridgeState.srcTopAssets).toStrictEqual([ - { - address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', - symbol: 'ABC', - }, - ]); - expect(bridgeController.state.bridgeState.quoteRequest).toStrictEqual({ - slippage: 0.5, - srcTokenAddress: '0x0000000000000000000000000000000000000000', - walletAddress: undefined, - }); - }); - it('updateBridgeQuoteRequestParams should update the quoteRequest state', function () { bridgeController.updateBridgeQuoteRequestParams({ srcChainId: 1 }); expect(bridgeController.state.bridgeState.quoteRequest).toStrictEqual({ diff --git a/app/scripts/controllers/bridge/bridge-controller.ts b/app/scripts/controllers/bridge/bridge-controller.ts index 005e2d334e9f..2c1c43fa6ed1 100644 --- a/app/scripts/controllers/bridge/bridge-controller.ts +++ b/app/scripts/controllers/bridge/bridge-controller.ts @@ -96,10 +96,6 @@ export default class BridgeController extends StaticIntervalPollingController
{ - this.update((state) => { - state.bridgeState.srcTokensLoadingStatus = RequestStatus.LOADING; - return state; - }); - try { - await this.#setTopAssets(chainId, 'srcTopAssets'); - await this.#setTokens(chainId, 'srcTokens'); - } finally { - this.update((state) => { - state.bridgeState.srcTokensLoadingStatus = RequestStatus.FETCHED; - return state; - }); - } - }; - selectDestNetwork = async (chainId: Hex) => { this.update((state) => { state.bridgeState.destTokensLoadingStatus = RequestStatus.LOADING; diff --git a/app/scripts/controllers/bridge/constants.ts b/app/scripts/controllers/bridge/constants.ts index 65e2840cfb73..b6c07044adc5 100644 --- a/app/scripts/controllers/bridge/constants.ts +++ b/app/scripts/controllers/bridge/constants.ts @@ -20,10 +20,7 @@ export const DEFAULT_BRIDGE_CONTROLLER_STATE: BridgeControllerState = { chains: {}, }, }, - srcTokens: {}, - srcTokensLoadingStatus: undefined, destTokensLoadingStatus: undefined, - srcTopAssets: [], destTokens: {}, destTopAssets: [], quoteRequest: { diff --git a/app/scripts/controllers/bridge/types.ts b/app/scripts/controllers/bridge/types.ts index 811b8dfb119b..a417ddc4d074 100644 --- a/app/scripts/controllers/bridge/types.ts +++ b/app/scripts/controllers/bridge/types.ts @@ -25,7 +25,6 @@ type BridgeControllerActions = | BridgeControllerAction | BridgeControllerAction | BridgeControllerAction - | BridgeControllerAction | BridgeControllerAction | BridgeControllerAction; diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index fa714cc1847c..9709c081b834 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -4179,10 +4179,6 @@ export default class MetamaskController extends EventEmitter { this.controllerMessenger, `${BRIDGE_CONTROLLER_NAME}:${BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE}`, ), - [BridgeUserAction.SELECT_SRC_NETWORK]: this.controllerMessenger.call.bind( - this.controllerMessenger, - `${BRIDGE_CONTROLLER_NAME}:${BridgeUserAction.SELECT_SRC_NETWORK}`, - ), [BridgeUserAction.SELECT_DEST_NETWORK]: this.controllerMessenger.call.bind( this.controllerMessenger, diff --git a/shared/types/bridge.ts b/shared/types/bridge.ts index 763c2670abad..b688164e9879 100644 --- a/shared/types/bridge.ts +++ b/shared/types/bridge.ts @@ -175,7 +175,6 @@ export enum RequestStatus { ERROR, } export enum BridgeUserAction { - SELECT_SRC_NETWORK = 'selectSrcNetwork', SELECT_DEST_NETWORK = 'selectDestNetwork', UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams', } @@ -186,9 +185,6 @@ export enum BridgeBackgroundAction { } export type BridgeControllerState = { bridgeFeatureFlags: BridgeFeatureFlags; - srcTokens: Record; - srcTopAssets: { address: string }[]; - srcTokensLoadingStatus?: RequestStatus; destTokensLoadingStatus?: RequestStatus; destTokens: Record; destTopAssets: { address: string }[]; diff --git a/test/e2e/default-fixture.js b/test/e2e/default-fixture.js index 51338fd3eea8..674b1146688b 100644 --- a/test/e2e/default-fixture.js +++ b/test/e2e/default-fixture.js @@ -140,8 +140,6 @@ function defaultFixture(inputChainId = CHAIN_IDS.LOCALHOST) { }, destTokens: {}, destTopAssets: [], - srcTokens: {}, - srcTopAssets: [], }, }, CurrencyController: { diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 3c1128331ba6..6a629f97f503 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -457,8 +457,6 @@ class FixtureBuilder { }, destTokens: {}, destTopAssets: [], - srcTokens: {}, - srcTopAssets: [], }, }; return this; diff --git a/test/e2e/tests/metrics/errors.spec.js b/test/e2e/tests/metrics/errors.spec.js index aaa5c0536485..d22f71524120 100644 --- a/test/e2e/tests/metrics/errors.spec.js +++ b/test/e2e/tests/metrics/errors.spec.js @@ -875,7 +875,6 @@ describe('Sentry errors', function () { walletAddress: false, }, destTokensLoadingStatus: false, - srcTokensLoadingStatus: false, quotesLastFetched: true, quotesLoadingStatus: true, quotesRefreshCount: true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 0df251bd7661..770b8e251c08 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -69,8 +69,6 @@ "chains": { "0x1": "object", "0xa4b1": "object", "0xe708": "object" } } }, - "srcTokens": {}, - "srcTopAssets": {}, "destTokens": {}, "destTopAssets": {}, "quoteRequest": { diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index ab3681c55088..4c63b10e175d 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -340,8 +340,6 @@ "chains": { "0x1": "object", "0xa4b1": "object", "0xe708": "object" } } }, - "srcTokens": {}, - "srcTopAssets": {}, "destTokens": {}, "destTopAssets": {}, "quoteRequest": { diff --git a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json index c85bf92f4334..7482981d32d7 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json @@ -152,9 +152,7 @@ } }, "destTokens": {}, - "destTopAssets": {}, - "srcTokens": {}, - "srcTopAssets": {} + "destTopAssets": {} } }, "SubjectMetadataController": { "subjectMetadata": "object" }, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json index f86a5278e054..c3b3f3634ac5 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json @@ -161,9 +161,7 @@ } }, "destTokens": {}, - "destTopAssets": {}, - "srcTokens": {}, - "srcTopAssets": {} + "destTopAssets": {} } }, "TransactionController": { "transactions": "object" }, 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 7693aaef4382..afbaae178f2c 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 @@ -64,7 +64,6 @@ export default function AssetList({ assetItemProps = {}, }: AssetListProps) { const t = useI18nContext(); - const selectedTokenAddress = asset?.address; const currentNetwork = useSelector(getCurrentNetwork); // If a network is provided, display tokens in that network @@ -101,11 +100,9 @@ export default function AssetList({ const isMatchingChainId = token.chainId === networkToUse?.chainId; const isMatchingAddress = - // the native asset can have an undefined, null, '', or zero address - (token.type === AssetType.native && - !token.address && - !selectedTokenAddress) || - tokenAddress === selectedTokenAddress?.toLowerCase(); + // the native asset can have an undefined, null, '', or zero address so compare symbols + (token.type === AssetType.native && token.symbol === asset?.symbol) || + tokenAddress === asset?.address?.toLowerCase(); const isSelected = isMatchingChainId && isMatchingAddress; const isDisabled = isTokenDisabled?.(token) ?? false; diff --git a/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx b/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx index 670d3be14344..b9c212da8ea0 100644 --- a/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx +++ b/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx @@ -42,6 +42,7 @@ import { getShouldHideZeroBalanceTokens, getTokenExchangeRates, getTokenList, + getUseExternalServices, } from '../../../../selectors'; import { getConversionRate, @@ -49,7 +50,6 @@ import { getNativeCurrency, } from '../../../../ducks/metamask/metamask'; import { useTokenTracker } from '../../../../hooks/useTokenTracker'; -import { getTopAssets } from '../../../../ducks/swaps/swaps'; import { getRenderableTokenData } from '../../../../hooks/useTokensToSearch'; import { getSwapsBlockedTokens } from '../../../../ducks/send'; import { isEqualCaseInsensitive } from '../../../../../shared/modules/string-utils'; @@ -60,6 +60,8 @@ import { import { useMultichainBalances } from '../../../../hooks/useMultichainBalances'; import { AvatarType } from '../../avatar-group/avatar-group.types'; import { NETWORK_TO_SHORT_NETWORK_NAME_MAP } from '../../../../../shared/constants/bridge'; +import { useAsyncResult } from '../../../../hooks/useAsyncResult'; +import { fetchTopAssetsList } from '../../../../pages/swaps/swaps.util'; import { ERC20Asset, NativeAsset, @@ -183,9 +185,19 @@ export function AssetPickerModal({ const { assetsWithBalance: multichainTokensWithBalance } = useMultichainBalances(); - // Swaps token list const tokenList = useSelector(getTokenList) as TokenListMap; - const topTokens = useSelector(getTopAssets, isEqual); + + const allowExternalServices = useSelector(getUseExternalServices); + // Swaps top tokens + const { value: topTokensResponse } = useAsyncResult< + { address: string }[] | undefined + >(async () => { + if (allowExternalServices && selectedNetwork?.chainId) { + return await fetchTopAssetsList(selectedNetwork.chainId); + } + return undefined; + }, [selectedNetwork?.chainId, allowExternalServices]); + const topTokens = topTokensResponse ?? []; const getIsDisabled = useCallback( ({ @@ -212,6 +224,18 @@ export function AssetPickerModal({ ); }, [tokensWithBalances, tokens]); + /** + * Generates a list of tokens sorted in this order + * - native tokens with balance + * - tokens with highest to lowest balance in selected currency + * - selected network's native token + * - matches URL token parameter + * - matches search query + * - detected tokens (without balance) + * - popularity + * - all other tokens + * - blocked tokens + */ const tokenListGenerator = useCallback( function* ( shouldAddToken: ( @@ -227,6 +251,18 @@ export function AssetPickerModal({ string?: string; }) > { + const blockedTokens = []; + + // Yield multichain tokens with balances + if (isMultiselectEnabled) { + for (const token of multichainTokensWithBalance) { + if (shouldAddToken(token.symbol, token.address, token.chainId)) { + yield token; + } + } + } + + // Yield the native token for the selected chain const nativeToken: AssetWithDisplayData = { address: null, symbol: nativeCurrency, @@ -248,26 +284,15 @@ export function AssetPickerModal({ yield nativeToken; } - const blockedTokens = []; - - // Yield multichain tokens with balances - if (isMultiselectEnabled) { - for (const token of multichainTokensWithBalance) { - if (shouldAddToken(token.symbol, token.address, token.chainId)) { - yield token; - } - } - } - for (const token of memoizedUsersTokens) { if (shouldAddToken(token.symbol, token.address, currentChainId)) { yield { ...token, chainId: currentChainId }; } } - // topTokens should already be sorted by popularity - for (const address of Object.keys(topTokens)) { - const token = tokenList?.[address]; + // topTokens are sorted by popularity + for (const topToken of topTokens) { + const token = tokenList?.[topToken.address]; if ( token && shouldAddToken(token.symbol, token.address, currentChainId) @@ -384,7 +409,6 @@ export function AssetPickerModal({ customTokenListGenerator, isMultiselectEnabled, selectedChainIds, - isMultiselectEnabled, selectedNetwork, ]); diff --git a/ui/ducks/bridge/actions.ts b/ui/ducks/bridge/actions.ts index e2ea02bad39d..467cffc52267 100644 --- a/ui/ducks/bridge/actions.ts +++ b/ui/ducks/bridge/actions.ts @@ -68,17 +68,6 @@ export const resetBridgeState = () => { }; // User actions -export const setFromChain = (chainId: Hex) => { - return async (dispatch: MetaMaskReduxDispatch) => { - dispatch( - callBridgeControllerMethod( - BridgeUserAction.SELECT_SRC_NETWORK, - chainId, - ), - ); - }; -}; - export const setToChain = (chainId: Hex) => { return async (dispatch: MetaMaskReduxDispatch) => { dispatch( diff --git a/ui/ducks/bridge/bridge.test.ts b/ui/ducks/bridge/bridge.test.ts index 30e2f0fe880a..a4123df75a01 100644 --- a/ui/ducks/bridge/bridge.test.ts +++ b/ui/ducks/bridge/bridge.test.ts @@ -17,7 +17,6 @@ import { setFromTokenInputValue, setToChain, setToToken, - setFromChain, resetInputFields, setToChainId, updateQuoteRequestParams, @@ -136,23 +135,6 @@ describe('Ducks - Bridge', () => { }); }); - describe('setFromChain', () => { - it('calls the selectSrcNetwork background action', async () => { - const mockSelectSrcNetwork = jest.fn().mockReturnValue({}); - setBackgroundConnection({ - [BridgeUserAction.SELECT_SRC_NETWORK]: mockSelectSrcNetwork, - } as never); - - await store.dispatch(setFromChain(CHAIN_IDS.MAINNET) as never); - - expect(mockSelectSrcNetwork).toHaveBeenCalledTimes(1); - expect(mockSelectSrcNetwork).toHaveBeenCalledWith( - '0x1', - expect.anything(), - ); - }); - }); - describe('resetInputFields', () => { it('resets to initalState', async () => { const state = store.getState().bridge; diff --git a/ui/ducks/bridge/selectors.test.ts b/ui/ducks/bridge/selectors.test.ts index f44b5d8dacea..e2d411148fb4 100644 --- a/ui/ducks/bridge/selectors.test.ts +++ b/ui/ducks/bridge/selectors.test.ts @@ -22,7 +22,6 @@ import { getFromChain, getFromChains, getFromToken, - getFromTokens, getIsBridgeTx, getToChain, getToChains, @@ -499,42 +498,6 @@ describe('Bridge selectors', () => { }); }); - describe('getFromTokens', () => { - it('returns src tokens from controller state', () => { - const state = createBridgeMockStore({ - bridgeSliceOverrides: { toChainId: '0x1' }, - bridgeStateOverrides: { - srcTokens: { '0x00': { address: '0x00', symbol: 'TEST' } }, - srcTopAssets: [{ address: '0x01', symbol: 'SYMB' }], - }, - }); - const result = getFromTokens(state as never); - - expect(result).toStrictEqual({ - fromTokens: { - '0x00': { address: '0x00', symbol: 'TEST' }, - }, - fromTopAssets: [{ address: '0x01', symbol: 'SYMB' }], - isLoading: false, - }); - }); - - it('returns src top assets from controller state', () => { - const state = createBridgeMockStore({ - bridgeSliceOverrides: { toChainId: '0x1' }, - bridgeStateOverrides: { - srcTokens: { '0x00': { address: '0x00', symbol: 'TEST' } }, - srcTopAssets: [{ address: '0x00', symbol: 'TEST' }], - }, - }); - const result = getFromTokens(state as never); - - expect(result.fromTopAssets).toStrictEqual([ - { address: '0x00', symbol: 'TEST' }, - ]); - }); - }); - describe('getBridgeQuotes', () => { it('returns quote list and fetch data, insufficientBal=false,quotesRefreshCount=5', () => { const state = createBridgeMockStore({ diff --git a/ui/ducks/bridge/selectors.ts b/ui/ducks/bridge/selectors.ts index f86745e69ae3..6ff6b397443e 100644 --- a/ui/ducks/bridge/selectors.ts +++ b/ui/ducks/bridge/selectors.ts @@ -134,20 +134,6 @@ export const getToChain = createDeepEqualSelector( toChains.find(({ chainId }) => chainId === toChainId), ); -export const getFromTokens = createDeepEqualSelector( - (state: BridgeAppState) => state.metamask.bridgeState.srcTokens, - (state: BridgeAppState) => state.metamask.bridgeState.srcTopAssets, - (state: BridgeAppState) => - state.metamask.bridgeState.srcTokensLoadingStatus === RequestStatus.LOADING, - (fromTokens, fromTopAssets, isLoading) => { - return { - isLoading, - fromTokens: fromTokens ?? {}, - fromTopAssets: fromTopAssets ?? [], - }; - }, -); - export const getToTokens = createDeepEqualSelector( (state: BridgeAppState) => state.metamask.bridgeState.destTokens, (state: BridgeAppState) => state.metamask.bridgeState.destTopAssets, @@ -430,16 +416,18 @@ const _getSelectedQuote = createSelector( ); export const getBridgeQuotes = createSelector( - _getSortedQuotesWithMetadata, - _getSelectedQuote, - (state) => state.metamask.bridgeState.quotesLastFetched, - (state) => - state.metamask.bridgeState.quotesLoadingStatus === RequestStatus.LOADING, - (state: BridgeAppState) => state.metamask.bridgeState.quotesRefreshCount, - (state: BridgeAppState) => state.metamask.bridgeState.quotesInitialLoadTime, - (state: BridgeAppState) => state.metamask.bridgeState.quoteFetchError, - getBridgeQuotesConfig, - getQuoteRequest, + [ + _getSortedQuotesWithMetadata, + _getSelectedQuote, + (state) => state.metamask.bridgeState.quotesLastFetched, + (state) => + state.metamask.bridgeState.quotesLoadingStatus === RequestStatus.LOADING, + (state: BridgeAppState) => state.metamask.bridgeState.quotesRefreshCount, + (state: BridgeAppState) => state.metamask.bridgeState.quotesInitialLoadTime, + (state: BridgeAppState) => state.metamask.bridgeState.quoteFetchError, + getBridgeQuotesConfig, + getQuoteRequest, + ], ( sortedQuotesWithMetadata, selectedQuote, diff --git a/ui/ducks/bridge/utils.ts b/ui/ducks/bridge/utils.ts index 050829d3ca65..4a5cbf034007 100644 --- a/ui/ducks/bridge/utils.ts +++ b/ui/ducks/bridge/utils.ts @@ -160,4 +160,5 @@ export const exchangeRatesFromNativeAndCurrencyRates = ( export const isNetworkAdded = ( v: NetworkConfiguration | AddNetworkFields | undefined, ): v is NetworkConfiguration => - !v || 'networkClientId' in v.rpcEndpoints[v.defaultRpcEndpointIndex]; + v !== undefined && + 'networkClientId' in v.rpcEndpoints[v.defaultRpcEndpointIndex]; diff --git a/ui/hooks/bridge/__snapshots__/useTokensWithFiltering.test.ts.snap b/ui/hooks/bridge/__snapshots__/useTokensWithFiltering.test.ts.snap index 8fceeffe9730..80a9a12221a0 100644 --- a/ui/hooks/bridge/__snapshots__/useTokensWithFiltering.test.ts.snap +++ b/ui/hooks/bridge/__snapshots__/useTokensWithFiltering.test.ts.snap @@ -1,74 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`useTokensWithFiltering should not return tokens that are not in the allowlist 1`] = ` -[ - { - "address": "0x0000000000000000000000000000000000000000", - "balance": "0.000000000000000014", - "chainId": "0xe708", - "decimals": 18, - "image": "./images/eth_logo.svg", - "string": "0.000000000000000014", - "symbol": "ETH", - "tokenFiatAmount": 3.53395e-14, - "type": "NATIVE", - }, - { - "address": "0x0000000000000000000000000000000000000000", - "balance": "0.00000000000000001", - "chainId": "0x1", - "decimals": 18, - "image": "./images/eth_logo.svg", - "string": "0.00000000000000001", - "symbol": "ETH", - "tokenFiatAmount": 2.5242500000000003e-14, - "type": "NATIVE", - }, - { - "address": "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2", - "aggregators": [], - "balance": "", - "chainId": "0x1", - "decimals": 18, - "erc20": true, - "erc721": false, - "iconUrl": "images/contract/sushi.svg", - "image": "images/contract/sushi.svg", - "name": "SushiSwap", - "string": undefined, - "symbol": "SUSHI", - "type": "TOKEN", - }, - { - "address": "0x0000000000000000000000000000000000000000", - "balance": "0x0", - "chainId": "0x1", - "decimals": 18, - "iconUrl": "./images/eth_logo.svg", - "image": "./images/eth_logo.svg", - "name": "Ether", - "string": "0x0", - "symbol": "ETH", - "type": "NATIVE", - }, - { - "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "aggregators": [], - "balance": "", - "chainId": "0x1", - "decimals": 18, - "erc20": true, - "iconUrl": "images/contract/uni.svg", - "image": "images/contract/uni.svg", - "name": "Uniswap", - "string": undefined, - "symbol": "UNI", - "type": "TOKEN", - }, -] -`; - -exports[`useTokensWithFiltering should return all tokens when chainId === activeChainId, sorted by balance 1`] = ` +exports[`useTokensWithFiltering should return tokens that are not in the allowlist 1`] = ` [ { "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", @@ -115,78 +47,13 @@ exports[`useTokensWithFiltering should return all tokens when chainId === active }, { "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "balance": "", - "chainId": "0x1", - "decimals": 6, - "string": undefined, - "type": "TOKEN", - }, - { - "address": "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2", - "aggregators": [], - "balance": "", - "chainId": "0x1", - "decimals": 18, - "erc20": true, - "erc721": false, - "iconUrl": "images/contract/sushi.svg", - "image": "images/contract/sushi.svg", - "name": "SushiSwap", - "string": undefined, - "symbol": "SUSHI", - "type": "TOKEN", - }, - { - "address": "0x0000000000000000000000000000000000000000", - "balance": "0x0", - "chainId": "0x1", - "decimals": 18, - "iconUrl": "./images/eth_logo.svg", - "image": "./images/eth_logo.svg", - "name": "Ether", - "string": "0x0", - "symbol": "ETH", - "type": "NATIVE", - }, - { - "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", - "aggregators": [], - "balance": "", - "chainId": "0x1", - "decimals": 18, - "erc20": true, - "iconUrl": "images/contract/uni.svg", - "image": "images/contract/uni.svg", - "name": "Uniswap", - "string": undefined, - "symbol": "UNI", - "type": "TOKEN", - }, - { - "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "aggregators": [], - "balance": "", - "chainId": "0x1", - "decimals": 6, - "erc20": true, - "iconUrl": "images/contract/usdt.svg", - "image": "images/contract/usdt.svg", - "name": "Tether USD", - "string": undefined, - "symbol": "USDT", + "balance": "0", + "chainId": "0xe708", + "image": undefined, + "isNative": false, + "string": "0", + "tokenFiatAmount": null, "type": "TOKEN", }, - { - "address": "0x0000000000000000000000000000000000000000", - "balance": "0x0", - "chainId": "0x1", - "decimals": 18, - "iconUrl": "./images/eth_logo.svg", - "image": "./images/eth_logo.svg", - "name": "Ether", - "string": "0x0", - "symbol": "ETH", - "type": "NATIVE", - }, ] `; diff --git a/ui/hooks/bridge/useBridgeTokens.ts b/ui/hooks/bridge/useBridgeTokens.ts deleted file mode 100644 index 354b90bc4a09..000000000000 --- a/ui/hooks/bridge/useBridgeTokens.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { useEffect, useState } from 'react'; -import { useSelector } from 'react-redux'; -import { getAllBridgeableNetworks } from '../../ducks/bridge/selectors'; -import { fetchBridgeTokens } from '../../../shared/modules/bridge-utils/bridge.util'; - -// This hook is used to fetch the bridge tokens for all bridgeable networks -export const useBridgeTokens = () => { - const allBridgeChains = useSelector(getAllBridgeableNetworks); - - const [tokenAllowlistByChainId, setTokenAllowlistByChainId] = useState< - Record> - >({}); - - useEffect(() => { - const tokenAllowlistPromises = Promise.allSettled( - allBridgeChains.map( - async ({ chainId }) => - await fetchBridgeTokens(chainId).then((tokens) => ({ - [chainId]: new Set(Object.keys(tokens)), - })), - ), - ); - - (async () => { - const results = await tokenAllowlistPromises; - const tokenAllowlistResults = Object.fromEntries( - results.map((result) => { - if (result.status === 'fulfilled') { - return Object.entries(result.value)[0]; - } - return []; - }), - ); - setTokenAllowlistByChainId(tokenAllowlistResults); - })(); - }, [allBridgeChains.length]); - - return tokenAllowlistByChainId; -}; diff --git a/ui/hooks/bridge/useTokensWithFiltering.test.ts b/ui/hooks/bridge/useTokensWithFiltering.test.ts index e6903756bcfd..d7540ec95d27 100644 --- a/ui/hooks/bridge/useTokensWithFiltering.test.ts +++ b/ui/hooks/bridge/useTokensWithFiltering.test.ts @@ -19,7 +19,7 @@ describe('useTokensWithFiltering', () => { jest.clearAllMocks(); }); - it('should return all tokens when chainId === activeChainId, sorted by balance', () => { + it('should return tokens that are not in the allowlist', () => { const mockStore = createBridgeMockStore({ metamaskStateOverrides: { completedOnboarding: true, @@ -48,55 +48,6 @@ describe('useTokensWithFiltering', () => { { address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' }, // USDC { address: '0xdac17f958d2ee523a2206206994597c13d831ec7' }, // USDT ], - { - [CHAIN_IDS.MAINNET]: new Set( - Object.keys(STATIC_MAINNET_TOKEN_LIST), - ), - }, - CHAIN_IDS.MAINNET, - ), - mockStore, - ); - // The first 10 tokens returned - const first10Tokens = [...result.current(() => true)].slice(0, 10); - expect(first10Tokens).toMatchSnapshot(); - }); - - it('should not return tokens that are not in the allowlist', () => { - const mockStore = createBridgeMockStore({ - metamaskStateOverrides: { - completedOnboarding: true, - allDetectedTokens: { - '0x1': { - '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': [ - { - address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', - decimals: 6, - }, // USDC - ], - }, - }, - }, - }); - const { result } = renderHookWithProvider( - () => - useTokensWithFiltering( - { - [NATIVE_TOKEN.address]: NATIVE_TOKEN, - ...STATIC_MAINNET_TOKEN_LIST, - }, - [ - { address: '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2' }, // UNI - { address: NATIVE_TOKEN.address }, - { address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' }, // USDC - { address: '0xdac17f958d2ee523a2206206994597c13d831ec7' }, // USDT - ], - // Only 1 token in allowlist - { - [CHAIN_IDS.MAINNET]: new Set([ - '0x6b3595068778dd592e39a122f4f5a5cf09c90fe2', - ]), - }, CHAIN_IDS.MAINNET, ), mockStore, diff --git a/ui/hooks/bridge/useTokensWithFiltering.ts b/ui/hooks/bridge/useTokensWithFiltering.ts index 61a92b7b9190..1b91a8f245ec 100644 --- a/ui/hooks/bridge/useTokensWithFiltering.ts +++ b/ui/hooks/bridge/useTokensWithFiltering.ts @@ -44,13 +44,11 @@ type FilterPredicate = ( * * @param tokenList - a mapping of token addresses in the selected chainId to token metadata from the bridge-api * @param topTokens - a list of top tokens from the swap-api - * @param tokenAddressAllowlistByChainId - a mapping of all supported chainIds to a Set of allowed token addresses * @param chainId - the selected src/dest chainId */ export const useTokensWithFiltering = ( tokenList: Record, topTokens: { address: string }[], - tokenAddressAllowlistByChainId: Record>, chainId?: ChainId | Hex, ) => { const { token: tokenAddressFromUrl } = useParams(); @@ -103,12 +101,6 @@ export const useTokensWithFiltering = ( }; }; - // This returns whether the token is blocked by any of the supported chainIds - const isTokenBlocked = (tokenAddress: string, tokenChainId: string) => - !tokenAddressAllowlistByChainId[tokenChainId]?.has( - tokenAddress.toLowerCase(), - ); - // shouldAddToken is a filter condition passed in from the AssetPicker that determines whether a token should be included const filteredTokenListGenerator = useCallback( (shouldAddToken: FilterPredicate) => @@ -137,10 +129,7 @@ export const useTokensWithFiltering = ( token.symbol, token.address ?? undefined, token.chainId, - ) && - (token.address - ? !isTokenBlocked(token.address, token.chainId) - : true) + ) ) { // If there's no address, set it to the native address in swaps/bridge yield { ...token, address: token.address || zeroAddress() }; @@ -154,10 +143,7 @@ export const useTokensWithFiltering = ( token.symbol, token.address ?? undefined, token.chainId, - ) && - (token.address - ? !isTokenBlocked(token.address, token.chainId) - : true) + ) ) { yield { ...token, diff --git a/ui/hooks/useTokensToSearch.js b/ui/hooks/useTokensToSearch.js index 657bb0afed09..1b9a9fdda960 100644 --- a/ui/hooks/useTokensToSearch.js +++ b/ui/hooks/useTokensToSearch.js @@ -93,6 +93,7 @@ export function getRenderableTokenData( decimals, name: name || tokenList[address?.toLowerCase()]?.name, rawFiat, + image: token.image || token.iconUrl, }; } diff --git a/ui/pages/bridge/index.tsx b/ui/pages/bridge/index.tsx index 15c3a0365cc9..8be38cc4f58c 100644 --- a/ui/pages/bridge/index.tsx +++ b/ui/pages/bridge/index.tsx @@ -17,11 +17,8 @@ import { ButtonIconSize, IconName, } from '../../components/component-library'; -import { - getCurrentChainId, - getSelectedNetworkClientId, -} from '../../../shared/modules/selectors/networks'; -import { getIsBridgeChain, getIsBridgeEnabled } from '../../selectors'; +import { getSelectedNetworkClientId } from '../../../shared/modules/selectors/networks'; +import { getIsBridgeEnabled } from '../../selectors'; import useBridging from '../../hooks/bridge/useBridging'; import { Content, @@ -30,7 +27,7 @@ import { Page, } from '../../components/multichain/pages/page'; import { useSwapsFeatureFlags } from '../swaps/hooks/useSwapsFeatureFlags'; -import { resetBridgeState, setFromChain } from '../../ducks/bridge/actions'; +import { resetBridgeState } from '../../ducks/bridge/actions'; import { useGasFeeEstimates } from '../../hooks/useGasFeeEstimates'; import { useBridgeExchangeRates } from '../../hooks/bridge/useBridgeExchangeRates'; import { useQuoteFetchEvents } from '../../hooks/bridge/useQuoteFetchEvents'; @@ -51,15 +48,7 @@ const CrossChainSwap = () => { const dispatch = useDispatch(); const isBridgeEnabled = useSelector(getIsBridgeEnabled); - const isBridgeChain = useSelector(getIsBridgeChain); const selectedNetworkClientId = useSelector(getSelectedNetworkClientId); - const chainId = useSelector(getCurrentChainId); - - useEffect(() => { - if (isBridgeChain && isBridgeEnabled && chainId) { - dispatch(setFromChain(chainId)); - } - }, [isBridgeChain, isBridgeEnabled, chainId]); const resetControllerAndInputStates = async () => { await dispatch(resetBridgeState()); diff --git a/ui/pages/bridge/prepare/prepare-bridge-page.tsx b/ui/pages/bridge/prepare/prepare-bridge-page.tsx index 6083a7d6c2e8..653f8869d84f 100644 --- a/ui/pages/bridge/prepare/prepare-bridge-page.tsx +++ b/ui/pages/bridge/prepare/prepare-bridge-page.tsx @@ -10,8 +10,8 @@ import classnames from 'classnames'; import { debounce } from 'lodash'; import { useHistory, useLocation } from 'react-router-dom'; import { BigNumber } from 'bignumber.js'; +import { type TokenListMap } from '@metamask/assets-controllers'; import { - setFromChain, setFromToken, setFromTokenInputValue, setSelectedQuote, @@ -27,7 +27,6 @@ import { getFromChain, getFromChains, getFromToken, - getFromTokens, getQuoteRequest, getSlippage, getToChain, @@ -90,8 +89,7 @@ import useRamps from '../../../hooks/ramps/useRamps/useRamps'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import useLatestBalance from '../../../hooks/bridge/useLatestBalance'; import { useCountdownTimer } from '../../../hooks/bridge/useCountdownTimer'; -import { useBridgeTokens } from '../../../hooks/bridge/useBridgeTokens'; -import { getCurrentKeyring, getLocale } from '../../../selectors'; +import { getCurrentKeyring, getLocale, getTokenList } from '../../../selectors'; import { isHardwareKeyring } from '../../../helpers/utils/hardware'; import { SECOND } from '../../../../shared/constants/time'; import { BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE } from '../../../../shared/constants/bridge'; @@ -104,11 +102,11 @@ const PrepareBridgePage = () => { const t = useI18nContext(); const fromToken = useSelector(getFromToken); - const { - fromTokens, - fromTopAssets, - isLoading: isFromTokensLoading, - } = useSelector(getFromTokens); + const fromTokens = useSelector(getTokenList) as TokenListMap; + const isFromTokensLoading = useMemo( + () => Object.keys(fromTokens).length === 0, + [fromTokens], + ); const toToken = useSelector(getToToken); const { @@ -175,17 +173,9 @@ const PrepareBridgePage = () => { fromChain?.chainId, ); - const tokenAddressAllowlistByChainId = useBridgeTokens(); - const fromTokenListGenerator = useTokensWithFiltering( - fromTokens, - fromTopAssets, - tokenAddressAllowlistByChainId, - fromChain?.chainId, - ); const toTokenListGenerator = useTokensWithFiltering( toTokens, toTopAssets, - tokenAddressAllowlistByChainId, toChain?.chainId, ); @@ -217,22 +207,32 @@ const PrepareBridgePage = () => { }, [rotateSwitchTokens]); useEffect(() => { + // If there's an active quote, assume that the user is returning to the page if (activeQuote) { // Get input data from active quote - const { srcAsset, destAsset, destChainId } = activeQuote.quote; - const quoteSrcToken = fromTokens[srcAsset.address.toLowerCase()]; + const { srcAsset, destAsset, destChainId, srcChainId } = + activeQuote.quote; const quoteDestChainId = decimalToPrefixedHex(destChainId); - const quoteDestToken = toTokens[destAsset.address.toLowerCase()]; + const quoteSrcChainId = decimalToPrefixedHex(srcChainId); - if (quoteSrcToken && quoteDestToken && quoteDestChainId) { + if (srcAsset && destAsset && quoteDestChainId) { // Set inputs to values from active quote - dispatch(setFromTokenInputValue(null)); + dispatch(setToChainId(quoteDestChainId)); dispatch( - setFromToken({ ...quoteSrcToken, image: quoteSrcToken.iconUrl }), + setToToken({ + ...destAsset, + chainId: quoteDestChainId, + image: destAsset.icon, + address: destAsset.address.toLowerCase(), + }), ); - dispatch(setToChainId(quoteDestChainId)); dispatch( - setToToken({ ...quoteDestToken, image: quoteDestToken.iconUrl }), + setFromToken({ + ...srcAsset, + chainId: quoteSrcChainId, + image: srcAsset.icon, + address: srcAsset.address.toLowerCase(), + }), ); } } else { @@ -326,7 +326,7 @@ const PrepareBridgePage = () => { const history = useHistory(); useEffect(() => { - if (!fromChain?.chainId || Object.keys(fromTokens).length === 0) { + if (!fromChain?.chainId || isFromTokensLoading) { return; } @@ -350,10 +350,14 @@ const PrepareBridgePage = () => { removeTokenFromUrl(); break; case fromTokens[tokenAddressFromUrl]?.address?.toLowerCase(): { - // If there is a matching fromToken, set it as the fromToken + // If there is a match, set it as the fromToken const matchedToken = fromTokens[tokenAddressFromUrl]; dispatch( - setFromToken({ ...matchedToken, image: matchedToken.iconUrl }), + setFromToken({ + ...matchedToken, + image: matchedToken.iconUrl, + chainId: fromChain.chainId, + }), ); removeTokenFromUrl(); break; @@ -363,7 +367,7 @@ const PrepareBridgePage = () => { removeTokenFromUrl(); break; } - }, [fromChain, fromToken, fromTokens, search]); + }, [fromChain, fromToken, fromTokens, search, isFromTokensLoading]); return ( @@ -404,16 +408,12 @@ const PrepareBridgePage = () => { ), ); } - dispatch(setFromChain(networkConfig.chainId)); dispatch(setFromToken(null)); dispatch(setFromTokenInputValue(null)); }, header: t('yourNetworks'), }} isMultiselectEnabled - customTokenListGenerator={ - fromTokens && fromTopAssets ? fromTokenListGenerator : undefined - } onMaxButtonClick={(value: string) => { dispatch(setFromTokenInputValue(value)); }} @@ -488,7 +488,6 @@ const PrepareBridgePage = () => { .networkClientId : undefined; toChainClientId && dispatch(setActiveNetwork(toChainClientId)); - toChain && dispatch(setFromChain(toChain.chainId)); dispatch(setFromToken(toToken)); dispatch(setFromTokenInputValue(null)); fromChain?.chainId && dispatch(setToChain(fromChain.chainId)); From a6a91d5a84d5b188579346c4880cdaea62d1ebb4 Mon Sep 17 00:00:00 2001 From: jiexi Date: Thu, 16 Jan 2025 14:10:47 -0800 Subject: [PATCH 49/65] test: Cleanup snap-account-signature e2e tests. Add permittedChains scenario to wallet_revokePermissions e2e test (#29761) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** * Fix incorrect snap-account-signature e2e test fixtures / starting state (accounts permissioned before they exist in the wallet) * Add `endowment:permitted-chains` scenario to `wallet_revokePermissions` e2e test [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29761?quickstart=1) ## **Related issues** See: https://github.com/MetaMask/metamask-extension/pull/27847 ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --------- Co-authored-by: Alex Donesky Co-authored-by: Mark Stacey --- test/e2e/fixture-builder.js | 36 +++++++ .../json-rpc/wallet_revokePermissions.spec.ts | 100 ++++++++++++++++-- ...account-signatures-and-disconnects.spec.ts | 11 +- .../account/snap-account-signatures.spec.ts | 12 +-- 4 files changed, 138 insertions(+), 21 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 6a629f97f503..fbb68ad598de 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -494,6 +494,42 @@ class FixtureBuilder { }); } + withPermissionControllerConnectedToTestDappWithChain() { + return this.withPermissionController({ + subjects: { + [DAPP_URL]: { + origin: DAPP_URL, + permissions: { + eth_accounts: { + id: 'ZaqPEWxyhNCJYACFw93jE', + parentCapability: 'eth_accounts', + invoker: DAPP_URL, + caveats: [ + { + type: 'restrictReturnedAccounts', + value: [DEFAULT_FIXTURE_ACCOUNT.toLowerCase()], + }, + ], + date: 1664388714636, + }, + 'endowment:permitted-chains': { + id: 'D7cac0a2e3BD8f349506a', + parentCapability: 'endowment:permitted-chains', + invoker: DAPP_URL, + caveats: [ + { + type: 'restrictNetworkSwitching', + value: ['0x539'], + }, + ], + date: 1664388714637, + }, + }, + }, + }, + }); + } + withPermissionControllerConnectedToTestDappWithTwoAccounts() { const subjects = { [DAPP_URL]: { diff --git a/test/e2e/json-rpc/wallet_revokePermissions.spec.ts b/test/e2e/json-rpc/wallet_revokePermissions.spec.ts index 5c444b5ecf01..8d7a06ac4ccc 100644 --- a/test/e2e/json-rpc/wallet_revokePermissions.spec.ts +++ b/test/e2e/json-rpc/wallet_revokePermissions.spec.ts @@ -1,16 +1,17 @@ import { strict as assert } from 'assert'; -import { ACCOUNT_1, withFixtures } from '../helpers'; +import { PermissionConstraint } from '@metamask/permission-controller'; +import { withFixtures } from '../helpers'; import FixtureBuilder from '../fixture-builder'; import TestDapp from '../page-objects/pages/test-dapp'; import { loginWithBalanceValidation } from '../page-objects/flows/login.flow'; describe('Revoke Dapp Permissions', function () { - it('should revoke dapp permissions ', async function () { + it('should revoke dapp permissions for "eth_accounts"', async function () { await withFixtures( { dapp: true, fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() + .withPermissionControllerConnectedToTestDappWithChain() .build(), title: this.test?.fullTitle(), }, @@ -18,9 +19,22 @@ describe('Revoke Dapp Permissions', function () { await loginWithBalanceValidation(driver); const testDapp = new TestDapp(driver); await testDapp.openTestDappPage(); - await testDapp.check_connectedAccounts(ACCOUNT_1); - // wallet_revokePermissions request + const beforeGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const beforeGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${beforeGetPermissionsRequest})`, + ); + const beforeGetPermissionsNames = beforeGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(beforeGetPermissionsNames, [ + 'eth_accounts', + 'endowment:permitted-chains', + ]); + const revokePermissionsRequest = JSON.stringify({ jsonrpc: '2.0', method: 'wallet_revokePermissions', @@ -30,14 +44,82 @@ describe('Revoke Dapp Permissions', function () { }, ], }); + const revokePermissionsResult = await driver.executeScript( + `return window.ethereum.request(${revokePermissionsRequest})`, + ); + assert.deepEqual(revokePermissionsResult, null); + + const afterGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const afterGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${afterGetPermissionsRequest})`, + ); + const afterGetPermissionsNames = afterGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(afterGetPermissionsNames, [ + 'endowment:permitted-chains', + ]); + }, + ); + }); + + it('should revoke dapp permissions for "endowment:permitted-chains"', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDappWithChain() + .build(), + title: this.test?.fullTitle(), + }, + async ({ driver }) => { + await loginWithBalanceValidation(driver); + const testDapp = new TestDapp(driver); + await testDapp.openTestDappPage(); + + const beforeGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const beforeGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${beforeGetPermissionsRequest})`, + ); + const beforeGetPermissionsNames = beforeGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(beforeGetPermissionsNames, [ + 'eth_accounts', + 'endowment:permitted-chains', + ]); - const result = await driver.executeScript( + const revokePermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_revokePermissions', + params: [ + { + 'endowment:permitted-chains': {}, + }, + ], + }); + const revokePermissionsResult = await driver.executeScript( `return window.ethereum.request(${revokePermissionsRequest})`, ); - // Response of method call - assert.deepEqual(result, null); + assert.deepEqual(revokePermissionsResult, null); - await testDapp.check_connectedAccounts(ACCOUNT_1, false); + const afterGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const afterGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${afterGetPermissionsRequest})`, + ); + const afterGetPermissionsNames = afterGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(afterGetPermissionsNames, ['eth_accounts']); }, ); }); diff --git a/test/e2e/tests/account/snap-account-signatures-and-disconnects.spec.ts b/test/e2e/tests/account/snap-account-signatures-and-disconnects.spec.ts index d3c177ff7fdd..7a97130a3ef5 100644 --- a/test/e2e/tests/account/snap-account-signatures-and-disconnects.spec.ts +++ b/test/e2e/tests/account/snap-account-signatures-and-disconnects.spec.ts @@ -19,11 +19,7 @@ describe('Snap Account Signatures and Disconnects @no-mmi', function (this: Suit await withFixtures( { dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp({ - restrictReturnedAccounts: false, - }) - .build(), + fixtures: new FixtureBuilder().build(), title: this.test?.fullTitle(), }, async ({ driver }: { driver: Driver }) => { @@ -49,9 +45,12 @@ describe('Snap Account Signatures and Disconnects @no-mmi', function (this: Suit await experimentalSettings.check_pageIsLoaded(); await experimentalSettings.toggleRedesignedSignature(); - // Open the Test Dapp and signTypedDataV3 + // Open the Test Dapp and connect const testDapp = new TestDapp(driver); await testDapp.openTestDappPage(); + await testDapp.connectAccount({ publicAddress: newPublicKey }); + + // SignedTypedDataV3 with Test Dapp await signTypedDataV3WithSnapAccount(driver, newPublicKey, false, true); // Disconnect from Test Dapp and reconnect to Test Dapp diff --git a/test/e2e/tests/account/snap-account-signatures.spec.ts b/test/e2e/tests/account/snap-account-signatures.spec.ts index e04987561fc5..dc9ef21d2e52 100644 --- a/test/e2e/tests/account/snap-account-signatures.spec.ts +++ b/test/e2e/tests/account/snap-account-signatures.spec.ts @@ -30,11 +30,7 @@ describe('Snap Account Signatures @no-mmi', function (this: Suite) { await withFixtures( { dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp({ - restrictReturnedAccounts: false, - }) - .build(), + fixtures: new FixtureBuilder().build(), title, }, async ({ driver }: { driver: Driver }) => { @@ -62,8 +58,12 @@ describe('Snap Account Signatures @no-mmi', function (this: Suite) { await experimentalSettings.check_pageIsLoaded(); await experimentalSettings.toggleRedesignedSignature(); + // Connect the SSK account + const testDapp = new TestDapp(driver); + await testDapp.openTestDappPage(); + await testDapp.connectAccount({ publicAddress: newPublicKey }); + // Run all 5 signature types - await new TestDapp(driver).openTestDappPage(); await personalSignWithSnapAccount( driver, newPublicKey, From ba9efbbaad5ec3aa86d17757e026b4e8a470f00f Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 14:36:24 -0800 Subject: [PATCH 50/65] revert unecessary change to fixtures --- test/e2e/fixture-builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index b47d481e6346..bcbd148846c9 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -500,6 +500,9 @@ class FixtureBuilder { origin: DAPP_URL, permissions: { eth_accounts: { + id: 'ZaqPEWxyhNCJYACFw93jE', + parentCapability: 'eth_accounts', + invoker: DAPP_URL, caveats: [ { type: 'restrictReturnedAccounts', @@ -509,10 +512,7 @@ class FixtureBuilder { ], }, ], - id: 'ZaqPEWxyhNCJYACFw93jE', date: 1664388714636, - invoker: DAPP_URL, - parentCapability: 'eth_accounts', }, }, }, From 608ac957d1902d62504e82079aab06a962938cb0 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 14:37:36 -0800 Subject: [PATCH 51/65] revert unecessary change to fixtures 2 --- test/e2e/fixture-builder.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 8fd3e8853937..97e60bdd9cf1 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -1251,8 +1251,8 @@ class FixtureBuilder { permissions: { eth_accounts: { id: 'vaa88u5Iv3VmsJwG3bDKW', - invoker: 'https://app.uniswap.org', parentCapability: 'eth_accounts', + invoker: 'https://app.uniswap.org', caveats: [ { type: 'restrictReturnedAccounts', @@ -1271,8 +1271,8 @@ class FixtureBuilder { permissions: { eth_accounts: { id: 'bvvPcFtIhkFyHyW0Tmwi4', - invoker: 'https://www.dextools.io', parentCapability: 'eth_accounts', + invoker: 'https://www.dextools.io', caveats: [ { type: 'restrictReturnedAccounts', @@ -1292,8 +1292,8 @@ class FixtureBuilder { permissions: { eth_accounts: { id: 'AiblK84K1Cic-Y0FDSzMD', - invoker: 'https://coinmarketcap.com', parentCapability: 'eth_accounts', + invoker: 'https://coinmarketcap.com', caveats: [ { type: 'restrictReturnedAccounts', From 03624bedbaeed69d213bc48731dee73c7eb60a90 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 14:43:11 -0800 Subject: [PATCH 52/65] restore styling changes fixture --- test/e2e/fixture-builder.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 97e60bdd9cf1..e30186c83163 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -468,7 +468,8 @@ class FixtureBuilder { useLocalhostHostname = false, } = {}) { const selectedAccount = account || DEFAULT_FIXTURE_ACCOUNT; - const subjects = { + return this.withPermissionController({ + subjects: { [useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL]: { origin: useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL, permissions: { @@ -486,9 +487,7 @@ class FixtureBuilder { }, }, }, - }; - return this.withPermissionController({ - subjects, + }, }); } @@ -521,7 +520,8 @@ class FixtureBuilder { } withPermissionControllerSnapAccountConnectedToTestDapp() { - const subjects = { + return this.withPermissionController({ + subjects: { [DAPP_URL]: { origin: DAPP_URL, permissions: { @@ -539,12 +539,12 @@ class FixtureBuilder { }, }, }, - }; - return this.withPermissionController({ subjects }); + } + }); } withPermissionControllerConnectedToTwoTestDapps() { - const subjects = { + return this.withPermissionController({ subjects: { [DAPP_URL]: { origin: DAPP_URL, permissions: { @@ -579,8 +579,7 @@ class FixtureBuilder { }, }, }, - }; - return this.withPermissionController({ subjects }); + }}); } withPermissionControllerConnectedToSnapDapp() { From bd1e2309c6abf6a12e6e718e33fbb8fa4b103716 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 14:44:10 -0800 Subject: [PATCH 53/65] undo fixture changes that aren't needed --- test/e2e/fixture-builder.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index e30186c83163..8fe14134ffd7 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -630,8 +630,8 @@ class FixtureBuilder { withPreferencesControllerAdditionalAccountIdentities() { return this.withPreferencesController({ identities: { - [DEFAULT_FIXTURE_ACCOUNT]: { - address: DEFAULT_FIXTURE_ACCOUNT, + '0x5cfe73b6021e818b776b421b1c4db2474086a7e1': { + address: '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', lastSelected: 1665507600000, name: 'Account 1', }, @@ -822,13 +822,6 @@ class FixtureBuilder { }, }, }, - '74c55111-be4f-48aa-a49c-55995c8a1b26': { - id: '74c55111-be4f-48aa-a49c-55995c8a1b26', - address: ERC_4337_ACCOUNT, - options: {}, - methods: [], - type: 'eip155:erc4337', - }, }, }, selectedAccount: 'd5e45e4a-3b04-4a09-a5e1-39762e5c6be4', From 962c343d7d4a3c348f51107a5c7ad1fbcd8d6728 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 14:56:50 -0800 Subject: [PATCH 54/65] lint --- test/e2e/fixture-builder.js | 124 ++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 7117c1695463..746085facc67 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -470,24 +470,24 @@ class FixtureBuilder { const selectedAccount = account || DEFAULT_FIXTURE_ACCOUNT; return this.withPermissionController({ subjects: { - [useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL]: { - origin: useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL, - permissions: { - eth_accounts: { - caveats: [ - { - type: 'restrictReturnedAccounts', - value: [selectedAccount.toLowerCase()], - }, - ], - id: 'ZaqPEWxyhNCJYACFw93jE', - date: 1664388714636, - invoker: DAPP_URL, - parentCapability: 'eth_accounts', + [useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL]: { + origin: useLocalhostHostname ? DAPP_URL_LOCALHOST : DAPP_URL, + permissions: { + eth_accounts: { + caveats: [ + { + type: 'restrictReturnedAccounts', + value: [selectedAccount.toLowerCase()], + }, + ], + id: 'ZaqPEWxyhNCJYACFw93jE', + date: 1664388714636, + invoker: DAPP_URL, + parentCapability: 'eth_accounts', + }, }, }, }, - }, }); } @@ -558,64 +558,66 @@ class FixtureBuilder { withPermissionControllerSnapAccountConnectedToTestDapp() { return this.withPermissionController({ subjects: { - [DAPP_URL]: { - origin: DAPP_URL, - permissions: { - eth_accounts: { - caveats: [ - { - type: 'restrictReturnedAccounts', - value: ['0x09781764c08de8ca82e156bbf156a3ca217c7950'], - }, - ], - id: 'ZaqPEWxyhNCJYACFw93jE', - date: 1664388714636, - invoker: DAPP_URL, - parentCapability: 'eth_accounts', + [DAPP_URL]: { + origin: DAPP_URL, + permissions: { + eth_accounts: { + caveats: [ + { + type: 'restrictReturnedAccounts', + value: ['0x09781764c08de8ca82e156bbf156a3ca217c7950'], + }, + ], + id: 'ZaqPEWxyhNCJYACFw93jE', + date: 1664388714636, + invoker: DAPP_URL, + parentCapability: 'eth_accounts', + }, }, }, }, - } }); } withPermissionControllerConnectedToTwoTestDapps() { - return this.withPermissionController({ subjects: { - [DAPP_URL]: { - origin: DAPP_URL, - permissions: { - eth_accounts: { - caveats: [ - { - type: 'restrictReturnedAccounts', - value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], - }, - ], - id: 'ZaqPEWxyhNCJYACFw93jE', - date: 1664388714636, - invoker: DAPP_URL, - parentCapability: 'eth_accounts', + return this.withPermissionController({ + subjects: { + [DAPP_URL]: { + origin: DAPP_URL, + permissions: { + eth_accounts: { + caveats: [ + { + type: 'restrictReturnedAccounts', + value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], + }, + ], + id: 'ZaqPEWxyhNCJYACFw93jE', + date: 1664388714636, + invoker: DAPP_URL, + parentCapability: 'eth_accounts', + }, }, }, - }, - [DAPP_ONE_URL]: { - origin: DAPP_ONE_URL, - permissions: { - eth_accounts: { - caveats: [ - { - type: 'restrictReturnedAccounts', - value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], - }, - ], - id: 'ZaqPEWxyhNCJYACFw93jE', - date: 1664388714636, - invoker: DAPP_ONE_URL, - parentCapability: 'eth_accounts', + [DAPP_ONE_URL]: { + origin: DAPP_ONE_URL, + permissions: { + eth_accounts: { + caveats: [ + { + type: 'restrictReturnedAccounts', + value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], + }, + ], + id: 'ZaqPEWxyhNCJYACFw93jE', + date: 1664388714636, + invoker: DAPP_ONE_URL, + parentCapability: 'eth_accounts', + }, }, }, }, - }}); + }); } withPermissionControllerConnectedToSnapDapp() { From 8ac211699a9f4c316d8a22f62acb7c38cf9901cd Mon Sep 17 00:00:00 2001 From: jiexi Date: Thu, 16 Jan 2025 15:24:13 -0800 Subject: [PATCH 55/65] test: Remove unused `restrictReturnedAccounts` param option (#29767) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** * Removes the `restrictReturnedAccounts` param option in many of the fixtures for eth_accounts in the fixture builder since it is no longer used anywhere [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29767?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- test/e2e/fixture-builder.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index fbb68ad598de..7074a22ea109 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -463,7 +463,6 @@ class FixtureBuilder { } withPermissionControllerConnectedToTestDapp({ - restrictReturnedAccounts = true, account = '', useLocalhostHostname = false, } = {}) { @@ -477,7 +476,7 @@ class FixtureBuilder { id: 'ZaqPEWxyhNCJYACFw93jE', parentCapability: 'eth_accounts', invoker: DAPP_URL, - caveats: restrictReturnedAccounts && [ + caveats: [ { type: 'restrictReturnedAccounts', value: [ @@ -558,9 +557,7 @@ class FixtureBuilder { }); } - withPermissionControllerSnapAccountConnectedToTestDapp( - restrictReturnedAccounts = true, - ) { + withPermissionControllerSnapAccountConnectedToTestDapp() { return this.withPermissionController({ subjects: { [DAPP_URL]: { @@ -570,7 +567,7 @@ class FixtureBuilder { id: 'ZaqPEWxyhNCJYACFw93jE', parentCapability: 'eth_accounts', invoker: DAPP_URL, - caveats: restrictReturnedAccounts && [ + caveats: [ { type: 'restrictReturnedAccounts', value: ['0x09781764c08de8ca82e156bbf156a3ca217c7950'], @@ -584,9 +581,7 @@ class FixtureBuilder { }); } - withPermissionControllerConnectedToTwoTestDapps( - restrictReturnedAccounts = true, - ) { + withPermissionControllerConnectedToTwoTestDapps() { return this.withPermissionController({ subjects: { [DAPP_URL]: { @@ -596,7 +591,7 @@ class FixtureBuilder { id: 'ZaqPEWxyhNCJYACFw93jE', parentCapability: 'eth_accounts', invoker: DAPP_URL, - caveats: restrictReturnedAccounts && [ + caveats: [ { type: 'restrictReturnedAccounts', value: [ @@ -616,7 +611,7 @@ class FixtureBuilder { id: 'AqPEWxyhNCJYACFw93jE4', parentCapability: 'eth_accounts', invoker: DAPP_ONE_URL, - caveats: restrictReturnedAccounts && [ + caveats: [ { type: 'restrictReturnedAccounts', value: [ From 3d0cfdd63419d89a79f9d225d04e3b451a277aa7 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Thu, 16 Jan 2025 15:27:50 -0800 Subject: [PATCH 56/65] lint --- test/e2e/fixture-builder.js | 1 - test/e2e/tests/account/snap-account-signatures.spec.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 746085facc67..e0ede321b725 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -16,7 +16,6 @@ const { DAPP_URL_LOCALHOST, DAPP_ONE_URL, DEFAULT_FIXTURE_ACCOUNT, - ERC_4337_ACCOUNT, } = require('./constants'); const { defaultFixture, diff --git a/test/e2e/tests/account/snap-account-signatures.spec.ts b/test/e2e/tests/account/snap-account-signatures.spec.ts index 7fa84537d5b4..dc9ef21d2e52 100644 --- a/test/e2e/tests/account/snap-account-signatures.spec.ts +++ b/test/e2e/tests/account/snap-account-signatures.spec.ts @@ -16,7 +16,6 @@ import { signTypedDataV4WithSnapAccount, signTypedDataWithSnapAccount, } from '../../page-objects/flows/sign.flow'; -import { DAPP_URL } from '../../constants'; describe('Snap Account Signatures @no-mmi', function (this: Suite) { this.timeout(200000); // This test is very long, so we need an unusually high timeout From 2a78f64b1f24abfebb161099b1a2f8220463059f Mon Sep 17 00:00:00 2001 From: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:31:53 +0000 Subject: [PATCH 57/65] fix: capture only local ppom errors (#29702) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR refines error handling by limiting the capture of errors to those occurring within the local PPOM, reducing unnecessary noise. Errors from the API are already tracked through observability tools, ensuring a more streamlined and focused error reporting process. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29702?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/metamask-extension/issues/28767 ## **Manual testing steps** 1. Go to the test dapp 2. Click on one of the buttons in `PPOM - Malicious Transactions and Signatures` section 3. API should perform the validation as normal ## **Screenshots/Recordings** [Screencast from 2025-01-14 16-00-47.webm](https://github.com/user-attachments/assets/f1a3cf62-fbf9-4711-94bc-de37a7b0d67b) ### **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/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-extension/blob/main/.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/scripts/lib/ppom/ppom-util.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/lib/ppom/ppom-util.ts b/app/scripts/lib/ppom/ppom-util.ts index 0407c0604a69..847773baceee 100644 --- a/app/scripts/lib/ppom/ppom-util.ts +++ b/app/scripts/lib/ppom/ppom-util.ts @@ -139,7 +139,9 @@ export function handlePPOMError( const errorData = getErrorData(error); const description = getErrorMessage(error); - sentry?.captureException(error); + if (source === SecurityAlertSource.Local) { + sentry?.captureException(error); + } console.error(logMessage, errorData); return { From 16ac0894b324d62ca501376e18508b06cb6b903f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?= Date: Fri, 17 Jan 2025 11:27:22 +0000 Subject: [PATCH 58/65] chore: skips failing tests (#29778) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This test suite is failing for Firefox, and causing `main` to be red in CI, therefore we are skipping it for now and will come back to them later to fix them. Reference [slack thread](https://consensys.slack.com/archives/CTQAGKY5V/p1737051408094609). ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- test/e2e/flask/solana/send-flow.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/e2e/flask/solana/send-flow.spec.ts b/test/e2e/flask/solana/send-flow.spec.ts index faeb5e1eeb21..640667fcab38 100644 --- a/test/e2e/flask/solana/send-flow.spec.ts +++ b/test/e2e/flask/solana/send-flow.spec.ts @@ -8,7 +8,7 @@ import NonEvmHomepage from '../../page-objects/pages/home/non-evm-homepage'; import { withSolanaAccountSnap } from './common-solana'; const commonSolanaAddress = 'GYP1hGem9HBkYKEWNUQUxEwfmu4hhjuujRgGnj5LrHna'; -describe('Send flow', function (this: Suite) { +describe.skip('Send flow', function (this: Suite) { it('with some field validation', async function () { this.timeout(120000); await withSolanaAccountSnap( @@ -61,8 +61,8 @@ describe('Send flow', function (this: Suite) { ); }); }); -describe('Send full flow of USD', function (this: Suite) { - it.skip('with a positive balance account', async function () { +describe.skip('Send full flow of USD', function (this: Suite) { + it('with a positive balance account', async function () { // skipped due tohttps://consensyssoftware.atlassian.net/browse/SOL-100 this.timeout(120000); await withSolanaAccountSnap( @@ -213,7 +213,7 @@ describe('Send full flow of USD', function (this: Suite) { ); }); }); -describe('Send full flow of SOL', function (this: Suite) { +describe.skip('Send full flow of SOL', function (this: Suite) { it('with a positive balance account', async function () { this.timeout(120000); await withSolanaAccountSnap( @@ -358,7 +358,7 @@ describe('Send full flow of SOL', function (this: Suite) { ); }); }); -describe('Send flow flow', function (this: Suite) { +describe.skip('Send flow flow', function (this: Suite) { it('and Transaction fails', async function () { this.timeout(120000); // there is a bug open for this big timeout https://consensyssoftware.atlassian.net/browse/SOL-90 await withSolanaAccountSnap( From e659f4f02f19dcb33c3cf27baf7700fb2b35ff19 Mon Sep 17 00:00:00 2001 From: Pedro Figueiredo Date: Fri, 17 Jan 2025 12:11:22 +0000 Subject: [PATCH 59/65] fix: Missing "Unlimited" as value for the DAI permit (#29597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Introduces a new logical path for displaying "Unlimited" in the permit simulation, for when the `allowed` property in the signature message is set and the permit is for the token DAI. This is as is specified in [ERC-2612](https://eips.ethereum.org/EIPS/eip-2612)'s "Backwards Compatibility" section: > There are already a couple of permit functions in token contracts implemented in contracts in the wild, most notably the one introduced in the dai.sol. > Its implementation differs slightly from the presentation here in that: > instead of taking a value argument, it takes a bool allowed, setting approval to 0 or uint(-1). This PR also fixes a bug that prevents boolean values from being displayed in the key value display in the message section of signatures. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29597?quickstart=1) ## **Related issues** Fixes: https://github.com/MetaMask/metamask-extension/issues/28964 ## **Manual testing steps** 1. Open the browser console and execute the following code: ```javascript async function connectMetaMask() { try { const accounts = await window.ethereum.request({ method: 'eth_requestAccounts', }); console.log('Connected account:', accounts[0]); return accounts[0]; } catch (error) { console.error('User rejected the request:', error); throw error; } } async function signPermit() { try { const fromAddress = await connectMetaMask(); const msgParams = { types: { EIP712Domain: [ { name: 'name', type: 'string' }, { name: 'version', type: 'string' }, { name: 'chainId', type: 'uint256' }, { name: 'verifyingContract', type: 'address' }, ], Permit: [ { name: 'holder', type: 'address' }, { name: 'spender', type: 'address' }, { name: 'nonce', type: 'uint256' }, { name: 'expiry', type: 'uint256' }, { name: 'allowed', type: 'bool' }, ], }, domain: { name: 'Dai Stablecoin', version: '1', verifyingContract: '0x6B175474E89094C44Da98b954EedeAC495271d0F', chainId: '0x1', }, primaryType: 'Permit', message: { holder: '0xD2C44F28eC4C7eF686f587FADdb204da3aEFa827', spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', allowed: true, nonce: 0, expiry: 1660916504, }, }; const signature = await window.ethereum.request({ method: 'eth_signTypedData_v4', params: [fromAddress, JSON.stringify(msgParams)], }); console.log('Signature:', signature); return signature; } catch (error) { console.error('Error signing permit:', error); } } signPermit(); ``` 2. Change `"allowed": true` to `"allowed": false` in the aforementioned code and execute it to see the revocation screen. ## **Screenshots/Recordings** ### **Before** ### **After** Screenshot 2025-01-08 at 18 30 35 Screenshot 2025-01-08 at 18 30 37 Screenshot 2025-01-09 at 10 22 09 Screenshot 2025-01-09 at 10 22 13 ## **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/main/.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/main/.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. --- .../signatures/permit-batch.test.tsx | 4 +- .../signatures/permit-single.test.tsx | 2 +- .../confirm/info/shared/constants.ts | 3 + .../permit-simulation/permit-simulation.tsx | 16 +- .../value-display/value-display.tsx | 21 +- .../components/confirm/row/dataTree.tsx | 4 + .../components/confirm/title/title.tsx | 21 +- .../confirmations/components/confirm/utils.ts | 14 + .../__snapshots__/confirm.test.tsx.snap | 276 ++---------------- .../confirmations/confirm/confirm.test.tsx | 16 +- 10 files changed, 105 insertions(+), 272 deletions(-) diff --git a/test/integration/confirmations/signatures/permit-batch.test.tsx b/test/integration/confirmations/signatures/permit-batch.test.tsx index 7a3050dc15c8..84c050d8e022 100644 --- a/test/integration/confirmations/signatures/permit-batch.test.tsx +++ b/test/integration/confirmations/signatures/permit-batch.test.tsx @@ -103,9 +103,9 @@ describe('Permit Batch Signature Tests', () => { "You're giving the spender permission to spend this many tokens from your account.", 'Spending cap', '0xA0b86...6eB48', - '1,461,501,637,3...', + 'Unlimited', '0xb0B86...6EB48', - '2,461,501,637,3...', + 'Unlimited', ]; verifyDetails(simulationSection, simulationDetails); diff --git a/test/integration/confirmations/signatures/permit-single.test.tsx b/test/integration/confirmations/signatures/permit-single.test.tsx index 96fe5c26491d..21851c3e6673 100644 --- a/test/integration/confirmations/signatures/permit-single.test.tsx +++ b/test/integration/confirmations/signatures/permit-single.test.tsx @@ -101,7 +101,7 @@ describe('Permit Single Signature Tests', () => { "You're giving the spender permission to spend this many tokens from your account.", 'Spending cap', '0xA0b86...6eB48', - '1,461,501,637,3...', + 'Unlimited', ]; expect(simulationSection).toBeInTheDocument(); diff --git a/ui/pages/confirmations/components/confirm/info/shared/constants.ts b/ui/pages/confirmations/components/confirm/info/shared/constants.ts index 9953383149d2..6b82b1aea5f0 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/constants.ts +++ b/ui/pages/confirmations/components/confirm/info/shared/constants.ts @@ -1,3 +1,6 @@ export const HEX_ZERO = '0x0'; export const TOKEN_VALUE_UNLIMITED_THRESHOLD = 10 ** 15; + +export const DAI_CONTRACT_ADDRESS = + '0x6B175474E89094C44Da98b954EedeAC495271d0F'; diff --git a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx index 0e5c117beba9..9cbe5ffc967b 100644 --- a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx +++ b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/permit-simulation/permit-simulation.tsx @@ -68,6 +68,8 @@ const PermitSimulation: React.FC = () => { tokenContract={token} value={amount} chainId={chainId} + message={message} + canDisplayValueAsUnlimited /> ); @@ -97,19 +99,27 @@ const PermitSimulation: React.FC = () => { value={message.value} tokenId={message.tokenId} chainId={chainId} + message={message} + canDisplayValueAsUnlimited /> )} ); + let descriptionKey = 'permitSimulationDetailInfo'; + if (isNFT) { + descriptionKey = 'simulationDetailsApproveDesc'; + } else if (message.allowed === false) { + // revoke permit + descriptionKey = 'revokeSimulationDetailsDesc'; + } + return ( ); diff --git a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx index 720b19a29086..5d75879a0998 100644 --- a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx +++ b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/value-display/value-display.tsx @@ -28,7 +28,10 @@ import { formatAmount, formatAmountMaxPrecision, } from '../../../../../simulation-details/formatAmount'; -import { TOKEN_VALUE_UNLIMITED_THRESHOLD } from '../../../shared/constants'; +import { + DAI_CONTRACT_ADDRESS, + TOKEN_VALUE_UNLIMITED_THRESHOLD, +} from '../../../shared/constants'; import { getAmountColors } from '../../../utils'; type PermitSimulationValueDisplayParams = { @@ -51,6 +54,9 @@ type PermitSimulationValueDisplayParams = { /** The tokenId for NFT */ tokenId?: string; + /** The permit message */ + message?: { allowed?: boolean | null }; + /** True if value is being credited to wallet */ credit?: boolean; @@ -69,6 +75,7 @@ const PermitSimulationValueDisplay: React.FC< tokenContract, tokenId, value, + message, credit, debit, canDisplayValueAsUnlimited, @@ -96,22 +103,30 @@ const PermitSimulationValueDisplay: React.FC< const { tokenValue, tokenValueMaxPrecision, shouldShowUnlimitedValue } = useMemo(() => { + const isDAIPermit = tokenContract === DAI_CONTRACT_ADDRESS; + const hasPermitAllowedProp = message?.allowed !== undefined; + const showUnlimitedDueToDAIContract = isDAIPermit && hasPermitAllowedProp; + if (!value || tokenId) { return { tokenValue: null, tokenValueMaxPrecision: null, - shouldShowUnlimitedValue: false, + shouldShowUnlimitedValue: + canDisplayValueAsUnlimited && showUnlimitedDueToDAIContract, }; } const tokenAmount = calcTokenAmount(value, tokenDecimals); + const showUnlimitedDueToPermitValue = + Number(value) > TOKEN_VALUE_UNLIMITED_THRESHOLD; + return { tokenValue: formatAmount('en-US', tokenAmount), tokenValueMaxPrecision: formatAmountMaxPrecision('en-US', tokenAmount), shouldShowUnlimitedValue: canDisplayValueAsUnlimited && - Number(value) > TOKEN_VALUE_UNLIMITED_THRESHOLD, + (showUnlimitedDueToPermitValue || showUnlimitedDueToDAIContract), }; }, [tokenDecimals, tokenId, value]); diff --git a/ui/pages/confirmations/components/confirm/row/dataTree.tsx b/ui/pages/confirmations/components/confirm/row/dataTree.tsx index 3b4cad3a8e0e..9d2e8561d078 100644 --- a/ui/pages/confirmations/components/confirm/row/dataTree.tsx +++ b/ui/pages/confirmations/components/confirm/row/dataTree.tsx @@ -201,6 +201,10 @@ const DataField = memo( return ; } + if (type === 'bool') { + return ; + } + return ; }, ); diff --git a/ui/pages/confirmations/components/confirm/title/title.tsx b/ui/pages/confirmations/components/confirm/title/title.tsx index 7be6c59be50d..5a450d033528 100644 --- a/ui/pages/confirmations/components/confirm/title/title.tsx +++ b/ui/pages/confirmations/components/confirm/title/title.tsx @@ -16,12 +16,13 @@ import useAlerts from '../../../../../hooks/useAlerts'; import { useI18nContext } from '../../../../../hooks/useI18nContext'; import { TypedSignSignaturePrimaryTypes } from '../../../constants'; import { useConfirmContext } from '../../../context/confirm'; +import { useTypedSignSignatureInfo } from '../../../hooks/useTypedSignSignatureInfo'; import { Confirmation, SignatureRequestType } from '../../../types/confirm'; import { isSIWESignatureRequest } from '../../../utils'; -import { useTypedSignSignatureInfo } from '../../../hooks/useTypedSignSignatureInfo'; import { useIsNFT } from '../info/approve/hooks/use-is-nft'; -import { getIsRevokeSetApprovalForAll } from '../info/utils'; import { useTokenTransactionData } from '../info/hooks/useTokenTransactionData'; +import { getIsRevokeSetApprovalForAll } from '../info/utils'; +import { getIsRevokeDAIPermit } from '../utils'; import { useCurrentSpendingCap } from './hooks/useCurrentSpendingCap'; function ConfirmBannerAlert({ ownerId }: { ownerId: string }) { @@ -84,6 +85,14 @@ const getTitle = ( if (tokenStandard === TokenStandard.ERC721) { return t('setApprovalForAllRedesignedTitle'); } + + const isRevokeDAIPermit = getIsRevokeDAIPermit( + confirmation as SignatureRequestType, + ); + if (isRevokeDAIPermit) { + return t('confirmTitleRevokeApproveTransaction'); + } + return t('confirmTitlePermitTokens'); } return t('confirmTitleSignature'); @@ -136,6 +145,14 @@ const getDescription = ( if (tokenStandard === TokenStandard.ERC721) { return t('confirmTitleDescApproveTransaction'); } + + const isRevokeDAIPermit = getIsRevokeDAIPermit( + confirmation as SignatureRequestType, + ); + if (isRevokeDAIPermit) { + return ''; + } + return t('confirmTitleDescPermitSignature'); } return t('confirmTitleDescSign'); diff --git a/ui/pages/confirmations/components/confirm/utils.ts b/ui/pages/confirmations/components/confirm/utils.ts index 581bf1a5ccee..8d5e4a643da3 100644 --- a/ui/pages/confirmations/components/confirm/utils.ts +++ b/ui/pages/confirmations/components/confirm/utils.ts @@ -1,5 +1,7 @@ import { TransactionMeta } from '@metamask/transaction-controller'; +import { parseTypedDataMessage } from '../../../../../shared/modules/transaction.utils'; import { Confirmation, SignatureRequestType } from '../../types/confirm'; +import { DAI_CONTRACT_ADDRESS } from './info/shared/constants'; export const getConfirmationSender = ( currentConfirmation: Confirmation | undefined, @@ -28,3 +30,15 @@ export const formatNumber = (value: number, decimals: number) => { }); return formatter.format(value); }; + +export const getIsRevokeDAIPermit = (confirmation: SignatureRequestType) => { + const msgData = confirmation?.msgParams?.data; + const { + message, + domain: { verifyingContract }, + } = parseTypedDataMessage(msgData as string); + const isRevokeDAIPermit = + message.allowed === false && verifyingContract === DAI_CONTRACT_ADDRESS; + + return isRevokeDAIPermit; +}; diff --git a/ui/pages/confirmations/confirm/__snapshots__/confirm.test.tsx.snap b/ui/pages/confirmations/confirm/__snapshots__/confirm.test.tsx.snap index f528654a4525..169f895a52b7 100644 --- a/ui/pages/confirmations/confirm/__snapshots__/confirm.test.tsx.snap +++ b/ui/pages/confirmations/confirm/__snapshots__/confirm.test.tsx.snap @@ -281,48 +281,15 @@ exports[`Confirm should match snapshot for signature - typed sign - V4 - PermitB
-
- - - - - -
-
+ />
- G + Goerli logo
-

- Spending cap request -

-

- This site wants permission to spend your tokens. -

- 14,615,016,373,... + Unlimited

@@ -527,9 +484,9 @@ exports[`Confirm should match snapshot for signature - typed sign - V4 - PermitB style="min-width: 0;" >
- 24,615,016,373,... + Unlimited

@@ -603,43 +560,7 @@ exports[`Confirm should match snapshot for signature - typed sign - V4 - PermitB
-
- - - - - -
-
+ />

-

- - - - - -
- + />

-

- - - - - -
- + />
- G + Goerli logo
-

- Spending cap request -

-

- This site wants permission to spend your tokens. -

- 14,615,016,373,... + Unlimited

@@ -1133,43 +975,7 @@ exports[`Confirm should match snapshot for signature - typed sign - V4 - PermitS
-
- - - - - -
-
+ />

-

- - - - - -
- + />

{ }); await act(async () => { - const { container, findAllByText } = - await renderWithConfirmContextProvider(, mockStore); + const { container } = await renderWithConfirmContextProvider( + , + mockStore, + ); - const valueElement = await findAllByText('14,615,016,373,...'); - expect(valueElement[0]).toBeInTheDocument(); expect(container).toMatchSnapshot(); }); }); @@ -190,11 +190,11 @@ describe('Confirm', () => { }); await act(async () => { - const { container, findAllByText } = - await renderWithConfirmContextProvider(, mockStore); + const { container } = await renderWithConfirmContextProvider( + , + mockStore, + ); - const valueElement = await findAllByText('14,615,016,373,...'); - expect(valueElement[0]).toBeInTheDocument(); expect(container).toMatchSnapshot(); }); }); From 8f82ac4f13cb1a67463bec35ca3c977cce4e8a3d Mon Sep 17 00:00:00 2001 From: Michele Esposito <34438276+mikesposito@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:34:02 +0100 Subject: [PATCH 60/65] refactor: use `withKeyring` method (#25435) (#27025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** This PR cherry-picks def6b15 into `develop`, after being reverted at 821c3bd. The reason the original commit was reverted is explained in #26840. _From the original PR (#25435):_ With `@metamask/keyring-controller` v16 a new method is available which simplify safe direct keyring interactions which are not available through KeyringController. Through `withKeyring` it's possible to lock KeyringController's main mutex and select a specific keyring to interact with while KeyringController will be unusable concurrently. `withKeyring` also takes care of persisting keyrings and updating the controller state at the end of the operation, which makes it possible to use it in substitution of `getKeyringsByType` and `persistAllKeyrings`. Currently, most of the direct keyring interactions in the extension are made for hardware devices and snaps. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27025?quickstart=1) ## **Related issues** Fixes: #26840 Fixes: #24276 ## **Manual testing steps** _As for the original PR (#25435):_ Affected workflows may include: - Lock - Unlock - Add account - Remove account - Connect hardware wallet - All hardware wallet interactions ## **Screenshots/Recordings** ### **Before** ### **After** ## **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. --- app/scripts/metamask-controller.js | 318 ++++++++++++++---------- app/scripts/metamask-controller.test.js | 84 +++---- 2 files changed, 219 insertions(+), 183 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 9709c081b834..489f3d926d4f 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -155,6 +155,7 @@ import { import { Interface } from '@ethersproject/abi'; import { abiERC1155, abiERC721 } from '@metamask/metamask-eth-abis'; import { isEvmAccountType } from '@metamask/keyring-api'; +import { normalize } from '@metamask/eth-sig-util'; import { AuthenticationController, UserStorageController, @@ -4656,7 +4657,10 @@ export default class MetamaskController extends EventEmitter { // keyring's iframe and have the setting initialized properly // Optimistically called to not block MetaMask login due to // Ledger Keyring GitHub downtime - this.setLedgerTransportPreference(); + this.#withKeyringForDevice( + { name: HardwareDeviceNames.ledger }, + async (keyring) => this.setLedgerTransportPreference(keyring), + ); } } finally { releaseLock(); @@ -4794,7 +4798,10 @@ export default class MetamaskController extends EventEmitter { // Optimistically called to not block MetaMask login due to // Ledger Keyring GitHub downtime if (completedOnboarding) { - this.setLedgerTransportPreference(); + this.#withKeyringForDevice( + { name: HardwareDeviceNames.ledger }, + async (keyring) => this.setLedgerTransportPreference(keyring), + ); } } @@ -4898,52 +4905,11 @@ export default class MetamaskController extends EventEmitter { // Hardware // - async getKeyringForDevice(deviceName, hdPath = null) { - const keyringOverrides = this.opts.overrides?.keyrings; - let keyringName = null; - switch (deviceName) { - case HardwareDeviceNames.trezor: - keyringName = keyringOverrides?.trezor?.type || TrezorKeyring.type; - break; - case HardwareDeviceNames.ledger: - keyringName = keyringOverrides?.ledger?.type || LedgerKeyring.type; - break; - case HardwareDeviceNames.qr: - keyringName = QRHardwareKeyring.type; - break; - case HardwareDeviceNames.lattice: - keyringName = keyringOverrides?.lattice?.type || LatticeKeyring.type; - break; - default: - throw new Error( - 'MetamaskController:getKeyringForDevice - Unknown device', - ); - } - let [keyring] = await this.keyringController.getKeyringsByType(keyringName); - if (!keyring) { - keyring = await this.keyringController.addNewKeyring(keyringName); - } - if (hdPath && keyring.setHdPath) { - keyring.setHdPath(hdPath); - } - if (deviceName === HardwareDeviceNames.lattice) { - keyring.appName = 'MetaMask'; - } - if (deviceName === HardwareDeviceNames.trezor) { - const model = keyring.getModel(); - this.appStateController.setTrezorModel(model); - } - - keyring.network = getProviderConfig({ - metamask: this.networkController.state, - }).type; - - return keyring; - } - async attemptLedgerTransportCreation() { - const keyring = await this.getKeyringForDevice(HardwareDeviceNames.ledger); - return await keyring.attemptMakeApp(); + return await this.#withKeyringForDevice( + HardwareDeviceNames.ledger, + async (keyring) => keyring.attemptMakeApp(), + ); } /** @@ -4955,35 +4921,38 @@ export default class MetamaskController extends EventEmitter { * @returns [] accounts */ async connectHardware(deviceName, page, hdPath) { - const keyring = await this.getKeyringForDevice(deviceName, hdPath); - - if (deviceName === HardwareDeviceNames.ledger) { - await this.setLedgerTransportPreference(keyring); - } + return this.#withKeyringForDevice( + { name: deviceName, hdPath }, + async (keyring) => { + if (deviceName === HardwareDeviceNames.ledger) { + await this.setLedgerTransportPreference(keyring); + } - let accounts = []; - switch (page) { - case -1: - accounts = await keyring.getPreviousPage(); - break; - case 1: - accounts = await keyring.getNextPage(); - break; - default: - accounts = await keyring.getFirstPage(); - } + let accounts = []; + switch (page) { + case -1: + accounts = await keyring.getPreviousPage(); + break; + case 1: + accounts = await keyring.getNextPage(); + break; + default: + accounts = await keyring.getFirstPage(); + } - // Merge with existing accounts - // and make sure addresses are not repeated - const oldAccounts = await this.keyringController.getAccounts(); + // Merge with existing accounts + // and make sure addresses are not repeated + const oldAccounts = await this.keyringController.getAccounts(); - const accountsToTrack = [ - ...new Set( - oldAccounts.concat(accounts.map((a) => a.address.toLowerCase())), - ), - ]; - this.accountTrackerController.syncWithAddresses(accountsToTrack); - return accounts; + const accountsToTrack = [ + ...new Set( + oldAccounts.concat(accounts.map((a) => a.address.toLowerCase())), + ), + ]; + this.accountTrackerController.syncWithAddresses(accountsToTrack); + return accounts; + }, + ); } /** @@ -4994,8 +4963,12 @@ export default class MetamaskController extends EventEmitter { * @returns {Promise} */ async checkHardwareStatus(deviceName, hdPath) { - const keyring = await this.getKeyringForDevice(deviceName, hdPath); - return keyring.isUnlocked(); + return this.#withKeyringForDevice( + { name: deviceName, hdPath }, + async (keyring) => { + return keyring.isUnlocked(); + }, + ); } /** @@ -5006,16 +4979,22 @@ export default class MetamaskController extends EventEmitter { * @returns {Promise} */ async getDeviceNameForMetric(deviceName, hdPath) { - if (deviceName === HardwareDeviceNames.trezor) { - const keyring = await this.getKeyringForDevice(deviceName, hdPath); - const { minorVersion } = keyring.bridge; - // Specific case for OneKey devices, see `ONE_KEY_VIA_TREZOR_MINOR_VERSION` for further details. - if (minorVersion && minorVersion === ONE_KEY_VIA_TREZOR_MINOR_VERSION) { - return HardwareDeviceNames.oneKeyViaTrezor; - } + if (deviceName !== HardwareDeviceNames.trezor) { + return deviceName; } - return deviceName; + return await this.#withKeyringForDevice( + { name: deviceName, hdPath }, + (keyring) => { + const { minorVersion } = keyring.bridge; + // Specific case for OneKey devices, see `ONE_KEY_VIA_TREZOR_MINOR_VERSION` for further details. + if (minorVersion && minorVersion === ONE_KEY_VIA_TREZOR_MINOR_VERSION) { + return HardwareDeviceNames.oneKeyViaTrezor; + } + + return deviceName; + }, + ); } /** @@ -5025,14 +5004,15 @@ export default class MetamaskController extends EventEmitter { * @returns {Promise} */ async forgetDevice(deviceName) { - const keyring = await this.getKeyringForDevice(deviceName); + return this.#withKeyringForDevice({ name: deviceName }, async (keyring) => { + for (const address of keyring.accounts) { + this._onAccountRemoved(address); + } - for (const address of keyring.accounts) { - await this.removeAccount(address); - } + keyring.forgetDevice(); - keyring.forgetDevice(); - return true; + return true; + }); } /** @@ -5070,21 +5050,22 @@ export default class MetamaskController extends EventEmitter { * @returns {'ledger' | 'lattice' | string | undefined} */ async getDeviceModel(address) { - const keyring = await this.keyringController.getKeyringForAccount(address); - switch (keyring.type) { - case KeyringType.trezor: - return keyring.getModel(); - case KeyringType.qr: - return keyring.getName(); - case KeyringType.ledger: - // TODO: get model after ledger keyring exposes method - return HardwareDeviceNames.ledger; - case KeyringType.lattice: - // TODO: get model after lattice keyring exposes method - return HardwareDeviceNames.lattice; - default: - return undefined; - } + return this.keyringController.withKeyring({ address }, async (keyring) => { + switch (keyring.type) { + case KeyringType.trezor: + return keyring.getModel(); + case KeyringType.qr: + return keyring.getName(); + case KeyringType.ledger: + // TODO: get model after ledger keyring exposes method + return HardwareDeviceNames.ledger; + case KeyringType.lattice: + // TODO: get model after lattice keyring exposes method + return HardwareDeviceNames.lattice; + default: + return undefined; + } + }); } /** @@ -5116,16 +5097,25 @@ export default class MetamaskController extends EventEmitter { hdPath, hdPathDescription, ) { - const keyring = await this.getKeyringForDevice(deviceName, hdPath); - - keyring.setAccountToUnlock(index); - const unlockedAccount = - await this.keyringController.addNewAccountForKeyring(keyring); - const label = this.getAccountLabel( - deviceName === HardwareDeviceNames.qr ? keyring.getName() : deviceName, - index, - hdPathDescription, - ); + const { address: unlockedAccount, label } = + await this.#withKeyringForDevice( + { name: deviceName, hdPath }, + async (keyring) => { + keyring.setAccountToUnlock(index); + const [address] = await keyring.addAccounts(1); + return { + address: normalize(address), + label: this.getAccountLabel( + deviceName === HardwareDeviceNames.qr + ? keyring.getName() + : deviceName, + index, + hdPathDescription, + ), + }; + }, + ); + // Set the account label to Trezor 1 / Ledger 1 / QR Hardware 1, etc this.preferencesController.setAccountLabel(unlockedAccount, label); // Select the account @@ -5293,20 +5283,8 @@ export default class MetamaskController extends EventEmitter { * @param {string[]} address - A hex address */ async removeAccount(address) { - // Remove all associated permissions - this.removeAllAccountPermissions(address); - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - this.custodyController.removeAccount(address); - ///: END:ONLY_INCLUDE_IF(build-mmi) - - const keyring = await this.keyringController.getKeyringForAccount(address); - // Remove account from the keyring + this._onAccountRemoved(address); await this.keyringController.removeAccount(address); - const updatedKeyringAccounts = keyring ? await keyring.getAccounts() : {}; - if (updatedKeyringAccounts?.length === 0) { - keyring.destroy?.(); - } return address; } @@ -6670,6 +6648,20 @@ export default class MetamaskController extends EventEmitter { this._notifyChainChange(); } + /** + * Execute side effects of a removed account. + * + * @param {string} address - The address of the account to remove. + */ + _onAccountRemoved(address) { + // Remove all associated permissions + this.removeAllAccountPermissions(address); + + ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) + this.custodyController.removeAccount(address); + ///: END:ONLY_INCLUDE_IF(build-mmi) + } + // misc /** @@ -6952,16 +6944,15 @@ export default class MetamaskController extends EventEmitter { /** * Sets the Ledger Live preference to use for Ledger hardware wallet support * - * @param _keyring + * @param keyring * @deprecated This method is deprecated and will be removed in the future. * Only webhid connections are supported in chrome and u2f in firefox. */ - async setLedgerTransportPreference(_keyring) { + async setLedgerTransportPreference(keyring) { const transportType = window.navigator.hid ? LedgerTransportTypes.webhid : LedgerTransportTypes.u2f; - const keyring = - _keyring || (await this.getKeyringForDevice(HardwareDeviceNames.ledger)); + if (keyring?.updateTransportMethod) { return keyring.updateTransportMethod(transportType).catch((e) => { throw e; @@ -7553,6 +7544,71 @@ export default class MetamaskController extends EventEmitter { return { distribution, environment }; } + /** + * Select a hardware wallet device and execute a + * callback with the keyring for that device. + * + * Note that KeyringController state is not updated before + * the end of the callback execution, and calls to KeyringController + * methods within the callback can lead to deadlocks. + * + * @param {object} options - The options for the device + * @param {string} options.name - The device name to select + * @param {string} options.hdPath - An optional hd path to be set on the device + * keyring + * @param {*} callback - The callback to execute with the keyring + * @returns {*} The result of the callback + */ + async #withKeyringForDevice(options, callback) { + const keyringOverrides = this.opts.overrides?.keyrings; + let keyringType = null; + switch (options.name) { + case HardwareDeviceNames.trezor: + keyringType = keyringOverrides?.trezor?.type || TrezorKeyring.type; + break; + case HardwareDeviceNames.ledger: + keyringType = keyringOverrides?.ledger?.type || LedgerKeyring.type; + break; + case HardwareDeviceNames.qr: + keyringType = QRHardwareKeyring.type; + break; + case HardwareDeviceNames.lattice: + keyringType = keyringOverrides?.lattice?.type || LatticeKeyring.type; + break; + default: + throw new Error( + 'MetamaskController:#withKeyringForDevice - Unknown device', + ); + } + + return this.keyringController.withKeyring( + { type: keyringType }, + async (keyring) => { + if (options.hdPath && keyring.setHdPath) { + keyring.setHdPath(options.hdPath); + } + + if (options.name === HardwareDeviceNames.lattice) { + keyring.appName = 'MetaMask'; + } + + if (options.name === HardwareDeviceNames.trezor) { + const model = keyring.getModel(); + this.appStateController.setTrezorModel(model); + } + + keyring.network = getProviderConfig({ + metamask: this.networkController.state, + }).type; + + return await callback(keyring); + }, + { + createIfMissing: true, + }, + ); + } + #checkTokenListPolling(currentState, previousState) { const previousEnabled = this.#isTokenListPollingRequired(previousState); const newEnabled = this.#isTokenListPollingRequired(currentState); diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index 8429dd3d175d..a8dfee9fe51e 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -822,21 +822,16 @@ describe('MetaMaskController', () => { ); await expect(result).rejects.toThrow( - 'MetamaskController:getKeyringForDevice - Unknown device', + 'MetamaskController:#withKeyringForDevice - Unknown device', ); }); it('should add the Trezor Hardware keyring and return the first page of accounts', async () => { - jest.spyOn(metamaskController.keyringController, 'addNewKeyring'); - const firstPage = await metamaskController.connectHardware( HardwareDeviceNames.trezor, 0, ); - expect( - metamaskController.keyringController.addNewKeyring, - ).toHaveBeenCalledWith(KeyringType.trezor); expect( metamaskController.keyringController.state.keyrings[1].type, ).toBe(TrezorKeyring.type); @@ -844,16 +839,11 @@ describe('MetaMaskController', () => { }); it('should add the Ledger Hardware keyring and return the first page of accounts', async () => { - jest.spyOn(metamaskController.keyringController, 'addNewKeyring'); - const firstPage = await metamaskController.connectHardware( HardwareDeviceNames.ledger, 0, ); - expect( - metamaskController.keyringController.addNewKeyring, - ).toHaveBeenCalledWith(KeyringType.ledger); expect( metamaskController.keyringController.state.keyrings[1].type, ).toBe(LedgerKeyring.type); @@ -868,7 +858,7 @@ describe('MetaMaskController', () => { `m/44/0'/0'`, ); await expect(result).rejects.toThrow( - 'MetamaskController:getKeyringForDevice - Unknown device', + 'MetamaskController:#withKeyringForDevice - Unknown device', ); }); @@ -889,7 +879,7 @@ describe('MetaMaskController', () => { ); }); - describe('getHardwareDeviceName', () => { + describe('getDeviceNameForMetric', () => { const hdPath = "m/44'/60'/0'/0/0"; it('should return the correct device name for Ledger', async () => { @@ -899,6 +889,7 @@ describe('MetaMaskController', () => { deviceName, hdPath, ); + expect(result).toBe('ledger'); }); @@ -909,49 +900,62 @@ describe('MetaMaskController', () => { deviceName, hdPath, ); + expect(result).toBe('lattice'); }); it('should return the correct device name for Trezor', async () => { const deviceName = 'trezor'; jest - .spyOn(metamaskController, 'getKeyringForDevice') - .mockResolvedValue({ - bridge: { - minorVersion: 1, - model: 'T', - }, - }); + .spyOn(metamaskController.keyringController, 'withKeyring') + .mockImplementation((_, operation) => + operation({ + getModel: jest.fn().mockReturnValue('T'), + bridge: { + minorVersion: 1, + model: 'T', + }, + }), + ); + const result = await metamaskController.getDeviceNameForMetric( deviceName, hdPath, ); + expect(result).toBe('trezor'); }); it('should return undefined for unknown device name', async () => { const deviceName = 'unknown'; + const result = await metamaskController.getDeviceNameForMetric( deviceName, hdPath, ); + expect(result).toBe(deviceName); }); it('should handle special case for OneKeyDevice via Trezor', async () => { const deviceName = 'trezor'; jest - .spyOn(metamaskController, 'getKeyringForDevice') - .mockResolvedValue({ - bridge: { - model: 'T', - minorVersion: ONE_KEY_VIA_TREZOR_MINOR_VERSION, - }, - }); + .spyOn(metamaskController.keyringController, 'withKeyring') + .mockImplementation((_, operation) => + operation({ + getModel: jest.fn().mockReturnValue('T'), + bridge: { + model: 'T', + minorVersion: ONE_KEY_VIA_TREZOR_MINOR_VERSION, + }, + }), + ); + const result = await metamaskController.getDeviceNameForMetric( deviceName, hdPath, ); + expect(result).toBe('OneKey via Trezor'); }); }); @@ -962,7 +966,7 @@ describe('MetaMaskController', () => { 'Some random device name', ); await expect(result).rejects.toThrow( - 'MetamaskController:getKeyringForDevice - Unknown device', + 'MetamaskController:#withKeyringForDevice - Unknown device', ); }); @@ -1050,22 +1054,6 @@ describe('MetaMaskController', () => { ]); }); - it('should call keyringController.addNewAccountForKeyring', async () => { - jest.spyOn( - metamaskController.keyringController, - 'addNewAccountForKeyring', - ); - - await metamaskController.unlockHardwareWalletAccount( - accountToUnlock, - device, - ); - - expect( - metamaskController.keyringController.addNewAccountForKeyring, - ).toHaveBeenCalledTimes(1); - }); - it('should call preferencesController.setSelectedAddress', async () => { jest.spyOn( metamaskController.preferencesController, @@ -1260,14 +1248,6 @@ describe('MetaMaskController', () => { it('should return address', async () => { expect(ret).toStrictEqual('0x1'); }); - it('should call keyringController.getKeyringForAccount', async () => { - expect( - metamaskController.keyringController.getKeyringForAccount, - ).toHaveBeenCalledWith(addressToRemove); - }); - it('should call keyring.destroy', async () => { - expect(mockKeyring.destroy).toHaveBeenCalledTimes(1); - }); }); describe('#setupPhishingCommunication', () => { beforeEach(() => { From 1fb0f29dba1e41ee6aed216476d04465b036cf29 Mon Sep 17 00:00:00 2001 From: Alex Donesky Date: Fri, 17 Jan 2025 09:10:03 -0600 Subject: [PATCH 61/65] Update ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx Co-authored-by: Mark Stacey --- .../multichain/edit-accounts-modal/edit-accounts-modal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx b/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx index fbe66bc74aa3..4343b646052d 100644 --- a/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx +++ b/ui/components/multichain/edit-accounts-modal/edit-accounts-modal.tsx @@ -30,12 +30,12 @@ import { BlockSize, } from '../../../helpers/constants/design-system'; import { MergedInternalAccount } from '../../../selectors/selectors.types'; -import { isEqualCaseInsensitive } from '../../../../shared/modules/string-utils'; import { MetaMetricsEventCategory, MetaMetricsEventName, } from '../../../../shared/constants/metametrics'; import { MetaMetricsContext } from '../../../contexts/metametrics'; +import { isEqualCaseInsensitive } from '../../../../shared/modules/string-utils'; type EditAccountsModalProps = { accounts: MergedInternalAccount[]; From 8038f4de18ada13fbd3f29f78a315a981839dad7 Mon Sep 17 00:00:00 2001 From: Daniel <80175477+dan437@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:43:20 +0100 Subject: [PATCH 62/65] feat: Enable BSC for smart transactions (#29747) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Enables BSC for smart transactions and reduces status check time to 1s. We can turn off BSC support for smart transactions remotely if needed. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29747?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Make sure smart transactions are enabled in Advanced Settings 2. Be on the BNB Chain 3. Submit a tx. It will be submitted as a smart transaction Happy paths tested for Swaps, Send and dapp transactions, but this will require extensive testing before it goes to production. ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- shared/constants/smartTransactions.test.ts | 3 ++- shared/constants/smartTransactions.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/constants/smartTransactions.test.ts b/shared/constants/smartTransactions.test.ts index 47f4f8250c2b..4bd2f6f69f17 100644 --- a/shared/constants/smartTransactions.test.ts +++ b/shared/constants/smartTransactions.test.ts @@ -21,13 +21,14 @@ describe('smartTransactions', () => { expect(allowedChainIds).toStrictEqual([ CHAIN_IDS.MAINNET, CHAIN_IDS.SEPOLIA, + CHAIN_IDS.BSC, ]); }); it('should return the correct chain IDs for production environment', () => { mockIsProduction.mockReturnValue(true); const allowedChainIds = getAllowedSmartTransactionsChainIds(); - expect(allowedChainIds).toStrictEqual([CHAIN_IDS.MAINNET]); + expect(allowedChainIds).toStrictEqual([CHAIN_IDS.MAINNET, CHAIN_IDS.BSC]); }); }); }); diff --git a/shared/constants/smartTransactions.ts b/shared/constants/smartTransactions.ts index 4e39ec5ba234..35b143cb2d23 100644 --- a/shared/constants/smartTransactions.ts +++ b/shared/constants/smartTransactions.ts @@ -11,10 +11,12 @@ export const FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER: number = 2; const ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS_DEVELOPMENT: string[] = [ CHAIN_IDS.MAINNET, CHAIN_IDS.SEPOLIA, + CHAIN_IDS.BSC, ]; const ALLOWED_SMART_TRANSACTIONS_CHAIN_IDS_PRODUCTION: string[] = [ CHAIN_IDS.MAINNET, + CHAIN_IDS.BSC, ]; export const getAllowedSmartTransactionsChainIds = (): string[] => { From 3b856331b6e26b8d879206850be2e327220de38e Mon Sep 17 00:00:00 2001 From: Brian Bergeron Date: Fri, 17 Jan 2025 07:56:53 -0800 Subject: [PATCH 63/65] fix: stop polling on environment close (#29707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** When the asset controllers start polling, they add their polling tokens to app state, keyed by the particular environment (popup vs fullscreen). But these polling tokens in app state were not being used during cleanup. This PR updates `onEnvironmentTypeClosed` to stop polling by those tokens. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29707?quickstart=1) ## **Related issues** ## **Manual testing steps** 1. Open MM in fullscreen 2. Open MM popup 3. Close the popup 4. `onEnvironmentTypeClosed` should fire for the popup environment 5. Each polling token should be found and removed by one of the controllers ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/main/.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/main/.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. --- .../account-tracker-controller.test.ts | 25 +++++++++++++------ .../controllers/account-tracker-controller.ts | 5 ---- app/scripts/metamask-controller.js | 9 ++++++- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/app/scripts/controllers/account-tracker-controller.test.ts b/app/scripts/controllers/account-tracker-controller.test.ts index d9090c2e67f8..c842db35c287 100644 --- a/app/scripts/controllers/account-tracker-controller.test.ts +++ b/app/scripts/controllers/account-tracker-controller.test.ts @@ -368,6 +368,23 @@ describe('AccountTrackerController', () => { }); }); + it('should gracefully handle unknown polling tokens', async () => { + await withController(({ controller, blockTrackerFromHookStub }) => { + jest.spyOn(controller, 'updateAccounts').mockResolvedValue(); + + const pollingToken = + controller.startPollingByNetworkClientId('mainnet'); + + controller.stopPollingByPollingToken('unknown-token'); + controller.stopPollingByPollingToken(pollingToken); + + expect(blockTrackerFromHookStub.removeListener).toHaveBeenCalledWith( + 'latest', + expect.any(Function), + ); + }); + }); + it('should not unsubscribe from the block tracker if called with one of multiple active polling tokens for a given networkClient', async () => { await withController(({ controller, blockTrackerFromHookStub }) => { jest.spyOn(controller, 'updateAccounts').mockResolvedValue(); @@ -391,14 +408,6 @@ describe('AccountTrackerController', () => { }).toThrow('pollingToken required'); }); }); - - it('should error if no matching pollingToken is found', async () => { - await withController(({ controller }) => { - expect(() => { - controller.stopPollingByPollingToken('potato'); - }).toThrow('pollingToken not found'); - }); - }); }); describe('stopAll', () => { diff --git a/app/scripts/controllers/account-tracker-controller.ts b/app/scripts/controllers/account-tracker-controller.ts index 54d55d3d0bff..38b46183111f 100644 --- a/app/scripts/controllers/account-tracker-controller.ts +++ b/app/scripts/controllers/account-tracker-controller.ts @@ -403,10 +403,8 @@ export default class AccountTrackerController extends BaseController< if (!pollingToken) { throw new Error('pollingToken required'); } - let found = false; this.#pollingTokenSets.forEach((tokenSet, key) => { if (tokenSet.has(pollingToken)) { - found = true; tokenSet.delete(pollingToken); if (tokenSet.size === 0) { this.#pollingTokenSets.delete(key); @@ -414,9 +412,6 @@ export default class AccountTrackerController extends BaseController< } } }); - if (!found) { - throw new Error('pollingToken not found'); - } } /** diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 489f3d926d4f..756dd163a862 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -7011,7 +7011,7 @@ export default class MetamaskController extends EventEmitter { /** * A method that is called by the background when a particular environment type is closed (fullscreen, popup, notification). - * Currently used to stop polling in the gasFeeController for only that environement type + * Currently used to stop polling controllers for only that environement type * * @param environmentType */ @@ -7021,8 +7021,15 @@ export default class MetamaskController extends EventEmitter { const pollingTokensToDisconnect = this.appStateController.state[appStatePollingTokenType]; pollingTokensToDisconnect.forEach((pollingToken) => { + // We don't know which controller the token is associated with, so try them all. + // Consider storing the tokens per controller in state instead. this.gasFeeController.stopPollingByPollingToken(pollingToken); this.currencyRateController.stopPollingByPollingToken(pollingToken); + this.tokenRatesController.stopPollingByPollingToken(pollingToken); + this.tokenDetectionController.stopPollingByPollingToken(pollingToken); + this.tokenListController.stopPollingByPollingToken(pollingToken); + this.tokenBalancesController.stopPollingByPollingToken(pollingToken); + this.accountTrackerController.stopPollingByPollingToken(pollingToken); this.appStateController.removePollingToken( pollingToken, appStatePollingTokenType, From 5f96f94010f8ba3856679226c31b6169e93c0477 Mon Sep 17 00:00:00 2001 From: Jiexi Luan Date: Fri, 17 Jan 2025 08:25:46 -0800 Subject: [PATCH 64/65] Fix wallet_revokePermission spec --- .../json-rpc/wallet_revokePermissions.spec.ts | 65 +++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/test/e2e/json-rpc/wallet_revokePermissions.spec.ts b/test/e2e/json-rpc/wallet_revokePermissions.spec.ts index 8d7a06ac4ccc..d1ac0d39f580 100644 --- a/test/e2e/json-rpc/wallet_revokePermissions.spec.ts +++ b/test/e2e/json-rpc/wallet_revokePermissions.spec.ts @@ -6,7 +6,7 @@ import TestDapp from '../page-objects/pages/test-dapp'; import { loginWithBalanceValidation } from '../page-objects/flows/login.flow'; describe('Revoke Dapp Permissions', function () { - it('should revoke dapp permissions for "eth_accounts"', async function () { + it('should revoke "eth_accounts" and "endowment:permitted-chains" when the dapp revokes permissions for just "eth_accounts"', async function () { await withFixtures( { dapp: true, @@ -59,14 +59,70 @@ describe('Revoke Dapp Permissions', function () { const afterGetPermissionsNames = afterGetPermissionsResult.map( (permission: PermissionConstraint) => permission.parentCapability, ); - assert.deepEqual(afterGetPermissionsNames, [ + assert.deepEqual(afterGetPermissionsNames, []); + }, + ); + }); + + it('should revoke "eth_accounts" and "endowment:permitted-chains" when the dapp revokes permissions for just "endowment:permitted-chains"', async function () { + await withFixtures( + { + dapp: true, + fixtures: new FixtureBuilder() + .withPermissionControllerConnectedToTestDappWithChain() + .build(), + title: this.test?.fullTitle(), + }, + async ({ driver }) => { + await loginWithBalanceValidation(driver); + const testDapp = new TestDapp(driver); + await testDapp.openTestDappPage(); + + const beforeGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const beforeGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${beforeGetPermissionsRequest})`, + ); + const beforeGetPermissionsNames = beforeGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(beforeGetPermissionsNames, [ + 'eth_accounts', 'endowment:permitted-chains', ]); + + const revokePermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_revokePermissions', + params: [ + { + 'endowment:permitted-chains': {}, + }, + ], + }); + const revokePermissionsResult = await driver.executeScript( + `return window.ethereum.request(${revokePermissionsRequest})`, + ); + assert.deepEqual(revokePermissionsResult, null); + + const afterGetPermissionsRequest = JSON.stringify({ + jsonrpc: '2.0', + method: 'wallet_getPermissions', + }); + const afterGetPermissionsResult = await driver.executeScript( + `return window.ethereum.request(${afterGetPermissionsRequest})`, + ); + const afterGetPermissionsNames = afterGetPermissionsResult.map( + (permission: PermissionConstraint) => permission.parentCapability, + ); + assert.deepEqual(afterGetPermissionsNames, []); }, ); }); - it('should revoke dapp permissions for "endowment:permitted-chains"', async function () { + it('should revoke "eth_accounts" and "endowment:permitted-chains" when the dapp revokes permissions for "eth_accounts" and "endowment:permitted-chains"', async function () { await withFixtures( { dapp: true, @@ -100,6 +156,7 @@ describe('Revoke Dapp Permissions', function () { method: 'wallet_revokePermissions', params: [ { + eth_accounts: {}, 'endowment:permitted-chains': {}, }, ], @@ -119,7 +176,7 @@ describe('Revoke Dapp Permissions', function () { const afterGetPermissionsNames = afterGetPermissionsResult.map( (permission: PermissionConstraint) => permission.parentCapability, ); - assert.deepEqual(afterGetPermissionsNames, ['eth_accounts']); + assert.deepEqual(afterGetPermissionsNames, []); }, ); }); From 582ec932f3c4b4a7002f439095c98a7e76b8ab20 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 17 Jan 2025 13:02:15 -0330 Subject: [PATCH 65/65] test: Fix invalid fixture builder (#29783) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Two of the permission fixture builders were adding permissions for accounts that do not exist. They have been updated to only grant permissions for the selected account, which is the only account guaranteed to exist in the default fixture. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29783?quickstart=1) ## **Related issues** This was extracted from https://github.com/MetaMask/metamask-extension/pull/27847 ## **Manual testing steps** See that E2E tests still pass ## **Screenshots/Recordings** N/A ## **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/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-extension/blob/main/.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. --- test/e2e/fixture-builder.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index 7074a22ea109..9e83c8f2db0b 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -479,10 +479,7 @@ class FixtureBuilder { caveats: [ { type: 'restrictReturnedAccounts', - value: [ - selectedAccount.toLowerCase(), - '0x09781764c08de8ca82e156bbf156a3ca217c7950', - ], + value: [selectedAccount.toLowerCase()], }, ], date: 1664388714636, @@ -594,10 +591,7 @@ class FixtureBuilder { caveats: [ { type: 'restrictReturnedAccounts', - value: [ - '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - '0x09781764c08de8ca82e156bbf156a3ca217c7950', - ], + value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], }, ], date: 1664388714636, @@ -614,10 +608,7 @@ class FixtureBuilder { caveats: [ { type: 'restrictReturnedAccounts', - value: [ - '0x5cfe73b6021e818b776b421b1c4db2474086a7e1', - '0x09781764c08de8ca82e156bbf156a3ca217c7950', - ], + value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'], }, ], date: 1664388714636,