From 925a19fa4a507d48908e1deb045932576e8504dd Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 28 Jun 2022 10:41:19 -0230 Subject: [PATCH] Revert "Merge pull request #14912 from MetaMask/Version-v10.16.0" This reverts commit f09ab8889148c406551dea1643966e3331fde4aa, reversing changes made to effc761e0ee4ea7ffb77f275b5ed650a7098d6f8. This is being temporarily reverted to make it easier to release an urgent fix for v10.15.1. --- .circleci/config.yml | 7 - .circleci/scripts/chrome-install.sh | 4 +- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 16 +- .storybook/1.INTRODUCTION.stories.mdx | 2 +- .storybook/3.COLORS.stories.mdx | 29 +- .storybook/initial-states/transactions.js | 1921 ---------------- .storybook/test-data.js | 88 - CHANGELOG.md | 67 +- app/_locales/am/messages.json | 4 +- app/_locales/ar/messages.json | 2 +- app/_locales/bg/messages.json | 4 +- app/_locales/bn/messages.json | 4 +- app/_locales/ca/messages.json | 4 +- app/_locales/da/messages.json | 4 +- app/_locales/de/messages.json | 32 +- app/_locales/el/messages.json | 32 +- app/_locales/en/messages.json | 111 +- app/_locales/es/messages.json | 32 +- app/_locales/es_419/messages.json | 17 +- app/_locales/et/messages.json | 4 +- app/_locales/fa/messages.json | 4 +- app/_locales/fi/messages.json | 4 +- app/_locales/fil/messages.json | 4 +- app/_locales/fr/messages.json | 32 +- app/_locales/he/messages.json | 2 +- app/_locales/hi/messages.json | 30 +- app/_locales/hr/messages.json | 4 +- app/_locales/hu/messages.json | 2 +- app/_locales/id/messages.json | 30 +- app/_locales/it/messages.json | 17 +- app/_locales/ja/messages.json | 30 +- app/_locales/kn/messages.json | 4 +- app/_locales/ko/messages.json | 30 +- app/_locales/lt/messages.json | 4 +- app/_locales/lv/messages.json | 4 +- app/_locales/ms/messages.json | 4 +- app/_locales/no/messages.json | 4 +- app/_locales/ph/messages.json | 17 +- app/_locales/pl/messages.json | 4 +- app/_locales/pt/messages.json | 32 +- app/_locales/pt_BR/messages.json | 17 +- app/_locales/ro/messages.json | 4 +- app/_locales/ru/messages.json | 32 +- app/_locales/sk/messages.json | 4 +- app/_locales/sl/messages.json | 4 +- app/_locales/sr/messages.json | 4 +- app/_locales/sv/messages.json | 4 +- app/_locales/sw/messages.json | 4 +- app/_locales/tl/messages.json | 36 +- app/_locales/tr/messages.json | 34 +- app/_locales/uk/messages.json | 4 +- app/_locales/vi/messages.json | 32 +- app/_locales/zh/messages.json | 34 +- app/_locales/zh_CN/messages.json | 17 +- app/_locales/zh_TW/messages.json | 4 +- app/home.html | 5 +- app/manifest/{v2 => }/_base.json | 1 - app/manifest/{v2 => }/brave.json | 0 app/manifest/{v2 => }/chrome.json | 0 app/manifest/{v2 => }/firefox.json | 0 app/manifest/{v2 => }/opera.json | 0 app/manifest/v3/_base.json | 82 - app/manifest/v3/brave.json | 1 - app/manifest/v3/chrome.json | 7 - app/manifest/v3/firefox.json | 26 - app/manifest/v3/opera.json | 9 - app/popup.html | 5 +- app/scripts/app-init.js | 55 - app/scripts/background.js | 65 +- app/scripts/constants/on-ramp.js | 1 - app/scripts/contentscript.js | 9 +- app/scripts/controllers/detect-tokens.js | 20 - app/scripts/controllers/metametrics.js | 10 - app/scripts/controllers/metametrics.test.js | 16 +- .../permissions/flask/snap-permissions.js | 2 +- app/scripts/controllers/swaps.js | 46 +- app/scripts/controllers/swaps.test.js | 9 +- app/scripts/controllers/transactions/index.js | 129 +- .../controllers/transactions/index.test.js | 135 +- app/scripts/lib/buy-url.js | 46 +- app/scripts/lib/metaRPCClientFactory.js | 29 +- app/scripts/lib/metaRPCClientFactory.test.js | 17 - .../handlers/add-ethereum-chain.js | 2 +- app/scripts/metamask-controller.js | 145 +- app/scripts/metamask-controller.test.js | 34 - app/scripts/migrations/072.js | 30 - app/scripts/migrations/072.test.js | 427 ---- app/scripts/migrations/index.js | 2 - app/scripts/platforms/extension.js | 14 +- app/scripts/platforms/extension.test.js | 27 +- app/scripts/ui.js | 43 +- development/build/manifest.js | 6 +- development/build/scripts.js | 62 +- development/jest.config.js | 2 +- docs/trezor-emulator.md | 2 +- jest.config.js | 10 +- lavamoat/browserify/beta/policy.json | 490 ++-- lavamoat/browserify/flask/policy.json | 517 +++-- lavamoat/browserify/main/policy.json | 490 ++-- lavamoat/browserify/policy-override.json | 5 + lavamoat/build-system/policy.json | 238 +- package.json | 36 +- .../@metamask+snap-controllers+0.15.0.patch | 323 --- patches/bip39+2.5.0.patch | 99 + patches/eth-hd-keyring+3.6.0.patch | 43 + patches/eth-keyring-controller+6.2.1.patch | 37 + patches/secp256k1+3.8.0.patch | 37 - shared/constants/gas.js | 13 - shared/constants/metametrics.js | 39 +- shared/constants/network.js | 14 - shared/constants/permissions.js | 1 - shared/constants/permissions.test.js | 2 +- shared/constants/smartTransactions.js | 5 - shared/constants/swaps.js | 5 - shared/constants/transaction.js | 73 +- shared/modules/mv3.utils.js | 4 - test/data/mock-state.json | 16 - test/data/transaction-data.json | 352 --- test/e2e/helpers.js | 42 - test/e2e/snaps/enums.js | 3 - test/e2e/snaps/test-snap-bip-44.spec.js | 3 +- test/e2e/snaps/test-snap-confirm.spec.js | 8 +- test/e2e/snaps/test-snap-error.spec.js | 3 +- test/e2e/snaps/test-snap-managestate.spec.js | 142 -- test/e2e/snaps/test-snap-notification.spec.js | 110 - test/e2e/tests/auto-lock.spec.js | 53 - test/e2e/tests/custom-rpc-history.spec.js | 12 +- test/e2e/tests/dapp-interactions.spec.js | 2 +- test/e2e/tests/edit-gas-fee.spec.js | 48 +- test/e2e/tests/from-import-ui.spec.js | 53 +- test/e2e/tests/metamask-responsive-ui.spec.js | 2 +- test/e2e/tests/send-edit.spec.js | 78 +- test/e2e/tests/send-eth.spec.js | 2 + test/e2e/webdriver/driver.js | 11 +- test/jest/mock-store.js | 146 +- .../account-menu/account-menu.component.js | 46 +- .../account-menu/account-menu.container.js | 10 +- ui/components/app/account-menu/index.scss | 33 +- .../app/advanced-gas-controls/index.scss | 2 +- .../advanced-gas-fee-input-subtext.js | 2 +- ui/components/app/app-components.scss | 4 +- .../app/app-header/app-header.component.js | 15 - .../app/app-header/app-header.container.js | 10 - ui/components/app/app-header/index.scss | 19 - ui/components/app/asset-list/asset-list.js | 39 +- .../detected-tokens-link.js | 27 +- .../detected-tokens-link.stories.js | 28 - .../detected-tokens-link.test.js | 32 - .../cancel-speedup-popover.js | 4 +- .../cancel-speedup-popover.test.js | 25 - .../collectible-details.js | 2 +- .../collectibles-items/collectibles-items.js | 6 +- .../app/collectibles-items/index.scss | 4 - .../confirm-detail-row.stories.js | 47 - .../confirm-detail-row/index.scss | 6 +- ...onfirm-page-container-summary.component.js | 6 +- .../connected-accounts-list.stories.js | 38 - .../connected-sites-list.component.js | 8 +- .../app/connected-sites-list/index.scss | 4 + .../app/currency-input/currency-input.js | 40 +- .../app/currency-input/currency-input.test.js | 21 +- .../detected-token-address.js | 15 +- .../detected-token-address.stories.js | 6 +- .../detected-token-address.test.js | 2 +- .../detected-token-aggregators.js | 34 +- .../detected-token-aggregators.stories.js | 10 +- .../detected-token-aggregators.test.js | 2 +- .../detected-token-details.js | 39 +- .../detected-token-details.stories.js | 66 +- .../detected-token-details.test.js | 63 +- .../detected-token-ignored-popover.js | 57 - .../detected-token-ignored-popover.stories.js | 24 - .../detected-token-ignored-popover/index.scss | 13 - .../detected-token-selection-popover.js | 104 - ...etected-token-selection-popover.stories.js | 69 - .../index.scss | 9 - .../detected-token-values.js | 36 +- .../detected-token-values.stories.js | 87 +- .../detected-token-values.test.js | 80 +- .../app/detected-token/detected-token.js | 159 -- .../app/detected-token/detected-token.test.js | 49 - ui/components/app/detected-token/index.js | 1 - .../app/dropdowns/network-dropdown.test.js | 3 - ui/components/app/edit-gas-display/index.scss | 4 +- .../edit-gas-fee-button.js | 23 +- .../app/edit-gas-fee-button/index.scss | 7 - .../edit-gas-item/index.scss | 2 +- .../edit-gas-tooltip/index.scss | 2 +- .../status-slider/index.scss | 2 +- .../flask/snaps-authorship-pill/index.scss | 15 +- .../snaps-authorship-pill.js | 49 +- .../snaps-authorship-pill.stories.js | 8 +- .../advanced-gas-inputs/index.scss | 4 +- ui/components/app/gas-details-item/index.scss | 2 +- ui/components/app/gas-timing/index.scss | 2 +- .../hold-to-reveal-button.js | 2 +- .../import-token-link.component.js | 21 +- .../ledger-instruction-field.js | 2 +- .../account-details-modal.test.js | 14 +- .../deposit-ether-modal.component.js | 35 +- .../deposit-ether-modal.container.js | 11 +- ui/components/app/modals/modal.js | 26 + .../modals/qr-scanner/qr-scanner.component.js | 2 +- .../app/permissions-connect-header/index.scss | 2 +- .../permissions-connect-header.component.js | 62 +- .../index.scss | 2 +- .../qr-hardware-popover/enhanced-reader.js | 2 +- .../selected-account.component.js | 2 +- .../app/signature-request-original/README.mdx | 15 - .../app/signature-request-original/index.scss | 6 +- .../signature-request-original.component.js | 48 +- .../signature-request-original.container.js | 28 +- .../signature-request-original.stories.js | 132 -- .../app/signature-request/index.scss | 5 +- .../signature-request-footer.component.js | 4 +- .../signature-request-message/index.scss | 2 +- .../signature-request-message.component.js | 2 +- .../signature-request.component.js | 6 +- .../signature-request.component.test.js | 4 +- .../signature-request.container.test.js | 1 - .../signature-request.stories.js | 32 +- ui/components/app/srp-input/srp-input.js | 9 +- ui/components/app/srp-input/srp-input.scss | 25 +- .../app/step-progress-bar/index.scss | 32 +- .../step-progress-bar/step-progress-bar.js | 10 +- ui/components/app/tab-bar/index.scss | 2 +- ui/components/app/token-cell/token-cell.js | 2 +- .../transaction-activity-log-icon.stories.js | 3 - .../transaction-decoding.component.js | 2 +- .../app/transaction-detail-item/index.scss | 2 +- .../app/transaction-icon/transaction-icon.js | 18 +- .../transaction-list-item-details/index.scss | 3 +- ...action-list-item-details.component.test.js | 5 - .../app/transaction-list-item/index.scss | 6 + .../smart-transaction-list-item.component.js | 9 +- .../transaction-list-item.component.js | 18 +- .../transaction-list-item.stories.js | 210 -- .../app/transaction-status/index.scss | 2 +- ...-preferenced-currency-display.component.js | 2 +- ...erenced-currency-display.component.test.js | 2 +- .../app/wallet-overview/eth-overview.js | 2 +- ui/components/app/wallet-overview/index.scss | 2 +- .../app/wallet-overview/token-overview.js | 2 +- ui/components/ui/dropdown/dropdown.scss | 1 - .../ui/form-field/form-field.stories.js | 2 +- ui/components/ui/form-field/index.scss | 4 +- .../icon-with-fallback.scss | 2 +- ui/components/ui/icon/icon.stories.js | 3 +- ui/components/ui/info-tooltip/info-tooltip.js | 2 +- ui/components/ui/loading-screen/index.scss | 4 +- .../loading-screen.component.js | 2 +- ui/components/ui/logo/logo-coinbasepay.js | 58 - ui/components/ui/logo/logo-coinbasepay.scss | 3 - ui/components/ui/logo/logo-wyre.js | 48 +- ui/components/ui/logo/logo.stories.js | 2 - ui/components/ui/menu/menu.scss | 2 +- .../ui/metafox-logo/horizontal-logo.js | 2 +- .../ui/sender-to-recipient/index.scss | 2 +- ui/components/ui/site-icon/site-icon.test.js | 3 +- ui/components/ui/site-origin/index.scss | 8 +- ui/components/ui/site-origin/site-origin.js | 52 +- .../ui/site-origin/site-origin.stories.js | 8 - ui/components/ui/spinner/spinner.stories.js | 26 - .../ui/token-input/token-input.component.js | 9 +- .../token-input/token-input.component.test.js | 90 - .../ui/token-input/token-input.container.js | 3 +- ui/components/ui/ui-components.scss | 1 - .../ui/update-nickname-popover/index.scss | 2 +- ui/css/errors.scss | 44 - ui/css/index.scss | 2 - ui/css/itcss/components/send.scss | 14 +- ui/css/loading.scss | 13 - ui/css/utilities/colors.scss | 4 +- ui/ducks/app/app.js | 7 - ui/ducks/send/send.js | 684 ++---- ui/ducks/send/send.test.js | 310 ++- ui/ducks/swaps/swaps.js | 104 +- ui/ducks/swaps/swaps.test.js | 9 +- ui/helpers/constants/common.js | 22 - ui/helpers/constants/critical-error.js | 1 - ui/helpers/constants/notifications.js | 6 - ui/helpers/constants/routes.js | 2 - ui/helpers/utils/error-utils.js | 55 - ui/helpers/utils/error-utils.test.js | 49 - ui/helpers/utils/permission.js | 5 - ui/helpers/utils/transactions.util.js | 28 +- ui/helpers/utils/transactions.util.test.js | 46 - ui/hooks/useAssetDetails.js | 14 +- ui/hooks/useAssetDetails.test.js | 197 -- ui/hooks/useTransactionDisplayData.js | 72 +- ui/hooks/useTransactionDisplayData.test.js | 12 - ui/index.js | 32 +- ui/index.test.js | 70 - ui/pages/add-collectible/add-collectible.js | 5 +- .../confirm-add-suggested-token.js | 6 +- .../confirm-approve-content.component.js | 97 +- .../confirm-approve-content/index.scss | 4 - ui/pages/confirm-approve/confirm-approve.js | 3 - ...confirm-encryption-public-key.component.js | 5 +- .../confirm-encryption-public-key.scss | 1 - .../confirm-import-token.js | 11 +- ui/pages/confirmation/confirmation.js | 9 +- .../templates/add-ethereum-chain.js | 5 +- .../connect-hardware/index.scss | 2 +- .../end-of-flow/end-of-flow.component.js | 4 +- .../metametrics-opt-in/index.scss | 4 + .../onboarding-initiator-util.js | 50 +- .../reveal-seed-phrase.component.js | 4 +- ui/pages/home/home.component.js | 43 +- ui/pages/home/home.container.js | 8 +- ui/pages/home/index.scss | 31 - ui/pages/notifications/index.js | 1 - ui/pages/notifications/index.scss | 114 - ui/pages/notifications/notification.test.js | 100 - ui/pages/notifications/notifications.js | 141 -- .../create-password/create-password.js | 23 +- .../create-password/index.scss | 11 +- .../creation-successful.js | 11 +- .../creation-successful/index.scss | 8 +- .../onboarding-flow/import-srp/import-srp.js | 7 +- .../onboarding-flow/import-srp/index.scss | 31 +- ui/pages/onboarding-flow/index.scss | 18 +- .../onboarding-flow/metametrics/index.scss | 23 +- .../metametrics/metametrics.js | 5 +- .../onboarding-app-header/index.scss | 2 +- .../onboarding-flow/pin-extension/index.scss | 4 +- .../privacy-settings/index.scss | 13 - .../privacy-settings/setting.js | 2 +- .../confirm-recovery-phrase.js | 12 +- .../recovery-phrase/index.scss | 73 +- .../recovery-phrase/review-recovery-phrase.js | 7 +- .../secure-your-wallet/index.scss | 30 +- .../secure-your-wallet/secure-your-wallet.js | 11 +- ui/pages/onboarding-flow/welcome/index.scss | 8 +- ui/pages/onboarding-flow/welcome/welcome.js | 2 +- ui/pages/pages.scss | 1 - .../flask/snap-install/index.scss | 4 + .../flask/snap-install/snap-install.js | 9 +- ui/pages/permissions-connect/index.scss | 4 +- ui/pages/routes/routes.component.js | 11 - .../add-recipient/add-recipient.component.js | 10 +- ui/pages/send/send.scss | 2 +- .../advanced-tab/advanced-tab.component.js | 3 +- .../advanced-tab.component.test.js | 6 - .../advanced-tab/advanced-tab.container.js | 2 +- ui/pages/settings/alerts-tab/alerts-tab.js | 2 +- ui/pages/settings/alerts-tab/alerts-tab.scss | 4 - ui/pages/settings/contact-list-tab/index.scss | 1 - .../flask/snaps-list-tab/snap-list-tab.js | 5 +- .../settings/flask/view-snap/view-snap.js | 16 +- ui/pages/settings/index.scss | 4 +- .../custom-content-search.js | 2 +- ui/pages/settings/networks-tab/index.scss | 11 +- .../networks-form/networks-form.js | 11 +- .../networks-list/networks-list.js | 2 +- .../settings/networks-tab/networks-tab.js | 2 +- .../swaps/awaiting-swap/awaiting-swap.test.js | 3 +- .../__snapshots__/build-quote.test.js.snap | 8 +- .../exchange-rate-display.test.js.snap | 2 +- .../exchange-rate-display.js | 2 +- .../__snapshots__/fee-card.test.js.snap | 2 + ui/pages/swaps/fee-card/fee-card.js | 106 +- ui/pages/swaps/fee-card/fee-card.test.js | 62 +- ui/pages/swaps/index.js | 35 +- .../swaps/select-quote-popover/index.scss | 2 +- .../select-quote-popover.test.js | 1 - .../sort-list/sort-list.test.js | 1 - .../slippage-buttons.test.js.snap | 16 +- .../slippage-buttons/slippage-buttons.js | 26 +- .../slippage-buttons/slippage-buttons.test.js | 2 +- .../smart-transaction-status.js | 28 +- .../smart-transaction-status.test.js | 2 +- ...customization-modal.component.test.js.snap | 136 ++ ...customization-modal.container.test.js.snap | 98 + .../swaps-gas-customization-modal/index.js | 1 + ...swaps-gas-customization-modal.component.js | 281 +++ ...-gas-customization-modal.component.test.js | 81 + ...swaps-gas-customization-modal.container.js | 186 ++ ...-gas-customization-modal.container.test.js | 34 + .../swaps-gas-customization-modal.stories.js | 253 ++ ui/pages/swaps/swaps.util.js | 27 +- ui/pages/swaps/swaps.util.test.js | 104 - ui/pages/swaps/view-quote/index.scss | 8 +- ui/pages/swaps/view-quote/view-quote.js | 428 ++-- ui/pages/swaps/view-quote/view-quote.test.js | 3 +- ui/pages/unlock-page/index.scss | 4 +- ui/selectors/confirm-transaction.js | 23 - ui/selectors/selectors.js | 102 +- ui/selectors/selectors.test.js | 23 - ui/store/actionConstants.js | 3 - ui/store/actions.js | 176 +- ui/store/actions.test.js | 54 - yarn.lock | 2036 ++++++++++------- 394 files changed, 6400 insertions(+), 11493 deletions(-) delete mode 100644 .storybook/initial-states/transactions.js rename app/manifest/{v2 => }/_base.json (97%) rename app/manifest/{v2 => }/brave.json (100%) rename app/manifest/{v2 => }/chrome.json (100%) rename app/manifest/{v2 => }/firefox.json (100%) rename app/manifest/{v2 => }/opera.json (100%) delete mode 100644 app/manifest/v3/_base.json delete mode 100644 app/manifest/v3/brave.json delete mode 100644 app/manifest/v3/chrome.json delete mode 100644 app/manifest/v3/firefox.json delete mode 100644 app/manifest/v3/opera.json delete mode 100644 app/scripts/app-init.js delete mode 100644 app/scripts/migrations/072.js delete mode 100644 app/scripts/migrations/072.test.js delete mode 100644 patches/@metamask+snap-controllers+0.15.0.patch create mode 100644 patches/bip39+2.5.0.patch create mode 100644 patches/eth-hd-keyring+3.6.0.patch create mode 100644 patches/eth-keyring-controller+6.2.1.patch delete mode 100644 patches/secp256k1+3.8.0.patch delete mode 100644 shared/constants/smartTransactions.js delete mode 100644 shared/modules/mv3.utils.js delete mode 100644 test/e2e/snaps/enums.js delete mode 100644 test/e2e/snaps/test-snap-managestate.spec.js delete mode 100644 test/e2e/snaps/test-snap-notification.spec.js delete mode 100644 test/e2e/tests/auto-lock.spec.js delete mode 100644 ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.stories.js delete mode 100644 ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.test.js delete mode 100644 ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.stories.js delete mode 100644 ui/components/app/connected-accounts-list/connected-accounts-list.stories.js delete mode 100644 ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.js delete mode 100644 ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.stories.js delete mode 100644 ui/components/app/detected-token/detected-token-ignored-popover/index.scss delete mode 100644 ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js delete mode 100644 ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.stories.js delete mode 100644 ui/components/app/detected-token/detected-token-selection-popover/index.scss delete mode 100644 ui/components/app/detected-token/detected-token.js delete mode 100644 ui/components/app/detected-token/detected-token.test.js delete mode 100644 ui/components/app/detected-token/index.js delete mode 100644 ui/components/app/signature-request-original/README.mdx delete mode 100644 ui/components/app/signature-request-original/signature-request-original.stories.js delete mode 100644 ui/components/app/transaction-list-item/transaction-list-item.stories.js delete mode 100644 ui/components/ui/logo/logo-coinbasepay.js delete mode 100644 ui/components/ui/logo/logo-coinbasepay.scss delete mode 100644 ui/components/ui/spinner/spinner.stories.js delete mode 100644 ui/css/errors.scss delete mode 100644 ui/css/loading.scss delete mode 100644 ui/helpers/constants/critical-error.js delete mode 100644 ui/helpers/constants/notifications.js delete mode 100644 ui/helpers/utils/error-utils.js delete mode 100644 ui/helpers/utils/error-utils.test.js delete mode 100644 ui/hooks/useAssetDetails.test.js delete mode 100644 ui/index.test.js delete mode 100644 ui/pages/notifications/index.js delete mode 100644 ui/pages/notifications/index.scss delete mode 100644 ui/pages/notifications/notification.test.js delete mode 100644 ui/pages/notifications/notifications.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.component.test.js.snap create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/index.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js create mode 100644 ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 749402c7f..bf6513533 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -670,13 +670,6 @@ jobs: - run: name: test:coverage:jest command: yarn test:coverage:jest - - run: - name: Validate coverage thresholds - command: | - if ! git diff --exit-code jest.config.js development/jest.config.js; then - echo "Detected changes in coverage thresholds" - exit 1 - fi - persist_to_workspace: root: . paths: diff --git a/.circleci/scripts/chrome-install.sh b/.circleci/scripts/chrome-install.sh index f97d0486d..8be51ad30 100755 --- a/.circleci/scripts/chrome-install.sh +++ b/.circleci/scripts/chrome-install.sh @@ -5,12 +5,12 @@ set -u set -o pipefail # To get the latest version, see -CHROME_VERSION='102.0.5005.61-1' +CHROME_VERSION='100.0.4896.60-1' CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb" CHROME_BINARY_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_BINARY}" # To retrieve this checksum, run the `wget` and `shasum` commands below -CHROME_BINARY_SHA512SUM='dd701b99febf7d927657f38716d90f3a0b967ae75dac5f6e8fbf9df632c8a531ccb9f37ee09340ad730b4fe40d0564c1b64201121d2d3e4e503f3f167ca632cd' +CHROME_BINARY_SHA512SUM='d7a98777650e8218fef4acc8466d4ddf5e234b97fbc16c33f38f69f9ebfe7b6bb6827a90aad15ea729d7c1bacfa78488c5d5194b531f00f454302dd9c0957e4e' wget -O "${CHROME_BINARY}" -t 5 "${CHROME_BINARY_URL}" diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 90450a395..889bd9d1b 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,7 +1,7 @@ name: Bug Report description: Using MetaMask, but it's not working as you expect? title: "[Bug]: " -labels: ["type-bug"] +labels: ["bug"] body: - type: markdown attributes: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6df4c6e65..da7708be2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,7 +15,7 @@ This is a problem because ... In order to solve this problem, this pull request ... --> -## More Information +## More information -## Manual Testing Steps +## Manual testing steps - -## Pre-Merge Checklist - -- [ ] PR template is filled out -- [ ] **IF** this PR fixes a bug, a test that _would have_ caught the bug has been added -- [ ] PR is linked to the appropriate GitHub issue -- [ ] PR has been added to the appropriate release Milestone - -### + If there are functional changes: - -- [ ] Manual testing complete & passed -- [ ] "Extension QA Board" label has been applied diff --git a/.storybook/1.INTRODUCTION.stories.mdx b/.storybook/1.INTRODUCTION.stories.mdx index 2633d11ae..23ba7e8f7 100644 --- a/.storybook/1.INTRODUCTION.stories.mdx +++ b/.storybook/1.INTRODUCTION.stories.mdx @@ -8,7 +8,7 @@ Welcome to the MetaMask Browser Extension Storybook. ## Building locally and Contributing -This document is currently only specific to storybook best practices and component documentation guidelines. This may change in future but for now if you are looking to get a local build of MetaMask up and running or contribute to the extension codebase please read the MetaMask [README.md](https://github.com/MetaMask/metamask-extension) +This document is currently only specific to storybook best practices and component documentation guidelines. This may change in future but for now if you are looking to get a local build of Metamask up and running or contribute to the extension codebase please read the Metamask [README.md](https://github.com/MetaMask/metamask-extension) ## Documentation Guidelines diff --git a/.storybook/3.COLORS.stories.mdx b/.storybook/3.COLORS.stories.mdx index 507fade1c..b694a721a 100644 --- a/.storybook/3.COLORS.stories.mdx +++ b/.storybook/3.COLORS.stories.mdx @@ -67,7 +67,6 @@ var(--color-text-muted) /** Icons */ var(--color-icon-default) -var(--color-icon-alternative) var(--color-icon-muted) /** Borders */ @@ -76,20 +75,20 @@ var(--color-border-muted) /** Overlays */ var(--color-overlay-default) -var(--color-overlay-inverse) [DEPRECATED] +var(--color-overlay-inverse) /** User Actions */ var(--color-primary-default) var(--color-primary-alternative) var(--color-primary-muted) var(--color-primary-inverse) -var(--color-primary-disabled) [DEPRECATED] +var(--color-primary-disabled) -var(--color-secondary-default) [DEPRECATED] -var(--color-secondary-alternative) [DEPRECATED] -var(--color-secondary-muted) [DEPRECATED] -var(--color-secondary-inverse) [DEPRECATED] -var(--color-secondary-disabled) [DEPRECATED] +var(--color-secondary-default) +var(--color-secondary-alternative) +var(--color-secondary-muted) +var(--color-secondary-inverse) +var(--color-secondary-disabled) /** States */ /** Error */ @@ -97,28 +96,28 @@ var(--color-error-default) var(--color-error-alternative) var(--color-error-muted) var(--color-error-inverse) -var(--color-error-disabled) [DEPRECATED] +var(--color-error-disabled) /** Warning */ var(--color-warning-default) -var(--color-warning-alternative) [DEPRECATED] +var(--color-warning-alternative) var(--color-warning-muted) var(--color-warning-inverse) -var(--color-warning-disabled) [DEPRECATED] +var(--color-warning-disabled) /** Success */ var(--color-success-default) -var(--color-success-alternative) [DEPRECATED] +var(--color-success-alternative) var(--color-success-muted) var(--color-success-inverse) -var(--color-success-disabled) [DEPRECATED] +var(--color-success-disabled) /** Info */ var(--color-info-default) -var(--color-info-alternative) [DEPRECATED] +var(--color-info-alternative) var(--color-info-muted) var(--color-info-inverse) -var(--color-info-disabled) [DEPRECATED] +var(--color-info-disabled) ``` ### **Component colors** (tier 3) diff --git a/.storybook/initial-states/transactions.js b/.storybook/initial-states/transactions.js deleted file mode 100644 index 34b848712..000000000 --- a/.storybook/initial-states/transactions.js +++ /dev/null @@ -1,1921 +0,0 @@ -const MOCK_TX_TYPE = { - CANCEL: 'cancel', - CONTRACT_INTERACTION: 'contractInteraction', - DEPLOY_CONTRACT: 'contractDeployment', - ETH_DECRYPT: 'eth_decrypt', - ETH_GET_ENCRYPTION_PUBLIC_KEY: 'eth_getEncryptionPublicKey', - INCOMING: 'incoming', - PERSONAL_SIGN: 'personal_sign', - RETRY: 'retry', - SIGN: 'eth_sign', - SIGN_TYPED_DATA: 'eth_signTypedData', - SIMPLE_SEND: 'simpleSend', - SMART: 'smart', - SWAP: 'swap', - SWAP_APPROVAL: 'swapApproval', - TOKEN_METHOD_APPROVE: 'approve', - TOKEN_METHOD_SAFE_TRANSFER_FROM: 'safetransferfrom', - TOKEN_METHOD_TRANSFER: 'transfer', - TOKEN_METHOD_TRANSFER_FROM: 'transferfrom', -}; - -export const MOCK_TRANSACTION_BY_TYPE = { - [MOCK_TX_TYPE.CANCEL]: { - id: 643368596521636, - time: 1653527035634, - status: 'submitted', - metamaskNetworkId: '4', - originalGasEstimate: '5208', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [], - txParams: { - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - to: '0xefge7847fd3661a9b7c86aaf1daea08d9da5750e', - nonce: '0x51', - value: '0x0', - gas: '0x5208', - gasPrice: '0x59682f0e', - estimateSuggested: 'medium', - estimateUsed: 'custom', - }, - previousGasParams: { - gasPrice: '0x3b9aca00', - }, - type: 'cancel', - history: [ - { - id: 643368596521636, - time: 1653527035634, - status: 'approved', - metamaskNetworkId: '4', - originalGasEstimate: '5208', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [], - txParams: { - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - to: '0xefge7847fd3661a9b7c86aaf1daea08d9da5750e', - nonce: '0x51', - value: '0x0', - gas: '0x5208', - gasPrice: '0x59682f0e', - estimateSuggested: 'medium', - estimateUsed: 'custom', - }, - previousGasParams: { - gasPrice: '0x3b9aca00', - }, - type: 'cancel', - }, - [ - { - op: 'add', - path: '/nonceDetails', - value: { - params: { - highestLocallyConfirmed: 81, - highestSuggested: 81, - nextNetworkNonce: 81, - }, - local: { - name: 'local', - nonce: 83, - details: { - startPoint: 81, - highest: 83, - }, - }, - network: { - name: 'network', - nonce: 81, - details: { - blockNumber: '0xa3e3ac', - baseCount: 81, - }, - }, - }, - note: 'transactions#approveTransaction', - timestamp: 1653527035723, - }, - ], - [ - { - op: 'add', - path: '/r', - value: - '0xb66eff07d9061c42e47ccf5f6a52b6626ef4d5b10e50d8aa6b8f20ae645fe347', - note: 'transactions#signTransaction: add r, s, v values', - timestamp: 1653527035817, - }, - { - op: 'add', - path: '/s', - value: - '0x3a2da8d56beff82a2d59e807f7d578f0c3b4b99cd6d3735c72c133d06fe02a9d', - }, - { - op: 'add', - path: '/v', - value: '0x2b', - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'signed', - note: 'txStateManager: setting status to signed', - timestamp: 1653527035818, - }, - ], - [ - { - op: 'add', - path: '/rawTx', - value: - '0xf863518459682f0e82520894e56e7847fd3661a9b7c86aaf1daea08d9da5750e80802ba0b66eff07d9061c42e47ccf5f6a52b6626ef4d5b10e50d8aa6b8f20ae645fe347a03a2da8d56beff82a2d59e807f7d578f0c3b4b99cd6d3735c72c133d06fe02a9d', - note: 'transactions#publishTransaction', - timestamp: 1653527035819, - }, - ], - [ - { - op: 'add', - path: '/hash', - value: - '0xb7628b82716108edcfe84dfd6ed49b219bc019e3fc6e96cf95548c32a67c1cbc', - note: 'transactions#setTxHash', - timestamp: 1653527035923, - }, - ], - [ - { - op: 'add', - path: '/submittedTime', - value: 1653527035924, - note: 'txStateManager - add submitted time stamp', - timestamp: 1653527035924, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'submitted', - note: 'txStateManager: setting status to submitted', - timestamp: 1653527035925, - }, - ], - ], - nonceDetails: { - params: { - highestLocallyConfirmed: 81, - highestSuggested: 81, - nextNetworkNonce: 81, - }, - local: { - name: 'local', - nonce: 83, - details: { - startPoint: 81, - highest: 83, - }, - }, - network: { - name: 'network', - nonce: 81, - details: { - blockNumber: '0xa3e3ac', - baseCount: 81, - }, - }, - }, - r: '0xb66eff07d9061c42e47ccf5f6a52b6626ef4d5b10e50d8aa6b8f20ae645fe347', - s: '0x3a2da8d56beff82a2d59e807f7d578f0c3b4b99cd6d3735c72c133d06fe02a9d', - v: '0x2b', - rawTx: - '0xf863518459682f0e82520894e56e7847fd3661a9b7c86aaf1daea08d9da5750e80802ba0b66eff07d9061c42e47ccf5f6a52b6626ef4d5b10e50d8aa6b8f20ae645fe347a03a2da8d56beff82a2d59e807f7d578f0c3b4b99cd6d3735c72c133d06fe02a9d', - hash: '0xb7628b82716108edcfe84dfd6ed49b219bc019e3fc6e96cf95548c32a67c1cbc', - submittedTime: 1653527035924, - }, - [MOCK_TX_TYPE.CONTRACT_INTERACTION]: { - chainId: '0x4', - dappSuggestedGasFees: { - gas: '0x118f4', - maxFeePerGas: '0x9502f91a', - maxPriorityFeePerGas: '0x9502F900', - }, - id: 7694052085150913, - loadingDefaults: true, - metamaskNetworkId: '4', - origin: 'https://remix.ethereum.org', - originalGasEstimate: '0x118f4', - sendFlowHistory: [], - status: 'unapproved', - time: 1653417884003, - txParams: { - data: - '0xa1448194000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e0000000000000000000000000000000000000000000000000000000000000004', - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - gas: '0x118f4', - maxFeePerGas: '0x9502f91a', - maxPriorityFeePerGas: '0x9502F900', - to: '0xefg6c980a3fcd3100503d8f80537eefcee516d67', - type: '0x2', - value: '0x0', - }, - type: 'contractInteraction', - userEditedGasLimit: false, - }, - [MOCK_TX_TYPE.DEPLOY_CONTRACT]: { - blockNumber: '6195527', - id: 4243712234858468, - metamaskNetworkId: '4', - status: 'confirmed', - time: 1585088013000, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - hash: '0xbcb195f393f4468945b4045cd41bcdbc2f19ad75ae92a32cf153a3004e42009a', - type: 'contractDeployment', - origin: 'https://metamask.github.io', - }, - [MOCK_TX_TYPE.ETH_DECRYPT]: { - id: 5177046356058652, - msgParams: { - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - data: - '0x7b2276657273696f6e223a227832353531392d7873616c736132302d706f6c7931333035222c226e6f6e6365223a22415a7a535971376139725531396e3835753174494f5765367a486e32775a6166222c22657068656d5075626c69634b6579223a2251336d346650474a6b6a32396d44766f7133536a77616733686b3651366571744236397671795258517a673d222c2263697068657274657874223a223943556d614c327a69635a5838584c4d5a75646b58392f6531544770384d61513135776276774c6d442b4235772b4f706655694c586c586d55355536645339675638584c61445557446e656735546b3d227d', - origin: 'https://metamask.github.io', - }, - time: 1653450860396, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - status: 'unapproved', - type: 'eth_decrypt', - }, - [MOCK_TX_TYPE.ETH_GET_ENCRYPTION_PUBLIC_KEY]: { - id: 5177046356058645, - msgParams: '0xe56e7847fd3661a9b7c86aaf1daea08d9da5750e', - time: 1653450802102, - status: 'unapproved', - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - type: 'eth_getEncryptionPublicKey', - origin: 'https://metamask.github.io', - }, - [MOCK_TX_TYPE.INCOMING]: { - blockNumber: '6477257', - id: 4243712234858505, - metamaskNetworkId: '4', - status: 'confirmed', - time: 1589314295000, - txParams: { - from: '0xabc98d14007bdee637298086988a0bbd31184523', - gas: '0x5208', - gasPrice: '0x3b9aca00', - nonce: '0x56540', - to: '0xefga64466f257793eaa52fcfff5066894b76a149', - value: '0x1043561a882930000', - }, - hash: '0x5ca26d1cdcabef1ac2ad5b2b38604c9ced65d143efc7525f848c46f28e0e4116', - type: 'incoming', - }, - [MOCK_TX_TYPE.PERSONAL_SIGN]: { - id: 5177046356058671, - msgParams: { - 0: 'E', - 1: 'x', - 2: 'a', - 3: 'm', - 4: 'p', - 5: 'l', - 6: 'e', - 7: ' ', - 8: 'p', - 9: 'a', - 10: 's', - 11: 's', - 12: 'w', - 13: 'o', - 14: 'r', - 15: 'd', - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - data: '0x4578616d706c652060706572736f6e616c5f7369676e60206d657373616765', - origin: 'https://metamask.github.io', - }, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - time: 1653451036121, - status: 'unapproved', - type: 'personal_sign', - }, - [MOCK_TX_TYPE.RETRY]: { - id: 3938342322880462, - time: 1653459456297, - status: 'failed', - metamaskNetworkId: '4', - originalGasEstimate: '14609', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - nonce: '0x7', - value: '0x0', - data: - '0x6080604052348015600f57600080fd5b50608b8061001e6000396000f3fe6080604052610fff3411600e57fe5b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156053573d6000803e3d6000fd5b5000fea265627a7a72315820631b0dbb6b871cdbfdec2773af15ebfb8e52c794cf836fe27ec21f1aed17180f64736f6c634300050c0032', - gas: '0x14609', - maxFeePerGas: '0x3b9aca0d', - maxPriorityFeePerGas: '0x3b9aca00', - estimateSuggested: 'medium', - estimateUsed: 'low', - }, - previousGasParams: { - maxFeePerGas: '0x3b9aca0b', - maxPriorityFeePerGas: '0xbebc200', - }, - type: 'retry', - estimatedBaseFee: 'd', - history: [ - { - id: 3938342322880462, - time: 1653459456297, - status: 'approved', - metamaskNetworkId: '4', - originalGasEstimate: '14609', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - nonce: '0x7', - value: '0x0', - data: - '0x6080604052348015600f57600080fd5b50608b8061001e6000396000f3fe6080604052610fff3411600e57fe5b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156053573d6000803e3d6000fd5b5000fea265627a7a72315820631b0dbb6b871cdbfdec2773af15ebfb8e52c794cf836fe27ec21f1aed17180f64736f6c634300050c0032', - gas: '0x14609', - maxFeePerGas: '0x3b9aca0d', - maxPriorityFeePerGas: '0x3b9aca00', - estimateSuggested: 'medium', - estimateUsed: 'low', - }, - previousGasParams: { - maxFeePerGas: '0x3b9aca0b', - maxPriorityFeePerGas: '0xbebc200', - }, - type: 'retry', - estimatedBaseFee: 'd', - }, - [ - { - op: 'add', - path: '/nonceDetails', - value: { - params: { - highestLocallyConfirmed: 7, - highestSuggested: 7, - nextNetworkNonce: 7, - }, - local: { - name: 'local', - nonce: 10, - details: { - startPoint: 7, - highest: 10, - }, - }, - network: { - name: 'network', - nonce: 7, - details: { - blockNumber: '0xa3d235', - baseCount: 7, - }, - }, - }, - note: 'transactions#approveTransaction', - timestamp: 1653459456415, - }, - ], - [ - { - op: 'add', - path: '/r', - value: - '0xde2e3131fb55b1edd182de128453521c86eed588f92058b61b3ce56cdfb33a26', - note: 'transactions#signTransaction: add r, s, v values', - timestamp: 1653459456512, - }, - { - op: 'add', - path: '/s', - value: - '0x64ee1eef8d0fa1b35e122658554d16645366e8977253fc1c47d030f28736409b', - }, - { - op: 'add', - path: '/v', - value: '0x00', - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'signed', - note: 'txStateManager: setting status to signed', - timestamp: 1653459456512, - }, - ], - [ - { - op: 'add', - path: '/rawTx', - value: - '0x02f901010407843b9aca00843b9aca0d830146098080b8a96080604052348015600f57600080fd5b50608b8061001e6000396000f3fe6080604052610fff3411600e57fe5b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156053573d6000803e3d6000fd5b5000fea265627a7a72315820631b0dbb6b871cdbfdec2773af15ebfb8e52c794cf836fe27ec21f1aed17180f64736f6c634300050c0032c080a0de2e3131fb55b1edd182de128453521c86eed588f92058b61b3ce56cdfb33a26a064ee1eef8d0fa1b35e122658554d16645366e8977253fc1c47d030f28736409b', - note: 'transactions#publishTransaction', - timestamp: 1653459456514, - }, - ], - [ - { - op: 'add', - path: '/err', - value: { - message: - '[ethjs-query] while formatting outputs from RPC \'{"value":{"code":-32000,"message":"replacement transaction underpriced"}}\'', - stack: - 'Error: [ethjs-query] while formatting outputs from RPC \'{"value":{"code":-32000,"message":"replacement transaction underpriced"}}\'\n at chrome-extension://hbljfohiafgaaaabejngpgolnboohpaf/common-5.js:14346:29', - }, - note: 'transactions:tx-state-manager#fail - add error', - timestamp: 1653459456632, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'failed', - note: 'txStateManager: setting status to failed', - timestamp: 1653459456633, - }, - ], - ], - nonceDetails: { - params: { - highestLocallyConfirmed: 7, - highestSuggested: 7, - nextNetworkNonce: 7, - }, - local: { - name: 'local', - nonce: 10, - details: { - startPoint: 7, - highest: 10, - }, - }, - network: { - name: 'network', - nonce: 7, - details: { - blockNumber: '0xa3d235', - baseCount: 7, - }, - }, - }, - r: '0xde2e3131fb55b1edd182de128453521c86eed588f92058b61b3ce56cdfb33a26', - s: '0x64ee1eef8d0fa1b35e122658554d16645366e8977253fc1c47d030f28736409b', - v: '0x00', - rawTx: - '0x02f901010407843b9aca00843b9aca0d830146098080b8a96080604052348015600f57600080fd5b50608b8061001e6000396000f3fe6080604052610fff3411600e57fe5b3373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156053573d6000803e3d6000fd5b5000fea265627a7a72315820631b0dbb6b871cdbfdec2773af15ebfb8e52c794cf836fe27ec21f1aed17180f64736f6c634300050c0032c080a0de2e3131fb55b1edd182de128453521c86eed588f92058b61b3ce56cdfb33a26a064ee1eef8d0fa1b35e122658554d16645366e8977253fc1c47d030f28736409b', - err: { - message: - '[ethjs-query] while formatting outputs from RPC \'{"value":{"code":-32000,"message":"replacement transaction underpriced"}}\'', - stack: - 'Error: [ethjs-query] while formatting outputs from RPC \'{"value":{"code":-32000,"message":"replacement transaction underpriced"}}\'\n at chrome-extension://hbljfohiafgaaaabejngpgolnboohpaf/common-5.js:14346:29', - }, - }, - [MOCK_TX_TYPE.SIGN]: { - id: 5177046356058675, - msgParams: { - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - data: - '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0', - origin: 'https://metamask.github.io', - }, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - time: 1653451051909, - status: 'unapproved', - type: 'eth_sign', - }, - [MOCK_TX_TYPE.SIGN_TYPED_DATA]: { - id: 5177046356058598, - msgParams: { - from: '0xabce7847fd3661a9b7c86aaf1daea08d9da5750e', - data: [ - { - type: 'string', - name: 'Message', - value: 'Hi, Alice!', - }, - { - type: 'uint32', - name: 'A number', - value: '1337', - }, - ], - version: 'V1', - origin: 'https://metamask.github.io', - }, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - time: 1653450005954, - status: 'unapproved', - type: 'eth_signTypedData', - }, - [MOCK_TX_TYPE.SIMPLE_SEND]: { - id: 4243712234858512, - time: 1589314601567, - status: 'confirmed', - metamaskNetworkId: '4', - loadingDefaults: false, - txParams: { - from: '0xabca64466f257793eaa52fcfff5066894b76a149', - to: '0xefg5bc4e8f1f969934d773fa67da095d2e491a97', - nonce: '0xc', - value: '0xde0b6b3a7640000', - gas: '0x5208', - gasPrice: '0x2540be400', - }, - origin: 'metamask', - type: 'simpleSend', - }, - [MOCK_TX_TYPE.SMART]: { - blockNumber: '6195527', - id: 4243712234858468, - metamaskNetworkId: '4', - status: 'confirmed', - time: 1585088013000, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - value: '0x00', - data: - '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', - }, - hash: '0xbcb195f393f4468945b4045cd41bcdbc2f19ad75ae92a32cf153a3004e42009a', - transactionType: 'smart', - type: 'contractDeployment', - origin: 'https://metamask.github.io', - }, - [MOCK_TX_TYPE.SWAP]: { - blockNumber: '6195527', - id: 4243712234858467, - metamaskNetworkId: '4', - status: 'confirmed', - time: 1585088013000, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - to: '0xefga64466f257793eaa52fcfff5066894b76a149', - value: '0xde0b6b3a7640000', - }, - hash: '0xbcb195f393f4468945b4045cd41bcdbc2f19ad75ae92a32cf153a3004e42009a', - destinationTokenSymbol: 'ABC', - sourceTokenSymbol: 'ETH', - type: 'swap', - }, - [MOCK_TX_TYPE.SWAP_APPROVAL]: { - blockNumber: '6195527', - id: 4243712234858467, - metamaskNetworkId: '4', - status: 'confirmed', - time: 1585088013000, - txParams: { - from: '0xabc14609ef9e09776ac5fe00bdbfef57bcdefebb', - gas: '0x5208', - gasPrice: '0x77359400', - nonce: '0x3', - to: '0xefga64466f257793eaa52fcfff5066894b76a149', - value: '0xde0b6b3a7640000', - }, - hash: '0xbcb195f393f4468945b4045cd41bcdbc2f19ad75ae92a32cf153a3004e42009a', - destinationTokenSymbol: 'ABC', - type: 'swapApproval', - sourceTokenSymbol: 'XBN', - }, - [MOCK_TX_TYPE.TOKEN_METHOD_APPROVE]: { - id: 5177046356058729, - time: 1653457101080, - status: 'submitted', - metamaskNetworkId: '4', - originalGasEstimate: '0xb427', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xb427', - }, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - nonce: '0x5', - value: '0x0', - data: - '0x095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000011170', - gas: '0xb427', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - history: [ - { - id: 5177046356058729, - time: 1653457101080, - status: 'unapproved', - metamaskNetworkId: '4', - originalGasEstimate: '0xb427', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: true, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xb427', - }, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - value: '0x0', - data: - '0x095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000011170', - gas: '0xb427', - gasPrice: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - }, - [ - { - op: 'remove', - path: '/txParams/gasPrice', - note: 'Added new unapproved transaction.', - timestamp: 1653457101715, - }, - { - op: 'add', - path: '/txParams/maxFeePerGas', - value: '0x4a817c800', - }, - { - op: 'add', - path: '/txParams/maxPriorityFeePerGas', - value: '0x4a817c800', - }, - { - op: 'replace', - path: '/loadingDefaults', - value: false, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'custom', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'custom', - gas: '0xb427', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - ], - [ - { - op: 'add', - path: '/estimatedBaseFee', - value: '14', - note: 'confTx: user approved transaction', - timestamp: 1653457117006, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'approved', - note: 'txStateManager: setting status to approved', - timestamp: 1653457117008, - }, - ], - [ - { - op: 'add', - path: '/txParams/nonce', - value: '0x5', - note: 'transactions#approveTransaction', - timestamp: 1653457117294, - }, - { - op: 'add', - path: '/nonceDetails', - value: { - params: { - highestLocallyConfirmed: 5, - highestSuggested: 5, - nextNetworkNonce: 5, - }, - local: { - name: 'local', - nonce: 5, - details: { - startPoint: 5, - highest: 5, - }, - }, - network: { - name: 'network', - nonce: 5, - details: { - blockNumber: '0xa3d19b', - baseCount: 5, - }, - }, - }, - }, - ], - [ - { - op: 'add', - path: '/r', - value: - '0xfdd2cb46203b5e7bba99cc56a37da3e5e3f36163a5bd9c51cddfd8d7028f5dd0', - note: 'transactions#signTransaction: add r, s, v values', - timestamp: 1653457117407, - }, - { - op: 'add', - path: '/s', - value: - '0x54c35cfa10b3350a3fd3a0e7b4aeb0b603d528c07a8cfdf4a78505d9864edef4', - }, - { - op: 'add', - path: '/v', - value: '0x00', - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'signed', - note: 'txStateManager: setting status to signed', - timestamp: 1653457117408, - }, - ], - [ - { - op: 'add', - path: '/rawTx', - value: - '0x02f8b104058504a817c8008504a817c80082b427949ba60bbf4ba1de43f3b4983a539feebfbd5fd97680b844095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000011170c080a0fdd2cb46203b5e7bba99cc56a37da3e5e3f36163a5bd9c51cddfd8d7028f5dd0a054c35cfa10b3350a3fd3a0e7b4aeb0b603d528c07a8cfdf4a78505d9864edef4', - note: 'transactions#publishTransaction', - timestamp: 1653457117410, - }, - ], - [ - { - op: 'add', - path: '/hash', - value: - '0x75b35f5b9a95c8e4b1a242be5b163c7a1b18822191b0b1de6985a8b9d3abfe26', - note: 'transactions#setTxHash', - timestamp: 1653457118158, - }, - ], - [ - { - op: 'add', - path: '/submittedTime', - value: 1653457118159, - note: 'txStateManager - add submitted time stamp', - timestamp: 1653457118160, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'submitted', - note: 'txStateManager: setting status to submitted', - timestamp: 1653457118161, - }, - ], - ], - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xb427', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - estimatedBaseFee: '14', - nonceDetails: { - params: { - highestLocallyConfirmed: 5, - highestSuggested: 5, - nextNetworkNonce: 5, - }, - local: { - name: 'local', - nonce: 5, - details: { - startPoint: 5, - highest: 5, - }, - }, - network: { - name: 'network', - nonce: 5, - details: { - blockNumber: '0xa3d19b', - baseCount: 5, - }, - }, - }, - r: '0xfdd2cb46203b5e7bba99cc56a37da3e5e3f36163a5bd9c51cddfd8d7028f5dd0', - s: '0x54c35cfa10b3350a3fd3a0e7b4aeb0b603d528c07a8cfdf4a78505d9864edef4', - v: '0x00', - rawTx: - '0x02f8b104058504a817c8008504a817c80082b427949ba60bbf4ba1de43f3b4983a539feebfbd5fd97680b844095ea7b30000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000011170c080a0fdd2cb46203b5e7bba99cc56a37da3e5e3f36163a5bd9c51cddfd8d7028f5dd0a054c35cfa10b3350a3fd3a0e7b4aeb0b603d528c07a8cfdf4a78505d9864edef4', - hash: '0x75b35f5b9a95c8e4b1a242be5b163c7a1b18822191b0b1de6985a8b9d3abfe26', - submittedTime: 1653457118159, - }, - [MOCK_TX_TYPE.TOKEN_METHOD_SAFE_TRANSFER_FROM]: { - id: 1441203963845330, - time: 1652206763566, - status: 'confirmed', - metamaskNetworkId: '4', - originalGasEstimate: '0x118e0', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: { - maxPriorityFeePerGas: '0x3B9ACA00', - maxFeePerGas: '0x7be830aec', - }, - sendFlowHistory: [], - txParams: { - from: '0xabc627172af48bd5b0765d3449a7def80d6576ff', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - nonce: '0x57', - value: '0x0', - data: - '0x42842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7cc', - gas: '0x118e0', - maxFeePerGas: '0x7be830aec', - maxPriorityFeePerGas: '0x3B9ACA00', - }, - origin: 'https://rinkeby.etherscan.io', - type: 'safetransferfrom', - userFeeLevel: 'dappSuggested', - defaultGasEstimates: { - estimateType: 'dappSuggested', - gas: '0x118e0', - maxFeePerGas: '0x7be830aec', - maxPriorityFeePerGas: '0x3B9ACA00', - }, - estimatedBaseFee: '3ba182755', - nonceDetails: { - params: { - highestLocallyConfirmed: 87, - highestSuggested: 87, - nextNetworkNonce: 87, - }, - local: { - name: 'local', - nonce: 87, - details: { - startPoint: 87, - highest: 87, - }, - }, - network: { - name: 'network', - nonce: 87, - details: { - blockNumber: '0xa28e38', - baseCount: 87, - }, - }, - }, - r: '0xd13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791c', - s: '0x7a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea', - v: '0x00', - rawTx: - '0x02f8d10457843b9aca008507be830aec830118e094f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86442842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7ccc080a0d13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791ca07a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea', - hash: '0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3', - submittedTime: 1652206777046, - txReceipt: { - blockHash: - '0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1', - blockNumber: 'a28e39', - contractAddress: null, - cumulativeGasUsed: 'fd5dee', - effectiveGasPrice: '0x4028dcaf1', - from: '0xabc627172af48bd5b0765d3449a7def80d6576ff', - gasUsed: 'bb40', - logs: [ - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1', - blockNumber: 'a28e39', - data: '0x', - logIndex: '45', - removed: false, - topics: [ - '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', - '0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x000000000000000000000000000000000000000000000000000000000009a7cc', - ], - transactionHash: - '0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3', - transactionIndex: '23', - }, - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1', - blockNumber: 'a28e39', - data: '0x', - logIndex: '46', - removed: false, - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff', - '0x000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98', - '0x000000000000000000000000000000000000000000000000000000000009a7cc', - ], - transactionHash: - '0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3', - transactionIndex: '23', - }, - ], - logsBloom: - '0x00000000000000001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020800000000000000000800000000000000000000000010000000000000000000000000000080000010000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000202000000000000000000000800000000000000000000000000000020000010000000000002008000000000000000000000000000000000000000000000', - status: '0x1', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - transactionHash: - '0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3', - transactionIndex: '23', - type: '0x2', - }, - baseFeePerGas: '0x3c6f300f1', - blockTimestamp: '627aacc2', - }, - [MOCK_TX_TYPE.TOKEN_METHOD_TRANSFER]: { - id: 5177046356058725, - time: 1653457077370, - status: 'confirmed', - metamaskNetworkId: '4', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - nonce: '0x4', - value: '0x0', - data: - '0xa9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000003a98', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'transfer', - history: [ - { - id: 5177046356058725, - time: 1653457077370, - status: 'unapproved', - metamaskNetworkId: '4', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: true, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - value: '0x0', - data: - '0xa9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000003a98', - gas: '0xea60', - gasPrice: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'transfer', - }, - [ - { - op: 'remove', - path: '/txParams/gasPrice', - note: 'Added new unapproved transaction.', - timestamp: 1653457077808, - }, - { - op: 'add', - path: '/txParams/maxFeePerGas', - value: '0x4a817c800', - }, - { - op: 'add', - path: '/txParams/maxPriorityFeePerGas', - value: '0x4a817c800', - }, - { - op: 'replace', - path: '/loadingDefaults', - value: false, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'custom', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - ], - [ - { - op: 'add', - path: '/estimatedBaseFee', - value: '16', - note: 'confTx: user approved transaction', - timestamp: 1653457091914, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'approved', - note: 'txStateManager: setting status to approved', - timestamp: 1653457091915, - }, - ], - [ - { - op: 'add', - path: '/txParams/nonce', - value: '0x4', - note: 'transactions#approveTransaction', - timestamp: 1653457091939, - }, - { - op: 'add', - path: '/nonceDetails', - value: { - params: { - highestLocallyConfirmed: 4, - highestSuggested: 4, - nextNetworkNonce: 4, - }, - local: { - name: 'local', - nonce: 4, - details: { - startPoint: 4, - highest: 4, - }, - }, - network: { - name: 'network', - nonce: 4, - details: { - blockNumber: '0xa3d198', - baseCount: 4, - }, - }, - }, - }, - ], - [ - { - op: 'add', - path: '/r', - value: - '0xb0f36e4392f9d302351789aef355a2e95b979bcdd99d19026c533152563d3bce', - note: 'transactions#signTransaction: add r, s, v values', - timestamp: 1653457092053, - }, - { - op: 'add', - path: '/s', - value: - '0x08e59de373e65c9c54e6a8052585461e81409d33178464f9b72f4cc36ac75d40', - }, - { - op: 'add', - path: '/v', - value: '0x01', - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'signed', - note: 'txStateManager: setting status to signed', - timestamp: 1653457092054, - }, - ], - [ - { - op: 'add', - path: '/rawTx', - value: - '0x02f8b104048504a817c8008504a817c80082ea60949ba60bbf4ba1de43f3b4983a539feebfbd5fd97680b844a9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000003a98c001a0b0f36e4392f9d302351789aef355a2e95b979bcdd99d19026c533152563d3bcea008e59de373e65c9c54e6a8052585461e81409d33178464f9b72f4cc36ac75d40', - note: 'transactions#publishTransaction', - timestamp: 1653457092056, - }, - ], - [ - { - op: 'add', - path: '/hash', - value: - '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - note: 'transactions#setTxHash', - timestamp: 1653457092526, - }, - ], - [ - { - op: 'add', - path: '/submittedTime', - value: 1653457092527, - note: 'txStateManager - add submitted time stamp', - timestamp: 1653457092527, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'submitted', - note: 'txStateManager: setting status to submitted', - timestamp: 1653457092529, - }, - ], - [ - { - op: 'add', - path: '/firstRetryBlockNumber', - value: '0xa3d199', - note: 'transactions/pending-tx-tracker#event: tx:block-update', - timestamp: 1653457094748, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'confirmed', - note: 'txStateManager: setting status to confirmed', - timestamp: 1653457115712, - }, - { - op: 'add', - path: '/txReceipt', - value: { - blockHash: - '0x243a362e5fda0d6ec8fce3d7f727679148c1df8ec6d7470ff65b38c8a96823b4', - blockNumber: 'a3d19a', - contractAddress: null, - cumulativeGasUsed: 'ca21', - effectiveGasPrice: '0x4a817c800', - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - gasUsed: 'ca21', - logs: [ - { - address: '0x9ba60bbf4ba1de43f3b4983a539feebfbd5fd976', - blockHash: - '0x243a362e5fda0d6ec8fce3d7f727679148c1df8ec6d7470ff65b38c8a96823b4', - blockNumber: 'a3d19a', - data: - '0x0000000000000000000000000000000000000000000000000000000000003a98', - logIndex: '0', - removed: false, - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c970', - ], - transactionHash: - '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - transactionIndex: '0', - }, - ], - logsBloom: - '0x00000000000000000000000000000000000000000000001000000100000100000000000000000000000000000000000000000000000000000000000000000000000000000020000000000008000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000100000000000000000000000000000000000000000000000000000000000000000000000800000004000000000000001000000000000000', - status: '0x1', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - transactionHash: - '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - transactionIndex: '0', - type: '0x2', - }, - }, - { - op: 'add', - path: '/baseFeePerGas', - value: '0x14', - }, - { - op: 'add', - path: '/blockTimestamp', - value: '628dc0c8', - }, - ], - [ - { - op: 'replace', - path: '/blockTimestamp', - value: '628dc0c8', - note: 'transactions#confirmTransaction - add txReceipt', - timestamp: 1653457115870, - }, - { - op: 'replace', - path: '/txReceipt/transactionIndex', - value: '0', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/transactionIndex', - value: '0', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/logIndex', - value: '0', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/blockNumber', - value: 'a3d19a', - }, - { - op: 'replace', - path: '/txReceipt/cumulativeGasUsed', - value: 'ca21', - }, - { - op: 'replace', - path: '/txReceipt/blockNumber', - value: 'a3d19a', - }, - ], - ], - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - estimatedBaseFee: '16', - nonceDetails: { - params: { - highestLocallyConfirmed: 4, - highestSuggested: 4, - nextNetworkNonce: 4, - }, - local: { - name: 'local', - nonce: 4, - details: { - startPoint: 4, - highest: 4, - }, - }, - network: { - name: 'network', - nonce: 4, - details: { - blockNumber: '0xa3d198', - baseCount: 4, - }, - }, - }, - r: '0xb0f36e4392f9d302351789aef355a2e95b979bcdd99d19026c533152563d3bce', - s: '0x08e59de373e65c9c54e6a8052585461e81409d33178464f9b72f4cc36ac75d40', - v: '0x01', - rawTx: - '0x02f8b104048504a817c8008504a817c80082ea60949ba60bbf4ba1de43f3b4983a539feebfbd5fd97680b844a9059cbb0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c9700000000000000000000000000000000000000000000000000000000000003a98c001a0b0f36e4392f9d302351789aef355a2e95b979bcdd99d19026c533152563d3bcea008e59de373e65c9c54e6a8052585461e81409d33178464f9b72f4cc36ac75d40', - hash: '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - submittedTime: 1653457092527, - firstRetryBlockNumber: '0xa3d199', - txReceipt: { - blockHash: - '0x243a362e5fda0d6ec8fce3d7f727679148c1df8ec6d7470ff65b38c8a96823b4', - blockNumber: 'a3d19a', - contractAddress: null, - cumulativeGasUsed: 'ca21', - effectiveGasPrice: '0x4a817c800', - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - gasUsed: 'ca21', - logs: [ - { - address: '0x9ba60bbf4ba1de43f3b4983a539feebfbd5fd976', - blockHash: - '0x243a362e5fda0d6ec8fce3d7f727679148c1df8ec6d7470ff65b38c8a96823b4', - blockNumber: 'a3d19a', - data: - '0x0000000000000000000000000000000000000000000000000000000000003a98', - logIndex: '0', - removed: false, - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x0000000000000000000000002f318c334780961fb129d2a6c30d0763d9a5c970', - ], - transactionHash: - '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - transactionIndex: '0', - }, - ], - logsBloom: - '0x00000000000000000000000000000000000000000000001000000100000100000000000000000000000000000000000000000000000000000000000000000000000000000020000000000008000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000100000000000000000000000000000000000000000000000000000000000000000000000800000004000000000000001000000000000000', - status: '0x1', - to: '0xefg60bbf4ba1de43f3b4983a539feebfbd5fd976', - transactionHash: - '0x3a8ed11c3d0ac26e4fe07812a29efdb642f15b8d83d2716ddf80d11b2542916f', - transactionIndex: '0', - type: '0x2', - }, - baseFeePerGas: '0x14', - blockTimestamp: '628dc0c8', - }, - [MOCK_TX_TYPE.TOKEN_METHOD_TRANSFER_FROM]: { - id: 5177046356058754, - time: 1653457323504, - status: 'confirmed', - metamaskNetworkId: '4', - originalGasEstimate: '0x10896', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [ - { - entry: 'sendFlow - user set asset type to COLLECTIBLE', - timestamp: 1653457317999, - }, - { - entry: 'sendFlow - user set asset symbol to undefined', - timestamp: 1653457318000, - }, - { - entry: - 'sendFlow - user set asset address to 0xf5de760f2e916647fd766B4AD9E85ff943cE3A2b', - timestamp: 1653457318000, - }, - { - entry: - 'sendFlow - user selected transfer to my accounts on recipient screen', - timestamp: 1653457319474, - }, - { - entry: - 'sendFlow - User clicked recipient from my accounts. address: 0xe56e7847fd3661a9b7c86aaf1daea08d9da5750e, nickname Account 1', - timestamp: 1653457320321, - }, - ], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - nonce: '0x6', - value: '0x0', - data: - '0x23b872dd000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e000000000000000000000000000000000000000000000000000000000009a7b8', - gas: '0x10896', - maxFeePerGas: '0x59682f12', - maxPriorityFeePerGas: '0x59682f00', - type: '0x2', - }, - origin: 'metamask', - type: 'transferfrom', - history: [ - { - id: 5177046356058754, - time: 1653457323504, - status: 'unapproved', - metamaskNetworkId: '4', - originalGasEstimate: '0x10896', - userEditedGasLimit: false, - chainId: '0x4', - loadingDefaults: true, - dappSuggestedGasFees: null, - sendFlowHistory: [ - { - entry: 'sendFlow - user set asset type to COLLECTIBLE', - timestamp: 1653457317999, - }, - { - entry: 'sendFlow - user set asset symbol to undefined', - timestamp: 1653457318000, - }, - { - entry: - 'sendFlow - user set asset address to 0xf5de760f2e916647fd766B4AD9E85ff943cE3A2b', - timestamp: 1653457318000, - }, - { - entry: - 'sendFlow - user selected transfer to my accounts on recipient screen', - timestamp: 1653457319474, - }, - { - entry: - 'sendFlow - User clicked recipient from my accounts. address: 0xe56e7847fd3661a9b7c86aaf1daea08d9da5750e, nickname Account 1', - timestamp: 1653457320321, - }, - ], - txParams: { - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - value: '0x0', - data: - '0x23b872dd000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e000000000000000000000000000000000000000000000000000000000009a7b8', - gas: '0x10896', - maxFeePerGas: '0x59682f12', - maxPriorityFeePerGas: '0x59682f00', - type: '0x2', - }, - origin: 'metamask', - type: 'transferfrom', - }, - [ - { - op: 'replace', - path: '/loadingDefaults', - value: false, - note: 'Added new unapproved transaction.', - timestamp: 1653457323593, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'medium', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'medium', - gas: '0x10896', - maxFeePerGas: '0x59682f12', - maxPriorityFeePerGas: '0x59682f00', - }, - }, - ], - [ - { - op: 'add', - path: '/estimatedBaseFee', - value: 'd', - note: 'confTx: user approved transaction', - timestamp: 1653457330346, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'approved', - note: 'txStateManager: setting status to approved', - timestamp: 1653457330347, - }, - ], - [ - { - op: 'add', - path: '/txParams/nonce', - value: '0x6', - note: 'transactions#approveTransaction', - timestamp: 1653457330354, - }, - { - op: 'add', - path: '/nonceDetails', - value: { - params: { - highestLocallyConfirmed: 6, - highestSuggested: 6, - nextNetworkNonce: 6, - }, - local: { - name: 'local', - nonce: 6, - details: { - startPoint: 6, - highest: 6, - }, - }, - network: { - name: 'network', - nonce: 6, - details: { - blockNumber: '0xa3d1a8', - baseCount: 6, - }, - }, - }, - }, - ], - [ - { - op: 'add', - path: '/r', - value: - '0x58294750acbe46cb0dd15ef615a244be49af61f0d799cce68bbbd3d4e7c75cdc', - note: 'transactions#signTransaction: add r, s, v values', - timestamp: 1653457330496, - }, - { - op: 'add', - path: '/s', - value: - '0x3993c38f6e168065d9b20a0b4254697d47db114f57243f56c22f228c7a173f9c', - }, - { - op: 'add', - path: '/v', - value: '0x01', - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'signed', - note: 'txStateManager: setting status to signed', - timestamp: 1653457330497, - }, - ], - [ - { - op: 'add', - path: '/rawTx', - value: - '0x02f8d004068459682f008459682f128301089694f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86423b872dd000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e000000000000000000000000000000000000000000000000000000000009a7b8c001a058294750acbe46cb0dd15ef615a244be49af61f0d799cce68bbbd3d4e7c75cdca03993c38f6e168065d9b20a0b4254697d47db114f57243f56c22f228c7a173f9c', - note: 'transactions#publishTransaction', - timestamp: 1653457330498, - }, - ], - [ - { - op: 'add', - path: '/hash', - value: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - note: 'transactions#setTxHash', - timestamp: 1653457330596, - }, - ], - [ - { - op: 'add', - path: '/submittedTime', - value: 1653457330597, - note: 'txStateManager - add submitted time stamp', - timestamp: 1653457330597, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'submitted', - note: 'txStateManager: setting status to submitted', - timestamp: 1653457330598, - }, - ], - [ - { - op: 'replace', - path: '/status', - value: 'confirmed', - note: 'txStateManager: setting status to confirmed', - timestamp: 1653457338358, - }, - { - op: 'add', - path: '/txReceipt', - value: { - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - contractAddress: null, - cumulativeGasUsed: '3c0267', - effectiveGasPrice: '0x59682f0d', - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - gasUsed: '9da4', - logs: [ - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - data: '0x', - logIndex: '21', - removed: false, - topics: [ - '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x000000000000000000000000000000000000000000000000000000000009a7b8', - ], - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - }, - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - data: '0x', - logIndex: '22', - removed: false, - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e', - '0x000000000000000000000000000000000000000000000000000000000009a7b8', - ], - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - }, - ], - logsBloom: - '0x00000000000000000000000000000000000000008000000000000000000100000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000002504000000100000000000020000000000000000000000000000020000010000000000000000000000400000000000000000000001000000000000000', - status: '0x1', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - type: '0x2', - }, - }, - { - op: 'add', - path: '/baseFeePerGas', - value: '0xd', - }, - { - op: 'add', - path: '/blockTimestamp', - value: '628dc1b8', - }, - ], - [ - { - op: 'replace', - path: '/blockTimestamp', - value: '628dc1b8', - note: 'transactions#confirmTransaction - add txReceipt', - timestamp: 1653457338377, - }, - { - op: 'replace', - path: '/txReceipt/transactionIndex', - value: '11', - }, - { - op: 'replace', - path: '/txReceipt/logs/1/transactionIndex', - value: '11', - }, - { - op: 'replace', - path: '/txReceipt/logs/1/logIndex', - value: '22', - }, - { - op: 'replace', - path: '/txReceipt/logs/1/blockNumber', - value: 'a3d1aa', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/transactionIndex', - value: '11', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/logIndex', - value: '21', - }, - { - op: 'replace', - path: '/txReceipt/logs/0/blockNumber', - value: 'a3d1aa', - }, - { - op: 'replace', - path: '/txReceipt/cumulativeGasUsed', - value: '3c0267', - }, - { - op: 'replace', - path: '/txReceipt/blockNumber', - value: 'a3d1aa', - }, - ], - ], - userFeeLevel: 'medium', - defaultGasEstimates: { - estimateType: 'medium', - gas: '0x10896', - maxFeePerGas: '0x59682f12', - maxPriorityFeePerGas: '0x59682f00', - }, - estimatedBaseFee: 'd', - nonceDetails: { - params: { - highestLocallyConfirmed: 6, - highestSuggested: 6, - nextNetworkNonce: 6, - }, - local: { - name: 'local', - nonce: 6, - details: { - startPoint: 6, - highest: 6, - }, - }, - network: { - name: 'network', - nonce: 6, - details: { - blockNumber: '0xa3d1a8', - baseCount: 6, - }, - }, - }, - r: '0x58294750acbe46cb0dd15ef615a244be49af61f0d799cce68bbbd3d4e7c75cdc', - s: '0x3993c38f6e168065d9b20a0b4254697d47db114f57243f56c22f228c7a173f9c', - v: '0x01', - rawTx: - '0x02f8d004068459682f008459682f128301089694f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86423b872dd000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e000000000000000000000000000000000000000000000000000000000009a7b8c001a058294750acbe46cb0dd15ef615a244be49af61f0d799cce68bbbd3d4e7c75cdca03993c38f6e168065d9b20a0b4254697d47db114f57243f56c22f228c7a173f9c', - hash: '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - submittedTime: 1653457330597, - txReceipt: { - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - contractAddress: null, - cumulativeGasUsed: '3c0267', - effectiveGasPrice: '0x59682f0d', - from: '0xabc539a7d5c43940af498008a7c8f3abb35c3725', - gasUsed: '9da4', - logs: [ - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - data: '0x', - logIndex: '21', - removed: false, - topics: [ - '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x000000000000000000000000000000000000000000000000000000000009a7b8', - ], - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - }, - { - address: '0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b', - blockHash: - '0x9e97839be24b9dacd2b91a0504317bc9c6eaea6904472dce450e583c398cb60a', - blockNumber: 'a3d1aa', - data: '0x', - logIndex: '22', - removed: false, - topics: [ - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', - '0x000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725', - '0x000000000000000000000000e56e7847fd3661a9b7c86aaf1daea08d9da5750e', - '0x000000000000000000000000000000000000000000000000000000000009a7b8', - ], - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - }, - ], - logsBloom: - '0x00000000000000000000000000000000000000008000000000000000000100000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020000000000000000000800000000000000000000000010000000000000000000000000000000000010000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000002504000000100000000000020000000000000000000000000000020000010000000000000000000000400000000000000000000001000000000000000', - status: '0x1', - to: '0xefge760f2e916647fd766b4ad9e85ff943ce3a2b', - transactionHash: - '0xc523e40d676563619138c310391000f91a93005028eedb72bf05133f2d6c8e4d', - transactionIndex: '11', - type: '0x2', - }, - baseFeePerGas: '0xd', - blockTimestamp: '628dc1b8', - }, -}; diff --git a/.storybook/test-data.js b/.storybook/test-data.js index 44038239d..34365e346 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -112,65 +112,6 @@ const state = { ], metamask: { tokenList: { - '0x514910771af9ca656af840dff83e8264ecf986ca': { - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - name: 'ChainLink Token', - iconUrl: 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: [ - 'Aave', - 'Bancor', - 'CMC', - 'Crypto.com', - 'CoinGecko', - '1inch', - 'Paraswap', - 'PMM', - 'Zapper', - 'Zerion', - '0x', - ], - occurrences: 12, - unlisted: false - }, - '0xc00e94cb662c3520282e6f5717214004a7f26888': { - address: '0xc00e94cb662c3520282e6f5717214004a7f26888', - symbol: 'COMP', - decimals: 18, - name: 'Compound', - iconUrl: 'https://crypto.com/price/coin-data/icon/COMP/color_icon.png', - aggregators: [ - 'Bancor', - 'CMC', - 'Crypto.com', - 'CoinGecko', - '1inch', - 'Paraswap', - 'PMM', - 'Zapper', - 'Zerion', - '0x', - ], - occurrences: 12, - unlisted: false - }, - '0xfffffffff15abf397da76f1dcc1a1604f45126db': { - address: '0xfffffffff15abf397da76f1dcc1a1604f45126db', - symbol: 'FSW', - decimals: 18, - name: 'Falconswap', - iconUrl: 'https://assets.coingecko.com/coins/images/12256/thumb/falconswap.png?1598534184', - aggregators: [ - 'CoinGecko', - '1inch', - 'Paraswap', - 'Zapper', - 'Zerion', - ], - occurrences: 12, - unlisted: false - }, '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', symbol: 'SNX', @@ -484,35 +425,6 @@ const state = { decimals: 18, }, ], - detectedTokens: [ - { - address: "0x514910771AF9Ca656af840dff83E8264EcF986CA", - decimals: 18, - symbol: "LINK", - image: "https://crypto.com/price/coin-data/icon/LINK/color_icon.png", - aggregators:[ - "coinGecko","oneInch","paraswap","zapper","zerion" - ] - }, - { - address: "0xc00e94Cb662C3520282E6f5717214004A7f26888", - decimals: 18, - symbol: "COMP", - image: "https://crypto.com/price/coin-data/icon/COMP/color_icon.png", - aggregators:[ - "bancor","cmc","cryptocom","coinGecko","oneInch","paraswap","pmm","zapper","zerion","zeroEx" - ] - }, - { - address: "0xfffffffFf15AbF397dA76f1dcc1A1604F45126DB", - decimals: 18, - symbol: "FSW", - image: "https://assets.coingecko.com/coins/images/12256/thumb/falconswap.png?1598534184", - aggregators:[ - "aave", "cmc","coinGecko","oneInch","paraswap","zapper","zerion" - ] - } - ], pendingTokens: {}, customNonceValue: '', send: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 246668cf8..08d466ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,68 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [10.16.0] -### Added -- Add friendly error handling screen, when UI fails to connect to background ([#14461](https://github.com/MetaMask/metamask-extension/pull/14461)) -- Add fiat onboarding for AVAX and MATIC through Wyre ([#14683](https://github.com/MetaMask/metamask-extension/pull/14683)) -- Add Coinbase Pay as fiat onramp option ([#14648](https://github.com/MetaMask/metamask-extension/pull/14648)) -- Add search information for Theme dropdown ([#14476](https://github.com/MetaMask/metamask-extension/pull/14476)) -- **[FLASK]** Add in-app notifications for snaps ([#14605](https://github.com/MetaMask/metamask-extension/pull/14605)) -- **[FLASK]** Add `long-running` snap permission ([#14700](https://github.com/MetaMask/metamask-extension/pull/14700)) - -### Changed -- Update caret icon color on Home Page for darkmode, from black to white ([#14835](https://github.com/MetaMask/metamask-extension/pull/14835)) -- Update the color of the ledger alert text to adhere to design system guidelines ([#14674](https://github.com/MetaMask/metamask-extension/pull/14674)) -- Standardize display of connected site's origin data on all confirmation screens ([#14720](https://github.com/MetaMask/metamask-extension/pull/14720)) -- Improved app loading performance - - Improve loading performance by patching the "secp256k1" package ([#14677](https://github.com/MetaMask/metamask-extension/pull/14677)) - - Patch gridplus-sdk module for improving performance ([#14582](https://github.com/MetaMask/metamask-extension/pull/14582)) -- Swaps: ensure that native currency swap amounts are properly displayed on all networks, avoiding a bug where swap received amounts could equal gas costs ([#14821](https://github.com/MetaMask/metamask-extension/pull/14821)) -- Swaps: reduce the default slippage from 3% to 2% ([#14863](https://github.com/MetaMask/metamask-extension/pull/14863)) -- Swaps: update STX status content page ([#14805](https://github.com/MetaMask/metamask-extension/pull/14805)) - - Make STX status timer behaviour dependent on API values - - Change "Swap complete in < X:XX" to "Swap will complete in < X:XX" - - Change "Privately submitting the Swap..." to "Privately submitting your Swap..." -- Swaps: disable STX if a regular tx is in progress ([#14554](https://github.com/MetaMask/metamask-extension/pull/14554)) -- Swaps: remove gas editing ([#14673](https://github.com/MetaMask/metamask-extension/pull/14673)) -- **[FLASK]** Improve snap install screen ([#14803](https://github.com/MetaMask/metamask-extension/pull/14803), ([#14752](https://github.com/MetaMask/metamask-extension/pull/14752))) -- **[FLASK] BREAKING** Bump `@metamask/key-tree` used by snaps to `4.0.0` ([#14700](https://github.com/MetaMask/metamask-extension/pull/14700)) -- **[FLASK]** Stopped showing confirmations for terminated snaps ([#14566](https://github.com/MetaMask/metamask-extension/pull/14566)) - -### Fixed -- Fix line-wrapping in Edit Nickname screen by decreasing the padding ([#14842](https://github.com/MetaMask/metamask-extension/pull/14842)) -- Fix 'Currency Symbol' detection in network settings when using Firefox ([#14810](https://github.com/MetaMask/metamask-extension/pull/14810)) -- Fix switching between ETH and USD in the amount field on the send screen ([#13827](https://github.com/MetaMask/metamask-extension/pull/13827)) -- Fix addition of 'add recipient' events to the send flow change logs so that 'contact' and 'recent' recipient are correctly distinguished ([#14771](https://github.com/MetaMask/metamask-extension/pull/14771)) -- Fix lock button sizing for text exceeding button boundaries ([#14335](https://github.com/MetaMask/metamask-extension/pull/14335)) -- Fix all "MetaMask" instances wrongly written as "Metamask" - - ([#14851](https://github.com/MetaMask/metamask-extension/pull/14851)) - - ([#14848](https://github.com/MetaMask/metamask-extension/pull/14848)) -- Fix design break on the Settings navbar for certain locales ([#14012](https://github.com/MetaMask/metamask-extension/pull/14012)) -- Fix missing white spacing for keystone transaction qrcode in darkmode ([#14798](https://github.com/MetaMask/metamask-extension/pull/14798)) -- Fix rare bug that could cause unexpected accounts to be generated from Ledger and connected to MetaMask ([#14799](https://github.com/MetaMask/metamask-extension/pull/14799)) -- Fix bug that could cause the incorrect token to be selected after editing the token via the send edit flow ([#14721](https://github.com/MetaMask/metamask-extension/pull/14721)) -- Fix chain ID field to use the same color pattern as the currency symbol field warning message ([#14627](https://github.com/MetaMask/metamask-extension/pull/14627)) -- Fix currency conversion rate on the Edit tx screen ([#14713](https://github.com/MetaMask/metamask-extension/pull/14713)) -- Fix sign button so it is enabled after scrolling all the way to the bottom on the sign type data confirmation screen ([#14745](https://github.com/MetaMask/metamask-extension/pull/14745)) -- Fix wrong tx type text for `Safe Transaction From` ([#14769](https://github.com/MetaMask/metamask-extension/pull/14769)) -- Fix "Site Suggested" tooltip in `EditGasFeeBtn` to only display the origin of dapp suggested gas fee if the origin is provided ([#14734](https://github.com/MetaMask/metamask-extension/pull/14734)) -- Fix incorrect line breaks on footer buttons from NetworksTab ([#14733](https://github.com/MetaMask/metamask-extension/pull/14733)) -- Fix incorrect currency symbol in the send flow history state logs ([#14726](https://github.com/MetaMask/metamask-extension/pull/14726)) -- Fix batch cancel/reject for signature requests ([#13786](https://github.com/MetaMask/metamask-extension/pull/13786)) -- Fix "Learn more" dialog broken link from Eth Sign ([#14667](https://github.com/MetaMask/metamask-extension/pull/14667)) -- Fix mixed text for Speed up/Cancel information ([#14551](https://github.com/MetaMask/metamask-extension/pull/14551)) -- Fix SRP paste duplication ([#14625](https://github.com/MetaMask/metamask-extension/pull/14625)) -- Fix onboarding functionality so that users of dapps using our onboarding library are redirected to the dapp after completing onboarding ([#14550](https://github.com/MetaMask/metamask-extension/pull/14550)) -- Fix error handling for signature methods so that proper errors are returned to dapps when there is a permissions error ([#14126](https://github.com/MetaMask/metamask-extension/pull/14126)) -- Fix `Speed Up` and `Cancel` button styles from `TransactionListItem` consolidating them with `TransactionListItemDetails` buttons ([#14659](https://github.com/MetaMask/metamask-extension/pull/14659)) -- Fix to prevent display of misleading or malicious contract method names ([#14937](https://github.com/MetaMask/metamask-extension/pull/14937)) -- Swaps: fix wrong colour for the high price impact notification ([#14697](https://github.com/MetaMask/metamask-extension/pull/14697)) -- Swaps: fix edge case when missing top assets ([#14688](https://github.com/MetaMask/metamask-extension/pull/14688)) -- **[FLASK]** Fix issues with the snap startup process and usage of `WebAssembly` ([#14772](https://github.com/MetaMask/metamask-extension/pull/14772)) -- **[FLASK]** Fix issues with snap id encoding ([#14693](https://github.com/MetaMask/metamask-extension/pull/14693)) -- **[FLASK]** Fix multiple smaller bugs with snaps ([#14670](https://github.com/MetaMask/metamask-extension/pull/14670)) - ## [10.15.1] ### Fixed - Fix Ledger connection failures that can occur after remove all hardware wallet accounts and reconnecting ([#14993](https://github.com/MetaMask/metamask-extension/pull/14993)) @@ -87,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure theme selection dropdown is discoverable via settings search([#14379](https://github.com/MetaMask/metamask-extension/pull/14379)) - Stop using the 4bytes registry to name contract deployment transactions in the activity list, preventing false method names from being shown for deployments ([#14598](https://github.com/MetaMask/metamask-extension/pull/14598)) - Save send flow user action history in transaction state logs ([#14510](https://github.com/MetaMask/metamask-extension/pull/14510)) -- Update GridPlus to use https://github.com/GridPlus/gridplus-sdk/compare/v1.1.6...v1.2.4 ([#14467](https://github.com/MetaMask/metamask-extension/pull/14467)) +- Update Gridplus to use https://github.com/GridPlus/gridplus-sdk/compare/v1.1.6...v1.2.4 ([#14467](https://github.com/MetaMask/metamask-extension/pull/14467)) ### Fixed @@ -3031,8 +2969,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.16.0...HEAD -[10.16.0]: https://github.com/MetaMask/metamask-extension/compare/v10.15.1...v10.16.0 +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.15.1...HEAD [10.15.1]: https://github.com/MetaMask/metamask-extension/compare/v10.15.0...v10.15.1 [10.15.0]: https://github.com/MetaMask/metamask-extension/compare/v10.14.7...v10.15.0 [10.14.7]: https://github.com/MetaMask/metamask-extension/compare/v10.14.6...v10.14.7 diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 6a3d69bc2..bfbbac952 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -131,10 +131,10 @@ "message": "ማሰሺያዎት አልተደገፈም..." }, "buyWithWyre": { - "message": "$1 በ Wyre ይግዙ" + "message": "ETH በ Wyre ይግዙ" }, "buyWithWyreDescription": { - "message": "Wyre ክሬዲት ካርድ ተጠቅመው $1 በቀጥታ በ MetaMask መለያዎ ላይ እንዲያስቀምጡ ያስችልዎታል።" + "message": "Wyre ክሬዲት ካርድ ተጠቅመው ETH በቀጥታ በ MetaMask መለያዎ ላይ እንዲያስቀምጡ ያስችልዎታል።" }, "bytes": { "message": "ባይት" diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 6d99fc54b..e87624ee2 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -148,7 +148,7 @@ "message": "قم بشراء عملة إيثير بواسطة Wyre" }, "buyWithWyreDescription": { - "message": "يتيح لك Wyre استخدام بطاقة ائتمان لإيداع 1$ مباشرة في حساب MetaMask الخاص بك." + "message": "يتيح لك Wyre استخدام بطاقة ائتمان لإيداع ETH مباشرة في حساب MetaMask الخاص بك." }, "bytes": { "message": "بايتات" diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 49b768365..9d4534adb 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -137,10 +137,10 @@ "message": "Браузърът ви не се поддържа ..." }, "buyWithWyre": { - "message": "Купете $1 с Wyre" + "message": "Купете ETH с Wyre" }, "buyWithWyreDescription": { - "message": "Wyre ви позволява да използвате кредитна карта, за да депозирате $1 право във вашата MetaMask сметка." + "message": "Wyre ви позволява да използвате кредитна карта, за да депозирате ETH право във вашата MetaMask сметка." }, "bytes": { "message": "Байта" diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index 88fedac63..7dd74c5eb 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -137,10 +137,10 @@ "message": "আপনার ব্রাউজার সমর্থিত নয়..." }, "buyWithWyre": { - "message": "Wyre দিয়ে $1 ক্রয় করুন" + "message": "Wyre দিয়ে ETH ক্রয় করুন" }, "buyWithWyreDescription": { - "message": "Wyre আপনার MetaMask অ্যাকাউন্টে সরাসরি $1 জমা করতে আপনাকে একটি ক্রেডিট কার্ড ব্যবহার করতে দেয়।" + "message": "Wyre আপনার MetaMask অ্যাকাউন্টে সরাসরি ETH জমা করতে আপনাকে একটি ক্রেডিট কার্ড ব্যবহার করতে দেয়।" }, "bytes": { "message": "বাইটস" diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index 3bdaf93ba..34abb31dc 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -137,10 +137,10 @@ "message": "El teu navegador no és suportat..." }, "buyWithWyre": { - "message": "Compra $1 amb Wyre" + "message": "Compra ETH amb Wyre" }, "buyWithWyreDescription": { - "message": "Wyre et permet utilitzar una targeta de crèdit per dipositar $1 directe al teu compte MetaMask." + "message": "Wyre et permet utilitzar una targeta de crèdit per dipositar ETH directe al teu compte MetaMask." }, "cancel": { "message": "Cancel·la" diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 4b642ef37..248404f43 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -137,10 +137,10 @@ "message": "Din browser er ikke understøttet..." }, "buyWithWyre": { - "message": "Køb $1 med Wyre" + "message": "Køb ETH med Wyre" }, "buyWithWyreDescription": { - "message": "Wyre lader dig bruge et kreditkort til at indbetale $1 på din MetaMask-konto." + "message": "Wyre lader dig bruge et kreditkort til at indbetale ETH på din MetaMask-konto." }, "bytes": { "message": "Byte" diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index cf3c43460..0fae6cf34 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Ich stimme zu" }, + "aggregatorFeeCost": { + "message": "Aggregator-Netzwerkgebühr" + }, "airgapVault": { "message": "AirGap-Tresor" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Netzwerkgebühr für Freigabe und Aggregator" + }, + "approvalTxGasCost": { + "message": "Tx-Gaskosten genehmigen" + }, "approve": { "message": "Genehmigen" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "$1 mit Wyre kaufen" + "message": "ETH mit Wyre kaufen" }, "buyWithWyreDescription": { - "message": "Wyre ermöglicht Ihnen die Verwendung einer Kreditkarte zum direkten Einzahlen von $1 auf Ihr MetaMask-Konto." + "message": "Wyre ermöglicht Ihnen die Verwendung einer Kreditkarte zum direkten Einzahlen von ETH auf Ihr MetaMask-Konto." }, "bytes": { "message": "Bytes" @@ -631,7 +640,7 @@ "message": "Vertragsinteraktion" }, "convertTokenToNFTDescription": { - "message": "Wir haben festgestellt, dass dieses Asset eine NFT ist. MetaMask hat jetzt volle native Unterstützung für NFTs. Möchten Sie es aus Ihrer Tokenliste entfernen und als NFT hinzufügen?" + "message": "Wir haben festgestellt, dass dieses Asset eine NFT ist. Metamask hat jetzt volle native Unterstützung für NFTs. Möchten Sie es aus Ihrer Tokenliste entfernen und als NFT hinzufügen?" }, "convertTokenToNFTExistDescription": { "message": "Wir haben festgestellt, dass dieses Asset als NFT hinzugefügt wurde. Möchten Sie es aus Ihrer Token-Liste entfernen?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Externe Erweiterung" }, + "extraApprovalGas": { + "message": "+$1 Genehmigungsgas", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Fehlgeschlagen" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Sie können Ihre Token immer noch tauschen, selbst während intelligente Transaktionen nicht verfügbar sind." }, + "stxPendingFinalizing": { + "message": "Wird finalisiert ..." + }, + "stxPendingOptimizingGas": { + "message": "Gas wird optimiert ..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Swap wird privat eingereicht ..." + }, "stxSubDescription": { "message": "* Intelligente Transaktionen versuchen mehrmals, Ihre Transaktion privat zu übermitteln. Wenn alle Versuche fehlschlagen, wird die Transaktion öffentlich übertragen, um sicherzustellen, dass Ihr Swap erfolgreich durchgeführt wird." }, @@ -3171,6 +3193,10 @@ "message": "Keine Token verfügbar mit $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Swap abgeschlossen in <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Mit Ihrer Hardware-Wallet bestätigen" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index fd664d9ad..74b1a1167 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Συμφωνώ" }, + "aggregatorFeeCost": { + "message": "Αμοιβή ανταλλακτηρίου" + }, "airgapVault": { "message": "Θησαυροφυλάκιο AirGap" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Τέλος έγκρισης και δικτύου ανταλλακτηρίου" + }, + "approvalTxGasCost": { + "message": "Έγκριση Tx τέλους συναλλαγής" + }, "approve": { "message": "Έγκριση" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Αγοράστε $1 με το Wyre" + "message": "Αγοράστε ETH με το Wyre" }, "buyWithWyreDescription": { - "message": "Το Wyre σας επιτρέπει να χρησιμοποιήσετε μια πιστωτική κάρτα για να καταθέσετε $1 απευθείας στον λογαριασμό σας MetaTask." + "message": "Το Wyre σας επιτρέπει να χρησιμοποιήσετε μια πιστωτική κάρτα για να καταθέσετε ETH απευθείας στον λογαριασμό σας MetaTask." }, "bytes": { "message": "Bytes" @@ -631,7 +640,7 @@ "message": "Αλληλεπίδραση Σύμβασης" }, "convertTokenToNFTDescription": { - "message": "Εντοπίσαμε ότι αυτό το περιουσιακό στοιχείο είναι NFT. Το MetaMask υποστηρίζει πλέον εξ'ορισμού πλήρως τα NFT. Θέλετε να το αφαιρέσετε από τη λίστα των token σας και να το προσθέσετε ως NFT;" + "message": "Εντοπίσαμε ότι αυτό το περιουσιακό στοιχείο είναι NFT. Το Metamask υποστηρίζει πλέον εξ'ορισμού πλήρως τα NFT. Θέλετε να το αφαιρέσετε από τη λίστα των token σας και να το προσθέσετε ως NFT;" }, "convertTokenToNFTExistDescription": { "message": "Εντοπίσαμε ότι αυτό το περιουσιακό στοιχείο προστέθηκε ως NFT. Θέλετε να το αφαιρέσετε από τη λίστα των token σας;" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Εξωτερική Επέκταση" }, + "extraApprovalGas": { + "message": "+$1 τέλος συναλλαγής", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Απέτυχε" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Μπορείτε να ανταλλάξετε ακόμα τα token σας, ακόμα και αν οι Έξυπνες Συναλλαγές δεν είναι διαθέσιμες." }, + "stxPendingFinalizing": { + "message": "Ολοκλήρωση..." + }, + "stxPendingOptimizingGas": { + "message": "Βελτιστοποίηση τελών συναλλαγής..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Ιδιωτική υποβολή της Ανταλλαγής..." + }, "stxSubDescription": { "message": "* Οι Έξυπνες Συναλλαγές θα προσπαθήσουν να υποβάλουν τη συναλλαγή σας ιδιωτικά, πολλές φορές. Εάν όλες οι προσπάθειες αποτύχουν, η συναλλαγή θα μεταδοθεί δημόσια για να διασφαλιστεί η επιτυχής πραγματοποίηση της ανταλλαγής σας." }, @@ -3171,6 +3193,10 @@ "message": "Δεν υπάρχουν διαθέσιμα tokens που να ταιριάζουν σε $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Η ανταλλαγή θα ολοκληρωθεί σε <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Επιβεβαιώστε με το υλικό πορτοφόλι σας" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 378eec13c..9f64308c1 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -203,6 +203,9 @@ "affirmAgree": { "message": "I Agree" }, + "aggregatorFeeCost": { + "message": "Aggregator network fee" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -260,6 +263,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Approval and aggregator network fee" + }, + "approvalTxGasCost": { + "message": "Approval Tx Gas Cost" + }, "approve": { "message": "Approve spend limit" }, @@ -411,14 +420,6 @@ "message": "Buy $1", "description": "$1 is the ticker symbol of a an asset the user is being prompted to purchase" }, - "buyCryptoWithCoinbasePay": { - "message": "Buy $1 with Coinbase Pay", - "description": "$1 represents the crypto symbol to be purchased" - }, - "buyCryptoWithCoinbasePayDescription": { - "message": "You can easily buy or transfer crypto with your Coinbase account.", - "description": "$1 represents the crypto symbol to be purchased" - }, "buyCryptoWithMoonPay": { "message": "Buy $1 with MoonPay", "description": "$1 represents the cypto symbol to be purchased" @@ -435,10 +436,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Buy $1 with Wyre" + "message": "Buy ETH with Wyre" }, "buyWithWyreDescription": { - "message": "Easy onboarding for purchases up to $ 1000. Fast interactive high limit purchase verification. Supports Debit/Credit Card, Apple Pay, Bank Transfers. Available in 100+ countries. Tokens deposit into your MetaMask Account" + "message": "Wyre lets you use a debit card to deposit ETH right in to your MetaMask account." }, "bytes": { "message": "Bytes" @@ -625,9 +626,6 @@ "continue": { "message": "Continue" }, - "continueToCoinbasePay": { - "message": "Continue to Coinbase Pay" - }, "continueToMoonPay": { "message": "Continue to MoonPay" }, @@ -653,7 +651,7 @@ "message": "Contract Interaction" }, "convertTokenToNFTDescription": { - "message": "We've detected that this asset is an NFT. MetaMask now has full native support for NFTs. Would you like to remove it from your token list and add it as an NFT?" + "message": "We've detected that this asset is an NFT. Metamask now has full native support for NFTs. Would you like to remove it from your token list and add it as an NFT?" }, "convertTokenToNFTExistDescription": { "message": "We’ve detected that this asset has been added as an NFT. Would you like to remove it from your token list?" @@ -1187,6 +1185,10 @@ "externalExtension": { "message": "External Extension" }, + "extraApprovalGas": { + "message": "+$1 approval gas", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Failed" }, @@ -1474,12 +1476,6 @@ "history": { "message": "History" }, - "ignoreAll": { - "message": "Ignore all" - }, - "ignoreTokenWarning": { - "message": "If you hide tokens, they will not be shown in your wallet. However, you can still add them by searching for them." - }, "import": { "message": "Import", "description": "Button to import an account from a selected file" @@ -1529,10 +1525,6 @@ "importWallet": { "message": "Import wallet" }, - "importWithCount": { - "message": "Import $1", - "description": "$1 will the number of detected tokens that are selected for importing, if all of them are selected then $1 will be all" - }, "importYourExisting": { "message": "Import your existing wallet using a Secret Recovery Phrase" }, @@ -2043,13 +2035,6 @@ "newToMetaMask": { "message": "New to MetaMask?" }, - "newTokensImportedMessage": { - "message": "You’ve successfully imported $1.", - "description": "$1 is the string of symbols of all the tokens imported" - }, - "newTokensImportedTitle": { - "message": "Token imported" - }, "newTotal": { "message": "New Total" }, @@ -2066,9 +2051,6 @@ "message": "Nonce is higher than suggested nonce of $1", "description": "The next nonce according to MetaMask's internal logic" }, - "nft": { - "message": "NFT" - }, "nftTokenIdPlaceholder": { "message": "Enter the Token ID" }, @@ -2135,9 +2117,6 @@ "notEnoughGas": { "message": "Not Enough Gas" }, - "notifications": { - "message": "Notifications" - }, "notifications10ActionText": { "message": "Visit in settings", "description": "The 'call to action' on the button, or link, of the 'Visit in settings' notification. Upon clicking, users will be taken to settings page." @@ -2258,19 +2237,6 @@ "notifications9Title": { "message": "👓 We are making transactions easier to read." }, - "notificationsEmptyText": { - "message": "Nothing to see here." - }, - "notificationsHeader": { - "message": "Notifications" - }, - "notificationsInfos": { - "message": "$1 from $2", - "description": "$1 is the date at which the notification has been dispatched and $2 is the link to the snap that dispatched the notification." - }, - "notificationsMarkAllAsRead": { - "message": "Mark all as read" - }, "numberOfNewTokensDetected": { "message": "$1 new tokens found in this account", "description": "$1 is the number of new tokens detected" @@ -2445,10 +2411,6 @@ "message": "See address, account balance, activity and suggest transactions to approve", "description": "The description for the `eth_accounts` permission" }, - "permission_longRunning": { - "message": "Run indefinitely.", - "description": "The description for the `endowment:long-running` permission" - }, "permission_manageBip44Keys": { "message": "Control your \"$1\" accounts and assets.", "description": "The description for the `snap_getBip44Entropy_*` permission. $1 is the name of a protocol, e.g. 'Filecoin'." @@ -2655,9 +2617,6 @@ "resetWalletWarning": { "message": "Make sure you’re using the correct Secret Recovery Phrase before proceeding. You will not be able to undo this." }, - "restartMetamask": { - "message": "Restart MetaMask" - }, "restore": { "message": "Restore" }, @@ -2842,9 +2801,6 @@ "sendAmount": { "message": "Send Amount" }, - "sendBugReport": { - "message": "Send us a bug report." - }, "sendSpecifiedTokens": { "message": "Send $1", "description": "Symbol of the specified token" @@ -3118,9 +3074,6 @@ "message": "Connect your wallet directly to your computer. Unlock your Ledger and open the Ethereum app. For more on using your hardware wallet device, $1.", "description": "$1 represents the `hardwareWalletSupportLinkConversion` localization key" }, - "stillGettingMessage": { - "message": "Still getting this message?" - }, "storePhrase": { "message": "Store this phrase in a password manager like 1Password." }, @@ -3173,11 +3126,14 @@ "stxFallbackUnavailable": { "message": "You can still swap your tokens even while Smart Transactions are unavailable." }, - "stxPendingPrivatelySubmittingSwap": { - "message": "Privately submitting your Swap..." + "stxPendingFinalizing": { + "message": "Finalizing..." }, - "stxPendingPubliclySubmittingSwap": { - "message": "Publicly submitting your Swap..." + "stxPendingOptimizingGas": { + "message": "Optimizing gas..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Privately submitting the Swap..." }, "stxSubDescription": { "message": "* Smart Transactions will attempt to submit your transaction privately, multiple times. If all attempts fail, the transaction will be broadcast publicly to ensure your Swap successfully goes through." @@ -3189,10 +3145,6 @@ "message": "Your $1 is now available.", "description": "$1 is a token symbol, e.g. ETH" }, - "stxSwapCompleteIn": { - "message": "Swap will complete in <", - "description": "'<' means 'less than', e.g. Swap will complete in < 2:59" - }, "stxTooltip": { "message": "Simulate transactions before submitting to decrease transaction costs and reduce failures." }, @@ -3271,6 +3223,10 @@ "message": "No tokens available matching $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Swap complete in <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Confirm with your hardware wallet" }, @@ -3452,10 +3408,6 @@ "swapSlippageNegative": { "message": "Slippage must be greater or equal to zero" }, - "swapSlippagePercent": { - "message": "$1%", - "description": "$1 is the amount of % for slippage" - }, "swapSource": { "message": "Liquidity source" }, @@ -3689,10 +3641,6 @@ "tokenSymbol": { "message": "Token Symbol" }, - "tokensFoundTitle": { - "message": "$1 new tokens found", - "description": "$1 is the number of new tokens detected" - }, "tooltipApproveButton": { "message": "I understand" }, @@ -3814,9 +3762,6 @@ "message": "We had trouble connecting to your $1, try reviewing $2 and try again.", "description": "$1 is the wallet device name; $2 is a link to wallet connection guide" }, - "troubleStarting": { - "message": "MetaMask had trouble starting. This error could be intermittent, so try restarting the extension." - }, "troubleTokenBalances": { "message": "We had trouble loading your token balances. You can view them ", "description": "Followed by a link (here) to view token balances" @@ -3976,7 +3921,7 @@ "description": "$1 is the action type. e.g (Account, Transaction, Swap)" }, "visitWebSite": { - "message": "Visit our website" + "message": "Visit our web site" }, "walletConnectionGuide": { "message": "our hardware wallet connection guide" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 5bba1a401..cff3d812c 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Acepto" }, + "aggregatorFeeCost": { + "message": "Cuota de red de agregador" + }, "airgapVault": { "message": "Bóveda AirGap" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Cuota de red de agregador y aprobación" + }, + "approvalTxGasCost": { + "message": "Costo de gas por transacción de aprobación" + }, "approve": { "message": "Aprobar límite de gastos" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Comprar $1 con Wyre" + "message": "Comprar ETH con Wyre" }, "buyWithWyreDescription": { - "message": "Acceso fácil a transacciones de $ 1,000 o menos con verificación rápida y efectiva. Aceptamos tarjetas débito, crédito, Apple Pay y transferencias bancarias en más de 100 países. Tokens serán depósitados en su MetaMask." + "message": "Wyre le permite usar una tarjeta de débito para depositar ETH directamente en su cuenta de MetaMask." }, "bytes": { "message": "Bytes" @@ -631,7 +640,7 @@ "message": "Interacción con el contrato" }, "convertTokenToNFTDescription": { - "message": "Hemos detectado que este activo es un NFT. MetaMask ahora tiene soporte nativo completo para NFTs. ¿Quieres eliminarlo de tu lista de tokens y añadirlo como un NFT?" + "message": "Hemos detectado que este activo es un NFT. Metamask ahora tiene soporte nativo completo para NFTs. ¿Quieres eliminarlo de tu lista de tokens y añadirlo como un NFT?" }, "convertTokenToNFTExistDescription": { "message": "Hemos detectado que este recurso se ha agregado como NFT. ¿Quiere eliminarlo de su lista de tokens?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Extensión externa" }, + "extraApprovalGas": { + "message": "+$1 gas por aprobación", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Con errores" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Todavía puede intercambiar sus tokens incluso cuando las transacciones inteligentes no están disponibles." }, + "stxPendingFinalizing": { + "message": "Finalizando…" + }, + "stxPendingOptimizingGas": { + "message": "Optimizando gas..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Enviando el Swap de forma privada..." + }, "stxSubDescription": { "message": "* Transacciones inteligentes intentará enviar su transacción de forma privada varias veces. Si todos los intentos fallan, la transacción se transmitirá públicamente para garantizar que su swap se realice con éxito." }, @@ -3171,6 +3193,10 @@ "message": "No hay tokens disponibles que coincidan con $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Swap finalizado en <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Confirmar con la cartera de hardware" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 32b5cbe35..3ac62593e 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -179,6 +179,9 @@ "affirmAgree": { "message": "Acepto" }, + "aggregatorFeeCost": { + "message": "Cuota de red de agregador" + }, "alertDisableTooltip": { "message": "Esto se puede modificar en \"Configuración > Alertas\"" }, @@ -230,6 +233,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Cuota de red de agregador y aprobación" + }, + "approvalTxGasCost": { + "message": "Costo de gas por transacción de aprobación" + }, "approve": { "message": "Aprobar límite de gastos" }, @@ -363,10 +372,10 @@ "message": "Comprar" }, "buyWithWyre": { - "message": "Comprar $1 con Wyre" + "message": "Comprar ETH con Wyre" }, "buyWithWyreDescription": { - "message": "Wyre le permite usar una tarjeta de débito para depositar $1 directamente en su cuenta de MetaMask." + "message": "Wyre le permite usar una tarjeta de débito para depositar ETH directamente en su cuenta de MetaMask." }, "bytes": { "message": "Bytes" @@ -1038,6 +1047,10 @@ "externalExtension": { "message": "Extensión externa" }, + "extraApprovalGas": { + "message": "+$1 de gas por aprobación", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Con errores" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index 1b1a38720..bb5be3a52 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -137,10 +137,10 @@ "message": "Teie lehitsejat ei toetata..." }, "buyWithWyre": { - "message": "Ostke $1 -d Wyre'iga" + "message": "Ostke ETH-d Wyre'iga" }, "buyWithWyreDescription": { - "message": "Wyre võimaldab kasutada krediitkaarti, et teha $1 sissemakse otse MetaMaski kontole." + "message": "Wyre võimaldab kasutada krediitkaarti, et teha ETH sissemakse otse MetaMaski kontole." }, "bytes": { "message": "Baidid" diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index ab74d3482..2669d7321 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -137,10 +137,10 @@ "message": "مرورگر شما پشتیبانی نمیشود" }, "buyWithWyre": { - "message": "$1 را توسط Wyre خریداری نمایید" + "message": "ETH را توسط Wyre خریداری نمایید" }, "buyWithWyreDescription": { - "message": "Wyre به شما اجازه میدهد تا یک کردیت کارت را جهت پرداخت 1$ مستقیمًا به حساب MetaMask تان استفاده نمایید." + "message": "Wyre به شما اجازه میدهد تا یک کردیت کارت را جهت پرداخت ETH مستقیمًا به حساب MetaMask تان استفاده نمایید." }, "bytes": { "message": "بایت ها" diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index 496475976..08e734237 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -137,10 +137,10 @@ "message": "Selaintasi ei tueta..." }, "buyWithWyre": { - "message": "Osta $1 :ta Wyrella" + "message": "Osta ETH:ta Wyrella" }, "buyWithWyreDescription": { - "message": "Wyre antaa sinun käyttää luottokorttia, jotta voit tallettaa $1 :ta suoraan MetaMask-tilillesi." + "message": "Wyre antaa sinun käyttää luottokorttia, jotta voit tallettaa ETH:ta suoraan MetaMask-tilillesi." }, "bytes": { "message": "Tavua" diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 6ed19fecd..54a59f2ad 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -122,10 +122,10 @@ "message": "Hindi sinusuportahan ang iyong Browser..." }, "buyWithWyre": { - "message": "Bumili ng $1 gamit ang Wyre" + "message": "Bumili ng ETH gamit ang Wyre" }, "buyWithWyreDescription": { - "message": "Binibigyang-daan ka ng Wyre na gumamit ng credit card para magdeposito ng $1 nang direkta sa iyong MetaMask account." + "message": "Binibigyang-daan ka ng Wyre na gumamit ng credit card para magdeposito ng ETH nang direkta sa iyong MetaMask account." }, "cancel": { "message": "Kanselahin" diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 0e1581026..424c76bf9 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Je suis d’accord" }, + "aggregatorFeeCost": { + "message": "Frais de réseau de l’agrégateur" + }, "airgapVault": { "message": "Coffre-fort AirGap" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Approbation et frais du réseau d’agrégateur" + }, + "approvalTxGasCost": { + "message": "Approbation du coût de carburant Tx" + }, "approve": { "message": "Approuver" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Acheter des $1 avec Wyre" + "message": "Acheter des ETH avec Wyre" }, "buyWithWyreDescription": { - "message": "Wyre vous permet d’utiliser une carte de crédit pour déposer des $1 directement sur votre compte MetaMask." + "message": "Wyre vous permet d’utiliser une carte de crédit pour déposer des ETH directement sur votre compte MetaMask." }, "bytes": { "message": "Octets" @@ -631,7 +640,7 @@ "message": "Interaction avec un contrat" }, "convertTokenToNFTDescription": { - "message": "Nous avons détecté que cet actif est un NFT. MetaMask prend désormais nativement en charge les NFT. Voulez-vous le retirer de votre liste de tokens et l’ajouter comme un NFT ?" + "message": "Nous avons détecté que cet actif est un NFT. Metamask prend désormais nativement en charge les NFT. Voulez-vous le retirer de votre liste de tokens et l’ajouter comme un NFT ?" }, "convertTokenToNFTExistDescription": { "message": "Nous avons détecté que cet actif a été ajouté en tant que NFT. Souhaitez-vous le retirer de votre liste de tokens ?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Extension externe" }, + "extraApprovalGas": { + "message": "+$1 de carburant approuvé", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Échec" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Vous pouvez toujours faire un swap de tokens, même si les transactions intelligentes ne sont pas disponibles." }, + "stxPendingFinalizing": { + "message": "Finalisation..." + }, + "stxPendingOptimizingGas": { + "message": "Optimisation des gas fees..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Soumission privée du swap..." + }, "stxSubDescription": { "message": "* Avec les transactions intelligentes, votre transaction sera soumise plusieurs fois en privé. Si toutes les tentatives échouent, la transaction sera diffusée publiquement pour s’assurer de la réussite de votre swap." }, @@ -3171,6 +3193,10 @@ "message": "Aucun jeton disponible correspondant à $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Swap terminé dans <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Confirmez avec votre portefeuille matériel" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 9bfd09d99..1a9b8a265 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -140,7 +140,7 @@ "message": "רכישת את'ר עם Wyre" }, "buyWithWyreDescription": { - "message": "Wyre מאפשרת לך להשתמש בכרטיס אשראי כדי להפקיד $1 ישירות בחשבון ה-MetaMask שלך." + "message": "Wyre מאפשרת לך להשתמש בכרטיס אשראי כדי להפקיד ETH ישירות בחשבון ה-MetaMask שלך." }, "bytes": { "message": "בייטים" diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index b77d4ce41..5e64aa17b 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "मैं सहमत हूं" }, + "aggregatorFeeCost": { + "message": "एग्रीगेटर नेटवर्क शुल्क" + }, "airgapVault": { "message": "AirGap का वॉल्ट" }, @@ -249,6 +252,12 @@ "message": "MetaMask Fask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "अनुमोदन और एग्रीगेटर नेटवर्क शुल्क" + }, + "approvalTxGasCost": { + "message": "अनुमोदन Tx गैस कीमत" + }, "approve": { "message": "खर्च सीमा अनुमोदित करें" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Wyre के जरिए $1 खरीदें" + "message": "Wyre के जरिए ETH खरीदें" }, "buyWithWyreDescription": { - "message": "Wyre आपको अपने MetaMask खाते में $1 जमा करने के लिए डेबिट कार्ड का उपयोग करने की सुविधा देता है।" + "message": "Wyre आपको अपने MetaMask खाते में ETH जमा करने के लिए डेबिट कार्ड का उपयोग करने की सुविधा देता है।" }, "bytes": { "message": "बाइट" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "बाहरी विस्तार" }, + "extraApprovalGas": { + "message": "+$1 अनुमोदन गैस", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "विफल" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "स्मार्ट लेनदेन अनुपलब्ध होने पर भी आप अपने टोकनों को स्वैप कर सकते हैं।" }, + "stxPendingFinalizing": { + "message": "फ़ाइनलाइज़ कर रहा है..." + }, + "stxPendingOptimizingGas": { + "message": "गैस ऑप्टिमाइज़ कर रहा है..." + }, + "stxPendingPrivatelySubmitting": { + "message": "स्वैप को निजी तौर पर सबमिट कर रहा है..." + }, "stxSubDescription": { "message": "* स्मार्ट लेनदेन आपके लेनदेन को निजी तौर पर, अनेक बार जमा करने का प्रयास करेंगे। यदि सभी प्रयास विफल हो जाते हैं, तो लेनदेन को सार्वजनिक रूप से प्रसारित किया जाएगा ताकि यह सुनिश्चित हो सके कि आपका स्वैप सफलतापूर्वक पूरा हो।" }, @@ -3171,6 +3193,10 @@ "message": "$1 के मिलान वाले कोई भी टोकन उपलब्ध नहीं हैं", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "स्वैप पूरा होगा <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "अपने हार्डवेयर वॉलेट से पुष्टि करें" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 551b1f15a..49c270406 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -137,10 +137,10 @@ "message": "Vaš se preglednik ne podržava..." }, "buyWithWyre": { - "message": "Kupi $1 Wyerom" + "message": "Kupi ETH Wyerom" }, "buyWithWyreDescription": { - "message": "Wyreom vam se omogućava korištenje kreditnom karticom za polaganje $1 -a izravno na vaš račun za MetaMask." + "message": "Wyreom vam se omogućava korištenje kreditnom karticom za polaganje ETH-a izravno na vaš račun za MetaMask." }, "bytes": { "message": "Bajtovi" diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 590b77f86..10f60bba4 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -137,7 +137,7 @@ "message": "Az ön böngészője nem támogatott..." }, "buyWithWyre": { - "message": "Vásároljon $1 -t a Wyre-rel" + "message": "Vásároljon ETH-t a Wyre-rel" }, "buyWithWyreDescription": { "message": "A Wyre segítségével egyensen a MetaMaks fiókjában tehet letétbe ETH-t." diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index d48576112..30c09796a 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Saya Setuju" }, + "aggregatorFeeCost": { + "message": "Biaya jaringan agregator" + }, "airgapVault": { "message": "Brankas AirGap" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Persetujuan dan biaya jaringan agregator" + }, + "approvalTxGasCost": { + "message": "Persetujuan Ongkos Jaringan Tx" + }, "approve": { "message": "Setujui batas penggunaan" }, @@ -416,7 +425,7 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Beli $1 dengan Wyre" + "message": "Beli ETH dengan Wyre" }, "buyWithWyreDescription": { "message": "Wyre memungkinkan Anda menggunakan kartu debit untuk menyetorkan ETH langsung di akun MetaMask Anda." @@ -631,7 +640,7 @@ "message": "Interaksi Kontrak" }, "convertTokenToNFTDescription": { - "message": "Kami mendeteksi bahwa aset ini merupakan NFT. Kini MetaMask memiliki dukungan asli penuh untuk NFT. Anda ingin menghapusnya dari daftar token dan menambahkannya sebagai NFT?" + "message": "Kami mendeteksi bahwa aset ini merupakan NFT. Kini Metamask memiliki dukungan asli penuh untuk NFT. Anda ingin menghapusnya dari daftar token dan menambahkannya sebagai NFT?" }, "convertTokenToNFTExistDescription": { "message": "Kami mendeteksi bahwa aset ini telah ditambahkan sebagai NFT. Anda ingin menghapusnya dari daftar token?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Ekstensi Eksternal" }, + "extraApprovalGas": { + "message": "+$1 gas yang disetujui", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Gagal" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Anda masih bisa menukar token meskipun Transaksi Pintar tidak tersedia." }, + "stxPendingFinalizing": { + "message": "Menyelesaikan..." + }, + "stxPendingOptimizingGas": { + "message": "Mengoptimalkan gas..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Mengirimkan Pertukaran secara pribadi..." + }, "stxSubDescription": { "message": "* Transaksi Pintar akan mencoba mengirimkan transaksi Anda secara pribadi, beberapa kali. Jika semua upaya gagal, transaksi akan disiarkan secara publik untuk memastikan Pertukaran telah berhasil dilakukan." }, @@ -3171,6 +3193,10 @@ "message": "Tidak ada token yang cocok yang tersedia $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Pertukaran selesai di <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Konfirmasikan dengan dompet perangkat keras Anda" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 9f6f93e56..7e92d2b21 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -67,6 +67,9 @@ "affirmAgree": { "message": "Acconsento" }, + "aggregatorFeeCost": { + "message": "Tassa per la rete aggregatore" + }, "alertDisableTooltip": { "message": "Può essere cambiato in \"Impostazioni > Avvisi\"" }, @@ -114,6 +117,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Tassa di approvazione per la rete aggregatore" + }, + "approvalTxGasCost": { + "message": "Costo Gas Approvazione Tx" + }, "approve": { "message": "Approva" }, @@ -189,10 +198,10 @@ "message": "Compra" }, "buyWithWyre": { - "message": "Compra $1 con Wyre" + "message": "Compra ETH con Wyre" }, "buyWithWyreDescription": { - "message": "Wyre ti consente di usare la carta di credito per depositare $1 direttamente nel tuo account MetaMask." + "message": "Wyre ti consente di usare la carta di credito per depositare ETH direttamente nel tuo account MetaMask." }, "canToggleInSettings": { "message": "Puoi riabilitare questa notifica in Impostazioni -> Avvisi." @@ -559,6 +568,10 @@ "externalExtension": { "message": "Estensione Esterna" }, + "extraApprovalGas": { + "message": "+$1 gas approvazione", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Fallita" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 0a6314933..eba06c489 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "同意する" }, + "aggregatorFeeCost": { + "message": "アグリゲーター ネットワーク料金" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "承認およびアグリゲーターネットワークの手数料" + }, + "approvalTxGasCost": { + "message": "承認送信のガス代" + }, "approve": { "message": "使用限度額の承認" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Wyreで $1 を購入" + "message": "WyreでETHを購入" }, "buyWithWyreDescription": { - "message": "Wyreを使用すると、デビット カードを使用して、$1 をMetaMaskアカウントに直接デポジットできます。" + "message": "Wyreを使用すると、デビット カードを使用して、ETHをMetaMaskアカウントに直接デポジットできます。" }, "bytes": { "message": "バイト" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "外部拡張機能" }, + "extraApprovalGas": { + "message": "+$1承認ガス", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "失敗しました" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "スマートトランザクションが利用できなくても、トークンのスワップは可能です。" }, + "stxPendingFinalizing": { + "message": "最終処理中..." + }, + "stxPendingOptimizingGas": { + "message": "ガス代を最適化中..." + }, + "stxPendingPrivatelySubmitting": { + "message": "スワップを非公開で送信中..." + }, "stxSubDescription": { "message": "* スマートトランザクションは、非公開でトランザクションのの送信を数回試みます。すべての試みが失敗した場合、スワップが成功するようトランザクションが公開されます。" }, @@ -3171,6 +3193,10 @@ "message": "$1と一致するトークンがありません", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "スワップ完了まで <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "ハードウェアウォレットで確定" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 762b250c7..1edff554c 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -137,10 +137,10 @@ "message": "ನಿಮ್ಮ ಬ್ರೌಸರ್ ಬೆಂಬಲಿಸುತ್ತಿಲ್ಲ..." }, "buyWithWyre": { - "message": "Wyre ನೊಂದಿಗೆ $1 ಖರೀದಿಸಿ" + "message": "Wyre ನೊಂದಿಗೆ ETH ಖರೀದಿಸಿ" }, "buyWithWyreDescription": { - "message": "ನಿಮ್ಮ MetaMask ಖಾತೆಗೆ $1 ಅನ್ನು ಜಮಾ ಮಾಡಲು ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಬಳಸಲು Wyre ನಿಮಗೆ ಅನುಮತಿಸುತ್ತದೆ." + "message": "ನಿಮ್ಮ MetaMask ಖಾತೆಗೆ ETH ಅನ್ನು ಜಮಾ ಮಾಡಲು ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಬಳಸಲು Wyre ನಿಮಗೆ ಅನುಮತಿಸುತ್ತದೆ." }, "bytes": { "message": "ಬೈಟ್‌ಗಳು" diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 54d7e77de..b3d343e89 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "동의함" }, + "aggregatorFeeCost": { + "message": "애그리게이터 네트워크 수수료" + }, "airgapVault": { "message": "에어갭 볼트" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "승인 및 애그리게이터 네트워크 수수료" + }, + "approvalTxGasCost": { + "message": "승인 Tx 가스 비용" + }, "approve": { "message": "지출 한도 승인" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Wyre로 $1 구매" + "message": "Wyre로 ETH 구매" }, "buyWithWyreDescription": { - "message": "Wyre를 사용하면 체크카드를 이용하여 $1 를 MetaMask 계정에 바로 예치할 수 있습니다." + "message": "Wyre를 사용하면 체크카드를 이용하여 ETH를 MetaMask 계정에 바로 예치할 수 있습니다." }, "bytes": { "message": "바이트" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "외부 확장" }, + "extraApprovalGas": { + "message": "+$1의 승인 가스", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "실패" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "스마트 거래를 사용할 수 없을 때도 토큰 스왑은 가능합니다." }, + "stxPendingFinalizing": { + "message": "마무리 중..." + }, + "stxPendingOptimizingGas": { + "message": "가스비 최적화 중..." + }, + "stxPendingPrivatelySubmitting": { + "message": "스왑을 비공개로 제출하는 중..." + }, "stxSubDescription": { "message": "*스마트 거래는 비공개로 거래를 제출하기 위해 여러 번 시도할 것입니다. 모든 시도가 실패하면 성공적인 스왑을 위해 거래는 공개적으로 브로드캐스트될 것입니다." }, @@ -3171,6 +3193,10 @@ "message": "$1와(과) 일치하는 토큰이 없습니다.", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "스왑 완료까지 남은 시간:", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "하드웨어 지갑으로 확인합니다." }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 68dd08edc..f2866345c 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -137,10 +137,10 @@ "message": "Jūsų naršyklė neatpažįstama..." }, "buyWithWyre": { - "message": "Pirkti $1 su „Wyre“" + "message": "Pirkti ETH su „Wyre“" }, "buyWithWyreDescription": { - "message": "„Wyre“ leidžia naudotis kreditine kortele norint įnešti $1 tiesiai į jūsų „MetaMask“ paskyrą." + "message": "„Wyre“ leidžia naudotis kreditine kortele norint įnešti ETH tiesiai į jūsų „MetaMask“ paskyrą." }, "bytes": { "message": "Baitai" diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index 30e65fd68..13233a066 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -137,10 +137,10 @@ "message": "Jūsu pārlūkprogramma netiek atbalstīta..." }, "buyWithWyre": { - "message": "Pirkt $1 ar Wyre" + "message": "Pirkt ETH ar Wyre" }, "buyWithWyreDescription": { - "message": "Wyre ļauj noguldīt $1 tieši jūsu MetaMask kontā, izmantojot kredītkarti." + "message": "Wyre ļauj noguldīt ETH tieši jūsu MetaMask kontā, izmantojot kredītkarti." }, "bytes": { "message": "Baiti" diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 8923fb8bf..bc42b1bc2 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -137,10 +137,10 @@ "message": "Pelayar anda tidak disokong..." }, "buyWithWyre": { - "message": "Beli $1 dengan Wyre" + "message": "Beli ETH dengan Wyre" }, "buyWithWyreDescription": { - "message": "Wyre membolehkan anda menggunakan kad kredit untuk mendeposit $1 secara terus ke dalam akaun MetaMask anda." + "message": "Wyre membolehkan anda menggunakan kad kredit untuk mendeposit ETH secara terus ke dalam akaun MetaMask anda." }, "bytes": { "message": "Bait" diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 8d1cc1eab..ceb83e982 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -137,10 +137,10 @@ "message": "Nettleseren din støttes ikke ..." }, "buyWithWyre": { - "message": "Kjøp $1 med Wyre" + "message": "Kjøp ETH med Wyre" }, "buyWithWyreDescription": { - "message": "Wyre lar deg bruke et kredittkort for å sette inn $1 rett på MetaMask-kontoen din." + "message": "Wyre lar deg bruke et kredittkort for å sette inn ETH rett på MetaMask-kontoen din." }, "cancel": { "message": "Avbryt" diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index a137aed83..36da6fd32 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -91,6 +91,9 @@ "affirmAgree": { "message": "Sang-ayon ako" }, + "aggregatorFeeCost": { + "message": "Bayarin sa aggregator network" + }, "alertDisableTooltip": { "message": "Mababago ito sa \"Mga Setting > Mga Alerto\"" }, @@ -138,6 +141,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Bayarin sa pag-apruba at aggregator network" + }, + "approvalTxGasCost": { + "message": "Approval Tx Gas Cost" + }, "approve": { "message": "Aprubahan ang limitasyon sa paggastos" }, @@ -228,10 +237,10 @@ "message": "Bumili" }, "buyWithWyre": { - "message": "Bumili ng $1 gamit ang Wyre" + "message": "Bumili ng ETH gamit ang Wyre" }, "buyWithWyreDescription": { - "message": "Binibigyang-daan ka ng Wyre na gumamit ng debit card para mag-deposit ng $1 sa mismong MetaMask account mo." + "message": "Binibigyang-daan ka ng Wyre na gumamit ng debit card para mag-deposit ng ETH sa mismong MetaMask account mo." }, "bytes": { "message": "Bytes" @@ -665,6 +674,10 @@ "externalExtension": { "message": "External Extension" }, + "extraApprovalGas": { + "message": "+$1 na pag-apruba sa gas", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Hindi matagumpay" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index 0025ba5fa..d8637876a 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -137,10 +137,10 @@ "message": "Twoja przeglądarka nie jest obsługiwana..." }, "buyWithWyre": { - "message": "Kup $1 poprzez Wyre" + "message": "Kup ETH poprzez Wyre" }, "buyWithWyreDescription": { - "message": "Dzięki Wyre możesz użyć karty kredytowej, aby wpłacić $1 bezpośrednio na swoje konto MetaMask." + "message": "Dzięki Wyre możesz użyć karty kredytowej, aby wpłacić ETH bezpośrednio na swoje konto MetaMask." }, "bytes": { "message": "Bajty" diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 9f9089a39..1fb3d812d 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Concordo" }, + "aggregatorFeeCost": { + "message": "Taxa de rede do agregador" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Taxa de aprovação e da rede do agregador" + }, + "approvalTxGasCost": { + "message": "Custo em gás da transação de aprovação" + }, "approve": { "message": "Aprovar" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Comprar $1 com Wyre" + "message": "Comprar ETH com Wyre" }, "buyWithWyreDescription": { - "message": "Com o Wyre, você pode usar um cartão de débito para depositar $1 diretamente na sua conta da MetaMask." + "message": "Com o Wyre, você pode usar um cartão de débito para depositar ETH diretamente na sua conta da MetaMask." }, "bytes": { "message": "Bytes" @@ -631,7 +640,7 @@ "message": "Interação com contrato" }, "convertTokenToNFTDescription": { - "message": "Detectamos que esse ativo é um NFT. A MetaMask agora oferece suporte nativo a NFTs. Gostaria de removê-lo da sua lista de tokens e adicioná-lo como NFT?" + "message": "Detectamos que esse ativo é um NFT. A Metamask agora oferece suporte nativo a NFTs. Gostaria de removê-lo da sua lista de tokens e adicioná-lo como NFT?" }, "convertTokenToNFTExistDescription": { "message": "Detectamos que esse ativo foi adicionado como NFT. Deseja removê-lo da sua lista de tokens?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Extensão externa" }, + "extraApprovalGas": { + "message": "+$1 de gás por aprovação", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Falhou" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Você ainda pode fazer swap com seus tokens mesmo quando as Transações Inteligentes estiverem indisponíveis." }, + "stxPendingFinalizing": { + "message": "Finalizando..." + }, + "stxPendingOptimizingGas": { + "message": "Otimizando as taxas de gás..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Enviando a Swap de forma privada..." + }, "stxSubDescription": { "message": "* A função de Transações Inteligentes tentará enviar a sua transação várias vezes de forma privada. Se todas as tentativas falharem, a transação será transmitida publicamente para garantir que sua Swap seja realizada com sucesso." }, @@ -3171,6 +3193,10 @@ "message": "Nenhum token disponível correspondente a $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Swap concluído em <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Confirme com sua carteira de hardware" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index be4c7f7c0..c59a092a2 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -179,6 +179,9 @@ "affirmAgree": { "message": "Concordo" }, + "aggregatorFeeCost": { + "message": "Taxa de rede do agregador" + }, "alertDisableTooltip": { "message": "Isso pode ser alterado em \"Configurações > Alertas\"" }, @@ -230,6 +233,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Taxa de aprovação e da rede do agregador" + }, + "approvalTxGasCost": { + "message": "Custo em gás da transação de aprovação" + }, "approve": { "message": "Aprovar limite de gastos" }, @@ -363,10 +372,10 @@ "message": "Comprar" }, "buyWithWyre": { - "message": "Comprar $1 com Wyre" + "message": "Comprar ETH com Wyre" }, "buyWithWyreDescription": { - "message": "Com o Wyre, você pode usar um cartão de débito para depositar $1 diretamente na sua conta da MetaMask." + "message": "Com o Wyre, você pode usar um cartão de débito para depositar ETH diretamente na sua conta da MetaMask." }, "bytes": { "message": "Bytes" @@ -1022,6 +1031,10 @@ "externalExtension": { "message": "Extensão externa" }, + "extraApprovalGas": { + "message": "+$1 de gás por aprovação", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Falhou" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index 002236935..929bede12 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -137,10 +137,10 @@ "message": "Browserul dvs. nu este compatibil..." }, "buyWithWyre": { - "message": "Cumpărați $1 cu Wyre" + "message": "Cumpărați ETH cu Wyre" }, "buyWithWyreDescription": { - "message": "Wyre vă permite să folosiți un card de credit pentru a depune $1 direct în contul dvs. MetaMask." + "message": "Wyre vă permite să folosiți un card de credit pentru a depune ETH direct în contul dvs. MetaMask." }, "bytes": { "message": "Octeți" diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index a876449b2..eb402933f 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Я согласен(-на)" }, + "aggregatorFeeCost": { + "message": "Комиссия сети агрегатора" + }, "airgapVault": { "message": "Хранилище AirGap" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Комиссия сети за одобрение и для агрегатора" + }, + "approvalTxGasCost": { + "message": "Стоимость газа для утверждения транзакции" + }, "approve": { "message": "Одобрить лимит расходов" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Купить $1 с помощью Wyre" + "message": "Купить ETH с помощью Wyre" }, "buyWithWyreDescription": { - "message": "Wyre позволяет использовать дебетовую карту для внесения $1 прямо на ваш счет MetaMask." + "message": "Wyre позволяет использовать дебетовую карту для внесения ETH прямо на ваш счет MetaMask." }, "bytes": { "message": "Байты" @@ -631,7 +640,7 @@ "message": "Взаимодействие по контракту" }, "convertTokenToNFTDescription": { - "message": "Мы обнаружили, что этот актив является NFT. MetaMask теперь имеет полную встроенную поддержку NFT. Хотите удалить его из списка токенов и добавить в качестве NFT?" + "message": "Мы обнаружили, что этот актив является NFT. Metamask теперь имеет полную встроенную поддержку NFT. Хотите удалить его из списка токенов и добавить в качестве NFT?" }, "convertTokenToNFTExistDescription": { "message": "Мы обнаружили, что этот актив был добавлен как NFT. Хотите удалить его из списка токенов?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Внешнее расширение" }, + "extraApprovalGas": { + "message": "+$1 газа для утверждения", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Не удалось" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Вы по-прежнему можете обменивать свои токены, даже если смарт-транзакции недоступны." }, + "stxPendingFinalizing": { + "message": "Завершение..." + }, + "stxPendingOptimizingGas": { + "message": "Оптимизация газа..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Конфиденциальная отправка ооперации обмена..." + }, "stxSubDescription": { "message": "* Смарт-транзакции попытаются несколько раз отправить вашу транзакцию в конфиденциальном порядке. Если все попытки не увенчаются успехом, транзакция будет показана публично, чтобы гарантировать успешное завершение вашего обмена." }, @@ -3171,6 +3193,10 @@ "message": "Нет доступных токенов, соответствующих $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Обмен завершится через <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Подтвердите с помощью аппаратного кошелька" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 2bfd7e540..b5f1a087f 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -131,10 +131,10 @@ "message": "Váš prehliadač nie je podporovaný..." }, "buyWithWyre": { - "message": "Kúpte $1 s Wyre" + "message": "Kúpte ETH s Wyre" }, "buyWithWyreDescription": { - "message": "Wyre vám umožňuje použiť kreditnú kartu na vloženie depozitu $1 priamo na váš účet MetaMask." + "message": "Wyre vám umožňuje použiť kreditnú kartu na vloženie depozitu ETH priamo na váš účet MetaMask." }, "bytes": { "message": "Bajty" diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index c49155135..8a49c004a 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -137,10 +137,10 @@ "message": "Vaš brskalnik ni podptrt ..." }, "buyWithWyre": { - "message": "Kupi $1 z Wyre" + "message": "Kupi ETH z Wyre" }, "buyWithWyreDescription": { - "message": "Wyre vam omogoča, da s kreditno kartico nakažete $1 neposredno na svoj račun MetaMask." + "message": "Wyre vam omogoča, da s kreditno kartico nakažete ETH neposredno na svoj račun MetaMask." }, "bytes": { "message": "Bajti" diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 5ebbd176e..9f29a6bf5 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -137,10 +137,10 @@ "message": "Vaš pregledač nije podržan..." }, "buyWithWyre": { - "message": "Kupite $1 preko servisa Wyre" + "message": "Kupite ETH preko servisa Wyre" }, "buyWithWyreDescription": { - "message": "Wyre vam dozvoljava da koristite kreditnu karticu kako biste deponovali $1 pravo na vaš MetaMask nalog." + "message": "Wyre vam dozvoljava da koristite kreditnu karticu kako biste deponovali ETH pravo na vaš MetaMask nalog." }, "bytes": { "message": "Bajtovi" diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index c8d77d167..2e1c5721e 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -137,10 +137,10 @@ "message": "Din webbläsare stöds inte..." }, "buyWithWyre": { - "message": "Köp $1 med Wyre" + "message": "Köp ETH med Wyre" }, "buyWithWyreDescription": { - "message": "Wyre låter dig använda ett kreditkort för att sätta in $1 direkt på ditt MetaMask-konto." + "message": "Wyre låter dig använda ett kreditkort för att sätta in ETH direkt på ditt MetaMask-konto." }, "cancel": { "message": "Avbryt" diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index 9a060e45e..990fd2e43 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -134,10 +134,10 @@ "message": "Kivinjari chaku hakiwezeshwi..." }, "buyWithWyre": { - "message": "Nunua $1 kwa kutumia Wyre" + "message": "Nunua ETH kwa kutumia Wyre" }, "buyWithWyreDescription": { - "message": "Wyre inakuwezesha kutumia kadi ya benki kuweka $1 moja kwa moja kwenye akaunti yako ya MetaMask." + "message": "Wyre inakuwezesha kutumia kadi ya benki kuweka ETH moja kwa moja kwenye akaunti yako ya MetaMask." }, "cancel": { "message": "Ghairi" diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index f37caeb76..b59c10d9f 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Sang-ayon Ako" }, + "aggregatorFeeCost": { + "message": "Bayarin sa aggregator network" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Bayarin sa pag-apruba at aggregator network" + }, + "approvalTxGasCost": { + "message": "Pag-apruba Tx Halaga ng Gas" + }, "approve": { "message": "Aprubahan ang limitasyon sa paggastos" }, @@ -338,7 +347,7 @@ "message": "Panimula" }, "betaMetamaskDescription": { - "message": "Ang MetaMask na pinagkakatiwalaan ng milyun-milyon ay isang ligtas na wallet na ginagawang accessible ang mundo ng web3 para sa lahat." + "message": "Ang Metamask na pinagkakatiwalaan ng milyun-milyon ay isang ligtas na wallet na ginagawang accessible ang mundo ng web3 para sa lahat." }, "betaMetamaskDescriptionExplanation": { "message": "Gamitin ang bersyong ito para subukan ang mga paparating na feature bago ilabas ang mga ito. Ang iyong paggamit at feedback ay nakakatulong sa amin na bumuo ng posibleng pinakamahusay na bersyon ng MetaMask. Ang paggamit mo ng MetaMask Beta ay napapailalim sa aming karaniwang $1 gayundin sa aming $2. Bilang Beta, maaaring tumaas ang panganib ng mga bug. Sa pagpapatuloy, tinatanggap at kinikilala mo ang mga panganib na ito, gayundin ang mga panganib na makikita sa aming Mga Tuntunin at Mga Tuntunin ng Beta.", @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Bumili ng $1 gamit ang Wyre" + "message": "Bumili ng ETH gamit ang Wyre" }, "buyWithWyreDescription": { - "message": "Nagbibigay-daan sa iyo ang Wyre na gumamit ng debit card para mag-deposit ng $1 sa mismong MetaMask account mo." + "message": "Nagbibigay-daan sa iyo ang Wyre na gumamit ng debit card para mag-deposit ng ETH sa mismong MetaMask account mo." }, "bytes": { "message": "Bytes" @@ -631,7 +640,7 @@ "message": "Interaksyon ng Kontrata" }, "convertTokenToNFTDescription": { - "message": "Natukoy namin na ang asset na ito ay isang NFT. Ang MetaMask ay mayroon na ngayong ganap na native support para sa mga NFT. Gusto mo bang alisin ito sa iyong listahan ng token at idagdag ito bilang isang NFT?" + "message": "Natukoy namin na ang asset na ito ay isang NFT. Ang Metamask ay mayroon na ngayong ganap na native support para sa mga NFT. Gusto mo bang alisin ito sa iyong listahan ng token at idagdag ito bilang isang NFT?" }, "convertTokenToNFTExistDescription": { "message": "Napansin namin na naidagdag ang asset na ito bilang NFT. Gusto mo ba itong alisin mula sa listahan ng iyong token?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "External Extension" }, + "extraApprovalGas": { + "message": "+$1 na pag-apruba sa gas", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Hindi matagumpay" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Maaari mo parin papalitan ang iyong mga token kahit na hindi available ang mga Smart Transaction." }, + "stxPendingFinalizing": { + "message": "Isinasapinal..." + }, + "stxPendingOptimizingGas": { + "message": "Pinapahusay ang gas..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Pribadong isinusumite ang Pagpapalit..." + }, "stxSubDescription": { "message": "* Susubukan ng mga Smart Transaction na isumite nang pribado ang iyong transaksyon, maraming beses. Kapag nabigo ang lahat ng pagsubok, ipapakita sa publiko ang transaksyon upang matiyak na ang Pagpapalit ay naging matagupay." }, @@ -3171,6 +3193,10 @@ "message": "Walang available na token na tumutugma sa $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Kumpleto na ang pagpapalit sa <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Kumpirmahin gamit ang iyong hardware wallet" }, @@ -3920,7 +3946,7 @@ "message": "Magsimula na tayo" }, "welcomeToMetaMaskIntro": { - "message": "Ang MetaMask na pinagkakatiwalaan ng milyun-milyon ay isang ligtas na wallet na ginagawang accessible ang mundo ng web3 para sa lahat." + "message": "Ang Metamask na pinagkakatiwalaan ng milyun-milyon ay isang ligtas na wallet na ginagawang accessible ang mundo ng web3 para sa lahat." }, "whatsNew": { "message": "Ano'ng bago", diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 39e353585..00c61eaf1 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Kabul Ediyorum" }, + "aggregatorFeeCost": { + "message": "Toplayıcı ağ ücreti" + }, "airgapVault": { "message": "AirGap Kasası" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Onaylayıcı ve toplayıcı ağ ücreti" + }, + "approvalTxGasCost": { + "message": "Onaylayıcı İşlem Gaz Maliyeti" + }, "approve": { "message": "Harcama limitini onayla" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Wyre ile $1 satın al" + "message": "Wyre ile ETH satın al" }, "buyWithWyreDescription": { - "message": "Wyre, doğrudan MetaMask hesabınıza $1 yatırma işlemleri için banka kartı kullanmanıza izin verir." + "message": "Wyre, doğrudan MetaMask hesabınıza ETH yatırma işlemleri için banka kartı kullanmanıza izin verir." }, "bytes": { "message": "Bayt" @@ -631,7 +640,7 @@ "message": "Sözleşme Etkileşimi" }, "convertTokenToNFTDescription": { - "message": "Bu varlığın bir NFT olduğunu tespit ettik. MetaMask artık NFT'ler için tam yerel desteğe sahiptir. Bunu token listenden çıkarmak ve bir NFT olarak eklemek ister misin?" + "message": "Bu varlığın bir NFT olduğunu tespit ettik. Metamask artık NFT'ler için tam yerel desteğe sahiptir. Bunu token listenden çıkarmak ve bir NFT olarak eklemek ister misin?" }, "convertTokenToNFTExistDescription": { "message": "Bu varlığın bir NFT olarak eklendiğini tespit ettik. Token listenden çıkarmak ister misin?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Harici Uzantı" }, + "extraApprovalGas": { + "message": "+1$ onay gazı", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Başarısız oldu" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Akıllı İşlemler kullanılamazken bile token'larını değiştirebilirsin." }, + "stxPendingFinalizing": { + "message": "Sonuçlandırılıyor..." + }, + "stxPendingOptimizingGas": { + "message": "Gas optimize ediliyor..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Takas özel olarak gönderiliyor..." + }, "stxSubDescription": { "message": "* Akıllı İşlemler, işlemini birden çok kez özel olarak göndermeye çalışır. Tüm denemeler başarısız olursa Takas'ının başarılı bir şekilde gerçekleşmesini sağlamak için işlem herkese açık olarak yayınlanacaktır." }, @@ -3171,6 +3193,10 @@ "message": "$1 ile eşleşen token yok", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Değiştirme işlemi şu süre içinde tamamlandı <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Donanım cüzdanınızla onaylayın" }, @@ -3485,7 +3511,7 @@ "message": "Hesaplarınızı ve bilgilerinizi mobil cihazınızla senkronize edebilirsiniz. MetaMask mobil uygulamasını açın, \"Ayarlar\" kısmına gidin ve \"Tarayıcı Uzantısından Senkronize Et\" seçeneğine dokunun" }, "syncWithMobileDescNewUsers": { - "message": "MetaMask Mobil uygulamasını ilk defa açıyorsanız telefonunuzdaki adımları izleyin." + "message": "Metamask Mobil uygulamasını ilk defa açıyorsanız telefonunuzdaki adımları izleyin." }, "syncWithMobileScanThisCode": { "message": "MetaMask mobil uygulamanızla bu kodu tarayın" diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 2b47cd8d4..c2e046eb4 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -137,10 +137,10 @@ "message": "Ваш браузер не підтримується..." }, "buyWithWyre": { - "message": "Купити $1 через Wyre" + "message": "Купити ETH через Wyre" }, "buyWithWyreDescription": { - "message": "Wyre дає змогу використовувати кредитну картку для внесення валюти $1 безпосередньо у свій гаманець MetaMask." + "message": "Wyre дає змогу використовувати кредитну картку для внесення валюти ETH безпосередньо у свій гаманець MetaMask." }, "bytes": { "message": "Байти" diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 8058af2a6..6cfcdf758 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "Tôi đồng ý" }, + "aggregatorFeeCost": { + "message": "Phí mạng cho trình tổng hợp" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "Phí mạng cho trình tổng hợp và việc phê duyệt" + }, + "approvalTxGasCost": { + "message": "Chi phí gas cho giao dịch phê duyệt" + }, "approve": { "message": "Phê duyệt giới hạn chi tiêu" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "Mua $1 qua Wyre" + "message": "Mua ETH qua Wyre" }, "buyWithWyreDescription": { - "message": "Wyre cho phép bạn dùng thẻ ghi nợ để nạp $1 trực tiếp vào tài khoản MetaMask của mình." + "message": "Wyre cho phép bạn dùng thẻ ghi nợ để nạp ETH trực tiếp vào tài khoản MetaMask của mình." }, "bytes": { "message": "Byte" @@ -631,7 +640,7 @@ "message": "Tương tác với hợp đồng" }, "convertTokenToNFTDescription": { - "message": "Chúng tôi phát hiện tài sản này là một NFT. MetaMask hiện đã hỗ trợ gốc đầy đủ cho NFT. Bạn có muốn xóa tài sản khỏi danh sách token và thêm tài sản dưới dạng NFT không?" + "message": "Chúng tôi phát hiện tài sản này là một NFT. Metamask hiện đã hỗ trợ gốc đầy đủ cho NFT. Bạn có muốn xóa tài sản khỏi danh sách token và thêm tài sản dưới dạng NFT không?" }, "convertTokenToNFTExistDescription": { "message": "Chúng tôi phát hiện tài sản này đã được thêm dưới dạng NFT. Bạn có muốn xóa tài sản khỏi danh sách token không?" @@ -1165,6 +1174,10 @@ "externalExtension": { "message": "Tiện ích bên ngoài" }, + "extraApprovalGas": { + "message": "+$1 gas phê duyệt", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "Không thành công" }, @@ -3083,6 +3096,15 @@ "stxFallbackUnavailable": { "message": "Bạn vẫn có thể hoán đổi token ngay cả khi Giao dịch thông minh không khả dụng." }, + "stxPendingFinalizing": { + "message": "Đang hoàn thành..." + }, + "stxPendingOptimizingGas": { + "message": "Đang tối ưu gas..." + }, + "stxPendingPrivatelySubmitting": { + "message": "Đang gửi yêu cầu Hoán đổi riêng tư..." + }, "stxSubDescription": { "message": "* Giao dịch thông minh sẽ cố gắng gửi giao dịch của bạn nhiều lần theo cách riêng tư. Nếu tất cả các lần thử đều không thành công, giao dịch sẽ được phát công khai để đảm bảo Hoán đổi của bạn được thực hiện thành công." }, @@ -3171,6 +3193,10 @@ "message": "Không có token nào khớp với $1", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "Hoán đổi xong sau <", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "Xác nhận ví cứng của bạn" }, diff --git a/app/_locales/zh/messages.json b/app/_locales/zh/messages.json index 93c9c273a..0f6f28b90 100644 --- a/app/_locales/zh/messages.json +++ b/app/_locales/zh/messages.json @@ -192,6 +192,9 @@ "affirmAgree": { "message": "我同意" }, + "aggregatorFeeCost": { + "message": "聚合器网络费用" + }, "airgapVault": { "message": "AirGap Vault" }, @@ -249,6 +252,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "批准和聚合器网络费用" + }, + "approvalTxGasCost": { + "message": "批准 Tx 燃料成本" + }, "approve": { "message": "批准消费限额" }, @@ -416,10 +425,10 @@ "description": "$1 represents the crypto symbol to be purchased" }, "buyWithWyre": { - "message": "使用 Wyre 购买 $1" + "message": "使用 Wyre 购买 ETH" }, "buyWithWyreDescription": { - "message": "您可以通过 Wyre 使用借记卡将 $1 存入您的 MetaMask 账户。" + "message": "您可以通过 Wyre 使用借记卡将 ETH 存入您的 MetaMask 账户。" }, "bytes": { "message": "字节" @@ -1168,6 +1177,10 @@ "externalExtension": { "message": "外部扩展程序" }, + "extraApprovalGas": { + "message": "额外的 $1 批准燃料", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "失败" }, @@ -1659,7 +1672,7 @@ "message": "打开和解锁 Ledger Live 应用程序" }, "ledgerConnectionPreferenceDescription": { - "message": "自定义连接您的 Ledger 到 MetaMask 的方式。建议使用 $1,但也可使用其他选项。请在这里阅读更多信息:$2", + "message": "自定义连接您的 Ledger 到 Metamask 的方式。建议使用 $1,但也可使用其他选项。请在这里阅读更多信息:$2", "description": "A description that appears above a dropdown where users can select between up to three options - Ledger Live, U2F or WebHID - depending on what is supported in their browser. $1 is the recommended browser option, it will be either WebHID or U2f. $2 is a link to an article where users can learn more, but will be the translation of the learnMore message." }, "ledgerDeviceOpenFailureMessage": { @@ -2158,7 +2171,7 @@ "description": "Description of a notification in the 'See What's New' popup. Describes the Ledger support update." }, "notifications6DescriptionThree": { - "message": "在 MetaMask 中与您的 Ledger 账户交互时,将打开一个新选项卡,并且将要求您打开 Ledger Live 应用程序。应用程序打开后,您将被要求允许 WebSocket 连接到您的 MetaMask 账户。就是这样!", + "message": "在 Metamask 中与您的 Ledger 账户交互时,将打开一个新选项卡,并且将要求您打开 Ledger Live 应用程序。应用程序打开后,您将被要求允许 WebSocket 连接到您的 MetaMask 账户。就是这样!", "description": "Description of a notification in the 'See What's New' popup. Describes the Ledger support update." }, "notifications6DescriptionTwo": { @@ -3089,6 +3102,15 @@ "stxFallbackUnavailable": { "message": "即使智能交易不可用,您仍然可以交换代币。" }, + "stxPendingFinalizing": { + "message": "最终确定中..." + }, + "stxPendingOptimizingGas": { + "message": "正在优化燃料......" + }, + "stxPendingPrivatelySubmitting": { + "message": "正在隐秘提交交换......" + }, "stxSubDescription": { "message": "*智能交易将尝试多次隐秘提交您的交易。如果所有尝试都失败,交易将会公开广播,以确保您的交换能成功进行。" }, @@ -3177,6 +3199,10 @@ "message": "没有与 $1 匹配的代币", "description": "Tells the user that a given search string does not match any tokens in our token lists. $1 can be any string of text" }, + "swapCompleteIn": { + "message": "交换将在此时间內完成<", + "description": "'<' means 'less than', e.g. Swap complete in < 2:59" + }, "swapConfirmWithHwWallet": { "message": "使用您的硬件钱包确认" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index f1bcc95b7..ad530bbd8 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -179,6 +179,9 @@ "affirmAgree": { "message": "我同意" }, + "aggregatorFeeCost": { + "message": "聚集器网络手续费" + }, "alertDisableTooltip": { "message": "这个可以在“设置 > 提醒”中进行更改" }, @@ -230,6 +233,12 @@ "message": "MetaMask Flask", "description": "The name of the application (Flask)" }, + "approvalAndAggregatorTxFeeCost": { + "message": "批准聚合商网络手续费" + }, + "approvalTxGasCost": { + "message": "批准交易燃料成本" + }, "approve": { "message": "批准消费限额" }, @@ -363,10 +372,10 @@ "message": "购买" }, "buyWithWyre": { - "message": "使用 Wyre 购买 $1" + "message": "使用 Wyre 购买 ETH" }, "buyWithWyreDescription": { - "message": "您可以通过 Wyre 使用信用卡将 $1 存入您的 MetaMask 账户。" + "message": "您可以通过 Wyre 使用信用卡将 ETH 存入您的 MetaMask 账户。" }, "bytes": { "message": "字节" @@ -1008,6 +1017,10 @@ "externalExtension": { "message": "外部扩展" }, + "extraApprovalGas": { + "message": "+$1 批准燃料", + "description": "Expresses an additional gas amount the user will have to pay, on top of some other displayed amount. $1 is a decimal amount of gas" + }, "failed": { "message": "失败" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 4bed5f928..94a79bdb3 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -140,10 +140,10 @@ "message": "買" }, "buyWithWyre": { - "message": "用 Wyre 購買 $1" + "message": "用 Wyre 購買 ETH" }, "buyWithWyreDescription": { - "message": "Wyre 讓你使用信用卡在 MetaMask 帳號中直接存入 $1 。" + "message": "Wyre 讓你使用信用卡在 MetaMask 帳號中直接存入 ETH。" }, "bytes": { "message": "位元組" diff --git a/app/home.html b/app/home.html index 46bbb857e..97334c73c 100644 --- a/app/home.html +++ b/app/home.html @@ -8,10 +8,7 @@ -
- - -
+
diff --git a/app/manifest/v2/_base.json b/app/manifest/_base.json similarity index 97% rename from app/manifest/v2/_base.json rename to app/manifest/_base.json index d10900224..87bed959d 100644 --- a/app/manifest/v2/_base.json +++ b/app/manifest/_base.json @@ -66,7 +66,6 @@ "clipboardWrite", "http://localhost:8545/", "https://*.infura.io/", - "https://chainid.network/chains.json", "https://lattice.gridplus.io/*", "activeTab", "webRequest", diff --git a/app/manifest/v2/brave.json b/app/manifest/brave.json similarity index 100% rename from app/manifest/v2/brave.json rename to app/manifest/brave.json diff --git a/app/manifest/v2/chrome.json b/app/manifest/chrome.json similarity index 100% rename from app/manifest/v2/chrome.json rename to app/manifest/chrome.json diff --git a/app/manifest/v2/firefox.json b/app/manifest/firefox.json similarity index 100% rename from app/manifest/v2/firefox.json rename to app/manifest/firefox.json diff --git a/app/manifest/v2/opera.json b/app/manifest/opera.json similarity index 100% rename from app/manifest/v2/opera.json rename to app/manifest/opera.json diff --git a/app/manifest/v3/_base.json b/app/manifest/v3/_base.json deleted file mode 100644 index 3980afdc5..000000000 --- a/app/manifest/v3/_base.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "action": { - "default_icon": { - "16": "images/icon-16.png", - "19": "images/icon-19.png", - "32": "images/icon-32.png", - "38": "images/icon-38.png", - "64": "images/icon-64.png", - "128": "images/icon-128.png", - "512": "images/icon-512.png" - }, - "default_title": "MetaMask", - "default_popup": "popup.html" - }, - "author": "https://metamask.io", - "background": { - "service_worker": "app-init.js" - }, - "commands": { - "_execute_browser_action": { - "suggested_key": { - "windows": "Alt+Shift+M", - "mac": "Alt+Shift+M", - "chromeos": "Alt+Shift+M", - "linux": "Alt+Shift+M" - } - } - }, - "content_scripts": [ - { - "matches": ["file://*/*", "http://*/*", "https://*/*"], - "js": [ - "disable-console.js", - "globalthis.js", - "lockdown-install.js", - "lockdown-run.js", - "lockdown-more.js", - "contentscript.js" - ], - "run_at": "document_start", - "all_frames": true - }, - { - "matches": ["*://connect.trezor.io/*/popup.html"], - "js": ["vendor/trezor/content-script.js"] - } - ], - "default_locale": "en", - "description": "__MSG_appDescription__", - "icons": { - "16": "images/icon-16.png", - "19": "images/icon-19.png", - "32": "images/icon-32.png", - "38": "images/icon-38.png", - "48": "images/icon-48.png", - "64": "images/icon-64.png", - "128": "images/icon-128.png", - "512": "images/icon-512.png" - }, - "manifest_version": 3, - "name": "__MSG_appName__", - "permissions": [ - "storage", - "unlimitedStorage", - "clipboardWrite", - "http://localhost:8545/", - "https://*.infura.io/", - "https://chainid.network/chains.json", - "https://lattice.gridplus.io/*", - "activeTab", - "webRequest", - "*://*.eth/", - "notifications" - ], - "short_name": "__MSG_appName__", - "web_accessible_resources": [ - { - "resources": ["inpage.js", "phishing.html"], - "matches": ["http://*/*", "https://*/*"] - } - ] -} diff --git a/app/manifest/v3/brave.json b/app/manifest/v3/brave.json deleted file mode 100644 index 0967ef424..000000000 --- a/app/manifest/v3/brave.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/app/manifest/v3/chrome.json b/app/manifest/v3/chrome.json deleted file mode 100644 index e4bb01cdd..000000000 --- a/app/manifest/v3/chrome.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "externally_connectable": { - "matches": ["https://metamask.io/*"], - "ids": ["*"] - }, - "minimum_chrome_version": "66" -} diff --git a/app/manifest/v3/firefox.json b/app/manifest/v3/firefox.json deleted file mode 100644 index 918311d54..000000000 --- a/app/manifest/v3/firefox.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "applications": { - "gecko": { - "id": "webextension@metamask.io", - "strict_min_version": "68.0" - } - }, - "background": { - "page": "background.html", - "persistent": true - }, - "browser_action": { - "default_icon": { - "16": "images/icon-16.png", - "19": "images/icon-19.png", - "32": "images/icon-32.png", - "38": "images/icon-38.png", - "64": "images/icon-64.png", - "128": "images/icon-128.png", - "512": "images/icon-512.png" - }, - "default_title": "MetaMask", - "default_popup": "popup.html" - }, - "manifest_version": 2 -} diff --git a/app/manifest/v3/opera.json b/app/manifest/v3/opera.json deleted file mode 100644 index 6cfefd402..000000000 --- a/app/manifest/v3/opera.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "permissions": [ - "storage", - "tabs", - "clipboardWrite", - "clipboardRead", - "http://localhost:8545/" - ] -} diff --git a/app/popup.html b/app/popup.html index 6c988eb48..90117fc79 100644 --- a/app/popup.html +++ b/app/popup.html @@ -8,10 +8,7 @@ -
- - -
+
diff --git a/app/scripts/app-init.js b/app/scripts/app-init.js deleted file mode 100644 index 6d2bf2d65..000000000 --- a/app/scripts/app-init.js +++ /dev/null @@ -1,55 +0,0 @@ -// eslint-disable-next-line import/unambiguous -function tryImport(...fileNames) { - try { - // eslint-disable-next-line - importScripts(...fileNames); - return true; - } catch (e) { - console.error(e); - return false; - } -} - -function importAllScripts() { - const startImportScriptsTime = Date.now(); - // applyLavaMoat has been hard coded to "true" as - // tryImport('./runtime-cjs.js') is giving issue with XMLHttpRequest object which is not avaialble to service worker. - // we need to dynamically inject values of applyLavaMoat once this is fixed. - const applyLavaMoat = true; - - tryImport('./globalthis.js'); - tryImport('./sentry-install.js'); - - if (applyLavaMoat) { - tryImport('./runtime-lavamoat.js'); - tryImport('./lockdown-more.js'); - tryImport('./policy-load.js'); - } else { - tryImport('./lockdown-install.js'); - tryImport('./lockdown-more.js'); - tryImport('./lockdown-run.js'); - tryImport('./runtime-cjs.js'); - } - - const fileList = [ - // The list of files is injected at build time by replacing comment below with comma separated strings of file names - /** FILE NAMES */ - ]; - - fileList.forEach((fileName) => tryImport(fileName)); - - // for performance metrics/reference - console.log( - `SCRIPTS IMPORT COMPLETE in Seconds: ${ - (Date.now() - startImportScriptsTime) / 1000 - }`, - ); -} - -// Placing script import call here ensures that scripts are inported each time service worker is activated. -importAllScripts(); - -/** - * An open issue is changes in this file break during hot reloading. Reason is dynamic injection of "FILE NAMES". - * Developers need to restart local server if they change this file. - */ diff --git a/app/scripts/background.js b/app/scripts/background.js index 311cd2781..affdcd32d 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -23,7 +23,6 @@ import { REJECT_NOTFICIATION_CLOSE, REJECT_NOTFICIATION_CLOSE_SIG, } from '../../shared/constants/metametrics'; -import { isManifestV3 } from '../../shared/modules/mv3.utils'; import migrations from './migrations'; import Migrator from './lib/migrator'; import ExtensionPlatform from './platforms/extension'; @@ -46,14 +45,6 @@ import { getPlatform } from './lib/util'; const { sentry } = global; const firstTimeState = { ...rawFirstTimeState }; -const metamaskInternalProcessHash = { - [ENVIRONMENT_TYPE_POPUP]: true, - [ENVIRONMENT_TYPE_NOTIFICATION]: true, - [ENVIRONMENT_TYPE_FULLSCREEN]: true, -}; - -const metamaskBlockedPorts = ['trezor-connect']; - log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'info'); const platform = new ExtensionPlatform(); @@ -82,23 +73,8 @@ const ONE_SECOND_IN_MILLISECONDS = 1_000; // Timeout for initializing phishing warning page. const PHISHING_WARNING_PAGE_TIMEOUT = ONE_SECOND_IN_MILLISECONDS; -/** - * In case of MV3 we attach a "onConnect" event listener as soon as the application is initialised. - * Reason is that in case of MV3 a delay in doing this was resulting in missing first connect event after service worker is re-activated. - */ - -const initApp = async (remotePort) => { - browser.runtime.onConnect.removeListener(initApp); - await initialize(remotePort); - log.info('MetaMask initialization complete.'); -}; - -if (isManifestV3()) { - browser.runtime.onConnect.addListener(initApp); -} else { - // initialization flow - initialize().catch(log.error); -} +// initialization flow +initialize().catch(log.error); /** * @typedef {import('../../shared/constants/transaction').TransactionMeta} TransactionMeta @@ -158,13 +134,12 @@ if (isManifestV3()) { /** * Initializes the MetaMask controller, and sets up all platform configuration. * - * @param {string} remotePort - remote application port connecting to extension. * @returns {Promise} Setup complete. */ -async function initialize(remotePort) { +async function initialize() { const initState = await loadStateFromPersistence(); const initLangCode = await getFirstPreferredLangCode(); - await setupController(initState, initLangCode, remotePort); + await setupController(initState, initLangCode); await loadPhishingWarningPage(); log.info('MetaMask initialization complete.'); } @@ -303,10 +278,9 @@ async function loadStateFromPersistence() { * * @param {Object} initState - The initial state to start the controller with, matches the state that is emitted from the controller. * @param {string} initLangCode - The region code for the language preferred by the current user. - * @param {string} remoteSourcePort - remote application port connecting to extension. * @returns {Promise} After setup is complete. */ -function setupController(initState, initLangCode, remoteSourcePort) { +function setupController(initState, initLangCode) { // // MetaMask Controller // @@ -393,13 +367,17 @@ function setupController(initState, initLangCode, remoteSourcePort) { // // connect to other contexts // - if (isManifestV3() && remoteSourcePort) { - connectRemote(remoteSourcePort); - } - browser.runtime.onConnect.addListener(connectRemote); browser.runtime.onConnectExternal.addListener(connectExternal); + const metamaskInternalProcessHash = { + [ENVIRONMENT_TYPE_POPUP]: true, + [ENVIRONMENT_TYPE_NOTIFICATION]: true, + [ENVIRONMENT_TYPE_FULLSCREEN]: true, + }; + + const metamaskBlockedPorts = ['trezor-connect']; + const isClientOpenStatus = () => { return ( popupIsOpen || @@ -467,13 +445,6 @@ function setupController(initState, initLangCode, remoteSourcePort) { controller.isClientOpen = true; controller.setupTrustedCommunication(portStream, remotePort.sender); - if (isManifestV3()) { - // Message below if captured by UI code in app/scripts/ui.js which will trigger UI initialisation - // This ensures that UI is initialised only after background is ready - // It fixes the issue of blank screen coming when extension is loaded, the issue is very frequent in MV3 - remotePort.postMessage({ name: 'CONNECTION_READY' }); - } - if (processName === ENVIRONMENT_TYPE_POPUP) { popupIsOpen = true; endOfStream(portStream, () => { @@ -595,14 +566,8 @@ function setupController(initState, initLangCode, remoteSourcePort) { if (count) { label = String(count); } - // browserAction has been replaced by action in MV3 - if (isManifestV3()) { - browser.action.setBadgeText({ text: label }); - browser.action.setBadgeBackgroundColor({ color: '#037DD6' }); - } else { - browser.browserAction.setBadgeText({ text: label }); - browser.browserAction.setBadgeBackgroundColor({ color: '#037DD6' }); - } + browser.browserAction.setBadgeText({ text: label }); + browser.browserAction.setBadgeBackgroundColor({ color: '#037DD6' }); } function getUnapprovedTransactionCount() { diff --git a/app/scripts/constants/on-ramp.js b/app/scripts/constants/on-ramp.js index 0d621f46e..bfce16f70 100644 --- a/app/scripts/constants/on-ramp.js +++ b/app/scripts/constants/on-ramp.js @@ -1,3 +1,2 @@ export const TRANSAK_API_KEY = '25ac1309-a49b-4411-b20e-5e56c61a5b1c'; // It's a public key, which will be included in a URL for Transak. export const MOONPAY_API_KEY = 'pk_live_WbCpe6PxSIcGPCSd6lKCbJNRht7uy'; // Publishable key. -export const COINBASEPAY_API_KEY = 'ab4b8829-a59d-44d3-accc-de77e4f18df2'; // Publishable key. diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 9cc350d6d..edbabad33 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -6,8 +6,6 @@ import browser from 'webextension-polyfill'; import PortStream from 'extension-port-stream'; import { obj as createThoughStream } from 'through2'; -import { isManifestV3 } from '../../shared/modules/mv3.utils'; - // These require calls need to use require to be statically recognized by browserify const fs = require('fs'); const path = require('path'); @@ -56,12 +54,7 @@ function injectScript(content) { const container = document.head || document.documentElement; const scriptTag = document.createElement('script'); scriptTag.setAttribute('async', 'false'); - // Inline scripts do not work in MV3 due to more strict security policy - if (isManifestV3()) { - scriptTag.setAttribute('src', browser.runtime.getURL('inpage.js')); - } else { - scriptTag.textContent = content; - } + scriptTag.textContent = content; container.insertBefore(scriptTag, container.children[0]); container.removeChild(scriptTag); } catch (error) { diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index d9cfe9b14..40ccfb5f0 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -6,9 +6,6 @@ import { MINUTE } from '../../../shared/constants/time'; import { MAINNET_CHAIN_ID } from '../../../shared/constants/network'; import { isTokenDetectionEnabledForNetwork } from '../../../shared/modules/network.utils'; import { isEqualCaseInsensitive } from '../../../shared/modules/string-utils'; -import { TOKEN_STANDARDS } from '../../../ui/helpers/constants/common'; -import { ASSET_TYPES } from '../../../shared/constants/transaction'; -import { EVENT, EVENT_NAMES } from '../../../shared/constants/metametrics'; // By default, poll every 3 minutes const DEFAULT_INTERVAL = MINUTE * 3; @@ -29,7 +26,6 @@ export default class DetectTokensController { * @param config.tokenList * @param config.tokensController * @param config.assetsContractController - * @param config.trackMetaMetricsEvent */ constructor({ interval = DEFAULT_INTERVAL, @@ -39,7 +35,6 @@ export default class DetectTokensController { tokenList, tokensController, assetsContractController = null, - trackMetaMetricsEvent, } = {}) { this.assetsContractController = assetsContractController; this.tokensController = tokensController; @@ -56,7 +51,6 @@ export default class DetectTokensController { this.detectedTokens = process.env.TOKEN_DETECTION_V2 ? this.tokensController?.state.detectedTokens : []; - this._trackMetaMetricsEvent = trackMetaMetricsEvent; preferences?.store.subscribe(({ selectedAddress, useTokenDetection }) => { if ( @@ -168,7 +162,6 @@ export default class DetectTokensController { let tokensWithBalance = []; if (process.env.TOKEN_DETECTION_V2) { - const eventTokensDetails = []; if (result) { const nonZeroTokenAddresses = Object.keys(result); for (const nonZeroTokenAddress of nonZeroTokenAddresses) { @@ -179,9 +172,6 @@ export default class DetectTokensController { iconUrl, aggregators, } = tokenList[nonZeroTokenAddress]; - - eventTokensDetails.push(`${symbol} - ${address}`); - tokensWithBalance.push({ address, symbol, @@ -190,17 +180,7 @@ export default class DetectTokensController { aggregators, }); } - if (tokensWithBalance.length > 0) { - this._trackMetaMetricsEvent({ - event: EVENT_NAMES.TOKEN_DETECTED, - category: EVENT.CATEGORIES.WALLET, - properties: { - tokens: eventTokensDetails, - token_standard: TOKEN_STANDARDS.ERC20, - asset_type: ASSET_TYPES.TOKEN, - }, - }); await this.tokensController.addDetectedTokens(tokensWithBalance); } } diff --git a/app/scripts/controllers/metametrics.js b/app/scripts/controllers/metametrics.js index 7e1b6c6ec..b43efe631 100644 --- a/app/scripts/controllers/metametrics.js +++ b/app/scripts/controllers/metametrics.js @@ -558,15 +558,6 @@ export default class MetaMetricsController { [TRAITS.NETWORKS_ADDED]: metamaskState.frequentRpcListDetail.map( (rpc) => rpc.chainId, ), - [TRAITS.NETWORKS_WITHOUT_TICKER]: metamaskState.frequentRpcListDetail.reduce( - (networkList, currentNetwork) => { - if (!currentNetwork.ticker) { - networkList.push(currentNetwork.chainId); - } - return networkList; - }, - [], - ), [TRAITS.NFT_AUTODETECTION_ENABLED]: metamaskState.useCollectibleDetection, [TRAITS.NUMBER_OF_ACCOUNTS]: Object.values(metamaskState.identities) .length, @@ -580,7 +571,6 @@ export default class MetaMetricsController { [TRAITS.OPENSEA_API_ENABLED]: metamaskState.openSeaEnabled, [TRAITS.THREE_BOX_ENABLED]: metamaskState.threeBoxSyncingAllowed, [TRAITS.THEME]: metamaskState.theme || 'default', - [TRAITS.TOKEN_DETECTION_ENABLED]: metamaskState.useTokenDetection, }; if (!this.previousTraits) { diff --git a/app/scripts/controllers/metametrics.test.js b/app/scripts/controllers/metametrics.test.js index 804132295..868117e71 100644 --- a/app/scripts/controllers/metametrics.test.js +++ b/app/scripts/controllers/metametrics.test.js @@ -9,10 +9,8 @@ import { } from '../../../shared/constants/metametrics'; import waitUntilCalled from '../../../test/lib/wait-until-called'; import { - ETH_SYMBOL, MAINNET_CHAIN_ID, ROPSTEN_CHAIN_ID, - TEST_ETH_SYMBOL, } from '../../../shared/constants/network'; import MetaMetricsController from './metametrics'; import { NETWORK_EVENTS } from './network'; @@ -675,9 +673,8 @@ describe('MetaMetricsController', function () { }, allTokens: MOCK_ALL_TOKENS, frequentRpcListDetail: [ - { chainId: MAINNET_CHAIN_ID, ticker: ETH_SYMBOL }, - { chainId: ROPSTEN_CHAIN_ID, ticker: TEST_ETH_SYMBOL }, - { chainId: '0xaf' }, + { chainId: MAINNET_CHAIN_ID }, + { chainId: ROPSTEN_CHAIN_ID }, ], identities: [{}, {}], ledgerTransportType: 'web-hid', @@ -685,14 +682,12 @@ describe('MetaMetricsController', function () { threeBoxSyncingAllowed: false, useCollectibleDetection: false, theme: 'default', - useTokenDetection: true, }); assert.deepEqual(traits, { [TRAITS.ADDRESS_BOOK_ENTRIES]: 3, [TRAITS.LEDGER_CONNECTION_TYPE]: 'web-hid', - [TRAITS.NETWORKS_ADDED]: [MAINNET_CHAIN_ID, ROPSTEN_CHAIN_ID, '0xaf'], - [TRAITS.NETWORKS_WITHOUT_TICKER]: ['0xaf'], + [TRAITS.NETWORKS_ADDED]: [MAINNET_CHAIN_ID, ROPSTEN_CHAIN_ID], [TRAITS.NFT_AUTODETECTION_ENABLED]: false, [TRAITS.NUMBER_OF_ACCOUNTS]: 2, [TRAITS.NUMBER_OF_NFT_COLLECTIONS]: 3, @@ -701,7 +696,6 @@ describe('MetaMetricsController', function () { [TRAITS.OPENSEA_API_ENABLED]: true, [TRAITS.THREE_BOX_ENABLED]: false, [TRAITS.THEME]: 'default', - [TRAITS.TOKEN_DETECTION_ENABLED]: true, }); }); @@ -723,7 +717,6 @@ describe('MetaMetricsController', function () { threeBoxSyncingAllowed: false, useCollectibleDetection: false, theme: 'default', - useTokenDetection: true, }); const updatedTraits = metaMetricsController._buildUserTraitsObject({ @@ -744,7 +737,6 @@ describe('MetaMetricsController', function () { threeBoxSyncingAllowed: false, useCollectibleDetection: false, theme: 'default', - useTokenDetection: true, }); assert.deepEqual(updatedTraits, { @@ -773,7 +765,6 @@ describe('MetaMetricsController', function () { threeBoxSyncingAllowed: false, useCollectibleDetection: true, theme: 'default', - useTokenDetection: true, }); const updatedTraits = metaMetricsController._buildUserTraitsObject({ @@ -792,7 +783,6 @@ describe('MetaMetricsController', function () { threeBoxSyncingAllowed: false, useCollectibleDetection: true, theme: 'default', - useTokenDetection: true, }); assert.equal(updatedTraits, null); diff --git a/app/scripts/controllers/permissions/flask/snap-permissions.js b/app/scripts/controllers/permissions/flask/snap-permissions.js index 07024c9ae..bde8c4c91 100644 --- a/app/scripts/controllers/permissions/flask/snap-permissions.js +++ b/app/scripts/controllers/permissions/flask/snap-permissions.js @@ -1,4 +1,4 @@ -import { endowmentPermissionBuilders } from '@metamask/snap-controllers'; +import { endowmentPermissionBuilders } from '@metamask/controllers'; import { restrictedMethodPermissionBuilders, selectHooks, diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index f19da6ff1..e4df14746 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -19,11 +19,6 @@ import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, } from '../../../shared/constants/swaps'; import { GAS_ESTIMATE_TYPES } from '../../../shared/constants/gas'; -import { - FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - FALLBACK_SMART_TRANSACTIONS_DEADLINE, - FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, -} from '../../../shared/constants/smartTransactions'; import { isSwapsDefaultTokenAddress } from '../../../shared/modules/swaps.utils'; @@ -46,6 +41,8 @@ const POLL_COUNT_LIMIT = 3; // If for any reason the MetaSwap API fails to provide a refresh time, // provide a reasonable fallback to avoid further errors const FALLBACK_QUOTE_REFRESH_TIME = MINUTE; +const FALLBACK_SMART_TRANSACTION_REFRESH_TIME = SECOND * 10; +const FALLBACK_SMART_TRANSACTIONS_DEADLINE = 180; function calculateGasEstimateWithRefund( maxGas = MAX_GAS_LIMIT, @@ -89,9 +86,8 @@ const initialState = { saveFetchedQuotes: false, swapsQuoteRefreshTime: FALLBACK_QUOTE_REFRESH_TIME, swapsQuotePrefetchingRefreshTime: FALLBACK_QUOTE_REFRESH_TIME, - swapsStxBatchStatusRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxGetTransactionsRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxMaxFeeMultiplier: FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, + swapsStxBatchStatusRefreshTime: FALLBACK_SMART_TRANSACTION_REFRESH_TIME, + swapsStxGetTransactionsRefreshTime: FALLBACK_SMART_TRANSACTION_REFRESH_TIME, swapsFeatureFlags: {}, }, }; @@ -133,13 +129,13 @@ export default class SwapsController { }); } - async fetchSwapsNetworkConfig(chainId) { + async fetchSwapsRefreshRates(chainId) { const response = await fetchWithCache( getBaseApi('network', chainId), { method: 'GET' }, { cacheRefreshTime: 600000 }, ); - const { refreshRates, parameters = {} } = response || {}; + const { refreshRates } = response || {}; if ( !refreshRates || typeof refreshRates.quotes !== 'number' || @@ -156,39 +152,35 @@ export default class SwapsController { stxGetTransactions: refreshRates.stxGetTransactions * 1000, stxBatchStatus: refreshRates.stxBatchStatus * 1000, stxStatusDeadline: refreshRates.stxStatusDeadline, - stxMaxFeeMultiplier: parameters.stxMaxFeeMultiplier, }; } - // Sets the network config from the MetaSwap API. - async _setSwapsNetworkConfig() { + // Sets the refresh rate for quote updates from the MetaSwap API + async _setSwapsRefreshRates() { const chainId = this._getCurrentChainId(); - let swapsNetworkConfig; + let swapsRefreshRates; try { - swapsNetworkConfig = await this.fetchSwapsNetworkConfig(chainId); + swapsRefreshRates = await this.fetchSwapsRefreshRates(chainId); } catch (e) { - console.error('Request for Swaps network config failed: ', e); + console.error('Request for swaps quote refresh time failed: ', e); } const { swapsState: latestSwapsState } = this.store.getState(); this.store.updateState({ swapsState: { ...latestSwapsState, swapsQuoteRefreshTime: - swapsNetworkConfig?.quotes || FALLBACK_QUOTE_REFRESH_TIME, + swapsRefreshRates?.quotes || FALLBACK_QUOTE_REFRESH_TIME, swapsQuotePrefetchingRefreshTime: - swapsNetworkConfig?.quotesPrefetching || FALLBACK_QUOTE_REFRESH_TIME, + swapsRefreshRates?.quotesPrefetching || FALLBACK_QUOTE_REFRESH_TIME, swapsStxGetTransactionsRefreshTime: - swapsNetworkConfig?.stxGetTransactions || - FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, + swapsRefreshRates?.stxGetTransactions || + FALLBACK_SMART_TRANSACTION_REFRESH_TIME, swapsStxBatchStatusRefreshTime: - swapsNetworkConfig?.stxBatchStatus || - FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, + swapsRefreshRates?.stxBatchStatus || + FALLBACK_SMART_TRANSACTION_REFRESH_TIME, swapsStxStatusDeadline: - swapsNetworkConfig?.stxStatusDeadline || + swapsRefreshRates?.stxStatusDeadline || FALLBACK_SMART_TRANSACTIONS_DEADLINE, - swapsStxMaxFeeMultiplier: - swapsNetworkConfig?.stxMaxFeeMultiplier || - FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, }, }); } @@ -261,7 +253,7 @@ export default class SwapsController { this._fetchTradesInfo(fetchParams, { ...fetchParamsMetaData, }), - this._setSwapsNetworkConfig(), + this._setSwapsRefreshRates(), ]); const { diff --git a/app/scripts/controllers/swaps.test.js b/app/scripts/controllers/swaps.test.js index f8f580c4d..3a13bf942 100644 --- a/app/scripts/controllers/swaps.test.js +++ b/app/scripts/controllers/swaps.test.js @@ -13,10 +13,6 @@ import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps'; import { createTestProviderTools } from '../../../test/stub/provider'; import { SECOND } from '../../../shared/constants/time'; import { GAS_ESTIMATE_TYPES } from '../../../shared/constants/gas'; -import { - FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, -} from '../../../shared/constants/smartTransactions'; import SwapsController, { utils } from './swaps'; import { NETWORK_EVENTS } from './network'; @@ -138,9 +134,8 @@ const EMPTY_INIT_STATE = { swapsFeatureFlags: {}, swapsQuoteRefreshTime: 60000, swapsQuotePrefetchingRefreshTime: 60000, - swapsStxBatchStatusRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxGetTransactionsRefreshTime: FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME, - swapsStxMaxFeeMultiplier: FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER, + swapsStxBatchStatusRefreshTime: 10000, + swapsStxGetTransactionsRefreshTime: 10000, swapsUserFeeLevel: '', saveFetchedQuotes: false, }, diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 0818fc894..e5d50375f 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -18,12 +18,10 @@ import { getChainType, } from '../../lib/util'; import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/helpers/constants/error-keys'; -import { calcGasTotal } from '../../../../ui/pages/send/send.utils'; import { getSwapsTokensReceivedFromTxMeta } from '../../../../ui/pages/swaps/swaps.util'; import { hexWEIToDecGWEI, decimalToHex, - hexWEIToDecETH, } from '../../../../ui/helpers/utils/conversions.util'; import { TRANSACTION_STATUSES, @@ -41,7 +39,6 @@ import { PRIORITY_LEVELS, } from '../../../../shared/constants/gas'; import { decGWEIToHexWEI } from '../../../../shared/modules/conversion.utils'; -import { isSwapsDefaultTokenAddress } from '../../../../shared/modules/swaps.utils'; import { EVENT } from '../../../../shared/constants/metametrics'; import { HARDFORKS, @@ -61,7 +58,6 @@ import PendingTransactionTracker from './pending-tx-tracker'; import * as txUtils from './lib/util'; const MAX_MEMSTORE_TX_LIST_SIZE = 100; // Number of transactions (by unique nonces) to keep in memory -const UPDATE_POST_TX_BALANCE_TIMEOUT = 5000; const SWAP_TRANSACTION_TYPES = [ TRANSACTION_TYPES.SWAP, @@ -447,7 +443,7 @@ export default class TransactionController extends EventEmitter { * @param {string} editableParams.gasPrice * @returns {TransactionMeta} the txMeta of the updated transaction */ - async updateEditableParams(txId, { data, from, to, value, gas, gasPrice }) { + updateEditableParams(txId, { data, from, to, value, gas, gasPrice }) { this._throwErrorIfNotUnapprovedTx(txId, 'updateEditableParams'); const editableParams = { @@ -463,20 +459,7 @@ export default class TransactionController extends EventEmitter { // only update what is defined editableParams.txParams = pickBy(editableParams.txParams); - - // update transaction type in case it has changes - const transactionBeforeEdit = this._getTransaction(txId); - const { type } = await determineTransactionType( - { - ...transactionBeforeEdit.txParams, - ...editableParams.txParams, - }, - this.query, - ); - editableParams.type = type; - const note = `Update Editable Params for ${txId}`; - this._updateTransaction(txId, editableParams, note); return this._getTransaction(txId); } @@ -1467,39 +1450,6 @@ export default class TransactionController extends EventEmitter { this._trackTransactionMetricsEvent(txMeta, TRANSACTION_EVENTS.SUBMITTED); } - async updatePostTxBalance({ txMeta, txId, numberOfAttempts = 6 }) { - const postTxBalance = await this.query.getBalance(txMeta.txParams.from); - const latestTxMeta = this.txStateManager.getTransaction(txId); - const approvalTxMeta = latestTxMeta.approvalTxId - ? this.txStateManager.getTransaction(latestTxMeta.approvalTxId) - : null; - latestTxMeta.postTxBalance = postTxBalance.toString(16); - const isDefaultTokenAddress = isSwapsDefaultTokenAddress( - txMeta.destinationTokenAddress, - txMeta.chainId, - ); - if ( - isDefaultTokenAddress && - txMeta.preTxBalance === latestTxMeta.postTxBalance && - numberOfAttempts > 0 - ) { - setTimeout(() => { - // If postTxBalance is the same as preTxBalance, try it again. - this.updatePostTxBalance({ - txMeta, - txId, - numberOfAttempts: numberOfAttempts - 1, - }); - }, UPDATE_POST_TX_BALANCE_TIMEOUT); - } else { - this.txStateManager.updateTransaction( - latestTxMeta, - 'transactions#confirmTransaction - add postTxBalance', - ); - this._trackSwapsMetrics(latestTxMeta, approvalTxMeta); - } - } - /** * Sets the status of the transaction to confirmed and sets the status of nonce duplicates as * dropped if the txParams have data it will fetch the txReceipt @@ -1563,10 +1513,21 @@ export default class TransactionController extends EventEmitter { ); if (txMeta.type === TRANSACTION_TYPES.SWAP) { - await this.updatePostTxBalance({ - txMeta, - txId, - }); + const postTxBalance = await this.query.getBalance(txMeta.txParams.from); + const latestTxMeta = this.txStateManager.getTransaction(txId); + + const approvalTxMeta = latestTxMeta.approvalTxId + ? this.txStateManager.getTransaction(latestTxMeta.approvalTxId) + : null; + + latestTxMeta.postTxBalance = postTxBalance.toString(16); + + this.txStateManager.updateTransaction( + latestTxMeta, + 'transactions#confirmTransaction - add postTxBalance', + ); + + this._trackSwapsMetrics(latestTxMeta, approvalTxMeta); } } catch (err) { log.error(err); @@ -1624,10 +1585,21 @@ export default class TransactionController extends EventEmitter { ); if (txMeta.type === TRANSACTION_TYPES.SWAP) { - await this.updatePostTxBalance({ - txMeta, - txId, - }); + const postTxBalance = await this.query.getBalance(txMeta.txParams.from); + const latestTxMeta = this.txStateManager.getTransaction(txId); + + const approvalTxMeta = latestTxMeta.approvalTxId + ? this.txStateManager.getTransaction(latestTxMeta.approvalTxId) + : null; + + latestTxMeta.postTxBalance = postTxBalance.toString(16); + + this.txStateManager.updateTransaction( + latestTxMeta, + 'transactions#confirmTransaction - add postTxBalance', + ); + + this._trackSwapsMetrics(latestTxMeta, approvalTxMeta); } } catch (err) { log.error(err); @@ -1905,30 +1877,6 @@ export default class TransactionController extends EventEmitter { this.memStore.updateState({ unapprovedTxs, currentNetworkTxList }); } - _calculateTransactionsCost(txMeta, approvalTxMeta) { - let approvalGasCost = '0x0'; - if (approvalTxMeta?.txReceipt) { - approvalGasCost = calcGasTotal( - approvalTxMeta.txReceipt.gasUsed, - approvalTxMeta.txReceipt.effectiveGasPrice, - ); - } - const tradeGasCost = calcGasTotal( - txMeta.txReceipt.gasUsed, - txMeta.txReceipt.effectiveGasPrice, - ); - const tradeAndApprovalGasCost = new BigNumber(tradeGasCost, 16) - .plus(approvalGasCost, 16) - .toString(16); - return { - approvalGasCostInEth: Number(hexWEIToDecETH(approvalGasCost)), - tradeGasCostInEth: Number(hexWEIToDecETH(tradeGasCost)), - tradeAndApprovalGasCostInEth: Number( - hexWEIToDecETH(tradeAndApprovalGasCost), - ), - }; - } - _trackSwapsMetrics(txMeta, approvalTxMeta) { if (this._getParticipateInMetrics() && txMeta.swapMetaData) { if (txMeta.txReceipt.status === '0x0') { @@ -1963,11 +1911,6 @@ export default class TransactionController extends EventEmitter { .round(2)}%` : null; - const transactionsCost = this._calculateTransactionsCost( - txMeta, - approvalTxMeta, - ); - this._trackMetaMetricsEvent({ event: 'Swap Completed', category: EVENT.CATEGORIES.SWAPS, @@ -1976,10 +1919,6 @@ export default class TransactionController extends EventEmitter { token_to_amount_received: tokensReceived, quote_vs_executionRatio: quoteVsExecutionRatio, estimated_vs_used_gasRatio: estimatedVsUsedGasRatio, - approval_gas_cost_in_eth: transactionsCost.approvalGasCostInEth, - trade_gas_cost_in_eth: transactionsCost.tradeGasCostInEth, - trade_and_approval_gas_cost_in_eth: - transactionsCost.tradeAndApprovalGasCostInEth, }, }); } @@ -2066,10 +2005,6 @@ export default class TransactionController extends EventEmitter { gasParams.estimate_used = estimateUsed; } - if (extraParams?.gas_used) { - gasParams.gas_used = extraParams.gas_used; - } - const gasParamsInGwei = this._getGasValuesInGWEI(gasParams); let eip1559Version = '0'; @@ -2100,8 +2035,8 @@ export default class TransactionController extends EventEmitter { : TRANSACTION_ENVELOPE_TYPE_NAMES.LEGACY, first_seen: time, gas_limit: gasLimit, - ...extraParams, ...gasParamsInGwei, + ...extraParams, }; return { properties, sensitiveProperties }; diff --git a/app/scripts/controllers/transactions/index.test.js b/app/scripts/controllers/transactions/index.test.js index 422aaadd7..5493728a3 100644 --- a/app/scripts/controllers/transactions/index.test.js +++ b/app/scripts/controllers/transactions/index.test.js @@ -1470,7 +1470,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: ORIGIN_METAMASK, - source: EVENT.SOURCE.TRANSACTION.USER, + source: 'user', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -1549,7 +1549,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: ORIGIN_METAMASK, - source: EVENT.SOURCE.TRANSACTION.USER, + source: 'user', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -1638,7 +1638,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: 'other', - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -1719,7 +1719,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: 'other', - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -1800,7 +1800,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: 'other', - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -1859,7 +1859,7 @@ describe('Transaction Controller', function () { properties: { network: '42', referrer: 'other', - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', type: TRANSACTION_TYPES.SIMPLE_SEND, chain_id: '0x2a', eip_1559_version: '0', @@ -1936,7 +1936,7 @@ describe('Transaction Controller', function () { gas_edit_type: 'none', network: '42', referrer: 'other', - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', type: TRANSACTION_TYPES.SIMPLE_SEND, account_type: 'MetaMask', asset_type: ASSET_TYPES.NATIVE, @@ -2245,125 +2245,4 @@ describe('Transaction Controller', function () { assert.equal(result.destinationTokenAddress, VALID_ADDRESS_TWO); // not updated even though it's passed in to update }); }); - - describe('updateEditableParams', function () { - let txStateManager; - - beforeEach(function () { - txStateManager = txController.txStateManager; - txStateManager.addTransaction({ - id: '1', - status: TRANSACTION_STATUSES.UNAPPROVED, - metamaskNetworkId: currentNetworkId, - txParams: { - gas: '0x001', - gasPrice: '0x002', - // max fees can not be mixed with gasPrice - // maxPriorityFeePerGas: '0x003', - // maxFeePerGas: '0x004', - to: VALID_ADDRESS, - from: VALID_ADDRESS, - }, - estimateUsed: '0x005', - estimatedBaseFee: '0x006', - decEstimatedBaseFee: '6', - type: 'simpleSend', - userEditedGasLimit: '0x008', - userFeeLevel: 'medium', - }); - }); - - it('updates editible params when type changes from simple send to token transfer', async function () { - // test update gasFees - await txController.updateEditableParams('1', { - data: - '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', - }); - const result = txStateManager.getTransaction('1'); - assert.equal( - result.txParams.data, - '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', - ); - assert.equal(result.type, TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER); - }); - - it('updates editible params when type changes from token transfer to simple send', async function () { - // test update gasFees - txStateManager.addTransaction({ - id: '2', - status: TRANSACTION_STATUSES.UNAPPROVED, - metamaskNetworkId: currentNetworkId, - txParams: { - gas: '0x001', - gasPrice: '0x002', - // max fees can not be mixed with gasPrice - // maxPriorityFeePerGas: '0x003', - // maxFeePerGas: '0x004', - to: VALID_ADDRESS, - from: VALID_ADDRESS, - data: - '0xa9059cbb000000000000000000000000e18035bf8712672935fdb4e5e431b1a0183d2dfc0000000000000000000000000000000000000000000000000de0b6b3a7640000', - }, - estimateUsed: '0x005', - estimatedBaseFee: '0x006', - decEstimatedBaseFee: '6', - type: TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER, - userEditedGasLimit: '0x008', - userFeeLevel: 'medium', - }); - await txController.updateEditableParams('2', { - data: '0x', - }); - const result = txStateManager.getTransaction('2'); - assert.equal(result.txParams.data, '0x'); - assert.equal(result.type, TRANSACTION_TYPES.SIMPLE_SEND); - }); - - it('updates editible params when type changes from simpleSend to contract interaction', async function () { - // test update gasFees - txStateManager.addTransaction({ - id: '3', - status: TRANSACTION_STATUSES.UNAPPROVED, - metamaskNetworkId: currentNetworkId, - txParams: { - gas: '0x001', - gasPrice: '0x002', - // max fees can not be mixed with gasPrice - // maxPriorityFeePerGas: '0x003', - // maxFeePerGas: '0x004', - to: VALID_ADDRESS, - from: VALID_ADDRESS, - }, - estimateUsed: '0x005', - estimatedBaseFee: '0x006', - decEstimatedBaseFee: '6', - type: TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER, - userEditedGasLimit: '0x008', - userFeeLevel: 'medium', - }); - providerResultStub.eth_getCode = '0x5'; - await txController.updateEditableParams('3', { - data: '0x123', - }); - const result = txStateManager.getTransaction('3'); - assert.equal(result.txParams.data, '0x123'); - assert.equal(result.type, TRANSACTION_TYPES.CONTRACT_INTERACTION); - }); - - it('updates editible params when type does not change', async function () { - // test update gasFees - await txController.updateEditableParams('1', { - data: '0x123', - gas: '0xabc', - from: VALID_ADDRESS_TWO, - }); - const result = txStateManager.getTransaction('1'); - assert.equal(result.txParams.data, '0x123'); - assert.equal(result.txParams.gas, '0xabc'); - assert.equal(result.txParams.from, VALID_ADDRESS_TWO); - assert.equal(result.txParams.to, VALID_ADDRESS); - assert.equal(result.txParams.gasPrice, '0x002'); - assert.equal(result.type, TRANSACTION_TYPES.SIMPLE_SEND); - }); - }); }); diff --git a/app/scripts/lib/buy-url.js b/app/scripts/lib/buy-url.js index eed5ff82d..ba4a0d86f 100644 --- a/app/scripts/lib/buy-url.js +++ b/app/scripts/lib/buy-url.js @@ -7,32 +7,24 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, + MAINNET_NETWORK_ID, BUYABLE_CHAINS_MAP, } from '../../../shared/constants/network'; import { SECOND } from '../../../shared/constants/time'; import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; -import { - TRANSAK_API_KEY, - MOONPAY_API_KEY, - COINBASEPAY_API_KEY, -} from '../constants/on-ramp'; +import { TRANSAK_API_KEY, MOONPAY_API_KEY } from '../constants/on-ramp'; const fetchWithTimeout = getFetchWithTimeout(SECOND * 30); /** * Create a Wyre purchase URL. * - * @param {string} walletAddress - Ethereum destination address - * @param {string} chainId - Current chain ID + * @param {string} address - Ethereum destination address * @returns String */ -const createWyrePurchaseUrl = async (walletAddress, chainId) => { - const { wyre = {} } = BUYABLE_CHAINS_MAP[chainId]; - const { srn, currencyCode } = wyre; - - const networkId = parseInt(chainId, 16); - const fiatOnRampUrlApi = `${SWAPS_API_V2_BASE_URL}/networks/${networkId}/fiatOnRampUrl?serviceName=wyre&destinationAddress=${walletAddress}`; - const wyrePurchaseUrlFallback = `https://pay.sendwyre.com/purchase?dest=${srn}:${walletAddress}&destCurrency=${currencyCode}&accountId=AC-7AG3W4XH4N2&paymentMethod=debit-card`; +const createWyrePurchaseUrl = async (address) => { + const fiatOnRampUrlApi = `${SWAPS_API_V2_BASE_URL}/networks/${MAINNET_NETWORK_ID}/fiatOnRampUrl?serviceName=wyre&destinationAddress=${address}`; + const wyrePurchaseUrlFallback = `https://pay.sendwyre.com/purchase?dest=ethereum:${address}&destCurrency=ETH&accountId=AC-7AG3W4XH4N2&paymentMethod=debit-card`; try { const response = await fetchWithTimeout(fiatOnRampUrlApi, { method: 'GET', @@ -116,28 +108,6 @@ const createMoonPayUrl = async (walletAddress, chainId) => { return ''; }; -/** - * Create a Coinbase Pay Checkout URL. - * - * @param {string} walletAddress - Ethereum destination address - * @param {string} chainId - Current chain ID - * @returns String - */ -const createCoinbasePayUrl = (walletAddress, chainId) => { - const { coinbasePayCurrencies } = BUYABLE_CHAINS_MAP[chainId]; - const queryParams = new URLSearchParams({ - appId: COINBASEPAY_API_KEY, - attribution: 'extension', - destinationWallets: JSON.stringify([ - { - address: walletAddress, - assets: coinbasePayCurrencies, - }, - ]), - }); - return `https://pay.coinbase.com/buy?${queryParams}`; -}; - /** * Gives the caller a url at which the user can acquire eth, depending on the network they are in * @@ -157,13 +127,11 @@ export default async function getBuyUrl({ chainId, address, service }) { switch (service) { case 'wyre': - return await createWyrePurchaseUrl(address, chainId); + return await createWyrePurchaseUrl(address); case 'transak': return createTransakUrl(address, chainId); case 'moonpay': return createMoonPayUrl(address, chainId); - case 'coinbase': - return createCoinbasePayUrl(address, chainId); case 'metamask-faucet': return 'https://faucet.metamask.io/'; case 'rinkeby-faucet': diff --git a/app/scripts/lib/metaRPCClientFactory.js b/app/scripts/lib/metaRPCClientFactory.js index 1dfe572d2..689774f91 100644 --- a/app/scripts/lib/metaRPCClientFactory.js +++ b/app/scripts/lib/metaRPCClientFactory.js @@ -1,7 +1,6 @@ import { EthereumRpcError } from 'eth-rpc-errors'; import SafeEventEmitter from 'safe-event-emitter'; import createRandomId from '../../../shared/modules/random-id'; -import { TEN_SECONDS_IN_MILLISECONDS } from '../../../ui/helpers/constants/critical-error'; class MetaRPCClient { constructor(connectionStream) { @@ -11,25 +10,6 @@ class MetaRPCClient { this.requests = new Map(); this.connectionStream.on('data', this.handleResponse.bind(this)); this.connectionStream.on('end', this.close.bind(this)); - this.responseHandled = {}; - } - - send(id, payload, cb) { - this.requests.set(id, cb); - this.connectionStream.write(payload); - this.responseHandled[id] = false; - if (payload.method === 'getState') { - setTimeout(() => { - if (!this.responseHandled[id] && cb) { - delete this.responseHandled[id]; - return cb(new Error('No response from RPC'), null); - } - - delete this.responseHandled[id]; - // needed for linter to pass - return true; - }, TEN_SECONDS_IN_MILLISECONDS); - } } onNotification(handler) { @@ -54,8 +34,6 @@ class MetaRPCClient { const isNotification = id === undefined && error === undefined; const cb = this.requests.get(id); - this.responseHandled[id] = true; - if (method && params && !isNotification) { // dont handle server-side to client-side requests return; @@ -101,13 +79,14 @@ const metaRPCClientFactory = (connectionStream) => { const cb = p[p.length - 1]; const params = p.slice(0, -1); const id = createRandomId(); - const payload = { + + object.requests.set(id, cb); + object.connectionStream.write({ jsonrpc: '2.0', method: property, params, id, - }; - object.send(id, payload, cb); + }); }; }, }); diff --git a/app/scripts/lib/metaRPCClientFactory.test.js b/app/scripts/lib/metaRPCClientFactory.test.js index d8fbf6fe3..8304cf4e9 100644 --- a/app/scripts/lib/metaRPCClientFactory.test.js +++ b/app/scripts/lib/metaRPCClientFactory.test.js @@ -131,21 +131,4 @@ describe('metaRPCClientFactory', () => { }, }); }); - - it('should be able to handle no message within TIMEOUT secs', async () => { - jest.useFakeTimers(); - const streamTest = createThoughStream(); - const metaRPCClient = metaRPCClientFactory(streamTest); - - const errorPromise = new Promise((_resolve, reject) => - metaRPCClient.getState('bad', (error, _) => { - reject(error); - }), - ); - - jest.runOnlyPendingTimers(); - await expect(errorPromise).rejects.toThrow('No response from RPC'); - - jest.useRealTimers(); - }); }); diff --git a/app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js b/app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js index 04d66a3ad..db3f4ac1f 100644 --- a/app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js +++ b/app/scripts/lib/rpc-method-middleware/handlers/add-ethereum-chain.js @@ -278,7 +278,7 @@ async function addEthereumChainHandler( network: firstValidRPCUrl, symbol: ticker, block_explorer_url: firstValidBlockExplorerUrl, - source: EVENT.SOURCE.TRANSACTION.DAPP, + source: 'dapp', }, }); diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 56c5f029f..580ed7f30 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -42,15 +42,12 @@ import { SubjectMetadataController, ///: BEGIN:ONLY_INCLUDE_IN(flask) RateLimitController, - NotificationController, ///: END:ONLY_INCLUDE_IN } from '@metamask/controllers'; import SmartTransactionsController from '@metamask/smart-transactions-controller'; ///: BEGIN:ONLY_INCLUDE_IN(flask) -import { - SnapController, - IframeExecutionService, -} from '@metamask/snap-controllers'; +import { SnapController } from '@metamask/snap-controllers'; +import { IframeExecutionService } from '@metamask/iframe-execution-environment-service'; ///: END:ONLY_INCLUDE_IN import { @@ -406,7 +403,7 @@ export default class MetamaskController extends EventEmitter { name: 'CurrencyRateController', }); this.currencyRateController = new CurrencyRateController({ - includeUsdRate: true, + includeUSDRate: true, messenger: currencyRateMessenger, state: { ...initState.CurrencyController, @@ -641,8 +638,9 @@ export default class MetamaskController extends EventEmitter { ///: BEGIN:ONLY_INCLUDE_IN(flask) this.workerController = new IframeExecutionService({ + onError: this.onExecutionEnvironmentError.bind(this), iframeUrl: new URL( - 'https://metamask.github.io/iframe-execution-environment/0.4.6', + 'https://metamask.github.io/iframe-execution-environment/0.4.4', ), messenger: this.controllerMessenger.getRestricted({ name: 'ExecutionService', @@ -668,7 +666,7 @@ export default class MetamaskController extends EventEmitter { }); this.snapController = new SnapController({ - environmentEndowmentPermissions: Object.values(EndowmentPermissions), + endowmentPermissionNames: Object.values(EndowmentPermissions), terminateAllSnaps: this.workerController.terminateAllSnaps.bind( this.workerController, ), @@ -686,13 +684,6 @@ export default class MetamaskController extends EventEmitter { messenger: snapControllerMessenger, }); - this.notificationController = new NotificationController({ - messenger: this.controllerMessenger.getRestricted({ - name: 'NotificationController', - }), - state: initState.NotificationController, - }); - this.rateLimitController = new RateLimitController({ messenger: this.controllerMessenger.getRestricted({ name: 'RateLimitController', @@ -711,15 +702,6 @@ export default class MetamaskController extends EventEmitter { ); return null; }, - showInAppNotification: (origin, message) => { - this.controllerMessenger.call( - 'NotificationController:show', - origin, - message, - ); - - return null; - }, }, }); ///: END:ONLY_INCLUDE_IN @@ -732,9 +714,6 @@ export default class MetamaskController extends EventEmitter { network: this.networkController, keyringMemStore: this.keyringController.memStore, tokenList: this.tokenListController, - trackMetaMetricsEvent: this.metaMetricsController.trackEvent.bind( - this.metaMetricsController, - ), })) : (this.detectTokensController = new DetectTokensController({ preferences: this.preferencesController, @@ -1021,7 +1000,6 @@ export default class MetamaskController extends EventEmitter { CollectiblesController: this.collectiblesController, ///: BEGIN:ONLY_INCLUDE_IN(flask) SnapController: this.snapController, - NotificationController: this.notificationController, ///: END:ONLY_INCLUDE_IN }); @@ -1062,7 +1040,6 @@ export default class MetamaskController extends EventEmitter { CollectiblesController: this.collectiblesController, ///: BEGIN:ONLY_INCLUDE_IN(flask) SnapController: this.snapController, - NotificationController: this.notificationController, ///: END:ONLY_INCLUDE_IN }, controllerMessenger: this.controllerMessenger, @@ -1138,7 +1115,7 @@ export default class MetamaskController extends EventEmitter { type: MESSAGE_TYPE.SNAP_CONFIRM, requestData: confirmationData, }), - showNativeNotification: (origin, args) => + showNotification: (origin, args) => this.controllerMessenger.call( 'RateLimitController:call', origin, @@ -1146,14 +1123,6 @@ export default class MetamaskController extends EventEmitter { origin, args.message, ), - showInAppNotification: (origin, args) => - this.controllerMessenger.call( - 'RateLimitController:call', - origin, - 'showInAppNotification', - origin, - args.message, - ), updateSnapState: this.controllerMessenger.call.bind( this.controllerMessenger, 'SnapController:updateSnapState', @@ -1161,25 +1130,6 @@ export default class MetamaskController extends EventEmitter { }), }; } - - /** - * Deletes the specified notifications from state. - * - * @param {string[]} ids - The notifications ids to delete. - */ - dismissNotifications(ids) { - this.notificationController.dismiss(ids); - } - - /** - * Updates the readDate attribute of the specified notifications. - * - * @param {string[]} ids - The notifications ids to mark as read. - */ - markNotificationsAsRead(ids) { - this.notificationController.markRead(ids); - } - ///: END:ONLY_INCLUDE_IN /** @@ -1277,26 +1227,6 @@ export default class MetamaskController extends EventEmitter { }); }, ); - - this.controllerMessenger.subscribe( - `${this.snapController.name}:snapTerminated`, - (snapId) => { - const approvals = Object.values( - this.approvalController.state.pendingApprovals, - ).filter( - (approval) => - approval.origin === snapId && - approval.type === MESSAGE_TYPE.SNAP_CONFIRM, - ); - for (const approval of approvals) { - this.approvalController.reject( - approval.id, - new Error('Snap was terminated.'), - ); - } - }, - ); - ///: END:ONLY_INCLUDE_IN } @@ -1312,17 +1242,12 @@ export default class MetamaskController extends EventEmitter { }, version, // account mgmt - getAccounts: async ( - { origin }, - { suppressUnauthorizedError = true } = {}, - ) => { + getAccounts: async ({ origin }) => { if (origin === ORIGIN_METAMASK) { const selectedAddress = this.preferencesController.getSelectedAddress(); return selectedAddress ? [selectedAddress] : []; } else if (this.isUnlocked()) { - return await this.getPermittedAccounts(origin, { - suppressUnauthorizedError, - }); + return await this.getPermittedAccounts(origin); } return []; // changing this is a breaking change }, @@ -1803,9 +1728,7 @@ export default class MetamaskController extends EventEmitter { ), disableSnap: this.snapController.disableSnap.bind(this.snapController), enableSnap: this.snapController.enableSnap.bind(this.snapController), - removeSnap: this.snapController.removeSnap.bind(this.snapController), - dismissNotifications: this.dismissNotifications.bind(this), - markNotificationsAsRead: this.markNotificationsAsRead.bind(this), + removeSnap: this.removeSnap.bind(this), ///: END:ONLY_INCLUDE_IN // swaps @@ -1869,6 +1792,9 @@ export default class MetamaskController extends EventEmitter { fetchSmartTransactionFees: smartTransactionsController.getFees.bind( smartTransactionsController, ), + estimateSmartTransactionsGas: smartTransactionsController.estimateGas.bind( + smartTransactionsController, + ), submitSignedTransactions: smartTransactionsController.submitSignedTransactions.bind( smartTransactionsController, ), @@ -2090,7 +2016,7 @@ export default class MetamaskController extends EventEmitter { // This must be set as soon as possible to communicate to the // keyring's iframe and have the setting initialized properly - // Optimistically called to not block MetaMask login due to + // Optimistically called to not block Metamask login due to // Ledger Keyring GitHub downtime const transportPreference = this.preferencesController.getLedgerTransportPreference(); this.setLedgerTransportPreference(transportPreference); @@ -2262,7 +2188,7 @@ export default class MetamaskController extends EventEmitter { // This must be set as soon as possible to communicate to the // keyring's iframe and have the setting initialized properly - // Optimistically called to not block MetaMask login due to + // Optimistically called to not block Metamask login due to // Ledger Keyring GitHub downtime const transportPreference = this.preferencesController.getLedgerTransportPreference(); @@ -2611,24 +2537,17 @@ export default class MetamaskController extends EventEmitter { * array if no accounts are permitted. * * @param {string} origin - The origin whose exposed accounts to retrieve. - * @param {boolean} [suppressUnauthorizedError] - Suppresses the unauthorized error. * @returns {Promise} The origin's permitted accounts, or an empty * array. */ - async getPermittedAccounts( - origin, - { suppressUnauthorizedError = true } = {}, - ) { + async getPermittedAccounts(origin) { try { return await this.permissionController.executeRestrictedMethod( origin, RestrictedMethods.eth_accounts, ); } catch (error) { - if ( - suppressUnauthorizedError && - error.code === rpcErrorCodes.provider.unauthorized - ) { + if (error.code === rpcErrorCodes.provider.unauthorized) { return []; } throw error; @@ -3456,6 +3375,17 @@ export default class MetamaskController extends EventEmitter { } ///: BEGIN:ONLY_INCLUDE_IN(flask) + /** + * For snaps running in workers. + * + * @param snapId + * @param error + */ + onExecutionEnvironmentError(snapId, error) { + this.snapController.stopPlugin(snapId); + this.snapController.addSnapError(error); + } + /** * For snaps running in workers. * @@ -4220,4 +4150,23 @@ export default class MetamaskController extends EventEmitter { return this.keyringController.setLocked(); } + + ///: BEGIN:ONLY_INCLUDE_IN(flask) + // SNAPS + /** + * Removes the specified snap, and all of its associated permissions. + * If we didn't revoke the permission to access the snap from all subjects, + * they could just reinstall without any confirmation. + * + * TODO: This should be implemented in `SnapController.removeSnap` via a controller action. + * + * @param {{ id: string, permissionName: string }} snap - The wrapper object of the snap to remove. + */ + removeSnap(snap) { + this.snapController.removeSnap(snap.id); + this.permissionController.revokePermissionForAllSubjects( + snap.permissionName, + ); + } + ///: END:ONLY_INCLUDE_IN } diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index c0e1a08b9..8c9ecc489 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -18,8 +18,6 @@ import { addHexPrefix } from './lib/util'; const Ganache = require('../../test/e2e/ganache'); -const NOTIFICATION_ID = 'NHL8f2eSSTn9TKBamRLiU'; - const firstTimeState = { config: {}, NetworkController: { @@ -34,17 +32,6 @@ const firstTimeState = { }, }, }, - NotificationController: { - notifications: { - [NOTIFICATION_ID]: { - id: NOTIFICATION_ID, - origin: 'local:http://localhost:8086/', - createdDate: 1652967897732, - readDate: null, - message: 'Hello, http://localhost:8086!', - }, - }, - }, }; const ganacheServer = new Ganache(); @@ -1246,27 +1233,6 @@ describe('MetaMaskController', function () { assert.deepEqual(metamaskController.getState(), oldState); }); }); - - describe('markNotificationsAsRead', function () { - it('marks the notification as read', function () { - metamaskController.markNotificationsAsRead([NOTIFICATION_ID]); - const readNotification = metamaskController.getState().notifications[ - NOTIFICATION_ID - ]; - assert.notEqual(readNotification.readDate, null); - }); - }); - - describe('dismissNotifications', function () { - it('deletes the notification from state', function () { - metamaskController.dismissNotifications([NOTIFICATION_ID]); - const state = metamaskController.getState().notifications; - assert.ok( - !Object.values(state).includes(NOTIFICATION_ID), - 'Object should not include the deleted notification', - ); - }); - }); }); function deferredPromise() { diff --git a/app/scripts/migrations/072.js b/app/scripts/migrations/072.js deleted file mode 100644 index 4e5e8aebf..000000000 --- a/app/scripts/migrations/072.js +++ /dev/null @@ -1,30 +0,0 @@ -import { cloneDeep } from 'lodash'; - -const version = 72; - -/** - * Should empty the `knownMethodData` object in PreferencesController - */ -export default { - version, - async migrate(originalVersionedData) { - const versionedData = cloneDeep(originalVersionedData); - versionedData.meta.version = version; - const state = versionedData.data; - const newState = transformState(state); - versionedData.data = newState; - return versionedData; - }, -}; - -function transformState(state) { - const PreferencesController = state?.PreferencesController || {}; - - return { - ...state, - PreferencesController: { - ...PreferencesController, - knownMethodData: {}, - }, - }; -} diff --git a/app/scripts/migrations/072.test.js b/app/scripts/migrations/072.test.js deleted file mode 100644 index 70fedab84..000000000 --- a/app/scripts/migrations/072.test.js +++ /dev/null @@ -1,427 +0,0 @@ -import migration72 from './072'; - -describe('migration #72', () => { - it('should update the version metadata', async () => { - const oldStorage = { - meta: { - version: 71, - }, - data: {}, - }; - - const newStorage = await migration72.migrate(oldStorage); - expect(newStorage.meta).toStrictEqual({ - version: 72, - }); - }); - - it('should empty knownMethodData object in PreferencesController', async () => { - const oldStorage = { - meta: { - version: 71, - }, - data: { - PreferencesController: { - knownMethodData: { - '0x095ea7b3': { - name: 'Approve', - params: [ - { - type: 'address', - }, - { - type: 'uint256', - }, - ], - }, - '0x1249c58b': { - name: 'Mint', - params: [], - }, - '0x1688f0b9': { - name: 'Create Proxy With Nonce', - params: [ - { - type: 'address', - }, - { - type: 'bytes', - }, - { - type: 'uint256', - }, - ], - }, - '0x18cbafe5': { - name: 'Swap Exact Tokens For E T H', - params: [ - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'address[]', - }, - { - type: 'address', - }, - { - type: 'uint256', - }, - ], - }, - '0x23b872dd': { - name: 'Transfer From', - params: [ - { - type: 'address', - }, - { - type: 'address', - }, - { - type: 'uint256', - }, - ], - }, - '0x2e1a7d4d': { - name: 'Withdraw', - params: [ - { - type: 'uint256', - }, - ], - }, - '0x2e7ba6ef': { - name: 'Claim', - params: [ - { - type: 'uint256', - }, - { - type: 'address', - }, - { - type: 'uint256', - }, - { - type: 'bytes32[]', - }, - ], - }, - '0x2eb2c2d6': { - name: 'Safe Batch Transfer From', - params: [ - { - type: 'address', - }, - { - type: 'address', - }, - { - type: 'uint256[]', - }, - { - type: 'uint256[]', - }, - { - type: 'bytes', - }, - ], - }, - '0x3671f8cf': {}, - '0x41441d3b': { - name: 'Enter Staking', - params: [ - { - type: 'uint256', - }, - ], - }, - '0x441a3e70': { - name: 'Withdraw', - params: [ - { - type: 'uint256', - }, - { - type: 'uint256', - }, - ], - }, - '0x6f652e1a': { - name: 'Create Order', - params: [ - { - type: 'address', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - ], - }, - '0x8dbdbe6d': { - name: 'Deposit', - params: [ - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'address', - }, - ], - }, - '0x8ed955b9': { - name: 'Harvest All', - params: [], - }, - '0xa22cb465': { - name: 'Set Approval For All', - params: [ - { - type: 'address', - }, - { - type: 'bool', - }, - ], - }, - '0xa9059cbb': { - name: 'Transfer', - params: [ - { - type: 'address', - }, - { - type: 'uint256', - }, - ], - }, - '0xab834bab': { - name: 'Atomic Match_', - params: [ - { - type: 'address[14]', - }, - { - type: 'uint256[18]', - }, - { - type: 'uint8[8]', - }, - { - type: 'bytes', - }, - { - type: 'bytes', - }, - { - type: 'bytes', - }, - { - type: 'bytes', - }, - { - type: 'bytes', - }, - { - type: 'bytes', - }, - { - type: 'uint8[2]', - }, - { - type: 'bytes32[5]', - }, - ], - }, - '0xd0e30db0': { - name: 'Deposit', - params: [], - }, - '0xddd81f82': { - name: 'Register Proxy', - params: [], - }, - '0xded9382a': { - name: 'Remove Liquidity E T H With Permit', - params: [ - { - type: 'address', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'address', - }, - { - type: 'uint256', - }, - { - type: 'bool', - }, - { - type: 'uint8', - }, - { - type: 'bytes32', - }, - { - type: 'bytes32', - }, - ], - }, - '0xe2bbb158': { - name: 'Deposit', - params: [ - { - type: 'uint256', - }, - { - type: 'uint256', - }, - ], - }, - '0xf305d719': { - name: 'Add Liquidity E T H', - params: [ - { - type: 'address', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'uint256', - }, - { - type: 'address', - }, - { - type: 'uint256', - }, - ], - }, - }, - }, - }, - }; - - const newStorage = await migration72.migrate(oldStorage); - expect(newStorage).toStrictEqual({ - meta: { - version: 72, - }, - data: { - PreferencesController: { - knownMethodData: {}, - }, - }, - }); - }); - - it('should preserve other PreferencesController state', async () => { - const oldStorage = { - meta: { - version: 71, - }, - data: { - PreferencesController: { - currentLocale: 'en', - dismissSeedBackUpReminder: false, - ipfsGateway: 'dweb.link', - knownMethodData: { - '0xd0e30db0': { - name: 'Deposit', - params: [], - }, - '0xddd81f82': { - name: 'Register Proxy', - params: [], - }, - }, - openSeaEnabled: false, - useTokenDetection: false, - }, - }, - }; - - const newStorage = await migration72.migrate(oldStorage); - expect(newStorage).toStrictEqual({ - meta: { - version: 72, - }, - data: { - PreferencesController: { - currentLocale: 'en', - dismissSeedBackUpReminder: false, - ipfsGateway: 'dweb.link', - knownMethodData: {}, - openSeaEnabled: false, - useTokenDetection: false, - }, - }, - }); - }); - - it('should not change state in controllers other than PreferencesController', async () => { - const oldStorage = { - meta: { - version: 71, - }, - data: { - PreferencesController: { - knownMethodData: { - '0xd0e30db0': { - name: 'Deposit', - params: [], - }, - '0xddd81f82': { - name: 'Register Proxy', - params: [], - }, - }, - }, - data: { - FooController: { a: 'b' }, - }, - }, - }; - - const newStorage = await migration72.migrate(oldStorage); - expect(newStorage).toStrictEqual({ - meta: { - version: 72, - }, - data: { - PreferencesController: { - knownMethodData: {}, - }, - data: { - FooController: { a: 'b' }, - }, - }, - }); - }); -}); diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js index b2a52040d..321b91319 100644 --- a/app/scripts/migrations/index.js +++ b/app/scripts/migrations/index.js @@ -75,7 +75,6 @@ import m068 from './068'; import m069 from './069'; import m070 from './070'; import m071 from './071'; -import m072 from './072'; const migrations = [ m002, @@ -148,7 +147,6 @@ const migrations = [ m069, m070, m071, - m072, ]; export default migrations; diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 8f1d49600..dc06d17a9 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -90,17 +90,13 @@ export default class ExtensionPlatform { if (versionParts.length < 4) { throw new Error(`Version missing build number: '${version}'`); } - // On Chrome, a more descriptive representation of the version is stored in the - // `version_name` field for display purposes. We use this field instead of the `version` - // field on Chrome for non-main builds (i.e. Flask, Beta) because we want to show the - // version in the SemVer-compliant format "v[major].[minor].[patch]-[build-type].[build-number]", - // yet Chrome does not allow letters in the `version` field. + // On Chrome, a more descriptive representation of the version is stored + // in the `version_name` field for display purposes. return versionName; - // A fourth version part is sometimes present for "rollback" Chrome builds - } else if (![3, 4].includes(versionParts.length)) { + } else if (versionParts.length !== 3) { throw new Error(`Invalid version: ${version}`); } else if (versionParts[2].match(/[^\d]/u)) { - // On Firefox, the build type and build version are in the third part of the version. + // On Firefox, the build type and build version are in the fourth part of the version. const [major, minor, patchAndPrerelease] = versionParts; const matches = patchAndPrerelease.match(/^(\d+)([A-Za-z]+)(\d)+$/u); if (matches === null) { @@ -110,7 +106,7 @@ export default class ExtensionPlatform { return `${major}.${minor}.${patch}-${buildType}.${buildVersion}`; } - // If there is no `version_name` and there are only 3 or 4 version parts, then this is not a + // If there is no `version_name` and there are only 3 version parts, then this is not a // prerelease and the version requires no modification. return version; } diff --git a/app/scripts/platforms/extension.test.js b/app/scripts/platforms/extension.test.js index 1b2067d78..de8b05cdd 100644 --- a/app/scripts/platforms/extension.test.js +++ b/app/scripts/platforms/extension.test.js @@ -25,15 +25,6 @@ describe('extension platform', () => { expect(version).toBe('1.2.3'); }); - it('should return rollback version', () => { - browser.runtime.getManifest.mockReturnValue({ version: '1.2.3.1' }); - const extensionPlatform = new ExtensionPlatform(); - - const version = extensionPlatform.getVersion(); - - expect(version).toBe('1.2.3.1'); - }); - it('should return SemVer-formatted version for Chrome style manifest of prerelease', () => { browser.runtime.getManifest.mockReturnValue({ version: '1.2.3.0', @@ -69,6 +60,24 @@ describe('extension platform', () => { ); }); + it('should throw error if version name is missing from Chrome style prerelease manifest', () => { + browser.runtime.getManifest.mockReturnValue({ + version: '1.2.3.0', + }); + const extensionPlatform = new ExtensionPlatform(); + + expect(() => extensionPlatform.getVersion()).toThrow('Invalid version:'); + }); + + it('should throw error if version includes four parts in a Firefox style manifest', () => { + browser.runtime.getManifest.mockReturnValue({ + version: '1.2.3.4', + }); + const extensionPlatform = new ExtensionPlatform(); + + expect(() => extensionPlatform.getVersion()).toThrow('Invalid version:'); + }); + it('should throw error if build version is missing from Firefox style prerelease manifest', () => { browser.runtime.getManifest.mockReturnValue({ version: '1.2.3beta', diff --git a/app/scripts/ui.js b/app/scripts/ui.js index 93f06143d..1c4a3fc1c 100644 --- a/app/scripts/ui.js +++ b/app/scripts/ui.js @@ -16,9 +16,6 @@ import { ENVIRONMENT_TYPE_FULLSCREEN, ENVIRONMENT_TYPE_POPUP, } from '../../shared/constants/app'; -import { isManifestV3 } from '../../shared/modules/mv3.utils'; -import { SUPPORT_LINK } from '../../ui/helpers/constants/common'; -import { getErrorHtml } from '../../ui/helpers/utils/error-utils'; import ExtensionPlatform from './platforms/extension'; import { setupMultiplex } from './lib/stream-utils'; import { getEnvironmentType } from './lib/util'; @@ -27,21 +24,6 @@ import metaRPCClientFactory from './lib/metaRPCClientFactory'; start().catch(log.error); async function start() { - async function displayCriticalError(container, err, metamaskState) { - const html = await getErrorHtml(SUPPORT_LINK, metamaskState); - - container.innerHTML = html; - - const button = document.getElementById('critical-error-button'); - - button.addEventListener('click', (_) => { - browser.runtime.reload(); - }); - - log.error(err.stack); - throw err; - } - // create platform global global.platform = new ExtensionPlatform(); @@ -50,31 +32,24 @@ async function start() { // setup stream to background const extensionPort = browser.runtime.connect({ name: windowType }); - const connectionStream = new PortStream(extensionPort); const activeTab = await queryCurrentActiveTab(windowType); + initializeUiWithTab(activeTab); - /** - * In case of MV3 the issue of blank screen was very frequent, it is caused by UI initialising before background is ready to send state. - * Code below ensures that UI is rendered only after background is ready. - */ - if (isManifestV3()) { - extensionPort.onMessage.addListener((message) => { - if (message?.name === 'CONNECTION_READY') { - initializeUiWithTab(activeTab); - } - }); - } else { - initializeUiWithTab(activeTab); + function displayCriticalError(container, err) { + container.innerHTML = + '
The MetaMask app failed to load: please open and close MetaMask again to restart.
'; + container.style.height = '80px'; + log.error(err.stack); + throw err; } function initializeUiWithTab(tab) { const container = document.getElementById('app-content'); initializeUi(tab, container, connectionStream, (err, store) => { if (err) { - // if there's an error, store will be = metamaskState - displayCriticalError(container, err, store); + displayCriticalError(container, err); return; } @@ -115,7 +90,7 @@ async function queryCurrentActiveTab(windowType) { function initializeUi(activeTab, container, connectionStream, cb) { connectToAccountManager(connectionStream, (err, backgroundConnection) => { if (err) { - cb(err, null); + cb(err); return; } diff --git a/development/build/manifest.js b/development/build/manifest.js index 0b35f125c..498ab2785 100644 --- a/development/build/manifest.js +++ b/development/build/manifest.js @@ -2,9 +2,7 @@ const { promises: fs } = require('fs'); const path = require('path'); const { mergeWith, cloneDeep } = require('lodash'); -const baseManifest = process.env.ENABLE_MV3 - ? require('../../app/manifest/v3/_base.json') - : require('../../app/manifest/v2/_base.json'); +const baseManifest = require('../../app/manifest/_base.json'); const { BuildType } = require('../lib/build-type'); const { createTask, composeSeries } = require('./task'); @@ -26,7 +24,7 @@ function createManifestTasks({ '..', '..', 'app', - process.env.ENABLE_MV3 ? 'manifest/v3' : 'manifest/v2', + 'manifest', `${platform}.json`, ), ); diff --git a/development/build/scripts.js b/development/build/scripts.js index 044551399..d08a9f490 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -365,50 +365,6 @@ function createScriptTasks({ } } -// Function generates app-init.js for browsers chrome, brave and opera. -// It dynamically injects list of files generated in the build. -async function bundleMV3AppInitialiser({ - jsBundles, - browserPlatforms, - buildType, - devMode, - ignoredFiles, - testing, - policyOnly, - shouldLintFenceFiles, -}) { - const label = 'app-init'; - // TODO: remove this filter for firefox once MV3 is supported in it - const mv3BrowserPlatforms = browserPlatforms.filter( - (platform) => platform !== 'firefox', - ); - const fileList = jsBundles.reduce( - (result, file) => `${result}'${file}',\n `, - '', - ); - - await createNormalBundle({ - browserPlatforms: mv3BrowserPlatforms, - buildType, - destFilepath: 'app-init.js', - devMode, - entryFilepath: './app/scripts/app-init.js', - ignoredFiles, - label, - testing, - policyOnly, - shouldLintFenceFiles, - })(); - - mv3BrowserPlatforms.forEach((browser) => { - const appInitFile = `./dist/${browser}/app-init.js`; - const fileContent = readFileSync('./app/scripts/app-init.js', 'utf8'); - const fileOutput = fileContent.replace('/** FILE NAMES */', fileList); - writeFileSync(appInitFile, fileOutput); - }); - console.log(`Bundle end: service worker app-init.js`); -} - function createFactoredBuild({ applyLavaMoat, browserPlatforms, @@ -521,7 +477,7 @@ function createFactoredBuild({ }); // wait for bundle completion for postprocessing - events.on('bundleDone', async () => { + events.on('bundleDone', () => { // Skip HTML generation if nothing is to be written to disk if (policyOnly) { return; @@ -567,22 +523,6 @@ function createFactoredBuild({ browserPlatforms, applyLavaMoat, }); - if (process.env.ENABLE_MV3) { - const jsBundles = [ - ...commonSet.values(), - ...groupSet.values(), - ].map((label) => `./${label}.js`); - await bundleMV3AppInitialiser({ - jsBundles, - browserPlatforms, - buildType, - devMode, - ignoredFiles, - testing, - policyOnly, - shouldLintFenceFiles, - }); - } break; } case 'content-script': { diff --git a/development/jest.config.js b/development/jest.config.js index fe594713e..e4218c21f 100644 --- a/development/jest.config.js +++ b/development/jest.config.js @@ -2,7 +2,7 @@ module.exports = { displayName: '/development', collectCoverageFrom: ['/**/*.js'], coverageDirectory: '../jest-coverage/development/', - coverageReporters: ['html', 'text-summary', 'json-summary'], + coverageReporters: ['html', 'text-summary'], coverageThreshold: { './development/build/transforms/**/*.js': { branches: 100, diff --git a/docs/trezor-emulator.md b/docs/trezor-emulator.md index fd459b92b..bd77bb808 100644 --- a/docs/trezor-emulator.md +++ b/docs/trezor-emulator.md @@ -1,6 +1,6 @@ # Using the TREZOR simulator -You can install the TREZOR emulator and use it with MetaMask. +You can install the TREZOR emulator and use it with Metamask. Here is how: ## 1 - Install the TREZOR Bridge diff --git a/jest.config.js b/jest.config.js index 38a48471f..e366a29fd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,13 +6,13 @@ module.exports = { ], coverageDirectory: './jest-coverage/main', coveragePathIgnorePatterns: ['.stories.js', '.snap'], - coverageReporters: ['html', 'text-summary', 'json-summary'], + coverageReporters: ['html', 'text-summary'], coverageThreshold: { global: { - branches: 44, - functions: 42, - lines: 52, - statements: 52, + branches: 35, + functions: 37, + lines: 43, + statements: 43, }, './app/scripts/controllers/permissions/**/*.js': { branches: 100, diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 1d70e3142..a61594b19 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -921,7 +921,7 @@ "3box>ipfs>async": true, "3box>ipfs>bs58": true, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": true, - "eth-trezor-keyring>hdkey>secp256k1": true + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": true } }, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": { @@ -939,6 +939,15 @@ "ethers>@ethersproject/keccak256>js-sha3": true } }, + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>ipfs>libp2p-crypto>multihashing-async": { "globals": { "crypto": true, @@ -2064,8 +2073,8 @@ "3box>ipfs>libp2p-crypto": true, "3box>orbit-db>orbit-db-cache>level-js": true, "3box>orbit-db>orbit-db-keystore>levelup": true, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": true, "3box>orbit-db>orbit-db-keystore>lru": true, - "eth-trezor-keyring>hdkey>secp256k1": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -2110,6 +2119,16 @@ "pumpify>inherits": true } }, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>orbit-db>orbit-db-keystore>lru": { "packages": { "browserify>events": true, @@ -2202,7 +2221,7 @@ }, "@babel/runtime": { "packages": { - "@storybook/api>regenerator-runtime": true + "addons-linter>regenerator-runtime": true } }, "@download/blockies": { @@ -2378,16 +2397,11 @@ }, "@keystonehq/bc-ur-registry-eth>hdkey": { "packages": { - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>safe-buffer": true - } - }, - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": { - "packages": { - "3box>ethers>elliptic": true + "ethereumjs-wallet>safe-buffer": true, + "ganache>secp256k1": true } }, "@keystonehq/metamask-airgapped-keyring": { @@ -2928,13 +2942,12 @@ }, "@metamask/controllers>web3-provider-engine>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/controllers>web3-provider-engine>ethereumjs-util>ethjs-util": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -2946,6 +2959,23 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "@metamask/controllers>web3-provider-engine>semaphore": { "globals": { "define": true, @@ -2984,13 +3014,12 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": true, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": true, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -3002,12 +3031,29 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "eth-trezor-keyring>hdkey>coinstring": true, - "eth-trezor-keyring>hdkey>secp256k1": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -3104,6 +3150,11 @@ "URL": true } }, + "@metamask/iframe-execution-environment-service>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, "@metamask/jazzicon": { "globals": { "document.createElement": true, @@ -3219,77 +3270,179 @@ "packages": { "@metamask/controllers": true, "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers": true, "eth-rpc-errors": true } }, "@metamask/rpc-methods>@metamask/key-tree": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, - "browserify>buffer": true + "@metamask/rpc-methods>@metamask/key-tree>bip39": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>ethereum-cryptography>keccak": true, + "ganache>secp256k1": true + } + }, + "@metamask/rpc-methods>@metamask/key-tree>bip39": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>pbkdf2": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>randombytes": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": { + "@metamask/smart-transactions-controller": { "globals": { - "crypto": true + "URLSearchParams": true, + "clearInterval": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, + "setTimeout": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/smart-transactions-controller>@metamask/controllers": true, + "@metamask/smart-transactions-controller>bignumber.js": true, + "@metamask/smart-transactions-controller>fast-json-patch": true, + "ethers": true, + "lodash": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": { + "@metamask/smart-transactions-controller>@metamask/controllers": { "globals": { - "TextEncoder": true, - "crypto": true, + "Headers": true, + "URL": true, + "clearInterval": true, + "clearTimeout": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, "setTimeout": true + }, + "packages": { + "@ethereumjs/common": true, + "@ethereumjs/tx": true, + "@metamask/contract-metadata": true, + "@metamask/controllers>abort-controller": true, + "@metamask/controllers>async-mutex": true, + "@metamask/controllers>eth-phishing-detect": true, + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/controllers>multiformats": true, + "@metamask/controllers>web3-provider-engine": true, + "@metamask/metamask-eth-abis": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": true, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": true, + "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": true, + "@storybook/api>fast-deep-equal": true, + "browserify>buffer": true, + "browserify>events": true, + "deep-freeze-strict": true, + "eth-ens-namehash": true, + "eth-json-rpc-infura": true, + "eth-keyring-controller": true, + "eth-query": true, + "eth-rpc-errors": true, + "eth-sig-util": true, + "ethereumjs-util": true, + "ethers": true, + "ethjs>ethjs-unit": true, + "immer": true, + "json-rpc-engine": true, + "jsonschema": true, + "punycode": true, + "single-call-balance-checker-abi": true, + "uuid": true, + "web3": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": { "globals": { - "crypto": true + "clearInterval": true, + "setInterval": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-provider-http": true, + "ethjs>ethjs-unit": true, + "ethjs>ethjs-util": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": { - "globals": { - "TextDecoder": true, - "TextEncoder": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "ethjs-query>babel-runtime": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-util": true, + "promise-to-callback": true } }, - "@metamask/rpc-methods>@metamask/utils": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": { "packages": { - "@storybook/api>fast-deep-equal": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/smart-transactions-controller": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": { "globals": { - "URLSearchParams": true, - "clearInterval": true, - "console.error": true, - "console.log": true, - "fetch": true, - "setInterval": true + "console": true }, "packages": { - "@metamask/controllers": true, - "@metamask/controllers>isomorphic-fetch": true, - "@metamask/smart-transactions-controller>bignumber.js": true, - "@metamask/smart-transactions-controller>fast-json-patch": true, - "ethers": true, - "lodash": true + "ethjs-query>babel-runtime": true, + "ethjs-query>ethjs-format": true, + "ethjs-query>ethjs-rpc": true, + "promise-to-callback": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": { + "packages": { + "browserify>process": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethers>@ethersproject/json-wallets>scrypt-js": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": { + "globals": { + "crypto": true, + "msCrypto": true } }, "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": { @@ -3320,9 +3473,6 @@ "console.info": true, "console.log": true, "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true, - "document.getElementById": true, "fetch": true, "setTimeout": true }, @@ -3330,7 +3480,6 @@ "@metamask/controllers": true, "@metamask/post-message-stream": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers>@metamask/execution-environments": true, "@metamask/snap-controllers>@metamask/obs-store": true, "@metamask/snap-controllers>ajv": true, @@ -3538,7 +3687,7 @@ "@ngraveio/bc-ur>bignumber.js": true, "@ngraveio/bc-ur>crc": true, "@ngraveio/bc-ur>jsbi": true, - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>assert": true, "browserify>buffer": true, "pubnub>cbor-sync": true @@ -3560,6 +3709,12 @@ "define": true } }, + "@ngraveio/bc-ur>sha.js": { + "packages": { + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@popperjs/core": { "globals": { "Element": true, @@ -3670,11 +3825,6 @@ "localforage": true } }, - "@storybook/api>regenerator-runtime": { - "globals": { - "regeneratorRuntime": "write" - } - }, "@storybook/api>util-deprecate": { "globals": { "console.trace": true, @@ -3994,10 +4144,9 @@ "setTimeout": true } }, - "addons-linter>sha.js": { - "packages": { - "ethereumjs-wallet>safe-buffer": true, - "pumpify>inherits": true + "addons-linter>regenerator-runtime": { + "globals": { + "regeneratorRuntime": "write" } }, "analytics-node": { @@ -4188,7 +4337,7 @@ }, "browserify>crypto-browserify>create-hmac": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4213,13 +4362,10 @@ "browserify>crypto-browserify>pbkdf2": { "globals": { "crypto": true, - "process": true, - "queueMicrotask": true, - "setImmediate": true, - "setTimeout": true + "process": true }, "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>process": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4349,7 +4495,12 @@ }, "browserify>string_decoder": { "packages": { - "ethereumjs-wallet>safe-buffer": true + "browserify>string_decoder>safe-buffer": true + } + }, + "browserify>string_decoder>safe-buffer": { + "packages": { + "browserify>buffer": true } }, "browserify>timers-browserify": { @@ -4649,13 +4800,12 @@ }, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4667,41 +4817,84 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "eth-keyring-controller": { "packages": { "browserify>buffer": true, "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, + "eth-keyring-controller>bip39": true, "eth-keyring-controller>browser-passworder": true, + "eth-keyring-controller>eth-hd-keyring": true, "eth-keyring-controller>eth-simple-keyring": true, "eth-keyring-controller>obs-store": true, - "eth-sig-util": true + "eth-sig-util": true, + "ethereumjs-util": true, + "loglevel": true } }, - "eth-keyring-controller>@metamask/bip39": { + "eth-keyring-controller>bip39": { + "globals": { + "console.log": true + }, "packages": { - "browserify>buffer": true, "browserify>crypto-browserify>pbkdf2": true, + "eth-keyring-controller>bip39>unorm": true, "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-keyring-controller>bip39>unorm": { + "globals": { + "define": true + } + }, + "eth-keyring-controller>browser-passworder": { + "globals": { + "btoa": true, + "crypto": true + }, + "packages": { + "eth-keyring-controller>browser-passworder>browserify-unibabel": true + } + }, + "eth-keyring-controller>browser-passworder>browserify-unibabel": { + "globals": { + "atob": true, + "btoa": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { + "eth-keyring-controller>eth-hd-keyring": { "packages": { "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, + "eth-keyring-controller>bip39": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": true, "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true + "eth-sig-util": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": { "packages": { "@truffle/codec>utf8": true, "browserify>buffer": true, "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": true, "ethereumjs-util": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-wallet>aes-js": true, @@ -4710,27 +4903,12 @@ "ethers>@ethersproject/json-wallets>scrypt-js": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": { "globals": { "crypto": true, "msCrypto": true } }, - "eth-keyring-controller>browser-passworder": { - "globals": { - "btoa": true, - "crypto": true - }, - "packages": { - "eth-keyring-controller>browser-passworder>browserify-unibabel": true - } - }, - "eth-keyring-controller>browser-passworder>browserify-unibabel": { - "globals": { - "atob": true, - "btoa": true - } - }, "eth-keyring-controller>eth-simple-keyring": { "packages": { "browserify>buffer": true, @@ -4786,8 +4964,8 @@ "eth-lattice-keyring>bn.js": true, "eth-lattice-keyring>gridplus-sdk": true, "eth-lattice-keyring>rlp": true, - "eth-lattice-keyring>secp256k1": true, - "ethereumjs-util": true + "ethereumjs-util": true, + "ganache>secp256k1": true } }, "eth-lattice-keyring>bn.js": { @@ -4816,11 +4994,11 @@ "eth-lattice-keyring>gridplus-sdk>borc": true, "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, - "eth-lattice-keyring>gridplus-sdk>secp256k1": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, "ethers>@ethersproject/keccak256>js-sha3": true, "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true, "lodash": true, "pubnub>superagent": true } @@ -4885,21 +5063,11 @@ "TextEncoder": true } }, - "eth-lattice-keyring>gridplus-sdk>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-lattice-keyring>rlp": { "globals": { "TextEncoder": true } }, - "eth-lattice-keyring>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-method-registry": { "packages": { "ethjs": true @@ -4927,13 +5095,12 @@ }, "eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>ethereumjs-util>keccak": true, + "eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4945,6 +5112,34 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": { + "packages": { + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true + } + }, "eth-trezor-keyring": { "globals": { "setTimeout": true @@ -5008,23 +5203,11 @@ "3box>ethers>elliptic": true, "bn.js": true, "browserify>insert-module-globals>is-buffer": true, - "eth-trezor-keyring>hdkey>secp256k1>bip66": true, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, - "eth-trezor-keyring>hdkey>secp256k1>bip66": { - "packages": { - "ethereumjs-wallet>safe-buffer": true - } - }, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true - } - }, "eth-trezor-keyring>trezor-connect": { "globals": { "__TREZOR_CONNECT_SRC": true, @@ -5101,7 +5284,7 @@ }, "ethereumjs-util>create-hash": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>md5.js": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -5125,22 +5308,11 @@ }, "ethereumjs-util>create-hash>md5.js>hash-base": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": true, + "browserify>stream-browserify": true, "ethereumjs-wallet>safe-buffer": true, "pumpify>inherits": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": { - "packages": { - "@storybook/api>util-deprecate": true, - "browserify>browser-resolve": true, - "browserify>buffer": true, - "browserify>events": true, - "browserify>process": true, - "browserify>string_decoder": true, - "pumpify>inherits": true - } - }, "ethereumjs-util>create-hash>ripemd160": { "packages": { "browserify>buffer": true, @@ -5154,17 +5326,19 @@ "browserify>buffer": true, "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, "ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>randombytes": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true } }, "ethereumjs-util>ethereum-cryptography>blakejs": { "globals": { - "TextEncoder": true, "console.log": true + }, + "packages": { + "browserify>buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -5199,11 +5373,6 @@ "pumpify>inherits": true } }, - "ethereumjs-util>ethereum-cryptography>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -5778,7 +5947,7 @@ "ethjs-query>babel-runtime": { "packages": { "@babel/runtime": true, - "@storybook/api>regenerator-runtime": true, + "addons-linter>regenerator-runtime": true, "ethjs-query>babel-runtime>core-js": true } }, @@ -5881,6 +6050,11 @@ "define": true } }, + "ganache>secp256k1": { + "packages": { + "3box>ethers>elliptic": true + } + }, "globalthis>define-properties": { "packages": { "nock>deep-equal>object-keys": true diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 1d70e3142..106f8c3bf 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -921,7 +921,7 @@ "3box>ipfs>async": true, "3box>ipfs>bs58": true, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": true, - "eth-trezor-keyring>hdkey>secp256k1": true + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": true } }, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": { @@ -939,6 +939,15 @@ "ethers>@ethersproject/keccak256>js-sha3": true } }, + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>ipfs>libp2p-crypto>multihashing-async": { "globals": { "crypto": true, @@ -2064,8 +2073,8 @@ "3box>ipfs>libp2p-crypto": true, "3box>orbit-db>orbit-db-cache>level-js": true, "3box>orbit-db>orbit-db-keystore>levelup": true, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": true, "3box>orbit-db>orbit-db-keystore>lru": true, - "eth-trezor-keyring>hdkey>secp256k1": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -2110,6 +2119,16 @@ "pumpify>inherits": true } }, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>orbit-db>orbit-db-keystore>lru": { "packages": { "browserify>events": true, @@ -2202,7 +2221,7 @@ }, "@babel/runtime": { "packages": { - "@storybook/api>regenerator-runtime": true + "addons-linter>regenerator-runtime": true } }, "@download/blockies": { @@ -2378,16 +2397,11 @@ }, "@keystonehq/bc-ur-registry-eth>hdkey": { "packages": { - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>safe-buffer": true - } - }, - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": { - "packages": { - "3box>ethers>elliptic": true + "ethereumjs-wallet>safe-buffer": true, + "ganache>secp256k1": true } }, "@keystonehq/metamask-airgapped-keyring": { @@ -2928,13 +2942,12 @@ }, "@metamask/controllers>web3-provider-engine>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/controllers>web3-provider-engine>ethereumjs-util>ethjs-util": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -2946,6 +2959,23 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "@metamask/controllers>web3-provider-engine>semaphore": { "globals": { "define": true, @@ -2984,13 +3014,12 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": true, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": true, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -3002,12 +3031,29 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "eth-trezor-keyring>hdkey>coinstring": true, - "eth-trezor-keyring>hdkey>secp256k1": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -3104,6 +3150,38 @@ "URL": true } }, + "@metamask/iframe-execution-environment-service": { + "globals": { + "clearTimeout": true, + "document.body.appendChild": true, + "document.createElement": true, + "document.getElementById": true, + "setTimeout": true + }, + "packages": { + "@metamask/iframe-execution-environment-service>json-rpc-middleware-stream": true, + "@metamask/iframe-execution-environment-service>nanoid": true, + "@metamask/post-message-stream": true, + "@metamask/snap-controllers": true, + "@metamask/snap-controllers>@metamask/execution-environments": true, + "json-rpc-engine": true, + "pump": true + } + }, + "@metamask/iframe-execution-environment-service>json-rpc-middleware-stream": { + "globals": { + "setTimeout": true + }, + "packages": { + "json-rpc-engine>@metamask/safe-event-emitter": true, + "readable-stream": true + } + }, + "@metamask/iframe-execution-environment-service>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, "@metamask/jazzicon": { "globals": { "document.createElement": true, @@ -3219,77 +3297,179 @@ "packages": { "@metamask/controllers": true, "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers": true, "eth-rpc-errors": true } }, "@metamask/rpc-methods>@metamask/key-tree": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, - "browserify>buffer": true + "@metamask/rpc-methods>@metamask/key-tree>bip39": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>ethereum-cryptography>keccak": true, + "ganache>secp256k1": true + } + }, + "@metamask/rpc-methods>@metamask/key-tree>bip39": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>pbkdf2": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>randombytes": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": { + "@metamask/smart-transactions-controller": { "globals": { - "crypto": true + "URLSearchParams": true, + "clearInterval": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, + "setTimeout": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/smart-transactions-controller>@metamask/controllers": true, + "@metamask/smart-transactions-controller>bignumber.js": true, + "@metamask/smart-transactions-controller>fast-json-patch": true, + "ethers": true, + "lodash": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": { + "@metamask/smart-transactions-controller>@metamask/controllers": { "globals": { - "TextEncoder": true, - "crypto": true, + "Headers": true, + "URL": true, + "clearInterval": true, + "clearTimeout": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, "setTimeout": true + }, + "packages": { + "@ethereumjs/common": true, + "@ethereumjs/tx": true, + "@metamask/contract-metadata": true, + "@metamask/controllers>abort-controller": true, + "@metamask/controllers>async-mutex": true, + "@metamask/controllers>eth-phishing-detect": true, + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/controllers>multiformats": true, + "@metamask/controllers>web3-provider-engine": true, + "@metamask/metamask-eth-abis": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": true, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": true, + "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": true, + "@storybook/api>fast-deep-equal": true, + "browserify>buffer": true, + "browserify>events": true, + "deep-freeze-strict": true, + "eth-ens-namehash": true, + "eth-json-rpc-infura": true, + "eth-keyring-controller": true, + "eth-query": true, + "eth-rpc-errors": true, + "eth-sig-util": true, + "ethereumjs-util": true, + "ethers": true, + "ethjs>ethjs-unit": true, + "immer": true, + "json-rpc-engine": true, + "jsonschema": true, + "punycode": true, + "single-call-balance-checker-abi": true, + "uuid": true, + "web3": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": { "globals": { - "crypto": true + "clearInterval": true, + "setInterval": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-provider-http": true, + "ethjs>ethjs-unit": true, + "ethjs>ethjs-util": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": { - "globals": { - "TextDecoder": true, - "TextEncoder": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "ethjs-query>babel-runtime": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-util": true, + "promise-to-callback": true } }, - "@metamask/rpc-methods>@metamask/utils": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": { "packages": { - "@storybook/api>fast-deep-equal": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/smart-transactions-controller": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": { "globals": { - "URLSearchParams": true, - "clearInterval": true, - "console.error": true, - "console.log": true, - "fetch": true, - "setInterval": true + "console": true }, "packages": { - "@metamask/controllers": true, - "@metamask/controllers>isomorphic-fetch": true, - "@metamask/smart-transactions-controller>bignumber.js": true, - "@metamask/smart-transactions-controller>fast-json-patch": true, - "ethers": true, - "lodash": true + "ethjs-query>babel-runtime": true, + "ethjs-query>ethjs-format": true, + "ethjs-query>ethjs-rpc": true, + "promise-to-callback": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": { + "packages": { + "browserify>process": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethers>@ethersproject/json-wallets>scrypt-js": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": { + "globals": { + "crypto": true, + "msCrypto": true } }, "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": { @@ -3320,9 +3500,6 @@ "console.info": true, "console.log": true, "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true, - "document.getElementById": true, "fetch": true, "setTimeout": true }, @@ -3330,7 +3507,6 @@ "@metamask/controllers": true, "@metamask/post-message-stream": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers>@metamask/execution-environments": true, "@metamask/snap-controllers>@metamask/obs-store": true, "@metamask/snap-controllers>ajv": true, @@ -3538,7 +3714,7 @@ "@ngraveio/bc-ur>bignumber.js": true, "@ngraveio/bc-ur>crc": true, "@ngraveio/bc-ur>jsbi": true, - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>assert": true, "browserify>buffer": true, "pubnub>cbor-sync": true @@ -3560,6 +3736,12 @@ "define": true } }, + "@ngraveio/bc-ur>sha.js": { + "packages": { + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@popperjs/core": { "globals": { "Element": true, @@ -3670,11 +3852,6 @@ "localforage": true } }, - "@storybook/api>regenerator-runtime": { - "globals": { - "regeneratorRuntime": "write" - } - }, "@storybook/api>util-deprecate": { "globals": { "console.trace": true, @@ -3994,10 +4171,9 @@ "setTimeout": true } }, - "addons-linter>sha.js": { - "packages": { - "ethereumjs-wallet>safe-buffer": true, - "pumpify>inherits": true + "addons-linter>regenerator-runtime": { + "globals": { + "regeneratorRuntime": "write" } }, "analytics-node": { @@ -4188,7 +4364,7 @@ }, "browserify>crypto-browserify>create-hmac": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4213,13 +4389,10 @@ "browserify>crypto-browserify>pbkdf2": { "globals": { "crypto": true, - "process": true, - "queueMicrotask": true, - "setImmediate": true, - "setTimeout": true + "process": true }, "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>process": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4349,7 +4522,12 @@ }, "browserify>string_decoder": { "packages": { - "ethereumjs-wallet>safe-buffer": true + "browserify>string_decoder>safe-buffer": true + } + }, + "browserify>string_decoder>safe-buffer": { + "packages": { + "browserify>buffer": true } }, "browserify>timers-browserify": { @@ -4649,13 +4827,12 @@ }, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4667,41 +4844,84 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "eth-keyring-controller": { "packages": { "browserify>buffer": true, "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, + "eth-keyring-controller>bip39": true, "eth-keyring-controller>browser-passworder": true, + "eth-keyring-controller>eth-hd-keyring": true, "eth-keyring-controller>eth-simple-keyring": true, "eth-keyring-controller>obs-store": true, - "eth-sig-util": true + "eth-sig-util": true, + "ethereumjs-util": true, + "loglevel": true } }, - "eth-keyring-controller>@metamask/bip39": { + "eth-keyring-controller>bip39": { + "globals": { + "console.log": true + }, "packages": { - "browserify>buffer": true, "browserify>crypto-browserify>pbkdf2": true, + "eth-keyring-controller>bip39>unorm": true, "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { + "eth-keyring-controller>bip39>unorm": { + "globals": { + "define": true + } + }, + "eth-keyring-controller>browser-passworder": { + "globals": { + "btoa": true, + "crypto": true + }, + "packages": { + "eth-keyring-controller>browser-passworder>browserify-unibabel": true + } + }, + "eth-keyring-controller>browser-passworder>browserify-unibabel": { + "globals": { + "atob": true, + "btoa": true + } + }, + "eth-keyring-controller>eth-hd-keyring": { "packages": { "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, + "eth-keyring-controller>bip39": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": true, "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true + "eth-sig-util": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": { "packages": { "@truffle/codec>utf8": true, "browserify>buffer": true, "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": true, "ethereumjs-util": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-wallet>aes-js": true, @@ -4710,27 +4930,12 @@ "ethers>@ethersproject/json-wallets>scrypt-js": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": { "globals": { "crypto": true, "msCrypto": true } }, - "eth-keyring-controller>browser-passworder": { - "globals": { - "btoa": true, - "crypto": true - }, - "packages": { - "eth-keyring-controller>browser-passworder>browserify-unibabel": true - } - }, - "eth-keyring-controller>browser-passworder>browserify-unibabel": { - "globals": { - "atob": true, - "btoa": true - } - }, "eth-keyring-controller>eth-simple-keyring": { "packages": { "browserify>buffer": true, @@ -4786,8 +4991,8 @@ "eth-lattice-keyring>bn.js": true, "eth-lattice-keyring>gridplus-sdk": true, "eth-lattice-keyring>rlp": true, - "eth-lattice-keyring>secp256k1": true, - "ethereumjs-util": true + "ethereumjs-util": true, + "ganache>secp256k1": true } }, "eth-lattice-keyring>bn.js": { @@ -4816,11 +5021,11 @@ "eth-lattice-keyring>gridplus-sdk>borc": true, "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, - "eth-lattice-keyring>gridplus-sdk>secp256k1": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, "ethers>@ethersproject/keccak256>js-sha3": true, "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true, "lodash": true, "pubnub>superagent": true } @@ -4885,21 +5090,11 @@ "TextEncoder": true } }, - "eth-lattice-keyring>gridplus-sdk>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-lattice-keyring>rlp": { "globals": { "TextEncoder": true } }, - "eth-lattice-keyring>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-method-registry": { "packages": { "ethjs": true @@ -4927,13 +5122,12 @@ }, "eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>ethereumjs-util>keccak": true, + "eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4945,6 +5139,34 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": { + "packages": { + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true + } + }, "eth-trezor-keyring": { "globals": { "setTimeout": true @@ -5008,23 +5230,11 @@ "3box>ethers>elliptic": true, "bn.js": true, "browserify>insert-module-globals>is-buffer": true, - "eth-trezor-keyring>hdkey>secp256k1>bip66": true, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, - "eth-trezor-keyring>hdkey>secp256k1>bip66": { - "packages": { - "ethereumjs-wallet>safe-buffer": true - } - }, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true - } - }, "eth-trezor-keyring>trezor-connect": { "globals": { "__TREZOR_CONNECT_SRC": true, @@ -5101,7 +5311,7 @@ }, "ethereumjs-util>create-hash": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>md5.js": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -5125,22 +5335,11 @@ }, "ethereumjs-util>create-hash>md5.js>hash-base": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": true, + "browserify>stream-browserify": true, "ethereumjs-wallet>safe-buffer": true, "pumpify>inherits": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": { - "packages": { - "@storybook/api>util-deprecate": true, - "browserify>browser-resolve": true, - "browserify>buffer": true, - "browserify>events": true, - "browserify>process": true, - "browserify>string_decoder": true, - "pumpify>inherits": true - } - }, "ethereumjs-util>create-hash>ripemd160": { "packages": { "browserify>buffer": true, @@ -5154,17 +5353,19 @@ "browserify>buffer": true, "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, "ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>randombytes": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true } }, "ethereumjs-util>ethereum-cryptography>blakejs": { "globals": { - "TextEncoder": true, "console.log": true + }, + "packages": { + "browserify>buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -5199,11 +5400,6 @@ "pumpify>inherits": true } }, - "ethereumjs-util>ethereum-cryptography>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -5778,7 +5974,7 @@ "ethjs-query>babel-runtime": { "packages": { "@babel/runtime": true, - "@storybook/api>regenerator-runtime": true, + "addons-linter>regenerator-runtime": true, "ethjs-query>babel-runtime>core-js": true } }, @@ -5881,6 +6077,11 @@ "define": true } }, + "ganache>secp256k1": { + "packages": { + "3box>ethers>elliptic": true + } + }, "globalthis>define-properties": { "packages": { "nock>deep-equal>object-keys": true diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 1d70e3142..a61594b19 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -921,7 +921,7 @@ "3box>ipfs>async": true, "3box>ipfs>bs58": true, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": true, - "eth-trezor-keyring>hdkey>secp256k1": true + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": true } }, "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>multihashing-async": { @@ -939,6 +939,15 @@ "ethers>@ethersproject/keccak256>js-sha3": true } }, + "3box>ipfs>libp2p-crypto>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>ipfs>libp2p-crypto>multihashing-async": { "globals": { "crypto": true, @@ -2064,8 +2073,8 @@ "3box>ipfs>libp2p-crypto": true, "3box>orbit-db>orbit-db-cache>level-js": true, "3box>orbit-db>orbit-db-keystore>levelup": true, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": true, "3box>orbit-db>orbit-db-keystore>lru": true, - "eth-trezor-keyring>hdkey>secp256k1": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -2110,6 +2119,16 @@ "pumpify>inherits": true } }, + "3box>orbit-db>orbit-db-keystore>libp2p-crypto-secp256k1>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "3box>orbit-db>orbit-db-keystore>lru": { "packages": { "browserify>events": true, @@ -2202,7 +2221,7 @@ }, "@babel/runtime": { "packages": { - "@storybook/api>regenerator-runtime": true + "addons-linter>regenerator-runtime": true } }, "@download/blockies": { @@ -2378,16 +2397,11 @@ }, "@keystonehq/bc-ur-registry-eth>hdkey": { "packages": { - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "ethereumjs-wallet>bs58check": true, - "ethereumjs-wallet>safe-buffer": true - } - }, - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": { - "packages": { - "3box>ethers>elliptic": true + "ethereumjs-wallet>safe-buffer": true, + "ganache>secp256k1": true } }, "@keystonehq/metamask-airgapped-keyring": { @@ -2928,13 +2942,12 @@ }, "@metamask/controllers>web3-provider-engine>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/controllers>web3-provider-engine>ethereumjs-util>ethjs-util": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": true, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -2946,6 +2959,23 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "@metamask/controllers>web3-provider-engine>semaphore": { "globals": { "define": true, @@ -2984,13 +3014,12 @@ }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": true, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": true, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -3002,12 +3031,29 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@metamask/eth-ledger-bridge-keyring>hdkey": { "packages": { + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": true, "browserify>assert": true, "browserify>crypto-browserify": true, "eth-trezor-keyring>hdkey>coinstring": true, - "eth-trezor-keyring>hdkey>secp256k1": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, @@ -3104,6 +3150,11 @@ "URL": true } }, + "@metamask/iframe-execution-environment-service>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, "@metamask/jazzicon": { "globals": { "document.createElement": true, @@ -3219,77 +3270,179 @@ "packages": { "@metamask/controllers": true, "@metamask/rpc-methods>@metamask/key-tree": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers": true, "eth-rpc-errors": true } }, "@metamask/rpc-methods>@metamask/key-tree": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": true, - "browserify>buffer": true + "@metamask/rpc-methods>@metamask/key-tree>bip39": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "browserify>insert-module-globals>is-buffer": true, + "ethereumjs-util>ethereum-cryptography>keccak": true, + "ganache>secp256k1": true + } + }, + "@metamask/rpc-methods>@metamask/key-tree>bip39": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>pbkdf2": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>randombytes": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/ed25519": { + "@metamask/smart-transactions-controller": { "globals": { - "crypto": true + "URLSearchParams": true, + "clearInterval": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, + "setTimeout": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/smart-transactions-controller>@metamask/controllers": true, + "@metamask/smart-transactions-controller>bignumber.js": true, + "@metamask/smart-transactions-controller>fast-json-patch": true, + "ethers": true, + "lodash": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": { + "@metamask/smart-transactions-controller>@metamask/controllers": { "globals": { - "TextEncoder": true, - "crypto": true, + "Headers": true, + "URL": true, + "clearInterval": true, + "clearTimeout": true, + "console.error": true, + "console.log": true, + "fetch": true, + "setInterval": true, "setTimeout": true + }, + "packages": { + "@ethereumjs/common": true, + "@ethereumjs/tx": true, + "@metamask/contract-metadata": true, + "@metamask/controllers>abort-controller": true, + "@metamask/controllers>async-mutex": true, + "@metamask/controllers>eth-phishing-detect": true, + "@metamask/controllers>isomorphic-fetch": true, + "@metamask/controllers>multiformats": true, + "@metamask/controllers>web3-provider-engine": true, + "@metamask/metamask-eth-abis": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": true, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": true, + "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": true, + "@storybook/api>fast-deep-equal": true, + "browserify>buffer": true, + "browserify>events": true, + "deep-freeze-strict": true, + "eth-ens-namehash": true, + "eth-json-rpc-infura": true, + "eth-keyring-controller": true, + "eth-query": true, + "eth-rpc-errors": true, + "eth-sig-util": true, + "ethereumjs-util": true, + "ethers": true, + "ethjs>ethjs-unit": true, + "immer": true, + "json-rpc-engine": true, + "jsonschema": true, + "punycode": true, + "single-call-balance-checker-abi": true, + "uuid": true, + "web3": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@noble/secp256k1": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs": { "globals": { - "crypto": true + "clearInterval": true, + "setInterval": true }, "packages": { - "browserify>browser-resolve": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-provider-http": true, + "ethjs>ethjs-unit": true, + "ethjs>ethjs-util": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": { - "globals": { - "TextDecoder": true, - "TextEncoder": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-abi": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/rpc-methods>@metamask/key-tree>@scure/bip39": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract": { "packages": { - "@metamask/rpc-methods>@metamask/key-tree>@noble/hashes": true, - "@metamask/rpc-methods>@metamask/key-tree>@scure/base": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "ethjs-query>babel-runtime": true, + "ethjs>ethjs-filter": true, + "ethjs>ethjs-util": true, + "promise-to-callback": true } }, - "@metamask/rpc-methods>@metamask/utils": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-contract>ethjs-abi": { "packages": { - "@storybook/api>fast-deep-equal": true + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>bn.js": true, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": true, + "browserify>buffer": true, + "ethjs>number-to-bn": true } }, - "@metamask/smart-transactions-controller": { + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>ethjs-query": { "globals": { - "URLSearchParams": true, - "clearInterval": true, - "console.error": true, - "console.log": true, - "fetch": true, - "setInterval": true + "console": true }, "packages": { - "@metamask/controllers": true, - "@metamask/controllers>isomorphic-fetch": true, - "@metamask/smart-transactions-controller>bignumber.js": true, - "@metamask/smart-transactions-controller>fast-json-patch": true, - "ethers": true, - "lodash": true + "ethjs-query>babel-runtime": true, + "ethjs-query>ethjs-format": true, + "ethjs-query>ethjs-rpc": true, + "promise-to-callback": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>eth-method-registry>ethjs>js-sha3": { + "packages": { + "browserify>process": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet": { + "packages": { + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": true, + "@truffle/codec>utf8": true, + "browserify>buffer": true, + "browserify>crypto-browserify": true, + "ethereumjs-util": true, + "ethereumjs-util>ethereum-cryptography": true, + "ethereumjs-wallet>aes-js": true, + "ethereumjs-wallet>bs58check": true, + "ethereumjs-wallet>randombytes": true, + "ethers>@ethersproject/json-wallets>scrypt-js": true + } + }, + "@metamask/smart-transactions-controller>@metamask/controllers>ethereumjs-wallet>uuid": { + "globals": { + "crypto": true, + "msCrypto": true } }, "@metamask/smart-transactions-controller>@metamask/controllers>nanoid": { @@ -3320,9 +3473,6 @@ "console.info": true, "console.log": true, "console.warn": true, - "document.body.appendChild": true, - "document.createElement": true, - "document.getElementById": true, "fetch": true, "setTimeout": true }, @@ -3330,7 +3480,6 @@ "@metamask/controllers": true, "@metamask/post-message-stream": true, "@metamask/providers>@metamask/object-multiplex": true, - "@metamask/rpc-methods>@metamask/utils": true, "@metamask/snap-controllers>@metamask/execution-environments": true, "@metamask/snap-controllers>@metamask/obs-store": true, "@metamask/snap-controllers>ajv": true, @@ -3538,7 +3687,7 @@ "@ngraveio/bc-ur>bignumber.js": true, "@ngraveio/bc-ur>crc": true, "@ngraveio/bc-ur>jsbi": true, - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>assert": true, "browserify>buffer": true, "pubnub>cbor-sync": true @@ -3560,6 +3709,12 @@ "define": true } }, + "@ngraveio/bc-ur>sha.js": { + "packages": { + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, "@popperjs/core": { "globals": { "Element": true, @@ -3670,11 +3825,6 @@ "localforage": true } }, - "@storybook/api>regenerator-runtime": { - "globals": { - "regeneratorRuntime": "write" - } - }, "@storybook/api>util-deprecate": { "globals": { "console.trace": true, @@ -3994,10 +4144,9 @@ "setTimeout": true } }, - "addons-linter>sha.js": { - "packages": { - "ethereumjs-wallet>safe-buffer": true, - "pumpify>inherits": true + "addons-linter>regenerator-runtime": { + "globals": { + "regeneratorRuntime": "write" } }, "analytics-node": { @@ -4188,7 +4337,7 @@ }, "browserify>crypto-browserify>create-hmac": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4213,13 +4362,10 @@ "browserify>crypto-browserify>pbkdf2": { "globals": { "crypto": true, - "process": true, - "queueMicrotask": true, - "setImmediate": true, - "setTimeout": true + "process": true }, "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "browserify>process": true, "ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -4349,7 +4495,12 @@ }, "browserify>string_decoder": { "packages": { - "ethereumjs-wallet>safe-buffer": true + "browserify>string_decoder>safe-buffer": true + } + }, + "browserify>string_decoder>safe-buffer": { + "packages": { + "browserify>buffer": true } }, "browserify>timers-browserify": { @@ -4649,13 +4800,12 @@ }, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": true, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4667,41 +4817,84 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, "eth-keyring-controller": { "packages": { "browserify>buffer": true, "browserify>events": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring": true, + "eth-keyring-controller>bip39": true, "eth-keyring-controller>browser-passworder": true, + "eth-keyring-controller>eth-hd-keyring": true, "eth-keyring-controller>eth-simple-keyring": true, "eth-keyring-controller>obs-store": true, - "eth-sig-util": true + "eth-sig-util": true, + "ethereumjs-util": true, + "loglevel": true } }, - "eth-keyring-controller>@metamask/bip39": { + "eth-keyring-controller>bip39": { + "globals": { + "console.log": true + }, "packages": { - "browserify>buffer": true, "browserify>crypto-browserify>pbkdf2": true, + "eth-keyring-controller>bip39>unorm": true, "ethereumjs-util>create-hash": true, - "ethereumjs-wallet>randombytes": true + "ethereumjs-wallet>randombytes": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-keyring-controller>bip39>unorm": { + "globals": { + "define": true + } + }, + "eth-keyring-controller>browser-passworder": { + "globals": { + "btoa": true, + "crypto": true + }, + "packages": { + "eth-keyring-controller>browser-passworder>browserify-unibabel": true + } + }, + "eth-keyring-controller>browser-passworder>browserify-unibabel": { + "globals": { + "atob": true, + "btoa": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring": { + "eth-keyring-controller>eth-hd-keyring": { "packages": { "browserify>buffer": true, - "eth-keyring-controller>@metamask/bip39": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": true, + "eth-keyring-controller>bip39": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": true, "eth-keyring-controller>eth-simple-keyring": true, - "eth-trezor-keyring>@metamask/eth-sig-util": true + "eth-sig-util": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet": { "packages": { "@truffle/codec>utf8": true, "browserify>buffer": true, "browserify>crypto-browserify": true, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": true, + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": true, "ethereumjs-util": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-wallet>aes-js": true, @@ -4710,27 +4903,12 @@ "ethers>@ethersproject/json-wallets>scrypt-js": true } }, - "eth-keyring-controller>@metamask/eth-hd-keyring>ethereumjs-wallet>uuid": { + "eth-keyring-controller>eth-hd-keyring>ethereumjs-wallet>uuid": { "globals": { "crypto": true, "msCrypto": true } }, - "eth-keyring-controller>browser-passworder": { - "globals": { - "btoa": true, - "crypto": true - }, - "packages": { - "eth-keyring-controller>browser-passworder>browserify-unibabel": true - } - }, - "eth-keyring-controller>browser-passworder>browserify-unibabel": { - "globals": { - "atob": true, - "btoa": true - } - }, "eth-keyring-controller>eth-simple-keyring": { "packages": { "browserify>buffer": true, @@ -4786,8 +4964,8 @@ "eth-lattice-keyring>bn.js": true, "eth-lattice-keyring>gridplus-sdk": true, "eth-lattice-keyring>rlp": true, - "eth-lattice-keyring>secp256k1": true, - "ethereumjs-util": true + "ethereumjs-util": true, + "ganache>secp256k1": true } }, "eth-lattice-keyring>bn.js": { @@ -4816,11 +4994,11 @@ "eth-lattice-keyring>gridplus-sdk>borc": true, "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, - "eth-lattice-keyring>gridplus-sdk>secp256k1": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, "ethers>@ethersproject/keccak256>js-sha3": true, "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true, "lodash": true, "pubnub>superagent": true } @@ -4885,21 +5063,11 @@ "TextEncoder": true } }, - "eth-lattice-keyring>gridplus-sdk>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-lattice-keyring>rlp": { "globals": { "TextEncoder": true } }, - "eth-lattice-keyring>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "eth-method-registry": { "packages": { "ethjs": true @@ -4927,13 +5095,12 @@ }, "eth-sig-util>ethereumjs-util": { "packages": { - "3box>ethers>elliptic": true, "bn.js": true, "browserify>assert": true, - "browserify>buffer": true, "eth-sig-util>ethereumjs-util>ethjs-util": true, + "eth-sig-util>ethereumjs-util>keccak": true, + "eth-sig-util>ethereumjs-util>secp256k1": true, "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true } @@ -4945,6 +5112,34 @@ "ethjs>ethjs-util>strip-hex-prefix": true } }, + "eth-sig-util>ethereumjs-util>keccak": { + "packages": { + "browserify>stream-browserify": true, + "ethereumjs-wallet>safe-buffer": true, + "pumpify>inherits": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1": { + "packages": { + "3box>ethers>elliptic": true, + "bn.js": true, + "browserify>insert-module-globals>is-buffer": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, + "ethereumjs-util>create-hash": true, + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": { + "packages": { + "ethereumjs-wallet>safe-buffer": true + } + }, + "eth-sig-util>ethereumjs-util>secp256k1>drbg.js": { + "packages": { + "browserify>buffer": true, + "browserify>crypto-browserify>create-hmac": true + } + }, "eth-trezor-keyring": { "globals": { "setTimeout": true @@ -5008,23 +5203,11 @@ "3box>ethers>elliptic": true, "bn.js": true, "browserify>insert-module-globals>is-buffer": true, - "eth-trezor-keyring>hdkey>secp256k1>bip66": true, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": true, + "eth-sig-util>ethereumjs-util>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true } }, - "eth-trezor-keyring>hdkey>secp256k1>bip66": { - "packages": { - "ethereumjs-wallet>safe-buffer": true - } - }, - "eth-trezor-keyring>hdkey>secp256k1>drbg.js": { - "packages": { - "browserify>buffer": true, - "browserify>crypto-browserify>create-hmac": true - } - }, "eth-trezor-keyring>trezor-connect": { "globals": { "__TREZOR_CONNECT_SRC": true, @@ -5101,7 +5284,7 @@ }, "ethereumjs-util>create-hash": { "packages": { - "addons-linter>sha.js": true, + "@ngraveio/bc-ur>sha.js": true, "ethereumjs-util>create-hash>cipher-base": true, "ethereumjs-util>create-hash>md5.js": true, "ethereumjs-util>create-hash>ripemd160": true, @@ -5125,22 +5308,11 @@ }, "ethereumjs-util>create-hash>md5.js>hash-base": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": true, + "browserify>stream-browserify": true, "ethereumjs-wallet>safe-buffer": true, "pumpify>inherits": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base>readable-stream": { - "packages": { - "@storybook/api>util-deprecate": true, - "browserify>browser-resolve": true, - "browserify>buffer": true, - "browserify>events": true, - "browserify>process": true, - "browserify>string_decoder": true, - "pumpify>inherits": true - } - }, "ethereumjs-util>create-hash>ripemd160": { "packages": { "browserify>buffer": true, @@ -5154,17 +5326,19 @@ "browserify>buffer": true, "browserify>crypto-browserify>create-hmac": true, "ethereumjs-util>ethereum-cryptography>keccak": true, - "ethereumjs-util>ethereum-cryptography>secp256k1": true, "ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>randombytes": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/sha2>hash.js": true + "ethers>@ethersproject/sha2>hash.js": true, + "ganache>secp256k1": true } }, "ethereumjs-util>ethereum-cryptography>blakejs": { "globals": { - "TextEncoder": true, "console.log": true + }, + "packages": { + "browserify>buffer": true } }, "ethereumjs-util>ethereum-cryptography>browserify-aes": { @@ -5199,11 +5373,6 @@ "pumpify>inherits": true } }, - "ethereumjs-util>ethereum-cryptography>secp256k1": { - "packages": { - "3box>ethers>elliptic": true - } - }, "ethereumjs-util>ethjs-util": { "packages": { "browserify>buffer": true, @@ -5778,7 +5947,7 @@ "ethjs-query>babel-runtime": { "packages": { "@babel/runtime": true, - "@storybook/api>regenerator-runtime": true, + "addons-linter>regenerator-runtime": true, "ethjs-query>babel-runtime>core-js": true } }, @@ -5881,6 +6050,11 @@ "define": true } }, + "ganache>secp256k1": { + "packages": { + "3box>ethers>elliptic": true + } + }, "globalthis>define-properties": { "packages": { "nock>deep-equal>object-keys": true diff --git a/lavamoat/browserify/policy-override.json b/lavamoat/browserify/policy-override.json index 96504e814..14f684c54 100644 --- a/lavamoat/browserify/policy-override.json +++ b/lavamoat/browserify/policy-override.json @@ -87,6 +87,11 @@ "crypto.getRandomValues": true } }, + "@metamask/iframe-execution-environment-service>nanoid": { + "globals": { + "crypto.getRandomValues": true + } + }, "@metamask/snap-controllers>nanoid": { "globals": { "crypto.getRandomValues": true diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 2e1f4b6b2..31e2b0aa0 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -534,9 +534,9 @@ "@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true, - "@babel/preset-env>@babel/plugin-transform-classes>globals": true, "depcheck>@babel/traverse>@babel/helper-function-name": true, - "depcheck>@babel/traverse>@babel/helper-split-export-declaration": true + "depcheck>@babel/traverse>@babel/helper-split-export-declaration": true, + "depcheck>@babel/traverse>globals": true } }, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": { @@ -1134,6 +1134,21 @@ "typescript": true } }, + "addons-linter>probe-image-size>next-tick": { + "globals": { + "MutationObserver": true, + "WebKitMutationObserver": true, + "document": true, + "process": true, + "setImmediate": true, + "setTimeout": true + } + }, + "addons-linter>upath": { + "builtin": { + "path": true + } + }, "babelify": { "builtin": { "path.extname": true, @@ -1662,7 +1677,12 @@ }, "browserify>string_decoder": { "packages": { - "ethereumjs-wallet>safe-buffer": true + "browserify>string_decoder>safe-buffer": true + } + }, + "browserify>string_decoder>safe-buffer": { + "builtin": { + "buffer": true } }, "browserify>syntax-error": { @@ -1978,6 +1998,57 @@ "string.prototype.matchall>es-abstract": true } }, + "enzyme>cheerio>dom-serializer": { + "packages": { + "enzyme>cheerio>entities": true, + "enzyme>cheerio>htmlparser2>domelementtype": true + } + }, + "enzyme>cheerio>htmlparser2": { + "builtin": { + "buffer.Buffer": true, + "events.EventEmitter": true, + "string_decoder.StringDecoder": true + }, + "packages": { + "enzyme>cheerio>entities": true, + "enzyme>cheerio>htmlparser2>domelementtype": true, + "enzyme>cheerio>htmlparser2>domhandler": true, + "enzyme>cheerio>htmlparser2>domutils": true, + "enzyme>cheerio>htmlparser2>readable-stream": true, + "pumpify>inherits": true + } + }, + "enzyme>cheerio>htmlparser2>domhandler": { + "packages": { + "enzyme>cheerio>htmlparser2>domelementtype": true + } + }, + "enzyme>cheerio>htmlparser2>domutils": { + "packages": { + "enzyme>cheerio>dom-serializer": true, + "enzyme>cheerio>htmlparser2>domelementtype": true + } + }, + "enzyme>cheerio>htmlparser2>readable-stream": { + "builtin": { + "buffer.Buffer": true, + "events.EventEmitter": true, + "stream": true, + "util": true + }, + "globals": { + "process.env.READABLE_STREAM": true, + "process.nextTick": true, + "process.stderr": true, + "process.stdout": true + }, + "packages": { + "@storybook/api>util-deprecate": true, + "browserify>string_decoder": true, + "pumpify>inherits": true + } + }, "enzyme>has": { "packages": { "mocha>object.assign>function-bind": true @@ -2067,10 +2138,10 @@ "eslint>is-glob": true, "eslint>json-stable-stringify-without-jsonify": true, "eslint>levn": true, - "eslint>minimatch": true, "eslint>natural-compare": true, "eslint>regexpp": true, - "lodash": true + "lodash": true, + "mocha>minimatch": true } }, "eslint-config-prettier": { @@ -2147,7 +2218,7 @@ "eslint-plugin-import>read-pkg-up": true, "eslint-plugin-import>tsconfig-paths": true, "eslint-plugin-react>array-includes": true, - "eslint>minimatch": true, + "mocha>minimatch": true, "typescript": true } }, @@ -2461,8 +2532,8 @@ "eslint-plugin-node>eslint-plugin-es": true, "eslint-plugin-node>semver": true, "eslint>eslint-utils": true, - "eslint>minimatch": true, - "globby>ignore": true + "globby>ignore": true, + "mocha>minimatch": true } }, "eslint-plugin-node>eslint-plugin-es": { @@ -2509,8 +2580,8 @@ "eslint-plugin-react>doctrine": true, "eslint-plugin-react>jsx-ast-utils": true, "eslint-plugin-react>resolve": true, - "eslint>minimatch": true, "lavamoat>object.fromentries": true, + "mocha>minimatch": true, "prop-types": true, "string.prototype.matchall": true } @@ -2629,11 +2700,11 @@ "eslint-plugin-react-hooks": true, "eslint>@eslint/eslintrc>globals": true, "eslint>@eslint/eslintrc>ignore": true, + "eslint>@eslint/eslintrc>strip-json-comments": true, "eslint>ajv": true, "eslint>debug": true, "eslint>espree": true, - "eslint>minimatch": true, - "eslint>strip-json-comments": true, + "mocha>minimatch": true, "nyc>js-yaml": true } }, @@ -2691,24 +2762,24 @@ }, "packages": { "eslint>eslint-scope>esrecurse": true, - "eslint>eslint-scope>estraverse": true + "jsdom>escodegen>estraverse": true } }, "eslint>eslint-scope>esrecurse": { "packages": { - "eslint>esquery>estraverse": true + "eslint>eslint-scope>esrecurse>estraverse": true } }, "eslint>eslint-utils": { "packages": { - "eslint>eslint-utils>eslint-visitor-keys": true + "@babel/eslint-parser>eslint-visitor-keys": true } }, "eslint>espree": { "packages": { + "@babel/eslint-parser>eslint-visitor-keys": true, "eslint>espree>acorn": true, - "eslint>espree>acorn-jsx": true, - "eslint>espree>eslint-visitor-keys": true + "eslint>espree>acorn-jsx": true } }, "eslint>espree>acorn": { @@ -2753,7 +2824,21 @@ }, "packages": { "eslint>file-entry-cache>flat-cache>flatted": true, - "nyc>rimraf": true + "eslint>file-entry-cache>flat-cache>rimraf": true + } + }, + "eslint>file-entry-cache>flat-cache>rimraf": { + "builtin": { + "assert": true, + "fs": true, + "path.join": true + }, + "globals": { + "process.platform": true, + "setTimeout": true + }, + "packages": { + "nyc>glob": true } }, "eslint>glob-parent": { @@ -2812,17 +2897,6 @@ "eslint>levn>prelude-ls": true } }, - "eslint>minimatch": { - "builtin": { - "path": true - }, - "globals": { - "console": true - }, - "packages": { - "mocha>minimatch>brace-expansion": true - } - }, "eslint>strip-ansi": { "packages": { "eslint>strip-ansi>ansi-regex": true @@ -3535,7 +3609,7 @@ "packages": { "gulp-rtlcss>rtlcss>@choojs/findup": true, "gulp-rtlcss>rtlcss>postcss": true, - "gulp-rtlcss>rtlcss>strip-json-comments": true + "rc>strip-json-comments": true } }, "gulp-rtlcss>rtlcss>@choojs/findup": { @@ -3789,10 +3863,10 @@ "setTimeout": true }, "packages": { + "addons-linter>probe-image-size>next-tick": true, "gulp-sourcemaps>debug-fabulous>memoizee>event-emitter": true, "gulp-sourcemaps>debug-fabulous>memoizee>is-promise": true, "gulp-sourcemaps>debug-fabulous>memoizee>lru-queue": true, - "gulp-sourcemaps>debug-fabulous>memoizee>next-tick": true, "gulp-sourcemaps>debug-fabulous>memoizee>timers-ext": true, "resolve-url-loader>es6-iterator>d": true, "resolve-url-loader>es6-iterator>es5-ext": true @@ -3809,16 +3883,6 @@ "resolve-url-loader>es6-iterator>es5-ext": true } }, - "gulp-sourcemaps>debug-fabulous>memoizee>next-tick": { - "globals": { - "MutationObserver": true, - "WebKitMutationObserver": true, - "document": true, - "process": true, - "setImmediate": true, - "setTimeout": true - } - }, "gulp-sourcemaps>debug-fabulous>memoizee>timers-ext": { "packages": { "resolve-url-loader>es6-iterator>es5-ext": true @@ -4087,6 +4151,7 @@ "setTimeout": true }, "packages": { + "addons-linter>upath": true, "gulp-watch>chokidar>anymatch": true, "gulp-watch>chokidar>async-each": true, "gulp-watch>chokidar>braces": true, @@ -4094,7 +4159,6 @@ "gulp-watch>chokidar>is-glob": true, "gulp-watch>chokidar>normalize-path": true, "gulp-watch>chokidar>readdirp": true, - "gulp-watch>chokidar>upath": true, "gulp-watch>glob-parent": true, "gulp-watch>path-is-absolute": true, "pumpify>inherits": true @@ -4392,11 +4456,6 @@ "gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow>is-extendable": true } }, - "gulp-watch>chokidar>upath": { - "builtin": { - "path": true - } - }, "gulp-watch>fancy-log": { "globals": { "console": true, @@ -4733,6 +4792,7 @@ "setTimeout": true }, "packages": { + "addons-linter>upath": true, "eslint>is-glob": true, "gulp-watch>chokidar>async-each": true, "gulp-watch>path-is-absolute": true, @@ -4742,7 +4802,6 @@ "gulp>glob-watcher>chokidar>is-binary-path": true, "gulp>glob-watcher>chokidar>normalize-path": true, "gulp>glob-watcher>chokidar>readdirp": true, - "gulp>glob-watcher>chokidar>upath": true, "pumpify>inherits": true } }, @@ -4825,11 +4884,6 @@ "readable-stream": true } }, - "gulp>glob-watcher>chokidar>upath": { - "builtin": { - "path": true - } - }, "gulp>glob-watcher>just-debounce": { "globals": { "clearTimeout": true, @@ -5587,6 +5641,17 @@ "fs.accessSync": true } }, + "mocha>minimatch": { + "builtin": { + "path": true + }, + "globals": { + "console.error": true + }, + "packages": { + "mocha>minimatch>brace-expansion": true + } + }, "mocha>minimatch>brace-expansion": { "packages": { "mocha>minimatch>brace-expansion>concat-map": true, @@ -5670,8 +5735,8 @@ "process.platform": true }, "packages": { - "eslint>minimatch": true, "gulp-watch>path-is-absolute": true, + "mocha>minimatch": true, "nyc>glob>fs.realpath": true, "nyc>glob>inflight": true, "pump>once": true, @@ -5726,20 +5791,6 @@ "path.resolve": true } }, - "nyc>rimraf": { - "builtin": { - "assert": true, - "fs": true, - "path.join": true - }, - "globals": { - "process.platform": true, - "setTimeout": true - }, - "packages": { - "nyc>glob": true - } - }, "nyc>signal-exit": { "builtin": { "assert.equal": true, @@ -6638,61 +6689,10 @@ "__dirname": true }, "packages": { - "stylelint>postcss-html>htmlparser2": true, + "enzyme>cheerio>htmlparser2": true, "stylelint>postcss-syntax": true } }, - "stylelint>postcss-html>htmlparser2": { - "builtin": { - "buffer.Buffer": true, - "events.EventEmitter": true, - "string_decoder.StringDecoder": true - }, - "packages": { - "pumpify>inherits": true, - "stylelint>postcss-html>htmlparser2>domelementtype": true, - "stylelint>postcss-html>htmlparser2>domhandler": true, - "stylelint>postcss-html>htmlparser2>domutils": true, - "stylelint>postcss-html>htmlparser2>entities": true, - "stylelint>postcss-html>htmlparser2>readable-stream": true - } - }, - "stylelint>postcss-html>htmlparser2>domhandler": { - "packages": { - "stylelint>postcss-html>htmlparser2>domelementtype": true - } - }, - "stylelint>postcss-html>htmlparser2>domutils": { - "packages": { - "stylelint>postcss-html>htmlparser2>domelementtype": true, - "stylelint>postcss-html>htmlparser2>domutils>dom-serializer": true - } - }, - "stylelint>postcss-html>htmlparser2>domutils>dom-serializer": { - "packages": { - "stylelint>postcss-html>htmlparser2>domelementtype": true, - "stylelint>postcss-html>htmlparser2>entities": true - } - }, - "stylelint>postcss-html>htmlparser2>readable-stream": { - "builtin": { - "buffer.Buffer": true, - "events.EventEmitter": true, - "stream": true, - "util": true - }, - "globals": { - "process.env.READABLE_STREAM": true, - "process.nextTick": true, - "process.stderr": true, - "process.stdout": true - }, - "packages": { - "@storybook/api>util-deprecate": true, - "browserify>string_decoder": true, - "pumpify>inherits": true - } - }, "stylelint>postcss-less": { "packages": { "stylelint>postcss": true diff --git a/package.json b/package.json index d12890c10..a8aecef00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.16.0", + "version": "10.15.1", "private": true, "repository": { "type": "git", @@ -11,7 +11,6 @@ "setup:postinstall": "yarn patch-package && yarn allow-scripts", "start": "yarn build:dev dev --apply-lavamoat=false", "start:lavamoat": "yarn build:dev dev --apply-lavamoat=true", - "start:mv3": "ENABLE_MV3=true yarn build:dev dev --apply-lavamoat=false", "dist": "yarn build prod", "build": "yarn lavamoat:build", "build:dev": "node development/build/index.js", @@ -35,7 +34,7 @@ "test:e2e:firefox:snaps": "SELENIUM_BROWSER=firefox node test/e2e/run-all.js --snaps", "test:e2e:single": "node test/e2e/run-e2e-test.js", "test:coverage:mocha": "nyc --reporter=text --reporter=html yarn test:unit:mocha", - "test:coverage:jest": "yarn test:unit:jest --coverage --maxWorkers=2 && yarn jest-it-up -m 5", + "test:coverage:jest": "yarn test:unit:jest --coverage --maxWorkers=2", "ganache:start": "./development/run-ganache.sh", "sentry:publish": "node ./development/sentry-publish.js", "lint": "yarn lint:prettier && yarn lint:eslint && yarn lint:tsc && yarn lint:styles", @@ -116,21 +115,22 @@ "@keystonehq/metamask-airgapped-keyring": "0.2.1", "@material-ui/core": "^4.11.0", "@metamask/contract-metadata": "^1.31.0", - "@metamask/controllers": "^29.0.1", - "@metamask/design-tokens": "^1.6.5", - "@metamask/eth-ledger-bridge-keyring": "^0.13.0", + "@metamask/controllers": "^28.0.0", + "@metamask/design-tokens": "^1.5.1", + "@metamask/eth-ledger-bridge-keyring": "^0.12.0", "@metamask/eth-token-tracker": "^4.0.0", "@metamask/etherscan-link": "^2.1.0", + "@metamask/iframe-execution-environment-service": "^0.11.1", "@metamask/jazzicon": "^2.0.0", "@metamask/logo": "^3.1.1", "@metamask/metamask-eth-abis": "^3.0.0", "@metamask/obs-store": "^5.0.0", "@metamask/post-message-stream": "^4.0.0", - "@metamask/providers": "^9.0.0", - "@metamask/rpc-methods": "^0.15.0", - "@metamask/slip44": "^2.1.0", - "@metamask/smart-transactions-controller": "^2.0.1", - "@metamask/snap-controllers": "^0.15.0", + "@metamask/providers": "^8.1.1", + "@metamask/rpc-methods": "^0.11.1", + "@metamask/slip44": "^2.0.0", + "@metamask/smart-transactions-controller": "^1.10.0", + "@metamask/snap-controllers": "^0.11.1", "@ngraveio/bc-ur": "^1.1.6", "@popperjs/core": "^2.4.0", "@reduxjs/toolkit": "^1.6.2", @@ -157,7 +157,7 @@ "eth-json-rpc-filters": "^4.2.1", "eth-json-rpc-infura": "^5.1.0", "eth-json-rpc-middleware": "^8.0.0", - "eth-keyring-controller": "^7.0.2", + "eth-keyring-controller": "^6.2.0", "eth-lattice-keyring": "^0.7.3", "eth-method-registry": "^2.0.0", "eth-query": "^2.1.2", @@ -275,14 +275,14 @@ "@types/react": "^16.9.53", "@typescript-eslint/eslint-plugin": "^4.20.0", "@typescript-eslint/parser": "^4.20.0", - "addons-linter": "^5.2.0", + "addons-linter": "1.14.0", "babelify": "^10.0.0", "bify-module-groups": "^2.0.0", "brfs": "^2.0.2", "browser-util-inspect": "^0.2.0", "browserify": "^16.5.1", "chalk": "^3.0.0", - "chromedriver": "^102.0.0", + "chromedriver": "^100.0.0", "concurrently": "^5.2.0", "copy-webpack-plugin": "^6.0.3", "cross-spawn": "^7.0.3", @@ -327,7 +327,6 @@ "improved-yarn-audit": "^3.0.0", "jest": "^26.6.3", "jest-canvas-mock": "^2.3.1", - "jest-it-up": "^2.0.2", "jsdom": "^11.2.0", "koa": "^2.7.0", "lavamoat": "^6.2.0", @@ -440,14 +439,9 @@ "ganache>leveldown": false, "ganache>secp256k1": false, "ganache>utf-8-validate": false, - "ethereumjs-util>ethereum-cryptography>secp256k1": false, "gulp-watch>chokidar>fsevents": false, "gulp>glob-watcher>chokidar>fsevents": false, - "webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false, - "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": false, - "@metamask/rpc-methods>@metamask/key-tree>secp256k1": false, - "eth-lattice-keyring>gridplus-sdk>secp256k1": false, - "eth-lattice-keyring>secp256k1": false + "webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false } } } diff --git a/patches/@metamask+snap-controllers+0.15.0.patch b/patches/@metamask+snap-controllers+0.15.0.patch deleted file mode 100644 index b1566a9eb..000000000 --- a/patches/@metamask+snap-controllers+0.15.0.patch +++ /dev/null @@ -1,323 +0,0 @@ -diff --git a/node_modules/@metamask/snap-controllers/CHANGELOG.md b/node_modules/@metamask/snap-controllers/CHANGELOG.md -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/LICENSE b/node_modules/@metamask/snap-controllers/LICENSE -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/README.md b/node_modules/@metamask/snap-controllers/README.md -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/index.d.ts b/node_modules/@metamask/snap-controllers/dist/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/index.js b/node_modules/@metamask/snap-controllers/dist/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/index.js.map b/node_modules/@metamask/snap-controllers/dist/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.d.ts b/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.js b/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.js.map b/node_modules/@metamask/snap-controllers/dist/resource/ExternalResourceController.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/index.d.ts b/node_modules/@metamask/snap-controllers/dist/resource/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/index.js b/node_modules/@metamask/snap-controllers/dist/resource/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/resource/index.js.map b/node_modules/@metamask/snap-controllers/dist/resource/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.d.ts b/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.js b/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.js.map b/node_modules/@metamask/snap-controllers/dist/services/AbstractExecutionService.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.d.ts b/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.js b/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.js.map b/node_modules/@metamask/snap-controllers/dist/services/ExecutionService.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.d.ts b/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.js b/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.js.map b/node_modules/@metamask/snap-controllers/dist/services/WebWorkerExecutionService.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.d.ts b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.d.ts -old mode 100644 -new mode 100755 -index 91b3138..8ba2b34 ---- a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.d.ts -+++ b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.d.ts -@@ -28,8 +28,9 @@ export declare class IframeExecutionService extends AbstractExecutionService; - private _initStreams; - /** -- * Creates the iframe to be used as the execution environment -- * This may run forever if the iframe never loads, but the promise should be wrapped in an initialization timeout in the SnapController -+ * Creates the iframe to be used as the execution environment. This may run -+ * forever if the iframe never loads, but the promise should be wrapped in -+ * an initialization timeout in the SnapController. - * - * @param uri - The iframe URI - * @param jobId - The job id -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js -old mode 100644 -new mode 100755 -index 8a93679..abf861d ---- a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js -+++ b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js -@@ -69,25 +69,54 @@ class IframeExecutionService extends AbstractExecutionService_1.AbstractExecutio - }; - } - /** -- * Creates the iframe to be used as the execution environment -- * This may run forever if the iframe never loads, but the promise should be wrapped in an initialization timeout in the SnapController -+ * Creates the iframe to be used as the execution environment. This may run -+ * forever if the iframe never loads, but the promise should be wrapped in -+ * an initialization timeout in the SnapController. - * - * @param uri - The iframe URI - * @param jobId - The job id - */ - _createWindow(uri, jobId) { -- const iframe = document.createElement('iframe'); -- return new Promise((resolve) => { -+ return new Promise((resolve, reject) => { -+ const iframe = document.createElement('iframe'); -+ // The order of operations appears to matter for everything except this -+ // attribute. We may as well set it here. -+ iframe.setAttribute('id', jobId); -+ // In the past, we've had problems that appear to be symptomatic of the -+ // iframe firing the `load` event before its scripts are actually loaded, -+ // which has prevented snaps from executing properly. Therefore, we set -+ // the `src` attribute and append the iframe to the DOM before attaching -+ // the `load` listener. -+ // -+ // `load` should only fire when "all dependent resources" have been -+ // loaded, which includes scripts. -+ // -+ // MDN article for `load` event: https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event -+ // Re: `load` firing twice: https://stackoverflow.com/questions/10781880/dynamically-created-iframe-triggers-onload-event-twice/15880489#15880489 -+ iframe.setAttribute('src', uri); -+ document.body.appendChild(iframe); - iframe.addEventListener('load', () => { - if (iframe.contentWindow) { - resolve(iframe.contentWindow); - } -+ else { -+ // We don't know of a case when this would happen, but better to fail -+ // fast if it does. -+ reject(new Error(`iframe.contentWindow not present on load for job "${jobId}".`)); -+ } - }); -- // Set attributes before adding the iframe to the DOM to trigger 'load' event once everything has been loaded. -- iframe.setAttribute('src', uri); -- iframe.setAttribute('id', jobId); -+ // We need to set the sandbox attribute after appending the iframe to the -+ // DOM, otherwise errors in the iframe will not be propagated via `error` -+ // and `unhandledrejection` events, and we cannot catch and handle them. -+ // We wish we knew why this was the case. -+ // -+ // We set this property after adding the `load` listener because it -+ // appears to work dependably. ¯\_(ツ)_/¯ -+ // -+ // We apply this property as a principle of least authority (POLA) -+ // measure. -+ // Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox - iframe.setAttribute('sandbox', 'allow-scripts'); -- document.body.appendChild(iframe); - }); - } - } -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js.map b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js.map -old mode 100644 -new mode 100755 -index a9e6647..62f6c49 ---- a/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js.map -+++ b/node_modules/@metamask/snap-controllers/dist/services/iframe/IframeExecutionService.js.map -@@ -1 +1 @@ --{"version":3,"file":"IframeExecutionService.js","sourceRoot":"","sources":["../../../src/services/iframe/IframeExecutionService.ts"],"names":[],"mappings":";;;;;;AACA,uEAAwE;AAExE,6EAAqE;AACrE,qDAAgD;AAChD,2EAAoE;AACpE,mCAAgC;AAChC,gDAAwB;AACxB,0EAIqC;AAqBrC,MAAa,sBAAuB,SAAQ,mDAAqC;IAK/E,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,GAC6B;QACtC,KAAK,CAAC;YACJ,iBAAiB;YACjB,SAAS;SACV,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAES,UAAU,CAAC,UAAuB;QAC1C,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACnD,CAAC;IAES,KAAK,CAAC,QAAQ;QACtB,MAAM,KAAK,GAAG,IAAA,eAAM,GAAE,CAAC;QACvB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG,IAAI,+BAAa,EAAE,CAAC;QAEtC,MAAM,iBAAiB,GAAG,IAAA,mDAAsB,GAAE,CAAC;QAEnD,IAAA,cAAI,EAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAE1E,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAE7C,MAAM,WAAW,GAAG;YAClB,EAAE,EAAE,KAAK;YACT,OAAO;YACP,SAAS;SACV,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAElC,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,KAAa;QACtC,IAAI,CAAC,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,CAC3C,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EACzB,KAAK,CACN,CAAC;QACF,MAAM,SAAS,GAAG,IAAI,6CAAuB,CAAC;YAC5C,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,IAAI,CAAC,aAAa;SACjC,CAAC,CAAC;QACH,+CAA+C;QAC/C,MAAM,GAAG,GAAG,IAAA,yCAAc,EACxB,SAA8B,EAC9B,SAAS,KAAK,GAAG,CAClB,CAAC;QAEF,MAAM,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,0CAAiB,CAAC,OAAO,CAAC,CAAC;QAClE,4FAA4F;QAC5F,MAAM,YAAY,GAAG,CAAC,IAAS,EAAE,EAAE;YACjC,IACE,IAAI,CAAC,KAAK;gBACV,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,uCAAuC;cACnF;gBACA,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC5C,IAAI,MAAM,EAAE;oBACV,IAAI,CAAC,UAAU,CAAC,OAAO,CACrB,iCAAiC,EACjC,MAAM,EACN,IAAI,CAAC,KAAK,CACX,CAAC;iBACH;gBACD,aAAa,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;aACpD;QACH,CAAC,CAAC;QACF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,0CAAiB,CAAC,QAAQ,CAAC,CAAC;QAE/D,iCAAiC;QACjC,OAAO;YACL,OAAO,EAAE,aAAkC;YAC3C,GAAG,EAAE,SAAS;YACd,WAAW,EAAE,SAAS;SACvB,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,aAAa,CAAC,GAAW,EAAE,KAAa;QAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACnC,IAAI,MAAM,CAAC,aAAa,EAAE;oBACxB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;iBAC/B;YACH,CAAC,CAAC,CAAC;YACH,8GAA8G;YAC9G,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACjC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YAChD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA7GD,wDA6GC"} -\ No newline at end of file -+{"version":3,"file":"IframeExecutionService.js","sourceRoot":"","sources":["../../../src/services/iframe/IframeExecutionService.ts"],"names":[],"mappings":";;;;;;AACA,uEAAwE;AAExE,6EAAqE;AACrE,qDAAgD;AAChD,2EAAoE;AACpE,mCAAgC;AAChC,gDAAwB;AACxB,0EAIqC;AAqBrC,MAAa,sBAAuB,SAAQ,mDAAqC;IAK/E,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,GAC6B;QACtC,KAAK,CAAC;YACJ,iBAAiB;YACjB,SAAS;SACV,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAES,UAAU,CAAC,UAAuB;QAC1C,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACnD,CAAC;IAES,KAAK,CAAC,QAAQ;QACtB,MAAM,KAAK,GAAG,IAAA,eAAM,GAAE,CAAC;QACvB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG,IAAI,+BAAa,EAAE,CAAC;QAEtC,MAAM,iBAAiB,GAAG,IAAA,mDAAsB,GAAE,CAAC;QAEnD,IAAA,cAAI,EAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAE1E,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAE7C,MAAM,WAAW,GAAG;YAClB,EAAE,EAAE,KAAK;YACT,OAAO;YACP,SAAS;SACV,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAElC,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,KAAa;QACtC,IAAI,CAAC,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,CAC3C,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EACzB,KAAK,CACN,CAAC;QACF,MAAM,SAAS,GAAG,IAAI,6CAAuB,CAAC;YAC5C,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,IAAI,CAAC,aAAa;SACjC,CAAC,CAAC;QACH,+CAA+C;QAC/C,MAAM,GAAG,GAAG,IAAA,yCAAc,EACxB,SAA8B,EAC9B,SAAS,KAAK,GAAG,CAClB,CAAC;QAEF,MAAM,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,0CAAiB,CAAC,OAAO,CAAC,CAAC;QAClE,4FAA4F;QAC5F,MAAM,YAAY,GAAG,CAAC,IAAS,EAAE,EAAE;YACjC,IACE,IAAI,CAAC,KAAK;gBACV,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,uCAAuC;cACnF;gBACA,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC5C,IAAI,MAAM,EAAE;oBACV,IAAI,CAAC,UAAU,CAAC,OAAO,CACrB,iCAAiC,EACjC,MAAM,EACN,IAAI,CAAC,KAAK,CACX,CAAC;iBACH;gBACD,aAAa,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;aACpD;QACH,CAAC,CAAC;QACF,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,0CAAiB,CAAC,QAAQ,CAAC,CAAC;QAE/D,iCAAiC;QACjC,OAAO;YACL,OAAO,EAAE,aAAkC;YAC3C,GAAG,EAAE,SAAS;YACd,WAAW,EAAE,SAAS;SACvB,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACK,aAAa,CAAC,GAAW,EAAE,KAAa;QAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,uEAAuE;YACvE,yCAAyC;YACzC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAEjC,uEAAuE;YACvE,yEAAyE;YACzE,uEAAuE;YACvE,wEAAwE;YACxE,uBAAuB;YACvB,EAAE;YACF,mEAAmE;YACnE,kCAAkC;YAClC,EAAE;YACF,mGAAmG;YACnG,iJAAiJ;YACjJ,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YAElC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACnC,IAAI,MAAM,CAAC,aAAa,EAAE;oBACxB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;iBAC/B;qBAAM;oBACL,qEAAqE;oBACrE,mBAAmB;oBACnB,MAAM,CACJ,IAAI,KAAK,CACP,qDAAqD,KAAK,IAAI,CAC/D,CACF,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;YAEH,yEAAyE;YACzE,yEAAyE;YACzE,wEAAwE;YACxE,yCAAyC;YACzC,EAAE;YACF,mEAAmE;YACnE,wCAAwC;YACxC,EAAE;YACF,kEAAkE;YAClE,WAAW;YACX,qFAAqF;YACrF,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAhJD,wDAgJC"} -\ No newline at end of file -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/index.d.ts b/node_modules/@metamask/snap-controllers/dist/services/iframe/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/index.js b/node_modules/@metamask/snap-controllers/dist/services/iframe/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/index.js.map b/node_modules/@metamask/snap-controllers/dist/services/iframe/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.d.ts b/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.js b/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.js.map b/node_modules/@metamask/snap-controllers/dist/services/iframe/testHelpers/server.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/index.d.ts b/node_modules/@metamask/snap-controllers/dist/services/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/index.js b/node_modules/@metamask/snap-controllers/dist/services/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/services/index.js.map b/node_modules/@metamask/snap-controllers/dist/services/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.js b/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/RequestQueue.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.js b/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/SnapController.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.js b/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/default-endowments.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.js b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/constants.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.js b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.js b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/long-running.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.js b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/endowments/network-access.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/index.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/index.js b/node_modules/@metamask/snap-controllers/dist/snaps/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/index.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.js b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/NpmSnapPackageJson.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.js b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/SnapManifest.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.js b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/index.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.js b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateNpmSnapPackageJson.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.js b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/json-schemas/validateSnapManifest.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/utils.d.ts b/node_modules/@metamask/snap-controllers/dist/snaps/utils.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/utils.js b/node_modules/@metamask/snap-controllers/dist/snaps/utils.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/snaps/utils.js.map b/node_modules/@metamask/snap-controllers/dist/snaps/utils.js.map -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/utils.d.ts b/node_modules/@metamask/snap-controllers/dist/utils.d.ts -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/utils.js b/node_modules/@metamask/snap-controllers/dist/utils.js -old mode 100644 -new mode 100755 -diff --git a/node_modules/@metamask/snap-controllers/dist/utils.js.map b/node_modules/@metamask/snap-controllers/dist/utils.js.map -old mode 100644 -new mode 100755 diff --git a/patches/bip39+2.5.0.patch b/patches/bip39+2.5.0.patch new file mode 100644 index 000000000..2976f3bb2 --- /dev/null +++ b/patches/bip39+2.5.0.patch @@ -0,0 +1,99 @@ +diff --git a/node_modules/bip39/index.js b/node_modules/bip39/index.js +index aa0f29f..bee8008 100644 +--- a/node_modules/bip39/index.js ++++ b/node_modules/bip39/index.js +@@ -48,7 +48,9 @@ function salt (password) { + } + + function mnemonicToSeed (mnemonic, password) { +- var mnemonicBuffer = Buffer.from(unorm.nfkd(mnemonic), 'utf8') ++ var mnemonicBuffer = typeof mnemonic === 'string' ++ ? Buffer.from(unorm.nfkd(mnemonic), 'utf8') ++ : mnemonic + var saltBuffer = Buffer.from(salt(unorm.nfkd(password)), 'utf8') + + return pbkdf2(mnemonicBuffer, saltBuffer, 2048, 64, 'sha512') +@@ -61,12 +63,28 @@ function mnemonicToSeedHex (mnemonic, password) { + function mnemonicToEntropy (mnemonic, wordlist) { + wordlist = wordlist || DEFAULT_WORDLIST + +- var words = unorm.nfkd(mnemonic).split(' ') ++ var mnemonicAsBuffer = typeof mnemonic === 'string' ++ ? Buffer.from(unorm.nfkd(mnemonic), 'utf8') ++ : mnemonic ++ ++ var words = []; ++ var currentWord = []; ++ for (const byte of mnemonicAsBuffer.values()) { ++ // split at space or \u3000 (ideographic space, for Japanese wordlists) ++ if (byte === 0x20 || byte === 0x3000) { ++ words.push(Buffer.from(currentWord)); ++ currentWord = []; ++ } else { ++ currentWord.push(byte); ++ } ++ } ++ words.push(Buffer.from(currentWord)); ++ + if (words.length % 3 !== 0) throw new Error(INVALID_MNEMONIC) + + // convert word indices to 11 bit binary strings + var bits = words.map(function (word) { +- var index = wordlist.indexOf(word) ++ var index = wordlist.indexOf(word.toString('utf8')) + if (index === -1) throw new Error(INVALID_MNEMONIC) + + return lpad(index.toString(2), '0', 11) +@@ -104,12 +122,41 @@ function entropyToMnemonic (entropy, wordlist) { + + var bits = entropyBits + checksumBits + var chunks = bits.match(/(.{1,11})/g) +- var words = chunks.map(function (binary) { ++ var wordsAsBuffers = chunks.map(function (binary) { + var index = binaryToByte(binary) +- return wordlist[index] ++ return Buffer.from(wordlist[index], 'utf8') + }) + +- return wordlist === JAPANESE_WORDLIST ? words.join('\u3000') : words.join(' ') ++ var bufferSize = wordsAsBuffers.reduce(function (bufferSize, wordAsBuffer, i) { ++ var shouldAddSeparator = i < wordsAsBuffers.length - 1 ++ return ( ++ bufferSize + ++ wordAsBuffer.length + ++ (shouldAddSeparator ? 1 : 0) ++ ) ++ }, 0) ++ var separator = wordlist === JAPANESE_WORDLIST ? '\u3000' : ' ' ++ var result = wordsAsBuffers.reduce(function (result, wordAsBuffer, i) { ++ var shouldAddSeparator = i < wordsAsBuffers.length - 1 ++ result.workingBuffer.set(wordAsBuffer, result.offset) ++ if (shouldAddSeparator) { ++ result.workingBuffer.write( ++ separator, ++ result.offset + wordAsBuffer.length, ++ separator.length, ++ 'utf8' ++ ) ++ } ++ return { ++ workingBuffer: result.workingBuffer, ++ offset: ( ++ result.offset + ++ wordAsBuffer.length + ++ (shouldAddSeparator ? 1 : 0) ++ ) ++ } ++ }, { workingBuffer: Buffer.alloc(bufferSize), offset: 0 }) ++ return result.workingBuffer; + } + + function generateMnemonic (strength, rng, wordlist) { +@@ -124,6 +171,7 @@ function validateMnemonic (mnemonic, wordlist) { + try { + mnemonicToEntropy(mnemonic, wordlist) + } catch (e) { ++ console.log('could not validate mnemonic', e) + return false + } + diff --git a/patches/eth-hd-keyring+3.6.0.patch b/patches/eth-hd-keyring+3.6.0.patch new file mode 100644 index 000000000..211cb89dd --- /dev/null +++ b/patches/eth-hd-keyring+3.6.0.patch @@ -0,0 +1,43 @@ +diff --git a/node_modules/eth-hd-keyring/index.js b/node_modules/eth-hd-keyring/index.js +index 19d1d7f..350d6b8 100644 +--- a/node_modules/eth-hd-keyring/index.js ++++ b/node_modules/eth-hd-keyring/index.js +@@ -17,8 +17,11 @@ class HdKeyring extends SimpleKeyring { + } + + serialize () { ++ const mnemonicAsBuffer = typeof this.mnemonic === 'string' ++ ? Buffer.from(this.mnemonic, 'utf8') ++ : this.mnemonic + return Promise.resolve({ +- mnemonic: this.mnemonic, ++ mnemonic: Array.from(mnemonicAsBuffer.values()), + numberOfAccounts: this.wallets.length, + hdPath: this.hdPath, + }) +@@ -69,9 +72,22 @@ class HdKeyring extends SimpleKeyring { + + /* PRIVATE METHODS */ + +- _initFromMnemonic (mnemonic) { +- this.mnemonic = mnemonic +- const seed = bip39.mnemonicToSeed(mnemonic) ++ /** ++ * Sets appropriate properties for the keyring based on the given ++ * BIP39-compliant mnemonic. ++ * ++ * @param {string|Array|Buffer} mnemonic - A seed phrase represented ++ * as a string, an array of UTF-8 bytes, or a Buffer. ++ */ ++ _initFromMnemonic(mnemonic) { ++ if (typeof mnemonic === 'string') { ++ this.mnemonic = Buffer.from(mnemonic, 'utf8') ++ } else if (Array.isArray(mnemonic)) { ++ this.mnemonic = Buffer.from(mnemonic) ++ } else { ++ this.mnemonic = mnemonic ++ } ++ const seed = bip39.mnemonicToSeed(this.mnemonic) + this.hdWallet = hdkey.fromMasterSeed(seed) + this.root = this.hdWallet.derivePath(this.hdPath) + } diff --git a/patches/eth-keyring-controller+6.2.1.patch b/patches/eth-keyring-controller+6.2.1.patch new file mode 100644 index 000000000..aec0c7168 --- /dev/null +++ b/patches/eth-keyring-controller+6.2.1.patch @@ -0,0 +1,37 @@ +diff --git a/node_modules/eth-keyring-controller/index.js b/node_modules/eth-keyring-controller/index.js +index 250ab98..38615aa 100644 +--- a/node_modules/eth-keyring-controller/index.js ++++ b/node_modules/eth-keyring-controller/index.js +@@ -84,15 +84,20 @@ class KeyringController extends EventEmitter { + * + * @emits KeyringController#unlock + * @param {string} password - The password to encrypt the vault with +- * @param {string} seed - The BIP44-compliant seed phrase. ++ * @param {string|Array} seedPhrase - The BIP39-compliant seed phrase, ++ * either as a string or an array of UTF-8 bytes that represent the string. + * @returns {Promise} A Promise that resolves to the state. + */ +- createNewVaultAndRestore (password, seed) { ++ createNewVaultAndRestore(password, seedPhrase) { ++ const seedPhraseAsBuffer = typeof seedPhrase === 'string' ++ ? Buffer.from(seedPhrase, 'utf8') ++ : Buffer.from(seedPhrase) ++ + if (typeof password !== 'string') { + return Promise.reject(new Error('Password must be text.')) + } + +- if (!bip39.validateMnemonic(seed)) { ++ if (!bip39.validateMnemonic(seedPhraseAsBuffer)) { + return Promise.reject(new Error('Seed phrase is invalid.')) + } + +@@ -101,7 +106,7 @@ class KeyringController extends EventEmitter { + return this.persistAllKeyrings(password) + .then(() => { + return this.addNewKeyring('HD Key Tree', { +- mnemonic: seed, ++ mnemonic: seedPhraseAsBuffer, + numberOfAccounts: 1, + }) + }) diff --git a/patches/secp256k1+3.8.0.patch b/patches/secp256k1+3.8.0.patch deleted file mode 100644 index e44de3f04..000000000 --- a/patches/secp256k1+3.8.0.patch +++ /dev/null @@ -1,37 +0,0 @@ -lazy precompute for faster module initialization - -diff --git a/node_modules/secp256k1/lib/js/ecpointg.js b/node_modules/secp256k1/lib/js/ecpointg.js -index 0144364..09a87c5 100644 ---- a/node_modules/secp256k1/lib/js/ecpointg.js -+++ b/node_modules/secp256k1/lib/js/ecpointg.js -@@ -8,11 +8,12 @@ function ECPointG () { - this.x = BN.fromBuffer(Buffer.from('79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798', 'hex')) - this.y = BN.fromBuffer(Buffer.from('483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8', 'hex')) - this.inf = false -- -- this._precompute() -+ this.precomputed = undefined - } - - ECPointG.prototype._precompute = function () { -+ if (this.precomputed !== undefined) return -+ - var ecpoint = new ECPoint(this.x, this.y) - - var dstep = 4 -@@ -34,6 +35,7 @@ ECPointG.prototype._precompute = function () { - } - - ECPointG.prototype.mul = function (num) { -+ this._precompute() - // Algorithm 3.42 Fixed-base NAF windowing method for point multiplication - var step = this.precomputed.doubles.step - var points = this.precomputed.doubles.points -@@ -68,6 +70,7 @@ ECPointG.prototype.mul = function (num) { - } - - ECPointG.prototype.mulAdd = function (k1, p2, k2) { -+ this._precompute() - var nafPointsP1 = this.precomputed.naf - var nafPointsP2 = p2._getNAFPoints1() - var wnd = [nafPointsP1.points, nafPointsP2.points] diff --git a/shared/constants/gas.js b/shared/constants/gas.js index 0092e9ae0..ae674e4a2 100644 --- a/shared/constants/gas.js +++ b/shared/constants/gas.js @@ -10,22 +10,9 @@ export const GAS_LIMITS = { BASE_TOKEN_ESTIMATE: addHexPrefix(ONE_HUNDRED_THOUSAND.toString(16)), }; -/** - * @typedef {Object} GasEstimateTypes - * @property {'fee-market'} FEE_MARKET - A gas estimate for a fee market - * transaction generated by our gas estimation API. - * @property {'legacy'} LEGACY - A gas estimate for a legacy Transaction - * generated by our gas estimation API. - * @property {'eth_gasPrice'} ETH_GAS_PRICE - A gas estimate provided by the - * Ethereum node via eth_gasPrice. - * @property {'none'} NONE - No gas estimate available. - */ - /** * These are already declared in @metamask/controllers but importing them from * that module and re-exporting causes the UI bundle size to expand beyond 4MB - * - * @type {GasEstimateTypes} */ export const GAS_ESTIMATE_TYPES = { FEE_MARKET: 'fee-market', diff --git a/shared/constants/metametrics.js b/shared/constants/metametrics.js index 1751c2a55..f2dc0f6f0 100644 --- a/shared/constants/metametrics.js +++ b/shared/constants/metametrics.js @@ -164,9 +164,6 @@ * trait * @property {'networks_added'} NETWORKS_ADDED - when user modifies networks * we identify the networks_added trait - * @property {'networks_without_ticker'} NETWORKS_WITHOUT_TICKER - when user - * modifies networks we identify the networks_without_ticker trait for - * networks without a ticker. * @property {'nft_autodetection_enabled'} NFT_AUTODETECTION_ENABLED - when Autodetect NFTs * feature is toggled we identify the nft_autodetection_enabled trait * @property {'number_of_accounts'} NUMBER_OF_ACCOUNTS - when identities @@ -181,8 +178,6 @@ * @property {'three_box_enabled'} THREE_BOX_ENABLED - when 3box feature is * toggled we identify the 3box_enabled trait * @property {'theme'} THEME - when the user's theme changes we identify the theme trait - * @property {'token_detection_enabled'} TOKEN_DETECTION_ENABLED - when token detection feature is toggled we - * identify the token_detection_enabled trait */ /** @@ -194,7 +189,6 @@ export const TRAITS = { ADDRESS_BOOK_ENTRIES: 'address_book_entries', LEDGER_CONNECTION_TYPE: 'ledger_connection_type', NETWORKS_ADDED: 'networks_added', - NETWORKS_WITHOUT_TICKER: 'networks_without_ticker', NFT_AUTODETECTION_ENABLED: 'nft_autodetection_enabled', NUMBER_OF_ACCOUNTS: 'number_of_accounts', NUMBER_OF_NFT_COLLECTIONS: 'number_of_nft_collections', @@ -203,7 +197,6 @@ export const TRAITS = { OPENSEA_API_ENABLED: 'opensea_api_enabled', THREE_BOX_ENABLED: 'three_box_enabled', THEME: 'theme', - TOKEN_DETECTION_ENABLED: 'token_detection_enabled', }; /** @@ -214,9 +207,6 @@ export const TRAITS = { * type of ledger connection set by user preference. * @property {Array} [networks_added] - An array consisting of chainIds * that indicate the networks a user has added to their MetaMask. - * @property {Array} [networks_without_ticker] - An array consisting of - * chainIds that indicate the networks added by the user that do not have a - * ticker. * @property {number} [nft_autodetection_enabled] - does the user have the * use collection/nft detection enabled? * @property {number} [number_of_accounts] - A number representing the number @@ -232,7 +222,6 @@ export const TRAITS = { * @property {boolean} [three_box_enabled] - does the user have 3box sync * enabled? * @property {string} [theme] - which theme the user has selected - * @property {boolean} [token_detection_enabled] - does the user have token detection is enabled? */ // Mixpanel converts the zero address value to a truly anonymous event, which @@ -276,15 +265,10 @@ export const REJECT_NOTFICIATION_CLOSE_SIG = */ export const EVENT_NAMES = { + SIGNATURE_REQUESTED: 'Signature Requested', ENCRYPTION_PUBLIC_KEY_REQUESTED: 'Encryption Public Key Requested', DECRYPTION_REQUESTED: 'Decryption Requested', PERMISSIONS_REQUESTED: 'Permissions Requested', - SIGNATURE_REQUESTED: 'Signature Requested', - TOKEN_ADDED: 'Token Added', - TOKEN_DETECTED: 'Token Detected', - TOKEN_HIDDEN: 'Token Hidden', - TOKEN_IMPORT_CANCELED: 'Token Import Canceled', - TOKEN_IMPORT_CLICKED: 'Token Import Clicked', }; export const EVENT = { @@ -304,25 +288,4 @@ export const EVENT = { TRANSACTIONS: 'Transactions', WALLET: 'Wallet', }, - SOURCE: { - SWAPS: { - MAIN_VIEW: 'Main View', - TOKEN_VIEW: 'Token View', - }, - TRANSACTION: { - USER: 'user', - DAPP: 'dapp', - }, - TOKEN: { - CUSTOM: 'custom', - DETECTED: 'detected', - DAPP: 'dapp', - LIST: 'list', - }, - }, - LOCATION: { - TOKEN_DETECTION: 'token_detection', - TOKEN_MENU: 'token_menu', - TOKEN_DETAILS: 'token_details', - }, }; diff --git a/shared/constants/network.js b/shared/constants/network.js index 11f7803a6..8036f36d4 100644 --- a/shared/constants/network.js +++ b/shared/constants/network.js @@ -236,11 +236,6 @@ export const BUYABLE_CHAINS_MAP = { defaultCurrencyCode: 'eth', showOnlyCurrencies: 'eth,usdt,usdc,dai', }, - wyre: { - srn: 'ethereum', - currencyCode: ETH_SYMBOL, - }, - coinbasePayCurrencies: [ETH_SYMBOL, 'USDC', 'DAI'], }, [ROPSTEN_CHAIN_ID]: { nativeCurrency: TEST_NETWORK_TICKER_MAP[ROPSTEN], @@ -275,10 +270,6 @@ export const BUYABLE_CHAINS_MAP = { defaultCurrencyCode: 'matic_polygon', showOnlyCurrencies: 'matic_polygon,usdc_polygon', }, - wyre: { - srn: 'matic', - currencyCode: MATIC_SYMBOL, - }, }, [AVALANCHE_CHAIN_ID]: { nativeCurrency: AVALANCHE_SYMBOL, @@ -288,11 +279,6 @@ export const BUYABLE_CHAINS_MAP = { defaultCurrencyCode: 'avax_cchain', showOnlyCurrencies: 'avax_cchain', }, - wyre: { - srn: 'avalanche', - currencyCode: AVALANCHE_SYMBOL, - }, - coinbasePayCurrencies: [AVALANCHE_SYMBOL], }, [FANTOM_CHAIN_ID]: { nativeCurrency: FANTOM_SYMBOL, diff --git a/shared/constants/permissions.js b/shared/constants/permissions.js index 77df6431f..c1e4e69e7 100644 --- a/shared/constants/permissions.js +++ b/shared/constants/permissions.js @@ -21,7 +21,6 @@ export const PermissionNamespaces = Object.freeze({ export const EndowmentPermissions = Object.freeze({ 'endowment:network-access': 'endowment:network-access', - 'endowment:long-running': 'endowment:long-running', }); // Methods / permissions in external packages that we are temporarily excluding. diff --git a/shared/constants/permissions.test.js b/shared/constants/permissions.test.js index 3637fed58..c6ace6243 100644 --- a/shared/constants/permissions.test.js +++ b/shared/constants/permissions.test.js @@ -1,4 +1,4 @@ -import { endowmentPermissionBuilders } from '@metamask/snap-controllers'; +import { endowmentPermissionBuilders } from '@metamask/controllers'; import { restrictedMethodPermissionBuilders } from '@metamask/rpc-methods'; import { EndowmentPermissions, diff --git a/shared/constants/smartTransactions.js b/shared/constants/smartTransactions.js deleted file mode 100644 index a77d993c7..000000000 --- a/shared/constants/smartTransactions.js +++ /dev/null @@ -1,5 +0,0 @@ -import { SECOND } from './time'; - -export const FALLBACK_SMART_TRANSACTIONS_REFRESH_TIME = SECOND * 10; -export const FALLBACK_SMART_TRANSACTIONS_DEADLINE = 180; -export const FALLBACK_SMART_TRANSACTIONS_MAX_FEE_MULTIPLIER = 2; diff --git a/shared/constants/swaps.js b/shared/constants/swaps.js index 8482709ca..10db41a2e 100644 --- a/shared/constants/swaps.js +++ b/shared/constants/swaps.js @@ -206,8 +206,3 @@ export const TOKEN_BUCKET_PRIORITY = { OWNED: 'owned', TOP: 'top', }; - -export const SLIPPAGE = { - DEFAULT: 2, - HIGH: 3, -}; diff --git a/shared/constants/transaction.js b/shared/constants/transaction.js index 8cb365f79..1e461f491 100644 --- a/shared/constants/transaction.js +++ b/shared/constants/transaction.js @@ -9,10 +9,6 @@ import { MESSAGE_TYPE } from './app'; * @property {'transferfrom'} TOKEN_METHOD_TRANSFER_FROM - A token transaction * transferring tokens from an account that the sender has an allowance of. * For more information on allowances, see the approve type. - * @property {'safetransferfrom'} TOKEN_METHOD_SAFE_TRANSFER_FROM - A token transaction - * transferring tokens from an account that the sender has an allowance of. - * The method is prefixed with safe because when calling this method the contract checks - * to ensure that the receiver is an address capable of handling with the token being sent. * @property {'approve'} TOKEN_METHOD_APPROVE - A token transaction requesting an * allowance of the token to spend on behalf of the user * @property {'incoming'} INCOMING - An incoming (deposit) transaction @@ -49,23 +45,23 @@ import { MESSAGE_TYPE } from './app'; */ export const TRANSACTION_TYPES = { CANCEL: 'cancel', - CONTRACT_INTERACTION: 'contractInteraction', - DEPLOY_CONTRACT: 'contractDeployment', - ETH_DECRYPT: MESSAGE_TYPE.ETH_DECRYPT, - ETH_GET_ENCRYPTION_PUBLIC_KEY: MESSAGE_TYPE.ETH_GET_ENCRYPTION_PUBLIC_KEY, - INCOMING: 'incoming', - PERSONAL_SIGN: MESSAGE_TYPE.PERSONAL_SIGN, RETRY: 'retry', - SIGN: MESSAGE_TYPE.ETH_SIGN, - SIGN_TYPED_DATA: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA, + TOKEN_METHOD_TRANSFER: 'transfer', + TOKEN_METHOD_TRANSFER_FROM: 'transferfrom', + TOKEN_METHOD_SAFE_TRANSFER_FROM: 'safetransferfrom', + TOKEN_METHOD_APPROVE: 'approve', + INCOMING: 'incoming', SIMPLE_SEND: 'simpleSend', - SMART: 'smart', + CONTRACT_INTERACTION: 'contractInteraction', + DEPLOY_CONTRACT: 'contractDeployment', SWAP: 'swap', SWAP_APPROVAL: 'swapApproval', - TOKEN_METHOD_APPROVE: 'approve', - TOKEN_METHOD_SAFE_TRANSFER_FROM: 'safetransferfrom', - TOKEN_METHOD_TRANSFER: 'transfer', - TOKEN_METHOD_TRANSFER_FROM: 'transferfrom', + SMART: 'smart', + SIGN: MESSAGE_TYPE.ETH_SIGN, + SIGN_TYPED_DATA: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA, + PERSONAL_SIGN: MESSAGE_TYPE.PERSONAL_SIGN, + ETH_DECRYPT: MESSAGE_TYPE.ETH_DECRYPT, + ETH_GET_ENCRYPTION_PUBLIC_KEY: MESSAGE_TYPE.ETH_GET_ENCRYPTION_PUBLIC_KEY, }; /** @@ -137,17 +133,6 @@ export const TRANSACTION_STATUSES = { PENDING: 'pending', }; -/** - * With this list we can detect if a transaction is still in progress. - */ -export const IN_PROGRESS_TRANSACTION_STATUSES = [ - TRANSACTION_STATUSES.UNAPPROVED, - TRANSACTION_STATUSES.APPROVED, - TRANSACTION_STATUSES.SIGNED, - TRANSACTION_STATUSES.SUBMITTED, - TRANSACTION_STATUSES.PENDING, -]; - /** * Transaction Group Status is a MetaMask construct to track the status of groups * of transactions. @@ -174,7 +159,6 @@ export const TRANSACTION_GROUP_STATUSES = { * @typedef {Object} SmartTransactionStatuses * @property {'cancelled'} CANCELLED - It can be cancelled for various reasons. * @property {'pending'} PENDING - Smart transaction is being processed. - * @property {'success'} SUCCESS - Smart transaction was successfully mined. */ /** @@ -214,10 +198,10 @@ export const SMART_TRANSACTION_STATUSES = { * @type {TransactionGroupCategories} */ export const TRANSACTION_GROUP_CATEGORIES = { - APPROVAL: 'approval', - INTERACTION: 'interaction', - RECEIVE: 'receive', SEND: 'send', + RECEIVE: 'receive', + INTERACTION: 'interaction', + APPROVAL: 'approval', SIGNATURE_REQUEST: 'signature-request', SWAP: 'swap', }; @@ -323,28 +307,13 @@ export const TRANSACTION_EVENTS = { SUBMITTED: 'Transaction Submitted', }; -/** - * @typedef {Object} AssetTypes - * @property {'NATIVE'} NATIVE - The native asset for the current network, such - * as ETH - * @property {'TOKEN'} TOKEN - An ERC20 token. - * @property {'COLLECTIBLE'} COLLECTIBLE - An ERC721 or ERC1155 token. - * @property {'UNKNOWN'} UNKNOWN - A transaction interacting with a contract - * that isn't a token method interaction will be marked as dealing with an - * unknown asset type. - */ - -/** - * This type will work anywhere you expect a string that can be one of the - * above asset types - * - * @typedef {AssetTypes[keyof AssetTypes]} AssetTypesString - */ - /** * The types of assets that a user can send - * - * @type {AssetTypes} + * 1. NATIVE - The native asset for the current network, such as ETH + * 2. TOKEN - An ERC20 token. + * 3. COLLECTIBLE - An ERC721 or ERC1155 token. + * 4. UNKNOWN - A transaction interacting with a contract that isn't a token + * method interaction will be marked as dealing with an unknown asset type. */ export const ASSET_TYPES = { NATIVE: 'NATIVE', diff --git a/shared/modules/mv3.utils.js b/shared/modules/mv3.utils.js deleted file mode 100644 index a990075b6..000000000 --- a/shared/modules/mv3.utils.js +++ /dev/null @@ -1,4 +0,0 @@ -import browser from 'webextension-polyfill'; - -export const isManifestV3 = () => - browser.runtime.getManifest().manifest_version === 3; diff --git a/test/data/mock-state.json b/test/data/mock-state.json index 231f05069..d856bb3b6 100644 --- a/test/data/mock-state.json +++ b/test/data/mock-state.json @@ -37,22 +37,6 @@ "1559": true } }, - "notifications": { - "test": { - "id": "test", - "origin": "local:http://localhost:8086/", - "createdDate": 1652967897732, - "readDate": null, - "message": "Hello, http://localhost:8086!" - }, - "test2": { - "id": "test2", - "origin": "local:http://localhost:8086/", - "createdDate": 1652967897732, - "readDate": 1652967897732, - "message": "Hello, http://localhost:8086!" - } - }, "cachedBalances": {}, "incomingTransactions": {}, "unapprovedTxs": { diff --git a/test/data/transaction-data.json b/test/data/transaction-data.json index b3f2b05c5..a5219dbdb 100644 --- a/test/data/transaction-data.json +++ b/test/data/transaction-data.json @@ -856,357 +856,5 @@ }, "hasRetried": false, "hasCancelled": false - }, - { - "nonce": "0x57", - "transactions": [ - { - "id": 1441203963845330, - "time": 1652206763566, - "status": "confirmed", - "metamaskNetworkId": "4", - "originalGasEstimate": "0x118e0", - "userEditedGasLimit": false, - "chainId": "0x4", - "loadingDefaults": false, - "dappSuggestedGasFees": { - "maxPriorityFeePerGas": "0x3B9ACA00", - "maxFeePerGas": "0x7be830aec" - }, - "sendFlowHistory": [], - "txParams": { - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "nonce": "0x57", - "value": "0x0", - "data": "0x42842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7cc", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "origin": "https://rinkeby.etherscan.io", - "type": "safetransferfrom", - "userFeeLevel": "dappSuggested", - "defaultGasEstimates": { - "estimateType": "dappSuggested", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "estimatedBaseFee": "3ba182755", - "nonceDetails": { - "params": { - "highestLocallyConfirmed": 87, - "highestSuggested": 87, - "nextNetworkNonce": 87 - }, - "local": { - "name": "local", - "nonce": 87, - "details": { - "startPoint": 87, - "highest": 87 - } - }, - "network": { - "name": "network", - "nonce": 87, - "details": { - "blockNumber": "0xa28e38", - "baseCount": 87 - } - } - }, - "r": "0xd13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791c", - "s": "0x7a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "v": "0x00", - "rawTx": "0x02f8d10457843b9aca008507be830aec830118e094f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86442842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7ccc080a0d13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791ca07a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "hash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "submittedTime": 1652206777046, - "txReceipt": { - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "contractAddress": null, - "cumulativeGasUsed": "fd5dee", - "effectiveGasPrice": "0x4028dcaf1", - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "gasUsed": "bb40", - "logs": [ - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "45", - "removed": false, - "topics": [ - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - }, - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "46", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - } - ], - "logsBloom": "0x00000000000000001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020800000000000000000800000000000000000000000010000000000000000000000000000080000010000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000202000000000000000000000800000000000000000000000000000020000010000000000002008000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23", - "type": "0x2" - }, - "baseFeePerGas": "0x3c6f300f1", - "blockTimestamp": "627aacc2" - } - ], - "initialTransaction": { - "id": 1441203963845330, - "time": 1652206763566, - "status": "confirmed", - "metamaskNetworkId": "4", - "originalGasEstimate": "0x118e0", - "userEditedGasLimit": false, - "chainId": "0x4", - "loadingDefaults": false, - "dappSuggestedGasFees": { - "maxPriorityFeePerGas": "0x3B9ACA00", - "maxFeePerGas": "0x7be830aec" - }, - "sendFlowHistory": [], - "txParams": { - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "nonce": "0x57", - "value": "0x0", - "data": "0x42842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7cc", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "origin": "https://rinkeby.etherscan.io", - "type": "safetransferfrom", - "userFeeLevel": "dappSuggested", - "defaultGasEstimates": { - "estimateType": "dappSuggested", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "estimatedBaseFee": "3ba182755", - "nonceDetails": { - "params": { - "highestLocallyConfirmed": 87, - "highestSuggested": 87, - "nextNetworkNonce": 87 - }, - "local": { - "name": "local", - "nonce": 87, - "details": { - "startPoint": 87, - "highest": 87 - } - }, - "network": { - "name": "network", - "nonce": 87, - "details": { - "blockNumber": "0xa28e38", - "baseCount": 87 - } - } - }, - "r": "0xd13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791c", - "s": "0x7a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "v": "0x00", - "rawTx": "0x02f8d10457843b9aca008507be830aec830118e094f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86442842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7ccc080a0d13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791ca07a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "hash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "submittedTime": 1652206777046, - "txReceipt": { - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "contractAddress": null, - "cumulativeGasUsed": "fd5dee", - "effectiveGasPrice": "0x4028dcaf1", - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "gasUsed": "bb40", - "logs": [ - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "45", - "removed": false, - "topics": [ - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - }, - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "46", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - } - ], - "logsBloom": "0x00000000000000001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020800000000000000000800000000000000000000000010000000000000000000000000000080000010000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000202000000000000000000000800000000000000000000000000000020000010000000000002008000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23", - "type": "0x2" - }, - "baseFeePerGas": "0x3c6f300f1", - "blockTimestamp": "627aacc2" - }, - "primaryTransaction": { - "id": 1441203963845330, - "time": 1652206763566, - "status": "confirmed", - "metamaskNetworkId": "4", - "originalGasEstimate": "0x118e0", - "userEditedGasLimit": false, - "chainId": "0x4", - "loadingDefaults": false, - "dappSuggestedGasFees": { - "maxPriorityFeePerGas": "0x3B9ACA00", - "maxFeePerGas": "0x7be830aec" - }, - "sendFlowHistory": [], - "txParams": { - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "nonce": "0x57", - "value": "0x0", - "data": "0x42842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7cc", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "origin": "https://rinkeby.etherscan.io", - "type": "safetransferfrom", - "userFeeLevel": "dappSuggested", - "defaultGasEstimates": { - "estimateType": "dappSuggested", - "gas": "0x118e0", - "maxFeePerGas": "0x7be830aec", - "maxPriorityFeePerGas": "0x3B9ACA00" - }, - "estimatedBaseFee": "3ba182755", - "nonceDetails": { - "params": { - "highestLocallyConfirmed": 87, - "highestSuggested": 87, - "nextNetworkNonce": 87 - }, - "local": { - "name": "local", - "nonce": 87, - "details": { - "startPoint": 87, - "highest": 87 - } - }, - "network": { - "name": "network", - "nonce": 87, - "details": { - "blockNumber": "0xa28e38", - "baseCount": 87 - } - } - }, - "r": "0xd13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791c", - "s": "0x7a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "v": "0x00", - "rawTx": "0x02f8d10457843b9aca008507be830aec830118e094f5de760f2e916647fd766b4ad9e85ff943ce3a2b80b86442842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98000000000000000000000000000000000000000000000000000000000009a7ccc080a0d13310569a8d5876e37788183034bfe4bc3b49c0663c5fd9b2bf13adf9b4791ca07a83d8840e7edcdf4fdedfd2bc1ce19775e54fd17f29ede5165591a1cf3febea", - "hash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "submittedTime": 1652206777046, - "txReceipt": { - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "contractAddress": null, - "cumulativeGasUsed": "fd5dee", - "effectiveGasPrice": "0x4028dcaf1", - "from": "0x806627172af48bd5b0765d3449a7def80d6576ff", - "gasUsed": "bb40", - "logs": [ - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "45", - "removed": false, - "topics": [ - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - }, - { - "address": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "blockHash": "0x75eb415f79d24f62821b979e3a5f0d4904b2381e973da5fadbddc046c701e3d1", - "blockNumber": "a28e39", - "data": "0x", - "logIndex": "46", - "removed": false, - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff", - "0x000000000000000000000000e7d522230eff653bb0a9b4385f0be0815420dd98", - "0x000000000000000000000000000000000000000000000000000000000009a7cc" - ], - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23" - } - ], - "logsBloom": "0x00000000000000001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000008000200000000000000000000000000008000000000000000000008000000000000000000000000000020800000000000000000800000000000000000000000010000000000000000000000000000080000010000000000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000202000000000000000000000800000000000000000000000000000020000010000000000002008000000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0xf5de760f2e916647fd766b4ad9e85ff943ce3a2b", - "transactionHash": "0xe8717d7b075f8bb555cd4bb9846659a7dfba70dc017a84782a2d23d21f948ee3", - "transactionIndex": "23", - "type": "0x2" - }, - "baseFeePerGas": "0x3c6f300f1", - "blockTimestamp": "627aacc2" - }, - "hasRetried": false, - "hasCancelled": false } ] diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index cd05e38e0..1b611b989 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -267,47 +267,6 @@ const completeImportSRPOnboardingFlow = async ( } }; -const completeImportSRPOnboardingFlowWordByWord = async ( - driver, - seedPhrase, - password, -) => { - // clicks the continue button on the welcome screen - await driver.findElement('.welcome-page__header'); - await driver.clickElement({ - text: enLocaleMessages.getStarted.message, - tag: 'button', - }); - - // clicks the "Import Wallet" option - await driver.clickElement({ text: 'Import wallet', tag: 'button' }); - - // clicks the "No thanks" option on the metametrics opt-in screen - await driver.clickElement('.btn-secondary'); - - const words = seedPhrase.split(' '); - for (const word of words) { - await driver.pasteIntoField( - `[data-testid="import-srp__srp-word-${words.indexOf(word)}"]`, - word, - ); - } - - await driver.fill('#password', password); - await driver.fill('#confirm-password', password); - - await driver.clickElement('[data-testid="create-new-vault__terms-checkbox"]'); - - await driver.clickElement({ text: 'Import', tag: 'button' }); - - // clicks through the success screen - await driver.findElement({ text: 'Congratulations', tag: 'div' }); - await driver.clickElement({ - text: enLocaleMessages.endOfFlowMessage10.message, - tag: 'button', - }); -}; - module.exports = { getWindowHandles, convertToHexValue, @@ -318,5 +277,4 @@ module.exports = { withFixtures, connectDappWithExtensionPopup, completeImportSRPOnboardingFlow, - completeImportSRPOnboardingFlowWordByWord, }; diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js deleted file mode 100644 index 66d100051..000000000 --- a/test/e2e/snaps/enums.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/test-snaps/0.4.0', -}; diff --git a/test/e2e/snaps/test-snap-bip-44.spec.js b/test/e2e/snaps/test-snap-bip-44.spec.js index e1529fd28..689e62b03 100644 --- a/test/e2e/snaps/test-snap-bip-44.spec.js +++ b/test/e2e/snaps/test-snap-bip-44.spec.js @@ -1,6 +1,5 @@ const { strict: assert } = require('assert'); const { withFixtures } = require('../helpers'); -const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); describe('Test Snap bip-44', function () { it('can pop up bip-44 snap and get private key result', async function () { @@ -30,7 +29,7 @@ describe('Test Snap bip-44', function () { await driver.press('#password', driver.Key.ENTER); // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); + await driver.driver.get('https://metamask.github.io/test-snaps/0.1.3/'); await driver.fill('.snapId3', 'npm:@metamask/test-snap-bip44'); await driver.clickElement({ text: 'Connect BIP-44 Snap', diff --git a/test/e2e/snaps/test-snap-confirm.spec.js b/test/e2e/snaps/test-snap-confirm.spec.js index ba5212e85..95726b9f6 100644 --- a/test/e2e/snaps/test-snap-confirm.spec.js +++ b/test/e2e/snaps/test-snap-confirm.spec.js @@ -1,6 +1,5 @@ const { strict: assert } = require('assert'); const { withFixtures } = require('../helpers'); -const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); describe('Test Snap Confirm', function () { it('can pop up a snap confirm and get its result', async function () { @@ -30,7 +29,7 @@ describe('Test Snap Confirm', function () { await driver.press('#password', driver.Key.ENTER); // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); + await driver.driver.get('https://metamask.github.io/test-snaps/0.1.3'); await driver.fill('.snapId1', 'npm:@metamask/test-snap-confirm'); await driver.clickElement({ text: 'Connect To Confirm Snap', @@ -70,7 +69,10 @@ describe('Test Snap Confirm', function () { await driver.waitUntilXWindowHandles(1, 5000, 10000); windowHandles = await driver.getAllWindowHandles(); await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.clickElement('.sendConfirmButton'); + await driver.clickElement({ + text: 'Send Inputs to Hello Snap', + tag: 'button', + }); // hit 'approve' on the custom confirm await driver.waitUntilXWindowHandles(2, 5000, 10000); diff --git a/test/e2e/snaps/test-snap-error.spec.js b/test/e2e/snaps/test-snap-error.spec.js index e8fcb49c1..1dac04ac5 100644 --- a/test/e2e/snaps/test-snap-error.spec.js +++ b/test/e2e/snaps/test-snap-error.spec.js @@ -1,7 +1,6 @@ const { strict: assert } = require('assert'); const { withFixtures } = require('../helpers'); const { PAGES } = require('../webdriver/driver'); -const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); describe('Test Snap Error', function () { it('can pop up a snap error and see the error', async function () { @@ -29,7 +28,7 @@ describe('Test Snap Error', function () { await driver.press('#password', driver.Key.ENTER); // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); + await driver.driver.get('https://metamask.github.io/test-snaps/0.1.3'); await driver.fill('.snapId2', 'npm:@metamask/test-snap-error'); await driver.clickElement({ text: 'Connect Error Snap', diff --git a/test/e2e/snaps/test-snap-managestate.spec.js b/test/e2e/snaps/test-snap-managestate.spec.js deleted file mode 100644 index fbf2ec76c..000000000 --- a/test/e2e/snaps/test-snap-managestate.spec.js +++ /dev/null @@ -1,142 +0,0 @@ -const { strict: assert } = require('assert'); -const { withFixtures } = require('../helpers'); -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 () { - const ganacheOptions = { - accounts: [ - { - secretKey: - '0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', - balance: 25000000000000000000, - }, - ], - }; - await withFixtures( - { - fixtures: 'imported-account', - ganacheOptions, - title: this.test.title, - driverOptions: { - type: 'flask', - }, - }, - async ({ driver }) => { - await driver.navigate(); - - // enter pw into extension - await driver.fill('#password', 'correct horse battery staple'); - await driver.press('#password', driver.Key.ENTER); - - // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); - await driver.fill('.snapId3', 'npm:@metamask/test-snap-managestate'); - await driver.clickElement({ - text: 'Connect manageState Snap', - tag: 'button', - }); - - // switch to metamask extension and click connect - await driver.waitUntilXWindowHandles(2, 5000, 10000); - let windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - 'MetaMask Notification', - windowHandles, - ); - await driver.clickElement( - { - text: 'Connect', - tag: 'button', - }, - 10000, - ); - - await driver.delay(2000); - - // approve install of snap - await driver.waitUntilXWindowHandles(2, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - 'MetaMask Notification', - windowHandles, - ); - await driver.clickElement({ - text: 'Approve & Install', - tag: 'button', - }); - - // fill and click send inputs on test snap page - await driver.waitUntilXWindowHandles(1, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.fill('.dataManageState', '23'); - await driver.clickElement({ - text: 'Send data to manageState Snap', - tag: 'button', - }); - - // check the results of the public key test - await driver.delay(2000); - const manageStateResult = await driver.findElement( - '.sendManageStateResult', - ); - assert.equal(await manageStateResult.getText(), 'true'); - - // click get results - await driver.waitUntilXWindowHandles(1, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.clickElement({ - text: 'Get data from manageState Snap', - tag: 'button', - }); - - // check the results - await driver.delay(2000); - const retrieveManageStateResult = await driver.findElement( - '.retrieveManageStateResult', - ); - assert.equal( - await retrieveManageStateResult.getText(), - '{"testState":["23"]}', - ); - - // click clear results - await driver.waitUntilXWindowHandles(1, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.clickElement({ - text: 'Clear data of manageState Snap', - tag: 'button', - }); - - // check if true - await driver.delay(2000); - const clearManageStateResult = await driver.findElement( - '.clearManageStateResult', - ); - assert.equal(await clearManageStateResult.getText(), 'true'); - - // click get results again - await driver.waitUntilXWindowHandles(1, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.clickElement({ - text: 'Get data from manageState Snap', - tag: 'button', - }); - - // check result array is empty - await driver.delay(2000); - const retrieveManageStateResult2 = await driver.findElement( - '.retrieveManageStateResult', - ); - assert.equal( - await retrieveManageStateResult2.getText(), - '{"testState":[]}', - ); - }, - ); - }); -}); diff --git a/test/e2e/snaps/test-snap-notification.spec.js b/test/e2e/snaps/test-snap-notification.spec.js deleted file mode 100644 index 01359cf84..000000000 --- a/test/e2e/snaps/test-snap-notification.spec.js +++ /dev/null @@ -1,110 +0,0 @@ -const { strict: assert } = require('assert'); -const { withFixtures } = require('../helpers'); -const { PAGES } = require('../webdriver/driver'); -const { TEST_SNAPS_WEBSITE_URL } = require('./enums'); - -describe('Test Snap Notification', function () { - it('can send 1 correctly read inapp notification', async function () { - const ganacheOptions = { - accounts: [ - { - secretKey: - '0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', - balance: 25000000000000000000, - }, - ], - }; - await withFixtures( - { - fixtures: 'imported-account', - ganacheOptions, - title: this.test.title, - driverOptions: { - type: 'flask', - }, - }, - async ({ driver }) => { - await driver.navigate(); - - // enter pw into extension - await driver.fill('#password', 'correct horse battery staple'); - await driver.press('#password', driver.Key.ENTER); - - // navigate to test snaps page and connect - await driver.driver.get(TEST_SNAPS_WEBSITE_URL); - await driver.fill('.snapId5', 'npm:@metamask/test-snap-notification'); - await driver.clickElement({ - text: 'Connect Notification Snap', - tag: 'button', - }); - - // switch to metamask extension and click connect - await driver.waitUntilXWindowHandles(2, 5000, 10000); - let windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - 'MetaMask Notification', - windowHandles, - ); - await driver.clickElement( - { - text: 'Connect', - tag: 'button', - }, - 10000, - ); - await driver.delay(2000); - - // approve install of snap - await driver.waitUntilXWindowHandles(2, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle( - 'MetaMask Notification', - windowHandles, - ); - await driver.clickElement({ - text: 'Approve & Install', - tag: 'button', - }); - - // click send inputs on test snap page - await driver.waitUntilXWindowHandles(1, 5000, 10000); - windowHandles = await driver.getAllWindowHandles(); - await driver.switchToWindowWithTitle('Test Snaps', windowHandles); - await driver.clickElement({ - text: 'Send InApp Notification', - tag: 'button', - }); - - // try to go to the MM pages - await driver.navigate(PAGES.HOME); - await driver.delay(1500); - - // check to see that there is one notification - const notificationResult = await driver.findElement( - '.account-menu__icon__notification-count', - ); - assert.equal(await notificationResult.getText(), '1'); - - // try to click on the account menu icon (via xpath) - await driver.clickElement('.account-menu__icon'); - await driver.delay(500); - - // try to click on the notification item (via xpath) - await driver.clickElement({ - text: 'Notifications', - tag: 'div', - }); - await driver.delay(500); - - // look for the correct text in notifications (via xpath) - const notificationResultMessage = await driver.findElement( - '.notifications__item__details__message', - ); - assert.equal( - await notificationResultMessage.getText(), - 'TEST INAPP NOTIFICATION', - ); - }, - ); - }); -}); diff --git a/test/e2e/tests/auto-lock.spec.js b/test/e2e/tests/auto-lock.spec.js deleted file mode 100644 index dc27466d7..000000000 --- a/test/e2e/tests/auto-lock.spec.js +++ /dev/null @@ -1,53 +0,0 @@ -const { strict: assert } = require('assert'); -const { convertToHexValue, withFixtures } = require('../helpers'); - -describe('Auto-Lock Timer', function () { - const ganacheOptions = { - accounts: [ - { - secretKey: - '0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9', - balance: convertToHexValue(25000000000000000000), - }, - ], - }; - - it('should automatically lock the wallet once the idle time has elapsed', async function () { - await withFixtures( - { - fixtures: 'imported-account', - ganacheOptions, - title: this.test.title, - }, - async ({ driver }) => { - await driver.navigate(); - await driver.fill('#password', 'correct horse battery staple'); - await driver.press('#password', driver.Key.ENTER); - // Set Auto Lock Timer - await driver.clickElement('.account-menu__icon'); - await driver.clickElement({ text: 'Settings', tag: 'div' }); - await driver.clickElement({ text: 'Advanced', tag: 'div' }); - const sixSecsInMins = '0.1'; - const autoLockTimerInput = await driver.findElement( - '[data-testid="advanced-setting-auto-lock"] input', - ); - await driver.scrollToElement(autoLockTimerInput); - await autoLockTimerInput.fill(10081); - await driver.waitForSelector({ - css: '#autoTimeout-helper-text', - text: 'Lock time is too great', - }); - await autoLockTimerInput.fill(sixSecsInMins); - await driver.assertElementNotPresent('#autoTimeout-helper-text'); - await driver.clickElement( - '[data-testid="advanced-setting-auto-lock"] button', - ); - // Verify the wallet is loccked - const pageTitle = await driver.findElement('.unlock-page__title'); - const unlockButton = await driver.findElement('.unlock-page button'); - assert.equal(await pageTitle.getText(), 'Welcome Back!'); - assert.equal(await unlockButton.isDisplayed(), true); - }, - ); - }); -}); diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index dad19482c..49dd59059 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -1,5 +1,5 @@ const { strict: assert } = require('assert'); -const { convertToHexValue, withFixtures, largeDelayMs } = require('../helpers'); +const { convertToHexValue, withFixtures } = require('../helpers'); describe('Stores custom RPC history', function () { const ganacheOptions = { @@ -29,8 +29,6 @@ describe('Stores custom RPC history', function () { const rpcUrl = `http://127.0.0.1:${port}`; const networkName = 'Secondary Ganache Testnet'; - await driver.delay(largeDelayMs); - await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Add Network', tag: 'button' }); @@ -79,8 +77,6 @@ describe('Stores custom RPC history', function () { // duplicate network const duplicateRpcUrl = 'https://mainnet.infura.io/v3/'; - await driver.delay(largeDelayMs); - await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Add Network', tag: 'button' }); @@ -117,8 +113,6 @@ describe('Stores custom RPC history', function () { const newRpcUrl = 'http://localhost:8544'; const duplicateChainId = '0x539'; - await driver.delay(largeDelayMs); - await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Add Network', tag: 'button' }); @@ -160,8 +154,6 @@ describe('Stores custom RPC history', function () { await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); - await driver.delay(largeDelayMs); - await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); @@ -181,7 +173,6 @@ describe('Stores custom RPC history', function () { await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); - await driver.delay(largeDelayMs); await driver.clickElement('.network-display'); // only recent 3 are found and in correct order (most recent at the top) @@ -211,7 +202,6 @@ describe('Stores custom RPC history', function () { await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); - await driver.delay(largeDelayMs); await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Add Network', tag: 'button' }); diff --git a/test/e2e/tests/dapp-interactions.spec.js b/test/e2e/tests/dapp-interactions.spec.js index 40cef1b18..5f5c72e3d 100644 --- a/test/e2e/tests/dapp-interactions.spec.js +++ b/test/e2e/tests/dapp-interactions.spec.js @@ -64,7 +64,7 @@ describe('Dapp interactions', function () { ); }); - it('should connect a second Dapp despite MetaMask being locked', async function () { + it('should connect a second Dapp despite Metamask being locked', async function () { await withFixtures( { dapp: true, diff --git a/test/e2e/tests/edit-gas-fee.spec.js b/test/e2e/tests/edit-gas-fee.spec.js index 368cc712b..44d21889b 100644 --- a/test/e2e/tests/edit-gas-fee.spec.js +++ b/test/e2e/tests/edit-gas-fee.spec.js @@ -3,7 +3,9 @@ const { convertToHexValue, connectDappWithExtensionPopup, getWindowHandles, + largeDelayMs, withFixtures, + regularDelayMs, } = require('../helpers'); describe('Editing Confirm Transaction', function () { @@ -67,6 +69,7 @@ describe('Editing Confirm Transaction', function () { // confirms the transaction await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.delay(regularDelayMs); await driver.clickElement('[data-testid="home__activity-tab"]'); await driver.wait(async () => { @@ -121,35 +124,55 @@ describe('Editing Confirm Transaction', function () { tag: 'span', }); await driver.clickElement('[data-testid="edit-gas-fee-item-custom"]'); + await driver.delay(regularDelayMs); // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8'); + const maxBaseFee = await driver.findElement( + '[data-testid="base-fee-input"]', + ); + await maxBaseFee.clear(); + await maxBaseFee.sendKeys('8'); + await driver.delay(regularDelayMs); // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8'); + const priorityFee = await driver.findElement( + '[data-testid="priority-fee-input"]', + ); + await priorityFee.clear(); + await priorityFee.sendKeys('8'); + await driver.delay(regularDelayMs); // save default values await driver.clickElement('input[type="checkbox"]'); + await driver.delay(regularDelayMs); // edit gas limit await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); + await driver.delay(regularDelayMs); + const gasLimit = await driver.findElement( + '[data-testid="gas-limit-input"]', + ); + await gasLimit.clear(); + await gasLimit.sendKeys('100000'); + await driver.delay(regularDelayMs); // Submit gas fee changes await driver.clickElement({ text: 'Save', tag: 'button' }); + await driver.delay(largeDelayMs); // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(1) h6:nth-of-type(2)', - text: '0.0008 ETH', - }); - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(2) h6:nth-of-type(2)', - text: '2.2008 ETH', - }); + const editedTransactionAmounts = await driver.findElements( + '.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type', + ); + const editedTransactionAmount = editedTransactionAmounts[0]; + assert.equal(await editedTransactionAmount.getText(), '0.0008'); + + const editedTransactionFee = editedTransactionAmounts[1]; + assert.equal(await editedTransactionFee.getText(), '2.2008'); // confirms the transaction await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.delay(regularDelayMs); await driver.clickElement('[data-testid="home__activity-tab"]'); await driver.wait(async () => { @@ -203,6 +226,7 @@ describe('Editing Confirm Transaction', function () { // check transaction in extension popup const windowHandles = await getWindowHandles(driver, 3); await driver.switchToWindow(windowHandles.popup); + await driver.delay(largeDelayMs); await driver.waitForSelector({ text: '🌐' }); await driver.waitForSelector({ text: 'Site suggested', @@ -216,6 +240,7 @@ describe('Editing Confirm Transaction', function () { await driver.clickElement( '[data-testid="edit-gas-fee-item-dappSuggested"]', ); + await driver.delay(regularDelayMs); const transactionAmounts = await driver.findElements( '.currency-display-component__text', @@ -235,6 +260,7 @@ describe('Editing Confirm Transaction', function () { // confirms the transaction await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.delay(regularDelayMs); // transaction should correct values in activity tab await driver.switchToWindow(windowHandles.extension); diff --git a/test/e2e/tests/from-import-ui.spec.js b/test/e2e/tests/from-import-ui.spec.js index 41c63ccb1..dc31d1551 100644 --- a/test/e2e/tests/from-import-ui.spec.js +++ b/test/e2e/tests/from-import-ui.spec.js @@ -6,10 +6,9 @@ const { regularDelayMs, largeDelayMs, completeImportSRPOnboardingFlow, - completeImportSRPOnboardingFlowWordByWord, } = require('../helpers'); -describe('MetaMask Import UI', function () { +describe('Metamask Import UI', function () { it('Importing wallet using Secret Recovery Phrase', async function () { const ganacheOptions = { accounts: [ @@ -72,8 +71,7 @@ describe('MetaMask Import UI', function () { await driver.press('#password', driver.Key.ENTER); // Create a new account - // switches to localhost - await driver.delay(largeDelayMs); + // switches to locakhost await driver.clickElement('.network-display'); await driver.clickElement({ text: 'Localhost', tag: 'span' }); @@ -128,53 +126,6 @@ describe('MetaMask Import UI', function () { ); }); - it('Importing wallet using Secret Recovery Phrase with pasting word by word', async function () { - const ganacheOptions = { - accounts: [ - { - secretKey: - '0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9', - balance: convertToHexValue(25000000000000000000), - }, - ], - }; - const testSeedPhrase = - 'forum vessel pink push lonely enact gentle tail admit parrot grunt dress'; - const testPassword = 'correct horse battery staple'; - const testAddress = '0x0Cc5261AB8cE458dc977078A3623E2BaDD27afD3'; - - await withFixtures( - { - fixtures: 'onboarding', - ganacheOptions, - title: this.test.title, - failOnConsoleError: false, - }, - async ({ driver }) => { - await driver.navigate(); - - await completeImportSRPOnboardingFlowWordByWord( - driver, - testSeedPhrase, - testPassword, - ); - - // Show account information - await driver.clickElement( - '[data-testid="account-options-menu-button"]', - ); - await driver.clickElement( - '[data-testid="account-options-menu__account-details"]', - ); - await driver.findVisibleElement('.qr-code__wrapper'); - // shows the correct account address - const address = await driver.findElement('.qr-code__address'); - - assert.equal(await address.getText(), testAddress); - }, - ); - }); - it('Import Account using private key', async function () { const ganacheOptions = { accounts: [ diff --git a/test/e2e/tests/metamask-responsive-ui.spec.js b/test/e2e/tests/metamask-responsive-ui.spec.js index e51c449de..8daa2024f 100644 --- a/test/e2e/tests/metamask-responsive-ui.spec.js +++ b/test/e2e/tests/metamask-responsive-ui.spec.js @@ -2,7 +2,7 @@ const { strict: assert } = require('assert'); const { convertToHexValue, withFixtures, tinyDelayMs } = require('../helpers'); const enLocaleMessages = require('../../../app/_locales/en/messages.json'); -describe('MetaMask Responsive UI', function () { +describe('Metamask Responsive UI', function () { it('Creating a new wallet', async function () { const driverOptions = { responsive: true }; diff --git a/test/e2e/tests/send-edit.spec.js b/test/e2e/tests/send-edit.spec.js index 8060392f2..5c274acc2 100644 --- a/test/e2e/tests/send-edit.spec.js +++ b/test/e2e/tests/send-edit.spec.js @@ -1,5 +1,11 @@ const { strict: assert } = require('assert'); -const { convertToHexValue, withFixtures } = require('../helpers'); +const { + convertToHexValue, + withFixtures, + tinyDelayMs, + regularDelayMs, + largeDelayMs, +} = require('../helpers'); describe('Editing Confirm Transaction', function () { it('goes back from confirm page to edit eth value, gas price and gas limit', async function () { @@ -40,27 +46,36 @@ describe('Editing Confirm Transaction', function () { await driver.clickElement({ text: 'Next', tag: 'button' }); + await driver.delay(regularDelayMs); + await driver.clickElement({ text: 'Edit', tag: 'button' }); const [gasLimitInput, gasPriceInput] = await driver.findElements( 'input[type="number"]', ); + await gasPriceInput.fill('8'); + await driver.delay(tinyDelayMs); + await gasLimitInput.fill('100000'); + await driver.delay(largeDelayMs); + await driver.clickElement({ text: 'Save', tag: 'button' }); + await driver.delay(largeDelayMs); // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(1) h6:nth-of-type(2)', - text: '0.0008 ETH', - }); - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(2) h6:nth-of-type(2)', - text: '2.2008 ETH', - }); + const editedTransactionAmounts = await driver.findElements( + '.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type', + ); + const editedTransactionAmount = editedTransactionAmounts[0]; + assert.equal(await editedTransactionAmount.getText(), '0.0008'); + + const editedTransactionFee = editedTransactionAmounts[1]; + assert.equal(await editedTransactionFee.getText(), '2.2008'); // confirms the transaction await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.delay(regularDelayMs); await driver.clickElement('[data-testid="home__activity-tab"]'); await driver.wait(async () => { @@ -122,34 +137,55 @@ describe('Editing Confirm Transaction', function () { // open gas fee popover await driver.clickElement({ text: 'Edit', tag: 'button' }); + // show gas limit + await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); + await driver.delay(largeDelayMs); + // enter max fee - await driver.fill('[data-testid="base-fee-input"]', '8'); + const maxBaseFee = await driver.findElement( + '[data-testid="base-fee-input"]', + ); + await maxBaseFee.clear(); + await maxBaseFee.sendKeys('8'); + await driver.delay(regularDelayMs); // enter priority fee - await driver.fill('[data-testid="priority-fee-input"]', '8'); + const priorityFee = await driver.findElement( + '[data-testid="priority-fee-input"]', + ); + await priorityFee.clear(); + await priorityFee.sendKeys('8'); + await driver.delay(regularDelayMs); // edit gas limit - await driver.clickElement('[data-testid="advanced-gas-fee-edit"]'); - await driver.fill('[data-testid="gas-limit-input"]', '100000'); + const gasLimit = await driver.findElement( + '[data-testid="gas-limit-input"]', + ); + await gasLimit.clear(); + await gasLimit.sendKeys('100000'); + await driver.delay(regularDelayMs); // save default values await driver.clickElement('input[type="checkbox"]'); + await driver.delay(regularDelayMs); // Submit gas fee changes await driver.clickElement({ text: 'Save', tag: 'button' }); + await driver.delay(largeDelayMs); // has correct updated value on the confirm screen the transaction - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(1) h6:nth-of-type(2)', - text: '0.0008 ETH', - }); - await driver.waitForSelector({ - css: '.transaction-detail-item:nth-of-type(2) h6:nth-of-type(2)', - text: '2.2008 ETH', - }); + const editedTransactionAmounts = await driver.findElements( + '.transaction-detail-item__row .transaction-detail-item__detail-values .currency-display-component__text:last-of-type', + ); + const editedTransactionAmount = editedTransactionAmounts[0]; + assert.equal(await editedTransactionAmount.getText(), '0.0008'); + + const editedTransactionFee = editedTransactionAmounts[1]; + assert.equal(await editedTransactionFee.getText(), '2.2008'); // confirms the transaction await driver.clickElement({ text: 'Confirm', tag: 'button' }); + await driver.delay(regularDelayMs); await driver.clickElement('[data-testid="home__activity-tab"]'); await driver.wait(async () => { diff --git a/test/e2e/tests/send-eth.spec.js b/test/e2e/tests/send-eth.spec.js index e34ab5731..b69e1f1ea 100644 --- a/test/e2e/tests/send-eth.spec.js +++ b/test/e2e/tests/send-eth.spec.js @@ -225,6 +225,8 @@ describe('Send ETH from dapp using advanced gas controls', function () { }); const inputs = await driver.findElements('input[type="number"]'); const gasPriceInput = inputs[1]; + await gasPriceInput.press(driver.Key.BACK_SPACE); + await gasPriceInput.press(driver.Key.BACK_SPACE); await gasPriceInput.fill('100'); await driver.waitForSelector({ css: '.transaction-total-banner', diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index 630bd6683..ea6944b8d 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -15,9 +15,7 @@ function wrapElementWithAPI(element, driver) { element.press = (key) => element.sendKeys(key); element.fill = async (input) => { // The 'fill' method in playwright replaces existing input - await element.sendKeys( - Key.chord(driver.Key.MODIFIER, 'a', driver.Key.BACK_SPACE), - ); + await element.clear(); await element.sendKeys(input); }; element.waitForElementState = async (state, timeout) => { @@ -56,9 +54,6 @@ class Driver { BACK_SPACE: '\uE003', ENTER: '\uE007', SPACE: '\uE00D', - CONTROL: '\uE009', - COMMAND: '\uE03D', - MODIFIER: process.platform === 'darwin' ? Key.COMMAND : Key.CONTROL, }; } @@ -280,7 +275,9 @@ class Driver { await this.executeScript( `navigator.clipboard.writeText("${contentToPaste}")`, ); - await this.fill(element, Key.chord(this.Key.MODIFIER, 'v')); + const modifierKey = + process.platform === 'darwin' ? Key.COMMAND : Key.CONTROL; + await this.fill(element, Key.chord(modifierKey, 'v')); } // Navigation diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index 2595746c0..73f4892b3 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -2,102 +2,51 @@ import { MAINNET_CHAIN_ID } from '../../shared/constants/network'; const createGetSmartTransactionFeesApiResponse = () => { return { - tradeTxFees: { - // Approval tx. - cancelFees: [ - { maxFeePerGas: 2100001000, maxPriorityFeePerGas: 466503987 }, - { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, - { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470851 }, - { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, - { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010971 }, - { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, - { maxFeePerGas: 3720300164, maxPriorityFeePerGas: 826444778 }, - { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, - { maxFeePerGas: 4501571383, maxPriorityFeePerGas: 1000000000 }, - { maxFeePerGas: 4951733023, maxPriorityFeePerGas: 1100001000 }, - { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, - { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, - { maxFeePerGas: 6590774628, maxPriorityFeePerGas: 1464105324 }, - { maxFeePerGas: 7249858682, maxPriorityFeePerGas: 1610517320 }, - { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570663 }, - { maxFeePerGas: 8772344955, maxPriorityFeePerGas: 1948729500 }, - { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604399 }, - { maxFeePerGas: 10614556694, maxPriorityFeePerGas: 2357966983 }, - { maxFeePerGas: 11676022978, maxPriorityFeePerGas: 2593766039 }, - ], - feeEstimate: 42000000000000, - fees: [ - { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, - { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470850 }, - { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, - { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010970 }, - { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, - { maxFeePerGas: 3720300163, maxPriorityFeePerGas: 826444777 }, - { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, - { maxFeePerGas: 4501571382, maxPriorityFeePerGas: 999999999 }, - { maxFeePerGas: 4951733022, maxPriorityFeePerGas: 1100001000 }, - { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, - { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, - { maxFeePerGas: 6590774627, maxPriorityFeePerGas: 1464105324 }, - { maxFeePerGas: 7249858681, maxPriorityFeePerGas: 1610517320 }, - { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570662 }, - { maxFeePerGas: 8772344954, maxPriorityFeePerGas: 1948729500 }, - { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604398 }, - { maxFeePerGas: 10614556693, maxPriorityFeePerGas: 2357966982 }, - { maxFeePerGas: 11676022977, maxPriorityFeePerGas: 2593766039 }, - { maxFeePerGas: 12843636951, maxPriorityFeePerGas: 2853145236 }, - ], - gasLimit: 21000, - gasUsed: 21000, - }, - approvalTxFees: { - // Trade tx. - cancelFees: [ - { maxFeePerGas: 2100001000, maxPriorityFeePerGas: 466503987 }, - { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, - { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470851 }, - { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, - { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010971 }, - { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, - { maxFeePerGas: 3720300164, maxPriorityFeePerGas: 826444778 }, - { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, - { maxFeePerGas: 4501571383, maxPriorityFeePerGas: 1000000000 }, - { maxFeePerGas: 4951733023, maxPriorityFeePerGas: 1100001000 }, - { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, - { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, - { maxFeePerGas: 6590774628, maxPriorityFeePerGas: 1464105324 }, - { maxFeePerGas: 7249858682, maxPriorityFeePerGas: 1610517320 }, - { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570663 }, - { maxFeePerGas: 8772344955, maxPriorityFeePerGas: 1948729500 }, - { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604399 }, - { maxFeePerGas: 10614556694, maxPriorityFeePerGas: 2357966983 }, - { maxFeePerGas: 11676022978, maxPriorityFeePerGas: 2593766039 }, - ], - feeEstimate: 42000000000000, - fees: [ - { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, - { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470850 }, - { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, - { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010970 }, - { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, - { maxFeePerGas: 3720300163, maxPriorityFeePerGas: 826444777 }, - { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, - { maxFeePerGas: 4501571382, maxPriorityFeePerGas: 999999999 }, - { maxFeePerGas: 4951733022, maxPriorityFeePerGas: 1100001000 }, - { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, - { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, - { maxFeePerGas: 6590774627, maxPriorityFeePerGas: 1464105324 }, - { maxFeePerGas: 7249858681, maxPriorityFeePerGas: 1610517320 }, - { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570662 }, - { maxFeePerGas: 8772344954, maxPriorityFeePerGas: 1948729500 }, - { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604398 }, - { maxFeePerGas: 10614556693, maxPriorityFeePerGas: 2357966982 }, - { maxFeePerGas: 11676022977, maxPriorityFeePerGas: 2593766039 }, - { maxFeePerGas: 12843636951, maxPriorityFeePerGas: 2853145236 }, - ], - gasLimit: 21000, - gasUsed: 21000, - }, + cancelFees: [ + { maxFeePerGas: 2100001000, maxPriorityFeePerGas: 466503987 }, + { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, + { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470851 }, + { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, + { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010971 }, + { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, + { maxFeePerGas: 3720300164, maxPriorityFeePerGas: 826444778 }, + { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, + { maxFeePerGas: 4501571383, maxPriorityFeePerGas: 1000000000 }, + { maxFeePerGas: 4951733023, maxPriorityFeePerGas: 1100001000 }, + { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, + { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, + { maxFeePerGas: 6590774628, maxPriorityFeePerGas: 1464105324 }, + { maxFeePerGas: 7249858682, maxPriorityFeePerGas: 1610517320 }, + { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570663 }, + { maxFeePerGas: 8772344955, maxPriorityFeePerGas: 1948729500 }, + { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604399 }, + { maxFeePerGas: 10614556694, maxPriorityFeePerGas: 2357966983 }, + { maxFeePerGas: 11676022978, maxPriorityFeePerGas: 2593766039 }, + ], + feeEstimate: 42000000000000, + fees: [ + { maxFeePerGas: 2310003200, maxPriorityFeePerGas: 513154852 }, + { maxFeePerGas: 2541005830, maxPriorityFeePerGas: 564470850 }, + { maxFeePerGas: 2795108954, maxPriorityFeePerGas: 620918500 }, + { maxFeePerGas: 3074622644, maxPriorityFeePerGas: 683010970 }, + { maxFeePerGas: 3382087983, maxPriorityFeePerGas: 751312751 }, + { maxFeePerGas: 3720300163, maxPriorityFeePerGas: 826444777 }, + { maxFeePerGas: 4092333900, maxPriorityFeePerGas: 909090082 }, + { maxFeePerGas: 4501571382, maxPriorityFeePerGas: 999999999 }, + { maxFeePerGas: 4951733022, maxPriorityFeePerGas: 1100001000 }, + { maxFeePerGas: 5446911277, maxPriorityFeePerGas: 1210002200 }, + { maxFeePerGas: 5991607851, maxPriorityFeePerGas: 1331003630 }, + { maxFeePerGas: 6590774627, maxPriorityFeePerGas: 1464105324 }, + { maxFeePerGas: 7249858681, maxPriorityFeePerGas: 1610517320 }, + { maxFeePerGas: 7974851800, maxPriorityFeePerGas: 1771570662 }, + { maxFeePerGas: 8772344954, maxPriorityFeePerGas: 1948729500 }, + { maxFeePerGas: 9649588222, maxPriorityFeePerGas: 2143604398 }, + { maxFeePerGas: 10614556693, maxPriorityFeePerGas: 2357966982 }, + { maxFeePerGas: 11676022977, maxPriorityFeePerGas: 2593766039 }, + { maxFeePerGas: 12843636951, maxPriorityFeePerGas: 2853145236 }, + ], + gasLimit: 21000, + gasUsed: 21000, }; }; @@ -435,6 +384,11 @@ export const createSwapsMockStore = () => { }, ], }, + estimatedGas: { + txData: { + feeEstimate: 5435000587128155, + }, + }, }, }, appState: { diff --git a/ui/components/app/account-menu/account-menu.component.js b/ui/components/app/account-menu/account-menu.component.js index ada5e5577..eaa8e32e7 100644 --- a/ui/components/app/account-menu/account-menu.component.js +++ b/ui/components/app/account-menu/account-menu.component.js @@ -23,9 +23,6 @@ import { IMPORT_ACCOUNT_ROUTE, CONNECT_HARDWARE_ROUTE, DEFAULT_ROUTE, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - NOTIFICATIONS_ROUTE, - ///: END:ONLY_INCLUDE_IN } from '../../../helpers/constants/routes'; import TextField from '../../ui/text-field'; import SearchIcon from '../../ui/search-icon'; @@ -87,9 +84,6 @@ export default class AccountMenu extends Component { toggleAccountMenu: PropTypes.func, addressConnectedSubjectMap: PropTypes.object, originOfCurrentTab: PropTypes.string, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount: PropTypes.number, - ///: END:ONLY_INCLUDE_IN }; accountsRef; @@ -299,9 +293,6 @@ export default class AccountMenu extends Component { toggleAccountMenu, lockMetamask, history, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount, - ///: END:ONLY_INCLUDE_IN } = this.props; if (!isAccountMenuOpen) { @@ -359,7 +350,7 @@ export default class AccountMenu extends Component { }); history.push(NEW_ACCOUNT_ROUTE); }} - icon={} + icon={} text={t('createAccount')} /> } @@ -402,47 +393,20 @@ export default class AccountMenu extends Component { }} icon={ } text={t('connectHardwareWallet')} />
- { - ///: BEGIN:ONLY_INCLUDE_IN(flask) - <> - { - toggleAccountMenu(); - history.push(NOTIFICATIONS_ROUTE); - }} - icon={ -
- - {unreadNotificationsCount > 0 && ( -
- {unreadNotificationsCount} -
- )} -
- } - text={t('notifications')} - /> -
- - ///: END:ONLY_INCLUDE_IN - } { global.platform.openTab({ url: supportLink }); }} icon={ } @@ -464,7 +428,7 @@ export default class AccountMenu extends Component { }} icon={ } diff --git a/ui/components/app/account-menu/account-menu.container.js b/ui/components/app/account-menu/account-menu.container.js index 686270920..936c05eb6 100644 --- a/ui/components/app/account-menu/account-menu.container.js +++ b/ui/components/app/account-menu/account-menu.container.js @@ -13,9 +13,6 @@ import { getMetaMaskKeyrings, getOriginOfCurrentTab, getSelectedAddress, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - getUnreadNotificationsCount, - ///: END:ONLY_INCLUDE_IN } from '../../../selectors'; import AccountMenu from './account-menu.component'; @@ -31,9 +28,7 @@ function mapStateToProps(state) { const accounts = getMetaMaskAccountsOrdered(state); const origin = getOriginOfCurrentTab(state); const selectedAddress = getSelectedAddress(state); - ///: BEGIN:ONLY_INCLUDE_IN(flask) - const unreadNotificationsCount = getUnreadNotificationsCount(state); - ///: END:ONLY_INCLUDE_IN + return { isAccountMenuOpen, addressConnectedSubjectMap: getAddressConnectedSubjectMap(state), @@ -42,9 +37,6 @@ function mapStateToProps(state) { keyrings: getMetaMaskKeyrings(state), accounts, shouldShowAccountsSearch: accounts.length >= SHOW_SEARCH_ACCOUNTS_MIN_COUNT, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount, - ///: END:ONLY_INCLUDE_IN }; } diff --git a/ui/components/app/account-menu/index.scss b/ui/components/app/account-menu/index.scss index 11326f822..b5bb8846d 100644 --- a/ui/components/app/account-menu/index.scss +++ b/ui/components/app/account-menu/index.scss @@ -53,12 +53,6 @@ &__icon { margin-right: 8px; display: flex; - color: var(--color-icon-default); - - i { - text-align: center; - width: 24px; - } } &__text { @@ -106,9 +100,8 @@ & &__lock-button { @include H7; - padding: 0.25rem 0.5rem; - min-width: 59px; - width: auto; + padding: 3.5px 5px; + width: 59px; } &__accounts-container { @@ -129,7 +122,7 @@ scrollbar-width: auto; @media screen and (max-width: $break-small) { - max-height: 156px; + max-height: 228px; } .keyring-label { @@ -143,7 +136,6 @@ margin-top: 5px; margin-right: 10px; background-color: var(--color-background-alternative); - border: 1px solid var(--color-border-default); color: var(--color-text-default); font-weight: normal; letter-spacing: 0.5px; @@ -152,25 +144,6 @@ } } - &__notifications { - position: relative; - - &__count { - position: absolute; - display: flex; - align-items: center; - justify-content: center; - right: 0; - bottom: 0; - min-width: 12px; - min-height: 12px; - font-size: 8px; - border-radius: 50%; - background-color: var(--color-primary-default); - color: var(--color-primary-inverse); - } - } - &__no-accounts { @include H6; diff --git a/ui/components/app/advanced-gas-controls/index.scss b/ui/components/app/advanced-gas-controls/index.scss index 48e0d8707..e7b41ba31 100644 --- a/ui/components/app/advanced-gas-controls/index.scss +++ b/ui/components/app/advanced-gas-controls/index.scss @@ -21,6 +21,6 @@ } path { - fill: var(--color-icon-alternative); + fill: var(--color-icon-muted); } } diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js index 9aba43ec0..ddc0fd1ad 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-input-subtext/advanced-gas-fee-input-subtext.js @@ -25,7 +25,7 @@ function determineTrendInfo(trend, t) { case 'level': return { className: 'fa-arrow-right advanced-gas-fee-input-subtext__level', - color: 'var(--color-icon-alternative)', + color: 'var(--color-icon-default)', title: t('levelArrow'), }; default: diff --git a/ui/components/app/app-components.scss b/ui/components/app/app-components.scss index 3920e5372..62be2129b 100644 --- a/ui/components/app/app-components.scss +++ b/ui/components/app/app-components.scss @@ -89,6 +89,4 @@ @import 'detected-token/detected-token-address/index'; @import 'detected-token/detected-token-aggregators/index'; @import 'detected-token/detected-token-values/index'; -@import 'detected-token/detected-token-details/index'; -@import 'detected-token/detected-token-ignored-popover/index'; -@import 'detected-token/detected-token-selection-popover/index'; +@import 'detected-token/detected-token-details/index' diff --git a/ui/components/app/app-header/app-header.component.js b/ui/components/app/app-header/app-header.component.js index 8a97bddc5..c2a6a0926 100644 --- a/ui/components/app/app-header/app-header.component.js +++ b/ui/components/app/app-header/app-header.component.js @@ -20,9 +20,6 @@ export default class AppHeader extends PureComponent { disabled: PropTypes.bool, disableNetworkIndicator: PropTypes.bool, isAccountMenuOpen: PropTypes.bool, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount: PropTypes.number, - ///: END:ONLY_INCLUDE_IN onClick: PropTypes.func, }; @@ -69,9 +66,6 @@ export default class AppHeader extends PureComponent { selectedAddress, disabled, isAccountMenuOpen, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount, - ///: END:ONLY_INCLUDE_IN } = this.props; return ( @@ -96,15 +90,6 @@ export default class AppHeader extends PureComponent { }} > - { - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount > 0 && ( -
- {unreadNotificationsCount} -
- ) - ///: END:ONLY_INCLUDE_IN - }
) ); diff --git a/ui/components/app/app-header/app-header.container.js b/ui/components/app/app-header/app-header.container.js index e30049bc3..a7d632b6d 100644 --- a/ui/components/app/app-header/app-header.container.js +++ b/ui/components/app/app-header/app-header.container.js @@ -1,9 +1,6 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; -///: BEGIN:ONLY_INCLUDE_IN(flask) -import { getUnreadNotificationsCount } from '../../../selectors'; -///: END:ONLY_INCLUDE_IN import * as actions from '../../../store/actions'; import AppHeader from './app-header.component'; @@ -13,18 +10,11 @@ const mapStateToProps = (state) => { const { networkDropdownOpen } = appState; const { selectedAddress, isUnlocked, isAccountMenuOpen } = metamask; - ///: BEGIN:ONLY_INCLUDE_IN(flask) - const unreadNotificationsCount = getUnreadNotificationsCount(state); - ///: END:ONLY_INCLUDE_IN - return { networkDropdownOpen, selectedAddress, isUnlocked, isAccountMenuOpen, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - unreadNotificationsCount, - ///: END:ONLY_INCLUDE_IN }; }; diff --git a/ui/components/app/app-header/index.scss b/ui/components/app/app-header/index.scss index 8d5eb8c30..a5906af7f 100644 --- a/ui/components/app/app-header/index.scss +++ b/ui/components/app/app-header/index.scss @@ -86,23 +86,4 @@ width: 0; justify-content: flex-end; } - - .account-menu__icon { - position: relative; - - &__notification-count { - position: absolute; - display: flex; - align-items: center; - justify-content: center; - right: 0; - bottom: 0; - min-width: 16px; - min-height: 16px; - font-size: 10px; - border-radius: 50%; - background-color: var(--color-primary-default); - color: var(--color-primary-inverse); - } - } } diff --git a/ui/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js index 3ba7a0c7d..1b74985d7 100644 --- a/ui/components/app/asset-list/asset-list.js +++ b/ui/components/app/asset-list/asset-list.js @@ -1,8 +1,10 @@ -import React, { useContext, useState } from 'react'; +import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; +import { useHistory } from 'react-router-dom'; import ImportTokenLink from '../import-token-link'; import TokenList from '../token-list'; +import { IMPORT_TOKEN_ROUTE } from '../../../helpers/constants/routes'; import AssetListItem from '../asset-list-item'; import { PRIMARY, SECONDARY } from '../../../helpers/constants/common'; import { useUserPreferencedCurrency } from '../../../hooks/useUserPreferencedCurrency'; @@ -10,7 +12,7 @@ import { getCurrentAccountWithSendEtherInfo, getShouldShowFiat, getNativeCurrencyImage, - getDetectedTokensInCurrentNetwork, + getIsMainnet, } from '../../../selectors'; import { getNativeCurrency } from '../../../ducks/metamask/metamask'; import { useCurrencyDisplay } from '../../../hooks/useCurrencyDisplay'; @@ -25,14 +27,10 @@ import { import { useI18nContext } from '../../../hooks/useI18nContext'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { EVENT } from '../../../../shared/constants/metametrics'; -import DetectedToken from '../detected-token/detected-token'; -import DetectedTokensLink from './detetcted-tokens-link/detected-tokens-link'; const AssetList = ({ onClickAsset }) => { const t = useI18nContext(); - - const [showDetectedTokens, setShowDetectedTokens] = useState(false); - + const history = useHistory(); const selectedAccountBalance = useSelector( (state) => getCurrentAccountWithSendEtherInfo(state).balance, ); @@ -66,7 +64,7 @@ const AssetList = ({ onClickAsset }) => { }); const primaryTokenImage = useSelector(getNativeCurrencyImage); - const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork) || []; + const isMainnet = useSelector(getIsMainnet) || process.env.IN_TEST; return ( <> @@ -94,12 +92,7 @@ const AssetList = ({ onClickAsset }) => { }); }} /> - {process.env.TOKEN_DETECTION_V2 - ? detectedTokens.length > 0 && ( - - ) - : null} - 0 ? 0 : 4}> + { {t('missingToken')} - + { + history.push(IMPORT_TOKEN_ROUTE); + trackEvent({ + event: 'Clicked "Add Token"', + category: EVENT.CATEGORIES.NAVIGATION, + properties: { + action: 'Token Menu', + legacy_event: true, + }, + }); + }} + /> - {showDetectedTokens && ( - - )} ); }; diff --git a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.js b/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.js index f250067bb..a1aa3fb41 100644 --- a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.js +++ b/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.js @@ -1,4 +1,4 @@ -import React, { useContext } from 'react'; +import React from 'react'; import { useSelector } from 'react-redux'; import PropTypes from 'prop-types'; import classNames from 'classnames'; @@ -7,32 +7,11 @@ import Box from '../../../ui/box/box'; import Button from '../../../ui/button'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import { getDetectedTokensInCurrentNetwork } from '../../../../selectors'; -import { MetaMetricsContext } from '../../../../contexts/metametrics'; -import { - EVENT, - EVENT_NAMES, -} from '../../../../../shared/constants/metametrics'; -const DetectedTokensLink = ({ className = '', setShowDetectedTokens }) => { +const DetectedTokensLink = ({ className = '', onClick }) => { const t = useI18nContext(); - const trackEvent = useContext(MetaMetricsContext); - const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork); - const detectedTokensDetails = detectedTokens.map( - ({ address, symbol }) => `${symbol} - ${address}`, - ); - const onClick = () => { - setShowDetectedTokens(true); - trackEvent({ - event: EVENT_NAMES.TOKEN_IMPORT_CLICKED, - category: EVENT.CATEGORIES.WALLET, - properties: { - source: EVENT.SOURCE.TOKEN.DETECTED, - tokens: detectedTokensDetails, - }, - }); - }; return ( { }; DetectedTokensLink.propTypes = { - setShowDetectedTokens: PropTypes.func.isRequired, + onClick: PropTypes.func.isRequired, className: PropTypes.string, }; diff --git a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.stories.js b/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.stories.js deleted file mode 100644 index f7cbf629d..000000000 --- a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.stories.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; - -import testData from '../../../../../.storybook/test-data'; -import configureStore from '../../../../store/store'; -import DetectedTokensLink from './detected-tokens-link'; - -const store = configureStore(testData); - -export default { - title: 'Components/App/AssetList/DetectedTokensLink', - decorators: [(story) => {story()}], - id: __filename, - argTypes: { - setShowDetectedTokens: { control: 'func' }, - }, - args: { - setShowDetectedTokens: 'setShowDetectedTokensSpy', - }, -}; - -const Template = (args) => { - return ; -}; - -export const DefaultStory = Template.bind({}); - -DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.test.js b/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.test.js deleted file mode 100644 index 07248c2e5..000000000 --- a/ui/components/app/asset-list/detetcted-tokens-link/detected-tokens-link.test.js +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from 'react'; -import { - renderWithProvider, - screen, - fireEvent, -} from '../../../../../test/jest'; -import configureStore from '../../../../store/store'; -import testData from '../../../../../.storybook/test-data'; - -import DetectedTokensLink from './detected-tokens-link'; - -describe('DetectedTokensLink', () => { - let setShowDetectedTokensSpy; - const args = {}; - - beforeEach(() => { - setShowDetectedTokensSpy = jest.fn(); - args.setShowDetectedTokens = setShowDetectedTokensSpy; - }); - - it('should render number of tokens detected link', () => { - const store = configureStore(testData); - renderWithProvider(, store); - - expect( - screen.getByText('3 new tokens found in this account'), - ).toBeInTheDocument(); - - fireEvent.click(screen.getByText('3 new tokens found in this account')); - expect(setShowDetectedTokensSpy).toHaveBeenCalled(); - }); -}); diff --git a/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.js b/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.js index aa487cc6d..df1cf472f 100644 --- a/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.js +++ b/ui/components/app/cancel-speedup-popover/cancel-speedup-popover.js @@ -119,9 +119,7 @@ const CancelSpeedupPopover = () => { contentText={ {t('cancelSpeedUpTransactionTooltip', [ - editGasMode === EDIT_GAS_MODES.CANCEL - ? t('cancel') - : t('speedUp'), + EDIT_GAS_MODES.CANCEL ? t('cancel') : t('speedUp'), ])}
({ }), })); -jest.mock('../../ui/info-tooltip', () => jest.fn(() => null)); - const render = ( props, maxFeePerGas = MOCK_SUGGESTED_MEDIUM_MAXFEEPERGAS_HEX_WEI, @@ -114,10 +111,6 @@ const render = ( }; describe('CancelSpeedupPopover', () => { - afterEach(() => { - jest.clearAllMocks(); - }); - it('should have ❌Cancel in header if editGasMode is cancel', async () => { await act(async () => render()); expect(screen.queryByText('❌Cancel')).toBeInTheDocument(); @@ -128,24 +121,6 @@ describe('CancelSpeedupPopover', () => { expect(screen.queryByText('🚀Speed Up')).toBeInTheDocument(); }); - it('information tooltip should contain the correct text if editGasMode is cancel', async () => { - await act(async () => render()); - expect( - InfoTooltip.mock.calls[0][0].contentText.props.children[0], - ).toStrictEqual( - 'To Cancel a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.', - ); - }); - - it('information tooltip should contain the correct text if editGasMode is speedup', async () => { - await act(async () => render({ editGasMode: EDIT_GAS_MODES.SPEED_UP })); - expect( - InfoTooltip.mock.calls[0][0].contentText.props.children[0], - ).toStrictEqual( - 'To Speed Up a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.', - ); - }); - it('should show correct gas values, increased by 10%, when initial initial gas value is above estimated medium', async () => { await act(async () => render( diff --git a/ui/components/app/collectible-details/collectible-details.js b/ui/components/app/collectible-details/collectible-details.js index 5c8bf8e3a..4e7c433d4 100644 --- a/ui/components/app/collectible-details/collectible-details.js +++ b/ui/components/app/collectible-details/collectible-details.js @@ -311,7 +311,7 @@ export default function CollectibleDetails({ collectible }) { {copied ? ( t('copiedExclamation') ) : ( - + )} diff --git a/ui/components/app/collectibles-items/collectibles-items.js b/ui/components/app/collectibles-items/collectibles-items.js index 15e45b434..1027cda9f 100644 --- a/ui/components/app/collectibles-items/collectibles-items.js +++ b/ui/components/app/collectibles-items/collectibles-items.js @@ -168,11 +168,7 @@ export default function CollectiblesItems({ - + diff --git a/ui/components/app/collectibles-items/index.scss b/ui/components/app/collectibles-items/index.scss index 7087ac481..a2dc0dd58 100644 --- a/ui/components/app/collectibles-items/index.scss +++ b/ui/components/app/collectibles-items/index.scss @@ -47,9 +47,5 @@ height: 100%; cursor: pointer; } - - &__icon-chevron { - color: var(--color-icon-default); - } } } diff --git a/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.stories.js b/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.stories.js deleted file mode 100644 index 929082c4d..000000000 --- a/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.stories.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import ConfirmDetailRow from '.'; - -export default { - title: 'Components/App/ConfirmPageContainer/ConfirmDetailRow', - id: __filename, - argTypes: { - headerText: { - control: 'text', - }, - headerTextClassName: { - control: 'text', - }, - label: { - control: 'text', - }, - onHeaderClick: { - control: 'text', - }, - primaryValueTextColor: { - control: 'text', - }, - primaryText: { - control: 'text', - }, - secondaryText: { - control: 'text', - }, - value: { - control: 'text', - }, - }, - args: { - headerText: 'headerText', - headerTextClassName: 'headerTextClassName', - label: 'label', - onHeaderClick: 'onHeaderClick', - primaryValueTextColor: 'primaryValueTextColor', - primaryText: 'primaryText', - secondaryText: 'secondaryText', - value: 'value', - }, -}; - -export const DefaultStory = (args) => ; - -DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/confirm-page-container/confirm-detail-row/index.scss b/ui/components/app/confirm-page-container/confirm-detail-row/index.scss index cfb382f83..9645ef29b 100644 --- a/ui/components/app/confirm-page-container/confirm-detail-row/index.scss +++ b/ui/components/app/confirm-page-container/confirm-detail-row/index.scss @@ -9,7 +9,7 @@ @include H7; font-weight: 500; - color: var(--color-text-alternative); + color: var(--color-text-allternative); text-transform: uppercase; } @@ -26,7 +26,7 @@ } &__secondary { - color: var(--color-text-alternative); + color: var(--color-icon-default); justify-content: flex-end; } @@ -35,7 +35,7 @@ text-transform: uppercase; margin-bottom: 6px; - color: var(--color-text-default); + color: var(--color-icon-default); &--edit { color: var(--color-primary-default); diff --git a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js index 2d5fb8193..a83cc1e4e 100644 --- a/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js @@ -14,7 +14,6 @@ import NicknamePopovers from '../../../modals/nickname-popovers'; import Typography from '../../../../ui/typography'; import { TYPOGRAPHY } from '../../../../../helpers/constants/design-system'; import { ORIGIN_METAMASK } from '../../../../../../shared/constants/app'; -import SiteOrigin from '../../../../ui/site-origin'; const ConfirmPageContainerSummary = (props) => { const { @@ -86,10 +85,7 @@ const ConfirmPageContainerSummary = (props) => { return (
{origin === ORIGIN_METAMASK ? null : ( - +
{origin}
)}
diff --git a/ui/components/app/connected-accounts-list/connected-accounts-list.stories.js b/ui/components/app/connected-accounts-list/connected-accounts-list.stories.js deleted file mode 100644 index 48f79b19e..000000000 --- a/ui/components/app/connected-accounts-list/connected-accounts-list.stories.js +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react'; -import ConnectedAccountsList from '.'; - -export default { - title: 'Components/App/ConnectedAccountsList', - id: __filename, - argTypes: { - connectedAccounts: { - control: 'array', - }, - selectedAddress: { - control: 'text', - }, - shouldRenderListOptions: { - control: 'boolean', - }, - }, - args: { - connectedAccounts: [ - { - name: 'This is a Really Long Account Name', - address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4', - index: 0, - balance: '0x176e5b6f173ebe66', - }, - { - name: 'Account 2', - address: '0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e', - index: 1, - balance: '0x2d3142f5000', - }, - ], - }, -}; - -export const DefaultStory = (args) => ; - -DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/connected-sites-list/connected-sites-list.component.js b/ui/components/app/connected-sites-list/connected-sites-list.component.js index 7b23820c0..52245e7cb 100644 --- a/ui/components/app/connected-sites-list/connected-sites-list.component.js +++ b/ui/components/app/connected-sites-list/connected-sites-list.component.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import Button from '../../ui/button'; import SiteIcon from '../../ui/site-icon'; import { stripHttpsSchemeWithoutPort } from '../../../helpers/utils/util'; -import SiteOrigin from '../../ui/site-origin'; export default class ConnectedSitesList extends Component { static contextTypes = { @@ -34,11 +33,12 @@ export default class ConnectedSitesList extends Component { >
- + > + {this.getSubjectDisplayName(subject)} +
) : ( - - {`${aggregators.join(', ')}.`} + + {`${aggregatorsList.join(', ')}.`} ), ])} @@ -58,7 +44,7 @@ const DetectedTokenAggregators = ({ aggregators }) => { }; DetectedTokenAggregators.propTypes = { - aggregators: PropTypes.array.isRequired, + aggregatorsList: PropTypes.array.isRequired, }; export default DetectedTokenAggregators; diff --git a/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.stories.js b/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.stories.js index 42d97b208..c4c96b684 100644 --- a/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.stories.js +++ b/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.stories.js @@ -8,10 +8,10 @@ export default { title: 'Components/App/DetectedToken/DetectedTokenAggregators', id: __filename, argTypes: { - aggregators: { control: 'array' }, + aggregatorsList: { control: 'array' }, }, args: { - aggregators1: [ + aggregatorsList1: [ 'Aave', 'Bancor', 'CMC', @@ -25,15 +25,15 @@ export default { 'Zerion', '0x', ], - aggregators2: ['Aave', 'Bancor'], + aggregatorsList2: ['Aave', 'Bancor'], }, }; const Template = (args) => { return ( - - + + ); }; diff --git a/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.test.js b/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.test.js index 15f596b45..27757fb32 100644 --- a/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.test.js +++ b/ui/components/app/detected-token/detected-token-aggregators/detected-token-aggregators.test.js @@ -10,7 +10,7 @@ import DetectedTokenAggregators from './detected-token-aggregators'; describe('DetectedTokenAggregators', () => { const args = { - aggregators: [ + aggregatorsList: [ 'Aave', 'Bancor', 'CMC', diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.js index 0238b5a53..0b6d4d59a 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.js @@ -1,4 +1,5 @@ import React from 'react'; +import { useSelector } from 'react-redux'; import PropTypes from 'prop-types'; import Box from '../../../ui/box'; @@ -7,21 +8,17 @@ import DetectedTokenValues from '../detected-token-values/detected-token-values' import DetectedTokenAddress from '../detected-token-address/detected-token-address'; import DetectedTokenAggregators from '../detected-token-aggregators/detected-token-aggregators'; import { DISPLAY } from '../../../../helpers/constants/design-system'; +import { getTokenList } from '../../../../selectors'; + +const DetectedTokenDetails = ({ tokenAddress }) => { + const tokenList = useSelector(getTokenList); + const token = tokenList[tokenAddress]; -const DetectedTokenDetails = ({ - token, - handleTokenSelection, - tokensListDetected, -}) => { return ( - + - - - + + + ); }; DetectedTokenDetails.propTypes = { - token: PropTypes.shape({ - address: PropTypes.string.isRequired, - decimals: PropTypes.number, - symbol: PropTypes.string, - iconUrl: PropTypes.string, - aggregators: PropTypes.array, - }), - handleTokenSelection: PropTypes.func.isRequired, - tokensListDetected: PropTypes.object, + tokenAddress: PropTypes.string, }; export default DetectedTokenDetails; diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.stories.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.stories.js index 91a423708..fe95977f6 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.stories.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.stories.js @@ -6,77 +6,17 @@ export default { title: 'Components/App/DetectedToken/DetectedTokenDetails', id: __filename, argTypes: { - token: { control: 'object' }, - handleTokenSelection: { control: 'func' }, - tokensListDetected: { control: 'array' }, + address: { control: 'text' }, }, args: { - token: { - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - tokensListDetected: { - '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { - token: { - name: 'Synthetix Network', - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: - 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - selected: true, - }, - '0x514910771af9ca656af840dff83e8264ecf986ca': { - token: { - name: 'ChainLink Token', - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - iconUrl: - 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: ['coinGecko', 'oneInch', 'paraswap', 'zapper', 'zerion'], - }, - selected: true, - }, - }, + address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', }, }; const Template = (args) => { return (
- +
); }; diff --git a/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js b/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js index 559c568bc..4bebcb8eb 100644 --- a/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js +++ b/ui/components/app/detected-token/detected-token-details/detected-token-details.test.js @@ -11,66 +11,7 @@ import DetectedTokenDetails from './detected-token-details'; describe('DetectedTokenDetails', () => { const args = { - token: { - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'Aave', - 'Bancor', - 'CMC', - 'Crypto.com', - 'CoinGecko', - '1Inch', - 'Paraswap', - 'PMM', - 'Synthetix', - 'Zapper', - 'Zerion', - '0x', - ], - }, - handleTokenSelection: jest.fn(), - tokensListDetected: { - 0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f: { - token: { - name: 'Synthetix Network', - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: - 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - selected: true, - }, - 0x514910771af9ca656af840dff83e8264ecf986ca: { - token: { - name: 'ChainLink Token', - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - iconUrl: - 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: ['coinGecko', 'oneInch', 'paraswap', 'zapper', 'zerion'], - }, - selected: true, - }, - }, + tokenAddress: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', }; it('should render the detected token details', async () => { @@ -87,7 +28,7 @@ describe('DetectedTokenDetails', () => { fireEvent.click(screen.getByText('+ 10 more')); expect( screen.getByText( - 'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1Inch, Paraswap, PMM, Synthetix, Zapper, Zerion, 0x.', + 'Aave, Bancor, CMC, Crypto.com, CoinGecko, 1inch, Paraswap, PMM, Synthetix, Zapper, Zerion, 0x.', ), ).toBeInTheDocument(); }); diff --git a/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.js b/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.js deleted file mode 100644 index 25777ed49..000000000 --- a/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { useI18nContext } from '../../../../hooks/useI18nContext'; - -import Popover from '../../../ui/popover'; -import Button from '../../../ui/button'; -import Typography from '../../../ui/typography/typography'; -import { TYPOGRAPHY } from '../../../../helpers/constants/design-system'; - -const DetectedTokenIgnoredPopover = ({ - onCancelIgnore, - handleClearTokensSelection, -}) => { - const t = useI18nContext(); - - const footer = ( - <> - - - - ); - - return ( - - - {t('ignoreTokenWarning')} - - - ); -}; - -DetectedTokenIgnoredPopover.propTypes = { - onCancelIgnore: PropTypes.func.isRequired, - handleClearTokensSelection: PropTypes.func.isRequired, -}; - -export default DetectedTokenIgnoredPopover; diff --git a/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.stories.js b/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.stories.js deleted file mode 100644 index 74b15d581..000000000 --- a/ui/components/app/detected-token/detected-token-ignored-popover/detected-token-ignored-popover.stories.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; - -import DetectedTokenIgnoredPopover from './detected-token-ignored-popover'; - -export default { - title: 'Components/App/DetectedToken/DetectedTokenIgnoredPopover', - id: __filename, - argTypes: { - onCancelIgnore: { - control: 'func', - }, - handleClearTokensSelection: { - control: 'func', - }, - }, -}; - -const Template = (args) => { - return ; -}; - -export const DefaultStory = Template.bind({}); - -DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/detected-token/detected-token-ignored-popover/index.scss b/ui/components/app/detected-token/detected-token-ignored-popover/index.scss deleted file mode 100644 index 64e0d90bd..000000000 --- a/ui/components/app/detected-token/detected-token-ignored-popover/index.scss +++ /dev/null @@ -1,13 +0,0 @@ -.detected-token-ignored-popover { - &__ignore-button { - margin-inline-end: 8px; - } - - &__import-button { - margin-inline-start: 8px; - } - - .popover-header { - margin-inline-start: 85px; - } -} diff --git a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js b/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js deleted file mode 100644 index afabb4ead..000000000 --- a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js +++ /dev/null @@ -1,104 +0,0 @@ -import React, { useContext } from 'react'; -import PropTypes from 'prop-types'; -import { useSelector } from 'react-redux'; - -import { useI18nContext } from '../../../../hooks/useI18nContext'; -import { MetaMetricsContext } from '../../../../contexts/metametrics'; -import { - EVENT, - EVENT_NAMES, -} from '../../../../../shared/constants/metametrics'; -import { getDetectedTokensInCurrentNetwork } from '../../../../selectors'; - -import Popover from '../../../ui/popover'; -import Box from '../../../ui/box'; -import Button from '../../../ui/button'; -import DetectedTokenDetails from '../detected-token-details/detected-token-details'; - -const DetectedTokenSelectionPopover = ({ - tokensListDetected, - handleTokenSelection, - onImport, - onIgnoreAll, - setShowDetectedTokens, - sortingBasedOnTokenSelection, -}) => { - const t = useI18nContext(); - const trackEvent = useContext(MetaMetricsContext); - - const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork); - const { selected: selectedTokens = [] } = sortingBasedOnTokenSelection( - tokensListDetected, - ); - const numOfTokensImporting = - selectedTokens.length === detectedTokens.length - ? `All` - : `(${selectedTokens.length})`; - - const onClose = () => { - setShowDetectedTokens(false); - const eventTokensDetails = detectedTokens.map( - ({ address, symbol }) => `${symbol} - ${address}`, - ); - trackEvent({ - event: EVENT_NAMES.TOKEN_IMPORT_CANCELED, - category: EVENT.CATEGORIES.WALLET, - properties: { - source: EVENT.SOURCE.TOKEN.DETECTED, - tokens: eventTokensDetails, - }, - }); - }; - - const footer = ( - <> - - - - ); - - return ( - - - {detectedTokens.map((token, index) => { - return ( - - ); - })} - - - ); -}; - -DetectedTokenSelectionPopover.propTypes = { - tokensListDetected: PropTypes.object, - handleTokenSelection: PropTypes.func.isRequired, - onIgnoreAll: PropTypes.func.isRequired, - onImport: PropTypes.func.isRequired, - setShowDetectedTokens: PropTypes.func.isRequired, - sortingBasedOnTokenSelection: PropTypes.func.isRequired, -}; - -export default DetectedTokenSelectionPopover; diff --git a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.stories.js b/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.stories.js deleted file mode 100644 index 3d013615f..000000000 --- a/ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.stories.js +++ /dev/null @@ -1,69 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; - -import testData from '../../../../../.storybook/test-data'; -import configureStore from '../../../../store/store'; -import DetectedTokenSelectionPopover from './detected-token-selection-popover'; - -const store = configureStore(testData); - -export default { - title: 'Components/App/DetectedToken/DetectedTokenSelectionPopover', - decorators: [(story) => {story()}], - id: __filename, - argTypes: { - selectedTokens: { control: 'array' }, - handleTokenSelection: { control: 'func' }, - onImport: { control: 'func' }, - onIgnoreAll: { control: 'func' }, - }, - args: { - tokensListDetected: { - '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { - token: { - name: 'Synthetix Network', - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: - 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - selected: true, - }, - '0x514910771af9ca656af840dff83e8264ecf986ca': { - token: { - name: 'ChainLink Token', - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - iconUrl: - 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: ['coinGecko', 'oneInch', 'paraswap', 'zapper', 'zerion'], - }, - selected: true, - }, - }, - }, -}; - -const Template = (args) => { - return ; -}; - -export const DefaultStory = Template.bind({}); - -DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/detected-token/detected-token-selection-popover/index.scss b/ui/components/app/detected-token/detected-token-selection-popover/index.scss deleted file mode 100644 index 89cca42ce..000000000 --- a/ui/components/app/detected-token/detected-token-selection-popover/index.scss +++ /dev/null @@ -1,9 +0,0 @@ -.detected-token-selection-popover { - &__ignore-button { - margin-right: 8px; - } - - &__import-button { - margin-left: 8px; - } -} diff --git a/ui/components/app/detected-token/detected-token-values/detected-token-values.js b/ui/components/app/detected-token/detected-token-values/detected-token-values.js index b6c4f4648..d234b67c2 100644 --- a/ui/components/app/detected-token/detected-token-values/detected-token-values.js +++ b/ui/components/app/detected-token/detected-token-values/detected-token-values.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; import PropTypes from 'prop-types'; import Box from '../../../ui/box'; @@ -13,44 +13,32 @@ import { import { useTokenTracker } from '../../../../hooks/useTokenTracker'; import { useTokenFiatAmount } from '../../../../hooks/useTokenFiatAmount'; -const DetectedTokenValues = ({ - token, - handleTokenSelection, - tokensListDetected, -}) => { - const [tokenSelection, setTokenSelection] = useState(() => { - return tokensListDetected[token.address]?.selected; - }); - +const DetectedTokenValues = ({ token }) => { + const [selectedTokens, setSelectedTokens] = useState(false); const { tokensWithBalances } = useTokenTracker([token]); - const balanceString = tokensWithBalances[0]?.string; + const balanceToRender = tokensWithBalances[0]?.string; + const balance = tokensWithBalances[0]?.balance; const formattedFiatBalance = useTokenFiatAmount( token.address, - balanceString, + balanceToRender, token.symbol, ); - useEffect(() => { - setTokenSelection(tokensListDetected[token.address]?.selected); - }, [tokensListDetected, token.address, tokenSelection, setTokenSelection]); - - const handleCheckBoxSelection = () => { - setTokenSelection(!tokenSelection); - handleTokenSelection(token); - }; - return ( - {`${balanceString || '0'} ${token.symbol}`} + {`${balance || '0'} ${token.symbol}`} {formattedFiatBalance || '$0'} - + setSelectedTokens((checked) => !checked)} + /> ); @@ -64,8 +52,6 @@ DetectedTokenValues.propTypes = { iconUrl: PropTypes.string, aggregators: PropTypes.array, }), - handleTokenSelection: PropTypes.func.isRequired, - tokensListDetected: PropTypes.object, }; export default DetectedTokenValues; diff --git a/ui/components/app/detected-token/detected-token-values/detected-token-values.stories.js b/ui/components/app/detected-token/detected-token-values/detected-token-values.stories.js index 98c1a8e1a..6a3d12c39 100644 --- a/ui/components/app/detected-token/detected-token-values/detected-token-values.stories.js +++ b/ui/components/app/detected-token/detected-token-values/detected-token-values.stories.js @@ -6,75 +6,36 @@ export default { title: 'Components/App/DetectedToken/DetectedTokenValues', id: __filename, argTypes: { - token: { control: 'object' }, - handleTokenSelection: { control: 'func' }, - tokensListDetected: { control: 'array' }, + address: { control: 'text' }, + symbol: { control: 'text' }, + decimals: { control: 'text' }, + iconUrl: { control: 'text' }, + aggregators: { control: 'array' }, }, args: { - token: { - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - tokensListDetected: { - '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { - token: { - name: 'Synthetix Network', - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: - 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - selected: true, - }, - '0x514910771af9ca656af840dff83e8264ecf986ca': { - token: { - name: 'ChainLink Token', - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - iconUrl: - 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: ['coinGecko', 'oneInch', 'paraswap', 'zapper', 'zerion'], - }, - selected: true, - }, - }, + address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', + symbol: 'SNX', + decimals: 18, + iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', + aggregators: [ + 'aave', + 'bancor', + 'cmc', + 'cryptocom', + 'coinGecko', + 'oneInch', + 'paraswap', + 'pmm', + 'synthetix', + 'zapper', + 'zerion', + 'zeroEx', + ], }, }; const Template = (args) => { - return ; + return ; }; export const DefaultStory = Template.bind({}); diff --git a/ui/components/app/detected-token/detected-token-values/detected-token-values.test.js b/ui/components/app/detected-token/detected-token-values/detected-token-values.test.js index e94557eac..18a5aae86 100644 --- a/ui/components/app/detected-token/detected-token-values/detected-token-values.test.js +++ b/ui/components/app/detected-token/detected-token-values/detected-token-values.test.js @@ -7,71 +7,29 @@ import DetectedTokenValues from './detected-token-values'; describe('DetectedTokenValues', () => { const args = { - token: { - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'Aave', - 'Bancor', - 'CMC', - 'Crypto.com', - 'CoinGecko', - '1Inch', - 'Paraswap', - 'PMM', - 'Synthetix', - 'Zapper', - 'Zerion', - '0x', - ], - }, - handleTokenSelection: jest.fn(), - tokensListDetected: { - '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f': { - token: { - name: 'Synthetix Network', - address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - symbol: 'SNX', - decimals: 18, - iconUrl: - 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', - aggregators: [ - 'aave', - 'bancor', - 'cmc', - 'cryptocom', - 'coinGecko', - 'oneInch', - 'paraswap', - 'pmm', - 'synthetix', - 'zapper', - 'zerion', - 'zeroEx', - ], - }, - selected: true, - }, - '0x514910771af9ca656af840dff83e8264ecf986ca': { - token: { - name: 'ChainLink Token', - address: '0x514910771af9ca656af840dff83e8264ecf986ca', - symbol: 'LINK', - decimals: 18, - iconUrl: - 'https://crypto.com/price/coin-data/icon/LINK/color_icon.png', - aggregators: ['coinGecko', 'oneInch', 'paraswap', 'zapper', 'zerion'], - }, - selected: true, - }, - }, + address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', + symbol: 'SNX', + decimals: 18, + iconUrl: 'https://assets.coingecko.com/coins/images/3406/large/SNX.png', + aggregators: [ + 'aave', + 'bancor', + 'cmc', + 'cryptocom', + 'coinGecko', + 'oneInch', + 'paraswap', + 'pmm', + 'synthetix', + 'zapper', + 'zerion', + 'zeroEx', + ], }; it('should render the detected token address', async () => { const store = configureStore(testData); - renderWithProvider(, store); + renderWithProvider(, store); expect(screen.getByText('0 SNX')).toBeInTheDocument(); expect(screen.getByText('$0')).toBeInTheDocument(); diff --git a/ui/components/app/detected-token/detected-token.js b/ui/components/app/detected-token/detected-token.js deleted file mode 100644 index 0bfede9d1..000000000 --- a/ui/components/app/detected-token/detected-token.js +++ /dev/null @@ -1,159 +0,0 @@ -import React, { useState, useContext } from 'react'; -import PropTypes from 'prop-types'; -import { useSelector, useDispatch } from 'react-redux'; -import { chain } from 'lodash'; - -import { - importTokens, - ignoreTokens, - setNewTokensImported, -} from '../../../store/actions'; -import { getDetectedTokensInCurrentNetwork } from '../../../selectors'; -import { MetaMetricsContext } from '../../../contexts/metametrics'; - -import { TOKEN_STANDARDS } from '../../../helpers/constants/common'; -import { ASSET_TYPES } from '../../../../shared/constants/transaction'; -import { EVENT, EVENT_NAMES } from '../../../../shared/constants/metametrics'; -import DetectedTokenSelectionPopover from './detected-token-selection-popover/detected-token-selection-popover'; -import DetectedTokenIgnoredPopover from './detected-token-ignored-popover/detected-token-ignored-popover'; - -const sortingBasedOnTokenSelection = (tokensDetected) => { - return ( - chain(tokensDetected) - // get the values - .values() - // create a new object with keys 'selected', 'deselected' and group the tokens - .groupBy((token) => (token.selected ? 'selected' : 'deselected')) - // ditch the 'selected' property and get just the tokens' - .mapValues((group) => group.map(({ token }) => token)) - // Exit the chain and get the underlying value, an object. - .value() - ); -}; - -const DetectedToken = ({ setShowDetectedTokens }) => { - const dispatch = useDispatch(); - const trackEvent = useContext(MetaMetricsContext); - - const detectedTokens = useSelector(getDetectedTokensInCurrentNetwork); - - const [tokensListDetected, setTokensListDetected] = useState(() => - detectedTokens.reduce((tokenObj, token) => { - tokenObj[token.address] = { token, selected: true }; - return tokenObj; - }, {}), - ); - const [ - showDetectedTokenIgnoredPopover, - setShowDetectedTokenIgnoredPopover, - ] = useState(false); - - const importSelectedTokens = async (selectedTokens) => { - selectedTokens.forEach((importedToken) => { - trackEvent({ - event: EVENT_NAMES.TOKEN_ADDED, - category: EVENT.CATEGORIES.WALLET, - sensitiveProperties: { - token_symbol: importedToken.symbol, - token_contract_address: importedToken.address, - token_decimal_precision: importedToken.decimals, - source: EVENT.SOURCE.TOKEN.DETECTED, - token_standard: TOKEN_STANDARDS.ERC20, - asset_type: ASSET_TYPES.TOKEN, - }, - }); - }); - await dispatch(importTokens(selectedTokens)); - const tokenSymbols = selectedTokens.map(({ symbol }) => symbol); - dispatch(setNewTokensImported(tokenSymbols.join(', '))); - }; - - const handleClearTokensSelection = async () => { - const { - selected: selectedTokens = [], - deselected: deSelectedTokens = [], - } = sortingBasedOnTokenSelection(tokensListDetected); - - if (deSelectedTokens.length < detectedTokens.length) { - await importSelectedTokens(selectedTokens); - } - const tokensDetailsList = deSelectedTokens.map( - ({ symbol, address }) => `${symbol} - ${address}`, - ); - trackEvent({ - event: EVENT_NAMES.TOKEN_HIDDEN, - category: EVENT.CATEGORIES.WALLET, - sensitiveProperties: { - tokens: tokensDetailsList, - location: EVENT.LOCATION.TOKEN_DETECTION, - token_standard: TOKEN_STANDARDS.ERC20, - asset_type: ASSET_TYPES.TOKEN, - }, - }); - await dispatch(ignoreTokens(deSelectedTokens)); - setShowDetectedTokens(false); - }; - - const handleTokenSelection = (token) => { - setTokensListDetected((prevState) => ({ - ...prevState, - [token.address]: { - ...prevState[token.address], - selected: !prevState[token.address].selected, - }, - })); - }; - - const onImport = async () => { - const { selected: selectedTokens = [] } = sortingBasedOnTokenSelection( - tokensListDetected, - ); - - if (selectedTokens.length < detectedTokens.length) { - setShowDetectedTokenIgnoredPopover(true); - } else { - await importSelectedTokens(selectedTokens); - setShowDetectedTokens(false); - } - }; - - const onIgnoreAll = () => { - const newTokensListDetected = { ...tokensListDetected }; - for (const tokenAddress of Object.keys(tokensListDetected)) { - newTokensListDetected[tokenAddress].selected = false; - } - - setTokensListDetected(newTokensListDetected); - setShowDetectedTokenIgnoredPopover(true); - }; - - const onCancelIgnore = () => { - setShowDetectedTokenIgnoredPopover(false); - }; - - return ( - <> - {showDetectedTokenIgnoredPopover && ( - - )} - - - ); -}; - -DetectedToken.propTypes = { - setShowDetectedTokens: PropTypes.func.isRequired, -}; - -export default DetectedToken; diff --git a/ui/components/app/detected-token/detected-token.test.js b/ui/components/app/detected-token/detected-token.test.js deleted file mode 100644 index e130708f4..000000000 --- a/ui/components/app/detected-token/detected-token.test.js +++ /dev/null @@ -1,49 +0,0 @@ -import * as React from 'react'; -import { renderWithProvider, screen, fireEvent } from '../../../../test/jest'; -import configureStore from '../../../store/store'; -import testData from '../../../../.storybook/test-data'; - -import DetectedToken from './detected-token'; - -describe('DetectedToken', () => { - it('should render the detected token found page', async () => { - const store = configureStore(testData); - const props = { - setShowDetectedTokens: jest.fn(), - }; - - renderWithProvider(, store); - - expect(screen.getByText('0 LINK')).toBeInTheDocument(); - expect(screen.getByText('0 COMP')).toBeInTheDocument(); - expect(screen.getByText('0 FSW')).toBeInTheDocument(); - expect(screen.getAllByText('$0')).toHaveLength(3); - expect(screen.getAllByText('Token address:')).toHaveLength(3); - expect(screen.getByText('0x514...86CA')).toBeInTheDocument(); - expect(screen.getByText('0xc00...6888')).toBeInTheDocument(); - expect(screen.getByText('0xfff...26DB')).toBeInTheDocument(); - expect(screen.getAllByText('From token lists:')).toHaveLength(3); - expect(screen.getByText('coinGecko, oneInch')).toBeInTheDocument(); - expect(screen.getByText('+ 3 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 3 more')); - expect( - screen.getByText('coinGecko, oneInch, paraswap, zapper, zerion.'), - ).toBeInTheDocument(); - expect(screen.getByText('bancor, cmc')).toBeInTheDocument(); - expect(screen.getByText('+ 8 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 8 more')); - expect( - screen.getByText( - 'bancor, cmc, cryptocom, coinGecko, oneInch, paraswap, pmm, zapper, zerion, zeroEx.', - ), - ).toBeInTheDocument(); - expect(screen.getByText('aave, cmc')).toBeInTheDocument(); - expect(screen.getByText('+ 5 more')).toBeInTheDocument(); - fireEvent.click(screen.getByText('+ 5 more')); - expect( - screen.getByText( - 'aave, cmc, coinGecko, oneInch, paraswap, zapper, zerion.', - ), - ).toBeInTheDocument(); - }); -}); diff --git a/ui/components/app/detected-token/index.js b/ui/components/app/detected-token/index.js deleted file mode 100644 index 61c896efe..000000000 --- a/ui/components/app/detected-token/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './detected-token'; diff --git a/ui/components/app/dropdowns/network-dropdown.test.js b/ui/components/app/dropdowns/network-dropdown.test.js index d1a330fce..1a963c9e8 100644 --- a/ui/components/app/dropdowns/network-dropdown.test.js +++ b/ui/components/app/dropdowns/network-dropdown.test.js @@ -19,7 +19,6 @@ describe('Network Dropdown', () => { provider: { type: 'test', }, - showTestnetMessageInDropdown: false, preferences: { showTestNetworks: true, }, @@ -51,7 +50,6 @@ describe('Network Dropdown', () => { provider: { type: 'test', }, - showTestnetMessageInDropdown: false, preferences: { showTestNetworks: true, }, @@ -158,7 +156,6 @@ describe('Network Dropdown', () => { provider: { type: 'test', }, - showTestnetMessageInDropdown: false, preferences: { showTestNetworks: false, }, diff --git a/ui/components/app/edit-gas-display/index.scss b/ui/components/app/edit-gas-display/index.scss index ee0e13145..3af1e402c 100644 --- a/ui/components/app/edit-gas-display/index.scss +++ b/ui/components/app/edit-gas-display/index.scss @@ -28,8 +28,8 @@ button.edit-gas-display__dapp-acknowledgement-button { margin: 40px auto 0 auto; display: block; - color: var(--color-warning-default); - border: 1px solid var(--color-warning-default); + color: var(--color-secondary-default); + border: 1px solid var(--color-secondary-default); text-transform: unset; width: auto; background: transparent; diff --git a/ui/components/app/edit-gas-fee-button/edit-gas-fee-button.js b/ui/components/app/edit-gas-fee-button/edit-gas-fee-button.js index d872a2895..7f73181c9 100644 --- a/ui/components/app/edit-gas-fee-button/edit-gas-fee-button.js +++ b/ui/components/app/edit-gas-fee-button/edit-gas-fee-button.js @@ -80,22 +80,23 @@ export default function EditGasFeeButton({ userAcknowledgedGasMissing }) { - {transaction?.origin && ( - - {t('dappSuggestedTooltip', [transaction.origin])} - - )} + + {t('dappSuggestedTooltip', [transaction.origin])} + - {t('maxBaseFee')} {maxFeePerGas} + {t('maxBaseFee')} + {maxFeePerGas} - {t('maxPriorityFee')} {maxPriorityFeePerGas} + {t('maxPriorityFee')} + {maxPriorityFeePerGas} - {t('gasLimit')} {gasLimit} + {t('gasLimit')} + {gasLimit}
} diff --git a/ui/components/app/edit-gas-fee-button/index.scss b/ui/components/app/edit-gas-fee-button/index.scss index 448eab674..52c7cbaf4 100644 --- a/ui/components/app/edit-gas-fee-button/index.scss +++ b/ui/components/app/edit-gas-fee-button/index.scss @@ -47,10 +47,3 @@ } } } - - -// Overrides react-tippy - -.tippy-tooltip .tippy-tooltip-content .edit-gas-fee-button__tooltip { - min-width: 170px; -} diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-item/index.scss b/ui/components/app/edit-gas-fee-popover/edit-gas-item/index.scss index 8e8e2607a..ed6fd0035 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-item/index.scss +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-item/index.scss @@ -78,7 +78,7 @@ &__time-estimate-low, &__fee-estimate-high { - color: var(--color-warning-default); + color: var(--color-secondary-default); } &__time-estimate-medium, diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/index.scss b/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/index.scss index 0e354d33e..92d067dec 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/index.scss +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/index.scss @@ -17,7 +17,7 @@ } &__dialog { - background-color: var(--color-warning-default); + background-color: var(--color-secondary-default); border-radius: 30px; margin: 4px 0; text-align: center; diff --git a/ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/index.scss b/ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/index.scss index d8a89e0fc..1c295cbb9 100644 --- a/ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/index.scss +++ b/ui/components/app/edit-gas-fee-popover/network-statistics/status-slider/index.scss @@ -29,7 +29,7 @@ height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; - border-top: 10px solid var(--color-background-default); + border-top: 10px solid white; position: relative; margin-bottom: -2px; } diff --git a/ui/components/app/flask/snaps-authorship-pill/index.scss b/ui/components/app/flask/snaps-authorship-pill/index.scss index 90f4fa21b..a67d876d7 100644 --- a/ui/components/app/flask/snaps-authorship-pill/index.scss +++ b/ui/components/app/flask/snaps-authorship-pill/index.scss @@ -3,10 +3,6 @@ .snaps-authorship-pill { display: inline-block; - .chip { - padding-right: 8px; - } - &:hover, &:focus { .chip { @@ -16,14 +12,5 @@ } .snaps-authorship-icon { - color: var(--color-icon-alternative); -} - -.snaps-authorship-version { - border-radius: 100px; - line-height: 100%; -} - -.snaps-authorship-version > span { - vertical-align: middle; + color: var(--color-icon-default); } diff --git a/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.js b/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.js index 81eb07e1b..6625694b7 100644 --- a/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.js +++ b/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.js @@ -7,22 +7,9 @@ import Typography from '../../../ui/typography'; import { COLORS, TYPOGRAPHY, - TEXT_ALIGN, } from '../../../../helpers/constants/design-system'; -import { useI18nContext } from '../../../../hooks/useI18nContext'; -const snapIdPrefixes = ['npm:', 'local:']; - -const SnapsAuthorshipPill = ({ snapId, version, className }) => { - // @todo Use getSnapPrefix from snaps-skunkworks when possible - const snapPrefix = snapIdPrefixes.find((prefix) => snapId.startsWith(prefix)); - const packageName = snapId.replace(snapPrefix, ''); - const isNPM = snapPrefix === 'npm:'; - const url = isNPM - ? `https://www.npmjs.com/package/${packageName}` - : packageName; - const icon = isNPM ? 'fab fa-npm fa-lg' : 'fas fa-code'; - const t = useI18nContext(); +const SnapsAuthorshipPill = ({ packageName, className, url }) => { return (
{ - + } - rightIcon={ - version && ( - - - {t('shorthandVersion', [version])} - - - ) - } backgroundColor={COLORS.BACKGROUND_DEFAULT} > { SnapsAuthorshipPill.propTypes = { /** - * The id of the snap - */ - snapId: PropTypes.string, - /** - * The version of the snap + * NPM package name of the snap */ - version: PropTypes.string, + packageName: PropTypes.string, /** * The className of the SnapsAuthorshipPill */ className: PropTypes.string, + /** + * The url of the snap's package + */ + url: PropTypes.string, }; export default SnapsAuthorshipPill; diff --git a/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.stories.js b/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.stories.js index 3808ea5ba..2bd50d0df 100644 --- a/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.stories.js +++ b/ui/components/app/flask/snaps-authorship-pill/snaps-authorship-pill.stories.js @@ -6,7 +6,10 @@ export default { id: __filename, component: SnapsAuthorshipPill, argTypes: { - snapId: { + packageName: { + control: 'text', + }, + url: { control: 'text', }, }, @@ -17,5 +20,6 @@ export const DefaultStory = (args) => ; DefaultStory.storyName = 'Default'; DefaultStory.args = { - snapId: 'npm:@metamask/test-snap-bip44', + packageName: 'npm-package-name', + url: 'https://www.npmjs.com/package/@airswap/protocols', }; diff --git a/ui/components/app/gas-customization/advanced-gas-inputs/index.scss b/ui/components/app/gas-customization/advanced-gas-inputs/index.scss index 177078d9a..a389efc65 100644 --- a/ui/components/app/gas-customization/advanced-gas-inputs/index.scss +++ b/ui/components/app/gas-customization/advanced-gas-inputs/index.scss @@ -23,7 +23,7 @@ } .fa-info-circle { - color: var(--color-icon-alternative); + color: var(--color-icon-default); cursor: pointer; } @@ -41,7 +41,7 @@ &__warning-text { @include H7; - color: var(--color-warning-default); + color: var(--color-secondary-default); } &__input-wrapper { diff --git a/ui/components/app/gas-details-item/index.scss b/ui/components/app/gas-details-item/index.scss index c73c6f421..43b2da44b 100644 --- a/ui/components/app/gas-details-item/index.scss +++ b/ui/components/app/gas-details-item/index.scss @@ -1,6 +1,6 @@ .gas-details-item { &__gas-fee-warning { - color: var(--color-warning-default); + color: var(--color-secondary-default); //@TODO: revisit when warning color tokens are revisited } &__currency-container, diff --git a/ui/components/app/gas-timing/index.scss b/ui/components/app/gas-timing/index.scss index 00d6c024d..ca8d1e989 100644 --- a/ui/components/app/gas-timing/index.scss +++ b/ui/components/app/gas-timing/index.scss @@ -20,7 +20,7 @@ } &--negative-V2 { - color: var(--color-warning-default); + color: var(--color-secondary-default); font-weight: bold; } diff --git a/ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js b/ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js index ad8db9347..076b02f30 100644 --- a/ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js +++ b/ui/components/app/hold-to-reveal-button/hold-to-reveal-button.js @@ -160,7 +160,7 @@ export default function HoldToRevealButton({ buttonText, onLongPressed }) {
) : null; - }, [isUnlocking, hasTriggeredUnlock, triggerOnLongPressed, t]); + }, [isUnlocking, hasTriggeredUnlock, t]); return (
- {this.renderRow({ - logo: , - title: t('buyCryptoWithCoinbasePay', [symbol]), - text: t('buyCryptoWithCoinbasePayDescription', [symbol]), - buttonLabel: t('continueToCoinbasePay'), - onButtonClick: () => { - this.context.trackEvent({ - category: EVENT.CATEGORIES.ACCOUNTS, - event: 'Click buy Ether via Coinbase Pay', - properties: { - action: 'Deposit Ether', - legacy_event: true, - }, - }); - toCoinbasePay(address, chainId); - }, - hide: !isBuyableCoinbasePayChain, - })} {this.renderRow({ logo: , title: t('buyCryptoWithTransak', [symbol]), @@ -192,8 +169,8 @@ export default class DepositEtherModal extends Component { })} {this.renderRow({ logo: , - title: t('buyWithWyre', [symbol]), - text: t('buyWithWyreDescription', [symbol]), + title: t('buyWithWyre'), + text: t('buyWithWyreDescription'), buttonLabel: t('continueToWyre'), onButtonClick: () => { this.context.trackEvent({ @@ -204,9 +181,9 @@ export default class DepositEtherModal extends Component { legacy_event: true, }, }); - toWyre(address, chainId); + toWyre(address); }, - hide: !isBuyableWyreChain, + hide: !isMainnet, })} {this.renderRow({ logo: ( diff --git a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js index 3b71d5740..227e63047 100644 --- a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js +++ b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js @@ -12,8 +12,6 @@ import { getSelectedAddress, getIsBuyableTransakChain, getIsBuyableMoonPayChain, - getIsBuyableWyreChain, - getIsBuyableCoinbasePayChain, } from '../../../../selectors/selectors'; import DepositEtherModal from './deposit-ether-modal.component'; @@ -25,15 +23,13 @@ function mapStateToProps(state) { address: getSelectedAddress(state), isBuyableTransakChain: getIsBuyableTransakChain(state), isBuyableMoonPayChain: getIsBuyableMoonPayChain(state), - isBuyableWyreChain: getIsBuyableWyreChain(state), - isBuyableCoinbasePayChain: getIsBuyableCoinbasePayChain(state), }; } function mapDispatchToProps(dispatch) { return { - toWyre: (address, chainId) => { - dispatch(buyEth({ service: 'wyre', address, chainId })); + toWyre: (address) => { + dispatch(buyEth({ service: 'wyre', address })); }, toTransak: (address, chainId) => { dispatch(buyEth({ service: 'transak', address, chainId })); @@ -41,9 +37,6 @@ function mapDispatchToProps(dispatch) { toMoonPay: (address, chainId) => { dispatch(buyEth({ service: 'moonpay', address, chainId })); }, - toCoinbasePay: (address, chainId) => { - dispatch(buyEth({ service: 'coinbase', address, chainId })); - }, hideModal: () => { dispatch(hideModal()); }, diff --git a/ui/components/app/modals/modal.js b/ui/components/app/modals/modal.js index 0e5d1dcda..3eab79fcc 100644 --- a/ui/components/app/modals/modal.js +++ b/ui/components/app/modals/modal.js @@ -10,6 +10,7 @@ import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; // Modal Components import ConfirmCustomizeGasModal from '../gas-customization/gas-modal-page-container'; +import SwapsGasCustomizationModal from '../../../pages/swaps/swaps-gas-customization-modal'; import DepositEtherModal from './deposit-ether-modal'; import AccountDetailsModal from './account-details-modal'; import ExportPrivateKeyModal from './export-private-key-modal'; @@ -264,6 +265,31 @@ const MODALS = { }, }, + CUSTOMIZE_METASWAP_GAS: { + contents: , + mobileModalStyle: { + width: '100vw', + height: '100vh', + top: '0', + transform: 'none', + left: '0', + right: '0', + margin: '0 auto', + }, + laptopModalStyle: { + width: 'auto', + height: '0px', + top: '80px', + left: '0px', + transform: 'none', + margin: '0 auto', + position: 'relative', + }, + contentStyle: { + borderRadius: '8px', + }, + }, + EDIT_APPROVAL_PERMISSION: { contents: , mobileModalStyle: { diff --git a/ui/components/app/modals/qr-scanner/qr-scanner.component.js b/ui/components/app/modals/qr-scanner/qr-scanner.component.js index a3fd43501..68cd8444f 100644 --- a/ui/components/app/modals/qr-scanner/qr-scanner.component.js +++ b/ui/components/app/modals/qr-scanner/qr-scanner.component.js @@ -251,7 +251,7 @@ export default class QrScanner extends Component { }} /> {ready === READY_STATE.READY ? null : ( - + )}
diff --git a/ui/components/app/permissions-connect-header/index.scss b/ui/components/app/permissions-connect-header/index.scss index 3f77ad9f5..faecd4ab1 100644 --- a/ui/components/app/permissions-connect-header/index.scss +++ b/ui/components/app/permissions-connect-header/index.scss @@ -7,7 +7,6 @@ display: flex; flex-direction: column; align-items: center; - margin-bottom: 16px; } &__title { @@ -15,6 +14,7 @@ text-align: center; color: var(--color-text-default); + margin-top: 16px; font-weight: bold; } diff --git a/ui/components/app/permissions-connect-header/permissions-connect-header.component.js b/ui/components/app/permissions-connect-header/permissions-connect-header.component.js index 706037899..c5ddf0110 100644 --- a/ui/components/app/permissions-connect-header/permissions-connect-header.component.js +++ b/ui/components/app/permissions-connect-header/permissions-connect-header.component.js @@ -5,9 +5,15 @@ import Box from '../../ui/box'; import { FLEX_DIRECTION, JUSTIFY_CONTENT, + ///: BEGIN:ONLY_INCLUDE_IN(flask) + COLORS, + TYPOGRAPHY, + TEXT_ALIGN, + ///: END:ONLY_INCLUDE_IN } from '../../../helpers/constants/design-system'; ///: BEGIN:ONLY_INCLUDE_IN(flask) import SnapsAuthorshipPill from '../flask/snaps-authorship-pill'; +import Typography from '../../ui/typography'; ///: END:ONLY_INCLUDE_IN export default class PermissionsConnectHeader extends Component { @@ -25,8 +31,8 @@ export default class PermissionsConnectHeader extends Component { boxProps: PropTypes.shape({ ...Box.propTypes }), headerText: PropTypes.string, ///: BEGIN:ONLY_INCLUDE_IN(flask) + npmPackageName: PropTypes.string, snapVersion: PropTypes.string, - isSnapInstall: PropTypes.bool, ///: END:ONLY_INCLUDE_IN }; @@ -38,29 +44,11 @@ export default class PermissionsConnectHeader extends Component { }; renderHeaderIcon() { - const { - iconUrl, - iconName, - siteOrigin, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - isSnapInstall, - ///: END:ONLY_INCLUDE_IN - } = this.props; - - ///: BEGIN:ONLY_INCLUDE_IN(flask) - if (isSnapInstall) { - return null; - } - ///: END:ONLY_INCLUDE_IN + const { iconUrl, iconName, siteOrigin } = this.props; return (
- +
); } @@ -71,11 +59,14 @@ export default class PermissionsConnectHeader extends Component { headerTitle, headerText, ///: BEGIN:ONLY_INCLUDE_IN(flask) - siteOrigin, + npmPackageName, snapVersion, - isSnapInstall, ///: END:ONLY_INCLUDE_IN } = this.props; + ///: BEGIN:ONLY_INCLUDE_IN(flask) + const npmPackageUrl = `https://www.npmjs.com/package/${npmPackageName}`; + const { t } = this.context; + ///: END:ONLY_INCLUDE_IN return ( {headerTitle}
{ ///: BEGIN:ONLY_INCLUDE_IN(flask) - isSnapInstall && ( - + npmPackageName ? ( + + ) : null + ///: END:ONLY_INCLUDE_IN + } + { + ///: BEGIN:ONLY_INCLUDE_IN(flask) + snapVersion && ( + + {t('shorthandVersion', [snapVersion])} + ) ///: END:ONLY_INCLUDE_IN } diff --git a/ui/components/app/permissions-connect-permission-list/index.scss b/ui/components/app/permissions-connect-permission-list/index.scss index 8dfc4cb6b..cb2b462db 100644 --- a/ui/components/app/permissions-connect-permission-list/index.scss +++ b/ui/components/app/permissions-connect-permission-list/index.scss @@ -17,7 +17,7 @@ padding: 16px; min-width: 16px; min-height: 16px; - color: var(--color-icon-alternative); + color: var(--color-icon-default); font-size: 1rem; } } diff --git a/ui/components/app/qr-hardware-popover/enhanced-reader.js b/ui/components/app/qr-hardware-popover/enhanced-reader.js index 18ae2f931..ae753145e 100644 --- a/ui/components/app/qr-hardware-popover/enhanced-reader.js +++ b/ui/components/app/qr-hardware-popover/enhanced-reader.js @@ -55,7 +55,7 @@ const EnhancedReader = ({ handleScan }) => { filter: 'blur(4px)', }} /> - {canplay ? null : } + {canplay ? null : } ); }; diff --git a/ui/components/app/selected-account/selected-account.component.js b/ui/components/app/selected-account/selected-account.component.js index 06609b54f..1dc3c135f 100644 --- a/ui/components/app/selected-account/selected-account.component.js +++ b/ui/components/app/selected-account/selected-account.component.js @@ -63,7 +63,7 @@ class SelectedAccount extends Component {
{shortenAddress(checksummedAddress)}
- +
diff --git a/ui/components/app/signature-request-original/README.mdx b/ui/components/app/signature-request-original/README.mdx deleted file mode 100644 index 6c07ccd38..000000000 --- a/ui/components/app/signature-request-original/README.mdx +++ /dev/null @@ -1,15 +0,0 @@ -import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'; - -import SignatureRequestOriginal from '.'; - -# Signature Request - -dApp requesting a signature from the user. This component appears for eth_signTypedData signatures are not v3 or v4. For other signatures, please see SignatureRequest. - - - - - -## Component API - - diff --git a/ui/components/app/signature-request-original/index.scss b/ui/components/app/signature-request-original/index.scss index e81a8df01..2e2aca65f 100644 --- a/ui/components/app/signature-request-original/index.scss +++ b/ui/components/app/signature-request-original/index.scss @@ -20,10 +20,6 @@ @media screen and (min-width: $break-large) { height: 620px; } - - &__reject { - padding-bottom: 20px; - } } &__typed-container { @@ -170,6 +166,8 @@ &__origin { margin-left: 5px; + overflow: hidden; + text-overflow: ellipsis; } &__notice, diff --git a/ui/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js index 6b878ac33..8d780b516 100644 --- a/ui/components/app/signature-request-original/signature-request-original.component.js +++ b/ui/components/app/signature-request-original/signature-request-original.component.js @@ -13,7 +13,6 @@ import AccountListItem from '../account-list-item'; import { conversionUtil } from '../../../../shared/modules/conversion.utils'; import Button from '../../ui/button'; import SiteIcon from '../../ui/site-icon'; -import SiteOrigin from '../../ui/site-origin'; export default class SignatureRequestOriginal extends Component { static contextTypes = { @@ -39,9 +38,6 @@ export default class SignatureRequestOriginal extends Component { hardwareWalletRequiresConnection: PropTypes.bool, isLedgerWallet: PropTypes.bool, nativeCurrency: PropTypes.string.isRequired, - messagesCount: PropTypes.number, - showRejectTransactionsConfirmationModal: PropTypes.func.isRequired, - cancelAll: PropTypes.func.isRequired, }; state = { @@ -149,10 +145,9 @@ export default class SignatureRequestOriginal extends Component { size={24} /> ) : null} - +
+ {txData.msgParams.origin} +
); }; @@ -229,11 +224,11 @@ export default class SignatureRequestOriginal extends Component { onClick={() => { global.platform.openTab({ url: - 'https://consensys.net/blog/metamask/the-seal-of-approval-know-what-youre-consenting-to-with-permissions-and-approvals-in-metamask/', + 'https://metamask.zendesk.com/hc/en-us/articles/360015488751', }); }} > - {this.context.t('learnMoreUpperCase')} + {this.context.t('learnMore')} ) : null} @@ -320,31 +315,7 @@ export default class SignatureRequestOriginal extends Component { ); }; - handleCancelAll = () => { - const { - cancelAll, - clearConfirmTransaction, - history, - mostRecentOverviewPage, - showRejectTransactionsConfirmationModal, - messagesCount, - } = this.props; - const unapprovedTxCount = messagesCount; - - showRejectTransactionsConfirmationModal({ - unapprovedTxCount, - onSubmit: async () => { - await cancelAll(); - clearConfirmTransaction(); - history.push(mostRecentOverviewPage); - }, - }); - }; - render = () => { - const { messagesCount } = this.props; - const { t } = this.context; - const rejectNText = t('rejectTxsN', [messagesCount]); return (
{this.renderHeader()} @@ -355,15 +326,6 @@ export default class SignatureRequestOriginal extends Component {
) : null} {this.renderFooter()} - {messagesCount > 1 ? ( - - ) : null} ); }; diff --git a/ui/components/app/signature-request-original/signature-request-original.container.js b/ui/components/app/signature-request-original/signature-request-original.container.js index f30310358..8031d92ed 100644 --- a/ui/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/components/app/signature-request-original/signature-request-original.container.js @@ -3,16 +3,14 @@ import { compose } from 'redux'; import { withRouter } from 'react-router-dom'; import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import { goHome, cancelMsgs, showModal } from '../../../store/actions'; +import { goHome } from '../../../store/actions'; import { accountsWithSendEtherInfoSelector, conversionRateSelector, getSubjectMetadata, doesAddressRequireLedgerHidConnection, - unconfirmedMessagesHashSelector, - getTotalUnapprovedMessagesCount, } from '../../../selectors'; -import { getAccountByAddress, valuesFor } from '../../../helpers/utils/util'; +import { getAccountByAddress } from '../../../helpers/utils/util'; import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; import { getMostRecentOverviewPage } from '../../../ducks/history/history'; import { @@ -31,8 +29,6 @@ function mapStateToProps(state, ownProps) { from, ); const isLedgerWallet = isAddressLedger(state, from); - const messagesList = unconfirmedMessagesHashSelector(state); - const messagesCount = getTotalUnapprovedMessagesCount(state); return { requester: null, @@ -45,8 +41,6 @@ function mapStateToProps(state, ownProps) { // not passed to component allAccounts: accountsWithSendEtherInfoSelector(state), subjectMetadata: getSubjectMetadata(state), - messagesList, - messagesCount, }; } @@ -54,19 +48,6 @@ function mapDispatchToProps(dispatch) { return { goHome: () => dispatch(goHome()), clearConfirmTransaction: () => dispatch(clearConfirmTransaction()), - showRejectTransactionsConfirmationModal: ({ - onSubmit, - unapprovedTxCount: messagesCount, - }) => { - return dispatch( - showModal({ - name: 'REJECT_TRANSACTIONS', - onSubmit, - unapprovedTxCount: messagesCount, - }), - ); - }, - cancelAll: (messagesList) => dispatch(cancelMsgs(messagesList)), }; } @@ -81,7 +62,7 @@ function mergeProps(stateProps, dispatchProps, ownProps) { txData, } = ownProps; - const { allAccounts, messagesList, ...otherStateProps } = stateProps; + const { allAccounts, ...otherStateProps } = stateProps; const { type, @@ -90,8 +71,6 @@ function mergeProps(stateProps, dispatchProps, ownProps) { const fromAccount = getAccountByAddress(allAccounts, from); - const { cancelAll: dispatchCancelAll } = dispatchProps; - let cancel; let sign; if (type === MESSAGE_TYPE.PERSONAL_SIGN) { @@ -113,7 +92,6 @@ function mergeProps(stateProps, dispatchProps, ownProps) { txData, cancel, sign, - cancelAll: () => dispatchCancelAll(valuesFor(messagesList)), }; } diff --git a/ui/components/app/signature-request-original/signature-request-original.stories.js b/ui/components/app/signature-request-original/signature-request-original.stories.js deleted file mode 100644 index bc2c73900..000000000 --- a/ui/components/app/signature-request-original/signature-request-original.stories.js +++ /dev/null @@ -1,132 +0,0 @@ -import React from 'react'; -import { action } from '@storybook/addon-actions'; -import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import testData from '../../../../.storybook/test-data'; -import README from './README.mdx'; -import SignatureRequestOriginal from './signature-request-original.component'; - -const [MOCK_PRIMARY_IDENTITY] = Object.values(testData.metamask.identities); - -const MOCK_SIGN_DATA = JSON.stringify({ - domain: { - name: 'happydapp.website', - }, - message: { - string: 'haay wuurl', - number: 42, - }, - primaryType: 'Mail', - types: { - EIP712Domain: [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, - ], - Group: [ - { name: 'name', type: 'string' }, - { name: 'members', type: 'Person[]' }, - ], - Mail: [ - { name: 'from', type: 'Person' }, - { name: 'to', type: 'Person[]' }, - { name: 'contents', type: 'string' }, - ], - Person: [ - { name: 'name', type: 'string' }, - { name: 'wallets', type: 'address[]' }, - ], - }, -}); - -export default { - title: 'Components/App/SignatureRequestOriginal', - id: __filename, - component: SignatureRequestOriginal, - parameters: { - docs: { - page: README, - }, - }, - argTypes: { - fromAccount: { - table: { - address: { control: 'text' }, - balance: { control: 'text' }, - name: { control: 'text' }, - }, - }, - hardwareWalletRequiresConnection: { control: 'boolean' }, - isLedgerWallet: { control: 'boolean' }, - nativeCurrency: { control: 'text' }, - txData: { control: 'object' }, - clearConfirmTransaction: { action: 'Clean Confirm' }, - cancel: { action: 'Cancel' }, - sign: { action: 'Sign' }, - }, - args: { - fromAccount: MOCK_PRIMARY_IDENTITY, - history: { - push: action('history.push()'), - }, - mostRecentOverviewPage: '/', - nativeCurrency: 'ETH', - }, -}; - -const Template = (args) => { - return ; -}; - -export const DefaultStory = Template.bind({}); - -DefaultStory.storyName = 'personal_sign Type'; - -DefaultStory.args = { - txData: { - msgParams: { - data: MOCK_SIGN_DATA, - origin: 'https://happydapp.website/governance?futarchy=true', - }, - type: MESSAGE_TYPE.PERSONAL_SIGN, - }, -}; - -export const ETHSignStory = Template.bind({}); - -ETHSignStory.storyName = 'eth_sign Type'; - -ETHSignStory.args = { - txData: { - msgParams: { - data: MOCK_SIGN_DATA, - origin: 'https://happydapp.website/governance?futarchy=true', - }, - type: MESSAGE_TYPE.ETH_SIGN, - }, -}; - -export const ETHSignTypedStory = Template.bind({}); - -ETHSignTypedStory.storyName = 'eth_signTypedData Type'; - -ETHSignTypedStory.args = { - txData: { - msgParams: { - data: [ - { - type: 'string', - name: 'Message', - value: 'Hi, Alice!', - }, - { - type: 'uint32', - name: 'A number', - value: '1337', - }, - ], - origin: 'https://happydapp.website/governance?futarchy=true', - }, - type: MESSAGE_TYPE.ETH_SIGN_TYPED_DATA, - }, -}; diff --git a/ui/components/app/signature-request/index.scss b/ui/components/app/signature-request/index.scss index a9896ed18..1483054d5 100644 --- a/ui/components/app/signature-request/index.scss +++ b/ui/components/app/signature-request/index.scss @@ -68,8 +68,6 @@ &__info { @include H7; - - padding: 0 12px 4px; } &__info--bolded { @@ -87,3 +85,6 @@ .identicon {} } +.signature-request-footer { + flex: 1 1 auto; +} diff --git a/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js b/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js index f4a84b734..a42e4f2ae 100644 --- a/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js +++ b/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js @@ -17,10 +17,10 @@ export default class SignatureRequestFooter extends PureComponent { const { cancelAction, signAction, disabled = false } = this.props; return (
- -
diff --git a/ui/components/app/signature-request/signature-request-message/index.scss b/ui/components/app/signature-request/signature-request-message/index.scss index ef2baa76d..343bd0563 100644 --- a/ui/components/app/signature-request/signature-request-message/index.scss +++ b/ui/components/app/signature-request/signature-request-message/index.scss @@ -1,7 +1,7 @@ .signature-request-message { flex: 1 60%; display: flex; - max-height: 231px; + max-height: 230px; flex-direction: column; position: relative; diff --git a/ui/components/app/signature-request/signature-request-message/signature-request-message.component.js b/ui/components/app/signature-request/signature-request-message/signature-request-message.component.js index 641931919..2a02cdcdd 100644 --- a/ui/components/app/signature-request/signature-request-message/signature-request-message.component.js +++ b/ui/components/app/signature-request/signature-request-message/signature-request-message.component.js @@ -26,7 +26,7 @@ export default class SignatureRequestMessage extends PureComponent { } const { scrollTop, offsetHeight, scrollHeight } = this.props.messageRootRef; - const isAtBottom = Math.round(scrollTop) + offsetHeight >= scrollHeight; + const isAtBottom = scrollTop + offsetHeight >= scrollHeight; if (isAtBottom) { this.setState({ messageIsScrolled: true }); diff --git a/ui/components/app/signature-request/signature-request.component.js b/ui/components/app/signature-request/signature-request.component.js index a76dfa8b0..4edaab599 100644 --- a/ui/components/app/signature-request/signature-request.component.js +++ b/ui/components/app/signature-request/signature-request.component.js @@ -4,7 +4,6 @@ import Identicon from '../../ui/identicon'; import LedgerInstructionField from '../ledger-instruction-field'; import { sanitizeMessage } from '../../../helpers/utils/util'; import { EVENT } from '../../../../shared/constants/metametrics'; -import SiteOrigin from '../../ui/site-origin'; import Header from './signature-request-header'; import Footer from './signature-request-footer'; import Message from './signature-request-message'; @@ -125,10 +124,7 @@ export default class SignatureRequest extends PureComponent {
{domain.name}
- +
{origin}
{this.formatWallet(fromAddress)}
diff --git a/ui/components/app/signature-request/signature-request.component.test.js b/ui/components/app/signature-request/signature-request.component.test.js index f20d49942..f2e235b6f 100644 --- a/ui/components/app/signature-request/signature-request.component.test.js +++ b/ui/components/app/signature-request/signature-request.component.test.js @@ -66,7 +66,7 @@ describe('Signature Request Component', () => { }; const wrapper = shallowWithContext( false} clearConfirmTransaction={() => undefined} cancel={() => undefined} sign={() => undefined} @@ -105,7 +105,7 @@ describe('Signature Request Component', () => { }; const wrapper = shallowWithContext( false} clearConfirmTransaction={() => undefined} cancel={() => undefined} sign={() => undefined} diff --git a/ui/components/app/signature-request/signature-request.container.test.js b/ui/components/app/signature-request/signature-request.container.test.js index 5ed1888ae..0eb4a6deb 100644 --- a/ui/components/app/signature-request/signature-request.container.test.js +++ b/ui/components/app/signature-request/signature-request.container.test.js @@ -32,7 +32,6 @@ describe('Signature Request', () => { history: { push: sinon.spy(), }, - hardwareWalletRequiresConnection: false, clearConfirmTransaction: sinon.spy(), cancelMessage: sinon.spy(), cancel: sinon.stub().resolves(), diff --git a/ui/components/app/signature-request/signature-request.stories.js b/ui/components/app/signature-request/signature-request.stories.js index f3ebe0e1b..a1c53a69b 100644 --- a/ui/components/app/signature-request/signature-request.stories.js +++ b/ui/components/app/signature-request/signature-request.stories.js @@ -3,7 +3,7 @@ import testData from '../../../../.storybook/test-data'; import README from './README.mdx'; import SignatureRequest from './signature-request.component'; -const [MOCK_PRIMARY_IDENTITY] = Object.values(testData.metamask.identities); +const primaryIdentity = Object.values(testData.metamask.identities)[0]; export default { title: 'Components/App/SignatureRequest', @@ -23,11 +23,13 @@ export default { name: { control: 'text' }, }, }, - hardwareWalletRequiresConnection: { control: 'boolean' }, isLedgerWallet: { control: 'boolean' }, clearConfirmTransaction: { action: 'Clean Confirm' }, cancel: { action: 'Cancel' }, sign: { action: 'Sign' }, + hardwareWalletRequiresConnection: { + action: 'hardwareWalletRequiresConnection', + }, }, }; @@ -48,31 +50,11 @@ DefaultStory.args = { string: 'haay wuurl', number: 42, }, - primaryType: 'Mail', - types: { - EIP712Domain: [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, - ], - Group: [ - { name: 'name', type: 'string' }, - { name: 'members', type: 'Person[]' }, - ], - Mail: [ - { name: 'from', type: 'Person' }, - { name: 'to', type: 'Person[]' }, - { name: 'contents', type: 'string' }, - ], - Person: [ - { name: 'name', type: 'string' }, - { name: 'wallets', type: 'address[]' }, - ], - }, }), origin: 'https://happydapp.website/governance?futarchy=true', }, }, - fromAccount: MOCK_PRIMARY_IDENTITY, + fromAccount: primaryIdentity, }; + +DefaultStory.storyName = 'Default'; diff --git a/ui/components/app/srp-input/srp-input.js b/ui/components/app/srp-input/srp-input.js index 1a3eb5810..0b114d63c 100644 --- a/ui/components/app/srp-input/srp-input.js +++ b/ui/components/app/srp-input/srp-input.js @@ -10,7 +10,6 @@ import Typography from '../../ui/typography'; import ShowHideToggle from '../../ui/show-hide-toggle'; import { FONT_WEIGHT, - TEXT_ALIGN, TYPOGRAPHY, } from '../../../helpers/constants/design-system'; import { parseSecretRecoveryPhrase } from './parse-secret-recovery-phrase'; @@ -125,11 +124,7 @@ export default function SrpInput({ onChange, srpText }) { return (
-

- ${t('stillGettingMessage')} - - ${t('sendBugReport')} - -

- - `; -} diff --git a/ui/helpers/utils/error-utils.test.js b/ui/helpers/utils/error-utils.test.js deleted file mode 100644 index 84aa05508..000000000 --- a/ui/helpers/utils/error-utils.test.js +++ /dev/null @@ -1,49 +0,0 @@ -import { SUPPORT_LINK } from '../constants/common'; -import { getErrorHtml } from './error-utils'; -import { fetchLocale } from './i18n-helper'; - -jest.mock('./i18n-helper', () => ({ - fetchLocale: jest.fn(), - loadRelativeTimeFormatLocaleData: jest.fn(), -})); - -describe('Error utils Tests', () => { - it('should get error html', async () => { - const mockStore = { - localeMessages: { - current: { - troubleStarting: { - message: - 'MetaMask had trouble starting. This error could be intermittent, so try restarting the extension.', - }, - restartMetamask: { - message: 'Restart MetaMask', - }, - stillGettingMessage: { - message: 'Still getting this message?', - }, - sendBugReport: { - message: 'Send us a bug report.', - }, - }, - }, - metamask: { - currentLocale: 'en', - }, - }; - - fetchLocale.mockReturnValue(mockStore.localeMessages.current); - const errorHtml = await getErrorHtml(SUPPORT_LINK, mockStore.metamask); - const currentLocale = mockStore.localeMessages.current; - const troubleStartingMessage = currentLocale.troubleStarting.message; - const restartMetamaskMessage = currentLocale.restartMetamask.message; - const stillGettingMessageMessage = - currentLocale.stillGettingMessage.message; - const sendBugReportMessage = currentLocale.sendBugReport.message; - - expect(errorHtml).toContain(troubleStartingMessage); - expect(errorHtml).toContain(restartMetamaskMessage); - expect(errorHtml).toContain(stillGettingMessageMessage); - expect(errorHtml).toContain(sendBugReportMessage); - }); -}); diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js index c2f9023df..7625880ea 100644 --- a/ui/helpers/utils/permission.js +++ b/ui/helpers/utils/permission.js @@ -58,11 +58,6 @@ const PERMISSION_DESCRIPTIONS = deepFreeze({ leftIcon: 'fas fa-wifi', rightIcon: null, }, - [EndowmentPermissions['endowment:long-running']]: { - label: (t) => t('permission_longRunning'), - leftIcon: 'fas fa-infinity', - rightIcon: null, - }, ///: END:ONLY_INCLUDE_IN [UNKNOWN_PERMISSION]: { label: (t, permissionName) => diff --git a/ui/helpers/utils/transactions.util.js b/ui/helpers/utils/transactions.util.js index d1380d8c0..25a38593f 100644 --- a/ui/helpers/utils/transactions.util.js +++ b/ui/helpers/utils/transactions.util.js @@ -35,23 +35,12 @@ async function getMethodFrom4Byte(fourBytePrefix) { mode: 'cors', }, ); - fourByteResponse.results.sort((a, b) => { - return new Date(a.created_at).getTime() < new Date(b.created_at).getTime() - ? -1 - : 1; - }); - return fourByteResponse.results[0].text_signature; -} -function pickShortest(registrySig, fourByteSig) { - if (!registrySig) { - return fourByteSig; - } else if (!fourByteSig) { - return registrySig; + if (fourByteResponse.count === 1) { + return fourByteResponse.results[0].text_signature; } - return fourByteSig.length < registrySig.length ? fourByteSig : registrySig; + return null; } - let registry; /** @@ -62,7 +51,7 @@ let registry; */ export async function getMethodDataAsync(fourBytePrefix) { try { - const fourByteSig = await getMethodFrom4Byte(fourBytePrefix).catch((e) => { + const fourByteSig = getMethodFrom4Byte(fourBytePrefix).catch((e) => { log.error(e); return null; }); @@ -71,12 +60,11 @@ export async function getMethodDataAsync(fourBytePrefix) { registry = new MethodRegistry({ provider: global.ethereumProvider }); } - const registrySig = await registry.lookup(fourBytePrefix).catch((e) => { - log.error(e); - return null; - }); + let sig = await registry.lookup(fourBytePrefix); - const sig = pickShortest(registrySig, fourByteSig); + if (!sig) { + sig = await fourByteSig; + } if (!sig) { return {}; diff --git a/ui/helpers/utils/transactions.util.test.js b/ui/helpers/utils/transactions.util.test.js index eaf0a963a..591e46d07 100644 --- a/ui/helpers/utils/transactions.util.test.js +++ b/ui/helpers/utils/transactions.util.test.js @@ -1,5 +1,3 @@ -import { HttpProvider } from 'ethjs'; -import nock from 'nock'; import { TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, @@ -57,48 +55,4 @@ describe('Transactions utils', () => { ).toStrictEqual(false); }); }); - - describe('getMethodDataAsync', () => { - global.ethereumProvider = new HttpProvider( - 'https://mainnet.infura.io/v3/341eacb578dd44a1a049cbc5f6fd4035', - ); - it('returns a valid signature for setApprovalForAll', async () => { - nock('https://www.4byte.directory:443', { encodedQueryParams: true }) - .get('/api/v1/signatures/') - .query({ hex_signature: '0xa22cb465' }) - .reply(200, { - count: 2, - next: null, - previous: null, - results: [ - { - id: 841519, - created_at: '2022-06-12T00:50:19.305588Z', - text_signature: 'niceFunctionHerePlzClick943230089(address,bool)', - hex_signature: '0xa22cb465', - bytes_signature: '¢,´e', - }, - { - id: 29659, - created_at: '2018-04-11T21:47:39.980645Z', - text_signature: 'setApprovalForAll(address,bool)', - hex_signature: '0xa22cb465', - bytes_signature: '¢,´e', - }, - ], - }); - nock('https://mainnet.infura.io:443', { encodedQueryParams: true }) - .post('/v3/341eacb578dd44a1a049cbc5f6fd4035') - .reply(200, (_, requestBody) => ({ - id: requestBody.id, - jsonrpc: '2.0', - result: - '0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002f6e69636546756e6374696f6e48657265506c7a436c69636b39343332333030383928616464726573732c626f6f6c290000000000000000000000000000000000', - })); - expect(await utils.getMethodDataAsync('0xa22cb465')).toStrictEqual({ - name: 'Set Approval For All', - params: [{ type: 'address' }, { type: 'bool' }], - }); - }); - }); }); diff --git a/ui/hooks/useAssetDetails.js b/ui/hooks/useAssetDetails.js index ce8d00253..ce9ef30ba 100644 --- a/ui/hooks/useAssetDetails.js +++ b/ui/hooks/useAssetDetails.js @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { parseStandardTokenTransactionData } from '../../shared/modules/transaction.utils'; -import { getCollectibles } from '../ducks/metamask/metamask'; +import { getCollectibles, getTokens } from '../ducks/metamask/metamask'; import { ERC1155, ERC721, ERC20 } from '../helpers/constants/common'; import { calcTokenAmount, @@ -9,13 +9,16 @@ import { getTokenAddressParam, getTokenValueParam, } from '../helpers/utils/token-util'; +import { getTokenList } from '../selectors'; import { hideLoadingIndication, showLoadingIndication } from '../store/actions'; import { usePrevious } from './usePrevious'; export function useAssetDetails(tokenAddress, userAddress, transactionData) { const dispatch = useDispatch(); // state selectors + const tokens = useSelector(getTokens); const collectibles = useSelector(getCollectibles); + const tokenList = useSelector(getTokenList); // in-hook state const [currentAsset, setCurrentAsset] = useState(null); @@ -33,6 +36,8 @@ export function useAssetDetails(tokenAddress, userAddress, transactionData) { userAddress, transactionData, collectibles, + tokens, + tokenList, ); setCurrentAsset(assetDetails); dispatch(hideLoadingIndication()); @@ -53,6 +58,8 @@ export function useAssetDetails(tokenAddress, userAddress, transactionData) { userAddress, transactionData, collectibles, + tokens, + tokenList, ]); let assetStandard, @@ -76,13 +83,11 @@ export function useAssetDetails(tokenAddress, userAddress, transactionData) { balance, decimals: currentAssetDecimals, } = currentAsset; - const tokenData = parseStandardTokenTransactionData(transactionData); assetStandard = standard; assetAddress = tokenAddress; - tokenSymbol = symbol ?? ''; + tokenSymbol = symbol; tokenImage = image; - toAddress = getTokenAddressParam(tokenData); if (assetStandard === ERC721 || assetStandard === ERC1155) { assetName = name; @@ -96,7 +101,6 @@ export function useAssetDetails(tokenAddress, userAddress, transactionData) { calcTokenAmount(getTokenValueParam(tokenData), decimals).toString(10); } } - return { assetStandard, assetName, diff --git a/ui/hooks/useAssetDetails.test.js b/ui/hooks/useAssetDetails.test.js deleted file mode 100644 index f580a550d..000000000 --- a/ui/hooks/useAssetDetails.test.js +++ /dev/null @@ -1,197 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; -import { renderHook } from '@testing-library/react-hooks'; - -import configureStore from '../store/store'; -import * as tokenUtils from '../helpers/utils/token-util'; -import { ERC1155, ERC20, ERC721 } from '../helpers/constants/common'; -import { useAssetDetails } from './useAssetDetails'; - -const renderUseAssetDetails = ({ - tokenAddress, - userAddress, - transactionData, -}) => { - const mockState = { - metamask: { - provider: { - type: 'test', - chainId: '0x3', - }, - tokenList: {}, - }, - }; - - const wrapper = ({ children }) => ( - {children} - ); - - return renderHook( - () => useAssetDetails(tokenAddress, userAddress, transactionData), - { wrapper }, - ); -}; - -describe('useAssetDetails', () => { - let getAssetDetailsStub; - beforeEach(() => { - getAssetDetailsStub = jest - .spyOn(tokenUtils, 'getAssetDetails') - .mockImplementation(() => Promise.resolve({})); - }); - it('should return object with tokenSymbol set to and empty string, when getAssetDetails returns and empty object', async () => { - const toAddress = '000000000000000000000000000000000000dead'; - const tokenAddress = '0x1'; - - const transactionData = `0xa9059cbb000000000000000000000000${toAddress}000000000000000000000000000000000000000000000000016345785d8a0000`; - - const { result, waitForNextUpdate } = renderUseAssetDetails({ - tokenAddress, - userAddress: '0x111', - transactionData, - }); - - await waitForNextUpdate(); - - expect(result.current).toStrictEqual({ - assetAddress: tokenAddress, - assetName: undefined, - assetStandard: undefined, - decimals: undefined, - toAddress: `0x${toAddress}`, - tokenAmount: undefined, - tokenId: undefined, - tokenImage: undefined, - tokenSymbol: '', - tokenValue: undefined, - userBalance: undefined, - }); - }); - - it('should return object with correct tokenValues for an ERC20 token', async () => { - const userAddress = '0xf04a5cc80b1e94c69b48f5ee68a08cd2f09a7c3e'; - const tokenAddress = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'; - const toAddress = '000000000000000000000000000000000000dead'; - const transactionData = `0xa9059cbb000000000000000000000000${toAddress}00000000000000000000000000000000000000000000000000000000000001f4`; - - const standard = ERC20; - const symbol = 'WETH'; - const balance = '1'; - const decimals = 18; - - getAssetDetailsStub.mockImplementation(() => - Promise.resolve({ - standard, - symbol, - balance, - decimals, - }), - ); - - const { result, waitForNextUpdate } = renderUseAssetDetails({ - tokenAddress, - userAddress, - transactionData, - }); - - await waitForNextUpdate(); - - expect(result.current).toStrictEqual({ - assetAddress: tokenAddress, - assetName: undefined, - assetStandard: standard, - decimals, - toAddress: `0x${toAddress}`, - tokenAmount: '0.0000000000000005', - tokenId: undefined, - tokenImage: undefined, - tokenSymbol: symbol, - tokenValue: undefined, - userBalance: balance, - }); - }); - - it('should return object with correct tokenValues for an ERC721 token', async () => { - const tokenAddress = '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D'; - const toAddress = '000000000000000000000000000000000000dead'; - const transactionData = `0x23b872dd000000000000000000000000a544eebe103733f22ef62af556023bc918b73d36000000000000000000000000${toAddress}000000000000000000000000000000000000000000000000000000000000000c`; - - const symbol = 'BAYC'; - const tokenId = '12'; - const name = 'BoredApeYachtClub'; - const image = - 'https://bafybeihw3gvmthmvrenfmcvagtais5tv7r4nmiezgsv7nyknjubxw4lite.ipfs.dweb.link'; - const standard = ERC721; - - getAssetDetailsStub.mockImplementation(() => - Promise.resolve({ - standard, - symbol, - name, - tokenId, - image, - }), - ); - - const { result, waitForNextUpdate } = renderUseAssetDetails({ - tokenAddress, - transactionData, - }); - - await waitForNextUpdate(); - - expect(result.current).toStrictEqual({ - assetAddress: tokenAddress, - assetName: name, - assetStandard: standard, - decimals: undefined, - toAddress: `0x${toAddress}`, - tokenId, - tokenImage: image, - tokenSymbol: symbol, - tokenValue: undefined, - userBalance: undefined, - tokenAmount: undefined, - }); - }); - - it('should return object with correct tokenValues for an ERC1155 token', async () => { - const tokenAddress = '0x76BE3b62873462d2142405439777e971754E8E77'; - const toAddress = '000000000000000000000000000000000000dead'; - const transactionData = `0xf242432a000000000000000000000000a544eebe103733f22ef62af556023bc918b73d36000000000000000000000000000000000000000000000000000000000000dead0000000000000000000000000000000000000000000000000000000000000322000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000`; - - const tokenId = '121'; - const image = - 'https://bafybeihw3gvmthmvrenfmcvagtais5tv7r4nmiezgsv7nyknjubxw4lite.ipfs.dweb.link'; - const standard = ERC1155; - - getAssetDetailsStub.mockImplementation(() => - Promise.resolve({ - standard, - tokenId, - image, - }), - ); - - const { result, waitForNextUpdate } = renderUseAssetDetails({ - tokenAddress, - transactionData, - }); - - await waitForNextUpdate(); - - expect(result.current).toStrictEqual({ - assetAddress: tokenAddress, - assetName: undefined, - assetStandard: standard, - decimals: undefined, - toAddress: `0x${toAddress}`, - tokenId: undefined, - tokenImage: image, - tokenSymbol: '', - tokenValue: undefined, - userBalance: undefined, - tokenAmount: undefined, - }); - }); -}); diff --git a/ui/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js index 184374496..02a64bdbf 100644 --- a/ui/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -37,41 +37,17 @@ import { useTokenData } from './useTokenData'; import { useSwappedTokenValue } from './useSwappedTokenValue'; import { useCurrentAsset } from './useCurrentAsset'; -/** - * There are seven types of transaction entries that are currently differentiated in the design: - * 1. Signature request - * 2. Send (sendEth sendTokens) - * 3. Deposit - * 4. Site interaction - * 5. Approval - * 6. Swap - * 7. Swap Approval - */ -const signatureTypes = [ - null, - undefined, - TRANSACTION_TYPES.SIGN, - TRANSACTION_TYPES.PERSONAL_SIGN, - TRANSACTION_TYPES.SIGN_TYPED_DATA, - TRANSACTION_TYPES.ETH_DECRYPT, - TRANSACTION_TYPES.ETH_GET_ENCRYPTION_PUBLIC_KEY, -]; - -/** - * @typedef {(import('../../selectors/transactions').TransactionGroup} TransactionGroup - */ - /** * @typedef {Object} TransactionDisplayData - * @property {string} category - the transaction category that will be used for rendering the icon in the activity list + * @property {string} title - primary description of the transaction + * @property {string} subtitle - supporting text describing the transaction + * @property {bool} subtitleContainsOrigin - true if the subtitle includes the origin of the tx + * @property {string} category - the transaction category * @property {string} primaryCurrency - the currency string to display in the primary position - * @property {string} recipientAddress - the Ethereum address of the recipient - * @property {string} senderAddress - the Ethereum address of the sender - * @property {string} status - the status of the transaction - * @property {string} subtitle - the supporting text describing the transaction - * @property {boolean} subtitleContainsOrigin - true if the subtitle includes the origin of the tx - * @property {string} title - the primary title of the tx that will be displayed in the activity list * @property {string} [secondaryCurrency] - the currency string to display in the secondary position + * @property {string} status - the status of the transaction + * @property {string} senderAddress - the Ethereum address of the sender + * @property {string} recipientAddress - the Ethereum address of the recipient */ /** @@ -82,7 +58,7 @@ const signatureTypes = [ * of data that can power all views related to a transaction. Presently the main * case is for shared logic between transaction-list-item and transaction-detail-view * - * @param {TransactionGroup} transactionGroup - group of transactions of the same nonce + * @param {Object} transactionGroup - group of transactions * @returns {TransactionDisplayData} */ export function useTransactionDisplayData(transactionGroup) { @@ -93,10 +69,10 @@ export function useTransactionDisplayData(transactionGroup) { const knownTokens = useSelector(getTokens); const knownCollectibles = useSelector(getCollectibles); const t = useI18nContext(); - const { initialTransaction, primaryTransaction } = transactionGroup; // initialTransaction contains the data we need to derive the primary purpose of this transaction group const { type } = initialTransaction; + const { from: senderAddress, to } = initialTransaction.txParams || {}; // for smart contract interactions, methodData can be used to derive the name of the action being taken @@ -110,9 +86,8 @@ export function useTransactionDisplayData(transactionGroup) { const isSubmitted = displayedStatusKey === TRANSACTION_STATUSES.SUBMITTED; const primaryValue = primaryTransaction.txParams?.value; - const date = formatDateWithYearContext(initialTransaction.time); - let prefix = '-'; + const date = formatDateWithYearContext(initialTransaction.time); let subtitle; let subtitleContainsOrigin = false; let recipientAddress = to; @@ -174,8 +149,9 @@ export function useTransactionDisplayData(transactionGroup) { // used to display fiat amount of tx. initialized to either tokenFiatAmount or undefined // but can later be modified if dealing with a swap let secondaryDisplayValue = isTokenCategory ? tokenFiatAmount : undefined; - + // The transaction group category that will be used for rendering the icon in the activity list let category; + // The primary title of the Tx that will be displayed in the activity list let title; const { @@ -185,6 +161,25 @@ export function useTransactionDisplayData(transactionGroup) { isViewingReceivedTokenFromSwap, } = useSwappedTokenValue(transactionGroup, currentAsset); + // There are seven types of transaction entries that are currently differentiated in the design + // 1. Signature request + // 2. Send (sendEth sendTokens) + // 3. Deposit + // 4. Site interaction + // 5. Approval + // 6. Swap + // 7. Swap Approval + + const signatureTypes = [ + null, + undefined, + TRANSACTION_TYPES.SIGN, + TRANSACTION_TYPES.PERSONAL_SIGN, + TRANSACTION_TYPES.SIGN_TYPED_DATA, + TRANSACTION_TYPES.ETH_DECRYPT, + TRANSACTION_TYPES.ETH_GET_ENCRYPTION_PUBLIC_KEY, + ]; + if (signatureTypes.includes(type)) { category = TRANSACTION_GROUP_CATEGORIES.SIGNATURE_REQUEST; title = t('signatureRequest'); @@ -251,11 +246,6 @@ export function useTransactionDisplayData(transactionGroup) { ]); recipientAddress = getTokenAddressParam(tokenData); subtitle = t('toAddress', [shortenAddress(recipientAddress)]); - } else if (type === TRANSACTION_TYPES.TOKEN_METHOD_SAFE_TRANSFER_FROM) { - category = TRANSACTION_GROUP_CATEGORIES.SEND; - title = t('safeTransferFrom'); - recipientAddress = getTokenAddressParam(tokenData); - subtitle = t('toAddress', [shortenAddress(recipientAddress)]); } else if (type === TRANSACTION_TYPES.SIMPLE_SEND) { category = TRANSACTION_GROUP_CATEGORIES.SEND; title = t('send'); diff --git a/ui/hooks/useTransactionDisplayData.test.js b/ui/hooks/useTransactionDisplayData.test.js index b30ea254d..c9673daff 100644 --- a/ui/hooks/useTransactionDisplayData.test.js +++ b/ui/hooks/useTransactionDisplayData.test.js @@ -130,18 +130,6 @@ const expectedResults = [ isPending: false, displayedStatusKey: TRANSACTION_STATUSES.CONFIRMED, }, - { - title: 'Safe Transfer From', - category: TRANSACTION_GROUP_CATEGORIES.SEND, - subtitle: 'To: 0xe7d...dd98', - subtitleContainsOrigin: true, - primaryCurrency: '-0 ETH', - senderAddress: '0x806627172af48bd5b0765d3449a7def80d6576ff', - recipientAddress: '0xe7d522230eff653bb0a9b4385f0be0815420dd98', - secondaryCurrency: '-0 ETH', - isPending: false, - displayedStatusKey: TRANSACTION_STATUSES.CONFIRMED, - }, ]; let useSelector, useI18nContext, useTokenFiatAmount; diff --git a/ui/index.js b/ui/index.js index be61e7c9c..5c90d00a1 100644 --- a/ui/index.js +++ b/ui/index.js @@ -1,6 +1,6 @@ import copyToClipboard from 'copy-to-clipboard'; import log from 'loglevel'; -import { clone, memoize } from 'lodash'; +import { clone } from 'lodash'; import React from 'react'; import { render } from 'react-dom'; import browser from 'webextension-polyfill'; @@ -36,7 +36,7 @@ export default function launchMetamaskUi(opts, cb) { // check if we are unlocked first backgroundConnection.getState(function (err, metamaskState) { if (err) { - cb(err, metamaskState); + cb(err); return; } startApp(metamaskState, backgroundConnection, opts).then((store) => { @@ -46,31 +46,21 @@ export default function launchMetamaskUi(opts, cb) { }); } -const _setupLocale = async (currentLocale) => { - const currentLocaleMessages = currentLocale - ? await fetchLocale(currentLocale) - : {}; - const enLocaleMessages = await fetchLocale('en'); - - await loadRelativeTimeFormatLocaleData('en'); - if (currentLocale) { - await loadRelativeTimeFormatLocaleData(currentLocale); - } - - return { currentLocaleMessages, enLocaleMessages }; -}; - -export const setupLocale = memoize(_setupLocale); - async function startApp(metamaskState, backgroundConnection, opts) { // parse opts if (!metamaskState.featureFlags) { metamaskState.featureFlags = {}; } - const { currentLocaleMessages, enLocaleMessages } = await setupLocale( - metamaskState.currentLocale, - ); + const currentLocaleMessages = metamaskState.currentLocale + ? await fetchLocale(metamaskState.currentLocale) + : {}; + const enLocaleMessages = await fetchLocale('en'); + + await loadRelativeTimeFormatLocaleData('en'); + if (metamaskState.currentLocale) { + await loadRelativeTimeFormatLocaleData(metamaskState.currentLocale); + } if (metamaskState.textDirection === 'rtl') { await switchDirection('rtl'); diff --git a/ui/index.test.js b/ui/index.test.js deleted file mode 100644 index 9cb44c025..000000000 --- a/ui/index.test.js +++ /dev/null @@ -1,70 +0,0 @@ -import { setupLocale } from '.'; - -const enMessages = { - troubleStarting: { - message: - 'MetaMask had trouble starting. This error could be intermittent, so try restarting the extension.', - }, - restartMetamask: { - message: 'Restart MetaMask', - }, - stillGettingMessage: { - message: 'Still getting this message?', - }, - sendBugReport: { - message: 'Send us a bug report.', - }, -}; - -const esMessages = { - troubleStarting: { - message: - 'MetaMask tuvo problemas para iniciarse. Este error podría ser intermitente, así que intente reiniciar la extensión.', - }, - restartMetamask: { - message: 'Reiniciar metamáscara', - }, - sendBugReport: { - message: 'Envíenos un informe de errores.', - }, -}; - -jest.mock('./helpers/utils/i18n-helper', () => ({ - fetchLocale: jest.fn((locale) => (locale === 'en' ? enMessages : esMessages)), - loadRelativeTimeFormatLocaleData: jest.fn(), -})); - -describe('Index Tests', () => { - it('should get locale messages by calling setupLocale', async () => { - let result = await setupLocale('en'); - const { currentLocaleMessages: clm, enLocaleMessages: elm } = result; - expect(clm).toBeDefined(); - expect(elm).toBeDefined(); - expect(clm.troubleStarting).toStrictEqual(enMessages.troubleStarting); - - expect(clm.restartMetamask).toStrictEqual(enMessages.restartMetamask); - - expect(clm.stillGettingMessage).toStrictEqual( - enMessages.stillGettingMessage, - ); - - expect(clm.sendBugReport).toStrictEqual(enMessages.sendBugReport); - - result = await setupLocale('es'); - - const { currentLocaleMessages: clm2, enLocaleMessages: elm2 } = result; - expect(clm2).toBeDefined(); - expect(elm2).toBeDefined(); - - expect(clm2.troubleStarting).toStrictEqual(esMessages.troubleStarting); - - expect(clm2.restartMetamask).toStrictEqual(esMessages.restartMetamask); - - expect(clm2.stillGettingMessage).toBeUndefined(); - expect(elm2.stillGettingMessage).toStrictEqual( - enMessages.stillGettingMessage, - ); - - expect(clm2.sendBugReport).toStrictEqual(esMessages.sendBugReport); - }); -}); diff --git a/ui/pages/add-collectible/add-collectible.js b/ui/pages/add-collectible/add-collectible.js index 7d9112a92..ed8dde133 100644 --- a/ui/pages/add-collectible/add-collectible.js +++ b/ui/pages/add-collectible/add-collectible.js @@ -27,7 +27,6 @@ import { getCollectiblesDetectionNoticeDismissed } from '../../ducks/metamask/me import CollectiblesDetectionNotice from '../../components/app/collectibles-detection-notice'; import { MetaMetricsContext } from '../../contexts/metametrics'; import { ASSET_TYPES } from '../../../shared/constants/transaction'; -import { EVENT, EVENT_NAMES } from '../../../shared/constants/metametrics'; export default function AddCollectible() { const t = useI18nContext(); @@ -78,7 +77,7 @@ export default function AddCollectible() { ); trackEvent({ - event: EVENT_NAMES.TOKEN_ADDED, + event: 'Token Added', category: 'Wallet', sensitiveProperties: { token_contract_address: address, @@ -86,7 +85,7 @@ export default function AddCollectible() { tokenId: tokenId.toString(), asset_type: ASSET_TYPES.COLLECTIBLE, token_standard: tokenDetails?.standard, - source: EVENT.SOURCE.TOKEN.CUSTOM, + source: 'custom', }, }); diff --git a/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js index 919f68fd1..a9e6a5ab4 100644 --- a/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js +++ b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.js @@ -14,7 +14,7 @@ import { isEqualCaseInsensitive } from '../../../shared/modules/string-utils'; import { getSuggestedAssets } from '../../selectors'; import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions'; import { TOKEN_STANDARDS } from '../../helpers/constants/common'; -import { EVENT, EVENT_NAMES } from '../../../shared/constants/metametrics'; +import { EVENT } from '../../../shared/constants/metametrics'; import { ASSET_TYPES } from '../../../shared/constants/transaction'; function getTokenName(name, symbol) { @@ -115,14 +115,14 @@ const ConfirmAddSuggestedToken = () => { await dispatch(acceptWatchAsset(id)); trackEvent({ - event: EVENT_NAMES.TOKEN_ADDED, + event: 'Token Added', category: EVENT.CATEGORIES.WALLET, sensitiveProperties: { token_symbol: asset.symbol, token_contract_address: asset.address, token_decimal_precision: asset.decimals, unlisted: asset.unlisted, - source: EVENT.SOURCE.TOKEN.DAPP, + source: 'dapp', token_standard: TOKEN_STANDARDS.ERC20, asset_type: ASSET_TYPES.TOKEN, }, diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js index 7a6d32cce..7487e594b 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js @@ -62,7 +62,6 @@ export default class ConfirmApproveContent extends Component { txData: PropTypes.object, fromAddressIsLedger: PropTypes.bool, chainId: PropTypes.string, - tokenAddress: PropTypes.string, rpcPrefs: PropTypes.object, isContract: PropTypes.bool, hexTransactionTotal: PropTypes.string, @@ -184,9 +183,7 @@ export default class ConfirmApproveContent extends Component { renderERC721OrERC1155PermissionContent() { const { t } = this.context; - const { origin, toAddress, isContract } = this.props; - - const titleTokenDescription = this.getTitleTokenDescription(); + const { origin, toAddress, isContract, assetName, tokenId } = this.props; const displayedAddress = isContract ? `${t('contract')} (${addressSummary(toAddress)})` @@ -201,7 +198,7 @@ export default class ConfirmApproveContent extends Component { {t('approvedAsset')}:
- {titleTokenDescription} + {`${assetName} #${tokenId}`}
@@ -433,82 +430,6 @@ export default class ConfirmApproveContent extends Component { ); } - getTitleTokenDescription() { - const { - tokenId, - assetName, - tokenAddress, - rpcPrefs, - chainId, - assetStandard, - tokenSymbol, - } = this.props; - const { t } = this.context; - let titleTokenDescription = t('token'); - if (rpcPrefs?.blockExplorerUrl || chainId) { - const unknownTokenBlockExplorerLink = getTokenTrackerLink( - tokenAddress, - chainId, - null, - { - blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null, - }, - ); - - const unknownTokenLink = ( - - {t('token')} - - ); - titleTokenDescription = unknownTokenLink; - } - - if (assetStandard === ERC20 || (tokenSymbol && !tokenId)) { - titleTokenDescription = tokenSymbol; - } else if ( - assetStandard === ERC721 || - assetStandard === ERC1155 || - // if we don't have an asset standard but we do have either both an assetname and a tokenID or both a tokenSymbol and tokenId we assume its an NFT - (assetName && tokenId) || - (tokenSymbol && tokenId) - ) { - const tokenIdWrapped = tokenId ? ` (#${tokenId})` : null; - if (assetName || tokenSymbol) { - titleTokenDescription = `${assetName ?? tokenSymbol} ${tokenIdWrapped}`; - } else { - const unknownNFTBlockExplorerLink = getTokenTrackerLink( - tokenAddress, - chainId, - null, - { - blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null, - }, - ); - const unknownNFTLink = ( - <> - - {t('nft')} - - {tokenIdWrapped && {tokenIdWrapped}} - - ); - titleTokenDescription = unknownNFTLink; - } - } - - return titleTokenDescription; - } - render() { const { t } = this.context; const { @@ -531,11 +452,11 @@ export default class ConfirmApproveContent extends Component { rpcPrefs, isContract, assetStandard, + tokenId, + assetName, } = this.props; const { showFullTxDetails } = this.state; - const titleTokenDescription = this.getTitleTokenDescription(); - return (
- {t('allowSpendToken', [titleTokenDescription])} + {t('allowSpendToken', [ + assetStandard === ERC20 + ? tokenSymbol + : `${assetName} (#${tokenId})`, + ])}
{t('trustSiteApprovePermission', [ @@ -629,9 +554,7 @@ export default class ConfirmApproveContent extends Component { : getAccountLink( toAddress, chainId, - { - blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null, - }, + { blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null }, null, ); global.platform.openTab({ diff --git a/ui/pages/confirm-approve/confirm-approve-content/index.scss b/ui/pages/confirm-approve/confirm-approve-content/index.scss index 473be2f7b..0f2593ee4 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/index.scss +++ b/ui/pages/confirm-approve/confirm-approve-content/index.scss @@ -9,10 +9,6 @@ padding: 0 24px 16px 24px; } - &__unknown-asset { - color: var(--color-primary-default); - } - &__icon-display-content { display: flex; height: 51px; diff --git a/ui/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js index 6dca97d1b..246baca77 100644 --- a/ui/pages/confirm-approve/confirm-approve.js +++ b/ui/pages/confirm-approve/confirm-approve.js @@ -52,7 +52,6 @@ export default function ConfirmApprove({ tokenId, userAddress, toAddress, - tokenAddress, transaction, ethTransactionTotal, fiatTransactionTotal, @@ -174,7 +173,6 @@ export default function ConfirmApprove({ tokenId={tokenId} assetName={assetName} assetStandard={assetStandard} - tokenAddress={tokenAddress} showCustomizeGasModal={approveTransaction} showEditApprovalPermissionModal={({ /* eslint-disable no-shadow */ @@ -270,7 +268,6 @@ export default function ConfirmApprove({ ConfirmApprove.propTypes = { assetStandard: PropTypes.string, assetName: PropTypes.string, - tokenAddress: PropTypes.string, userBalance: PropTypes.string, tokenSymbol: PropTypes.string, decimals: PropTypes.string, diff --git a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js index 92cbf9dae..026cea6d8 100644 --- a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js +++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js @@ -7,7 +7,6 @@ import Identicon from '../../components/ui/identicon'; import { EVENT } from '../../../shared/constants/metametrics'; import { conversionUtil } from '../../../shared/modules/conversion.utils'; -import SiteOrigin from '../../components/ui/site-origin'; export default class ConfirmEncryptionPublicKey extends Component { static contextTypes = { @@ -119,9 +118,7 @@ export default class ConfirmEncryptionPublicKey extends Component { const { t } = this.context; const targetSubjectMetadata = subjectMetadata[txData.origin]; - const notice = t('encryptionPublicKeyNotice', [ - , - ]); + const notice = t('encryptionPublicKeyNotice', [txData.origin]); const name = targetSubjectMetadata?.hostname || txData.origin; return ( diff --git a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss index 0df5f72d5..caed0982a 100644 --- a/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss +++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss @@ -198,7 +198,6 @@ flex-direction: column; align-items: center; flex: 1; - width: 100%; } &-identicon { diff --git a/ui/pages/confirm-import-token/confirm-import-token.js b/ui/pages/confirm-import-token/confirm-import-token.js index e1a2e4e56..354077072 100644 --- a/ui/pages/confirm-import-token/confirm-import-token.js +++ b/ui/pages/confirm-import-token/confirm-import-token.js @@ -13,8 +13,7 @@ import { MetaMetricsContext } from '../../contexts/metametrics'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; import { getPendingTokens } from '../../ducks/metamask/metamask'; import { addTokens, clearPendingTokens } from '../../store/actions'; -import { TOKEN_STANDARDS } from '../../helpers/constants/common'; -import { EVENT, EVENT_NAMES } from '../../../shared/constants/metametrics'; +import { EVENT } from '../../../shared/constants/metametrics'; import { ASSET_TYPES } from '../../../shared/constants/transaction'; const getTokenName = (name, symbol) => { @@ -38,17 +37,15 @@ const ConfirmImportToken = () => { addedTokenValues.forEach((pendingToken) => { trackEvent({ - event: EVENT_NAMES.TOKEN_ADDED, + event: 'Token Added', category: EVENT.CATEGORIES.WALLET, sensitiveProperties: { token_symbol: pendingToken.symbol, token_contract_address: pendingToken.address, token_decimal_precision: pendingToken.decimals, unlisted: pendingToken.unlisted, - source: pendingToken.isCustom - ? EVENT.SOURCE.TOKEN.CUSTOM - : EVENT.SOURCE.TOKEN.LIST, - token_standard: TOKEN_STANDARDS.ERC20, + source: pendingToken.isCustom ? 'custom' : 'list', + token_standard: pendingToken.standard, asset_type: ASSET_TYPES.TOKEN, }, }); diff --git a/ui/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js index b824155bc..1d09457c5 100644 --- a/ui/pages/confirmation/confirmation.js +++ b/ui/pages/confirmation/confirmation.js @@ -10,6 +10,7 @@ import { useHistory } from 'react-router-dom'; import { isEqual } from 'lodash'; import { produce } from 'immer'; import Box from '../../components/ui/box'; +import Chip from '../../components/ui/chip'; import MetaMaskTemplateRenderer from '../../components/app/metamask-template-renderer'; import SiteIcon from '../../components/ui/site-icon'; import { DEFAULT_ROUTE } from '../../helpers/constants/routes'; @@ -24,7 +25,6 @@ import { useOriginMetadata } from '../../hooks/useOriginMetadata'; import { getUnapprovedTemplatedConfirmations } from '../../selectors'; import NetworkDisplay from '../../components/app/network-display/network-display'; import Callout from '../../components/ui/callout'; -import SiteOrigin from '../../components/ui/site-origin'; import ConfirmationFooter from './components/confirmation-footer'; import { getTemplateValues, getTemplateAlerts } from './templates'; @@ -208,10 +208,9 @@ export default function ConfirmationPage() { name={originMetadata.hostname} size={36} /> - diff --git a/ui/pages/confirmation/templates/add-ethereum-chain.js b/ui/pages/confirmation/templates/add-ethereum-chain.js index c417a1111..db7dac420 100644 --- a/ui/pages/confirmation/templates/add-ethereum-chain.js +++ b/ui/pages/confirmation/templates/add-ethereum-chain.js @@ -71,8 +71,9 @@ const INVALID_CHAIN = { async function getAlerts(pendingApproval) { const alerts = []; - const safeChainsList = - (await fetchWithCache('https://chainid.network/chains.json')) || []; + const safeChainsList = await fetchWithCache( + 'https://chainid.network/chains.json', + ); const matchedChain = safeChainsList.find( (chain) => chain.chainId === parseInt(pendingApproval.requestData.chainId, 16), diff --git a/ui/pages/create-account/connect-hardware/index.scss b/ui/pages/create-account/connect-hardware/index.scss index 961844530..86517efe4 100644 --- a/ui/pages/create-account/connect-hardware/index.scss +++ b/ui/pages/create-account/connect-hardware/index.scss @@ -124,7 +124,7 @@ } &__error { - color: var(--color-warning-default); + color: var(--color-secondary-default); margin: 20px 20px 10px; display: block; text-align: center; diff --git a/ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js index 11a95ccdf..ef3a32edf 100644 --- a/ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js +++ b/ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js @@ -5,7 +5,7 @@ import Snackbar from '../../../components/ui/snackbar'; import MetaFoxLogo from '../../../components/ui/metafox-logo'; import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; -import { returnToOnboardingInitiatorTab } from '../onboarding-initiator-util'; +import { returnToOnboardingInitiator } from '../onboarding-initiator-util'; import { EVENT } from '../../../../shared/constants/metametrics'; export default class EndOfFlowScreen extends PureComponent { @@ -51,7 +51,7 @@ export default class EndOfFlowScreen extends PureComponent { this._removeBeforeUnload(); await this._onOnboardingComplete(); if (onboardingInitiator) { - await returnToOnboardingInitiatorTab(onboardingInitiator); + await returnToOnboardingInitiator(onboardingInitiator); } history.push(DEFAULT_ROUTE); }; diff --git a/ui/pages/first-time-flow/metametrics-opt-in/index.scss b/ui/pages/first-time-flow/metametrics-opt-in/index.scss index b8ce8929c..de905adae 100644 --- a/ui/pages/first-time-flow/metametrics-opt-in/index.scss +++ b/ui/pages/first-time-flow/metametrics-opt-in/index.scss @@ -33,6 +33,10 @@ &__body-graphic { margin-top: 25px; + + .fa-bar-chart { + color: var(--color-icon-default); + } } &__description { diff --git a/ui/pages/first-time-flow/onboarding-initiator-util.js b/ui/pages/first-time-flow/onboarding-initiator-util.js index 33893a90d..98dc98f89 100644 --- a/ui/pages/first-time-flow/onboarding-initiator-util.js +++ b/ui/pages/first-time-flow/onboarding-initiator-util.js @@ -1,17 +1,25 @@ import browser from 'webextension-polyfill'; import log from 'loglevel'; -export const returnToOnboardingInitiatorTab = async (onboardingInitiator) => { - let tab; - try { - tab = await browser.tabs.update(onboardingInitiator.id, { - active: true, - }); - } catch (error) { - log.debug( - `An error occurred while updating tabs in returnToOnboardingInitiatorTab: ${error.message}`, +const returnToOnboardingInitiatorTab = async (onboardingInitiator) => { + const tab = await new Promise((resolve) => { + browser.tabs.update( + onboardingInitiator.tabId, + { active: true }, + // eslint-disable-next-line no-shadow + (tab) => { + if (tab) { + resolve(tab); + } else { + // silence console message about unchecked error + if (browser.runtime.lastError) { + log.debug(browser.runtime.lastError); + } + resolve(); + } + }, ); - } + }); if (tab) { window.close(); @@ -20,7 +28,29 @@ export const returnToOnboardingInitiatorTab = async (onboardingInitiator) => { log.warn( `Setting current tab to onboarding initiator has failed; falling back to redirect`, ); + window.location.assign(onboardingInitiator.location); + } +}; +export const returnToOnboardingInitiator = async (onboardingInitiator) => { + const tab = await new Promise((resolve) => { + // eslint-disable-next-line no-shadow + browser.tabs.get(onboardingInitiator.tabId, (tab) => { + if (tab) { + resolve(tab); + } else { + // silence console message about unchecked error + if (browser.runtime.lastError) { + log.debug(browser.runtime.lastError); + } + resolve(); + } + }); + }); + + if (tab) { + await returnToOnboardingInitiatorTab(onboardingInitiator); + } else { window.location.assign(onboardingInitiator.location); } }; diff --git a/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js index af02b4761..24d0682ec 100644 --- a/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js +++ b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js @@ -12,7 +12,7 @@ import { } from '../../../../helpers/constants/routes'; import { exportAsFile } from '../../../../helpers/utils/util'; import { EVENT } from '../../../../../shared/constants/metametrics'; -import { returnToOnboardingInitiatorTab } from '../../onboarding-initiator-util'; +import { returnToOnboardingInitiator } from '../../onboarding-initiator-util'; export default class RevealSeedPhrase extends PureComponent { static contextTypes = { @@ -79,7 +79,7 @@ export default class RevealSeedPhrase extends PureComponent { await Promise.all([setCompletedOnboarding(), setSeedPhraseBackedUp(false)]); if (onboardingInitiator) { - await returnToOnboardingInitiatorTab(onboardingInitiator); + await returnToOnboardingInitiator(onboardingInitiator); } history.replace(DEFAULT_ROUTE); }; diff --git a/ui/pages/home/home.component.js b/ui/pages/home/home.component.js index 64f111f07..2a26d5948 100644 --- a/ui/pages/home/home.component.js +++ b/ui/pages/home/home.component.js @@ -114,7 +114,7 @@ export default class Home extends PureComponent { infuraBlocked: PropTypes.bool.isRequired, showWhatsNewPopup: PropTypes.bool.isRequired, hideWhatsNewPopup: PropTypes.func.isRequired, - announcementsToShow: PropTypes.bool.isRequired, + notificationsToShow: PropTypes.bool.isRequired, ///: BEGIN:ONLY_INCLUDE_IN(flask) errorsToShow: PropTypes.object.isRequired, shouldShowErrors: PropTypes.bool.isRequired, @@ -132,8 +132,6 @@ export default class Home extends PureComponent { newCollectibleAddedMessage: PropTypes.string, setNewCollectibleAddedMessage: PropTypes.func.isRequired, closeNotificationPopup: PropTypes.func.isRequired, - newTokensImported: PropTypes.string, - setNewTokensImported: PropTypes.func.isRequired, }; state = { @@ -269,8 +267,6 @@ export default class Home extends PureComponent { setNewNetworkAdded, newCollectibleAddedMessage, setNewCollectibleAddedMessage, - newTokensImported, - setNewTokensImported, } = this.props; return ( @@ -355,38 +351,6 @@ export default class Home extends PureComponent { } /> ) : null} - {newTokensImported ? ( - - - - - {t('newTokensImportedTitle')} - - - {t('newTokensImportedMessage', [newTokensImported])} - - - , - ])} -

-
-
- ); -} - -export default function Notifications() { - const history = useHistory(); - const dispatch = useDispatch(); - const t = useI18nContext(); - const notifications = useSelector(getNotifications); - const snapsRouteObject = useSelector(getSnapsRouteObjects); - const unreadNotifications = useSelector(getUnreadNotifications); - - const markAllAsRead = () => { - const unreadNotificationIds = unreadNotifications.map(({ id }) => id); - - dispatch(markNotificationsAsRead(unreadNotificationIds)); - }; - - const markAsRead = (notificationToMark) => { - if (!notificationToMark.readDate) { - dispatch(markNotificationsAsRead([notificationToMark.id])); - } - }; - - useEffect(() => { - return () => dispatch(deleteExpiredNotifications()); - }, [dispatch]); - - return ( -
-
-
- history.push(DEFAULT_ROUTE)} - /> -
- {t('notificationsHeader')} -
-
- -
-
- {notifications.length > 0 ? ( - notifications.map((notification, id) => ( - - )) - ) : ( -
- {t('notificationsEmptyText')} -
- )} -
-
- ); -} - -NotificationItem.propTypes = { - notification: { - id: PropTypes.string.isRequired, - message: PropTypes.string.isRequired, - origin: PropTypes.string.isRequired, - createdDate: PropTypes.number.isRequired, - readDate: PropTypes.number.isRequired, - }, - snaps: PropTypes.array.isRequired, - onItemClick: PropTypes.func.isRequired, -}; diff --git a/ui/pages/onboarding-flow/create-password/create-password.js b/ui/pages/onboarding-flow/create-password/create-password.js index 0bb23a96d..96d7d838f 100644 --- a/ui/pages/onboarding-flow/create-password/create-password.js +++ b/ui/pages/onboarding-flow/create-password/create-password.js @@ -154,23 +154,25 @@ export default function CreatePassword({
{secretRecoveryPhrase && firstTimeFlowType === FIRST_TIME_FLOW_TYPES.IMPORT ? ( - + ) : ( - + )} {t('createPassword')} - + {t('passwordSetupDetails')} - +
- + - - {t('remember')} - + {t('remember')}
  • diff --git a/ui/pages/onboarding-flow/creation-successful/index.scss b/ui/pages/onboarding-flow/creation-successful/index.scss index 5aa7567bf..54273b1e0 100644 --- a/ui/pages/onboarding-flow/creation-successful/index.scss +++ b/ui/pages/onboarding-flow/creation-successful/index.scss @@ -1,15 +1,9 @@ .creation-successful { - @media screen and (min-width: $break-large) { - display: flex; - flex-direction: column; - align-items: center; - } - img { align-self: center; } - max-width: 600px; + max-width: 575px; ul { list-style-type: disc; diff --git a/ui/pages/onboarding-flow/import-srp/import-srp.js b/ui/pages/onboarding-flow/import-srp/import-srp.js index 536c5823f..df02244fb 100644 --- a/ui/pages/onboarding-flow/import-srp/import-srp.js +++ b/ui/pages/onboarding-flow/import-srp/import-srp.js @@ -25,10 +25,7 @@ export default function ImportSRP({ submitSecretRecoveryPhrase }) { return (
    - +
    {t('accessYourWalletWithSRP')} @@ -56,10 +53,10 @@ export default function ImportSRP({ submitSecretRecoveryPhrase }) { srpText={t('typeYourSRP')} /> - + {t('welcomeToMetaMask')} - + {t('welcomeToMetaMaskIntro')}
    diff --git a/ui/pages/pages.scss b/ui/pages/pages.scss index d6160c24f..a2a6c56c2 100644 --- a/ui/pages/pages.scss +++ b/ui/pages/pages.scss @@ -24,4 +24,3 @@ @import 'token-details/index'; @import 'unlock-page/index'; @import 'onboarding-flow/index'; -@import 'notifications/index'; diff --git a/ui/pages/permissions-connect/flask/snap-install/index.scss b/ui/pages/permissions-connect/flask/snap-install/index.scss index 87047ec05..53e525acb 100644 --- a/ui/pages/permissions-connect/flask/snap-install/index.scss +++ b/ui/pages/permissions-connect/flask/snap-install/index.scss @@ -22,6 +22,10 @@ } } + .version { + font-family: monospace; + } + .page-container__footer { width: 100%; margin-top: 12px; diff --git a/ui/pages/permissions-connect/flask/snap-install/snap-install.js b/ui/pages/permissions-connect/flask/snap-install/snap-install.js index 466a874fa..497ca45af 100644 --- a/ui/pages/permissions-connect/flask/snap-install/snap-install.js +++ b/ui/pages/permissions-connect/flask/snap-install/snap-install.js @@ -37,6 +37,13 @@ export default function SnapInstall({ approveSnapInstall, ]); + const npmId = useMemo(() => { + if (!targetSubjectMetadata.origin.startsWith('npm:')) { + return undefined; + } + return targetSubjectMetadata.origin.substring(4); + }, [targetSubjectMetadata]); + const shouldShowWarning = useMemo( () => Boolean( @@ -67,7 +74,7 @@ export default function SnapInstall({ headerTitle={t('snapInstall')} headerText={null} // TODO(ritave): Add header text when snaps support description siteOrigin={targetSubjectMetadata.origin} - isSnapInstall + npmPackageName={npmId} snapVersion={targetSubjectMetadata.version} boxProps={{ alignItems: ALIGN_ITEMS.CENTER }} /> diff --git a/ui/pages/permissions-connect/index.scss b/ui/pages/permissions-connect/index.scss index fd02a75b2..fc07dede8 100644 --- a/ui/pages/permissions-connect/index.scss +++ b/ui/pages/permissions-connect/index.scss @@ -27,7 +27,7 @@ &__back { @include H7; - color: var(--color-icon-default); + color: var(--color-text-default); font-weight: bold; cursor: pointer; @@ -39,7 +39,7 @@ &__page-count { @include H7; - color: var(--color-text-default); + color: var(--color-icon-default); grid-column: 2; justify-self: end; font-weight: bold; diff --git a/ui/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js index a4d3d8c5a..851111fa7 100644 --- a/ui/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -34,9 +34,6 @@ import Alerts from '../../components/app/alerts'; import Asset from '../asset'; import OnboardingAppHeader from '../onboarding-flow/onboarding-app-header/onboarding-app-header'; import TokenDetailsPage from '../token-details'; -///: BEGIN:ONLY_INCLUDE_IN(flask) -import Notifications from '../notifications'; -///: END:ONLY_INCLUDE_IN import { IMPORT_TOKEN_ROUTE, @@ -62,9 +59,6 @@ import { ONBOARDING_ROUTE, ADD_COLLECTIBLE_ROUTE, TOKEN_DETAILS, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - NOTIFICATIONS_ROUTE, - ///: END:ONLY_INCLUDE_IN } from '../../helpers/constants/routes'; import { @@ -181,11 +175,6 @@ export default class Routes extends Component { exact /> - { - ///: BEGIN:ONLY_INCLUDE_IN(flask) - - ///: END:ONLY_INCLUDE_IN - } { - this.selectRecipient( - address, - name, - `${name ? 'contact' : 'recent'} list`, - ); - }} + selectRecipient={(address, name) => + this.selectRecipient(address, name, 'contact list') + } > {ownedAccounts && ownedAccounts.length > 1 && !userInput && (
    diff --git a/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js index e9eb34c6c..ffa0d9fab 100644 --- a/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js +++ b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js @@ -12,7 +12,7 @@ export default function ExchangeRateDisplay({ secondaryTokenValue, secondaryTokenDecimals = 18, secondaryTokenSymbol, - arrowColor = 'var(--color-primary-default)', + arrowColor = 'var(--color-icon-default)', boldSymbols = true, className, }) { diff --git a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap index dea196ec9..85bc1b6b4 100644 --- a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap +++ b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap @@ -1,5 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`FeeCard renders the component with EIP-1559 V2 enabled 1`] = `null`; + exports[`FeeCard renders the component with EIP-1559 enabled 1`] = `null`; exports[`FeeCard renders the component with initial props 1`] = `null`; diff --git a/ui/pages/swaps/fee-card/fee-card.js b/ui/pages/swaps/fee-card/fee-card.js index 28d7a0131..3c2a11946 100644 --- a/ui/pages/swaps/fee-card/fee-card.js +++ b/ui/pages/swaps/fee-card/fee-card.js @@ -18,6 +18,7 @@ import { TYPOGRAPHY, FONT_WEIGHT, } from '../../../helpers/constants/design-system'; +import GasDetailsItemTitle from '../../../components/app/gas-details-item/gas-details-item-title'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { EVENT } from '../../../../shared/constants/metametrics'; @@ -28,13 +29,17 @@ export default function FeeCard({ primaryFee, secondaryFee, hideTokenApprovalRow, + onFeeCardMaxRowClick, tokenApprovalSourceTokenSymbol, onTokenApprovalClick, metaMaskFee, numberOfQuotes, onQuotesClick, chainId, + smartTransactionsOptInStatus, + smartTransactionsEnabled, isBestQuote, + supportsEIP1559V2 = false, }) { const t = useContext(I18nContext); @@ -68,50 +73,57 @@ export default function FeeCard({
    - {t('transactionDetailGasHeading')} - -

    - {t('swapGasFeesSummary', [ - getTranslatedNetworkName(), - ])} -

    -

    - {t('swapGasFeesDetails')} -

    -

    - { - trackEvent({ - event: 'Clicked "Gas Fees: Learn More" Link', - category: EVENT.CATEGORIES.SWAPS, - }); - global.platform.openTab({ - url: GAS_FEES_LEARN_MORE_URL, - }); - }} - target="_blank" - rel="noopener noreferrer" - > - {t('swapGasFeesLearnMore')} - -

    - - } - containerClassName="fee-card__info-tooltip-content-container" - wrapperClassName="fee-card__row-label fee-card__info-tooltip-container" - wide - /> - + supportsEIP1559V2 && + (!smartTransactionsEnabled || !smartTransactionsOptInStatus) ? ( + + ) : ( + <> + {t('transactionDetailGasHeading')} + +

    + {t('swapGasFeesSummary', [ + getTranslatedNetworkName(), + ])} +

    +

    + {t('swapGasFeesDetails')} +

    +

    + { + trackEvent({ + event: 'Clicked "Gas Fees: Learn More" Link', + category: EVENT.CATEGORIES.SWAPS, + }); + global.platform.openTab({ + url: GAS_FEES_LEARN_MORE_URL, + }); + }} + target="_blank" + rel="noopener noreferrer" + > + {t('swapGasFeesLearnMore')} + +

    + + } + containerClassName="fee-card__info-tooltip-content-container" + wrapperClassName="fee-card__row-label fee-card__info-tooltip-container" + wide + /> + + ) } detailText={primaryFee.fee} detailTotal={secondaryFee.fee} @@ -127,6 +139,16 @@ export default function FeeCard({ {t('maxFee')} {`: ${secondaryFee.maxFee}`} + {!supportsEIP1559V2 && + (!smartTransactionsEnabled || + !smartTransactionsOptInStatus) && ( + onFeeCardMaxRowClick()} + > + {t('edit')} + + )} ) } @@ -191,6 +213,7 @@ FeeCard.propTypes = { fee: PropTypes.string.isRequired, maxFee: PropTypes.string.isRequired, }), + onFeeCardMaxRowClick: PropTypes.func.isRequired, hideTokenApprovalRow: PropTypes.bool.isRequired, tokenApprovalSourceTokenSymbol: PropTypes.string, onTokenApprovalClick: PropTypes.func, @@ -198,5 +221,8 @@ FeeCard.propTypes = { onQuotesClick: PropTypes.func.isRequired, numberOfQuotes: PropTypes.number.isRequired, chainId: PropTypes.string.isRequired, + smartTransactionsOptInStatus: PropTypes.bool, + smartTransactionsEnabled: PropTypes.bool, isBestQuote: PropTypes.bool.isRequired, + supportsEIP1559V2: PropTypes.bool, }; diff --git a/ui/pages/swaps/fee-card/fee-card.test.js b/ui/pages/swaps/fee-card/fee-card.test.js index 5caea9a71..218fba458 100644 --- a/ui/pages/swaps/fee-card/fee-card.test.js +++ b/ui/pages/swaps/fee-card/fee-card.test.js @@ -9,15 +9,23 @@ import { setBackgroundConnection, MOCKS, } from '../../../../test/jest'; +import { EDIT_GAS_MODES } from '../../../../shared/constants/gas'; import { MAINNET_CHAIN_ID } from '../../../../shared/constants/network'; -import { checkNetworkAndAccountSupports1559 } from '../../../selectors'; +import { + checkNetworkAndAccountSupports1559, + getEIP1559V2Enabled, + getPreferences, + getSelectedAccount, +} from '../../../selectors'; import { getGasEstimateType, getGasFeeEstimates, getIsGasEstimatesLoading, } from '../../../ducks/metamask/metamask'; +import { GasFeeContextProvider } from '../../../contexts/gasFee'; import { TRANSACTION_ENVELOPE_TYPE_NAMES } from '../../../helpers/constants/transactions'; +import { useGasFeeEstimates } from '../../../hooks/useGasFeeEstimates'; import FeeCard from '.'; @@ -145,4 +153,56 @@ describe('FeeCard', () => { expect(getByText(`: ${props.secondaryFee.maxFee}`)).toBeInTheDocument(); expect(queryByTestId('fee-card__edit-link')).not.toBeInTheDocument(); }); + + it('renders the component with EIP-1559 V2 enabled', () => { + useGasFeeEstimates.mockImplementation(() => ({ gasFeeEstimates: {} })); + useSelector.mockImplementation((selector) => { + if (selector === getPreferences) { + return { + useNativeCurrencyAsPrimaryCurrency: true, + }; + } + if (selector === getEIP1559V2Enabled) { + return true; + } + if (selector === getSelectedAccount) { + return { + balance: '0x440aa47cc2556', + }; + } + if (selector === checkNetworkAndAccountSupports1559) { + return true; + } + return undefined; + }); + + const store = configureMockStore(middleware)(createSwapsMockStore()); + const props = createProps({ + networkAndAccountSupports1559: true, + maxPriorityFeePerGasDecGWEI: '3', + maxFeePerGasDecGWEI: '4', + supportsEIP1559V2: true, + }); + const { getByText } = renderWithProvider( + + + , + store, + ); + expect(getByText('Best of 6 quotes.')).toBeInTheDocument(); + expect(getByText('Gas')).toBeInTheDocument(); + expect(getByText('(estimated)')).toBeInTheDocument(); + expect(getByText('Swap suggested')).toBeInTheDocument(); + expect(getByText('Max fee')).toBeInTheDocument(); + expect(getByText(props.primaryFee.fee)).toBeInTheDocument(); + expect(getByText(props.secondaryFee.fee)).toBeInTheDocument(); + expect(getByText(`: ${props.secondaryFee.maxFee}`)).toBeInTheDocument(); + expect(getByText('Includes a 0.875% MetaMask fee.')).toBeInTheDocument(); + expect( + document.querySelector('.fee-card__top-bordered-row'), + ).toMatchSnapshot(); + }); }); diff --git a/ui/pages/swaps/index.js b/ui/pages/swaps/index.js index 1ade6f4bb..c60b0bd2c 100644 --- a/ui/pages/swaps/index.js +++ b/ui/pages/swaps/index.js @@ -157,21 +157,11 @@ export default function Swap() { const showSmartTransactionsErrorMessage = currentSmartTransactionsError && !smartTransactionsErrorMessageDismissed; - useEffect(() => { - const leaveSwaps = async () => { - await dispatch(prepareToLeaveSwaps()); - // We need to wait until "prepareToLeaveSwaps" is done, because otherwise - // a user would be redirected from DEFAULT_ROUTE back to Swaps. - history.push(DEFAULT_ROUTE); - }; - - if (!isSwapsChain) { - leaveSwaps(); - } - }, [isSwapsChain, dispatch, history]); - - // This will pre-load gas fees before going to the View Quote page. - useGasFeeEstimates(); + if (networkAndAccountSupports1559) { + // This will pre-load gas fees before going to the View Quote page. + // eslint-disable-next-line react-hooks/rules-of-hooks + useGasFeeEstimates(); + } const { balance: ethBalance, @@ -233,9 +223,6 @@ export default function Swap() { // eslint-disable-next-line useEffect(() => { - if (!isSwapsChain) { - return undefined; - } fetchTokens(chainId) .then((tokens) => { dispatch(setSwapsTokens(tokens)); @@ -253,7 +240,7 @@ export default function Swap() { return () => { dispatch(prepareToLeaveSwaps()); }; - }, [dispatch, chainId, networkAndAccountSupports1559, isSwapsChain]); + }, [dispatch, chainId, networkAndAccountSupports1559]); const hardwareWalletUsed = useSelector(isHardwareWallet); const hardwareWalletType = useSelector(getHardwareWalletType); @@ -366,15 +353,13 @@ export default function Swap() { ]); if (!isSwapsChain) { - // A user is being redirected outside of Swaps via the async "leaveSwaps" function above. In the meantime - // we have to prevent the code below this condition, which wouldn't work on an unsupported chain. - return <>; + return ; } const isStxNotEnoughFundsError = currentSmartTransactionsError === stxErrorTypes.NOT_ENOUGH_FUNDS; - const isRegularTxInProgressError = - currentSmartTransactionsError === stxErrorTypes.REGULAR_TX_IN_PROGRESS; + const isStxRegularTxPendingError = + currentSmartTransactionsError === stxErrorTypes.REGULAR_TX_PENDING; return (
    @@ -438,7 +423,7 @@ export default function Swap() { {t('stxUnavailable')}
    - {isRegularTxInProgressError + {isStxRegularTxPendingError ? t('stxFallbackPendingTx') : t('stxFallbackUnavailable')}
    diff --git a/ui/pages/swaps/select-quote-popover/index.scss b/ui/pages/swaps/select-quote-popover/index.scss index d1e5339a2..987a323b5 100644 --- a/ui/pages/swaps/select-quote-popover/index.scss +++ b/ui/pages/swaps/select-quote-popover/index.scss @@ -246,7 +246,7 @@ } &--orange { - background: var(--color-warning-default); + background: var(--color-secondary-default); } &--green { diff --git a/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js index 705cec192..1eaa99738 100644 --- a/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js +++ b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js @@ -10,7 +10,6 @@ const createProps = (customProps = {}) => { swapToSymbol: 'ETH', initialAggId: 'initialAggId', onQuoteDetailsIsOpened: jest.fn(), - hideEstimatedGasFee: false, ...customProps, }; }; diff --git a/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js index 51a53b3bf..1b594ba3c 100644 --- a/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js +++ b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js @@ -10,7 +10,6 @@ jest.mock( const createProps = (customProps = {}) => { return { - hideEstimatedGasFee: false, selectedAggId: 'Agg2', onSelect: jest.fn(), onCaretClick: jest.fn(), diff --git a/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap b/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap index 34aebe6c4..47517ebf3 100644 --- a/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap +++ b/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap @@ -21,16 +21,16 @@ exports[`SlippageButtons renders the component with initial props 2`] = ` role="radiogroup" > +
  • +
  • + +
  • +
+
+`; + +exports[`GasCustomizationModalComponent renders the component with initial props 2`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 3`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 4`] = ` + +`; + +exports[`GasCustomizationModalComponent renders the component with initial props 5`] = ` + +`; diff --git a/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap b/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap new file mode 100644 index 000000000..91d0d69ba --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/__snapshots__/swaps-gas-customization-modal.container.test.js.snap @@ -0,0 +1,98 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GasCustomizationModalContainer renders the component with initial props 1`] = ` +
+
+ Customize Gas +
+
+ Increasing fee may decrease processing times, but it is not guaranteed. +
+ + Close + +
    +
  • + +
  • +
  • + +
  • +
+
+`; + +exports[`GasCustomizationModalContainer renders the component with initial props 2`] = ` + +`; + +exports[`GasCustomizationModalContainer renders the component with initial props 3`] = ` + +`; + +exports[`GasCustomizationModalContainer renders the component with initial props 4`] = ` + +`; diff --git a/ui/pages/swaps/swaps-gas-customization-modal/index.js b/ui/pages/swaps/swaps-gas-customization-modal/index.js new file mode 100644 index 000000000..a54988ab9 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/index.js @@ -0,0 +1 @@ +export { default } from './swaps-gas-customization-modal.container'; diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js new file mode 100644 index 000000000..848f34feb --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js @@ -0,0 +1,281 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import PageContainer from '../../../components/ui/page-container'; +import { Tabs, Tab } from '../../../components/ui/tabs'; +import { calcGasTotal } from '../../send/send.utils'; +import { sumHexWEIsToUnformattedFiat } from '../../../helpers/utils/conversions.util'; +import AdvancedGasInputs from '../../../components/app/gas-customization/advanced-gas-inputs'; +import BasicTabContent from '../../../components/app/gas-customization/gas-modal-page-container/basic-tab-content'; +import { GAS_ESTIMATE_TYPES } from '../../../helpers/constants/common'; +import { CUSTOM_GAS_ESTIMATE } from '../../../../shared/constants/gas'; +import { EVENT } from '../../../../shared/constants/metametrics'; + +export default class GasModalPageContainer extends Component { + static contextTypes = { + t: PropTypes.func, + trackEvent: PropTypes.func, + }; + + static propTypes = { + insufficientBalance: PropTypes.bool, + gasPriceButtonGroupProps: PropTypes.object, + infoRowProps: PropTypes.shape({ + originalTotalFiat: PropTypes.string, + originalTotalEth: PropTypes.string, + newTotalFiat: PropTypes.string, + newTotalEth: PropTypes.string, + sendAmount: PropTypes.string, + transactionFee: PropTypes.string, + extraInfoRow: PropTypes.shape({ + label: PropTypes.string, + value: PropTypes.string, + }), + }), + onSubmit: PropTypes.func, + cancelAndClose: PropTypes.func, + showCustomPriceTooLowWarning: PropTypes.bool, + disableSave: PropTypes.bool, + customGasLimitMessage: PropTypes.string, + customTotalSupplement: PropTypes.string, + usdConversionRate: PropTypes.number, + customGasPrice: PropTypes.string, + customGasLimit: PropTypes.string, + setSwapsCustomizationModalPrice: PropTypes.func, + setSwapsCustomizationModalLimit: PropTypes.func, + gasEstimateLoadingHasFailed: PropTypes.bool, + minimumGasLimit: PropTypes.number.isRequired, + }; + + state = { + gasSpeedType: '', + }; + + setGasSpeedType(gasEstimateType) { + if (gasEstimateType === GAS_ESTIMATE_TYPES.AVERAGE) { + this.setState({ gasSpeedType: 'average' }); + } else { + this.setState({ gasSpeedType: 'fast' }); + } + } + + renderBasicTabContent(gasPriceButtonGroupProps) { + return ( + { + this.setGasSpeedType(gasEstimateType); + this.props.setSwapsCustomizationModalPrice(gasPrice); + }, + }} + /> + ); + } + + renderAdvancedTabContent() { + const { + insufficientBalance, + showCustomPriceTooLowWarning, + infoRowProps: { transactionFee }, + customGasLimitMessage, + setSwapsCustomizationModalPrice, + setSwapsCustomizationModalLimit, + customGasPrice, + customGasLimit, + minimumGasLimit, + } = this.props; + + return ( +
+
+
+ {this.context.t('newTransactionFee')} +
+
+
+ {transactionFee} +
+
+
+
+
+ { + this.setState({ gasSpeedType: CUSTOM_GAS_ESTIMATE }); + setSwapsCustomizationModalPrice(updatedPrice); + }} + updateCustomGasLimit={(updatedLimit) => { + this.setState({ gasSpeedType: CUSTOM_GAS_ESTIMATE }); + setSwapsCustomizationModalLimit(updatedLimit); + }} + customGasPrice={customGasPrice} + customGasLimit={customGasLimit} + insufficientBalance={insufficientBalance} + customPriceIsSafe={!showCustomPriceTooLowWarning} + customGasLimitMessage={customGasLimitMessage} + minimumGasLimit={minimumGasLimit} + /> +
+
+
+ ); + } + + renderInfoRows( + newTotalFiat, + newTotalEth, + sendAmount, + transactionFee, + extraInfoRow, + ) { + return ( +
+
+
+ + {this.context.t('sendAmount')} + + + {sendAmount} + +
+
+ + {this.context.t('transactionFee')} + + + {transactionFee} + +
+ {extraInfoRow && ( +
+ + {extraInfoRow.label} + + + {extraInfoRow.value} + +
+ )} +
+ + {this.context.t('newTotal')} + + + {newTotalEth} + +
+
+ + {newTotalFiat} + +
+
+
+ ); + } + + renderTabs() { + const { + gasPriceButtonGroupProps, + infoRowProps: { + newTotalFiat, + newTotalEth, + sendAmount, + transactionFee, + extraInfoRow, + }, + gasEstimateLoadingHasFailed, + } = this.props; + + const basicTabInfo = { + name: this.context.t('basic'), + content: this.renderBasicTabContent({ + ...gasPriceButtonGroupProps, + handleGasPriceSelection: this.props.setSwapsCustomizationModalPrice, + }), + }; + const advancedTabInfo = { + name: this.context.t('advanced'), + content: this.renderAdvancedTabContent(), + }; + + const tabsToRender = gasEstimateLoadingHasFailed + ? [advancedTabInfo] + : [basicTabInfo, advancedTabInfo]; + + return ( + + {tabsToRender.map(({ name, content }, i) => ( + +
+ {content} + {this.renderInfoRows( + newTotalFiat, + newTotalEth, + sendAmount, + transactionFee, + extraInfoRow, + )} +
+
+ ))} +
+ ); + } + + render() { + const { + cancelAndClose, + onSubmit, + disableSave, + customGasPrice, + customGasLimit, + } = this.props; + + return ( +
+ cancelAndClose()} + onClose={() => cancelAndClose()} + onSubmit={() => { + const newSwapGasTotal = calcGasTotal( + customGasLimit, + customGasPrice, + ); + + this.context.trackEvent({ + event: 'Gas Fees Changed', + category: EVENT.CATEGORIES.SWAPS, + properties: { + speed_set: this.state.gasSpeedType, + gas_fees: sumHexWEIsToUnformattedFiat( + [newSwapGasTotal, this.props.customTotalSupplement], + 'usd', + this.props.usdConversionRate, + )?.slice(1), + }, + }); + onSubmit(customGasLimit, customGasPrice); + }} + submitText={this.context.t('save')} + headerCloseText={this.context.t('close')} + hideCancel + /> +
+ ); + } +} diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js new file mode 100644 index 000000000..5e8660608 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.test.js @@ -0,0 +1,81 @@ +import React from 'react'; + +import { renderWithProvider } from '../../../../test/jest'; +import GasCustomizationModalComponent from './swaps-gas-customization-modal.component'; + +const createProps = (customProps = {}) => { + return { + insufficientBalance: false, + onSubmit: jest.fn(), + cancelAndClose: jest.fn(), + minimumGasLimit: 100, + gasPriceButtonGroupProps: { + buttonDataLoading: false, + className: 'gas-price-button-group', + gasButtonInfo: [ + { + feeInPrimaryCurrency: '$0.52', + feeInSecondaryCurrency: '0.0048 ETH', + timeEstimate: '~ 1 min 0 sec', + priceInHexWei: '0xa1b2c3f', + gasEstimateType: 'FAST', + }, + { + feeInPrimaryCurrency: '$0.39', + feeInSecondaryCurrency: '0.004 ETH', + timeEstimate: '~ 1 min 30 sec', + priceInHexWei: '0xa1b2c39', + gasEstimateType: 'FAST', + }, + { + feeInPrimaryCurrency: '$0.30', + feeInSecondaryCurrency: '0.00354 ETH', + timeEstimate: '~ 2 min 1 sec', + priceInHexWei: '0xa1b2c30', + gasEstimateType: 'FAST', + }, + ], + handleGasPriceSelection: 'mockSelectionFunction', + noButtonActiveByDefault: true, + showCheck: true, + newTotalFiat: 'mockNewTotalFiat', + newTotalEth: 'mockNewTotalEth', + }, + infoRowProps: { + originalTotalFiat: 'mockOriginalTotalFiat', + originalTotalEth: 'mockOriginalTotalEth', + newTotalFiat: 'mockNewTotalFiat', + newTotalEth: 'mockNewTotalEth', + sendAmount: 'mockSendAmount', + transactionFee: 'mockTransactionFee', + extraInfoRow: { label: 'mockLabel', value: 'mockValue' }, + }, + ...customProps, + }; +}; + +describe('GasCustomizationModalComponent', () => { + it('renders the component with initial props', () => { + const props = createProps(); + const { getByText, getByTestId } = renderWithProvider( + , + ); + expect(getByTestId('page-container__header')).toMatchSnapshot(); + expect(getByText('$0.52')).toBeInTheDocument(); + expect(getByText('0.0048 ETH')).toBeInTheDocument(); + expect(getByTestId('button-group__button0')).toMatchSnapshot(); + expect(getByText('~ 1 min 30 sec')).toBeInTheDocument(); + expect(getByText('$0.39')).toBeInTheDocument(); + expect(getByText('0.004 ETH')).toBeInTheDocument(); + expect( + getByTestId('gas-modal-content__info-row__send-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__transaction-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__total-info'), + ).toMatchSnapshot(); + expect(getByText('Save')).toBeInTheDocument(); + }); +}); diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js new file mode 100644 index 000000000..e4e78009b --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js @@ -0,0 +1,186 @@ +import { connect } from 'react-redux'; +import BigNumber from 'bignumber.js'; +import { hideModal, customSwapsGasParamsUpdated } from '../../../store/actions'; +import { + conversionRateSelector as getConversionRate, + getCurrentCurrency, + getCurrentEthBalance, + getDefaultActiveButtonIndex, + getRenderableGasButtonData, + getUSDConversionRate, + getSwapsDefaultToken, +} from '../../../selectors'; +import { getNativeCurrency } from '../../../ducks/metamask/metamask'; + +import { + getSwapsCustomizationModalPrice, + getSwapsCustomizationModalLimit, + swapGasEstimateLoadingHasFailed, + swapGasPriceEstimateIsLoading, + getSwapGasPriceEstimateData, + swapCustomGasModalPriceEdited, + swapCustomGasModalLimitEdited, + shouldShowCustomPriceTooLowWarning, + swapCustomGasModalClosed, +} from '../../../ducks/swaps/swaps'; +import { + addHexes, + getValueFromWeiHex, + sumHexWEIsToRenderableFiat, +} from '../../../helpers/utils/conversions.util'; +import { formatETHFee } from '../../../helpers/utils/formatters'; +import { calcGasTotal, isBalanceSufficient } from '../../send/send.utils'; +import SwapsGasCustomizationModalComponent from './swaps-gas-customization-modal.component'; + +const mapStateToProps = (state) => { + const currentCurrency = getCurrentCurrency(state); + const conversionRate = getConversionRate(state); + const nativeCurrencySymbol = getNativeCurrency(state); + const { symbol: swapsDefaultCurrencySymbol } = getSwapsDefaultToken(state); + const usedCurrencySymbol = nativeCurrencySymbol || swapsDefaultCurrencySymbol; + + const { modalState: { props: modalProps } = {} } = state.appState.modal || {}; + const { + value, + customGasLimitMessage = '', + customTotalSupplement = '', + extraInfoRow = null, + initialGasPrice, + initialGasLimit, + minimumGasLimit, + } = modalProps; + const buttonDataLoading = swapGasPriceEstimateIsLoading(state); + + const swapsCustomizationModalPrice = getSwapsCustomizationModalPrice(state); + const swapsCustomizationModalLimit = getSwapsCustomizationModalLimit(state); + + const customGasPrice = swapsCustomizationModalPrice || initialGasPrice; + const customGasLimit = swapsCustomizationModalLimit || initialGasLimit; + + const customGasTotal = calcGasTotal(customGasLimit, customGasPrice); + + const gasEstimates = getSwapGasPriceEstimateData(state); + const gasEstimatesInNewFormat = { + low: gasEstimates.safeLow, + medium: gasEstimates.average, + high: gasEstimates.fast, + }; + + const { averageEstimateData, fastEstimateData } = getRenderableGasButtonData( + gasEstimatesInNewFormat, + customGasLimit, + true, + conversionRate, + currentCurrency, + usedCurrencySymbol, + ); + const gasButtonInfo = [averageEstimateData, fastEstimateData]; + + const newTotalFiat = sumHexWEIsToRenderableFiat( + [value, customGasTotal, customTotalSupplement], + currentCurrency, + conversionRate, + ); + + const balance = getCurrentEthBalance(state); + + const newTotalEth = sumHexWEIsToRenderableEth( + [value, customGasTotal, customTotalSupplement], + usedCurrencySymbol, + ); + + const sendAmount = sumHexWEIsToRenderableEth( + [value, '0x0'], + usedCurrencySymbol, + ); + + const insufficientBalance = !isBalanceSufficient({ + amount: value, + gasTotal: customGasTotal, + balance, + conversionRate, + }); + + const customGasLimitTooLow = new BigNumber(customGasLimit, 16).lt( + minimumGasLimit, + 10, + ); + + return { + customGasPrice, + customGasLimit, + showCustomPriceTooLowWarning: shouldShowCustomPriceTooLowWarning(state), + gasPriceButtonGroupProps: { + buttonDataLoading, + defaultActiveButtonIndex: getDefaultActiveButtonIndex( + gasButtonInfo, + customGasPrice, + ), + gasButtonInfo, + }, + infoRowProps: { + originalTotalFiat: sumHexWEIsToRenderableFiat( + [value, customGasTotal, customTotalSupplement], + currentCurrency, + conversionRate, + ), + originalTotalEth: sumHexWEIsToRenderableEth( + [value, customGasTotal, customTotalSupplement], + usedCurrencySymbol, + ), + newTotalFiat, + newTotalEth, + transactionFee: sumHexWEIsToRenderableEth( + ['0x0', customGasTotal], + usedCurrencySymbol, + ), + sendAmount, + extraInfoRow, + }, + gasEstimateLoadingHasFailed: swapGasEstimateLoadingHasFailed(state), + insufficientBalance, + customGasLimitMessage, + customTotalSupplement, + usdConversionRate: getUSDConversionRate(state), + disableSave: insufficientBalance || customGasLimitTooLow, + minimumGasLimit, + }; +}; + +const mapDispatchToProps = (dispatch) => { + return { + cancelAndClose: () => { + dispatch(swapCustomGasModalClosed()); + dispatch(hideModal()); + }, + onSubmit: async (gasLimit, gasPrice) => { + await dispatch(customSwapsGasParamsUpdated(gasLimit, gasPrice)); + dispatch(swapCustomGasModalClosed()); + dispatch(hideModal()); + }, + setSwapsCustomizationModalPrice: (newPrice) => { + dispatch(swapCustomGasModalPriceEdited(newPrice)); + }, + setSwapsCustomizationModalLimit: (newLimit) => { + dispatch(swapCustomGasModalLimitEdited(newLimit)); + }, + }; +}; + +export default connect( + mapStateToProps, + mapDispatchToProps, +)(SwapsGasCustomizationModalComponent); + +function sumHexWEIsToRenderableEth(hexWEIs, currencySymbol = 'ETH') { + const hexWEIsSum = hexWEIs.filter(Boolean).reduce(addHexes); + return formatETHFee( + getValueFromWeiHex({ + value: hexWEIsSum, + fromCurrency: currencySymbol, + toCurrency: currencySymbol, + numberOfDecimals: 6, + }), + currencySymbol, + ); +} diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js new file mode 100644 index 000000000..957458b39 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.test.js @@ -0,0 +1,34 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; + +import { + renderWithProvider, + createSwapsMockStore, +} from '../../../../test/jest'; +import GasCustomizationModalContainer from '.'; + +describe('GasCustomizationModalContainer', () => { + it('renders the component with initial props', () => { + const store = configureMockStore()(createSwapsMockStore()); + const { getByText, getByTestId } = renderWithProvider( + , + store, + ); + expect(getByTestId('page-container__header')).toMatchSnapshot(); + expect(getByText('Basic')).toBeInTheDocument(); + expect(getByText('Advanced')).toBeInTheDocument(); + expect(getByText('Estimated Processing Times')).toBeInTheDocument(); + expect(getByText('Send Amount')).toBeInTheDocument(); + expect(getByText('Transaction fee')).toBeInTheDocument(); + expect( + getByTestId('gas-modal-content__info-row__send-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__transaction-info'), + ).toMatchSnapshot(); + expect( + getByTestId('gas-modal-content__info-row__total-info'), + ).toMatchSnapshot(); + expect(getByText('Save')).toBeInTheDocument(); + }); +}); diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js new file mode 100644 index 000000000..4be1e5fcb --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js @@ -0,0 +1,253 @@ +import React, { useEffect, useState } from 'react'; +import { Provider } from 'react-redux'; +import configureStore from '../../../store/store'; +import testData from '../../../../.storybook/test-data'; +import { formatETHFee } from '../../../helpers/utils/formatters'; +import { + addHexes, + getValueFromWeiHex, + getWeiHexFromDecimalValue, + sumHexWEIsToRenderableFiat, +} from '../../../helpers/utils/conversions.util'; +import { ETH } from '../../../helpers/constants/common'; +import { calcGasTotal, isBalanceSufficient } from '../../send/send.utils'; +import { conversionLessThan } from '../../../../shared/modules/conversion.utils'; +import GasModalPageContainer from './swaps-gas-customization-modal.component'; +// Using Test Data For Redux +const store = configureStore(testData); + +export default { + title: 'Pages/Swaps/GasModalPageContainer', + id: __filename, + component: GasModalPageContainer, + argTypes: { + sendAmountArg: { + name: 'Send Amount (this should be static)', + control: { type: 'number', min: 0, step: 0.01 }, + }, + walletBalance: { + name: 'Wallet Balance (this should be static)', + control: { type: 'number', min: 0, step: 0.01 }, + }, + averageGasPrice: { + name: 'Average Gas Price', + control: { type: 'number', min: 0, step: 0.01 }, + }, + insufficientBalance: { + table: { + disable: true, + }, + }, + gasPriceButtonGroupProps: { + table: { + disable: true, + }, + }, + infoRowProps: { + table: { + disable: true, + }, + }, + onSubmit: { + table: { + disable: true, + }, + }, + cancelAndClose: { + table: { + disable: true, + }, + }, + showCustomPriceTooLowWarning: { + table: { + disable: true, + }, + }, + disableSave: { + table: { + disable: true, + }, + }, + customGasLimitMessage: { + table: { + disable: true, + }, + }, + usdConversionRate: { + table: { + disable: true, + }, + }, + customGasPrice: { + table: { + disable: true, + }, + }, + customGasLimit: { + table: { + disable: true, + }, + }, + setSwapsCustomizationModalLimit: { + table: { + disable: true, + }, + }, + setSwapsCustomizationModalPrice: { + table: { + disable: true, + }, + }, + customTotalSupplement: { + table: { + disable: true, + }, + }, + gasEstimateLoadingHasFailed: { + table: { + disable: true, + }, + }, + minimumGasLimit: { + table: { + disable: true, + }, + }, + }, + args: { + sendAmountArg: 0.01, + walletBalance: 10, + averageGasPrice: 2, + }, + decorators: [(story) => {story()}], +}; + +// Convert Hex Wei to Decimal ETH +const sumHexWEIsToRenderableEth = (hexWEIs, currencySymbol = 'ETH') => { + const hexWEIsSum = hexWEIs.filter(Boolean).reduce(addHexes); + return formatETHFee( + getValueFromWeiHex({ + value: hexWEIsSum, + fromCurrency: currencySymbol, + toCurrency: currencySymbol, + numberOfDecimals: 6, + }), + currencySymbol, + ); +}; + +export const DefaultStory = (args) => { + const { sendAmountArg, walletBalance, averageGasPrice } = args; + + const hexWei = getWeiHexFromDecimalValue({ + value: sendAmountArg, + fromCurrency: ETH, + fromDenomination: ETH, + }); + + // ETH Balance + const balanceHexWei = getWeiHexFromDecimalValue({ + value: walletBalance, + fromCurrency: ETH, + fromDenomination: ETH, + }); + + const sendAmount = sumHexWEIsToRenderableEth([hexWei, '0x0']); + const [gasLimit, setGasLimit] = useState('5208'); + const [gasPrice, setGasPrice] = useState('ee6b2800'); + const [transactionFee, setTransactionFee] = useState(''); + const [totalETH, setTotalETH] = useState(''); + const [totalFiat, setTotalFiat] = useState(''); + const [isInsufficientBalance, setIsInsufficientBalance] = useState(false); + + const { metamask } = store.getState(); + const { currentCurrency, conversionRate } = metamask; + + useEffect(() => { + // Transfer Fee + const customGasTotal = calcGasTotal(gasLimit, gasPrice); + setTransactionFee(sumHexWEIsToRenderableEth(['0x0', customGasTotal])); + + // New Total ETH + setTotalETH(sumHexWEIsToRenderableEth([hexWei, customGasTotal, ''])); + + // New Total Fiat + setTotalFiat( + sumHexWEIsToRenderableFiat( + [hexWei, customGasTotal, ''], + currentCurrency, + conversionRate, + ), + ); + + // Check If Balance is Sufficient + setIsInsufficientBalance( + !isBalanceSufficient({ + amount: hexWei, + gasTotal: customGasTotal, + balance: balanceHexWei, + conversionRate, + }), + ); + }, [ + gasPrice, + gasLimit, + hexWei, + totalETH, + conversionRate, + currentCurrency, + totalFiat, + balanceHexWei, + ]); + + // Check If Gas Price Is Too Low + const shouldShowCustomPriceTooLowWarning = () => { + const customGasPrice = gasPrice; + + if (!customGasPrice || averageGasPrice === undefined) { + return false; + } + + const customPriceRisksSwapFailure = conversionLessThan( + { + value: customGasPrice, + fromNumericBase: 'hex', + fromDenomination: 'WEI', + toDenomination: 'GWEI', + }, + { value: averageGasPrice, fromNumericBase: 'dec' }, + ); + + return customPriceRisksSwapFailure; + }; + + return ( + { + setGasPrice(newPrice); + }} + setSwapsCustomizationModalLimit={(newLimit) => { + setGasLimit(newLimit); + }} + customGasPrice={gasPrice} + customGasLimit={gasLimit} + disableSave={ + isInsufficientBalance || shouldShowCustomPriceTooLowWarning() + } + /> + ); +}; + +DefaultStory.storyName = 'Default'; diff --git a/ui/pages/swaps/swaps.util.js b/ui/pages/swaps/swaps.util.js index ec12cc6f9..9c4f6b52d 100644 --- a/ui/pages/swaps/swaps.util.js +++ b/ui/pages/swaps/swaps.util.js @@ -420,12 +420,11 @@ export async function fetchAggregatorMetadata(chainId) { export async function fetchTopAssets(chainId) { const topAssetsUrl = getBaseApi('topAssets', chainId); - const response = - (await fetchWithCache( - topAssetsUrl, - { method: 'GET', headers: clientIdHeader }, - { cacheRefreshTime: CACHE_REFRESH_FIVE_MINUTES }, - )) || []; + const response = await fetchWithCache( + topAssetsUrl, + { method: 'GET', headers: clientIdHeader }, + { cacheRefreshTime: CACHE_REFRESH_FIVE_MINUTES }, + ); const topAssetsMap = response.reduce((_topAssetsMap, asset, index) => { if (validateData(TOP_ASSET_VALIDATORS, asset, topAssetsUrl)) { return { ..._topAssetsMap, [asset.address]: { index: String(index) } }; @@ -501,7 +500,6 @@ export const getFeeForSmartTransaction = ({ chainId, currentCurrency, conversionRate, - USDConversionRate, nativeCurrencySymbol, feeInWeiDec, }) => { @@ -524,7 +522,7 @@ export const getFeeForSmartTransaction = ({ feeInUsd = getValueFromWeiHex({ value: feeInWeiHex, toCurrency: USD_CURRENCY_CODE, - conversionRate: USDConversionRate, + conversionRate, numberOfDecimals: 2, }); } @@ -545,7 +543,6 @@ export function getRenderableNetworkFeesForQuote({ gasPrice, currentCurrency, conversionRate, - USDConversionRate, tradeValue, sourceSymbol, sourceAmount, @@ -588,7 +585,7 @@ export function getRenderableNetworkFeesForQuote({ feeInUsd = getValueFromWeiHex({ value: totalWeiCost, toCurrency: USD_CURRENCY_CODE, - conversionRate: USDConversionRate, + conversionRate, numberOfDecimals: 2, }); } @@ -758,12 +755,6 @@ export function getSwapsTokensReceivedFromTxMeta( return null; } - if (txMeta.swapMetaData && txMeta.preTxBalance === txMeta.postTxBalance) { - // If preTxBalance and postTxBalance are equal, postTxBalance hasn't been updated on time - // because of the RPC provider delay, so we return an estimated receiving amount instead. - return txMeta.swapMetaData.token_to_amount; - } - let approvalTxGasCost = '0x0'; if (approvalTxMeta && approvalTxMeta.txReceipt) { approvalTxGasCost = calcGasTotal( @@ -942,13 +933,13 @@ export const showRemainingTimeInMinAndSec = (remainingTimeInSec) => { export const stxErrorTypes = { UNAVAILABLE: 'unavailable', NOT_ENOUGH_FUNDS: 'not_enough_funds', - REGULAR_TX_IN_PROGRESS: 'regular_tx_pending', + REGULAR_TX_PENDING: 'regular_tx_pending', }; export const getTranslatedStxErrorMessage = (errorType, t) => { switch (errorType) { case stxErrorTypes.UNAVAILABLE: - case stxErrorTypes.REGULAR_TX_IN_PROGRESS: + case stxErrorTypes.REGULAR_TX_PENDING: return t('stxErrorUnavailable'); case stxErrorTypes.NOT_ENOUGH_FUNDS: return t('stxErrorNotEnoughFunds'); diff --git a/ui/pages/swaps/swaps.util.test.js b/ui/pages/swaps/swaps.util.test.js index 8abff8171..0aaa2345f 100644 --- a/ui/pages/swaps/swaps.util.test.js +++ b/ui/pages/swaps/swaps.util.test.js @@ -8,7 +8,6 @@ import { RINKEBY_CHAIN_ID, KOVAN_CHAIN_ID, AVALANCHE_CHAIN_ID, - ETH_SYMBOL, } from '../../../shared/constants/network'; import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, @@ -40,7 +39,6 @@ import { countDecimals, shouldEnableDirectWrapping, showRemainingTimeInMinAndSec, - getSwapsTokensReceivedFromTxMeta, } from './swaps.util'; jest.mock('../../helpers/utils/storage-helpers.js', () => ({ @@ -569,106 +567,4 @@ describe('Swaps Util', () => { expect(true).toBe(true); }); }); - - describe('getSwapsTokensReceivedFromTxMeta', () => { - const createProps = () => { - return { - tokenSymbol: ETH_SYMBOL, - txMeta: { - swapMetaData: { - token_to_amount: 5, - }, - txReceipt: { - status: '0x0', - }, - preTxBalance: '8b11', - postTxBalance: '8b11', - }, - tokenAddress: '0x881d40237659c251811cec9c364ef91234567890', - accountAddress: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', - tokenDecimals: 6, - approvalTxMeta: null, - chainId: MAINNET_CHAIN_ID, - }; - }; - - it('returns an estimated amount if preTxBalance and postTxBalance are the same for ETH', () => { - const props = createProps(); - expect( - getSwapsTokensReceivedFromTxMeta( - props.tokenSymbol, - props.txMeta, - props.tokenAddress, - props.accountAddress, - props.tokenDecimals, - props.approvalTxMeta, - props.chainId, - ), - ).toBe(props.txMeta.swapMetaData.token_to_amount); - }); - - it('returns null if there is no txMeta', () => { - const props = createProps(); - props.txMeta = undefined; - expect( - getSwapsTokensReceivedFromTxMeta( - props.tokenSymbol, - props.txMeta, - props.tokenAddress, - props.accountAddress, - props.tokenDecimals, - props.approvalTxMeta, - props.chainId, - ), - ).toBeNull(); - }); - - it('returns null if there is no txMeta.txReceipt', () => { - const props = createProps(); - props.txMeta.txReceipt = undefined; - expect( - getSwapsTokensReceivedFromTxMeta( - props.tokenSymbol, - props.txMeta, - props.tokenAddress, - props.accountAddress, - props.tokenDecimals, - props.approvalTxMeta, - props.chainId, - ), - ).toBeNull(); - }); - - it('returns null if there is no txMeta.postTxBalance', () => { - const props = createProps(); - props.txMeta.postTxBalance = undefined; - expect( - getSwapsTokensReceivedFromTxMeta( - props.tokenSymbol, - props.txMeta, - props.tokenAddress, - props.accountAddress, - props.tokenDecimals, - props.approvalTxMeta, - props.chainId, - ), - ).toBeNull(); - }); - - it('returns null if there is no txMeta.preTxBalance', () => { - const props = createProps(); - props.txMeta.preTxBalance = undefined; - expect( - getSwapsTokensReceivedFromTxMeta( - props.tokenSymbol, - props.txMeta, - props.tokenAddress, - props.accountAddress, - props.tokenDecimals, - props.approvalTxMeta, - props.chainId, - ), - ).toBeNull(); - }); - }); }); diff --git a/ui/pages/swaps/view-quote/index.scss b/ui/pages/swaps/view-quote/index.scss index 7f671e901..33b3c16c8 100644 --- a/ui/pages/swaps/view-quote/index.scss +++ b/ui/pages/swaps/view-quote/index.scss @@ -96,12 +96,12 @@ &.high { .actionable-message { - border-color: var(--color-error-default); - background: var(--color-error-muted); + border-color: var(--color-warning-default); + background: var(--color-warning-muted); button { - background: var(--color-error-default); - color: var(--color-error-inverse); + background: var(--color-warning-default); + color: var(--color-warning-inverse); } } } diff --git a/ui/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js index 7a576d1be..ccdea22e7 100644 --- a/ui/pages/swaps/view-quote/view-quote.js +++ b/ui/pages/swaps/view-quote/view-quote.js @@ -19,6 +19,7 @@ import { usePrevious } from '../../../hooks/usePrevious'; import { useGasFeeInputs } from '../../../hooks/gasFeeInput/useGasFeeInputs'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import FeeCard from '../fee-card'; +import EditGasPopover from '../../../components/app/edit-gas-popover/edit-gas-popover.component'; import { FALLBACK_GAS_MULTIPLIER, getQuotes, @@ -42,13 +43,13 @@ import { getReviewSwapClickedTimestamp, getSmartTransactionsOptInStatus, signAndSendSwapsSmartTransaction, - getSwapsNetworkConfig, + getSwapsRefreshStates, getSmartTransactionsEnabled, getCurrentSmartTransactionsError, getCurrentSmartTransactionsErrorMessageDismissed, getSwapsSTXLoading, - fetchSwapsSmartTransactionFees, - getSmartTransactionFees, + estimateSwapsSmartTransactionsGas, + getSmartTransactionEstimatedGas, } from '../../../ducks/swaps/swaps'; import { conversionRateSelector, @@ -60,7 +61,7 @@ import { isHardwareWallet, getHardwareWalletType, checkNetworkAndAccountSupports1559, - getUSDConversionRate, + getEIP1559V2Enabled, } from '../../../selectors'; import { getNativeCurrency, getTokens } from '../../../ducks/metamask/metamask'; @@ -87,10 +88,16 @@ import { } from '../../../helpers/utils/token-util'; import { decimalToHex, + hexToDecimal, + getValueFromWeiHex, decGWEIToHexWEI, hexWEIToDecGWEI, addHexes, } from '../../../helpers/utils/conversions.util'; +import { GasFeeContextProvider } from '../../../contexts/gasFee'; +import { TransactionModalContextProvider } from '../../../contexts/transaction-modal'; +import AdvancedGasFeePopover from '../../../components/app/advanced-gas-fee-popover'; +import EditGasFeePopover from '../../../components/app/edit-gas-fee-popover'; import MainQuoteSummary from '../main-quote-summary'; import { calcGasTotal } from '../../send/send.utils'; import { getCustomTxParamsData } from '../../confirm-approve/confirm-approve.util'; @@ -102,7 +109,10 @@ import { } from '../swaps.util'; import { useTokenTracker } from '../../../hooks/useTokenTracker'; import { QUOTES_EXPIRED_ERROR } from '../../../../shared/constants/swaps'; -import { GAS_RECOMMENDATIONS } from '../../../../shared/constants/gas'; +import { + EDIT_GAS_MODES, + GAS_RECOMMENDATIONS, +} from '../../../../shared/constants/gas'; import CountdownTimer from '../countdown-timer'; import SwapsFooter from '../swaps-footer'; import PulseLoader from '../../../components/ui/pulse-loader'; // TODO: Replace this with a different loading component. @@ -119,12 +129,14 @@ export default function ViewQuote() { const dispatch = useDispatch(); const t = useContext(I18nContext); const trackEvent = useContext(MetaMetricsContext); + const eip1559V2Enabled = useSelector(getEIP1559V2Enabled); const [dispatchedSafeRefetch, setDispatchedSafeRefetch] = useState(false); const [submitClicked, setSubmitClicked] = useState(false); const [selectQuotePopoverShown, setSelectQuotePopoverShown] = useState(false); const [warningHidden, setWarningHidden] = useState(false); const [originalApproveAmount, setOriginalApproveAmount] = useState(null); + const [showEditGasPopover, setShowEditGasPopover] = useState(false); // We need to have currentTimestamp in state, otherwise it would change with each rerender. const [currentTimestamp] = useState(Date.now()); @@ -159,7 +171,6 @@ export default function ViewQuote() { const memoizedTokenConversionRates = useEqualityCheck(tokenConversionRates); const { balance: ethBalance } = useSelector(getSelectedAccount, shallowEqual); const conversionRate = useSelector(conversionRateSelector); - const USDConversionRate = useSelector(getUSDConversionRate); const currentCurrency = useSelector(getCurrentCurrency); const swapsTokens = useSelector(getTokens, isEqual); const networkAndAccountSupports1559 = useSelector( @@ -195,8 +206,10 @@ export default function ViewQuote() { (currentSmartTransactionsError !== 'not_enough_funds' || currentSmartTransactionsErrorMessageDismissed) ); - const smartTransactionFees = useSelector(getSmartTransactionFees); - const swapsNetworkConfig = useSelector(getSwapsNetworkConfig); + const smartTransactionEstimatedGas = useSelector( + getSmartTransactionEstimatedGas, + ); + const swapsRefreshRates = useSelector(getSwapsRefreshStates); const unsignedTransaction = usedQuote.trade; let gasFeeInputs; @@ -299,7 +312,7 @@ export default function ViewQuote() { chainId, smartTransactionsEnabled && smartTransactionsOptInStatus && - smartTransactionFees?.tradeTxFees, + smartTransactionEstimatedGas?.txData, nativeCurrencySymbol, ); }, [ @@ -312,7 +325,7 @@ export default function ViewQuote() { approveGas, memoizedTokenConversionRates, chainId, - smartTransactionFees?.tradeTxFees, + smartTransactionEstimatedGas?.txData, nativeCurrencySymbol, smartTransactionsEnabled, smartTransactionsOptInStatus, @@ -347,7 +360,6 @@ export default function ViewQuote() { : gasPrice, currentCurrency, conversionRate, - USDConversionRate, tradeValue, sourceSymbol: sourceTokenSymbol, sourceAmount: usedQuote.sourceAmount, @@ -363,7 +375,6 @@ export default function ViewQuote() { gasPrice: maxFeePerGas || gasPrice, currentCurrency, conversionRate, - USDConversionRate, tradeValue, sourceSymbol: sourceTokenSymbol, sourceAmount: usedQuote.sourceAmount, @@ -376,31 +387,30 @@ export default function ViewQuote() { rawEthFee: maxRawEthFee, feeInUsd: maxFeeInUsd, } = renderableMaxFees; + const { nonGasFee } = renderableMaxFees; additionalTrackingParams.reg_tx_max_fee_in_usd = Number(maxFeeInUsd); additionalTrackingParams.reg_tx_max_fee_in_eth = Number(maxRawEthFee); if ( currentSmartTransactionsEnabled && smartTransactionsOptInStatus && - smartTransactionFees?.tradeTxFees + smartTransactionEstimatedGas?.txData ) { const stxEstimatedFeeInWeiDec = - smartTransactionFees?.tradeTxFees.feeEstimate + - (smartTransactionFees?.approvalTxFees?.feeEstimate || 0); - const stxMaxFeeInWeiDec = - stxEstimatedFeeInWeiDec * swapsNetworkConfig.stxMaxFeeMultiplier; + smartTransactionEstimatedGas.txData.feeEstimate + + (smartTransactionEstimatedGas.approvalTxData?.feeEstimate || 0); + const stxMaxFeeInWeiDec = stxEstimatedFeeInWeiDec * 2; ({ feeInFiat, feeInEth, rawEthFee, feeInUsd } = getFeeForSmartTransaction({ chainId, currentCurrency, conversionRate, - USDConversionRate, nativeCurrencySymbol, feeInWeiDec: stxEstimatedFeeInWeiDec, })); additionalTrackingParams.stx_fee_in_usd = Number(feeInUsd); additionalTrackingParams.stx_fee_in_eth = Number(rawEthFee); additionalTrackingParams.estimated_gas = - smartTransactionFees?.tradeTxFees.gasLimit; + smartTransactionEstimatedGas.txData.gasLimit; ({ feeInFiat: maxFeeInFiat, feeInEth: maxFeeInEth, @@ -410,7 +420,6 @@ export default function ViewQuote() { chainId, currentCurrency, conversionRate, - USDConversionRate, nativeCurrencySymbol, feeInWeiDec: stxMaxFeeInWeiDec, })); @@ -662,6 +671,53 @@ export default function ViewQuote() { ); }; + const nonGasFeeIsPositive = new BigNumber(nonGasFee, 16).gt(0); + const approveGasTotal = calcGasTotal( + approveGas || '0x0', + networkAndAccountSupports1559 ? baseAndPriorityFeePerGas : gasPrice, + ); + const extraNetworkFeeTotalInHexWEI = new BigNumber(nonGasFee, 16) + .plus(approveGasTotal, 16) + .toString(16); + const extraNetworkFeeTotalInEth = getValueFromWeiHex({ + value: extraNetworkFeeTotalInHexWEI, + toDenomination: 'ETH', + numberOfDecimals: 4, + }); + + let extraInfoRowLabel = ''; + if (approveGas && nonGasFeeIsPositive) { + extraInfoRowLabel = t('approvalAndAggregatorTxFeeCost'); + } else if (approveGas) { + extraInfoRowLabel = t('approvalTxGasCost'); + } else if (nonGasFeeIsPositive) { + extraInfoRowLabel = t('aggregatorFeeCost'); + } + + const onFeeCardMaxRowClick = () => { + networkAndAccountSupports1559 + ? setShowEditGasPopover(true) + : dispatch( + showModal({ + name: 'CUSTOMIZE_METASWAP_GAS', + value: tradeValue, + customGasLimitMessage: approveGas + ? t('extraApprovalGas', [hexToDecimal(approveGas)]) + : '', + customTotalSupplement: approveGasTotal, + extraInfoRow: extraInfoRowLabel + ? { + label: extraInfoRowLabel, + value: `${extraNetworkFeeTotalInEth} ${nativeCurrencySymbol}`, + } + : null, + initialGasPrice: gasPrice, + initialGasLimit: maxGasLimit, + minimumGasLimit: new BigNumber(nonCustomMaxGasLimit, 16).toNumber(), + }), + ); + }; + const actionableBalanceErrorMessage = tokenBalanceUnavailable ? t('swapTokenBalanceUnavailable', [sourceTokenSymbol]) : t('swapApproveNeedMoreTokens', [ @@ -776,11 +832,11 @@ export default function ViewQuote() { chainId, }; intervalId = setInterval(() => { - if (!swapsSTXLoading) { - dispatch(fetchSwapsSmartTransactionFees(unsignedTx, approveTxParams)); - } - }, swapsNetworkConfig.stxGetTransactionsRefreshTime); - dispatch(fetchSwapsSmartTransactionFees(unsignedTx, approveTxParams)); + dispatch( + estimateSwapsSmartTransactionsGas(unsignedTx, approveTxParams), + ); + }, swapsRefreshRates.stxGetTransactionsRefreshTime); + dispatch(estimateSwapsSmartTransactionsGas(unsignedTx, approveTxParams)); } else if (intervalId) { clearInterval(intervalId); } @@ -796,10 +852,14 @@ export default function ViewQuote() { unsignedTransaction.gas, unsignedTransaction.to, chainId, - swapsNetworkConfig.stxGetTransactionsRefreshTime, + swapsRefreshRates.stxGetTransactionsRefreshTime, isSwapButtonDisabled, ]); + const onCloseEditGasPopover = () => { + setShowEditGasPopover(false); + }; + useEffect(() => { // Thanks to the next line we will only do quotes polling 3 times before showing a Quote Timeout modal. dispatch(setSwapsQuotesPollingLimitEnabled(true)); @@ -823,150 +883,196 @@ export default function ViewQuote() { submitClicked, ]); + const transaction = { + userFeeLevel: swapsUserFeeLevel || GAS_RECOMMENDATIONS.HIGH, + txParams: { + maxFeePerGas, + maxPriorityFeePerGas, + gas: maxGasLimit, + }, + }; + + const supportsEIP1559V2 = eip1559V2Enabled && networkAndAccountSupports1559; + return ( -
-
- {selectQuotePopoverShown && ( - setSelectQuotePopoverShown(false)} - onSubmit={(aggId) => dispatch(swapsQuoteSelected(aggId))} - swapToSymbol={destinationTokenSymbol} - initialAggId={usedQuote.aggregator} - onQuoteDetailsIsOpened={trackQuoteDetailsOpened} - hideEstimatedGasFee={ - smartTransactionsEnabled && smartTransactionsOptInStatus - } - /> - )} - -
- {viewQuotePriceDifferenceComponent} - {(showInsufficientWarning || tokenBalanceUnavailable) && ( - setWarningHidden(true)} - /> - )} -
-
- -
- - {currentSmartTransactionsEnabled && - smartTransactionsOptInStatus && - !smartTransactionFees?.tradeTxFees && ( - - - - )} - {(!currentSmartTransactionsEnabled || - !smartTransactionsOptInStatus || - smartTransactionFees?.tradeTxFees) && ( + + +
- { - trackAllAvailableQuotesOpened(); - setSelectQuotePopoverShown(true); - }} - chainId={chainId} - isBestQuote={isBestQuote} - maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI( - maxPriorityFeePerGas, + {selectQuotePopoverShown && ( + setSelectQuotePopoverShown(false)} + onSubmit={(aggId) => dispatch(swapsQuoteSelected(aggId))} + swapToSymbol={destinationTokenSymbol} + initialAggId={usedQuote.aggregator} + onQuoteDetailsIsOpened={trackQuoteDetailsOpened} + hideEstimatedGasFee={ + smartTransactionsEnabled && smartTransactionsOptInStatus + } + /> + )} + + {!supportsEIP1559V2 && + showEditGasPopover && + networkAndAccountSupports1559 && ( + + )} + {supportsEIP1559V2 && ( + <> + + + + )} + +
+ {viewQuotePriceDifferenceComponent} + {(showInsufficientWarning || tokenBalanceUnavailable) && ( + setWarningHidden(true)} + /> + )} +
+
+ +
+ + {currentSmartTransactionsEnabled && + smartTransactionsOptInStatus && + !smartTransactionEstimatedGas?.txData && ( + + + + )} + {(!currentSmartTransactionsEnabled || + !smartTransactionsOptInStatus || + smartTransactionEstimatedGas?.txData) && ( +
+ { + trackAllAvailableQuotesOpened(); + setSelectQuotePopoverShown(true); + }} + chainId={chainId} + isBestQuote={isBestQuote} + supportsEIP1559V2={supportsEIP1559V2} + networkAndAccountSupports1559={networkAndAccountSupports1559} + maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI( + maxPriorityFeePerGas, + )} + maxFeePerGasDecGWEI={hexWEIToDecGWEI(maxFeePerGas)} + smartTransactionsEnabled={currentSmartTransactionsEnabled} + smartTransactionsOptInStatus={smartTransactionsOptInStatus} + /> +
+ )}
- )} -
- { - setSubmitClicked(true); - if (!balanceError) { - if ( + { + setSubmitClicked(true); + if (!balanceError) { + if ( + currentSmartTransactionsEnabled && + smartTransactionsOptInStatus && + smartTransactionEstimatedGas?.txData + ) { + dispatch( + signAndSendSwapsSmartTransaction({ + unsignedTransaction, + trackEvent, + history, + additionalTrackingParams, + }), + ); + } else { + dispatch( + signAndSendTransactions( + history, + trackEvent, + additionalTrackingParams, + ), + ); + } + } else if (destinationToken.symbol === defaultSwapsToken.symbol) { + history.push(DEFAULT_ROUTE); + } else { + history.push(`${ASSET_ROUTE}/${destinationToken.address}`); + } + }} + submitText={ currentSmartTransactionsEnabled && smartTransactionsOptInStatus && - smartTransactionFees?.tradeTxFees - ) { - dispatch( - signAndSendSwapsSmartTransaction({ - unsignedTransaction, - trackEvent, - history, - additionalTrackingParams, - }), - ); - } else { - dispatch( - signAndSendTransactions( - history, - trackEvent, - additionalTrackingParams, - ), - ); + swapsSTXLoading + ? t('preparingSwap') + : t('swap') } - } else if (destinationToken.symbol === defaultSwapsToken.symbol) { - history.push(DEFAULT_ROUTE); - } else { - history.push(`${ASSET_ROUTE}/${destinationToken.address}`); - } - }} - submitText={ - currentSmartTransactionsEnabled && - smartTransactionsOptInStatus && - swapsSTXLoading - ? t('preparingSwap') - : t('swap') - } - hideCancel - disabled={isSwapButtonDisabled} - className={isShowingWarning && 'view-quote__thin-swaps-footer'} - showTopBorder - /> -
+ hideCancel + disabled={isSwapButtonDisabled} + className={isShowingWarning && 'view-quote__thin-swaps-footer'} + showTopBorder + /> +
+ + ); } diff --git a/ui/pages/swaps/view-quote/view-quote.test.js b/ui/pages/swaps/view-quote/view-quote.test.js index 855ff0222..6ad976117 100644 --- a/ui/pages/swaps/view-quote/view-quote.test.js +++ b/ui/pages/swaps/view-quote/view-quote.test.js @@ -64,7 +64,6 @@ describe('ViewQuote', () => { getByTestId('main-quote-summary__exchange-rate-container'), ).toMatchSnapshot(); expect(getByText('Estimated gas fee')).toBeInTheDocument(); - expect(getByText('0.00008 ETH')).toBeInTheDocument(); expect(getByText('Max fee')).toBeInTheDocument(); expect(getByText('Swap')).toBeInTheDocument(); }); @@ -88,7 +87,7 @@ describe('ViewQuote', () => { getByTestId('main-quote-summary__exchange-rate-container'), ).toMatchSnapshot(); expect(getByText('Estimated gas fee')).toBeInTheDocument(); - expect(getByText('0.00008 ETH')).toBeInTheDocument(); + expect(getByText('0.00544 ETH')).toBeInTheDocument(); expect(getByText('Max fee')).toBeInTheDocument(); expect(getByText('Swap')).toBeInTheDocument(); }); diff --git a/ui/pages/unlock-page/index.scss b/ui/pages/unlock-page/index.scss index 745b68350..8e3932715 100644 --- a/ui/pages/unlock-page/index.scss +++ b/ui/pages/unlock-page/index.scss @@ -1,5 +1,4 @@ .unlock-page { - color: var(--color-text-default); display: flex; flex-direction: column; justify-content: flex-start; @@ -7,13 +6,14 @@ width: 357px; padding: 30px; font-weight: 400; + color: var(--color-text-default); &__container { + background: var(--color-background-default); display: flex; align-self: stretch; justify-content: center; flex: 1 0 auto; - background: var(--color-background-default); } &__mascot-container { diff --git a/ui/selectors/confirm-transaction.js b/ui/selectors/confirm-transaction.js index e502d473c..e3e8f6efb 100644 --- a/ui/selectors/confirm-transaction.js +++ b/ui/selectors/confirm-transaction.js @@ -117,29 +117,6 @@ export const unconfirmedTransactionsHashSelector = createSelector( }, ); -export const unconfirmedMessagesHashSelector = createSelector( - unapprovedMsgsSelector, - unapprovedPersonalMsgsSelector, - unapprovedDecryptMsgsSelector, - unapprovedEncryptionPublicKeyMsgsSelector, - unapprovedTypedMessagesSelector, - ( - unapprovedMsgs = {}, - unapprovedPersonalMsgs = {}, - unapprovedDecryptMsgs = {}, - unapprovedEncryptionPublicKeyMsgs = {}, - unapprovedTypedMessages = {}, - ) => { - return { - ...unapprovedMsgs, - ...unapprovedPersonalMsgs, - ...unapprovedDecryptMsgs, - ...unapprovedEncryptionPublicKeyMsgs, - ...unapprovedTypedMessages, - }; - }, -); - const unapprovedMsgCountSelector = (state) => state.metamask.unapprovedMsgCount; const unapprovedPersonalMsgCountSelector = (state) => state.metamask.unapprovedPersonalMsgCount; diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index a8b3ba99a..244545d0e 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -470,24 +470,6 @@ export function getTotalUnapprovedCount(state) { ); } -export function getTotalUnapprovedMessagesCount(state) { - const { - unapprovedMsgCount = 0, - unapprovedPersonalMsgCount = 0, - unapprovedDecryptMsgCount = 0, - unapprovedEncryptionPublicKeyMsgCount = 0, - unapprovedTypedMessagesCount = 0, - } = state.metamask; - - return ( - unapprovedMsgCount + - unapprovedPersonalMsgCount + - unapprovedDecryptMsgCount + - unapprovedEncryptionPublicKeyMsgCount + - unapprovedTypedMessagesCount - ); -} - function getUnapprovedTxCount(state) { const { unapprovedTxs = {} } = state.metamask; return Object.keys(unapprovedTxs).length; @@ -689,7 +671,7 @@ export function getSwapsDefaultToken(state) { export function getIsSwapsChain(state) { const chainId = getCurrentChainId(state); const isNotDevelopment = - process.env.METAMASK_ENVIRONMENT !== 'development' && + process.env.METAMASK_ENVIRONMENT !== 'development' || process.env.METAMASK_ENVIRONMENT !== 'testing'; return isNotDevelopment ? ALLOWED_PROD_SWAPS_CHAIN_IDS.includes(chainId) @@ -711,15 +693,6 @@ export function getIsBuyableMoonPayChain(state) { return Boolean(BUYABLE_CHAINS_MAP?.[chainId]?.moonPay); } -export function getIsBuyableWyreChain(state) { - const chainId = getCurrentChainId(state); - return Boolean(BUYABLE_CHAINS_MAP?.[chainId]?.wyre); -} -export function getIsBuyableCoinbasePayChain(state) { - const chainId = getCurrentChainId(state); - return Boolean(BUYABLE_CHAINS_MAP?.[chainId]?.coinbasePayCurrencies); -} - export function getNativeCurrencyImage(state) { const nativeCurrency = getNativeCurrency(state).toUpperCase(); return NATIVE_CURRENCY_TOKEN_IMAGE_MAP[nativeCurrency]; @@ -741,59 +714,16 @@ export function getSnaps(state) { export const getSnapsRouteObjects = createSelector(getSnaps, (snaps) => { return Object.values(snaps).map((snap) => { return { - id: snap.id, tabMessage: () => snap.manifest.proposedName, descriptionMessage: () => snap.manifest.description, sectionMessage: () => snap.manifest.description, - route: `${SNAPS_VIEW_ROUTE}/${encodeURIComponent(snap.id)}`, + route: `${SNAPS_VIEW_ROUTE}/${window.btoa( + unescape(encodeURIComponent(snap.id)), + )}`, icon: 'fa fa-flask', }; }); }); - -/** - * @typedef {Object} Notification - * @property {string} id - A unique identifier for the notification - * @property {string} origin - A string identifing the snap origin - * @property {EpochTimeStamp} createdDate - A date in epochTimeStramps, identifying when the notification was first committed - * @property {EpochTimeStamp} readDate - A date in epochTimeStramps, identifying when the notification was read by the user - * @property {string} message - A string containing the notification message - */ - -/** - * Notifications are managed by the notification controller and referenced by - * `state.metamask.notifications`. This function returns a list of notifications - * the can be shown to the user. - * - * The returned notifications are sorted by date. - * - * @param {Object} state - the redux state object - * @returns {Notification[]} An array of notifications that can be shown to the user - */ - -export function getNotifications(state) { - const notifications = Object.values(state.metamask.notifications); - - const notificationsSortedByDate = notifications.sort( - (a, b) => new Date(b.createdDate) - new Date(a.createdDate), - ); - return notificationsSortedByDate; -} - -export function getUnreadNotifications(state) { - const notifications = getNotifications(state); - - const unreadNotificationCount = notifications.filter( - (notification) => notification.readDate === null, - ); - - return unreadNotificationCount; -} - -export const getUnreadNotificationsCount = createSelector( - getUnreadNotifications, - (notifications) => notifications.length, -); ///: END:ONLY_INCLUDE_IN /** @@ -819,15 +749,15 @@ function getAllowedAnnouncementIds(state) { 7: false, 8: supportsWebHid && currentKeyringIsLedger && currentlyUsingLedgerLive, 9: getIsMainnet(state), - 10: Boolean(process.env.TOKEN_DETECTION_V2) && !process.env.IN_TEST, - 11: Boolean(process.env.TOKEN_DETECTION_V2) && !process.env.IN_TEST, + 10: Boolean(process.env.TOKEN_DETECTION_V2), + 11: Boolean(process.env.TOKEN_DETECTION_V2), 12: true, }; } /** - * @typedef {Object} Announcement - * @property {number} id - A unique identifier for the announcement + * @typedef {Object} Notification + * @property {number} id - A unique identifier for the notification * @property {string} date - A date in YYYY-MM-DD format, identifying when the notification was first committed */ @@ -1039,22 +969,6 @@ export function getIsTokenDetectionSupported(state) { ].includes(chainId); } -/** - * To retrieve the list of tokens detected and saved on the state to detectedToken object. - * - * @param {*} state - * @returns list of token objects - */ export function getDetectedTokensInCurrentNetwork(state) { return state.metamask.detectedTokens; } - -/** - * To fetch the name of the tokens that are imported from tokens found page - * - * @param {*} state - * @returns - */ -export function getNewTokensImported(state) { - return state.appState.newTokensImported; -} diff --git a/ui/selectors/selectors.test.js b/ui/selectors/selectors.test.js index 385bd2a56..ca3f9c92f 100644 --- a/ui/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -244,27 +244,4 @@ describe('Selectors', () => { const appIsLoading = selectors.getAppIsLoading(mockState); expect(appIsLoading).toStrictEqual(false); }); - it('#getNotifications', () => { - const notifications = selectors.getNotifications(mockState); - - expect(notifications).toStrictEqual([ - mockState.metamask.notifications.test, - mockState.metamask.notifications.test2, - ]); - }); - it('#getUnreadNotificationsCount', () => { - const unreadNotificationCount = selectors.getUnreadNotificationsCount( - mockState, - ); - - expect(unreadNotificationCount).toStrictEqual(1); - }); - - it('#getUnreadNotifications', () => { - const unreadNotifications = selectors.getUnreadNotifications(mockState); - - expect(unreadNotifications).toStrictEqual([ - mockState.metamask.notifications.test, - ]); - }); }); diff --git a/ui/store/actionConstants.js b/ui/store/actionConstants.js index 2a5528e72..1e426daea 100644 --- a/ui/store/actionConstants.js +++ b/ui/store/actionConstants.js @@ -114,6 +114,3 @@ export const DISMISS_SMART_TRANSACTIONS_ERROR_MESSAGE = 'DISMISS_SMART_TRANSACTIONS_ERROR_MESSAGE'; export const TOGGLE_CURRENCY_INPUT_SWITCH = 'TOGGLE_CURRENCY_INPUT_SWITCH'; - -// Token detection v2 -export const SET_NEW_TOKENS_IMPORTED = 'SET_NEW_TOKENS_IMPORTED'; diff --git a/ui/store/actions.js b/ui/store/actions.js index b8f738882..31d551ae0 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -13,7 +13,6 @@ import { ENVIRONMENT_TYPE_NOTIFICATION, ORIGIN_METAMASK, POLLING_TOKEN_ENVIRONMENT_TYPES, - MESSAGE_TYPE, } from '../../shared/constants/app'; import { hasUnconfirmedTransactions } from '../helpers/utils/confirm-tx.util'; import txHelper from '../helpers/utils/tx-helper'; @@ -23,9 +22,6 @@ import { getMetaMaskAccounts, getPermittedAccountsForCurrentTab, getSelectedAddress, - ///: BEGIN:ONLY_INCLUDE_IN(flask) - getNotifications, - ///: END:ONLY_INCLUDE_IN } from '../selectors'; import { computeEstimatedGasLimit, resetSendState } from '../ducks/send'; import { switchedToUnconnectedAccount } from '../ducks/alerts/unconnected-account'; @@ -39,9 +35,6 @@ import { import { EVENT } from '../../shared/constants/metametrics'; import { parseSmartTransactionsError } from '../pages/swaps/swaps.util'; import { isEqualCaseInsensitive } from '../../shared/modules/string-utils'; -///: BEGIN:ONLY_INCLUDE_IN(flask) -import { NOTIFICATIONS_EXPIRATION_DELAY } from '../helpers/constants/notifications'; -///: END:ONLY_INCLUDE_IN import * as actionConstants from './actionConstants'; let background = null; @@ -998,9 +991,9 @@ export function enableSnap(snapId) { }; } -export function removeSnap(snapId) { +export function removeSnap(snap) { return async (dispatch) => { - await promisifiedBackground.removeSnap(snapId); + await promisifiedBackground.removeSnap(snap); await forceUpdateMetamaskState(dispatch); }; } @@ -1008,44 +1001,6 @@ export function removeSnap(snapId) { export async function removeSnapError(msgData) { return promisifiedBackground.removeSnapError(msgData); } - -export function dismissNotifications(ids) { - return async (dispatch) => { - await promisifiedBackground.dismissNotifications(ids); - await forceUpdateMetamaskState(dispatch); - }; -} - -export function deleteExpiredNotifications() { - return async (dispatch, getState) => { - const state = getState(); - const notifications = getNotifications(state); - - const notificationIdsToDelete = notifications - .filter((notification) => { - const expirationTime = new Date( - Date.now() - NOTIFICATIONS_EXPIRATION_DELAY, - ); - - return Boolean( - notification.readDate && - new Date(notification.readDate) < expirationTime, - ); - }) - .map(({ id }) => id); - if (notificationIdsToDelete.length) { - await promisifiedBackground.dismissNotifications(notificationIdsToDelete); - await forceUpdateMetamaskState(dispatch); - } - }; -} - -export function markNotificationsAsRead(ids) { - return async (dispatch) => { - await promisifiedBackground.markNotificationsAsRead(ids); - await forceUpdateMetamaskState(dispatch); - }; -} ///: END:ONLY_INCLUDE_IN export function cancelMsg(msgData) { @@ -1066,96 +1021,6 @@ export function cancelMsg(msgData) { }; } -/** - * Cancels all of the given messages - * - * @param {Array} msgDataList - a list of msg data objects - * @returns {function(*): Promise} - */ -export function cancelMsgs(msgDataList) { - return async (dispatch) => { - dispatch(showLoadingIndication()); - - try { - const msgIds = msgDataList.map((id) => id); - const cancellations = msgDataList.map( - ({ id, type }) => - new Promise((resolve, reject) => { - switch (type) { - case MESSAGE_TYPE.ETH_SIGN_TYPED_DATA: - background.cancelTypedMessage(id, (err) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - return; - case MESSAGE_TYPE.PERSONAL_SIGN: - background.cancelPersonalMessage(id, (err) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - return; - case MESSAGE_TYPE.ETH_DECRYPT: - background.cancelDecryptMessage(id, (err) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - return; - case MESSAGE_TYPE.ETH_GET_ENCRYPTION_PUBLIC_KEY: - background.cancelEncryptionPublicKeyMsg(id, (err) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - return; - case MESSAGE_TYPE.ETH_SIGN: - background.cancelMessage(id, (err) => { - if (err) { - reject(err); - return; - } - resolve(); - }); - return; - default: - reject( - new Error( - `MetaMask Message Signature: Unknown message type: ${id}`, - ), - ); - } - }), - ); - - await Promise.all(cancellations); - const newState = await updateMetamaskStateFromBackground(); - dispatch(updateMetamaskState(newState)); - - msgIds.forEach((id) => { - dispatch(completedTx(id)); - }); - } catch (err) { - log.error(err); - } finally { - if (getEnvironmentType() === ENVIRONMENT_TYPE_NOTIFICATION) { - closeNotificationPopup(); - } else { - dispatch(hideLoadingIndication()); - } - } - }; -} - export function cancelPersonalMsg(msgData) { return async (dispatch) => { dispatch(showLoadingIndication()); @@ -3094,13 +2959,6 @@ export function setNewCollectibleAddedMessage(newCollectibleAddedMessage) { }; } -export function setNewTokensImported(newTokensImported) { - return { - type: actionConstants.SET_NEW_TOKENS_IMPORTED, - value: newTokensImported, - }; -} - export function setLastActiveTime() { return (dispatch) => { background.setLastActiveTime((err) => { @@ -3556,16 +3414,36 @@ export async function setSmartTransactionsOptInStatus( await promisifiedBackground.setSmartTransactionsOptInStatus(optInState); } -export function fetchSmartTransactionFees( +export function fetchSmartTransactionFees(unsignedTransaction) { + return async (dispatch) => { + try { + return await promisifiedBackground.fetchSmartTransactionFees( + unsignedTransaction, + ); + } catch (e) { + log.error(e); + if (e.message.startsWith('Fetch error:')) { + const errorObj = parseSmartTransactionsError(e.message); + dispatch({ + type: actionConstants.SET_SMART_TRANSACTIONS_ERROR, + payload: errorObj.type, + }); + } + throw e; + } + }; +} + +export function estimateSmartTransactionsGas( unsignedTransaction, approveTxParams, ) { + if (approveTxParams) { + approveTxParams.value = '0x0'; + } return async (dispatch) => { - if (approveTxParams) { - approveTxParams.value = '0x0'; - } try { - return await promisifiedBackground.fetchSmartTransactionFees( + await promisifiedBackground.estimateSmartTransactionsGas( unsignedTransaction, approveTxParams, ); diff --git a/ui/store/actions.test.js b/ui/store/actions.test.js index f956cc841..727835ecf 100644 --- a/ui/store/actions.test.js +++ b/ui/store/actions.test.js @@ -1696,58 +1696,4 @@ describe('Actions', () => { expect(expectedAction.value.id).toStrictEqual(txId); }); }); - - describe('#cancelMsgs', () => { - it('creates COMPLETED_TX with the cancelled messages IDs', async () => { - const store = mockStore(); - - const cancelTypedMessageStub = sinon.stub().callsFake((_, cb) => cb()); - - const cancelPersonalMessageStub = sinon.stub().callsFake((_, cb) => cb()); - - background.getApi.returns({ - cancelTypedMessage: cancelTypedMessageStub, - cancelPersonalMessage: cancelPersonalMessageStub, - getState: sinon.stub().callsFake((cb) => - cb(null, { - currentLocale: 'test', - selectedAddress: '0xFirstAddress', - provider: { - chainId: '0x1', - }, - accounts: { - '0xFirstAddress': { - balance: '0x0', - }, - }, - cachedBalances: { - '0x1': { - '0xFirstAddress': '0x0', - }, - }, - }), - ), - }); - - const msgsList = [ - { id: 7648683973086304, status: 'unapproved', type: 'personal_sign' }, - { - id: 7648683973086303, - status: 'unapproved', - type: 'eth_signTypedData', - }, - ]; - - actions._setBackgroundConnection(background.getApi()); - - await store.dispatch(actions.cancelMsgs(msgsList)); - const resultantActions = store.getActions(); - const expectedActions = resultantActions.filter( - (action) => action.type === 'COMPLETED_TX', - ); - - expect(expectedActions[0].value.id).toStrictEqual(msgsList[0]); - expect(expectedActions[1].value.id).toStrictEqual(msgsList[1]); - }); - }); }); diff --git a/yarn.lock b/yarn.lock index 9bbf6b74d..f94777dca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1411,21 +1411,6 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@eslint/eslintrc@^1.2.2": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.3.tgz#fcaa2bcef39e13d6e9e7f6271f4cc7cae1174886" - integrity sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.3.2" - globals "^13.9.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - "@eth-optimism/contracts@0.0.0-2021919175625": version "0.0.0-2021919175625" resolved "https://registry.yarnpkg.com/@eth-optimism/contracts/-/contracts-0.0.0-2021919175625.tgz#551ed5d98ac4405596e97f723c28ee6376e65546" @@ -2212,52 +2197,6 @@ ws "*" xtend "^4.0.0" -"@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.4" - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@inquirer/confirm@^0.0.14-alpha.0": - version "0.0.14-alpha.0" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-0.0.14-alpha.0.tgz#4a759c6def5ecd73bc239e090ee6197f74f52dbd" - integrity sha512-MTMCp/jUHJUB0IVkV5utQ1NUE3tqH2W0OtYXByW+ykoRXLiaYrv8vYtx6j0/rOiDHhNjNqTEIWomQx16w1x0uQ== - dependencies: - "@inquirer/core" "^0.0.15-alpha.0" - "@inquirer/input" "^0.0.15-alpha.0" - chalk "^4.1.1" - -"@inquirer/core@^0.0.15-alpha.0": - version "0.0.15-alpha.0" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-0.0.15-alpha.0.tgz#08b6439f3998669d1ba0165c0c5f91736b0c7848" - integrity sha512-aytWU6/yM9HkZ09BrgfTJlVsZjmxoiO1cBL5tlkO/jYe4ZuU84rHWnFFxorRzkmT6gkTs1L9TUKaeK3tbyJmJw== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-spinners "^2.6.0" - cli-width "^3.0.0" - lodash "^4.17.21" - mute-stream "^0.0.8" - run-async "^2.3.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -"@inquirer/input@^0.0.15-alpha.0": - version "0.0.15-alpha.0" - resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-0.0.15-alpha.0.tgz#60556547845775ac332d7b3406717f361b3ef721" - integrity sha512-h3mxEK9xTtdAX6a+S/pYRVRTxpnjOPQgQADpgFar/yQqklyBRM5+uX1YRRQG+uwU0IzpI18viPnEdibxrY7Kyw== - dependencies: - "@inquirer/core" "^0.0.15-alpha.0" - chalk "^4.1.1" - "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -2733,11 +2672,6 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@mdn/browser-compat-data@4.1.19": - version "4.1.19" - resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.1.19.tgz#33f8c6c63a14a3acc50062df93eaa92f33a10a0a" - integrity sha512-zDrdjvX2dwunW4HOGwpibLHvfnDRQOJ89bGnkQ7TXZ7H7JSehbg2Gf0zNbML+R/03QItZ7EI6QHloOJ2znFSdA== - "@mdx-js/loader@^1.6.22": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-1.6.22.tgz#d9e8fe7f8185ff13c9c8639c048b123e30d322c4" @@ -2783,34 +2717,24 @@ integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== "@metamask/auto-changelog@^2.1.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@metamask/auto-changelog/-/auto-changelog-2.6.0.tgz#3cef14905635b144b0fc86aed8957e0942a91cc4" - integrity sha512-YzZ/Uc/3nfvDxZxZT9YMa0CJn8/kpxif/2y8TXi5blzxBiaYop9zUh9a+7PV3C4EQVUNZuTvkE816Ua3AZ0jHA== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@metamask/auto-changelog/-/auto-changelog-2.5.0.tgz#078f38142a3086fdb5556c758969a015c71dfdc9" + integrity sha512-39FeU98Poll3eTqv/bggqo3Yisza0WQJ8l9IiYloMVa2LV8XqTNqVkS4cNEU/5yq62n47JSAv6lZBtWCqeAjZQ== dependencies: diff "^5.0.0" execa "^5.1.1" semver "^7.3.5" yargs "^17.0.1" -"@metamask/bip39@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@metamask/bip39/-/bip39-4.0.0.tgz#1cb867a8454e3d45d065107b4e070d58bdb64aac" - integrity sha512-xH2g8mFe9p2WePnKeQJH4U8MB6pWPyvwpsz4stb0YdnMOR7cKA6Jm/KOSFiPKr1i9+AzNDImt/XxhwF5ej4jXQ== - dependencies: - "@types/node" "11.11.6" - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - "@metamask/contract-metadata@^1.31.0", "@metamask/contract-metadata@^1.33.0": - version "1.35.0" - resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.35.0.tgz#2bf2b8f2b6fdbd5132f0bcfa594b6c02dc71c42e" - integrity sha512-zfZKwLFOVrQS8vTFoeoNCG9JhqmK4oyembGiGVVpUAYD9BHVZnd9WpicGoUC07ROXLEyQuAK9AJZNBtqwwzfEQ== + version "1.33.0" + resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.33.0.tgz#3f0501d5c6d9119ce09c1edb075fc0a8fed7d09c" + integrity sha512-sWfzsUe59UH2Y1A7czRjhPmYrWlg4UQDOUPdf+lY7kbXwYrlF/ZUvhQYajdgJVchv2yDzr+cFhWF7DmNb5NyTQ== -"@metamask/controllers@^29.0.1": - version "29.0.1" - resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-29.0.1.tgz#8b6d066a23877c82de005ce566b7fd6bbaa7cc13" - integrity sha512-jOZiaOg9E0Th2Pq75kRNMtKmku7dba6KVvKA5olEd7YB+2tzCkBh+TU16RAS1RUQzGXahWvt+kXDV/FLFa2ixg== +"@metamask/controllers@^27.1.1": + version "27.1.1" + resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-27.1.1.tgz#b3288bfd05e381e9e32ed60b68a09b2855db1140" + integrity sha512-RzQ4zKsqmieYqAiVsIIazLTo9GYMcm9fDhYPJklP1M+bzm1k49GRFnZEfru3w/dPVY+wWgcDo/0ZWlOILbu3hg== dependencies: "@ethereumjs/common" "^2.3.1" "@ethereumjs/tx" "^3.2.1" @@ -2825,7 +2749,7 @@ deep-freeze-strict "^1.1.1" eth-ens-namehash "^2.0.8" eth-json-rpc-infura "^5.1.0" - eth-keyring-controller "^7.0.2" + eth-keyring-controller "^6.2.1" eth-method-registry "1.1.0" eth-phishing-detect "^1.1.16" eth-query "^2.1.2" @@ -2848,7 +2772,48 @@ web3 "^0.20.7" web3-provider-engine "^16.0.3" -"@metamask/design-tokens@^1.6.0", "@metamask/design-tokens@^1.6.5": +"@metamask/controllers@^28.0.0": + version "28.0.0" + resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-28.0.0.tgz#dbde11df635daeb9d73ff989cb274f94f913ff39" + integrity sha512-ABIZ5OO6g9DzyKrDB0yr1KzyleqVZ4V2d9S8jaToz5AaDZ0tnVkcKptCtRfhzV8xC23xynKjoO7cU9ZkDXBbjw== + dependencies: + "@ethereumjs/common" "^2.3.1" + "@ethereumjs/tx" "^3.2.1" + "@keystonehq/metamask-airgapped-keyring" "^0.3.0" + "@metamask/contract-metadata" "^1.33.0" + "@metamask/metamask-eth-abis" "3.0.0" + "@metamask/types" "^1.1.0" + "@types/uuid" "^8.3.0" + abort-controller "^3.0.0" + async-mutex "^0.2.6" + babel-runtime "^6.26.0" + deep-freeze-strict "^1.1.1" + eth-ens-namehash "^2.0.8" + eth-json-rpc-infura "^5.1.0" + eth-keyring-controller "^6.2.1" + eth-method-registry "1.1.0" + eth-phishing-detect "^1.1.16" + eth-query "^2.1.2" + eth-rpc-errors "^4.0.0" + eth-sig-util "^3.0.0" + ethereumjs-util "^7.0.10" + ethereumjs-wallet "^1.0.1" + ethers "^5.4.1" + ethjs-unit "^0.1.6" + fast-deep-equal "^3.1.3" + immer "^9.0.6" + isomorphic-fetch "^3.0.0" + json-rpc-engine "^6.1.0" + jsonschema "^1.2.4" + multiformats "^9.5.2" + nanoid "^3.1.31" + punycode "^2.1.1" + single-call-balance-checker-abi "^1.0.0" + uuid "^8.3.2" + web3 "^0.20.7" + web3-provider-engine "^16.0.3" + +"@metamask/design-tokens@^1.5.1", "@metamask/design-tokens@^1.6.0": version "1.6.5" resolved "https://registry.yarnpkg.com/@metamask/design-tokens/-/design-tokens-1.6.5.tgz#e585b67f73ce301e0218d98ba89e079f7e81c412" integrity sha512-5eCrUHXrIivXX1xx6kwNtM9s/ejhrPYSATSniFc7YKS9z+TkCK4/n52owOBnDIbrL8W3XxQIiaaqQAM+NQad4w== @@ -2878,21 +2843,10 @@ resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-9.0.0.tgz#22d4911b705f7e4e566efbdda0e37912da33e30f" integrity sha512-mWlLGQKjXXFOj9EtDClKSoTLeQuPW2kM1w3EpUMf4goYAQ+kLXCCa8pEff6h8ApWAnjhYmXydA1znQ2J4XvD+A== -"@metamask/eth-hd-keyring@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@metamask/eth-hd-keyring/-/eth-hd-keyring-4.0.2.tgz#0a81556a556b361755c8d6fb5aced1ce5be0331c" - integrity sha512-v47VOTCCmZUZ6uxM5tQNoasQjLdrZADmgph2fhk4m7zKVUxDvYFU7FJT3Rm55fk8mg+dKSbEObDriqbdWeBbcA== - dependencies: - "@metamask/bip39" "^4.0.0" - "@metamask/eth-sig-util" "^4.0.0" - eth-simple-keyring "^4.2.0" - ethereumjs-util "^7.0.9" - ethereumjs-wallet "^1.0.1" - -"@metamask/eth-ledger-bridge-keyring@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.13.0.tgz#586b705d92339d08650f9eef42ab2388c4dd2675" - integrity sha512-Xtze0Itc2Z6hLOlCaUjmuRlG97vtx6bPcWHcV1TWWOAKwLgatymUvBB3LTVIjJ/vxo8vysxp3sDf0jlGGlo7OA== +"@metamask/eth-ledger-bridge-keyring@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.12.0.tgz#d3986e0dbbfeab713f4e0338bf4e5c74a2265bdd" + integrity sha512-kceBQc/wKCAdChZeI1P0Fs0FS15WtiD2Q87MqmfuJYpOriWRx/RmjKZoa6EJe2vy20KurlZRcKIiU8nFQ0e/ag== dependencies: "@ethereumjs/tx" "^3.2.0" eth-sig-util "^2.0.0" @@ -2928,16 +2882,15 @@ resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.1.0.tgz#c0be8e68445b7b83cf85bcc03a56cdf8e256c973" integrity sha512-ADuWlTUkFfN2vXlz81Bg/0BA+XRor+CdK1055p6k7H6BLIPoDKn9SBOFld9haQFuR9cKh/JYHcnlSIv5R4fUEw== -"@metamask/execution-environments@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.15.0.tgz#1c08229e4853b750fb532862cd1eac8443510133" - integrity sha512-qUDNAgdmXkZDqD/BQgBH20cyuIYKsGriABf87xLL1XMxvwIPrv+Rzzg71DnFt67CKO63haZ2rcOn/yXcNiOwzA== +"@metamask/execution-environments@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@metamask/execution-environments/-/execution-environments-0.11.1.tgz#04bfd945a2b8b5379957917255faed0dec27b226" + integrity sha512-E2UVccqKxzF1M6ZnrH8zqI0XO0IIGuB7fS3dUk2Ha44SDw0V/4ufqg9wCGy9H5DIRyLZQN5bDElnTLeEzedt3A== dependencies: "@metamask/object-multiplex" "^1.2.0" "@metamask/post-message-stream" "^4.0.0" "@metamask/providers" "^8.1.1" - "@metamask/snap-types" "^0.15.0" - "@metamask/utils" "^2.0.0" + "@metamask/snap-types" "^0.11.1" eth-rpc-errors "^4.0.3" pump "^3.0.0" ses "^0.15.15" @@ -2948,6 +2901,23 @@ resolved "https://registry.yarnpkg.com/@metamask/forwarder/-/forwarder-1.1.0.tgz#13829d8244bbf19ea658c0b20d21a77b67de0bdd" integrity sha512-Hggj4y0QIjDzKGTXzarhEPIQyFSB2bi2y6YLJNwaT4JmP30UB5Cj6gqoY0M4pj3QT57fzp0BUuGp7F/AUe28tw== +"@metamask/iframe-execution-environment-service@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@metamask/iframe-execution-environment-service/-/iframe-execution-environment-service-0.11.1.tgz#cf3495e26c83cb6389b197797c61e55df7144934" + integrity sha512-Q3jZ0g8+evQNmVGoUrtHFB6VIynmqQTIuE4oo22U7n0U2e+xLtamoJpYXle/KHgBEv3JHeeYu9CPnXc1YCaPOg== + dependencies: + "@metamask/execution-environments" "^0.11.1" + "@metamask/object-multiplex" "^1.2.0" + "@metamask/post-message-stream" "^4.0.0" + "@metamask/snap-controllers" "^0.11.1" + "@metamask/snap-types" "^0.11.1" + eth-rpc-errors "^4.0.3" + json-rpc-engine "^6.1.0" + json-rpc-middleware-stream "^3.0.0" + nanoid "^3.1.31" + pump "^3.0.0" + stream "^0.0.2" + "@metamask/jazzicon@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/jazzicon/-/jazzicon-2.0.0.tgz#5615528e91c0fc5c9d79202d1f0954a7922525a0" @@ -2956,16 +2926,14 @@ color "^0.11.3" mersenne-twister "^1.1.0" -"@metamask/key-tree@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@metamask/key-tree/-/key-tree-4.0.0.tgz#2de20618793e85ee300b4b3d4ca4de9d7f40e276" - integrity sha512-Pj5nN6Ko15rei6dSgQnTH64JEN1I8JuTM6Q06/1V7Xp3Fw3g3Nf1scr/u7cQnL17YxXALMCDYaEPdQveo70kSA== +"@metamask/key-tree@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@metamask/key-tree/-/key-tree-3.0.1.tgz#e59b6c9c124c74382477f51a389815e849a16de7" + integrity sha512-CcpbQua96/CF+KKItrfw9Y6azrlkzFhoVAkyfUl7iq5qldA8xi4CilNjzIqnK8YJcLU44d7nRs5i5/9atY4Beg== dependencies: - "@noble/ed25519" "^1.6.0" - "@noble/hashes" "^1.0.0" - "@noble/secp256k1" "^1.5.5" - "@scure/base" "^1.0.0" - "@scure/bip39" "^1.0.0" + bip39 "^3.0.4" + keccak "^3.0.2" + secp256k1 "^4.0.2" "@metamask/logo@^3.1.1": version "3.1.1" @@ -3043,34 +3011,15 @@ pump "^3.0.0" webextension-polyfill-ts "^0.25.0" -"@metamask/providers@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-9.0.0.tgz#644684f9eceb952138e80afb9103c7e39d8350fe" - integrity sha512-9qUkaFafZUROK0CAUBqjsut+7mqKOXFhBCpAhAPVRBqj5TfUTdPI4t8S7GYzPVaDbC7M6kH/YLNCgcfaFWAS+w== - dependencies: - "@metamask/object-multiplex" "^1.1.0" - "@metamask/safe-event-emitter" "^2.0.0" - "@types/chrome" "^0.0.136" - detect-browser "^5.2.0" - eth-rpc-errors "^4.0.2" - extension-port-stream "^2.0.1" - fast-deep-equal "^2.0.1" - is-stream "^2.0.0" - json-rpc-engine "^6.1.0" - json-rpc-middleware-stream "^3.0.0" - pump "^3.0.0" - webextension-polyfill-ts "^0.25.0" - -"@metamask/rpc-methods@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.15.0.tgz#3bdfbf620d1ab328ff4d26f6a9c293136a50e51e" - integrity sha512-HyUaFey3zMFRZCmu4TTw3TyW+/8ODzJOAskMF4WZPiYg97yJikJ9tdDzhxQbiyWIZe+0+ZI65HuaUNCmV4j8DQ== +"@metamask/rpc-methods@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@metamask/rpc-methods/-/rpc-methods-0.11.1.tgz#180ce27d1d408fb5eb80edf69351611b231d4f56" + integrity sha512-QinfBpYy6m5BikADEUNjQvHXJIrG/1eZmwJbiYh4aJL1AcjzUb2KqWIOdI4ihLJ0xEkEy3rWmDwVQDxd9AzteA== dependencies: - "@metamask/controllers" "^29.0.1" - "@metamask/key-tree" "^4.0.0" - "@metamask/snap-controllers" "^0.15.0" + "@metamask/controllers" "^28.0.0" + "@metamask/key-tree" "^3.0.1" + "@metamask/snap-controllers" "^0.11.1" "@metamask/types" "^1.1.0" - "@metamask/utils" "^2.0.0" eth-rpc-errors "^4.0.2" "@metamask/safe-event-emitter@^2.0.0": @@ -3078,17 +3027,17 @@ resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== -"@metamask/slip44@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@metamask/slip44/-/slip44-2.1.0.tgz#f76764ca54afc162fbfe563f1994b79ed4711bba" - integrity sha512-wkFDdY4XtpF+XCqbgwhsrLRgEM/bYfIt47927JTQZQ2QxQYRbSZ6u0QygnVjIR1eqMteRGx2jtUUZ+bxYQTo/w== +"@metamask/slip44@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@metamask/slip44/-/slip44-2.0.0.tgz#1b646a1418af341d5ea979c28015a817ff23af33" + integrity sha512-eRomm783ti/1b/TlNnlTCUkYRuTaMYkeTAG0z2rt/WyT8UzxY+8+v/kbl9vk5qhDHeclzBrd9gbqLnLU1kh+Ow== -"@metamask/smart-transactions-controller@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@metamask/smart-transactions-controller/-/smart-transactions-controller-2.0.1.tgz#64bdce4368d2f33e6a2c044efe8b1a87cb20af1c" - integrity sha512-W0RmziH9HswBbchD2a97j/2sMO2qCYwcpynIJkDVLTmXJ/a6j5cECSr+vMs207bJJDExFlEOXvL+/21oINVZvA== +"@metamask/smart-transactions-controller@^1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@metamask/smart-transactions-controller/-/smart-transactions-controller-1.10.0.tgz#230f611eaf9eefc41bac0e7af78101a215c6acba" + integrity sha512-Bx2zT7UJJF2f11yANpC3OYCXYt2gpdqXj+RC4hnf18CELeF9Sp52xwQEkO6ig+3isrj6NsyVVmoo5PRcrU++cA== dependencies: - "@metamask/controllers" "^29.0.1" + "@metamask/controllers" "^27.1.1" "@types/lodash" "^4.14.176" bignumber.js "^9.0.1" ethers "^5.5.1" @@ -3096,18 +3045,17 @@ isomorphic-fetch "^3.0.0" lodash "^4.17.21" -"@metamask/snap-controllers@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.15.0.tgz#12e17d58c7b9290f5a581e0638daaeb6e0fba917" - integrity sha512-diNe7dq7/8OF/BwgodmkiAM6u9j+w8Q5aomrj0izcE9V5wxCNIZG21ogkrTGvGAASTjbXEsp9Mek++0YSjCc7Q== +"@metamask/snap-controllers@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@metamask/snap-controllers/-/snap-controllers-0.11.1.tgz#00754b8ad2480f4ba5d273b9a3ec2d2251b00e78" + integrity sha512-U5jEz7ZVJUOh9T6IULN6ZNMoS1s7ABZzSAs2mdTCcPDviiMgadwRBWZe7LfiwJQ1xxwKITNPPt8oSBaUsH7biw== dependencies: - "@metamask/controllers" "^29.0.1" - "@metamask/execution-environments" "^0.15.0" + "@metamask/controllers" "^28.0.0" + "@metamask/execution-environments" "^0.11.1" "@metamask/object-multiplex" "^1.1.0" "@metamask/obs-store" "^7.0.0" "@metamask/post-message-stream" "4.0.0" "@metamask/safe-event-emitter" "^2.0.0" - "@metamask/utils" "^2.0.0" "@types/deep-freeze-strict" "^1.1.0" "@types/semver" "^7.3.9" ajv "^8.8.2" @@ -3125,12 +3073,12 @@ semver "^7.3.5" tar-stream "^2.2.0" -"@metamask/snap-types@^0.15.0": - version "0.15.0" - resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.15.0.tgz#ccf8ea495e9823430de4e6ca1d979ae10f25177e" - integrity sha512-U6fRnB4qUZVSWJl08V1+UqJjf8m4DzhORCQ6HL8BHg4Npfg7Zn5luFTfS6y6dXVDAydIB6JJr43efEcAgcEsdA== +"@metamask/snap-types@^0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@metamask/snap-types/-/snap-types-0.11.1.tgz#43ddd6397ab4119dabf8ce42725680e593735cd1" + integrity sha512-BrB/zypZbm6GWjGK4QahrRiYChGyk+EE+JAIEx2/vhLuzx2DmoEfEi4k1ojV13Rl7VfnOFsQXuK0xZxMX5FyCA== dependencies: - "@metamask/controllers" "^29.0.1" + "@metamask/controllers" "^28.0.0" "@metamask/test-dapp@^5.1.1": version "5.1.1" @@ -3142,13 +3090,6 @@ resolved "https://registry.yarnpkg.com/@metamask/types/-/types-1.1.0.tgz#9bd14b33427932833c50c9187298804a18c2e025" integrity sha512-EEV/GjlYkOSfSPnYXfOosxa3TqYtIW3fhg6jdw+cok/OhMgNn4wCfbENFqjytrHMU2f7ZKtBAvtiP5V8H44sSw== -"@metamask/utils@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-2.0.0.tgz#fe7e970416a256751c429f4a5e96aec6c4366ba7" - integrity sha512-AZ63AhRxAZXll+/SEiyEXgrxuAL4yOj0ny4V36VgPmTDvt+7GrmVJWrQF3o5PZZWV6ooaHZ9291RZHRcKZm0HA== - dependencies: - fast-deep-equal "^3.1.3" - "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -3175,21 +3116,6 @@ jsbi "^3.1.5" sha.js "^2.4.11" -"@noble/ed25519@^1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.6.0.tgz#b55f7c9e532b478bf1d7c4f609e1f3a37850b583" - integrity sha512-UKju89WV37IUALIMfKhKW3psO8AqmrE/GvH6QbPKjzolQ98zM7WmGUeY+xdIgSf5tqPFf75ZCYMgym6E9Jsw3Q== - -"@noble/hashes@^1.0.0", "@noble/hashes@~1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" - integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== - -"@noble/secp256k1@^1.5.5": - version "1.5.5" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.5.5.tgz#315ab5745509d1a8c8e90d0bdf59823ccf9bcfc3" - integrity sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ== - "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" @@ -3337,19 +3263,6 @@ redux-thunk "^2.3.0" reselect "^4.0.0" -"@scure/base@^1.0.0", "@scure/base@~1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.0.0.tgz#109fb595021de285f05a7db6806f2f48296fcee7" - integrity sha512-gIVaYhUsy+9s58m/ETjSJVKHhKTBMmcRb9cEV5/5dwvfDlfORjKrFsDeDHWRrm6RjcPvCLZFwGJjAjLj1gg4HA== - -"@scure/bip39@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.0.0.tgz#47504e58de9a56a4bbed95159d2d6829fa491bb0" - integrity sha512-HrtcikLbd58PWOkl02k9V6nXWQyoa7A0+Ek9VF7z17DDk9XZAFUcIdqfh0jJXLypmizc5/8P6OxoUeKliiWv4w== - dependencies: - "@noble/hashes" "~1.0.0" - "@scure/base" "~1.0.0" - "@segment/loosely-validate-event@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@segment/loosely-validate-event/-/loosely-validate-event-2.0.0.tgz#87dfc979e5b4e7b82c5f1d8b722dfd5d77644681" @@ -4716,10 +4629,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>=13.7.0": - version "17.0.29" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.29.tgz#7f2e1159231d4a077bb660edab0fde373e375a3d" - integrity sha512-tx5jMmMFwx7wBwq/V7OohKDVb/JwJU5qCVkeLMh1//xycAJ/ESuw9aJ9SEtlCZDYi2pBfe4JkisSoAtbOsBNAA== +"@types/node@*", "@types/node@>=13.7.0", "@types/node@^16.7.10": + version "16.11.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.19.tgz#1afa165146997b8286b6eabcb1c2d50729055169" + integrity sha512-BPAcfDPoHlRQNKktbsbnpACGdypPFBuX4xQlsWDE7B8XXcfII+SpOLay3/qZmCLb39kV5S1RTYwXdkx2lwLYng== "@types/node@10.12.18": version "10.12.18" @@ -4741,11 +4654,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.27.tgz#5054610d37bb5f6e21342d0e6d24c494231f3b85" integrity sha512-94+Ahf9IcaDuJTle/2b+wzvjmutxXAEXU6O81JHblYXUg2BDG+dnBy7VxIPHKAyEEDHzCMQydTJuWvrE+Aanzw== -"@types/node@^16.7.10": - version "16.11.19" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.19.tgz#1afa165146997b8286b6eabcb1c2d50729055169" - integrity sha512-BPAcfDPoHlRQNKktbsbnpACGdypPFBuX4xQlsWDE7B8XXcfII+SpOLay3/qZmCLb39kV5S1RTYwXdkx2lwLYng== - "@types/node@^8.10.11": version "8.10.48" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.48.tgz#e385073561643a9ba6199a1985ffc03530f90781" @@ -4847,9 +4755,9 @@ redux "*" "@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.1.tgz#fb3aa61a1848ad97d7425ff9dcba784549fca5a4" + integrity sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog== dependencies: "@types/node" "*" @@ -4957,7 +4865,7 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@2.9.2", "@types/yauzl@^2.9.1": +"@types/yauzl@^2.9.1": version "2.9.2" resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== @@ -5400,10 +5308,17 @@ acorn-globals@^6.0.0: acorn "^7.1.1" acorn-walk "^7.1.1" -acorn-jsx@^5.3.1, acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= + dependencies: + acorn "^3.0.4" + +acorn-jsx@^5.0.0, acorn-jsx@^5.0.2, acorn-jsx@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" + integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2, acorn-node@^1.6.1: version "1.8.2" @@ -5429,12 +5344,17 @@ acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^5.1.2: +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= + +acorn@^5.1.2, acorn@^5.2.1: version "5.7.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.4.1: +acorn@^6.0.1, acorn@^6.0.7, acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== @@ -5444,64 +5364,53 @@ acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0, acorn@^7.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.7.0, acorn@^8.7.1: - version "8.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" - integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== +acorn@^8.2.4, acorn@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== -addons-linter@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/addons-linter/-/addons-linter-5.2.0.tgz#a1a36cdb72f5df359e246c25e1261d2183b4f6a7" - integrity sha512-wMKD9aJYYIVXK/grrHErqbGFX0uvEehEiMlAkUA/4M3a9zJDvNrpW0OwZxLEAlNpFISOtKPaQTlt0MHKwQTGFQ== - dependencies: - "@mdn/browser-compat-data" "4.1.19" - addons-moz-compare "1.2.0" - addons-scanner-utils "7.0.0" - ajv "8.11.0" - ajv-merge-patch "5.0.1" - chalk "4.1.2" - cheerio "1.0.0-rc.10" - columnify "1.6.0" - common-tags "1.8.2" - deepmerge "4.2.2" - eslint "8.14.0" - eslint-plugin-no-unsanitized "4.0.1" - eslint-visitor-keys "3.3.0" - espree "9.3.1" +addons-linter@1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/addons-linter/-/addons-linter-1.14.0.tgz#611f8d9e8c4cc84646ebd0b61c016f758225bf13" + integrity sha512-Of7A53J2ltaIZzD8RPH1hVxOR+DmLDuHBtwfhXJw8JTXwzpDIvOKn/i6XDtPgfFlj5wIWxpUGV+tFb/kE/K9gg== + dependencies: + ajv "6.10.2" + ajv-merge-patch "4.1.0" + chalk "2.4.2" + cheerio "1.0.0-rc.3" + columnify "1.5.4" + common-tags "1.8.0" + deepmerge "4.0.0" + dispensary "0.40.0" + es6-promisify "6.0.2" + eslint "5.16.0" + eslint-plugin-no-unsafe-innerhtml "1.0.16" + eslint-visitor-keys "1.1.0" + espree "6.1.1" esprima "4.0.1" + first-chunk-stream "3.0.0" fluent-syntax "0.13.0" - glob "8.0.1" - image-size "1.0.1" + glob "7.1.4" is-mergeable-object "1.1.1" jed "1.1.1" - os-locale "5.0.0" - pino "7.11.0" - postcss "8.4.13" + mdn-browser-compat-data "0.0.94" + os-locale "4.0.0" + pino "5.13.3" + po2json "0.4.5" + postcss "7.0.18" + probe-image-size "5.0.0" + regenerator-runtime "0.13.3" relaxed-json "1.0.3" - semver "7.3.7" - sha.js "2.4.11" - source-map-support "0.5.21" - tosource "1.0.0" - upath "2.0.1" - yargs "17.4.1" - yauzl "2.10.0" - -addons-moz-compare@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/addons-moz-compare/-/addons-moz-compare-1.2.0.tgz#d6246cbae224ab629cb7da397b2b9602938ea085" - integrity sha512-COG8qk2/dubPqabfcoJW4E7pm2EQDI43iMrHnhlobvq/uRMEzx/PYJ1KaUZ97Vgg44R3QdRG5CvDsTRbMUHcDw== - -addons-scanner-utils@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/addons-scanner-utils/-/addons-scanner-utils-7.0.0.tgz#8528b184f51e6552f43676221ce2a7e0aa6de15d" - integrity sha512-5j/qMzL13uGSiaFKvUNiMwyWMYD2YtEeY477q7Ahan3c90wLCwXIGCdpCfstgT3hpl44r+d6lqTIo2j2FW6uJQ== - dependencies: - "@types/yauzl" "2.9.2" - common-tags "1.8.2" - first-chunk-stream "3.0.0" + semver "6.3.0" + source-map-support "0.5.13" strip-bom-stream "4.0.0" - upath "2.0.1" + tosource "1.0.0" + upath "1.2.0" + whatwg-url "7.0.0" + yargs "14.0.0" yauzl "2.10.0" + optionalDependencies: + fsevents "2.0.7" address@1.1.2, address@^1.0.1: version "1.1.2" @@ -5602,30 +5511,43 @@ ajv-errors@^1.0.0: resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + integrity sha1-MU3QpLM2j609/NxU7eYXG4htrzw= + ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-merge-patch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ajv-merge-patch/-/ajv-merge-patch-5.0.1.tgz#0aba921a2ea8632813478aa3d039d8134b58f876" - integrity sha512-0UP3aJCzfzBOkmLR+EinJDCfg6DNtprj3bVPo7JJNgUpZMKt097t9xxQOWFGRoB4JvKKIHE2qe0HkVaS/HyrjQ== +ajv-merge-patch@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ajv-merge-patch/-/ajv-merge-patch-4.1.0.tgz#cd580e5860ac53431d6aa901fa3d5e2eb2b74a6c" + integrity sha512-0mAYXMSauA8RZ7r+B4+EAOYcZEcO9OK5EiQCR7W7Cv4E44pJj56ZnkKLJ9/PAcOc0dT+LlV9fdDcq2TxVJfOYw== dependencies: fast-json-patch "^2.0.6" - json-merge-patch "^1.0.2" + json-merge-patch "^0.2.3" -ajv@8.11.0, ajv@^8.0.1, ajv@^8.8.2: - version "8.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" - integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== +ajv@6.10.2: + version "6.10.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" + integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^4.7.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -5635,6 +5557,16 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.1, ajv@^8.8.2: + version "8.8.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.8.2.tgz#01b4fef2007a28bf75f0b7fc009f62679de4abbb" + integrity sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" @@ -5685,11 +5617,21 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-colors@^4.1.0, ansi-colors@^4.1.1: +ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + integrity sha1-06ioOzGapneTZisT52HHkRQiMG4= + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + ansi-escapes@^4.2.1: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" @@ -5724,11 +5666,16 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0, ansi-regex@^5.0.1: +ansi-regex@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -5744,6 +5691,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" +ansi-styles@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" + integrity sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg= + ansi-to-html@^0.6.11: version "0.6.13" resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.6.13.tgz#c72eae8b63e5ca0643aab11bfc6e6f2217425833" @@ -5834,11 +5786,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - args@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/args/-/args-5.0.1.tgz#4bf298df90a4799a09521362c579278cc2fdd761" @@ -6031,7 +5978,7 @@ arraybuffer.slice@~0.0.7: resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675" integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog== -arrify@^1.0.1: +arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= @@ -6245,6 +6192,11 @@ async@^2.0.1, async@^2.1.2, async@^2.1.4, async@^2.4.0, async@^2.5.0, async@^2.6 dependencies: lodash "^4.17.14" +async@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/async/-/async-3.1.0.tgz#42b3b12ae1b74927b5217d8c0016baaf62463772" + integrity sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -6260,11 +6212,6 @@ atob@^2.0.0, atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -atomic-sleep@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" - integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== - autoprefixer@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-8.1.0.tgz#374cf35be1c0e8fce97408d876f95f66f5cb4641" @@ -6329,13 +6276,21 @@ axios@^0.19.2, axios@^0.21.2: dependencies: follow-redirects "^1.14.0" -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== + dependencies: + follow-redirects "^1.14.4" + +babel-code-frame@^6.16.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: - follow-redirects "^1.14.9" - form-data "^4.0.0" + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" babel-jest@^26.6.3: version "26.6.3" @@ -6747,7 +6702,7 @@ binaryen@77.0.0-nightly.20190407: resolved "https://registry.yarnpkg.com/binaryen/-/binaryen-77.0.0-nightly.20190407.tgz#fbe4f8ba0d6bd0809a84eb519d2d5b5ddff3a7d1" integrity sha512-1mxYNvQ0xywMe582K7V6Vo2zzhZZxMTeGHH8aE/+/AND8f64D8Q1GThVY3RVRwGY/4p+p95ccw9Xbw2ovFXRIg== -bindings@^1.3.0, bindings@^1.5.0: +bindings@^1.2.1, bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== @@ -6777,6 +6732,27 @@ bip32@^2.0.4: typeforce "^1.11.5" wif "^2.0.6" +bip39@^2.2.0, bip39@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" + integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== + dependencies: + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + safe-buffer "^5.0.1" + unorm "^1.3.3" + +bip39@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" + integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== + dependencies: + "@types/node" "11.11.6" + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + bip66@^1.1.0, bip66@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" @@ -6850,16 +6826,16 @@ blake-hash@^2.0.0: readable-stream "^3.6.0" blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" + integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= blob@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.5.tgz#d680eeef25f8cd91ad533f5b01eed48e64caf683" integrity sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig== -bluebird@3.7.2, bluebird@^3.3.5, bluebird@^3.5.5, bluebird@^3.7.2: +bluebird@3.7.2, bluebird@^3.3.5, bluebird@^3.5.0, bluebird@^3.5.5, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -6936,7 +6912,7 @@ body@^5.1.0: raw-body "~1.1.0" safe-json-parse "~1.0.1" -boolbase@^1.0.0, boolbase@~1.0.0: +boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= @@ -7020,13 +6996,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -7649,6 +7618,18 @@ callbackify@^1.1.0: resolved "https://registry.yarnpkg.com/callbackify/-/callbackify-1.1.0.tgz#d2a36986d28aa69714526c111209beeb9979d31e" integrity sha1-0qNphtKKppcUUmwREgm+65l50x4= +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -7807,7 +7788,7 @@ chain-function@^1.0.0: resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.1.tgz#c63045e5b4b663fb86f1c6e186adaf1de402a1cc" integrity sha512-SxltgMwL9uCko5/ZCLiyG2B7R9fY4pDZUw7hJ4MhirdjBLosoDqkWABi3XMucddHdLiFJMb7PD2MZifZriuMTg== -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -7816,13 +7797,16 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4. escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" chalk@^3.0.0: version "3.0.0" @@ -7832,6 +7816,23 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" + integrity sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8= + dependencies: + ansi-styles "~1.0.0" + has-color "~0.1.0" + strip-ansi "~0.1.0" + change-case@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" @@ -7881,6 +7882,11 @@ character-reference-invalid@^1.0.0: resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.1.tgz#942835f750e4ec61a308e60c2ef8cc1011202efc" integrity sha1-lCg191Dk7GGjCOYMLvjMEBEgLvw= +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + charenc@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" @@ -7898,29 +7904,17 @@ checkpoint-store@^1.1.0: dependencies: functional-red-black-tree "^1.0.1" -cheerio-select@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.6.0.tgz#489f36604112c722afa147dedd0d4609c09e1696" - integrity sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g== - dependencies: - css-select "^4.3.0" - css-what "^6.0.1" - domelementtype "^2.2.0" - domhandler "^4.3.1" - domutils "^2.8.0" - -cheerio@1.0.0-rc.10, cheerio@^1.0.0-rc.2: - version "1.0.0-rc.10" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e" - integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw== - dependencies: - cheerio-select "^1.5.0" - dom-serializer "^1.3.2" - domhandler "^4.2.0" - htmlparser2 "^6.1.0" - parse5 "^6.0.1" - parse5-htmlparser2-tree-adapter "^6.0.1" - tslib "^2.2.0" +cheerio@1.0.0-rc.3, cheerio@^1.0.0-rc.2: + version "1.0.0-rc.3" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6" + integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA== + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.1" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash "^4.15.0" + parse5 "^3.0.1" chokidar@3.3.0: version "3.3.0" @@ -7988,13 +7982,13 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^102.0.0: - version "102.0.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-102.0.0.tgz#02844c39ee33d1e88ac8c48fbe28cb8423e970a4" - integrity sha512-xer/0g1Oarkjc2e+4nyoLgZT4kJHYhcj3PcxD1nEoGJQYEllTjprN1uDpSb4BkgMGo0ydfIS1VDkszrr/J9OOg== +chromedriver@^100.0.0: + version "100.0.0" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-100.0.0.tgz#1b4bf5c89cea12c79f53bc94d8f5bb5aa79ed7be" + integrity sha512-oLfB0IgFEGY9qYpFQO/BNSXbPw7bgfJUN5VX8Okps9W2qNT4IqKh5hDwKWtpUIQNI6K3ToWe2/J5NdpurTY02g== dependencies: "@testim/chrome-version" "^1.1.2" - axios "^0.27.2" + axios "^0.24.0" del "^6.0.0" extract-zip "^2.0.1" https-proxy-agent "^5.0.0" @@ -8060,6 +8054,11 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== + cjs-module-lexer@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" @@ -8107,10 +8106,19 @@ cli-boxes@^2.2.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w== -cli-spinners@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" - integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + integrity sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc= + dependencies: + restore-cursor "^1.0.1" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" cli-table3@0.6.0: version "0.6.0" @@ -8122,10 +8130,10 @@ cli-table3@0.6.0: optionalDependencies: colors "^1.1.2" -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= clipboard@^2.0.0: version "2.0.4" @@ -8341,6 +8349,11 @@ color@^0.11.3: color-convert "^1.3.0" color-string "^0.3.0" +colorette@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + colors@0.5.x: version "0.5.1" resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" @@ -8351,12 +8364,12 @@ colors@^1.1.2, colors@^1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -columnify@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" - integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q== +columnify@1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= dependencies: - strip-ansi "^6.0.1" + strip-ansi "^3.0.0" wcwidth "^1.0.0" combine-source-map@^0.8.0, combine-source-map@~0.8.0: @@ -8396,17 +8409,17 @@ commander@^6.1.0, commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commander@^9.0.0: - version "9.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.2.0.tgz#6e21014b2ed90d8b7c9647230d8b7a94a4a419a9" - integrity sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w== - comment-parser@1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.2.4.tgz#489f3ee55dfd184a6e4bffb31baba284453cb760" integrity sha512-pm0b+qv+CkWNriSTMsfnjChF9kH0kxz55y44Wo5le9qLxMj5xDQAaEd9ZN1ovSuk9CsrncWaFwgpOMg7ClJwkw== -common-tags@1.8.2, common-tags@^1.8.0: +common-tags@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" + integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== + +common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== @@ -8478,7 +8491,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@^1.6.2, concat-stream@~1.6.0: +concat-stream@^1.5.0, concat-stream@^1.5.2, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@^1.6.2, concat-stream@~1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -8975,7 +8988,7 @@ css-loader@^3.6.0: schema-utils "^2.7.0" semver "^6.3.0" -css-select@^1.1.0: +css-select@^1.1.0, css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= @@ -8985,17 +8998,6 @@ css-select@^1.1.0: domutils "1.5.1" nth-check "~1.0.1" -css-select@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - css-to-xpath@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/css-to-xpath/-/css-to-xpath-0.1.0.tgz#ac0d1c26cef023f7bd8cf2e1fc1f77134bc70c47" @@ -9017,11 +9019,6 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - css.escape@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" @@ -9233,7 +9230,7 @@ debug-fabulous@^1.0.0: memoizee "0.4.X" object-assign "4.X" -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: +debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -9387,7 +9384,12 @@ deep-object-diff@^1.1.0: resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.0.tgz#d6fabf476c2ed1751fc94d5ca693d2ed8c18bc5a" integrity sha512-b+QLs5vHgS+IoSNcUE4n9HP2NwcHj7aqnJWsjPtuG75Rh5TOaGt0OjAYInh77d5T16V5cRDC+Pw/6ZZZiETBGw== -deepmerge@4.2.2, deepmerge@^4.2.2: +deepmerge@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09" + integrity sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww== + +deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== @@ -9490,6 +9492,19 @@ degenerator@^3.0.1: esprima "^4.0.0" vm2 "^3.9.3" +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + del@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" @@ -9851,6 +9866,19 @@ discontinuous-range@1.0.0: resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= +dispensary@0.40.0: + version "0.40.0" + resolved "https://registry.yarnpkg.com/dispensary/-/dispensary-0.40.0.tgz#dedc4a4e4aebae7afcb6ae91f03e292ba107fe67" + integrity sha512-ttKDQvGBf+ygQ4rXuLBLErp3kMJIS+Gfmy+nJ6N/EfV8/RQdjd9SORpc729YK5SYAI+IuBo88S2xGUjKjU2jYw== + dependencies: + async "~3.1.0" + natural-compare-lite "~1.4.0" + pino "~5.13.0" + request "~2.88.0" + sha.js "~2.4.4" + source-map-support "~0.5.4" + yargs "~14.0.0" + disposables@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/disposables/-/disposables-1.0.2.tgz#36c6a674475f55a2d6913567a601444e487b4b6e" @@ -9906,7 +9934,7 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: +doctrine@^2.0.0, doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== @@ -9947,7 +9975,7 @@ dom-helpers@^5.0.1: "@babel/runtime" "^7.8.7" csstype "^2.6.7" -dom-serializer@0: +dom-serializer@0, dom-serializer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== @@ -9955,15 +9983,6 @@ dom-serializer@0: domelementtype "^1.3.0" entities "^1.1.1" -dom-serializer@^1.0.1, dom-serializer@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - dom-walk@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" @@ -9979,11 +9998,6 @@ domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - domexception@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.0.tgz#81fe5df81b3f057052cde3a9fa9bf536a85b9ab0" @@ -10003,13 +10017,6 @@ domhandler@^2.3.0: dependencies: domelementtype "1" -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -10026,15 +10033,6 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - dot-case@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" @@ -10133,10 +10131,10 @@ duplexify@^3.1.2, duplexify@^3.4.2, duplexify@^3.5.0, duplexify@^3.5.1: readable-stream "^2.0.0" stream-shift "^1.0.0" -duplexify@^4.1.1, duplexify@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" - integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== +duplexify@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" + integrity sha512-DY3xVEmVHTv1wSzKNbwoU6nVjzI369Y6sPoqfYr0/xlx3IdX2n94xIszTcjPO8W8ZIv0Wb0PXNcjuZyT4wiICA== dependencies: end-of-stream "^1.4.1" inherits "^2.0.3" @@ -10205,6 +10203,11 @@ elliptic@6.5.3, elliptic@6.5.4, elliptic@=3.0.3, elliptic@^6.0.0, elliptic@^6.4. minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +emitter-component@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/emitter-component/-/emitter-component-1.1.1.tgz#065e2dbed6959bf470679edabeaf7981d1003ab6" + integrity sha1-Bl4tvtaVm/RwZ57avq95gdEAOrY= + emittery@0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.0.tgz#bb373c660a9d421bb44706ec4967ed50c02a8026" @@ -10270,6 +10273,13 @@ encoding-down@~5.0.0: level-errors "^2.0.0" xtend "^4.0.1" +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + dependencies: + iconv-lite "~0.4.13" + end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.0, end-of-stream@^1.4.1, end-of-stream@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -10358,16 +10368,11 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -entities@^1.1.1, entities@^1.1.2: +entities@^1.1.1, entities@^1.1.2, entities@~1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - env-paths@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.0.tgz#cdca557dc009152917d6166e2febe1f039685e43" @@ -10540,7 +10545,7 @@ es6-iterator@2.0.3, es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0. es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-map@^0.1.5: +es6-map@^0.1.3, es6-map@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= @@ -10562,6 +10567,11 @@ es6-promise@^4.2.8: resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== +es6-promisify@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.2.tgz#525c23725b8510f5f1f2feb5a1fbad93a93e29b4" + integrity sha512-eO6vFm0JvqGzjWIQA6QVKjxpmELfhWbDUWHm1rPfIbn55mhKPiAa5xpLmQWJrNa629ZIeQ8ZvMAi13kvrjK6Mg== + es6-set@^0.1.5, es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -10645,6 +10655,16 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-config-prettier@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz#4ef1eaf97afe5176e6a75ddfb57c335121abc5a6" @@ -10734,10 +10754,12 @@ eslint-plugin-mocha@^8.1.0: eslint-utils "^2.1.0" ramda "^0.27.1" -eslint-plugin-no-unsanitized@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.0.1.tgz#e2343265467ba2270ade478cbe07bbafeaea412d" - integrity sha512-y/lAMWnPPC7RYuUdxlEL/XiCL8FehN9h9s3Kjqbp/Kv0i9NZs+IXSC2kS546Fa4Bumwy31HlVS/OdWX0Kxb5Xg== +eslint-plugin-no-unsafe-innerhtml@1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-unsafe-innerhtml/-/eslint-plugin-no-unsafe-innerhtml-1.0.16.tgz#7d02878c8e9bf7916b88836d5ac122b42f151932" + integrity sha1-fQKHjI6b95FriINtWsEitC8VGTI= + dependencies: + eslint "^3.7.1" eslint-plugin-node@^11.1.0: version "11.1.0" @@ -10802,13 +10824,12 @@ eslint-scope@^5.1.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" + eslint-visitor-keys "^1.1.0" eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" @@ -10824,12 +10845,12 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@3.3.0, eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +eslint-visitor-keys@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== @@ -10839,46 +10860,88 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@8.14.0: - version "8.14.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.14.0.tgz#62741f159d9eb4a79695b28ec4989fcdec623239" - integrity sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw== +eslint@5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== dependencies: - "@eslint/eslintrc" "^1.2.2" - "@humanwhocodes/config-array" "^0.9.2" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.3.1" - esquery "^1.4.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.6.0" - ignore "^5.2.0" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - is-glob "^4.0.0" - js-yaml "^4.1.0" + inquirer "^6.2.2" + js-yaml "^3.13.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" + levn "^0.3.0" + lodash "^4.17.11" minimatch "^3.0.4" + mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" text-table "^0.2.0" - v8-compile-cache "^2.0.3" + +eslint@^3.7.1: + version "3.19.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" + integrity sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw= + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + doctrine "^2.0.0" + escope "^3.6.0" + espree "^3.4.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" eslint@^7.23.0: version "7.23.0" @@ -10928,14 +10991,31 @@ esm@^3.2.25: resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== -espree@9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" - integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== +espree@6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.1.tgz#7f80e5f7257fc47db450022d723e356daeb1e5de" + integrity sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ== dependencies: - acorn "^8.7.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^3.3.0" + acorn "^7.0.0" + acorn-jsx "^5.0.2" + eslint-visitor-keys "^1.1.0" + +espree@^3.4.0: + version "3.5.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" + integrity sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ== + dependencies: + acorn "^5.2.1" + acorn-jsx "^3.0.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" espree@^7.3.0, espree@^7.3.1: version "7.3.1" @@ -10946,21 +11026,12 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -espree@^9.3.1, espree@^9.3.2: - version "9.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" - integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== - dependencies: - acorn "^8.7.1" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" - esprima@4.0.1, esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0: +esquery@^1.0.0, esquery@^1.0.1, esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -11050,6 +11121,17 @@ eth-ens-namehash@^2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" +eth-hd-keyring@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/eth-hd-keyring/-/eth-hd-keyring-3.6.0.tgz#6835d30aa411b8d3ef098e82f6427b5325082abb" + integrity sha512-n2CwE9VNXsxLrXQa6suv0Umt4NT6+HtoahKgWx3YviXx4rQFwVT5nDwZfjhwrT31ESuoXYNIeJgz5hKLD96QeQ== + dependencies: + bip39 "^2.2.0" + eth-sig-util "^3.0.1" + eth-simple-keyring "^4.2.0" + ethereumjs-util "^7.0.9" + ethereumjs-wallet "^1.0.1" + eth-json-rpc-filters@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-4.2.1.tgz#82204a13c99927dbf42cbb3962846650c6281f33" @@ -11090,9 +11172,9 @@ eth-json-rpc-middleware@^6.0.0: safe-event-emitter "^1.0.1" eth-json-rpc-middleware@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-8.0.2.tgz#7ce0b44443b8733c271ad64843a39d1782350fcb" - integrity sha512-aUx+Nf43pFAHnSQq1MqDETc6Bq0fIKpIen9oC3y4DLle4rsrSInx1Gxdde2/VZ1tlNcmN4M82ucbSMxR8bMqsg== + version "8.0.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-8.0.1.tgz#b3761620d3e5dda3f5bed3fd953dc326c7dcee44" + integrity sha512-Ar/Sp1J9H0RT3TmzVBr//UW3Lf4TowUJMyu9bqffKV0iLdFwbE6k07NxchPEzO8D918uS2LdyIyZh4v6avGHwA== dependencies: "@metamask/safe-event-emitter" "^2.0.0" btoa "^1.2.1" @@ -11101,19 +11183,22 @@ eth-json-rpc-middleware@^8.0.0: eth-sig-util "^1.4.2" json-rpc-engine "^6.1.0" json-stable-stringify "^1.0.1" - node-fetch "^2.6.7" + node-fetch "^2.6.1" pify "^3.0.0" -eth-keyring-controller@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/eth-keyring-controller/-/eth-keyring-controller-7.0.2.tgz#c4d7f9be179f08b3bb18410066bc4c8e91f50552" - integrity sha512-U4bqbXkTn7js/47rnFtVyBYQcvOKtmraD/YReBwuy4R56bFSJN8kinP0JJRl3WTtVfVS1l5A/jjsF3qk5TaTeg== +eth-keyring-controller@^6.2.0, eth-keyring-controller@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/eth-keyring-controller/-/eth-keyring-controller-6.2.1.tgz#61901071fc74059ed37cb5ae93870fdcae6e3781" + integrity sha512-x2gTM1iHp2Kbvdtd9Eslysw0qzVZiqOzpVB3AU/ni2Xiit+rlcv2H80zYKjrEwlfWFDj4YILD3bOqlnEMmRJOA== dependencies: - "@metamask/bip39" "^4.0.0" - "@metamask/eth-hd-keyring" "^4.0.2" + bip39 "^2.4.0" + bluebird "^3.5.0" browser-passworder "^2.0.3" + eth-hd-keyring "^3.6.0" eth-sig-util "^3.0.1" eth-simple-keyring "^4.2.0" + ethereumjs-util "^7.0.9" + loglevel "^1.5.0" obs-store "^4.0.3" eth-lattice-keyring@^0.7.3: @@ -11282,8 +11367,8 @@ ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.4, ethereumjs-abi@^0.6.8: ethereumjs-util "^6.0.0" "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version "0.6.8" - resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" + version "0.6.7" + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#8431eab7b3384e65e8126a4602520b78031666fb" dependencies: bn.js "^4.11.8" ethereumjs-util "^6.0.0" @@ -11341,17 +11426,17 @@ ethereumjs-tx@^2.1.1: ethereumjs-util "^6.0.0" ethereumjs-util@^5.0.0, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" - integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + version "5.2.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642" + integrity sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA== dependencies: bn.js "^4.11.0" create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" ethjs-util "^0.1.3" + keccak "^1.0.2" rlp "^2.0.0" safe-buffer "^5.1.1" + secp256k1 "^3.0.1" ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: version "6.2.1" @@ -11802,6 +11887,11 @@ execall@^2.0.0: dependencies: clone-regexp "^2.1.0" +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + integrity sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g= + exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -11929,7 +12019,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.2: +extend@3.0.2, extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -11941,6 +12031,15 @@ extension-port-stream@^2.0.0, extension-port-stream@^2.0.1: dependencies: webextension-polyfill-ts "^0.22.0" +external-editor@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -12107,15 +12206,10 @@ fast-redact@^1.4.4: resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-1.5.0.tgz#302892f566750c4f5eec7b830bfc9bc473484034" integrity sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ== -fast-redact@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.1.tgz#790fcff8f808c2e12fabbfb2be5cb2deda448fa0" - integrity sha512-odVmjC8x8jNeMZ3C+rPMESzXVSEU8tSWSHv9HFxP2mm89G/1WwqhrerJDQm9Zus8X6aoRgQDThKqptdNA6bt+A== - fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7: - version "2.1.1" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" - integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== fast-url-parser@1.1.3: version "1.1.3" @@ -12176,6 +12270,29 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + file-entry-cache@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" @@ -12447,6 +12564,16 @@ flagged-respawn@^1.0.0: resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7" integrity sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c= +flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + integrity sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE= + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -12514,10 +12641,10 @@ fnv1a@^1.0.1: resolved "https://registry.yarnpkg.com/fnv1a/-/fnv1a-1.0.1.tgz#915e2d6d023c43d5224ad9f6d2a3c4156f5712f5" integrity sha1-kV4tbQI8Q9UiStn20qPEFW9XEvU= -follow-redirects@^1.14.0, follow-redirects@^1.14.9: - version "1.15.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" - integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== +follow-redirects@^1.14.0, follow-redirects@^1.14.4: + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-each@^0.3.3: version "0.3.3" @@ -12618,15 +12745,6 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - format@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" @@ -12758,6 +12876,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" + integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ== + fsevents@^1.2.7: version "1.2.9" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" @@ -12880,6 +13003,20 @@ geckodriver@^1.21.0: https-proxy-agent "5.0.0" tar "6.0.2" +generate-function@^2.0.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" + integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== + dependencies: + is-property "^1.0.2" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + integrity sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA= + dependencies: + is-property "^1.0.0" + generic-names@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-2.0.1.tgz#f8a378ead2ccaa7a34f0317b05554832ae41b872" @@ -13010,6 +13147,13 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +gettext-parser@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gettext-parser/-/gettext-parser-1.1.0.tgz#2c5a6638d893934b9b55037d0ad82cb7004b2679" + integrity sha1-LFpmONiTk0ubVQN9CtgstwBLJnk= + dependencies: + encoding "^0.1.11" + git-up@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0" @@ -13075,13 +13219,6 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.1, glob-parent@~5.1.0, dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - glob-promise@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-3.4.0.tgz#b6b8f084504216f702dc2ce8c9bc9ac8866fdb20" @@ -13134,15 +13271,15 @@ glob@7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.1.tgz#00308f5c035aa0b2a447cd37ead267ddff1577d3" - integrity sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow== +glob@7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^5.0.1" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" @@ -13240,7 +13377,7 @@ global@~4.3.0: min-document "^2.19.0" process "~0.5.1" -globals@^11.1.0: +globals@^11.1.0, globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== @@ -13252,13 +13389,18 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globals@^13.6.0, globals@^13.9.0: - version "13.15.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" - integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== +globals@^13.6.0: + version "13.7.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.7.0.tgz#aed3bcefd80ad3ec0f0be2cf0c895110c0591795" + integrity sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA== dependencies: type-fest "^0.20.2" +globals@^9.14.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== + globalthis@1.0.1, globalthis@^1.0.0, globalthis@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.1.tgz#40116f5d9c071f9e8fb0037654df1ab3a83b7ef9" @@ -13290,6 +13432,18 @@ globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: merge2 "^1.3.0" slash "^3.0.0" +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -13674,6 +13828,13 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + has-bigints@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -13686,6 +13847,11 @@ has-binary2@~1.0.2: dependencies: isarray "2.0.1" +has-color@~0.1.0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" + integrity sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8= + has-cors@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" @@ -13767,13 +13933,12 @@ has@^1.0.0, has@^1.0.1, has@^1.0.3: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" + inherits "^2.0.1" + safe-buffer "^5.0.1" hash-sum@^2.0.0: version "2.0.0" @@ -14054,7 +14219,7 @@ htmlescape@^1.1.0, htmlescape@^1.1.1: resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E= -htmlparser2@^3.10.0, htmlparser2@^3.3.0: +htmlparser2@^3.10.0, htmlparser2@^3.3.0, htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== @@ -14066,16 +14231,6 @@ htmlparser2@^3.10.0, htmlparser2@^3.3.0: inherits "^2.0.1" readable-stream "^3.1.1" -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - http-assert@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.4.1.tgz#c5f725d677aa7e873ef736199b89686cceb37878" @@ -14240,7 +14395,7 @@ hyphenate-style-name@^1.0.3: resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz#097bb7fa0b8f1a9cf0bd5c734cf95899981a9b48" integrity sha512-EcuixamT82oplpoJ2XU4pDtKGWQ7b00CD9f1ug9IaQ3p1bkHMiKCZ9ut9QDI6qsa6cpUuB+A/I+zLtdNK4n2DQ== -iconv-lite@0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -14302,22 +14457,20 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +ignore@^3.2.0: + version "3.3.7" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" + integrity sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA== + ignore@^4.0.3, ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== - -image-size@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/image-size/-/image-size-1.0.1.tgz#86d6cfc2b1d19eab5d2b368d4b9194d9e48541c5" - integrity sha512-VAwkvNSNGClRw9mDHhc5Efax8PLlsOGcUTh0T/LIriC8vPA3U5PdqXWqkz406MoYHMKW8Uf9gWr05T/rYB44kQ== - dependencies: - queue "6.0.2" +ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== immediate@^3.2.3, immediate@~3.2.3: version "3.2.3" @@ -14435,6 +14588,44 @@ inline-style-parser@0.1.1: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + integrity sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34= + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +inquirer@^6.2.2: + version "6.3.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" + integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.11" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + insert-module-globals@^7.0.0, insert-module-globals@^7.2.1: version "7.2.1" resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.2.1.tgz#d5e33185181a4e1f33b15f7bf100ee91890d5cb3" @@ -15339,10 +15530,10 @@ is-glob@^3.0.0, is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" @@ -15415,6 +15606,22 @@ is-mergeable-object@1.1.1: resolved "https://registry.yarnpkg.com/is-mergeable-object/-/is-mergeable-object-1.1.1.tgz#faaa3ed1cfce87d6f7d2f5885e92cc30af3e2ebf" integrity sha512-CPduJfuGg8h8vW74WOxHtHmtQutyQBzR+3MjQ6iDHIYdbOnm1YC7jv43SqCoU8OPGTJD4nibmiryA4kmogbGrA== +is-my-ip-valid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" + integrity sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ== + +is-my-json-valid@^2.10.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.20.0.tgz#1345a6fca3e8daefc10d0fa77067f54cedafd59a" + integrity sha512-XTHBZSIIxNsIsZXg7XB5l8z/OBFosl1Wao4tXLpeC7eKU4Vm/kdop2azkPqULwnfGQjmeDIyey9g7afMMtdWAA== + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + is-nan@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" @@ -15565,7 +15772,7 @@ is-primitive@^2.0.0: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= -is-promise@^2.1: +is-promise@^2.1, is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= @@ -15575,6 +15782,11 @@ is-promise@~1, is-promise@~1.0.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-1.0.1.tgz#31573761c057e33c2e91aab9e96da08cefbe76e5" integrity sha1-MVc3YcBX4zwukaq56W2gjO++duU= +is-property@^1.0.0, is-property@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + integrity sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ= + is-pull-stream@0.0.0, is-pull-stream@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/is-pull-stream/-/is-pull-stream-0.0.0.tgz#a3bc3d1c6d3055151c46bde6f399efed21440ca9" @@ -15615,6 +15827,11 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-resolvable@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.1.tgz#acca1cd36dbe44b974b924321555a70ba03b1cf4" + integrity sha512-y5CXYbzvB3jTnWAZH1Nl7ykUWb6T3BcTs56HUruwBf8MhF56n1HWqhDWnVFo8GHrUPDgvUUNVhrc2U8W7iqz5g== + is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" @@ -16044,15 +16261,6 @@ jest-haste-map@^26.6.2: optionalDependencies: fsevents "^2.1.2" -jest-it-up@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/jest-it-up/-/jest-it-up-2.0.2.tgz#c8c38d14fd4a9131c12f6947baa2063554c0738d" - integrity sha512-xup3Lv1uc+ihGwyFLjZOqY2L7m91TyBp/TRJxS7PYAVQc/vd3NbkPyypUlT59sQDfW9uULF9jLCedr7jABDNnA== - dependencies: - "@inquirer/confirm" "^0.0.14-alpha.0" - ansi-colors "^4.1.0" - commander "^9.0.0" - jest-jasmine2@^26.6.3: version "26.6.3" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" @@ -16350,6 +16558,11 @@ js-string-escape@^1.0.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + js-yaml@3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" @@ -16358,7 +16571,7 @@ js-yaml@3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.13.1, js-yaml@^3.14.0: +js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.5.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -16366,13 +16579,6 @@ js-yaml@^3.13.1, js-yaml@^3.14.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - jsan@^3.1.13: version "3.1.13" resolved "https://registry.yarnpkg.com/jsan/-/jsan-3.1.13.tgz#4de8c7bf8d1cfcd020c313d438f930cec4b91d86" @@ -16476,12 +16682,12 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-merge-patch@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-merge-patch/-/json-merge-patch-1.0.2.tgz#c4626811943b2f362f8607ae8f03d528875465b0" - integrity sha512-M6Vp2GN9L7cfuMXiWOmHj9bEFbeC250iVtcKQbqVgEsDVYnIsrNsbU+h/Y/PkbBQCtEa4Bez+Ebv0zfbC8ObLg== +json-merge-patch@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-merge-patch/-/json-merge-patch-0.2.3.tgz#fa2c6b5af87da77bae2966a589d52e23ed81fe40" + integrity sha1-+ixrWvh9p3uuKWalidUuI+2B/kA= dependencies: - fast-deep-equal "^3.1.3" + deep-equal "^1.0.0" json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" @@ -16635,6 +16841,11 @@ jsonparse@^1.2.0: resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + integrity sha1-T9kss04OnbPInIYi7PUfm5eMbLk= + jsonschema@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.2.tgz#83ab9c63d65bf4d596f91d81195e78772f6452bc" @@ -16798,7 +17009,17 @@ keccak@3.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -keccak@^3.0.0: +keccak@^1.0.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-1.4.0.tgz#572f8a6dbee8e7b3aa421550f9e6408ca2186f80" + integrity sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw== + dependencies: + bindings "^1.2.1" + inherits "^2.0.3" + nan "^2.2.1" + safe-buffer "^5.1.0" + +keccak@^3.0.0, keccak@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== @@ -17023,9 +17244,9 @@ lavamoat-tofu@^5.1.3: "@babel/traverse" "^7.10.1" lavamoat-tofu@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/lavamoat-tofu/-/lavamoat-tofu-6.0.2.tgz#eed3031e31fac37b36eb42a7bad9ec7ef824ea34" - integrity sha512-za9lWVdB5hk1Clt77Sfb81x425sOi9nnZvJcsCfhQaojNJSn8B/3MQR9D7HmmNw4jJE+4B0ILqZoz/MNaABEYg== + version "6.0.1" + resolved "https://registry.yarnpkg.com/lavamoat-tofu/-/lavamoat-tofu-6.0.1.tgz#df3a1d09021790d5a4ccc1039751e9b3c2df85f6" + integrity sha512-QotLOiEcGBlWBJPYSZKDRRFchpwN9s3Ra8DDTuxJ57dGTBKOvvvfA+BpAjH/w1JcEhFkl5Wkc57Hl1oVzE8D2A== dependencies: "@babel/parser" "^7.10.1" "@babel/traverse" "^7.10.1" @@ -17339,6 +17560,14 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -17347,14 +17576,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - libp2p-bootstrap@~0.9.3: version "0.9.7" resolved "https://registry.yarnpkg.com/libp2p-bootstrap/-/libp2p-bootstrap-0.9.7.tgz#eabedab24775a6175f07ce035b716e8114d84a76" @@ -18029,11 +18250,6 @@ lodash.memoize@~3.0.3: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.partition@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.partition/-/lodash.partition-4.6.0.tgz#a38e46b73469e0420b0da1212e66d414be364ba4" @@ -18069,7 +18285,7 @@ lodash.uniqby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= -lodash@=3.10.1, lodash@^4.13.1, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.7.0, lodash@~4.17.2: +lodash@=3.10.1, lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.7.0, lodash@~4.17.2: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -18095,7 +18311,7 @@ log-symbols@^4.0.0: dependencies: chalk "^4.0.0" -loglevel@^1.4.1: +loglevel@^1.4.1, loglevel@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.0.tgz#ae0caa561111498c5ba13723d6fb631d24003934" integrity sha1-rgyqVhERSYxboTcj1vtjHSQAOTQ= @@ -18426,6 +18642,13 @@ mdast-util-to-string@^1.0.0: resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz#27055500103f51637bd07d01da01eb1967a43527" integrity sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A== +mdn-browser-compat-data@0.0.94: + version "0.0.94" + resolved "https://registry.yarnpkg.com/mdn-browser-compat-data/-/mdn-browser-compat-data-0.0.94.tgz#eaa1653761ce95881ea1858a8c0ce6066d85f94b" + integrity sha512-O3zJqbmehz0Hn3wpk62taA0+jNF7yn6BDWqQ9Wh2bEoO9Rx1BYiTmNX565eNVbW0ixfQkY6Sp9FvY/rr79Qmyg== + dependencies: + extend "3.0.2" + mdurl@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" @@ -18722,6 +18945,11 @@ mime@^2.4.4: resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + integrity sha1-5md4PZLonb00KBi1IwudYqZyrRg= + mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -18768,27 +18996,13 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@3.0.4: +minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - minimist-options@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -19315,25 +19529,30 @@ mute-stdout@^1.0.0: resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== -mute-stream@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + integrity sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA= -nan@^2.11.1, nan@^2.12.1, nan@^2.13.2, nan@^2.14.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" - integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nan@^2.11.1, nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.2.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== nanoid@^2.0.0, nanoid@^2.1.6: version "2.1.11" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== -nanoid@^3.1.31, nanoid@^3.3.3: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +nanoid@^3.1.23, nanoid@^3.1.31: + version "3.2.0" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" + integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== nanomatch@^1.2.9: version "1.2.9" @@ -19380,6 +19599,11 @@ native-url@^0.2.6: dependencies: querystring "^0.2.0" +natural-compare-lite@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha1-F7CVgZiJef3a/gIB6TG6kzyWy7Q= + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -19528,7 +19752,7 @@ node-environment-flags@1.0.6: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-fetch@2.6.7, node-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7, node-fetch@~2.6.1: +node-fetch@2.6.7, node-fetch@^2.3.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@~2.6.1: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -19727,6 +19951,14 @@ nofilter@^1.0.4: resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== +nomnom@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" + integrity sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc= + dependencies: + chalk "~0.4.0" + underscore "~1.6.0" + nomnom@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" @@ -19863,13 +20095,6 @@ npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" -nth-check@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" - integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== - dependencies: - boolbase "^1.0.0" - nth-check@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -20123,11 +20348,6 @@ observable-webworkers@^1.0.0: resolved "https://registry.yarnpkg.com/observable-webworkers/-/observable-webworkers-1.0.0.tgz#dcbd484a9644d512accc351962c6e710313fbb68" integrity sha512-+cECwCR8IEh8UY5nefQVLO9Cydqpk1izO+o7BABmKjXfJZyEOzBWY3ss5jbOPM6KmEa9aQExvAtTW6tVTOsNAQ== -on-exit-leak-free@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz#b39c9e3bf7690d890f4861558b0d7b90a442d209" - integrity sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg== - on-finished@^2.3.0, on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -20147,6 +20367,18 @@ once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" @@ -20184,7 +20416,7 @@ optional@^0.1.3: resolved "https://registry.yarnpkg.com/optional/-/optional-0.1.4.tgz#cdb1a9bedc737d2025f690ceeb50e049444fd5b3" integrity sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw== -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= @@ -20362,12 +20594,12 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-5.0.0.tgz#6d26c1d95b6597c5d5317bf5fba37eccec3672e0" - integrity sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA== +os-locale@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-4.0.0.tgz#06e4fb102f38f33e9e904f41af3c34a5aa3b2b7b" + integrity sha512-HsSR1+2l6as4Wp2SGZxqLnuFHxVvh1Ir9pvZxyujsC13egZVe7P0YeBLN0ijQzM/twrO5To3ia3jzBXAvpMTEA== dependencies: - execa "^4.0.0" + execa "^1.0.0" lcid "^3.0.0" mem "^5.0.0" @@ -20810,19 +21042,12 @@ parse-url@^5.0.0: parse-path "^4.0.0" protocols "^1.4.0" -parse5-htmlparser2-tree-adapter@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" - integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== - dependencies: - parse5 "^6.0.1" - -parse5@6.0.1, parse5@^6.0.0, parse5@^6.0.1: +parse5@6.0.1, parse5@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^3.0.2: +parse5@^3.0.1, parse5@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== @@ -20928,7 +21153,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@1.0.2, path-is-inside@^1.0.1: +path-is-inside@1.0.2, path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -21023,9 +21248,9 @@ pause-stream@0.0.11: through "~2.3" pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + version "3.1.1" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" + integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -21177,14 +21402,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pino-abstract-transport@v0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz#4b54348d8f73713bfd14e3dc44228739aa13d9c0" - integrity sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ== - dependencies: - duplexify "^4.1.2" - split2 "^4.0.0" - pino-pretty@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-2.6.1.tgz#b5a8e28137deb1629428931d98c708b51f0e9555" @@ -21205,29 +21422,7 @@ pino-std-serializers@^2.3.0: resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz#cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1" integrity sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ== -pino-std-serializers@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1791ccd2539c091ae49ce9993205e2cd5dbba1e2" - integrity sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q== - -pino@7.11.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-7.11.0.tgz#0f0ea5c4683dc91388081d44bff10c83125066f6" - integrity sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg== - dependencies: - atomic-sleep "^1.0.0" - fast-redact "^3.0.0" - on-exit-leak-free "^0.2.0" - pino-abstract-transport v0.5.0 - pino-std-serializers "^4.0.0" - process-warning "^1.0.0" - quick-format-unescaped "^4.0.3" - real-require "^0.1.0" - safe-stable-stringify "^2.1.0" - sonic-boom "^2.2.1" - thread-stream "^0.15.1" - -pino@^5.12.3: +pino@5.13.3, pino@^5.12.3, pino@~5.13.0: version "5.13.3" resolved "https://registry.yarnpkg.com/pino/-/pino-5.13.3.tgz#26cd6f69b4bd03d6408af28eddcd9313687f143d" integrity sha512-FL12DKlPwBlbhztlUz6kseR03PRR8nD+wvLdN/Sji9UiBYYfSjX+k8ocU7/NwW55JdFRONTn3iACoelXnMFVVQ== @@ -21298,6 +21493,11 @@ plugin-error@1.0.1, plugin-error@^1.0.1: arr-union "^3.1.0" extend-shallow "^3.0.2" +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + integrity sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU= + pn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -21310,6 +21510,14 @@ pnp-webpack-plugin@1.6.4: dependencies: ts-pnp "^1.1.6" +po2json@0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/po2json/-/po2json-0.4.5.tgz#47bb2952da32d58a1be2f256a598eebc0b745118" + integrity sha1-R7spUtoy1Yob4vJWpZjuvAt0URg= + dependencies: + gettext-parser "1.1.0" + nomnom "1.8.1" + polished@^4.0.5: version "4.1.3" resolved "https://registry.yarnpkg.com/polished/-/polished-4.1.3.tgz#7a3abf2972364e7d97770b827eec9a9e64002cfc" @@ -21546,6 +21754,15 @@ postcss-values-parser@^2.0.1: indexes-of "^1.0.1" uniq "^1.0.1" +postcss@7.0.18: + version "7.0.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.18.tgz#4b9cda95ae6c069c67a4d933029eddd4838ac233" + integrity sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + postcss@7.0.21: version "7.0.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" @@ -21555,15 +21772,6 @@ postcss@7.0.21: source-map "^0.6.1" supports-color "^6.1.0" -postcss@8.4.13, postcss@^8.1.10, postcss@^8.1.7: - version "8.4.13" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.13.tgz#7c87bc268e79f7f86524235821dfdf9f73e5d575" - integrity sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA== - dependencies: - nanoid "^3.3.3" - picocolors "^1.0.0" - source-map-js "^1.0.2" - postcss@^6.0.1, postcss@^6.0.19, postcss@^6.0.23: version "6.0.23" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" @@ -21581,6 +21789,15 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2, postcss@^7.0.21, postcss@^7.0. picocolors "^0.2.1" source-map "^0.6.1" +postcss@^8.1.10, postcss@^8.1.7: + version "8.3.6" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" + integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== + dependencies: + colorette "^1.2.2" + nanoid "^3.1.23" + source-map-js "^0.6.2" + postmsg-rpc@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/postmsg-rpc/-/postmsg-rpc-2.4.0.tgz#4e2daf6851852364696debd5d6bf6936d1424cdf" @@ -21753,6 +21970,17 @@ prismjs@^1.21.0, prismjs@~1.22.0: optionalDependencies: clipboard "^2.0.0" +probe-image-size@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/probe-image-size/-/probe-image-size-5.0.0.tgz#1b87d20340ab8fcdb4324ec77fbc8a5f53419878" + integrity sha512-V6uBYw5eBc5UVIE7MUZD6Nxg0RYuGDWLDenEn0B1WC6PcTvn1xdQ6HLDDuznefsiExC6rNrCz7mFRBo0f3Xekg== + dependencies: + deepmerge "^4.0.0" + inherits "^2.0.3" + next-tick "^1.0.0" + request "^2.83.0" + stream-parser "~0.3.1" + process-nextick-args@^1.0.6, process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" @@ -21770,11 +21998,6 @@ process-on-spawn@^1.0.0: dependencies: fromentries "^1.2.0" -process-warning@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-1.0.0.tgz#980a0b25dc38cd6034181be4b7726d89066b4616" - integrity sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q== - process@^0.11.10, process@~0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -21785,6 +22008,11 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= + progress@^2.0.0, progress@^2.0.1, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -22352,23 +22580,11 @@ queue-microtask@^1.2.3: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -queue@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.2.tgz#b91525283e2315c7553d2efa18d83e76432fed65" - integrity sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA== - dependencies: - inherits "~2.0.3" - quick-format-unescaped@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz#0137e94d8fb37ffeb70040535111c378e75396fb" integrity sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA== -quick-format-unescaped@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" - integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== - quick-lru@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" @@ -23099,10 +23315,14 @@ readdirp@~3.2.0: dependencies: picomatch "^2.0.4" -real-require@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.1.0.tgz#736ac214caa20632847b7ca8c1056a0767df9381" - integrity sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg== +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + integrity sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" receptacle@^1.3.2: version "1.3.2" @@ -23197,7 +23417,7 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.11.0, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: +regenerator-runtime@0.13.3, regenerator-runtime@^0.11.0, regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== @@ -23237,10 +23457,15 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0, regexpp@^3.1.0, regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpp@^3.0.0, regexpp@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== regexpu-core@^4.7.1: version "4.7.1" @@ -23525,7 +23750,7 @@ request-promise-native@^1.0.3: stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@^2.83.0, request@^2.85.0, request@^2.88.2: +request@^2.83.0, request@^2.85.0, request@^2.88.2, request@~2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -23576,6 +23801,14 @@ require-package-name@^2.0.1: resolved "https://registry.yarnpkg.com/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9" integrity sha1-wR6XJ2tluOKSP3Xav1+y7ww4Qbk= +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + requirejs-config-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz#4244da5dd1f59874038cc1091d078d620abb6ebc" @@ -23624,6 +23857,11 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: expand-tilde "^2.0.0" global-modules "^1.0.0" +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -23695,6 +23933,22 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + integrity sha1-NGYfRohjJ/7SmRR5FSJS35LapUE= + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -23881,10 +24135,19 @@ rtlcss@^2.4.0: postcss "^6.0.23" strip-json-comments "^2.0.0" -run-async@^2.3.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + integrity sha1-yK1KXhEGYeQCp9IbUw4AnyX444k= + dependencies: + once "^1.3.0" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" run-parallel@^1.1.9: version "1.1.9" @@ -23908,7 +24171,12 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@6, rxjs@^6.5.2: +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + integrity sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI= + +rxjs@6, rxjs@^6.4.0, rxjs@^6.5.2: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -23925,7 +24193,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@~5.1.2: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -23949,11 +24217,6 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safe-stable-stringify@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz#ab67cbe1fe7d40603ca641c5e765cb942d04fc73" - integrity sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg== - "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -24124,7 +24387,7 @@ scss-parser@^1.0.4: dependencies: invariant "2.2.4" -secp256k1@4.0.2: +secp256k1@4.0.2, secp256k1@^4.0.0, secp256k1@^4.0.1, secp256k1@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== @@ -24147,15 +24410,6 @@ secp256k1@^3.0.1, secp256k1@^3.6.1, secp256k1@^3.6.2: nan "^2.14.0" safe-buffer "^5.1.2" -secp256k1@^4.0.0, secp256k1@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" @@ -24199,23 +24453,23 @@ semver-greatest-satisfied-range@^1.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@6.3.0, semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.3.7, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== +semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -24358,7 +24612,7 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@2.4.11, sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8, sha.js@~2.4.4: +sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8, sha.js@~2.4.4: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -24439,6 +24693,15 @@ shell-quote@1.7.2, shell-quote@^1.4.2, shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== +shelljs@^0.7.5: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM= + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + shelljs@^0.8.1: version "0.8.4" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" @@ -24544,6 +24807,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" @@ -24711,13 +24979,6 @@ sonic-boom@^0.7.5: dependencies: flatstr "^1.0.12" -sonic-boom@^2.2.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" - integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== - dependencies: - atomic-sleep "^1.0.0" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -24748,10 +25009,10 @@ source-map-explorer@^2.4.2: temp "^0.9.1" yargs "^15.3.1" -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" + integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== source-map-resolve@^0.5.0, source-map-resolve@^0.5.1: version "0.5.1" @@ -24772,10 +25033,18 @@ source-map-resolve@^0.6.0: atob "^2.1.2" decode-uri-component "^0.2.0" -source-map-support@0.5.21, source-map-support@^0.5.11, source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.11, source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20, source-map-support@~0.5.4: + version "0.5.20" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" + integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -24898,11 +25167,6 @@ split2@^3.0.0, split2@^3.1.0: dependencies: readable-stream "^3.0.0" -split2@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/split2/-/split2-4.1.0.tgz#101907a24370f85bb782f08adaabe4e281ecf809" - integrity sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ== - split@0.3, split@~0.3.0: version "0.3.3" resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" @@ -25120,6 +25384,13 @@ stream-http@^3.0.0: readable-stream "^3.6.0" xtend "^4.0.2" +stream-parser@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/stream-parser/-/stream-parser-0.3.1.tgz#1618548694420021a1182ff0af1911c129761773" + integrity sha1-FhhUhpRCACGhGC/wrxkRwSl2F3M= + dependencies: + debug "2" + stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" @@ -25148,6 +25419,13 @@ stream-to-pull-stream@^1.7.2, stream-to-pull-stream@^1.7.3: looper "^3.0.0" pull-stream "^3.2.3" +stream@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" + integrity sha1-f1Nj8Ff2WSxVlfALyAon9c7B8O8= + dependencies: + emitter-component "^1.1.1" + streamsearch@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" @@ -25190,7 +25468,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -25207,14 +25485,14 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" + strip-ansi "^6.0.0" "string.prototype.matchall@^4.0.0 || ^3.0.1", string.prototype.matchall@^4.0.2, string.prototype.matchall@^4.0.4: version "4.0.4" @@ -25278,11 +25556,11 @@ string_decoder@0.10, string_decoder@~0.10.x: integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== dependencies: - safe-buffer "~5.2.0" + safe-buffer "~5.1.0" string_decoder@~1.0.3: version "1.0.3" @@ -25318,7 +25596,7 @@ stringify-object@^3.2.1: is-obj "^1.0.1" is-regexp "^1.0.0" -strip-ansi@6.0.0: +strip-ansi@6.0.0, strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== @@ -25346,12 +25624,10 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" +strip-ansi@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" + integrity sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE= strip-bom-buf@^2.0.0: version "2.0.0" @@ -25422,7 +25698,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@2.0.1, strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: +strip-json-comments@2.0.1, strip-json-comments@^2.0.0, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -25594,6 +25870,11 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -25678,7 +25959,19 @@ syntax-error@^1.1.1: dependencies: acorn-node "^1.2.0" -table@^5.4.6: +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + integrity sha1-K7xULw/amGGnVdOUf+/Ys/UThV8= + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +table@^5.2.3, table@^5.4.6: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== @@ -25889,7 +26182,7 @@ text-encoding@^0.6.4: resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" integrity sha1-45mpgiV6J22uQou5KEXLcb3CbRk= -text-table@0.2.0, text-table@^0.2.0: +text-table@0.2.0, text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= @@ -25899,13 +26192,6 @@ textarea-caret@^3.0.1: resolved "https://registry.yarnpkg.com/textarea-caret/-/textarea-caret-3.0.2.tgz#f360c48699aa1abf718680a43a31a850665c2caf" integrity sha1-82DEhpmqGr9xhoCkOjGoUGZcLK8= -thread-stream@^0.15.1: - version "0.15.2" - resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" - integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== - dependencies: - real-require "^0.1.0" - throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" @@ -26196,7 +26482,7 @@ tough-cookie@^2.3.3, tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^1.0.0: +tr46@^1.0.0, tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= @@ -26308,10 +26594,10 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.3.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== tslib@~2.0.1: version "2.0.3" @@ -26534,6 +26820,11 @@ underscore@~1.4.4: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= +underscore@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" + integrity sha1-izixDKze9jM3uLJOT/htRa6lKag= + undertaker-registry@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" @@ -26731,6 +27022,11 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +unorm@^1.3.3: + version "1.5.0" + resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.5.0.tgz#01fa9b76f1c60f7916834605c032aa8962c3f00a" + integrity sha512-sMfSWoiRaXXeDZSXC+YRZ23H4xchQpwxjpw1tmfR+kgbBCaOgln4NI0LXejJIhnBuKINrB3WRn+ZI8IWssirVw== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -26759,12 +27055,7 @@ unzip-response@^2.0.1: resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= -upath@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" - integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== - -upath@^1.1.1: +upath@1.2.0, upath@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== @@ -26920,6 +27211,13 @@ use@^3.1.0: dependencies: kind-of "^6.0.2" +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= + dependencies: + os-homedir "^1.0.0" + utf-8-validate@5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.7.tgz#c15a19a6af1f7ad9ec7ddc425747ca28c3644922" @@ -27551,6 +27849,15 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-url@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -27753,6 +28060,13 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= + dependencies: + mkdirp "^0.5.1" + ws@*, ws@7.1.0, ws@7.4.6, ws@>=7.4.6, ws@^1.1.0, ws@^5.1.1, ws@^7, ws@^7.2.0, ws@^7.3.1, ws@^7.4.0, ws@^7.4.6, ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" @@ -27897,7 +28211,7 @@ yaml@^1.10.0, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@13.1.2, yargs-parser@^13.1.2: +yargs-parser@13.1.2, yargs-parser@^13.1.1, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -27926,11 +28240,6 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@^21.0.0: - version "21.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== - yargs-promise@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/yargs-promise/-/yargs-promise-1.1.0.tgz#97ebb5198df734bb3b11745133ae5b501b16ab1f" @@ -27961,18 +28270,22 @@ yargs@13.3.2, yargs@^13.2.2, yargs@^13.2.4, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@17.4.1, yargs@^17.0.1: - version "17.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" - integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== +yargs@14.0.0, yargs@~14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.0.0.tgz#ba4cacc802b3c0b3e36a9e791723763d57a85066" + integrity sha512-ssa5JuRjMeZEUjg7bEL99AwpitxU/zWGAGpdj0di41pOEmJti8NR6kyUIJBkR78DTYNPZOU08luUo0GTHuB+ow== dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.0.0" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" yargs@^15.0.0, yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" @@ -28004,6 +28317,19 @@ yargs@^16.0.0, yargs@^16.1.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb" + integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^7.1.0: version "7.1.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.1.tgz#67f0ef52e228d4ee0d6311acede8850f53464df6"
@@ -184,6 +179,8 @@ export default function SrpInput({ onChange, srpText }) { if (newSrp.trim().match(/\s/u)) { event.preventDefault(); onSrpPaste(newSrp); + } else { + onSrpWordChange(index, newSrp); } }} /> diff --git a/ui/components/app/srp-input/srp-input.scss b/ui/components/app/srp-input/srp-input.scss index 5d971147b..21f0a576b 100644 --- a/ui/components/app/srp-input/srp-input.scss +++ b/ui/components/app/srp-input/srp-input.scss @@ -2,28 +2,27 @@ &__container { display: grid; grid-template-areas: - 'title dropdown' - 'paste-tip paste-tip' - 'input input' - 'error error' - 'too-many-words-error too-many-words-error'; + "title dropdown" + "paste-tip paste-tip" + "input input" + "error error" + "too-many-words-error too-many-words-error"; } @media (max-width: 767px) { &__container { grid-template-areas: - 'title' - 'dropdown' - 'paste-tip' - 'input' - 'error' - 'too-many-words-error'; + "title" + "dropdown" + "paste-tip" + "input" + "error" + "too-many-words-error"; } } &__srp-label { grid-area: title; - text-align: center; } &__number-of-words-dropdown { @@ -31,7 +30,7 @@ } &__paste-tip { - margin: 24px 0; + margin-bottom: 8px; grid-area: paste-tip; width: auto; margin-left: auto; diff --git a/ui/components/app/step-progress-bar/index.scss b/ui/components/app/step-progress-bar/index.scss index b248cf69f..7d37e2fae 100644 --- a/ui/components/app/step-progress-bar/index.scss +++ b/ui/components/app/step-progress-bar/index.scss @@ -1,10 +1,8 @@ -$progress-bar-width: calc(100% - 34px); // 100% - (circle size + (circle border size * 2)) -$progress-bar-position-left: calc(-50% + 17px); // -50% + ((circle size / 2) + circle border size) - .progressbar { counter-reset: step; display: flex; - justify-content: space-between; + justify-content: space-evenly; + width: 500px; margin: 0 auto; } @@ -13,17 +11,14 @@ ul.two-steps { } .progressbar li { - @include H7; - list-style-type: none; + width: 25%; + float: left; + font-size: 12px; position: relative; text-align: center; color: var(--color-text-alternative); z-index: 2; - align-items: center; - display: flex; - flex: 1; - flex-direction: column; } .progressbar li::before { @@ -33,30 +28,32 @@ ul.two-steps { counter-increment: step; line-height: 30px; border: 2px solid var(--color-border-muted); - display: flex; - justify-content: center; - align-items: center; + display: block; text-align: center; margin: 0 auto 10px auto; border-radius: 50%; background-color: var(--color-background-default); + z-index: -1; } .progressbar li::after { - width: $progress-bar-width; + width: 100%; height: 2px; content: ''; position: absolute; background-color: var(--color-background-alternative); top: 15px; - left: $progress-bar-position-left; + right: 77px; + z-index: -1; [dir='rtl'] & { - width: $progress-bar-width; + width: 100%; height: 2px; content: ''; position: absolute; background-color: var(--color-background-alternative); + right: 77px; + z-index: -1; } } @@ -107,11 +104,13 @@ ul.two-steps { } .progressbar li.two-steps::after { + width: 180px; height: 2px; content: ''; position: absolute; background-color: var(--color-background-alternative); top: 15px; + right: 75px; z-index: -1; [dir='rtl'] & { @@ -120,6 +119,7 @@ ul.two-steps { content: ''; position: absolute; background-color: var(--color-background-alternative); + right: 75px; z-index: -1; } } diff --git a/ui/components/app/step-progress-bar/step-progress-bar.js b/ui/components/app/step-progress-bar/step-progress-bar.js index 71fe934b5..88f49a826 100644 --- a/ui/components/app/step-progress-bar/step-progress-bar.js +++ b/ui/components/app/step-progress-bar/step-progress-bar.js @@ -19,10 +19,10 @@ export const twoStepStages = { PASSWORD_CREATE: 2, }; -export function ThreeStepProgressBar({ stage, ...boxProps }) { +export function ThreeStepProgressBar({ stage }) { const t = useI18nContext(); return ( - +
  • +
    • event.stopPropagation()} - style={{ color: 'var(--color-warning-default)' }} + style={{ color: 'var(--color-secondary-default)' }} > {t('here')} diff --git a/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.stories.js b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.stories.js index 0436f28d1..94bda3be5 100644 --- a/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.stories.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.stories.js @@ -14,9 +14,6 @@ export default { options: Object.keys(imageHash), }, }, - args: { - eventKey: Object.keys(imageHash)[0], - }, }; export const DefaultStory = (args) => ; diff --git a/ui/components/app/transaction-decoding/transaction-decoding.component.js b/ui/components/app/transaction-decoding/transaction-decoding.component.js index b04726910..00b858d4f 100644 --- a/ui/components/app/transaction-decoding/transaction-decoding.component.js +++ b/ui/components/app/transaction-decoding/transaction-decoding.component.js @@ -202,7 +202,7 @@ export default function TransactionDecoding({ to = '', inputData: data = '' }) { if (loading) { return (
      - +
      ); } diff --git a/ui/components/app/transaction-detail-item/index.scss b/ui/components/app/transaction-detail-item/index.scss index a51cae46d..c7a39c250 100644 --- a/ui/components/app/transaction-detail-item/index.scss +++ b/ui/components/app/transaction-detail-item/index.scss @@ -34,7 +34,7 @@ margin-inline-start: 4px; path { - fill: var(--color-icon-alternative); + fill: var(--color-icon-default); } } diff --git a/ui/components/app/transaction-icon/transaction-icon.js b/ui/components/app/transaction-icon/transaction-icon.js index e87b8520a..1036b853a 100644 --- a/ui/components/app/transaction-icon/transaction-icon.js +++ b/ui/components/app/transaction-icon/transaction-icon.js @@ -17,9 +17,9 @@ import { captureSingleException } from '../../../store/actions'; const ICON_MAP = { [TRANSACTION_GROUP_CATEGORIES.APPROVAL]: Approve, [TRANSACTION_GROUP_CATEGORIES.INTERACTION]: Interaction, - [TRANSACTION_GROUP_CATEGORIES.RECEIVE]: Receive, [TRANSACTION_GROUP_CATEGORIES.SEND]: Send, [TRANSACTION_GROUP_CATEGORIES.SIGNATURE_REQUEST]: Sign, + [TRANSACTION_GROUP_CATEGORIES.RECEIVE]: Receive, [TRANSACTION_GROUP_CATEGORIES.SWAP]: Swap, }; @@ -29,13 +29,13 @@ const OK_COLOR = 'var(--color-primary-default)'; const COLOR_MAP = { [TRANSACTION_GROUP_STATUSES.PENDING]: PENDING_COLOR, - [TRANSACTION_GROUP_STATUSES.CANCELLED]: FAIL_COLOR, + [TRANSACTION_STATUSES.UNAPPROVED]: PENDING_COLOR, [TRANSACTION_STATUSES.APPROVED]: PENDING_COLOR, - [TRANSACTION_STATUSES.DROPPED]: FAIL_COLOR, [TRANSACTION_STATUSES.FAILED]: FAIL_COLOR, [TRANSACTION_STATUSES.REJECTED]: FAIL_COLOR, + [TRANSACTION_GROUP_STATUSES.CANCELLED]: FAIL_COLOR, + [TRANSACTION_STATUSES.DROPPED]: FAIL_COLOR, [TRANSACTION_STATUSES.SUBMITTED]: PENDING_COLOR, - [TRANSACTION_STATUSES.UNAPPROVED]: PENDING_COLOR, }; export default function TransactionIcon({ status, category }) { @@ -58,22 +58,22 @@ export default function TransactionIcon({ status, category }) { TransactionIcon.propTypes = { status: PropTypes.oneOf([ - TRANSACTION_GROUP_STATUSES.CANCELLED, TRANSACTION_GROUP_STATUSES.PENDING, + TRANSACTION_STATUSES.UNAPPROVED, TRANSACTION_STATUSES.APPROVED, - TRANSACTION_STATUSES.CONFIRMED, - TRANSACTION_STATUSES.DROPPED, TRANSACTION_STATUSES.FAILED, TRANSACTION_STATUSES.REJECTED, + TRANSACTION_GROUP_STATUSES.CANCELLED, + TRANSACTION_STATUSES.DROPPED, + TRANSACTION_STATUSES.CONFIRMED, TRANSACTION_STATUSES.SUBMITTED, - TRANSACTION_STATUSES.UNAPPROVED, ]).isRequired, category: PropTypes.oneOf([ TRANSACTION_GROUP_CATEGORIES.APPROVAL, TRANSACTION_GROUP_CATEGORIES.INTERACTION, - TRANSACTION_GROUP_CATEGORIES.RECEIVE, TRANSACTION_GROUP_CATEGORIES.SEND, TRANSACTION_GROUP_CATEGORIES.SIGNATURE_REQUEST, + TRANSACTION_GROUP_CATEGORIES.RECEIVE, TRANSACTION_GROUP_CATEGORIES.SWAP, ]).isRequired, }; diff --git a/ui/components/app/transaction-list-item-details/index.scss b/ui/components/app/transaction-list-item-details/index.scss index 8501192e8..506b1bbdc 100644 --- a/ui/components/app/transaction-list-item-details/index.scss +++ b/ui/components/app/transaction-list-item-details/index.scss @@ -86,8 +86,7 @@ &-rounded-button { @include H8; - padding: 8px; - min-width: 75px; + padding: 0 16px; margin-right: 8px; } diff --git a/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js index 18417627c..4164de3a3 100644 --- a/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js @@ -6,7 +6,6 @@ import TransactionBreakdown from '../transaction-breakdown'; import TransactionActivityLog from '../transaction-activity-log'; import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; import { GAS_LIMITS } from '../../../../shared/constants/gas'; -import TransactionStatus from '../transaction-status/transaction-status.component'; import TransactionListItemDetails from './transaction-list-item-details.component'; describe('TransactionListItemDetails Component', () => { @@ -41,7 +40,6 @@ describe('TransactionListItemDetails Component', () => { transactionGroup={transactionGroup} senderNickname="sender-nickname" recipientNickname="recipient-nickname" - transactionStatus={TransactionStatus} />, { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ); @@ -88,7 +86,6 @@ describe('TransactionListItemDetails Component', () => { showSpeedUp senderNickname="sender-nickname" recipientNickname="recipient-nickname" - transactionStatus={TransactionStatus} />, { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ); @@ -130,7 +127,6 @@ describe('TransactionListItemDetails Component', () => { transactionGroup={transactionGroup} senderNickname="sender-nickname" recipientNickname="recipient-nickname" - transactionStatus={TransactionStatus} />, { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ); @@ -175,7 +171,6 @@ describe('TransactionListItemDetails Component', () => { transactionGroup={transactionGroup} senderNickname="sender-nickname" recipientNickname="recipient-nickname" - transactionStatus={TransactionStatus} />, { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ); diff --git a/ui/components/app/transaction-list-item/index.scss b/ui/components/app/transaction-list-item/index.scss index f523714bd..69413b1e1 100644 --- a/ui/components/app/transaction-list-item/index.scss +++ b/ui/components/app/transaction-list-item/index.scss @@ -53,9 +53,15 @@ margin: 0 4px; } + &__origin, &__address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + + &__origin { + /*rtl:ignore*/ + direction: rtl; + } } diff --git a/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js b/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js index 156b9d8ef..26133341e 100644 --- a/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/smart-transaction-list-item.component.js @@ -14,7 +14,6 @@ import { import CancelButton from '../cancel-button'; import { cancelSwapsSmartTransaction } from '../../../ducks/swaps/swaps'; -import SiteOrigin from '../../ui/site-origin'; export default function SmartTransactionListItem({ smartTransaction, @@ -61,11 +60,9 @@ export default function SmartTransactionListItem({ date={date} status={displayedStatusKey} /> - + + {subtitle} + } > diff --git a/ui/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js index 867d236f9..5cc73bc03 100644 --- a/ui/components/app/transaction-list-item/transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js @@ -39,7 +39,6 @@ import CancelSpeedupPopover from '../cancel-speedup-popover'; import EditGasFeePopover from '../edit-gas-fee-popover'; import EditGasPopover from '../edit-gas-popover'; import { MetaMetricsContext } from '../../../contexts/metametrics'; -import SiteOrigin from '../../ui/site-origin'; function TransactionListItemInner({ transactionGroup, @@ -192,13 +191,16 @@ function TransactionListItemInner({ date={date} status={displayedStatusKey} /> - {subtitleContainsOrigin ? ( - - ) : ( - - {subtitle} - - )} + + {subtitle} + } rightContent={ diff --git a/ui/components/app/transaction-list-item/transaction-list-item.stories.js b/ui/components/app/transaction-list-item/transaction-list-item.stories.js deleted file mode 100644 index 0d030310a..000000000 --- a/ui/components/app/transaction-list-item/transaction-list-item.stories.js +++ /dev/null @@ -1,210 +0,0 @@ -import React from 'react'; -import { - TRANSACTION_STATUSES, - TRANSACTION_TYPES, -} from '../../../../shared/constants/transaction'; -import { MOCK_TRANSACTION_BY_TYPE } from '../../../../.storybook/initial-states/transactions'; -import TransactionListItem from '.'; - -/** - * @typedef {(import('../../selectors/transactions').TransactionGroup} TransactionGroup - */ - -/** - * @param {Object} args - * @returns {TransactionGroup} - */ -const getMockTransactionGroup = (args) => { - const status = args['transactionGroup.primaryTransaction.status']; - const tx = { - ...args['transactionGroup.primaryTransaction'], - status, - submittedTime: args['transactionGroup.primaryTransaction.submittedTime'], - }; - - return { - hasCancelled: args['transactionGroup.hasCancelled'], - hasRetried: args['transactionGroup.hasRetried'], - nonce: '0x1', - initialTransaction: tx, - primaryTransaction: tx, - transactions: [tx], - }; -}; - -/** - * Transaction List Item Storybook Page - * - * Each page displays a different Transaction Type (TRANSACTION_TYPES) - * except TRANSACTION_TYPES.CANCEL and TRANSACTION_TYPES.RETRY as these two types - * are never initialTransactions - */ -export default { - title: 'Components/App/TransactionListItem', - id: __filename, - argTypes: { - isEarliestNonce: { control: 'boolean' }, - 'transactionGroup.hasCancelled': { control: 'boolean' }, - 'transactionGroup.hasRetried': { control: 'boolean' }, - 'transactionGroup.primaryTransaction.status': { - options: Object.values(TRANSACTION_STATUSES) - .filter((status) => { - return status !== TRANSACTION_STATUSES.SIGNED; - }) - .sort(), - control: { type: 'select' }, - }, - 'transactionGroup.primaryTransaction.submittedTime': { control: 'number' }, - 'transactionGroup.primaryTransaction': { control: 'object' }, - }, - args: { - isEarliestNonce: true, - 'transactionGroup.hasCancelled': false, - 'transactionGroup.hasRetried': false, - 'transactionGroup.primaryTransaction.status': TRANSACTION_STATUSES.PENDING, - 'transactionGroup.primaryTransaction.submittedTime': 19999999999999, - }, -}; - -const Template = (args) => { - const transactionGroup = getMockTransactionGroup(args); - return ( - - ); -}; - -export const ContractInteraction = Template.bind({}); -export const DeployContract = Template.bind({}); -export const EthDecrypt = Template.bind({}); -export const EthGetEncryptionPublicKey = Template.bind({}); -export const Incoming = Template.bind({}); -export const PersonalSign = Template.bind({}); -export const Sign = Template.bind({}); -export const SignTypeData = Template.bind({}); -export const SimpleSend = Template.bind({}); -export const Smart = Template.bind({}); -export const Swap = Template.bind({}); -export const SwapApproval = Template.bind({}); -export const TokenMethodApprove = Template.bind({}); -export const TokenMethodSafeTransferFrom = Template.bind({}); -export const TokenMethodTransfer = Template.bind({}); -export const TokenMethodTransferFrom = Template.bind({}); - -ContractInteraction.storyName = 'contractInteraction'; -ContractInteraction.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.CONTRACT_INTERACTION], - }, -}; - -DeployContract.storyName = 'contractDeployment'; -DeployContract.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.DEPLOY_CONTRACT], - }, -}; - -EthDecrypt.storyName = 'eth_decrypt'; -EthDecrypt.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.ETH_DECRYPT], - }, -}; - -EthGetEncryptionPublicKey.storyName = 'eth_getEncryptionPublicKey'; -EthGetEncryptionPublicKey.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[ - TRANSACTION_TYPES.ETH_GET_ENCRYPTION_PUBLIC_KEY - ], - }, -}; - -Incoming.storyName = 'incoming'; -Incoming.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.INCOMING], - }, -}; - -PersonalSign.storyName = 'personal_sign'; -PersonalSign.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.PERSONAL_SIGN], - }, -}; - -Sign.storyName = 'eth_sign'; -Sign.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SIGN], - }, -}; - -SignTypeData.storyName = 'eth_signTypedData'; -SignTypeData.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SIGN_TYPED_DATA], - }, -}; - -SimpleSend.storyName = 'simpleSend'; -SimpleSend.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SIMPLE_SEND], - }, -}; - -Smart.storyName = 'smart'; -Smart.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SMART], - }, -}; - -Swap.storyName = 'swap'; -Swap.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SWAP], - }, -}; - -SwapApproval.storyName = 'swapApproval'; -SwapApproval.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.SWAP_APPROVAL], - }, -}; - -TokenMethodApprove.storyName = 'approve'; -TokenMethodApprove.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.TOKEN_METHOD_APPROVE], - }, -}; - -TokenMethodSafeTransferFrom.storyName = 'safetransferfrom'; -TokenMethodSafeTransferFrom.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[ - TRANSACTION_TYPES.TOKEN_METHOD_SAFE_TRANSFER_FROM - ], - }, -}; - -TokenMethodTransfer.storyName = 'transfer'; -TokenMethodTransfer.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER], - }, -}; - -TokenMethodTransferFrom.storyName = 'transferfrom'; -TokenMethodTransferFrom.args = { - 'transactionGroup.primaryTransaction': { - ...MOCK_TRANSACTION_BY_TYPE[TRANSACTION_TYPES.TOKEN_METHOD_TRANSFER_FROM], - }, -}; diff --git a/ui/components/app/transaction-status/index.scss b/ui/components/app/transaction-status/index.scss index 6212c0849..55c22472c 100644 --- a/ui/components/app/transaction-status/index.scss +++ b/ui/components/app/transaction-status/index.scss @@ -14,7 +14,7 @@ &--unapproved, &--pending { - color: var(--color-warning-default); + color: var(--color-secondary-default); } &--queued { diff --git a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js index 6dc94607f..c2beced07 100644 --- a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js +++ b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js @@ -67,5 +67,5 @@ UserPreferencedCurrencyDisplay.propTypes = { PropTypes.string, PropTypes.number, ]), - showFiat: PropTypes.bool, + showFiat: PropTypes.boolean, }; diff --git a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js index 6c73d7576..ed2a56fab 100644 --- a/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js +++ b/ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js @@ -4,7 +4,7 @@ import sinon from 'sinon'; import CurrencyDisplay from '../../ui/currency-display'; import * as currencyHook from '../../../hooks/useCurrencyDisplay'; import * as currencyPrefHook from '../../../hooks/useUserPreferencedCurrency'; -import UserPreferencedCurrencyDisplay from '.'; +import UserPreferencedCurrencyDisplay from './user-preferenced-currency-display.component'; describe('UserPreferencedCurrencyDisplay Component', () => { describe('rendering', () => { diff --git a/ui/components/app/wallet-overview/eth-overview.js b/ui/components/app/wallet-overview/eth-overview.js index de3339b3e..cf51d7031 100644 --- a/ui/components/app/wallet-overview/eth-overview.js +++ b/ui/components/app/wallet-overview/eth-overview.js @@ -136,7 +136,7 @@ const EthOverview = ({ className }) => { event: 'Swaps Opened', category: EVENT.CATEGORIES.SWAPS, properties: { - source: EVENT.SOURCE.SWAPS.MAIN_VIEW, + source: 'Main View', active_currency: 'ETH', }, }); diff --git a/ui/components/app/wallet-overview/index.scss b/ui/components/app/wallet-overview/index.scss index 16526b518..e408604d9 100644 --- a/ui/components/app/wallet-overview/index.scss +++ b/ui/components/app/wallet-overview/index.scss @@ -67,7 +67,7 @@ &__cached-balance, &__cached-star { - color: var(--color-warning-default); + color: var(--color-secondary-default); } &__cached-secondary-balance { diff --git a/ui/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js index 23d8997d8..68299d1ca 100644 --- a/ui/components/app/wallet-overview/token-overview.js +++ b/ui/components/app/wallet-overview/token-overview.js @@ -120,7 +120,7 @@ const TokenOverview = ({ className, token }) => { event: 'Swaps Opened', category: EVENT.CATEGORIES.SWAPS, properties: { - source: EVENT.SOURCE.SWAPS.TOKEN_VIEW, + source: 'Token View', active_currency: token.symbol, }, }); diff --git a/ui/components/ui/dropdown/dropdown.scss b/ui/components/ui/dropdown/dropdown.scss index 11d50976b..7311bbac0 100644 --- a/ui/components/ui/dropdown/dropdown.scss +++ b/ui/components/ui/dropdown/dropdown.scss @@ -1,7 +1,6 @@ .dropdown { position: relative; display: inline-block; - height: 36px; &__select { appearance: none; diff --git a/ui/components/ui/form-field/form-field.stories.js b/ui/components/ui/form-field/form-field.stories.js index 230ea0036..0c7d0c36f 100644 --- a/ui/components/ui/form-field/form-field.stories.js +++ b/ui/components/ui/form-field/form-field.stories.js @@ -57,7 +57,7 @@ export const FormFieldWithTitleDetail = (args) => { -