diff --git a/.circleci/config.yml b/.circleci/config.yml index 83ccb67ee..6648b608d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,6 +52,9 @@ workflows: - test-lint-lockfile: requires: - prep-deps + - test-lint-changelog: + requires: + - prep-deps - test-e2e-chrome: requires: - prep-build-test @@ -83,6 +86,7 @@ workflows: - test-lint - test-lint-shellcheck - test-lint-lockfile + - test-lint-changelog - test-unit - test-unit-global - validate-source-maps @@ -282,6 +286,33 @@ jobs: name: lockfile-lint command: yarn lint:lockfile + test-lint-changelog: + executor: node-browsers + steps: + - checkout + - attach_workspace: + at: . + - when: + condition: + not: + matches: + pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/ + value: << pipeline.git.branch >> + steps: + - run: + name: Validate changelog + command: yarn auto-changelog validate + - when: + condition: + matches: + pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/ + value: << pipeline.git.branch >> + steps: + - run: + name: Validate release candidate changelog + command: yarn auto-changelog validate --rc + + test-deps: executor: node-browsers steps: @@ -474,7 +505,7 @@ jobs: at: . - run: name: sentry sourcemaps upload - command: yarn sentry:publish + command: SENTRY_ORG=metamask SENTRY_PROJECT=metamask yarn sentry:publish - run: name: Create GitHub release command: | @@ -485,7 +516,7 @@ jobs: steps: - add_ssh_keys: fingerprints: - - "5e:a3:2d:35:b6:25:b5:87:b1:41:11:0d:77:50:96:73" + - "3d:49:29:f4:b2:e8:ea:af:d1:32:eb:2a:fc:15:85:d8" - checkout - attach_workspace: at: . diff --git a/.circleci/scripts/release-bump-manifest-version.sh b/.circleci/scripts/release-bump-manifest-version.sh index 776a33a63..e00382504 100755 --- a/.circleci/scripts/release-bump-manifest-version.sh +++ b/.circleci/scripts/release-bump-manifest-version.sh @@ -19,9 +19,7 @@ fi printf '%s\n' 'Updating the manifest version if needed' version="${CIRCLE_BRANCH/Version-v/}" -updated_manifest="$(jq ".version = \"$version\"" app/manifest/_base.json)" -printf '%s\n' "$updated_manifest" > app/manifest/_base.json -yarn prettier --write app/manifest/_base.json +yarn version --no-git-tag-version --new-version "${version}" if [[ -z $(git status --porcelain) ]] then diff --git a/.circleci/scripts/release-commit-version-bump.sh b/.circleci/scripts/release-commit-version-bump.sh index 6ceb67fb9..554350646 100755 --- a/.circleci/scripts/release-commit-version-bump.sh +++ b/.circleci/scripts/release-commit-version-bump.sh @@ -16,9 +16,19 @@ then exit 1 fi +if [[ -z "${GITHUB_TOKEN:-}" ]] +then + printf '%s\n' 'GITHUB_TOKEN environment variable must be set' + exit 1 +elif [[ -z "${GITHUB_TOKEN_USER:-}" ]] +then + printf '%s\n' 'GITHUB_TOKEN_USER environment variable must be set' + exit 1 +fi + printf '%s\n' 'Commit the manifest version and changelog if the manifest has changed' -if git diff --quiet app/manifest/_base.json; +if git diff --quiet package.json; then printf '%s\n' 'No manifest changes to commit' exit 0 @@ -28,7 +38,7 @@ git \ -c user.name='MetaMask Bot' \ -c user.email='metamaskbot@users.noreply.github.com' \ commit --message "${CIRCLE_BRANCH/-/ }" \ - CHANGELOG.md app/manifest/_base.json + CHANGELOG.md package.json repo_slug="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" git push "https://$GITHUB_TOKEN_USER:$GITHUB_TOKEN@github.com/$repo_slug" "$CIRCLE_BRANCH" diff --git a/.circleci/scripts/release-create-release-pr.sh b/.circleci/scripts/release-create-release-pr.sh index a1d05c777..9aa5d39bd 100755 --- a/.circleci/scripts/release-create-release-pr.sh +++ b/.circleci/scripts/release-create-release-pr.sh @@ -16,12 +16,6 @@ then exit 1 fi -if [[ -z "${GITHUB_TOKEN:-}" ]] -then - printf '%s\n' 'GITHUB_TOKEN environment variable must be set' - exit 1 -fi - function install_github_cli () { printf '%s\n' 'Installing hub CLI' diff --git a/.eslintrc.js b/.eslintrc.js index 8b9f27b12..fa67adaaf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -108,7 +108,7 @@ module.exports = { }, { files: ['**/*.test.js'], - excludedFiles: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'], + excludedFiles: ['ui/**/*.test.js', 'ui/__mocks__/*.js'], extends: ['@metamask/eslint-config-mocha'], rules: { 'mocha/no-setup-in-describe': 'off', @@ -125,7 +125,7 @@ module.exports = { }, }, { - files: ['ui/**/*.test.js', 'ui/app/__mocks__/*.js'], + files: ['ui/**/*.test.js', 'ui/__mocks__/*.js'], extends: ['@metamask/eslint-config-jest'], rules: { 'jest/no-restricted-matchers': 'off', diff --git a/.gitignore b/.gitignore index 6333a39a1..21c882a97 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ test-builds build-artifacts #ignore css output and sourcemaps -ui/app/css/output/ +ui/css/output/ notes.txt diff --git a/.storybook/i18n.js b/.storybook/i18n.js index 9eadca331..314ea544e 100644 --- a/.storybook/i18n.js +++ b/.storybook/i18n.js @@ -1,12 +1,12 @@ import React, { Component, createContext, useMemo } from 'react'; import PropTypes from 'prop-types'; -import { getMessage } from '../ui/app/helpers/utils/i18n-helper'; -import { I18nContext } from '../ui/app/contexts/i18n'; +import { getMessage } from '../ui/helpers/utils/i18n-helper'; +import { I18nContext } from '../ui/contexts/i18n'; -export { I18nContext } +export { I18nContext }; export const I18nProvider = (props) => { - const { currentLocale, current, en } = props + const { currentLocale, current, en } = props; const t = useMemo(() => { return (key, ...args) => diff --git a/.storybook/initial-states/approval-screens/token-approval.js b/.storybook/initial-states/approval-screens/token-approval.js new file mode 100644 index 000000000..f03990ea5 --- /dev/null +++ b/.storybook/initial-states/approval-screens/token-approval.js @@ -0,0 +1,56 @@ +export const currentNetworkTxListSample = { + "id": 7900715443136469, + "time": 1621395091737, + "status": "unapproved", + "metamaskNetworkId": "1337", + "chainId": "0x539", + "loadingDefaults": false, + "txParams": { + "from": "0x90f79bf6eb2c4f870365e785982e1f101e93b906", + "to": "0x057ef64e23666f000b34ae31332854acbd1c8544", + "value": "0x0", + "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", + "gas": "0xea60", + "gasPrice": "0x4a817c800" + }, + "origin": "https://metamask.github.io", + "type": "approve", + "history": [ + { + "id": 7900715443136469, + "time": 1621395091737, + "status": "unapproved", + "metamaskNetworkId": "1337", + "chainId": "0x539", + "loadingDefaults": true, + "txParams": { + "from": "0x90f79bf6eb2c4f870365e785982e1f101e93b906", + "to": "0x057ef64e23666f000b34ae31332854acbd1c8544", + "value": "0x0", + "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", + "gas": "0xea60", + "gasPrice": "0x4a817c800" + }, + "origin": "https://metamask.github.io", + "type": "approve" + }, + [ + { + "op": "replace", + "path": "/loadingDefaults", + "value": false, + "note": "Added new unapproved transaction.", + "timestamp": 1621395091742 + } + ] + ] +} + +export const domainMetadata = { + "https://metamask.github.io": { + "name": "E2E Test Dapp", + "icon": "https://metamask.github.io/test-dapp/metamask-fox.svg", + "lastUpdated": 1620723443380, + "host": "metamask.github.io" + } +} \ No newline at end of file diff --git a/.storybook/main.js b/.storybook/main.js index 2e708e264..310bce17d 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,9 +1,9 @@ -const path = require('path') +const path = require('path'); -const CopyWebpackPlugin = require('copy-webpack-plugin') +const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { - stories: ['../ui/app/**/*.stories.js'], + stories: ['../ui/**/*.stories.js'], addons: [ '@storybook/addon-knobs', '@storybook/addon-actions', @@ -12,7 +12,7 @@ module.exports = { './i18n-party-addon/register.js', ], webpackFinal: async (config) => { - config.module.strictExportPresence = true + config.module.strictExportPresence = true; config.module.rules.push({ test: /\.scss$/, loaders: [ @@ -31,12 +31,12 @@ module.exports = { sourceMap: true, implementation: require('sass'), sassOptions: { - includePaths: ['ui/app/css/'], + includePaths: ['ui/css/'], }, }, }, ], - }) + }); config.plugins.push( new CopyWebpackPlugin({ patterns: [ @@ -51,7 +51,7 @@ module.exports = { }, ], }), - ) - return config + ); + return config; }, -} +}; diff --git a/.storybook/metametrics.js b/.storybook/metametrics.js new file mode 100644 index 000000000..387b0d467 --- /dev/null +++ b/.storybook/metametrics.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { + MetaMetricsProvider, + LegacyMetaMetricsProvider, +} from '../ui/contexts/metametrics'; +import { + MetaMetricsProvider as NewMetaMetricsProvider, + LegacyMetaMetricsProvider as NewLegacyMetaMetricsProvider, +} from '../ui/contexts/metametrics.new'; + +const MetaMetricsProviderStorybook = (props) => + ( + + + + + {props.children} + + + + + ); + +export default MetaMetricsProviderStorybook \ No newline at end of file diff --git a/.storybook/preview.js b/.storybook/preview.js index 112c8f16e..525401408 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,14 +1,18 @@ import React, { useEffect } from 'react'; import { addDecorator, addParameters } from '@storybook/react'; -import { useGlobals } from '@storybook/api'; +import { action } from '@storybook/addon-actions'; import { withKnobs } from '@storybook/addon-knobs'; import { Provider } from 'react-redux'; -import configureStore from '../ui/app/store/store'; -import '../ui/app/css/index.scss'; +import configureStore from '../ui/store/store'; +import '../ui/css/index.scss'; import localeList from '../app/_locales/index.json'; import * as allLocales from './locales'; import { I18nProvider, LegacyI18nProvider } from './i18n'; -import testData from './test-data.js' +import MetaMetricsProviderStorybook from './metametrics' +import testData from './test-data.js'; +import { Router } from "react-router-dom"; +import { createBrowserHistory } from "history"; +import { _setBackgroundConnection } from '../ui/store/actions' addParameters({ backgrounds: { @@ -41,22 +45,36 @@ const styles = { alignItems: 'center', }; -const store = configureStore(testData) +export const store = configureStore(testData); +const history = createBrowserHistory(); +const proxiedBackground = new Proxy({}, { + get(_, method) { + return function() { + action(`Background call: ${method}`)() + return new Promise(() => {}) + } + } + }) +_setBackgroundConnection(proxiedBackground) const metamaskDecorator = (story, context) => { const currentLocale = context.globals.locale; const current = allLocales[currentLocale]; return ( - - -
{story()}
-
-
+ + + + +
{story()}
+
+
+
+
); }; diff --git a/.storybook/test-data.js b/.storybook/test-data.js index ef9e15e64..32c24690f 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -1,217 +1,782 @@ import { TRANSACTION_STATUSES } from '../shared/constants/transaction'; const state = { - metamask: { - isInitialized: true, - isUnlocked: true, - featureFlags: { sendHexData: true }, - identities: { - '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825': { - address: '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825', - name: 'Send Account 1', - }, - '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb': { - address: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb', - name: 'Send Account 2', - }, - '0x2f8d4a878cfa04a6e60d46362f5644deab66572d': { - address: '0x2f8d4a878cfa04a6e60d46362f5644deab66572d', - name: 'Send Account 3', - }, - '0xd85a4b6a394794842887b8284293d69163007bbb': { - address: '0xd85a4b6a394794842887b8284293d69163007bbb', - name: 'Send Account 4', - }, - }, - cachedBalances: {}, - currentBlockGasLimit: '0x4c1878', - currentCurrency: 'USD', - conversionRate: 1200.88200327, - conversionDate: 1489013762, - nativeCurrency: 'ETH', - frequentRpcList: [], - network: '3', - provider: { - type: 'ropsten', - chainId: '0x3', - }, - accounts: { - '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825': { - code: '0x', - balance: '0x47c9d71831c76efe', - nonce: '0x1b', - address: '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825', - }, - '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb': { - code: '0x', - balance: '0x37452b1315889f80', - nonce: '0xa', - address: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb', - }, - '0x2f8d4a878cfa04a6e60d46362f5644deab66572d': { - code: '0x', - balance: '0x30c9d71831c76efe', - nonce: '0x1c', - address: '0x2f8d4a878cfa04a6e60d46362f5644deab66572d', - }, - '0xd85a4b6a394794842887b8284293d69163007bbb': { - code: '0x', - balance: '0x0', - nonce: '0x0', - address: '0xd85a4b6a394794842887b8284293d69163007bbb', - }, - }, - addressBook: { - '0x3': { - '0x06195827297c7a80a443b6894d3bdb8824b43896': { - address: '0x06195827297c7a80a443b6894d3bdb8824b43896', - name: 'Address Book Account 1', - chainId: '0x3', - }, - }, - }, - tokens: [ - { - address: '0x1a195821297c7a80a433b6894d3bdb8824b43896', - decimals: 18, - symbol: 'ABC', + "invalidCustomNetwork": { + "state": "CLOSED", + "networkName": "" + }, + "unconnectedAccount": { + "state": "CLOSED" + }, + "activeTab": {}, + "metamask": { + "isInitialized": true, + "isUnlocked": true, + "isAccountMenuOpen": false, + "rpcUrl": "https://rawtestrpc.metamask.io/", + "identities": { + "0x983211ce699ea5ab57cc528086154b6db1ad8e55": { + "name": "Account 1", + "address": "0x983211ce699ea5ab57cc528086154b6db1ad8e55" }, - { - address: '0x8d6b81208414189a58339873ab429b6c47ab92d3', - decimals: 4, - symbol: 'DEF', + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": { + "name": "Account 2", + "address": "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e" }, + "0x9d0ba4ddac06032527b140912ec808ab9451b788": { + "name": "Account 3", + "address": "0x9d0ba4ddac06032527b140912ec808ab9451b788" + } + }, + "unapprovedTxs": { + "7786962153682822": { + "id": 7786962153682822, + "time": 1620710815484, + "status": "unapproved", + "metamaskNetworkId": "3", + "chainId": "0x3", + "loadingDefaults": false, + "txParams": { + "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "value": "0x0", + "data": "0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000", + "gas": "0xcb28", + "gasPrice": "0x77359400" + }, + "type": "standard", + "origin": "metamask", + "transactionCategory": "transfer", + "history": [ + { + "id": 7786962153682822, + "time": 1620710815484, + "status": "unapproved", + "metamaskNetworkId": "3", + "chainId": "0x3", + "loadingDefaults": true, + "txParams": { + "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "value": "0x0", + "data": "0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000", + "gas": "0xcb28", + "gasPrice": "0x77359400" + }, + "type": "standard", + "origin": "metamask", + "transactionCategory": "transfer" + }, + [ + { + "op": "replace", + "path": "/loadingDefaults", + "value": false, + "note": "Added new unapproved transaction.", + "timestamp": 1620710815497 + } + ] + ] + } + }, + "frequentRpcList": [], + "addressBook": { + "undefined": { + "0": { + "address": "0x39a4e4Af7cCB654dB9500F258c64781c8FbD39F0", + "name": "", + "isEns": false + } + } + }, + "contractExchangeRates": { + "0xad6d458402f60fd3bd25163575031acdce07538d": 0 + }, + "tokens": [ { - address: '0xa42084c8d1d9a2198631988579bb36b48433a72b', - decimals: 18, - symbol: 'GHI', + "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "symbol": "DAI", + "decimals": 18 + } + ], + "pendingTokens": {}, + "customNonceValue": "", + "send": { + "gasLimit": "0xcb28", + "gasPrice": null, + "gasTotal": null, + "tokenBalance": "8.7a73149c048545a3fe58", + "from": "", + "to": "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e", + "amount": "3782dace9d900000", + "memo": "", + "errors": {}, + "maxModeOn": false, + "editingTransactionId": null, + "toNickname": "Account 2", + "ensResolution": null, + "ensResolutionError": "", + "token": { + "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "symbol": "DAI", + "decimals": 18 + } + }, + "useBlockie": false, + "featureFlags": {}, + "welcomeScreenSeen": false, + "currentLocale": "en", + "preferences": { + "useNativeCurrencyAsPrimaryCurrency": true + }, + "firstTimeFlowType": "create", + "completedOnboarding": true, + "knownMethodData": { + "0x60806040": { + "name": "Approve Tokens" + }, + "0x095ea7b3": { + "name": "Approve Tokens" + } + }, + "participateInMetaMetrics": true, + "metaMetricsSendCount": 2, + "nextNonce": 71, + "connectedStatusPopoverHasBeenShown": true, + "swapsWelcomeMessageHasBeenShown": true, + "defaultHomeActiveTabName": "Assets", + "provider": { + "type": "ropsten", + "ticker": "ETH", + "nickname": "", + "rpcUrl": "", + "chainId": "0x3" + }, + "previousProviderStore": { + "type": "ropsten", + "ticker": "ETH", + "nickname": "", + "rpcUrl": "", + "chainId": "0x3" + }, + "network": "3", + "accounts": { + "0x983211ce699ea5ab57cc528086154b6db1ad8e55": { + "address": "0x983211ce699ea5ab57cc528086154b6db1ad8e55", + "balance": "0x176e5b6f173ebe66" + }, + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": { + "address": "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e", + "balance": "0x2d3142f5000" + }, + "0x9d0ba4ddac06032527b140912ec808ab9451b788": { + "address": "0x9d0ba4ddac06032527b140912ec808ab9451b788", + "balance": "0x15f6f0b9d4f8d000" + } + }, + "currentBlockGasLimit": "0x793af4", + "currentNetworkTxList": [ + + ], + "cachedBalances": { + "1": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": "0x0", + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": "0xcaf5317161f400", + "0x9d0ba4ddac06032527b140912ec808ab9451b788": "0x0" + }, + "3": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": "0x18d289d450bace66", + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": "0x2d3142f5000", + "0x9d0ba4ddac06032527b140912ec808ab9451b788": "0x15f6f0b9d4f8d000" }, + "0x3": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": "0x176e5b6f173ebe66", + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": "0x2d3142f5000", + "0x9d0ba4ddac06032527b140912ec808ab9451b788": "0x15f6f0b9d4f8d000" + } + }, + "unapprovedMsgs": {}, + "unapprovedMsgCount": 0, + "unapprovedPersonalMsgs": {}, + "unapprovedPersonalMsgCount": 0, + "unapprovedDecryptMsgs": {}, + "unapprovedDecryptMsgCount": 0, + "unapprovedEncryptionPublicKeyMsgs": {}, + "unapprovedEncryptionPublicKeyMsgCount": 0, + "unapprovedTypedMessages": {}, + "unapprovedTypedMessagesCount": 0, + "keyringTypes": [ + "Simple Key Pair", + "HD Key Tree", + "Trezor Hardware", + "Ledger Hardware" ], - transactions: {}, - currentNetworkTxList: [ + "keyrings": [ { - id: 'mockTokenTx1', - txParams: { - to: '0x8d6b81208414189a58339873ab429b6c47ab92d3', - from: '0xd85a4b6a394794842887b8284293d69163007bbb', + "type": "HD Key Tree", + "accounts": [ + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e", + "0x9d0ba4ddac06032527b140912ec808ab9451b788" + ] + } + ], + "frequentRpcListDetail": [ + { + "rpcUrl": "http://localhost:8545", + "chainId": "0x539", + "ticker": "ETH", + "nickname": "Localhost 8545", + "rpcPrefs": {} + } + ], + "accountTokens": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": { + "0x1": [ + { + "address": "0x6b175474e89094c44da98b954eedeac495271d0f", + "symbol": "DAI", + "decimals": 18 + }, + { + "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef", + "symbol": "BAT", + "decimals": 18 + } + ], + "0x3": [ + { + "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "symbol": "DAI", + "decimals": 18 + } + ] + }, + "0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e": {}, + "0x9d0ba4ddac06032527b140912ec808ab9451b788": {} + }, + "accountHiddenTokens": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": { + "0x3": [] + } + }, + "assetImages": { + "0xad6d458402f60fd3bd25163575031acdce07538d": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xaD6D458402F60fD3Bd25163575031ACDce07538D/logo.png" + }, + "hiddenTokens": [], + "suggestedTokens": {}, + "useNonceField": false, + "usePhishDetect": true, + "lostIdentities": {}, + "forgottenPassword": false, + "ipfsGateway": "dweb.link", + "infuraBlocked": false, + "migratedPrivacyMode": false, + "selectedAddress": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "metaMetricsId": "0xc2377d11fec1c3b7dd88c4854240ee5e3ed0d9f63b00456d98d80320337b827f", + "conversionDate": 1620710825.03, + "conversionRate": 3910.28, + "currentCurrency": "usd", + "nativeCurrency": "ETH", + "usdConversionRate": 3910.28, + "ticker": "ETH", + "alertEnabledness": { + "unconnectedAccount": true, + "web3ShimUsage": true + }, + "unconnectedAccountAlertShownOrigins": {}, + "web3ShimUsageOrigins": {}, + "seedPhraseBackedUp": null, + "onboardingTabs": {}, + "incomingTransactions": { + "0x2de9256a7c604586f7ecfd87ae9509851e217f588f9f85feed793c54ed2ce0aa": { + "blockNumber": "8888976", + "id": 4678200543090532, + "metamaskNetworkId": "1", + "status": "confirmed", + "time": 1573114896000, + "txParams": { + "from": "0x3f1b52850109023775d238c7ed5d5e7161041fd1", + "gas": "0x5208", + "gasPrice": "0x124101100", + "nonce": "0x35", + "to": "0x045c619e4d29bba3b92769508831b681b83d6a96", + "value": "0xbca9bce4d98ca3" }, - time: 1700000000000, + "hash": "0x2de9256a7c604586f7ecfd87ae9509851e217f588f9f85feed793c54ed2ce0aa", + "transactionCategory": "incoming" }, + "0x320a1fd769373578f78570e5d8f56e89bc7bce9657bb5f4c12d8fe790d471bfd": { + "blockNumber": "9453174", + "id": 4678200543090535, + "metamaskNetworkId": "1", + "status": "confirmed", + "time": 1581312411000, + "txParams": { + "from": "0xa17bd07d6d38cb9e37b29f7659a4b1047701e969", + "gas": "0xc350", + "gasPrice": "0x1a13b8600", + "nonce": "0x0", + "to": "0x045c619e4d29bba3b92769508831b681b83d6a96", + "value": "0xcdb08ab4254000" + }, + "hash": "0x320a1fd769373578f78570e5d8f56e89bc7bce9657bb5f4c12d8fe790d471bfd", + "transactionCategory": "incoming" + }, + "0x8add6c1ea089a8de9b15fa2056b1875360f17916755c88ace9e5092b7a4b1239": { + "blockNumber": "10892417", + "id": 4678200543090542, + "metamaskNetworkId": "1", + "status": "confirmed", + "time": 1600515224000, + "txParams": { + "from": "0x0681d8db095565fe8a346fa0277bffde9c0edbbf", + "gas": "0x5208", + "gasPrice": "0x1d1a94a200", + "nonce": "0x2bb8a5", + "to": "0x045c619e4d29bba3b92769508831b681b83d6a96", + "value": "0xe6ed27d6668000" + }, + "hash": "0x8add6c1ea089a8de9b15fa2056b1875360f17916755c88ace9e5092b7a4b1239", + "transactionCategory": "incoming" + }, + "0x50be62ab1cabd03ff104c602c11fdef7a50f3d73c55006d5583ba97950ab1144": { + "blockNumber": "10902987", + "id": 4678200543090545, + "metamaskNetworkId": "1", + "status": "confirmed", + "time": 1600654021000, + "txParams": { + "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "gas": "0x5208", + "gasPrice": "0x147d357000", + "nonce": "0xf", + "to": "0x045c619e4d29bba3b92769508831b681b83d6a96", + "value": "0x63eb89da4ed00000" + }, + "hash": "0x50be62ab1cabd03ff104c602c11fdef7a50f3d73c55006d5583ba97950ab1144", + "transactionCategory": "incoming" + } + }, + "incomingTxLastFetchedBlocksByNetwork": { + "ropsten": 8872820, + "rinkeby": null, + "kovan": null, + "goerli": null, + "mainnet": 10902989 + }, + "permissionsRequests": [], + "permissionsDescriptions": {}, + "domains": { + "https://app.uniswap.org": { + "permissions": [ + { + "@context": [ + "https://github.com/MetaMask/rpc-cap" + ], + "invoker": "https://app.uniswap.org", + "parentCapability": "eth_accounts", + "id": "a7342e4b-beae-4525-a36c-c0635fd03359", + "date": 1620710693178, + "caveats": [ + { + "type": "limitResponseLength", + "value": 1, + "name": "primaryAccountOnly" + }, + { + "type": "filterResponse", + "value": [ + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4" + ], + "name": "exposedAccounts" + } + ] + } + ] + } + }, + "permissionsLog": [ { - id: 'mockTokenTx2', - txParams: { - to: '0xafaketokenaddress', - from: '0xd85a4b6a394794842887b8284293d69163007bbb', + "id": 522690215, + "method": "eth_accounts", + "methodType": "restricted", + "origin": "https://metamask.io", + "request": { + "method": "eth_accounts", + "params": [], + "jsonrpc": "2.0", + "id": 522690215, + "origin": "https://metamask.io", + "tabId": 5 }, - time: 1600000000000, + "requestTime": 1602643170686, + "response": { + "id": 522690215, + "jsonrpc": "2.0", + "result": [] + }, + "responseTime": 1602643170688, + "success": true }, { - id: 'mockTokenTx3', - txParams: { - to: '0x8d6b81208414189a58339873ab429b6c47ab92d3', - from: '0xd85a4b6a394794842887b8284293d69163007bbb', + "id": 1620464600, + "method": "eth_accounts", + "methodType": "restricted", + "origin": "https://widget.getacute.io", + "request": { + "method": "eth_accounts", + "params": [], + "jsonrpc": "2.0", + "id": 1620464600, + "origin": "https://widget.getacute.io", + "tabId": 5 + }, + "requestTime": 1602643172935, + "response": { + "id": 1620464600, + "jsonrpc": "2.0", + "result": [] }, - time: 1500000000000, + "responseTime": 1602643172935, + "success": true }, { - id: 'mockEthTx1', - txParams: { - to: '0xd85a4b6a394794842887b8284293d69163007bbb', - from: '0xd85a4b6a394794842887b8284293d69163007bbb', + "id": 4279100021, + "method": "eth_accounts", + "methodType": "restricted", + "origin": "https://app.uniswap.org", + "request": { + "method": "eth_accounts", + "jsonrpc": "2.0", + "id": 4279100021, + "origin": "https://app.uniswap.org", + "tabId": 5 }, - time: 1400000000000, + "requestTime": 1620710669962, + "response": { + "id": 4279100021, + "jsonrpc": "2.0", + "result": [] + }, + "responseTime": 1620710669963, + "success": true }, - ], - unapprovedMsgs: { - '0xabc': { id: 'unapprovedMessage1', time: 1650000000000 }, - '0xdef': { id: 'unapprovedMessage2', time: 1550000000000 }, - '0xghi': { id: 'unapprovedMessage3', time: 1450000000000 }, - }, - unapprovedMsgCount: 0, - unapprovedPersonalMsgs: {}, - unapprovedPersonalMsgCount: 0, - unapprovedDecryptMsgs: {}, - unapprovedDecryptMsgCount: 0, - unapprovedEncryptionPublicKeyMsgs: {}, - unapprovedEncryptionPublicKeyMsgCount: 0, - keyringTypes: ['Simple Key Pair', 'HD Key Tree'], - keyrings: [ { - type: 'HD Key Tree', - accounts: [ - 'fdea65c8e26263f6d9a1b5de9555d2931a33b825', - 'c5b8dbac4c1d3f152cdeb400e2313f309c410acb', - '2f8d4a878cfa04a6e60d46362f5644deab66572d', - ], + "id": 4279100022, + "method": "eth_requestAccounts", + "methodType": "restricted", + "origin": "https://app.uniswap.org", + "request": { + "method": "eth_requestAccounts", + "jsonrpc": "2.0", + "id": 4279100022, + "origin": "https://app.uniswap.org", + "tabId": 5 + }, + "requestTime": 1620710686872, + "response": { + "id": 4279100022, + "jsonrpc": "2.0", + "result": [ + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4" + ] + }, + "responseTime": 1620710693187, + "success": true }, { - type: 'Simple Key Pair', - accounts: ['0xd85a4b6a394794842887b8284293d69163007bbb'], + "id": 4279100023, + "method": "eth_requestAccounts", + "methodType": "restricted", + "origin": "https://app.uniswap.org", + "request": { + "method": "eth_requestAccounts", + "jsonrpc": "2.0", + "id": 4279100023, + "origin": "https://app.uniswap.org", + "tabId": 5 + }, + "requestTime": 1620710693204, + "response": { + "id": 4279100023, + "jsonrpc": "2.0", + "result": [ + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4" + ] + }, + "responseTime": 1620710693213, + "success": true }, + { + "id": 4279100034, + "method": "eth_accounts", + "methodType": "restricted", + "origin": "https://app.uniswap.org", + "request": { + "method": "eth_accounts", + "params": [], + "jsonrpc": "2.0", + "id": 4279100034, + "origin": "https://app.uniswap.org", + "tabId": 5 + }, + "requestTime": 1620710712072, + "response": { + "id": 4279100034, + "jsonrpc": "2.0", + "result": [ + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4" + ] + }, + "responseTime": 1620710712075, + "success": true + } ], - selectedAddress: '0xd85a4b6a394794842887b8284293d69163007bbb', - send: { - gasLimit: '0xFFFF', - gasPrice: '0xaa', - gasTotal: '0xb451dc41b578', - tokenBalance: 3434, - from: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb', - to: '0x987fedabc', - amount: '0x080', - memo: '', - errors: { - someError: null, - }, - maxModeOn: false, - editingTransactionId: 97531, - }, - unapprovedTxs: { - 4768706228115573: { - id: 4768706228115573, - time: 1487363153561, - status: TRANSACTION_STATUSES.UNAPPROVED, - gasMultiplier: 1, - metamaskNetworkId: '3', - txParams: { - from: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb', - to: '0x18a3462427bcc9133bb46e88bcbe39cd7ef0e761', - value: '0xde0b6b3a7640000', - metamaskId: 4768706228115573, - metamaskNetworkId: '3', - gas: '0x5209', - }, - txFee: '17e0186e60800', - txValue: 'de0b6b3a7640000', - maxCost: 'de234b52e4a0800', - gasPrice: '4a817c800', - }, - }, - currentLocale: 'en', + "permissionsHistory": { + "https://app.uniswap.org": { + "eth_accounts": { + "lastApproved": 1620710693213, + "accounts": { + "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4": 1620710693213 + } + } + } + }, + "domainMetadata": { + "https://metamask.github.io": { + "name": "E2E Test Dapp", + "icon": "https://metamask.github.io/test-dapp/metamask-fox.svg", + "lastUpdated": 1620723443380, + "host": "metamask.github.io" + } + }, + "threeBoxSyncingAllowed": false, + "showRestorePrompt": true, + "threeBoxLastUpdated": 0, + "threeBoxAddress": null, + "threeBoxSynced": false, + "threeBoxDisabled": false, + "swapsState": { + "quotes": {}, + "fetchParams": null, + "tokens": null, + "tradeTxId": null, + "approveTxId": null, + "quotesLastFetched": null, + "customMaxGas": "", + "customGasPrice": null, + "selectedAggId": null, + "customApproveTxData": "", + "errorKey": "", + "topAggId": null, + "routeState": "", + "swapsFeatureIsLive": false, + "swapsQuoteRefreshTime": 60000 + }, + "ensResolutionsByAddress": {}, + "pendingApprovals": {}, + "pendingApprovalCount": 0 }, - appState: { - menuOpen: false, - currentView: { - name: 'accountDetail', - detailView: null, - context: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - }, - accountDetail: { - subview: 'transactions', - }, - modal: { - modalState: {}, - previousModalState: {}, - }, - isLoading: false, - warning: null, - scrollToBottom: false, - forgottenPassword: null, + "appState": { + "shouldClose": false, + "menuOpen": false, + "modal": { + "open": false, + "modalState": { + "name": null, + "props": {} + }, + "previousModalState": { + "name": null + } + }, + "sidebar": { + "isOpen": false, + "transitionName": "", + "type": "", + "props": {} + }, + "alertOpen": false, + "alertMessage": null, + "qrCodeData": null, + "networkDropdownOpen": false, + "accountDetail": { + "subview": "transactions" + }, + "isLoading": false, + "warning": null, + "buyView": {}, + "isMouseUser": true, + "gasIsLoading": false, + "defaultHdPaths": { + "trezor": "m/44'/60'/0'/0", + "ledger": "m/44'/60'/0'/0/0" + }, + "networksTabSelectedRpcUrl": "", + "networksTabIsInAddMode": false, + "loadingMethodData": false, + "show3BoxModalAfterImport": false, + "threeBoxLastUpdated": null, + "requestAccountTabs": {}, + "openMetaMaskTabs": {}, + "currentWindowTab": {} }, - send: { - fromDropdownOpen: false, - toDropdownOpen: false, - errors: { someError: null }, + "history": { + "mostRecentOverviewPage": "/" }, -}; + "send": { + "toDropdownOpen": false, + "gasButtonGroupShown": true, + "errors": {} + }, + "confirmTransaction": { + "txData": { + "id": 3111025347726181, + "time": 1620723786838, + "status": "unapproved", + "metamaskNetworkId": "3", + "chainId": "0x3", + "loadingDefaults": false, + "txParams": { + "from": "0x983211ce699ea5ab57cc528086154b6db1ad8e55", + "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "value": "0x0", + "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", + "gas": "0xea60", + "gasPrice": "0x4a817c800" + }, + "type": "standard", + "origin": "https://metamask.github.io", + "transactionCategory": "approve", + "history": [ + { + "id": 3111025347726181, + "time": 1620723786838, + "status": "unapproved", + "metamaskNetworkId": "3", + "chainId": "0x3", + "loadingDefaults": true, + "txParams": { + "from": "0x983211ce699ea5ab57cc528086154b6db1ad8e55", + "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "value": "0x0", + "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", + "gas": "0xea60", + "gasPrice": "0x4a817c800" + }, + "type": "standard", + "origin": "https://metamask.github.io", + "transactionCategory": "approve" + }, + [ + { + "op": "replace", + "path": "/loadingDefaults", + "value": false, + "note": "Added new unapproved transaction.", + "timestamp": 1620723786844 + } + ] + ] + }, + "tokenData": { + "args": [ + "0x9bc5baF874d2DA8D216aE9f137804184EE5AfEF4", + { + "type": "BigNumber", + "hex": "0x011170" + } + ], + "functionFragment": { + "type": "function", + "name": "approve", + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null, + "baseType": "address", + "_isParamType": true + }, + { + "name": "_value", + "type": "uint256", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null, + "baseType": "uint256", + "_isParamType": true + } + ], + "outputs": [ + { + "name": "success", + "type": "bool", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null, + "baseType": "bool", + "_isParamType": true + } + ], + "payable": false, + "stateMutability": "nonpayable", + "gas": null, + "_isFragment": true + }, + "name": "approve", + "signature": "approve(address,uint256)", + "sighash": "0x095ea7b3", + "value": { + "type": "BigNumber", + "hex": "0x00" + } + }, + "fiatTransactionAmount": "0", + "fiatTransactionFee": "4.72", + "fiatTransactionTotal": "4.72", + "ethTransactionAmount": "0", + "ethTransactionFee": "0.0012", + "ethTransactionTotal": "0.0012", + "hexTransactionAmount": "0x0", + "hexTransactionFee": "0x44364c5bb0000", + "hexTransactionTotal": "0x44364c5bb0000", + "nonce": "" + }, + "swaps": { + "aggregatorMetadata": null, + "approveTxId": null, + "balanceError": false, + "fetchingQuotes": false, + "fromToken": null, + "quotesFetchStartTime": null, + "topAssets": {}, + "toToken": null, + "customGas": { + "price": null, + "limit": null, + "loading": "INITIAL", + "priceEstimates": {}, + "fallBackPrice": null + } + }, + "gas": { + "customData": { + "price": null, + "limit": "0xcb28" + }, + "basicEstimates": { + "average": 2 + }, + "basicEstimateIsLoading": false + } +} export default state; diff --git a/CHANGELOG.md b/CHANGELOG.md index f82255c64..5ed8b6704 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,234 +16,235 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [9.5.3] ### Fixed -- [#11103](https://github.com/MetaMask/metamask-extension/pull/11103): Fixes bug that made MetaMask unusable and displayed 'Minified React error #130' on certain networks and accounts -- [#11015](https://github.com/MetaMask/metamask-extension/pull/11015): Prevent big number error when attempting to view transaction list +- Fixes bug that made MetaMask unusable and displayed 'Minified React error #130' on certain networks and accounts ([#11103](https://github.com/MetaMask/metamask-extension/pull/11103)) +- Prevent big number error when attempting to view transaction list ([#11015](https://github.com/MetaMask/metamask-extension/pull/11015)) ## [9.5.2] ### Fixed -- [#11071](https://github.com/MetaMask/metamask-extension/pull/11071): Fixing address entry error when sending a transaction on a custom network +- Fixing address entry error when sending a transaction on a custom network ([#11071](https://github.com/MetaMask/metamask-extension/pull/11071)) ## [9.5.1] ### Fixed -- [#11048](https://github.com/MetaMask/metamask-extension/pull/11048): Fixed icon on approval screen -- [#11036](https://github.com/MetaMask/metamask-extension/pull/11036): Fixed broken app state for some users with Chinese, Portugese or Spanish browser language settings. +- Fixed icon on approval screen ([#11048](https://github.com/MetaMask/metamask-extension/pull/11048)) +- Fixed broken app state for some users with Chinese, Portugese or Spanish browser language settings. ([#11036](https://github.com/MetaMask/metamask-extension/pull/11036)) ## [9.5.0] - 2021-04-28 ### Added -- [#10583](https://github.com/MetaMask/metamask-extension/pull/10583): Adding popup display to show new MetaMask notifications -- [#10938](https://github.com/MetaMask/metamask-extension/pull/10938): Add menu with "View on Etherscan" and "Account details" links to ETH asset page -- [#10932](https://github.com/MetaMask/metamask-extension/pull/10932): Add view account details menu item to token page menu -- [#10895](https://github.com/MetaMask/metamask-extension/pull/10895): Adding new links to contact MetaMask support -- [#10595](https://github.com/MetaMask/metamask-extension/pull/10595): Adding option to set Custom Nonce to Confirm Approve Page -- [#10616](https://github.com/MetaMask/metamask-extension/pull/10616): add trezor HD path for ledger wallets +- Adding popup display to show new MetaMask notifications ([#10583](https://github.com/MetaMask/metamask-extension/pull/10583)) +- Add menu with "View on Etherscan" and "Account details" links to ETH asset page ([#10938](https://github.com/MetaMask/metamask-extension/pull/10938)) +- Add view account details menu item to token page menu ([#10932](https://github.com/MetaMask/metamask-extension/pull/10932)) +- Adding new links to contact MetaMask support ([#10895](https://github.com/MetaMask/metamask-extension/pull/10895)) +- Adding option to set Custom Nonce to Confirm Approve Page ([#10595](https://github.com/MetaMask/metamask-extension/pull/10595)) +- Adding recovery phrase video to onboarding process ([#10717](https://github.com/MetaMask/metamask-extension/pull/10717)) +- add trezor HD path for ledger wallets ([#10616](https://github.com/MetaMask/metamask-extension/pull/10616)) ### Changed -- [#10939](https://github.com/MetaMask/metamask-extension/pull/10939): Use custom token icons in the send flow token dropdown -- [#10680](https://github.com/MetaMask/metamask-extension/pull/10680): Remove "My Wallet Account" section in Settings > Contact -- [#10912](https://github.com/MetaMask/metamask-extension/pull/10912): Harden contract address validation for token swaps -- [#10882](https://github.com/MetaMask/metamask-extension/pull/10882): Show the custom network name in swaps network fee tooltip -- [#10859](https://github.com/MetaMask/metamask-extension/pull/10859): Only check whether the swaps feature is live after entering the feature -- [#10871](https://github.com/MetaMask/metamask-extension/pull/10871): Update swaps metadata every 5 minutes as opposed to an hour -- [#10842](https://github.com/MetaMask/metamask-extension/pull/10842): Increase default slippage from 2% to 3% in swaps and show Advanced Options by default -- [#10593](https://github.com/MetaMask/metamask-extension/pull/10593): Prevent tokens without addresses from being added to token list -- [#10746](https://github.com/MetaMask/metamask-extension/pull/10746): Add New Zealand Dollar to currency options -- [#10670](https://github.com/MetaMask/metamask-extension/pull/10670): Allow 11 characters in symbol for custom RPCs -- [#10702](https://github.com/MetaMask/metamask-extension/pull/10702): Hide the suggested token pane when not on Mainnet or test network -- [#10700](https://github.com/MetaMask/metamask-extension/pull/10700): Prevents autocomplete text from displaying in the Add Token input -- [#10704](https://github.com/MetaMask/metamask-extension/pull/10704): Removing hard references to 12 word seed phrases in copy -- [#10703](https://github.com/MetaMask/metamask-extension/pull/10703): Add MetaMask to list of BIP44 HD path examples -- [#10651](https://github.com/MetaMask/metamask-extension/pull/10651): Change 'Send ETH' title to 'Send' in the send flow -- [#10674](https://github.com/MetaMask/metamask-extension/pull/10674): Don't render faucet row in deposit modal for custom chains +- Use custom token icons in the send flow token dropdown ([#10939](https://github.com/MetaMask/metamask-extension/pull/10939)) +- Remove "My Wallet Account" section in Settings > Contact ([#10680](https://github.com/MetaMask/metamask-extension/pull/10680)) +- Harden contract address validation for token swaps ([#10912](https://github.com/MetaMask/metamask-extension/pull/10912)) +- Show the custom network name in swaps network fee tooltip ([#10882](https://github.com/MetaMask/metamask-extension/pull/10882)) +- Only check whether the swaps feature is live after entering the feature ([#10859](https://github.com/MetaMask/metamask-extension/pull/10859)) +- Update swaps metadata every 5 minutes as opposed to an hour ([#10871](https://github.com/MetaMask/metamask-extension/pull/10871)) +- Increase default slippage from 2% to 3% in swaps and show Advanced Options by default ([#10842](https://github.com/MetaMask/metamask-extension/pull/10842)) +- Prevent tokens without addresses from being added to token list ([#10593](https://github.com/MetaMask/metamask-extension/pull/10593)) +- Add New Zealand Dollar to currency options ([#10746](https://github.com/MetaMask/metamask-extension/pull/10746)) +- Allow 11 characters in symbol for custom RPCs ([#10670](https://github.com/MetaMask/metamask-extension/pull/10670)) +- Hide the suggested token pane when not on Mainnet or test network ([#10702](https://github.com/MetaMask/metamask-extension/pull/10702)) +- Prevents autocomplete text from displaying in the Add Token input ([#10700](https://github.com/MetaMask/metamask-extension/pull/10700)) +- Removing hard references to 12 word seed phrases in copy ([#10704](https://github.com/MetaMask/metamask-extension/pull/10704)) +- Add MetaMask to list of BIP44 HD path examples ([#10703](https://github.com/MetaMask/metamask-extension/pull/10703)) +- Change 'Send ETH' title to 'Send' in the send flow ([#10651](https://github.com/MetaMask/metamask-extension/pull/10651)) +- Don't render faucet row in deposit modal for custom chains ([#10674](https://github.com/MetaMask/metamask-extension/pull/10674)) ### Fixed -- [#10935](https://github.com/MetaMask/metamask-extension/pull/10935): Prevent overflow of hostname on confirmation page -- [#10923](https://github.com/MetaMask/metamask-extension/pull/10923): Fixing ENS input entry in send flow -- [#10723](https://github.com/MetaMask/metamask-extension/pull/10723): Fix mismatchedChain typo in custom network approval screen -- [#10695](https://github.com/MetaMask/metamask-extension/pull/10695): Excluding sourcemaps comment in production builds -- [#10643](https://github.com/MetaMask/metamask-extension/pull/10643): Prevent network dropdown label highlighting -- [#10644](https://github.com/MetaMask/metamask-extension/pull/10644): Ensure swaps detail height doesn't create jump in vertical height -- [#10642](https://github.com/MetaMask/metamask-extension/pull/10642): Position the 3dot menu in the same spot on asset screen and home screen -- [#10594](https://github.com/MetaMask/metamask-extension/pull/10594): Ensure MetaMask works correctly when on a custom network that shares a chain id with a default Infura network -- [#10579](https://github.com/MetaMask/metamask-extension/pull/10579): Fixed bug that prevented speeding up cancelled transactions -- [#10630](https://github.com/MetaMask/metamask-extension/pull/10630): Fixes hidden token bug when zero balance preference is on -- [#10628](https://github.com/MetaMask/metamask-extension/pull/10628): Removing double click bug from delete custom network modal +- Prevent overflow of hostname on confirmation page ([#10935](https://github.com/MetaMask/metamask-extension/pull/10935)) +- Fixing ENS input entry in send flow ([#10923](https://github.com/MetaMask/metamask-extension/pull/10923)) +- Fix mismatchedChain typo in custom network approval screen ([#10723](https://github.com/MetaMask/metamask-extension/pull/10723)) +- Excluding sourcemaps comment in production builds ([#10695](https://github.com/MetaMask/metamask-extension/pull/10695)) +- Prevent network dropdown label highlighting ([#10643](https://github.com/MetaMask/metamask-extension/pull/10643)) +- Ensure swaps detail height doesn't create jump in vertical height ([#10644](https://github.com/MetaMask/metamask-extension/pull/10644)) +- Position the 3dot menu in the same spot on asset screen and home screen ([#10642](https://github.com/MetaMask/metamask-extension/pull/10642)) +- Ensure MetaMask works correctly when on a custom network that shares a chain id with a default Infura network ([#10594](https://github.com/MetaMask/metamask-extension/pull/10594)) +- Fixed bug that prevented speeding up cancelled transactions ([#10579](https://github.com/MetaMask/metamask-extension/pull/10579)) +- Fixes hidden token bug when zero balance preference is on ([#10630](https://github.com/MetaMask/metamask-extension/pull/10630)) +- Removing double click bug from delete custom network modal ([#10628](https://github.com/MetaMask/metamask-extension/pull/10628)) ## [9.4.0] - 2021-04-15 ### Added -- [#10883](https://github.com/MetaMask/metamask-extension/pull/10883): Notify users when MetaMask is unable to connect to the blockchain host +- Notify users when MetaMask is unable to connect to the blockchain host ([#10883](https://github.com/MetaMask/metamask-extension/pull/10883)) ## [9.3.0] - 2021-04-02 ### Added -- [#10721](https://github.com/MetaMask/metamask-extension/pull/10721): Swaps support for the Binance network -- [#10658](https://github.com/MetaMask/metamask-extension/pull/10658): Swaps support for forked Mainnet on localhost +- Swaps support for the Binance network ([#10721](https://github.com/MetaMask/metamask-extension/pull/10721)) +- Swaps support for forked Mainnet on localhost ([#10658](https://github.com/MetaMask/metamask-extension/pull/10658)) ### Fixed -- [#10777](https://github.com/MetaMask/metamask-extension/pull/10777): Display BNB token image for default currency on BSC network home screen -- [#10650](https://github.com/MetaMask/metamask-extension/pull/10650): Fix: ETH now only appears once in the swaps "to" and "from" dropdowns. +- Display BNB token image for default currency on BSC network home screen ([#10777](https://github.com/MetaMask/metamask-extension/pull/10777)) +- Fix: ETH now only appears once in the swaps "to" and "from" dropdowns. ([#10650](https://github.com/MetaMask/metamask-extension/pull/10650)) ## [9.2.1] - 2021-03-26 ### Fixed -- [#10692](https://github.com/MetaMask/metamask-extension/pull/10692): Prevent UI crash when a 'wallet_requestPermissions" confirmation is queued behind a "wallet_addEthereumChain" confirmation -- [#10712](https://github.com/MetaMask/metamask-extension/pull/10712): Fix infinite spinner when request for token symbol fails while attempting an approve transaction +- Prevent UI crash when a 'wallet_requestPermissions" confirmation is queued behind a "wallet_addEthereumChain" confirmation ([#10692](https://github.com/MetaMask/metamask-extension/pull/10692)) +- Fix infinite spinner when request for token symbol fails while attempting an approve transaction ([#10712](https://github.com/MetaMask/metamask-extension/pull/10712)) ## [9.2.0] - 2021-03-15 ### Added -- [#10546](https://github.com/MetaMask/metamask-extension/pull/10546): Add a warning when sending a token to its own contract address -- [#10582](https://github.com/MetaMask/metamask-extension/pull/10582): Adding warnings for excessive custom gas input -- [#10505](https://github.com/MetaMask/metamask-extension/pull/10505): Add support for multiple Ledger & Trezor hardware accounts -- [#10486](https://github.com/MetaMask/metamask-extension/pull/10486): Add setting to hide zero balance tokens +- Add a warning when sending a token to its own contract address ([#10546](https://github.com/MetaMask/metamask-extension/pull/10546)) +- Adding warnings for excessive custom gas input ([#10582](https://github.com/MetaMask/metamask-extension/pull/10582)) +- Add support for multiple Ledger & Trezor hardware accounts ([#10505](https://github.com/MetaMask/metamask-extension/pull/10505)) +- Add setting to hide zero balance tokens ([#10486](https://github.com/MetaMask/metamask-extension/pull/10486)) ### Changed -- [#10563](https://github.com/MetaMask/metamask-extension/pull/10563): Update references to MetaMask support -- [#10126](https://github.com/MetaMask/metamask-extension/pull/10126): Update Italian translation +- Update references to MetaMask support ([#10563](https://github.com/MetaMask/metamask-extension/pull/10563)) +- Update Italian translation ([#10126](https://github.com/MetaMask/metamask-extension/pull/10126)) ### Fixed -- [#10591](https://github.com/MetaMask/metamask-extension/pull/10591): Fix mobile sync of ERC20 tokens -- [#10601](https://github.com/MetaMask/metamask-extension/pull/10601): Fix activity title text truncation -- [#10598](https://github.com/MetaMask/metamask-extension/pull/10598): Remove 'Ethereum' from custom RPC endpoint warning -- [#10606](https://github.com/MetaMask/metamask-extension/pull/10606): Show loading screen while fetching token data for approve screen -- [#10587](https://github.com/MetaMask/metamask-extension/pull/10587): Show correct block explorer for custom RPC endpoints for built-in networks +- Fix mobile sync of ERC20 tokens ([#10591](https://github.com/MetaMask/metamask-extension/pull/10591)) +- Fix activity title text truncation ([#10601](https://github.com/MetaMask/metamask-extension/pull/10601)) +- Remove 'Ethereum' from custom RPC endpoint warning ([#10598](https://github.com/MetaMask/metamask-extension/pull/10598)) +- Show loading screen while fetching token data for approve screen ([#10606](https://github.com/MetaMask/metamask-extension/pull/10606)) +- Show correct block explorer for custom RPC endpoints for built-in networks ([#10587](https://github.com/MetaMask/metamask-extension/pull/10587)) ## [9.1.1] - 2021-03-03 ### Fixed -- [#10560](https://github.com/MetaMask/metamask-extension/pull/10560): Fix ENS resolution related crashes when switching networks on send screen -- [#10561](https://github.com/MetaMask/metamask-extension/pull/10561): Fix crash when speeding up an attempt to cancel a transaction on custom networks +- Fix ENS resolution related crashes when switching networks on send screen ([#10560](https://github.com/MetaMask/metamask-extension/pull/10560)) +- Fix crash when speeding up an attempt to cancel a transaction on custom networks ([#10561](https://github.com/MetaMask/metamask-extension/pull/10561)) ## [9.1.0] - 2021-02-01 ### Uncategorized -- [#10265](https://github.com/MetaMask/metamask-extension/pull/10265): Update Japanese translations. -- [#9388](https://github.com/MetaMask/metamask-extension/pull/9388): Update Chinese(Simplified) translations. -- [#10270](https://github.com/MetaMask/metamask-extension/pull/10270): Update Vietnamese translations. -- [#10258](https://github.com/MetaMask/metamask-extension/pull/10258): Update Spanish and Spanish(Latin American and Carribean) translations. -- [#10268](https://github.com/MetaMask/metamask-extension/pull/10268): Update Russian translations. -- [#10269](https://github.com/MetaMask/metamask-extension/pull/10269): Update Tagalog localized messages. -- [#10448](https://github.com/MetaMask/metamask-extension/pull/10448): Fix 'imported' translation use case for Dutch. -- [#10391](https://github.com/MetaMask/metamask-extension/pull/10391): Use translated transaction category for confirmations. -- [#10357](https://github.com/MetaMask/metamask-extension/pull/10357): Cancel unapproved confirmations on network change -- [#10413](https://github.com/MetaMask/metamask-extension/pull/10413): Use native currency in asset row. -- [#10421](https://github.com/MetaMask/metamask-extension/pull/10421): Fix color indicator size on connected site indicator. -- [#10423](https://github.com/MetaMask/metamask-extension/pull/10423): Fix multiple notification window prompts. -- [#10424](https://github.com/MetaMask/metamask-extension/pull/10424): Fix icons on token options menu. -- [#10414](https://github.com/MetaMask/metamask-extension/pull/10414): Fix token fiat conversion rates when switching from certain custom networks. -- [#10453](https://github.com/MetaMask/metamask-extension/pull/10453): Disable BUY button from home screen when not on Ethereum Mainnet. -- [#10465](https://github.com/MetaMask/metamask-extension/pull/10465): Fixes gas selection check mark on the notification view. -- [#10467](https://github.com/MetaMask/metamask-extension/pull/10467): Fix confirm page header with from/to addresses in fullscreen for tx confirmations. -- [#10455](https://github.com/MetaMask/metamask-extension/pull/10455): Hide links to etherscan when no block explorer is specified for a custom network for notifications. -- [#10456](https://github.com/MetaMask/metamask-extension/pull/10456): Fix swap insufficient balance error message. -- [#10350](https://github.com/MetaMask/metamask-extension/pull/10350): Fix encypt/decrypt tx queueing. -- [#10473](https://github.com/MetaMask/metamask-extension/pull/10473): Improve autofocus in the add network form. -- [#10444](https://github.com/MetaMask/metamask-extension/pull/10444): Use eth_gasprice for tx gas price estimation on non-Mainnet networks. -- [#10477](https://github.com/MetaMask/metamask-extension/pull/10477): Fix accountsChanged event not triggering when manually connecting. -- [#10471](https://github.com/MetaMask/metamask-extension/pull/10471): Fix navigation from jumping vertically when clicking into token. -- [#9724](https://github.com/MetaMask/metamask-extension/pull/9724): Add custom network RPC method. -- [#10496](https://github.com/MetaMask/metamask-extension/pull/10496): Eliminate artificial delay in swaps loading screen after request loading is complete. -- [#10501](https://github.com/MetaMask/metamask-extension/pull/10501): Ensure that swap approve tx and swap tx always have the same gas price. -- [#10485](https://github.com/MetaMask/metamask-extension/pull/10485): Fixes signTypedData message overflow. -- [#10525](https://github.com/MetaMask/metamask-extension/pull/10525): Update swaps failure message to include a support link. -- [#10521](https://github.com/MetaMask/metamask-extension/pull/10521): Accommodate for 0 sources verifying swap token -- [#10530](https://github.com/MetaMask/metamask-extension/pull/10530): Show warnings on Add Recipient page of Send flow -- [#9187](https://github.com/MetaMask/metamask-extension/pull/9187): Warn users when an ENS name contains 'confusable' characters -- [#10507](https://github.com/MetaMask/metamask-extension/pull/10507): Fixes ENS IPFS resolution on custom networks with the chainID of 1. +- Update Japanese translations. ([#10265](https://github.com/MetaMask/metamask-extension/pull/10265)) +- Update Chinese(Simplified) translations. ([#9388](https://github.com/MetaMask/metamask-extension/pull/9388)) +- Update Vietnamese translations. ([#10270](https://github.com/MetaMask/metamask-extension/pull/10270)) +- Update Spanish and Spanish(Latin American and Carribean) translations. ([#10258](https://github.com/MetaMask/metamask-extension/pull/10258)) +- Update Russian translations. ([#10268](https://github.com/MetaMask/metamask-extension/pull/10268)) +- Update Tagalog localized messages. ([#10269](https://github.com/MetaMask/metamask-extension/pull/10269)) +- Fix 'imported' translation use case for Dutch. ([#10448](https://github.com/MetaMask/metamask-extension/pull/10448)) +- Use translated transaction category for confirmations. ([#10391](https://github.com/MetaMask/metamask-extension/pull/10391)) +- Cancel unapproved confirmations on network change ([#10357](https://github.com/MetaMask/metamask-extension/pull/10357)) +- Use native currency in asset row. ([#10413](https://github.com/MetaMask/metamask-extension/pull/10413)) +- Fix color indicator size on connected site indicator. ([#10421](https://github.com/MetaMask/metamask-extension/pull/10421)) +- Fix multiple notification window prompts. ([#10423](https://github.com/MetaMask/metamask-extension/pull/10423)) +- Fix icons on token options menu. ([#10424](https://github.com/MetaMask/metamask-extension/pull/10424)) +- Fix token fiat conversion rates when switching from certain custom networks. ([#10414](https://github.com/MetaMask/metamask-extension/pull/10414)) +- Disable BUY button from home screen when not on Ethereum Mainnet. ([#10453](https://github.com/MetaMask/metamask-extension/pull/10453)) +- Fixes gas selection check mark on the notification view. ([#10465](https://github.com/MetaMask/metamask-extension/pull/10465)) +- Fix confirm page header with from/to addresses in fullscreen for tx confirmations. ([#10467](https://github.com/MetaMask/metamask-extension/pull/10467)) +- Hide links to etherscan when no block explorer is specified for a custom network for notifications. ([#10455](https://github.com/MetaMask/metamask-extension/pull/10455)) +- Fix swap insufficient balance error message. ([#10456](https://github.com/MetaMask/metamask-extension/pull/10456)) +- Fix encypt/decrypt tx queueing. ([#10350](https://github.com/MetaMask/metamask-extension/pull/10350)) +- Improve autofocus in the add network form. ([#10473](https://github.com/MetaMask/metamask-extension/pull/10473)) +- Use eth_gasprice for tx gas price estimation on non-Mainnet networks. ([#10444](https://github.com/MetaMask/metamask-extension/pull/10444)) +- Fix accountsChanged event not triggering when manually connecting. ([#10477](https://github.com/MetaMask/metamask-extension/pull/10477)) +- Fix navigation from jumping vertically when clicking into token. ([#10471](https://github.com/MetaMask/metamask-extension/pull/10471)) +- Add custom network RPC method. ([#9724](https://github.com/MetaMask/metamask-extension/pull/9724)) +- Eliminate artificial delay in swaps loading screen after request loading is complete. ([#10496](https://github.com/MetaMask/metamask-extension/pull/10496)) +- Ensure that swap approve tx and swap tx always have the same gas price. ([#10501](https://github.com/MetaMask/metamask-extension/pull/10501)) +- Fixes signTypedData message overflow. ([#10485](https://github.com/MetaMask/metamask-extension/pull/10485)) +- Update swaps failure message to include a support link. ([#10525](https://github.com/MetaMask/metamask-extension/pull/10525)) +- Accommodate for 0 sources verifying swap token ([#10521](https://github.com/MetaMask/metamask-extension/pull/10521)) +- Show warnings on Add Recipient page of Send flow ([#10530](https://github.com/MetaMask/metamask-extension/pull/10530)) +- Warn users when an ENS name contains 'confusable' characters ([#9187](https://github.com/MetaMask/metamask-extension/pull/9187)) +- Fixes ENS IPFS resolution on custom networks with the chainID of 1. ([#10507](https://github.com/MetaMask/metamask-extension/pull/10507)) ## [9.0.5] - 2021-02-09 ### Uncategorized -- [#10278](https://github.com/MetaMask/metamask-extension/pull/10278): Allow editing transaction amount after clicking max -- [#10214](https://github.com/MetaMask/metamask-extension/pull/10214): Standardize size, shape and color of network color indicators -- [#10298](https://github.com/MetaMask/metamask-extension/pull/10298): Use network primary currency instead of always defaulting to ETH in the confirm approve screen -- [#10300](https://github.com/MetaMask/metamask-extension/pull/10300): Add origin to signature request confirmation page -- [#10296](https://github.com/MetaMask/metamask-extension/pull/10296): Add origin to transaction confirmation -- [#10266](https://github.com/MetaMask/metamask-extension/pull/10266): Update `ko` localized messages -- [#10263](https://github.com/MetaMask/metamask-extension/pull/10263): Update `id` localized messages -- [#10347](https://github.com/MetaMask/metamask-extension/pull/10347): Require click of "Continue" button to interact with swap screen if there is a price impact warning for present swap -- [#10373](https://github.com/MetaMask/metamask-extension/pull/10373): Change copy of submit button on swaps screen -- [#10346](https://github.com/MetaMask/metamask-extension/pull/10346): Swaps token sources/verification messaging update -- [#10378](https://github.com/MetaMask/metamask-extension/pull/10378): Stop showing the window.web3 in-app popup if the dapp is just using web3.currentProvider -- [#10326](https://github.com/MetaMask/metamask-extension/pull/10326): Throw error when attempting to get an encryption key via eth_getEncryptionPublicKey when connected to Ledger HW -- [#10386](https://github.com/MetaMask/metamask-extension/pull/10386): Make action buttons on message components in swaps flow accessible +- Allow editing transaction amount after clicking max ([#10278](https://github.com/MetaMask/metamask-extension/pull/10278)) +- Standardize size, shape and color of network color indicators ([#10214](https://github.com/MetaMask/metamask-extension/pull/10214)) +- Use network primary currency instead of always defaulting to ETH in the confirm approve screen ([#10298](https://github.com/MetaMask/metamask-extension/pull/10298)) +- Add origin to signature request confirmation page ([#10300](https://github.com/MetaMask/metamask-extension/pull/10300)) +- Add origin to transaction confirmation ([#10296](https://github.com/MetaMask/metamask-extension/pull/10296)) +- Update `ko` localized messages ([#10266](https://github.com/MetaMask/metamask-extension/pull/10266)) +- Update `id` localized messages ([#10263](https://github.com/MetaMask/metamask-extension/pull/10263)) +- Require click of "Continue" button to interact with swap screen if there is a price impact warning for present swap ([#10347](https://github.com/MetaMask/metamask-extension/pull/10347)) +- Change copy of submit button on swaps screen ([#10373](https://github.com/MetaMask/metamask-extension/pull/10373)) +- Swaps token sources/verification messaging update ([#10346](https://github.com/MetaMask/metamask-extension/pull/10346)) +- Stop showing the window.web3 in-app popup if the dapp is just using web3.currentProvider ([#10378](https://github.com/MetaMask/metamask-extension/pull/10378)) +- Throw error when attempting to get an encryption key via eth_getEncryptionPublicKey when connected to Ledger HW ([#10326](https://github.com/MetaMask/metamask-extension/pull/10326)) +- Make action buttons on message components in swaps flow accessible ([#10386](https://github.com/MetaMask/metamask-extension/pull/10386)) ## [9.0.4] - 2021-01-27 ### Uncategorized -- [#10285](https://github.com/MetaMask/metamask-extension/pull/10285): Update @metamask/contract-metadata from v1.21.0 to 1.22.0 -- [#10264](https://github.com/MetaMask/metamask-extension/pull/10264): Update `hi` localized messages -- [#10174](https://github.com/MetaMask/metamask-extension/pull/10174): Move fox to bottom of 'About' page -- [#10198](https://github.com/MetaMask/metamask-extension/pull/10198): Fix hardware account selection -- [#10101](https://github.com/MetaMask/metamask-extension/pull/10101): Add a timeout to all network requests -- [#10212](https://github.com/MetaMask/metamask-extension/pull/10212): Fix displayed balance of tokens with 0 decimals in swaps flow -- [#10162](https://github.com/MetaMask/metamask-extension/pull/10162): Prevent accidentally submitting a swap twice -- [#10224](https://github.com/MetaMask/metamask-extension/pull/10224): Improve chain ID validation -- [#10195](https://github.com/MetaMask/metamask-extension/pull/10195): Increase minimum Firefox version to v68 -- [#10192](https://github.com/MetaMask/metamask-extension/pull/10192): Update TrezorConnect to v8 -- [#10166](https://github.com/MetaMask/metamask-extension/pull/10166): Fix back button on swaps loading page -- [#9947](https://github.com/MetaMask/metamask-extension/pull/9947): Do not publish swaps transaction if the estimateGas call made when adding the transaction fails. +- Update @metamask/contract-metadata from v1.21.0 to 1.22.0 ([#10285](https://github.com/MetaMask/metamask-extension/pull/10285)) +- Update `hi` localized messages ([#10264](https://github.com/MetaMask/metamask-extension/pull/10264)) +- Move fox to bottom of 'About' page ([#10174](https://github.com/MetaMask/metamask-extension/pull/10174)) +- Fix hardware account selection ([#10198](https://github.com/MetaMask/metamask-extension/pull/10198)) +- Add a timeout to all network requests ([#10101](https://github.com/MetaMask/metamask-extension/pull/10101)) +- Fix displayed balance of tokens with 0 decimals in swaps flow ([#10212](https://github.com/MetaMask/metamask-extension/pull/10212)) +- Prevent accidentally submitting a swap twice ([#10162](https://github.com/MetaMask/metamask-extension/pull/10162)) +- Improve chain ID validation ([#10224](https://github.com/MetaMask/metamask-extension/pull/10224)) +- Increase minimum Firefox version to v68 ([#10195](https://github.com/MetaMask/metamask-extension/pull/10195)) +- Update TrezorConnect to v8 ([#10192](https://github.com/MetaMask/metamask-extension/pull/10192)) +- Fix back button on swaps loading page ([#10166](https://github.com/MetaMask/metamask-extension/pull/10166)) +- Do not publish swaps transaction if the estimateGas call made when adding the transaction fails. ([#9947](https://github.com/MetaMask/metamask-extension/pull/9947)) ## [9.0.3] - 2021-01-22 ### Uncategorized -- [#10243](https://github.com/MetaMask/metamask-extension/pull/10243): Fix site metadata handling -- [#10252](https://github.com/MetaMask/metamask-extension/pull/10252): Fix decrypt message confirmation UI crash +- Fix site metadata handling ([#10243](https://github.com/MetaMask/metamask-extension/pull/10243)) +- Fix decrypt message confirmation UI crash ([#10252](https://github.com/MetaMask/metamask-extension/pull/10252)) ## [9.0.2] - 2021-01-20 ### Uncategorized -- [#10191](https://github.com/MetaMask/metamask-extension/pull/10191): zh_TW: 乙太 -> 以太 (#10191) -- [#10207](https://github.com/MetaMask/metamask-extension/pull/10207): zh_TW: Translate buy, assets, activity (#10207) -- [#10219](https://github.com/MetaMask/metamask-extension/pull/10219): Restore provider 'data' event (#10219) +- zh_TW: 乙太 -> 以太 ([#10191](https://github.com/MetaMask/metamask-extension/pull/10191)) +- zh_TW: Translate buy, assets, activity ([#10207](https://github.com/MetaMask/metamask-extension/pull/10207)) +- Restore provider 'data' event ([#10219](https://github.com/MetaMask/metamask-extension/pull/10219)) ## [9.0.1] - 2021-01-13 ### Uncategorized -- [#10169](https://github.com/MetaMask/metamask-extension/pull/10169): Improved detection of contract methods with array parameters -- [#10178](https://github.com/MetaMask/metamask-extension/pull/10178): Only warn of injected web3 usage once per page -- [#10179](https://github.com/MetaMask/metamask-extension/pull/10179): Restore support for @metamask/inpage provider@"< 8.0.0" -- [#10180](https://github.com/MetaMask/metamask-extension/pull/10180): Fix UI crash when domain metadata is missing on public encryption key confirmation page +- Improved detection of contract methods with array parameters ([#10169](https://github.com/MetaMask/metamask-extension/pull/10169)) +- Only warn of injected web3 usage once per page ([#10178](https://github.com/MetaMask/metamask-extension/pull/10178)) +- Restore support for @metamask/inpage provider@"< 8.0.0" ([#10179](https://github.com/MetaMask/metamask-extension/pull/10179)) +- Fix UI crash when domain metadata is missing on public encryption key confirmation page ([#10180](https://github.com/MetaMask/metamask-extension/pull/10180)) ## [9.0.0] - 2021-01-12 ### Uncategorized -- [#9156](https://github.com/MetaMask/metamask-extension/pull/9156): Remove window.web3 injection -- [#10039](https://github.com/MetaMask/metamask-extension/pull/10039): Add web3 shim usage notification -- [#8640](https://github.com/MetaMask/metamask-extension/pull/8640): Implement breaking window.ethereum API changes -- [#8629](https://github.com/MetaMask/metamask-extension/pull/8629): Fix `eth_chainId` return values for Infura networks -- [#10019](https://github.com/MetaMask/metamask-extension/pull/10019): Increase Chrome minimum version to v63 -- [#10135](https://github.com/MetaMask/metamask-extension/pull/10135): Fix error where a swap only completed the token approval transaction -- [#10100](https://github.com/MetaMask/metamask-extension/pull/10100): Remove unnecessary swaps footer space when in dropdown mode -- [#9905](https://github.com/MetaMask/metamask-extension/pull/9905): Redesign view quote screens -- [#9320](https://github.com/MetaMask/metamask-extension/pull/9320): Prevent hidden tokens from reappearing -- [#10000](https://github.com/MetaMask/metamask-extension/pull/10000): Use consistent font size for modal top right Close links -- [#10046](https://github.com/MetaMask/metamask-extension/pull/10046): Improve home screen notification appearance -- [#10093](https://github.com/MetaMask/metamask-extension/pull/10093): Always roll back to the previously selected network when unable to connect to a newly selected network -- [#10117](https://github.com/MetaMask/metamask-extension/pull/10117): Fix network settings Kovan block explorer link -- [#10143](https://github.com/MetaMask/metamask-extension/pull/10143): Prevent malformed next nonce warning -- [#10142](https://github.com/MetaMask/metamask-extension/pull/10142): Update @metamask/contract-metadata from v1.20.0 to 1.21.0 -- [#10160](https://github.com/MetaMask/metamask-extension/pull/10160): Fix French "Block Explorer URL" translations -- [#10157](https://github.com/MetaMask/metamask-extension/pull/10157): Automatically detect tokens on custom Mainnet RPC endpoints -- [#9772](https://github.com/MetaMask/metamask-extension/pull/9772): Improve zh_CN translation -- [#10170](https://github.com/MetaMask/metamask-extension/pull/10170): Fix bug where swaps button was disabled on Mainnet if the user hadn't switched networks in a long time +- Remove window.web3 injection ([#9156](https://github.com/MetaMask/metamask-extension/pull/9156)) +- Add web3 shim usage notification ([#10039](https://github.com/MetaMask/metamask-extension/pull/10039)) +- Implement breaking window.ethereum API changes ([#8640](https://github.com/MetaMask/metamask-extension/pull/8640)) +- Fix `eth_chainId` return values for Infura networks ([#8629](https://github.com/MetaMask/metamask-extension/pull/8629)) +- Increase Chrome minimum version to v63 ([#10019](https://github.com/MetaMask/metamask-extension/pull/10019)) +- Fix error where a swap only completed the token approval transaction ([#10135](https://github.com/MetaMask/metamask-extension/pull/10135)) +- Remove unnecessary swaps footer space when in dropdown mode ([#10100](https://github.com/MetaMask/metamask-extension/pull/10100)) +- Redesign view quote screens ([#9905](https://github.com/MetaMask/metamask-extension/pull/9905)) +- Prevent hidden tokens from reappearing ([#9320](https://github.com/MetaMask/metamask-extension/pull/9320)) +- Use consistent font size for modal top right Close links ([#10000](https://github.com/MetaMask/metamask-extension/pull/10000)) +- Improve home screen notification appearance ([#10046](https://github.com/MetaMask/metamask-extension/pull/10046)) +- Always roll back to the previously selected network when unable to connect to a newly selected network ([#10093](https://github.com/MetaMask/metamask-extension/pull/10093)) +- Fix network settings Kovan block explorer link ([#10117](https://github.com/MetaMask/metamask-extension/pull/10117)) +- Prevent malformed next nonce warning ([#10143](https://github.com/MetaMask/metamask-extension/pull/10143)) +- Update @metamask/contract-metadata from v1.20.0 to 1.21.0 ([#10142](https://github.com/MetaMask/metamask-extension/pull/10142)) +- Fix French "Block Explorer URL" translations ([#10160](https://github.com/MetaMask/metamask-extension/pull/10160)) +- Automatically detect tokens on custom Mainnet RPC endpoints ([#10157](https://github.com/MetaMask/metamask-extension/pull/10157)) +- Improve zh_CN translation ([#9772](https://github.com/MetaMask/metamask-extension/pull/9772)) +- Fix bug where swaps button was disabled on Mainnet if the user hadn't switched networks in a long time ([#10170](https://github.com/MetaMask/metamask-extension/pull/10170)) ## [8.1.11] - 2021-01-07 ### Uncategorized -- [#10155](https://github.com/MetaMask/metamask-extension/pull/10155): Disable swaps when the current network's chainId does not match the mainnet chain ID, instead of disabling based on network ID +- Disable swaps when the current network's chainId does not match the mainnet chain ID, instead of disabling based on network ID ([#10155](https://github.com/MetaMask/metamask-extension/pull/10155)) ## [8.1.10] - 2021-01-04 ### Uncategorized -- [#10084](https://github.com/MetaMask/metamask-extension/pull/10084): Set last provider when switching to a customRPC -- [#10096](https://github.com/MetaMask/metamask-extension/pull/10096): Update `@metamask/controllers` to v5.1.0 -- [#10103](https://github.com/MetaMask/metamask-extension/pull/10103): Prevent stuck loading screen in some situations -- [#10104](https://github.com/MetaMask/metamask-extension/pull/10104): Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 -- [#10110](https://github.com/MetaMask/metamask-extension/pull/10110): Fix frozen loading screen on Firefox when strict Enhanced Tracking Protection is enabled +- Set last provider when switching to a customRPC ([#10084](https://github.com/MetaMask/metamask-extension/pull/10084)) +- Update `@metamask/controllers` to v5.1.0 ([#10096](https://github.com/MetaMask/metamask-extension/pull/10096)) +- Prevent stuck loading screen in some situations ([#10103](https://github.com/MetaMask/metamask-extension/pull/10103)) +- Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 ([#10104](https://github.com/MetaMask/metamask-extension/pull/10104)) +- Fix frozen loading screen on Firefox when strict Enhanced Tracking Protection is enabled ([#10110](https://github.com/MetaMask/metamask-extension/pull/10110)) ## [8.1.9] - 2020-12-15 ### Uncategorized -- [#10034](https://github.com/MetaMask/metamask-extension/pull/10034): Fix contentscript injection failure on Firefox 56 -- [#10045](https://github.com/MetaMask/metamask-extension/pull/10045): Fix token validation in Send flow -- [#10048](https://github.com/MetaMask/metamask-extension/pull/10048): Display boolean values when signing typed data -- [#10070](https://github.com/MetaMask/metamask-extension/pull/10070): Add eth_getProof -- [#10043](https://github.com/MetaMask/metamask-extension/pull/10043): Improve swaps maximum gas estimation -- [#10069](https://github.com/MetaMask/metamask-extension/pull/10069): Fetch swap quote refresh time from API -- [#10040](https://github.com/MetaMask/metamask-extension/pull/10040): Disable console in contentscript to reduce noise +- Fix contentscript injection failure on Firefox 56 ([#10034](https://github.com/MetaMask/metamask-extension/pull/10034)) +- Fix token validation in Send flow ([#10045](https://github.com/MetaMask/metamask-extension/pull/10045)) +- Display boolean values when signing typed data ([#10048](https://github.com/MetaMask/metamask-extension/pull/10048)) +- Add eth_getProof ([#10070](https://github.com/MetaMask/metamask-extension/pull/10070)) +- Improve swaps maximum gas estimation ([#10043](https://github.com/MetaMask/metamask-extension/pull/10043)) +- Fetch swap quote refresh time from API ([#10069](https://github.com/MetaMask/metamask-extension/pull/10069)) +- Disable console in contentscript to reduce noise ([#10040](https://github.com/MetaMask/metamask-extension/pull/10040)) ## [8.1.8] - 2020-12-09 ### Uncategorized -- [#9992](https://github.com/MetaMask/metamask-extension/pull/9992): Improve transaction params validation -- [#9991](https://github.com/MetaMask/metamask-extension/pull/9991): Don't allow more than 15% slippage -- [#9994](https://github.com/MetaMask/metamask-extension/pull/9994): Prevent unwanted 'no quotes available' message when going back to build quote screen while having insufficient funds -- [#9999](https://github.com/MetaMask/metamask-extension/pull/9999): Fix missing contacts upon restart +- Improve transaction params validation ([#9992](https://github.com/MetaMask/metamask-extension/pull/9992)) +- Don't allow more than 15% slippage ([#9991](https://github.com/MetaMask/metamask-extension/pull/9991)) +- Prevent unwanted 'no quotes available' message when going back to build quote screen while having insufficient funds ([#9994](https://github.com/MetaMask/metamask-extension/pull/9994)) +- Fix missing contacts upon restart ([#9999](https://github.com/MetaMask/metamask-extension/pull/9999)) ## [8.1.7] - 2020-12-09 ### Uncategorized @@ -251,840 +252,841 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [8.1.6] - 2020-12-04 ### Uncategorized -- [#9916](https://github.com/MetaMask/metamask-extension/pull/9916): Fix QR code scans interpretting payment requests as token addresses -- [#9847](https://github.com/MetaMask/metamask-extension/pull/9847): Add alt text for images in list items -- [#9960](https://github.com/MetaMask/metamask-extension/pull/9960): Ensure watchAsset returns errors for invalid token symbols -- [#9968](https://github.com/MetaMask/metamask-extension/pull/9968): Adds tokens from v1.19.0 of metamask/contract-metadata to add token lists -- [#9970](https://github.com/MetaMask/metamask-extension/pull/9970): Etherscan links support Goerli network -- [#9899](https://github.com/MetaMask/metamask-extension/pull/9899): Show price impact warnings on swaps quote screen -- [#9867](https://github.com/MetaMask/metamask-extension/pull/9867): Replace use of ethgasstation -- [#9984](https://github.com/MetaMask/metamask-extension/pull/9984): Show correct gas estimates when users don't have sufficient balance for contract transaction -- [#9993](https://github.com/MetaMask/metamask-extension/pull/9993): Add 48x48 MetaMask icon for use by browsers +- Fix QR code scans interpretting payment requests as token addresses ([#9916](https://github.com/MetaMask/metamask-extension/pull/9916)) +- Add alt text for images in list items ([#9847](https://github.com/MetaMask/metamask-extension/pull/9847)) +- Ensure watchAsset returns errors for invalid token symbols ([#9960](https://github.com/MetaMask/metamask-extension/pull/9960)) +- Adds tokens from v1.19.0 of metamask/contract-metadata to add token lists ([#9968](https://github.com/MetaMask/metamask-extension/pull/9968)) +- Etherscan links support Goerli network ([#9970](https://github.com/MetaMask/metamask-extension/pull/9970)) +- Show price impact warnings on swaps quote screen ([#9899](https://github.com/MetaMask/metamask-extension/pull/9899)) +- Replace use of ethgasstation ([#9867](https://github.com/MetaMask/metamask-extension/pull/9867)) +- Show correct gas estimates when users don't have sufficient balance for contract transaction ([#9984](https://github.com/MetaMask/metamask-extension/pull/9984)) +- Add 48x48 MetaMask icon for use by browsers ([#9993](https://github.com/MetaMask/metamask-extension/pull/9993)) ## [8.1.5] - 2020-11-19 ### Uncategorized -- [#9871](https://github.com/MetaMask/metamask-extension/pull/9871): Show send text upon hover in main asset list -- [#9855](https://github.com/MetaMask/metamask-extension/pull/9855): Make edit icon and account name in account details modal focusable -- [#9853](https://github.com/MetaMask/metamask-extension/pull/9853): Provide alternative text for images where appropriate -- [#9869](https://github.com/MetaMask/metamask-extension/pull/9869): Remove CoinSwitch from the Deposit modal -- [#9883](https://github.com/MetaMask/metamask-extension/pull/9883): Move add contact button in fullscreen/expanded view of settings lower to expose the close button. -- [#9891](https://github.com/MetaMask/metamask-extension/pull/9891): Add token verification message to swaps build quote screen -- [#9896](https://github.com/MetaMask/metamask-extension/pull/9896): Show failed token balance updates -- [#9909](https://github.com/MetaMask/metamask-extension/pull/9909): Update asset page etherscan link to the address-filtered token page on Etherscan -- [#9910](https://github.com/MetaMask/metamask-extension/pull/9910): Revert "Show a 'send eth' button on home screen in full screen mode" -- [#9907](https://github.com/MetaMask/metamask-extension/pull/9907): Ensure "Known contract address" warning is shown on send screen even when changing asset -- [#9911](https://github.com/MetaMask/metamask-extension/pull/9911): Fix display of Ledger connection error -- [#9918](https://github.com/MetaMask/metamask-extension/pull/9918): Fix missing icon in asset page dropdown and in advanced gas modal button group +- Show send text upon hover in main asset list ([#9871](https://github.com/MetaMask/metamask-extension/pull/9871)) +- Make edit icon and account name in account details modal focusable ([#9855](https://github.com/MetaMask/metamask-extension/pull/9855)) +- Provide alternative text for images where appropriate ([#9853](https://github.com/MetaMask/metamask-extension/pull/9853)) +- Remove CoinSwitch from the Deposit modal ([#9869](https://github.com/MetaMask/metamask-extension/pull/9869)) +- Move add contact button in fullscreen/expanded view of settings lower to expose the close button. ([#9883](https://github.com/MetaMask/metamask-extension/pull/9883)) +- Add token verification message to swaps build quote screen ([#9891](https://github.com/MetaMask/metamask-extension/pull/9891)) +- Show failed token balance updates ([#9896](https://github.com/MetaMask/metamask-extension/pull/9896)) +- Update asset page etherscan link to the address-filtered token page on Etherscan ([#9909](https://github.com/MetaMask/metamask-extension/pull/9909)) +- Revert "Show a 'send eth' button on home screen in full screen mode" ([#9910](https://github.com/MetaMask/metamask-extension/pull/9910)) +- Ensure "Known contract address" warning is shown on send screen even when changing asset ([#9907](https://github.com/MetaMask/metamask-extension/pull/9907)) +- Fix display of Ledger connection error ([#9911](https://github.com/MetaMask/metamask-extension/pull/9911)) +- Fix missing icon in asset page dropdown and in advanced gas modal button group ([#9918](https://github.com/MetaMask/metamask-extension/pull/9918)) ## [8.1.4] - 2020-11-16 ### Uncategorized -- [#9687](https://github.com/MetaMask/metamask-extension/pull/9687): Allow speeding up of underpriced transactions -- [#9694](https://github.com/MetaMask/metamask-extension/pull/9694): normalize UI component font styles -- [#9695](https://github.com/MetaMask/metamask-extension/pull/9695): normalize app component font styles -- [#9696](https://github.com/MetaMask/metamask-extension/pull/9696): normalize deprecated itcss font styles -- [#9697](https://github.com/MetaMask/metamask-extension/pull/9697): normalize page font styles -- [#9740](https://github.com/MetaMask/metamask-extension/pull/9740): Standardize network settings page -- [#9750](https://github.com/MetaMask/metamask-extension/pull/9750): Make swap arrows accessible, make swaps advanced options accessible -- [#9766](https://github.com/MetaMask/metamask-extension/pull/9766): Use 1px borders on inputs and buttons -- [#9767](https://github.com/MetaMask/metamask-extension/pull/9767): Remove border radius from transfer button -- [#9764](https://github.com/MetaMask/metamask-extension/pull/9764): Update custom RPC network dropdown icons -- [#9763](https://github.com/MetaMask/metamask-extension/pull/9763): Add confirmation for network dropdown delete action -- [#9583](https://github.com/MetaMask/metamask-extension/pull/9583): Use `chainId` for incoming transactions controller -- [#9748](https://github.com/MetaMask/metamask-extension/pull/9748): Autofocus input, improve accessibility of restore page -- [#9778](https://github.com/MetaMask/metamask-extension/pull/9778): Shorten unit input width and use ellipses for overflow -- [#9746](https://github.com/MetaMask/metamask-extension/pull/9746): Make the login screen's Restore and Import links accessible -- [#9780](https://github.com/MetaMask/metamask-extension/pull/9780): Display decimal chain ID in network form -- [#9599](https://github.com/MetaMask/metamask-extension/pull/9599): Use MetaSwap API for gas price estimation in swaps -- [#9518](https://github.com/MetaMask/metamask-extension/pull/9518): Make all UI tabs accessible via keyboard -- [#9808](https://github.com/MetaMask/metamask-extension/pull/9808): Always allow overwriting invalid custom RPC chain ID -- [#9812](https://github.com/MetaMask/metamask-extension/pull/9812): Fix send header cancel button alignment -- [#9271](https://github.com/MetaMask/metamask-extension/pull/9271): Do not check popupIsOpen on Vivaldi -- [#9306](https://github.com/MetaMask/metamask-extension/pull/9306): Fix UI crash when dapp submits negative gas price -- [#9257](https://github.com/MetaMask/metamask-extension/pull/9257): Add sort and search to AddRecipient accounts list -- [#9824](https://github.com/MetaMask/metamask-extension/pull/9824): Move `externally_connectable` from base to Chrome manifest -- [#9815](https://github.com/MetaMask/metamask-extension/pull/9815): Add support for custom network RPC URL with basic auth -- [#9822](https://github.com/MetaMask/metamask-extension/pull/9822): Make QR code button focusable -- [#9832](https://github.com/MetaMask/metamask-extension/pull/9832): Warn instead of throw on duplicate web3 -- [#9838](https://github.com/MetaMask/metamask-extension/pull/9838): @metamask/controllers@4.0.0 -- [#9856](https://github.com/MetaMask/metamask-extension/pull/9856): Prevent user from getting stuck on opt in page -- [#9845](https://github.com/MetaMask/metamask-extension/pull/9845): Show a 'send eth' button on home screen in full screen mode -- [#9871](https://github.com/MetaMask/metamask-extension/pull/9871): Show send text upon hover in main asset list -- [#9880](https://github.com/MetaMask/metamask-extension/pull/9880): Properly detect U2F errors in hardware wallet +- Allow speeding up of underpriced transactions ([#9687](https://github.com/MetaMask/metamask-extension/pull/9687)) +- normalize UI component font styles ([#9694](https://github.com/MetaMask/metamask-extension/pull/9694)) +- normalize app component font styles ([#9695](https://github.com/MetaMask/metamask-extension/pull/9695)) +- normalize deprecated itcss font styles ([#9696](https://github.com/MetaMask/metamask-extension/pull/9696)) +- normalize page font styles ([#9697](https://github.com/MetaMask/metamask-extension/pull/9697)) +- Standardize network settings page ([#9740](https://github.com/MetaMask/metamask-extension/pull/9740)) +- Make swap arrows accessible, make swaps advanced options accessible ([#9750](https://github.com/MetaMask/metamask-extension/pull/9750)) +- Use 1px borders on inputs and buttons ([#9766](https://github.com/MetaMask/metamask-extension/pull/9766)) +- Remove border radius from transfer button ([#9767](https://github.com/MetaMask/metamask-extension/pull/9767)) +- Update custom RPC network dropdown icons ([#9764](https://github.com/MetaMask/metamask-extension/pull/9764)) +- Add confirmation for network dropdown delete action ([#9763](https://github.com/MetaMask/metamask-extension/pull/9763)) +- Use `chainId` for incoming transactions controller ([#9583](https://github.com/MetaMask/metamask-extension/pull/9583)) +- Autofocus input, improve accessibility of restore page ([#9748](https://github.com/MetaMask/metamask-extension/pull/9748)) +- Shorten unit input width and use ellipses for overflow ([#9778](https://github.com/MetaMask/metamask-extension/pull/9778)) +- Make the login screen's Restore and Import links accessible ([#9746](https://github.com/MetaMask/metamask-extension/pull/9746)) +- Display decimal chain ID in network form ([#9780](https://github.com/MetaMask/metamask-extension/pull/9780)) +- Use MetaSwap API for gas price estimation in swaps ([#9599](https://github.com/MetaMask/metamask-extension/pull/9599)) +- Make all UI tabs accessible via keyboard ([#9518](https://github.com/MetaMask/metamask-extension/pull/9518)) +- Always allow overwriting invalid custom RPC chain ID ([#9808](https://github.com/MetaMask/metamask-extension/pull/9808)) +- Fix send header cancel button alignment ([#9812](https://github.com/MetaMask/metamask-extension/pull/9812)) +- Do not check popupIsOpen on Vivaldi ([#9271](https://github.com/MetaMask/metamask-extension/pull/9271)) +- Fix UI crash when dapp submits negative gas price ([#9306](https://github.com/MetaMask/metamask-extension/pull/9306)) +- Add sort and search to AddRecipient accounts list ([#9257](https://github.com/MetaMask/metamask-extension/pull/9257)) +- Move `externally_connectable` from base to Chrome manifest ([#9824](https://github.com/MetaMask/metamask-extension/pull/9824)) +- Add support for custom network RPC URL with basic auth ([#9815](https://github.com/MetaMask/metamask-extension/pull/9815)) +- Make QR code button focusable ([#9822](https://github.com/MetaMask/metamask-extension/pull/9822)) +- Warn instead of throw on duplicate web3 ([#9832](https://github.com/MetaMask/metamask-extension/pull/9832)) +- @metamask/controllers@4.0.0 ([#9838](https://github.com/MetaMask/metamask-extension/pull/9838)) +- Prevent user from getting stuck on opt in page ([#9856](https://github.com/MetaMask/metamask-extension/pull/9856)) +- Show a 'send eth' button on home screen in full screen mode ([#9845](https://github.com/MetaMask/metamask-extension/pull/9845)) +- Show send text upon hover in main asset list ([#9871](https://github.com/MetaMask/metamask-extension/pull/9871)) +- Properly detect U2F errors in hardware wallet ([#9880](https://github.com/MetaMask/metamask-extension/pull/9880)) ## [8.1.3] - 2020-10-29 ### Uncategorized -- [#9642](https://github.com/MetaMask/metamask-extension/pull/9642) Prevent excessive overflow from swap dropdowns -- [#9658](https://github.com/MetaMask/metamask-extension/pull/9658): Fix sorting Quote Source column of quote sort list -- [#9667](https://github.com/MetaMask/metamask-extension/pull/9667): Fix adding contact with QR code -- [#9674](https://github.com/MetaMask/metamask-extension/pull/9674): Fix ENS resolution of `.eth` URLs with query strings -- [#9691](https://github.com/MetaMask/metamask-extension/pull/9691): Bump @metamask/inpage-provider from 6.1.0 to 6.3.0 -- [#9700](https://github.com/MetaMask/metamask-extension/pull/9700): Provide image sizing so there's no jump when opening the swaps token search -- [#9568](https://github.com/MetaMask/metamask-extension/pull/9568): Add ses lockdown to build system -- [#9705](https://github.com/MetaMask/metamask-extension/pull/9705): Prevent memory leak from selected account copy tooltip -- [#9671](https://github.com/MetaMask/metamask-extension/pull/9671): Prevent old fetches from polluting the swap state -- [#9702](https://github.com/MetaMask/metamask-extension/pull/9702): Keyboard navigation for swaps dropdowns -- [#9646](https://github.com/MetaMask/metamask-extension/pull/9646): Switch from Matomo to Segment -- [#9745](https://github.com/MetaMask/metamask-extension/pull/9745): Fix fetching swaps when initial network not Mainnet -- [#9621](https://github.com/MetaMask/metamask-extension/pull/9621): Include aggregator fee as part of displayed network fees -- [#9736](https://github.com/MetaMask/metamask-extension/pull/9736): Bump eth-contract-metadata from 1.16.0 to 1.17.0 -- [#9743](https://github.com/MetaMask/metamask-extension/pull/9743): Fix "+-" prefix on swap token amount -- [#9715](https://github.com/MetaMask/metamask-extension/pull/9715): Focus on wallet address in buy workflow +- Prevent excessive overflow from swap dropdowns ([#9642](https://github.com/MetaMask/metamask-extension/pull/9642)) +- Fix sorting Quote Source column of quote sort list ([#9658](https://github.com/MetaMask/metamask-extension/pull/9658)) +- Fix adding contact with QR code ([#9667](https://github.com/MetaMask/metamask-extension/pull/9667)) +- Fix ENS resolution of `.eth` URLs with query strings ([#9674](https://github.com/MetaMask/metamask-extension/pull/9674)) +- Bump @metamask/inpage-provider from 6.1.0 to 6.3.0 ([#9691](https://github.com/MetaMask/metamask-extension/pull/9691)) +- Provide image sizing so there's no jump when opening the swaps token search ([#9700](https://github.com/MetaMask/metamask-extension/pull/9700)) +- Add ses lockdown to build system ([#9568](https://github.com/MetaMask/metamask-extension/pull/9568)) +- Prevent memory leak from selected account copy tooltip ([#9705](https://github.com/MetaMask/metamask-extension/pull/9705)) +- Prevent old fetches from polluting the swap state ([#9671](https://github.com/MetaMask/metamask-extension/pull/9671)) +- Keyboard navigation for swaps dropdowns ([#9702](https://github.com/MetaMask/metamask-extension/pull/9702)) +- Switch from Matomo to Segment ([#9646](https://github.com/MetaMask/metamask-extension/pull/9646)) +- Fix fetching swaps when initial network not Mainnet ([#9745](https://github.com/MetaMask/metamask-extension/pull/9745)) +- Include aggregator fee as part of displayed network fees ([#9621](https://github.com/MetaMask/metamask-extension/pull/9621)) +- Bump eth-contract-metadata from 1.16.0 to 1.17.0 ([#9736](https://github.com/MetaMask/metamask-extension/pull/9736)) +- Fix "+-" prefix on swap token amount ([#9743](https://github.com/MetaMask/metamask-extension/pull/9743)) +- Focus on wallet address in buy workflow ([#9715](https://github.com/MetaMask/metamask-extension/pull/9715)) ## [8.1.2] - 2020-10-20 ### Uncategorized -- [#9608](https://github.com/MetaMask/metamask-extension/pull/9608): Ensure QR code scanner works -- [#9624](https://github.com/MetaMask/metamask-extension/pull/9624): Help users avoid insufficient gas prices in swaps -- [#9614](https://github.com/MetaMask/metamask-extension/pull/9614): Update swaps network fee tooltip -- [#9623](https://github.com/MetaMask/metamask-extension/pull/9623): Prevent reducing the gas limit for swaps -- [#9630](https://github.com/MetaMask/metamask-extension/pull/9630): Fix UI crash when trying to render estimated time remaining of non-submitted transaction -- [#9633](https://github.com/MetaMask/metamask-extension/pull/9633): Update View Quote page to better represent the MetaMask fee +- Ensure QR code scanner works ([#9608](https://github.com/MetaMask/metamask-extension/pull/9608)) +- Help users avoid insufficient gas prices in swaps ([#9624](https://github.com/MetaMask/metamask-extension/pull/9624)) +- Update swaps network fee tooltip ([#9614](https://github.com/MetaMask/metamask-extension/pull/9614)) +- Prevent reducing the gas limit for swaps ([#9623](https://github.com/MetaMask/metamask-extension/pull/9623)) +- Fix UI crash when trying to render estimated time remaining of non-submitted transaction ([#9630](https://github.com/MetaMask/metamask-extension/pull/9630)) +- Update View Quote page to better represent the MetaMask fee ([#9633](https://github.com/MetaMask/metamask-extension/pull/9633)) ## [8.1.1] - 2020-10-15 ### Uncategorized -- [#9586](https://github.com/MetaMask/metamask-extension/pull/9586): Prevent build quote crash when swapping from non-tracked token with balance (#9586) -- [#9592](https://github.com/MetaMask/metamask-extension/pull/9592): Remove commitment to maintain a public metrics dashboard (#9592) -- [#9596](https://github.com/MetaMask/metamask-extension/pull/9596): Fix TypeError when `signTypedData` throws (#9596) -- [#9591](https://github.com/MetaMask/metamask-extension/pull/9591): Fix Firefox overflow on transaction items with long amounts (#9591) -- [#9601](https://github.com/MetaMask/metamask-extension/pull/9601): Update text content of invalid custom network alert (#9601) -- [#9575](https://github.com/MetaMask/metamask-extension/pull/9575): Ensure proper hover display for accounts in main menu (#9575) -- [#9576](https://github.com/MetaMask/metamask-extension/pull/9576): Autofocus the appropriate text fields in the Create/Import/Hardware screen (#9576) -- [#9581](https://github.com/MetaMask/metamask-extension/pull/9581): AutoFocus the from input on swaps screen (#9581) -- [#9602](https://github.com/MetaMask/metamask-extension/pull/9602): Prevent swap button from being focused when disabled (#9602) -- [#9609](https://github.com/MetaMask/metamask-extension/pull/9609): Ensure swaps customize gas modal values are set correctly (#9609) +- Prevent build quote crash when swapping from non-tracked token with balance ([#9586](https://github.com/MetaMask/metamask-extension/pull/9586)) +- Remove commitment to maintain a public metrics dashboard ([#9592](https://github.com/MetaMask/metamask-extension/pull/9592)) +- Fix TypeError when `signTypedData` throws ([#9596](https://github.com/MetaMask/metamask-extension/pull/9596)) +- Fix Firefox overflow on transaction items with long amounts ([#9591](https://github.com/MetaMask/metamask-extension/pull/9591)) +- Update text content of invalid custom network alert ([#9601](https://github.com/MetaMask/metamask-extension/pull/9601)) +- Ensure proper hover display for accounts in main menu ([#9575](https://github.com/MetaMask/metamask-extension/pull/9575)) +- Autofocus the appropriate text fields in the Create/Import/Hardware screen ([#9576](https://github.com/MetaMask/metamask-extension/pull/9576)) +- AutoFocus the from input on swaps screen ([#9581](https://github.com/MetaMask/metamask-extension/pull/9581)) +- Prevent swap button from being focused when disabled ([#9602](https://github.com/MetaMask/metamask-extension/pull/9602)) +- Ensure swaps customize gas modal values are set correctly ([#9609](https://github.com/MetaMask/metamask-extension/pull/9609)) ## [8.1.0] - 2020-10-13 ### Uncategorized -- [#9565](https://github.com/MetaMask/metamask-extension/pull/9565): Ensure address book entries are shared between networks with the same chain ID -- [#9552](https://github.com/MetaMask/metamask-extension/pull/9552): Fix `eth_signTypedData_v4` chain ID validation for non-default networks -- [#9551](https://github.com/MetaMask/metamask-extension/pull/9551): Allow the "Localhost 8545" network to be edited, and require a chain ID to be specified for it -- [#9491](https://github.com/MetaMask/metamask-extension/pull/9491): Validate custom network chain IDs against endpoint `eth_chainId` return values -- [#9487](https://github.com/MetaMask/metamask-extension/pull/9487): Require chain IDs to be specified for custom networks -- [#9482](https://github.com/MetaMask/metamask-extension/pull/9482): Add MetaMask Swaps 🌻 -- [#9422](https://github.com/MetaMask/metamask-extension/pull/9422): Fix data backup feature (i.e. syncing with 3box) -- [#9434](https://github.com/MetaMask/metamask-extension/pull/9434): Improve gas input UI by using tooltip instead of a modal to communicate gas data -- [#9433](https://github.com/MetaMask/metamask-extension/pull/9433): Improve visual style and layout of the basic tab of the customize gas modal -- [#9415](https://github.com/MetaMask/metamask-extension/pull/9415): Fix UI bug in token approval confirmation notifications -- [#9414](https://github.com/MetaMask/metamask-extension/pull/9414): Update Wyre purchase URL -- [#9411](https://github.com/MetaMask/metamask-extension/pull/9411): Rename 'Ethereum Main Network' in network selector to 'Etherum Mainnet' -- [#9409](https://github.com/MetaMask/metamask-extension/pull/9409): Fix info tooltip on the alert settings screen when used in firefox -- [#9406](https://github.com/MetaMask/metamask-extension/pull/9406): Fix UI bug in customize gas modal: shwo left border when the first button is selected -- [#9395](https://github.com/MetaMask/metamask-extension/pull/9395): Correctly save new Contact Book addressed after editing them in 'Settings > Contact' -- [#9293](https://github.com/MetaMask/metamask-extension/pull/9293): Improve Italian translations -- [#9295](https://github.com/MetaMask/metamask-extension/pull/9295): Ensure the extension can be unlocked without network/internet access -- [#9344](https://github.com/MetaMask/metamask-extension/pull/9344): Add messages to Ledger connection process -- [#9329](https://github.com/MetaMask/metamask-extension/pull/9329): Hide seedphrase by default when restoring vault, and provide option for it to be shown -- [#9333](https://github.com/MetaMask/metamask-extension/pull/9333): Ensure names of token symbols are shown when token amounts in the token list are long -- [#9321](https://github.com/MetaMask/metamask-extension/pull/9321): Warn users when sending tokens to the token address -- [#9288](https://github.com/MetaMask/metamask-extension/pull/9288): Fix bug that caused the accounts list to be empty after entering an incorrect password when attempting to export private key -- [#9314](https://github.com/MetaMask/metamask-extension/pull/9314): Improve/fix error text for when ENS names are not found, on mainnet -- [#9307](https://github.com/MetaMask/metamask-extension/pull/9307): Improve 'Contact Us' copy in settings -- [#9283](https://github.com/MetaMask/metamask-extension/pull/9283): Fix capitalization of copy on MetaMetrics opt-in page -- [#9269](https://github.com/MetaMask/metamask-extension/pull/9269): Add lock icon to default networks in the Settings network page, to indicate they are not editable -- [#9189](https://github.com/MetaMask/metamask-extension/pull/9189): Hide gas price/speed estimate button, and link to advanced gas modal, in send flow on non-main network -- [#9184](https://github.com/MetaMask/metamask-extension/pull/9184): Improve visual styling of back button in account modal -- [#9152](https://github.com/MetaMask/metamask-extension/pull/9152): Fix vertical align of the network name in network dropdown button -- [#9073](https://github.com/MetaMask/metamask-extension/pull/9073): Use new Euclid font throughout MetaMask +- Ensure address book entries are shared between networks with the same chain ID ([#9565](https://github.com/MetaMask/metamask-extension/pull/9565)) +- Fix `eth_signTypedData_v4` chain ID validation for non-default networks ([#9552](https://github.com/MetaMask/metamask-extension/pull/9552)) +- Allow the "Localhost 8545" network to be edited, and require a chain ID to be specified for it ([#9551](https://github.com/MetaMask/metamask-extension/pull/9551)) +- Validate custom network chain IDs against endpoint `eth_chainId` return values ([#9491](https://github.com/MetaMask/metamask-extension/pull/9491)) +- Require chain IDs to be specified for custom networks ([#9487](https://github.com/MetaMask/metamask-extension/pull/9487)) +- Add MetaMask Swaps 🌻 ([#9482](https://github.com/MetaMask/metamask-extension/pull/9482)) +- Fix data backup feature ([#9422](https://github.com/MetaMask/metamask-extension/pull/9422)) +- Improve gas input UI by using tooltip instead of a modal to communicate gas data ([#9434](https://github.com/MetaMask/metamask-extension/pull/9434)) +- Improve visual style and layout of the basic tab of the customize gas modal ([#9433](https://github.com/MetaMask/metamask-extension/pull/9433)) +- Fix UI bug in token approval confirmation notifications ([#9415](https://github.com/MetaMask/metamask-extension/pull/9415)) +- Update Wyre purchase URL ([#9414](https://github.com/MetaMask/metamask-extension/pull/9414)) +- Rename 'Ethereum Main Network' in network selector to 'Etherum Mainnet' ([#9411](https://github.com/MetaMask/metamask-extension/pull/9411)) +- Fix info tooltip on the alert settings screen when used in firefox ([#9409](https://github.com/MetaMask/metamask-extension/pull/9409)) +- Fix UI bug in customize gas modal: shwo left border when the first button is selected ([#9406](https://github.com/MetaMask/metamask-extension/pull/9406)) +- Correctly save new Contact Book addressed after editing them in 'Settings > Contact' ([#9395](https://github.com/MetaMask/metamask-extension/pull/9395)) +- Improve Italian translations ([#9293](https://github.com/MetaMask/metamask-extension/pull/9293)) +- Ensure the extension can be unlocked without network/internet access ([#9295](https://github.com/MetaMask/metamask-extension/pull/9295)) +- Add messages to Ledger connection process ([#9344](https://github.com/MetaMask/metamask-extension/pull/9344)) +- Hide seedphrase by default when restoring vault, and provide option for it to be shown ([#9329](https://github.com/MetaMask/metamask-extension/pull/9329)) +- Ensure names of token symbols are shown when token amounts in the token list are long ([#9333](https://github.com/MetaMask/metamask-extension/pull/9333)) +- Warn users when sending tokens to the token address ([#9321](https://github.com/MetaMask/metamask-extension/pull/9321)) +- Fix bug that caused the accounts list to be empty after entering an incorrect password when attempting to export private key ([#9288](https://github.com/MetaMask/metamask-extension/pull/9288)) +- Improve/fix error text for when ENS names are not found, on mainnet ([#9314](https://github.com/MetaMask/metamask-extension/pull/9314)) +- Improve 'Contact Us' copy in settings ([#9307](https://github.com/MetaMask/metamask-extension/pull/9307)) +- Fix capitalization of copy on MetaMetrics opt-in page ([#9283](https://github.com/MetaMask/metamask-extension/pull/9283)) +- Add lock icon to default networks in the Settings network page, to indicate they are not editable ([#9269](https://github.com/MetaMask/metamask-extension/pull/9269)) +- Hide gas price/speed estimate button, and link to advanced gas modal, in send flow on non-main network ([#9189](https://github.com/MetaMask/metamask-extension/pull/9189)) +- Improve visual styling of back button in account modal ([#9184](https://github.com/MetaMask/metamask-extension/pull/9184)) +- Fix vertical align of the network name in network dropdown button ([#9152](https://github.com/MetaMask/metamask-extension/pull/9152)) +- Use new Euclid font throughout MetaMask ([#9073](https://github.com/MetaMask/metamask-extension/pull/9073)) ## [8.0.10] - 2020-09-16 ### Uncategorized -- [#9423](https://github.com/MetaMask/metamask-extension/pull/9423): Update default phishing list -- [#9416](https://github.com/MetaMask/metamask-extension/pull/9416): Fix fetching a new phishing list on Firefox +- Update default phishing list ([#9423](https://github.com/MetaMask/metamask-extension/pull/9423)) +- Fix fetching a new phishing list on Firefox ([#9416](https://github.com/MetaMask/metamask-extension/pull/9416)) ## [8.0.9] - 2020-08-19 ### Uncategorized -- [#9228](https://github.com/MetaMask/metamask-extension/pull/9228): Move transaction confirmation footer buttons to scrollable area -- [#9256](https://github.com/MetaMask/metamask-extension/pull/9256): Handle non-String web3 property access -- [#9266](https://github.com/MetaMask/metamask-extension/pull/9266): Use @metamask/controllers@2.0.5 -- [#9189](https://github.com/MetaMask/metamask-extension/pull/9189): Hide ETH Gas Station estimates on non-main network +- Move transaction confirmation footer buttons to scrollable area ([#9228](https://github.com/MetaMask/metamask-extension/pull/9228)) +- Handle non-String web3 property access ([#9256](https://github.com/MetaMask/metamask-extension/pull/9256)) +- Use @metamask/controllers@2.0.5 ([#9266](https://github.com/MetaMask/metamask-extension/pull/9266)) +- Hide ETH Gas Station estimates on non-main network ([#9189](https://github.com/MetaMask/metamask-extension/pull/9189)) ## [8.0.8] - 2020-08-14 ### Uncategorized -- [#9211](https://github.com/MetaMask/metamask-extension/pull/9211): Fix Etherscan redirect on notification click -- [#9237](https://github.com/MetaMask/metamask-extension/pull/9237): Reduce volume of web3 usage metrics -- [#9227](https://github.com/MetaMask/metamask-extension/pull/9227): Permit all-caps addresses +- Fix Etherscan redirect on notification click ([#9211](https://github.com/MetaMask/metamask-extension/pull/9211)) +- Reduce volume of web3 usage metrics ([#9237](https://github.com/MetaMask/metamask-extension/pull/9237)) +- Permit all-caps addresses ([#9227](https://github.com/MetaMask/metamask-extension/pull/9227)) ## [8.0.7] - 2020-08-10 ### Uncategorized -- [#9065](https://github.com/MetaMask/metamask-extension/pull/9065): Change title of "Reveal Seed Words" page to "Reveal Seed Phrase" -- [#8974](https://github.com/MetaMask/metamask-extension/pull/8974): Add tooltip to copy button for contacts and seed phrase -- [#9063](https://github.com/MetaMask/metamask-extension/pull/9063): Fix broken UI upon failed password validation -- [#9075](https://github.com/MetaMask/metamask-extension/pull/9075): Fix shifted popup notification when browser is in fullscreen on macOS -- [#9085](https://github.com/MetaMask/metamask-extension/pull/9085): Support longer text in network dropdown -- [#8873](https://github.com/MetaMask/metamask-extension/pull/8873): Fix onboarding bug where user can be asked to verify seed phrase twice -- [#9104](https://github.com/MetaMask/metamask-extension/pull/9104): Replace "Email us" button with "Contact us" button -- [#9137](https://github.com/MetaMask/metamask-extension/pull/9137): Fix bug where `accountsChanged` events stop after a dapp connection is closed. -- [#9152](https://github.com/MetaMask/metamask-extension/pull/9152): Fix network name alignment -- [#9144](https://github.com/MetaMask/metamask-extension/pull/9144): Add web3 usage metrics and prepare for web3 removal +- Change title of "Reveal Seed Words" page to "Reveal Seed Phrase" ([#9065](https://github.com/MetaMask/metamask-extension/pull/9065)) +- Add tooltip to copy button for contacts and seed phrase ([#8974](https://github.com/MetaMask/metamask-extension/pull/8974)) +- Fix broken UI upon failed password validation ([#9063](https://github.com/MetaMask/metamask-extension/pull/9063)) +- Fix shifted popup notification when browser is in fullscreen on macOS ([#9075](https://github.com/MetaMask/metamask-extension/pull/9075)) +- Support longer text in network dropdown ([#9085](https://github.com/MetaMask/metamask-extension/pull/9085)) +- Fix onboarding bug where user can be asked to verify seed phrase twice ([#8873](https://github.com/MetaMask/metamask-extension/pull/8873)) +- Replace "Email us" button with "Contact us" button ([#9104](https://github.com/MetaMask/metamask-extension/pull/9104)) +- Fix bug where `accountsChanged` events stop after a dapp connection is closed. ([#9137](https://github.com/MetaMask/metamask-extension/pull/9137)) +- Fix network name alignment ([#9152](https://github.com/MetaMask/metamask-extension/pull/9152)) +- Add web3 usage metrics and prepare for web3 removal ([#9144](https://github.com/MetaMask/metamask-extension/pull/9144)) ## [8.0.6] - 2020-07-23 ### Uncategorized -- [#9030](https://github.com/MetaMask/metamask-extension/pull/9030): Hide "delete" button when editing contact of wallet account -- [#9031](https://github.com/MetaMask/metamask-extension/pull/9031): Fix crash upon removing contact -- [#9032](https://github.com/MetaMask/metamask-extension/pull/9032): Do not show spend limit for approvals -- [#9046](https://github.com/MetaMask/metamask-extension/pull/9046): Update @metamask/inpage-provider@6.1.0 -- [#9048](https://github.com/MetaMask/metamask-extension/pull/9048): Skip attempts to resolve 0x contract prefix -- [#9051](https://github.com/MetaMask/metamask-extension/pull/9051): Use content-hash@2.5.2 -- [#9056](https://github.com/MetaMask/metamask-extension/pull/9056): Display at least one significant digit of small non-zero token balances +- Hide "delete" button when editing contact of wallet account ([#9030](https://github.com/MetaMask/metamask-extension/pull/9030)) +- Fix crash upon removing contact ([#9031](https://github.com/MetaMask/metamask-extension/pull/9031)) +- Do not show spend limit for approvals ([#9032](https://github.com/MetaMask/metamask-extension/pull/9032)) +- Update @metamask/inpage-provider@6.1.0 ([#9046](https://github.com/MetaMask/metamask-extension/pull/9046)) +- Skip attempts to resolve 0x contract prefix ([#9048](https://github.com/MetaMask/metamask-extension/pull/9048)) +- Use content-hash@2.5.2 ([#9051](https://github.com/MetaMask/metamask-extension/pull/9051)) +- Display at least one significant digit of small non-zero token balances ([#9056](https://github.com/MetaMask/metamask-extension/pull/9056)) ## [8.0.5] - 2020-07-17 ### Uncategorized -- [#8942](https://github.com/MetaMask/metamask-extension/pull/8942): Fix display of incoming transactions (#8942) -- [#8998](https://github.com/MetaMask/metamask-extension/pull/8998): Fix `web3_clientVersion` method (#8998) -- [#9003](https://github.com/MetaMask/metamask-extension/pull/9003): @metamask/inpage-provider@6.0.1 (#9003) -- [#9006](https://github.com/MetaMask/metamask-extension/pull/9006): Hide loading indication after `personal_sign` (#9006) -- [#9011](https://github.com/MetaMask/metamask-extension/pull/9011): Display pending notifications after connect flow (#9011) -- [#9012](https://github.com/MetaMask/metamask-extension/pull/9012): Skip render when home page is closing or redirecting (#9012) -- [#9010](https://github.com/MetaMask/metamask-extension/pull/9010): Limit number of transactions passed outside of TransactionController (#9010) -- [#9023](https://github.com/MetaMask/metamask-extension/pull/9023): Clear AccountTracker accounts and CachedBalances on createNewVaultAndRestore (#9023) -- [#9025](https://github.com/MetaMask/metamask-extension/pull/9025): Catch gas estimate errors (#9025) -- [#9026](https://github.com/MetaMask/metamask-extension/pull/9026): Clear transactions on createNewVaultAndRestore (#9026) +- Fix display of incoming transactions ([#8942](https://github.com/MetaMask/metamask-extension/pull/8942)) +- Fix `web3_clientVersion` method ([#8998](https://github.com/MetaMask/metamask-extension/pull/8998)) +- @metamask/inpage-provider@6.0.1 ([#9003](https://github.com/MetaMask/metamask-extension/pull/9003)) +- Hide loading indication after `personal_sign` ([#9006](https://github.com/MetaMask/metamask-extension/pull/9006)) +- Display pending notifications after connect flow ([#9011](https://github.com/MetaMask/metamask-extension/pull/9011)) +- Skip render when home page is closing or redirecting ([#9012](https://github.com/MetaMask/metamask-extension/pull/9012)) +- Limit number of transactions passed outside of TransactionController ([#9010](https://github.com/MetaMask/metamask-extension/pull/9010)) +- Clear AccountTracker accounts and CachedBalances on createNewVaultAndRestore ([#9023](https://github.com/MetaMask/metamask-extension/pull/9023)) +- Catch gas estimate errors ([#9025](https://github.com/MetaMask/metamask-extension/pull/9025)) +- Clear transactions on createNewVaultAndRestore ([#9026](https://github.com/MetaMask/metamask-extension/pull/9026)) ## [8.0.4] - 2020-07-08 ### Uncategorized -- [#8934](https://github.com/MetaMask/metamask-extension/pull/8934): Fix transaction activity on custom networks -- [#8936](https://github.com/MetaMask/metamask-extension/pull/8936): Fix account tracker optimization +- Fix transaction activity on custom networks ([#8934](https://github.com/MetaMask/metamask-extension/pull/8934)) +- Fix account tracker optimization ([#8936](https://github.com/MetaMask/metamask-extension/pull/8936)) ## [8.0.3] - 2020-07-06 ### Uncategorized -- [#8921](https://github.com/MetaMask/metamask-extension/pull/8921): Restore missing 'data' provider event, and fix 'notification' event -- [#8923](https://github.com/MetaMask/metamask-extension/pull/8923): Normalize the 'from' parameter for `eth_sendTransaction` -- [#8924](https://github.com/MetaMask/metamask-extension/pull/8924): Fix handling of multiple `eth_requestAccount` messages from the same domain -- [#8917](https://github.com/MetaMask/metamask-extension/pull/8917): Update Italian translations +- Restore missing 'data' provider event, and fix 'notification' event ([#8921](https://github.com/MetaMask/metamask-extension/pull/8921)) +- Normalize the 'from' parameter for `eth_sendTransaction` ([#8923](https://github.com/MetaMask/metamask-extension/pull/8923)) +- Fix handling of multiple `eth_requestAccount` messages from the same domain ([#8924](https://github.com/MetaMask/metamask-extension/pull/8924)) +- Update Italian translations ([#8917](https://github.com/MetaMask/metamask-extension/pull/8917)) ## [8.0.2] - 2020-07-03 ### Uncategorized -- [#8907](https://github.com/MetaMask/metamask-extension/pull/8907): Tolerate missing or falsey substitutions -- [#8908](https://github.com/MetaMask/metamask-extension/pull/8908): Fix activity log inline buttons -- [#8909](https://github.com/MetaMask/metamask-extension/pull/8909): Prevent confirming blank suggested token -- [#8910](https://github.com/MetaMask/metamask-extension/pull/8910): Handle suggested token resolved elsewhere -- [#8913](https://github.com/MetaMask/metamask-extension/pull/8913): Fix Kovan chain ID constant +- Tolerate missing or falsey substitutions ([#8907](https://github.com/MetaMask/metamask-extension/pull/8907)) +- Fix activity log inline buttons ([#8908](https://github.com/MetaMask/metamask-extension/pull/8908)) +- Prevent confirming blank suggested token ([#8909](https://github.com/MetaMask/metamask-extension/pull/8909)) +- Handle suggested token resolved elsewhere ([#8910](https://github.com/MetaMask/metamask-extension/pull/8910)) +- Fix Kovan chain ID constant ([#8913](https://github.com/MetaMask/metamask-extension/pull/8913)) ## [8.0.1] - 2020-07-02 ### Uncategorized -- [#8874](https://github.com/MetaMask/metamask-extension/pull/8874): Fx overflow behaviour of add token list -- [#8885](https://github.com/MetaMask/metamask-extension/pull/8885): Show `origin` in connect flow rather than site name -- [#8883](https://github.com/MetaMask/metamask-extension/pull/8883): Allow setting a custom nonce of zero -- [#8889](https://github.com/MetaMask/metamask-extension/pull/8889): Fix language code format mismatch -- [#8891](https://github.com/MetaMask/metamask-extension/pull/8891): Prevent showing connected accounts without origin -- [#8893](https://github.com/MetaMask/metamask-extension/pull/8893): Prevent manually connecting to extension UI -- [#8895](https://github.com/MetaMask/metamask-extension/pull/8895): Allow localized messages to not use substitutions -- [#8897](https://github.com/MetaMask/metamask-extension/pull/8897): Update eth-keyring-controller to fix erasure of imported/hardware account names -- [#8896](https://github.com/MetaMask/metamask-extension/pull/8896): Include relative time polyfill locale data -- [#8898](https://github.com/MetaMask/metamask-extension/pull/8898): Replace percentage opacity value +- Fx overflow behaviour of add token list ([#8874](https://github.com/MetaMask/metamask-extension/pull/8874)) +- Show `origin` in connect flow rather than site name ([#8885](https://github.com/MetaMask/metamask-extension/pull/8885)) +- Allow setting a custom nonce of zero ([#8883](https://github.com/MetaMask/metamask-extension/pull/8883)) +- Fix language code format mismatch ([#8889](https://github.com/MetaMask/metamask-extension/pull/8889)) +- Prevent showing connected accounts without origin ([#8891](https://github.com/MetaMask/metamask-extension/pull/8891)) +- Prevent manually connecting to extension UI ([#8893](https://github.com/MetaMask/metamask-extension/pull/8893)) +- Allow localized messages to not use substitutions ([#8895](https://github.com/MetaMask/metamask-extension/pull/8895)) +- Update eth-keyring-controller to fix erasure of imported/hardware account names ([#8897](https://github.com/MetaMask/metamask-extension/pull/8897)) +- Include relative time polyfill locale data ([#8896](https://github.com/MetaMask/metamask-extension/pull/8896)) +- Replace percentage opacity value ([#8898](https://github.com/MetaMask/metamask-extension/pull/8898)) ## [8.0.0] - 2020-07-01 ### Uncategorized -- [#7004](https://github.com/MetaMask/metamask-extension/pull/7004): Add permission system -- [#7261](https://github.com/MetaMask/metamask-extension/pull/7261): Search accounts by name -- [#7483](https://github.com/MetaMask/metamask-extension/pull/7483): Buffer 3 blocks before dropping a transaction -- [#7620](https://github.com/MetaMask/metamask-extension/pull/7620): Handle one specific permissions request per tab -- [#7686](https://github.com/MetaMask/metamask-extension/pull/7686): Add description to Reset Account in settings -- [#7362](https://github.com/MetaMask/metamask-extension/pull/7362): Allow custom IPFS gateway and use more secure default gateway -- [#7696](https://github.com/MetaMask/metamask-extension/pull/7696): Adjust colour of Reset Account button to reflect danger -- [#7602](https://github.com/MetaMask/metamask-extension/pull/7602): Support new onboarding library -- [#7672](https://github.com/MetaMask/metamask-extension/pull/7672): Update custom token symbol length restriction message -- [#7747](https://github.com/MetaMask/metamask-extension/pull/7747): Handle 'Enter' keypress on restore from seed screen -- [#7810](https://github.com/MetaMask/metamask-extension/pull/7810): Remove padding around advanced gas info icon -- [#7840](https://github.com/MetaMask/metamask-extension/pull/7840): Force background state update after removing an account -- [#7853](https://github.com/MetaMask/metamask-extension/pull/7853): Change "Log In/Out" terminology to "Unlock/Lock" -- [#7863](https://github.com/MetaMask/metamask-extension/pull/7863): Add mechanism to randomize seed phrase filename -- [#7933](https://github.com/MetaMask/metamask-extension/pull/7933): Sort seed phrase confirmation buttons alphabetically -- [#7987](https://github.com/MetaMask/metamask-extension/pull/7987): Add support for 24 word seed phrases -- [#7971](https://github.com/MetaMask/metamask-extension/pull/7971): Use contact name instead of address during send flow -- [#8050](https://github.com/MetaMask/metamask-extension/pull/8050): Add title attribute to transaction title -- [#7831](https://github.com/MetaMask/metamask-extension/pull/7831): Implement encrypt/decrypt feature -- [#8125](https://github.com/MetaMask/metamask-extension/pull/8125): Add setting for disabling Eth Phishing Detection -- [#8148](https://github.com/MetaMask/metamask-extension/pull/8148): Prevent external domains from submitting more than one perm request at a time -- [#8149](https://github.com/MetaMask/metamask-extension/pull/8149): Wait for extension unlock before processing eth_requestAccounts -- [#8201](https://github.com/MetaMask/metamask-extension/pull/8201): Add Idle Timeout for Sync with mobile -- [#8247](https://github.com/MetaMask/metamask-extension/pull/8247): Update Italian translation -- [#8246](https://github.com/MetaMask/metamask-extension/pull/8246): Make seed phrase import case-insensitive -- [#8254](https://github.com/MetaMask/metamask-extension/pull/8254): Convert Connected Sites page to modal -- [#8259](https://github.com/MetaMask/metamask-extension/pull/8259): Update token cell to show inline stale balance warning -- [#8264](https://github.com/MetaMask/metamask-extension/pull/8264): Move asset list to home tab on small screens -- [#8270](https://github.com/MetaMask/metamask-extension/pull/8270): Connected status indicator -- [#8078](https://github.com/MetaMask/metamask-extension/pull/8078): Allow selecting multiple accounts during connect flow -- [#8318](https://github.com/MetaMask/metamask-extension/pull/8318): Focus the notification popup if it's already open -- [#8356](https://github.com/MetaMask/metamask-extension/pull/8356): Position notification relative to last focused window -- [#8358](https://github.com/MetaMask/metamask-extension/pull/8358): Close notification UI if no unapproved confirmations -- [#8293](https://github.com/MetaMask/metamask-extension/pull/8293): Add popup explaining connection indicator to existing users -- [#8435](https://github.com/MetaMask/metamask-extension/pull/8435): Correctly detect changes to background state -- [#7912](https://github.com/MetaMask/metamask-extension/pull/7912): Disable import button for empty string/file -- [#8246](https://github.com/MetaMask/metamask-extension/pull/8246): Make seed phrase import case-insensitive -- [#8312](https://github.com/MetaMask/metamask-extension/pull/8312): Alert user upon switching to unconnected account -- [#8445](https://github.com/MetaMask/metamask-extension/pull/8445): Only updating pending transactions upon block update -- [#8467](https://github.com/MetaMask/metamask-extension/pull/8467): Fix firefox popup location -- [#8486](https://github.com/MetaMask/metamask-extension/pull/8486): Prevent race condition where transaction value set in UI is overwritten -- [#8490](https://github.com/MetaMask/metamask-extension/pull/8490): Fix default gas race condition -- [#8491](https://github.com/MetaMask/metamask-extension/pull/8491): Update tokens after importing account -- [#8496](https://github.com/MetaMask/metamask-extension/pull/8496): Enable disconnecting a single account or all accounts -- [#8502](https://github.com/MetaMask/metamask-extension/pull/8502): Add support for IPFS address resolution -- [#8419](https://github.com/MetaMask/metamask-extension/pull/8419): Add version dimension to metrics event -- [#8508](https://github.com/MetaMask/metamask-extension/pull/8508): Open notification UI when eth_requestAccounts waits for unlock -- [#8533](https://github.com/MetaMask/metamask-extension/pull/8533): Prevent negative values on gas inputs -- [#8550](https://github.com/MetaMask/metamask-extension/pull/8550): Allow disabling alerts -- [#8563](https://github.com/MetaMask/metamask-extension/pull/8563): Synchronously update transaction status -- [#8567](https://github.com/MetaMask/metamask-extension/pull/8567): Improve Spanish localized message -- [#8532](https://github.com/MetaMask/metamask-extension/pull/8532): Add switch to connected account alert -- [#8575](https://github.com/MetaMask/metamask-extension/pull/8575): Stop polling for recent blocks on custom networks when UI is closed -- [#8579](https://github.com/MetaMask/metamask-extension/pull/8579): Fix Matomo dimension IDs -- [#8592](https://github.com/MetaMask/metamask-extension/pull/8592): Handle trailing / in block explorer URLs -- [#8313](https://github.com/MetaMask/metamask-extension/pull/8313): Add Connected Accounts modal -- [#8609](https://github.com/MetaMask/metamask-extension/pull/8609): Sticky position the tabs at the top -- [#8634](https://github.com/MetaMask/metamask-extension/pull/8634): Define global `web3` as non-enumerable -- [#8601](https://github.com/MetaMask/metamask-extension/pull/8601): warn user when sending from different account -- [#8612](https://github.com/MetaMask/metamask-extension/pull/8612): Persist home tab state -- [#8564](https://github.com/MetaMask/metamask-extension/pull/8564): Implement new transaction list design -- [#8596](https://github.com/MetaMask/metamask-extension/pull/8596): Restrict the size of the permissions metadata store -- [#8654](https://github.com/MetaMask/metamask-extension/pull/8654): Update account options menu design -- [#8657](https://github.com/MetaMask/metamask-extension/pull/8657): Implement new fullscreen design -- [#8663](https://github.com/MetaMask/metamask-extension/pull/8663): Show hostname in the disconnect confirmation -- [#8665](https://github.com/MetaMask/metamask-extension/pull/8665): Make address display wider in Account Details -- [#8670](https://github.com/MetaMask/metamask-extension/pull/8670): Fix token `decimal` type -- [#8653](https://github.com/MetaMask/metamask-extension/pull/8653): Limit Dapp permissions to primary account -- [#8666](https://github.com/MetaMask/metamask-extension/pull/8666): Manually connect via the full connect flow -- [#8677](https://github.com/MetaMask/metamask-extension/pull/8677): Add metrics events for Wyre and CoinSwitch -- [#8680](https://github.com/MetaMask/metamask-extension/pull/8680): Fix connect hardware styling -- [#8689](https://github.com/MetaMask/metamask-extension/pull/8689): Fix create account form styling -- [#8702](https://github.com/MetaMask/metamask-extension/pull/8702): Fix tab content disappearing during scrolling on macOS Firefox -- [#8696](https://github.com/MetaMask/metamask-extension/pull/8696): Implement asset page -- [#8716](https://github.com/MetaMask/metamask-extension/pull/8716): Add nonce to transaction details -- [#8717](https://github.com/MetaMask/metamask-extension/pull/8717): Use URL origin instead of hostname for permission domains -- [#8747](https://github.com/MetaMask/metamask-extension/pull/8747): Fix account menu entry for imported accounts -- [#8768](https://github.com/MetaMask/metamask-extension/pull/8768): Permissions: Do not display HTTP/HTTPS URL schemes for unique hosts -- [#8730](https://github.com/MetaMask/metamask-extension/pull/8730): Hide seed phrase during Account Import -- [#8785](https://github.com/MetaMask/metamask-extension/pull/8785): Rename 'History' tab to 'Activity' -- [#8781](https://github.com/MetaMask/metamask-extension/pull/8781): use UI button for add token functionality -- [#8786](https://github.com/MetaMask/metamask-extension/pull/8786): Show fiat amounts inline on token transfers -- [#8789](https://github.com/MetaMask/metamask-extension/pull/8789): Warn users to only add custom networks that they trust -- [#8802](https://github.com/MetaMask/metamask-extension/pull/8802): Consolidate connected account alerts -- [#8810](https://github.com/MetaMask/metamask-extension/pull/8810): Remove all user- and translator-facing instances of 'dapp' -- [#8836](https://github.com/MetaMask/metamask-extension/pull/8836): Update method data when cached method data is empty -- [#8833](https://github.com/MetaMask/metamask-extension/pull/8833): Improve error handling when signature requested without a keyholder address -- [#8850](https://github.com/MetaMask/metamask-extension/pull/8850): Stop upper-casing exported private key -- [#8631](https://github.com/MetaMask/metamask-extension/pull/8631): Include imported accounts in mobile sync +- Add permission system ([#7004](https://github.com/MetaMask/metamask-extension/pull/7004)) +- Search accounts by name ([#7261](https://github.com/MetaMask/metamask-extension/pull/7261)) +- Buffer 3 blocks before dropping a transaction ([#7483](https://github.com/MetaMask/metamask-extension/pull/7483)) +- Handle one specific permissions request per tab ([#7620](https://github.com/MetaMask/metamask-extension/pull/7620)) +- Add description to Reset Account in settings ([#7686](https://github.com/MetaMask/metamask-extension/pull/7686)) +- Allow custom IPFS gateway and use more secure default gateway ([#7362](https://github.com/MetaMask/metamask-extension/pull/7362)) +- Adjust colour of Reset Account button to reflect danger ([#7696](https://github.com/MetaMask/metamask-extension/pull/7696)) +- Support new onboarding library ([#7602](https://github.com/MetaMask/metamask-extension/pull/7602)) +- Update custom token symbol length restriction message ([#7672](https://github.com/MetaMask/metamask-extension/pull/7672)) +- Handle 'Enter' keypress on restore from seed screen ([#7747](https://github.com/MetaMask/metamask-extension/pull/7747)) +- Remove padding around advanced gas info icon ([#7810](https://github.com/MetaMask/metamask-extension/pull/7810)) +- Force background state update after removing an account ([#7840](https://github.com/MetaMask/metamask-extension/pull/7840)) +- Change "Log In/Out" terminology to "Unlock/Lock" ([#7853](https://github.com/MetaMask/metamask-extension/pull/7853)) +- Add mechanism to randomize seed phrase filename ([#7863](https://github.com/MetaMask/metamask-extension/pull/7863)) +- Sort seed phrase confirmation buttons alphabetically ([#7933](https://github.com/MetaMask/metamask-extension/pull/7933)) +- Add support for 24 word seed phrases ([#7987](https://github.com/MetaMask/metamask-extension/pull/7987)) +- Use contact name instead of address during send flow ([#7971](https://github.com/MetaMask/metamask-extension/pull/7971)) +- Add title attribute to transaction title ([#8050](https://github.com/MetaMask/metamask-extension/pull/8050)) +- Implement encrypt/decrypt feature ([#7831](https://github.com/MetaMask/metamask-extension/pull/7831)) +- Add setting for disabling Eth Phishing Detection ([#8125](https://github.com/MetaMask/metamask-extension/pull/8125)) +- Prevent external domains from submitting more than one perm request at a time ([#8148](https://github.com/MetaMask/metamask-extension/pull/8148)) +- Wait for extension unlock before processing eth_requestAccounts ([#8149](https://github.com/MetaMask/metamask-extension/pull/8149)) +- Add Idle Timeout for Sync with mobile ([#8201](https://github.com/MetaMask/metamask-extension/pull/8201)) +- Update Italian translation ([#8247](https://github.com/MetaMask/metamask-extension/pull/8247)) +- Make seed phrase import case-insensitive ([#8246](https://github.com/MetaMask/metamask-extension/pull/8246)) +- Convert Connected Sites page to modal ([#8254](https://github.com/MetaMask/metamask-extension/pull/8254)) +- Update token cell to show inline stale balance warning ([#8259](https://github.com/MetaMask/metamask-extension/pull/8259)) +- Move asset list to home tab on small screens ([#8264](https://github.com/MetaMask/metamask-extension/pull/8264)) +- Connected status indicator ([#8270](https://github.com/MetaMask/metamask-extension/pull/8270)) +- Allow selecting multiple accounts during connect flow ([#8078](https://github.com/MetaMask/metamask-extension/pull/8078)) +- Focus the notification popup if it's already open ([#8318](https://github.com/MetaMask/metamask-extension/pull/8318)) +- Position notification relative to last focused window ([#8356](https://github.com/MetaMask/metamask-extension/pull/8356)) +- Close notification UI if no unapproved confirmations ([#8358](https://github.com/MetaMask/metamask-extension/pull/8358)) +- Add popup explaining connection indicator to existing users ([#8293](https://github.com/MetaMask/metamask-extension/pull/8293)) +- Correctly detect changes to background state ([#8435](https://github.com/MetaMask/metamask-extension/pull/8435)) +- Disable import button for empty string/file ([#7912](https://github.com/MetaMask/metamask-extension/pull/7912)) +- Make seed phrase import case-insensitive ([#8246](https://github.com/MetaMask/metamask-extension/pull/8246)) +- Alert user upon switching to unconnected account ([#8312](https://github.com/MetaMask/metamask-extension/pull/8312)) +- Only updating pending transactions upon block update ([#8445](https://github.com/MetaMask/metamask-extension/pull/8445)) +- Fix firefox popup location ([#8467](https://github.com/MetaMask/metamask-extension/pull/8467)) +- Prevent race condition where transaction value set in UI is overwritten ([#8486](https://github.com/MetaMask/metamask-extension/pull/8486)) +- Fix default gas race condition ([#8490](https://github.com/MetaMask/metamask-extension/pull/8490)) +- Update tokens after importing account ([#8491](https://github.com/MetaMask/metamask-extension/pull/8491)) +- Enable disconnecting a single account or all accounts ([#8496](https://github.com/MetaMask/metamask-extension/pull/8496)) +- Add support for IPFS address resolution ([#8502](https://github.com/MetaMask/metamask-extension/pull/8502)) +- Add version dimension to metrics event ([#8419](https://github.com/MetaMask/metamask-extension/pull/8419)) +- Open notification UI when eth_requestAccounts waits for unlock ([#8508](https://github.com/MetaMask/metamask-extension/pull/8508)) +- Prevent negative values on gas inputs ([#8533](https://github.com/MetaMask/metamask-extension/pull/8533)) +- Allow disabling alerts ([#8550](https://github.com/MetaMask/metamask-extension/pull/8550)) +- Synchronously update transaction status ([#8563](https://github.com/MetaMask/metamask-extension/pull/8563)) +- Improve Spanish localized message ([#8567](https://github.com/MetaMask/metamask-extension/pull/8567)) +- Add switch to connected account alert ([#8532](https://github.com/MetaMask/metamask-extension/pull/8532)) +- Stop polling for recent blocks on custom networks when UI is closed ([#8575](https://github.com/MetaMask/metamask-extension/pull/8575)) +- Fix Matomo dimension IDs ([#8579](https://github.com/MetaMask/metamask-extension/pull/8579)) +- Handle trailing / in block explorer URLs ([#8592](https://github.com/MetaMask/metamask-extension/pull/8592)) +- Add Connected Accounts modal ([#8313](https://github.com/MetaMask/metamask-extension/pull/8313)) +- Sticky position the tabs at the top ([#8609](https://github.com/MetaMask/metamask-extension/pull/8609)) +- Define global `web3` as non-enumerable ([#8634](https://github.com/MetaMask/metamask-extension/pull/8634)) +- warn user when sending from different account ([#8601](https://github.com/MetaMask/metamask-extension/pull/8601)) +- Persist home tab state ([#8612](https://github.com/MetaMask/metamask-extension/pull/8612)) +- Implement new transaction list design ([#8564](https://github.com/MetaMask/metamask-extension/pull/8564)) +- Restrict the size of the permissions metadata store ([#8596](https://github.com/MetaMask/metamask-extension/pull/8596)) +- Update account options menu design ([#8654](https://github.com/MetaMask/metamask-extension/pull/8654)) +- Implement new fullscreen design ([#8657](https://github.com/MetaMask/metamask-extension/pull/8657)) +- Show hostname in the disconnect confirmation ([#8663](https://github.com/MetaMask/metamask-extension/pull/8663)) +- Make address display wider in Account Details ([#8665](https://github.com/MetaMask/metamask-extension/pull/8665)) +- Fix token `decimal` type ([#8670](https://github.com/MetaMask/metamask-extension/pull/8670)) +- Limit Dapp permissions to primary account ([#8653](https://github.com/MetaMask/metamask-extension/pull/8653)) +- Manually connect via the full connect flow ([#8666](https://github.com/MetaMask/metamask-extension/pull/8666)) +- Add metrics events for Wyre and CoinSwitch ([#8677](https://github.com/MetaMask/metamask-extension/pull/8677)) +- Fix connect hardware styling ([#8680](https://github.com/MetaMask/metamask-extension/pull/8680)) +- Fix create account form styling ([#8689](https://github.com/MetaMask/metamask-extension/pull/8689)) +- Fix tab content disappearing during scrolling on macOS Firefox ([#8702](https://github.com/MetaMask/metamask-extension/pull/8702)) +- Implement asset page ([#8696](https://github.com/MetaMask/metamask-extension/pull/8696)) +- Add nonce to transaction details ([#8716](https://github.com/MetaMask/metamask-extension/pull/8716)) +- Use URL origin instead of hostname for permission domains ([#8717](https://github.com/MetaMask/metamask-extension/pull/8717)) +- Fix account menu entry for imported accounts ([#8747](https://github.com/MetaMask/metamask-extension/pull/8747)) +- Permissions: Do not display HTTP/HTTPS URL schemes for unique hosts ([#8768](https://github.com/MetaMask/metamask-extension/pull/8768)) +- Hide seed phrase during Account Import ([#8730](https://github.com/MetaMask/metamask-extension/pull/8730)) +- Rename 'History' tab to 'Activity' ([#8785](https://github.com/MetaMask/metamask-extension/pull/8785)) +- use UI button for add token functionality ([#8781](https://github.com/MetaMask/metamask-extension/pull/8781)) +- Show fiat amounts inline on token transfers ([#8786](https://github.com/MetaMask/metamask-extension/pull/8786)) +- Warn users to only add custom networks that they trust ([#8789](https://github.com/MetaMask/metamask-extension/pull/8789)) +- Consolidate connected account alerts ([#8802](https://github.com/MetaMask/metamask-extension/pull/8802)) +- Remove all user- and translator-facing instances of 'dapp' ([#8810](https://github.com/MetaMask/metamask-extension/pull/8810)) +- Update method data when cached method data is empty ([#8836](https://github.com/MetaMask/metamask-extension/pull/8836)) +- Improve error handling when signature requested without a keyholder address ([#8833](https://github.com/MetaMask/metamask-extension/pull/8833)) +- Stop upper-casing exported private key ([#8850](https://github.com/MetaMask/metamask-extension/pull/8850)) +- Include imported accounts in mobile sync ([#8631](https://github.com/MetaMask/metamask-extension/pull/8631)) ## [7.7.9] - 2020-05-04 ### Uncategorized -- [#8446](https://github.com/MetaMask/metamask-extension/pull/8446): Fix popup not opening -- [#8449](https://github.com/MetaMask/metamask-extension/pull/8449): Skip adding history entry for empty txMeta diffs -- [#8447](https://github.com/MetaMask/metamask-extension/pull/8447): Delete Dai/Sai migration notification -- [#8460](https://github.com/MetaMask/metamask-extension/pull/8460): Update deposit copy for Wyre -- [#8458](https://github.com/MetaMask/metamask-extension/pull/8458): Snapshot txMeta without cloning history -- [#8459](https://github.com/MetaMask/metamask-extension/pull/8459): Fix method registry initialization -- [#8455](https://github.com/MetaMask/metamask-extension/pull/8455): Add Dai/Sai to currency display -- [#8461](https://github.com/MetaMask/metamask-extension/pull/8461): Prevent network switch upon close of network timeout overlay -- [#8457](https://github.com/MetaMask/metamask-extension/pull/8457): Add INR currency option -- [#8462](https://github.com/MetaMask/metamask-extension/pull/8462): Fix display of Kovan and Rinkeby chain IDs -- [#8465](https://github.com/MetaMask/metamask-extension/pull/8465): Use ethereum-ens-network-map for network support -- [#8463](https://github.com/MetaMask/metamask-extension/pull/8463): Update deprecated Etherscam link -- [#8474](https://github.com/MetaMask/metamask-extension/pull/8474): Only update pending transactions upon block update -- [#8476](https://github.com/MetaMask/metamask-extension/pull/8476): Update eth-contract-metadata -- [#8509](https://github.com/MetaMask/metamask-extension/pull/8509): Fix Tohen Typo +- Fix popup not opening ([#8446](https://github.com/MetaMask/metamask-extension/pull/8446)) +- Skip adding history entry for empty txMeta diffs ([#8449](https://github.com/MetaMask/metamask-extension/pull/8449)) +- Delete Dai/Sai migration notification ([#8447](https://github.com/MetaMask/metamask-extension/pull/8447)) +- Update deposit copy for Wyre ([#8460](https://github.com/MetaMask/metamask-extension/pull/8460)) +- Snapshot txMeta without cloning history ([#8458](https://github.com/MetaMask/metamask-extension/pull/8458)) +- Fix method registry initialization ([#8459](https://github.com/MetaMask/metamask-extension/pull/8459)) +- Add Dai/Sai to currency display ([#8455](https://github.com/MetaMask/metamask-extension/pull/8455)) +- Prevent network switch upon close of network timeout overlay ([#8461](https://github.com/MetaMask/metamask-extension/pull/8461)) +- Add INR currency option ([#8457](https://github.com/MetaMask/metamask-extension/pull/8457)) +- Fix display of Kovan and Rinkeby chain IDs ([#8462](https://github.com/MetaMask/metamask-extension/pull/8462)) +- Use ethereum-ens-network-map for network support ([#8465](https://github.com/MetaMask/metamask-extension/pull/8465)) +- Update deprecated Etherscam link ([#8463](https://github.com/MetaMask/metamask-extension/pull/8463)) +- Only update pending transactions upon block update ([#8474](https://github.com/MetaMask/metamask-extension/pull/8474)) +- Update eth-contract-metadata ([#8476](https://github.com/MetaMask/metamask-extension/pull/8476)) +- Fix Tohen Typo ([#8509](https://github.com/MetaMask/metamask-extension/pull/8509)) ## [7.7.8] - 2020-03-13 ### Uncategorized -- [#8176](https://github.com/MetaMask/metamask-extension/pull/8176): Handle and set gas estimation when max mode is clicked -- [#8178](https://github.com/MetaMask/metamask-extension/pull/8178): Use specified gas limit when speeding up a transaction +- Handle and set gas estimation when max mode is clicked ([#8176](https://github.com/MetaMask/metamask-extension/pull/8176)) +- Use specified gas limit when speeding up a transaction ([#8178](https://github.com/MetaMask/metamask-extension/pull/8178)) ## [7.7.7] - 2020-03-04 ### Uncategorized -- [#8162](https://github.com/MetaMask/metamask-extension/pull/8162): Remove invalid Ledger accounts -- [#8163](https://github.com/MetaMask/metamask-extension/pull/8163): Fix account index check +- Remove invalid Ledger accounts ([#8162](https://github.com/MetaMask/metamask-extension/pull/8162)) +- Fix account index check ([#8163](https://github.com/MetaMask/metamask-extension/pull/8163)) ## [7.7.6] - 2020-03-03 ### Uncategorized -- [#8154](https://github.com/MetaMask/metamask-extension/pull/8154): Prevent signing from incorrect Ledger account +- Prevent signing from incorrect Ledger account ([#8154](https://github.com/MetaMask/metamask-extension/pull/8154)) ## [7.7.5] - 2020-02-18 ### Uncategorized -- [#8053](https://github.com/MetaMask/metamask-extension/pull/8053): Inline the source text not the binary encoding for inpage script -- [#8049](https://github.com/MetaMask/metamask-extension/pull/8049): Add warning to watchAsset API when editing a known token -- [#8051](https://github.com/MetaMask/metamask-extension/pull/8051): Update Wyre ETH purchase url -- [#8059](https://github.com/MetaMask/metamask-extension/pull/8059): Attempt ENS resolution on any valid domain name +- Inline the source text not the binary encoding for inpage script ([#8053](https://github.com/MetaMask/metamask-extension/pull/8053)) +- Add warning to watchAsset API when editing a known token ([#8049](https://github.com/MetaMask/metamask-extension/pull/8049)) +- Update Wyre ETH purchase url ([#8051](https://github.com/MetaMask/metamask-extension/pull/8051)) +- Attempt ENS resolution on any valid domain name ([#8059](https://github.com/MetaMask/metamask-extension/pull/8059)) ## [7.7.4] - 2020-01-31 ### Uncategorized -- [#7918](https://github.com/MetaMask/metamask-extension/pull/7918): Update data on Approve screen after updating custom spend limit -- [#7919](https://github.com/MetaMask/metamask-extension/pull/7919): Allow editing max spend limit -- [#7920](https://github.com/MetaMask/metamask-extension/pull/7920): Validate custom spend limit -- [#7944](https://github.com/MetaMask/metamask-extension/pull/7944): Only resolve ENS on mainnet -- [#7954](https://github.com/MetaMask/metamask-extension/pull/7954): Update ENS registry addresses +- Update data on Approve screen after updating custom spend limit ([#7918](https://github.com/MetaMask/metamask-extension/pull/7918)) +- Allow editing max spend limit ([#7919](https://github.com/MetaMask/metamask-extension/pull/7919)) +- Validate custom spend limit ([#7920](https://github.com/MetaMask/metamask-extension/pull/7920)) +- Only resolve ENS on mainnet ([#7944](https://github.com/MetaMask/metamask-extension/pull/7944)) +- Update ENS registry addresses ([#7954](https://github.com/MetaMask/metamask-extension/pull/7954)) ## [7.7.3] - 2020-01-27 ### Uncategorized -- [#7894](https://github.com/MetaMask/metamask-extension/pull/7894): Update GABA dependency version -- [#7901](https://github.com/MetaMask/metamask-extension/pull/7901): Use eth-contract-metadata@1.12.1 -- [#7910](https://github.com/MetaMask/metamask-extension/pull/7910): Fixing broken JSON import help link +- Update GABA dependency version ([#7894](https://github.com/MetaMask/metamask-extension/pull/7894)) +- Use eth-contract-metadata@1.12.1 ([#7901](https://github.com/MetaMask/metamask-extension/pull/7901)) +- Fixing broken JSON import help link ([#7910](https://github.com/MetaMask/metamask-extension/pull/7910)) ## [7.7.2] - 2020-01-13 ### Uncategorized -- [#7753](https://github.com/MetaMask/metamask-extension/pull/7753): Fix gas estimate for tokens -- [#7473](https://github.com/MetaMask/metamask-extension/pull/7473): Fix transaction order on transaction confirmation screen +- Fix gas estimate for tokens ([#7753](https://github.com/MetaMask/metamask-extension/pull/7753)) +- Fix transaction order on transaction confirmation screen ([#7473](https://github.com/MetaMask/metamask-extension/pull/7473)) ## [7.7.1] - 2019-12-09 ### Uncategorized -- [#7488](https://github.com/MetaMask/metamask-extension/pull/7488): Fix text overlap when expanding transaction -- [#7491](https://github.com/MetaMask/metamask-extension/pull/7491): Update gas when asset is changed on send screen -- [#7500](https://github.com/MetaMask/metamask-extension/pull/7500): Remove unused onClick prop from Dropdown component -- [#7502](https://github.com/MetaMask/metamask-extension/pull/7502): Fix chainId for non standard networks -- [#7519](https://github.com/MetaMask/metamask-extension/pull/7519): Fixing hardware connect error display -- [#7501](https://github.com/MetaMask/metamask-extension/pull/7501): Fix accessibility of first-time-flow terms checkboxes -- [#7579](https://github.com/MetaMask/metamask-extension/pull/7579): Prevent Maker migration dismissal timeout state from being overwritten -- [#7581](https://github.com/MetaMask/metamask-extension/pull/7581): Persist Maker migration dismissal timeout -- [#7484](https://github.com/MetaMask/metamask-extension/pull/7484): Ensure transactions are shown in the order they are received -- [#7604](https://github.com/MetaMask/metamask-extension/pull/7604): Process URL fragment for ens-ipfs redirects -- [#7628](https://github.com/MetaMask/metamask-extension/pull/7628): Fix typo that resulted in degrated account menu performance -- [#7558](https://github.com/MetaMask/metamask-extension/pull/7558): Use localized messages for NotificationModal buttons +- Fix text overlap when expanding transaction ([#7488](https://github.com/MetaMask/metamask-extension/pull/7488)) +- Update gas when asset is changed on send screen ([#7491](https://github.com/MetaMask/metamask-extension/pull/7491)) +- Remove unused onClick prop from Dropdown component ([#7500](https://github.com/MetaMask/metamask-extension/pull/7500)) +- Fix chainId for non standard networks ([#7502](https://github.com/MetaMask/metamask-extension/pull/7502)) +- Fixing hardware connect error display ([#7519](https://github.com/MetaMask/metamask-extension/pull/7519)) +- Fix accessibility of first-time-flow terms checkboxes ([#7501](https://github.com/MetaMask/metamask-extension/pull/7501)) +- Prevent Maker migration dismissal timeout state from being overwritten ([#7579](https://github.com/MetaMask/metamask-extension/pull/7579)) +- Persist Maker migration dismissal timeout ([#7581](https://github.com/MetaMask/metamask-extension/pull/7581)) +- Ensure transactions are shown in the order they are received ([#7484](https://github.com/MetaMask/metamask-extension/pull/7484)) +- Process URL fragment for ens-ipfs redirects ([#7604](https://github.com/MetaMask/metamask-extension/pull/7604)) +- Fix typo that resulted in degrated account menu performance ([#7628](https://github.com/MetaMask/metamask-extension/pull/7628)) +- Use localized messages for NotificationModal buttons ([#7558](https://github.com/MetaMask/metamask-extension/pull/7558)) ## [7.7.0] - 2019-12-03 [WITHDRAWN] ### Uncategorized -- [#7004](https://github.com/MetaMask/metamask-extension/pull/7004): Connect distinct accounts per site -- [#7480](https://github.com/MetaMask/metamask-extension/pull/7480): Fixed link on root README.md -- [#7482](https://github.com/MetaMask/metamask-extension/pull/7482): Update Wyre ETH purchase url -- [#7484](https://github.com/MetaMask/metamask-extension/pull/7484): Ensure transactions are shown in the order they are received -- [#7491](https://github.com/MetaMask/metamask-extension/pull/7491): Update gas when token is changed on the send screen -- [#7501](https://github.com/MetaMask/metamask-extension/pull/7501): Fix accessibility of first-time-flow terms checkboxes -- [#7502](https://github.com/MetaMask/metamask-extension/pull/7502): Fix chainId for non standard networks -- [#7579](https://github.com/MetaMask/metamask-extension/pull/7579): Fix timing of DAI migration notifications after dismissal -- [#7519](https://github.com/MetaMask/metamask-extension/pull/7519): Fixing hardware connect error display -- [#7558](https://github.com/MetaMask/metamask-extension/pull/7558): Use localized messages for NotificationModal buttons -- [#7488](https://github.com/MetaMask/metamask-extension/pull/7488): Fix text overlap when expanding transaction +- Connect distinct accounts per site ([#7004](https://github.com/MetaMask/metamask-extension/pull/7004)) +- Fixed link on root README.md ([#7480](https://github.com/MetaMask/metamask-extension/pull/7480)) +- Update Wyre ETH purchase url ([#7482](https://github.com/MetaMask/metamask-extension/pull/7482)) +- Ensure transactions are shown in the order they are received ([#7484](https://github.com/MetaMask/metamask-extension/pull/7484)) +- Update gas when token is changed on the send screen ([#7491](https://github.com/MetaMask/metamask-extension/pull/7491)) +- Fix accessibility of first-time-flow terms checkboxes ([#7501](https://github.com/MetaMask/metamask-extension/pull/7501)) +- Fix chainId for non standard networks ([#7502](https://github.com/MetaMask/metamask-extension/pull/7502)) +- Fix timing of DAI migration notifications after dismissal ([#7579](https://github.com/MetaMask/metamask-extension/pull/7579)) +- Fixing hardware connect error display ([#7519](https://github.com/MetaMask/metamask-extension/pull/7519)) +- Use localized messages for NotificationModal buttons ([#7558](https://github.com/MetaMask/metamask-extension/pull/7558)) +- Fix text overlap when expanding transaction ([#7488](https://github.com/MetaMask/metamask-extension/pull/7488)) ## [7.6.1] - 2019-11-19 ### Uncategorized -- [#7475](https://github.com/MetaMask/metamask-extension/pull/7475): Add 'Remind Me Later' to the Maker notification -- [#7436](https://github.com/MetaMask/metamask-extension/pull/7436): Add additional rpcUrl verification -- [#7468](https://github.com/MetaMask/metamask-extension/pull/7468): Show transaction fee units on approve screen +- Add 'Remind Me Later' to the Maker notification ([#7475](https://github.com/MetaMask/metamask-extension/pull/7475)) +- Add additional rpcUrl verification ([#7436](https://github.com/MetaMask/metamask-extension/pull/7436)) +- Show transaction fee units on approve screen ([#7468](https://github.com/MetaMask/metamask-extension/pull/7468)) ## [7.6.0] - 2019-11-18 ### Uncategorized -- [#7450](https://github.com/MetaMask/metamask-extension/pull/7450): Add migration notification for users with non-zero Sai -- [#7461](https://github.com/MetaMask/metamask-extension/pull/7461): Import styles for showing multiple notifications -- [#7451](https://github.com/MetaMask/metamask-extension/pull/7451): Add button disabled when password is empty +- Add migration notification for users with non-zero Sai ([#7450](https://github.com/MetaMask/metamask-extension/pull/7450)) +- Import styles for showing multiple notifications ([#7461](https://github.com/MetaMask/metamask-extension/pull/7461)) +- Add button disabled when password is empty ([#7451](https://github.com/MetaMask/metamask-extension/pull/7451)) ## [7.5.3] - 2019-11-15 ### Uncategorized -- [#7412](https://github.com/MetaMask/metamask-extension/pull/7412): lock eth-contract-metadata (#7412) -- [#7416](https://github.com/MetaMask/metamask-extension/pull/7416): Add eslint import plugin to help detect unresolved paths -- [#7414](https://github.com/MetaMask/metamask-extension/pull/7414): Ensure SignatureRequestOriginal 'beforeunload' handler is bound (#7414) -- [#7430](https://github.com/MetaMask/metamask-extension/pull/7430): Update badge colour -- [#7408](https://github.com/MetaMask/metamask-extension/pull/7408): Utilize the full size of icon space (#7408) -- [#7431](https://github.com/MetaMask/metamask-extension/pull/7431): Add all icons to manifest (#7431) -- [#7426](https://github.com/MetaMask/metamask-extension/pull/7426): Ensure Etherscan result is valid before reading it (#7426) -- [#7434](https://github.com/MetaMask/metamask-extension/pull/7434): Update 512px icon (#7434) -- [#7410](https://github.com/MetaMask/metamask-extension/pull/7410): Fix sourcemaps for Sentry -- [#7420](https://github.com/MetaMask/metamask-extension/pull/7420): Adds and end to end test for typed signature requests -- [#7439](https://github.com/MetaMask/metamask-extension/pull/7439): Add metricsEvent to contextTypes (#7439) -- [#7419](https://github.com/MetaMask/metamask-extension/pull/7419): Added webRequest.RequestFilter to filter main_frame .eth requests (#7419) +- lock eth-contract-metadata ([#7412](https://github.com/MetaMask/metamask-extension/pull/7412)) +- Add eslint import plugin to help detect unresolved paths ([#7416](https://github.com/MetaMask/metamask-extension/pull/7416)) +- Ensure SignatureRequestOriginal 'beforeunload' handler is bound ([#7414](https://github.com/MetaMask/metamask-extension/pull/7414)) +- Update badge colour ([#7430](https://github.com/MetaMask/metamask-extension/pull/7430)) +- Utilize the full size of icon space ([#7408](https://github.com/MetaMask/metamask-extension/pull/7408)) +- Add all icons to manifest ([#7431](https://github.com/MetaMask/metamask-extension/pull/7431)) +- Ensure Etherscan result is valid before reading it ([#7426](https://github.com/MetaMask/metamask-extension/pull/7426)) +- Update 512px icon ([#7434](https://github.com/MetaMask/metamask-extension/pull/7434)) +- Fix sourcemaps for Sentry ([#7410](https://github.com/MetaMask/metamask-extension/pull/7410)) +- Adds and end to end test for typed signature requests ([#7420](https://github.com/MetaMask/metamask-extension/pull/7420)) +- Add metricsEvent to contextTypes ([#7439](https://github.com/MetaMask/metamask-extension/pull/7439)) +- Added webRequest.RequestFilter to filter main_frame .eth requests ([#7419](https://github.com/MetaMask/metamask-extension/pull/7419)) ## [7.5.2] - 2019-11-14 ### Uncategorized -- [#7414](https://github.com/MetaMask/metamask-extension/pull/7414): Ensure SignatureRequestOriginal 'beforeunload' handler is bound +- Ensure SignatureRequestOriginal 'beforeunload' handler is bound ([#7414](https://github.com/MetaMask/metamask-extension/pull/7414)) ## [7.5.1] - 2019-11-13 ### Uncategorized -- [#7402](https://github.com/MetaMask/metamask-extension/pull/7402): Fix regression for signed types data screens -- [#7390](https://github.com/MetaMask/metamask-extension/pull/7390): Update json-rpc-engine -- [#7401](https://github.com/MetaMask/metamask-extension/pull/7401): Reject connection request on window close +- Fix regression for signed types data screens ([#7402](https://github.com/MetaMask/metamask-extension/pull/7402)) +- Update json-rpc-engine ([#7390](https://github.com/MetaMask/metamask-extension/pull/7390)) +- Reject connection request on window close ([#7401](https://github.com/MetaMask/metamask-extension/pull/7401)) ## [7.5.0] - 2019-11-12 ### Uncategorized -- [#7328](https://github.com/MetaMask/metamask-extension/pull/7328): ignore known transactions on first broadcast and continue with normal flow -- [#7327](https://github.com/MetaMask/metamask-extension/pull/7327): eth_getTransactionByHash will now check metamask's local history for pending transactions -- [#7333](https://github.com/MetaMask/metamask-extension/pull/7333): Cleanup beforeunload handler after transaction is resolved -- [#7038](https://github.com/MetaMask/metamask-extension/pull/7038): Add support for ZeroNet -- [#7334](https://github.com/MetaMask/metamask-extension/pull/7334): Add web3 deprecation warning -- [#6924](https://github.com/MetaMask/metamask-extension/pull/6924): Add Estimated time to pending tx -- [#7177](https://github.com/MetaMask/metamask-extension/pull/7177): ENS Reverse Resolution support -- [#6891](https://github.com/MetaMask/metamask-extension/pull/6891): New signature request v3 UI -- [#7348](https://github.com/MetaMask/metamask-extension/pull/7348): fix width in first time flow button -- [#7271](https://github.com/MetaMask/metamask-extension/pull/7271): Redesign approve screen -- [#7354](https://github.com/MetaMask/metamask-extension/pull/7354): fix account menu width -- [#7379](https://github.com/MetaMask/metamask-extension/pull/7379): Set default advanced tab gas limit -- [#7380](https://github.com/MetaMask/metamask-extension/pull/7380): Fix advanced tab gas chart -- [#7374](https://github.com/MetaMask/metamask-extension/pull/7374): Hide accounts dropdown scrollbars on Firefox -- [#7357](https://github.com/MetaMask/metamask-extension/pull/7357): Update to gaba@1.8.0 -- [#7335](https://github.com/MetaMask/metamask-extension/pull/7335): Add onbeforeunload and have it call onCancel +- ignore known transactions on first broadcast and continue with normal flow ([#7328](https://github.com/MetaMask/metamask-extension/pull/7328)) +- eth_getTransactionByHash will now check metamask's local history for pending transactions ([#7327](https://github.com/MetaMask/metamask-extension/pull/7327)) +- Cleanup beforeunload handler after transaction is resolved ([#7333](https://github.com/MetaMask/metamask-extension/pull/7333)) +- Add support for ZeroNet ([#7038](https://github.com/MetaMask/metamask-extension/pull/7038)) +- Add web3 deprecation warning ([#7334](https://github.com/MetaMask/metamask-extension/pull/7334)) +- Add Estimated time to pending tx ([#6924](https://github.com/MetaMask/metamask-extension/pull/6924)) +- ENS Reverse Resolution support ([#7177](https://github.com/MetaMask/metamask-extension/pull/7177)) +- New signature request v3 UI ([#6891](https://github.com/MetaMask/metamask-extension/pull/6891)) +- fix width in first time flow button ([#7348](https://github.com/MetaMask/metamask-extension/pull/7348)) +- Redesign approve screen ([#7271](https://github.com/MetaMask/metamask-extension/pull/7271)) +- fix account menu width ([#7354](https://github.com/MetaMask/metamask-extension/pull/7354)) +- Set default advanced tab gas limit ([#7379](https://github.com/MetaMask/metamask-extension/pull/7379)) +- Fix advanced tab gas chart ([#7380](https://github.com/MetaMask/metamask-extension/pull/7380)) +- Hide accounts dropdown scrollbars on Firefox ([#7374](https://github.com/MetaMask/metamask-extension/pull/7374)) +- Update to gaba@1.8.0 ([#7357](https://github.com/MetaMask/metamask-extension/pull/7357)) +- Add onbeforeunload and have it call onCancel ([#7335](https://github.com/MetaMask/metamask-extension/pull/7335)) ## [7.4.0] - 2019-11-04 ### Uncategorized -- [#7186](https://github.com/MetaMask/metamask-extension/pull/7186): Use `AdvancedGasInputs` in `AdvancedTabContent` -- [#7304](https://github.com/MetaMask/metamask-extension/pull/7304): Move signTypedData signing out to keyrings -- [#7306](https://github.com/MetaMask/metamask-extension/pull/7306): correct the zh-TW translation -- [#7309](https://github.com/MetaMask/metamask-extension/pull/7309): Freeze Promise global on boot -- [#7296](https://github.com/MetaMask/metamask-extension/pull/7296): Add "Retry" option for failed transactions -- [#7319](https://github.com/MetaMask/metamask-extension/pull/7319): Fix transaction list item status spacing issue -- [#7218](https://github.com/MetaMask/metamask-extension/pull/7218): Add hostname and extensionId to site metadata -- [#7324](https://github.com/MetaMask/metamask-extension/pull/7324): Fix contact deletion -- [#7326](https://github.com/MetaMask/metamask-extension/pull/7326): Fix edit contact details -- [#7325](https://github.com/MetaMask/metamask-extension/pull/7325): Update eth-json-rpc-filters to fix memory leak -- [#7334](https://github.com/MetaMask/metamask-extension/pull/7334): Add web3 deprecation warning +- Use `AdvancedGasInputs` in `AdvancedTabContent` ([#7186](https://github.com/MetaMask/metamask-extension/pull/7186)) +- Move signTypedData signing out to keyrings ([#7304](https://github.com/MetaMask/metamask-extension/pull/7304)) +- correct the zh-TW translation ([#7306](https://github.com/MetaMask/metamask-extension/pull/7306)) +- Freeze Promise global on boot ([#7309](https://github.com/MetaMask/metamask-extension/pull/7309)) +- Add "Retry" option for failed transactions ([#7296](https://github.com/MetaMask/metamask-extension/pull/7296)) +- Fix transaction list item status spacing issue ([#7319](https://github.com/MetaMask/metamask-extension/pull/7319)) +- Add hostname and extensionId to site metadata ([#7218](https://github.com/MetaMask/metamask-extension/pull/7218)) +- Fix contact deletion ([#7324](https://github.com/MetaMask/metamask-extension/pull/7324)) +- Fix edit contact details ([#7326](https://github.com/MetaMask/metamask-extension/pull/7326)) +- Update eth-json-rpc-filters to fix memory leak ([#7325](https://github.com/MetaMask/metamask-extension/pull/7325)) +- Add web3 deprecation warning ([#7334](https://github.com/MetaMask/metamask-extension/pull/7334)) ## [7.3.1] - 2019-10-22 ### Uncategorized -- [#7298](https://github.com/MetaMask/metamask-extension/pull/7298): Turn off full screen vs popup a/b test +- Turn off full screen vs popup a/b test ([#7298](https://github.com/MetaMask/metamask-extension/pull/7298)) ## [7.3.0] - 2019-10-21 ### Uncategorized -- [#6972](https://github.com/MetaMask/metamask-extension/pull/6972): 3box integration -- [#7168](https://github.com/MetaMask/metamask-extension/pull/7168): Add fixes for German translations -- [#7170](https://github.com/MetaMask/metamask-extension/pull/7170): Remove the disk store -- [#7176](https://github.com/MetaMask/metamask-extension/pull/7176): Performance: Delivery optimized images -- [#7189](https://github.com/MetaMask/metamask-extension/pull/7189): add goerli to incoming tx -- [#7190](https://github.com/MetaMask/metamask-extension/pull/7190): Remove unused locale messages -- [#7173](https://github.com/MetaMask/metamask-extension/pull/7173): Fix RPC error messages -- [#7205](https://github.com/MetaMask/metamask-extension/pull/7205): address book entries by chainId -- [#7207](https://github.com/MetaMask/metamask-extension/pull/7207): obs-store/local-store should upgrade webextension error to real error -- [#7162](https://github.com/MetaMask/metamask-extension/pull/7162): Add a/b test for full screen transaction confirmations -- [#7089](https://github.com/MetaMask/metamask-extension/pull/7089): Add advanced setting to enable editing nonce on confirmation screens -- [#7239](https://github.com/MetaMask/metamask-extension/pull/7239): Update ETH logo, update deposit Ether logo height and width -- [#7255](https://github.com/MetaMask/metamask-extension/pull/7255): Use translated string for state log -- [#7266](https://github.com/MetaMask/metamask-extension/pull/7266): fix issue of xyz ens not resolving -- [#7253](https://github.com/MetaMask/metamask-extension/pull/7253): Prevent Logout Timer that's longer than a week. -- [#7285](https://github.com/MetaMask/metamask-extension/pull/7285): Lessen the length of ENS validation to 3 -- [#7287](https://github.com/MetaMask/metamask-extension/pull/7287): Fix phishing detect script +- 3box integration ([#6972](https://github.com/MetaMask/metamask-extension/pull/6972)) +- Add fixes for German translations ([#7168](https://github.com/MetaMask/metamask-extension/pull/7168)) +- Remove the disk store ([#7170](https://github.com/MetaMask/metamask-extension/pull/7170)) +- Performance: Delivery optimized images ([#7176](https://github.com/MetaMask/metamask-extension/pull/7176)) +- add goerli to incoming tx ([#7189](https://github.com/MetaMask/metamask-extension/pull/7189)) +- Remove unused locale messages ([#7190](https://github.com/MetaMask/metamask-extension/pull/7190)) +- Fix RPC error messages ([#7173](https://github.com/MetaMask/metamask-extension/pull/7173)) +- address book entries by chainId ([#7205](https://github.com/MetaMask/metamask-extension/pull/7205)) +- obs-store/local-store should upgrade webextension error to real error ([#7207](https://github.com/MetaMask/metamask-extension/pull/7207)) +- Add a/b test for full screen transaction confirmations ([#7162](https://github.com/MetaMask/metamask-extension/pull/7162)) +- Add advanced setting to enable editing nonce on confirmation screens ([#7089](https://github.com/MetaMask/metamask-extension/pull/7089)) +- Update ETH logo, update deposit Ether logo height and width ([#7239](https://github.com/MetaMask/metamask-extension/pull/7239)) +- Use translated string for state log ([#7255](https://github.com/MetaMask/metamask-extension/pull/7255)) +- fix issue of xyz ens not resolving ([#7266](https://github.com/MetaMask/metamask-extension/pull/7266)) +- Prevent Logout Timer that's longer than a week. ([#7253](https://github.com/MetaMask/metamask-extension/pull/7253)) +- Lessen the length of ENS validation to 3 ([#7285](https://github.com/MetaMask/metamask-extension/pull/7285)) +- Fix phishing detect script ([#7287](https://github.com/MetaMask/metamask-extension/pull/7287)) ## [7.2.3] - 2019-10-08 ### Uncategorized -- [#7252](https://github.com/MetaMask/metamask-extension/pull/7252): Fix gas limit when sending tx without data to a contract -- [#7260](https://github.com/MetaMask/metamask-extension/pull/7260): Do not transate on seed phrases -- [#7252](https://github.com/MetaMask/metamask-extension/pull/7252): Ensure correct tx category when sending to contracts without tx data +- Fix gas limit when sending tx without data to a contract ([#7252](https://github.com/MetaMask/metamask-extension/pull/7252)) +- Do not transate on seed phrases ([#7260](https://github.com/MetaMask/metamask-extension/pull/7260)) +- Ensure correct tx category when sending to contracts without tx data ([#7252](https://github.com/MetaMask/metamask-extension/pull/7252)) ## [7.2.2] - 2019-09-25 ### Uncategorized -- [#7213](https://github.com/MetaMask/metamask-extension/pull/7213): Update minimum Firefox verison to 56.0 +- Update minimum Firefox verison to 56.0 ([#7213](https://github.com/MetaMask/metamask-extension/pull/7213)) ## [7.2.1] - 2019-09-17 ### Uncategorized -- [#7180](https://github.com/MetaMask/metamask-extension/pull/7180): Add `appName` message to each locale +- Add `appName` message to each locale ([#7180](https://github.com/MetaMask/metamask-extension/pull/7180)) ## [7.2.0] - 2019-09-17 ### Uncategorized -- [#7099](https://github.com/MetaMask/metamask-extension/pull/7099): Update localization from Transifex Brave -- [#7137](https://github.com/MetaMask/metamask-extension/pull/7137): Fix validation of empty block explorer url's in custom network form -- [#7128](https://github.com/MetaMask/metamask-extension/pull/7128): Support for eth_signTypedData_v4 -- [#7110](https://github.com/MetaMask/metamask-extension/pull/7110): Adds `chaindIdChanged` event to the ethereum provider -- [#7091](https://github.com/MetaMask/metamask-extension/pull/7091): Improve browser performance issues caused by missing locale errors -- [#7085](https://github.com/MetaMask/metamask-extension/pull/7085): Prevent ineffectual speed ups of pending transactions that don't have the lowest nonce -- [#7156](https://github.com/MetaMask/metamask-extension/pull/7156): Set minimum Firefox version to v56.2 to support Waterfox -- [#7157](https://github.com/MetaMask/metamask-extension/pull/7157): Add polyfill for AbortController -- [#7161](https://github.com/MetaMask/metamask-extension/pull/7161): Replace `undefined` selectedAddress with `null` -- [#7171](https://github.com/MetaMask/metamask-extension/pull/7171): Fix recipient field of approve screen +- Update localization from Transifex Brave ([#7099](https://github.com/MetaMask/metamask-extension/pull/7099)) +- Fix validation of empty block explorer url's in custom network form ([#7137](https://github.com/MetaMask/metamask-extension/pull/7137)) +- Support for eth_signTypedData_v4 ([#7128](https://github.com/MetaMask/metamask-extension/pull/7128)) +- Adds `chaindIdChanged` event to the ethereum provider ([#7110](https://github.com/MetaMask/metamask-extension/pull/7110)) +- Improve browser performance issues caused by missing locale errors ([#7091](https://github.com/MetaMask/metamask-extension/pull/7091)) +- Prevent ineffectual speed ups of pending transactions that don't have the lowest nonce ([#7085](https://github.com/MetaMask/metamask-extension/pull/7085)) +- Set minimum Firefox version to v56.2 to support Waterfox ([#7156](https://github.com/MetaMask/metamask-extension/pull/7156)) +- Add polyfill for AbortController ([#7157](https://github.com/MetaMask/metamask-extension/pull/7157)) +- Replace `undefined` selectedAddress with `null` ([#7161](https://github.com/MetaMask/metamask-extension/pull/7161)) +- Fix recipient field of approve screen ([#7171](https://github.com/MetaMask/metamask-extension/pull/7171)) ## [7.1.1] - 2019-09-03 ### Uncategorized -- [#7059](https://github.com/MetaMask/metamask-extension/pull/7059): Remove blockscale, replace with ethgasstation -- [#7037](https://github.com/MetaMask/metamask-extension/pull/7037): Remove Babel 6 from internal dependencies -- [#7093](https://github.com/MetaMask/metamask-extension/pull/7093): Allow dismissing privacy mode notification from popup -- [#7087](https://github.com/MetaMask/metamask-extension/pull/7087): Add breadcrumb spacing on Contacts page -- [#7081](https://github.com/MetaMask/metamask-extension/pull/7081): Fix confirm token transaction amount display -- [#7088](https://github.com/MetaMask/metamask-extension/pull/7088): Fix BigNumber conversion error -- [#7072](https://github.com/MetaMask/metamask-extension/pull/7072): Right-to-left CSS (using module for conversion) -- [#6878](https://github.com/MetaMask/metamask-extension/pull/6878): Persian translation -- [#7012](https://github.com/MetaMask/metamask-extension/pull/7012): Added missed phrases to RU locale +- Remove blockscale, replace with ethgasstation ([#7059](https://github.com/MetaMask/metamask-extension/pull/7059)) +- Remove Babel 6 from internal dependencies ([#7037](https://github.com/MetaMask/metamask-extension/pull/7037)) +- Allow dismissing privacy mode notification from popup ([#7093](https://github.com/MetaMask/metamask-extension/pull/7093)) +- Add breadcrumb spacing on Contacts page ([#7087](https://github.com/MetaMask/metamask-extension/pull/7087)) +- Fix confirm token transaction amount display ([#7081](https://github.com/MetaMask/metamask-extension/pull/7081)) +- Fix BigNumber conversion error ([#7088](https://github.com/MetaMask/metamask-extension/pull/7088)) +- Right-to-left CSS ([#7072](https://github.com/MetaMask/metamask-extension/pull/7072)) +- Persian translation ([#6878](https://github.com/MetaMask/metamask-extension/pull/6878)) +- Added missed phrases to RU locale ([#7012](https://github.com/MetaMask/metamask-extension/pull/7012)) ## [7.1.0] - 2019-08-26 ### Uncategorized -- [#7035](https://github.com/MetaMask/metamask-extension/pull/7035): Filter non-ERC-20 assets during mobile sync (#7035) -- [#7021](https://github.com/MetaMask/metamask-extension/pull/7021): Using translated string for end of flow messaging (#7021) -- [#7018](https://github.com/MetaMask/metamask-extension/pull/7018): Rename Contacts List settings tab to Contacts (#7018) -- [#7013](https://github.com/MetaMask/metamask-extension/pull/7013): Connections settings tab (#7013) -- [#6996](https://github.com/MetaMask/metamask-extension/pull/6996): Fetch & display received transactions (#6996) -- [#6991](https://github.com/MetaMask/metamask-extension/pull/6991): Remove reload from Share Address button (#6991) -- [#6978](https://github.com/MetaMask/metamask-extension/pull/6978): Address book fixes (#6978) -- [#6944](https://github.com/MetaMask/metamask-extension/pull/6944): Show recipient alias in confirm header if exists (#6944) -- [#6930](https://github.com/MetaMask/metamask-extension/pull/6930): Add support for eth_signTypedData_v4 (#6930) -- [#7046](https://github.com/MetaMask/metamask-extension/pull/7046): Update Italian translation (#7046) -- [#7047](https://github.com/MetaMask/metamask-extension/pull/7047): Add warning about reload on network change +- Filter non-ERC-20 assets during mobile sync ([#7035](https://github.com/MetaMask/metamask-extension/pull/7035)) +- Using translated string for end of flow messaging ([#7021](https://github.com/MetaMask/metamask-extension/pull/7021)) +- Rename Contacts List settings tab to Contacts ([#7018](https://github.com/MetaMask/metamask-extension/pull/7018)) +- Connections settings tab ([#7013](https://github.com/MetaMask/metamask-extension/pull/7013)) +- Fetch & display received transactions ([#6996](https://github.com/MetaMask/metamask-extension/pull/6996)) +- Remove reload from Share Address button ([#6991](https://github.com/MetaMask/metamask-extension/pull/6991)) +- Address book fixes ([#6978](https://github.com/MetaMask/metamask-extension/pull/6978)) +- Show recipient alias in confirm header if exists ([#6944](https://github.com/MetaMask/metamask-extension/pull/6944)) +- Add support for eth_signTypedData_v4 ([#6930](https://github.com/MetaMask/metamask-extension/pull/6930)) +- Update Italian translation ([#7046](https://github.com/MetaMask/metamask-extension/pull/7046)) +- Add warning about reload on network change ([#7047](https://github.com/MetaMask/metamask-extension/pull/7047)) ## [7.0.1] - 2019-08-08 ### Uncategorized -- [#6975](https://github.com/MetaMask/metamask-extension/pull/6975): Ensure seed phrase backup notification only shows up for new users +- Ensure seed phrase backup notification only shows up for new users ([#6975](https://github.com/MetaMask/metamask-extension/pull/6975)) ## [7.0.0] - 2019-08-07 ### Uncategorized -- [#6828](https://github.com/MetaMask/metamask-extension/pull/6828): Capitalized speed up label to match rest of UI -- [#6874](https://github.com/MetaMask/metamask-extension/pull/6928): Allows skipping of seed phrase challenge during onboarding, and completing it at a later time -- [#6900](https://github.com/MetaMask/metamask-extension/pull/6900): Prevent opening of asset dropdown if no tokens in account -- [#6904](https://github.com/MetaMask/metamask-extension/pull/6904): Set privacy mode as default -- [#6914](https://github.com/MetaMask/metamask-extension/pull/6914): Adds Address Book feature -- [#6928](https://github.com/MetaMask/metamask-extension/pull/6928): Disable Copy Tx ID and block explorer link for transactions without hash -- [#6967](https://github.com/MetaMask/metamask-extension/pull/6967): Fix mobile sync +- Capitalized speed up label to match rest of UI ([#6828](https://github.com/MetaMask/metamask-extension/pull/6828)) +- Allows skipping of seed phrase challenge during onboarding, and completing it at a later time ([#6874](https://github.com/MetaMask/metamask-extension/pull/6928)) +- Prevent opening of asset dropdown if no tokens in account ([#6900](https://github.com/MetaMask/metamask-extension/pull/6900)) +- Set privacy mode as default ([#6904](https://github.com/MetaMask/metamask-extension/pull/6904)) +- Adds Address Book feature ([#6914](https://github.com/MetaMask/metamask-extension/pull/6914)) +- Disable Copy Tx ID and block explorer link for transactions without hash ([#6928](https://github.com/MetaMask/metamask-extension/pull/6928)) +- Fix mobile sync ([#6967](https://github.com/MetaMask/metamask-extension/pull/6967)) ## [6.7.3] - 2019-07-19 ### Uncategorized -- [#6888](https://github.com/MetaMask/metamask-extension/pull/6888): Fix bug with resubmitting unsigned transactions. +- Fix bug with resubmitting unsigned transactions. ([#6888](https://github.com/MetaMask/metamask-extension/pull/6888)) ## [6.7.2] - 2019-07-03 ### Uncategorized -- [#6713](https://github.com/MetaMask/metamask-extension/pull/6713): \* Normalize and Validate txParams in TransactionStateManager.addTx too -- [#6759](https://github.com/MetaMask/metamask-extension/pull/6759): Update to Node.js v10 -- [#6694](https://github.com/MetaMask/metamask-extension/pull/6694): Fixes #6694 -- [#6743](https://github.com/MetaMask/metamask-extension/pull/6743): \* Add tests for ImportWithSeedPhrase#parseSeedPhrase -- [#6740](https://github.com/MetaMask/metamask-extension/pull/6740): Fixes #6740 -- [#6741](https://github.com/MetaMask/metamask-extension/pull/6741): Fixes #6741 -- [#6761](https://github.com/MetaMask/metamask-extension/pull/6761): Fixes #6760, correct PropTypes for nextRoute -- [#6754](https://github.com/MetaMask/metamask-extension/pull/6754): Use inline source maps in development -- [#6589](https://github.com/MetaMask/metamask-extension/pull/6589): Document hotfix protocol -- [#6738](https://github.com/MetaMask/metamask-extension/pull/6738): Add codeowner for package-lock-old.json package-lock.json package.json packagelock-old.json files -- [#6648](https://github.com/MetaMask/metamask-extension/pull/6648): Add loading view to notification.html -- [#6731](https://github.com/MetaMask/metamask-extension/pull/6731): Add brave as a platform type for MetaMask +- Normalize and Validate txParams in TransactionStateManager.addTx too ([#6713](https://github.com/MetaMask/metamask-extension/pull/6713)) +- Update to Node.js v10 ([#6759](https://github.com/MetaMask/metamask-extension/pull/6759)) +- Fixes #6694 ([#6694](https://github.com/MetaMask/metamask-extension/pull/6694)) +- Add tests for ImportWithSeedPhrase#parseSeedPhrase ([#6743](https://github.com/MetaMask/metamask-extension/pull/6743)) +- Fixes #6740 ([#6740](https://github.com/MetaMask/metamask-extension/pull/6740)) +- Fixes #6741 ([#6741](https://github.com/MetaMask/metamask-extension/pull/6741)) +- Fixes #6760, correct PropTypes for nextRoute ([#6761](https://github.com/MetaMask/metamask-extension/pull/6761)) +- Use inline source maps in development ([#6754](https://github.com/MetaMask/metamask-extension/pull/6754)) +- Document hotfix protocol ([#6589](https://github.com/MetaMask/metamask-extension/pull/6589)) +- Add codeowner for package-lock-old.json package-lock.json package.json packagelock-old.json files ([#6738](https://github.com/MetaMask/metamask-extension/pull/6738)) +- Add loading view to notification.html ([#6648](https://github.com/MetaMask/metamask-extension/pull/6648)) +- Add brave as a platform type for MetaMask ([#6731](https://github.com/MetaMask/metamask-extension/pull/6731)) ## [6.7.1] - 2019-07-28 ### Uncategorized -- [#6764](https://github.com/MetaMask/metamask-extension/pull/6764): Fix display of token amount on confirm transaction screen +- Fix display of token amount on confirm transaction screen ([#6764](https://github.com/MetaMask/metamask-extension/pull/6764)) ## [6.7.0] - 2019-07-26 ### Uncategorized -- [#6623](https://github.com/MetaMask/metamask-extension/pull/6623): Improve contract method data fetching (#6623) -- [#6551](https://github.com/MetaMask/metamask-extension/pull/6551): Adds 4byte registry fallback to getMethodData() (#6435) -- [#6718](https://github.com/MetaMask/metamask-extension/pull/6718): Add delete to custom RPC form -- [#6700](https://github.com/MetaMask/metamask-extension/pull/6700): Fix styles on 'import account' page, update help link -- [#6714](https://github.com/MetaMask/metamask-extension/pull/6714): Wrap smaller custom block explorer url text -- [#6706](https://github.com/MetaMask/metamask-extension/pull/6706): Pin ethereumjs-tx -- [#6700](https://github.com/MetaMask/metamask-extension/pull/6700): Fix styles on 'import account' page, update help link -- [#6775](https://github.com/MetaMask/metamask-extension/pull/6775): Started adding visual documentation of MetaMask plugin components with the account menu component first +- Improve contract method data fetching ([#6623](https://github.com/MetaMask/metamask-extension/pull/6623)) +- Adds 4byte registry fallback to getMethodData() ([#6551](https://github.com/MetaMask/metamask-extension/pull/6551)) +- Add delete to custom RPC form ([#6718](https://github.com/MetaMask/metamask-extension/pull/6718)) +- Fix styles on 'import account' page, update help link ([#6700](https://github.com/MetaMask/metamask-extension/pull/6700)) +- Wrap smaller custom block explorer url text ([#6714](https://github.com/MetaMask/metamask-extension/pull/6714)) +- Pin ethereumjs-tx ([#6706](https://github.com/MetaMask/metamask-extension/pull/6706)) +- Fix styles on 'import account' page, update help link ([#6700](https://github.com/MetaMask/metamask-extension/pull/6700)) +- Started adding visual documentation of MetaMask plugin components with the account menu component first ([#6775](https://github.com/MetaMask/metamask-extension/pull/6775)) ## [6.6.2] - 2019-07-17 ### Uncategorized -- [#6690](https://github.com/MetaMask/metamask-extension/pull/6690): Update dependencies, re-enable npm audit CI job -- [#6700](https://github.com/MetaMask/metamask-extension/pull/6700): Fix styles on 'import account' page, update help link +- Update dependencies, re-enable npm audit CI job ([#6690](https://github.com/MetaMask/metamask-extension/pull/6690)) +- Fix styles on 'import account' page, update help link ([#6700](https://github.com/MetaMask/metamask-extension/pull/6700)) ## [6.6.1] - 2019-06-06 ### Uncategorized -- [#6691](https://github.com/MetaMask/metamask-extension/pull/6691): Revert "Improve ENS Address Input" to fix bugs on input field on non-main networks. +- Revert "Improve ENS Address Input" to fix bugs on input field on non-main networks. ([#6691](https://github.com/MetaMask/metamask-extension/pull/6691)) ## [6.6.0] - 2019-06-04 ### Uncategorized -- [#6659](https://github.com/MetaMask/metamask-extension/pull/6659): Enable Ledger hardware wallet support on Firefox -- [#6671](https://github.com/MetaMask/metamask-extension/pull/6671): bugfix: reject enable promise on user rejection -- [#6625](https://github.com/MetaMask/metamask-extension/pull/6625): Ensures that transactions cannot be confirmed if gas limit is below 21000. -- [#6633](https://github.com/MetaMask/metamask-extension/pull/6633): Fix grammatical error in i18n endOfFlowMessage6 +- Enable Ledger hardware wallet support on Firefox ([#6659](https://github.com/MetaMask/metamask-extension/pull/6659)) +- bugfix: reject enable promise on user rejection ([#6671](https://github.com/MetaMask/metamask-extension/pull/6671)) +- Ensures that transactions cannot be confirmed if gas limit is below 21000. ([#6625](https://github.com/MetaMask/metamask-extension/pull/6625)) +- Fix grammatical error in i18n endOfFlowMessage6 ([#6633](https://github.com/MetaMask/metamask-extension/pull/6633)) ## [6.5.3] - 2019-05-16 ### Uncategorized -- [#6619](https://github.com/MetaMask/metamask-extension/pull/6619): bugfix: show extension window if locked regardless of approval -- [#6388](https://github.com/MetaMask/metamask-extension/pull/6388): Transactions/pending - check nonce against the network and mark as dropped if not included in a block -- [#6606](https://github.com/MetaMask/metamask-extension/pull/6606): Improve ENS Address Input -- [#6615](https://github.com/MetaMask/metamask-extension/pull/6615): Adds e2e test for removing imported accounts. +- bugfix: show extension window if locked regardless of approval ([#6619](https://github.com/MetaMask/metamask-extension/pull/6619)) +- Transactions/pending - check nonce against the network and mark as dropped if not included in a block ([#6388](https://github.com/MetaMask/metamask-extension/pull/6388)) +- Improve ENS Address Input ([#6606](https://github.com/MetaMask/metamask-extension/pull/6606)) +- Adds e2e test for removing imported accounts. ([#6615](https://github.com/MetaMask/metamask-extension/pull/6615)) ## [6.5.2] - 2019-05-15 ### Uncategorized -- [#6613](https://github.com/MetaMask/metamask-extension/pull/6613): Hardware Wallet Fix +- Hardware Wallet Fix ([#6613](https://github.com/MetaMask/metamask-extension/pull/6613)) ## [6.5.1] - 2019-05-14 ### Uncategorized - Fix bug where approve method would show a warning. #6602 -- [#6593](https://github.com/MetaMask/metamask-extension/pull/6593): Fix wording of autoLogoutTimeLimitDescription +- Fix wording of autoLogoutTimeLimitDescription ([#6593](https://github.com/MetaMask/metamask-extension/pull/6593)) ## [6.5.0] - 2019-05-13 ### Uncategorized -- [#6568](https://github.com/MetaMask/metamask-extension/pull/6568): feature: integrate gaba/PhishingController -- [#6490](https://github.com/MetaMask/metamask-extension/pull/6490): Redesign custom RPC form -- [#6558](https://github.com/MetaMask/metamask-extension/pull/6558): Adds auto logout with customizable time frame -- [#6578](https://github.com/MetaMask/metamask-extension/pull/6578): Fixes ability to send to token contract addresses -- [#6557](https://github.com/MetaMask/metamask-extension/pull/6557): Adds drag and drop functionality to seed phrase entry. -- [#6526](https://github.com/MetaMask/metamask-extension/pull/6526): Include token checksum address in prices lookup for token rates -- [#6502](https://github.com/MetaMask/metamask-extension/pull/6502): Add subheader to all settings subviews -- [#6501](https://github.com/MetaMask/metamask-extension/pull/6501): Improve confirm screen loading performance by fixing home screen rendering bug +- feature: integrate gaba/PhishingController ([#6568](https://github.com/MetaMask/metamask-extension/pull/6568)) +- Redesign custom RPC form ([#6490](https://github.com/MetaMask/metamask-extension/pull/6490)) +- Adds auto logout with customizable time frame ([#6558](https://github.com/MetaMask/metamask-extension/pull/6558)) +- Fixes ability to send to token contract addresses ([#6578](https://github.com/MetaMask/metamask-extension/pull/6578)) +- Adds drag and drop functionality to seed phrase entry. ([#6557](https://github.com/MetaMask/metamask-extension/pull/6557)) +- Include token checksum address in prices lookup for token rates ([#6526](https://github.com/MetaMask/metamask-extension/pull/6526)) +- Add subheader to all settings subviews ([#6502](https://github.com/MetaMask/metamask-extension/pull/6502)) +- Improve confirm screen loading performance by fixing home screen rendering bug ([#6501](https://github.com/MetaMask/metamask-extension/pull/6501)) ## [6.4.1] - 2019-04-26 ### Uncategorized -- [#6521](https://github.com/MetaMask/metamask-extension/pull/6521): Revert "Adds 4byte registry fallback to getMethodData()" to fix stalling bug. +- Revert "Adds 4byte registry fallback to getMethodData()" to fix stalling bug. ([#6521](https://github.com/MetaMask/metamask-extension/pull/6521)) ## [6.4.0] - 2019-04-18 ### Uncategorized -- [#6445](https://github.com/MetaMask/metamask-extension/pull/6445): \* Move send to pages/ -- [#6470](https://github.com/MetaMask/metamask-extension/pull/6470): update publishing.md with dev diagram -- [#6403](https://github.com/MetaMask/metamask-extension/pull/6403): Update to eth-method-registry@1.2.0 -- [#6468](https://github.com/MetaMask/metamask-extension/pull/6468): Fix switcher height when Custom RPC is selected or loading -- [#6459](https://github.com/MetaMask/metamask-extension/pull/6459): feature: add Goerli support -- [#6444](https://github.com/MetaMask/metamask-extension/pull/6444): Fixes #6321 & #6421 - Add Localhost 8545 for network dropdown names -- [#6454](https://github.com/MetaMask/metamask-extension/pull/6454): Bump eth-contract-metadata -- [#6448](https://github.com/MetaMask/metamask-extension/pull/6448): Remove unneeded array cloning in getSendToAccounts selector -- [#6056](https://github.com/MetaMask/metamask-extension/pull/6056): repeated getSelectedAddress() func send.selectors.js removed -- [#6422](https://github.com/MetaMask/metamask-extension/pull/6422): Added Chrome limited site access solution doc -- [#6424](https://github.com/MetaMask/metamask-extension/pull/6424): feature: switch token pricing to CoinGecko API -- [#6428](https://github.com/MetaMask/metamask-extension/pull/6428): Don't inject web3 on sharefile.com -- [#6417](https://github.com/MetaMask/metamask-extension/pull/6417): Metrics updates -- [#6420](https://github.com/MetaMask/metamask-extension/pull/6420): Fix links to MetamaskInpageProvider in porting_to_new_environment.md -- [#6362](https://github.com/MetaMask/metamask-extension/pull/6362): Remove broken image walkthrough from metamaskbot comment -- [#6401](https://github.com/MetaMask/metamask-extension/pull/6401): metamask-controller - use improved provider-as-middleware utility -- [#6406](https://github.com/MetaMask/metamask-extension/pull/6406): remove user actions controller -- [#6399](https://github.com/MetaMask/metamask-extension/pull/6399): doc - publishing - typo fix -- [#6396](https://github.com/MetaMask/metamask-extension/pull/6396): pin eth-contract-metadata to last commit hash -- [#6397](https://github.com/MetaMask/metamask-extension/pull/6397): Change coinbase to wyre -- [#6395](https://github.com/MetaMask/metamask-extension/pull/6395): bump ledger and trezor keyring -- [#6389](https://github.com/MetaMask/metamask-extension/pull/6389): Fix display of gas chart on Ethereum networks -- [#6382](https://github.com/MetaMask/metamask-extension/pull/6382): Remove NoticeController +- Move send to pages/ ([#6445](https://github.com/MetaMask/metamask-extension/pull/6445)) +- update publishing.md with dev diagram ([#6470](https://github.com/MetaMask/metamask-extension/pull/6470)) +- Update to eth-method-registry@1.2.0 ([#6403](https://github.com/MetaMask/metamask-extension/pull/6403)) +- Fix switcher height when Custom RPC is selected or loading ([#6468](https://github.com/MetaMask/metamask-extension/pull/6468)) +- feature: add Goerli support ([#6459](https://github.com/MetaMask/metamask-extension/pull/6459)) +- Fixes #6321 & #6421 - Add Localhost 8545 for network dropdown names ([#6444](https://github.com/MetaMask/metamask-extension/pull/6444)) +- Bump eth-contract-metadata ([#6454](https://github.com/MetaMask/metamask-extension/pull/6454)) +- Remove unneeded array cloning in getSendToAccounts selector ([#6448](https://github.com/MetaMask/metamask-extension/pull/6448)) +- repeated getSelectedAddress() func send.selectors.js removed ([#6056](https://github.com/MetaMask/metamask-extension/pull/6056)) +- Added Chrome limited site access solution doc ([#6422](https://github.com/MetaMask/metamask-extension/pull/6422)) +- feature: switch token pricing to CoinGecko API ([#6424](https://github.com/MetaMask/metamask-extension/pull/6424)) +- Don't inject web3 on sharefile.com ([#6428](https://github.com/MetaMask/metamask-extension/pull/6428)) +- Metrics updates ([#6417](https://github.com/MetaMask/metamask-extension/pull/6417)) +- Fix links to MetamaskInpageProvider in porting_to_new_environment.md ([#6420](https://github.com/MetaMask/metamask-extension/pull/6420)) +- Remove broken image walkthrough from metamaskbot comment ([#6362](https://github.com/MetaMask/metamask-extension/pull/6362)) +- metamask-controller - use improved provider-as-middleware utility ([#6401](https://github.com/MetaMask/metamask-extension/pull/6401)) +- remove user actions controller ([#6406](https://github.com/MetaMask/metamask-extension/pull/6406)) +- doc - publishing - typo fix ([#6399](https://github.com/MetaMask/metamask-extension/pull/6399)) +- pin eth-contract-metadata to last commit hash ([#6396](https://github.com/MetaMask/metamask-extension/pull/6396)) +- Change coinbase to wyre ([#6397](https://github.com/MetaMask/metamask-extension/pull/6397)) +- bump ledger and trezor keyring ([#6395](https://github.com/MetaMask/metamask-extension/pull/6395)) +- Fix display of gas chart on Ethereum networks ([#6389](https://github.com/MetaMask/metamask-extension/pull/6389)) +- Remove NoticeController ([#6382](https://github.com/MetaMask/metamask-extension/pull/6382)) ## [6.3.2] - 2019-04-08 ### Uncategorized -- [#6389](https://github.com/MetaMask/metamask-extension/pull/6389): Fix display of gas chart on ethereum networks -- [#6395](https://github.com/MetaMask/metamask-extension/pull/6395): Fixes for signing methods for ledger and trezor devices -- [#6397](https://github.com/MetaMask/metamask-extension/pull/6397): Fix Wyre link +- Fix display of gas chart on ethereum networks ([#6389](https://github.com/MetaMask/metamask-extension/pull/6389)) +- Fixes for signing methods for ledger and trezor devices ([#6395](https://github.com/MetaMask/metamask-extension/pull/6395)) +- Fix Wyre link ([#6397](https://github.com/MetaMask/metamask-extension/pull/6397)) ## [6.3.1] - 2019-03-29 ### Uncategorized -- [#6353](https://github.com/MetaMask/metamask-extension/pull/6353): Open restore vault in full screen when clicked from popup -- [#6372](https://github.com/MetaMask/metamask-extension/pull/6372): Prevents duplicates of account addresses from showing in send screen "To" dropdown -- [#6374](https://github.com/MetaMask/metamask-extension/pull/6374): Ensures users are placed on correct confirm screens even when registry service fails +- Open restore vault in full screen when clicked from popup ([#6353](https://github.com/MetaMask/metamask-extension/pull/6353)) +- Prevents duplicates of account addresses from showing in send screen "To" dropdown ([#6372](https://github.com/MetaMask/metamask-extension/pull/6372)) +- Ensures users are placed on correct confirm screens even when registry service fails ([#6374](https://github.com/MetaMask/metamask-extension/pull/6374)) ## [6.3.0] - 2019-03-26 ### Uncategorized -- [#6300](https://github.com/MetaMask/metamask-extension/pull/6300): Gas chart hidden on custom networks -- [#6301](https://github.com/MetaMask/metamask-extension/pull/6301): Fix gas fee in the submitted step of the transaction details activity log -- [#6302](https://github.com/MetaMask/metamask-extension/pull/6302): Replaces the coinbase link in the deposit modal with one for wyre -- [#6307](https://github.com/MetaMask/metamask-extension/pull/6307): Centre the notification in the current window -- [#6312](https://github.com/MetaMask/metamask-extension/pull/6312): Fixes popups not showing when screen size is odd -- [#6326](https://github.com/MetaMask/metamask-extension/pull/6326): Fix oversized loading overlay on gas customization modal. -- [#6330](https://github.com/MetaMask/metamask-extension/pull/6330): Stop reloading dapps on network change allowing dapps to decide if it should refresh or not -- [#6332](https://github.com/MetaMask/metamask-extension/pull/6332): Enable mobile sync -- [#6333](https://github.com/MetaMask/metamask-extension/pull/6333): Redesign of the settings screen -- [#6340](https://github.com/MetaMask/metamask-extension/pull/6340): Cancel transactions and signature requests on the closing of notification windows -- [#6341](https://github.com/MetaMask/metamask-extension/pull/6341): Disable transaction "Cancel" button when balance is insufficient -- [#6347](https://github.com/MetaMask/metamask-extension/pull/6347): Enable privacy mode by default for first time users +- Gas chart hidden on custom networks ([#6300](https://github.com/MetaMask/metamask-extension/pull/6300)) +- Fix gas fee in the submitted step of the transaction details activity log ([#6301](https://github.com/MetaMask/metamask-extension/pull/6301)) +- Replaces the coinbase link in the deposit modal with one for wyre ([#6302](https://github.com/MetaMask/metamask-extension/pull/6302)) +- Centre the notification in the current window ([#6307](https://github.com/MetaMask/metamask-extension/pull/6307)) +- Fixes popups not showing when screen size is odd ([#6312](https://github.com/MetaMask/metamask-extension/pull/6312)) +- Fix oversized loading overlay on gas customization modal. ([#6326](https://github.com/MetaMask/metamask-extension/pull/6326)) +- Stop reloading dapps on network change allowing dapps to decide if it should refresh or not ([#6330](https://github.com/MetaMask/metamask-extension/pull/6330)) +- Enable mobile sync ([#6332](https://github.com/MetaMask/metamask-extension/pull/6332)) +- Redesign of the settings screen ([#6333](https://github.com/MetaMask/metamask-extension/pull/6333)) +- Cancel transactions and signature requests on the closing of notification windows ([#6340](https://github.com/MetaMask/metamask-extension/pull/6340)) +- Disable transaction "Cancel" button when balance is insufficient ([#6341](https://github.com/MetaMask/metamask-extension/pull/6341)) +- Enable privacy mode by default for first time users ([#6347](https://github.com/MetaMask/metamask-extension/pull/6347)) ## [6.2.2] - 2019-03-12 ### Uncategorized -- [#6271](https://github.com/MetaMask/metamask-extension/pull/6271): Centre all notification popups -- [#6268](https://github.com/MetaMask/metamask-extension/pull/6268): Improve Korean translations -- [#6279](https://github.com/MetaMask/metamask-extension/pull/6279): Nonmultiple notifications for batch txs -- [#6280](https://github.com/MetaMask/metamask-extension/pull/6280): No longer check network when validating checksum addresses +- Centre all notification popups ([#6271](https://github.com/MetaMask/metamask-extension/pull/6271)) +- Improve Korean translations ([#6268](https://github.com/MetaMask/metamask-extension/pull/6268)) +- Nonmultiple notifications for batch txs ([#6279](https://github.com/MetaMask/metamask-extension/pull/6279)) +- No longer check network when validating checksum addresses ([#6280](https://github.com/MetaMask/metamask-extension/pull/6280)) ## [6.2.1] - 2019-03-11 ## [6.2.0] - 2019-03-05 ### Uncategorized -- [#6192](https://github.com/MetaMask/metamask-extension/pull/6192): Improves design and UX of onboarding flow -- [#6195](https://github.com/MetaMask/metamask-extension/pull/6195): Fixes gas estimation when sending to contracts -- [#6223](https://github.com/MetaMask/metamask-extension/pull/6223): Fixes display of notification windows when metamask is active in a tab -- [#6171](https://github.com/MetaMask/metamask-extension/pull/6171): Adds MetaMetrics usage analytics system +- Improves design and UX of onboarding flow ([#6192](https://github.com/MetaMask/metamask-extension/pull/6192)) +- Fixes gas estimation when sending to contracts ([#6195](https://github.com/MetaMask/metamask-extension/pull/6195)) +- Fixes display of notification windows when metamask is active in a tab ([#6223](https://github.com/MetaMask/metamask-extension/pull/6223)) +- Adds MetaMetrics usage analytics system ([#6171](https://github.com/MetaMask/metamask-extension/pull/6171)) ## [6.1.0] - 2019-02-20 ### Uncategorized -- [#6182](https://github.com/MetaMask/metamask-extension/pull/6182): Change "Token Address" to "Token Contract Address" -- [#6177](https://github.com/MetaMask/metamask-extension/pull/6177): Fixes #6176 -- [#6146](https://github.com/MetaMask/metamask-extension/pull/6146): \* Add Copy Tx ID button to transaction-list-item-details -- [#6133](https://github.com/MetaMask/metamask-extension/pull/6133): Checksum address before slicing it for the confirm screen -- [#6147](https://github.com/MetaMask/metamask-extension/pull/6147): Add button to force edit token symbol when adding custom token -- [#6124](https://github.com/MetaMask/metamask-extension/pull/6124): recent-blocks - dont listen for block when on infura providers -[#5973] (https://github.com/MetaMask/metamask-extension/pull/5973): Fix incorrectly showing checksums on non-ETH blockchains (issue 5838) +- Change "Token Address" to "Token Contract Address" ([#6182](https://github.com/MetaMask/metamask-extension/pull/6182)) +- Fixes #6176 ([#6177](https://github.com/MetaMask/metamask-extension/pull/6177)) +- Add Copy Tx ID button to transaction-list-item-details ([#6146](https://github.com/MetaMask/metamask-extension/pull/6146)) +- Checksum address before slicing it for the confirm screen ([#6133](https://github.com/MetaMask/metamask-extension/pull/6133)) +- Add button to force edit token symbol when adding custom token ([#6147](https://github.com/MetaMask/metamask-extension/pull/6147)) +- Fix incorrectly showing checksums on non-ETH blockchains ([#6124](https://github.com/MetaMask/metamask-extension/pull/6124): recent-blocks - dont listen for block when on infura providers -[#5973] (https://github.com/MetaMask/metamask-extension/pull/5973)) ## [6.0.1] - 2019-02-12 ### Uncategorized -- [#6139](https://github.com/MetaMask/metamask-extension/pull/6139) Fix advanced gas controls on the confirm screen -- [#6134](https://github.com/MetaMask/metamask-extension/pull/6134) Trim whitespace from seed phrase during import -- [#6119](https://github.com/MetaMask/metamask-extension/pull/6119) Update Italian translation -- [#6125](https://github.com/MetaMask/metamask-extension/pull/6125) Improved Traditional Chinese translation +- Fix advanced gas controls on the confirm screen ([#6139](https://github.com/MetaMask/metamask-extension/pull/6139)) +- Trim whitespace from seed phrase during import ([#6134](https://github.com/MetaMask/metamask-extension/pull/6134)) +- Update Italian translation ([#6119](https://github.com/MetaMask/metamask-extension/pull/6119)) +- Improved Traditional Chinese translation ([#6125](https://github.com/MetaMask/metamask-extension/pull/6125)) ## [6.0.0] - 2019-02-11 ### Uncategorized -- [#6082](https://github.com/MetaMask/metamask-extension/pull/6082): Migrate all users to the new UI -- [#6114](https://github.com/MetaMask/metamask-extension/pull/6114): Add setting for inputting gas price with a text field for advanced users. -- [#6091](https://github.com/MetaMask/metamask-extension/pull/6091): Add Swap feature to CurrencyInput -- [#6090](https://github.com/MetaMask/metamask-extension/pull/6090): Change gas labels to Slow/Average/Fast -- [#6112](https://github.com/MetaMask/metamask-extension/pull/6112): Extract advanced gas input controls to their own component -- [#5929](https://github.com/MetaMask/metamask-extension/pull/5929): Update design of phishing warning screen -- [#6120](https://github.com/MetaMask/metamask-extension/pull/6120): Add class to sign footer button -- [#6116](https://github.com/MetaMask/metamask-extension/pull/6116): Fix locale codes contains underscore never being preferred +- Migrate all users to the new UI ([#6082](https://github.com/MetaMask/metamask-extension/pull/6082)) +- Add setting for inputting gas price with a text field for advanced users. ([#6114](https://github.com/MetaMask/metamask-extension/pull/6114)) +- Add Swap feature to CurrencyInput ([#6091](https://github.com/MetaMask/metamask-extension/pull/6091)) +- Change gas labels to Slow/Average/Fast ([#6090](https://github.com/MetaMask/metamask-extension/pull/6090)) +- Extract advanced gas input controls to their own component ([#6112](https://github.com/MetaMask/metamask-extension/pull/6112)) +- Update design of phishing warning screen ([#5929](https://github.com/MetaMask/metamask-extension/pull/5929)) +- Add class to sign footer button ([#6120](https://github.com/MetaMask/metamask-extension/pull/6120)) +- Fix locale codes contains underscore never being preferred ([#6116](https://github.com/MetaMask/metamask-extension/pull/6116)) ## [5.3.5] - 2019-02-04 ### Uncategorized -- [#6084](https://github.com/MetaMask/metamask-extension/pull/6087): Privacy mode fixes +- Privacy mode fixes ([#6084](https://github.com/MetaMask/metamask-extension/pull/6087)) ## [5.3.4] - 2019-01-31 ### Uncategorized -- [#6079](https://github.com/MetaMask/metamask-extension/pull/6079): fix - migration 30 +- fix - migration 30 ([#6079](https://github.com/MetaMask/metamask-extension/pull/6079)) ## [5.3.3] - 2019-01-30 ### Uncategorized -- [#6006](https://github.com/MetaMask/metamask-extension/pull/6006): Update privacy notice -- [#6072](https://github.com/MetaMask/metamask-extension/pull/6072): Improved Spanish translations -- [#5854](https://github.com/MetaMask/metamask-extension/pull/5854): Add visual indicator when displaying a cached balance. -- [#6044](https://github.com/MetaMask/metamask-extension/pull/6044): Fix bug that interferred with using multiple custom networks. +- Update privacy notice ([#6006](https://github.com/MetaMask/metamask-extension/pull/6006)) +- Improved Spanish translations ([#6072](https://github.com/MetaMask/metamask-extension/pull/6072)) +- Add visual indicator when displaying a cached balance. ([#5854](https://github.com/MetaMask/metamask-extension/pull/5854)) +- Fix bug that interferred with using multiple custom networks. ([#6044](https://github.com/MetaMask/metamask-extension/pull/6044)) ## [5.3.2] - 2019-01-28 ### Uncategorized -- [#6021](https://github.com/MetaMask/metamask-extension/pull/6021): Order shapeshift transactions by time within the transactions list -- [#6052](https://github.com/MetaMask/metamask-extension/pull/6052): Add and use cached method signatures to reduce provider requests -- [#6048](https://github.com/MetaMask/metamask-extension/pull/6048): Refactor BalanceComponent to jsx -- [#6026](https://github.com/MetaMask/metamask-extension/pull/6026): Prevent invalid chainIds when adding custom rpcs -- [#6029](https://github.com/MetaMask/metamask-extension/pull/6029): Fix grammar error in Current Conversion -- [#6024](https://github.com/MetaMask/metamask-extension/pull/6024): Disable account dropdown on signing screens +- Order shapeshift transactions by time within the transactions list ([#6021](https://github.com/MetaMask/metamask-extension/pull/6021)) +- Add and use cached method signatures to reduce provider requests ([#6052](https://github.com/MetaMask/metamask-extension/pull/6052)) +- Refactor BalanceComponent to jsx ([#6048](https://github.com/MetaMask/metamask-extension/pull/6048)) +- Prevent invalid chainIds when adding custom rpcs ([#6026](https://github.com/MetaMask/metamask-extension/pull/6026)) +- Fix grammar error in Current Conversion ([#6029](https://github.com/MetaMask/metamask-extension/pull/6029)) +- Disable account dropdown on signing screens ([#6024](https://github.com/MetaMask/metamask-extension/pull/6024)) ## [5.3.1] - 2019-01-16 ### Uncategorized -- [#5966](https://github.com/MetaMask/metamask-extension/pull/5966): Update Slovenian translation -- [#6005](https://github.com/MetaMask/metamask-extension/pull/6005): Set auto conversion off for token/eth conversion -- [#6008](https://github.com/MetaMask/metamask-extension/pull/6008): Fix confirm screen for sending ether tx with hex data -- [#5999](https://github.com/MetaMask/metamask-extension/pull/5999): Refine app description -- [#5997](https://github.com/MetaMask/metamask-extension/pull/5997): Harden Drizzle test runner script -- [#5995](https://github.com/MetaMask/metamask-extension/pull/5995): Fix bug where MetaMask user calls non-standard ERC20 methods such as `mint`, `tokenData` will be `undefined` and an uncaught error will break the UI -- [#5970](https://github.com/MetaMask/metamask-extension/pull/5970): Fixed a word in french translation (several occurrences of connection instead of connexion) -- [#5977](https://github.com/MetaMask/metamask-extension/pull/5977): Fix Component#componentDidUpdate usage -- [#5992](https://github.com/MetaMask/metamask-extension/pull/5992): Add scrolling button to account list -- [#5989](https://github.com/MetaMask/metamask-extension/pull/5989): fix typo in phishing.html title +- Update Slovenian translation ([#5966](https://github.com/MetaMask/metamask-extension/pull/5966)) +- Set auto conversion off for token/eth conversion ([#6005](https://github.com/MetaMask/metamask-extension/pull/6005)) +- Fix confirm screen for sending ether tx with hex data ([#6008](https://github.com/MetaMask/metamask-extension/pull/6008)) +- Refine app description ([#5999](https://github.com/MetaMask/metamask-extension/pull/5999)) +- Harden Drizzle test runner script ([#5997](https://github.com/MetaMask/metamask-extension/pull/5997)) +- Fix bug where MetaMask user calls non-standard ERC20 methods such as `mint`, `tokenData` will be `undefined` and an uncaught error will break the UI ([#5995](https://github.com/MetaMask/metamask-extension/pull/5995)) +- Fixed a word in french translation ([#5970](https://github.com/MetaMask/metamask-extension/pull/5970)) +- Fix Component#componentDidUpdate usage ([#5977](https://github.com/MetaMask/metamask-extension/pull/5977)) +- Add scrolling button to account list ([#5992](https://github.com/MetaMask/metamask-extension/pull/5992)) +- fix typo in phishing.html title ([#5989](https://github.com/MetaMask/metamask-extension/pull/5989)) ## [5.3.0] - 2019-01-02 ### Uncategorized -- [#5978](https://github.com/MetaMask/metamask-extension/pull/5978): Fix etherscan links on notifications -- [#5980](https://github.com/MetaMask/metamask-extension/pull/5980): Fix drizzle tests -- [#5922](https://github.com/MetaMask/metamask-extension/pull/5922): Prevent users from changing the From field in the send screen -- [#5932](https://github.com/MetaMask/metamask-extension/pull/5932): Fix displayed time and date in the activity log. Remove vreme library, add luxon library. -- [#5924](https://github.com/MetaMask/metamask-extension/pull/5924): transactions - throw an error if a transaction is generated while the network is loading -- [#5893](https://github.com/MetaMask/metamask-extension/pull/5893): Add loading network screen +- Fix etherscan links on notifications ([#5978](https://github.com/MetaMask/metamask-extension/pull/5978)) +- Fix drizzle tests ([#5980](https://github.com/MetaMask/metamask-extension/pull/5980)) +- Prevent users from changing the From field in the send screen ([#5922](https://github.com/MetaMask/metamask-extension/pull/5922)) +- Fix displayed time and date in the activity log. Remove vreme library, add luxon library. ([#5932](https://github.com/MetaMask/metamask-extension/pull/5932)) +- transactions - throw an error if a transaction is generated while the network is loading ([#5924](https://github.com/MetaMask/metamask-extension/pull/5924)) +- Add loading network screen ([#5893](https://github.com/MetaMask/metamask-extension/pull/5893)) ## [5.2.2] - 2018-12-13 ### Uncategorized -- [#5925](https://github.com/MetaMask/metamask-extension/pull/5925): Fix speed up button not showing for transactions with the lowest nonce -- [#5923](https://github.com/MetaMask/metamask-extension/pull/5923): Update the Phishing Warning notice text to not use inline URLs -- [#5919](https://github.com/MetaMask/metamask-extension/pull/5919): Fix some styling and translations in the gas customization modal +- Fix speed up button not showing for transactions with the lowest nonce ([#5925](https://github.com/MetaMask/metamask-extension/pull/5925)) +- Update the Phishing Warning notice text to not use inline URLs ([#5923](https://github.com/MetaMask/metamask-extension/pull/5923)) +- Fix some styling and translations in the gas customization modal ([#5919](https://github.com/MetaMask/metamask-extension/pull/5919)) ## [5.2.1] - 2018-12-12 ### Uncategorized -- [#5917] bugfix: Ensures that advanced tab gas limit reflects tx gas limit +- bugfix: Ensures that advanced tab gas limit reflects tx gas limit ([#5917](https://github.com/MetaMask/metamask-extension/pull/5917)) ## [5.2.0] - 2018-12-11 ### Uncategorized -- [#5704] Implements new gas customization features for sending, confirming and speeding up transactions -- [#5886] Groups transactions - speed up, cancel and original - by nonce in the transaction history list -- [#5892] bugfix: eliminates infinite spinner issues caused by switching quickly from a loading network that ultimately fails to resolve -- [$5902] bugfix: provider crashes caused caching issues in `json-rpc-engine`. Fixed in (https://github.com/MetaMask/json-rpc-engine/commit/6de511afbd03ccef4550ea43ff4010b7d7a84039) +- Implements new gas customization features for sending, confirming and speeding up transactions ([#5704](https://github.com/MetaMask/metamask-extension/pull/5704)) +- Groups transactions - speed up, cancel and original - by nonce in the transaction history list ([#5886](https://github.com/MetaMask/metamask-extension/pull/5886)) +- bugfix: eliminates infinite spinner issues caused by switching quickly from a loading network that ultimately fails to resolve ([#5892](https://github.com/MetaMask/metamask-extension/pull/5892)) +- bugfix: provider crashes caused caching issues in `json-rpc-engine`. ([#5902](https://github.com/MetaMask/metamask-extension/pull/5902)) + - Fixed in (https://github.com/MetaMask/json-rpc-engine/commit/6de511afbd03ccef4550ea43ff4010b7d7a84039) ## [5.1.0] - 2018-12-03 ### Uncategorized -- [#5860](https://github.com/MetaMask/metamask-extension/pull/5860): Fixed an infinite spinner bug. -- [#5875](https://github.com/MetaMask/metamask-extension/pull/5875): Update phishing warning copy -- [#5863](https://github.com/MetaMask/metamask-extension/pull/5863): bugfix: normalize contract addresss when fetching exchange rates -- [#5843](https://github.com/MetaMask/metamask-extension/pull/5843): Use selector for state.metamask.accounts in all cases. +- Fixed an infinite spinner bug. ([#5860](https://github.com/MetaMask/metamask-extension/pull/5860)) +- Update phishing warning copy ([#5875](https://github.com/MetaMask/metamask-extension/pull/5875)) +- bugfix: normalize contract addresss when fetching exchange rates ([#5863](https://github.com/MetaMask/metamask-extension/pull/5863)) +- Use selector for state.metamask.accounts in all cases. ([#5843](https://github.com/MetaMask/metamask-extension/pull/5843)) ## [5.0.4] - 2018-11-29 ### Uncategorized -- [#5878](https://github.com/MetaMask/metamask-extension/pull/5878): Formats 32-length byte strings passed to personal_sign as hex, rather than UTF8. -- [#5840](https://github.com/MetaMask/metamask-extension/pull/5840): transactions/tx-gas-utils - add the acctual response for eth_getCode for NO_CONTRACT_ERROR's && add a debug object to simulationFailed -- [#5848](https://github.com/MetaMask/metamask-extension/pull/5848): Soften accusatory language on phishing warning -- [#5835](https://github.com/MetaMask/metamask-extension/pull/5835): Open full-screen UI on install +- Formats 32-length byte strings passed to personal_sign as hex, rather than UTF8. ([#5878](https://github.com/MetaMask/metamask-extension/pull/5878)) +- transactions/tx-gas-utils - add the acctual response for eth_getCode for NO_CONTRACT_ERROR's && add a debug object to simulationFailed ([#5840](https://github.com/MetaMask/metamask-extension/pull/5840)) +- Soften accusatory language on phishing warning ([#5848](https://github.com/MetaMask/metamask-extension/pull/5848)) +- Open full-screen UI on install ([#5835](https://github.com/MetaMask/metamask-extension/pull/5835)) - Locked versions for some dependencies to avoid possible issues from event-stream hack. -- [#5831](https://github.com/MetaMask/metamask-extension/pull/5831): Hide app-header when provider request pending -- [#5786](https://github.com/MetaMask/metamask-extension/pull/5786): \* transactions - autofill gasPrice for retry attempts with either the recomened gasprice or a %10 bump -- [#5801](https://github.com/MetaMask/metamask-extension/pull/5801): transactions - ensure err is defined when setting tx failed -- [#5792](https://github.com/MetaMask/metamask-extension/pull/5792): Consider HW Wallets for signTypedMessage -- [#5829](https://github.com/MetaMask/metamask-extension/pull/5829): Show disabled cursor in .network-disabled state -- [#5827](https://github.com/MetaMask/metamask-extension/pull/5827): Trim whitespace from seed phrase during import -- [#5832](https://github.com/MetaMask/metamask-extension/pull/5832): Show Connect Requests count in extension badge -- [#5816](https://github.com/MetaMask/metamask-extension/pull/5816): Increase Token Symbol length to twelve -- [#5819](https://github.com/MetaMask/metamask-extension/pull/5819): With the EIP 1102 updates, MetaMask _does_ now open itself when visiting some websites. Changed the wording here to clarify that MetaMask will not open itself to ask you for your seed phrase. -- [#5810](https://github.com/MetaMask/metamask-extension/pull/5810): Bump Node version to 8.13 -- [#5797](https://github.com/MetaMask/metamask-extension/pull/5797): Add Firefox and Brave support for Trezor -- [#5799](https://github.com/MetaMask/metamask-extension/pull/5799): Fix usage of setState in ConfirmTransactionBase#handleSubmit -- [#5798](https://github.com/MetaMask/metamask-extension/pull/5798): Show byte count for hex data on confirm screen -- [#5334](https://github.com/MetaMask/metamask-extension/pull/5334): Default to the new UI for first time users -- [#5791](https://github.com/MetaMask/metamask-extension/pull/5791): Bump eth-ledger-bridge-keyring +- Hide app-header when provider request pending ([#5831](https://github.com/MetaMask/metamask-extension/pull/5831)) +- transactions - autofill gasPrice for retry attempts with either the recomened gasprice or a %10 bump ([#5786](https://github.com/MetaMask/metamask-extension/pull/5786)) +- transactions - ensure err is defined when setting tx failed ([#5801](https://github.com/MetaMask/metamask-extension/pull/5801)) +- Consider HW Wallets for signTypedMessage ([#5792](https://github.com/MetaMask/metamask-extension/pull/5792)) +- Show disabled cursor in .network-disabled state ([#5829](https://github.com/MetaMask/metamask-extension/pull/5829)) +- Trim whitespace from seed phrase during import ([#5827](https://github.com/MetaMask/metamask-extension/pull/5827)) +- Show Connect Requests count in extension badge ([#5832](https://github.com/MetaMask/metamask-extension/pull/5832)) +- Increase Token Symbol length to twelve ([#5816](https://github.com/MetaMask/metamask-extension/pull/5816)) +- With the EIP 1102 updates, MetaMask _does_ now open itself when visiting some websites. Changed the wording here to clarify that MetaMask will not open itself to ask you for your seed phrase. ([#5819](https://github.com/MetaMask/metamask-extension/pull/5819)) +- Bump Node version to 8.13 ([#5810](https://github.com/MetaMask/metamask-extension/pull/5810)) +- Add Firefox and Brave support for Trezor ([#5797](https://github.com/MetaMask/metamask-extension/pull/5797)) +- Fix usage of setState in ConfirmTransactionBase#handleSubmit ([#5799](https://github.com/MetaMask/metamask-extension/pull/5799)) +- Show byte count for hex data on confirm screen ([#5798](https://github.com/MetaMask/metamask-extension/pull/5798)) +- Default to the new UI for first time users ([#5334](https://github.com/MetaMask/metamask-extension/pull/5334)) +- Bump eth-ledger-bridge-keyring ([#5791](https://github.com/MetaMask/metamask-extension/pull/5791)) ## [5.0.3] - 2018-11-20 ### Uncategorized -- [#5547](https://github.com/MetaMask/metamask-extension/pull/5547): Bundle some ui dependencies separately to limit the build size of ui.js +- Bundle some ui dependencies separately to limit the build size of ui.js ([#5547](https://github.com/MetaMask/metamask-extension/pull/5547)) - Resubmit approved transactions on new block, to fix bug where an error can stick transactions in this state. - Fixed a bug that could cause an error when sending the max number of tokens. @@ -1109,9 +1111,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Fix bug where data lookups like balances would get stale data (stopped block-tracker bug) - Transaction Details now show entry for onchain failure -- [#5559](https://github.com/MetaMask/metamask-extension/pull/5559) Localize language names in translation select list -- [#5283](https://github.com/MetaMask/metamask-extension/pull/5283): Fix bug when eth.getCode() called with no contract -- [#5563](https://github.com/MetaMask/metamask-extension/pull/5563#pullrequestreview-166769174) Feature: improve Hatian Creole translations +- Localize language names in translation select list ([#5559](https://github.com/MetaMask/metamask-extension/pull/5559)) +- Fix bug when eth.getCode() called with no contract ([#5283](https://github.com/MetaMask/metamask-extension/pull/5283)) +- Feature: improve Hatian Creole translations ([#5563](https://github.com/MetaMask/metamask-extension/pull/5563#pullrequestreview-166769174)) - Feature: improve Slovenian translations - Add support for alternate `wallet_watchAsset` rpc method name - Attempt chain ID lookup via `eth_chainId` before `net_version` @@ -1136,9 +1138,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.14.0] - 2018-10-11 ### Uncategorized - Update transaction statuses when switching networks. -- [#5470](https://github.com/MetaMask/metamask-extension/pull/5470) 100% coverage in French locale, fixed the procedure to verify proposed locale. +- 100% coverage in French locale, fixed the procedure to verify proposed locale. ([#5470](https://github.com/MetaMask/metamask-extension/pull/5470)) - Added rudimentary support for the subscription API to support web3 1.0 and Truffle's Drizzle. -- [#5502](https://github.com/MetaMask/metamask-extension/pull/5502) Update Italian translation. +- Update Italian translation. ([#5502](https://github.com/MetaMask/metamask-extension/pull/5502)) ## [4.13.0] - 2018-10-04 ### Uncategorized @@ -1158,61 +1160,61 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.10.0] - 2018-09-18 ### Uncategorized -- [#4803](https://github.com/MetaMask/metamask-extension/pull/4803): Implement EIP-712: Sign typed data, but continue to support v1. -- [#4898](https://github.com/MetaMask/metamask-extension/pull/4898): Restore multiple consecutive accounts with balances. -- [#4279](https://github.com/MetaMask/metamask-extension/pull/4279): New BlockTracker and Json-Rpc-Engine based Provider. -- [#5050](https://github.com/MetaMask/metamask-extension/pull/5050): Add Ledger hardware wallet support. -- [#4919](https://github.com/MetaMask/metamask-extension/pull/4919): Refactor and Redesign Transaction List. -- [#5182](https://github.com/MetaMask/metamask-extension/pull/5182): Add Transaction Details to the Transaction List view. -- [#5229](https://github.com/MetaMask/metamask-extension/pull/5229): Clear old seed words when importing new seed words. -- [#5264](https://github.com/MetaMask/metamask-extension/pull/5264): Improve click area for adjustment arrows buttons. -- [#4606](https://github.com/MetaMask/metamask-extension/pull/4606): Add new metamask_watchAsset method. -- [#5189](https://github.com/MetaMask/metamask-extension/pull/5189): Fix bug where Ropsten loading message is shown when connecting to Kovan. -- [#5256](https://github.com/MetaMask/metamask-extension/pull/5256): Add mock EIP-1102 support +- Implement EIP-712: Sign typed data, but continue to support v1. ([#4803](https://github.com/MetaMask/metamask-extension/pull/4803)) +- Restore multiple consecutive accounts with balances. ([#4898](https://github.com/MetaMask/metamask-extension/pull/4898)) +- New BlockTracker and Json-Rpc-Engine based Provider. ([#4279](https://github.com/MetaMask/metamask-extension/pull/4279)) +- Add Ledger hardware wallet support. ([#5050](https://github.com/MetaMask/metamask-extension/pull/5050)) +- Refactor and Redesign Transaction List. ([#4919](https://github.com/MetaMask/metamask-extension/pull/4919)) +- Add Transaction Details to the Transaction List view. ([#5182](https://github.com/MetaMask/metamask-extension/pull/5182)) +- Clear old seed words when importing new seed words. ([#5229](https://github.com/MetaMask/metamask-extension/pull/5229)) +- Improve click area for adjustment arrows buttons. ([#5264](https://github.com/MetaMask/metamask-extension/pull/5264)) +- Add new metamask_watchAsset method. ([#4606](https://github.com/MetaMask/metamask-extension/pull/4606)) +- Fix bug where Ropsten loading message is shown when connecting to Kovan. ([#5189](https://github.com/MetaMask/metamask-extension/pull/5189)) +- Add mock EIP-1102 support ([#5256](https://github.com/MetaMask/metamask-extension/pull/5256)) ## [4.9.3] - 2018-08-16 ### Uncategorized -- [#4897](https://github.com/MetaMask/metamask-extension/pull/4897): QR code scan for recipient addresses. -- [#4961](https://github.com/MetaMask/metamask-extension/pull/4961): Add a download seed phrase link. -- [#5060](https://github.com/MetaMask/metamask-extension/pull/5060): Fix bug where gas was not updating properly. +- QR code scan for recipient addresses. ([#4897](https://github.com/MetaMask/metamask-extension/pull/4897)) +- Add a download seed phrase link. ([#4961](https://github.com/MetaMask/metamask-extension/pull/4961)) +- Fix bug where gas was not updating properly. ([#5060](https://github.com/MetaMask/metamask-extension/pull/5060)) ## [4.9.2] - 2018-08-10 ### Uncategorized -- [#5020](https://github.com/MetaMask/metamask-extension/pull/5020): Fix bug in migration #28 ( moving tokens to specific accounts ) +- Fix bug in migration #28 ([#5020](https://github.com/MetaMask/metamask-extension/pull/5020)) ## [4.9.1] - 2018-08-09 ### Uncategorized -- [#4884](https://github.com/MetaMask/metamask-extension/pull/4884): Allow to have tokens per account and network. -- [#4989](https://github.com/MetaMask/metamask-extension/pull/4989): Continue to use original signedTypedData. -- [#5010](https://github.com/MetaMask/metamask-extension/pull/5010): Fix ENS resolution issues. -- [#5000](https://github.com/MetaMask/metamask-extension/pull/5000): Show error while allowing confirmation of tx where simulation fails. -- [#4995](https://github.com/MetaMask/metamask-extension/pull/4995): Shows retry button on dApp initialized transactions. +- Allow to have tokens per account and network. ([#4884](https://github.com/MetaMask/metamask-extension/pull/4884)) +- Continue to use original signedTypedData. ([#4989](https://github.com/MetaMask/metamask-extension/pull/4989)) +- Fix ENS resolution issues. ([#5010](https://github.com/MetaMask/metamask-extension/pull/5010)) +- Show error while allowing confirmation of tx where simulation fails. ([#5000](https://github.com/MetaMask/metamask-extension/pull/5000)) +- Shows retry button on dApp initialized transactions. ([#4995](https://github.com/MetaMask/metamask-extension/pull/4995)) ## [4.9.0] - 2018-08-07 ### Uncategorized -- [#4926](https://github.com/MetaMask/metamask-extension/pull/4926): Show retry button on the latest tx of the earliest nonce. -- [#4888](https://github.com/MetaMask/metamask-extension/pull/4888): Suggest using the new user interface. -- [#4947](https://github.com/MetaMask/metamask-extension/pull/4947): Prevent sending multiple transasctions on multiple confirm clicks. -- [#4844](https://github.com/MetaMask/metamask-extension/pull/4844): Add new tokens auto detection. -- [#4667](https://github.com/MetaMask/metamask-extension/pull/4667): Remove rejected transactions from transaction history. -- [#4625](https://github.com/MetaMask/metamask-extension/pull/4625): Add Trezor Support. -- [#4625](https://github.com/MetaMask/metamask-extension/pull/4625/commits/523cf9ad33d88719520ae5e7293329d133b64d4d): Allow to remove accounts (Imported and Hardware Wallets) -- [#4814](https://github.com/MetaMask/metamask-extension/pull/4814): Add hex data input to send screen. -- [#4691](https://github.com/MetaMask/metamask-extension/pull/4691): Redesign of the Confirm Transaction Screen. -- [#4840](https://github.com/MetaMask/metamask-extension/pull/4840): Now shows notifications when transactions are completed. -- [#4855](https://github.com/MetaMask/metamask-extension/pull/4855): Allow the use of HTTP prefix for custom rpc urls. -- [#4855](https://github.com/MetaMask/metamask-extension/pull/4855): network.js: convert rpc protocol to lower case. -- [#4898](https://github.com/MetaMask/metamask-extension/pull/4898): Restore multiple consecutive accounts with balances. +- Show retry button on the latest tx of the earliest nonce. ([#4926](https://github.com/MetaMask/metamask-extension/pull/4926)) +- Suggest using the new user interface. ([#4888](https://github.com/MetaMask/metamask-extension/pull/4888)) +- Prevent sending multiple transasctions on multiple confirm clicks. ([#4947](https://github.com/MetaMask/metamask-extension/pull/4947)) +- Add new tokens auto detection. ([#4844](https://github.com/MetaMask/metamask-extension/pull/4844)) +- Remove rejected transactions from transaction history. ([#4667](https://github.com/MetaMask/metamask-extension/pull/4667)) +- Add Trezor Support. ([#4625](https://github.com/MetaMask/metamask-extension/pull/4625)) +- Allow to remove accounts ([#4625](https://github.com/MetaMask/metamask-extension/pull/4625/commits/523cf9ad33d88719520ae5e7293329d133b64d4d)) +- Add hex data input to send screen. ([#4814](https://github.com/MetaMask/metamask-extension/pull/4814)) +- Redesign of the Confirm Transaction Screen. ([#4691](https://github.com/MetaMask/metamask-extension/pull/4691)) +- Now shows notifications when transactions are completed. ([#4840](https://github.com/MetaMask/metamask-extension/pull/4840)) +- Allow the use of HTTP prefix for custom rpc urls. ([#4855](https://github.com/MetaMask/metamask-extension/pull/4855)) +- network.js: convert rpc protocol to lower case. ([#4855](https://github.com/MetaMask/metamask-extension/pull/4855)) +- Restore multiple consecutive accounts with balances. ([#4898](https://github.com/MetaMask/metamask-extension/pull/4898)) ## [4.8.0] - 2018-06-18 ### Uncategorized -- [#4513](https://github.com/MetaMask/metamask-extension/pull/4513): Attempting to import an empty private key will now show a clear error. -- [#4570](https://github.com/MetaMask/metamask-extension/pull/4570): Fix bug where metamask data would stop being written to disk after prolonged use. -- [#4523](https://github.com/MetaMask/metamask-extension/pull/4523): Fix bug where account reset did not work with custom RPC providers. -- [#4524](https://github.com/MetaMask/metamask-extension/pull/4524): Fix for Brave i18n getAcceptLanguages. -- [#4557](https://github.com/MetaMask/metamask-extension/pull/4557): Fix bug where nonce mutex was never released. -- [#4566](https://github.com/MetaMask/metamask-extension/pull/4566): Add phishing notice. -- [#4591](https://github.com/MetaMask/metamask-extension/pull/4591): Allow Copying Token Addresses and link to Token on Etherscan. +- Attempting to import an empty private key will now show a clear error. ([#4513](https://github.com/MetaMask/metamask-extension/pull/4513)) +- Fix bug where metamask data would stop being written to disk after prolonged use. ([#4570](https://github.com/MetaMask/metamask-extension/pull/4570)) +- Fix bug where account reset did not work with custom RPC providers. ([#4523](https://github.com/MetaMask/metamask-extension/pull/4523)) +- Fix for Brave i18n getAcceptLanguages. ([#4524](https://github.com/MetaMask/metamask-extension/pull/4524)) +- Fix bug where nonce mutex was never released. ([#4557](https://github.com/MetaMask/metamask-extension/pull/4557)) +- Add phishing notice. ([#4566](https://github.com/MetaMask/metamask-extension/pull/4566)) +- Allow Copying Token Addresses and link to Token on Etherscan. ([#4591](https://github.com/MetaMask/metamask-extension/pull/4591)) ## [4.7.4] - 2018-06-05 ### Uncategorized diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index a2845d6b0..91c2eb214 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -308,9 +308,6 @@ "done": { "message": "ተጠናቅቋል" }, - "dontHaveAHardwareWallet": { - "message": "የሃርድዌር ቋት የለዎትም?" - }, "downloadGoogleChrome": { "message": "Google Chrome አውርድ" }, @@ -443,9 +440,6 @@ "message": "Ether ከቧንቧ በ$1ያግኙ", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "እገዛ ያግኙ።" - }, "getStarted": { "message": "አስጀማሪ መመሪያ" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "ከ MetaMask ጋር ሊጠቀሙበት የሚፈልጉትን የሃርድዌር ቋት ይምረጡ" }, - "havingTroubleConnecting": { - "message": "ግንኙነት መፍጠር ላይ ተቸግረዋል?" - }, "here": { "message": "እዚህ", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -698,9 +689,6 @@ "optionalCurrencySymbol": { "message": "ምልክት (አማራጭ)" }, - "orderOneHere": { - "message": "ትሬዞር ወይም ሌጀር በማዘዝ ገንዘብዎን በቀዝቃዛ ማስቀመጫ ውስጥ ያቆዩ" - }, "origin": { "message": "መነሻ" }, @@ -760,9 +748,6 @@ "readdToken": { "message": "በመለያ አማራጮችዎ ምናሌ ውስጥ ወደ “ተለዋጭ ስም አክል” በመግባት ለወደፊቱ ይህን ተለዋጭ ስም መልሰው ማከል ይችላሉ።" }, - "readyToConnect": { - "message": "ለመገናኘት ዝግጁ ነዎት?" - }, "recents": { "message": "የቅርብ ጊዜያት" }, @@ -985,24 +970,6 @@ "stateLogsDescription": { "message": "ስቴት መዛግብት ይፋዊ የመለያ አድራሻዎትንና የተላኩ ግብይቶችን ይይዛሉ።" }, - "step1HardwareWallet": { - "message": "1. ከሃርድዌር ቋት ጋር ይገናኙ" - }, - "step1HardwareWalletMsg": { - "message": "የሃርድዌር ቋትዎን በቀጥታ ከኮምፒዩተርዎ ጋር ያገናኙ።" - }, - "step2HardwareWallet": { - "message": "2. መለያ ምረጥ" - }, - "step2HardwareWalletMsg": { - "message": "ለማየት የሚፈልጉትን መለያ ይምረጡ። በአንድ ጊዜ መምረጥ የሚችሉት አንድ ብቻ ነው።" - }, - "step3HardwareWallet": { - "message": "3. dApps እና ሌሎችን መጠቀም ይጀምሩ!" - }, - "step3HardwareWalletMsg": { - "message": "የሐርድዌር መለያዎን ከየትኛውም የ Ethereum መለያ ጋር በሚጠቀሙት መንገድ ይጠቀሙ። ወደ dApps በመለያ ይግቡ፣ Eth ይላኩ፣ የ ERC20 ተለዋጭ ስሞችና እንደ CryptoKitties ያሉ የማይለወጡ ተለዋጭ ስሞችን ይግዙና ያከማቹ።" - }, "storePhrase": { "message": "ይህን ሐረግ እንደ 1Password ባለ የይለፍ ቃል አስተዳዳሪ ውስጥ ያስቀምጡ።" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 680f6ab9f..ffe065f16 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -308,9 +308,6 @@ "done": { "message": "تم" }, - "dontHaveAHardwareWallet": { - "message": "أليس لديك محفظة أجهزة؟" - }, "downloadGoogleChrome": { "message": "تنزيل جوجل كروم" }, @@ -439,9 +436,6 @@ "message": "احصل على الأثير من صنبور مقابل $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "احصل على الدعم." - }, "getStarted": { "message": "البدء" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "حدد محفظة أجهزة ترغب في استخدامها مع MetaMask" }, - "havingTroubleConnecting": { - "message": "هل تواجه مشكلة في الاتصال؟" - }, "here": { "message": "هنا", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -694,9 +685,6 @@ "optionalCurrencySymbol": { "message": "الرمز (اختياري)" }, - "orderOneHere": { - "message": "اطلب Trezor أو Ledger وحافظ على أموالك في مخزن حصين" - }, "origin": { "message": "الأصل" }, @@ -756,9 +744,6 @@ "readdToken": { "message": "يمكنك إضافة هذه العملة الرمزية مرة أخرى في المستقبل من خلال الانتقال إلى \"إضافة عملة رمزية\" في قائمة خيارات الحسابات الخاصة بك." }, - "readyToConnect": { - "message": "هل أنت جاهز للاتصال؟" - }, "recents": { "message": "الحديث" }, @@ -981,24 +966,6 @@ "stateLogsDescription": { "message": "تحتوي سجلات الحالة على عناوين حسابك العامة والمعاملات المرسلة." }, - "step1HardwareWallet": { - "message": "1. قم بتوصيل محفظة Hardware Wallet" - }, - "step1HardwareWalletMsg": { - "message": "قم بتوصيل محفظة الأجهزة الخاصة بك مباشرة إلى جهاز الكمبيوتر الخاص بك." - }, - "step2HardwareWallet": { - "message": "2. حدد حساباً" - }, - "step2HardwareWalletMsg": { - "message": "حدد الحساب الذي تريد عرضه. يمكنك اختيار حساب واحد فقط في المرة الواحدة." - }, - "step3HardwareWallet": { - "message": "3. ابدأ في استخدام dApps وأكثر!" - }, - "step3HardwareWalletMsg": { - "message": "استخدم حساب الجهاز الخاص بك كما تفعل مع أي حساب Ethereum. قم بتسجيل الدخول إلى dApps ، إرسال Eth ، قم بشراء وتخزين عملات ERC20 الرمزية والعملات الرمزية الغير قابلة للاستبدال مثل CryptoKitties." - }, "storePhrase": { "message": "احتفظ بهذه الجملة في مدير كلمات مرور مثل 1Password." }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 6878128f6..dde63701f 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Готово" }, - "dontHaveAHardwareWallet": { - "message": "Нямате хардуерен портфейл?" - }, "downloadGoogleChrome": { "message": "Изтеглете Google Chrome" }, @@ -439,9 +436,6 @@ "message": "Вземете Ether от фосет за $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Получете помощ." - }, "getStarted": { "message": "Първи стъпки" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "Изберете хардуерен портфейл, който искате да използвате с MetaMask" }, - "havingTroubleConnecting": { - "message": "Имате проблеми със свързването?" - }, "here": { "message": "тук", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -697,9 +688,6 @@ "optionalCurrencySymbol": { "message": "Символ (по избор)" }, - "orderOneHere": { - "message": "Поръчайте Trezor или Ledger и запазете средствата си " - }, "origin": { "message": "Произход" }, @@ -759,9 +747,6 @@ "readdToken": { "message": "Можете да добавите този жетон в бъдеще, като отидете на „Добавяне на жетон“ в менюто с опции на акаунти." }, - "readyToConnect": { - "message": "Готови ли сте да се свържете? " - }, "recents": { "message": "Скорошни" }, @@ -984,24 +969,6 @@ "stateLogsDescription": { "message": "Държавните дневници съдържат адресите на публичните ви акаунти и изпратените транзакции." }, - "step1HardwareWallet": { - "message": "1. Свържете хардуерния портфейл" - }, - "step1HardwareWalletMsg": { - "message": "Свържете хардуерния си портфейл директно към компютъра." - }, - "step2HardwareWallet": { - "message": "2. Изберете акаунт" - }, - "step2HardwareWalletMsg": { - "message": "Изберете акаунта, който искате да видите. В даден момент можете да изберете само един." - }, - "step3HardwareWallet": { - "message": "3. Започнете да използвате dApps и други!" - }, - "step3HardwareWalletMsg": { - "message": "Използвайте хардуерния си акаунт, както бихте правили с всеки акаунт в Ethereum. Влезте в dApps, изпратете Eth, купете и съхранявайте жетони ERC20 и незаменими жетони като CryptoKitties." - }, "storePhrase": { "message": "Съхранявайте тази фраза в мениджър на пароли като 1Password." }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index ee0272bfe..d2c08ab7b 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -308,9 +308,6 @@ "done": { "message": "সম্পন্ন " }, - "dontHaveAHardwareWallet": { - "message": "একটি হার্ডওয়্যার ওয়ালেট নেই?" - }, "downloadGoogleChrome": { "message": "Google Chrome ডাউনলোড করুন" }, @@ -443,9 +440,6 @@ "message": "$1 এর জন্য একটি ফসেট থেকে ইথার পান", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "সহায়তা পান।" - }, "getStarted": { "message": "শুরু করুন" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "আপনি MetaMask এর সাথে ব্যবহার করতে চান এমন একটি হার্ডওয়্যার ওয়ালেট নির্বাচন করুন" }, - "havingTroubleConnecting": { - "message": "সংযোগ করতে সমস্যা হচ্ছে?" - }, "here": { "message": "এখানে", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "প্রতীক (ঐচ্ছিক)" }, - "orderOneHere": { - "message": "একটি Trezor বা লেজার অর্ডার করুন এবং আপনার তহবিলগুলি হীম ঘরে রাখুন" - }, "origin": { "message": "উৎস" }, @@ -763,9 +751,6 @@ "readdToken": { "message": "আপনি আপনার অ্যাকাউন্টস বিকল্পের মেনুতে \"টোকেনগুলি যোগ করুন\" এ গিয়ে ভবিষ্যতে আবার এই টোকেনটি যোগ করতে পারবেন। " }, - "readyToConnect": { - "message": "সংযোগ করার জন্য প্রস্তুত?" - }, "recents": { "message": "সাম্প্রতিকগুলি" }, @@ -988,24 +973,6 @@ "stateLogsDescription": { "message": "স্টেট লগগুলিতে আপনার পাবলিক অ্যাকাউন্টের ঠিকানা এবং প্রেরণ করার লেনদেনগুলি আছে।" }, - "step1HardwareWallet": { - "message": "1. হার্ডওয়্যার ওয়ালেট সংযুক্ত করুন" - }, - "step1HardwareWalletMsg": { - "message": "আপনার হার্ডওয়্যার ওয়ালেট সরাসরি আপনার কম্পিউটারের সাথে সংযুক্ত করুন।" - }, - "step2HardwareWallet": { - "message": "2. একটি অ্যাকাউন্ট নির্বাচন করুন" - }, - "step2HardwareWalletMsg": { - "message": "আপনি যে অ্যাকাউন্টটি দেখতে চান সেটি নির্বাচন করুন। আপনি একই সময়ে শুধুমাত্র একটিই বেছে নিতে পারবেন। " - }, - "step3HardwareWallet": { - "message": "3. dApps এবং আরও ব্যবহার করে শুরু করুন!" - }, - "step3HardwareWalletMsg": { - "message": "আপনি কোনো Ethereum অ্যাকাউন্ট যেমন ব্যবহার করেন সেইভাবে আপনার হার্ডওয়্যার অ্যাকাউন্ট ব্যবহার করুন। dApps এ লগইন করুন, Eth পাঠান, ERC20 টোকেন এবং CryptoKitties এর মতো পরস্পর বিনিময়যোগ্য নয় এমন টোকেনগুলি ক্রয় ও সংরক্ষণ করুন। " - }, "storePhrase": { "message": "এই বাক্যাংশটি 1Password এর মতো একটি পাসওয়ার্ড পরিচালকে সংরক্ষণ করুন। " }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index 6d0df200a..ab0e91b84 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -305,9 +305,6 @@ "done": { "message": "Fet" }, - "dontHaveAHardwareWallet": { - "message": "No tens una cartera de hardware?" - }, "downloadGoogleChrome": { "message": "Descarrega Google Chrome" }, @@ -433,9 +430,6 @@ "message": "Aconsegueix Ether d'una aixeta per $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Aconsegueix ajuda." - }, "getStarted": { "message": "Comença" }, @@ -454,9 +448,6 @@ "hardwareWalletsMsg": { "message": "Selecciona una cartera de hardware que t'agradaria utilizar amb MetaMask" }, - "havingTroubleConnecting": { - "message": "Problemes per connectar?" - }, "here": { "message": "aquí", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -685,9 +676,6 @@ "optionalCurrencySymbol": { "message": "Símbol (opcional)" }, - "orderOneHere": { - "message": "Demana un Trezor o un Ledger i congela les teves inversions" - }, "origin": { "message": "Origen" }, @@ -744,9 +732,6 @@ "readdToken": { "message": "Pots tornar a afegir aquesta fitxa en el futur anant a \"Afegir fitxa\" al menu d'opcions dels teus comptes." }, - "readyToConnect": { - "message": "Estàs llest per a connectar?" - }, "recipientAddress": { "message": "Adreça del destinatari" }, @@ -966,24 +951,6 @@ "stateLogsDescription": { "message": "Els registres d'estat contenen les teves adreces de compte públiques i les transaccions enviades." }, - "step1HardwareWallet": { - "message": "1. Connectar Moneder Hardware" - }, - "step1HardwareWalletMsg": { - "message": "Connecta la teva cartera de hardware directament al teu ordinador." - }, - "step2HardwareWallet": { - "message": "2. Selecciona un Compte" - }, - "step2HardwareWalletMsg": { - "message": "Selecciona el compte que vols veure. Només pots seleccionar 1 cada cop." - }, - "step3HardwareWallet": { - "message": "3. Comença a utilitzar dApps i altres!" - }, - "step3HardwareWalletMsg": { - "message": "Fes servir el teu compte de hardware com ho faries amb qualsevol compte Ethereum. Inicia sessió a DApps, envia Eth, compra i emmagatzema fitxes ERC20 i fitxes No Fungibles com CryptoKitties." - }, "storePhrase": { "message": "Guarda aquesta frase a un gestor de contrasenyes com Contrasenya 1" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index a9ce79ad1..24fd9a480 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Færdig" }, - "dontHaveAHardwareWallet": { - "message": "Har du ikke en hardware-pung?" - }, "downloadGoogleChrome": { "message": "Hent Google Chrome" }, @@ -439,9 +436,6 @@ "message": "Hent Ether fra en hane til $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Få hjælp" - }, "getStarted": { "message": "Kom godt i gang" }, @@ -460,9 +454,6 @@ "hardwareWalletsMsg": { "message": "Vælg en hardware-pung du vil bruge med MetaMask" }, - "havingTroubleConnecting": { - "message": "Har du problemer med at oprette forbindelse?" - }, "here": { "message": "her", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -685,9 +676,6 @@ "optionalCurrencySymbol": { "message": "Symbol (valgfrit)" }, - "orderOneHere": { - "message": "Bestil en Trezor eller Ledger og frys dine midler ned" - }, "parameters": { "message": "Parametre" }, @@ -744,9 +732,6 @@ "readdToken": { "message": "Du kan tilføje denne token i fremtiden, ved at gå til \"Tilføj token\" under dine valgmenuen for dine konti." }, - "readyToConnect": { - "message": "Klar til at oprette forbindelse?" - }, "recents": { "message": "Seneste" }, @@ -966,24 +951,6 @@ "stateLogsDescription": { "message": "Status-logføringer indeholder dine offentlige kontoadresser og afsendte transaktioner." }, - "step1HardwareWallet": { - "message": "1. Tilslut hardware-tegnebog" - }, - "step1HardwareWalletMsg": { - "message": "Forbind din hardware-tegnebog direkte med din computer." - }, - "step2HardwareWallet": { - "message": "2. Vælg en konto" - }, - "step2HardwareWalletMsg": { - "message": "Vælg den konto du ønsker at se. Du kan kun vælge én ad gangen." - }, - "step3HardwareWallet": { - "message": "3. Begynd at bruge dApps og mere!" - }, - "step3HardwareWalletMsg": { - "message": "Brug din hardwarekonto som du ville gøre med enhver Ethereum-konto. Log ind på dApps, send Eth, køb og opbevar ERC20-tokens og ikke-ombyttelige tokens som CryptoKitties." - }, "storePhrase": { "message": "Gem denne sætning i en adgangskodeadministrator som 1Password." }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 6ec0ae92f..f04fba67c 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -296,9 +296,6 @@ "done": { "message": "Fertig" }, - "dontHaveAHardwareWallet": { - "message": "Sie haben kein Hardware-Wallet?" - }, "downloadGoogleChrome": { "message": "Google Chrome herunterladen" }, @@ -431,9 +428,6 @@ "message": "Ether für $1 vom Faucet holen", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Erhalten Sie Hilfe." - }, "getStarted": { "message": "Erste Schritte" }, @@ -455,9 +449,6 @@ "hardwareWalletsMsg": { "message": "Wählen Sie ein Hardware-Wallet aus, das Sie mit MetaMask verwenden möchten" }, - "havingTroubleConnecting": { - "message": "Verbindungsprobleme?" - }, "here": { "message": "hier", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -674,9 +665,6 @@ "optionalBlockExplorerUrl": { "message": "Block-Explorer-URL (optional)" }, - "orderOneHere": { - "message": "Bestellen Sie ein Trezor oder Ledger und legen Sie Ihr Geld auf Eis" - }, "origin": { "message": "Ursprung" }, @@ -732,9 +720,6 @@ "readdToken": { "message": "Du kannst diesen Token immer erneut hinzufügen, indem du in den Menüpunkt \"Token hinzufügen\" in den Einstellungen deines Accounts gehst." }, - "readyToConnect": { - "message": "Bereit für die Verbindung?" - }, "recents": { "message": "Letzte" }, @@ -957,24 +942,6 @@ "stateLogsDescription": { "message": "Statelogs zeigen die Public Adresse und die gesendeten Transaktionen deines Accounts." }, - "step1HardwareWallet": { - "message": "1. Hardware-Wallet verknüpfen" - }, - "step1HardwareWalletMsg": { - "message": "Verknüpfen Sie Ihr Hardware-Wallet direkt mit Ihrem Computer." - }, - "step2HardwareWallet": { - "message": "2. Ein Konto auswählen" - }, - "step2HardwareWalletMsg": { - "message": "Wählen Sie das Konto aus, das Sie anzeigen wollen. Sie können nur eines zur Zeit wählen." - }, - "step3HardwareWallet": { - "message": "3. Erste Schritte mit dApps und mehr!" - }, - "step3HardwareWalletMsg": { - "message": "Verwenden Sie Ihr Hardware-Konto so wie jedes Ethereum-Konto. Loggen Sie sich bei dApps ein, senden Sie Eth, kaufen und speichern Sie ERC20-Token und Nicht-Fungible-Token wie CryptoKitties." - }, "storePhrase": { "message": "Speichern Sie diesen Schlüssel in einem Passwortmanager wie 1Password." }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 2add7cd8b..d7902743a 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -305,9 +305,6 @@ "done": { "message": "Τέλος" }, - "dontHaveAHardwareWallet": { - "message": "Δεν έχετε πορτοφόλι υλικού;" - }, "downloadGoogleChrome": { "message": "Κατεβάστε το Google Chrome" }, @@ -440,9 +437,6 @@ "message": "Πάρτε Ether από μια πηγή για το $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Πάρτε Βοήθεια." - }, "getStarted": { "message": "Έναρξη" }, @@ -464,9 +458,6 @@ "hardwareWalletsMsg": { "message": "Επιλέξτε ένα πορτοφόλι εξοπλισμού το οποίο θέλετε να χρησιμοποιήσετε με το MetaMask" }, - "havingTroubleConnecting": { - "message": "Δυσκολεύεστε να συνδεθείτε;" - }, "here": { "message": "εδώ", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -698,9 +689,6 @@ "optionalCurrencySymbol": { "message": "Σύμβολο (προαιρετικό)" }, - "orderOneHere": { - "message": "Παραγγείλετε ένα Trezor ή Ledger και κρατήστε τα χρήματά σας σε παγωμένη αποθήκευση" - }, "origin": { "message": "Προέλευση" }, @@ -760,9 +748,6 @@ "readdToken": { "message": "Μπορείτε να προσθέσετε ξανά αυτό το διακριτικό στο μέλλον μεταβαίνοντας στο \"Πρόσθεση διακριτικού\" στο μενού επιλογών των λογαριασμών σας." }, - "readyToConnect": { - "message": "Έτοιμοι να Συνδεθείτε;" - }, "recents": { "message": "Πρόσφατα" }, @@ -985,24 +970,6 @@ "stateLogsDescription": { "message": "Τα αρχεία καταγραφής κατάστασης περιέχουν τις διευθύνσεις του δημόσιου λογαριασμού σας και τις συναλλαγές οι οποίες έχουν αποσταλεί." }, - "step1HardwareWallet": { - "message": "1. Συνδέστε το Πορτοφόλι Εξοπλισμού" - }, - "step1HardwareWalletMsg": { - "message": "Συνδέστε το πορτοφόλι υλικού απευθείας στον υπολογιστή σας." - }, - "step2HardwareWallet": { - "message": "2. Επιλέξτε ένα Λογαριασμό" - }, - "step2HardwareWalletMsg": { - "message": "Επιλέξτε τον λογαριασμό που θέλετε να δείτε. Μπορείτε να επιλέξετε έναν μόνο κάθε φορά." - }, - "step3HardwareWallet": { - "message": "3. Ξεκινήστε να χρησιμοποιείτε το dApps και άλλα!" - }, - "step3HardwareWalletMsg": { - "message": "Χρησιμοποιήστε τον λογαριασμό εξοπλισμού σας όπως θα κάνατε με οποιονδήποτε λογαριασμό του Ethereum. Συνδεθείτε στο dApps, στείλτε το Eth, αγοράστε και αποθηκεύστε ERC20 tokens και Non-Fungible tokens όπως το CryptoKitties." - }, "storePhrase": { "message": "Αποθηκεύστε αυτήν τη φράση σε έναν διαχειριστή κωδικών πρόσβασης όπως το 1Password." }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index be5a90306..bda06fe82 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -486,7 +486,7 @@ "message": "Some of your account data was backed up during a previous installation of MetaMask. This could include your settings, contacts, and tokens. Would you like to restore this data now?" }, "decimal": { - "message": "Decimals of Precision" + "message": "Token Decimal" }, "decimalsMustZerotoTen": { "message": "Decimals must be at least 0, and not over 36." @@ -556,12 +556,18 @@ "dismiss": { "message": "Dismiss" }, + "dismissReminderDescriptionField": { + "message": "Turn this on to dismiss the recovery phrase backup reminder message. We highly recommend that you back up your Secret Recovery Phrase to avoid loss of funds" + }, + "dismissReminderField": { + "message": "Dismiss recovery phrase backup reminder" + }, + "domain": { + "message": "Domain" + }, "done": { "message": "Done" }, - "dontHaveAHardwareWallet": { - "message": "Don’t have a hardware wallet?" - }, "dontShowThisAgain": { "message": "Don't show this again" }, @@ -600,7 +606,7 @@ "message": "Request encryption public key" }, "endOfFlowMessage1": { - "message": "You passed the test - keep your seedphrase safe, it's your responsibility!" + "message": "You passed the test - keep your Secret Recovery Phrase safe, it's your responsibility!" }, "endOfFlowMessage10": { "message": "All Done" @@ -615,17 +621,17 @@ "message": "Never share the phrase with anyone." }, "endOfFlowMessage5": { - "message": "Be careful of phishing! MetaMask will never spontaneously ask for your seed phrase." + "message": "Be careful of phishing! MetaMask will never spontaneously ask for your Secret Recovery Phrase." }, "endOfFlowMessage6": { - "message": "If you need to back up your seed phrase again, you can find it in Settings -> Security." + "message": "If you need to back up your Secret Recovery Phrase again, you can find it in Settings -> Security." }, "endOfFlowMessage7": { "message": "If you ever have questions or see something fishy, contact our support $1.", "description": "$1 is a clickable link with text defined by the 'here' key. The link will open to a form where users can file support tickets." }, "endOfFlowMessage8": { - "message": "MetaMask cannot recover your seedphrase." + "message": "MetaMask cannot recover your Secret Recovery Phrase." }, "endOfFlowMessage9": { "message": "Learn more." @@ -687,6 +693,9 @@ "estimatedProcessingTimes": { "message": "Estimated Processing Times" }, + "ethGasPriceFetchWarning": { + "message": "Backup gas price is provided as the main gas estimation service is unavailable right now." + }, "eth_accounts": { "message": "View the addresses of your permitted accounts (required)", "description": "The description for the `eth_accounts` permission" @@ -783,6 +792,9 @@ "gasPriceExtremelyLow": { "message": "Gas Price Extremely Low" }, + "gasPriceFetchFailed": { + "message": "Gas price estimation failed due to network error." + }, "gasPriceInfoTooltipContent": { "message": "Gas price specifies the amount of Ether you are willing to pay for each unit of gas." }, @@ -810,9 +822,6 @@ "message": "Get Ether from a faucet for the $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Get Help." - }, "getStarted": { "message": "Get Started" }, @@ -832,14 +841,14 @@ "message": "(legacy)", "description": "Text representing the MEW path" }, + "hardwareWalletSupportLinkConversion": { + "message": "click here" + }, "hardwareWallets": { "message": "Connect a hardware wallet" }, "hardwareWalletsMsg": { - "message": "Select a hardware wallet you'd like to use with MetaMask" - }, - "havingTroubleConnecting": { - "message": "Having trouble connecting?" + "message": "Select a hardware wallet you'd like to use with MetaMask." }, "here": { "message": "here", @@ -872,13 +881,13 @@ "message": "Import Account" }, "importAccountLinkText": { - "message": "import using seed phrase" + "message": "import using Secret Recovery Phrase" }, "importAccountMsg": { - "message": " Imported accounts will not be associated with your originally created MetaMask account seedphrase. Learn more about imported accounts " + "message": " Imported accounts will not be associated with your originally created MetaMask account Secret Recovery Phrase. Learn more about imported accounts " }, "importAccountSeedPhrase": { - "message": "Import an account with seed phrase" + "message": "Import an account with Secret Recovery Phrase" }, "importAccountText": { "message": "or $1", @@ -888,7 +897,7 @@ "message": "Import wallet" }, "importYourExisting": { - "message": "Import your existing wallet using a seed phrase" + "message": "Import your existing wallet using a Secret Recovery Phrase" }, "imported": { "message": "Imported", @@ -958,7 +967,7 @@ "message": "Invalid RPC URL" }, "invalidSeedPhrase": { - "message": "Invalid seed phrase" + "message": "Invalid Secret Recovery Phrase" }, "ipfsGateway": { "message": "IPFS Gateway" @@ -988,6 +997,21 @@ "ledgerAccountRestriction": { "message": "You need to make use your last account before you can add a new one." }, + "ledgerLiveAdvancedSetting": { + "message": "Use Ledger Live" + }, + "ledgerLiveAdvancedSettingDescription": { + "message": "The new Ledger Live bridge allows you to more easily use your Ledger. Only available in Chrome." + }, + "ledgerLiveApp": { + "message": "Ledger Live App" + }, + "ledgerLocked": { + "message": "Cannot connect to Ledger device. Please make sure your device is unlocked and Ethereum app is opened." + }, + "ledgerTimeout": { + "message": "Ledger Live is taking too long to respond or connection timeout. Make sure Ledger Live app is opened and your device is unlocked." + }, "letsGoSetUp": { "message": "Yes, let’s get set up!" }, @@ -1018,6 +1042,9 @@ "mainnet": { "message": "Ethereum Mainnet" }, + "makeAnotherSwap": { + "message": "Create a new swap" + }, "max": { "message": "Max" }, @@ -1096,6 +1123,9 @@ "myAccounts": { "message": "My Accounts" }, + "name": { + "message": "Name" + }, "needEtherInWallet": { "message": "To interact with decentralized applications using MetaMask, you’ll need Ether in your wallet." }, @@ -1194,7 +1224,7 @@ "message": "No address has been set for this name." }, "noAlreadyHaveSeed": { - "message": "No, I already have a seed phrase" + "message": "No, I already have a Secret Recovery Phrase" }, "noConversionRateAvailable": { "message": "No Conversion Rate Available" @@ -1237,18 +1267,6 @@ "message": "Swapping on mobile is here!", "description": "Title for a notification in the 'See What's New' popup. Tells users that they can now use MetaMask Swaps on Mobile." }, - "notifications2ActionText": { - "message": "Start survey", - "description": "The 'call to action' label on the button, or link, of the 'Help improve MetaMask' 'See What's New' notification. Upon clicking, users will be taken to an external page where they can complete a survey." - }, - "notifications2Description": { - "message": "Please share your experience in this 5 minute survey.", - "description": "Description of a notification in the 'See What's New' popup. Further clarifies how the users can help: by completing a 5 minute survey about MetaMask." - }, - "notifications2Title": { - "message": "Help improve MetaMask", - "description": "Title for a notification in the 'See What's New' popup. Asks users to take action to make MetaMask better." - }, "notifications3ActionText": { "message": "Read more", "description": "The 'call to action' on the button, or link, of the 'Stay secure' notification. Upon clicking, users will be taken to a page about security on the metamask support website." @@ -1261,6 +1279,22 @@ "message": "Stay secure", "description": "Title for a notification in the 'See What's New' popup. Encourages users to consider security." }, + "notifications4ActionText": { + "message": "Start swapping", + "description": "The 'call to action' on the button, or link, of the 'Swap on Binance Smart Chain!' notification. Upon clicking, users will be taken to a page where then can swap tokens on Binance Smart Chain." + }, + "notifications4Description": { + "message": "Get the best prices on token swaps right inside your wallet. MetaMask now connects you to multiple decentralized exchange aggregators and professional market makers on Binance Smart Chain.", + "description": "Description of a notification in the 'See What's New' popup." + }, + "notifications4Title": { + "message": "Swap on Binance Smart Chain", + "description": "Title for a notification in the 'See What's New' popup. Encourages users to do swaps on Binance Smart Chain." + }, + "notifications5Description": { + "message": "Your \"Seed Phrase\" is now called your \"Secret Recovery Phrase.\"", + "description": "Description of a notification in the 'See What's New' popup. Describes the seed phrase wording update." + }, "ofTextNofM": { "message": "of" }, @@ -1295,9 +1329,6 @@ "optionalCurrencySymbol": { "message": "Currency Symbol (optional)" }, - "orderOneHere": { - "message": "Order a Trezor or Ledger and keep your funds in cold storage" - }, "origin": { "message": "Origin" }, @@ -1370,6 +1401,9 @@ "provide": { "message": "Provide" }, + "publicAddress": { + "message": "Public Address" + }, "queue": { "message": "Queue" }, @@ -1379,9 +1413,6 @@ "readdToken": { "message": "You can add this token back in the future by going to “Add token” in your accounts options menu." }, - "readyToConnect": { - "message": "Ready to Connect?" - }, "receive": { "message": "Receive" }, @@ -1419,7 +1450,7 @@ "message": "Remove account" }, "removeAccountDescription": { - "message": "This account will be removed from your wallet. Please make sure you have the original seed phrase or private key for this imported account before continuing. You can import or create accounts again from the account drop-down. " + "message": "This account will be removed from your wallet. Please make sure you have the original Secret Recovery Phrase or private key for this imported account before continuing. You can import or create accounts again from the account drop-down. " }, "requestsAwaitingAcknowledgement": { "message": "requests waiting to be acknowledged" @@ -1434,13 +1465,13 @@ "message": "Reset Account" }, "resetAccountDescription": { - "message": "Resetting your account will clear your transaction history. This will not change the balances in your accounts or require you to re-enter your seed phrase." + "message": "Resetting your account will clear your transaction history. This will not change the balances in your accounts or require you to re-enter your Secret Recovery Phrase." }, "restore": { "message": "Restore" }, "restoreAccountWithSeed": { - "message": "Restore your Account with Seed Phrase" + "message": "Restore your Account with Secret Recovery Phrase" }, "restoreWalletPreferences": { "message": "A backup of your data from $1 has been found. Would you like to restore your wallet preferences?", @@ -1453,13 +1484,13 @@ "message": "A token here reuses a symbol from another token you watch, this can be confusing or deceptive." }, "revealSeedWords": { - "message": "Reveal Seed Phrase" + "message": "Reveal Secret Recovery Phrase" }, "revealSeedWordsDescription": { - "message": "If you ever change browsers or move computers, you will need this seed phrase to access your accounts. Save them somewhere safe and secret." + "message": "If you ever change browsers or move computers, you will need this Secret Recovery Phrase to access your accounts. Save them somewhere safe and secret." }, "revealSeedWordsTitle": { - "message": "Seed Phrase" + "message": "Secret Recovery Phrase" }, "revealSeedWordsWarning": { "message": "These words can be used to steal all your accounts." @@ -1519,16 +1550,52 @@ "message": "Security & Privacy" }, "securitySettingsDescription": { - "message": "Privacy settings and wallet seed phrase" + "message": "Privacy settings and wallet Secret Recovery Phrase" + }, + "seedPhraseIntroSidebarBulletFour": { + "message": "Write down and store in multiple secret places." + }, + "seedPhraseIntroSidebarBulletOne": { + "message": "Save in a password manager" + }, + "seedPhraseIntroSidebarBulletThree": { + "message": "Store in a safe-deposit box." + }, + "seedPhraseIntroSidebarBulletTwo": { + "message": "Store in a bank vault." + }, + "seedPhraseIntroSidebarCopyOne": { + "message": "Your recovery phrase is the “master key” to your wallet and funds." + }, + "seedPhraseIntroSidebarCopyThree": { + "message": "If someone asks for your recovery phrase, they are most likely trying to scam you." + }, + "seedPhraseIntroSidebarCopyTwo": { + "message": "Never, ever share your recovery phrase, even with MetaMask!" + }, + "seedPhraseIntroSidebarTitleOne": { + "message": "What is a recovery phrase?" + }, + "seedPhraseIntroSidebarTitleThree": { + "message": "Should I share my recovery phrase?" + }, + "seedPhraseIntroSidebarTitleTwo": { + "message": "How do I save my recovery phrase?" + }, + "seedPhraseIntroTitle": { + "message": "Secure your wallet" + }, + "seedPhraseIntroTitleCopy": { + "message": "Before getting started, watch this short video to learn about your recovery phrase and how to keep your wallet safe." }, "seedPhrasePlaceholder": { "message": "Separate each word with a single space" }, "seedPhrasePlaceholderPaste": { - "message": "Paste seed phrase from clipboard" + "message": "Paste Secret Recovery Phrase from clipboard" }, "seedPhraseReq": { - "message": "Seed phrases contain 12, 15, 18, 21, or 24 words" + "message": "Secret Recovery Phrases contain 12, 15, 18, 21, or 24 words" }, "selectAHigherGasFee": { "message": "Select a higher gas fee to accelerate the processing of your transaction.*" @@ -1546,7 +1613,11 @@ "message": "This account has already been connected to MetaMask" }, "selectAnAccountHelp": { - "message": "Select the account to view in MetaMask" + "message": "Select an account to view in MetaMask." + }, + "selectAnAccountHelpDirections": { + "message": "Don't see your account? $1", + "description": "$1 represents the `hardwareWalletSupportLinkConversion` localization key" }, "selectEachPhrase": { "message": "Please select each phrase in order to make sure it is correct." @@ -1616,7 +1687,7 @@ "message": "Show Private Keys" }, "showSeedPhrase": { - "message": "Show seed phrase" + "message": "Show Secret Recovery Phrase" }, "sigRequest": { "message": "Signature Request" @@ -1688,23 +1759,26 @@ "statusNotConnected": { "message": "Not connected" }, - "step1HardwareWallet": { - "message": "1. Connect Hardware Wallet" + "step1LedgerWallet": { + "message": "Download Ledger app" }, - "step1HardwareWalletMsg": { - "message": "Connect your hardware wallet directly to your computer." + "step1LedgerWalletMsg": { + "message": "Download, set up, and enter your password to unlock $1.", + "description": "$1 represents the `ledgerLiveApp` localization value" }, - "step2HardwareWallet": { - "message": "2. Select an Account" + "step1TrezorWallet": { + "message": "Plug in Trezor wallet" }, - "step2HardwareWalletMsg": { - "message": "Select the account you want to view. You can only choose one at a time." + "step1TrezorWalletMsg": { + "message": "Connect your wallet directly to your computer. For more on using your hardware wallet device, $1", + "description": "$1 represents the `hardwareWalletSupportLinkConversion` localization key" }, - "step3HardwareWallet": { - "message": "3. Start using web3 sites and more!" + "step2LedgerWallet": { + "message": "Plug in Ledger wallet" }, - "step3HardwareWalletMsg": { - "message": "Use your hardware account like you would with any Ethereum account. Connect to web3 sites, send ETH, buy and store ERC20 tokens and non-fungible tokens like CryptoKitties." + "step2LedgerWalletMsg": { + "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" }, "storePhrase": { "message": "Store this phrase in a password manager like 1Password." @@ -1730,6 +1804,10 @@ "swapAggregator": { "message": "Aggregator" }, + "swapAllowSwappingOf": { + "message": "Allow swapping of $1", + "description": "Shows a user that they need to allow a token for swapping on their hardware wallet" + }, "swapAmountReceived": { "message": "Guaranteed amount" }, @@ -1755,6 +1833,15 @@ "message": "Checking $1", "description": "Shown to the user during quote loading. $1 is the name of an aggregator. The message indicates that metamask is currently checking if that aggregator has a trade/quote for their requested swap." }, + "swapConfirmWithHwWallet": { + "message": "Confirm with your hardware wallet" + }, + "swapContractDataDisabledErrorDescription": { + "message": "In the Ethereum app on your Ledger, go to \"Settings\" and allow contract data. Then, try your swap again." + }, + "swapContractDataDisabledErrorTitle": { + "message": "Contract data is not enabled on your Ledger" + }, "swapCustom": { "message": "custom" }, @@ -1800,8 +1887,15 @@ "swapFinalizing": { "message": "Finalizing..." }, + "swapFromTo": { + "message": "The swap of $1 to $2", + "description": "Tells a user that they need to confirm on their hardware wallet a swap of 2 tokens. $1 is a source token and $2 is a destination token" + }, + "swapGasFeesSplit": { + "message": "Gas fees on the previous screen are split between these two transactions." + }, "swapHighSlippageWarning": { - "message": "Slippage amount is very high. Make sure you know what you are doing!" + "message": "Slippage amount is very high." }, "swapLowSlippageError": { "message": "Transaction may fail, max slippage too low." @@ -1842,18 +1936,18 @@ "message": "You are about to swap $1 $2 (~$3) for $4 $5 (~$6).", "description": "This message represents the price slippage for the swap. $1 and $4 are a number (ex: 2.89), $2 and $5 are symbols (ex: ETH), and $3 and $6 are fiat currency amounts." }, - "swapPriceDifferenceAcknowledgement": { - "message": "I'm aware" - }, "swapPriceDifferenceTitle": { "message": "Price difference of ~$1%", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "The difference in market prices can be affected by fees taken by intermediaries, size of market, size of trade, or market inefficiencies." + "swapPriceImpactTooltip": { + "message": "Price impact is the difference between the current market price and the amount received during transaction execution. Price impact is a function of the size of your trade relative to the size of the liquidity pool." + }, + "swapPriceUnavailableDescription": { + "message": "Price impact could not be determined due to lack of market price data. Please confirm that you are comfortable with the amount of tokens you are about to receive before swapping." }, - "swapPriceDifferenceUnavailable": { - "message": "Market price is unavailable. Make sure you feel comfortable with the returned amount before proceeding." + "swapPriceUnavailableTitle": { + "message": "Check your rate before proceeding" }, "swapProcessing": { "message": "Processing" @@ -1920,8 +2014,8 @@ "swapSelectQuotePopoverDescription": { "message": "Below are all the quotes gathered from multiple liquidity sources." }, - "swapSlippageTooLow": { - "message": "Slippage must be greater than zero" + "swapSlippageNegative": { + "message": "Slippage must be greater or equal to zero" }, "swapSource": { "message": "Liquidity source" @@ -1941,6 +2035,9 @@ "swapThisWillAllowApprove": { "message": "This will allow $1 to be swapped." }, + "swapToConfirmWithHwWallet": { + "message": "to confirm with your hardware wallet" + }, "swapTokenAvailable": { "message": "Your $1 has been added to your account.", "description": "This message is shown after a swap is successful and communicates the exact amount of tokens the user has received for a swap. The $1 is a decimal number of tokens followed by the token symbol." @@ -1970,6 +2067,9 @@ "swapTransactionComplete": { "message": "Transaction complete" }, + "swapTwoTransactions": { + "message": "2 transactions" + }, "swapUnknown": { "message": "Unknown" }, @@ -1980,9 +2080,6 @@ "message": "Multiple tokens can use the same name and symbol. Check $1 to verify this is the token you're looking for.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "View $1" - }, "swapYourTokenBalance": { "message": "$1 $2 available to swap", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -2012,6 +2109,12 @@ "switchEthereumChainConfirmationTitle": { "message": "Allow this site to switch the network?" }, + "switchLedgerPaths": { + "message": "Switch Ledger paths" + }, + "switchLedgerPathsText": { + "message": "Select the Ledger path to view other accounts" + }, "switchNetwork": { "message": "Switch network" }, @@ -2070,7 +2173,7 @@ "message": "Test Faucet" }, "thisWillCreate": { - "message": "This will create a new wallet and seed phrase" + "message": "This will create a new wallet and Secret Recovery Phrase" }, "tips": { "message": "Tips" @@ -2094,9 +2197,15 @@ "tokenContractAddress": { "message": "Token Contract Address" }, + "tokenDecimalFetchFailed": { + "message": "Token decimal required." + }, "tokenSymbol": { "message": "Token Symbol" }, + "tooltipApproveButton": { + "message": "I understand" + }, "total": { "message": "Total" }, @@ -2225,6 +2334,10 @@ "userName": { "message": "Username" }, + "verifyThisTokenDecimalOn": { + "message": "Token decimal can be found on $1", + "description": "Points the user to etherscan as a place they can verify information about a token. $1 is replaced with the translation for \"etherscan\"" + }, "verifyThisTokenOn": { "message": "Verify this token on $1", "description": "Points the user to etherscan as a place they can verify information about a token. $1 is replaced with the translation for \"etherscan\"" @@ -2238,6 +2351,9 @@ "viewContact": { "message": "View Contact" }, + "viewMore": { + "message": "View More" + }, "viewOnCustomBlockExplorer": { "message": "View at $1" }, @@ -2254,10 +2370,10 @@ "message": "our hardware wallet connection guide" }, "walletSeed": { - "message": "Seed phrase" + "message": "Secret Recovery Phrase" }, "walletSeedRestore": { - "message": "Wallet Seed" + "message": "Wallet Secret Recovery Phrase" }, "web3ShimUsageNotification": { "message": "We noticed that the current website tried to use the removed window.web3 API. If the site appears to be broken, please click $1 for more information.", @@ -2297,7 +2413,7 @@ "message": "You are signing" }, "yourPrivateSeedPhrase": { - "message": "Your private seed phrase" + "message": "Your private Secret Recovery Phrase" }, "zeroGasPriceOnSpeedUpError": { "message": "Zero gas price on speed up" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 83540a855..39a786e9c 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -497,12 +497,12 @@ "dismiss": { "message": "Descartar" }, + "dismissReminderDescriptionField": { + "message": "Active esta opción para ignorar el recordatorio de respaldo de la frase de recuperación. Le recomendamos que respalde la frase secreta de recuperación para evitar la pérdida de fondos." + }, "done": { "message": "Completo" }, - "dontHaveAHardwareWallet": { - "message": "¿No tienes un monedero físico?" - }, "dontShowThisAgain": { "message": "No mostrar esto de nuevo" }, @@ -535,7 +535,7 @@ "message": "Solicitar clave pública de cifrado" }, "endOfFlowMessage1": { - "message": "Pasó la prueba - mantenga su frase semilla segura, ¡es su responsabilidad!" + "message": "Pasó la prueba. Es importante que guarde la frase secreta de recuperación en un lugar seguro." }, "endOfFlowMessage10": { "message": "Todo Listo" @@ -550,13 +550,13 @@ "message": "Nunca comparta la frase con nadie." }, "endOfFlowMessage5": { - "message": "¡Cuidado con el phishing! MetaMask nunca le pedirá espontáneamente su frase semilla." + "message": "Tenga cuidado con el phishing. MetaMask nunca le pedirá la frase secreta de recuperación sin anticipárselo." }, "endOfFlowMessage6": { - "message": "Si necesita hacer una copia de seguridad de su frase semilla nuevamente, puede encontrarla en Configuración -> Seguridad." + "message": "Si necesita volver a crear una copia de seguridad de la frase secreta de recuperación, puede encontrarla en Configuración -> Seguridad." }, "endOfFlowMessage8": { - "message": "MetaMask no puede recuperar tu frase semilla. Saber más." + "message": "MetaMask no puede recuperar la frase secreta de recuperación." }, "endOfFlowMessage9": { "message": "Saber más." @@ -727,9 +727,6 @@ "message": "Obtenga Ether de un faucet (grifo) por $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Pedir ayuda." - }, "getStarted": { "message": "Empezar" }, @@ -751,9 +748,6 @@ "hardwareWalletsMsg": { "message": "Seleccionar un monedero físico que quieres usar con MetaMask" }, - "havingTroubleConnecting": { - "message": "¿Tienes problemas de conexión?" - }, "here": { "message": "Aquí", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -781,15 +775,21 @@ "importAccount": { "message": "Importar cuenta" }, + "importAccountLinkText": { + "message": "importar con la frase secreta de recuperación" + }, "importAccountMsg": { - "message": "Las cuentas importadas no serán asociadas con tu cuenta original creada con tu MetaMask. Aprende más acerca de importar cuentas " + "message": " Las cuentas importadas no se asociarán con la frase secreta de recuperación de la cuenta original de MetaMask. Más información sobre las cuentas importadas " }, "importAccountSeedPhrase": { - "message": "Importar una cuenta con la frase semilla" + "message": "Importar una cuenta con la frase secreta de recuperación" }, "importWallet": { "message": "Importar Monedero" }, + "importYourExisting": { + "message": "Importar la cartera existente con una frase secreta de recuperación" + }, "imported": { "message": "Importado", "description": "status showing that an account has been fully loaded into the keyring" @@ -851,7 +851,7 @@ "message": "URL del RPC inválida " }, "invalidSeedPhrase": { - "message": "Frase semilla inválida." + "message": "Frase secreta de recuperación no válida" }, "ipfsGateway": { "message": "Puerta de enlace IPFS" @@ -1051,7 +1051,7 @@ "message": "No se ha establecido ninguna dirección para este nombre." }, "noAlreadyHaveSeed": { - "message": "No, ya tengo una frase semilla" + "message": "No, ya tengo una frase secreta de recuperación" }, "noConversionRateAvailable": { "message": "No hay ninguna Tasa de Conversión Disponible" @@ -1117,9 +1117,6 @@ "optionalCurrencySymbol": { "message": "Símbolo (opcional)" }, - "orderOneHere": { - "message": "Cómprate un Trezor o Ledger y guarda tus fondos en almacenamiento frío" - }, "origin": { "message": "Origen" }, @@ -1201,9 +1198,6 @@ "readdToken": { "message": "Puedes volver a agregar este token en el futuro pinchando sobre 'Agregar token' en el menú de opciones de tu cuenta" }, - "readyToConnect": { - "message": "¿Listo/a para conectar?" - }, "receive": { "message": "Recibir" }, @@ -1241,7 +1235,7 @@ "message": "Borrar cuenta" }, "removeAccountDescription": { - "message": "Se borrará esta cuenta de tu monedero. Por favor, asegúrate de tener la frase semilla o clave personal original para esta cuenta importada antes de seguir adelante. Podrás importar o crear cuentas de nuevo del menu desplegable de cuentas." + "message": "Esta cuenta se quitará de la cartera. Antes de continuar, asegúrese de tener la frase secreta de recuperación original o la clave privada de esta cuenta importada. Puede importar o crear cuentas nuevamente desde el menú desplegable de la cuenta." }, "requestsAwaitingAcknowledgement": { "message": "peticiones pendientes de reconocimiento" @@ -1256,13 +1250,13 @@ "message": "Reiniciar cuenta" }, "resetAccountDescription": { - "message": "Reiniciar tu cuenta borrará tu historial de transacciones." + "message": "Restablecer la cuenta borrará el historial de transacciones. Esto no cambiará los saldos de las cuentas ni se le pedirá que vuelva a escribir la frase secreta de recuperación." }, "restore": { "message": "Restaurar" }, "restoreAccountWithSeed": { - "message": "Restaurar tu Cuenta con la Frase Semilla" + "message": "Restaurar la cuenta con la frase secreta de recuperación" }, "restoreWalletPreferences": { "message": "Se ha encontrado una copia de seguridad de sus datos de $1. ¿Le gustaría restaurar sus preferencias de monedero?", @@ -1275,13 +1269,13 @@ "message": "Un token aquí reutiliza un símbolo de otro token que está observando, esto puede ser confuso o engañoso." }, "revealSeedWords": { - "message": "Revelar Frase Semilla" + "message": "Revelar frase secreta de recuperación" }, "revealSeedWordsDescription": { - "message": "Si en algún momento cambias de navegador o de ordenador, necesitarás esta frase semilla para acceder a tus cuentas. Guárdatela en un lugar seguro y secreto." + "message": "Si alguna vez cambia de explorador o de equipo, necesitará esta frase secreta de recuperación para acceder a sus cuentas. Guárdela en un lugar seguro y secreto." }, "revealSeedWordsTitle": { - "message": "Frase Semilla" + "message": "Frase secreta de recuperación" }, "revealSeedWordsWarning": { "message": "¡No recuperes tu semilla en un lugar público! Esas palabras pueden ser usadas para robarte todas tus cuentas" @@ -1338,16 +1332,16 @@ "message": "Seguridad y Privacidad" }, "securitySettingsDescription": { - "message": "Configuración de privacidad y frase semilla de monedero" + "message": "Configuración de privacidad y frase secreta de recuperación de la cartera" }, "seedPhrasePlaceholder": { "message": "Separar a cada palabra con un sólo espacio" }, "seedPhrasePlaceholderPaste": { - "message": "Pegar la frase semilla del portapapeles" + "message": "Pegar la frase secreta de recuperación desde el Portapapeles" }, "seedPhraseReq": { - "message": "Las frases semilla contienen 12, 15, 18, 21 oo 24 palabras" + "message": "Las frases secretas de recuperación contienen 12, 15, 18, 21 o 24 palabras" }, "selectAHigherGasFee": { "message": "Seleccione una comisión de gas más elevada para agilizar el procesamiento de tu transacción.*" @@ -1432,7 +1426,7 @@ "message": "Mostrar claves privadas" }, "showSeedPhrase": { - "message": "Mostrar frase semilla" + "message": "Mostrar frase secreta de recuperación" }, "sigRequest": { "message": "Solicitud de firma" @@ -1504,24 +1498,6 @@ "statusNotConnected": { "message": "No conectado" }, - "step1HardwareWallet": { - "message": "1. Conectar monedero físico." - }, - "step1HardwareWalletMsg": { - "message": "Conéctate el monedero físico directamente al ordenador." - }, - "step2HardwareWallet": { - "message": "2. Seleccionar una cuenta" - }, - "step2HardwareWalletMsg": { - "message": "Seleccione la cuenta que quieres ver. Sólo se puede eligir una a la vez." - }, - "step3HardwareWallet": { - "message": "3. Empezar a usar dApps ¡y más!" - }, - "step3HardwareWalletMsg": { - "message": "Usa tu cuenta física igual que harías con cualquier cuenta de Ethereum. Regístrate con dApps, manda Eth, compra y almacena tokens de ERC20 y otros tokens no-fungibles, como CryptoKitties." - }, "storePhrase": { "message": "Guarde esta frase en un administrador de contraseñas como 1Password." }, @@ -1609,9 +1585,6 @@ "swapFinalizing": { "message": "Finalizando..." }, - "swapHighSlippageWarning": { - "message": "La cantidad de deslizamiento es muy alta. ¡Asegúrate de saber lo que estás haciendo!" - }, "swapLowSlippageError": { "message": "La transacción puede fallar, el deslizamiento máximo es demasiado bajo." }, @@ -1655,12 +1628,6 @@ "message": "Diferencia de precio de ~$1%", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "La diferencia en los precios de mercado puede verse afectada por las tarifas cobradas por los intermediarios, el tamaño del mercado, el tamaño del comercio o las ineficiencias del mercado." - }, - "swapPriceDifferenceUnavailable": { - "message": "El precio de mercado no está disponible. Asegúrese de sentirse cómodo con el monto devuelto antes de continuar." - }, "swapProcessing": { "message": "Procesando" }, @@ -1723,9 +1690,6 @@ "swapSelectQuotePopoverDescription": { "message": "A continuación se muestran todas las cotizaciones recopiladas de múltiples fuentes de liquidez." }, - "swapSlippageTooLow": { - "message": "El deslizamiento debe ser mayor que cero" - }, "swapSource": { "message": "Fuente de liquidez" }, @@ -1765,9 +1729,6 @@ "message": "Varios tokens pueden usar el mismo nombre y símbolo. Verifique $1 para verificar que este es el token que está buscando.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Ver $1" - }, "swapYourTokenBalance": { "message": "$1 $2 están disponibles para intercambiar", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1843,7 +1804,7 @@ "message": "Grifo de prueba" }, "thisWillCreate": { - "message": "Esto creará un nuevo monedero y frase semilla" + "message": "Esto creará una cartera y una frase secreta de recuperación nuevas" }, "tips": { "message": "Consejos" @@ -2016,7 +1977,10 @@ "message": "nuestra guía de monedero físico" }, "walletSeed": { - "message": "Semilla del monedero" + "message": "Frase secreta de recuperación" + }, + "walletSeedRestore": { + "message": "Frase secreta de recuperación de la cartera" }, "web3ShimUsageNotification": { "message": "Notamos que el sitio web actual intentó utilizar la API window.web3 eliminada. Si el sitio parece estar roto, haga clic en $1 para obtener más información.", @@ -2048,7 +2012,7 @@ "message": "Usted está firmando" }, "yourPrivateSeedPhrase": { - "message": "Tu frase semilla privada" + "message": "Su frase secreta de recuperación privada" }, "zeroGasPriceOnSpeedUpError": { "message": "No hubo precio de gas al agilizar" diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 1711d2a05..a4fd64e03 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -500,9 +500,6 @@ "done": { "message": "Listo" }, - "dontHaveAHardwareWallet": { - "message": "¿No tienes una billetera de hardware?" - }, "dontShowThisAgain": { "message": "No mostrar esto de nuevo" }, @@ -727,9 +724,6 @@ "message": "Obtener Ether a partir de un grifo para $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Obtén ayuda." - }, "getStarted": { "message": "Comenzar" }, @@ -751,9 +745,6 @@ "hardwareWalletsMsg": { "message": "Selecciona la billetera de hardware que te gustaría utilizar con MetaMask" }, - "havingTroubleConnecting": { - "message": "¿Problemas de conexión?" - }, "here": { "message": "Aquí", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -1117,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "Símbolo (opcional)" }, - "orderOneHere": { - "message": "Pida una billetera Trezor o Ledger y mantenga sus fondos en un almacenamiento en frío" - }, "origin": { "message": "Origen" }, @@ -1201,9 +1189,6 @@ "readdToken": { "message": "Puedes volver a agregar este token a través de la opción \"Agregar token\" en el menú de opciones de tus cuentas." }, - "readyToConnect": { - "message": "¿Listo/a para conectarte?" - }, "receive": { "message": "Recibir" }, @@ -1504,24 +1489,6 @@ "statusNotConnected": { "message": "No conectado" }, - "step1HardwareWallet": { - "message": "1. Conecta la billetera de hardware" - }, - "step1HardwareWalletMsg": { - "message": "Conecta tu billetera de hardware directamente a tu computadora." - }, - "step2HardwareWallet": { - "message": "2. Selecciona una cuenta" - }, - "step2HardwareWalletMsg": { - "message": "Selecciona la cuenta que deseas ver. Solo puedes seleccionar una a la vez." - }, - "step3HardwareWallet": { - "message": "3. ¡Comienza a utilizar dApps y más!" - }, - "step3HardwareWalletMsg": { - "message": "Utiliza tu cuenta de hardware como si fuera una cuenta de Ethereum. Inicia sesión en dApps, envía ETH, compra y almacena tokens ERC20 y tokens no fungibles como CryptoKitties." - }, "storePhrase": { "message": "Almacena esta frase en un administrador de contraseñas como 1Password." }, @@ -1609,9 +1576,6 @@ "swapFinalizing": { "message": "Finalizando..." }, - "swapHighSlippageWarning": { - "message": "La cantidad de deslizamiento es muy alta. ¡Asegúrate de saber lo que estás haciendo!" - }, "swapLowSlippageError": { "message": "La transacción puede fallar, el deslizamiento máximo es demasiado bajo." }, @@ -1655,12 +1619,6 @@ "message": "Diferencia de precio de ~$1%", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "La diferencia en los precios de mercado puede verse afectada por las tarifas cobradas por los intermediarios, el tamaño del mercado, el tamaño del comercio o las ineficiencias del mercado." - }, - "swapPriceDifferenceUnavailable": { - "message": "El precio de mercado no está disponible. Asegúrese de sentirse cómodo con el monto devuelto antes de continuar." - }, "swapProcessing": { "message": "Procesando" }, @@ -1723,9 +1681,6 @@ "swapSelectQuotePopoverDescription": { "message": "A continuación se muestran todas las cotizaciones recopiladas de múltiples fuentes de liquidez." }, - "swapSlippageTooLow": { - "message": "El deslizamiento debe ser mayor que cero" - }, "swapSource": { "message": "Fuente de liquidez" }, @@ -1765,9 +1720,6 @@ "message": "Varios tokens pueden usar el mismo nombre y símbolo. Verifique $1 para verificar que este es el token que está buscando.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Ver $1" - }, "swapYourTokenBalance": { "message": "$1 $2 están disponibles para intercambiar", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index 81e7154f1..4139c4a92 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Valmis" }, - "dontHaveAHardwareWallet": { - "message": "Teil ei ole riistvara rahakotti?" - }, "downloadGoogleChrome": { "message": "Laadige alla Google Chrome" }, @@ -439,9 +436,6 @@ "message": "Hankige kraanist eetrit $1eest", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Küsige abi." - }, "getStarted": { "message": "Alustamine" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "Valige riistvara rahakott, mida soovite MetaMaskis kasutada" }, - "havingTroubleConnecting": { - "message": "Kas ühendamisel esineb probleeme?" - }, "here": { "message": "siin", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -691,9 +682,6 @@ "optionalCurrencySymbol": { "message": "Sümbol (valikuline)" }, - "orderOneHere": { - "message": "Tellige Trezor või Ledger ja hoidke oma varasid külmruumis" - }, "origin": { "message": "Päritolu" }, @@ -753,9 +741,6 @@ "readdToken": { "message": "Saate selle loa tulevikus tagasi lisada, kui lähete oma kontovalikute menüüs vahelehele „Lisa luba“." }, - "readyToConnect": { - "message": "Kas olete ühenduseks valmis?" - }, "recents": { "message": "Hiljutised" }, @@ -978,24 +963,6 @@ "stateLogsDescription": { "message": "Olekulogid sisaldavad teie avalikke konto aadresse ja saadetud tehinguid." }, - "step1HardwareWallet": { - "message": "1. Ühendage riistvara rahakott" - }, - "step1HardwareWalletMsg": { - "message": "Ühendage oma riistvara rahakott otse oma arvutiga." - }, - "step2HardwareWallet": { - "message": "2. Valige konto" - }, - "step2HardwareWalletMsg": { - "message": "Valige konto, mida soovite vaadata. Korraga saab valida ühe." - }, - "step3HardwareWallet": { - "message": "3. Hakake kasutama dAppse ja muud!" - }, - "step3HardwareWalletMsg": { - "message": "Kasutage oma riistvarakontot nagu mis tahes teist Ethereumi kontot. Logige dAppsi, saatke Eth-d, ostke ja hoiustage ERC20 lube ning asendamatuid lube nagu CryptoKitties." - }, "storePhrase": { "message": "Salvestage see fraas paroolihaldurisse, nagu 1Password." }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 54e0a6e90..a60b658cf 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -308,9 +308,6 @@ "done": { "message": "تمام" }, - "dontHaveAHardwareWallet": { - "message": "آیا کیف سخت افزار ندارید؟" - }, "downloadGoogleChrome": { "message": "دانلود گوگل کروم" }, @@ -443,9 +440,6 @@ "message": "اخذ ایتر از یک فاست برای 1$1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "دریافت کمک" - }, "getStarted": { "message": "شروع به کار" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "یک کیف سخت افزار را که میخواهید با MetaMast استفاده نمایید، انتخاب کنید" }, - "havingTroubleConnecting": { - "message": "آیا در اتصال مشکلی دارید؟" - }, "here": { "message": "اینجا", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "سمبول (انتخابی)" }, - "orderOneHere": { - "message": "یک Trezor یا Ledger را سفارش داده و پول های تان را در ذخیره سرد نگهدارید" - }, "origin": { "message": "مبدأ" }, @@ -763,9 +751,6 @@ "readdToken": { "message": "شما میتوانید این رمزیاب را دوباره برای آینده با رفتن به گزینه \"Add token\" در مینوی تنظیمات حساب ها، اضافه نمایید." }, - "readyToConnect": { - "message": "آماده برای اتصال هستید؟" - }, "recents": { "message": "واپسین" }, @@ -988,24 +973,6 @@ "stateLogsDescription": { "message": "دفترچه وضعیت شامل آدرس های حساب عمومی و معاملات فرستاده شده تان میباشد." }, - "step1HardwareWallet": { - "message": "1. اتصال کیف سخت افزار" - }, - "step1HardwareWalletMsg": { - "message": "کیف سخت افزار تان را مستقیمًا به کمپیوتر وصل نمایید." - }, - "step2HardwareWallet": { - "message": "2. انتخاب یک حساب" - }, - "step2HardwareWalletMsg": { - "message": "حسابی را که میخواهید مشاهده نمایید انتخاب کنید. شما میتوانید یک حساب را در یک زمان انتخاب نمایید." - }, - "step3HardwareWallet": { - "message": "3. آغاز استفاده از dApps و بیشتر!" - }, - "step3HardwareWalletMsg": { - "message": "حساب سخت افزار تان را همچنانکه در حساب ایتریم استفاده میکنید، استفاده نمایید. وارد dApps شده، Eth را ارسال نموده، رمزیاب های ERC20 و غیر-قابل تبدیل به پول مانند CryptoKitties را خریداری و ذخیره نمایید." - }, "storePhrase": { "message": "این عبارت را در یک نرم افزار مدیریت رمز عبور مانند 1Password ذخیره نمایید." }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index e9f2ede88..79b779fbb 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Valmis" }, - "dontHaveAHardwareWallet": { - "message": "Eikö sinulla ole laitteistokukkaroa?" - }, "downloadGoogleChrome": { "message": "Lataa Google Chrome" }, @@ -443,9 +440,6 @@ "message": "Hanki etheriä faucetista kohteelle $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Pyydä apua." - }, "getStarted": { "message": "Aloitusopas" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "Valitse laitteistokukkaro, jota haluaisit käyttää MetaMaskilla" }, - "havingTroubleConnecting": { - "message": "Onko sinulla yhdistämisvaikeuksia?" - }, "here": { "message": "tässä", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -698,9 +689,6 @@ "optionalCurrencySymbol": { "message": "Symboli (valinnainen)" }, - "orderOneHere": { - "message": "Tilaa Trezor tai Ledger ja pidä varasi vakaassa tallennustilassa" - }, "origin": { "message": "Alkuperä" }, @@ -760,9 +748,6 @@ "readdToken": { "message": "Voit lisätä tämän tietueen myöhemmin takaisin siirtymällä tilisi vaihtoehtovalikon kohtaan ”Lisää tietue”." }, - "readyToConnect": { - "message": "Valmiina yhdistämään?" - }, "recents": { "message": "Viimeaikaiset" }, @@ -985,24 +970,6 @@ "stateLogsDescription": { "message": "Tilalokeista löydät julkiset tiliosoitteesi sekä lähetetyt maksusiirtosi." }, - "step1HardwareWallet": { - "message": "1. Yhdistä laitteistokukkaro" - }, - "step1HardwareWalletMsg": { - "message": "Yhdistä hardware-lompakkosi suoraan tietokoneeseesi." - }, - "step2HardwareWallet": { - "message": "2. Valitse tili" - }, - "step2HardwareWalletMsg": { - "message": "Valitse tarkasteltava tili. Voit valita vain yhden kerrallaan." - }, - "step3HardwareWallet": { - "message": "3. Ota käyttöön dApps ja paljon muuta!" - }, - "step3HardwareWalletMsg": { - "message": "Käytä laitteistosi tiliä minkä tahansa Ethereum-tilin tavoin. Kirjaudu dAppsiin, lähettää ethereumeja, ostaa ja tallentaa ERC20-tunnuksia sekä CryptoKittiesin kaltaisia ei-korvattavia tunnuksia." - }, "storePhrase": { "message": "Tallenna tämä teksti johonkin salasanojen hallintaohjelmaan (esim. 1Password)." }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 81ad47621..be0fef29c 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -284,9 +284,6 @@ "done": { "message": "Tapos na" }, - "dontHaveAHardwareWallet": { - "message": "Wala ka bang hardware wallet?" - }, "downloadGoogleChrome": { "message": "I-download ang Google Chrome" }, @@ -412,9 +409,6 @@ "message": "Kumuha ng Ether mula sa isang faucet para sa $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Humingi ng Tulong." - }, "getStarted": { "message": "Magsimula" }, @@ -430,9 +424,6 @@ "hardwareWalletsMsg": { "message": "Pumili ng hardware wallet na gusto mong gamitin sa MetaMask" }, - "havingTroubleConnecting": { - "message": "May problema ka ba sa pagkonekta?" - }, "here": { "message": "dito", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -632,9 +623,6 @@ "optionalCurrencySymbol": { "message": "Simbolo (opsyonal)" }, - "orderOneHere": { - "message": "Mag-order ng Trezor o Ledger para itago sa cold storage ang iyong pondo" - }, "origin": { "message": "Pinanggalingan" }, @@ -687,9 +675,6 @@ "readdToken": { "message": "Puwede mong idagdag ulit ang token na ito sa hinaharap sa pamamagitan ng pagpunta sa “Magdagdag ng token” sa menu ng mga opsyon ng iyong mga accounts." }, - "readyToConnect": { - "message": "Handa ka nang Kumonekta?" - }, "recents": { "message": "Kamakailan" }, @@ -894,24 +879,6 @@ "stateLogsDescription": { "message": "Ang mga state log ay naglalaman ng iyong mga pampublikong account address at mga ipinadalang transaksyon." }, - "step1HardwareWallet": { - "message": "1. Magkonekta ng Hardware Wallet" - }, - "step1HardwareWalletMsg": { - "message": "Ikonekta ang iyong hardware wallet nang direkta sa computer." - }, - "step2HardwareWallet": { - "message": "2. Pumili ng Account" - }, - "step2HardwareWalletMsg": { - "message": "Piliin ang halagang gusto mong tingnan. Maaari ka lang pumili nang paisa-isa." - }, - "step3HardwareWallet": { - "message": "3. Magsimula gamit ang dApps at higit pa!" - }, - "step3HardwareWalletMsg": { - "message": "Gamitin ang iyong hardware account tulad ng anumang Ethereum account. Mag-log in sa dApps, magpadala ng Eth, bumili at mag-store ng mga ERC20 token at mga Non-Fungible token tulad ng CryptoKitties." - }, "storePhrase": { "message": "I-store ang pariralang ito sa isang password manager tulad ng 1Password." }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index fcfc5869c..77207d133 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -299,9 +299,6 @@ "done": { "message": "Terminé" }, - "dontHaveAHardwareWallet": { - "message": "Vous n'avez pas de portefeuille hardware ?" - }, "downloadGoogleChrome": { "message": "Télécharger Google Chrome" }, @@ -437,9 +434,6 @@ "message": "Obtenir de l'Ether d'une faucet pour $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Obtenir de l'aide." - }, "getStarted": { "message": "Démarrer" }, @@ -458,9 +452,6 @@ "hardwareWalletsMsg": { "message": "Selectionnez le portefeuille hardware que vous voulez utiliser avec MetaMask" }, - "havingTroubleConnecting": { - "message": "Un problème de connection ?" - }, "here": { "message": "ici", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -683,9 +674,6 @@ "optionalCurrencySymbol": { "message": "Symbole (facultatif)" }, - "orderOneHere": { - "message": "Commander un Trezor ou un Ledger et conserver vos fonds en \"cold storage\"" - }, "origin": { "message": "Origine" }, @@ -745,9 +733,6 @@ "readdToken": { "message": "Vous pourrez ajouter à nouveau ce jeton en allant sur “Ajouter un jeton” dans le menu des options de votre compte." }, - "readyToConnect": { - "message": "Prêt à se connecter ?" - }, "recents": { "message": "Récents" }, @@ -970,24 +955,6 @@ "stateLogsDescription": { "message": "Les logs d'Etat contiennent les adresses publiques de vos comptes et vos transactions envoyées." }, - "step1HardwareWallet": { - "message": "1. Connecter le portefeuille hardware" - }, - "step1HardwareWalletMsg": { - "message": "Connectez votre portefeuille hardware directement à votre ordinateur." - }, - "step2HardwareWallet": { - "message": "2. Selectionnez un compte" - }, - "step2HardwareWalletMsg": { - "message": "Selectionnez le compte que vous voulez afficher. Vous ne pouvez en afficher qu'un seul à la fois." - }, - "step3HardwareWallet": { - "message": "3. Vous pouvez maintenant utiliser des dApps et autres... !" - }, - "step3HardwareWalletMsg": { - "message": "Utilisez ce compte de votre portefeuille hardware comme n'importe quel compte Ethereum. Connectez vous à des dApps, envoyez de l'Eth, achetez et conservez des jetons ERC20 et Non-Fungible comme CryptoKitties." - }, "storePhrase": { "message": "Stockez cette phrase dans un gestionnaire de mots de passe comme 1Password." }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 8bb39ef27..72123870b 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -308,9 +308,6 @@ "done": { "message": "סיום" }, - "dontHaveAHardwareWallet": { - "message": "אין לך ארנק חומרה?" - }, "downloadGoogleChrome": { "message": "הורד/י את גוגל כרום" }, @@ -443,9 +440,6 @@ "message": "השג/י את'ר מברז (faucet) עבור ה-$1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "בקש/י עזרה." - }, "getStarted": { "message": "תחילת העבודה" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "בחר/י ארנק חומרה שבו תרצה להשתמש עם MetaMask" }, - "havingTroubleConnecting": { - "message": "חווה קשיים בהתחברות?" - }, "here": { "message": "כאן", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -698,9 +689,6 @@ "optionalCurrencySymbol": { "message": "סמל (אופציונלי)" }, - "orderOneHere": { - "message": "הזמנ/י Trezor או Ledger ושמר/י את הכספים שלך באחסון קר" - }, "origin": { "message": "מקור" }, @@ -760,9 +748,6 @@ "readdToken": { "message": "באפשרותך להוסיף טוקן זה בחזרה בעתיד על ידי מעבר אל \"הוסף טוקן\" בתפריט אפשרויות החשבונות שלך." }, - "readyToConnect": { - "message": "מוכנ/ה להתחבר?" - }, "recents": { "message": "אחרונים" }, @@ -982,24 +967,6 @@ "stateLogsDescription": { "message": "יומני המצב מכילים את כתובות החשבון הציבוריות שלך ועסקאות שנשלחו." }, - "step1HardwareWallet": { - "message": "1. חבר/י ארנק חומרה" - }, - "step1HardwareWalletMsg": { - "message": "חבר/י את ארנק החומרה שלך ישירות למחשב שלך." - }, - "step2HardwareWallet": { - "message": "2. בחר/י חשבון" - }, - "step2HardwareWalletMsg": { - "message": "בחר/י את החשבון שברצונך להציג. באפשרותך לבחור רק אחד בכל פעם." - }, - "step3HardwareWallet": { - "message": "3. התחל/י להשתמש ב- dApps ועוד!" - }, - "step3HardwareWalletMsg": { - "message": "השתמש/י בחשבון החומרה שלך כי שהיית משתמש/ת בכל חשבון אתריום" - }, "storePhrase": { "message": "אחסנ/י צירוף זה במנהל ססמאות כמו 1Password." }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 4ece9cce8..a275ff123 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "खारिज करें" }, + "dismissReminderDescriptionField": { + "message": "रिकवरी फ्रेज़ बैकअप अनुस्मारक संदेश को खारिज करने के लिए इसे चालू करें। हम ज़ोर देकर अनुशंसा करते हैं कि आप धन के नुकसान से बचने के लिए अपने गुप्त रिकवरी फ्रेज़ का बैकअप लें" + }, "done": { "message": "संपन्न" }, - "dontHaveAHardwareWallet": { - "message": "हार्डवेयर वॉलेट नहीं है?" - }, "dontShowThisAgain": { "message": "इसे दोबारा न दिखाएँ" }, @@ -526,7 +526,7 @@ "message": "एन्क्रिप्शन सार्वजनिक कुंजी का अनुरोध करें" }, "endOfFlowMessage1": { - "message": "आप टेस्ट में उत्तीर्ण हो गए हैं - अपने सीडफ्रेज़ को सुरक्षित रखें, यह आपकी ज़िम्मेदारी है!" + "message": "आप टेस्ट में उत्तीर्ण हो गए हैं - अपने गुप्त रिकवरी फ्रेज़ को सुरक्षित रखें, यह आपकी ज़िम्मेदारी है!" }, "endOfFlowMessage10": { "message": "सब कुछ हो गया" @@ -541,13 +541,13 @@ "message": "वाक्यांश को कभी भी किसी के साथ साझा न करें।" }, "endOfFlowMessage5": { - "message": "फ़िशिंग से सावधान रहें! MetaMask कभी भी अनायास ही आपके सीड फ्रेज़ के बारे में नहीं पूछेगा।" + "message": "फ़िशिंग से सावधान रहें! MetaMask कभी भी अनायास ही आपके गुप्त रिकवरी फ्रेज़ के बारे में नहीं पूछेगा।" }, "endOfFlowMessage6": { - "message": "यदि आपको अपने सीड फ्रेज़ को फिर से बैकअप लेने की आवश्यकता है, तो आप इसे सेटिंग्स -> सुरक्षा में पा सकते हैं।" + "message": "यदि आपको अपने गुप्त रिकवरी फ्रेज़ को फिर से बैकअप लेने की आवश्यकता है, तो आप इसे सेटिंग्स -> सुरक्षा में पा सकते हैं।" }, "endOfFlowMessage8": { - "message": "MetaMask आपके सीडफ्रेज़ को पुनर्प्राप्त नहीं कर सकता है।" + "message": "MetaMask आपके गुप्त रिकवरी फ्रेज़ को पुनर्प्राप्त नहीं कर सकता है।" }, "endOfFlowMessage9": { "message": "अधिक जानें।" @@ -718,9 +718,6 @@ "message": "$1 के लिए एक फ़ॉसेट से Ether प्राप्त करें", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "मदद प्राप्त करें।" - }, "getStarted": { "message": "प्रारंभ करें" }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "किसी हार्डवेयर वॉलेट का चयन करें, जिसे आप MetaMask के साथ उपयोग करना चाहते हैं" }, - "havingTroubleConnecting": { - "message": "कनेक्ट करने में समस्या हो रही है?" - }, "here": { "message": "यहाँ", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,15 +766,21 @@ "importAccount": { "message": "खाता आयात करें" }, + "importAccountLinkText": { + "message": "गुप्त रिकवरी फ्रेज़ का उपयोग करके आयात करें" + }, "importAccountMsg": { - "message": " आयातित खाते आपके मूल रूप से बनाए गए MetaMask खाते सीडफ्रेज़ से संबद्ध नहीं होंगे। आयातित खातों के बारे में अधिक जानें " + "message": " आयातित खाते आपके मूल रूप से बनाए गए MetaMask खाते के गुप्त रिकवरी फ्रेज़ से संबद्ध नहीं होंगे। आयातित खातों के बारे में अधिक जानें " }, "importAccountSeedPhrase": { - "message": "सीडफ्रेज़ के साथ कोई खाता आयात करें" + "message": "गुप्त रिकवरी फ्रेज़ के साथ एक खाता आयात करें" }, "importWallet": { "message": "वॉलेट आयात करें" }, + "importYourExisting": { + "message": "गुप्त रिकवरी फ्रेज़ का उपयोग करके अपने मौजूदा वॉलेट को आयात करें" + }, "imported": { "message": "आयातित", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "अमान्य RPC URL" }, "invalidSeedPhrase": { - "message": "अमान्य सीड फ्रेज़" + "message": "अमान्य गुप्त रिकवरी फ्रेज़" }, "ipfsGateway": { "message": "IPFS गेटवे" @@ -1042,7 +1042,7 @@ "message": "इस नाम के लिए कोई पता नहीं सेट किया गया है।" }, "noAlreadyHaveSeed": { - "message": "नहीं, मेरे पास पहले से ही एक सीड फ्रेज़ है" + "message": "नहीं, मेरे पास पहले से ही एक गुप्त रिकवरी फ्रेज़ है" }, "noConversionRateAvailable": { "message": "कोई भी रूपांतरण दर उपलब्ध नहीं है" @@ -1108,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "मुद्रा प्रतीक (वैकल्पिक)" }, - "orderOneHere": { - "message": "Trezor या लेजर ऑर्डर करें और अपने धन को कोल्ड स्टोरेज में रखें" - }, "origin": { "message": "उत्पत्ति" }, @@ -1192,9 +1189,6 @@ "readdToken": { "message": "आप अपने खातों के विकल्प मेनू में \"टोकन जोड़ें\" पर जाकर भविष्य में इस टोकन को वापस जोड़ सकते हैं।" }, - "readyToConnect": { - "message": "कनेक्ट करने के लिए तैयार हैं?" - }, "receive": { "message": "प्राप्त करें" }, @@ -1232,7 +1226,7 @@ "message": "खाता निकालें" }, "removeAccountDescription": { - "message": "यह खाता आपके वॉलेट से निकाल दिया जाएगा। कृपया सुनिश्चित करें कि जारी रखने से पहले आपके पास इस आयातित खाते के लिए मूल सीड फ्रेज़ या निजी कुंजी है। आप खाता ड्रॉप-डाउन से फिर से खाते आयात कर सकते हैं या बना सकते हैं। " + "message": "यह खाता आपके वॉलेट से निकाल दिया जाएगा। कृपया सुनिश्चित करें कि जारी रखने से पहले आपके पास इस आयातित खाते के लिए मूल गुप्त रिकवरी फ्रेज़ या निजी कुंजी है। आप खाता ड्रॉप-डाउन से फिर से खाते आयात कर सकते हैं या बना सकते हैं। " }, "requestsAwaitingAcknowledgement": { "message": "अनुरोधों के स्वीकार किए जाने की प्रतीक्षा की जा रही है" @@ -1247,13 +1241,13 @@ "message": "खाता रीसेट करें" }, "resetAccountDescription": { - "message": "आपके खाते को रीसेट करने से आपका लेनदेन इतिहास साफ़ हो जाएगा। इससे आपके खातों में शेषराशि नहीं बदलेगी या आपको अपने सीड फ्रेज़ को फिर से दर्ज करने की आवश्यकता नहीं होगी।" + "message": "आपके खाते को रीसेट करने से आपका लेनदेन इतिहास साफ़ हो जाएगा। इससे आपके खातों में शेषराशि नहीं बदलेगी या आपको अपने गुप्त रिकवरी फ्रेज़ को फिर से दर्ज करने की आवश्यकता नहीं होगी।" }, "restore": { "message": "पुनर्स्थापित करें" }, "restoreAccountWithSeed": { - "message": "सीड फ्रेज़ के साथ अपने खाते को पुनर्स्थापित करें" + "message": "गुप्त रिकवरी फ्रेज़ के साथ अपने खाते को पुनर्स्थापित करें" }, "restoreWalletPreferences": { "message": "$1 से आपके डेटा का बैकअप मिला है। क्या आप अपनी वॉलेट वरीयताओं को पुनर्स्थापित करना चाहते हैं?", @@ -1266,13 +1260,13 @@ "message": "यहाँ पर एक टोकन आपके द्वारा देखे जाने वाले दूसरे टोकन से प्रतीक का पुनः उपयोग करता है, यह भ्रामक या धोखाधड़ी वाला हो सकता है।" }, "revealSeedWords": { - "message": "सीड फ्रेज़ प्रकट करें" + "message": "गुप्त रिकवरी फ्रेज़ प्रकट करें" }, "revealSeedWordsDescription": { - "message": "यदि आप कभी ब्राउज़र बदलते हैं या कंप्यूटर को स्थानांतरित करते हैं, तो आपको अपने खातों तक पहुँचने के लिए इस सीड फ्रेज़ की आवश्यकता होगी। उन्हें कहीं सुरक्षित और गोपनीय तरीके से सहेजें।" + "message": "यदि आप कभी ब्राउज़र बदलते हैं या कंप्यूटर को स्थानांतरित करते हैं, तो आपको अपने खातों तक पहुँचने के लिए इस गुप्त रिकवरी फ्रेज़ की आवश्यकता होगी। उन्हें कहीं सुरक्षित और गोपनीय तरीके से सहेजें।" }, "revealSeedWordsTitle": { - "message": "सीड फ्रेज़" + "message": "गुप्त रिकवरी फ्रेज़" }, "revealSeedWordsWarning": { "message": "इन शब्दों का उपयोग आपके सभी खातों को चुराने के लिए किया जा सकता है।" @@ -1329,16 +1323,16 @@ "message": "सुरक्षा और गोपनीयता" }, "securitySettingsDescription": { - "message": "गोपनीयता सेटिंग और वॉलेट सीड फ्रेज़" + "message": "गोपनीयता सेटिंग्स और वॉलेट का गुप्त रिकवरी फ्रेज़" }, "seedPhrasePlaceholder": { "message": "प्रत्येक शब्द को एक रिक्ति से अलग करें" }, "seedPhrasePlaceholderPaste": { - "message": "क्लिपबोर्ड से सीड फ्रेज़ को चिपकाएँ" + "message": "क्लिपबोर्ड से गुप्त रिकवरी फ्रेज़ को चिपकाएँ" }, "seedPhraseReq": { - "message": "सीड फ्रेज़ में 12, 15, 18, 21 या 24 शब्द हैं" + "message": "गुप्त रिकवरी फ्रेज़ में 12, 15, 18, 21 या 24 शब्द होते हैं" }, "selectAHigherGasFee": { "message": "अपने लेनदेन की प्रक्रिया में तेज़ी लाने के लिए उच्च गैस शुल्क का चयन करें। *" @@ -1423,7 +1417,7 @@ "message": "निजी कुंजियाँ दिखाएँ" }, "showSeedPhrase": { - "message": "सीड फ्रेज़ दिखाएँ" + "message": "गुप्त रिकवरी फ्रेज़ दिखाएँ" }, "sigRequest": { "message": "हस्ताक्षर का अनुरोध" @@ -1495,24 +1489,6 @@ "statusNotConnected": { "message": "कनेक्ट नहीं है" }, - "step1HardwareWallet": { - "message": "1. हार्डवेयर वॉलेट कनेक्ट करें" - }, - "step1HardwareWalletMsg": { - "message": "अपने हार्डवेयर वॉलेट को सीधे अपने कंप्यूटर से कनेक्ट करें।" - }, - "step2HardwareWallet": { - "message": "2. किसी खाते का चयन करें" - }, - "step2HardwareWalletMsg": { - "message": "उस खाते का चयन करें, जिसे आप देखना चाहते हैं। आप एक समय में केवल एक ही चुन सकते हैं।" - }, - "step3HardwareWallet": { - "message": "3. web3 साइटों और अधिक का उपयोग करना प्रारंभ करें!" - }, - "step3HardwareWalletMsg": { - "message": "अपने हार्डवेयर खाते का उसी तरह से उपयोग करें, जैसे आप किसी भी Ethereum खाते को करेंगे। web3 साइटों से कनेक्ट करें, ETH भेजें, ERC20 और CryptoKitties जैसे गैर-प्रतिमोचन वाले टोकन जैसे टोकन खरीदें और संग्रहीत करें।" - }, "storePhrase": { "message": "इस वाक्यांश को 1Password जैसे किसी पासवर्ड मैनेजर में संग्रहीत करें।" }, @@ -1597,9 +1573,6 @@ "swapFinalizing": { "message": "अंतिम रूप दिया जा रहा है..." }, - "swapHighSlippageWarning": { - "message": "स्लिपेज राशि बहुत अधिक है। सुनिश्चित करें कि आप जानते हैं कि आप क्या कर रहे हैं!" - }, "swapLowSlippageError": { "message": "लेनदेन विफल हो सकता है, अधिकतम स्लिपेज बहुत कम हो सकता है।" }, @@ -1693,9 +1666,6 @@ "swapSelectQuotePopoverDescription": { "message": "नीचे दिए गए सभी उद्धरण कई चलनिधि स्रोतों से एकत्र किए गए हैं।" }, - "swapSlippageTooLow": { - "message": "स्लिपेज शून्य से अधिक होना चाहिए" - }, "swapSource": { "message": "चलनिधि का स्रोत" }, @@ -1732,9 +1702,6 @@ "message": "एकाधिक टोकन एक ही नाम और प्रतीक का उपयोग कर सकते हैं। यह सत्यापित करने के लिए $1 की जाँच करें कि यह वही टोकन है, जिसकी आप तलाश कर रहे हैं।", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "$1 देखें" - }, "swapYourTokenBalance": { "message": "$1 $2 स्वैप के लिए उपलब्ध है", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1807,7 +1774,7 @@ "message": "फ़ॉसेट का परीक्षण करें" }, "thisWillCreate": { - "message": "यह एक नया वॉलेट और सीड फ्रेज़ बनाएगा" + "message": "यह एक नया वॉलेट और गुप्त रिकवरी फ्रेज़ बनाएगा" }, "tips": { "message": "युक्तियाँ" @@ -1980,7 +1947,10 @@ "message": "हमारी हार्डवेयर वॉलेट कनेक्शन गाइड" }, "walletSeed": { - "message": "सीड फ्रेज़" + "message": "गुप्त रिकवरी फ्रेज़" + }, + "walletSeedRestore": { + "message": "वॉलेट का गुप्त रिकवरी फ्रेज़" }, "welcome": { "message": "MetaMask में आपका स्वागत है" @@ -2008,7 +1978,7 @@ "message": "आप हस्ताक्षर कर रहे हैं" }, "yourPrivateSeedPhrase": { - "message": "आपका निजी सीड फ्रेज़" + "message": "आपका निजी गुप्त रिकवरी फ्रेज़" }, "zeroGasPriceOnSpeedUpError": { "message": "ज़ीरो गैस मूल्य में तेज़ी" diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index aacdd52d9..bf02b3939 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Gotovo" }, - "dontHaveAHardwareWallet": { - "message": "Nemate hardverski novčanik?" - }, "downloadGoogleChrome": { "message": "Preuzmi preglednik Google Chrome" }, @@ -439,9 +436,6 @@ "message": "Dohvati Ether iz svežnja za $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Potražite pomoć." - }, "getStarted": { "message": "Početak upotrebe" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "Odaberite hardverski novčanik koji biste željeli upotrebljavati s uslugom MetaMask" }, - "havingTroubleConnecting": { - "message": "Imate poteškoća s povezivanjem?" - }, "here": { "message": "ovdje", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -694,9 +685,6 @@ "optionalCurrencySymbol": { "message": "Simbol (neobavezno)" }, - "orderOneHere": { - "message": "Naručite Trezor ili Ledger te čuvajte svoja sredstva u hladnoj pohrani" - }, "origin": { "message": "Podrijetlo" }, @@ -756,9 +744,6 @@ "readdToken": { "message": "Ovaj token možete dodati kasnije odlaskom pod stavku „Dodaj token” u izborniku mogućnosti računa. " }, - "readyToConnect": { - "message": "Sve je spremno za povezivanje?" - }, "recents": { "message": "Nedavno" }, @@ -981,24 +966,6 @@ "stateLogsDescription": { "message": "U zapisnicima se stanja nalaze javne adrese računa i poslane transakcije." }, - "step1HardwareWallet": { - "message": "1. Povežite se na svoj hardverski novčanik" - }, - "step1HardwareWalletMsg": { - "message": "Povežite svoj hardverski novčanik izravno na svoje računalo." - }, - "step2HardwareWallet": { - "message": "2. Odaberite račun" - }, - "step2HardwareWalletMsg": { - "message": "Odaberite račun koji želite pregledati. Istovremeno možete odabrati samo jedan račun za pregled." - }, - "step3HardwareWallet": { - "message": "3. Započnite upotrebljavati dApps i više!" - }, - "step3HardwareWalletMsg": { - "message": "Upotrebljavajte svoj hardverski račun kako biste upotrebljavali bilo koji drugi račun Ethereum. Prijavite se u dApps, šaljite Eth, kupujte i pohranjujte ERC20 tokene i nezamjenske tokene kao CryptoKitties." - }, "storePhrase": { "message": "Spremite ovu rečenicu u upravitelj lozinkama poput aplikacije 1Password." }, diff --git a/app/_locales/ht/messages.json b/app/_locales/ht/messages.json index 327c534b9..2f750cd7d 100644 --- a/app/_locales/ht/messages.json +++ b/app/_locales/ht/messages.json @@ -172,9 +172,6 @@ "done": { "message": "Fini" }, - "dontHaveAHardwareWallet": { - "message": "Pa gen yon materyèl bous?" - }, "downloadGoogleChrome": { "message": "Telechaje Google Chrome" }, @@ -241,9 +238,6 @@ "message": "Jwenn Ether nan yon tiyo pou $1 la", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Jwenn èd." - }, "hardware": { "message": "materyèl" }, @@ -256,9 +250,6 @@ "hardwareWalletsMsg": { "message": "Chwazi yon Materyèl Wallet ou ta renmen itilize ak MetaMask" }, - "havingTroubleConnecting": { - "message": "Èske w gen pwoblèm pou konekte?" - }, "here": { "message": "isit la", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -409,9 +400,6 @@ "ok": { "message": "Oke" }, - "orderOneHere": { - "message": "Mete nan lòd on Trezor oswa Ledger epi kenbe lajan ou nan yon stòk frèt." - }, "origin": { "message": "Orijin" }, @@ -462,9 +450,6 @@ "readdToken": { "message": "Ou ka ajoute token sa aprè sa ankò ou prale nan \"Ajoute token\" nan opsyon meni kont ou an." }, - "readyToConnect": { - "message": "Pare pou konekte?" - }, "recipientAddress": { "message": "Adrès pou resevwa" }, @@ -618,24 +603,6 @@ "stateLogsDescription": { "message": "State logs gen adrès kont piblik ou yo epi tranzaksyon ou te voye yo." }, - "step1HardwareWallet": { - "message": "1. Konekte Materyèl bous" - }, - "step1HardwareWalletMsg": { - "message": "Konekte materyèl bous ou dirèkteman nan òdinatè ou." - }, - "step2HardwareWallet": { - "message": "2. Chwazi yon kont" - }, - "step2HardwareWalletMsg": { - "message": "Chwazi kont ou vle wè a. Ou ka chwazi youn sèlman nan yon moman." - }, - "step3HardwareWallet": { - "message": "3. Kòmanse itilize dApps ak plis ankò!" - }, - "step3HardwareWalletMsg": { - "message": "Sèvi ak kont materyèl ou menm jan ou t ap fè pou kont Etherum. Ouvri sesyon an nan dApps, voye Eth, achte ak stòke ERC20 tokens ak e ki pake chanje tokens tankou CryptoKitties." - }, "submitted": { "message": "Te Soumèt" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 5a6d334e2..cb397cd69 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Kész" }, - "dontHaveAHardwareWallet": { - "message": "Nincs hardveres tárcája? " - }, "downloadGoogleChrome": { "message": "Google Chrome letöltése" }, @@ -439,9 +436,6 @@ "message": "Szerezzen Ethert pénzcsapból a(z) $1-ért", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Segítség kérése" - }, "getStarted": { "message": "Első lépések" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "Válassza ki a MetaMask-kal használni kívánt hardveres pénztárcát" }, - "havingTroubleConnecting": { - "message": "Gond van a csatlakozással?" - }, "here": { "message": "itt", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -694,9 +685,6 @@ "optionalCurrencySymbol": { "message": "Szimbólum (opcionális)" }, - "orderOneHere": { - "message": "Rendeljen trezort vagy főkönyvet, és tárolja pénzeszközeit hideg tárcában" - }, "origin": { "message": "Eredet" }, @@ -756,9 +744,6 @@ "readdToken": { "message": "Ezt a tokent a jövőben is hozzáadhatja, ha a fiókbeállítások menü „Token hozzáadása” elemére lép." }, - "readyToConnect": { - "message": "Készen áll a csatlakozásra?" - }, "recents": { "message": "Legutóbbiak" }, @@ -981,24 +966,6 @@ "stateLogsDescription": { "message": "Az állapotnaplóban megtalálhatók nyilvános fiókcímeid és elküldött tranzakcióid." }, - "step1HardwareWallet": { - "message": "1. Csatlakoztassa a hardveres pénztárcát" - }, - "step1HardwareWalletMsg": { - "message": "Csatlakoztassa hardveres tárcáját közvetlenül a számítógéphez." - }, - "step2HardwareWallet": { - "message": "2. Válassz egy fiókot" - }, - "step2HardwareWalletMsg": { - "message": "Válassza ki a megtekinteni kívánt fiókot. Egyszerre csak egyet választhat." - }, - "step3HardwareWallet": { - "message": "3. Kezdje el használni a dApps-t és másokat!" - }, - "step3HardwareWalletMsg": { - "message": "Használja hardveres fiókját úgy, mint bármilyen Ethereum fiókot. Jelentkezzen be a dAppsba, küldjön Ethet, vásároljon és tároljon ERC20 tokeneket és nem helyettesíthető tokeneket, például CryptoKitties-t." - }, "storePhrase": { "message": "Tárolja a mondatot jelszókezelőben, például az 1Passwordben." }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 299c590c0..153a20974 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "Lewatkan" }, + "dismissReminderDescriptionField": { + "message": "Aktifkan ini untuk melewatkan pesan pengingat pencadangan frasa pemulihan. Kami sangat merekomendasikan agar Anda mencadangkan Frasa Pemulihan Rahasia Anda untuk menghindari hilangnya dana" + }, "done": { "message": "Selesai" }, - "dontHaveAHardwareWallet": { - "message": "Tidak punya dompet perangkat keras?" - }, "dontShowThisAgain": { "message": "Jangan tampilkan ini lagi" }, @@ -526,7 +526,7 @@ "message": "Minta kunci publik enkripsi" }, "endOfFlowMessage1": { - "message": "Anda lulus ujian - jaga frasa pemulihan Anda tetap aman, ini tanggung jawab Anda!" + "message": "Anda lulus ujian - jaga Frasa Pemulihan Rahasia Anda tetap aman, ini tanggung jawab Anda!" }, "endOfFlowMessage10": { "message": "Semua Selesai" @@ -541,13 +541,13 @@ "message": "Jangan bagikan frasa kepada siapa pun." }, "endOfFlowMessage5": { - "message": "Berhati-hatilah dengan phishing! MetaMask tidak pernah secara spontan meminta frasa pemulihan Anda." + "message": "Berhati-hatilah dengan phishing! MetaMask tidak pernah secara spontan meminta Frasa Pemulihan Rahasia Anda." }, "endOfFlowMessage6": { - "message": "Jika Anda perlu mencadangkan frasa pemulihan lagi, Anda dapat menemukannya di Pengaturan -> Keamanan." + "message": "Jika Anda perlu mencadangkan Frasa Pemulihan Rahasia lagi, Anda dapat menemukannya di Pengaturan -> Keamanan." }, "endOfFlowMessage8": { - "message": "MetaMask tidak dapat memulihkan frasa pemulihan Anda." + "message": "MetaMask tidak dapat memulihkan Frasa Pemulihan Rahasia Anda." }, "endOfFlowMessage9": { "message": "Pelajari selengkapnya." @@ -718,9 +718,6 @@ "message": "Dapatkan Ether dari keran untuk $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Dapatkan Bantuan." - }, "getStarted": { "message": "Persiapan." }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "Pilih dompet perangkat keras yang ingin Anda gunakan dengan MetaMask" }, - "havingTroubleConnecting": { - "message": "Ada masalah saat menghubungkan?" - }, "here": { "message": "di sini", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,15 +766,21 @@ "importAccount": { "message": "Impor Akun" }, + "importAccountLinkText": { + "message": "impor menggunakan Frasa Pemulihan Rahasia" + }, "importAccountMsg": { - "message": " Akun yang diimpor tidak akan dikaitkan dengan frasa pemulihan akun MetaMask yang asli dibuat. Pelajari selengkapnya tentang akun yang diimpor " + "message": " Akun yang diimpor tidak akan dikaitkan dengan Frasa Pemulihan Rahasia akun MetaMask yang asli dibuat. Pelajari selengkapnya tentang akun yang diimpor " }, "importAccountSeedPhrase": { - "message": "Impor akun dengan frasa pemulihan" + "message": "Impor akun dengan Frasa Pemulihan Rahasia" }, "importWallet": { "message": "Impor dompet" }, + "importYourExisting": { + "message": "Impor dompet Anda yang ada menggunakan Frasa Pemulihan Rahasia" + }, "imported": { "message": "Diimpor", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "URL RPC Tidak Valid" }, "invalidSeedPhrase": { - "message": "Frasa pemulihan tidak valid" + "message": "Frasa Pemulihan Rahasia Tidak Valid" }, "ipfsGateway": { "message": "Gateway IPFS" @@ -1042,7 +1042,7 @@ "message": "Tidak ada alamat yang ditetapkan untuk nama ini." }, "noAlreadyHaveSeed": { - "message": "Tidak, saya sudah memiliki frasa pemulihan" + "message": "Tidak, saya sudah memiliki Frasa Pemulihan Rahasia" }, "noConversionRateAvailable": { "message": "Tidak Ada Nilai Konversi yang Tersedia" @@ -1108,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "Simbol Mata Uang (opsional)" }, - "orderOneHere": { - "message": "Pesan Trezor atau Ledger dan simpan dana Anda di penyimpanan dingin" - }, "origin": { "message": "Asal" }, @@ -1192,9 +1189,6 @@ "readdToken": { "message": "Anda dapat menambahkan token ini kembali di masa mendatang dengan membuka “Tambahkan token” di menu opsi akun Anda." }, - "readyToConnect": { - "message": "Siap untuk Terhubung?" - }, "receive": { "message": "Terima" }, @@ -1232,7 +1226,7 @@ "message": "Hapus akun" }, "removeAccountDescription": { - "message": "Akun ini akan dihapus dari dompet Anda. Pastikan Anda memiliki frasa pemulihan asli atau kunci privat untuk akun impor ini sebelum melanjutkan. Anda dapat mengimpor atau membuat akun lagi dari akun drop down. " + "message": "Akun ini akan dihapus dari dompet Anda. Pastikan Anda memiliki Frasa Pemulihan Rahasia asli atau kunci privat untuk akun impor ini sebelum melanjutkan. Anda dapat mengimpor atau membuat akun lagi dari drop down akun. " }, "requestsAwaitingAcknowledgement": { "message": "permintaan menunggu untuk diakui" @@ -1247,13 +1241,13 @@ "message": "Atur Ulang Akun" }, "resetAccountDescription": { - "message": "Mengatur ulang akun akan mengosongkan riwayat transaksi Anda. Ini tidak akan mengubah saldo di akun atau mengharuskan Anda untuk memasukkan kembali frasa pemulihan Anda." + "message": "Mengatur ulang akun akan mengosongkan riwayat transaksi Anda. Ini tidak akan mengubah saldo di akun atau mengharuskan Anda untuk memasukkan kembali Frasa Pemulihan Rahasia Anda." }, "restore": { "message": "Pulihkan" }, "restoreAccountWithSeed": { - "message": "Memulihkan Akun dengan Frasa Pemulihan" + "message": "Memulihkan Akun dengan Frasa Pemulihan Rahasia" }, "restoreWalletPreferences": { "message": "Cadangan data Anda dari $1 telah ditemukan. Apakah Anda ingin memulihkan preferensi dompet Anda?", @@ -1266,13 +1260,13 @@ "message": "Token di sini menggunakan kembali simbol dari token lain yang Anda lihat, ini bisa jadi membingungkan atau menipu." }, "revealSeedWords": { - "message": "Mengungkapkan Frasa Pemulihan" + "message": "Mengungkapkan Frasa Pemulihan Rahasia" }, "revealSeedWordsDescription": { - "message": "Jika Anda pernah mengubah browser atau mengganti komputer, Anda akan memerlukan frasa pemulihan ini untuk mengakses akun Anda. Simpan di tempat yang aman dan rahasia." + "message": "Jika Anda pernah mengubah browser atau mengganti komputer, Anda akan memerlukan Frasa Pemulihan Rahasia ini untuk mengakses akun Anda. Simpan di tempat yang aman dan rahasia." }, "revealSeedWordsTitle": { - "message": "Frasa Pemulihan" + "message": "Frasa Pemulihan Rahasia" }, "revealSeedWordsWarning": { "message": "Kata-kata ini dapat digunakan untuk mencuri semua akun Anda." @@ -1329,16 +1323,16 @@ "message": "Keamanan & Privasi" }, "securitySettingsDescription": { - "message": "Pengaturan privasi dan frasa pemulihan dompet" + "message": "Pengaturan privasi dan Frasa Pemulihan Rahasia dompet" }, "seedPhrasePlaceholder": { "message": "Pisahkan setiap kata dengan satu spasi" }, "seedPhrasePlaceholderPaste": { - "message": "Tempel frasa pemulihan dari clipboard" + "message": "Tempel Frasa Pemulihan Rahasia dari clipboard" }, "seedPhraseReq": { - "message": "Frasa pemulihan berisi 12, 15, 18, 21, atau 24 kata" + "message": "Frasa Pemulihan Rahasia berisi 12, 15, 18, 21, atau 24 kata" }, "selectAHigherGasFee": { "message": "Pilih biaya jaringan yang lebih tinggi untuk mempercepat pemrosesan transaksi Anda.*" @@ -1423,7 +1417,7 @@ "message": "Tampilkan Kunci Privat" }, "showSeedPhrase": { - "message": "Tampilkan frasa pemulihan" + "message": "Menampilkan Frasa Pemulihan Rahasia" }, "sigRequest": { "message": "Permintaan Tanda Tangan" @@ -1495,24 +1489,6 @@ "statusNotConnected": { "message": "Tidak terhubung" }, - "step1HardwareWallet": { - "message": "1. Hubungkan Dompet Perangkat Keras" - }, - "step1HardwareWalletMsg": { - "message": "Hubungkan dompet perangkat keras Anda langsung ke komputer." - }, - "step2HardwareWallet": { - "message": "2. Pilih Akun" - }, - "step2HardwareWalletMsg": { - "message": "Pilih akun yang ingin Anda lihat. Anda hanya dapat memilih satu pada satu waktu." - }, - "step3HardwareWallet": { - "message": "3. Mulai menggunakan situs web3 dan lainnya!" - }, - "step3HardwareWalletMsg": { - "message": "Gunakan akun perangkat keras Anda seperti yang akan Anda lakukan dengan akun Ethereum lainnya. Hubungkan ke situs web3, kirim ETH, beli dan simpan token ERC20 dan token yang tidak dapat dipertukarkan seperti CryptoKitties." - }, "storePhrase": { "message": "Simpan frasa ini dalam pengelola kata sandi seperti 1Password." }, @@ -1597,9 +1573,6 @@ "swapFinalizing": { "message": "Menyelesaikan..." }, - "swapHighSlippageWarning": { - "message": "Jumlah slippage sangat tinggi. Pastikan Anda mengetahui yang Anda kerjakan!" - }, "swapLowSlippageError": { "message": "Transaksi bisa gagal, slippage maks. terlalu rendah." }, @@ -1693,9 +1666,6 @@ "swapSelectQuotePopoverDescription": { "message": "Di bawah ini adalah semua kuota yang dikumpulkan dari beberapa sumber likuiditas." }, - "swapSlippageTooLow": { - "message": "Slippage harus lebih besar dari nol" - }, "swapSource": { "message": "Sumber likuiditas" }, @@ -1732,9 +1702,6 @@ "message": "Beberapa token dapat menggunakan simbol dan nama yang sama. Periksa $1 untuk memverifikasi inilah token yang Anda cari.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Lihat $1" - }, "swapYourTokenBalance": { "message": "$1 $2 tersedia untuk ditukar", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1807,7 +1774,7 @@ "message": "Uji Fungsi" }, "thisWillCreate": { - "message": "Ini akan membuat frasa pemulihan dan dompet baru" + "message": "Ini akan membuat Frasa Pemulihan Rahasia dan dompet baru" }, "tips": { "message": "Kiat" @@ -1980,7 +1947,10 @@ "message": "panduan koneksi dompet perangkat keras kami" }, "walletSeed": { - "message": "Frasa pemulihan" + "message": "Frasa Pemulihan Rahasia" + }, + "walletSeedRestore": { + "message": "Frasa Pemulihan Rahasia Dompet" }, "welcome": { "message": "Selamat datang di MetaMask" @@ -2008,7 +1978,7 @@ "message": "Anda sudah masuk" }, "yourPrivateSeedPhrase": { - "message": "Frasa pemulihan privat Anda" + "message": "Frasa Pemulihan Rahasia pribadi Anda" }, "zeroGasPriceOnSpeedUpError": { "message": "Biaya jaringan nol dipercepat" diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 610583c2b..161086c29 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -503,9 +503,6 @@ "done": { "message": "Finito" }, - "dontHaveAHardwareWallet": { - "message": "Non hai un portafoglio hardware?" - }, "dontShowThisAgain": { "message": "Non mostrare di nuovo" }, @@ -730,9 +727,6 @@ "message": "Ottieni Get Ether da un faucet per $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Aiuto." - }, "getStarted": { "message": "Inizia" }, @@ -754,9 +748,6 @@ "hardwareWalletsMsg": { "message": "Selezione un portafoglio hardware che vuoi utilizzare con MetaMask" }, - "havingTroubleConnecting": { - "message": "Problemi di connessione?" - }, "here": { "message": "qui", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -1123,9 +1114,6 @@ "optionalCurrencySymbol": { "message": "Simbolo (opzionale)" }, - "orderOneHere": { - "message": "Compra un Trezor o un Ledger e tieni i tuoi soldi al sicuro" - }, "origin": { "message": "Origine" }, @@ -1207,9 +1195,6 @@ "readdToken": { "message": "Puoi aggiungere nuovamente questo token in futuro andando in “Aggiungi token” nel menu delle opzioni del tuo account." }, - "readyToConnect": { - "message": "Pronto a Connetterti?" - }, "receive": { "message": "Ricevi" }, @@ -1510,24 +1495,6 @@ "statusNotConnected": { "message": "Non connesso" }, - "step1HardwareWallet": { - "message": "1. Connetti Portafoglio Hardware" - }, - "step1HardwareWalletMsg": { - "message": "Connetti il tuo portafoglio hardware al tuo computer." - }, - "step2HardwareWallet": { - "message": "2. Seleziona un Account" - }, - "step2HardwareWalletMsg": { - "message": "Selezione l'account che vuoi vedere. Puoi selezionarne solo uno alla volta." - }, - "step3HardwareWallet": { - "message": "3. Inizia a usare dApps e molto altro ancora!" - }, - "step3HardwareWalletMsg": { - "message": "Usa il tuo account hardware come utilizzeresti qualsiasi account Ethereum. Accedi alle dApps, invia Eth, compra e conserva token ERC20 e token non fungibili come CryptoKitties" - }, "storePhrase": { "message": "Conserva questa frase in un gestore di password come 1Password." }, @@ -1615,9 +1582,6 @@ "swapFinalizing": { "message": "Finalizzando..." }, - "swapHighSlippageWarning": { - "message": "L'importo di slippage è molto alto. Assicurati di sapere cosa stai facendo!" - }, "swapLowSlippageError": { "message": "La transazione può fallire, il massimo slippage è troppo basso." }, @@ -1657,19 +1621,10 @@ "message": "Stai per scambiare $1 $2 (~$3) per $4 $5 (~$6).", "description": "This message represents the price slippage for the swap. $1 and $4 are a number (ex: 2.89), $2 and $5 are symbols (ex: ETH), and $3 and $6 are fiat currency amounts." }, - "swapPriceDifferenceAcknowledgement": { - "message": "Sono consapevole" - }, "swapPriceDifferenceTitle": { "message": "Differenza di prezzo di circa ~$1%", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "La differenza tra i prezzi del mercato può essere influenzata da commissioni prelevate da intermediari, dimensione del mercato, dimensione dello scambio, o inefficienze del mercato." - }, - "swapPriceDifferenceUnavailable": { - "message": "Il prezzo di mercato non è disponibile. Assicurati di sentirti a tuo agio con l'importo restituito prima di procedere." - }, "swapProcessing": { "message": "In elaborazione" }, @@ -1735,9 +1690,6 @@ "swapSelectQuotePopoverDescription": { "message": "Sotto trovi tutte le quotazioni raccolte da multiple sorgenti di liquidità." }, - "swapSlippageTooLow": { - "message": "Lo slippage deve essere maggiore di zero" - }, "swapSource": { "message": "Sorgente di liquidità" }, @@ -1788,9 +1740,6 @@ "message": "Più token possono usare lo stesso nome e simbolo. Verifica su $1 che questo sia il token che stai cercando.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Vedi $1" - }, "swapYourTokenBalance": { "message": "$1 $2 disponibili allo scambio", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 253588c73..6b10b2c45 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -497,12 +497,12 @@ "dismiss": { "message": "却下" }, + "dismissReminderDescriptionField": { + "message": "これをオンにすると、リカバリー フレーズ バックアップのリマインダーメッセージが解除されます。資金の損失を防ぐために、シークレット リカバリー フレーズのバックアップを取ることを強くお勧めします。" + }, "done": { "message": "完了" }, - "dontHaveAHardwareWallet": { - "message": "ハードウェアウォレットをお持ちではありませんか?" - }, "dontShowThisAgain": { "message": "再度表示しない" }, @@ -535,7 +535,7 @@ "message": "公開暗号鍵の要求" }, "endOfFlowMessage1": { - "message": "テストに合格しました。シードフレーズを安全に保管してください。これは利用者の責務です。" + "message": "テストに合格しました。シークレット リカバリー フレーズを安全に保管してください。保管はお客様の責任となります。" }, "endOfFlowMessage10": { "message": "全て完了" @@ -550,13 +550,13 @@ "message": "シードフレーズは絶対に誰にも教えないでください。" }, "endOfFlowMessage5": { - "message": "フィッシング詐欺に注意してください!MetaMaskは自発的にシードフレーズを絶対に要求しません。" + "message": "フィッシングにご注意ください!MetaMask の動作として、シークレット リカバリー フレーズを要求することは絶対にありません。" }, "endOfFlowMessage6": { - "message": "シードフレーズを再度バックアップする場合は、[設定] -> [セキュリティとプライバシー] で見つけることができます。" + "message": "シークレット リカバリー フレーズを再度バックアップする場合は、[設定] -> [セキュリティとプライバシー] にアクセスしてください。" }, "endOfFlowMessage8": { - "message": "MetaMaskはシードフレーズを復元できません。" + "message": "MetaMask はシークレット リカバリー フレーズを復元できません。" }, "endOfFlowMessage9": { "message": "詳細を表示。" @@ -727,9 +727,6 @@ "message": "$1 のFaucetでEtherを得ることができます。", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "サポートを受ける。" - }, "getStarted": { "message": "はじめる" }, @@ -751,9 +748,6 @@ "hardwareWalletsMsg": { "message": "MetaMaskに接続するハードウェアウォレットを選択してください" }, - "havingTroubleConnecting": { - "message": "接続に問題がありますか?" - }, "here": { "message": "こちら", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -781,15 +775,21 @@ "importAccount": { "message": "アカウントのインポート" }, + "importAccountLinkText": { + "message": "シークレット リカバリー フレーズを使用してインポートする" + }, "importAccountMsg": { - "message": "追加したアカウントはMetaMaskのアカウントパスフレーズとは関連付けられません。インポートしたアカウントについての詳細は" + "message": " インポートされたアカウントは、最初に作成した MetaMask アカウントのシークレット リカバリー フレーズと関連付けられません。インポートされたアカウントの詳細を表示" }, "importAccountSeedPhrase": { - "message": "シードフレーズを使用してアカウントをインポート" + "message": "シークレット リカバリー フレーズを使用してアカウントをインポートする:" }, "importWallet": { "message": "ウォレットのインポート" }, + "importYourExisting": { + "message": "シークレット リカバリー フレーズを使用して既存のウォレットをインポートする" + }, "imported": { "message": "インポート済", "description": "status showing that an account has been fully loaded into the keyring" @@ -854,7 +854,7 @@ "message": "無効な RPC URL" }, "invalidSeedPhrase": { - "message": "無効なシードフレーズ" + "message": "無効なシークレット リカバリー フレーズ" }, "ipfsGateway": { "message": "IPFSゲートウェイ" @@ -1054,7 +1054,7 @@ "message": "この名前にはアドレスが設定されていません。" }, "noAlreadyHaveSeed": { - "message": "いいえ、既にシードフレーズがあります" + "message": "いいえ、既にシークレット リカバリー フレーズを持っています" }, "noConversionRateAvailable": { "message": "どの換算レートも利用できません" @@ -1117,9 +1117,6 @@ "optionalCurrencySymbol": { "message": "通貨シンボル(オプション)" }, - "orderOneHere": { - "message": "Trezor又はLedgerを注文して資金をコールドストレージに保管できます" - }, "origin": { "message": "要求元" }, @@ -1201,9 +1198,6 @@ "readdToken": { "message": "アカウントオプションのメニューで\"トークンの追加\"を選択すると、後でこのトークンを戻すことができます。" }, - "readyToConnect": { - "message": "接続準備はよろしいですか?" - }, "receive": { "message": "受け取る" }, @@ -1241,7 +1235,7 @@ "message": "アカウントの削除" }, "removeAccountDescription": { - "message": "このアカウントはウォレットから削除されます。続行する前に、ウォレットにインポートしたアカウントのシードフレーズか秘密鍵を保管してください。アカウントは、アカウントのドロップダウンから再度インポート、または作成できます。" + "message": "このアカウントはウォレットから削除されます。続行する前に、インポートしたアカウントの元のシークレット リカバリー フレーズまたは秘密鍵を持っていることを確認してください。アカウントはアカウント ドロップダウンから再度インポートまたは作成できます。" }, "requestsAwaitingAcknowledgement": { "message": "承認されるまで待機する" @@ -1256,13 +1250,13 @@ "message": "アカウントをリセット" }, "resetAccountDescription": { - "message": "アカウントをリセットするとトランザクション履歴がクリアされます。シードフレーズの再入力は不要です。これによりアカウント内の残高が変更されることはありません。" + "message": "アカウントをリセットすると、トランザクション履歴がクリアされます。これによってアカウント内の残高が変更されることはありません。また、シークレット リカバリー フレーズの再入力を要求することはありません。" }, "restore": { "message": "復元" }, "restoreAccountWithSeed": { - "message": "シードフレーズでアカウントを復元" + "message": "シークレット リカバリー フレーズでアカウントを復元する" }, "restoreWalletPreferences": { "message": "$1 のデータバックアップが見つかりました。ウォレットの基本設定を復元しますか?", @@ -1275,13 +1269,13 @@ "message": "既に登録されているトークンシンボルと同じシンボルの登録はお勧めしません。混乱や操作ミスの原因になります。" }, "revealSeedWords": { - "message": "シードフレーズを表示" + "message": "シークレット リカバリー フレーズを公開する" }, "revealSeedWordsDescription": { - "message": "ブラウザを変更したりコンピュータを変更した場合は、アカウントにアクセスするためにシードフレーズが必要になります。安全で秘密の場所に保管してください。" + "message": "ブラウザーを変更した場合や、コンピューターを移動した場合は、自分のアカウントにアクセスするためにこのシークレット リカバリー フレーズが必要になります。安全で秘密の場所に保管してください。" }, "revealSeedWordsTitle": { - "message": "シードフレーズ" + "message": "シークレット リカバリー フレーズ" }, "revealSeedWordsWarning": { "message": "シードフレーズは全てのアカウントを盗む手段にも使えます。" @@ -1338,16 +1332,16 @@ "message": "セキュリティとプライバシー" }, "securitySettingsDescription": { - "message": "プライバシーの設定とウォレットのシードフレーズ" + "message": "プライバシーの設定とシークレット リカバリー フレーズ" }, "seedPhrasePlaceholder": { "message": "シードフレーズを単語ごとに半角スペースで分割して入力して下さい" }, "seedPhrasePlaceholderPaste": { - "message": "シードフレーズをクリップボードからペーストして下さい" + "message": "クリップボードからシークレット リカバリー フレーズを貼り付けます" }, "seedPhraseReq": { - "message": "シードフレーズには、12,15,18,21、または24単語が含まれます" + "message": "シークレット リカバリー フレーズには、12、15、18、21、24 語が含まれます" }, "selectAHigherGasFee": { "message": "トランザクションの処理を早めるには、より高いガス料金を選択してください。" @@ -1432,7 +1426,7 @@ "message": "秘密鍵の表示" }, "showSeedPhrase": { - "message": "シードフレーズの表示" + "message": "シークレット リカバリー フレーズを表示する" }, "sigRequest": { "message": "署名リクエスト" @@ -1504,24 +1498,6 @@ "statusNotConnected": { "message": "未接続" }, - "step1HardwareWallet": { - "message": "1.ハードウェア ウォレットの接続" - }, - "step1HardwareWalletMsg": { - "message": "コンピューターに直接ハードウェアウォレットを接続してください。" - }, - "step2HardwareWallet": { - "message": "2.アカウントを選択" - }, - "step2HardwareWalletMsg": { - "message": "読取るアカウントを1つ選択します。" - }, - "step3HardwareWallet": { - "message": "3.web3を使用してサイトに接続しましょう!" - }, - "step3HardwareWalletMsg": { - "message": "Ethereumアカウントと同じように、ハードウェアアカウントを使用します。web3サイトに接続してETH を送金し、ERC20トークンやCryptoKittiesのようなトークンを購入して保管できます。" - }, "storePhrase": { "message": "このフレーズを1Passwordのようなパスワードマネージャーに保管てください。" }, @@ -1609,9 +1585,6 @@ "swapFinalizing": { "message": "終了中..." }, - "swapHighSlippageWarning": { - "message": "非常に大きいスリッページ額です。本当に実行するか確認してください。" - }, "swapLowSlippageError": { "message": "トランザクションが失敗する可能性があります。最大スリッページが少なすぎます。" }, @@ -1655,12 +1628,6 @@ "message": "価格差は $1% です", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "市場価格の違いは、仲介業者が負担する手数料、市場規模、取引量、または取引価格差の影響を受けることがあります。" - }, - "swapPriceDifferenceUnavailable": { - "message": "マーケット価格は利用できません。続行する前に、返金額に問題がないことを確認してください。" - }, "swapProcessing": { "message": "処理中" }, @@ -1723,9 +1690,6 @@ "swapSelectQuotePopoverDescription": { "message": "以下は複数の流動性ソースから収集したすべての見積です。" }, - "swapSlippageTooLow": { - "message": "スリッページは 0 より多くする必要があります。" - }, "swapSource": { "message": "流動性ソース" }, @@ -1765,9 +1729,6 @@ "message": "複数のトークンが同じ名前とシンボルであることがあります。$1で実際のトークンでを確認してください。", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "$1 を表示" - }, "swapYourTokenBalance": { "message": "$1 $2 はスワップに使用できます", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1843,7 +1804,7 @@ "message": "テストFaucet" }, "thisWillCreate": { - "message": "新しいウォレットとシードフレーズが作成されます" + "message": "これにより、新しいウォレットとシークレット リカバリー フレーズが作成されます" }, "tips": { "message": "ヒント" @@ -2016,7 +1977,10 @@ "message": "ハードウェアウォレット接続ガイド" }, "walletSeed": { - "message": "シードフレーズ" + "message": "シークレット リカバリー フレーズ" + }, + "walletSeedRestore": { + "message": "ウォレット シークレット リカバリー フレーズ" }, "web3ShimUsageNotification": { "message": "このサイトは削除されたwindow.web3 APIを使用します。サイトに問題が発生しているなら、$1 で詳細を見ることができます。", @@ -2048,7 +2012,7 @@ "message": "署名しています" }, "yourPrivateSeedPhrase": { - "message": "秘密のシードフレーズ" + "message": "秘密のシークレット リカバリー フレーズ" }, "zeroGasPriceOnSpeedUpError": { "message": "追加のGas価格を0にできません" diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 1dba0cbc9..cbe33d70e 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -308,9 +308,6 @@ "done": { "message": "ಮುಗಿದಿದೆ" }, - "dontHaveAHardwareWallet": { - "message": "ಹಾರ್ಡ್‌ವೇರ್ ವ್ಯಾಲೆಟ್‌ ಅನ್ನು ಹೊಂದಿಲ್ಲವೇ?" - }, "downloadGoogleChrome": { "message": "Google Chrome ಡೌನ್‌ಲೋಡ್ ಮಾಡಿ" }, @@ -443,9 +440,6 @@ "message": "$1 ಗಾಗಿ ಫಾಸೆಟ್‌ನಿಂದ ಎಥರ್ ಅನ್ನು ಪಡೆಯಿರಿ", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "ಸಹಾಯವನ್ನು ಪಡೆಯಿರಿ." - }, "getStarted": { "message": "ಪ್ರಾರಂಭಗೊಂಡಿದೆ" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "MetaMask ನೊಂದಿಗೆ ಬಳಸಲು ನೀವು ಇಷ್ಟಪಡುವ ಹಾರ್ಡ‌ವೇರ್ ವ್ಯಾಲೆಟ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಿ" }, - "havingTroubleConnecting": { - "message": "ಸಂಪರ್ಕಿಸುವಲ್ಲಿ ತೊಂದರೆ ಇದೆಯೇ?" - }, "here": { "message": "ಇಲ್ಲಿ", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "ಚಿಹ್ನೆ (ಐಚ್ಛಿಕ)" }, - "orderOneHere": { - "message": "ಟ್ರೆಜರ್ ಅಥವಾ ಲೆಡ್ಜರ್ ಅನ್ನು ಆರ್ಡರ್ ಮಾಡಿ ಮತ್ತು ನಿಮ್ಮ ನಿಧಿಗಳನ್ನು ಕೋಲ್ಡ್ ಸ್ಟೋರೇಜ್‌ನಲ್ಲಿರಿಸಿ" - }, "origin": { "message": "ಮೂಲ" }, @@ -763,9 +751,6 @@ "readdToken": { "message": "ನಿಮ್ಮ ಖಾತೆಗಳ ಆಯ್ಕೆಗಳ ಮೆನುವಿನಲ್ಲಿ \"ಟೋಕನ್ ಸೇರಿಸು\" ಗೆ ಹೋಗುವ ಮೂಲಕ ನೀವು ಈ ಟೋಕನ್ ಅನ್ನು ಭವಿಷ್ಯದಲ್ಲಿ ಮರಳಿ ಸೇರಿಸಬಹುದು." }, - "readyToConnect": { - "message": "ಸಂಪರ್ಕಿಸಲು ಸಿದ್ಧವೇ?" - }, "recents": { "message": "ಇತ್ತೀಚಿನವುಗಳು" }, @@ -988,24 +973,6 @@ "stateLogsDescription": { "message": "ರಾಜ್ಯದ ಲಾಗ್‌ಗಳು ನಿಮ್ಮ ಸಾರ್ವಜನಿಕ ಖಾತೆಯ ವಿಳಾಸಗಳು ಮತ್ತು ಕಳುಹಿಸಲಾದ ವಹಿವಾಟುಗಳನ್ನು ಹೊಂದಿರುತ್ತವೆ." }, - "step1HardwareWallet": { - "message": "1. ಹಾರ್ಡ್‌ವೆರ್ ವ್ಯಾಲೆಟ್ ಸಂಪರ್ಕಪಡಿಸಿ" - }, - "step1HardwareWalletMsg": { - "message": "ನಿಮ್ಮ ಹಾರ್ಡ್‌ವೇರ್ ವ್ಯಾಲೆಟ್ ಅನ್ನು ನೇರವಾಗಿ ನಿಮ್ಮ ಕಂಪ್ಯೂಟರ್‌ಗೆ ಸಂಪರ್ಕಿಸಿ." - }, - "step2HardwareWallet": { - "message": "2. ಖಾತೆಯನ್ನು ಆಯ್ಕೆಮಾಡಿ" - }, - "step2HardwareWalletMsg": { - "message": "ನೀವು ವೀಕ್ಷಿಸಲು ಬಯಸುವ ಖಾತೆಯನ್ನು ಆಯ್ಕೆಮಾಡಿ. ನೀವು ಒಮ್ಮೆಗೆ ಒಂದನ್ನು ಮಾತ್ರ ಆಯ್ಕೆಮಾಡಬಹುದು." - }, - "step3HardwareWallet": { - "message": "3. dApps ಮತ್ತು ಹೆಚ್ಚಿನದನ್ನು ಬಳಸಲು ಪ್ರಾರಂಭಿಸಿ!" - }, - "step3HardwareWalletMsg": { - "message": "ಯಾವುದೇ ಎಥೆರಿಯಮ್ ಖಾತೆಯೊಂದಿಗೆ ನಿಮ್ಮ ಹಾರ್ಡ್‌ವೇರ್ ಖಾತೆಯನ್ನು ಬಳಸಿ. dApps ಗೆ ಲಾಗಿನ್ ಮಾಡಿ, Eth ಕಳುಹಿಸಿ, ERC20 ಟೋಕನ್‌ಗಳನ್ನು ಮತ್ತು ಕ್ರಿಪ್ಟೋಕಿಟ್ಟೀಸ್‌ನಂತಹ ಫಂಗಿಬಲ್ ಟೋಕನ್‌ಗಳನ್ನು ಖರೀದಿಸಿ ಮತ್ತು ಸಂಗ್ರಹಿಸಿ." - }, "storePhrase": { "message": "ಈ ಫ್ರೇಸ್ ಅನ್ನು ಪಾಸ್‌ವರ್ಡ್ ನಿರ್ವಾಹಕದಲ್ಲಿ 1Password ರೂಪದಲ್ಲಿ ಸಂಗ್ರಹಿಸಿ." }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 055ccc767..735e81dcf 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "해지" }, + "dismissReminderDescriptionField": { + "message": "이것을 켜서 복구 구문 백업 알림 메시지를 해지하십시오. 지갑을 복원할 수 있도록 비밀 복구 구문을 저장할 것을 강력하게 권장합니다." + }, "done": { "message": "완료" }, - "dontHaveAHardwareWallet": { - "message": "하드웨어 지갑이 없으신가요?" - }, "dontShowThisAgain": { "message": "이 메시지를 다시 표시하지 않음" }, @@ -526,7 +526,7 @@ "message": "암호화 공개 키 요구" }, "endOfFlowMessage1": { - "message": "테스트를 통과하셨습니다. 시드 구문을 안전하게 보관할 책임은 귀하에게 있습니다!" + "message": "테스트를 통과하셨습니다. 비밀 복구 구문을 안전하게 보관할 책임은 귀하에게 있습니다!" }, "endOfFlowMessage10": { "message": "모두 완료" @@ -541,13 +541,13 @@ "message": "구문을 누구와도 공유하지 마세요." }, "endOfFlowMessage5": { - "message": "피싱을 조심하세요! MetaMask에서는 절대로 시드 구문을 갑자기 물어보지 않습니다." + "message": "피싱을 조심하십시오! MetaMask에서는 절대로 시드 구문을 갑자기 물어보지 않습니다." }, "endOfFlowMessage6": { - "message": "시드 구문을 다시 백업해야 한다면 설정 -> 보안에서 시드 구문을 찾을 수 있습니다." + "message": "비밀 복구 구문을 다시 백업해야 한다면 설정 -> 보안에서 시드 구문을 찾을 수 있습니다." }, "endOfFlowMessage8": { - "message": "MetaMask에서는 시드 구문을 복구할 수 없습니다." + "message": "MetaMask에서는 계정 시드 구문을 복구할 수 없습니다." }, "endOfFlowMessage9": { "message": "자세한 내용을 알아보세요." @@ -718,9 +718,6 @@ "message": "$1용 포시트에서 Ether 얻기", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "도움을 받으세요." - }, "getStarted": { "message": "시작하기" }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "MetaMask와 함께 사용할 하드웨어 지갑 선택" }, - "havingTroubleConnecting": { - "message": "연결에 문제가 있으신가요?" - }, "here": { "message": "여기", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,8 +766,11 @@ "importAccount": { "message": "계정 가져오기" }, + "importAccountLinkText": { + "message": "계정 시드 구문으로 가져오기" + }, "importAccountMsg": { - "message": " 가져온 계정은 생성한 MetaMask 계정 시드 구문 원본에 연결되지 않습니다. 가져온 계정에 대해 자세히 알아보세요. " + "message": " 가져온 계정은 생성한 MetaMask 계정 시드 구문 원본에 연결되지 않습니다. 가져온 계정에 대해 자세히 알아보십시오. " }, "importAccountSeedPhrase": { "message": "시드 구문으로 계정 가져오기" @@ -781,6 +778,9 @@ "importWallet": { "message": "지갑 가져오기" }, + "importYourExisting": { + "message": "12단어 시드 구문을 사용하여 지갑 가져오기" + }, "imported": { "message": "가져옴", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "잘못된 RPC URL" }, "invalidSeedPhrase": { - "message": "잘못된 시드 구문" + "message": "잘못된 계정 시드 구문" }, "ipfsGateway": { "message": "IPFS 게이트웨이" @@ -1108,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "통화 기호(선택 사항)" }, - "orderOneHere": { - "message": "Trezor나 Ledger를 주문하고 자금을 냉동 창고에 보관하세요." - }, "origin": { "message": "원본" }, @@ -1192,9 +1189,6 @@ "readdToken": { "message": "나중에 계정 옵션 메뉴의 “토큰 추가”로 이동하면 이 토큰을 다시 추가할 수 있습니다." }, - "readyToConnect": { - "message": "연결할 준비가 되셨나요?" - }, "receive": { "message": "받기" }, @@ -1232,7 +1226,7 @@ "message": "계정 제거" }, "removeAccountDescription": { - "message": "이 계정이 지갑에서 제거됩니다. 계속하기 전에 가져온 이 계정에 대한 원본 시드 구문이나 비공개 키가 있는지 확인하세요. 계정 드롭다운에서 계정을 가져오거나 다시 만들 수 있습니다. " + "message": "이 계정이 지갑에서 제거됩니다. 계속하기 전에 가져온 이 계정에 대한 원본 시드 구문이나 비공개 키가 있는지 확인하십시오. 계정 드롭다운에서 계정을 가져오거나 다시 만들 수 있습니다. " }, "requestsAwaitingAcknowledgement": { "message": "확인 대기 중인 요청" @@ -1247,7 +1241,7 @@ "message": "계정 재설정" }, "resetAccountDescription": { - "message": "계정을 재설정하면 거래 내역이 지워집니다. 계정의 잔액이 변경되지는 않으면 시드 구문을 다시 입력하지 않아도 됩니다." + "message": "계정을 재설정하면 거래 내역이 지워집니다. 계정의 잔액이 변경되지 않으면 시드 구문을 다시 입력하지 않아도 됩니다." }, "restore": { "message": "복구" @@ -1266,13 +1260,13 @@ "message": "여기에 있는 토큰은 사용자가 확인한 다른 토큰의 기호를 재사용하기 때문에 혼란스럽거나 속기 쉽습니다." }, "revealSeedWords": { - "message": "시드 단어 공개" + "message": "계정 시드 구문 공개" }, "revealSeedWordsDescription": { - "message": "브라우저를 변경하거나 컴퓨터를 옮긴 경우, 계정에 액세스하려면 이 시드 구문이 필요합니다. 기밀이 보장된 안전한 곳에 보관하세요." + "message": "브라우저를 변경하거나 컴퓨터를 옮긴 경우, 계정에 액세스하려면 이 시드 구문이 필요합니다. 기밀이 보장된 안전한 곳에 보관하십시오." }, "revealSeedWordsTitle": { - "message": "시드 구문" + "message": "계정 시드 구문" }, "revealSeedWordsWarning": { "message": "이 구문은 계정 전체를 도용하는 데 사용될 수 있습니다." @@ -1423,7 +1417,7 @@ "message": "비공개 키 표시" }, "showSeedPhrase": { - "message": "시드 구문 표시" + "message": "계정 시드 구문 표시" }, "sigRequest": { "message": "서명 요청" @@ -1495,24 +1489,6 @@ "statusNotConnected": { "message": "연결되지 않음" }, - "step1HardwareWallet": { - "message": "1. 하드웨어 지갑 연결" - }, - "step1HardwareWalletMsg": { - "message": "하드웨어 지갑을 컴퓨터에 바로 연결합니다." - }, - "step2HardwareWallet": { - "message": "2. 계정 선택" - }, - "step2HardwareWalletMsg": { - "message": "확인할 계정을 선택하세요. 한 번에 하나만 선택할 수 있습니다." - }, - "step3HardwareWallet": { - "message": "3. web3 사이트 등을 사용해 시작하세요!" - }, - "step3HardwareWalletMsg": { - "message": "하드웨어 계정을 이더리움 계정에서처럼 사용하세요. web3 사이트에 연결하고, ETH를 보내고, ERC20 토큰 및 CryptoKitties 같은 대체 불가능 토큰을 구매하고 저장하세요." - }, "storePhrase": { "message": "이 구문을 1Password 같은 암호 관리자에 저장하세요." }, @@ -1597,9 +1573,6 @@ "swapFinalizing": { "message": "마무리 중..." }, - "swapHighSlippageWarning": { - "message": "슬리패지 금액이 아주 큽니다. 현재 어떤 작업을 하고 있는지 확인하세요!" - }, "swapLowSlippageError": { "message": "거래가 실패할 수도 있습니다. 최대 슬리패지가 너무 낮습니다." }, @@ -1693,9 +1666,6 @@ "swapSelectQuotePopoverDescription": { "message": "다음은 여러 유동성 소스에서 수집한 전체 견적입니다." }, - "swapSlippageTooLow": { - "message": "슬리패지는 0보다 커야 합니다." - }, "swapSource": { "message": "유동성 소스" }, @@ -1732,9 +1702,6 @@ "message": "여러 토큰이 같은 이름과 기호를 사용할 수 있습니다. $1을 확인하여 이것이 원하는 토큰인지 확인하세요.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "$1 보기" - }, "swapYourTokenBalance": { "message": "$1 $2 스왑 가능", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1980,7 +1947,10 @@ "message": "당사의 하드웨어 지갑 연결 가이드" }, "walletSeed": { - "message": "시드 구문" + "message": "계정 시드 구문" + }, + "walletSeedRestore": { + "message": "지갑 계정 시드 구문" }, "welcome": { "message": "MetaMask 방문을 환영합니다" @@ -2008,7 +1978,7 @@ "message": "서명 중입니다." }, "yourPrivateSeedPhrase": { - "message": "귀하의 비공개 시드 구문입니다." + "message": "비밀 백업 구문 확인" }, "zeroGasPriceOnSpeedUpError": { "message": "가속화 시 Gas 가격 0" diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index e4ca2146c..f18067844 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Atlikta" }, - "dontHaveAHardwareWallet": { - "message": "Nėra aparatinės įrangos slaptažodinės?" - }, "downloadGoogleChrome": { "message": "Atsiunčiama „Google Chrome“" }, @@ -443,9 +440,6 @@ "message": "Gaukite eterių iš čiaupo $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Gaukite pagalbos." - }, "getStarted": { "message": "Darbo pradžia" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "Pasirinkite aparatinės įrangos slaptažodinę, kurią pageidaujate naudoti su „MetaTask“" }, - "havingTroubleConnecting": { - "message": "Kyla problemų susiejant?" - }, "here": { "message": "čia", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "Simbolis (nebūtinas)" }, - "orderOneHere": { - "message": "Užsisakykite „Trezor“ arba „Ledger“ ir laikykite savo lėšas šaltojoje saugykloje" - }, "origin": { "message": "Kilmė" }, @@ -763,9 +751,6 @@ "readdToken": { "message": "Šį žetoną galite bet kada galite įtraukti ir vėl, tiesiog savo paskyros parinkčių meniu nueikite į „Įtraukti žetoną“." }, - "readyToConnect": { - "message": "Pasirengę prisijungti?" - }, "recents": { "message": "Naujausi" }, @@ -988,24 +973,6 @@ "stateLogsDescription": { "message": "Būsenos žurnaluose yra jūsų viešos paskyros adresų ir išsiųstų operacijų." }, - "step1HardwareWallet": { - "message": "1. Prijunkite aparatinės įrangos slaptažodinę" - }, - "step1HardwareWalletMsg": { - "message": "Prijunkite savo aparatinės įrangos slaptažodinę tiesiogiai prie savo kompiuterio." - }, - "step2HardwareWallet": { - "message": "2. Pasirinkite paskyrą" - }, - "step2HardwareWalletMsg": { - "message": "Pasirinkite norimą peržiūrėti sąskaitą. Vienu metu galima rinktis tik vieną." - }, - "step3HardwareWallet": { - "message": "3. Pradėkite naudoti decentralizuotas programas ir daugiau!" - }, - "step3HardwareWalletMsg": { - "message": "Naudokitės savo aparatinės įrangos paskyra kaip „Ethereum“ paskyra. Junkitės prie decentralizuotų programų, siųskite eterius, pirkite ir laikykite ERC20 žetonus ir nekeičiamus žetonus, tokius kaip „CryptoKitties“." - }, "storePhrase": { "message": "Laikykite šią frazę slaptažodžių tvarkyklėje kaip 1 slaptažodį." }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index 2a6e1dd8d..85848338a 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Pabeigts" }, - "dontHaveAHardwareWallet": { - "message": "Nav aparatūras maka?" - }, "downloadGoogleChrome": { "message": "Lejupielādēt ar Google Chrome" }, @@ -439,9 +436,6 @@ "message": "Vai vēlaties $1 iegūt Ether no krāna?", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Saņemt palīdzību." - }, "getStarted": { "message": "Sākt darbu" }, @@ -463,9 +457,6 @@ "hardwareWalletsMsg": { "message": "Atlasiet aparatūras maku lietošanai ar MetaMask" }, - "havingTroubleConnecting": { - "message": "Neizdodas pieslēgties?" - }, "here": { "message": "šeit", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -697,9 +688,6 @@ "optionalCurrencySymbol": { "message": "Simbols (neobligāti)" }, - "orderOneHere": { - "message": "Pasūtiet Trezor vai Ledger un glabājiet savus līdzekļus aukstajā krātuvē" - }, "origin": { "message": "Avots" }, @@ -759,9 +747,6 @@ "readdToken": { "message": "Jūs varat šo marķieri iestatīt atpakaļ nākotnē, konta opciju izvēlnē atverot \"Pievienot marķieri\"." }, - "readyToConnect": { - "message": "Vai esat gatavi izveidot savienojumu?" - }, "recents": { "message": "Nesenie" }, @@ -984,24 +969,6 @@ "stateLogsDescription": { "message": "Statusa žurnāli ietver publisko kontu adreses un nosūtītos darījumus." }, - "step1HardwareWallet": { - "message": "1. Pieslēgt aparatūras maku" - }, - "step1HardwareWalletMsg": { - "message": "Savienojiet aparatūras maku tieši ar datoru." - }, - "step2HardwareWallet": { - "message": "2. Atlasiet kontu" - }, - "step2HardwareWalletMsg": { - "message": "Atlasiet kontu, kuru vēlaties skatīt. Vienlaicīgi varat izvēlēties tikai vienu kontu." - }, - "step3HardwareWallet": { - "message": "3. Sāciet izmantot dApps un citas funkcijas!" - }, - "step3HardwareWalletMsg": { - "message": "Lietojiet aparatūras kontu līdzīgi citiem Ethereum kontiem. Pierakstieties dApps, sūtiet Eth, pērciet un glabājiet ERC20 žetonus un neatvietojamos žetonus, piemēram, CryptoKitties." - }, "storePhrase": { "message": "Saglabājiet šo frāzi paroļu pārvaldniekā, piemēram, 1Password." }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 017b30211..483925f9c 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -305,9 +305,6 @@ "done": { "message": "Selesai" }, - "dontHaveAHardwareWallet": { - "message": "Tiada dompet perkakasan?" - }, "downloadGoogleChrome": { "message": "Muat Turun Google Chrome" }, @@ -433,9 +430,6 @@ "message": "Dapatkan Ether daripada pili untuk $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Dapatkan Bantuan." - }, "getStarted": { "message": "Bermula" }, @@ -457,9 +451,6 @@ "hardwareWalletsMsg": { "message": "Pilih dompet perkakasan yang anda ingin gunakan dengan MetaMask" }, - "havingTroubleConnecting": { - "message": "Mengalami masalah untuk menyambungkan?" - }, "here": { "message": "di sini", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -678,9 +669,6 @@ "optionalCurrencySymbol": { "message": "Simbol (pilihan)" }, - "orderOneHere": { - "message": "Pesan Trezor atau Ledger dan simpan dana anda di dalam storan sejuk" - }, "origin": { "message": "Asal" }, @@ -740,9 +728,6 @@ "readdToken": { "message": "Anda boleh tambah token ini kembali pada masa depan dengan pergi ke \"Tambah token\" di dalam menu pilihan akaun anda." }, - "readyToConnect": { - "message": "Bersedia Menyambung?" - }, "recents": { "message": "Baru-baru ini" }, @@ -965,24 +950,6 @@ "stateLogsDescription": { "message": "Log keadaan mengandungi alamat akaun awam anda dan transaksi dihantar." }, - "step1HardwareWallet": { - "message": "1. Sambungkan Dompet Perkakasan" - }, - "step1HardwareWalletMsg": { - "message": "Sambungkan dompet perkakasan anda terus kepada komputer anda." - }, - "step2HardwareWallet": { - "message": "2. Pilih Akaun" - }, - "step2HardwareWalletMsg": { - "message": "Pilih akaun yang anda mahu lihat. Anda hanya boleh memilih satu pada suatu masa." - }, - "step3HardwareWallet": { - "message": "3. Mula menggunakan dApps dan banyak lagi!" - }, - "step3HardwareWalletMsg": { - "message": "Gunakan akaun perkakasan anda sepertimana anda menggunakan akaun Ethereum. Log masuk ke dalam dApps, hantar Eth, beli dan simpan token ERC20 serta token Tidak Mudah Tukar seperti CryptoKitties." - }, "storePhrase": { "message": "Simpan ungkapan ini di dalam pengurus kata laluan seperti 1Password." }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 93055032a..a6bba8253 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -305,9 +305,6 @@ "done": { "message": "Ferdig" }, - "dontHaveAHardwareWallet": { - "message": "Har du ikke en hardware-lommebok?" - }, "downloadGoogleChrome": { "message": "Last ned Google Chrome " }, @@ -436,9 +433,6 @@ "message": "Få Ether fra en kran for $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Få hjelp." - }, "getStarted": { "message": "Kom i gang" }, @@ -457,9 +451,6 @@ "hardwareWalletsMsg": { "message": "Velg maskinvarelommeboken som du vil bruke med MetaMask" }, - "havingTroubleConnecting": { - "message": "Har du problemer med å koble til?" - }, "here": { "message": "her", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -688,9 +679,6 @@ "optionalCurrencySymbol": { "message": "Symbol (valgfritt)" }, - "orderOneHere": { - "message": "Bestill en Trezor eller Ledger og oppbevar midlene dine i kjølerom" - }, "origin": { "message": "Opprinnelse" }, @@ -750,9 +738,6 @@ "readdToken": { "message": "Du kan legge til dette tokenet igjen i fremtiden ved å gå til \"Legg til token\" i menyen for kontoalternativer." }, - "readyToConnect": { - "message": "Klar til å koble til?" - }, "recents": { "message": "Nylige" }, @@ -969,24 +954,6 @@ "stateLogsDescription": { "message": "Tilstandslogger inneholder de offentlige kontoadressene og sendte transaksjoner." }, - "step1HardwareWallet": { - "message": "1. Koble til maskinvarelommebok" - }, - "step1HardwareWalletMsg": { - "message": "Koble hardware-lommebok din direkte til datamaskinen din." - }, - "step2HardwareWallet": { - "message": "2. Velg en konto" - }, - "step2HardwareWalletMsg": { - "message": "Velg den kontoen du ønsker å se. Du kan bare velge en av gangen." - }, - "step3HardwareWallet": { - "message": "3. Begynn å bruke dApps mer! " - }, - "step3HardwareWalletMsg": { - "message": "Bruk hardware-kontoen din slik du ville gjort med enhver Ethereumkonto. Logg på dApps, send Eth, kjøp og lagre ERC20-tokener og ikke-fungible tokener som CryptoKitties." - }, "storePhrase": { "message": "Lagre denne frasen i en passordbehandler slik som 1Password." }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index 6e6f4fbe7..e2f4db68c 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Gotowe" }, - "dontHaveAHardwareWallet": { - "message": "Nie masz portfela sprzętowego?" - }, "downloadGoogleChrome": { "message": "Ściągnij Google Chrome" }, @@ -443,9 +440,6 @@ "message": "Zdobądź Eter ze źródła za $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Po pomoc." - }, "getStarted": { "message": "Rozpocznij" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "Wybierz portfel sprzętowy, którego chcesz użyć z MetaMaskiem" }, - "havingTroubleConnecting": { - "message": "Problem z połączeniem?" - }, "here": { "message": "tutaj", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -695,9 +686,6 @@ "optionalCurrencySymbol": { "message": "Symbol (opcjonalnie)" }, - "orderOneHere": { - "message": "Zamów Trezor lub Ledger i trzymaj swoje środki w portfelu sprzętowym." - }, "origin": { "message": "Pochodzenie" }, @@ -757,9 +745,6 @@ "readdToken": { "message": "Możesz później ponownie dodać ten token poprzez \"Dodaj token\" w opcjach menu swojego konta." }, - "readyToConnect": { - "message": "Gotowy na połączenie?" - }, "recents": { "message": "Ostatnie" }, @@ -982,24 +967,6 @@ "stateLogsDescription": { "message": "Logi stanów zawierają Twoje publiczne adresy kont i wykonanych transakcji." }, - "step1HardwareWallet": { - "message": "1. Podłącz portfel sprzętowy" - }, - "step1HardwareWalletMsg": { - "message": "Połącz swój portfel sprzętowy z komputerem." - }, - "step2HardwareWallet": { - "message": "2. Wybierz konto" - }, - "step2HardwareWalletMsg": { - "message": "Wybierz konto, które chcesz przeglądać. Możesz wybrać tylko jedno konto w danym momencie." - }, - "step3HardwareWallet": { - "message": "3. Zacznij używać dystrybuowanych aplikacji (dApps) i wiele więcej!" - }, - "step3HardwareWalletMsg": { - "message": "Używaj swojego konta sprzętowego tak, jak używasz jakiegokolwiek konta z Ethereum. Loguj się do dystrybuowanych aplikacji (dApps), wysyłaj Eth, kupuj i przechowaj tokeny ERC20 i niewymienne tokeny, jak np. CryptoKitties." - }, "storePhrase": { "message": "Przechowuj tę frazę w menedżerze haseł, takim jak 1Password." }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index fe3bb1fa2..69c028186 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -299,12 +299,12 @@ "directDepositEtherExplainer": { "message": "Se você já tem Ether, a forma mais rápida de colocá-lo em sua nova carteira é o depósito direto." }, + "dismissReminderDescriptionField": { + "message": "Ative isso para descartar a mensagem de lembrete de backup da frase de recuperação. Recomendamos enfaticamente que você faça o backup da sua Frase de recuperação secreta para evitar perda de fundos" + }, "done": { "message": "Concluído" }, - "dontHaveAHardwareWallet": { - "message": "Não tem uma carteira física?" - }, "downloadGoogleChrome": { "message": "Baixar Google Chrome" }, @@ -324,7 +324,7 @@ "message": "Editar Contato" }, "endOfFlowMessage1": { - "message": "Você passou no teste — mantenha sua frase semente segura, a responsabilidade é sua!" + "message": "Você passou no teste. Guarde sua Frase de recuperação secreta em segurança, é sua responsabilidade!" }, "endOfFlowMessage10": { "message": "Pronto" @@ -339,13 +339,13 @@ "message": "Nunca compartilhe a frase com ninguém." }, "endOfFlowMessage5": { - "message": "Cuidado com o phishing! O MetaMask nunca solicitará espontaneamente sua frase semente." + "message": "Cuidado com phishing! O MetaMask jamais pedirá espontaneamente sua Frase de recuperação secreta." }, "endOfFlowMessage6": { - "message": "Se precisar fazer backup de sua frase-semente de novo, acesse Configurações -> Segurança." + "message": "Se você precisar fazer backup da sua Frase de recuperação secreta novamente, encontre-a em Configurações -> Segurança." }, "endOfFlowMessage8": { - "message": "O MetaMask não pode recuperar sua frase semente. Saiba mais." + "message": "O MetaMask não pode recuperar sua Frase de recuperação secreta." }, "endOfFlowMessage9": { "message": "Saiba mais." @@ -437,9 +437,6 @@ "message": "Obtenha Ether em uma torneira para $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Obtenha Ajuda." - }, "getStarted": { "message": "Primeiros passos" }, @@ -461,9 +458,6 @@ "hardwareWalletsMsg": { "message": "Selecione um hardware que gostaria de utilizar com o MetaMask" }, - "havingTroubleConnecting": { - "message": "Está tendo dificuldade para se conectar?" - }, "here": { "message": "aqui", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -487,15 +481,21 @@ "importAccount": { "message": "Importar Conta" }, + "importAccountLinkText": { + "message": "importar usando a Frase de recuperação secreta" + }, "importAccountMsg": { - "message": "As contas importadas não serão associadas à sua frase-semente da conta MetaMask criada originalmente. Saiba mais sobre contas importadas" + "message": " As contas importadas não estarão associadas à Frase de recuperação secreta da conta do MetaMask criada originalmente. Saiba mais sobre as contas importadas " }, "importAccountSeedPhrase": { - "message": "Importar uma Conta com Frase-semente" + "message": "Importe uma conta com a Frase de recuperação secreta" }, "importWallet": { "message": "Importar Carteira" }, + "importYourExisting": { + "message": "Importar a carteira existente usando uma Frase de recuperação secreta" + }, "imported": { "message": "Importado", "description": "status showing that an account has been fully loaded into the keyring" @@ -528,7 +528,7 @@ "message": "URL de RPC inválida" }, "invalidSeedPhrase": { - "message": "Frase semente inválida" + "message": "Frase de recuperação secreta inválida" }, "jsonFile": { "message": "Arquivo JSON", @@ -654,7 +654,7 @@ "message": "Nenhum endereço foi definido para este nome." }, "noAlreadyHaveSeed": { - "message": "Não, eu já tenho uma frase semente" + "message": "Não, eu já tenho uma Frase de recuperação secreta" }, "noConversionRateAvailable": { "message": "Nenhuma Taxa de Conversão Disponível" @@ -689,9 +689,6 @@ "optionalCurrencySymbol": { "message": "Símbolo (opcional)" }, - "orderOneHere": { - "message": "Peça uma Trezor ou Ledger e guarde seus fundos off-line" - }, "origin": { "message": "Origem" }, @@ -751,9 +748,6 @@ "readdToken": { "message": "Você pode adicionar esse token novamente no futuro acessando \"Adicionar token\" no menu de opções da sua conta." }, - "readyToConnect": { - "message": "Pronto para Conectar?" - }, "recents": { "message": "Recentes" }, @@ -788,7 +782,7 @@ "message": "Remover conta" }, "removeAccountDescription": { - "message": "Esta conta será removida de sua carteira. Verifique se você tem a frase-semente original ou a chave particular desta conta importada antes de continuar. Você pode importar ou criar contas novamente no menu suspenso da conta." + "message": "Esta conta será removida da sua carteira. Antes de continuar, você precisa garantir que tem a Frase de recuperação secreta original ou chave privada para esta conta importada. Você pode importar ou criar contas novamente a partir do menu suspenso da conta. " }, "requestsAwaitingAcknowledgement": { "message": "solicitações aguardando confirmação" @@ -803,22 +797,22 @@ "message": "Redefinir Conta" }, "resetAccountDescription": { - "message": "Restabelecer a sua conta limpará todo o seu histórico de transações." + "message": "Redefinir sua conta limpará o histórico de transações. Isso não alterará os saldos nas suas contas nem exigirá a reinserção da Frase de recuperação secreta." }, "restore": { "message": "Restaurar" }, "restoreAccountWithSeed": { - "message": "Restaurar sua conta com a frase semente" + "message": "Restaure sua conta com a Frase de recuperação secreta" }, "revealSeedWords": { - "message": "Revelar Palavras-semente" + "message": "Revelar Frase de recuperação secreta" }, "revealSeedWordsDescription": { - "message": "Se você mudar de navegador ou computador, precisará dessa frase semente para acessar suas contas. Salve-as em algum lugar seguro e secreto." + "message": "Se você alguma vez mudou de navegador ou trocou de computador, precisará dessa Frase de recuperação secreta para acessar suas contas. Salve-as em um lugar seguro e secreto." }, "revealSeedWordsTitle": { - "message": "Frase Semente" + "message": "Frase de recuperação secreta" }, "revealSeedWordsWarning": { "message": "Essas palavras podem ser usadas para roubar todas as suas contas." @@ -869,13 +863,16 @@ "message": "Segurança & Privacidade" }, "securitySettingsDescription": { - "message": "Configurações de privacidade e frase-semente da carteira" + "message": "Configurações de privacidade e Frase de recuperação secreta" }, "seedPhrasePlaceholder": { "message": "Separe cada palavra com um único espaço" }, + "seedPhrasePlaceholderPaste": { + "message": "Cole a Frase de recuperação secreta da área de transferência" + }, "seedPhraseReq": { - "message": "As frases-semente têm 12 palavras" + "message": "As Frases de recuperação secreta contêm 12, 15, 18, 21 ou 24 palavras" }, "selectAHigherGasFee": { "message": "Selecione uma taxa de gás mais alta para acelerar o processamento de sua transação.*" @@ -937,6 +934,9 @@ "showPrivateKeys": { "message": "Mostrar Chaves Privadas" }, + "showSeedPhrase": { + "message": "Mostrar Frase de recuperação secreta" + }, "sigRequest": { "message": "Solicitação de Assinatura" }, @@ -976,24 +976,6 @@ "stateLogsDescription": { "message": "Os registros de estado contêm seus endereços de conta pública e transações enviadas." }, - "step1HardwareWallet": { - "message": "1. Conectar Carteira Física" - }, - "step1HardwareWalletMsg": { - "message": "Conecte sua carteira de hardware diretamente ao seu computador." - }, - "step2HardwareWallet": { - "message": "2. Selecione uma Conta" - }, - "step2HardwareWalletMsg": { - "message": "Selecione a conta que você deseja ver. Você só pode escolher uma por vez." - }, - "step3HardwareWallet": { - "message": "3. Comece a usar dApps e muito mais!" - }, - "step3HardwareWalletMsg": { - "message": "Use sua conta física como faria com qualquer conta de Ethereum. Faça login em dApps, envie Eth, compre e guarde tokens ERC20 e Tokens Não Fungíveis, como CryptoKitties." - }, "storePhrase": { "message": "Guarde esta frase em um gerenciador de senhas como o 1Password." }, @@ -1040,7 +1022,7 @@ "message": "Torneira de Testes" }, "thisWillCreate": { - "message": "Isso criará uma nova carteira e frase-semente" + "message": "Isso criará uma nova carteira e Frase de recuperação secreta" }, "tips": { "message": "Doações" @@ -1173,7 +1155,10 @@ "message": "Visite nosso site" }, "walletSeed": { - "message": "Semente da Carteira" + "message": "Frase de recuperação secreta" + }, + "walletSeedRestore": { + "message": "Frase de recuperação secreta da carteira" }, "welcome": { "message": "Bem-vindo ao MetaMask" @@ -1194,7 +1179,7 @@ "message": "Você está assinando" }, "yourPrivateSeedPhrase": { - "message": "Sua frase-semente particular" + "message": "Sua Frase de recuperação secreta privada" }, "zeroGasPriceOnSpeedUpError": { "message": "Preço de Gas zero na agilização" diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index f0e938835..444ba049f 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Efectuat" }, - "dontHaveAHardwareWallet": { - "message": "Nu aveți portofel hardware?" - }, "downloadGoogleChrome": { "message": "Descărcare Google Chrome" }, @@ -436,9 +433,6 @@ "message": "Obțineți Ether de la un robinet pentru $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Obțineți ajutor." - }, "getStarted": { "message": "Începe" }, @@ -457,9 +451,6 @@ "hardwareWalletsMsg": { "message": "Selectați un portofel hardware pe care doriți să îl folosiți cu MetaMask" }, - "havingTroubleConnecting": { - "message": "Aveți probleme cu conectarea?" - }, "here": { "message": "aici", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -688,9 +679,6 @@ "optionalCurrencySymbol": { "message": "Simbol (opțional)" }, - "orderOneHere": { - "message": "Comandați Trezor sau Ledger și țineți-vă fondurile la rece" - }, "origin": { "message": "Origine" }, @@ -750,9 +738,6 @@ "readdToken": { "message": "Puteți adăuga din nou acest indicativ în viitor accesând „Adăugați indicativ” din meniul de opțiuni al contului dvs." }, - "readyToConnect": { - "message": "Gata de conectare?" - }, "recents": { "message": "Recente" }, @@ -975,24 +960,6 @@ "stateLogsDescription": { "message": "Jurnalele de stare conțin adresele contului dvs. public și tranzacțiile trimise." }, - "step1HardwareWallet": { - "message": "1. Conectați portofel hardware" - }, - "step1HardwareWalletMsg": { - "message": "Conectați portofelul hardware direct la computer." - }, - "step2HardwareWallet": { - "message": "2. Selectați un cont" - }, - "step2HardwareWalletMsg": { - "message": "Selectați contul pe care vreți să îl vizualizați. Puteți alege doar câte unul odată." - }, - "step3HardwareWallet": { - "message": "3. Începeți să folosiți dApps și altele!" - }, - "step3HardwareWalletMsg": { - "message": "Folosiți-vă contul hardware la fel ca pe orice cont Ethereum. Conectați-vă la dApps, trimiteți Eth, cumpărați și stocați tokenuri ERC20 și tokenuri non-fungibile precum CryptoKitties." - }, "storePhrase": { "message": "Păstrați această expresie într-un program de gestionare a parolelor cum ar fi 1Password." }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 5acbe608f..85fd35b9d 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "Отклонить" }, + "dismissReminderDescriptionField": { + "message": "Включите этот параметр, чтобы отклонить сообщение с напоминанием о резервном копировании фразы восстановления. Мы настоятельно рекомендуем сделать резервную копию секретной фразы восстановления, чтобы избежать потери средств" + }, "done": { "message": "Выполнено" }, - "dontHaveAHardwareWallet": { - "message": "У вас нет аппаратного кошелька?" - }, "dontShowThisAgain": { "message": "Больше не показывать это сообщение" }, @@ -526,7 +526,7 @@ "message": "Запросить открытый ключ шифрования." }, "endOfFlowMessage1": { - "message": "Вы прошли тест — храните свою исходную фразу в безопасности, это ваша ответственность!" + "message": "Вы прошли тест — храните свою секретную фразу восстановления в безопасности, это ваша ответственность!" }, "endOfFlowMessage10": { "message": "Выполнено" @@ -541,13 +541,13 @@ "message": "Никогда не говорите никому эту фразу." }, "endOfFlowMessage5": { - "message": "Остерегайтесь фишинга! MetaMask никогда неожиданно не запросит вашу исходную фразу." + "message": "Остерегайтесь фишинга! MetaMask никогда неожиданно не запросит вашу секретную фразу восстановления." }, "endOfFlowMessage6": { - "message": "Если вам нужно снова создать резервную копию исходной фразы, вы можете найти ее в Настройки -> Безопасность." + "message": "Если вам нужно снова создать резервную копию секретной фразы восстановления, вы можете найти ее в Настройки -> Безопасность." }, "endOfFlowMessage8": { - "message": "Просто помните, что MetaMask не может восстановить исходную фразу." + "message": "Просто помните, что MetaMask не может восстановить секретную фразу восстановления." }, "endOfFlowMessage9": { "message": "Дополнительная информация" @@ -718,9 +718,6 @@ "message": "Получите Ether из крана для $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Получить справку." - }, "getStarted": { "message": "Начать работу" }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "Выберите аппаратный кошелек, который вы хотите использовать с MetaMask" }, - "havingTroubleConnecting": { - "message": "Проблемы с подключением?" - }, "here": { "message": "здесь", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,15 +766,21 @@ "importAccount": { "message": "Импортировать счет" }, + "importAccountLinkText": { + "message": "импортировать с использованием секретной фразы восстановления" + }, "importAccountMsg": { - "message": " Импортированные счета не будут связаны с исходной фразой вашей изначально созданного счета MetaMask. Узнайте больше об импортированных счетах " + "message": " Импортированные счета не будут связаны с секретной фразой восстановления вашего изначально созданного счета MetaMask. Узнайте больше об импортированных счетах " }, "importAccountSeedPhrase": { - "message": "Импортировать счет с исходной фразой" + "message": "Импортировать счет с секретной фразой восстановления" }, "importWallet": { "message": "Импортировать кошелек" }, + "importYourExisting": { + "message": "Импортируйте существующий кошелек, используя начальную секретную фразу восстановления" + }, "imported": { "message": "Импортированный", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "Недействительный URL-адрес RPC" }, "invalidSeedPhrase": { - "message": "Неверная исходная фраза" + "message": "Недействительная секретная фраза восстановления" }, "ipfsGateway": { "message": "Шлюз IPFS" @@ -1042,7 +1042,7 @@ "message": "Для этого имени не задан адрес." }, "noAlreadyHaveSeed": { - "message": "Нет, у меня уже есть исходная фраза" + "message": "Нет, у меня уже есть секретная фраза восстановления" }, "noConversionRateAvailable": { "message": "Нет доступного курса обмена" @@ -1108,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "Символ валюты (необязательно)" }, - "orderOneHere": { - "message": "Закажите Trezor или Ledger и храните свои средства в холодном хранилище" - }, "origin": { "message": "Источник" }, @@ -1192,9 +1189,6 @@ "readdToken": { "message": "Вы можете снова добавить этот токен в будущем, выбрав «Добавить токен» в меню опций вашего счета." }, - "readyToConnect": { - "message": "Готовы подключиться?" - }, "receive": { "message": "Получить" }, @@ -1232,7 +1226,7 @@ "message": "Удалить счет" }, "removeAccountDescription": { - "message": "Этот счет будет удален из вашего кошелька. Перед продолжением убедитесь, что у вас есть исходная фраза или закрытый ключ для этой импортированного счета. Вы можете импортировать или снова создать счета из раскрывающегося списка. " + "message": "Этот счет будет удален из вашего кошелька. Перед продолжением убедитесь, что у вас есть секретная фраза восстановления или закрытый ключ для этой импортированного счета. Вы можете импортировать или снова создать счета из раскрывающегося списка. " }, "requestsAwaitingAcknowledgement": { "message": "запросы, ожидающие подтверждения" @@ -1247,13 +1241,13 @@ "message": "Сбросить счет" }, "resetAccountDescription": { - "message": "Сброс вашего счета удалит историю транзакций. Это не изменит остатки на ваших счетах и не потребует повторного ввода исходной фразы." + "message": "Сброс вашего счета удалит историю транзакций. Это не изменит остатки на ваших счетах и не потребует повторного ввода секретной фразы восстановления." }, "restore": { "message": "Восстановить" }, "restoreAccountWithSeed": { - "message": "Восстановите свой счет с помощью исходной фразы" + "message": "Восстановите свой счет с помощью секретной фразы восстановления" }, "restoreWalletPreferences": { "message": "Найдена резервная копия ваших данных из $1. Хотите восстановить настройки кошелька?", @@ -1266,13 +1260,13 @@ "message": "Токен здесь повторно использует символ из другого токена, который вы смотрите, это может запутать или ввести в заблуждение." }, "revealSeedWords": { - "message": "Раскрыть исходную фразу" + "message": "Показать секретную фразу восстановления" }, "revealSeedWordsDescription": { - "message": "Если вы меняете браузер или переходите на другой компьютер, вам понадобится эта исходная фраза для доступа к своим счетам. Сохраните ее в безопасном секретном месте." + "message": "Если вы меняете браузер или переходите на другой компьютер, вам понадобится эта секретная фраза восстановления для доступа к своим счетам. Сохраните ее в безопасном секретном месте." }, "revealSeedWordsTitle": { - "message": "Исходная фраза" + "message": "Секретная фраза восстановления" }, "revealSeedWordsWarning": { "message": "Эти слова можно использовать для кражи всех ваших счетов." @@ -1329,16 +1323,16 @@ "message": "Безопасность и конфиденциальность" }, "securitySettingsDescription": { - "message": "Настройки конфиденциальности и исходная фраза кошелька" + "message": "Настройки конфиденциальности и секретная фраза восстановления кошелька" }, "seedPhrasePlaceholder": { "message": "Отделяйте каждое слово одним пробелом" }, "seedPhrasePlaceholderPaste": { - "message": "Вставить исходную фразу из буфера обмена" + "message": "Вставить секретную фразу восстановления из буфера обмена" }, "seedPhraseReq": { - "message": "Исходные фразы содержат 12, 15, 18, 21 или 24 слова" + "message": "Секретные фразы восстановления содержат 12, 15, 18, 21 или 24 слова" }, "selectAHigherGasFee": { "message": "Выберите более высокую плату за топливо, чтобы ускорить обработку транзакции. *" @@ -1423,7 +1417,7 @@ "message": "Показать закрытые ключи" }, "showSeedPhrase": { - "message": "Показать исходную фразу" + "message": "Показать секретную фразу восстановления" }, "sigRequest": { "message": "Запрос на подпись" @@ -1495,24 +1489,6 @@ "statusNotConnected": { "message": "Не подключен" }, - "step1HardwareWallet": { - "message": "1. Подключить аппаратный кошелек" - }, - "step1HardwareWalletMsg": { - "message": "Подключите свой аппаратный кошелек напрямую к компьютеру." - }, - "step2HardwareWallet": { - "message": "2. Выберите счет" - }, - "step2HardwareWalletMsg": { - "message": "Выберите желаемый счет для просмотра. Вы можете выбирать только по одному." - }, - "step3HardwareWallet": { - "message": "3. Начните использовать сайты web3 и другое!" - }, - "step3HardwareWalletMsg": { - "message": "Используйте свой аппаратный счет, как обычный счет Ethereum. Подключайтесь к сайтам web3, отправляйте ETH, покупайте и храните токены ERC20 и незаменяемые токены, такие как CryptoKitties." - }, "storePhrase": { "message": "Сохраните эту фразу в диспетчере паролей, например в 1Password." }, @@ -1597,9 +1573,6 @@ "swapFinalizing": { "message": "Завершение..." }, - "swapHighSlippageWarning": { - "message": "Величина проскальзывания очень велика. Убедитесь, что вы знаете, что делаете!" - }, "swapLowSlippageError": { "message": "Транзакции могут завершиться неудачей, максимальное проскальзывание слишком мало." }, @@ -1693,9 +1666,6 @@ "swapSelectQuotePopoverDescription": { "message": "Ниже приведены все котировки, собранные из нескольких источников ликвидности." }, - "swapSlippageTooLow": { - "message": "Проскальзывание должно быть больше нуля" - }, "swapSource": { "message": "Источник ликвидности" }, @@ -1732,9 +1702,6 @@ "message": "Несколько токенов могут использовать одно и то же имя и символ. Проверьте $1, чтобы убедиться, что это именно тот токен, который вы ищете.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Просмотреть $1" - }, "swapYourTokenBalance": { "message": "$1 $2 доступны для свопа", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1807,7 +1774,7 @@ "message": "Тестовый кран" }, "thisWillCreate": { - "message": "Это создаст новый кошелек и начальную фразу" + "message": "Это создаст новый кошелек и секретную фразу восстановления" }, "tips": { "message": "Советы" @@ -1980,7 +1947,10 @@ "message": "наше руководство по подключению аппаратного кошелька" }, "walletSeed": { - "message": "Исходная фраза" + "message": "Секретная фраза восстановления" + }, + "walletSeedRestore": { + "message": "Секретная фраза восстановления кошелька" }, "welcome": { "message": "Добро пожаловать в MetaMask" @@ -2008,7 +1978,7 @@ "message": "Вы подписываете" }, "yourPrivateSeedPhrase": { - "message": "Ваша личная исходная фраза" + "message": "Ваша личная секретная фраза восстановления" }, "zeroGasPriceOnSpeedUpError": { "message": "Нулевая цена на топливо при ускорении" diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 7f2e6718d..e23dfb73e 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -302,9 +302,6 @@ "done": { "message": "Hotovo" }, - "dontHaveAHardwareWallet": { - "message": "Nemáte hardvérovú peňaženku?" - }, "downloadGoogleChrome": { "message": "Stiahnuť Google Chrome" }, @@ -437,9 +434,6 @@ "message": "Získejte Ether z faucetu za $1.", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Získajte pomoc." - }, "getStarted": { "message": "Začať" }, @@ -461,9 +455,6 @@ "hardwareWalletsMsg": { "message": "Vyberte hardvérovú peňaženku, ktorú chcete používať s MetaMask" }, - "havingTroubleConnecting": { - "message": "Máte problémy s pripojením?" - }, "here": { "message": "zde", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -670,9 +661,6 @@ "optionalCurrencySymbol": { "message": "Symbol (voliteľné)" }, - "orderOneHere": { - "message": "Objednajte si Trezor alebo Hlavnú knihu a uschovajte svoje prostriedky v sklade" - }, "origin": { "message": "Pôvod" }, @@ -732,9 +720,6 @@ "readdToken": { "message": "Tento token můžete v budoucnu přidat zpět s „Přidat token“ v nastavení účtu." }, - "readyToConnect": { - "message": "Pripravení na pripojenie?" - }, "recents": { "message": "Posledné" }, @@ -951,24 +936,6 @@ "stateLogsDescription": { "message": "Stavové protokoly obsahují vaše veřejné adresy účtů a odeslané transakce." }, - "step1HardwareWallet": { - "message": "1. Pripojiť hardvérovú peňaženku" - }, - "step1HardwareWalletMsg": { - "message": "Pripojte hardvérovú peňaženku priamo k počítaču." - }, - "step2HardwareWallet": { - "message": "2. Vybrať účet" - }, - "step2HardwareWalletMsg": { - "message": "Vyberte účet, ktorý chcete zobraziť. Naraz si môžete vybrať iba jeden." - }, - "step3HardwareWallet": { - "message": "3. Začať používať dApps a ďalšie!" - }, - "step3HardwareWalletMsg": { - "message": "Použite svoj hardvérový účet, ako keby ste použili akýkoľvek účet Ethereum. Prihláste sa do Dapps, pošlite Eth, nakupujte a ukladajte tokeny ERC20 a nezameniteľné tokeny ako CryptoKitties." - }, "storePhrase": { "message": "Túto frázu uložte do správcu hesiel ako 1Password." }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index ed36f5ff9..47a5a1737 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Končano" }, - "dontHaveAHardwareWallet": { - "message": "Nimate strojne denarnice?" - }, "downloadGoogleChrome": { "message": "Prenesi Google Chrome" }, @@ -461,9 +458,6 @@ "hardwareWalletsMsg": { "message": "Izberite vrsto strojne denarnice" }, - "havingTroubleConnecting": { - "message": "Imate težave?" - }, "here": { "message": "tukaj", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -686,9 +680,6 @@ "optionalCurrencySymbol": { "message": "Simbol (nezahtevano)" }, - "orderOneHere": { - "message": "Naročite Trezor ali Ledger i n zavarujte svoje premoženje s strojno denarnico" - }, "origin": { "message": "Izvor" }, @@ -748,9 +739,6 @@ "readdToken": { "message": "Ta žeton lahko dodate tudi kasneje z uporabo gumba “Dodaj žeton” v možnostih vašega računa." }, - "readyToConnect": { - "message": "Pripravljeni na povezovanje?" - }, "recents": { "message": "Nedavno" }, @@ -970,24 +958,6 @@ "stateLogsDescription": { "message": "State vsebujejo vaš javni nasklov in zgodovino transakcij." }, - "step1HardwareWallet": { - "message": "1. Povežite strojno denarnico" - }, - "step1HardwareWalletMsg": { - "message": "Z računalnikom povežite strojno denarnico." - }, - "step2HardwareWallet": { - "message": "2. Izberite račun" - }, - "step2HardwareWalletMsg": { - "message": "Izberite račun, ki ga želute uporabiti. Trenutno lahko izberete le en račun na enkrat." - }, - "step3HardwareWallet": { - "message": "3. Začnite uporabljati dApps in več!" - }, - "step3HardwareWalletMsg": { - "message": "Uporabite strojno denarnico kot katerikoli drug Ethereum račun. Prijavite se v dApps, pošljite Ether in ERC20 žetone in žetone kot CryptoKitties." - }, "storePhrase": { "message": "To geslo shranite v upravitelja gesel, kot je 1Password." }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 086783b38..7cbcdf175 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -305,9 +305,6 @@ "done": { "message": "Gotovo" }, - "dontHaveAHardwareWallet": { - "message": "Nemate hardverski novčanik?" - }, "downloadGoogleChrome": { "message": "Preuzmi Google Chrome" }, @@ -440,9 +437,6 @@ "message": "Preuzmite Ether sa slavine za $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Potražite pomoć." - }, "getStarted": { "message": "Започнимо" }, @@ -464,9 +458,6 @@ "hardwareWalletsMsg": { "message": "Izaberite hardverski novčanik koji biste voleli da koristite sa MetaMask-om" }, - "havingTroubleConnecting": { - "message": "Da li imate problem sa povezivanjem?" - }, "here": { "message": "ovde", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -692,9 +683,6 @@ "optionalCurrencySymbol": { "message": "Simbol (opciono)" }, - "orderOneHere": { - "message": "Naručite Trezor ili Ledger i čuvajte svoja sredstva u hladnom skladištu" - }, "origin": { "message": "Извор" }, @@ -754,9 +742,6 @@ "readdToken": { "message": "U budućnosti možete vratiti ovaj token tako što ćete otvoriti „Dodaj token“ u meniju opcija vašeg naloga." }, - "readyToConnect": { - "message": "Spremni za povezivanje?" - }, "recents": { "message": "Skorašnje" }, @@ -979,24 +964,6 @@ "stateLogsDescription": { "message": "Dnevnici stanja sadrže adrese vaših javnih naloga i poslatih transakcija." }, - "step1HardwareWallet": { - "message": "1. Poveži hardverski novčanik" - }, - "step1HardwareWalletMsg": { - "message": "Povežite svoj hardverski novčanik direktno sa kompjuterom." - }, - "step2HardwareWallet": { - "message": "2. Izaberite nalog" - }, - "step2HardwareWalletMsg": { - "message": "Izaberite nalog koji želite da pogledatee. Možete izabrati samo po jedan nalog." - }, - "step3HardwareWallet": { - "message": "3. Počnite da koristite dApps i još mnogo toga!" - }, - "step3HardwareWalletMsg": { - "message": "Koristite nalog na vašem hardveru isto onako kako biste koristili bilo koji Ethereum nalog. Prijavite se na dApps, šaljite Eth, kupujte i skladištite ERC20 tokene i nezamenljive tokene poput CryptoKitties." - }, "storePhrase": { "message": "Čuvajte ovaj izraz u menadžeru šifri kao što je 1Password." }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 9a8c4fac2..bfa2e92f6 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -302,9 +302,6 @@ "done": { "message": "Klart" }, - "dontHaveAHardwareWallet": { - "message": "Har du inte en hårdvaruplånbok?" - }, "downloadGoogleChrome": { "message": "Ladda ner Google Chrome" }, @@ -433,9 +430,6 @@ "message": "Få Ether från en kran för $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Få hjälp." - }, "getStarted": { "message": "Komma igång" }, @@ -457,9 +451,6 @@ "hardwareWalletsMsg": { "message": "Välj en hårdvaruplånbok som du vill använda med MetaMask" }, - "havingTroubleConnecting": { - "message": "Har du problem att ansluta?" - }, "here": { "message": "här", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -685,9 +676,6 @@ "optionalCurrencySymbol": { "message": "Symbol (frivillig)" }, - "orderOneHere": { - "message": "Beställ en Trezor eller Ledger och håll dina medel på is" - }, "origin": { "message": "Ursprung" }, @@ -747,9 +735,6 @@ "readdToken": { "message": "Du kan lägga till denna token i framtiden genom att välja \"Lägg till token\" i kontots alternativmeny." }, - "readyToConnect": { - "message": "Redo att ansluta?" - }, "recents": { "message": "Senaste" }, @@ -972,24 +957,6 @@ "stateLogsDescription": { "message": "Statusloggar innehåller dina publika kontoadresser och skickade transaktioner." }, - "step1HardwareWallet": { - "message": "1. Anslut hårdvaruplånbok" - }, - "step1HardwareWalletMsg": { - "message": "Koppla din hårdvaruplånbok direkt till din dator" - }, - "step2HardwareWallet": { - "message": "2. Välj ett konto" - }, - "step2HardwareWalletMsg": { - "message": "Välj det konto du vill visa. Du kan bara välja ett åt gången." - }, - "step3HardwareWallet": { - "message": "3. Börja använda dApps och mer!" - }, - "step3HardwareWalletMsg": { - "message": "Använd ditt hårdvarukonto som du skulle använda andra Ethereum-konton. Logga in i dAppar, skicka ETH, köp och förvara ERC20-tokens och Non-Fungible tokens som CryptoKitties." - }, "storePhrase": { "message": "Lagra denna fras i en lösenordshanterare såsom 1Password." }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index 588071d29..f4d9acc5b 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -302,9 +302,6 @@ "done": { "message": "Imekamilika" }, - "dontHaveAHardwareWallet": { - "message": "Huna waleti ya programu maunzi?" - }, "downloadGoogleChrome": { "message": "Pakua Google chrome" }, @@ -433,9 +430,6 @@ "message": "Pata Ether kutoka kwenye mfereji $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Pata Msaada" - }, "getStarted": { "message": "Anza" }, @@ -457,9 +451,6 @@ "hardwareWalletsMsg": { "message": "Chagua waleti ya programu maunzi ambayo ungependa kutumia kwenye MetaMask" }, - "havingTroubleConnecting": { - "message": "Je, unapata shida kuunganisha?" - }, "here": { "message": "hapa", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -679,9 +670,6 @@ "optionalCurrencySymbol": { "message": "Ishara (hiari)" }, - "orderOneHere": { - "message": "Agiza Trezor au Leja na weka fedha zako kwenye ifadhi ya baridi" - }, "origin": { "message": "Asili" }, @@ -741,9 +729,6 @@ "readdToken": { "message": "Unaweza kuongeza tena kianzio hiki hapo baadaye kwa kwenda kwenye \"Ongeza kianzio\" kwenye machaguo yako ya menyu ya akaunti." }, - "readyToConnect": { - "message": "Uko tayari Kuunganisha?" - }, "recents": { "message": "Za hivi karibuni" }, @@ -966,24 +951,6 @@ "stateLogsDescription": { "message": "Kumbukumbu za hali zinajumusiha anwani zako za akaunti za umma na miamala iliyotumwa." }, - "step1HardwareWallet": { - "message": "1. Unganisha Programu Maunzi ya Waleti" - }, - "step1HardwareWalletMsg": { - "message": "Unganisha programu maunzi yako ya waleti moja kwa moja kwenye kompyuta yako." - }, - "step2HardwareWallet": { - "message": "2. Chagua Akaunto" - }, - "step2HardwareWalletMsg": { - "message": "Chagua akaunti unayotaka kutazama. Unaweza kuchagua moja tu kwa wakati mmoja." - }, - "step3HardwareWallet": { - "message": "3. Anza kutumia dApps na zaidi!" - }, - "step3HardwareWalletMsg": { - "message": "Tumia akaunti yako ya programu maunzi kama ambavyo ungetumia kwa akaunti ya Ethereum. Ingia kwenye dApps, tuma Eth, nunua na hifadhi vianzio vya ERC20 na Vianzio visivyobadilishika kama vile CryptoKitties." - }, "storePhrase": { "message": "Hifadhi kirai hiki kwenye kidhibiti nenosiri kama vile 1Password." }, diff --git a/app/_locales/th/messages.json b/app/_locales/th/messages.json index b1d271c6f..324722400 100644 --- a/app/_locales/th/messages.json +++ b/app/_locales/th/messages.json @@ -148,9 +148,6 @@ "done": { "message": "เสร็จสิ้น" }, - "dontHaveAHardwareWallet": { - "message": "ไม่มี Hardware Wallet ใช่ไหม" - }, "downloadSecretBackup": { "message": "ดาวน์โหลด Phrase แบ็คอัพลับนี้และเก็บรักษาไว้ให้ปลอดภัยในฮาร์ดดิสก์หรืออุปกรณ์เก็บข้อมูลภายนอกที่มีการเข้ารหัส" }, @@ -465,15 +462,6 @@ "stateLogsDescription": { "message": "บันทึกของสถานะประกอบด้วยแอดแดรสสาธารณะและธุรกรรมที่ส่ง" }, - "step1HardwareWallet": { - "message": "1. เชื่อมต่อ Hardware Wallet" - }, - "step2HardwareWallet": { - "message": "2. เลือกบัญชี" - }, - "step3HardwareWalletMsg": { - "message": "ใช้บัญชีฮาร์ดแวร์ของคุณเช่นเดียวกับการใช้กับบัญชี Ethereum ล็อกอินเข้าสู่ dApp ส่ง Eth ซื้อและเก็บโทเคน ERC20 และโทเคนแบบ Non-Fungible เช่น CryptoKitties" - }, "storePhrase": { "message": "เก็บ Phrase นี้ในตัวจัดการรหัสผ่าน เช่น 1Password" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 6318b3b2c..caf6059fd 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "I-dismiss" }, + "dismissReminderDescriptionField": { + "message": "I-on ito para i-dismiss ang mensahe ng paalala ng pag-back up ng recovery phrase. Lubos naming inirerekomendang i-back up mo ang iyong Secret Recovery Phrase para maiwasan ang pagkawala ng pondo" + }, "done": { "message": "Tapos na" }, - "dontHaveAHardwareWallet": { - "message": "Wala ka bang hardware wallet?" - }, "dontShowThisAgain": { "message": "Huwag itong ipaklita ulit" }, @@ -526,7 +526,7 @@ "message": "Mag-request ng pampublikong encryption key" }, "endOfFlowMessage1": { - "message": "Naipasa mo ang pagsusulit - panatilihing ligtas ang iyong seedphrase, responsibilidad mo ito!" + "message": "Pumasa ka sa test - panatilihing ligtas ang iyong Secret Recovery Phrase, responsibilidad mo ito!" }, "endOfFlowMessage10": { "message": "Tapos Na Lahat" @@ -541,13 +541,13 @@ "message": "Huwag kailanmang ibahagi ang parirala sa sinuman." }, "endOfFlowMessage5": { - "message": "Mag-ingat sa phishing! Hindi kailanman basta na lang hihingin ng MetaMask ang iyong seed phrase." + "message": "Mag-ingat sa phishing! Hindi kailanman basta na lang hihingin ng MetaMask ang iyong Secret Recovery Phrase." }, "endOfFlowMessage6": { - "message": "Kung kailangan mong i-back up ulit ang iyong seed phrase, makikita mo ito sa Mga Setting -> Seguridad." + "message": "Kung kailangan mong i-back up ulit ang iyong Secret Recovery Phrase, makikita mo ito sa Mga Setting -> Seguridad." }, "endOfFlowMessage8": { - "message": "Hindi mababawi ng MetaMask ang iyong seedphrase." + "message": "Hindi mababawi ng MetaMask ang iyong Secret Recovery Phrase." }, "endOfFlowMessage9": { "message": "Matuto pa." @@ -718,9 +718,6 @@ "message": "Kunin ang Ether mula sa isang faucet sa halagang $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Humingi ng Tulong." - }, "getStarted": { "message": "Magsimula" }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "Pumili ng hardware wallet na gusto mong gamitin kasama ng MetaMask" }, - "havingTroubleConnecting": { - "message": "Nagkakaproblema ka ba sa pagkonekta?" - }, "here": { "message": "dito", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,15 +766,21 @@ "importAccount": { "message": "Mag-import ng Account" }, + "importAccountLinkText": { + "message": "i-import gamit ang Secret Recovery Phrase" + }, "importAccountMsg": { - "message": " Ang mga na-import na account ay hindi mauugnay sa orihinal mong nagawang seedphrase ng MetaMask account. Matuto pa tungkol sa mga na-import account " + "message": " Ang mga na-import na account ay hindi mauugnay sa orihinal mong nagawang Secret Recovery Phrase ng MetaMask account. Matuto pa tungkol sa mga na-import account " }, "importAccountSeedPhrase": { - "message": "Mag-import ng account gamit ang seed phrase" + "message": "Mag-import ng account gamit ang Secret Recovery Phrase" }, "importWallet": { "message": "I-import ang wallet" }, + "importYourExisting": { + "message": "I-import ang iyong kasalukuyang wallet gamit ang isang Secret Recovery Phrase" + }, "imported": { "message": "Na-import", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "Hindi valid ang RPC URL" }, "invalidSeedPhrase": { - "message": "Hindi valid ang seed phrase" + "message": "Hindi valid ang Secret Recovery Phrase" }, "ipfsGateway": { "message": "IPFS Gateway" @@ -1042,7 +1042,7 @@ "message": "Walang naitakdang address para sa pangalang ito." }, "noAlreadyHaveSeed": { - "message": "May seed phrase na ako" + "message": "Hindi, may Secret Recovery Phrase na ako" }, "noConversionRateAvailable": { "message": "Hindi Available ang Rate ng Conversion" @@ -1105,9 +1105,6 @@ "optionalCurrencySymbol": { "message": "Simbolo ng Currency (opsyonal)" }, - "orderOneHere": { - "message": "Mag-order ng Trezor o Ledger at itabi ang mga pondo mo sa malamig na storage" - }, "origin": { "message": "Pinagmulan" }, @@ -1189,9 +1186,6 @@ "readdToken": { "message": "Puwede mong ibalik ang token na ito sa hinaharap sa pamamagitan ng pagpunta sa “Magdagdag ng token” sa menu ng mga opsyon sa iyong account." }, - "readyToConnect": { - "message": "Handa ka na bang kumonekta?" - }, "receive": { "message": "Tumanggap" }, @@ -1229,7 +1223,7 @@ "message": "Tanggalin ang account" }, "removeAccountDescription": { - "message": "Tatanggalin ang account na ito sa iyong wallet. Tiyaking nasa iyo ang orihinal na seed phrase o pribadong key para sa na-import na account na ito bago magpatuloy. Puwede kang mag-import o gumawa ulit ng mga account mula sa drop-down ng account. " + "message": "Tatanggalin ang account na ito sa iyong wallet. Tiyaking nasa iyo ang orihinal na Secret Recovery Phrase o private key para sa na-import na account na ito bago magpatuloy. Puwede kang mag-import o gumawa ulit ng mga account mula sa drop-down ng account. " }, "requestsAwaitingAcknowledgement": { "message": "mga request na hinihintay na tanggapin" @@ -1244,13 +1238,13 @@ "message": "I-reset ang Account" }, "resetAccountDescription": { - "message": "Kapag ni-reset ang iyong account, maki-clear ang history ng iyong transaksyon. Hindi nito babaguhin ang mga balanse sa iyong mga account o hindi mo kakailanganing ilagay ulit ang iyong seed phrase." + "message": "Kapag ni-reset ang iyong account, maki-clear ang history ng iyong transaksyon. Hindi nito babaguhin ang mga balanse sa iyong mga account o hindi mo kakailanganing ilagay ulit ang iyong Secret Recovery Phrase." }, "restore": { "message": "I-restore" }, "restoreAccountWithSeed": { - "message": "I-restore ang iyong Account gamit ang Seed Phrase" + "message": "I-restore ang iyong Account gamit ang Secret Recovery Phrase" }, "restoreWalletPreferences": { "message": "Nakita ang backup ng iyong data mula sa $1. Gusto mo bang i-restore ang mga kagustuhan mo sa wallet?", @@ -1263,13 +1257,13 @@ "message": "Ang isang token dito ay muling ginagamit ang isang simbolo mula sa ibang token na tinitingnan mo, maaari itong maging nakakalito." }, "revealSeedWords": { - "message": "Ipakita ang Seed Phrase" + "message": "Ipakita ang Secret Recovery Phrase" }, "revealSeedWordsDescription": { - "message": "Kung papalitan mo ang iyong browser o ililipat ang mga computer, kakailanganin mo ang seed phrase na ito para ma-access ang iyong mga account. I-save ang mga iyon sa isang ligtas at sikretong lugar." + "message": "Kung magpapalit ka man ng browser o computer, kakailanganin mo ang Secret Recovery Phrase na ito para ma-access ang iyong mga account. I-save ang mga iyon sa isang ligtas at sikretong lugar." }, "revealSeedWordsTitle": { - "message": "Seed Phrase" + "message": "Secret Recovery Phrase" }, "revealSeedWordsWarning": { "message": "Magagamit ang mga salitang ito para manakaw ang lahat ng iyong account." @@ -1326,16 +1320,16 @@ "message": "Seguridad at Pagkapribado" }, "securitySettingsDescription": { - "message": "Mga setting ng pagkapribado at seed phrase ng wallet" + "message": "Mga setting ng privacy at Secret Recovery Phrase ng wallet" }, "seedPhrasePlaceholder": { "message": "Paghiwa-hiwalayin ang bawat salita gamit ang espasyo" }, "seedPhrasePlaceholderPaste": { - "message": "I-paste ang seed phrase mula sa clipboard" + "message": "I-paste ang Secret Recovery Phrase mula sa clipboard" }, "seedPhraseReq": { - "message": "Ang mga seed phrase ay naglalaman ng 12, 15, 18, 21, o 24 na salita" + "message": "Ang mga Secret Recovery Phrase ay naglalaman ng 12, 15, 18, 21, o 24 na salita" }, "selectAHigherGasFee": { "message": "Pumili ng mas malaking bayarin sa gas para mapabilis ang pagproseso ng iyong transaksyon.*" @@ -1420,7 +1414,7 @@ "message": "Ipakita ang Mga Pribadong Key" }, "showSeedPhrase": { - "message": "Ipakita ang seed phrase" + "message": "Ipakita ang Secret Recovery Phrase" }, "sigRequest": { "message": "Request na Paglagda" @@ -1492,24 +1486,6 @@ "statusNotConnected": { "message": "Hindi nakakonekta" }, - "step1HardwareWallet": { - "message": "1. Ikonekta ang Hardware Wallet" - }, - "step1HardwareWalletMsg": { - "message": "Direktang ikonekta ang wallet ng iyong hardware sa computer mo." - }, - "step2HardwareWallet": { - "message": "2. Pumili ng Account" - }, - "step2HardwareWalletMsg": { - "message": "Piliin ang account na gusto mong tingnan. Puwede ka lang pumili ng isa sa isang pagkakataon." - }, - "step3HardwareWallet": { - "message": "3. Simulang gamitin ang mga web3 site at higit pa!" - }, - "step3HardwareWalletMsg": { - "message": "Gamitin ang account ng iyong hardware sa parehong paraan ng paggamit mo sa Ethereum account. Kumonekta sa mga web3 site, magpadala ng ETH, bumili at mag-store ng mga ERC20 token at non-fungible token gaya ng CryptoKitties." - }, "storePhrase": { "message": "I-store ang phrase na ito sa isang password manager gaya ng 1Password." }, @@ -1594,9 +1570,6 @@ "swapFinalizing": { "message": "Isinasapinal..." }, - "swapHighSlippageWarning": { - "message": "Sobrang laki ng halaga ng slippage. Tiyaking alam mo ang ginagawa mo!" - }, "swapLowSlippageError": { "message": "Maaaring hindi magtagumpay ang transaksyon, masyadong mababa ang max na slippage." }, @@ -1690,9 +1663,6 @@ "swapSelectQuotePopoverDescription": { "message": "Makikita sa ibaba ang lahat ng quote na nakuha mula sa maraming pinagkukunan ng liquidity." }, - "swapSlippageTooLow": { - "message": "Dapat ay mas malaki sa zero ang slippage" - }, "swapSource": { "message": "Pinagkunan ng liquidity" }, @@ -1729,9 +1699,6 @@ "message": "Maaaring gamitin ng maraming token ang iisang pangalan at simbolo. Suriin ang $1 para ma-verify na ito ang token na hinahanap mo.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Tingnan ang $1" - }, "swapYourTokenBalance": { "message": "Available ang $1 $2 na i-swap", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1804,7 +1771,7 @@ "message": "Test Faucet" }, "thisWillCreate": { - "message": "Gagawa ito ng bagong wallet at seed phrase" + "message": "Gagawa ito ng bagong wallet at Secret Recovery Phrase" }, "tips": { "message": "Mga Tip" @@ -1977,7 +1944,10 @@ "message": "ang aming gabay sa pagkonekta ng hardware wallet" }, "walletSeed": { - "message": "Seed phrase" + "message": "Secret Recovery Phrase" + }, + "walletSeedRestore": { + "message": "Recovery Phrase ng Wallet Secret" }, "welcome": { "message": "Welcome sa MetaMask" diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 3e5773e42..27766159a 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -308,9 +308,6 @@ "done": { "message": "Готово" }, - "dontHaveAHardwareWallet": { - "message": "Не маєте апаратного гаманця?" - }, "downloadGoogleChrome": { "message": "Завантажити Гугл Хром" }, @@ -443,9 +440,6 @@ "message": "Отримайте Ether з крану за $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Отримати допомогу." - }, "getStarted": { "message": "Почати" }, @@ -467,9 +461,6 @@ "hardwareWalletsMsg": { "message": "Оберіть апаратний гаманець, який ви хочете використовувати з MetaMask" }, - "havingTroubleConnecting": { - "message": "Проблеми при підключенні?" - }, "here": { "message": "тут", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "Символ (не обов'язково)" }, - "orderOneHere": { - "message": "Замовте Trezor або Ledger та зберігайте ваші кошти у холодному сховищі" - }, "origin": { "message": "Походження" }, @@ -763,9 +751,6 @@ "readdToken": { "message": "Ви можете знову додати цей токен у меню облікового запису у розділі “Додати токен”. " }, - "readyToConnect": { - "message": "Готові підключитися?" - }, "recents": { "message": "Останні" }, @@ -988,24 +973,6 @@ "stateLogsDescription": { "message": "Логи стану містять ваші публічні адреси облікового запису та надіслані транзакції." }, - "step1HardwareWallet": { - "message": "1. Приєднайте апаратний гаманець" - }, - "step1HardwareWalletMsg": { - "message": "Під'єднайте ваш апаратний гаманець безпосередньо до вашого комп'ютера." - }, - "step2HardwareWallet": { - "message": "2. Оберіть обліковий запис" - }, - "step2HardwareWalletMsg": { - "message": "Оберіть обліковий запис, який бажаєте переглянути. Ви можете вибрати лише один." - }, - "step3HardwareWallet": { - "message": "3. Почніть користуватись dApps та більше!" - }, - "step3HardwareWalletMsg": { - "message": "Використовуйте ваш апаратний обліковий запис, як би ви використовували будь-який обліковий запис Ethereum. Увійдіть в dApps, надсилайте Eth, купуйте та зберігайте токени ERC20 та токени, які не є взаємозамінними, такі як CryptoKitties." - }, "storePhrase": { "message": "Зберігайте цю фразу у менеджері паролів, як 1Password." }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index cab617c40..671004f16 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -488,12 +488,12 @@ "dismiss": { "message": "Đóng" }, + "dismissReminderDescriptionField": { + "message": "Bật tùy chọn này để tắt thông báo nhắc sao lưu cụm mật khẩu khôi phục. Bạn nên sao lưu Cụm mật khẩu khôi phục bí mật của mình để tránh mất tiền" + }, "done": { "message": "Hoàn tất" }, - "dontHaveAHardwareWallet": { - "message": "Bạn không có ví cứng?" - }, "dontShowThisAgain": { "message": "Không hiển thị lại" }, @@ -526,7 +526,7 @@ "message": "Yêu cầu khóa mã hóa công khai" }, "endOfFlowMessage1": { - "message": "Bạn đã vượt qua bài kiểm tra. Hãy lưu giữ cụm mật khẩu gốc của bạn an toàn, đó là trách nhiệm của bạn!" + "message": "Bạn đã vượt qua bài kiểm tra. Hãy lưu giữ Cụm mật khẩu khôi phục bí mật của bạn an toàn, đó là trách nhiệm của bạn!" }, "endOfFlowMessage10": { "message": "Tất cả đã hoàn tất" @@ -541,13 +541,13 @@ "message": "Tuyệt đối không chia sẻ cụm mật khẩu với bất kỳ ai." }, "endOfFlowMessage5": { - "message": "Hãy cẩn thận với hoạt động lừa đảo! MetaMask sẽ không bao giờ tự ý hỏi cụm mật khẩu gốc của bạn." + "message": "Hãy cẩn thận với hoạt động lừa đảo! MetaMask sẽ không bao giờ tự ý hỏi Cụm mật khẩu khôi phục bí mật của bạn." }, "endOfFlowMessage6": { - "message": "Nếu cần sao lưu lại cụm mật khẩu gốc của mình, bạn có thể tìm thấy cụm mật khẩu này trong phần Cài đặt -> Bảo mật." + "message": "Nếu bạn cần sao lưu lại Cụm mật khẩu khôi phục bí mật, bạn có thể tìm thấy chức năng này trong Cài đặt -> Bảo mật." }, "endOfFlowMessage8": { - "message": "MetaMask không thể khôi phục cụm mật khẩu gốc của bạn." + "message": "MetaMask không thể khôi phục Cụm mật khẩu khôi phục bí mật của bạn." }, "endOfFlowMessage9": { "message": "Tìm hiểu thêm." @@ -718,9 +718,6 @@ "message": "Nhận Ether từ một vòi dành cho $1", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "Nhận trợ giúp." - }, "getStarted": { "message": "Bắt đầu" }, @@ -742,9 +739,6 @@ "hardwareWalletsMsg": { "message": "Chọn một ví cứng mà bạn muốn sử dụng với MetaMask" }, - "havingTroubleConnecting": { - "message": "Bạn đang gặp sự cố với việc kết nối?" - }, "here": { "message": "tại đây", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -772,15 +766,21 @@ "importAccount": { "message": "Nhập tài khoản" }, + "importAccountLinkText": { + "message": "nhập bằng Cụm mật khẩu khôi phục bí mật" + }, "importAccountMsg": { - "message": " Tài khoản đã nhập sẽ không được liên kết với cụm mật khẩu gốc cho tài khoản MetaMask đã tạo ban đầu của bạn. Tìm hiểu thêm về các tài khoản đã nhập " + "message": " Tài khoản đã nhập sẽ không được liên kết với Cụm mật khẩu khôi phục bí mật cho tài khoản MetaMask đã tạo ban đầu của bạn. Tìm hiểu thêm về các tài khoản đã nhập " }, "importAccountSeedPhrase": { - "message": "Nhập một tài khoản bằng cụm mật khẩu gốc" + "message": "Nhập một tài khoản bằng Cụm mật khẩu khôi phục bí mật" }, "importWallet": { "message": "Nhập ví" }, + "importYourExisting": { + "message": "Nhập ví hiện tại của bạn bằng Cụm mật khẩu khôi phục bí mật" + }, "imported": { "message": "Đã nhập", "description": "status showing that an account has been fully loaded into the keyring" @@ -842,7 +842,7 @@ "message": "URL RPC không hợp lệ" }, "invalidSeedPhrase": { - "message": "Cụm mật khẩu gốc không hợp lệ" + "message": "Cụm mật khẩu khôi phục bí mật không hợp lệ" }, "ipfsGateway": { "message": "Cổng kết nối IPFS" @@ -1042,7 +1042,7 @@ "message": "Chưa có địa chỉ nào được đặt cho tên này." }, "noAlreadyHaveSeed": { - "message": "Không, tôi đã có cụm mật khẩu gốc" + "message": "Không, tôi đã có Cụm mật khẩu bí mật" }, "noConversionRateAvailable": { "message": "Không có sẵn tỷ lệ quy đổi nào" @@ -1108,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "Ký hiệu tiền tệ (không bắt buộc)" }, - "orderOneHere": { - "message": "Đặt mua một ví Trezor hoặc Ledger và giữ tiền của bạn trong ví lưu trữ lạnh" - }, "origin": { "message": "Nguồn gốc" }, @@ -1192,9 +1189,6 @@ "readdToken": { "message": "Bạn có thể thêm lại token này trong tương lai bằng cách chuyển đến mục “Thêm token” trong trình đơn tùy chọn tài khoản." }, - "readyToConnect": { - "message": "Bạn đã sẵn sàng kết nối chưa?" - }, "receive": { "message": "Nhận" }, @@ -1232,7 +1226,7 @@ "message": "Xóa tài khoản" }, "removeAccountDescription": { - "message": "Tài khoản này sẽ được xóa khỏi ví của bạn. Xin đảm bảo rằng bạn có cụm mật khẩu gốc ban đầu hoặc khóa riêng tư cho tài khoản được nhập trước khi tiếp tục. Bạn có thể nhập hoặc tạo lại tài khoản từ trình đơn tài khoản thả xuống. " + "message": "Tài khoản này sẽ được xóa khỏi ví của bạn. Xin đảm bảo rằng bạn có Cụm mật khẩu khôi phục bí mật ban đầu hoặc khóa riêng tư cho tài khoản được nhập trước khi tiếp tục. Bạn có thể nhập hoặc tạo lại tài khoản từ trình đơn tài khoản thả xuống. " }, "requestsAwaitingAcknowledgement": { "message": "yêu cầu đang chờ xác nhận" @@ -1247,13 +1241,13 @@ "message": "Đặt lại tài khoản" }, "resetAccountDescription": { - "message": "Nếu đặt lại tài khoản của bạn, toàn bộ lịch sử giao dịch sẽ bị xóa. Việc này sẽ không làm thay đổi số dư trong tài khoản của bạn hoặc yêu cầu bạn phải nhập lại cụm mật khẩu gốc." + "message": "Nếu đặt lại tài khoản của bạn, toàn bộ lịch sử giao dịch sẽ bị xóa. Việc này sẽ không làm thay đổi số dư trong tài khoản của bạn hoặc yêu cầu bạn phải nhập lại Cụm mật khẩu khôi phục bí mật." }, "restore": { "message": "Khôi phục" }, "restoreAccountWithSeed": { - "message": "Khôi phục tài khoản của bạn bằng cụm mật khẩu gốc" + "message": "Khôi phục tài khoản của bạn bằng cụm mật khẩu khôi phục bí mật" }, "restoreWalletPreferences": { "message": "Đã tìm thấy bản sao lưu dữ liệu của bạn từ $1. Bạn có muốn khôi phục các tùy chọn ưu tiên trong ví của mình không?", @@ -1266,13 +1260,13 @@ "message": "Một token trong đây sử dụng lại ký hiệu của một token khác mà bạn thấy, điều này có thể gây nhầm lẫn hoặc mang tính lừa dối." }, "revealSeedWords": { - "message": "Hiện cụm mật khẩu gốc" + "message": "Hiện cụm mật khẩu khôi phục bí mật" }, "revealSeedWordsDescription": { - "message": "Nếu thay đổi trình duyệt hoặc chuyển máy tính, bạn sẽ cần cụm mật khẩu gốc này để truy cập tài khoản của mình. Hãy lưu cụm mật khẩu gốc này ở nơi an toàn và bí mật." + "message": "Nếu thay đổi trình duyệt hoặc chuyển máy tính, bạn sẽ cần Cụm mật khẩu khôi phục bí mật này để truy cập tài khoản của mình. Hãy lưu cụm mật khẩu gốc này ở nơi an toàn và bí mật." }, "revealSeedWordsTitle": { - "message": "Cụm mật khẩu gốc" + "message": "Cụm mật khẩu khôi phục bí mật" }, "revealSeedWordsWarning": { "message": "Kẻ xấu có thể dùng các từ này để đánh cắp tất cả các tài khoản của bạn." @@ -1329,16 +1323,16 @@ "message": "Bảo mật và quyền riêng tư" }, "securitySettingsDescription": { - "message": "Cụm mật khẩu gốc của ví và các tùy chọn cài đặt quyền riêng tư" + "message": "Các cài đặt quyền riêng tư và Cụm mật khẩu khôi phục bí mật của ví" }, "seedPhrasePlaceholder": { "message": "Phân tách mỗi từ bằng một dấu cách" }, "seedPhrasePlaceholderPaste": { - "message": "Dán cụm mật khẩu gốc từ khay nhớ tạm" + "message": "Dán Cụm mật khẩu khôi phục bí mật từ khay nhớ tạm" }, "seedPhraseReq": { - "message": "Cụm mật khẩu gốc gồm 12, 15, 18, 21 hoặc 24 từ" + "message": "Cụm mật khẩu khôi phục bí mật gồm 12, 15, 18, 21 hoặc 24 từ" }, "selectAHigherGasFee": { "message": "Chọn phí gas cao hơn để tăng tốc quá trình xử lý giao dịch của bạn.*" @@ -1423,7 +1417,7 @@ "message": "Hiện khóa riêng tư" }, "showSeedPhrase": { - "message": "Hiển thị cụm mật khẩu gốc" + "message": "Hiển thị Cụm mật khẩu khôi phục bí mật" }, "sigRequest": { "message": "Yêu cầu chữ ký" @@ -1495,24 +1489,6 @@ "statusNotConnected": { "message": "Chưa kết nối" }, - "step1HardwareWallet": { - "message": "1. Kết nối với ví cứng" - }, - "step1HardwareWalletMsg": { - "message": "Kết nối ví cứng của bạn trực tiếp với máy tính." - }, - "step2HardwareWallet": { - "message": "2. Chọn một tài khoản" - }, - "step2HardwareWalletMsg": { - "message": "Chọn tài khoản bạn muốn xem. Bạn chỉ chọn được một tài khoản tại một thời điểm." - }, - "step3HardwareWallet": { - "message": "3. Bắt đầu sử dụng các trang web trên web3 và nhiều hơn thế!" - }, - "step3HardwareWalletMsg": { - "message": "Sử dụng cùng một tài khoản ví cứng mà bạn sẽ dùng với mọi tài khoản Ethereum của mình. Kết nối với các trang web trên web3, gửi ETH, mua và lưu trữ token ERC20 cũng như token không thể thay thế, chẳng hạn như CryptoKitties." - }, "storePhrase": { "message": "Lưu cụm mật khẩu này trong trình quản lý mật khẩu chẳng hạn như 1Password." }, @@ -1597,9 +1573,6 @@ "swapFinalizing": { "message": "Đang hoàn tất..." }, - "swapHighSlippageWarning": { - "message": "Số tiền trượt giá rất cao. Hãy chắc chắn rằng bạn hiểu những gì mình đang làm!" - }, "swapLowSlippageError": { "message": "Giao dịch có thể không thành công, mức trượt giá tối đa quá thấp." }, @@ -1693,9 +1666,6 @@ "swapSelectQuotePopoverDescription": { "message": "Dưới đây là tất cả các báo giá thu thập từ nhiều nguồn thanh khoản." }, - "swapSlippageTooLow": { - "message": "Mức trượt giá phải lớn hơn 0" - }, "swapSource": { "message": "Nguồn thanh khoản" }, @@ -1732,9 +1702,6 @@ "message": "Nhiều token có thể dùng cùng một tên và ký hiệu. Hãy kiểm tra trên $1 để xác minh xem đây có phải là token bạn đang tìm kiếm không.", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "Xem $1" - }, "swapYourTokenBalance": { "message": "Có sẵn $1 $2 để hoán đổi", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" @@ -1807,7 +1774,7 @@ "message": "Vòi thử nghiệm" }, "thisWillCreate": { - "message": "Thao tác này sẽ tạo một ví mới và cụm mật khẩu gốc" + "message": "Thao tác này sẽ tạo một ví mới và Cụm mật khẩu khôi phục bí mật" }, "tips": { "message": "Mẹo" @@ -1980,7 +1947,10 @@ "message": "hướng dẫn của chúng tôi về cách kết nối ví cứng" }, "walletSeed": { - "message": "Cụm mật khẩu gốc" + "message": "Cụm mật khẩu khôi phục bí mật" + }, + "walletSeedRestore": { + "message": "Cụm mật khẩu khôi phục bí mật của ví" }, "welcome": { "message": "Chào mừng bạn đến với MetaMask" @@ -2008,7 +1978,7 @@ "message": "Bạn đang ký" }, "yourPrivateSeedPhrase": { - "message": "Cụm mật khẩu gốc riêng tư của bạn" + "message": "Cụm mật khẩu bí mật, riêng tư của bạn" }, "zeroGasPriceOnSpeedUpError": { "message": "Giá gas bằng 0 khi tăng tốc" diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 222cbf47f..cb1950b2c 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -500,9 +500,6 @@ "done": { "message": "完成" }, - "dontHaveAHardwareWallet": { - "message": "没有硬件钱包?" - }, "dontShowThisAgain": { "message": "不再显示" }, @@ -727,9 +724,6 @@ "message": "从水管获取 $1 网络的 Ether", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "获取帮助。" - }, "getStarted": { "message": "开始使用" }, @@ -751,9 +745,6 @@ "hardwareWalletsMsg": { "message": "选择希望用于 MetaMask 的硬件钱包" }, - "havingTroubleConnecting": { - "message": "连接出现问题?" - }, "here": { "message": "这里", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -1117,9 +1108,6 @@ "optionalCurrencySymbol": { "message": "符号(选填)" }, - "orderOneHere": { - "message": "订购 Trezor 或 Ledger ,将个人资金进行冷存储" - }, "origin": { "message": "来源" }, @@ -1201,9 +1189,6 @@ "readdToken": { "message": "之后您还可以通过帐户选项菜单中的“添加代币”来添加此代币。" }, - "readyToConnect": { - "message": "是否准备连接?" - }, "receive": { "message": "接收" }, @@ -1504,24 +1489,6 @@ "statusNotConnected": { "message": "未连接" }, - "step1HardwareWallet": { - "message": "1. 连接硬件钱包" - }, - "step1HardwareWalletMsg": { - "message": "将您的硬件钱包直接连接到电脑上。" - }, - "step2HardwareWallet": { - "message": "2. 选择账户" - }, - "step2HardwareWalletMsg": { - "message": "请选择您想查看的账户。每次只能选择一个账户。" - }, - "step3HardwareWallet": { - "message": "3. 开始使用 web3 站点和更多功能!" - }, - "step3HardwareWalletMsg": { - "message": "使用您的硬件钱包,操作与以太坊账户制作相同。登录 dApps,发送 ETH ,购买和保存 ERC20 代币和诸如 CryptoKitties 等不可替代代币。" - }, "storePhrase": { "message": "通过如 1Password 等密码管理工具保存该账户助记词。" }, @@ -1609,9 +1576,6 @@ "swapFinalizing": { "message": "确定中……" }, - "swapHighSlippageWarning": { - "message": "滑点数量非常大。确保您知道您的操作!" - }, "swapLowSlippageError": { "message": "交易可能失败,最大滑点过低。" }, @@ -1655,12 +1619,6 @@ "message": "价格差异 ~$1%", "description": "$1 is a number (ex: 1.23) that represents the price difference." }, - "swapPriceDifferenceTooltip": { - "message": "市场价格的差异可能受到中介机构收取的费用、市场规模、交易规模或市场效率低下的影响。" - }, - "swapPriceDifferenceUnavailable": { - "message": "市场价格不可用。 请确认您对退回的数额感到满意后再继续。" - }, "swapProcessing": { "message": "处理中" }, @@ -1723,9 +1681,6 @@ "swapSelectQuotePopoverDescription": { "message": "以下是从多个流动资金来源收集到的所有报价。" }, - "swapSlippageTooLow": { - "message": "滑点必须大于零" - }, "swapSource": { "message": "流动资金来源" }, @@ -1765,9 +1720,6 @@ "message": "多个代币可以使用相同的名称和符号。检查 $1(以太坊浏览器)以确认这是您正在寻找的代币。", "description": "This appears in a tooltip next to the verifyThisTokenOn message. It gives the user more information about why they should check the token on a block explorer. $1 will be the name or url of the block explorer, which will be the translation of 'etherscan' or a block explorer url specified for a custom network." }, - "swapViewToken": { - "message": "查看 $1" - }, "swapYourTokenBalance": { "message": "$1 $2 可用", "description": "Tells the user how much of a token they have in their balance. $1 is a decimal number amount of tokens, and $2 is a token symbol" diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index ccabbcaa1..bd95f859e 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -317,9 +317,6 @@ "done": { "message": "完成" }, - "dontHaveAHardwareWallet": { - "message": "還沒有硬體錢包?" - }, "downloadGoogleChrome": { "message": "下載 Google Chrome 瀏覽器" }, @@ -452,9 +449,6 @@ "message": "從水管取得 $1 以太幣。", "description": "Displays network name for Ether faucet" }, - "getHelp": { - "message": "取得協助" - }, "getStarted": { "message": "開始使用" }, @@ -476,9 +470,6 @@ "hardwareWalletsMsg": { "message": "選擇要連線到 MetaMask 的硬體錢包" }, - "havingTroubleConnecting": { - "message": "無法正確連線?" - }, "here": { "message": "這裡", "description": "as in -click here- for more information (goes with troubleTokenBalances)" @@ -701,9 +692,6 @@ "optionalCurrencySymbol": { "message": "Symbol (可選)" }, - "orderOneHere": { - "message": "訂購 Trezor 或 Ledger 讓資產保存於硬體裝置。" - }, "origin": { "message": "來源" }, @@ -760,9 +748,6 @@ "readdToken": { "message": "未來可以隨時重新加入此代幣" }, - "readyToConnect": { - "message": "準備連線?" - }, "recents": { "message": "最近" }, @@ -976,24 +961,6 @@ "stateLogsDescription": { "message": "狀態紀錄包含您的公開帳戶位址和已傳送的交易資訊" }, - "step1HardwareWallet": { - "message": "1. 連線硬體錢包" - }, - "step1HardwareWalletMsg": { - "message": "將您的硬體錢包連接到電腦。" - }, - "step2HardwareWallet": { - "message": "2. 選擇帳戶" - }, - "step2HardwareWalletMsg": { - "message": "選擇想要檢視的帳戶。一次只能選擇一個帳戶。" - }, - "step3HardwareWallet": { - "message": "3. 開始使用!" - }, - "step3HardwareWalletMsg": { - "message": "使用您硬體錢包中的帳戶,與去中心化應用服務交易以太幣、ERC20代幣、或迷戀貓等數位資產。" - }, "storePhrase": { "message": "您可以用密碼管理系統例如 1Password 等軟體儲存助憶詞。" }, diff --git a/app/images/hardware-wallet-step-2.svg b/app/images/hardware-wallet-step-2.svg deleted file mode 100644 index 3862acb6d..000000000 --- a/app/images/hardware-wallet-step-2.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - 3 - - - OXz3…T3A4 - - - 0.020000 ETH - - - - - - - 1 - - - OXa4…s0a2 - - - 0.01500 ETH - - - - - - - 4 - - - OXd2…D0V4 - - - 0.030000 ETH - - - - - - - - 2 - - - OXe7…B0a1 - - - 0.041000 ETH - - - - - - diff --git a/app/images/hardware-wallet-step-3.svg b/app/images/hardware-wallet-step-3.svg deleted file mode 100644 index 33e45991e..000000000 --- a/app/images/hardware-wallet-step-3.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - LOGIN WITH METAMASK - - - diff --git a/app/images/hardware-wallet-step-1.svg b/app/images/plug-in-wallet.svg similarity index 100% rename from app/images/hardware-wallet-step-1.svg rename to app/images/plug-in-wallet.svg diff --git a/app/images/source-logos-bsc.svg b/app/images/source-logos-bsc.svg new file mode 100644 index 000000000..cfb0c8440 --- /dev/null +++ b/app/images/source-logos-bsc.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/videos/recovery-onboarding/subtitles-en.vtt b/app/images/videos/recovery-onboarding/subtitles-en.vtt new file mode 100644 index 000000000..c78e8ff15 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles-en.vtt @@ -0,0 +1,116 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask is a new way to connect +to sites and applications. + +2 +00:00:04.580 --> 00:00:08.860 +On traditional websites, a central database +or bank is responsible for controlling and + +3 +00:00:08.860 --> 00:00:10.179 +recovering your accounts. + +4 +00:00:10.179 --> 00:00:15.050 +But on MetaMask, all of the power belongs +to the holder of a master key. + +5 +00:00:15.050 --> 00:00:18.460 +Whoever holds the key, controls the accounts. + +6 +00:00:18.460 --> 00:00:21.110 +Your secret recovery phrase +is your "master key". + +7 +00:00:21.110 --> 00:00:26.070 +It's a series of 12 words that are generated +when you first set up MetaMask, which allow + +8 +00:00:26.070 --> 00:00:30.120 +you to recover your wallet and funds if you +ever lose access. + +9 +00:00:30.120 --> 00:00:33.451 +It's important that you secure +your wallet by keeping your + +10 +00:00:33.451 --> 00:00:37.510 +secret recovery phrase +very safe, and very secret. + +11 +00:00:37.510 --> 00:00:41.429 +If anyone gets access to it, they will have +the "master key" to your wallet and can + +12 +00:00:41.429 --> 00:00:45.190 +freely access and take all of your funds. + +13 +00:00:45.190 --> 00:00:50.109 +To secure your MetaMask wallet you'll want +to safely save your secret recovery phrase. + +14 +00:00:50.109 --> 00:00:54.930 +You can write it down, hide it somewhere, +put it in a safe deposit box + +15 +00:00:54.930 --> 00:00:57.729 +or use a secure password manager. + +16 +00:00:57.729 --> 00:01:01.050 +Some users even engrave their +phrase onto a metal plate! + +17 +00:01:01.050 --> 00:01:04.440 +Nobody, not even the team +at MetaMask, can help you + +18 +00:01:04.440 --> 00:01:07.820 +recover your wallet if you lose +your secret recovery phrase. + +19 +00:01:07.820 --> 00:01:12.072 +If you haven't written down your secret recovery +phrase and stored it somewhere safe, + +20 +00:01:12.072 --> 00:01:15.492 +do it now. We'll wait. + +21 +00:01:15.500 --> 00:01:20.780 +And remember, never share your secret recovery +phrase with anyone: not even us. + +22 +00:01:20.780 --> 00:01:24.910 +If anyone ever asks you for it, +they're trying to scam you. + +23 +00:01:24.910 --> 00:01:26.250 +That's it! + +24 +00:01:26.250 --> 00:01:31.020 +Now you know what a secret recovery phrase +is and how to keep your wallet safe and secure. + diff --git a/app/images/videos/recovery-onboarding/video.webm b/app/images/videos/recovery-onboarding/video.webm new file mode 100644 index 000000000..a0d5cedeb Binary files /dev/null and b/app/images/videos/recovery-onboarding/video.webm differ diff --git a/app/manifest/_base.json b/app/manifest/_base.json index 905172d78..437ef1d2e 100644 --- a/app/manifest/_base.json +++ b/app/manifest/_base.json @@ -71,6 +71,5 @@ "notifications" ], "short_name": "__MSG_appName__", - "version": "9.5.5", "web_accessible_resources": ["inpage.js", "phishing.html"] } diff --git a/app/scripts/account-import-strategies/account-import-strategies.test.js b/app/scripts/account-import-strategies/account-import-strategies.test.js index e29561639..7886f1717 100644 --- a/app/scripts/account-import-strategies/account-import-strategies.test.js +++ b/app/scripts/account-import-strategies/account-import-strategies.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { stripHexPrefix } from 'ethereumjs-util'; import accountImporter from '.'; diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index a404a9cd8..236952f61 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -1,6 +1,6 @@ import querystring from 'querystring'; import pump from 'pump'; -import LocalMessageDuplexStream from 'post-message-stream'; +import { WindowPostMessageStream } from '@metamask/post-message-stream'; import ObjectMultiplex from 'obj-multiplex'; import extension from 'extensionizer'; import PortStream from 'extension-port-stream'; @@ -57,7 +57,7 @@ function injectScript(content) { */ async function setupStreams() { // the transport-specific streams for communication between inpage and background - const pageStream = new LocalMessageDuplexStream({ + const pageStream = new WindowPostMessageStream({ name: CONTENT_SCRIPT, target: INPAGE, }); @@ -89,7 +89,7 @@ async function setupStreams() { // TODO:LegacyProvider: Delete // handle legacy provider - const legacyPageStream = new LocalMessageDuplexStream({ + const legacyPageStream = new WindowPostMessageStream({ name: LEGACY_CONTENT_SCRIPT, target: LEGACY_INPAGE, }); diff --git a/app/scripts/controllers/app-state.js b/app/scripts/controllers/app-state.js index 261b735dc..ce92798e0 100644 --- a/app/scripts/controllers/app-state.js +++ b/app/scripts/controllers/app-state.js @@ -23,6 +23,7 @@ export default class AppStateController extends EventEmitter { timeoutMinutes: 0, connectedStatusPopoverHasBeenShown: true, defaultHomeActiveTabName: null, + browserEnvironment: {}, ...initState, }); this.timer = null; @@ -158,4 +159,12 @@ export default class AppStateController extends EventEmitter { timeoutMinutes * 60 * 1000, ); } + + /** + * Sets the current browser and OS environment + * @returns {void} + */ + setBrowserEnvironment(os, browser) { + this.store.updateState({ browserEnvironment: { os, browser } }); + } } diff --git a/app/scripts/controllers/cached-balances.test.js b/app/scripts/controllers/cached-balances.test.js index 94e86b41a..5ef473110 100644 --- a/app/scripts/controllers/cached-balances.test.js +++ b/app/scripts/controllers/cached-balances.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { KOVAN_CHAIN_ID } from '../../../shared/constants/network'; import CachedBalancesController from './cached-balances'; diff --git a/app/scripts/controllers/detect-tokens.test.js b/app/scripts/controllers/detect-tokens.test.js index c472c7977..3b5eddd24 100644 --- a/app/scripts/controllers/detect-tokens.test.js +++ b/app/scripts/controllers/detect-tokens.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { ObservableStore } from '@metamask/obs-store'; import contracts from '@metamask/contract-metadata'; diff --git a/app/scripts/controllers/ens/index.test.js b/app/scripts/controllers/ens/index.test.js index 24197dbd7..c94f73a5d 100644 --- a/app/scripts/controllers/ens/index.test.js +++ b/app/scripts/controllers/ens/index.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import EnsController from '.'; diff --git a/app/scripts/controllers/incoming-transactions.test.js b/app/scripts/controllers/incoming-transactions.test.js index 74aaad78c..347fa7952 100644 --- a/app/scripts/controllers/incoming-transactions.test.js +++ b/app/scripts/controllers/incoming-transactions.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import proxyquire from 'proxyquire'; import nock from 'nock'; diff --git a/app/scripts/controllers/network/network.js b/app/scripts/controllers/network/network.js index cd0fc0bce..a308a7d4b 100644 --- a/app/scripts/controllers/network/network.js +++ b/app/scripts/controllers/network/network.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import EventEmitter from 'events'; import { ComposedStore, ObservableStore } from '@metamask/obs-store'; import { JsonRpcEngine } from 'json-rpc-engine'; diff --git a/app/scripts/controllers/network/pending-middleware.test.js b/app/scripts/controllers/network/pending-middleware.test.js index 1ce327b22..49e60aaa4 100644 --- a/app/scripts/controllers/network/pending-middleware.test.js +++ b/app/scripts/controllers/network/pending-middleware.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { txMetaStub } from '../../../../test/stub/tx-meta-stub'; import { createPendingNonceMiddleware, diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 95b0e1e4d..19aef453e 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -43,6 +43,7 @@ export default class PreferencesController { useBlockie: false, useNonceField: false, usePhishDetect: true, + dismissSeedBackUpReminder: false, // WARNING: Do not use feature flags for security-sensitive things. // Feature flag toggling is available in the global namespace @@ -67,6 +68,7 @@ export default class PreferencesController { // ENS decentralized website resolution ipfsGateway: 'dweb.link', infuraBlocked: null, + useLedgerLive: false, ...opts.initState, }; @@ -666,6 +668,35 @@ export default class PreferencesController { return Promise.resolve(domain); } + /** + * A setter for the `useLedgerLive` property + * @param {bool} useLedgerLive - Value for ledger live support + * @returns {Promise} A promise of the update to useLedgerLive + */ + async setLedgerLivePreference(useLedgerLive) { + this.store.updateState({ useLedgerLive }); + return useLedgerLive; + } + + /** + * A getter for the `useLedgerLive` property + * @returns {boolean} User preference of using Ledger Live + */ + getLedgerLivePreference() { + return this.store.getState().useLedgerLive; + } + + /** + * A setter for the user preference to dismiss the seed phrase backup reminder + * @param {bool} dismissBackupReminder- User preference for dismissing the back up reminder + * @returns {void} + */ + async setDismissSeedBackUpReminder(dismissSeedBackUpReminder) { + await this.store.updateState({ + dismissSeedBackUpReminder, + }); + } + // // PRIVATE METHODS // diff --git a/app/scripts/controllers/preferences.test.js b/app/scripts/controllers/preferences.test.js index 1c765a92b..4141f0f5f 100644 --- a/app/scripts/controllers/preferences.test.js +++ b/app/scripts/controllers/preferences.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { MAINNET_CHAIN_ID, diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index 2496e9b0b..9e4247231 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -4,9 +4,9 @@ import BigNumber from 'bignumber.js'; import { ObservableStore } from '@metamask/obs-store'; import { mapValues, cloneDeep } from 'lodash'; import abi from 'human-standard-token-abi'; -import { calcTokenAmount } from '../../../ui/app/helpers/utils/token-util'; -import { calcGasTotal } from '../../../ui/app/pages/send/send.utils'; -import { conversionUtil } from '../../../ui/app/helpers/utils/conversion-util'; +import { calcTokenAmount } from '../../../ui/helpers/utils/token-util'; +import { calcGasTotal } from '../../../ui/pages/send/send.utils'; +import { conversionUtil } from '../../../ui/helpers/utils/conversion-util'; import { DEFAULT_ERC20_APPROVE_GAS, QUOTES_EXPIRED_ERROR, @@ -20,7 +20,7 @@ import { fetchTradesInfo as defaultFetchTradesInfo, fetchSwapsFeatureLiveness as defaultFetchSwapsFeatureLiveness, fetchSwapsQuoteRefreshTime as defaultFetchSwapsQuoteRefreshTime, -} from '../../../ui/app/pages/swaps/swaps.util'; +} from '../../../ui/pages/swaps/swaps.util'; import { NETWORK_EVENTS } from './network'; // The MAX_GAS_LIMIT is a number that is higher than the maximum gas costs we have observed on any aggregator diff --git a/app/scripts/controllers/swaps.test.js b/app/scripts/controllers/swaps.test.js index 4e85aa393..0fb1d80ac 100644 --- a/app/scripts/controllers/swaps.test.js +++ b/app/scripts/controllers/swaps.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { ethers } from 'ethers'; @@ -645,7 +645,7 @@ describe('SwapsController', function () { topAggId, resultQuotes, ] = await swapsController._findTopQuoteAndCalculateSavings(testInput); - assert.equal(topAggId, [TEST_AGG_ID_2]); + assert.equal(topAggId, TEST_AGG_ID_2); assert.deepStrictEqual(resultQuotes, expectedResultQuotes); }); }); diff --git a/app/scripts/controllers/token-rates-controller.test.js b/app/scripts/controllers/token-rates-controller.test.js index fc5d3af52..444e53977 100644 --- a/app/scripts/controllers/token-rates-controller.test.js +++ b/app/scripts/controllers/token-rates-controller.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { ObservableStore } from '@metamask/obs-store'; import TokenRatesController from './token-rates'; diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 3067b3e4f..9b7011a66 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -16,8 +16,8 @@ import { BnMultiplyByFraction, addHexPrefix, } from '../../lib/util'; -import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/app/helpers/constants/error-keys'; -import { getSwapsTokensReceivedFromTxMeta } from '../../../../ui/app/pages/swaps/swaps.util'; +import { TRANSACTION_NO_CONTRACT_ERROR_KEY } from '../../../../ui/helpers/constants/error-keys'; +import { getSwapsTokensReceivedFromTxMeta } from '../../../../ui/pages/swaps/swaps.util'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, diff --git a/app/scripts/inpage.js b/app/scripts/inpage.js index 72bbf7901..9b4952a5e 100644 --- a/app/scripts/inpage.js +++ b/app/scripts/inpage.js @@ -32,8 +32,8 @@ cleanContextForImports(); /* eslint-disable import/first */ import log from 'loglevel'; -import LocalMessageDuplexStream from 'post-message-stream'; -import { initializeProvider } from '@metamask/inpage-provider'; +import { WindowPostMessageStream } from '@metamask/post-message-stream'; +import { initializeProvider } from '@metamask/providers/dist/initializeInpageProvider'; restoreContextAfterImports(); @@ -44,7 +44,7 @@ log.setDefaultLevel(process.env.METAMASK_DEBUG ? 'debug' : 'warn'); // // setup background connection -const metamaskStream = new LocalMessageDuplexStream({ +const metamaskStream = new WindowPostMessageStream({ name: 'metamask-inpage', target: 'metamask-contentscript', }); diff --git a/app/scripts/lib/ComposableObservableStore.js b/app/scripts/lib/ComposableObservableStore.js index 68ce42d08..789a12d80 100644 --- a/app/scripts/lib/ComposableObservableStore.js +++ b/app/scripts/lib/ComposableObservableStore.js @@ -1,34 +1,68 @@ import { ObservableStore } from '@metamask/obs-store'; +/** + * @typedef {import('@metamask/controllers').ControllerMessenger} ControllerMessenger + */ + /** * An ObservableStore that can composes a flat * structure of child stores based on configuration */ export default class ComposableObservableStore extends ObservableStore { + /** + * Describes which stores are being composed. The key is the name of the + * store, and the value is either an ObserableStore, or a controller that + * extends one of the two base controllers in the `@metamask/controllers` + * package. + * @type {Record} + */ + config = {}; + /** * Create a new store * - * @param {Object} [initState] - The initial store state - * @param {Object} [config] - Map of internal state keys to child stores + * @param {Object} options + * @param {Object} [options.config] - Map of internal state keys to child stores + * @param {ControllerMessenger} options.controllerMessenger - The controller + * messenger, used for subscribing to events from BaseControllerV2-based + * controllers. + * @param {Object} [options.state] - The initial store state */ - constructor(initState, config) { - super(initState); - this.updateStructure(config); + constructor({ config, controllerMessenger, state }) { + super(state); + this.controllerMessenger = controllerMessenger; + if (config) { + this.updateStructure(config); + } } /** * Composes a new internal store subscription structure * - * @param {Object} [config] - Map of internal state keys to child stores + * @param {Record} config - Describes which stores are being + * composed. The key is the name of the store, and the value is either an + * ObserableStore, or a controller that extends one of the two base + * controllers in the `@metamask/controllers` package. */ updateStructure(config) { this.config = config; this.removeAllListeners(); - for (const key in config) { - if (Object.prototype.hasOwnProperty.call(config, key)) { + for (const key of Object.keys(config)) { + if (!config[key]) { + throw new Error(`Undefined '${key}'`); + } + const store = config[key]; + if (store.subscribe) { config[key].subscribe((state) => { this.updateState({ [key]: state }); }); + } else { + this.controllerMessenger.subscribe( + `${store.name}:stateChange`, + (state) => { + this.updateState({ [key]: state }); + }, + ); } } } @@ -40,15 +74,16 @@ export default class ComposableObservableStore extends ObservableStore { * @returns {Object} Object containing merged child store state */ getFlatState() { + if (!this.config) { + return {}; + } let flatState = {}; - for (const key in this.config) { - if (Object.prototype.hasOwnProperty.call(this.config, key)) { - const controller = this.config[key]; - const state = controller.getState - ? controller.getState() - : controller.state; - flatState = { ...flatState, ...state }; - } + for (const key of Object.keys(this.config)) { + const controller = this.config[key]; + const state = controller.getState + ? controller.getState() + : controller.state; + flatState = { ...flatState, ...state }; } return flatState; } diff --git a/app/scripts/lib/ComposableObservableStore.test.js b/app/scripts/lib/ComposableObservableStore.test.js index a079984c1..063f97cbf 100644 --- a/app/scripts/lib/ComposableObservableStore.test.js +++ b/app/scripts/lib/ComposableObservableStore.test.js @@ -1,35 +1,194 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { ObservableStore } from '@metamask/obs-store'; +import { + BaseController, + BaseControllerV2, + ControllerMessenger, +} from '@metamask/controllers'; import ComposableObservableStore from './ComposableObservableStore'; +class OldExampleController extends BaseController { + name = 'OldExampleController'; + + defaultState = { + baz: 'baz', + }; + + constructor() { + super(); + this.initialize(); + } + + updateBaz(contents) { + this.update({ baz: contents }); + } +} +class ExampleController extends BaseControllerV2 { + static defaultState = { + bar: 'bar', + }; + + static metadata = { + bar: { persist: true, anonymous: true }, + }; + + constructor({ messenger }) { + super({ + messenger, + name: 'ExampleController', + metadata: ExampleController.metadata, + state: ExampleController.defaultState, + }); + } + + updateBar(contents) { + this.update(() => { + return { bar: contents }; + }); + } +} + describe('ComposableObservableStore', function () { it('should register initial state', function () { - const store = new ComposableObservableStore('state'); + const controllerMessenger = new ControllerMessenger(); + const store = new ComposableObservableStore({ + controllerMessenger, + state: 'state', + }); assert.strictEqual(store.getState(), 'state'); }); it('should register initial structure', function () { + const controllerMessenger = new ControllerMessenger(); const testStore = new ObservableStore(); - const store = new ComposableObservableStore(null, { TestStore: testStore }); + const store = new ComposableObservableStore({ + config: { TestStore: testStore }, + controllerMessenger, + }); testStore.putState('state'); assert.deepEqual(store.getState(), { TestStore: 'state' }); }); - it('should update structure', function () { + it('should update structure with observable store', function () { + const controllerMessenger = new ControllerMessenger(); const testStore = new ObservableStore(); - const store = new ComposableObservableStore(); + const store = new ComposableObservableStore({ controllerMessenger }); store.updateStructure({ TestStore: testStore }); testStore.putState('state'); assert.deepEqual(store.getState(), { TestStore: 'state' }); }); + it('should update structure with BaseController-based controller', function () { + const controllerMessenger = new ControllerMessenger(); + const oldExampleController = new OldExampleController(); + const store = new ComposableObservableStore({ controllerMessenger }); + store.updateStructure({ OldExample: oldExampleController }); + oldExampleController.updateBaz('state'); + assert.deepEqual(store.getState(), { OldExample: { baz: 'state' } }); + }); + + it('should update structure with BaseControllerV2-based controller', function () { + const controllerMessenger = new ControllerMessenger(); + const exampleController = new ExampleController({ + messenger: controllerMessenger, + }); + const store = new ComposableObservableStore({ controllerMessenger }); + store.updateStructure({ Example: exampleController }); + exampleController.updateBar('state'); + console.log(exampleController.state); + assert.deepEqual(store.getState(), { Example: { bar: 'state' } }); + }); + + it('should update structure with all three types of stores', function () { + const controllerMessenger = new ControllerMessenger(); + const exampleStore = new ObservableStore(); + const exampleController = new ExampleController({ + messenger: controllerMessenger, + }); + const oldExampleController = new OldExampleController(); + const store = new ComposableObservableStore({ controllerMessenger }); + store.updateStructure({ + Example: exampleController, + OldExample: oldExampleController, + Store: exampleStore, + }); + exampleStore.putState('state'); + exampleController.updateBar('state'); + oldExampleController.updateBaz('state'); + assert.deepEqual(store.getState(), { + Example: { bar: 'state' }, + OldExample: { baz: 'state' }, + Store: 'state', + }); + }); + it('should return flattened state', function () { + const controllerMessenger = new ControllerMessenger(); const fooStore = new ObservableStore({ foo: 'foo' }); - const barStore = new ObservableStore({ bar: 'bar' }); - const store = new ComposableObservableStore(null, { - FooStore: fooStore, - BarStore: barStore, + const barController = new ExampleController({ + messenger: controllerMessenger, + }); + const bazController = new OldExampleController(); + const store = new ComposableObservableStore({ + config: { + FooStore: fooStore, + BarStore: barController, + BazStore: bazController, + }, + controllerMessenger, + state: { + FooStore: fooStore.getState(), + BarStore: barController.state, + BazStore: bazController.state, + }, + }); + assert.deepEqual(store.getFlatState(), { + foo: 'foo', + bar: 'bar', + baz: 'baz', + }); + }); + + it('should return empty flattened state when not configured', function () { + const controllerMessenger = new ControllerMessenger(); + const store = new ComposableObservableStore({ controllerMessenger }); + assert.deepEqual(store.getFlatState(), {}); + }); + + it('should throw if the controller messenger is omitted and the config includes a BaseControllerV2 controller', function () { + const controllerMessenger = new ControllerMessenger(); + const exampleController = new ExampleController({ + messenger: controllerMessenger, + }); + assert.throws( + () => + new ComposableObservableStore({ + config: { + Example: exampleController, + }, + }), + ); + }); + + it('should throw if the controller messenger is omitted and updateStructure called with a BaseControllerV2 controller', function () { + const controllerMessenger = new ControllerMessenger(); + const exampleController = new ExampleController({ + messenger: controllerMessenger, }); - assert.deepEqual(store.getFlatState(), { foo: 'foo', bar: 'bar' }); + const store = new ComposableObservableStore({}); + assert.throws(() => store.updateStructure({ Example: exampleController })); + }); + + it('should throw if initialized with undefined config entry', function () { + const controllerMessenger = new ControllerMessenger(); + assert.throws( + () => + new ComposableObservableStore({ + config: { + Example: undefined, + }, + controllerMessenger, + }), + ); }); }); diff --git a/app/scripts/lib/buy-eth-url.test.js b/app/scripts/lib/buy-eth-url.test.js index 17ba3d64a..01837c8ef 100644 --- a/app/scripts/lib/buy-eth-url.test.js +++ b/app/scripts/lib/buy-eth-url.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { KOVAN_CHAIN_ID, MAINNET_CHAIN_ID, diff --git a/app/scripts/lib/cleanErrorStack.test.js b/app/scripts/lib/cleanErrorStack.test.js index 9f01e8252..b87152f21 100644 --- a/app/scripts/lib/cleanErrorStack.test.js +++ b/app/scripts/lib/cleanErrorStack.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import cleanErrorStack from './cleanErrorStack'; describe('Clean Error Stack', function () { @@ -14,7 +14,7 @@ describe('Clean Error Stack', function () { }); it('tests error with message', function () { - assert.equal(cleanErrorStack(testError), 'Error: Test Message'); + assert.equal(cleanErrorStack(testError).toString(), 'Error: Test Message'); }); it('tests error with undefined name', function () { @@ -29,6 +29,6 @@ describe('Clean Error Stack', function () { }); it('tests error with blank message', function () { - assert.equal(cleanErrorStack(blankMsgError), 'Error'); + assert.equal(cleanErrorStack(blankMsgError).toString(), 'Error'); }); }); diff --git a/app/scripts/lib/createMetaRPCHandler.test.js b/app/scripts/lib/createMetaRPCHandler.test.js index c3f644ec8..d6472b5e1 100644 --- a/app/scripts/lib/createMetaRPCHandler.test.js +++ b/app/scripts/lib/createMetaRPCHandler.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { obj as createThoughStream } from 'through2'; import createMetaRPCHandler from './createMetaRPCHandler'; diff --git a/app/scripts/lib/get-first-preferred-lang-code.js b/app/scripts/lib/get-first-preferred-lang-code.js index 4639d6dc9..bcac7937a 100644 --- a/app/scripts/lib/get-first-preferred-lang-code.js +++ b/app/scripts/lib/get-first-preferred-lang-code.js @@ -40,9 +40,7 @@ export default async function getFirstPreferredLangCode() { const firstPreferredLangCode = userPreferredLocaleCodes .map((code) => code.toLowerCase().replace('_', '-')) - .find((code) => - Object.prototype.hasOwnProperty.call(existingLocaleCodes, code), - ); + .find((code) => existingLocaleCodes[code] !== undefined); return existingLocaleCodes[firstPreferredLangCode] || 'en'; } diff --git a/app/scripts/lib/message-manager.test.js b/app/scripts/lib/message-manager.test.js index 947cb2688..39183fb7a 100644 --- a/app/scripts/lib/message-manager.test.js +++ b/app/scripts/lib/message-manager.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import MessageManager from './message-manager'; diff --git a/app/scripts/lib/metaRPCClientFactory.js b/app/scripts/lib/metaRPCClientFactory.js index 108da0e4c..689774f91 100644 --- a/app/scripts/lib/metaRPCClientFactory.js +++ b/app/scripts/lib/metaRPCClientFactory.js @@ -6,6 +6,7 @@ class MetaRPCClient { constructor(connectionStream) { this.connectionStream = connectionStream; this.notificationChannel = new SafeEventEmitter(); + this.uncaughtErrorChannel = new SafeEventEmitter(); this.requests = new Map(); this.connectionStream.on('data', this.handleResponse.bind(this)); this.connectionStream.on('end', this.close.bind(this)); @@ -17,34 +18,47 @@ class MetaRPCClient { }); } + onUncaughtError(handler) { + this.uncaughtErrorChannel.addListener('error', (error) => { + handler(error); + }); + } + close() { this.notificationChannel.removeAllListeners(); + this.uncaughtErrorChannel.removeAllListeners(); } handleResponse(data) { const { id, result, error, method, params } = data; + const isNotification = id === undefined && error === undefined; const cb = this.requests.get(id); - if (method && params && id) { + if (method && params && !isNotification) { // dont handle server-side to client-side requests return; } - if (method && params && !id) { + if (method && params && isNotification) { // handle servier-side to client-side notification this.notificationChannel.emit('notification', data); return; } - if (!cb) { - // not found in request list - return; - } if (error) { const e = new EthereumRpcError(error.code, error.message, error.data); // preserve the stack from serializeError e.stack = error.stack; - this.requests.delete(id); - cb(e); + if (cb) { + this.requests.delete(id); + cb(e); + return; + } + this.uncaughtErrorChannel.emit('error', e); + return; + } + + if (!cb) { + // not found in request list return; } diff --git a/app/scripts/lib/metaRPCClientFactory.test.js b/app/scripts/lib/metaRPCClientFactory.test.js index d270a4e1a..d0553da73 100644 --- a/app/scripts/lib/metaRPCClientFactory.test.js +++ b/app/scripts/lib/metaRPCClientFactory.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { obj as createThoughStream } from 'through2'; import metaRPCClientFactory from './metaRPCClientFactory'; @@ -85,4 +85,58 @@ describe('metaRPCClientFactory', function () { }); }); }); + + it('should be able to handle notifications', function (done) { + const streamTest = createThoughStream(); + const metaRPCClient = metaRPCClientFactory(streamTest); + + metaRPCClient.onNotification((notification) => { + assert(notification.method, 'foobarbaz'); + done(); + }); + + // send a notification + streamTest.write({ + jsonrpc: '2.0', + method: 'foobarbaz', + params: ['bar'], + }); + }); + + it('should be able to handle errors with no id', function (done) { + const streamTest = createThoughStream(); + const metaRPCClient = metaRPCClientFactory(streamTest); + + metaRPCClient.onUncaughtError((error) => { + assert(error.code, 1); + done(); + }); + + streamTest.write({ + jsonrpc: '2.0', + error: { + code: 1, + message: 'error msg', + }, + }); + }); + + it('should be able to handle errors with null id', function (done) { + const streamTest = createThoughStream(); + const metaRPCClient = metaRPCClientFactory(streamTest); + + metaRPCClient.onUncaughtError((error) => { + assert(error.code, 1); + done(); + }); + + streamTest.write({ + jsonrpc: '2.0', + id: null, + error: { + code: 1, + message: 'error msg', + }, + }); + }); }); diff --git a/app/scripts/lib/migrator/index.test.js b/app/scripts/lib/migrator/index.test.js index 0fbb3e8a9..cdaac9e82 100644 --- a/app/scripts/lib/migrator/index.test.js +++ b/app/scripts/lib/migrator/index.test.js @@ -1,5 +1,5 @@ import fs from 'fs'; -import assert from 'assert'; +import { strict as assert } from 'assert'; import { cloneDeep } from 'lodash'; import liveMigrations from '../../migrations'; import data from '../../first-time-state'; diff --git a/app/scripts/lib/nodeify.test.js b/app/scripts/lib/nodeify.test.js index 4f2c2a2eb..accfc48e8 100644 --- a/app/scripts/lib/nodeify.test.js +++ b/app/scripts/lib/nodeify.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import nodeify from './nodeify'; describe('nodeify', function () { diff --git a/app/scripts/lib/personal-message-manager.test.js b/app/scripts/lib/personal-message-manager.test.js index c3ce3f615..de241fff0 100644 --- a/app/scripts/lib/personal-message-manager.test.js +++ b/app/scripts/lib/personal-message-manager.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import PersonalMessageManager from './personal-message-manager'; 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 ac170b399..50399c3ab 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 @@ -1,4 +1,4 @@ -import { ethErrors } from 'eth-rpc-errors'; +import { ethErrors, errorCodes } from 'eth-rpc-errors'; import validUrl from 'valid-url'; import { omit } from 'lodash'; import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; @@ -123,12 +123,16 @@ async function addEthereumChainHandler( const existingNetwork = findCustomRpcBy({ chainId: _chainId }); - if (existingNetwork !== null) { + if (existingNetwork) { + // If the network already exists, the request is considered successful + res.result = null; + const currentChainId = getCurrentChainId(); if (currentChainId === _chainId) { - res.result = null; return end(); } + + // Ask the user to switch the network try { await updateRpcTarget( await requestUserApproval({ @@ -144,7 +148,12 @@ async function addEthereumChainHandler( ); res.result = null; } catch (error) { - return end(error); + // For the purposes of this method, it does not matter if the user + // declines to switch the selected network. However, other errors indicate + // that something is wrong. + if (error.code !== errorCodes.provider.userRejectedRequest) { + return end(error); + } } return end(); } @@ -251,6 +260,14 @@ async function addEthereumChainHandler( }, }); + // Once the network has been added, the requested is considered successful + res.result = null; + } catch (error) { + return end(error); + } + + // Ask the user to switch the network + try { await updateRpcTarget( await requestUserApproval({ origin, @@ -263,10 +280,13 @@ async function addEthereumChainHandler( }, }), ); - - res.result = null; } catch (error) { - return end(error); + // For the purposes of this method, it does not matter if the user + // declines to switch the selected network. However, other errors indicate + // that something is wrong. + if (error.code !== errorCodes.provider.userRejectedRequest) { + return end(error); + } } return end(); } diff --git a/app/scripts/lib/rpc-method-middleware/handlers/index.js b/app/scripts/lib/rpc-method-middleware/handlers/index.js index 541256a1c..fb0c1ef8f 100644 --- a/app/scripts/lib/rpc-method-middleware/handlers/index.js +++ b/app/scripts/lib/rpc-method-middleware/handlers/index.js @@ -1,10 +1,12 @@ import addEthereumChain from './add-ethereum-chain'; +import switchEthereumChain from './switch-ethereum-chain'; import getProviderState from './get-provider-state'; import logWeb3ShimUsage from './log-web3-shim-usage'; import watchAsset from './watch-asset'; const handlers = [ addEthereumChain, + switchEthereumChain, getProviderState, logWeb3ShimUsage, watchAsset, diff --git a/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js b/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js new file mode 100644 index 000000000..97b5d0f3c --- /dev/null +++ b/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js @@ -0,0 +1,97 @@ +import { ethErrors } from 'eth-rpc-errors'; +import { omit } from 'lodash'; +import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { + isPrefixedFormattedHexString, + isSafeChainId, +} from '../../../../../shared/modules/network.utils'; + +const switchEthereumChain = { + methodNames: [MESSAGE_TYPE.SWITCH_ETHEREUM_CHAIN], + implementation: switchEthereumChainHandler, +}; +export default switchEthereumChain; + +async function switchEthereumChainHandler( + req, + res, + _next, + end, + { getCurrentChainId, findCustomRpcBy, updateRpcTarget, requestUserApproval }, +) { + if (!req.params?.[0] || typeof req.params[0] !== 'object') { + return end( + ethErrors.rpc.invalidParams({ + message: `Expected single, object parameter. Received:\n${JSON.stringify( + req.params, + )}`, + }), + ); + } + + const { origin } = req; + + const { chainId } = req.params[0]; + + const otherKeys = Object.keys(omit(req.params[0], ['chainId'])); + + if (otherKeys.length > 0) { + return end( + ethErrors.rpc.invalidParams({ + message: `Received unexpected keys on object parameter. Unsupported keys:\n${otherKeys}`, + }), + ); + } + + const _chainId = typeof chainId === 'string' && chainId.toLowerCase(); + + if (!isPrefixedFormattedHexString(_chainId)) { + return end( + ethErrors.rpc.invalidParams({ + message: `Expected 0x-prefixed, unpadded, non-zero hexadecimal string 'chainId'. Received:\n${chainId}`, + }), + ); + } + + if (!isSafeChainId(parseInt(_chainId, 16))) { + return end( + ethErrors.rpc.invalidParams({ + message: `Invalid chain ID "${_chainId}": numerical value greater than max safe value. Received:\n${chainId}`, + }), + ); + } + + const existingNetwork = findCustomRpcBy({ chainId: _chainId }); + + if (existingNetwork) { + const currentChainId = getCurrentChainId(); + if (currentChainId === _chainId) { + res.result = null; + return end(); + } + try { + await updateRpcTarget( + await requestUserApproval({ + origin, + type: MESSAGE_TYPE.SWITCH_ETHEREUM_CHAIN, + requestData: { + rpcUrl: existingNetwork.rpcUrl, + chainId: existingNetwork.chainId, + nickname: existingNetwork.nickname, + ticker: existingNetwork.ticker, + }, + }), + ); + res.result = null; + } catch (error) { + return end(error); + } + return end(); + } + return end( + ethErrors.provider.custom({ + code: 4902, // To-be-standardized "unrecognized chain ID" error + message: `Unrecognized chain ID "${chainId}". Try adding the chain using ${MESSAGE_TYPE.ADD_ETHEREUM_CHAIN} first.`, + }), + ); +} diff --git a/app/scripts/lib/seed-phrase-verifier.test.js b/app/scripts/lib/seed-phrase-verifier.test.js index d7ac0143f..1a6443935 100644 --- a/app/scripts/lib/seed-phrase-verifier.test.js +++ b/app/scripts/lib/seed-phrase-verifier.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { cloneDeep } from 'lodash'; import KeyringController from 'eth-keyring-controller'; import firstTimeState from '../first-time-state'; diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js index 09482d24b..25bbd7a46 100644 --- a/app/scripts/lib/setupSentry.js +++ b/app/scripts/lib/setupSentry.js @@ -7,9 +7,8 @@ import extractEthjsErrorMessage from './extractEthjsErrorMessage'; // Destructuring breaks the inlining of the environment variables const METAMASK_DEBUG = process.env.METAMASK_DEBUG; const METAMASK_ENVIRONMENT = process.env.METAMASK_ENVIRONMENT; +const SENTRY_DSN_DEV = process.env.SENTRY_DSN_DEV; /* eslint-enable prefer-destructuring */ -const SENTRY_DSN_DEV = - 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496'; // This describes the subset of Redux state attached to errors sent to Sentry // These properties have some potential to be useful for debugging, and they do diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js index df0488df8..8e205520b 100644 --- a/app/scripts/lib/typed-message-manager.js +++ b/app/scripts/lib/typed-message-manager.js @@ -1,5 +1,5 @@ import EventEmitter from 'events'; -import assert from 'assert'; +import { strict as assert } from 'assert'; import { ObservableStore } from '@metamask/obs-store'; import { ethErrors } from 'eth-rpc-errors'; import { typedSignatureHash, TYPED_MESSAGE_SCHEMA } from 'eth-sig-util'; diff --git a/app/scripts/lib/typed-message-manager.test.js b/app/scripts/lib/typed-message-manager.test.js index c994a586f..a9722211e 100644 --- a/app/scripts/lib/typed-message-manager.test.js +++ b/app/scripts/lib/typed-message-manager.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import TypedMessageManager from './typed-message-manager'; diff --git a/app/scripts/lib/util.js b/app/scripts/lib/util.js index 46e5b8641..126e5c4f6 100644 --- a/app/scripts/lib/util.js +++ b/app/scripts/lib/util.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import extension from 'extensionizer'; import { stripHexPrefix } from 'ethereumjs-util'; import BN from 'bn.js'; diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index f255f5c4b..5fbd164bb 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -20,6 +20,7 @@ import contractMap from '@metamask/contract-metadata'; import { AddressBookController, ApprovalController, + ControllerMessenger, CurrencyRateController, PhishingController, NotificationController, @@ -96,8 +97,13 @@ export default class MetamaskController extends EventEmitter { this.getRequestAccountTabIds = opts.getRequestAccountTabIds; this.getOpenMetamaskTabsIds = opts.getOpenMetamaskTabsIds; + const controllerMessenger = new ControllerMessenger(); + // observable state store - this.store = new ComposableObservableStore(initState); + this.store = new ComposableObservableStore({ + state: initState, + controllerMessenger, + }); // external connections by origin // Do not modify directly. Use the associated methods. @@ -157,10 +163,14 @@ export default class MetamaskController extends EventEmitter { preferencesStore: this.preferencesController.store, }); - this.currencyRateController = new CurrencyRateController( - { includeUSDRate: true }, - initState.CurrencyController, - ); + const currencyRateMessenger = controllerMessenger.getRestricted({ + name: 'CurrencyRateController', + }); + this.currencyRateController = new CurrencyRateController({ + includeUSDRate: true, + messenger: currencyRateMessenger, + state: initState.CurrencyController, + }); this.phishingController = new PhishingController(); @@ -222,10 +232,12 @@ export default class MetamaskController extends EventEmitter { this.accountTracker.start(); this.incomingTransactionsController.start(); this.tokenRatesController.start(); + this.currencyRateController.start(); } else { this.accountTracker.stop(); this.incomingTransactionsController.stop(); this.tokenRatesController.stop(); + this.currencyRateController.stop(); } }); @@ -364,18 +376,15 @@ export default class MetamaskController extends EventEmitter { } }); - this.networkController.on(NETWORK_EVENTS.NETWORK_DID_CHANGE, () => { - this.setCurrentCurrency( - this.currencyRateController.state.currentCurrency, - (error) => { - if (error) { - throw error; - } - }, - ); + this.networkController.on(NETWORK_EVENTS.NETWORK_DID_CHANGE, async () => { + const { ticker } = this.networkController.getProviderConfig(); + try { + await this.currencyRateController.setNativeCurrency(ticker); + } catch (error) { + // TODO: Handle failure to get conversion rate more gracefully + console.error(error); + } }); - const { ticker } = this.networkController.getProviderConfig(); - this.currencyRateController.configure({ nativeCurrency: ticker ?? 'ETH' }); this.networkController.lookupNetwork(); this.messageManager = new MessageManager(); this.personalMessageManager = new PersonalMessageManager(); @@ -439,33 +448,37 @@ export default class MetamaskController extends EventEmitter { NotificationController: this.notificationController, }); - this.memStore = new ComposableObservableStore(null, { - AppStateController: this.appStateController.store, - NetworkController: this.networkController.store, - AccountTracker: this.accountTracker.store, - TxController: this.txController.memStore, - CachedBalancesController: this.cachedBalancesController.store, - TokenRatesController: this.tokenRatesController.store, - MessageManager: this.messageManager.memStore, - PersonalMessageManager: this.personalMessageManager.memStore, - DecryptMessageManager: this.decryptMessageManager.memStore, - EncryptionPublicKeyManager: this.encryptionPublicKeyManager.memStore, - TypesMessageManager: this.typedMessageManager.memStore, - KeyringController: this.keyringController.memStore, - PreferencesController: this.preferencesController.store, - MetaMetricsController: this.metaMetricsController.store, - AddressBookController: this.addressBookController, - CurrencyController: this.currencyRateController, - AlertController: this.alertController.store, - OnboardingController: this.onboardingController.store, - IncomingTransactionsController: this.incomingTransactionsController.store, - PermissionsController: this.permissionsController.permissions, - PermissionsMetadata: this.permissionsController.store, - ThreeBoxController: this.threeBoxController.store, - SwapsController: this.swapsController.store, - EnsController: this.ensController.store, - ApprovalController: this.approvalController, - NotificationController: this.notificationController, + this.memStore = new ComposableObservableStore({ + config: { + AppStateController: this.appStateController.store, + NetworkController: this.networkController.store, + AccountTracker: this.accountTracker.store, + TxController: this.txController.memStore, + CachedBalancesController: this.cachedBalancesController.store, + TokenRatesController: this.tokenRatesController.store, + MessageManager: this.messageManager.memStore, + PersonalMessageManager: this.personalMessageManager.memStore, + DecryptMessageManager: this.decryptMessageManager.memStore, + EncryptionPublicKeyManager: this.encryptionPublicKeyManager.memStore, + TypesMessageManager: this.typedMessageManager.memStore, + KeyringController: this.keyringController.memStore, + PreferencesController: this.preferencesController.store, + MetaMetricsController: this.metaMetricsController.store, + AddressBookController: this.addressBookController, + CurrencyController: this.currencyRateController, + AlertController: this.alertController.store, + OnboardingController: this.onboardingController.store, + IncomingTransactionsController: this.incomingTransactionsController + .store, + PermissionsController: this.permissionsController.permissions, + PermissionsMetadata: this.permissionsController.store, + ThreeBoxController: this.threeBoxController.store, + SwapsController: this.swapsController.store, + EnsController: this.ensController.store, + ApprovalController: this.approvalController, + NotificationController: this.notificationController, + }, + controllerMessenger, }); this.memStore.subscribe(this.sendUpdate.bind(this)); @@ -478,6 +491,17 @@ export default class MetamaskController extends EventEmitter { this.submitPassword(password); } + // Lazily update the store with the current extension environment + this.extension.runtime.getPlatformInfo(({ os }) => { + this.appStateController.setBrowserEnvironment( + os, + // This method is presently only supported by Firefox + this.extension.runtime.getBrowserInfo === undefined + ? 'chrome' + : 'firefox', + ); + }); + // TODO:LegacyProvider: Delete this.publicConfigStore = this.createPublicConfigStore(); } @@ -638,7 +662,11 @@ export default class MetamaskController extends EventEmitter { return { // etc getState: (cb) => cb(null, this.getState()), - setCurrentCurrency: this.setCurrentCurrency.bind(this), + setCurrentCurrency: nodeify( + this.currencyRateController.setCurrentCurrency.bind( + this.currencyRateController, + ), + ), setUseBlockie: this.setUseBlockie.bind(this), setUseNonceField: this.setUseNonceField.bind(this), setUsePhishDetect: this.setUsePhishDetect.bind(this), @@ -668,6 +696,7 @@ export default class MetamaskController extends EventEmitter { this.unlockHardwareWalletAccount, this, ), + setLedgerLivePreference: nodeify(this.setLedgerLivePreference, this), // mobile fetchInfoToSync: nodeify(this.fetchInfoToSync, this), @@ -723,6 +752,10 @@ export default class MetamaskController extends EventEmitter { preferencesController.addKnownMethodData, preferencesController, ), + setDismissSeedBackUpReminder: nodeify( + this.preferencesController.setDismissSeedBackUpReminder, + this.preferencesController, + ), // AddressController setAddressBook: nodeify( @@ -1208,6 +1241,14 @@ export default class MetamaskController extends EventEmitter { log.error('Error while unlocking extension.', error); } + // 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 + // Ledger Keyring GitHub downtime + this.setLedgerLivePreference( + this.preferencesController.getLedgerLivePreference(), + ); + return this.keyringController.fullUpdate(); } @@ -2484,29 +2525,6 @@ export default class MetamaskController extends EventEmitter { // Log blocks - /** - * A method for setting the user's preferred display currency. - * @param {string} currencyCode - The code of the preferred currency. - * @param {Function} cb - A callback function returning currency info. - */ - setCurrentCurrency(currencyCode, cb) { - const { ticker } = this.networkController.getProviderConfig(); - try { - const currencyState = { - nativeCurrency: ticker, - currentCurrency: currencyCode, - }; - this.currencyRateController.update(currencyState); - this.currencyRateController.configure(currencyState); - cb(null, this.currencyRateController.state); - return; - } catch (err) { - cb(err); - // eslint-disable-next-line no-useless-return - return; - } - } - /** * A method for selecting a custom URL for an ethereum RPC provider and updating it * @param {string} rpcUrl - A URL for a valid Ethereum RPC API. @@ -2687,6 +2705,27 @@ export default class MetamaskController extends EventEmitter { } } + /** + * Sets the Ledger Live preference to use for Ledger hardware wallet support + * @param {bool} bool - the value representing if the users wants to use Ledger Live + */ + async setLedgerLivePreference(bool) { + const currentValue = this.preferencesController.getLedgerLivePreference(); + this.preferencesController.setLedgerLivePreference(bool); + + const keyring = await this.getKeyringForDevice('ledger'); + if (keyring?.updateTransportMethod) { + return keyring.updateTransportMethod(bool).catch((e) => { + // If there was an error updating the transport, we should + // fall back to the original value + this.preferencesController.setLedgerLivePreference(currentValue); + throw e; + }); + } + + return undefined; + } + /** * Sets whether or not the user will have usage data tracked with MetaMetrics * @param {boolean} bool - True for users that wish to opt-in, false for users that wish to remain out. diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js index ffdd6246d..87fed2aef 100644 --- a/app/scripts/metamask-controller.test.js +++ b/app/scripts/metamask-controller.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import sinon from 'sinon'; import { cloneDeep } from 'lodash'; import nock from 'nock'; @@ -52,6 +52,7 @@ const ExtensionizerMock = { onInstalled: { addListener: () => undefined, }, + getPlatformInfo: async () => 'mac', }, }; @@ -492,8 +493,8 @@ describe('MetaMaskController', function () { ); } catch (e) { assert.equal( - e, - 'Error: MetamaskController:getKeyringForDevice - Unknown device', + e.message, + 'MetamaskController:getKeyringForDevice - Unknown device', ); } }); @@ -504,9 +505,9 @@ describe('MetaMaskController', function () { const keyrings = await metamaskController.keyringController.getKeyringsByType( 'Trezor Hardware', ); - assert.equal( + assert.deepEqual( metamaskController.keyringController.addNewKeyring.getCall(0).args, - 'Trezor Hardware', + ['Trezor Hardware'], ); assert.equal(keyrings.length, 1); }); @@ -517,9 +518,9 @@ describe('MetaMaskController', function () { const keyrings = await metamaskController.keyringController.getKeyringsByType( 'Ledger Hardware', ); - assert.equal( + assert.deepEqual( metamaskController.keyringController.addNewKeyring.getCall(0).args, - 'Ledger Hardware', + ['Ledger Hardware'], ); assert.equal(keyrings.length, 1); }); @@ -534,8 +535,8 @@ describe('MetaMaskController', function () { ); } catch (e) { assert.equal( - e, - 'Error: MetamaskController:getKeyringForDevice - Unknown device', + e.message, + 'MetamaskController:getKeyringForDevice - Unknown device', ); } }); @@ -553,8 +554,8 @@ describe('MetaMaskController', function () { await metamaskController.forgetDevice('Some random device name'); } catch (e) { assert.equal( - e, - 'Error: MetamaskController:getKeyringForDevice - Unknown device', + e.message, + 'MetamaskController:getKeyringForDevice - Unknown device', ); } }); @@ -653,46 +654,24 @@ describe('MetaMaskController', function () { }); describe('#setCustomRpc', function () { - let rpcUrl; - - beforeEach(function () { - rpcUrl = metamaskController.setCustomRpc( + it('returns custom RPC that when called', async function () { + const rpcUrl = await metamaskController.setCustomRpc( CUSTOM_RPC_URL, CUSTOM_RPC_CHAIN_ID, ); + assert.equal(rpcUrl, CUSTOM_RPC_URL); }); - it('returns custom RPC that when called', async function () { - assert.equal(await rpcUrl, CUSTOM_RPC_URL); - }); - - it('changes the network controller rpc', function () { + it('changes the network controller rpc', async function () { + await metamaskController.setCustomRpc( + CUSTOM_RPC_URL, + CUSTOM_RPC_CHAIN_ID, + ); const networkControllerState = metamaskController.networkController.store.getState(); assert.equal(networkControllerState.provider.rpcUrl, CUSTOM_RPC_URL); }); }); - describe('#setCurrentCurrency', function () { - let defaultMetaMaskCurrency; - - beforeEach(function () { - defaultMetaMaskCurrency = - metamaskController.currencyRateController.state.currentCurrency; - }); - - it('defaults to usd', function () { - assert.equal(defaultMetaMaskCurrency, 'usd'); - }); - - it('sets currency to JPY', function () { - metamaskController.setCurrentCurrency('JPY', noop); - assert.equal( - metamaskController.currencyRateController.state.currentCurrency, - 'JPY', - ); - }); - }); - describe('#addNewAccount', function () { it('errors when an primary keyring is does not exist', async function () { const addNewAccount = metamaskController.addNewAccount(); diff --git a/app/scripts/migrations/021.test.js b/app/scripts/migrations/021.test.js index 45c727e57..261d40f81 100644 --- a/app/scripts/migrations/021.test.js +++ b/app/scripts/migrations/021.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import wallet2 from '../../../test/lib/migrations/002.json'; import migration21 from './021'; diff --git a/app/scripts/migrations/022.test.js b/app/scripts/migrations/022.test.js index a102bcb7e..425bfeb91 100644 --- a/app/scripts/migrations/022.test.js +++ b/app/scripts/migrations/022.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration22 from './022'; diff --git a/app/scripts/migrations/023.test.js b/app/scripts/migrations/023.test.js index 0b40679b2..0ef74beb6 100644 --- a/app/scripts/migrations/023.test.js +++ b/app/scripts/migrations/023.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration23 from './023'; diff --git a/app/scripts/migrations/024.test.js b/app/scripts/migrations/024.test.js index b2056193d..f87e45748 100644 --- a/app/scripts/migrations/024.test.js +++ b/app/scripts/migrations/024.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import data from '../first-time-state'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration24 from './024'; diff --git a/app/scripts/migrations/025.test.js b/app/scripts/migrations/025.test.js index 7d666c517..9e0ff846b 100644 --- a/app/scripts/migrations/025.test.js +++ b/app/scripts/migrations/025.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import data from '../first-time-state'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration25 from './025'; diff --git a/app/scripts/migrations/026.test.js b/app/scripts/migrations/026.test.js index 71245115b..ca4ac9a64 100644 --- a/app/scripts/migrations/026.test.js +++ b/app/scripts/migrations/026.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import firstTimeState from '../first-time-state'; import migration26 from './026'; diff --git a/app/scripts/migrations/027.test.js b/app/scripts/migrations/027.test.js index 2687e17c2..29df2dfb0 100644 --- a/app/scripts/migrations/027.test.js +++ b/app/scripts/migrations/027.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import firstTimeState from '../first-time-state'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration27 from './027'; diff --git a/app/scripts/migrations/028.test.js b/app/scripts/migrations/028.test.js index 01381e754..5d755f50c 100644 --- a/app/scripts/migrations/028.test.js +++ b/app/scripts/migrations/028.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import firstTimeState from '../first-time-state'; import migration28 from './028'; diff --git a/app/scripts/migrations/029.test.js b/app/scripts/migrations/029.test.js index 90d698fd7..53ce28695 100644 --- a/app/scripts/migrations/029.test.js +++ b/app/scripts/migrations/029.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import migration29 from './029'; diff --git a/app/scripts/migrations/030.test.js b/app/scripts/migrations/030.test.js index 985aa02e1..f03f51231 100644 --- a/app/scripts/migrations/030.test.js +++ b/app/scripts/migrations/030.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migrationTemplate from './030'; const storage = { diff --git a/app/scripts/migrations/031.test.js b/app/scripts/migrations/031.test.js index d7b6ee046..62216e85d 100644 --- a/app/scripts/migrations/031.test.js +++ b/app/scripts/migrations/031.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration31 from './031'; describe('migration #31', function () { diff --git a/app/scripts/migrations/033.test.js b/app/scripts/migrations/033.test.js index bb12e83d7..382622d39 100644 --- a/app/scripts/migrations/033.test.js +++ b/app/scripts/migrations/033.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration33 from './033'; describe('Migration to delete notice controller', function () { diff --git a/app/scripts/migrations/034.test.js b/app/scripts/migrations/034.test.js index bfb929997..7902b5f13 100644 --- a/app/scripts/migrations/034.test.js +++ b/app/scripts/migrations/034.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration34 from './034'; describe('migration #34', function () { diff --git a/app/scripts/migrations/035.test.js b/app/scripts/migrations/035.test.js index 385f12fb5..03454b2ea 100644 --- a/app/scripts/migrations/035.test.js +++ b/app/scripts/migrations/035.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration35 from './035'; describe('migration #35', function () { diff --git a/app/scripts/migrations/036.test.js b/app/scripts/migrations/036.test.js index 679080bf7..ecc44c557 100644 --- a/app/scripts/migrations/036.test.js +++ b/app/scripts/migrations/036.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration36 from './036'; describe('migration #36', function () { diff --git a/app/scripts/migrations/037.test.js b/app/scripts/migrations/037.test.js index 0c145bccf..688f66a9a 100644 --- a/app/scripts/migrations/037.test.js +++ b/app/scripts/migrations/037.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration37 from './037'; describe('migration #37', function () { diff --git a/app/scripts/migrations/039.test.js b/app/scripts/migrations/039.test.js index 55ba12982..3efbbf49d 100644 --- a/app/scripts/migrations/039.test.js +++ b/app/scripts/migrations/039.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration39 from './039'; describe('migration #39', function () { diff --git a/app/scripts/migrations/040.test.js b/app/scripts/migrations/040.test.js index f4d1de68e..ba10e4b75 100644 --- a/app/scripts/migrations/040.test.js +++ b/app/scripts/migrations/040.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration40 from './040'; describe('migration #40', function () { diff --git a/app/scripts/migrations/041.test.js b/app/scripts/migrations/041.test.js index 7c6e4c567..f1a06a151 100644 --- a/app/scripts/migrations/041.test.js +++ b/app/scripts/migrations/041.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration41 from './041'; describe('migration #41', function () { diff --git a/app/scripts/migrations/042.test.js b/app/scripts/migrations/042.test.js index 7cca8d2a7..8c1a46513 100644 --- a/app/scripts/migrations/042.test.js +++ b/app/scripts/migrations/042.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration42 from './042'; describe('migration #42', function () { diff --git a/app/scripts/migrations/045.test.js b/app/scripts/migrations/045.test.js index 907489195..de47bef32 100644 --- a/app/scripts/migrations/045.test.js +++ b/app/scripts/migrations/045.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration45 from './045'; describe('migration #45', function () { diff --git a/app/scripts/migrations/049.test.js b/app/scripts/migrations/049.test.js index 5242fab52..f3c89d66b 100644 --- a/app/scripts/migrations/049.test.js +++ b/app/scripts/migrations/049.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration49 from './049'; describe('migration #49', function () { diff --git a/app/scripts/migrations/052.test.js b/app/scripts/migrations/052.test.js index 8d9d13afb..3896d0a77 100644 --- a/app/scripts/migrations/052.test.js +++ b/app/scripts/migrations/052.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import { GOERLI, GOERLI_CHAIN_ID, diff --git a/app/scripts/migrations/056.test.js b/app/scripts/migrations/056.test.js index e311d4aee..927997fbe 100644 --- a/app/scripts/migrations/056.test.js +++ b/app/scripts/migrations/056.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migration56 from './056'; const BAD_TOKEN_DATA = { symbol: null, decimals: null }; diff --git a/app/scripts/migrations/060.js b/app/scripts/migrations/060.js new file mode 100644 index 000000000..db985f6e5 --- /dev/null +++ b/app/scripts/migrations/060.js @@ -0,0 +1,35 @@ +import { cloneDeep, isPlainObject } from 'lodash'; + +const version = 60; +const SUPPORT_NOTIFICATION_KEY = 2; +const SUPPORT_NOTIFICATION_DATE = '2020-08-31'; + +/** + * Removes the support survey notification + */ +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 notifications = state?.NotificationController?.notifications; + if (isPlainObject(notifications)) { + if ( + notifications[SUPPORT_NOTIFICATION_KEY]?.date === + SUPPORT_NOTIFICATION_DATE + ) { + delete state.NotificationController.notifications[ + SUPPORT_NOTIFICATION_KEY + ]; + } + } + return state; +} diff --git a/app/scripts/migrations/060.test.js b/app/scripts/migrations/060.test.js new file mode 100644 index 000000000..c0116c9a7 --- /dev/null +++ b/app/scripts/migrations/060.test.js @@ -0,0 +1,143 @@ +import { strict as assert } from 'assert'; +import migration60 from './060'; + +describe('migration #60', function () { + it('should update the version metadata', async function () { + const oldStorage = { + meta: { + version: 59, + }, + data: {}, + }; + + const newStorage = await migration60.migrate(oldStorage); + assert.deepEqual(newStorage.meta, { + version: 60, + }); + }); + + it('prunes the support notification', async function () { + const oldStorage = { + meta: {}, + data: { + NotificationController: { + notifications: { + 1: { + id: 1, + date: '2021-03-17', + image: { + src: 'images/mobile-link-qr.svg', + height: '230px', + width: '230px', + placeImageBelowDescription: true, + }, + }, + 2: { + id: 2, + date: '2020-08-31', + }, + 3: { + id: 3, + date: '2021-03-08', + }, + 4: { + id: 4, + date: '2021-05-11', + image: { + src: 'images/source-logos-bsc.svg', + width: '100%', + }, + }, + }, + }, + }, + }; + + const newStorage = await migration60.migrate(oldStorage); + const { notifications } = newStorage.data.NotificationController; + const notificationKeys = Object.keys(notifications); + // Assert support notification is removed + assert.equal(notificationKeys.length, 3); + notificationKeys.forEach((key) => { + assert.notEqual(notifications[key].date, '2020-08-31'); + }); + }); + + it('does not modify state when the support notification does not exist', async function () { + const oldStorage = { + meta: {}, + data: { + NotificationController: { + notifications: { + 1: { + id: 1, + date: '2021-03-17', + image: { + src: 'images/mobile-link-qr.svg', + height: '230px', + width: '230px', + placeImageBelowDescription: true, + }, + }, + 3: { + id: 3, + date: '2021-03-08', + }, + 4: { + id: 4, + date: '2021-05-11', + image: { + src: 'images/source-logos-bsc.svg', + width: '100%', + }, + }, + }, + }, + }, + }; + + const newStorage = await migration60.migrate(oldStorage); + assert.deepEqual(oldStorage.data, newStorage.data); + }); + + it('does not modify state when NotificationsController is undefined', async function () { + const oldStorage = { + meta: {}, + data: { + arbitraryPropOne: 1, + arbitraryPropTwo: 2, + }, + }; + + const newStorage = await migration60.migrate(oldStorage); + assert.deepEqual(oldStorage.data, newStorage.data); + }); + + it('does not modify state when notifications are undefined', async function () { + const oldStorage = { + meta: {}, + data: { + NotificationController: { + arbitraryControllerProp: 'foo', + }, + }, + }; + + const newStorage = await migration60.migrate(oldStorage); + assert.deepEqual(oldStorage.data, newStorage.data); + }); + + it('does not modify state when notifications are not an object', async function () { + const oldStorage = { + meta: {}, + data: { + NotificationController: { + notifications: [], + }, + }, + }; + + const newStorage = await migration60.migrate(oldStorage); + assert.deepEqual(oldStorage.data, newStorage.data); + }); +}); diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js index 47925fbba..682ba6d08 100644 --- a/app/scripts/migrations/index.js +++ b/app/scripts/migrations/index.js @@ -64,6 +64,7 @@ const migrations = [ require('./057').default, require('./058').default, require('./059').default, + require('./060').default, ]; export default migrations; diff --git a/app/scripts/migrations/migrations.test.js b/app/scripts/migrations/migrations.test.js index a7c921323..82d15f501 100644 --- a/app/scripts/migrations/migrations.test.js +++ b/app/scripts/migrations/migrations.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import wallet1 from '../../../test/lib/migrations/001.json'; import vault4 from '../../../test/lib/migrations/004.json'; import migration2 from './002'; @@ -52,7 +52,7 @@ describe('wallet1 is migrated successfully', function () { const fourthData = fourthResult.data; assert.equal( fourthData.config.provider.rpcTarget, - null, + undefined, 'old rpcTarget should not exist.', ); assert.equal( @@ -65,15 +65,15 @@ describe('wallet1 is migrated successfully', function () { }) .then((fifthResult) => { const fifthData = fifthResult.data; - assert.equal(fifthData.vault, null, 'old vault should not exist'); + assert.equal(fifthData.vault, undefined, 'old vault should not exist'); assert.equal( fifthData.walletNicknames, - null, + undefined, 'old walletNicknames should not exist', ); assert.equal( fifthData.config.selectedAccount, - null, + undefined, 'old config.selectedAccount should not exist', ); assert.equal( @@ -102,7 +102,7 @@ describe('wallet1 is migrated successfully', function () { .then((sixthResult) => { assert.equal( sixthResult.data.KeyringController.selectedAccount, - null, + undefined, 'old selectedAccount should not exist', ); assert.equal( @@ -117,12 +117,12 @@ describe('wallet1 is migrated successfully', function () { .then((seventhResult) => { assert.equal( seventhResult.data.transactions, - null, + undefined, 'old transactions should not exist', ); assert.equal( seventhResult.data.gasMultiplier, - null, + undefined, 'old gasMultiplier should not exist', ); assert.equal( @@ -142,7 +142,7 @@ describe('wallet1 is migrated successfully', function () { .then((eighthResult) => { assert.equal( eighthResult.data.noticesList, - null, + undefined, 'old noticesList should not exist', ); assert.equal( @@ -157,22 +157,22 @@ describe('wallet1 is migrated successfully', function () { .then((ninthResult) => { assert.equal( ninthResult.data.currentFiat, - null, + undefined, 'old currentFiat should not exist', ); assert.equal( ninthResult.data.fiatCurrency, - null, + undefined, 'old fiatCurrency should not exist', ); assert.equal( ninthResult.data.conversionRate, - null, + undefined, 'old conversionRate should not exist', ); assert.equal( ninthResult.data.conversionDate, - null, + undefined, 'old conversionDate should not exist', ); @@ -198,7 +198,7 @@ describe('wallet1 is migrated successfully', function () { .then((tenthResult) => { assert.equal( tenthResult.data.shapeShiftTxList, - null, + undefined, 'old shapeShiftTxList should not exist', ); assert.equal( @@ -211,12 +211,12 @@ describe('wallet1 is migrated successfully', function () { .then((eleventhResult) => { assert.equal( eleventhResult.data.isDisclaimerConfirmed, - null, + undefined, 'isDisclaimerConfirmed should not exist', ); assert.equal( eleventhResult.data.TOSHash, - null, + undefined, 'TOSHash should not exist', ); diff --git a/app/scripts/migrations/template.test.js b/app/scripts/migrations/template.test.js index 92a4e8937..5277b86ba 100644 --- a/app/scripts/migrations/template.test.js +++ b/app/scripts/migrations/template.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import migrationTemplate from './template'; const storage = { diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 0eaeefaa8..e8820d602 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -1,8 +1,8 @@ import extension from 'extensionizer'; +import { getBlockExplorerLink } from '@metamask/etherscan-link'; import { getEnvironmentType, checkForError } from '../lib/util'; import { ENVIRONMENT_TYPE_BACKGROUND } from '../../../shared/constants/app'; import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; -import { getBlockExplorerUrlForTx } from '../../../shared/modules/transaction.utils'; export default class ExtensionPlatform { // @@ -192,7 +192,7 @@ export default class ExtensionPlatform { _showConfirmedTransaction(txMeta, rpcPrefs) { this._subscribeToNotificationClicked(); - const url = getBlockExplorerUrlForTx(txMeta, rpcPrefs); + const url = getBlockExplorerLink(txMeta, rpcPrefs); const nonce = parseInt(txMeta.txParams.nonce, 16); const title = 'Confirmed transaction'; diff --git a/development/announcer.js b/development/announcer.js index f0c42c07a..a3fc459a9 100644 --- a/development/announcer.js +++ b/development/announcer.js @@ -1,6 +1,6 @@ const fs = require('fs'); const path = require('path'); -const { version } = require('../app/manifest/_base.json'); +const { version } = require('../package.json'); const changelog = fs.readFileSync( path.join(__dirname, '..', 'CHANGELOG.md'), diff --git a/development/auto-changelog.js b/development/auto-changelog.js deleted file mode 100755 index 455bf5beb..000000000 --- a/development/auto-changelog.js +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env node -const fs = require('fs').promises; - -const path = require('path'); -const { version } = require('../app/manifest/_base.json'); -const { updateChangelog } = require('./lib/changelog/updateChangelog'); -const { unreleased } = require('./lib/changelog/constants'); - -const REPO_URL = 'https://github.com/MetaMask/metamask-extension'; - -const command = 'yarn update-changelog'; - -const helpText = `Usage: ${command} [--rc] [-h|--help] -Update CHANGELOG.md with any changes made since the most recent release. - -Options: - --rc Add new changes to the current release header, rather than to the - '${unreleased}' section. - -h, --help Display this help and exit. - -New commits will be added to the "${unreleased}" section (or to the section for the -current release if the '--rc' flag is used) in reverse chronological order. Any -commits for PRs that are represented already in the changelog will be ignored. - -If the '--rc' flag is used and the section for the current release does not yet -exist, it will be created. -`; - -async function main() { - const args = process.argv.slice(2); - let isReleaseCandidate = false; - - for (const arg of args) { - if (arg === '--rc') { - isReleaseCandidate = true; - } else if (['--help', '-h'].includes(arg)) { - console.log(helpText); - process.exit(0); - } else { - console.error( - `Unrecognized argument: ${arg}\nTry '${command} --help' for more information.\n`, - ); - process.exit(1); - } - } - - const changelogFilename = path.resolve(__dirname, '..', 'CHANGELOG.md'); - const changelogContent = await fs.readFile(changelogFilename, { - encoding: 'utf8', - }); - - const newChangelogContent = await updateChangelog({ - changelogContent, - currentVersion: version, - repoUrl: REPO_URL, - isReleaseCandidate, - }); - - await fs.writeFile(changelogFilename, newChangelogContent); - - console.log('CHANGELOG updated'); -} - -main().catch((error) => { - console.error(error); - process.exit(1); -}); diff --git a/development/build/etc.js b/development/build/etc.js index 49070887f..754a64f78 100644 --- a/development/build/etc.js +++ b/development/build/etc.js @@ -4,7 +4,7 @@ const gulpZip = require('gulp-zip'); const del = require('del'); const pify = require('pify'); const pump = pify(require('pump')); -const baseManifest = require('../../app/manifest/_base.json'); +const { version } = require('../../package.json'); const { createTask, composeParallel } = require('./task'); module.exports = createEtcTasks; @@ -38,7 +38,7 @@ function createZipTask(target) { return async () => { await pump( gulp.src(`dist/${target}/**`), - gulpZip(`metamask-${target}-${baseManifest.version}.zip`), + gulpZip(`metamask-${target}-${version}.zip`), gulp.dest('builds'), ); }; diff --git a/development/build/manifest.js b/development/build/manifest.js index 340db1272..09df35cbd 100644 --- a/development/build/manifest.js +++ b/development/build/manifest.js @@ -3,6 +3,7 @@ const path = require('path'); const { merge, cloneDeep } = require('lodash'); const baseManifest = require('../../app/manifest/_base.json'); +const { version } = require('../../package.json'); const { createTask, composeSeries } = require('./task'); @@ -23,7 +24,11 @@ function createManifestTasks({ browserPlatforms }) { `${platform}.json`, ), ); - const result = merge(cloneDeep(baseManifest), platformModifications); + const result = merge( + cloneDeep(baseManifest), + { version }, + platformModifications, + ); const dir = path.join('.', 'dist', platform); await fs.mkdir(dir, { recursive: true }); await writeJson(result, path.join(dir, 'manifest.json')); diff --git a/development/build/scripts.js b/development/build/scripts.js index 2bc5fe5c3..f0e399d47 100644 --- a/development/build/scripts.js +++ b/development/build/scripts.js @@ -20,9 +20,12 @@ const metamaskrc = require('rc')('metamask', { SEGMENT_HOST: process.env.SEGMENT_HOST, SEGMENT_WRITE_KEY: process.env.SEGMENT_WRITE_KEY, SEGMENT_LEGACY_WRITE_KEY: process.env.SEGMENT_LEGACY_WRITE_KEY, + SENTRY_DSN_DEV: + process.env.SENTRY_DSN_DEV || + 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496', }); -const baseManifest = require('../../app/manifest/_base.json'); +const { version } = require('../../package.json'); const packageJSON = require('../../package.json'); const { @@ -424,13 +427,14 @@ function getEnvironmentVariables({ devMode, testing }) { return { METAMASK_DEBUG: devMode, METAMASK_ENVIRONMENT: environment, - METAMASK_VERSION: baseManifest.version, + METAMASK_VERSION: version, NODE_ENV: devMode ? 'development' : 'production', IN_TEST: testing ? 'true' : false, PUBNUB_SUB_KEY: process.env.PUBNUB_SUB_KEY || '', PUBNUB_PUB_KEY: process.env.PUBNUB_PUB_KEY || '', CONF: devMode ? metamaskrc : {}, SENTRY_DSN: process.env.SENTRY_DSN, + SENTRY_DSN_DEV: metamaskrc.SENTRY_DSN_DEV, INFURA_PROJECT_ID: testing ? '00000000000000000000000000000000' : metamaskrc.INFURA_PROJECT_ID, diff --git a/development/build/static.js b/development/build/static.js index 0adba6745..9ae309e53 100644 --- a/development/build/static.js +++ b/development/build/static.js @@ -35,7 +35,7 @@ const copyTargets = [ dest: `fonts/fontawesome`, }, { - src: `./ui/app/css/output/`, + src: `./ui/css/output/`, pattern: `*.css`, dest: ``, }, diff --git a/development/build/styles.js b/development/build/styles.js index 108561261..ecda4b661 100644 --- a/development/build/styles.js +++ b/development/build/styles.js @@ -18,8 +18,8 @@ function createStyleTasks({ livereload }) { const prod = createTask( 'styles:prod', createScssBuildTask({ - src: 'ui/app/css/index.scss', - dest: 'ui/app/css/output', + src: 'ui/css/index.scss', + dest: 'ui/css/output', devMode: false, }), ); @@ -27,15 +27,15 @@ function createStyleTasks({ livereload }) { const dev = createTask( 'styles:dev', createScssBuildTask({ - src: 'ui/app/css/index.scss', - dest: 'ui/app/css/output', + src: 'ui/css/index.scss', + dest: 'ui/css/output', devMode: true, - pattern: 'ui/app/**/*.scss', + pattern: 'ui/**/*.scss', }), ); const lint = createTask('lint-scss', function () { - return gulp.src('ui/app/css/itcss/**/*.scss').pipe( + return gulp.src('ui/css/itcss/**/*.scss').pipe( gulpStylelint({ reporters: [{ formatter: 'string', console: true }], fix: true, diff --git a/development/lib/changelog/changelog.js b/development/lib/changelog/changelog.js deleted file mode 100644 index b16dca200..000000000 --- a/development/lib/changelog/changelog.js +++ /dev/null @@ -1,305 +0,0 @@ -const semver = require('semver'); - -const { orderedChangeCategories, unreleased } = require('./constants'); - -const changelogTitle = '# Changelog'; -const changelogDescription = `All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).`; - -// Stringification helpers - -function stringifyCategory(category, changes) { - const categoryHeader = `### ${category}`; - if (changes.length === 0) { - return categoryHeader; - } - const changeDescriptions = changes - .map((description) => `- ${description}`) - .join('\n'); - return `${categoryHeader}\n${changeDescriptions}`; -} - -function stringifyRelease(version, categories, { date, status } = {}) { - const releaseHeader = `## [${version}]${date ? ` - ${date}` : ''}${ - status ? ` [${status}]` : '' - }`; - const categorizedChanges = orderedChangeCategories - .filter((category) => categories[category]) - .map((category) => { - const changes = categories[category]; - return stringifyCategory(category, changes); - }) - .join('\n\n'); - if (categorizedChanges === '') { - return releaseHeader; - } - return `${releaseHeader}\n${categorizedChanges}`; -} - -function stringifyReleases(releases, changes) { - const stringifiedUnreleased = stringifyRelease( - unreleased, - changes[unreleased], - ); - const stringifiedReleases = releases.map(({ version, date, status }) => { - const categories = changes[version]; - return stringifyRelease(version, categories, { date, status }); - }); - - return [stringifiedUnreleased, ...stringifiedReleases].join('\n\n'); -} - -function withTrailingSlash(url) { - return url.endsWith('/') ? url : `${url}/`; -} - -function getCompareUrl(repoUrl, firstRef, secondRef) { - return `${withTrailingSlash(repoUrl)}compare/${firstRef}...${secondRef}`; -} - -function getTagUrl(repoUrl, tag) { - return `${withTrailingSlash(repoUrl)}releases/tag/${tag}`; -} - -function stringifyLinkReferenceDefinitions(repoUrl, releases) { - const orderedReleases = releases - .map(({ version }) => version) - .sort((a, b) => semver.gt(a, b)); - - // The "Unreleased" section represents all changes made since the *highest* - // release, not the most recent release. This is to accomodate patch releases - // of older versions that don't represent the latest set of changes. - // - // For example, if a library has a v2.0.0 but the v1.0.0 release needed a - // security update, the v1.0.1 release would then be the most recent, but the - // range of unreleased changes would remain `v2.0.0...HEAD`. - const unreleasedLinkReferenceDefinition = `[${unreleased}]: ${getCompareUrl( - repoUrl, - `v${orderedReleases[0]}`, - 'HEAD', - )}`; - - // The "previous" release that should be used for comparison is not always - // the most recent release chronologically. The _highest_ version that is - // lower than the current release is used as the previous release, so that - // patch releases on older releases can be accomodated. - const releaseLinkReferenceDefinitions = releases - .map(({ version }) => { - if (version === orderedReleases[orderedReleases.length - 1]) { - return `[${version}]: ${getTagUrl(repoUrl, `v${version}`)}`; - } - const versionIndex = orderedReleases.indexOf(version); - const previousVersion = orderedReleases - .slice(versionIndex) - .find((releaseVersion) => { - return semver.gt(version, releaseVersion); - }); - return `[${version}]: ${getCompareUrl( - repoUrl, - `v${previousVersion}`, - `v${version}`, - )}`; - }) - .join('\n'); - return `${unreleasedLinkReferenceDefinition}\n${releaseLinkReferenceDefinitions}${ - releases.length > 0 ? '\n' : '' - }`; -} - -/** - * @typedef {import('./constants.js').Unreleased} Unreleased - * @typedef {import('./constants.js').ChangeCategories ChangeCategories} - */ -/** - * @typedef {import('./constants.js').Version} Version - */ -/** - * Release metadata. - * @typedef {Object} ReleaseMetadata - * @property {string} date - An ISO-8601 formatted date, representing the - * release date. - * @property {string} status -The status of the release (e.g. 'WITHDRAWN', 'DEPRECATED') - * @property {Version} version - The version of the current release. - */ - -/** - * Category changes. A list of changes in a single category. - * @typedef {Array} CategoryChanges - */ - -/** - * Release changes, organized by category - * @typedef {Record} ReleaseChanges - */ - -/** - * Changelog changes, organized by release and by category. - * @typedef {Record} ChangelogChanges - */ - -/** - * A changelog that complies with the ["keep a changelog" v1.1.0 guidelines]{@link https://keepachangelog.com/en/1.0.0/}. - * - * This changelog starts out completely empty, and allows new releases and - * changes to be added such that the changelog remains compliant at all times. - * This can be used to help validate the contents of a changelog, normalize - * formatting, update a changelog, or build one from scratch. - */ -class Changelog { - /** - * Construct an empty changelog - * - * @param {Object} options - * @param {string} options.repoUrl - The GitHub repository URL for the current project - */ - constructor({ repoUrl }) { - this._releases = []; - this._changes = { [unreleased]: {} }; - this._repoUrl = repoUrl; - } - - /** - * Add a release to the changelog - * - * @param {Object} options - * @param {boolean} [options.addToStart] - Determines whether the release is - * added to the top or bottom of the changelog. This defaults to 'true' - * because new releases should be added to the top of the changelog. This - * should be set to 'false' when parsing a changelog top-to-bottom. - * @param {string} [options.date] - An ISO-8601 formatted date, representing the - * release date. - * @param {string} [options.status] - The status of the release (e.g. - * 'WITHDRAWN', 'DEPRECATED') - * @param {Version} options.version - The version of the current release, - * which should be a [semver]{@link https://semver.org/spec/v2.0.0.html}- - * compatible version. - */ - addRelease({ addToStart = true, date, status, version }) { - if (!version) { - throw new Error('Version required'); - } else if (semver.valid(version) === null) { - throw new Error(`Not a valid semver version: '${version}'`); - } else if (this._changes[version]) { - throw new Error(`Release already exists: '${version}'`); - } - - this._changes[version] = {}; - const newRelease = { version, date, status }; - if (addToStart) { - this._releases.unshift(newRelease); - } else { - this._releases.push(newRelease); - } - } - - /** - * Add a change to the changelog - * - * @param {Object} options - * @param {boolean} [options.addToStart] - Determines whether the change is - * added to the top or bottom of the list of changes in this category. This - * defaults to 'true' because changes should be in reverse-chronological - * order. This should be set to 'false' when parsing a changelog top-to- - * bottom. - * @param {string} options.category - The category of the change. - * @param {string} options.description - The description of the change. - * @param {Version} [options.version] - The version this change was released - * in. If this is not given, the change is assumed to be unreleased. - */ - addChange({ addToStart = true, category, description, version }) { - if (!category) { - throw new Error('Category required'); - } else if (!orderedChangeCategories.includes(category)) { - throw new Error(`Unrecognized category: '${category}'`); - } else if (!description) { - throw new Error('Description required'); - } else if (version !== undefined && !this._changes[version]) { - throw new Error(`Specified release version does not exist: '${version}'`); - } - - const release = version - ? this._changes[version] - : this._changes[unreleased]; - - if (!release[category]) { - release[category] = []; - } - if (addToStart) { - release[category].unshift(description); - } else { - release[category].push(description); - } - } - - /** - * Migrate all unreleased changes to a release section. - * - * Changes are migrated in their existing categories, and placed above any - * pre-existing changes in that category. - * - * @param {Version} version - The release version to migrate unreleased - * changes to. - */ - migrateUnreleasedChangesToRelease(version) { - const releaseChanges = this._changes[version]; - if (!releaseChanges) { - throw new Error(`Specified release version does not exist: '${version}'`); - } - - const unreleasedChanges = this._changes[unreleased]; - - for (const category of Object.keys(unreleasedChanges)) { - if (releaseChanges[category]) { - releaseChanges[category] = [ - ...unreleasedChanges[category], - ...releaseChanges[category], - ]; - } else { - releaseChanges[category] = unreleasedChanges[category]; - } - } - this._changes[unreleased] = {}; - } - - /** - * Gets the metadata for all releases. - * @returns {Array} The metadata for each release. - */ - getReleases() { - return this._releases; - } - - /** - * Gets the changes in the given release, organized by category. - * @param {Version} version - The version of the release being retrieved. - * @returns {ReleaseChanges} The changes included in the given released. - */ - getReleaseChanges(version) { - return this._changes[version]; - } - - /** - * Gets all changes that have not yet been released - * @returns {ReleaseChanges} The changes that have not yet been released. - */ - getUnreleasedChanges() { - return this._changes[unreleased]; - } - - /** - * The stringified changelog, formatted according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - * @returns {string} The stringified changelog. - */ - toString() { - return `${changelogTitle} -${changelogDescription} - -${stringifyReleases(this._releases, this._changes)} - -${stringifyLinkReferenceDefinitions(this._repoUrl, this._releases)}`; - } -} - -module.exports = Changelog; diff --git a/development/lib/changelog/constants.js b/development/lib/changelog/constants.js deleted file mode 100644 index c2b8ae008..000000000 --- a/development/lib/changelog/constants.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Version string - * @typedef {string} Version - A [SemVer]{@link https://semver.org/spec/v2.0.0.html}- - * compatible version string. - */ - -/** - * Change categories. - * - * Most of these categories are from [Keep a Changelog]{@link https://keepachangelog.com/en/1.0.0/}. - * The "Uncategorized" category was added because we have many changes from - * older releases that would be difficult to categorize. - * - * @typedef {Record} ChangeCategories - * @property {'Added'} Added - for new features. - * @property {'Changed'} Changed - for changes in existing functionality. - * @property {'Deprecated'} Deprecated - for soon-to-be removed features. - * @property {'Fixed'} Fixed - for any bug fixes. - * @property {'Removed'} Removed - for now removed features. - * @property {'Security'} Security - in case of vulnerabilities. - * @property {'Uncategorized'} Uncategorized - for any changes that have not - * yet been categorized. - */ - -/** - * @type {ChangeCategories} - */ -const changeCategories = { - Added: 'Added', - Changed: 'Changed', - Deprecated: 'Deprecated', - Fixed: 'Fixed', - Removed: 'Removed', - Security: 'Security', - Uncategorized: 'Uncategorized', -}; - -/** - * Change categories in the order in which they should be listed in the - * changelog. - * - * @type {Array} - */ -const orderedChangeCategories = [ - 'Uncategorized', - 'Added', - 'Changed', - 'Deprecated', - 'Removed', - 'Fixed', - 'Security', -]; - -/** - * The header for the section of the changelog listing unreleased changes. - * @typedef {'Unreleased'} Unreleased - */ - -/** - * @type {Unreleased} - */ -const unreleased = 'Unreleased'; - -module.exports = { - changeCategories, - orderedChangeCategories, - unreleased, -}; diff --git a/development/lib/changelog/parseChangelog.js b/development/lib/changelog/parseChangelog.js deleted file mode 100644 index 228da3635..000000000 --- a/development/lib/changelog/parseChangelog.js +++ /dev/null @@ -1,84 +0,0 @@ -const Changelog = require('./changelog'); -const { unreleased } = require('./constants'); - -function truncated(line) { - return line.length > 80 ? `${line.slice(0, 80)}...` : line; -} - -/** - * Constructs a Changelog instance that represents the given changelog, which - * is parsed for release and change informatino. - * @param {Object} options - * @param {string} options.changelogContent - The changelog to parse - * @param {string} options.repoUrl - The GitHub repository URL for the current - * project. - * @returns {Changelog} A changelog instance that reflects the changelog text - * provided. - */ -function parseChangelog({ changelogContent, repoUrl }) { - const changelogLines = changelogContent.split('\n'); - const changelog = new Changelog({ repoUrl }); - - const unreleasedHeaderIndex = changelogLines.indexOf(`## [${unreleased}]`); - if (unreleasedHeaderIndex === -1) { - throw new Error(`Failed to find ${unreleased} header`); - } - const unreleasedLinkReferenceDefinition = changelogLines.findIndex((line) => { - return line.startsWith(`[${unreleased}]: `); - }); - if (unreleasedLinkReferenceDefinition === -1) { - throw new Error(`Failed to find ${unreleased} link reference definition`); - } - - const contentfulChangelogLines = changelogLines - .slice(unreleasedHeaderIndex + 1, unreleasedLinkReferenceDefinition) - .filter((line) => line !== ''); - - let mostRecentRelease; - let mostRecentCategory; - for (const line of contentfulChangelogLines) { - if (line.startsWith('## [')) { - const results = line.match( - /^## \[(\d+\.\d+\.\d+)\](?: - (\d\d\d\d-\d\d-\d\d))?(?: \[(\w+)\])?/u, - ); - if (results === null) { - throw new Error(`Malformed release header: '${truncated(line)}'`); - } - mostRecentRelease = results[1]; - mostRecentCategory = undefined; - const date = results[2]; - const status = results[3]; - changelog.addRelease({ - addToStart: false, - date, - status, - version: mostRecentRelease, - }); - } else if (line.startsWith('### ')) { - const results = line.match(/^### (\w+)$\b/u); - if (results === null) { - throw new Error(`Malformed category header: '${truncated(line)}'`); - } - mostRecentCategory = results[1]; - } else if (line.startsWith('- ')) { - if (mostRecentCategory === undefined) { - throw new Error(`Category missing for change: '${truncated(line)}'`); - } - const description = line.slice(2); - changelog.addChange({ - addToStart: false, - category: mostRecentCategory, - description, - version: mostRecentRelease, - }); - } else if (mostRecentRelease === null) { - continue; - } else { - throw new Error(`Unrecognized line: '${truncated(line)}'`); - } - } - - return changelog; -} - -module.exports = { parseChangelog }; diff --git a/development/lib/changelog/updateChangelog.js b/development/lib/changelog/updateChangelog.js deleted file mode 100644 index b94d6caf1..000000000 --- a/development/lib/changelog/updateChangelog.js +++ /dev/null @@ -1,171 +0,0 @@ -const assert = require('assert').strict; -const runCommand = require('../runCommand'); -const { parseChangelog } = require('./parseChangelog'); -const { changeCategories } = require('./constants'); - -async function getMostRecentTag() { - const [mostRecentTagCommitHash] = await runCommand('git', [ - 'rev-list', - '--tags', - '--max-count=1', - ]); - const [mostRecentTag] = await runCommand('git', [ - 'describe', - '--tags', - mostRecentTagCommitHash, - ]); - assert.equal(mostRecentTag[0], 'v', 'Most recent tag should start with v'); - return mostRecentTag; -} - -async function getCommits(commitHashes) { - const commits = []; - for (const commitHash of commitHashes) { - const [subject] = await runCommand('git', [ - 'show', - '-s', - '--format=%s', - commitHash, - ]); - - let prNumber; - let description = subject; - - // Squash & Merge: the commit subject is parsed as ` (#)` - if (subject.match(/\(#\d+\)/u)) { - const matchResults = subject.match(/\(#(\d+)\)/u); - prNumber = matchResults[1]; - description = subject.match(/^(.+)\s\(#\d+\)/u)[1]; - // Merge: the PR ID is parsed from the git subject (which is of the form `Merge pull request - // # from `, and the description is assumed to be the first line of the body. - // If no body is found, the description is set to the commit subject - } else if (subject.match(/#\d+\sfrom/u)) { - const matchResults = subject.match(/#(\d+)\sfrom/u); - prNumber = matchResults[1]; - const [firstLineOfBody] = await runCommand('git', [ - 'show', - '-s', - '--format=%b', - commitHash, - ]); - description = firstLineOfBody || subject; - } - // Otherwise: - // Normal commits: The commit subject is the description, and the PR ID is omitted. - - commits.push({ prNumber, description }); - } - return commits; -} - -function getAllChangeDescriptions(changelog) { - const releases = changelog.getReleases(); - const changeDescriptions = Object.values( - changelog.getUnreleasedChanges(), - ).flat(); - for (const release of releases) { - changeDescriptions.push( - ...Object.values(changelog.getReleaseChanges(release.version)).flat(), - ); - } - return changeDescriptions; -} - -function getAllLoggedPrNumbers(changelog) { - const changeDescriptions = getAllChangeDescriptions(changelog); - - const prNumbersWithChangelogEntries = []; - for (const description of changeDescriptions) { - const matchResults = description.match(/^\[#(\d+)\]/u); - if (matchResults === null) { - continue; - } - const prNumber = matchResults[1]; - prNumbersWithChangelogEntries.push(prNumber); - } - - return prNumbersWithChangelogEntries; -} - -/** - * @typedef {import('./constants.js').Version} Version - */ - -/** - * Update a changelog with any commits made since the last release. Commits for - * PRs that are already included in the changelog are omitted. - * @param {Object} options - * @param {string} options.changelogContent - The current changelog - * @param {Version} options.currentVersion - The current version - * @param {string} options.repoUrl - The GitHub repository URL for the current - * project. - * @param {boolean} options.isReleaseCandidate - Denotes whether the current - * project is in the midst of release preparation or not. If this is set, any - * new changes are listed under the current release header. Otherwise, they - * are listed under the 'Unreleased' section. - * @returns - */ -async function updateChangelog({ - changelogContent, - currentVersion, - repoUrl, - isReleaseCandidate, -}) { - const changelog = parseChangelog({ changelogContent, repoUrl }); - - // Ensure we have all tags on remote - await runCommand('git', ['fetch', '--tags']); - const mostRecentTag = await getMostRecentTag(); - const commitsHashesSinceLastRelease = await runCommand('git', [ - 'rev-list', - `${mostRecentTag}..HEAD`, - ]); - const commits = await getCommits(commitsHashesSinceLastRelease); - - const loggedPrNumbers = getAllLoggedPrNumbers(changelog); - const newCommits = commits.filter( - ({ prNumber }) => !loggedPrNumbers.includes(prNumber), - ); - - const hasUnreleasedChanges = changelog.getUnreleasedChanges().length !== 0; - if ( - newCommits.length === 0 && - (!isReleaseCandidate || hasUnreleasedChanges) - ) { - return undefined; - } - - // Ensure release header exists, if necessary - if ( - isReleaseCandidate && - !changelog - .getReleases() - .find((release) => release.version === currentVersion) - ) { - changelog.addRelease({ version: currentVersion }); - } - - if (isReleaseCandidate && hasUnreleasedChanges) { - changelog.migrateUnreleasedChangesToRelease(currentVersion); - } - - const newChangeEntries = newCommits.map(({ prNumber, description }) => { - if (prNumber) { - const prefix = `[#${prNumber}](${repoUrl}/pull/${prNumber})`; - return `${prefix}: ${description}`; - } - return description; - }); - - for (const description of newChangeEntries.reverse()) { - changelog.addChange({ - version: isReleaseCandidate ? currentVersion : undefined, - category: changeCategories.Uncategorized, - description, - }); - } - - return changelog.toString(); -} - -module.exports = { updateChangelog }; diff --git a/development/lib/runCommand.js b/development/lib/run-command.js similarity index 57% rename from development/lib/runCommand.js rename to development/lib/run-command.js index 2d92ffe99..08bffcc1b 100644 --- a/development/lib/runCommand.js +++ b/development/lib/run-command.js @@ -76,4 +76,59 @@ async function runCommand(command, args) { return output; } -module.exports = runCommand; +/** + * Run a command to using the system shell. + * + * This will run a command with the specified arguments, and resolve when the + * process has exited. The STDIN, STDOUT and STDERR streams are inherited, + * letting the command take over completely until it completes. The success or + * failure of the process is determined entirely by the exit code; STDERR + * output is not used to indicate failure. + * + * @param {string} command - The command to run + * @param {Array} [args] - The arguments to pass to the command + */ +async function runInShell(command, args) { + let errorSignal; + let errorCode; + const internalError = new Error('Internal'); + try { + await new Promise((resolve, reject) => { + const childProcess = spawn(command, args, { + encoding: 'utf8', + stdio: 'inherit', + }); + + childProcess.once('exit', (code, signal) => { + if (code === 0) { + return resolve(); + } + errorCode = code; + errorSignal = signal; + return reject(internalError); + }); + }); + } catch (error) { + /** + * The error is re-thrown here in an `async` context to preserve the stack trace. If this was + * was thrown inside the Promise constructor, the stack trace would show a few frames of + * Node.js internals then end, without indicating where `runInShell` was called. + */ + if (error === internalError) { + let errorMessage; + if (errorCode !== null && errorSignal !== null) { + errorMessage = `Terminated by signal '${errorSignal}'; exited with code '${errorCode}'`; + } else if (errorSignal !== null) { + errorMessage = `Terminaled by signal '${errorSignal}'`; + } else if (errorCode === null) { + errorMessage = 'Exited with no code or signal'; + } else { + errorMessage = `Exited with code '${errorCode}'`; + } + const improvedError = new Error(errorMessage); + throw improvedError; + } + } +} + +module.exports = { runCommand, runInShell }; diff --git a/development/sentry-publish.js b/development/sentry-publish.js index 6fee0f950..81fa58790 100644 --- a/development/sentry-publish.js +++ b/development/sentry-publish.js @@ -1,9 +1,6 @@ #!/usr/bin/env node -const childProcess = require('child_process'); -const pify = require('pify'); - -const exec = pify(childProcess.exec, { multiArgs: true }); const VERSION = require('../dist/chrome/manifest.json').version; // eslint-disable-line import/no-unresolved +const { runCommand, runInShell } = require('./lib/run-command'); start().catch((error) => { console.error(error); @@ -11,6 +8,12 @@ start().catch((error) => { }); async function start() { + if (!process.env.SENTRY_ORG) { + throw new Error('Missing required "SENTRY_ORG" environment variable'); + } else if (!process.env.SENTRY_PROJECT) { + throw new Error('Missing required "SENTRY_PROJECT" environment variable'); + } + const authWorked = await checkIfAuthWorks(); if (!authWorked) { throw new Error(`Sentry auth failed`); @@ -25,15 +28,17 @@ async function start() { } else { // create sentry release console.log(`creating Sentry release for "${VERSION}"...`); - await exec( - `sentry-cli releases --org 'metamask' --project 'metamask' new ${VERSION}`, - ); + await runCommand('sentry-cli', ['releases', 'new', VERSION]); console.log( `removing any existing files from Sentry release "${VERSION}"...`, ); - await exec( - `sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} delete --all`, - ); + await runCommand('sentry-cli', [ + 'releases', + 'files', + VERSION, + 'delete', + '--all', + ]); } // check if version has artifacts or not @@ -47,40 +52,43 @@ async function start() { } // upload sentry source and sourcemaps - await exec(`./development/sentry-upload-artifacts.sh --release ${VERSION}`); + await runInShell('./development/sentry-upload-artifacts.sh', [ + '--release', + VERSION, + ]); } async function checkIfAuthWorks() { - const itWorked = await doesNotFail(async () => { - await exec( - `sentry-cli releases --org 'metamask' --project 'metamask' list`, - ); - }); - return itWorked; + return await doesNotFail(() => + runCommand('sentry-cli', ['releases', 'list']), + ); } async function checkIfVersionExists() { - const versionAlreadyExists = await doesNotFail(async () => { - await exec( - `sentry-cli releases --org 'metamask' --project 'metamask' info ${VERSION}`, - ); - }); - return versionAlreadyExists; + return await doesNotFail(() => + runCommand('sentry-cli', ['releases', 'info', VERSION]), + ); } async function checkIfVersionHasArtifacts() { - const artifacts = await exec( - `sentry-cli releases --org 'metamask' --project 'metamask' files ${VERSION} list`, - ); + const [artifact] = await runCommand('sentry-cli', [ + 'releases', + 'files', + VERSION, + 'list', + ]); // When there's no artifacts, we get a response from the shell like this ['', ''] - return artifacts[0] && artifacts[0].length > 0; + return artifact?.length > 0; } async function doesNotFail(asyncFn) { try { await asyncFn(); return true; - } catch (err) { - return false; + } catch (error) { + if (error.message === `Exited with code '1'`) { + return false; + } + throw error; } } diff --git a/development/sentry-upload-artifacts.sh b/development/sentry-upload-artifacts.sh index 3a605eff2..673e1dd73 100755 --- a/development/sentry-upload-artifacts.sh +++ b/development/sentry-upload-artifacts.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -set -x set -e set -u set -o pipefail @@ -30,7 +29,7 @@ EOF function upload_sourcemaps { local release="${1}"; shift - sentry-cli releases --org 'metamask' --project 'metamask' files "${release}" upload-sourcemaps ./dist/chrome/*.js ./dist/sourcemaps/ --rewrite --url-prefix 'metamask' + sentry-cli releases files "${release}" upload-sourcemaps ./dist/chrome/*.js ./dist/sourcemaps/ --rewrite --url-prefix 'metamask' } function main { @@ -62,6 +61,12 @@ function main { if [[ -z $release ]] then die 'Required parameter "release" missing; either include parameter or set VERSION environment variable' + elif [[ -z $SENTRY_ORG ]] + then + die 'Required environment variable "SENTRY_ORG" missing' + elif [[ -z $SENTRY_PROJECT ]] + then + die 'Required environment variable "SENTRY_PROJECT" missing' fi printf 'uploading source files and sourcemaps for Sentry release "%s"...\n' "${release}" diff --git a/development/verify-locale-strings.js b/development/verify-locale-strings.js index 2e7b7584b..a37a7936e 100644 --- a/development/verify-locale-strings.js +++ b/development/verify-locale-strings.js @@ -171,8 +171,8 @@ async function verifyEnglishLocale() { // In the meantime we'll use glob to specify which paths can be strict searched // and gradually phase out the key based search const globsToStrictSearch = [ - 'ui/app/components/app/metamask-translation/*.js', - 'ui/app/pages/confirmation/templates/*.js', + 'ui/components/app/metamask-translation/*.js', + 'ui/pages/confirmation/templates/*.js', ]; const testGlob = '**/*.test.js'; const javascriptFiles = await glob(['ui/**/*.js', 'shared/**/*.js'], { diff --git a/jest.config.js b/jest.config.js index df0558fcf..e186bc814 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ module.exports = { restoreMocks: true, coverageDirectory: 'jest-coverage/', - collectCoverageFrom: ['/ui/app/**/swaps/**'], + collectCoverageFrom: ['/ui/**/swaps/**'], coveragePathIgnorePatterns: ['.stories.js', '.snap'], coverageThreshold: { global: { diff --git a/jsconfig.json b/jsconfig.json index d0e8e66fc..b0cc155d5 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,3 +1,14 @@ { - "exclude": ["node:console"] + "exclude": [ + "*.log", + "builds", + "coverage", + "dist", + "docs", + "lavamoat", + "node:console", + "node_modules", + "patches", + "test-artifacts" + ] } diff --git a/lavamoat/node/policy.json b/lavamoat/node/policy.json index 56892f1bf..e744f1175 100644 --- a/lavamoat/node/policy.json +++ b/lavamoat/node/policy.json @@ -223,6 +223,11 @@ "js-tokens": true } }, + "@babel/parser": { + "globals": { + "BigInt": true + } + }, "@babel/plugin-proposal-async-generator-functions": { "packages": { "@babel/core": true, @@ -869,6 +874,7 @@ }, "acorn": { "globals": { + "BigInt": true, "define": true } }, @@ -878,6 +884,9 @@ } }, "acorn-node": { + "globals": { + "BigInt": true + }, "packages": { "acorn": true, "acorn-dynamic-import": true, @@ -950,6 +959,16 @@ "buffer-equal": true } }, + "are-we-there-yet": { + "builtin": { + "events.EventEmitter": true, + "util.inherits": true + }, + "packages": { + "delegates": true, + "readable-stream": true + } + }, "arr-diff": { "packages": { "arr-flatten": true, @@ -1302,6 +1321,7 @@ "anymatch": true, "async-each": true, "braces": true, + "fsevents": true, "glob-parent": true, "inherits": true, "is-binary-path": true, @@ -1553,6 +1573,16 @@ "through2": true } }, + "detect-libc": { + "builtin": { + "child_process.spawnSync": true, + "fs.readdirSync": true, + "os.platform": true + }, + "globals": { + "process.env": true + } + }, "detective": { "packages": { "acorn-node": true, @@ -1640,7 +1670,10 @@ "es-abstract": { "globals": { "AggregateError": true, + "Atomics": true, + "BigInt": true, "FinalizationRegistry": true, + "SharedArrayBuffer": true, "WeakRef": true }, "packages": { @@ -1993,6 +2026,45 @@ "process.version": true } }, + "fsevents": { + "builtin": { + "events.EventEmitter": true, + "fs.stat": true, + "path.join": true, + "util.inherits": true + }, + "globals": { + "__dirname": true, + "process.nextTick": true, + "process.platform": true, + "setImmediate": true + }, + "native": true, + "packages": { + "node-pre-gyp": true + } + }, + "gauge": { + "builtin": { + "util.format": true + }, + "globals": { + "clearInterval": true, + "process": true, + "setImmediate": true, + "setInterval": true + }, + "packages": { + "aproba": true, + "console-control-strings": true, + "has-unicode": true, + "object-assign": true, + "signal-exit": true, + "string-width": true, + "strip-ansi": true, + "wide-align": true + } + }, "get-assigned-identifiers": { "builtin": { "assert.equal": true @@ -2373,6 +2445,16 @@ "process.argv": true } }, + "has-unicode": { + "builtin": { + "os.type": true + }, + "globals": { + "process.env.LANG": true, + "process.env.LC_ALL": true, + "process.env.LC_CTYPE": true + } + }, "has-value": { "packages": { "get-value": true, @@ -2526,6 +2608,11 @@ "is-plain-object": true } }, + "is-fullwidth-code-point": { + "packages": { + "number-is-nan": true + } + }, "is-glob": { "packages": { "is-extglob": true @@ -2910,6 +2997,56 @@ "setTimeout": true } }, + "node-pre-gyp": { + "builtin": { + "events.EventEmitter": true, + "fs.existsSync": true, + "fs.readFileSync": true, + "fs.renameSync": true, + "path.dirname": true, + "path.existsSync": true, + "path.join": true, + "path.resolve": true, + "url.parse": true, + "url.resolve": true, + "util.inherits": true + }, + "globals": { + "__dirname": true, + "console.log": true, + "process.arch": true, + "process.cwd": true, + "process.env": true, + "process.platform": true, + "process.version.substr": true, + "process.versions": true + }, + "packages": { + "detect-libc": true, + "nopt": true, + "npmlog": true, + "rimraf": true, + "semver": true + } + }, + "nopt": { + "builtin": { + "path": true, + "stream.Stream": true, + "url": true + }, + "globals": { + "console": true, + "process.argv": true, + "process.env.DEBUG_NOPT": true, + "process.env.NOPT_DEBUG": true, + "process.platform": true + }, + "packages": { + "abbrev": true, + "osenv": true + } + }, "normalize-path": { "packages": { "remove-trailing-separator": true @@ -2925,6 +3062,22 @@ "once": true } }, + "npmlog": { + "builtin": { + "events.EventEmitter": true, + "util": true + }, + "globals": { + "process.nextTick": true, + "process.stderr": true + }, + "packages": { + "are-we-there-yet": true, + "console-control-strings": true, + "gauge": true, + "set-blocking": true + } + }, "object-copy": { "packages": { "copy-descriptor": true, @@ -2937,6 +3090,7 @@ "util.inspect": true }, "globals": { + "BigInt": true, "HTMLElement": true } }, @@ -2991,6 +3145,54 @@ "readable-stream": true } }, + "os-homedir": { + "builtin": { + "os.homedir": true + }, + "globals": { + "process.env": true, + "process.getuid": true, + "process.platform": true + } + }, + "os-tmpdir": { + "globals": { + "process.env.SystemRoot": true, + "process.env.TEMP": true, + "process.env.TMP": true, + "process.env.TMPDIR": true, + "process.env.windir": true, + "process.platform": true + } + }, + "osenv": { + "builtin": { + "child_process.exec": true, + "path": true + }, + "globals": { + "process.env.COMPUTERNAME": true, + "process.env.ComSpec": true, + "process.env.EDITOR": true, + "process.env.HOSTNAME": true, + "process.env.PATH": true, + "process.env.PROMPT": true, + "process.env.PS1": true, + "process.env.Path": true, + "process.env.SHELL": true, + "process.env.USER": true, + "process.env.USERDOMAIN": true, + "process.env.USERNAME": true, + "process.env.VISUAL": true, + "process.env.path": true, + "process.nextTick": true, + "process.platform": true + }, + "packages": { + "os-homedir": true, + "os-tmpdir": true + } + }, "parent-module": { "packages": { "callsites": true @@ -3573,6 +3775,12 @@ "process": true } }, + "set-blocking": { + "globals": { + "process.stderr": true, + "process.stdout": true + } + }, "set-value": { "packages": { "extend-shallow": true, @@ -3766,6 +3974,7 @@ }, "string-width": { "packages": { + "code-point-at": true, "emoji-regex": true, "is-fullwidth-code-point": true, "strip-ansi": true @@ -4322,6 +4531,11 @@ "isexe": true } }, + "wide-align": { + "packages": { + "string-width": true + } + }, "write": { "builtin": { "fs.createWriteStream": true, diff --git a/package.json b/package.json index ead85680f..294f3025d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,11 @@ { "name": "metamask-crx", - "version": "0.0.0", + "version": "9.5.4", "private": true, + "repository": { + "type": "git", + "url": "https://github.com/MetaMask/metamask-extension.git" + }, "scripts": { "setup": "yarn install && yarn setup:postinstall", "setup:postinstall": "yarn patch-package && yarn allow-scripts", @@ -49,7 +53,7 @@ "verify-locales": "node ./development/verify-locale-strings.js", "verify-locales:fix": "node ./development/verify-locale-strings.js --fix", "mozilla-lint": "addons-linter dist/firefox", - "watch": "mocha --watch --require test/env.js --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\" \"shared/**/*.test.js\"", + "watch": "mocha --watch --require test/env.js --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/**/*.test.js\" \"shared/**/*.test.js\"", "devtools:react": "react-devtools", "devtools:redux": "remotedev --hostname=localhost --port=8000", "start:dev": "concurrently -k -n build,react,redux yarn:start yarn:devtools:react yarn:devtools:redux", @@ -57,7 +61,7 @@ "storybook": "start-storybook -p 6006 -c .storybook --static-dir ./app ./storybook/images", "storybook:build": "build-storybook -c .storybook -o storybook-build --static-dir ./app ./storybook/images", "storybook:deploy": "storybook-to-ghpages --existing-output-dir storybook-build --remote storybook --branch master", - "update-changelog": "node ./development/auto-changelog.js", + "update-changelog": "auto-changelog update", "generate:migration": "./development/generate-migration.sh", "lavamoat:auto": "lavamoat ./development/build/index.js --writeAutoPolicy", "lavamoat:debug": "lavamoat ./development/build/index.js --writeAutoPolicyDebug" @@ -92,14 +96,15 @@ "@lavamoat/preinstall-always-fail": "^1.0.0", "@material-ui/core": "^4.11.0", "@metamask/contract-metadata": "^1.22.0", - "@metamask/controllers": "^6.2.1", - "@metamask/eth-ledger-bridge-keyring": "^0.3.0", + "@metamask/controllers": "^9.0.0", + "@metamask/eth-ledger-bridge-keyring": "^0.5.0", "@metamask/eth-token-tracker": "^3.0.1", - "@metamask/etherscan-link": "^2.0.0", - "@metamask/inpage-provider": "^8.0.4", + "@metamask/etherscan-link": "^2.1.0", "@metamask/jazzicon": "^2.0.0", "@metamask/logo": "^2.5.0", "@metamask/obs-store": "^5.0.0", + "@metamask/post-message-stream": "^4.0.0", + "@metamask/providers": "^8.1.1", "@popperjs/core": "^2.4.0", "@reduxjs/toolkit": "^1.5.0", "@sentry/browser": "^5.26.0", @@ -159,7 +164,6 @@ "nonce-tracker": "^1.0.0", "obj-multiplex": "^1.0.0", "pify": "^5.0.0", - "post-message-stream": "^3.0.0", "promise-to-callback": "^1.0.0", "prop-types": "^15.6.1", "pubnub": "4.27.3", @@ -206,7 +210,8 @@ "@babel/preset-env": "^7.5.5", "@babel/preset-react": "^7.0.0", "@babel/register": "^7.5.5", - "@lavamoat/allow-scripts": "^1.0.4", + "@lavamoat/allow-scripts": "^1.0.6", + "@metamask/auto-changelog": "^2.1.0", "@metamask/eslint-config": "^6.0.0", "@metamask/eslint-config-jest": "^6.0.0", "@metamask/eslint-config-mocha": "^6.0.0", @@ -266,6 +271,7 @@ "gulp-terser-js": "^5.2.2", "gulp-watch": "^5.0.1", "gulp-zip": "^4.0.0", + "history": "^5.0.0", "jest": "^26.6.3", "jsdom": "^11.2.0", "koa": "^2.7.0", @@ -330,7 +336,8 @@ "gc-stats": false, "github:assemblyscript/assemblyscript": false, "tiny-secp256k1": false, - "@lavamoat/preinstall-always-fail": false + "@lavamoat/preinstall-always-fail": false, + "fsevents": false } } } diff --git a/shared/constants/app.js b/shared/constants/app.js index 93c843846..7e1b66572 100644 --- a/shared/constants/app.js +++ b/shared/constants/app.js @@ -28,5 +28,5 @@ export const MESSAGE_TYPE = { WATCH_ASSET: 'wallet_watchAsset', WATCH_ASSET_LEGACY: 'metamask_watchAsset', ADD_ETHEREUM_CHAIN: 'wallet_addEthereumChain', - SWITCH_ETHEREUM_CHAIN: 'metamask_switchEthereumChain', + SWITCH_ETHEREUM_CHAIN: 'wallet_switchEthereumChain', }; diff --git a/shared/constants/swaps.js b/shared/constants/swaps.js index 3f345542b..2843821e5 100644 --- a/shared/constants/swaps.js +++ b/shared/constants/swaps.js @@ -12,6 +12,7 @@ export const QUOTES_EXPIRED_ERROR = 'quotes-expired'; export const SWAP_FAILED_ERROR = 'swap-failed-error'; export const ERROR_FETCHING_QUOTES = 'error-fetching-quotes'; export const QUOTES_NOT_AVAILABLE_ERROR = 'quotes-not-avilable'; +export const CONTRACT_DATA_DISABLED_ERROR = 'contract-data-disabled'; export const OFFLINE_FOR_MAINTENANCE = 'offline-for-maintenance'; export const SWAPS_FETCH_ORDER_CONFLICT = 'swaps-fetch-order-conflict'; diff --git a/shared/modules/fetch-with-timeout.test.js b/shared/modules/fetch-with-timeout.test.js index a7b1daa1a..3b9ce1552 100644 --- a/shared/modules/fetch-with-timeout.test.js +++ b/shared/modules/fetch-with-timeout.test.js @@ -1,4 +1,4 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import nock from 'nock'; import getFetchWithTimeout from './fetch-with-timeout'; diff --git a/shared/modules/tests/transaction.utils.test.js b/shared/modules/tests/transaction.utils.test.js deleted file mode 100644 index 2aac76828..000000000 --- a/shared/modules/tests/transaction.utils.test.js +++ /dev/null @@ -1,96 +0,0 @@ -import assert from 'assert'; -import { - MAINNET_CHAIN_ID, - MAINNET_NETWORK_ID, - ROPSTEN_CHAIN_ID, - ROPSTEN_NETWORK_ID, -} from '../../constants/network'; -import { getBlockExplorerUrlForTx } from '../transaction.utils'; - -const tests = [ - { - expected: 'https://etherscan.io/tx/0xabcd', - transaction: { - metamaskNetworkId: MAINNET_NETWORK_ID, - hash: '0xabcd', - }, - }, - { - expected: 'https://ropsten.etherscan.io/tx/0xdef0', - transaction: { - metamaskNetworkId: ROPSTEN_NETWORK_ID, - hash: '0xdef0', - }, - rpcPrefs: {}, - }, - { - // test handling of `blockExplorerUrl` for a custom RPC - expected: 'https://block.explorer/tx/0xabcd', - transaction: { - metamaskNetworkId: '31', - hash: '0xabcd', - }, - rpcPrefs: { - blockExplorerUrl: 'https://block.explorer', - }, - }, - { - // test handling of trailing `/` in `blockExplorerUrl` for a custom RPC - expected: 'https://another.block.explorer/tx/0xdef0', - transaction: { - networkId: '33', - hash: '0xdef0', - }, - rpcPrefs: { - blockExplorerUrl: 'https://another.block.explorer/', - }, - }, - { - expected: 'https://etherscan.io/tx/0xabcd', - transaction: { - chainId: MAINNET_CHAIN_ID, - hash: '0xabcd', - }, - }, - { - expected: 'https://ropsten.etherscan.io/tx/0xdef0', - transaction: { - chainId: ROPSTEN_CHAIN_ID, - hash: '0xdef0', - }, - rpcPrefs: {}, - }, - { - // test handling of `blockExplorerUrl` for a custom RPC - expected: 'https://block.explorer/tx/0xabcd', - transaction: { - chainId: '0x1f', - hash: '0xabcd', - }, - rpcPrefs: { - blockExplorerUrl: 'https://block.explorer', - }, - }, - { - // test handling of trailing `/` in `blockExplorerUrl` for a custom RPC - expected: 'https://another.block.explorer/tx/0xdef0', - transaction: { - chainId: '0x21', - hash: '0xdef0', - }, - rpcPrefs: { - blockExplorerUrl: 'https://another.block.explorer/', - }, - }, -]; - -describe('getBlockExplorerUrlForTx', function () { - tests.forEach((test) => { - it(`should return '${test.expected}' for transaction with hash: '${test.transaction.hash}'`, function () { - assert.strictEqual( - getBlockExplorerUrlForTx(test.transaction, test.rpcPrefs), - test.expected, - ); - }); - }); -}); diff --git a/shared/modules/transaction.utils.js b/shared/modules/transaction.utils.js index 47a0a4334..9e89679f8 100644 --- a/shared/modules/transaction.utils.js +++ b/shared/modules/transaction.utils.js @@ -1,37 +1,6 @@ -import { - createExplorerLink, - createExplorerLinkForChain, -} from '@metamask/etherscan-link'; - export function transactionMatchesNetwork(transaction, chainId, networkId) { if (typeof transaction.chainId !== 'undefined') { return transaction.chainId === chainId; } return transaction.metamaskNetworkId === networkId; } - -/** - * build the etherscan link for a transaction by either chainId, if available - * or metamaskNetworkId as a fallback. If rpcPrefs is provided will build the - * url for the provided blockExplorerUrl. - * - * @param {Object} transaction - a transaction object from state - * @param {string} [transaction.metamaskNetworkId] - network id tx occurred on - * @param {string} [transaction.chainId] - chain id tx occurred on - * @param {string} [transaction.hash] - hash of the transaction - * @param {Object} [rpcPrefs] - the rpc preferences for the current RPC network - * @param {string} [rpcPrefs.blockExplorerUrl] - the block explorer url for RPC - * networks - * @returns {string} - */ -export function getBlockExplorerUrlForTx(transaction, rpcPrefs = {}) { - if (rpcPrefs.blockExplorerUrl) { - return `${rpcPrefs.blockExplorerUrl.replace(/\/+$/u, '')}/tx/${ - transaction.hash - }`; - } - if (transaction.chainId) { - return createExplorerLinkForChain(transaction.hash, transaction.chainId); - } - return createExplorerLink(transaction.hash, transaction.metamaskNetworkId); -} diff --git a/shared/notifications/index.js b/shared/notifications/index.js index ea1f31706..ee5aabbe5 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -10,14 +10,22 @@ export const UI_NOTIFICATIONS = { placeImageBelowDescription: true, }, }, - 2: { - id: 2, - date: '2020-08-31', - }, 3: { id: 3, date: '2021-03-08', }, + 4: { + id: 4, + date: '2021-05-11', + image: { + src: 'images/source-logos-bsc.svg', + width: '100%', + }, + }, + 5: { + id: 5, + date: '2021-05-18', + }, }; export const getTranslatedUINoficiations = (t, locale) => { @@ -31,15 +39,6 @@ export const getTranslatedUINoficiations = (t, locale) => { new Date(UI_NOTIFICATIONS[1].date), ), }, - 2: { - ...UI_NOTIFICATIONS[2], - title: t('notifications2Title'), - description: t('notifications2Description'), - actionText: t('notifications2ActionText'), - date: new Intl.DateTimeFormat(formattedLocale).format( - new Date(UI_NOTIFICATIONS[2].date), - ), - }, 3: { ...UI_NOTIFICATIONS[3], title: t('notifications3Title'), @@ -49,5 +48,23 @@ export const getTranslatedUINoficiations = (t, locale) => { new Date(UI_NOTIFICATIONS[3].date), ), }, + 4: { + ...UI_NOTIFICATIONS[4], + title: t('notifications4Title'), + description: t('notifications4Description'), + actionText: t('notifications4ActionText'), + date: new Intl.DateTimeFormat(locale).format( + new Date(UI_NOTIFICATIONS[4].date), + ), + }, + 5: { + ...UI_NOTIFICATIONS[5], + title: t('walletSeed'), + description: t('notifications5Description'), + actionText: t('notifications3ActionText'), + date: new Intl.DateTimeFormat(locale).format( + new Date(UI_NOTIFICATIONS[5].date), + ), + }, }; }; diff --git a/test/data/mock-state.json b/test/data/mock-state.json index 412892d9a..caaa378d8 100644 --- a/test/data/mock-state.json +++ b/test/data/mock-state.json @@ -15,6 +15,12 @@ "provider": { "chainId": "0x4" }, + "keyrings": [ + { + "type": "Ledger Hardware", + "accounts": ["0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc"] + } + ], "identities": { "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc": { "address": "0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc", diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index e53e3a922..abf7e220c 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -55,10 +55,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index a88a31a74..4f3e724af 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -45,10 +45,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json new file mode 100644 index 000000000..df646bb0d --- /dev/null +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -0,0 +1,150 @@ +{ + "data": { + "AppStateController": { + "mkrMigrationReminderTimestamp": null + }, + "CachedBalancesController": { + "cachedBalances": { + "4": {} + } + }, + "CurrencyController": { + "conversionDate": 1575697244.188, + "conversionRate": 149.61, + "currentCurrency": "usd", + "nativeCurrency": "ETH" + }, + "IncomingTransactionsController": { + "incomingTransactions": {}, + "incomingTxLastFetchedBlocksByNetwork": { + "goerli": null, + "kovan": null, + "mainnet": null, + "rinkeby": 5570536 + } + }, + "KeyringController": { + "vault": "{\"data\":\"s6TpYjlUNsn7ifhEFTkuDGBUM1GyOlPrim7JSjtfIxgTt8/6MiXgiR/CtFfR4dWW2xhq85/NGIBYEeWrZThGdKGarBzeIqBfLFhw9n509jprzJ0zc2Rf+9HVFGLw+xxC4xPxgCS0IIWeAJQ+XtGcHmn0UZXriXm8Ja4kdlow6SWinB7sr/WM3R0+frYs4WgllkwggDf2/Tv6VHygvLnhtzp6hIJFyTjh+l/KnyJTyZW1TkZhDaNDzX3SCOHT\",\"iv\":\"FbeHDAW5afeWNORfNJBR0Q==\",\"salt\":\"TxZ+WbCW6891C9LK/hbMAoUsSEW1E8pyGLVBU6x5KR8=\"}" + }, + "NetworkController": { + "network": "1337", + "provider": { + "nickname": "Localhost 8545", + "rpcUrl": "http://localhost:8545", + "chainId": "0x539", + "ticker": "ETH", + "type": "rpc" + } + }, + "NotificationController": { + "notifications": { + "1": { + "isShown": true + }, + "3": { + "isShown": true + }, + "5": { + "isShown": true + } + } + }, + "OnboardingController": { + "onboardingTabs": {}, + "seedPhraseBackedUp": false + }, + "PermissionsMetadata": { + "domainMetadata": { + "metamask.github.io": { + "icon": null, + "name": "M E T A M A S K M E S H T E S T" + } + }, + "permissionsHistory": {}, + "permissionsLog": [ + { + "id": 746677923, + "method": "eth_accounts", + "methodType": "restricted", + "origin": "metamask.github.io", + "request": { + "id": 746677923, + "jsonrpc": "2.0", + "method": "eth_accounts", + "origin": "metamask.github.io", + "params": [] + }, + "requestTime": 1575697241368, + "response": { + "id": 746677923, + "jsonrpc": "2.0", + "result": [] + }, + "responseTime": 1575697241370, + "success": true + } + ] + }, + "PreferencesController": { + "frequentRpcListDetail": [ + { + "rpcUrl": "http://127.0.0.1:8545/1", + "chainId": "0x539", + "ticker": "ETH", + "nickname": "http://127.0.0.1:8545/1", + "rpcPrefs": {} + }, + { + "rpcUrl": "http://127.0.0.1:8545/2", + "chainId": "0x539", + "ticker": "ETH", + "nickname": "http://127.0.0.1:8545/2", + "rpcPrefs": {} + } + ], + "accountTokens": { + "0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { + "rinkeby": [], + "ropsten": [] + } + }, + "assetImages": {}, + "completedOnboarding": true, + "currentLocale": "en", + "featureFlags": { + "showIncomingTransactions": true, + "transactionTime": false + }, + "firstTimeFlowType": "create", + "forgottenPassword": false, + "identities": { + "0x5cfe73b6021e818b776b421b1c4db2474086a7e1": { + "address": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", + "name": "Account 1" + } + }, + "knownMethodData": {}, + "lostIdentities": {}, + "metaMetricsId": null, + "metaMetricsSendCount": 0, + "participateInMetaMetrics": false, + "preferences": { + "useNativeCurrencyAsPrimaryCurrency": true + }, + "selectedAddress": "0x5cfe73b6021e818b776b421b1c4db2474086a7e1", + "suggestedTokens": {}, + "tokens": [], + "useBlockie": false, + "useNonceField": false, + "usePhishDetect": true + }, + "config": {}, + "firstTimeInfo": { + "date": 1575697234195, + "version": "7.7.0" + } + }, + "meta": { + "version": 40 + } +} diff --git a/test/e2e/fixtures/import-ui/state.json b/test/e2e/fixtures/import-ui/state.json index 350ed8848..380d28b22 100644 --- a/test/e2e/fixtures/import-ui/state.json +++ b/test/e2e/fixtures/import-ui/state.json @@ -96,10 +96,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index a3d51e5d5..fc3ea0a4f 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -41,10 +41,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index 22d76151b..d0ddfd0f9 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -41,10 +41,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index 2fa9931c5..91e3553d2 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -45,10 +45,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index c5c548f4c..228cf7004 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -42,10 +42,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/fixtures/threebox-enabled/state.json b/test/e2e/fixtures/threebox-enabled/state.json index 8bac5f889..5908d0a25 100644 --- a/test/e2e/fixtures/threebox-enabled/state.json +++ b/test/e2e/fixtures/threebox-enabled/state.json @@ -52,10 +52,10 @@ "1": { "isShown": true }, - "2": { + "3": { "isShown": true }, - "3": { + "5": { "isShown": true } } diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js index 78ed5f59d..8a8fcbf21 100644 --- a/test/e2e/metamask-ui.spec.js +++ b/test/e2e/metamask-ui.spec.js @@ -1,4 +1,4 @@ -const assert = require('assert'); +const { strict: assert } = require('assert'); const enLocaleMessages = require('../../app/_locales/en/messages.json'); const { tinyDelayMs, regularDelayMs, largeDelayMs } = require('./helpers'); @@ -83,7 +83,12 @@ describe('MetaMask', function () { let seedPhrase; - it('reveals the seed phrase', async function () { + it('renders the Secret Recovery Phrase intro screen', async function () { + await driver.clickElement('.seed-phrase-intro__left button'); + await driver.delay(regularDelayMs); + }); + + it('reveals the Secret Recovery Phrase', async function () { const byRevealButton = '.reveal-seed-phrase__secret-blocker .reveal-seed-phrase__reveal-button'; await driver.findElement(byRevealButton); @@ -111,7 +116,7 @@ describe('MetaMask', function () { await driver.delay(tinyDelayMs); } - it('can retype the seed phrase', async function () { + it('can retype the Secret Recovery Phrase', async function () { const words = seedPhrase.split(' '); for (const word of words) { @@ -213,7 +218,7 @@ describe('MetaMask', function () { }); }); - describe('Import seed phrase', function () { + describe('Import Secret Recovery Phrase', function () { it('logs out of the vault', async function () { await driver.clickElement('.account-menu__icon'); await driver.delay(regularDelayMs); @@ -226,11 +231,14 @@ describe('MetaMask', function () { await driver.delay(regularDelayMs); }); - it('imports seed phrase', async function () { + it('imports Secret Recovery Phrase', async function () { const restoreSeedLink = await driver.findClickableElement( '.unlock-page__link--import', ); - assert.equal(await restoreSeedLink.getText(), 'import using seed phrase'); + assert.equal( + await restoreSeedLink.getText(), + 'import using Secret Recovery Phrase', + ); await restoreSeedLink.click(); await driver.delay(regularDelayMs); @@ -1112,16 +1120,10 @@ describe('MetaMask', function () { }); it('finds the transaction in the transactions list', async function () { - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .transaction-list-item', - ); - return confirmedTxes.length === 1; - }, 10000); - await driver.waitForSelector( { - css: '.transaction-list-item__primary-currency', + css: + '.transaction-list__completed-transactions .transaction-list-item__primary-currency', text: '-1 TST', }, { timeout: 10000 }, @@ -1214,15 +1216,9 @@ describe('MetaMask', function () { }); it('finds the transaction in the transactions list', async function () { - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .transaction-list-item', - ); - return confirmedTxes.length === 2; - }, 10000); - await driver.waitForSelector({ - css: '.transaction-list-item__primary-currency', + css: + '.transaction-list__completed-transactions .transaction-list-item__primary-currency', text: '-1.5 TST', }); @@ -1230,11 +1226,23 @@ describe('MetaMask', function () { css: '.list-item__heading', text: 'Send TST', }); + }); + + it('checks balance', async function () { + await driver.clickElement({ + text: 'Assets', + tag: 'button', + }); await driver.waitForSelector({ - css: '.token-overview__primary-balance', + css: '.asset-list-item__token-button', text: '7.5 TST', }); + + await driver.clickElement({ + text: 'Activity', + tag: 'button', + }); }); }); @@ -1363,13 +1371,6 @@ describe('MetaMask', function () { }); it('finds the transaction in the transactions list', async function () { - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .transaction-list-item', - ); - return confirmedTxes.length === 3; - }, 10000); - await driver.waitForSelector({ // Select only the heading of the first entry in the transaction list. css: @@ -1422,13 +1423,6 @@ describe('MetaMask', function () { }); it('finds the transaction in the transactions list', async function () { - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .transaction-list-item', - ); - return confirmedTxes.length === 4; - }, 10000); - await driver.waitForSelector({ // Select the heading of the first transaction list item in the // completed transaction list with text matching Send TST @@ -1438,7 +1432,8 @@ describe('MetaMask', function () { }); await driver.waitForSelector({ - css: '.transaction-list-item__primary-currency', + css: + '.transaction-list__completed-transactions .transaction-list-item:first-child .transaction-list-item__primary-currency', text: '-1.5 TST', }); }); @@ -1504,13 +1499,6 @@ describe('MetaMask', function () { }); it('finds the transaction in the transactions list', async function () { - await driver.wait(async () => { - const confirmedTxes = await driver.findElements( - '.transaction-list__completed-transactions .transaction-list-item', - ); - return confirmedTxes.length === 5; - }, 10000); - await driver.waitForSelector({ css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', @@ -1521,6 +1509,10 @@ describe('MetaMask', function () { describe('Hide token', function () { it('hides the token when clicked', async function () { + await driver.clickElement({ text: 'Assets', tag: 'button' }); + + await driver.clickElement({ text: 'TST', tag: 'span' }); + await driver.clickElement('[data-testid="asset-options__button"]'); await driver.clickElement('[data-testid="asset-options__hide"]'); @@ -1565,110 +1557,4 @@ describe('MetaMask', function () { await driver.delay(regularDelayMs); }); }); - - describe('Stores custom RPC history', function () { - it(`creates first custom RPC entry`, async function () { - const rpcUrl = 'http://127.0.0.1:8545/1'; - const chainId = '0x539'; // Ganache default, decimal 1337 - - await driver.clickElement('.network-display'); - await driver.delay(regularDelayMs); - - await driver.clickElement({ text: 'Custom RPC', tag: 'span' }); - await driver.delay(regularDelayMs); - - await driver.findElement('.settings-page__sub-header-text'); - - const customRpcInputs = await driver.findElements('input[type="text"]'); - const rpcUrlInput = customRpcInputs[1]; - const chainIdInput = customRpcInputs[2]; - - await rpcUrlInput.clear(); - await rpcUrlInput.sendKeys(rpcUrl); - - await chainIdInput.clear(); - await chainIdInput.sendKeys(chainId); - - await driver.clickElement('.network-form__footer .btn-secondary'); - await driver.findElement({ text: rpcUrl, tag: 'div' }); - }); - - it(`creates second custom RPC entry`, async function () { - const rpcUrl = 'http://127.0.0.1:8545/2'; - const chainId = '0x539'; // Ganache default, decimal 1337 - - await driver.clickElement('.network-display'); - await driver.delay(regularDelayMs); - - await driver.clickElement({ text: 'Custom RPC', tag: 'span' }); - await driver.delay(regularDelayMs); - - await driver.findElement('.settings-page__sub-header-text'); - - const customRpcInputs = await driver.findElements('input[type="text"]'); - const rpcUrlInput = customRpcInputs[1]; - const chainIdInput = customRpcInputs[2]; - - await rpcUrlInput.clear(); - await rpcUrlInput.sendKeys(rpcUrl); - - await chainIdInput.clear(); - await chainIdInput.sendKeys(chainId); - - await driver.clickElement('.network-form__footer .btn-secondary'); - await driver.findElement({ text: rpcUrl, tag: 'div' }); - }); - - it('selects another provider', async function () { - await driver.clickElement('.network-display'); - await driver.delay(regularDelayMs); - - await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); - await driver.delay(largeDelayMs * 2); - }); - - it('finds all recent RPCs in history', async function () { - await driver.clickElement('.network-display'); - await driver.delay(regularDelayMs); - - // only recent 3 are found and in correct order (most recent at the top) - const customRpcs = await driver.findElements({ - text: 'http://127.0.0.1:8545/', - tag: 'span', - }); - - // click Mainnet to dismiss network dropdown - await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); - - assert.equal(customRpcs.length, 2); - }); - - it('deletes a custom RPC', async function () { - const networkListItems = await driver.findClickableElements( - '.networks-tab__networks-list-name', - ); - const lastNetworkListItem = networkListItems[networkListItems.length - 1]; - await lastNetworkListItem.click(); - await driver.delay(100); - - await driver.clickElement('.btn-danger'); - await driver.delay(regularDelayMs); - - // wait for confirm delete modal to be visible - const confirmDeleteModal = await driver.findVisibleElement('span .modal'); - - await driver.clickElement( - '.button.btn-danger.modal-container__footer-button', - ); - - // wait for confirm delete modal to be removed from DOM. - await confirmDeleteModal.waitForElementState('hidden'); - - const newNetworkListItems = await driver.findElements( - '.networks-tab__networks-list-name', - ); - - assert.equal(networkListItems.length - 1, newNetworkListItems.length); - }); - }); }); diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js new file mode 100644 index 000000000..a827ada2d --- /dev/null +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -0,0 +1,146 @@ +const { strict: assert } = require('assert'); +const { withFixtures } = require('../helpers'); + +describe('Stores custom RPC history', function () { + const ganacheOptions = { + accounts: [ + { + secretKey: + '0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', + balance: 25000000000000000000, + }, + ], + }; + it(`creates first custom RPC entry`, 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); + + const rpcUrl = 'http://127.0.0.1:8545/1'; + const chainId = '0x539'; // Ganache default, decimal 1337 + + await driver.clickElement('.network-display'); + + await driver.clickElement({ text: 'Custom RPC', tag: 'span' }); + + await driver.findElement('.settings-page__sub-header-text'); + + const customRpcInputs = await driver.findElements('input[type="text"]'); + const rpcUrlInput = customRpcInputs[1]; + const chainIdInput = customRpcInputs[2]; + + await rpcUrlInput.clear(); + await rpcUrlInput.sendKeys(rpcUrl); + + await chainIdInput.clear(); + await chainIdInput.sendKeys(chainId); + + await driver.clickElement('.network-form__footer .btn-secondary'); + await driver.findElement({ text: rpcUrl, tag: 'div' }); + }, + ); + }); + + it('selects another provider', 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); + + await driver.clickElement('.network-display'); + + await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); + }, + ); + }); + + it('finds all recent RPCs in history', async function () { + await withFixtures( + { + fixtures: 'custom-rpc', + 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); + + await driver.clickElement('.network-display'); + + // only recent 3 are found and in correct order (most recent at the top) + const customRpcs = await driver.findElements({ + text: 'http://127.0.0.1:8545/', + tag: 'span', + }); + + // click Mainnet to dismiss network dropdown + await driver.clickElement({ text: 'Ethereum Mainnet', tag: 'span' }); + + assert.equal(customRpcs.length, 2); + }, + ); + }); + + it('deletes a custom RPC', async function () { + await withFixtures( + { + fixtures: 'custom-rpc', + 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); + + await driver.clickElement('.network-display'); + + await driver.clickElement({ text: 'Custom RPC', tag: 'span' }); + + // cancel new custom rpc + await driver.clickElement('.network-form__footer button.btn-default'); + + const networkListItems = await driver.findClickableElements( + '.networks-tab__networks-list-name', + ); + const lastNetworkListItem = + networkListItems[networkListItems.length - 1]; + await lastNetworkListItem.click(); + + await driver.clickElement('.btn-danger'); + + // wait for confirm delete modal to be visible + const confirmDeleteModal = await driver.findVisibleElement( + 'span .modal', + ); + + await driver.clickElement( + '.button.btn-danger.modal-container__footer-button', + ); + + // wait for confirm delete modal to be removed from DOM. + await confirmDeleteModal.waitForElementState('hidden'); + + const newNetworkListItems = await driver.findElements( + '.networks-tab__networks-list-name', + ); + + assert.equal(networkListItems.length - 1, newNetworkListItems.length); + }, + ); + }); +}); diff --git a/test/e2e/tests/from-import-ui.spec.js b/test/e2e/tests/from-import-ui.spec.js index 4a8441937..b8c0abc52 100644 --- a/test/e2e/tests/from-import-ui.spec.js +++ b/test/e2e/tests/from-import-ui.spec.js @@ -3,7 +3,7 @@ const { withFixtures, regularDelayMs } = require('../helpers'); const enLocaleMessages = require('../../../app/_locales/en/messages.json'); describe('Metamask Import UI', function () { - it('Importing wallet using seed phrase', async function () { + it('Importing wallet using Secret Recovery Phrase', async function () { const ganacheOptions = { accounts: [ { @@ -40,9 +40,9 @@ describe('Metamask Import UI', function () { // clicks the "No thanks" option on the metametrics opt-in screen await driver.clickElement('.btn-default'); - // Import seed phrase + // Import Secret Recovery Phrase await driver.fill( - 'input[placeholder="Paste seed phrase from clipboard"]', + 'input[placeholder="Paste Secret Recovery Phrase from clipboard"]', testSeedPhrase, ); @@ -292,7 +292,7 @@ describe('Metamask Import UI', function () { // should open the TREZOR Connect popup await driver.clickElement('.hw-connect__btn:nth-of-type(2)'); - await driver.clickElement({ text: 'Connect', tag: 'button' }); + await driver.clickElement({ text: 'Continue', tag: 'button' }); await driver.waitUntilXWindowHandles(2); const allWindows = await driver.getAllWindowHandles(); assert.equal(allWindows.length, 2); diff --git a/test/e2e/tests/incremental-security.spec.js b/test/e2e/tests/incremental-security.spec.js index 6ecd5580e..a07f44c96 100644 --- a/test/e2e/tests/incremental-security.spec.js +++ b/test/e2e/tests/incremental-security.spec.js @@ -17,7 +17,7 @@ describe('Incremental Security', function () { }, ], }; - it('Back up seed phrase from backup reminder', async function () { + it('Back up Secret Recovery Phrase from backup reminder', async function () { await withFixtures( { dapp: true, @@ -56,7 +56,10 @@ describe('Incremental Security', function () { await driver.clickElement('.first-time-flow__checkbox'); await driver.clickElement('.first-time-flow__form button'); - // skips the seed phrase challenge + // renders the Secret Recovery Phrase intro screen' + await driver.clickElement('.seed-phrase-intro__left button'); + + // skips the Secret Recovery Phrase challenge await driver.clickElement({ text: enLocaleMessages.remindMeLater.message, tag: 'button', @@ -115,7 +118,7 @@ describe('Incremental Security', function () { let balance = await currencyDisplay.getText(); assert.strictEqual(balance, '1'); - // backs up the seed phrase + // backs up the Secret Recovery Phrase // should show a backup reminder const backupReminder = await driver.findElements({ xpath: @@ -126,7 +129,7 @@ describe('Incremental Security', function () { // should take the user to the seedphrase backup screen await driver.clickElement('.home-notification__accept-button'); - // reveals the seed phrase + // reveals the Secret Recovery Phrase await driver.clickElement( '.reveal-seed-phrase__secret-blocker .reveal-seed-phrase__reveal-button', ); @@ -150,7 +153,7 @@ describe('Incremental Security', function () { await driver.delay(tinyDelayMs); } - // can retype the seed phrase + // can retype the Secret Recovery Phrase const words = seedPhrase.split(' '); for (const word of words) { diff --git a/test/e2e/tests/metamask-responsive-ui.spec.js b/test/e2e/tests/metamask-responsive-ui.spec.js index 8627b20d0..a50bdfff9 100644 --- a/test/e2e/tests/metamask-responsive-ui.spec.js +++ b/test/e2e/tests/metamask-responsive-ui.spec.js @@ -42,7 +42,10 @@ describe('Metamask Responsive UI', function () { await driver.clickElement('.first-time-flow__checkbox'); await driver.clickElement('.first-time-flow__form button'); - // reveals the seed phrase + // renders the Secret Recovery Phrase intro screen + await driver.clickElement('.seed-phrase-intro__left button'); + + // reveals the Secret Recovery Phrase await driver.clickElement( '.reveal-seed-phrase__secret-blocker .reveal-seed-phrase__reveal-button', ); @@ -64,7 +67,7 @@ describe('Metamask Responsive UI', function () { await driver.delay(tinyDelayMs); } - // can retype the seed phrase + // can retype the Secret Recovery Phrase const words = seedPhrase.split(' '); for (const word of words) { await clickWordAndWait(word); @@ -103,13 +106,13 @@ describe('Metamask Responsive UI', function () { async ({ driver }) => { await driver.navigate(); - // Import seed phrase + // Import Secret Recovery Phrase const restoreSeedLink = await driver.findClickableElement( '.unlock-page__link--import', ); assert.equal( await restoreSeedLink.getText(), - 'import using seed phrase', + 'import using Secret Recovery Phrase', ); await restoreSeedLink.click(); diff --git a/test/e2e/webdriver/firefox.js b/test/e2e/webdriver/firefox.js index ed90dc256..6d327305a 100644 --- a/test/e2e/webdriver/firefox.js +++ b/test/e2e/webdriver/firefox.js @@ -3,7 +3,7 @@ const os = require('os'); const path = require('path'); const { Builder, By, until } = require('selenium-webdriver'); const firefox = require('selenium-webdriver/firefox'); -const { version } = require('../../../app/manifest/_base.json'); +const { version } = require('../../../package.json'); /** * The prefix for temporary Firefox profiles. All Firefox profiles used for e2e tests diff --git a/test/jest/background.js b/test/jest/background.js index 49a6bdf8f..99d181308 100644 --- a/test/jest/background.js +++ b/test/jest/background.js @@ -1,4 +1,4 @@ -import * as actions from '../../ui/app/store/actions'; +import * as actions from '../../ui/store/actions'; export const setBackgroundConnection = (backgroundConnection = {}) => { actions._setBackgroundConnection(backgroundConnection); diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js index 88d486193..f09999f10 100644 --- a/test/jest/mock-store.js +++ b/test/jest/mock-store.js @@ -24,6 +24,24 @@ export const createSwapsMockStore = () => { '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': 2, '0x1111111111111111111111111111111111111111': 0.1, }, + identities: { + '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825': { + address: '0xfdea65c8e26263f6d9a1b5de9555d2931a33b825', + name: 'Send Account 1', + }, + '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb': { + address: '0xc5b8dbac4c1d3f152cdeb400e2313f309c410acb', + name: 'Send Account 2', + }, + '0x2f8d4a878cfa04a6e60d46362f5644deab66572d': { + address: '0x2f8d4a878cfa04a6e60d46362f5644deab66572d', + name: 'Send Account 3', + }, + '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': { + address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', + name: 'Send Account 4', + }, + }, accounts: { '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': { address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', @@ -35,6 +53,21 @@ export const createSwapsMockStore = () => { }, }, selectedAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', + keyringTypes: ['Simple Key Pair', 'HD Key Tree'], + keyrings: [ + { + type: 'HD Key Tree', + accounts: [ + '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', + 'c5b8dbac4c1d3f152cdeb400e2313f309c410acb', + '2f8d4a878cfa04a6e60d46362f5644deab66572d', + ], + }, + { + type: 'Simple Key Pair', + accounts: ['0xd85a4b6a394794842887b8284293d69163007bbb'], + }, + ], frequentRpcListDetail: [], tokens: [ { diff --git a/test/jest/rendering.js b/test/jest/rendering.js index d215cbc0d..f84ecfe0b 100644 --- a/test/jest/rendering.js +++ b/test/jest/rendering.js @@ -4,8 +4,8 @@ import { render } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; -import { I18nContext, LegacyI18nProvider } from '../../ui/app/contexts/i18n'; -import { getMessage } from '../../ui/app/helpers/utils/i18n-helper'; +import { I18nContext, LegacyI18nProvider } from '../../ui/contexts/i18n'; +import { getMessage } from '../../ui/helpers/utils/i18n-helper'; import * as en from '../../app/_locales/en/messages.json'; export const I18nProvider = (props) => { diff --git a/test/lib/render-helpers.js b/test/lib/render-helpers.js index fc4621015..37c5d6370 100644 --- a/test/lib/render-helpers.js +++ b/test/lib/render-helpers.js @@ -1,13 +1,19 @@ import React, { useMemo } from 'react'; import { Provider } from 'react-redux'; import { render } from '@testing-library/react'; -import { mount } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import { MemoryRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; -import { I18nContext, LegacyI18nProvider } from '../../ui/app/contexts/i18n'; -import { getMessage } from '../../ui/app/helpers/utils/i18n-helper'; +import { I18nContext, LegacyI18nProvider } from '../../ui/contexts/i18n'; +import { getMessage } from '../../ui/helpers/utils/i18n-helper'; import * as en from '../../app/_locales/en/messages.json'; +export function shallowWithContext(jsxComponent) { + return shallow(jsxComponent, { + context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) }, + }); +} + export function mountWithRouter(component, store = {}, pathname = '/') { // Instantiate router context const router = { diff --git a/test/unit-global/balance-formatter.test.js b/test/unit-global/balance-formatter.test.js index cd63ee68f..36c246bfd 100644 --- a/test/unit-global/balance-formatter.test.js +++ b/test/unit-global/balance-formatter.test.js @@ -1,6 +1,6 @@ -import assert from 'assert'; +import { strict as assert } from 'assert'; import currencyFormatter from 'currency-formatter'; -import availableCurrencies from '../../ui/app/helpers/constants/available-conversions.json'; +import availableCurrencies from '../../ui/helpers/constants/available-conversions.json'; describe('currencyFormatting', function () { it('be able to format any infura currency', function (done) { diff --git a/test/unit-global/frozenPromise.test.js b/test/unit-global/frozenPromise.test.js index de2409792..f96af0d2a 100644 --- a/test/unit-global/frozenPromise.test.js +++ b/test/unit-global/frozenPromise.test.js @@ -2,7 +2,7 @@ import './globalPatch'; import 'ses/lockdown'; import '../../app/scripts/runLockdown'; -import assert from 'assert'; /* eslint-disable-line import/first,import/order */ +import { strict as assert } from 'assert'; /* eslint-disable-line import/first,import/order */ describe('Promise global is immutable', function () { it('throws when reassinging promise (syntax 1)', function () { diff --git a/ui/app/__mocks__/react-router-dom.js b/ui/__mocks__/react-router-dom.js similarity index 100% rename from ui/app/__mocks__/react-router-dom.js rename to ui/__mocks__/react-router-dom.js diff --git a/ui/app/components/app/signature-request/signature-request.constants.js b/ui/app/components/app/signature-request/signature-request.constants.js deleted file mode 100644 index 34ac7b40d..000000000 --- a/ui/app/components/app/signature-request/signature-request.constants.js +++ /dev/null @@ -1,3 +0,0 @@ -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../../shared/constants/app'; - -export { ENVIRONMENT_TYPE_NOTIFICATION }; diff --git a/ui/app/pages/create-account/create-account.component.js b/ui/app/pages/create-account/create-account.component.js deleted file mode 100644 index 4eaefce52..000000000 --- a/ui/app/pages/create-account/create-account.component.js +++ /dev/null @@ -1,93 +0,0 @@ -import React, { Component } from 'react'; -import { Switch, Route, matchPath } from 'react-router-dom'; -import PropTypes from 'prop-types'; -import classnames from 'classnames'; -import { - NEW_ACCOUNT_ROUTE, - IMPORT_ACCOUNT_ROUTE, - CONNECT_HARDWARE_ROUTE, -} from '../../helpers/constants/routes'; -import NewAccountCreateForm from './new-account.container'; -import NewAccountImportForm from './import-account'; -import ConnectHardwareForm from './connect-hardware'; - -export default class CreateAccountPage extends Component { - renderTabs() { - const { - history, - location: { pathname }, - } = this.props; - const getClassNames = (path) => - classnames('new-account__tabs__tab', { - 'new-account__tabs__selected': matchPath(pathname, { - path, - exact: true, - }), - }); - - return ( -
-
history.push(NEW_ACCOUNT_ROUTE)} - > - {this.context.t('create')} -
-
history.push(IMPORT_ACCOUNT_ROUTE)} - > - {this.context.t('import')} -
-
history.push(CONNECT_HARDWARE_ROUTE)} - > - {this.context.t('hardware')} -
-
- ); - } - - render() { - return ( -
-
-
- {this.renderTabs()} -
-
-
- - - - - -
-
- ); - } -} - -CreateAccountPage.propTypes = { - location: PropTypes.object, - history: PropTypes.object, -}; - -CreateAccountPage.contextTypes = { - t: PropTypes.func, -}; diff --git a/ui/app/pages/create-account/create-account.test.js b/ui/app/pages/create-account/create-account.test.js deleted file mode 100644 index 0a445f688..000000000 --- a/ui/app/pages/create-account/create-account.test.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import sinon from 'sinon'; -import { mountWithRouter } from '../../../../test/lib/render-helpers'; -import CreateAccountPage from '.'; - -describe('Create Account Page', () => { - let wrapper; - - const props = { - history: { - push: sinon.spy(), - }, - location: { - pathname: '/new-account', - }, - }; - - beforeAll(() => { - wrapper = mountWithRouter(); - }); - - afterEach(() => { - props.history.push.resetHistory(); - }); - - it('clicks create account and routes to new-account path', () => { - const createAccount = wrapper.find('.new-account__tabs__tab').at(0); - createAccount.simulate('click'); - expect(props.history.push.getCall(0).args[0]).toStrictEqual('/new-account'); - }); - - it('clicks import account and routes to import new account path', () => { - const importAccount = wrapper.find('.new-account__tabs__tab').at(1); - importAccount.simulate('click'); - expect(props.history.push.getCall(0).args[0]).toStrictEqual( - '/new-account/import', - ); - }); - - it('clicks connect HD Wallet and routes to connect new account path', () => { - const connectHdWallet = wrapper.find('.new-account__tabs__tab').at(2); - connectHdWallet.simulate('click'); - expect(props.history.push.getCall(0).args[0]).toStrictEqual( - '/new-account/connect', - ); - }); -}); diff --git a/ui/app/components/app/account-list-item/account-list-item-component.test.js b/ui/components/app/account-list-item/account-list-item-component.test.js similarity index 96% rename from ui/app/components/app/account-list-item/account-list-item-component.test.js rename to ui/components/app/account-list-item/account-list-item-component.test.js index 03c038cf4..d8a05ce46 100644 --- a/ui/app/components/app/account-list-item/account-list-item-component.test.js +++ b/ui/components/app/account-list-item/account-list-item-component.test.js @@ -2,10 +2,10 @@ import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import Identicon from '../../ui/identicon'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import AccountListItem from './account-list-item'; -jest.mock('../../../../../shared/modules/hexstring-utils', () => ({ +jest.mock('../../../../shared/modules/hexstring-utils', () => ({ toChecksumHexAddress: jest.fn(() => 'mockCheckSumAddress'), })); diff --git a/ui/app/components/app/account-list-item/account-list-item.js b/ui/components/app/account-list-item/account-list-item.js similarity index 93% rename from ui/app/components/app/account-list-item/account-list-item.js rename to ui/components/app/account-list-item/account-list-item.js index fd1b80bc4..5220dede9 100644 --- a/ui/app/components/app/account-list-item/account-list-item.js +++ b/ui/components/app/account-list-item/account-list-item.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import Identicon from '../../ui/identicon'; import AccountMismatchWarning from '../../ui/account-mismatch-warning/account-mismatch-warning.component'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; export default function AccountListItem({ account, diff --git a/ui/app/components/app/account-list-item/index.js b/ui/components/app/account-list-item/index.js similarity index 100% rename from ui/app/components/app/account-list-item/index.js rename to ui/components/app/account-list-item/index.js diff --git a/ui/app/components/app/account-list-item/index.scss b/ui/components/app/account-list-item/index.scss similarity index 100% rename from ui/app/components/app/account-list-item/index.scss rename to ui/components/app/account-list-item/index.scss diff --git a/ui/app/components/app/account-menu/account-menu.component.js b/ui/components/app/account-menu/account-menu.component.js similarity index 98% rename from ui/app/components/app/account-menu/account-menu.component.js rename to ui/components/app/account-menu/account-menu.component.js index fe3ebffe6..f6c5b75df 100644 --- a/ui/app/components/app/account-menu/account-menu.component.js +++ b/ui/components/app/account-menu/account-menu.component.js @@ -4,8 +4,8 @@ import { debounce } from 'lodash'; import Fuse from 'fuse.js'; import InputAdornment from '@material-ui/core/InputAdornment'; import classnames from 'classnames'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import SiteIcon from '../../ui/site-icon'; import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display'; @@ -78,7 +78,6 @@ export default class AccountMenu extends Component { }; addressFuse = new Fuse([], { - shouldSort: false, threshold: 0.45, location: 0, distance: 100, diff --git a/ui/app/components/app/account-menu/account-menu.container.js b/ui/components/app/account-menu/account-menu.container.js similarity index 100% rename from ui/app/components/app/account-menu/account-menu.container.js rename to ui/components/app/account-menu/account-menu.container.js diff --git a/ui/app/components/app/account-menu/account-menu.test.js b/ui/components/app/account-menu/account-menu.test.js similarity index 98% rename from ui/app/components/app/account-menu/account-menu.test.js rename to ui/components/app/account-menu/account-menu.test.js index 44666899d..fc715ead1 100644 --- a/ui/app/components/app/account-menu/account-menu.test.js +++ b/ui/components/app/account-menu/account-menu.test.js @@ -2,7 +2,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; import { Provider } from 'react-redux'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import AccountMenu from '.'; describe('Account Menu', () => { diff --git a/ui/app/components/app/account-menu/index.js b/ui/components/app/account-menu/index.js similarity index 100% rename from ui/app/components/app/account-menu/index.js rename to ui/components/app/account-menu/index.js diff --git a/ui/app/components/app/account-menu/index.scss b/ui/components/app/account-menu/index.scss similarity index 100% rename from ui/app/components/app/account-menu/index.scss rename to ui/components/app/account-menu/index.scss diff --git a/ui/app/components/app/add-token-button/add-token-button.component.js b/ui/components/app/add-token-button/add-token-button.component.js similarity index 100% rename from ui/app/components/app/add-token-button/add-token-button.component.js rename to ui/components/app/add-token-button/add-token-button.component.js diff --git a/ui/app/components/app/add-token-button/index.js b/ui/components/app/add-token-button/index.js similarity index 100% rename from ui/app/components/app/add-token-button/index.js rename to ui/components/app/add-token-button/index.js diff --git a/ui/app/components/app/add-token-button/index.scss b/ui/components/app/add-token-button/index.scss similarity index 100% rename from ui/app/components/app/add-token-button/index.scss rename to ui/components/app/add-token-button/index.scss diff --git a/ui/app/components/app/alerts/alerts.js b/ui/components/app/alerts/alerts.js similarity index 100% rename from ui/app/components/app/alerts/alerts.js rename to ui/components/app/alerts/alerts.js diff --git a/ui/app/components/app/alerts/alerts.scss b/ui/components/app/alerts/alerts.scss similarity index 100% rename from ui/app/components/app/alerts/alerts.scss rename to ui/components/app/alerts/alerts.scss diff --git a/ui/app/components/app/alerts/index.js b/ui/components/app/alerts/index.js similarity index 100% rename from ui/app/components/app/alerts/index.js rename to ui/components/app/alerts/index.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/index.js b/ui/components/app/alerts/invalid-custom-network-alert/index.js similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/index.js rename to ui/components/app/alerts/invalid-custom-network-alert/index.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js b/ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js rename to ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js diff --git a/ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss b/ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss similarity index 100% rename from ui/app/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss rename to ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.scss diff --git a/ui/app/components/app/alerts/unconnected-account-alert/index.js b/ui/components/app/alerts/unconnected-account-alert/index.js similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/index.js rename to ui/components/app/alerts/unconnected-account-alert/index.js diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss similarity index 100% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss diff --git a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js similarity index 95% rename from ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js rename to ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js index dda361f4a..3aad2342b 100644 --- a/ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js +++ b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js @@ -6,11 +6,11 @@ import thunk from 'redux-thunk'; import { fireEvent } from '@testing-library/react'; import configureMockStore from 'redux-mock-store'; -import { tick } from '../../../../../../test/lib/tick'; -import { renderWithProvider } from '../../../../../../test/lib/render-helpers'; +import { tick } from '../../../../../test/lib/tick'; +import { renderWithProvider } from '../../../../../test/lib/render-helpers'; import * as actions from '../../../../store/actions'; -import { KOVAN_CHAIN_ID } from '../../../../../../shared/constants/network'; +import { KOVAN_CHAIN_ID } from '../../../../../shared/constants/network'; import UnconnectedAccountAlert from '.'; describe('Unconnected Account Alert', () => { diff --git a/ui/app/components/app/app-components.scss b/ui/components/app/app-components.scss similarity index 100% rename from ui/app/components/app/app-components.scss rename to ui/components/app/app-components.scss diff --git a/ui/app/components/app/app-header/app-header.component.js b/ui/components/app/app-header/app-header.component.js similarity index 100% rename from ui/app/components/app/app-header/app-header.component.js rename to ui/components/app/app-header/app-header.component.js diff --git a/ui/app/components/app/app-header/app-header.container.js b/ui/components/app/app-header/app-header.container.js similarity index 100% rename from ui/app/components/app/app-header/app-header.container.js rename to ui/components/app/app-header/app-header.container.js diff --git a/ui/app/components/app/app-header/app-header.test.js b/ui/components/app/app-header/app-header.test.js similarity index 100% rename from ui/app/components/app/app-header/app-header.test.js rename to ui/components/app/app-header/app-header.test.js diff --git a/ui/app/components/app/app-header/index.js b/ui/components/app/app-header/index.js similarity index 100% rename from ui/app/components/app/app-header/index.js rename to ui/components/app/app-header/index.js diff --git a/ui/app/components/app/app-header/index.scss b/ui/components/app/app-header/index.scss similarity index 100% rename from ui/app/components/app/app-header/index.scss rename to ui/components/app/app-header/index.scss diff --git a/ui/app/components/app/asset-list-item/asset-list-item.js b/ui/components/app/asset-list-item/asset-list-item.js similarity index 100% rename from ui/app/components/app/asset-list-item/asset-list-item.js rename to ui/components/app/asset-list-item/asset-list-item.js diff --git a/ui/app/components/app/asset-list-item/asset-list-item.scss b/ui/components/app/asset-list-item/asset-list-item.scss similarity index 100% rename from ui/app/components/app/asset-list-item/asset-list-item.scss rename to ui/components/app/asset-list-item/asset-list-item.scss diff --git a/ui/app/components/app/asset-list-item/index.js b/ui/components/app/asset-list-item/index.js similarity index 100% rename from ui/app/components/app/asset-list-item/index.js rename to ui/components/app/asset-list-item/index.js diff --git a/ui/app/components/app/asset-list/asset-list.js b/ui/components/app/asset-list/asset-list.js similarity index 100% rename from ui/app/components/app/asset-list/asset-list.js rename to ui/components/app/asset-list/asset-list.js diff --git a/ui/app/components/app/asset-list/index.js b/ui/components/app/asset-list/index.js similarity index 100% rename from ui/app/components/app/asset-list/index.js rename to ui/components/app/asset-list/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js b/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js rename to ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js b/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js rename to ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/index.js b/ui/components/app/confirm-page-container/confirm-detail-row/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/index.js rename to ui/components/app/confirm-page-container/confirm-detail-row/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss b/ui/components/app/confirm-page-container/confirm-detail-row/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-detail-row/index.scss rename to ui/components/app/confirm-page-container/confirm-detail-row/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js similarity index 95% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js index 9009f9feb..e47bfaf78 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js @@ -22,6 +22,7 @@ export default class ConfirmPageContainerContent extends Component { titleComponent: PropTypes.node, warning: PropTypes.string, origin: PropTypes.string.isRequired, + ethGasPriceWarning: PropTypes.string, // Footer onCancelAll: PropTypes.func, onCancel: PropTypes.func, @@ -81,11 +82,15 @@ export default class ConfirmPageContainerContent extends Component { unapprovedTxCount, rejectNText, origin, + ethGasPriceWarning, } = this.props; return (
{warning && } + {ethGasPriceWarning && ( + + )} {
diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss similarity index 91% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss index f439be370..bbfe812fe 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss +++ b/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss @@ -1,7 +1,6 @@ .confirm-page-container-warning { background-color: #fffcdb; display: flex; - justify-content: center; align-items: center; border-bottom: 1px solid $geyser; padding: 12px 24px; diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js b/ui/components/app/confirm-page-container/confirm-page-container-content/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-content/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-content/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-content/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-content/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js similarity index 92% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js index 2054f7daa..9c84a720a 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import { ENVIRONMENT_TYPE_POPUP, ENVIRONMENT_TYPE_NOTIFICATION, -} from '../../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; +} from '../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; import NetworkDisplay from '../../network-display'; import Identicon from '../../../ui/identicon'; import { shortenAddress } from '../../../../helpers/utils/util'; @@ -47,7 +47,7 @@ export default function ConfirmPageContainerHeader({ visibility: showEdit ? 'initial' : 'hidden', }} > - + onEdit()} diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js similarity index 87% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js index b94d3d15d..98c1169b2 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-header/confirm-page-container-header.component.test.js @@ -3,10 +3,15 @@ import { shallow } from 'enzyme'; import sinon from 'sinon'; import { Provider } from 'react-redux'; import configureStore from '../../../../store/store'; -import testData from '../../../../../../.storybook/test-data'; +import testData from '../../../../../.storybook/test-data'; import ConfirmPageContainerHeader from './confirm-page-container-header.component'; -const util = require('../../../../../../app/scripts/lib/util'); +const util = require('../../../../../app/scripts/lib/util'); + +jest.mock('react', () => ({ + ...jest.requireActual('react'), + useLayoutEffect: jest.requireActual('react').useEffect, +})); describe('Confirm Detail Row Component', () => { describe('render', () => { diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js b/ui/components/app/confirm-page-container/confirm-page-container-header/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-header/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-header/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-header/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-header/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js b/ui/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js similarity index 92% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js index 20e9c0ce5..8cc0985fb 100755 --- a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container-navigation/confirm-page-container-navigation.component.js @@ -33,14 +33,14 @@ const ConfirmPageContainerNavigation = (props) => { data-testid="first-page" onClick={() => onNextTx(firstTx)} > - +
onNextTx(prevTxId)} > - +
@@ -64,7 +64,7 @@ const ConfirmPageContainerNavigation = (props) => { >
@@ -75,7 +75,7 @@ const ConfirmPageContainerNavigation = (props) => { >
diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js b/ui/components/app/confirm-page-container/confirm-page-container-navigation/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.js rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/index.js diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss b/ui/components/app/confirm-page-container/confirm-page-container-navigation/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/confirm-page-container-navigation/index.scss rename to ui/components/app/confirm-page-container/confirm-page-container-navigation/index.scss diff --git a/ui/app/components/app/confirm-page-container/confirm-page-container.component.js b/ui/components/app/confirm-page-container/confirm-page-container.component.js similarity index 97% rename from ui/app/components/app/confirm-page-container/confirm-page-container.component.js rename to ui/components/app/confirm-page-container/confirm-page-container.component.js index e344bedd5..71923e546 100644 --- a/ui/app/components/app/confirm-page-container/confirm-page-container.component.js +++ b/ui/components/app/confirm-page-container/confirm-page-container.component.js @@ -43,6 +43,7 @@ export default class ConfirmPageContainer extends Component { warning: PropTypes.string, unapprovedTxCount: PropTypes.number, origin: PropTypes.string.isRequired, + ethGasPriceWarning: PropTypes.string, // Navigation totalTx: PropTypes.number, positionOfCurrentTx: PropTypes.number, @@ -103,6 +104,7 @@ export default class ConfirmPageContainer extends Component { hideSenderToRecipient, showAccountInHeader, origin, + ethGasPriceWarning, } = this.props; const renderAssetImage = contentComponent || !identiconAddress; @@ -162,6 +164,7 @@ export default class ConfirmPageContainer extends Component { unapprovedTxCount={unapprovedTxCount} rejectNText={this.context.t('rejectTxsN', [unapprovedTxCount])} origin={origin} + ethGasPriceWarning={ethGasPriceWarning} /> )} {contentComponent && ( diff --git a/ui/app/components/app/confirm-page-container/index.js b/ui/components/app/confirm-page-container/index.js similarity index 100% rename from ui/app/components/app/confirm-page-container/index.js rename to ui/components/app/confirm-page-container/index.js diff --git a/ui/app/components/app/confirm-page-container/index.scss b/ui/components/app/confirm-page-container/index.scss similarity index 100% rename from ui/app/components/app/confirm-page-container/index.scss rename to ui/components/app/confirm-page-container/index.scss diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-item/connected-accounts-list-item.component.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-item/index.js b/ui/components/app/connected-accounts-list/connected-accounts-list-item/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-item/index.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-item/index.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-options/connected-accounts-list-options.component.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list-options/index.js b/ui/components/app/connected-accounts-list/connected-accounts-list-options/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list-options/index.js rename to ui/components/app/connected-accounts-list/connected-accounts-list-options/index.js diff --git a/ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js b/ui/components/app/connected-accounts-list/connected-accounts-list.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/connected-accounts-list.component.js rename to ui/components/app/connected-accounts-list/connected-accounts-list.component.js diff --git a/ui/app/components/app/connected-accounts-list/index.js b/ui/components/app/connected-accounts-list/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-list/index.js rename to ui/components/app/connected-accounts-list/index.js diff --git a/ui/app/components/app/connected-accounts-list/index.scss b/ui/components/app/connected-accounts-list/index.scss similarity index 100% rename from ui/app/components/app/connected-accounts-list/index.scss rename to ui/components/app/connected-accounts-list/index.scss diff --git a/ui/app/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js b/ui/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js rename to ui/components/app/connected-accounts-permissions/connected-accounts-permissions.component.js diff --git a/ui/app/components/app/connected-accounts-permissions/index.js b/ui/components/app/connected-accounts-permissions/index.js similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/index.js rename to ui/components/app/connected-accounts-permissions/index.js diff --git a/ui/app/components/app/connected-accounts-permissions/index.scss b/ui/components/app/connected-accounts-permissions/index.scss similarity index 100% rename from ui/app/components/app/connected-accounts-permissions/index.scss rename to ui/components/app/connected-accounts-permissions/index.scss diff --git a/ui/app/components/app/connected-sites-list/connected-sites-list.component.js b/ui/components/app/connected-sites-list/connected-sites-list.component.js similarity index 100% rename from ui/app/components/app/connected-sites-list/connected-sites-list.component.js rename to ui/components/app/connected-sites-list/connected-sites-list.component.js diff --git a/ui/app/components/app/connected-sites-list/index.js b/ui/components/app/connected-sites-list/index.js similarity index 100% rename from ui/app/components/app/connected-sites-list/index.js rename to ui/components/app/connected-sites-list/index.js diff --git a/ui/app/components/app/connected-sites-list/index.scss b/ui/components/app/connected-sites-list/index.scss similarity index 100% rename from ui/app/components/app/connected-sites-list/index.scss rename to ui/components/app/connected-sites-list/index.scss diff --git a/ui/app/components/app/connected-status-indicator/connected-status-indicator.js b/ui/components/app/connected-status-indicator/connected-status-indicator.js similarity index 100% rename from ui/app/components/app/connected-status-indicator/connected-status-indicator.js rename to ui/components/app/connected-status-indicator/connected-status-indicator.js diff --git a/ui/app/components/app/connected-status-indicator/index.js b/ui/components/app/connected-status-indicator/index.js similarity index 100% rename from ui/app/components/app/connected-status-indicator/index.js rename to ui/components/app/connected-status-indicator/index.js diff --git a/ui/app/components/app/connected-status-indicator/index.scss b/ui/components/app/connected-status-indicator/index.scss similarity index 100% rename from ui/app/components/app/connected-status-indicator/index.scss rename to ui/components/app/connected-status-indicator/index.scss diff --git a/ui/app/components/app/contact-list/contact-list.component.js b/ui/components/app/contact-list/contact-list.component.js similarity index 100% rename from ui/app/components/app/contact-list/contact-list.component.js rename to ui/components/app/contact-list/contact-list.component.js diff --git a/ui/app/components/app/contact-list/index.js b/ui/components/app/contact-list/index.js similarity index 100% rename from ui/app/components/app/contact-list/index.js rename to ui/components/app/contact-list/index.js diff --git a/ui/app/components/app/contact-list/recipient-group/index.js b/ui/components/app/contact-list/recipient-group/index.js similarity index 100% rename from ui/app/components/app/contact-list/recipient-group/index.js rename to ui/components/app/contact-list/recipient-group/index.js diff --git a/ui/app/components/app/contact-list/recipient-group/recipient-group.component.js b/ui/components/app/contact-list/recipient-group/recipient-group.component.js similarity index 100% rename from ui/app/components/app/contact-list/recipient-group/recipient-group.component.js rename to ui/components/app/contact-list/recipient-group/recipient-group.component.js diff --git a/ui/app/components/app/dropdowns/dropdown.js b/ui/components/app/dropdowns/dropdown.js similarity index 100% rename from ui/app/components/app/dropdowns/dropdown.js rename to ui/components/app/dropdowns/dropdown.js diff --git a/ui/app/components/app/dropdowns/dropdown.test.js b/ui/components/app/dropdowns/dropdown.test.js similarity index 100% rename from ui/app/components/app/dropdowns/dropdown.test.js rename to ui/components/app/dropdowns/dropdown.test.js diff --git a/ui/app/components/app/dropdowns/network-dropdown.js b/ui/components/app/dropdowns/network-dropdown.js similarity index 96% rename from ui/app/components/app/dropdowns/network-dropdown.js rename to ui/components/app/dropdowns/network-dropdown.js index e0742722d..66e44bd49 100644 --- a/ui/app/components/app/dropdowns/network-dropdown.js +++ b/ui/components/app/dropdowns/network-dropdown.js @@ -9,10 +9,10 @@ import { NETWORKS_ROUTE, NETWORKS_FORM_ROUTE, } from '../../../helpers/constants/routes'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; -import { isPrefixedFormattedHexString } from '../../../../../shared/modules/network.utils'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { isPrefixedFormattedHexString } from '../../../../shared/modules/network.utils'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import ColorIndicator from '../../ui/color-indicator'; import { COLORS, SIZES } from '../../../helpers/constants/design-system'; diff --git a/ui/app/components/app/dropdowns/network-dropdown.test.js b/ui/components/app/dropdowns/network-dropdown.test.js similarity index 98% rename from ui/app/components/app/dropdowns/network-dropdown.test.js rename to ui/components/app/dropdowns/network-dropdown.test.js index 3452e8fef..f68fddd93 100644 --- a/ui/app/components/app/dropdowns/network-dropdown.test.js +++ b/ui/components/app/dropdowns/network-dropdown.test.js @@ -1,7 +1,7 @@ import React from 'react'; import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import ColorIndicator from '../../ui/color-indicator'; import NetworkDropdown from './network-dropdown'; import { DropdownMenuItem } from './dropdown'; diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-input-component.test.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.component.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js b/ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js rename to ui/components/app/gas-customization/advanced-gas-inputs/advanced-gas-inputs.container.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/index.js b/ui/components/app/gas-customization/advanced-gas-inputs/index.js similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/index.js rename to ui/components/app/gas-customization/advanced-gas-inputs/index.js diff --git a/ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss b/ui/components/app/gas-customization/advanced-gas-inputs/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/advanced-gas-inputs/index.scss rename to ui/components/app/gas-customization/advanced-gas-inputs/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js similarity index 93% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js index 0a91fbc69..4a7f86284 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../../test/lib/render-helpers'; import AdvancedTabContent from './advanced-tab-content.component'; describe('AdvancedTabContent Component', () => { @@ -13,7 +13,7 @@ describe('AdvancedTabContent Component', () => { }; sinon.spy(AdvancedTabContent.prototype, 'renderDataSummary'); - wrapper = shallow( + wrapper = shallowWithContext( { insufficientBalance={false} customPriceIsSafe isSpeedUp={false} + customPriceIsExcessive={false} />, ); }); @@ -59,7 +60,7 @@ describe('AdvancedTabContent Component', () => { let dataSummary; beforeEach(() => { - dataSummary = shallow( + dataSummary = shallowWithContext( wrapper.instance().renderDataSummary('mockTotalFee'), ); }); diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/advanced-tab-content.component.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/advanced-tab-content/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js similarity index 96% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js index facda50a5..12114edcf 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content-component.test.js @@ -1,8 +1,8 @@ import React from 'react'; -import shallow from '../../../../../../lib/shallow-with-context'; import GasPriceButtonGroup from '../../gas-price-button-group'; import Loading from '../../../../ui/loading-screen'; import { GAS_ESTIMATE_TYPES } from '../../../../../helpers/constants/common'; +import { shallowWithContext } from '../../../../../../test/lib/render-helpers'; import BasicTabContent from './basic-tab-content.component'; const mockGasPriceButtonGroupProps = { @@ -42,7 +42,7 @@ describe('BasicTabContent Component', () => { let wrapper; beforeEach(() => { - wrapper = shallow( + wrapper = shallowWithContext( , diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/basic-tab-content.component.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/basic-tab-content/index.scss diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js similarity index 94% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js index dd5f23e39..d88a3ab98 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../test/lib/render-helpers'; import PageContainer from '../../../ui/page-container'; @@ -63,7 +63,7 @@ describe('GasModalPageContainer Component', () => { let wrapper; beforeEach(() => { - wrapper = shallow( + wrapper = shallowWithContext( { customGasLimitInHex="mockCustomGasLimitInHex" insufficientBalance={false} disableSave={false} + customPriceIsExcessive={false} />, ); }); @@ -120,10 +121,11 @@ describe('GasModalPageContainer Component', () => { it('should pass the correct renderTabs property to PageContainer', () => { sinon.stub(GP, 'renderTabs').returns('mockTabs'); - const renderTabsWrapperTester = shallow( + const renderTabsWrapperTester = shallowWithContext( , { context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) } }, ); @@ -150,7 +152,7 @@ describe('GasModalPageContainer Component', () => { it('should render a Tabs component with "Basic" and "Advanced" tabs', () => { const renderTabsResult = wrapper.instance().renderTabs(); - const renderedTabs = shallow(renderTabsResult); + const renderedTabs = shallowWithContext(renderTabsResult); expect(renderedTabs.props().className).toStrictEqual('tabs'); const tabs = renderedTabs.find(Tab); @@ -189,7 +191,7 @@ describe('GasModalPageContainer Component', () => { }); it('should not render the basic tab if hideBasic is true', () => { - wrapper = shallow( + wrapper = shallowWithContext( { customGasLimitInHex="mockCustomGasLimitInHex" insufficientBalance={false} disableSave={false} + customPriceIsExcessive={false} hideBasic />, ); const renderTabsResult = wrapper.instance().renderTabs(); - const renderedTabs = shallow(renderTabsResult); + const renderedTabs = shallowWithContext(renderTabsResult); const tabs = renderedTabs.find(Tab); expect(tabs).toHaveLength(1); expect(tabs.at(0).props().name).toStrictEqual('advanced'); @@ -229,7 +232,7 @@ describe('GasModalPageContainer Component', () => { describe('renderInfoRows', () => { it('should render the info rows with the passed data', () => { const baseClassName = 'gas-modal-content__info-row'; - const renderedInfoRowsContainer = shallow( + const renderedInfoRowsContainer = shallowWithContext( wrapper .instance() .renderInfoRows( diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js similarity index 97% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js index ef5e62895..bcbbaa9d1 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container-container.test.js @@ -21,7 +21,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getBasicGasEstimateLoadingStatus: (s) => `mockBasicGasEstimateLoadingStatus:${Object.keys(s).length}`, getRenderableBasicEstimateData: (s) => @@ -42,20 +42,20 @@ jest.mock('../../../../../app/selectors', () => ({ isCustomPriceSafe: jest.fn().mockReturnValue(true), })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ hideModal: jest.fn(), setGasLimit: jest.fn(), setGasPrice: jest.fn(), updateTransaction: jest.fn(), })); -jest.mock('../../../../../app/ducks/gas/gas.duck', () => ({ +jest.mock('../../../../ducks/gas/gas.duck', () => ({ setCustomGasPrice: jest.fn(), setCustomGasLimit: jest.fn(), resetCustomData: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ hideGasButtonGroup: jest.fn(), })); diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js similarity index 92% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js index f57cce92d..ea59b7882 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js @@ -123,19 +123,25 @@ export default class GasModalPageContainer extends Component { infoRowProps: { newTotalFiat, newTotalEth, sendAmount, transactionFee }, } = this.props; - let tabsToRender = [ - { - name: this.context.t('basic'), - content: this.renderBasicTabContent(gasPriceButtonGroupProps), - }, - { - name: this.context.t('advanced'), - content: this.renderAdvancedTabContent(), - }, - ]; - + let tabsToRender; if (hideBasic) { - tabsToRender = tabsToRender.slice(1); + tabsToRender = [ + { + name: this.context.t('advanced'), + content: this.renderAdvancedTabContent(), + }, + ]; + } else { + tabsToRender = [ + { + name: this.context.t('basic'), + content: this.renderBasicTabContent(gasPriceButtonGroupProps), + }, + { + name: this.context.t('advanced'), + content: this.renderAdvancedTabContent(), + }, + ]; } return ( diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js similarity index 96% rename from ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js rename to ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js index 4d57502b2..4dbbeec22 100644 --- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js +++ b/ui/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { addHexPrefix } from '../../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../../app/scripts/lib/util'; import { hideModal, setGasLimit, @@ -38,6 +38,7 @@ import { getSendMaxModeState, getAveragePriceEstimateInHexWEI, isCustomPriceExcessive, + getIsGasEstimatesFetched, } from '../../../../selectors'; import { @@ -54,7 +55,7 @@ import { } from '../../../../pages/send/send.utils'; import { MIN_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants'; import { calcMaxAmount } from '../../../../pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils'; -import { TRANSACTION_STATUSES } from '../../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; import GasModalPageContainer from './gas-modal-page-container.component'; const mapStateToProps = (state, ownProps) => { @@ -132,7 +133,7 @@ const mapStateToProps = (state, ownProps) => { balance, conversionRate, }); - + const isGasEstimate = getIsGasEstimatesFetched(state); return { hideBasic, isConfirm: isConfirm(state), @@ -142,7 +143,10 @@ const mapStateToProps = (state, ownProps) => { customGasLimit: calcCustomGasLimit(customModalGasLimitInHex), customGasTotal, newTotalFiat, - customPriceIsSafe: isCustomPriceSafe(state), + customPriceIsSafe: + (isMainnet || process.env.IN_TEST) && isGasEstimate + ? isCustomPriceSafe(state) + : true, customPriceIsExcessive: isCustomPriceExcessive(state), maxModeOn, gasPriceButtonGroupProps: { diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/index.js b/ui/components/app/gas-customization/gas-modal-page-container/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/index.js rename to ui/components/app/gas-customization/gas-modal-page-container/index.js diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/index.scss b/ui/components/app/gas-customization/gas-modal-page-container/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-modal-page-container/index.scss rename to ui/components/app/gas-customization/gas-modal-page-container/index.scss diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js similarity index 93% rename from ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js rename to ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js index 2cb5cb428..2391c23a6 100644 --- a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js +++ b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group-component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import shallow from '../../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../../test/lib/render-helpers'; import { GAS_ESTIMATE_TYPES } from '../../../../helpers/constants/common'; import ButtonGroup from '../../../ui/button-group'; @@ -54,7 +54,7 @@ describe('GasPriceButtonGroup Component', () => { sinon.spy(GasPriceButtonGroup.prototype, 'renderButton'); sinon.spy(GasPriceButtonGroup.prototype, 'renderButtonContent'); - wrapper = shallow( + wrapper = shallowWithContext( , ); }); @@ -119,7 +119,7 @@ describe('GasPriceButtonGroup Component', () => { { ...mockGasPriceButtonGroupProps.gasButtonInfo[0] }, mockButtonPropsAndFlags, ); - wrappedRenderButtonResult = shallow(renderButtonResult); + wrappedRenderButtonResult = shallowWithContext(renderButtonResult); }); it('should render a button', () => { @@ -183,7 +183,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -203,7 +203,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -225,7 +225,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -247,7 +247,7 @@ describe('GasPriceButtonGroup Component', () => { className: 'someClass', }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect( @@ -268,7 +268,7 @@ describe('GasPriceButtonGroup Component', () => { showCheck: true, }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.find('.fa-check')).toHaveLength( @@ -289,7 +289,7 @@ describe('GasPriceButtonGroup Component', () => { showCheck: true, }, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.children()).toHaveLength(5); @@ -300,7 +300,7 @@ describe('GasPriceButtonGroup Component', () => { {}, {}, ); - const wrappedRenderButtonContentResult = shallow( + const wrappedRenderButtonContentResult = shallowWithContext( renderButtonContentResult, ); expect(wrappedRenderButtonContentResult.children()).toHaveLength(0); diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js b/ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js rename to ui/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/index.js b/ui/components/app/gas-customization/gas-price-button-group/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/index.js rename to ui/components/app/gas-customization/gas-price-button-group/index.js diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/index.scss b/ui/components/app/gas-customization/gas-price-button-group/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-price-button-group/index.scss rename to ui/components/app/gas-customization/gas-price-button-group/index.scss diff --git a/ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js b/ui/components/app/gas-customization/gas-slider/gas-slider.component.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/gas-slider.component.js rename to ui/components/app/gas-customization/gas-slider/gas-slider.component.js diff --git a/ui/app/components/app/gas-customization/gas-slider/index.js b/ui/components/app/gas-customization/gas-slider/index.js similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/index.js rename to ui/components/app/gas-customization/gas-slider/index.js diff --git a/ui/app/components/app/gas-customization/gas-slider/index.scss b/ui/components/app/gas-customization/gas-slider/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/gas-slider/index.scss rename to ui/components/app/gas-customization/gas-slider/index.scss diff --git a/ui/app/components/app/gas-customization/index.scss b/ui/components/app/gas-customization/index.scss similarity index 100% rename from ui/app/components/app/gas-customization/index.scss rename to ui/components/app/gas-customization/index.scss diff --git a/ui/app/components/app/home-notification/home-notification.component.js b/ui/components/app/home-notification/home-notification.component.js similarity index 100% rename from ui/app/components/app/home-notification/home-notification.component.js rename to ui/components/app/home-notification/home-notification.component.js diff --git a/ui/app/components/app/home-notification/index.js b/ui/components/app/home-notification/index.js similarity index 100% rename from ui/app/components/app/home-notification/index.js rename to ui/components/app/home-notification/index.js diff --git a/ui/app/components/app/home-notification/index.scss b/ui/components/app/home-notification/index.scss similarity index 100% rename from ui/app/components/app/home-notification/index.scss rename to ui/components/app/home-notification/index.scss diff --git a/ui/app/components/app/info-box/index.js b/ui/components/app/info-box/index.js similarity index 100% rename from ui/app/components/app/info-box/index.js rename to ui/components/app/info-box/index.js diff --git a/ui/app/components/app/info-box/index.scss b/ui/components/app/info-box/index.scss similarity index 100% rename from ui/app/components/app/info-box/index.scss rename to ui/components/app/info-box/index.scss diff --git a/ui/app/components/app/info-box/info-box.component.js b/ui/components/app/info-box/info-box.component.js similarity index 100% rename from ui/app/components/app/info-box/info-box.component.js rename to ui/components/app/info-box/info-box.component.js diff --git a/ui/app/components/app/info-box/info-box.test.js b/ui/components/app/info-box/info-box.test.js similarity index 100% rename from ui/app/components/app/info-box/info-box.test.js rename to ui/components/app/info-box/info-box.test.js diff --git a/ui/app/components/app/loading-network-screen/index.js b/ui/components/app/loading-network-screen/index.js similarity index 100% rename from ui/app/components/app/loading-network-screen/index.js rename to ui/components/app/loading-network-screen/index.js diff --git a/ui/app/components/app/loading-network-screen/loading-network-screen.component.js b/ui/components/app/loading-network-screen/loading-network-screen.component.js similarity index 100% rename from ui/app/components/app/loading-network-screen/loading-network-screen.component.js rename to ui/components/app/loading-network-screen/loading-network-screen.component.js diff --git a/ui/app/components/app/loading-network-screen/loading-network-screen.container.js b/ui/components/app/loading-network-screen/loading-network-screen.container.js similarity index 93% rename from ui/app/components/app/loading-network-screen/loading-network-screen.container.js rename to ui/components/app/loading-network-screen/loading-network-screen.container.js index bfce78fbe..2f1e711ce 100644 --- a/ui/app/components/app/loading-network-screen/loading-network-screen.container.js +++ b/ui/components/app/loading-network-screen/loading-network-screen.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import * as actions from '../../../store/actions'; import { getNetworkIdentifier, isNetworkLoading } from '../../../selectors'; import LoadingNetworkScreen from './loading-network-screen.component'; diff --git a/ui/app/components/app/menu-bar/account-options-menu.js b/ui/components/app/menu-bar/account-options-menu.js similarity index 84% rename from ui/app/components/app/menu-bar/account-options-menu.js rename to ui/components/app/menu-bar/account-options-menu.js index b8ea6d1d4..3ae13c385 100644 --- a/ui/app/components/app/menu-bar/account-options-menu.js +++ b/ui/components/app/menu-bar/account-options-menu.js @@ -2,11 +2,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; import { useDispatch, useSelector } from 'react-redux'; +import { getAccountLink } from '@metamask/etherscan-link'; import { showModal } from '../../../store/actions'; import { CONNECTED_ROUTE } from '../../../helpers/constants/routes'; import { Menu, MenuItem } from '../../ui/menu'; -import getAccountLink from '../../../../lib/account-link'; import { getCurrentChainId, getCurrentKeyring, @@ -14,14 +14,25 @@ import { getSelectedIdentity, } from '../../../selectors'; import { useI18nContext } from '../../../hooks/useI18nContext'; -import { useMetricEvent } from '../../../hooks/useMetricEvent'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; +import { + useMetricEvent, + useNewMetricEvent, +} from '../../../hooks/useMetricEvent'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; export default function AccountOptionsMenu({ anchorElement, onClose }) { const t = useI18nContext(); const dispatch = useDispatch(); const history = useHistory(); + + const keyring = useSelector(getCurrentKeyring); + const chainId = useSelector(getCurrentChainId); + const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider); + const selectedIdentity = useSelector(getSelectedIdentity); + const { address } = selectedIdentity; + const addressLink = getAccountLink(address, chainId, rpcPrefs); + const openFullscreenEvent = useMetricEvent({ eventOpts: { category: 'Navigation', @@ -36,13 +47,7 @@ export default function AccountOptionsMenu({ anchorElement, onClose }) { name: 'Viewed Account Details', }, }); - const viewOnEtherscanEvent = useMetricEvent({ - eventOpts: { - category: 'Navigation', - action: 'Account Options', - name: 'Clicked View on Etherscan', - }, - }); + const openConnectedSitesEvent = useMetricEvent({ eventOpts: { category: 'Navigation', @@ -51,12 +56,16 @@ export default function AccountOptionsMenu({ anchorElement, onClose }) { }, }); - const keyring = useSelector(getCurrentKeyring); - const chainId = useSelector(getCurrentChainId); - const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider); - const selectedIdentity = useSelector(getSelectedIdentity); + const blockExplorerLinkClickedEvent = useNewMetricEvent({ + category: 'Navigation', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Account Tracker', + action: 'Account Options', + block_explorer_domain: addressLink ? new URL(addressLink)?.hostname : '', + }, + }); - const { address } = selectedIdentity; const isRemovable = keyring.type !== 'HD Key Tree'; return ( @@ -90,9 +99,9 @@ export default function AccountOptionsMenu({ anchorElement, onClose }) { { - viewOnEtherscanEvent(); + blockExplorerLinkClickedEvent(); global.platform.openTab({ - url: getAccountLink(address, chainId, rpcPrefs), + url: addressLink, }); onClose(); }} diff --git a/ui/app/components/app/menu-bar/index.js b/ui/components/app/menu-bar/index.js similarity index 100% rename from ui/app/components/app/menu-bar/index.js rename to ui/components/app/menu-bar/index.js diff --git a/ui/app/components/app/menu-bar/index.scss b/ui/components/app/menu-bar/index.scss similarity index 100% rename from ui/app/components/app/menu-bar/index.scss rename to ui/components/app/menu-bar/index.scss diff --git a/ui/app/components/app/menu-bar/menu-bar.js b/ui/components/app/menu-bar/menu-bar.js similarity index 92% rename from ui/app/components/app/menu-bar/menu-bar.js rename to ui/components/app/menu-bar/menu-bar.js index 7b623c2c6..b5e3fdb7c 100644 --- a/ui/app/components/app/menu-bar/menu-bar.js +++ b/ui/components/app/menu-bar/menu-bar.js @@ -4,8 +4,8 @@ import { useHistory } from 'react-router-dom'; import { useSelector } from 'react-redux'; import SelectedAccount from '../selected-account'; import ConnectedStatusIndicator from '../connected-status-indicator'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; import { CONNECTED_ACCOUNTS_ROUTE } from '../../../helpers/constants/routes'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { useMetricEvent } from '../../../hooks/useMetricEvent'; diff --git a/ui/app/components/app/menu-bar/menu-bar.test.js b/ui/components/app/menu-bar/menu-bar.test.js similarity index 65% rename from ui/app/components/app/menu-bar/menu-bar.test.js rename to ui/components/app/menu-bar/menu-bar.test.js index 5db320352..89f933717 100644 --- a/ui/app/components/app/menu-bar/menu-bar.test.js +++ b/ui/components/app/menu-bar/menu-bar.test.js @@ -1,8 +1,9 @@ import React from 'react'; import { Provider } from 'react-redux'; import configureStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; -import { ROPSTEN_CHAIN_ID } from '../../../../../shared/constants/network'; +import { waitFor } from '@testing-library/react'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { ROPSTEN_CHAIN_ID } from '../../../../shared/constants/network'; import MenuBar from './menu-bar'; const initState = { @@ -30,21 +31,25 @@ const initState = { const mockStore = configureStore(); describe('MenuBar', () => { - it('opens account detail menu when account options is clicked', () => { + it('opens account detail menu when account options is clicked', async () => { const store = mockStore(initState); const wrapper = mountWithRouter( , ); - expect(!wrapper.exists('AccountOptionsMenu')).toStrictEqual(true); + await waitFor(() => + expect(!wrapper.exists('AccountOptionsMenu')).toStrictEqual(true), + ); const accountOptions = wrapper.find('.menu-bar__account-options'); accountOptions.simulate('click'); wrapper.update(); - expect(wrapper.exists('AccountOptionsMenu')).toStrictEqual(true); + await waitFor(() => + expect(wrapper.exists('AccountOptionsMenu')).toStrictEqual(true), + ); }); - it('sets accountDetailsMenuOpen to false when closed', () => { + it('sets accountDetailsMenuOpen to false when closed', async () => { const store = mockStore(initState); const wrapper = mountWithRouter( @@ -54,10 +59,14 @@ describe('MenuBar', () => { const accountOptions = wrapper.find('.menu-bar__account-options'); accountOptions.simulate('click'); wrapper.update(); - expect(wrapper.exists('AccountOptionsMenu')).toStrictEqual(true); + await waitFor(() => + expect(wrapper.exists('AccountOptionsMenu')).toStrictEqual(true), + ); const accountDetailsMenu = wrapper.find('AccountOptionsMenu'); - accountDetailsMenu.prop('onClose')(); - wrapper.update(); - expect(!wrapper.exists('AccountOptionsMenu')).toStrictEqual(true); + await waitFor(() => { + accountDetailsMenu.prop('onClose')(); + wrapper.update(); + expect(!wrapper.exists('AccountOptionsMenu')).toStrictEqual(true); + }); }); }); diff --git a/ui/app/components/app/menu-droppo.js b/ui/components/app/menu-droppo.js similarity index 100% rename from ui/app/components/app/menu-droppo.js rename to ui/components/app/menu-droppo.js diff --git a/ui/app/components/app/metamask-template-renderer/index.js b/ui/components/app/metamask-template-renderer/index.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/index.js rename to ui/components/app/metamask-template-renderer/index.js diff --git a/ui/app/components/app/metamask-template-renderer/metamask-template-renderer.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/metamask-template-renderer.js rename to ui/components/app/metamask-template-renderer/metamask-template-renderer.js diff --git a/ui/app/components/app/metamask-template-renderer/metamask-template-renderer.stories.js b/ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/metamask-template-renderer.stories.js rename to ui/components/app/metamask-template-renderer/metamask-template-renderer.stories.js diff --git a/ui/app/components/app/metamask-template-renderer/safe-component-list.js b/ui/components/app/metamask-template-renderer/safe-component-list.js similarity index 100% rename from ui/app/components/app/metamask-template-renderer/safe-component-list.js rename to ui/components/app/metamask-template-renderer/safe-component-list.js diff --git a/ui/app/components/app/metamask-translation/index.js b/ui/components/app/metamask-translation/index.js similarity index 100% rename from ui/app/components/app/metamask-translation/index.js rename to ui/components/app/metamask-translation/index.js diff --git a/ui/app/components/app/metamask-translation/metamask-translation.js b/ui/components/app/metamask-translation/metamask-translation.js similarity index 100% rename from ui/app/components/app/metamask-translation/metamask-translation.js rename to ui/components/app/metamask-translation/metamask-translation.js diff --git a/ui/app/components/app/metamask-translation/metamask-translation.stories.js b/ui/components/app/metamask-translation/metamask-translation.stories.js similarity index 95% rename from ui/app/components/app/metamask-translation/metamask-translation.stories.js rename to ui/components/app/metamask-translation/metamask-translation.stories.js index 21d321ccc..429037810 100644 --- a/ui/app/components/app/metamask-translation/metamask-translation.stories.js +++ b/ui/components/app/metamask-translation/metamask-translation.stories.js @@ -1,7 +1,7 @@ import React from 'react'; import { select, object } from '@storybook/addon-knobs'; import { groupBy } from 'lodash'; -import en from '../../../../../app/_locales/en/messages.json'; +import en from '../../../../app/_locales/en/messages.json'; import MetaMaskTranslation from './metamask-translation'; export default { diff --git a/ui/app/components/app/modal/index.js b/ui/components/app/modal/index.js similarity index 100% rename from ui/app/components/app/modal/index.js rename to ui/components/app/modal/index.js diff --git a/ui/app/components/app/modal/index.scss b/ui/components/app/modal/index.scss similarity index 100% rename from ui/app/components/app/modal/index.scss rename to ui/components/app/modal/index.scss diff --git a/ui/app/components/app/modal/modal-content/index.js b/ui/components/app/modal/modal-content/index.js similarity index 100% rename from ui/app/components/app/modal/modal-content/index.js rename to ui/components/app/modal/modal-content/index.js diff --git a/ui/app/components/app/modal/modal-content/index.scss b/ui/components/app/modal/modal-content/index.scss similarity index 100% rename from ui/app/components/app/modal/modal-content/index.scss rename to ui/components/app/modal/modal-content/index.scss diff --git a/ui/app/components/app/modal/modal-content/modal-content.component.js b/ui/components/app/modal/modal-content/modal-content.component.js similarity index 100% rename from ui/app/components/app/modal/modal-content/modal-content.component.js rename to ui/components/app/modal/modal-content/modal-content.component.js diff --git a/ui/app/components/app/modal/modal-content/modal-content.component.test.js b/ui/components/app/modal/modal-content/modal-content.component.test.js similarity index 100% rename from ui/app/components/app/modal/modal-content/modal-content.component.test.js rename to ui/components/app/modal/modal-content/modal-content.component.test.js diff --git a/ui/app/components/app/modal/modal.component.js b/ui/components/app/modal/modal.component.js similarity index 100% rename from ui/app/components/app/modal/modal.component.js rename to ui/components/app/modal/modal.component.js diff --git a/ui/app/components/app/modal/modal.component.test.js b/ui/components/app/modal/modal.component.test.js similarity index 100% rename from ui/app/components/app/modal/modal.component.test.js rename to ui/components/app/modal/modal.component.test.js diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.component.js b/ui/components/app/modals/account-details-modal/account-details-modal.component.js similarity index 79% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.component.js rename to ui/components/app/modals/account-details-modal/account-details-modal.component.js index 7e36e0a6c..6dc47f3d2 100644 --- a/ui/app/components/app/modals/account-details-modal/account-details-modal.component.js +++ b/ui/components/app/modals/account-details-modal/account-details-modal.component.js @@ -1,7 +1,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { getAccountLink } from '@metamask/etherscan-link'; + import AccountModalContainer from '../account-modal-container'; -import getAccountLink from '../../../../../lib/account-link'; import QrView from '../../../ui/qr-code'; import EditableLabel from '../../../ui/editable-label'; import Button from '../../../ui/button'; @@ -18,6 +19,7 @@ export default class AccountDetailsModal extends Component { static contextTypes = { t: PropTypes.func, + trackEvent: PropTypes.func, }; render() { @@ -61,8 +63,20 @@ export default class AccountDetailsModal extends Component { type="secondary" className="account-details-modal__button" onClick={() => { + const accountLink = getAccountLink(address, chainId, rpcPrefs); + this.context.trackEvent({ + category: 'Navigation', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Account Tracker', + action: 'Account Details Modal', + block_explorer_domain: accountLink + ? new URL(accountLink)?.hostname + : '', + }, + }); global.platform.openTab({ - url: getAccountLink(address, chainId, rpcPrefs), + url: accountLink, }); }} > diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.container.js b/ui/components/app/modals/account-details-modal/account-details-modal.container.js similarity index 100% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.container.js rename to ui/components/app/modals/account-details-modal/account-details-modal.container.js diff --git a/ui/app/components/app/modals/account-details-modal/account-details-modal.test.js b/ui/components/app/modals/account-details-modal/account-details-modal.test.js similarity index 98% rename from ui/app/components/app/modals/account-details-modal/account-details-modal.test.js rename to ui/components/app/modals/account-details-modal/account-details-modal.test.js index a0e7a93ed..2f0fdb788 100644 --- a/ui/app/components/app/modals/account-details-modal/account-details-modal.test.js +++ b/ui/components/app/modals/account-details-modal/account-details-modal.test.js @@ -36,6 +36,7 @@ describe('Account Details Modal', () => { wrapper = shallow(, { context: { t: (str) => str, + trackEvent: (e) => e, }, }); }); diff --git a/ui/app/components/app/modals/account-details-modal/index.js b/ui/components/app/modals/account-details-modal/index.js similarity index 100% rename from ui/app/components/app/modals/account-details-modal/index.js rename to ui/components/app/modals/account-details-modal/index.js diff --git a/ui/app/components/app/modals/account-details-modal/index.scss b/ui/components/app/modals/account-details-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/account-details-modal/index.scss rename to ui/components/app/modals/account-details-modal/index.scss diff --git a/ui/app/components/app/modals/account-modal-container/account-modal-container.component.js b/ui/components/app/modals/account-modal-container/account-modal-container.component.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/account-modal-container.component.js rename to ui/components/app/modals/account-modal-container/account-modal-container.component.js diff --git a/ui/app/components/app/modals/account-modal-container/account-modal-container.container.js b/ui/components/app/modals/account-modal-container/account-modal-container.container.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/account-modal-container.container.js rename to ui/components/app/modals/account-modal-container/account-modal-container.container.js diff --git a/ui/app/components/app/modals/account-modal-container/index.js b/ui/components/app/modals/account-modal-container/index.js similarity index 100% rename from ui/app/components/app/modals/account-modal-container/index.js rename to ui/components/app/modals/account-modal-container/index.js diff --git a/ui/app/components/app/modals/account-modal-container/index.scss b/ui/components/app/modals/account-modal-container/index.scss similarity index 100% rename from ui/app/components/app/modals/account-modal-container/index.scss rename to ui/components/app/modals/account-modal-container/index.scss diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js b/ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js rename to ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.component.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js b/ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js rename to ui/components/app/modals/add-to-addressbook-modal/add-to-addressbook-modal.container.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/index.js b/ui/components/app/modals/add-to-addressbook-modal/index.js similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/index.js rename to ui/components/app/modals/add-to-addressbook-modal/index.js diff --git a/ui/app/components/app/modals/add-to-addressbook-modal/index.scss b/ui/components/app/modals/add-to-addressbook-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/add-to-addressbook-modal/index.scss rename to ui/components/app/modals/add-to-addressbook-modal/index.scss diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.test.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss b/ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss rename to ui/components/app/modals/cancel-transaction/cancel-transaction-gas-fee/index.scss diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.js similarity index 95% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.component.js index d45ba6198..9b436f7d9 100644 --- a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.js +++ b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Modal from '../../modal'; -import { TRANSACTION_STATUSES } from '../../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; import CancelTransactionGasFee from './cancel-transaction-gas-fee'; export default class CancelTransaction extends PureComponent { diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.test.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.component.test.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.component.test.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.component.test.js diff --git a/ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js b/ui/components/app/modals/cancel-transaction/cancel-transaction.container.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/cancel-transaction.container.js rename to ui/components/app/modals/cancel-transaction/cancel-transaction.container.js diff --git a/ui/app/components/app/modals/cancel-transaction/index.js b/ui/components/app/modals/cancel-transaction/index.js similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/index.js rename to ui/components/app/modals/cancel-transaction/index.js diff --git a/ui/app/components/app/modals/cancel-transaction/index.scss b/ui/components/app/modals/cancel-transaction/index.scss similarity index 100% rename from ui/app/components/app/modals/cancel-transaction/index.scss rename to ui/components/app/modals/cancel-transaction/index.scss diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.component.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.component.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.component.js diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.container.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.container.js diff --git a/ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.test.js b/ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/confirm-delete-network.test.js rename to ui/components/app/modals/confirm-delete-network/confirm-delete-network.test.js diff --git a/ui/app/components/app/modals/confirm-delete-network/index.js b/ui/components/app/modals/confirm-delete-network/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-delete-network/index.js rename to ui/components/app/modals/confirm-delete-network/index.js diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js similarity index 70% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js index 8c2831c2c..5b90f0359 100644 --- a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.component.js +++ b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.component.js @@ -1,9 +1,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { getAccountLink } from '@metamask/etherscan-link'; import Modal from '../../modal'; import { addressSummary } from '../../../../helpers/utils/util'; import Identicon from '../../../ui/identicon'; -import getAccountLink from '../../../../../lib/account-link'; export default class ConfirmRemoveAccount extends Component { static propTypes = { @@ -16,6 +16,7 @@ export default class ConfirmRemoveAccount extends Component { static contextTypes = { t: PropTypes.func, + trackEvent: PropTypes.func, }; handleRemove = () => { @@ -29,19 +30,22 @@ export default class ConfirmRemoveAccount extends Component { }; renderSelectedAccount() { - const { identity } = this.props; + const { t } = this.context; + const { identity, rpcPrefs, chainId } = this.props; return (
- Name + + {t('name')} + {identity.name}
diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.container.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.container.js diff --git a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.test.js b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js similarity index 97% rename from ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.test.js rename to ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js index fd89e96f8..da59aeffa 100644 --- a/ui/app/components/app/modals/confirm-remove-account/confirm-remove-account.test.js +++ b/ui/components/app/modals/confirm-remove-account/confirm-remove-account.test.js @@ -21,6 +21,8 @@ describe('Confirm Remove Account', () => { address: '0x0', name: 'Account 1', }, + chainId: '0x0', + rpcPrefs: {}, }; const mockStore = configureStore(); diff --git a/ui/app/components/app/modals/confirm-remove-account/index.js b/ui/components/app/modals/confirm-remove-account/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/index.js rename to ui/components/app/modals/confirm-remove-account/index.js diff --git a/ui/app/components/app/modals/confirm-remove-account/index.scss b/ui/components/app/modals/confirm-remove-account/index.scss similarity index 100% rename from ui/app/components/app/modals/confirm-remove-account/index.scss rename to ui/components/app/modals/confirm-remove-account/index.scss diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.component.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.component.js diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.container.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.container.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.container.js diff --git a/ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.test.js b/ui/components/app/modals/confirm-reset-account/confirm-reset-account.test.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/confirm-reset-account.test.js rename to ui/components/app/modals/confirm-reset-account/confirm-reset-account.test.js diff --git a/ui/app/components/app/modals/confirm-reset-account/index.js b/ui/components/app/modals/confirm-reset-account/index.js similarity index 100% rename from ui/app/components/app/modals/confirm-reset-account/index.js rename to ui/components/app/modals/confirm-reset-account/index.js diff --git a/ui/app/components/app/modals/customize-nonce/customize-nonce.component.js b/ui/components/app/modals/customize-nonce/customize-nonce.component.js similarity index 100% rename from ui/app/components/app/modals/customize-nonce/customize-nonce.component.js rename to ui/components/app/modals/customize-nonce/customize-nonce.component.js diff --git a/ui/app/components/app/modals/customize-nonce/index.js b/ui/components/app/modals/customize-nonce/index.js similarity index 100% rename from ui/app/components/app/modals/customize-nonce/index.js rename to ui/components/app/modals/customize-nonce/index.js diff --git a/ui/app/components/app/modals/customize-nonce/index.scss b/ui/components/app/modals/customize-nonce/index.scss similarity index 100% rename from ui/app/components/app/modals/customize-nonce/index.scss rename to ui/components/app/modals/customize-nonce/index.scss diff --git a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js similarity index 98% rename from ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js rename to ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js index 553f25973..3f1775a47 100644 --- a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js +++ b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { NETWORK_TO_NAME_MAP } from '../../../../../../shared/constants/network'; +import { NETWORK_TO_NAME_MAP } from '../../../../../shared/constants/network'; import Button from '../../../ui/button'; export default class DepositEtherModal extends Component { diff --git a/ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js rename to ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.container.js diff --git a/ui/app/components/app/modals/deposit-ether-modal/index.js b/ui/components/app/modals/deposit-ether-modal/index.js similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/index.js rename to ui/components/app/modals/deposit-ether-modal/index.js diff --git a/ui/app/components/app/modals/deposit-ether-modal/index.scss b/ui/components/app/modals/deposit-ether-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/deposit-ether-modal/index.scss rename to ui/components/app/modals/deposit-ether-modal/index.scss diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.component.js rename to ui/components/app/modals/edit-approval-permission/edit-approval-permission.component.js diff --git a/ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js b/ui/components/app/modals/edit-approval-permission/edit-approval-permission.container.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/edit-approval-permission.container.js rename to ui/components/app/modals/edit-approval-permission/edit-approval-permission.container.js diff --git a/ui/app/components/app/modals/edit-approval-permission/index.js b/ui/components/app/modals/edit-approval-permission/index.js similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/index.js rename to ui/components/app/modals/edit-approval-permission/index.js diff --git a/ui/app/components/app/modals/edit-approval-permission/index.scss b/ui/components/app/modals/edit-approval-permission/index.scss similarity index 100% rename from ui/app/components/app/modals/edit-approval-permission/index.scss rename to ui/components/app/modals/edit-approval-permission/index.scss diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js similarity index 98% rename from ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js rename to ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js index 4db92c4f5..ba6e4ca8b 100644 --- a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js +++ b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.component.js @@ -7,7 +7,7 @@ import copyToClipboard from 'copy-to-clipboard'; import ReadOnlyInput from '../../../ui/readonly-input'; import Button from '../../../ui/button'; import AccountModalContainer from '../account-modal-container'; -import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; export default class ExportPrivateKeyModal extends Component { static contextTypes = { diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.container.js b/ui/components/app/modals/export-private-key-modal/export-private-key-modal.container.js similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.container.js rename to ui/components/app/modals/export-private-key-modal/export-private-key-modal.container.js diff --git a/ui/app/components/app/modals/export-private-key-modal/index.js b/ui/components/app/modals/export-private-key-modal/index.js similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/index.js rename to ui/components/app/modals/export-private-key-modal/index.js diff --git a/ui/app/components/app/modals/export-private-key-modal/index.scss b/ui/components/app/modals/export-private-key-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/export-private-key-modal/index.scss rename to ui/components/app/modals/export-private-key-modal/index.scss diff --git a/ui/app/components/app/modals/fade-modal.js b/ui/components/app/modals/fade-modal.js similarity index 100% rename from ui/app/components/app/modals/fade-modal.js rename to ui/components/app/modals/fade-modal.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js b/ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js rename to ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/index.js b/ui/components/app/modals/hide-token-confirmation-modal/index.js similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/index.js rename to ui/components/app/modals/hide-token-confirmation-modal/index.js diff --git a/ui/app/components/app/modals/hide-token-confirmation-modal/index.scss b/ui/components/app/modals/hide-token-confirmation-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/hide-token-confirmation-modal/index.scss rename to ui/components/app/modals/hide-token-confirmation-modal/index.scss diff --git a/ui/app/components/app/modals/index.js b/ui/components/app/modals/index.js similarity index 100% rename from ui/app/components/app/modals/index.js rename to ui/components/app/modals/index.js diff --git a/ui/app/components/app/modals/index.scss b/ui/components/app/modals/index.scss similarity index 100% rename from ui/app/components/app/modals/index.scss rename to ui/components/app/modals/index.scss diff --git a/ui/app/components/app/modals/loading-network-error/index.js b/ui/components/app/modals/loading-network-error/index.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/index.js rename to ui/components/app/modals/loading-network-error/index.js diff --git a/ui/app/components/app/modals/loading-network-error/loading-network-error.component.js b/ui/components/app/modals/loading-network-error/loading-network-error.component.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/loading-network-error.component.js rename to ui/components/app/modals/loading-network-error/loading-network-error.component.js diff --git a/ui/app/components/app/modals/loading-network-error/loading-network-error.container.js b/ui/components/app/modals/loading-network-error/loading-network-error.container.js similarity index 100% rename from ui/app/components/app/modals/loading-network-error/loading-network-error.container.js rename to ui/components/app/modals/loading-network-error/loading-network-error.container.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/index.js b/ui/components/app/modals/metametrics-opt-in-modal/index.js similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/index.js rename to ui/components/app/modals/metametrics-opt-in-modal/index.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/index.scss b/ui/components/app/modals/metametrics-opt-in-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/index.scss rename to ui/components/app/modals/metametrics-opt-in-modal/index.scss diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js similarity index 69% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js index 833d8b49d..9daf60e56 100644 --- a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js +++ b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js @@ -27,76 +27,81 @@ export default class MetaMetricsOptInModal extends Component {
- Help Us Improve MetaMask + {t('metametricsHelpImproveMetaMask')}
- MetaMask would like to gather usage data to better understand - how our users interact with the extension. This data will be - used to continually improve the usability and user experience of - our product and the Ethereum ecosystem. + {t('metametricsOptInDescription')}
- MetaMask will.. + {t('metametricsCommitmentsIntro')}
- Always allow you to opt-out via Settings + {t('metametricsCommitmentsAllowOptOut')}
- Send anonymized click & pageview events -
-
-
- -
- Maintain a public aggregate dashboard to educate the - community + {t('metametricsCommitmentsSendAnonymizedEvents')}
- Never{' '} - collect keys, addresses, transactions, balances, hashes, or - any personal information + {t('metametricsCommitmentsNeverCollectKeysEtc', [ + + {t('metametricsCommitmentsBoldNever')} + , + ])}
- Never{' '} - collect your full IP address + {t('metametricsCommitmentsNeverCollectIP', [ + + {t('metametricsCommitmentsBoldNever')} + , + ])}
- Never sell - data for profit. Ever! + {t('metametricsCommitmentsNeverSellDataForProfit', [ + + {t('metametricsCommitmentsBoldNever')} + , + ])}
- This data is aggregated and is therefore anonymous for the - purposes of General Data Protection Regulation (EU) 2016/679. For - more information in relation to our privacy practices, please see - our  - - Privacy Policy here - - . + {t('gdprMessage', [ + + {t('gdprMessagePrivacyPolicy')} + , + ])}
diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js similarity index 100% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.container.js diff --git a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js similarity index 95% rename from ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js rename to ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js index fc45751b5..7b90b24ff 100644 --- a/ui/app/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js +++ b/ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import { mount } from 'enzyme'; -import messages from '../../../../../../app/_locales/en/messages.json'; +import messages from '../../../../../app/_locales/en/messages.json'; import MetaMetricsOptIn from './metametrics-opt-in-modal.container'; describe('MetaMetrics Opt In', () => { diff --git a/ui/app/components/app/modals/modal.js b/ui/components/app/modals/modal.js similarity index 98% rename from ui/app/components/app/modals/modal.js rename to ui/components/app/modals/modal.js index 74373354c..ce4282df3 100644 --- a/ui/app/components/app/modals/modal.js +++ b/ui/components/app/modals/modal.js @@ -4,9 +4,9 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import * as actions from '../../../store/actions'; import { resetCustomData as resetCustomGasData } from '../../../ducks/gas/gas.duck'; -import isMobileView from '../../../../lib/is-mobile-view'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; +import isMobileView from '../../../helpers/utils/is-mobile-view'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; // Modal Components import ConfirmCustomizeGasModal from '../gas-customization/gas-modal-page-container'; diff --git a/ui/app/components/app/modals/new-account-modal/index.js b/ui/components/app/modals/new-account-modal/index.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/index.js rename to ui/components/app/modals/new-account-modal/index.js diff --git a/ui/app/components/app/modals/new-account-modal/index.scss b/ui/components/app/modals/new-account-modal/index.scss similarity index 100% rename from ui/app/components/app/modals/new-account-modal/index.scss rename to ui/components/app/modals/new-account-modal/index.scss diff --git a/ui/app/components/app/modals/new-account-modal/new-account-modal.component.js b/ui/components/app/modals/new-account-modal/new-account-modal.component.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/new-account-modal.component.js rename to ui/components/app/modals/new-account-modal/new-account-modal.component.js diff --git a/ui/app/components/app/modals/new-account-modal/new-account-modal.container.js b/ui/components/app/modals/new-account-modal/new-account-modal.container.js similarity index 100% rename from ui/app/components/app/modals/new-account-modal/new-account-modal.container.js rename to ui/components/app/modals/new-account-modal/new-account-modal.container.js diff --git a/ui/app/components/app/modals/qr-scanner/index.js b/ui/components/app/modals/qr-scanner/index.js similarity index 100% rename from ui/app/components/app/modals/qr-scanner/index.js rename to ui/components/app/modals/qr-scanner/index.js diff --git a/ui/app/components/app/modals/qr-scanner/index.scss b/ui/components/app/modals/qr-scanner/index.scss similarity index 100% rename from ui/app/components/app/modals/qr-scanner/index.scss rename to ui/components/app/modals/qr-scanner/index.scss diff --git a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js b/ui/components/app/modals/qr-scanner/qr-scanner.component.js similarity index 97% rename from ui/app/components/app/modals/qr-scanner/qr-scanner.component.js rename to ui/components/app/modals/qr-scanner/qr-scanner.component.js index 7ca6a5089..6cad31f6e 100644 --- a/ui/app/components/app/modals/qr-scanner/qr-scanner.component.js +++ b/ui/components/app/modals/qr-scanner/qr-scanner.component.js @@ -2,10 +2,10 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import log from 'loglevel'; import { BrowserQRCodeReader } from '@zxing/library'; -import { getEnvironmentType } from '../../../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; import Spinner from '../../../ui/spinner'; -import WebcamUtils from '../../../../../lib/webcam-utils'; +import WebcamUtils from '../../../../helpers/utils/webcam-utils'; import PageContainerFooter from '../../../ui/page-container/page-container-footer/page-container-footer.component'; const READY_STATE = { diff --git a/ui/app/components/app/modals/qr-scanner/qr-scanner.container.js b/ui/components/app/modals/qr-scanner/qr-scanner.container.js similarity index 100% rename from ui/app/components/app/modals/qr-scanner/qr-scanner.container.js rename to ui/components/app/modals/qr-scanner/qr-scanner.container.js diff --git a/ui/app/components/app/modals/reject-transactions/index.js b/ui/components/app/modals/reject-transactions/index.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/index.js rename to ui/components/app/modals/reject-transactions/index.js diff --git a/ui/app/components/app/modals/reject-transactions/index.scss b/ui/components/app/modals/reject-transactions/index.scss similarity index 100% rename from ui/app/components/app/modals/reject-transactions/index.scss rename to ui/components/app/modals/reject-transactions/index.scss diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.component.js b/ui/components/app/modals/reject-transactions/reject-transactions.component.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.component.js rename to ui/components/app/modals/reject-transactions/reject-transactions.component.js diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.container.js b/ui/components/app/modals/reject-transactions/reject-transactions.container.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.container.js rename to ui/components/app/modals/reject-transactions/reject-transactions.container.js diff --git a/ui/app/components/app/modals/reject-transactions/reject-transactions.test.js b/ui/components/app/modals/reject-transactions/reject-transactions.test.js similarity index 100% rename from ui/app/components/app/modals/reject-transactions/reject-transactions.test.js rename to ui/components/app/modals/reject-transactions/reject-transactions.test.js diff --git a/ui/app/components/app/modals/transaction-confirmed/index.js b/ui/components/app/modals/transaction-confirmed/index.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/index.js rename to ui/components/app/modals/transaction-confirmed/index.js diff --git a/ui/app/components/app/modals/transaction-confirmed/index.scss b/ui/components/app/modals/transaction-confirmed/index.scss similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/index.scss rename to ui/components/app/modals/transaction-confirmed/index.scss diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.component.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.container.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.container.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.container.js diff --git a/ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.test.js b/ui/components/app/modals/transaction-confirmed/transaction-confirmed.test.js similarity index 100% rename from ui/app/components/app/modals/transaction-confirmed/transaction-confirmed.test.js rename to ui/components/app/modals/transaction-confirmed/transaction-confirmed.test.js diff --git a/ui/app/components/app/multiple-notifications/index.js b/ui/components/app/multiple-notifications/index.js similarity index 100% rename from ui/app/components/app/multiple-notifications/index.js rename to ui/components/app/multiple-notifications/index.js diff --git a/ui/app/components/app/multiple-notifications/index.scss b/ui/components/app/multiple-notifications/index.scss similarity index 100% rename from ui/app/components/app/multiple-notifications/index.scss rename to ui/components/app/multiple-notifications/index.scss diff --git a/ui/app/components/app/multiple-notifications/multiple-notifications.component.js b/ui/components/app/multiple-notifications/multiple-notifications.component.js similarity index 100% rename from ui/app/components/app/multiple-notifications/multiple-notifications.component.js rename to ui/components/app/multiple-notifications/multiple-notifications.component.js diff --git a/ui/app/components/app/network-display/index.js b/ui/components/app/network-display/index.js similarity index 100% rename from ui/app/components/app/network-display/index.js rename to ui/components/app/network-display/index.js diff --git a/ui/app/components/app/network-display/index.scss b/ui/components/app/network-display/index.scss similarity index 100% rename from ui/app/components/app/network-display/index.scss rename to ui/components/app/network-display/index.scss diff --git a/ui/app/components/app/network-display/network-display.js b/ui/components/app/network-display/network-display.js similarity index 98% rename from ui/app/components/app/network-display/network-display.js rename to ui/components/app/network-display/network-display.js index ba83bb5c9..87b851535 100644 --- a/ui/app/components/app/network-display/network-display.js +++ b/ui/components/app/network-display/network-display.js @@ -5,7 +5,7 @@ import { useSelector } from 'react-redux'; import { NETWORK_TYPE_RPC, NETWORK_TYPE_TO_ID_MAP, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; import LoadingIndicator from '../../ui/loading-indicator'; import ColorIndicator from '../../ui/color-indicator'; diff --git a/ui/app/components/app/permission-page-container/index.js b/ui/components/app/permission-page-container/index.js similarity index 100% rename from ui/app/components/app/permission-page-container/index.js rename to ui/components/app/permission-page-container/index.js diff --git a/ui/app/components/app/permission-page-container/index.scss b/ui/components/app/permission-page-container/index.scss similarity index 100% rename from ui/app/components/app/permission-page-container/index.scss rename to ui/components/app/permission-page-container/index.scss diff --git a/ui/app/components/app/permission-page-container/permission-page-container-content/index.js b/ui/components/app/permission-page-container/permission-page-container-content/index.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container-content/index.js rename to ui/components/app/permission-page-container/permission-page-container-content/index.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js b/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js rename to ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container.component.js b/ui/components/app/permission-page-container/permission-page-container.component.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container.component.js rename to ui/components/app/permission-page-container/permission-page-container.component.js diff --git a/ui/app/components/app/permission-page-container/permission-page-container.container.js b/ui/components/app/permission-page-container/permission-page-container.container.js similarity index 100% rename from ui/app/components/app/permission-page-container/permission-page-container.container.js rename to ui/components/app/permission-page-container/permission-page-container.container.js diff --git a/ui/app/components/app/permissions-connect-footer/index.js b/ui/components/app/permissions-connect-footer/index.js similarity index 100% rename from ui/app/components/app/permissions-connect-footer/index.js rename to ui/components/app/permissions-connect-footer/index.js diff --git a/ui/app/components/app/permissions-connect-footer/index.scss b/ui/components/app/permissions-connect-footer/index.scss similarity index 100% rename from ui/app/components/app/permissions-connect-footer/index.scss rename to ui/components/app/permissions-connect-footer/index.scss diff --git a/ui/app/components/app/permissions-connect-footer/permissions-connect-footer.component.js b/ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js similarity index 100% rename from ui/app/components/app/permissions-connect-footer/permissions-connect-footer.component.js rename to ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js diff --git a/ui/app/components/app/permissions-connect-header/index.js b/ui/components/app/permissions-connect-header/index.js similarity index 100% rename from ui/app/components/app/permissions-connect-header/index.js rename to ui/components/app/permissions-connect-header/index.js diff --git a/ui/app/components/app/permissions-connect-header/index.scss b/ui/components/app/permissions-connect-header/index.scss similarity index 100% rename from ui/app/components/app/permissions-connect-header/index.scss rename to ui/components/app/permissions-connect-header/index.scss diff --git a/ui/app/components/app/permissions-connect-header/permissions-connect-header.component.js b/ui/components/app/permissions-connect-header/permissions-connect-header.component.js similarity index 100% rename from ui/app/components/app/permissions-connect-header/permissions-connect-header.component.js rename to ui/components/app/permissions-connect-header/permissions-connect-header.component.js diff --git a/ui/app/components/app/selected-account/index.js b/ui/components/app/selected-account/index.js similarity index 100% rename from ui/app/components/app/selected-account/index.js rename to ui/components/app/selected-account/index.js diff --git a/ui/app/components/app/selected-account/index.scss b/ui/components/app/selected-account/index.scss similarity index 100% rename from ui/app/components/app/selected-account/index.scss rename to ui/components/app/selected-account/index.scss diff --git a/ui/app/components/app/selected-account/selected-account-component.test.js b/ui/components/app/selected-account/selected-account-component.test.js similarity index 100% rename from ui/app/components/app/selected-account/selected-account-component.test.js rename to ui/components/app/selected-account/selected-account-component.test.js diff --git a/ui/app/components/app/selected-account/selected-account.component.js b/ui/components/app/selected-account/selected-account.component.js similarity index 95% rename from ui/app/components/app/selected-account/selected-account.component.js rename to ui/components/app/selected-account/selected-account.component.js index 40d8c2a4e..b52dd033f 100644 --- a/ui/app/components/app/selected-account/selected-account.component.js +++ b/ui/components/app/selected-account/selected-account.component.js @@ -4,7 +4,7 @@ import copyToClipboard from 'copy-to-clipboard'; import { shortenAddress } from '../../../helpers/utils/util'; import Tooltip from '../../ui/tooltip'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; class SelectedAccount extends Component { state = { diff --git a/ui/app/components/app/selected-account/selected-account.container.js b/ui/components/app/selected-account/selected-account.container.js similarity index 100% rename from ui/app/components/app/selected-account/selected-account.container.js rename to ui/components/app/selected-account/selected-account.container.js diff --git a/ui/app/components/app/sidebars/index.js b/ui/components/app/sidebars/index.js similarity index 100% rename from ui/app/components/app/sidebars/index.js rename to ui/components/app/sidebars/index.js diff --git a/ui/app/components/app/sidebars/index.scss b/ui/components/app/sidebars/index.scss similarity index 100% rename from ui/app/components/app/sidebars/index.scss rename to ui/components/app/sidebars/index.scss diff --git a/ui/app/components/app/sidebars/sidebar-content.scss b/ui/components/app/sidebars/sidebar-content.scss similarity index 100% rename from ui/app/components/app/sidebars/sidebar-content.scss rename to ui/components/app/sidebars/sidebar-content.scss diff --git a/ui/app/components/app/sidebars/sidebar.component.js b/ui/components/app/sidebars/sidebar.component.js similarity index 88% rename from ui/app/components/app/sidebars/sidebar.component.js rename to ui/components/app/sidebars/sidebar.component.js index 7b385db22..b9fff51cd 100644 --- a/ui/app/components/app/sidebars/sidebar.component.js +++ b/ui/components/app/sidebars/sidebar.component.js @@ -30,12 +30,16 @@ export default class Sidebar extends Component { renderSidebarContent() { const { type, sidebarProps = {} } = this.props; - const { transaction = {}, onSubmit } = sidebarProps; + const { transaction = {}, onSubmit, hideBasic } = sidebarProps; switch (type) { case 'customize-gas': return (
- +
); default: diff --git a/ui/app/components/app/sidebars/sidebar.component.test.js b/ui/components/app/sidebars/sidebar.component.test.js similarity index 100% rename from ui/app/components/app/sidebars/sidebar.component.test.js rename to ui/components/app/sidebars/sidebar.component.test.js diff --git a/ui/app/components/app/signature-request-original/index.js b/ui/components/app/signature-request-original/index.js similarity index 100% rename from ui/app/components/app/signature-request-original/index.js rename to ui/components/app/signature-request-original/index.js diff --git a/ui/app/components/app/signature-request-original/index.scss b/ui/components/app/signature-request-original/index.scss similarity index 100% rename from ui/app/components/app/signature-request-original/index.scss rename to ui/components/app/signature-request-original/index.scss diff --git a/ui/app/components/app/signature-request-original/signature-request-original.component.js b/ui/components/app/signature-request-original/signature-request-original.component.js similarity index 97% rename from ui/app/components/app/signature-request-original/signature-request-original.component.js rename to ui/components/app/signature-request-original/signature-request-original.component.js index ae62fcad9..091916cc5 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.component.js +++ b/ui/components/app/signature-request-original/signature-request-original.component.js @@ -7,8 +7,8 @@ import { ObjectInspector } from 'react-inspector'; import { ENVIRONMENT_TYPE_NOTIFICATION, MESSAGE_TYPE, -} from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +} from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import AccountListItem from '../account-list-item'; import { conversionUtil } from '../../../helpers/utils/conversion-util'; @@ -188,12 +188,13 @@ export default class SignatureRequestOriginal extends Component { }; renderTypedData = (data) => { + const { t } = this.context; const { domain, message } = JSON.parse(data); return (
{domain ? (
-

Domain

+

{t('domain')}

) : ( @@ -201,7 +202,7 @@ export default class SignatureRequestOriginal extends Component { )} {message ? (
-

Message

+

{t('message')}

) : ( diff --git a/ui/app/components/app/signature-request-original/signature-request-original.container.js b/ui/components/app/signature-request-original/signature-request-original.container.js similarity index 96% rename from ui/app/components/app/signature-request-original/signature-request-original.container.js rename to ui/components/app/signature-request-original/signature-request-original.container.js index c32e30d66..f6181cc5b 100644 --- a/ui/app/components/app/signature-request-original/signature-request-original.container.js +++ b/ui/components/app/signature-request-original/signature-request-original.container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { compose } from 'redux'; import { withRouter } from 'react-router-dom'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import { goHome } from '../../../store/actions'; import { accountsWithSendEtherInfoSelector, diff --git a/ui/app/components/app/signature-request/index.js b/ui/components/app/signature-request/index.js similarity index 100% rename from ui/app/components/app/signature-request/index.js rename to ui/components/app/signature-request/index.js diff --git a/ui/app/components/app/signature-request/index.scss b/ui/components/app/signature-request/index.scss similarity index 100% rename from ui/app/components/app/signature-request/index.scss rename to ui/components/app/signature-request/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-footer/index.js b/ui/components/app/signature-request/signature-request-footer/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/index.js rename to ui/components/app/signature-request/signature-request-footer/index.js diff --git a/ui/app/components/app/signature-request/signature-request-footer/index.scss b/ui/components/app/signature-request/signature-request-footer/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/index.scss rename to ui/components/app/signature-request/signature-request-footer/index.scss diff --git a/ui/app/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 similarity index 100% rename from ui/app/components/app/signature-request/signature-request-footer/signature-request-footer.component.js rename to ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js diff --git a/ui/app/components/app/signature-request/signature-request-header/index.js b/ui/components/app/signature-request/signature-request-header/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/index.js rename to ui/components/app/signature-request/signature-request-header/index.js diff --git a/ui/app/components/app/signature-request/signature-request-header/index.scss b/ui/components/app/signature-request/signature-request-header/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/index.scss rename to ui/components/app/signature-request/signature-request-header/index.scss diff --git a/ui/app/components/app/signature-request/signature-request-header/signature-request-header.component.js b/ui/components/app/signature-request/signature-request-header/signature-request-header.component.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-header/signature-request-header.component.js rename to ui/components/app/signature-request/signature-request-header/signature-request-header.component.js diff --git a/ui/app/components/app/signature-request/signature-request-message/index.js b/ui/components/app/signature-request/signature-request-message/index.js similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/index.js rename to ui/components/app/signature-request/signature-request-message/index.js diff --git a/ui/app/components/app/signature-request/signature-request-message/index.scss b/ui/components/app/signature-request/signature-request-message/index.scss similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/index.scss rename to ui/components/app/signature-request/signature-request-message/index.scss diff --git a/ui/app/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 similarity index 100% rename from ui/app/components/app/signature-request/signature-request-message/signature-request-message.component.js rename to ui/components/app/signature-request/signature-request-message/signature-request-message.component.js diff --git a/ui/app/components/app/signature-request/signature-request.component.js b/ui/components/app/signature-request/signature-request.component.js similarity index 77% rename from ui/app/components/app/signature-request/signature-request.component.js rename to ui/components/app/signature-request/signature-request.component.js index 9515ac02a..37eefcfeb 100644 --- a/ui/app/components/app/signature-request/signature-request.component.js +++ b/ui/components/app/signature-request/signature-request.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import Identicon from '../../ui/identicon'; import Header from './signature-request-header'; import Footer from './signature-request-footer'; @@ -27,23 +27,25 @@ export default class SignatureRequest extends PureComponent { }; componentDidMount() { - const { clearConfirmTransaction, cancel } = this.props; - const { metricsEvent } = this.context; if (getEnvironmentType() === ENVIRONMENT_TYPE_NOTIFICATION) { - window.addEventListener('beforeunload', (event) => { - metricsEvent({ - eventOpts: { - category: 'Transactions', - action: 'Sign Request', - name: 'Cancel Sig Request Via Notification Close', - }, - }); - clearConfirmTransaction(); - cancel(event); - }); + window.addEventListener('beforeunload', this._beforeUnload); } } + _beforeUnload = (event) => { + const { clearConfirmTransaction, cancel } = this.props; + const { metricsEvent } = this.context; + metricsEvent({ + eventOpts: { + category: 'Transactions', + action: 'Sign Request', + name: 'Cancel Sig Request Via Notification Close', + }, + }); + clearConfirmTransaction(); + cancel(event); + }; + formatWallet(wallet) { return `${wallet.slice(0, 8)}...${wallet.slice( wallet.length - 8, @@ -63,6 +65,16 @@ export default class SignatureRequest extends PureComponent { const { address: fromAddress } = fromAccount; const { message, domain = {} } = JSON.parse(data); + const onSign = (event) => { + window.removeEventListener('beforeunload', this._beforeUnload); + sign(event); + }; + + const onCancel = (event) => { + window.removeEventListener('beforeunload', this._beforeUnload); + cancel(event); + }; + return (
@@ -86,7 +98,7 @@ export default class SignatureRequest extends PureComponent {
-
+
); } diff --git a/ui/app/components/app/signature-request/signature-request.component.test.js b/ui/components/app/signature-request/signature-request.component.test.js similarity index 87% rename from ui/app/components/app/signature-request/signature-request.component.test.js rename to ui/components/app/signature-request/signature-request.component.test.js index 1afa1b98c..12da052ff 100644 --- a/ui/app/components/app/signature-request/signature-request.component.test.js +++ b/ui/components/app/signature-request/signature-request.component.test.js @@ -1,12 +1,12 @@ import React from 'react'; -import shallow from '../../../../lib/shallow-with-context'; +import { shallowWithContext } from '../../../../test/lib/render-helpers'; import SignatureRequest from './signature-request.component'; describe('Signature Request Component', () => { describe('render', () => { const fromAddress = '0x123456789abcdef'; it('should render a div with one child', () => { - const wrapper = shallow( + const wrapper = shallowWithContext( undefined} cancel={() => undefined} diff --git a/ui/components/app/signature-request/signature-request.constants.js b/ui/components/app/signature-request/signature-request.constants.js new file mode 100644 index 000000000..e17841a0c --- /dev/null +++ b/ui/components/app/signature-request/signature-request.constants.js @@ -0,0 +1,3 @@ +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; + +export { ENVIRONMENT_TYPE_NOTIFICATION }; diff --git a/ui/app/components/app/signature-request/signature-request.container.js b/ui/components/app/signature-request/signature-request.container.js similarity index 95% rename from ui/app/components/app/signature-request/signature-request.container.js rename to ui/components/app/signature-request/signature-request.container.js index 4c45a256d..2d3546720 100644 --- a/ui/app/components/app/signature-request/signature-request.container.js +++ b/ui/components/app/signature-request/signature-request.container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; import { accountsWithSendEtherInfoSelector } from '../../../selectors'; import { getAccountByAddress } from '../../../helpers/utils/util'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import SignatureRequest from './signature-request.component'; function mapStateToProps(state) { diff --git a/ui/app/components/app/signature-request/signature-request.container.test.js b/ui/components/app/signature-request/signature-request.container.test.js similarity index 97% rename from ui/app/components/app/signature-request/signature-request.container.test.js rename to ui/components/app/signature-request/signature-request.container.test.js index c4de25b1a..c0bc03540 100644 --- a/ui/app/components/app/signature-request/signature-request.container.test.js +++ b/ui/components/app/signature-request/signature-request.container.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import SignatureRequest from './signature-request.container'; describe('Signature Request', () => { diff --git a/ui/app/components/app/signature-request/signature-request.stories.js b/ui/components/app/signature-request/signature-request.stories.js similarity index 93% rename from ui/app/components/app/signature-request/signature-request.stories.js rename to ui/components/app/signature-request/signature-request.stories.js index fd121cc86..1590f84e1 100644 --- a/ui/app/components/app/signature-request/signature-request.stories.js +++ b/ui/components/app/signature-request/signature-request.stories.js @@ -1,5 +1,5 @@ import React from 'react'; -import testData from '../../../../../.storybook/test-data'; +import testData from '../../../../.storybook/test-data'; import SignatureRequest from './signature-request.component'; const primaryIdentity = Object.values(testData.metamask.identities)[0]; diff --git a/ui/app/components/app/tab-bar/index.js b/ui/components/app/tab-bar/index.js similarity index 100% rename from ui/app/components/app/tab-bar/index.js rename to ui/components/app/tab-bar/index.js diff --git a/ui/app/components/app/tab-bar/index.scss b/ui/components/app/tab-bar/index.scss similarity index 100% rename from ui/app/components/app/tab-bar/index.scss rename to ui/components/app/tab-bar/index.scss diff --git a/ui/app/components/app/tab-bar/tab-bar.js b/ui/components/app/tab-bar/tab-bar.js similarity index 100% rename from ui/app/components/app/tab-bar/tab-bar.js rename to ui/components/app/tab-bar/tab-bar.js diff --git a/ui/app/components/app/token-cell/index.js b/ui/components/app/token-cell/index.js similarity index 100% rename from ui/app/components/app/token-cell/index.js rename to ui/components/app/token-cell/index.js diff --git a/ui/app/components/app/token-cell/token-cell.js b/ui/components/app/token-cell/token-cell.js similarity index 100% rename from ui/app/components/app/token-cell/token-cell.js rename to ui/components/app/token-cell/token-cell.js diff --git a/ui/app/components/app/token-cell/token-cell.scss b/ui/components/app/token-cell/token-cell.scss similarity index 100% rename from ui/app/components/app/token-cell/token-cell.scss rename to ui/components/app/token-cell/token-cell.scss diff --git a/ui/app/components/app/token-cell/token-cell.test.js b/ui/components/app/token-cell/token-cell.test.js similarity index 100% rename from ui/app/components/app/token-cell/token-cell.test.js rename to ui/components/app/token-cell/token-cell.test.js diff --git a/ui/app/components/app/token-list/index.js b/ui/components/app/token-list/index.js similarity index 100% rename from ui/app/components/app/token-list/index.js rename to ui/components/app/token-list/index.js diff --git a/ui/app/components/app/token-list/token-list.js b/ui/components/app/token-list/token-list.js similarity index 100% rename from ui/app/components/app/token-list/token-list.js rename to ui/components/app/token-list/token-list.js diff --git a/ui/app/components/app/transaction-activity-log/index.js b/ui/components/app/transaction-activity-log/index.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/index.js rename to ui/components/app/transaction-activity-log/index.js diff --git a/ui/app/components/app/transaction-activity-log/index.scss b/ui/components/app/transaction-activity-log/index.scss similarity index 100% rename from ui/app/components/app/transaction-activity-log/index.scss rename to ui/components/app/transaction-activity-log/index.scss diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/index.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/index.js rename to ui/components/app/transaction-activity-log/transaction-activity-log-icon/index.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js b/ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js rename to ui/components/app/transaction-activity-log/transaction-activity-log-icon/transaction-activity-log-icon.component.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js b/ui/components/app/transaction-activity-log/transaction-activity-log.component.js similarity index 88% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.component.js index 215932e9f..2e7cb77d3 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.component.js @@ -2,19 +2,19 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; +import { getBlockExplorerLink } from '@metamask/etherscan-link'; import { getEthConversionFromWeiHex, getValueFromWeiHex, } from '../../../helpers/utils/conversions.util'; import { formatDate } from '../../../helpers/utils/util'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; import TransactionActivityLogIcon from './transaction-activity-log-icon'; import { CONFIRMED_STATUS } from './transaction-activity-log.constants'; export default class TransactionActivityLog extends PureComponent { static contextTypes = { t: PropTypes.func, - metricEvent: PropTypes.func, + trackEvent: PropTypes.func, }; static propTypes = { @@ -32,10 +32,21 @@ export default class TransactionActivityLog extends PureComponent { }; handleActivityClick = (activity) => { - const etherscanUrl = getBlockExplorerUrlForTx( - activity, - this.props.rpcPrefs, - ); + const { rpcPrefs } = this.props; + const etherscanUrl = getBlockExplorerLink(activity, rpcPrefs); + + this.context.trackEvent({ + category: 'Transactions', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Transaction Block Explorer', + action: 'Activity Details', + block_explorer_domain: etherscanUrl + ? new URL(etherscanUrl)?.hostname + : '', + }, + }); + global.platform.openTab({ url: etherscanUrl }); }; diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.component.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.component.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.component.test.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js b/ui/components/app/transaction-activity-log/transaction-activity-log.constants.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.constants.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.constants.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.container.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.container.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.container.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js similarity index 100% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.container.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.container.test.js diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js b/ui/components/app/transaction-activity-log/transaction-activity-log.util.js similarity index 99% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.util.js index 624e1027d..ee3d7ee0a 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.util.js @@ -1,4 +1,4 @@ -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; import { getHexGasTotal } from '../../../helpers/utils/confirm-tx.util'; import { diff --git a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js similarity index 99% rename from ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js rename to ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js index 16211afd4..af7adee79 100644 --- a/ui/app/components/app/transaction-activity-log/transaction-activity-log.util.test.js +++ b/ui/components/app/transaction-activity-log/transaction-activity-log.util.test.js @@ -1,11 +1,11 @@ import { ROPSTEN_CHAIN_ID, ROPSTEN_NETWORK_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; import { combineTransactionHistories, getActivities, diff --git a/ui/app/components/app/transaction-breakdown/index.js b/ui/components/app/transaction-breakdown/index.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/index.js rename to ui/components/app/transaction-breakdown/index.js diff --git a/ui/app/components/app/transaction-breakdown/index.scss b/ui/components/app/transaction-breakdown/index.scss similarity index 100% rename from ui/app/components/app/transaction-breakdown/index.scss rename to ui/components/app/transaction-breakdown/index.scss diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/index.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/index.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss b/ui/components/app/transaction-breakdown/transaction-breakdown-row/index.scss similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/index.scss rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/index.scss diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js b/ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js rename to ui/components/app/transaction-breakdown/transaction-breakdown-row/transaction-breakdown-row.component.test.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.component.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.component.js diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js b/ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js similarity index 91% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js index 9b34276db..fb7916c46 100644 --- a/ui/app/components/app/transaction-breakdown/transaction-breakdown.component.test.js +++ b/ui/components/app/transaction-breakdown/transaction-breakdown.component.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; import TransactionBreakdown from './transaction-breakdown.component'; describe('TransactionBreakdown Component', () => { diff --git a/ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js b/ui/components/app/transaction-breakdown/transaction-breakdown.container.js similarity index 100% rename from ui/app/components/app/transaction-breakdown/transaction-breakdown.container.js rename to ui/components/app/transaction-breakdown/transaction-breakdown.container.js diff --git a/ui/app/components/app/transaction-icon/index.js b/ui/components/app/transaction-icon/index.js similarity index 100% rename from ui/app/components/app/transaction-icon/index.js rename to ui/components/app/transaction-icon/index.js diff --git a/ui/app/components/app/transaction-icon/transaction-icon.js b/ui/components/app/transaction-icon/transaction-icon.js similarity index 97% rename from ui/app/components/app/transaction-icon/transaction-icon.js rename to ui/components/app/transaction-icon/transaction-icon.js index 1876e0535..ec1b2a605 100644 --- a/ui/app/components/app/transaction-icon/transaction-icon.js +++ b/ui/components/app/transaction-icon/transaction-icon.js @@ -11,7 +11,7 @@ import { TRANSACTION_GROUP_CATEGORIES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; const ICON_MAP = { [TRANSACTION_GROUP_CATEGORIES.APPROVAL]: Approve, diff --git a/ui/app/components/app/transaction-icon/transaction-icon.scss b/ui/components/app/transaction-icon/transaction-icon.scss similarity index 100% rename from ui/app/components/app/transaction-icon/transaction-icon.scss rename to ui/components/app/transaction-icon/transaction-icon.scss diff --git a/ui/app/components/app/transaction-list-item-details/index.js b/ui/components/app/transaction-list-item-details/index.js similarity index 100% rename from ui/app/components/app/transaction-list-item-details/index.js rename to ui/components/app/transaction-list-item-details/index.js diff --git a/ui/app/components/app/transaction-list-item-details/index.scss b/ui/components/app/transaction-list-item-details/index.scss similarity index 100% rename from ui/app/components/app/transaction-list-item-details/index.scss rename to ui/components/app/transaction-list-item-details/index.scss diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js similarity index 91% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js index c1256d7cb..d6f6bf159 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js @@ -1,6 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import copyToClipboard from 'copy-to-clipboard'; +import { getBlockExplorerLink } from '@metamask/etherscan-link'; import SenderToRecipient from '../../ui/sender-to-recipient'; import { FLAT_VARIANT } from '../../ui/sender-to-recipient/sender-to-recipient.constants'; import TransactionActivityLog from '../transaction-activity-log'; @@ -9,13 +10,13 @@ import Button from '../../ui/button'; import Tooltip from '../../ui/tooltip'; import Copy from '../../ui/icon/copy-icon.component'; import Popover from '../../ui/popover'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; export default class TransactionListItemDetails extends PureComponent { static contextTypes = { t: PropTypes.func, metricsEvent: PropTypes.func, + trackEvent: PropTypes.func, }; static defaultProps = { @@ -47,22 +48,30 @@ export default class TransactionListItemDetails extends PureComponent { justCopied: false, }; - handleEtherscanClick = () => { + handleBlockExplorerClick = () => { const { transactionGroup: { primaryTransaction }, rpcPrefs, } = this.props; + const blockExplorerLink = getBlockExplorerLink( + primaryTransaction, + rpcPrefs, + ); - this.context.metricsEvent({ - eventOpts: { - category: 'Navigation', - action: 'Activity Log', - name: 'Clicked "View on Etherscan"', + this.context.trackEvent({ + category: 'Transactions', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Transaction Block Explorer', + action: 'Transaction Details', + block_explorer_domain: blockExplorerLink + ? new URL(blockExplorerLink)?.hostname + : '', }, }); global.platform.openTab({ - url: getBlockExplorerUrlForTx(primaryTransaction, rpcPrefs), + url: blockExplorerLink, }); }; @@ -203,10 +212,10 @@ export default class TransactionListItemDetails extends PureComponent { > {showRetry && ( diff --git a/ui/app/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 similarity index 98% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js index 42ac3c83b..409ca1092 100644 --- a/ui/app/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 @@ -4,7 +4,7 @@ import Button from '../../ui/button'; import SenderToRecipient from '../../ui/sender-to-recipient'; import TransactionBreakdown from '../transaction-breakdown'; import TransactionActivityLog from '../transaction-activity-log'; -import { TRANSACTION_STATUSES } from '../../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; import TransactionListItemDetails from './transaction-list-item-details.component'; describe('TransactionListItemDetails Component', () => { diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js b/ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js similarity index 94% rename from ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js rename to ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js index f1cbf6237..280cec020 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js +++ b/ui/components/app/transaction-list-item-details/transaction-list-item-details.container.js @@ -4,7 +4,7 @@ import { getAddressBook, getRpcPrefsForCurrentProvider, } from '../../../selectors'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import TransactionListItemDetails from './transaction-list-item-details.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/components/app/transaction-list-item/index.js b/ui/components/app/transaction-list-item/index.js similarity index 100% rename from ui/app/components/app/transaction-list-item/index.js rename to ui/components/app/transaction-list-item/index.js diff --git a/ui/app/components/app/transaction-list-item/index.scss b/ui/components/app/transaction-list-item/index.scss similarity index 100% rename from ui/app/components/app/transaction-list-item/index.scss rename to ui/components/app/transaction-list-item/index.scss diff --git a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js similarity index 99% rename from ui/app/components/app/transaction-list-item/transaction-list-item.component.js rename to ui/components/app/transaction-list-item/transaction-list-item.component.js index d3f957904..98635cce4 100644 --- a/ui/app/components/app/transaction-list-item/transaction-list-item.component.js +++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js @@ -17,7 +17,7 @@ import TransactionIcon from '../transaction-icon'; import { TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; export default function TransactionListItem({ transactionGroup, diff --git a/ui/app/components/app/transaction-list/index.js b/ui/components/app/transaction-list/index.js similarity index 100% rename from ui/app/components/app/transaction-list/index.js rename to ui/components/app/transaction-list/index.js diff --git a/ui/app/components/app/transaction-list/index.scss b/ui/components/app/transaction-list/index.scss similarity index 100% rename from ui/app/components/app/transaction-list/index.scss rename to ui/components/app/transaction-list/index.scss diff --git a/ui/app/components/app/transaction-list/transaction-list.component.js b/ui/components/app/transaction-list/transaction-list.component.js similarity index 97% rename from ui/app/components/app/transaction-list/transaction-list.component.js rename to ui/components/app/transaction-list/transaction-list.component.js index 389a76025..bfd294000 100644 --- a/ui/app/components/app/transaction-list/transaction-list.component.js +++ b/ui/components/app/transaction-list/transaction-list.component.js @@ -10,8 +10,8 @@ import { useI18nContext } from '../../../hooks/useI18nContext'; import TransactionListItem from '../transaction-list-item'; import Button from '../../ui/button'; import { TOKEN_CATEGORY_HASH } from '../../../helpers/constants/transactions'; -import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP } from '../../../../../shared/constants/swaps'; -import { TRANSACTION_TYPES } from '../../../../../shared/constants/transaction'; +import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP } from '../../../../shared/constants/swaps'; +import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; const PAGE_INCREMENT = 10; @@ -159,7 +159,7 @@ export default function TransactionList({ rounded onClick={viewMore} > - View More + {t('viewMore')} )} diff --git a/ui/app/components/app/transaction-status/index.js b/ui/components/app/transaction-status/index.js similarity index 100% rename from ui/app/components/app/transaction-status/index.js rename to ui/components/app/transaction-status/index.js diff --git a/ui/app/components/app/transaction-status/index.scss b/ui/components/app/transaction-status/index.scss similarity index 100% rename from ui/app/components/app/transaction-status/index.scss rename to ui/components/app/transaction-status/index.scss diff --git a/ui/app/components/app/transaction-status/transaction-status.component.js b/ui/components/app/transaction-status/transaction-status.component.js similarity index 97% rename from ui/app/components/app/transaction-status/transaction-status.component.js rename to ui/components/app/transaction-status/transaction-status.component.js index 6049a33a9..f8f5f8018 100644 --- a/ui/app/components/app/transaction-status/transaction-status.component.js +++ b/ui/components/app/transaction-status/transaction-status.component.js @@ -7,7 +7,7 @@ import { useI18nContext } from '../../../hooks/useI18nContext'; import { TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../../shared/constants/transaction'; +} from '../../../../shared/constants/transaction'; const QUEUED_PSEUDO_STATUS = 'queued'; diff --git a/ui/app/components/app/transaction-status/transaction-status.component.test.js b/ui/components/app/transaction-status/transaction-status.component.test.js similarity index 100% rename from ui/app/components/app/transaction-status/transaction-status.component.test.js rename to ui/components/app/transaction-status/transaction-status.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-display/index.js b/ui/components/app/user-preferenced-currency-display/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-display/index.js rename to ui/components/app/user-preferenced-currency-display/index.js diff --git a/ui/app/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 similarity index 94% rename from ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js rename to ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.js index aa1aba7e7..e572d8adb 100644 --- a/ui/app/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 @@ -22,7 +22,9 @@ export default function UserPreferencedCurrencyDisplay({ const prefixComponent = useMemo(() => { return ( currency === ETH && - showEthLogo && + showEthLogo && ( + + ) ); }, [currency, showEthLogo, ethLogoHeight]); diff --git a/ui/app/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 similarity index 100% rename from ui/app/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js rename to ui/components/app/user-preferenced-currency-display/user-preferenced-currency-display.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-input/index.js b/ui/components/app/user-preferenced-currency-input/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/index.js rename to ui/components/app/user-preferenced-currency-input/index.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.component.test.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.js diff --git a/ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js b/ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js rename to ui/components/app/user-preferenced-currency-input/user-preferenced-currency-input.container.test.js diff --git a/ui/app/components/app/user-preferenced-token-input/index.js b/ui/components/app/user-preferenced-token-input/index.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/index.js rename to ui/components/app/user-preferenced-token-input/index.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.component.test.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.js diff --git a/ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js b/ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js similarity index 100% rename from ui/app/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js rename to ui/components/app/user-preferenced-token-input/user-preferenced-token-input.container.test.js diff --git a/ui/app/components/app/wallet-overview/eth-overview.js b/ui/components/app/wallet-overview/eth-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/eth-overview.js rename to ui/components/app/wallet-overview/eth-overview.js diff --git a/ui/app/components/app/wallet-overview/index.js b/ui/components/app/wallet-overview/index.js similarity index 100% rename from ui/app/components/app/wallet-overview/index.js rename to ui/components/app/wallet-overview/index.js diff --git a/ui/app/components/app/wallet-overview/index.scss b/ui/components/app/wallet-overview/index.scss similarity index 100% rename from ui/app/components/app/wallet-overview/index.scss rename to ui/components/app/wallet-overview/index.scss diff --git a/ui/app/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/token-overview.js rename to ui/components/app/wallet-overview/token-overview.js diff --git a/ui/app/components/app/wallet-overview/wallet-overview.js b/ui/components/app/wallet-overview/wallet-overview.js similarity index 100% rename from ui/app/components/app/wallet-overview/wallet-overview.js rename to ui/components/app/wallet-overview/wallet-overview.js diff --git a/ui/app/components/app/whats-new-popup/index.js b/ui/components/app/whats-new-popup/index.js similarity index 100% rename from ui/app/components/app/whats-new-popup/index.js rename to ui/components/app/whats-new-popup/index.js diff --git a/ui/app/components/app/whats-new-popup/index.scss b/ui/components/app/whats-new-popup/index.scss similarity index 92% rename from ui/app/components/app/whats-new-popup/index.scss rename to ui/components/app/whats-new-popup/index.scss index 8f2aca460..b55c41b14 100644 --- a/ui/app/components/app/whats-new-popup/index.scss +++ b/ui/components/app/whats-new-popup/index.scss @@ -12,6 +12,12 @@ border-bottom: 1px solid $Grey-100; } + &__notification { + &:last-child { + border-bottom: none; + } + } + &__notification-image { align-self: center; margin-bottom: 16px; diff --git a/ui/app/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js similarity index 82% rename from ui/app/components/app/whats-new-popup/whats-new-popup.js rename to ui/components/app/whats-new-popup/whats-new-popup.js index 3eaad0af3..df0656810 100644 --- a/ui/app/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -1,4 +1,5 @@ import React, { useContext, useMemo, useRef, useState, useEffect } from 'react'; +import { useHistory } from 'react-router-dom'; import { useSelector } from 'react-redux'; import PropTypes from 'prop-types'; import classnames from 'classnames'; @@ -8,10 +9,11 @@ import { useEqualityCheck } from '../../../hooks/useEqualityCheck'; import Button from '../../ui/button'; import Popover from '../../ui/popover'; import { updateViewedNotifications } from '../../../store/actions'; -import { getTranslatedUINoficiations } from '../../../../../shared/notifications'; +import { getTranslatedUINoficiations } from '../../../../shared/notifications'; import { getSortedNotificationsToShow } from '../../../selectors'; +import { BUILD_QUOTE_ROUTE } from '../../../helpers/constants/routes'; -function getActionFunctionById(id) { +function getActionFunctionById(id, history) { const actionFunctions = { 2: () => { global.platform.openTab({ @@ -24,14 +26,24 @@ function getActionFunctionById(id) { url: 'https://community.metamask.io/t/about-the-security-category/72', }); }, + 4: () => { + updateViewedNotifications({ 4: true }); + history.push(BUILD_QUOTE_ROUTE); + }, + 5: () => { + updateViewedNotifications({ 5: true }); + global.platform.openTab({ + url: 'https://metamask.zendesk.com/hc/en-us/articles/360060826432', + }); + }, }; return actionFunctions[id]; } -const renderFirstNotification = (notification, idRefMap) => { +const renderFirstNotification = (notification, idRefMap, history) => { const { id, date, title, description, image, actionText } = notification; - const actionFunction = getActionFunctionById(id); + const actionFunction = getActionFunctionById(id, history); const imageComponent = image && ( { ); }; -const renderSubsequentNotification = (notification, idRefMap) => { +const renderSubsequentNotification = (notification, idRefMap, history) => { const { id, date, title, description, actionText } = notification; - const actionFunction = getActionFunctionById(id); + const actionFunction = getActionFunctionById(id, history); return (
{ export default function WhatsNewPopup({ onClose }) { const t = useContext(I18nContext); + const history = useHistory(); const notifications = useSelector(getSortedNotificationsToShow); const locale = useSelector(getCurrentLocale); @@ -167,9 +180,10 @@ export default function WhatsNewPopup({ onClose }) {
{notifications.map(({ id }, index) => { const notification = getTranslatedUINoficiations(t, locale)[id]; - return index === 0 - ? renderFirstNotification(notification, idRefMap) - : renderSubsequentNotification(notification, idRefMap); + // Display the swaps notification with full image + return index === 0 || id === 1 + ? renderFirstNotification(notification, idRefMap, history) + : renderSubsequentNotification(notification, idRefMap, history); })}
diff --git a/ui/app/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js b/ui/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js rename to ui/components/ui/account-mismatch-warning/acccount-mismatch-warning.component.test.js diff --git a/ui/app/components/ui/account-mismatch-warning/account-mismatch-warning.component.js b/ui/components/ui/account-mismatch-warning/account-mismatch-warning.component.js similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/account-mismatch-warning.component.js rename to ui/components/ui/account-mismatch-warning/account-mismatch-warning.component.js diff --git a/ui/app/components/ui/account-mismatch-warning/index.scss b/ui/components/ui/account-mismatch-warning/index.scss similarity index 100% rename from ui/app/components/ui/account-mismatch-warning/index.scss rename to ui/components/ui/account-mismatch-warning/index.scss diff --git a/ui/app/components/ui/alert-circle-icon/alert-circle-icon.component.js b/ui/components/ui/alert-circle-icon/alert-circle-icon.component.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/alert-circle-icon.component.js rename to ui/components/ui/alert-circle-icon/alert-circle-icon.component.js diff --git a/ui/app/components/ui/alert-circle-icon/alert-circle-icon.stories.js b/ui/components/ui/alert-circle-icon/alert-circle-icon.stories.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/alert-circle-icon.stories.js rename to ui/components/ui/alert-circle-icon/alert-circle-icon.stories.js diff --git a/ui/app/components/ui/alert-circle-icon/index.js b/ui/components/ui/alert-circle-icon/index.js similarity index 100% rename from ui/app/components/ui/alert-circle-icon/index.js rename to ui/components/ui/alert-circle-icon/index.js diff --git a/ui/app/components/ui/alert-circle-icon/index.scss b/ui/components/ui/alert-circle-icon/index.scss similarity index 100% rename from ui/app/components/ui/alert-circle-icon/index.scss rename to ui/components/ui/alert-circle-icon/index.scss diff --git a/ui/app/components/ui/alert/index.js b/ui/components/ui/alert/index.js similarity index 100% rename from ui/app/components/ui/alert/index.js rename to ui/components/ui/alert/index.js diff --git a/ui/app/components/ui/alert/index.scss b/ui/components/ui/alert/index.scss similarity index 100% rename from ui/app/components/ui/alert/index.scss rename to ui/components/ui/alert/index.scss diff --git a/ui/app/components/ui/alert/index.test.js b/ui/components/ui/alert/index.test.js similarity index 100% rename from ui/app/components/ui/alert/index.test.js rename to ui/components/ui/alert/index.test.js diff --git a/ui/app/components/ui/box/box.js b/ui/components/ui/box/box.js similarity index 97% rename from ui/app/components/ui/box/box.js rename to ui/components/ui/box/box.js index bf4756084..47d9617e6 100644 --- a/ui/app/components/ui/box/box.js +++ b/ui/components/ui/box/box.js @@ -9,6 +9,7 @@ import { DISPLAY, JUSTIFY_CONTENT, SIZES, + TEXT_ALIGN, } from '../../../helpers/constants/design-system'; const ValidSize = PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); @@ -70,6 +71,7 @@ export default function Box({ borderStyle, alignItems, justifyContent, + textAlign, display, width, height, @@ -113,6 +115,8 @@ export default function Box({ !display && (Boolean(justifyContent) || Boolean(alignItems)), [`box--justify-content-${justifyContent}`]: Boolean(justifyContent), [`box--align-items-${alignItems}`]: Boolean(alignItems), + // text align + [`box--text-align-${textAlign}`]: Boolean(textAlign), // display [`box--display-${display}`]: Boolean(display), // width & height @@ -144,6 +148,7 @@ Box.propTypes = { borderStyle: PropTypes.oneOf(Object.values(BORDER_STYLE)), alignItems: PropTypes.oneOf(Object.values(ALIGN_ITEMS)), justifyContent: PropTypes.oneOf(Object.values(JUSTIFY_CONTENT)), + textAlign: PropTypes.oneOf(Object.values(TEXT_ALIGN)), display: PropTypes.oneOf(Object.values(DISPLAY)), width: PropTypes.oneOf(Object.values(BLOCK_SIZES)), height: PropTypes.oneOf(Object.values(BLOCK_SIZES)), diff --git a/ui/app/components/ui/box/box.scss b/ui/components/ui/box/box.scss similarity index 97% rename from ui/app/components/ui/box/box.scss rename to ui/components/ui/box/box.scss index 6ef762766..9e7c0b776 100644 --- a/ui/app/components/ui/box/box.scss +++ b/ui/components/ui/box/box.scss @@ -129,6 +129,8 @@ $attributes: padding, margin; // text @each $alignment in design-system.$text-align { - text-align: $alignment; + &--text-align-#{$alignment} { + text-align: $alignment; + } } } diff --git a/ui/app/components/ui/box/box.stories.js b/ui/components/ui/box/box.stories.js similarity index 96% rename from ui/app/components/ui/box/box.stories.js rename to ui/components/ui/box/box.stories.js index a76d2fff5..ba41f454f 100644 --- a/ui/app/components/ui/box/box.stories.js +++ b/ui/components/ui/box/box.stories.js @@ -7,6 +7,7 @@ import { COLORS, DISPLAY, JUSTIFY_CONTENT, + TEXT_ALIGN, } from '../../../helpers/constants/design-system'; import Box from './box'; @@ -38,6 +39,7 @@ export const box = () => { undefined, 'display', )} + textAlign={select('textAlign', TEXT_ALIGN, undefined, 'left')} alignItems={select('alignItems', ALIGN_ITEMS, undefined, 'display')} margin={select('margin', sizeKnobOptions, undefined, 'margin')} marginTop={select('marginTop', sizeKnobOptions, undefined, 'margin')} diff --git a/ui/app/components/ui/box/index.js b/ui/components/ui/box/index.js similarity index 100% rename from ui/app/components/ui/box/index.js rename to ui/components/ui/box/index.js diff --git a/ui/app/components/ui/breadcrumbs/breadcrumbs.component.js b/ui/components/ui/breadcrumbs/breadcrumbs.component.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/breadcrumbs.component.js rename to ui/components/ui/breadcrumbs/breadcrumbs.component.js diff --git a/ui/app/components/ui/breadcrumbs/breadcrumbs.component.test.js b/ui/components/ui/breadcrumbs/breadcrumbs.component.test.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/breadcrumbs.component.test.js rename to ui/components/ui/breadcrumbs/breadcrumbs.component.test.js diff --git a/ui/app/components/ui/breadcrumbs/index.js b/ui/components/ui/breadcrumbs/index.js similarity index 100% rename from ui/app/components/ui/breadcrumbs/index.js rename to ui/components/ui/breadcrumbs/index.js diff --git a/ui/app/components/ui/breadcrumbs/index.scss b/ui/components/ui/breadcrumbs/index.scss similarity index 100% rename from ui/app/components/ui/breadcrumbs/index.scss rename to ui/components/ui/breadcrumbs/index.scss diff --git a/ui/app/components/ui/button-group/button-group-component.test.js b/ui/components/ui/button-group/button-group-component.test.js similarity index 100% rename from ui/app/components/ui/button-group/button-group-component.test.js rename to ui/components/ui/button-group/button-group-component.test.js diff --git a/ui/app/components/ui/button-group/button-group.component.js b/ui/components/ui/button-group/button-group.component.js similarity index 100% rename from ui/app/components/ui/button-group/button-group.component.js rename to ui/components/ui/button-group/button-group.component.js diff --git a/ui/app/components/ui/button-group/button-group.stories.js b/ui/components/ui/button-group/button-group.stories.js similarity index 100% rename from ui/app/components/ui/button-group/button-group.stories.js rename to ui/components/ui/button-group/button-group.stories.js diff --git a/ui/app/components/ui/button-group/index.js b/ui/components/ui/button-group/index.js similarity index 100% rename from ui/app/components/ui/button-group/index.js rename to ui/components/ui/button-group/index.js diff --git a/ui/app/components/ui/button-group/index.scss b/ui/components/ui/button-group/index.scss similarity index 100% rename from ui/app/components/ui/button-group/index.scss rename to ui/components/ui/button-group/index.scss diff --git a/ui/app/components/ui/button/button.component.js b/ui/components/ui/button/button.component.js similarity index 100% rename from ui/app/components/ui/button/button.component.js rename to ui/components/ui/button/button.component.js diff --git a/ui/app/components/ui/button/button.stories.js b/ui/components/ui/button/button.stories.js similarity index 100% rename from ui/app/components/ui/button/button.stories.js rename to ui/components/ui/button/button.stories.js diff --git a/ui/app/components/ui/button/buttons.scss b/ui/components/ui/button/buttons.scss similarity index 100% rename from ui/app/components/ui/button/buttons.scss rename to ui/components/ui/button/buttons.scss diff --git a/ui/app/components/ui/button/index.js b/ui/components/ui/button/index.js similarity index 100% rename from ui/app/components/ui/button/index.js rename to ui/components/ui/button/index.js diff --git a/ui/app/components/ui/callout/callout.js b/ui/components/ui/callout/callout.js similarity index 100% rename from ui/app/components/ui/callout/callout.js rename to ui/components/ui/callout/callout.js diff --git a/ui/app/components/ui/callout/callout.scss b/ui/components/ui/callout/callout.scss similarity index 100% rename from ui/app/components/ui/callout/callout.scss rename to ui/components/ui/callout/callout.scss diff --git a/ui/app/components/ui/callout/callout.stories.js b/ui/components/ui/callout/callout.stories.js similarity index 100% rename from ui/app/components/ui/callout/callout.stories.js rename to ui/components/ui/callout/callout.stories.js diff --git a/ui/app/components/ui/callout/index.js b/ui/components/ui/callout/index.js similarity index 100% rename from ui/app/components/ui/callout/index.js rename to ui/components/ui/callout/index.js diff --git a/ui/app/components/ui/card/card.component.js b/ui/components/ui/card/card.component.js similarity index 100% rename from ui/app/components/ui/card/card.component.js rename to ui/components/ui/card/card.component.js diff --git a/ui/app/components/ui/card/card.component.test.js b/ui/components/ui/card/card.component.test.js similarity index 100% rename from ui/app/components/ui/card/card.component.test.js rename to ui/components/ui/card/card.component.test.js diff --git a/ui/app/components/ui/card/index.js b/ui/components/ui/card/index.js similarity index 100% rename from ui/app/components/ui/card/index.js rename to ui/components/ui/card/index.js diff --git a/ui/app/components/ui/card/index.scss b/ui/components/ui/card/index.scss similarity index 100% rename from ui/app/components/ui/card/index.scss rename to ui/components/ui/card/index.scss diff --git a/ui/app/components/ui/check-box/check-box.component.js b/ui/components/ui/check-box/check-box.component.js similarity index 100% rename from ui/app/components/ui/check-box/check-box.component.js rename to ui/components/ui/check-box/check-box.component.js diff --git a/ui/app/components/ui/check-box/check-box.stories.js b/ui/components/ui/check-box/check-box.stories.js similarity index 100% rename from ui/app/components/ui/check-box/check-box.stories.js rename to ui/components/ui/check-box/check-box.stories.js diff --git a/ui/app/components/ui/check-box/index.js b/ui/components/ui/check-box/index.js similarity index 100% rename from ui/app/components/ui/check-box/index.js rename to ui/components/ui/check-box/index.js diff --git a/ui/app/components/ui/check-box/index.scss b/ui/components/ui/check-box/index.scss similarity index 100% rename from ui/app/components/ui/check-box/index.scss rename to ui/components/ui/check-box/index.scss diff --git a/ui/app/components/ui/chip/chip.js b/ui/components/ui/chip/chip.js similarity index 100% rename from ui/app/components/ui/chip/chip.js rename to ui/components/ui/chip/chip.js diff --git a/ui/app/components/ui/chip/chip.scss b/ui/components/ui/chip/chip.scss similarity index 100% rename from ui/app/components/ui/chip/chip.scss rename to ui/components/ui/chip/chip.scss diff --git a/ui/app/components/ui/chip/chip.stories.js b/ui/components/ui/chip/chip.stories.js similarity index 100% rename from ui/app/components/ui/chip/chip.stories.js rename to ui/components/ui/chip/chip.stories.js diff --git a/ui/app/components/ui/chip/index.js b/ui/components/ui/chip/index.js similarity index 100% rename from ui/app/components/ui/chip/index.js rename to ui/components/ui/chip/index.js diff --git a/ui/app/components/ui/circle-icon/circle-icon.component.js b/ui/components/ui/circle-icon/circle-icon.component.js similarity index 100% rename from ui/app/components/ui/circle-icon/circle-icon.component.js rename to ui/components/ui/circle-icon/circle-icon.component.js diff --git a/ui/app/components/ui/circle-icon/circle-icon.stories.js b/ui/components/ui/circle-icon/circle-icon.stories.js similarity index 100% rename from ui/app/components/ui/circle-icon/circle-icon.stories.js rename to ui/components/ui/circle-icon/circle-icon.stories.js diff --git a/ui/app/components/ui/circle-icon/index.js b/ui/components/ui/circle-icon/index.js similarity index 100% rename from ui/app/components/ui/circle-icon/index.js rename to ui/components/ui/circle-icon/index.js diff --git a/ui/app/components/ui/circle-icon/index.scss b/ui/components/ui/circle-icon/index.scss similarity index 100% rename from ui/app/components/ui/circle-icon/index.scss rename to ui/components/ui/circle-icon/index.scss diff --git a/ui/app/components/ui/color-indicator/color-indicator.js b/ui/components/ui/color-indicator/color-indicator.js similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.js rename to ui/components/ui/color-indicator/color-indicator.js diff --git a/ui/app/components/ui/color-indicator/color-indicator.scss b/ui/components/ui/color-indicator/color-indicator.scss similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.scss rename to ui/components/ui/color-indicator/color-indicator.scss diff --git a/ui/app/components/ui/color-indicator/color-indicator.stories.js b/ui/components/ui/color-indicator/color-indicator.stories.js similarity index 100% rename from ui/app/components/ui/color-indicator/color-indicator.stories.js rename to ui/components/ui/color-indicator/color-indicator.stories.js diff --git a/ui/app/components/ui/color-indicator/index.js b/ui/components/ui/color-indicator/index.js similarity index 100% rename from ui/app/components/ui/color-indicator/index.js rename to ui/components/ui/color-indicator/index.js diff --git a/ui/app/components/ui/confusable/confusable.component.js b/ui/components/ui/confusable/confusable.component.js similarity index 100% rename from ui/app/components/ui/confusable/confusable.component.js rename to ui/components/ui/confusable/confusable.component.js diff --git a/ui/app/components/ui/confusable/confusable.component.test.js b/ui/components/ui/confusable/confusable.component.test.js similarity index 100% rename from ui/app/components/ui/confusable/confusable.component.test.js rename to ui/components/ui/confusable/confusable.component.test.js diff --git a/ui/app/components/ui/confusable/index.js b/ui/components/ui/confusable/index.js similarity index 100% rename from ui/app/components/ui/confusable/index.js rename to ui/components/ui/confusable/index.js diff --git a/ui/app/components/ui/confusable/index.scss b/ui/components/ui/confusable/index.scss similarity index 100% rename from ui/app/components/ui/confusable/index.scss rename to ui/components/ui/confusable/index.scss diff --git a/ui/app/components/ui/currency-display/currency-display.component.js b/ui/components/ui/currency-display/currency-display.component.js similarity index 100% rename from ui/app/components/ui/currency-display/currency-display.component.js rename to ui/components/ui/currency-display/currency-display.component.js diff --git a/ui/app/components/ui/currency-display/currency-display.component.test.js b/ui/components/ui/currency-display/currency-display.component.test.js similarity index 100% rename from ui/app/components/ui/currency-display/currency-display.component.test.js rename to ui/components/ui/currency-display/currency-display.component.test.js diff --git a/ui/app/components/ui/currency-display/index.js b/ui/components/ui/currency-display/index.js similarity index 100% rename from ui/app/components/ui/currency-display/index.js rename to ui/components/ui/currency-display/index.js diff --git a/ui/app/components/ui/currency-display/index.scss b/ui/components/ui/currency-display/index.scss similarity index 100% rename from ui/app/components/ui/currency-display/index.scss rename to ui/components/ui/currency-display/index.scss diff --git a/ui/app/components/ui/currency-input/currency-input.component.js b/ui/components/ui/currency-input/currency-input.component.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.component.js rename to ui/components/ui/currency-input/currency-input.component.js diff --git a/ui/app/components/ui/currency-input/currency-input.component.test.js b/ui/components/ui/currency-input/currency-input.component.test.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.component.test.js rename to ui/components/ui/currency-input/currency-input.component.test.js diff --git a/ui/app/components/ui/currency-input/currency-input.container.js b/ui/components/ui/currency-input/currency-input.container.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.container.js rename to ui/components/ui/currency-input/currency-input.container.js diff --git a/ui/app/components/ui/currency-input/currency-input.container.test.js b/ui/components/ui/currency-input/currency-input.container.test.js similarity index 100% rename from ui/app/components/ui/currency-input/currency-input.container.test.js rename to ui/components/ui/currency-input/currency-input.container.test.js diff --git a/ui/app/components/ui/currency-input/index.js b/ui/components/ui/currency-input/index.js similarity index 100% rename from ui/app/components/ui/currency-input/index.js rename to ui/components/ui/currency-input/index.js diff --git a/ui/app/components/ui/currency-input/index.scss b/ui/components/ui/currency-input/index.scss similarity index 100% rename from ui/app/components/ui/currency-input/index.scss rename to ui/components/ui/currency-input/index.scss diff --git a/ui/app/components/ui/definition-list/definition-list.js b/ui/components/ui/definition-list/definition-list.js similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.js rename to ui/components/ui/definition-list/definition-list.js diff --git a/ui/app/components/ui/definition-list/definition-list.scss b/ui/components/ui/definition-list/definition-list.scss similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.scss rename to ui/components/ui/definition-list/definition-list.scss diff --git a/ui/app/components/ui/definition-list/definition-list.stories.js b/ui/components/ui/definition-list/definition-list.stories.js similarity index 100% rename from ui/app/components/ui/definition-list/definition-list.stories.js rename to ui/components/ui/definition-list/definition-list.stories.js diff --git a/ui/app/components/ui/definition-list/index.js b/ui/components/ui/definition-list/index.js similarity index 100% rename from ui/app/components/ui/definition-list/index.js rename to ui/components/ui/definition-list/index.js diff --git a/ui/app/components/ui/dialog/dialog.scss b/ui/components/ui/dialog/dialog.scss similarity index 100% rename from ui/app/components/ui/dialog/dialog.scss rename to ui/components/ui/dialog/dialog.scss diff --git a/ui/app/components/ui/dialog/index.js b/ui/components/ui/dialog/index.js similarity index 100% rename from ui/app/components/ui/dialog/index.js rename to ui/components/ui/dialog/index.js diff --git a/ui/app/components/ui/dropdown/dropdown.js b/ui/components/ui/dropdown/dropdown.js similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.js rename to ui/components/ui/dropdown/dropdown.js diff --git a/ui/app/components/ui/dropdown/dropdown.scss b/ui/components/ui/dropdown/dropdown.scss similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.scss rename to ui/components/ui/dropdown/dropdown.scss diff --git a/ui/app/components/ui/dropdown/dropdown.stories.js b/ui/components/ui/dropdown/dropdown.stories.js similarity index 100% rename from ui/app/components/ui/dropdown/dropdown.stories.js rename to ui/components/ui/dropdown/dropdown.stories.js diff --git a/ui/app/components/ui/dropdown/index.js b/ui/components/ui/dropdown/index.js similarity index 100% rename from ui/app/components/ui/dropdown/index.js rename to ui/components/ui/dropdown/index.js diff --git a/ui/app/components/ui/editable-label/editable-label.js b/ui/components/ui/editable-label/editable-label.js similarity index 100% rename from ui/app/components/ui/editable-label/editable-label.js rename to ui/components/ui/editable-label/editable-label.js diff --git a/ui/app/components/ui/editable-label/index.js b/ui/components/ui/editable-label/index.js similarity index 100% rename from ui/app/components/ui/editable-label/index.js rename to ui/components/ui/editable-label/index.js diff --git a/ui/app/components/ui/editable-label/index.scss b/ui/components/ui/editable-label/index.scss similarity index 100% rename from ui/app/components/ui/editable-label/index.scss rename to ui/components/ui/editable-label/index.scss diff --git a/ui/app/components/ui/error-message/error-message.component.js b/ui/components/ui/error-message/error-message.component.js similarity index 82% rename from ui/app/components/ui/error-message/error-message.component.js rename to ui/components/ui/error-message/error-message.component.js index 399c7c24c..542ecc47b 100644 --- a/ui/app/components/ui/error-message/error-message.component.js +++ b/ui/components/ui/error-message/error-message.component.js @@ -7,7 +7,11 @@ const ErrorMessage = (props, context) => { return (
- +
{`ALERT: ${error}`}
); diff --git a/ui/app/components/ui/error-message/error-message.component.test.js b/ui/components/ui/error-message/error-message.component.test.js similarity index 100% rename from ui/app/components/ui/error-message/error-message.component.test.js rename to ui/components/ui/error-message/error-message.component.test.js diff --git a/ui/app/components/ui/error-message/index.js b/ui/components/ui/error-message/index.js similarity index 100% rename from ui/app/components/ui/error-message/index.js rename to ui/components/ui/error-message/index.js diff --git a/ui/app/components/ui/error-message/index.scss b/ui/components/ui/error-message/index.scss similarity index 100% rename from ui/app/components/ui/error-message/index.scss rename to ui/components/ui/error-message/index.scss diff --git a/ui/app/components/ui/export-text-container/export-text-container.component.js b/ui/components/ui/export-text-container/export-text-container.component.js similarity index 100% rename from ui/app/components/ui/export-text-container/export-text-container.component.js rename to ui/components/ui/export-text-container/export-text-container.component.js diff --git a/ui/app/components/ui/export-text-container/index.js b/ui/components/ui/export-text-container/index.js similarity index 100% rename from ui/app/components/ui/export-text-container/index.js rename to ui/components/ui/export-text-container/index.js diff --git a/ui/app/components/ui/export-text-container/index.scss b/ui/components/ui/export-text-container/index.scss similarity index 100% rename from ui/app/components/ui/export-text-container/index.scss rename to ui/components/ui/export-text-container/index.scss diff --git a/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js b/ui/components/ui/hex-to-decimal/hex-to-decimal.component.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.js rename to ui/components/ui/hex-to-decimal/hex-to-decimal.component.js diff --git a/ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.test.js b/ui/components/ui/hex-to-decimal/hex-to-decimal.component.test.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/hex-to-decimal.component.test.js rename to ui/components/ui/hex-to-decimal/hex-to-decimal.component.test.js diff --git a/ui/app/components/ui/hex-to-decimal/index.js b/ui/components/ui/hex-to-decimal/index.js similarity index 100% rename from ui/app/components/ui/hex-to-decimal/index.js rename to ui/components/ui/hex-to-decimal/index.js diff --git a/ui/app/components/ui/icon-border/icon-border.js b/ui/components/ui/icon-border/icon-border.js similarity index 100% rename from ui/app/components/ui/icon-border/icon-border.js rename to ui/components/ui/icon-border/icon-border.js diff --git a/ui/app/components/ui/icon-border/icon-border.scss b/ui/components/ui/icon-border/icon-border.scss similarity index 100% rename from ui/app/components/ui/icon-border/icon-border.scss rename to ui/components/ui/icon-border/icon-border.scss diff --git a/ui/app/components/ui/icon-border/index.js b/ui/components/ui/icon-border/index.js similarity index 100% rename from ui/app/components/ui/icon-border/index.js rename to ui/components/ui/icon-border/index.js diff --git a/ui/app/components/ui/icon-button/icon-button.js b/ui/components/ui/icon-button/icon-button.js similarity index 100% rename from ui/app/components/ui/icon-button/icon-button.js rename to ui/components/ui/icon-button/icon-button.js diff --git a/ui/app/components/ui/icon-button/icon-button.scss b/ui/components/ui/icon-button/icon-button.scss similarity index 100% rename from ui/app/components/ui/icon-button/icon-button.scss rename to ui/components/ui/icon-button/icon-button.scss diff --git a/ui/app/components/ui/icon-button/index.js b/ui/components/ui/icon-button/index.js similarity index 100% rename from ui/app/components/ui/icon-button/index.js rename to ui/components/ui/icon-button/index.js diff --git a/ui/app/components/ui/icon-with-fallback/icon-with-fallback.component.js b/ui/components/ui/icon-with-fallback/icon-with-fallback.component.js similarity index 100% rename from ui/app/components/ui/icon-with-fallback/icon-with-fallback.component.js rename to ui/components/ui/icon-with-fallback/icon-with-fallback.component.js diff --git a/ui/app/components/ui/icon-with-fallback/icon-with-fallback.scss b/ui/components/ui/icon-with-fallback/icon-with-fallback.scss similarity index 100% rename from ui/app/components/ui/icon-with-fallback/icon-with-fallback.scss rename to ui/components/ui/icon-with-fallback/icon-with-fallback.scss diff --git a/ui/app/components/ui/icon-with-fallback/index.js b/ui/components/ui/icon-with-fallback/index.js similarity index 100% rename from ui/app/components/ui/icon-with-fallback/index.js rename to ui/components/ui/icon-with-fallback/index.js diff --git a/ui/app/components/ui/icon-with-label/icon-with-label.js b/ui/components/ui/icon-with-label/icon-with-label.js similarity index 100% rename from ui/app/components/ui/icon-with-label/icon-with-label.js rename to ui/components/ui/icon-with-label/icon-with-label.js diff --git a/ui/app/components/ui/icon-with-label/index.js b/ui/components/ui/icon-with-label/index.js similarity index 100% rename from ui/app/components/ui/icon-with-label/index.js rename to ui/components/ui/icon-with-label/index.js diff --git a/ui/app/components/ui/icon-with-label/index.scss b/ui/components/ui/icon-with-label/index.scss similarity index 100% rename from ui/app/components/ui/icon-with-label/index.scss rename to ui/components/ui/icon-with-label/index.scss diff --git a/ui/app/components/ui/icon/approve-icon.component.js b/ui/components/ui/icon/approve-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/approve-icon.component.js rename to ui/components/ui/icon/approve-icon.component.js diff --git a/ui/app/components/ui/icon/copy-icon.component.js b/ui/components/ui/icon/copy-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/copy-icon.component.js rename to ui/components/ui/icon/copy-icon.component.js diff --git a/ui/app/components/ui/icon/icon.stories.js b/ui/components/ui/icon/icon.stories.js similarity index 100% rename from ui/app/components/ui/icon/icon.stories.js rename to ui/components/ui/icon/icon.stories.js diff --git a/ui/app/components/ui/icon/index.scss b/ui/components/ui/icon/index.scss similarity index 100% rename from ui/app/components/ui/icon/index.scss rename to ui/components/ui/icon/index.scss diff --git a/ui/app/components/ui/icon/info-icon-inverted.component.js b/ui/components/ui/icon/info-icon-inverted.component.js similarity index 100% rename from ui/app/components/ui/icon/info-icon-inverted.component.js rename to ui/components/ui/icon/info-icon-inverted.component.js diff --git a/ui/app/components/ui/icon/info-icon.component.js b/ui/components/ui/icon/info-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/info-icon.component.js rename to ui/components/ui/icon/info-icon.component.js diff --git a/ui/app/components/ui/icon/interaction-icon.component.js b/ui/components/ui/icon/interaction-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/interaction-icon.component.js rename to ui/components/ui/icon/interaction-icon.component.js diff --git a/ui/app/components/ui/icon/overview-buy-icon.component.js b/ui/components/ui/icon/overview-buy-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/overview-buy-icon.component.js rename to ui/components/ui/icon/overview-buy-icon.component.js diff --git a/ui/app/components/ui/icon/overview-send-icon.component.js b/ui/components/ui/icon/overview-send-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/overview-send-icon.component.js rename to ui/components/ui/icon/overview-send-icon.component.js diff --git a/ui/app/components/ui/icon/paper-airplane-icon.js b/ui/components/ui/icon/paper-airplane-icon.js similarity index 100% rename from ui/app/components/ui/icon/paper-airplane-icon.js rename to ui/components/ui/icon/paper-airplane-icon.js diff --git a/ui/app/components/ui/icon/preloader/index.js b/ui/components/ui/icon/preloader/index.js similarity index 100% rename from ui/app/components/ui/icon/preloader/index.js rename to ui/components/ui/icon/preloader/index.js diff --git a/ui/app/components/ui/icon/preloader/index.scss b/ui/components/ui/icon/preloader/index.scss similarity index 100% rename from ui/app/components/ui/icon/preloader/index.scss rename to ui/components/ui/icon/preloader/index.scss diff --git a/ui/app/components/ui/icon/preloader/preloader-icon.component.js b/ui/components/ui/icon/preloader/preloader-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/preloader/preloader-icon.component.js rename to ui/components/ui/icon/preloader/preloader-icon.component.js diff --git a/ui/app/components/ui/icon/receive-icon.component.js b/ui/components/ui/icon/receive-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/receive-icon.component.js rename to ui/components/ui/icon/receive-icon.component.js diff --git a/ui/app/components/ui/icon/send-icon.component.js b/ui/components/ui/icon/send-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/send-icon.component.js rename to ui/components/ui/icon/send-icon.component.js diff --git a/ui/app/components/ui/icon/sign-icon.component.js b/ui/components/ui/icon/sign-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/sign-icon.component.js rename to ui/components/ui/icon/sign-icon.component.js diff --git a/ui/app/components/ui/icon/sun-check-icon.component.js b/ui/components/ui/icon/sun-check-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/sun-check-icon.component.js rename to ui/components/ui/icon/sun-check-icon.component.js diff --git a/ui/app/components/ui/icon/swap-icon-for-list.component.js b/ui/components/ui/icon/swap-icon-for-list.component.js similarity index 100% rename from ui/app/components/ui/icon/swap-icon-for-list.component.js rename to ui/components/ui/icon/swap-icon-for-list.component.js diff --git a/ui/app/components/ui/icon/swap-icon.component.js b/ui/components/ui/icon/swap-icon.component.js similarity index 100% rename from ui/app/components/ui/icon/swap-icon.component.js rename to ui/components/ui/icon/swap-icon.component.js diff --git a/ui/app/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js b/ui/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js similarity index 100% rename from ui/app/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js rename to ui/components/ui/identicon/blockieIdenticon/blockieIdenticon.component.js diff --git a/ui/app/components/ui/identicon/blockieIdenticon/index.js b/ui/components/ui/identicon/blockieIdenticon/index.js similarity index 100% rename from ui/app/components/ui/identicon/blockieIdenticon/index.js rename to ui/components/ui/identicon/blockieIdenticon/index.js diff --git a/ui/app/components/ui/identicon/identicon.component.js b/ui/components/ui/identicon/identicon.component.js similarity index 96% rename from ui/app/components/ui/identicon/identicon.component.js rename to ui/components/ui/identicon/identicon.component.js index 64a03ea01..dd6eb5beb 100644 --- a/ui/app/components/ui/identicon/identicon.component.js +++ b/ui/components/ui/identicon/identicon.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import contractMap from '@metamask/contract-metadata'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import Jazzicon from '../jazzicon'; import BlockieIdenticon from './blockieIdenticon'; diff --git a/ui/app/components/ui/identicon/identicon.component.test.js b/ui/components/ui/identicon/identicon.component.test.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.component.test.js rename to ui/components/ui/identicon/identicon.component.test.js diff --git a/ui/app/components/ui/identicon/identicon.container.js b/ui/components/ui/identicon/identicon.container.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.container.js rename to ui/components/ui/identicon/identicon.container.js diff --git a/ui/app/components/ui/identicon/identicon.stories.js b/ui/components/ui/identicon/identicon.stories.js similarity index 100% rename from ui/app/components/ui/identicon/identicon.stories.js rename to ui/components/ui/identicon/identicon.stories.js diff --git a/ui/app/components/ui/identicon/index.js b/ui/components/ui/identicon/index.js similarity index 100% rename from ui/app/components/ui/identicon/index.js rename to ui/components/ui/identicon/index.js diff --git a/ui/app/components/ui/identicon/index.scss b/ui/components/ui/identicon/index.scss similarity index 100% rename from ui/app/components/ui/identicon/index.scss rename to ui/components/ui/identicon/index.scss diff --git a/ui/app/components/ui/info-tooltip/index.js b/ui/components/ui/info-tooltip/index.js similarity index 100% rename from ui/app/components/ui/info-tooltip/index.js rename to ui/components/ui/info-tooltip/index.js diff --git a/ui/app/components/ui/info-tooltip/index.scss b/ui/components/ui/info-tooltip/index.scss similarity index 100% rename from ui/app/components/ui/info-tooltip/index.scss rename to ui/components/ui/info-tooltip/index.scss diff --git a/ui/app/components/ui/info-tooltip/info-tooltip.js b/ui/components/ui/info-tooltip/info-tooltip.js similarity index 100% rename from ui/app/components/ui/info-tooltip/info-tooltip.js rename to ui/components/ui/info-tooltip/info-tooltip.js diff --git a/ui/app/components/ui/info-tooltip/info-tooltip.stories.js b/ui/components/ui/info-tooltip/info-tooltip.stories.js similarity index 100% rename from ui/app/components/ui/info-tooltip/info-tooltip.stories.js rename to ui/components/ui/info-tooltip/info-tooltip.stories.js diff --git a/ui/app/components/ui/jazzicon/index.js b/ui/components/ui/jazzicon/index.js similarity index 100% rename from ui/app/components/ui/jazzicon/index.js rename to ui/components/ui/jazzicon/index.js diff --git a/ui/app/components/ui/jazzicon/jazzicon.component.js b/ui/components/ui/jazzicon/jazzicon.component.js similarity index 95% rename from ui/app/components/ui/jazzicon/jazzicon.component.js rename to ui/components/ui/jazzicon/jazzicon.component.js index 5d1953009..b0a35cb6f 100644 --- a/ui/app/components/ui/jazzicon/jazzicon.component.js +++ b/ui/components/ui/jazzicon/jazzicon.component.js @@ -1,7 +1,7 @@ import React, { createRef, PureComponent } from 'react'; import PropTypes from 'prop-types'; import jazzicon from '@metamask/jazzicon'; -import iconFactoryGenerator from '../../../../lib/icon-factory'; +import iconFactoryGenerator from '../../../helpers/utils/icon-factory'; const iconFactory = iconFactoryGenerator(jazzicon); diff --git a/ui/app/components/ui/list-item/index.js b/ui/components/ui/list-item/index.js similarity index 100% rename from ui/app/components/ui/list-item/index.js rename to ui/components/ui/list-item/index.js diff --git a/ui/app/components/ui/list-item/index.scss b/ui/components/ui/list-item/index.scss similarity index 100% rename from ui/app/components/ui/list-item/index.scss rename to ui/components/ui/list-item/index.scss diff --git a/ui/app/components/ui/list-item/list-item.component.js b/ui/components/ui/list-item/list-item.component.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.component.js rename to ui/components/ui/list-item/list-item.component.js diff --git a/ui/app/components/ui/list-item/list-item.component.test.js b/ui/components/ui/list-item/list-item.component.test.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.component.test.js rename to ui/components/ui/list-item/list-item.component.test.js diff --git a/ui/app/components/ui/list-item/list-item.stories.js b/ui/components/ui/list-item/list-item.stories.js similarity index 100% rename from ui/app/components/ui/list-item/list-item.stories.js rename to ui/components/ui/list-item/list-item.stories.js diff --git a/ui/app/components/ui/loading-indicator/index.js b/ui/components/ui/loading-indicator/index.js similarity index 100% rename from ui/app/components/ui/loading-indicator/index.js rename to ui/components/ui/loading-indicator/index.js diff --git a/ui/app/components/ui/loading-indicator/loading-indicator.js b/ui/components/ui/loading-indicator/loading-indicator.js similarity index 100% rename from ui/app/components/ui/loading-indicator/loading-indicator.js rename to ui/components/ui/loading-indicator/loading-indicator.js diff --git a/ui/app/components/ui/loading-indicator/loading-indicator.scss b/ui/components/ui/loading-indicator/loading-indicator.scss similarity index 100% rename from ui/app/components/ui/loading-indicator/loading-indicator.scss rename to ui/components/ui/loading-indicator/loading-indicator.scss diff --git a/ui/app/components/ui/loading-screen/index.js b/ui/components/ui/loading-screen/index.js similarity index 100% rename from ui/app/components/ui/loading-screen/index.js rename to ui/components/ui/loading-screen/index.js diff --git a/ui/app/components/ui/loading-screen/index.scss b/ui/components/ui/loading-screen/index.scss similarity index 100% rename from ui/app/components/ui/loading-screen/index.scss rename to ui/components/ui/loading-screen/index.scss diff --git a/ui/app/components/ui/loading-screen/loading-screen.component.js b/ui/components/ui/loading-screen/loading-screen.component.js similarity index 100% rename from ui/app/components/ui/loading-screen/loading-screen.component.js rename to ui/components/ui/loading-screen/loading-screen.component.js diff --git a/ui/app/components/ui/lock-icon/index.js b/ui/components/ui/lock-icon/index.js similarity index 100% rename from ui/app/components/ui/lock-icon/index.js rename to ui/components/ui/lock-icon/index.js diff --git a/ui/app/components/ui/lock-icon/lock-icon.component.js b/ui/components/ui/lock-icon/lock-icon.component.js similarity index 100% rename from ui/app/components/ui/lock-icon/lock-icon.component.js rename to ui/components/ui/lock-icon/lock-icon.component.js diff --git a/ui/app/components/ui/mascot/index.js b/ui/components/ui/mascot/index.js similarity index 100% rename from ui/app/components/ui/mascot/index.js rename to ui/components/ui/mascot/index.js diff --git a/ui/app/components/ui/mascot/mascot.component.js b/ui/components/ui/mascot/mascot.component.js similarity index 100% rename from ui/app/components/ui/mascot/mascot.component.js rename to ui/components/ui/mascot/mascot.component.js diff --git a/ui/app/components/ui/mascot/mascot.stories.js b/ui/components/ui/mascot/mascot.stories.js similarity index 100% rename from ui/app/components/ui/mascot/mascot.stories.js rename to ui/components/ui/mascot/mascot.stories.js diff --git a/ui/app/components/ui/menu/index.js b/ui/components/ui/menu/index.js similarity index 100% rename from ui/app/components/ui/menu/index.js rename to ui/components/ui/menu/index.js diff --git a/ui/app/components/ui/menu/menu-item.js b/ui/components/ui/menu/menu-item.js similarity index 100% rename from ui/app/components/ui/menu/menu-item.js rename to ui/components/ui/menu/menu-item.js diff --git a/ui/app/components/ui/menu/menu.js b/ui/components/ui/menu/menu.js similarity index 100% rename from ui/app/components/ui/menu/menu.js rename to ui/components/ui/menu/menu.js diff --git a/ui/app/components/ui/menu/menu.scss b/ui/components/ui/menu/menu.scss similarity index 100% rename from ui/app/components/ui/menu/menu.scss rename to ui/components/ui/menu/menu.scss diff --git a/ui/app/components/ui/menu/menu.stories.js b/ui/components/ui/menu/menu.stories.js similarity index 100% rename from ui/app/components/ui/menu/menu.stories.js rename to ui/components/ui/menu/menu.stories.js diff --git a/ui/app/components/ui/metafox-logo/index.js b/ui/components/ui/metafox-logo/index.js similarity index 100% rename from ui/app/components/ui/metafox-logo/index.js rename to ui/components/ui/metafox-logo/index.js diff --git a/ui/app/components/ui/metafox-logo/metafox-logo.component.js b/ui/components/ui/metafox-logo/metafox-logo.component.js similarity index 91% rename from ui/app/components/ui/metafox-logo/metafox-logo.component.js rename to ui/components/ui/metafox-logo/metafox-logo.component.js index 363bf422c..2b0b36c87 100644 --- a/ui/app/components/ui/metafox-logo/metafox-logo.component.js +++ b/ui/components/ui/metafox-logo/metafox-logo.component.js @@ -25,7 +25,7 @@ export default class MetaFoxLogo extends PureComponent { > { - const { value, onToggle, offLabel, onLabel } = props; + const { value, onToggle, offLabel, onLabel, disabled } = props; const modifier = value ? 'on' : 'off'; return ( -
+
{ diff --git a/ui/app/contexts/metametrics.new.js b/ui/contexts/metametrics.new.js similarity index 91% rename from ui/app/contexts/metametrics.new.js rename to ui/contexts/metametrics.new.js index e46638c13..720fd6ed0 100644 --- a/ui/app/contexts/metametrics.new.js +++ b/ui/contexts/metametrics.new.js @@ -16,7 +16,7 @@ import { matchPath, useLocation, useRouteMatch } from 'react-router-dom'; import { captureException, captureMessage } from '@sentry/browser'; import { omit } from 'lodash'; -import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../app/scripts/lib/util'; import { PATH_NAME_MAP } from '../helpers/constants/routes'; import { txDataSelector } from '../selectors'; @@ -24,10 +24,10 @@ import { trackMetaMetricsEvent, trackMetaMetricsPage } from '../store/actions'; // type imports /** - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPageObject} MetaMetricsPageObject - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsReferrerObject} MetaMetricsReferrerObject + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPageObject} MetaMetricsPageObject + * @typedef {import('../../shared/constants/metametrics').MetaMetricsReferrerObject} MetaMetricsReferrerObject */ // types diff --git a/ui/app/css/base-styles.scss b/ui/css/base-styles.scss similarity index 78% rename from ui/app/css/base-styles.scss rename to ui/css/base-styles.scss index 4c209ff55..14ffafefc 100644 --- a/ui/app/css/base-styles.scss +++ b/ui/css/base-styles.scss @@ -31,11 +31,11 @@ html { /* This error class is used in the following files still: - /ui/app/pages/create-account/connect-hardware/index.js - /ui/app/pages/create-account/import-account/json.js - /ui/app/pages/create-account/import-account/private-key.js - /ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js - /ui/app/pages/keychains/restore-vault.js + /ui/pages/create-account/connect-hardware/index.js + /ui/pages/create-account/import-account/json.js + /ui/pages/create-account/import-account/private-key.js + /ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js + /ui/pages/keychains/restore-vault.js */ .error { color: #f7861c; @@ -45,8 +45,8 @@ html { /* This warning class is used in the following files still: - /ui/app/pages/create-account/import-account/json.js - /ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js + /ui/pages/create-account/import-account/json.js + /ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js */ .warning { color: #ffae00; diff --git a/ui/app/css/design-system/attributes.scss b/ui/css/design-system/attributes.scss similarity index 100% rename from ui/app/css/design-system/attributes.scss rename to ui/css/design-system/attributes.scss diff --git a/ui/app/css/design-system/breakpoints.scss b/ui/css/design-system/breakpoints.scss similarity index 100% rename from ui/app/css/design-system/breakpoints.scss rename to ui/css/design-system/breakpoints.scss diff --git a/ui/app/css/design-system/colors.scss b/ui/css/design-system/colors.scss similarity index 100% rename from ui/app/css/design-system/colors.scss rename to ui/css/design-system/colors.scss diff --git a/ui/app/css/design-system/deprecated-colors.scss b/ui/css/design-system/deprecated-colors.scss similarity index 100% rename from ui/app/css/design-system/deprecated-colors.scss rename to ui/css/design-system/deprecated-colors.scss diff --git a/ui/app/css/design-system/index.scss b/ui/css/design-system/index.scss similarity index 100% rename from ui/app/css/design-system/index.scss rename to ui/css/design-system/index.scss diff --git a/ui/app/css/design-system/typography.scss b/ui/css/design-system/typography.scss similarity index 92% rename from ui/app/css/design-system/typography.scss rename to ui/css/design-system/typography.scss index 707170c24..12b7d37ea 100644 --- a/ui/app/css/design-system/typography.scss +++ b/ui/css/design-system/typography.scss @@ -1,8 +1,8 @@ $fa-font-path: '/fonts/fontawesome'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/solid'; -@import '../../../../node_modules/@fortawesome/fontawesome-free/scss/regular'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/solid'; +@import '../../../node_modules/@fortawesome/fontawesome-free/scss/regular'; @font-face { font-family: 'Roboto'; diff --git a/ui/app/css/design-system/z-index.scss b/ui/css/design-system/z-index.scss similarity index 100% rename from ui/app/css/design-system/z-index.scss rename to ui/css/design-system/z-index.scss diff --git a/ui/app/css/index.scss b/ui/css/index.scss similarity index 93% rename from ui/app/css/index.scss rename to ui/css/index.scss index aa2604242..fb0009d89 100644 --- a/ui/app/css/index.scss +++ b/ui/css/index.scss @@ -27,4 +27,4 @@ /* Third Party Library Styles */ -@import '../../../node_modules/react-tippy/dist/tippy'; +@import '../../node_modules/react-tippy/dist/tippy'; diff --git a/ui/app/css/itcss/README.md b/ui/css/itcss/README.md similarity index 100% rename from ui/app/css/itcss/README.md rename to ui/css/itcss/README.md diff --git a/ui/app/css/itcss/components/index.scss b/ui/css/itcss/components/index.scss similarity index 100% rename from ui/app/css/itcss/components/index.scss rename to ui/css/itcss/components/index.scss diff --git a/ui/app/css/itcss/components/network.scss b/ui/css/itcss/components/network.scss similarity index 100% rename from ui/app/css/itcss/components/network.scss rename to ui/css/itcss/components/network.scss diff --git a/ui/app/css/itcss/components/newui-sections.scss b/ui/css/itcss/components/newui-sections.scss similarity index 85% rename from ui/app/css/itcss/components/newui-sections.scss rename to ui/css/itcss/components/newui-sections.scss index 57c1f6d77..51f485600 100644 --- a/ui/app/css/itcss/components/newui-sections.scss +++ b/ui/css/itcss/components/newui-sections.scss @@ -14,6 +14,23 @@ $sub-mid-size-breakpoint-range: "screen and (min-width: #{$break-large}) and (ma align-items: center; } +// Fix for UI lag on external monitor: https://github.com/MetaMask/metamask-extension/issues/10173 +.app.os-mac.browser-chrome::after { + content: ""; + position: fixed; + top: 0; + left: 0; + width: 1px; + height: 1px; + background-color: $Grey-000; + animation: emptySpinningDiv 1s infinite linear; +} + +@keyframes emptySpinningDiv { + 0% { transform: rotate(0deg); } + to { transform: rotate(1turn); } +} + // Main container .main-container { z-index: $main-container-z-index; diff --git a/ui/app/css/itcss/components/send.scss b/ui/css/itcss/components/send.scss similarity index 100% rename from ui/app/css/itcss/components/send.scss rename to ui/css/itcss/components/send.scss diff --git a/ui/app/css/itcss/settings/index.scss b/ui/css/itcss/settings/index.scss similarity index 100% rename from ui/app/css/itcss/settings/index.scss rename to ui/css/itcss/settings/index.scss diff --git a/ui/app/css/itcss/settings/variables.scss b/ui/css/itcss/settings/variables.scss similarity index 100% rename from ui/app/css/itcss/settings/variables.scss rename to ui/css/itcss/settings/variables.scss diff --git a/ui/app/css/itcss/tools/index.scss b/ui/css/itcss/tools/index.scss similarity index 100% rename from ui/app/css/itcss/tools/index.scss rename to ui/css/itcss/tools/index.scss diff --git a/ui/app/css/itcss/tools/utilities.scss b/ui/css/itcss/tools/utilities.scss similarity index 100% rename from ui/app/css/itcss/tools/utilities.scss rename to ui/css/itcss/tools/utilities.scss diff --git a/ui/app/css/reset.scss b/ui/css/reset.scss similarity index 100% rename from ui/app/css/reset.scss rename to ui/css/reset.scss diff --git a/ui/app/css/utilities/_colors.scss b/ui/css/utilities/_colors.scss similarity index 100% rename from ui/app/css/utilities/_colors.scss rename to ui/css/utilities/_colors.scss diff --git a/ui/app/css/utilities/_spacing.scss b/ui/css/utilities/_spacing.scss similarity index 100% rename from ui/app/css/utilities/_spacing.scss rename to ui/css/utilities/_spacing.scss diff --git a/ui/app/css/utilities/index.scss b/ui/css/utilities/index.scss similarity index 100% rename from ui/app/css/utilities/index.scss rename to ui/css/utilities/index.scss diff --git a/ui/app/ducks/alerts/enums.js b/ui/ducks/alerts/enums.js similarity index 100% rename from ui/app/ducks/alerts/enums.js rename to ui/ducks/alerts/enums.js diff --git a/ui/app/ducks/alerts/index.js b/ui/ducks/alerts/index.js similarity index 100% rename from ui/app/ducks/alerts/index.js rename to ui/ducks/alerts/index.js diff --git a/ui/app/ducks/alerts/invalid-custom-network.js b/ui/ducks/alerts/invalid-custom-network.js similarity index 93% rename from ui/app/ducks/alerts/invalid-custom-network.js rename to ui/ducks/alerts/invalid-custom-network.js index ab033ed46..da3bd2e54 100644 --- a/ui/app/ducks/alerts/invalid-custom-network.js +++ b/ui/ducks/alerts/invalid-custom-network.js @@ -1,6 +1,6 @@ import { createSlice } from '@reduxjs/toolkit'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; import { ALERT_STATE } from './enums'; // Constants diff --git a/ui/app/ducks/alerts/unconnected-account.js b/ui/ducks/alerts/unconnected-account.js similarity index 98% rename from ui/app/ducks/alerts/unconnected-account.js rename to ui/ducks/alerts/unconnected-account.js index 2020def25..748389e18 100644 --- a/ui/app/ducks/alerts/unconnected-account.js +++ b/ui/ducks/alerts/unconnected-account.js @@ -1,7 +1,7 @@ import { createSlice } from '@reduxjs/toolkit'; import { captureException } from '@sentry/browser'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; import * as actionConstants from '../../store/actionConstants'; import { addPermittedAccount, diff --git a/ui/app/ducks/app/app.js b/ui/ducks/app/app.js similarity index 100% rename from ui/app/ducks/app/app.js rename to ui/ducks/app/app.js diff --git a/ui/app/ducks/app/app.test.js b/ui/ducks/app/app.test.js similarity index 100% rename from ui/app/ducks/app/app.test.js rename to ui/ducks/app/app.test.js diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.js b/ui/ducks/confirm-transaction/confirm-transaction.duck.js similarity index 100% rename from ui/app/ducks/confirm-transaction/confirm-transaction.duck.js rename to ui/ducks/confirm-transaction/confirm-transaction.duck.js diff --git a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js b/ui/ducks/confirm-transaction/confirm-transaction.duck.test.js similarity index 98% rename from ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js rename to ui/ducks/confirm-transaction/confirm-transaction.duck.test.js index 75e580a60..8df65c35a 100644 --- a/ui/app/ducks/confirm-transaction/confirm-transaction.duck.test.js +++ b/ui/ducks/confirm-transaction/confirm-transaction.duck.test.js @@ -4,8 +4,8 @@ import sinon from 'sinon'; import { ROPSTEN_CHAIN_ID, ROPSTEN_NETWORK_ID, -} from '../../../../shared/constants/network'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/network'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import ConfirmTransactionReducer, * as actions from './confirm-transaction.duck'; diff --git a/ui/app/ducks/gas/gas-duck.test.js b/ui/ducks/gas/gas-duck.test.js similarity index 76% rename from ui/app/ducks/gas/gas-duck.test.js rename to ui/ducks/gas/gas-duck.test.js index eab7a74b6..d4301f9b3 100644 --- a/ui/app/ducks/gas/gas-duck.test.js +++ b/ui/ducks/gas/gas-duck.test.js @@ -3,15 +3,14 @@ import sinon from 'sinon'; import BN from 'bn.js'; import GasReducer, { - basicGasEstimatesLoadingStarted, - basicGasEstimatesLoadingFinished, + setBasicEstimateStatus, setBasicGasEstimateData, setCustomGasPrice, setCustomGasLimit, fetchBasicGasEstimates, } from './gas.duck'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('../../helpers/utils/storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); @@ -49,7 +48,8 @@ describe('Gas Duck', () => { fast: null, safeLow: null, }, - basicEstimateIsLoading: true, + basicEstimateStatus: 'LOADING', + estimateSource: '', }; const providerState = { @@ -61,14 +61,12 @@ describe('Gas Duck', () => { type: 'mainnet', }; - const BASIC_GAS_ESTIMATE_LOADING_FINISHED = - 'metamask/gas/BASIC_GAS_ESTIMATE_LOADING_FINISHED'; - const BASIC_GAS_ESTIMATE_LOADING_STARTED = - 'metamask/gas/BASIC_GAS_ESTIMATE_LOADING_STARTED'; + const BASIC_GAS_ESTIMATE_STATUS = 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS'; const SET_BASIC_GAS_ESTIMATE_DATA = 'metamask/gas/SET_BASIC_GAS_ESTIMATE_DATA'; const SET_CUSTOM_GAS_LIMIT = 'metamask/gas/SET_CUSTOM_GAS_LIMIT'; const SET_CUSTOM_GAS_PRICE = 'metamask/gas/SET_CUSTOM_GAS_PRICE'; + const SET_ESTIMATE_SOURCE = 'metamask/gas/SET_ESTIMATE_SOURCE'; describe('GasReducer()', () => { it('should initialize state', () => { @@ -84,16 +82,13 @@ describe('Gas Duck', () => { ).toStrictEqual(mockState); }); - it('should set basicEstimateIsLoading to true when receiving a BASIC_GAS_ESTIMATE_LOADING_STARTED action', () => { + it('should set basicEstimateStatus to LOADING when receiving a BASIC_GAS_ESTIMATE_STATUS action with value LOADING', () => { expect( - GasReducer(mockState, { type: BASIC_GAS_ESTIMATE_LOADING_STARTED }), - ).toStrictEqual({ basicEstimateIsLoading: true, ...mockState }); - }); - - it('should set basicEstimateIsLoading to false when receiving a BASIC_GAS_ESTIMATE_LOADING_FINISHED action', () => { - expect( - GasReducer(mockState, { type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }), - ).toStrictEqual({ basicEstimateIsLoading: false, ...mockState }); + GasReducer(mockState, { + type: BASIC_GAS_ESTIMATE_STATUS, + value: 'LOADING', + }), + ).toStrictEqual({ basicEstimateStatus: 'LOADING', ...mockState }); }); it('should set basicEstimates when receiving a SET_BASIC_GAS_ESTIMATE_DATA action', () => { @@ -127,18 +122,17 @@ describe('Gas Duck', () => { }); }); - describe('basicGasEstimatesLoadingStarted', () => { - it('should create the correct action', () => { - expect(basicGasEstimatesLoadingStarted()).toStrictEqual({ - type: BASIC_GAS_ESTIMATE_LOADING_STARTED, - }); - }); + it('should set estimateSource to Metaswaps when receiving a SET_ESTIMATE_SOURCE action with value Metaswaps', () => { + expect( + GasReducer(mockState, { type: SET_ESTIMATE_SOURCE, value: 'Metaswaps' }), + ).toStrictEqual({ estimateSource: 'Metaswaps', ...mockState }); }); - describe('basicGasEstimatesLoadingFinished', () => { + describe('basicEstimateStatus', () => { it('should create the correct action', () => { - expect(basicGasEstimatesLoadingFinished()).toStrictEqual({ - type: BASIC_GAS_ESTIMATE_LOADING_FINISHED, + expect(setBasicEstimateStatus('LOADING')).toStrictEqual({ + type: BASIC_GAS_ESTIMATE_STATUS, + value: 'LOADING', }); }); }); @@ -158,7 +152,7 @@ describe('Gas Duck', () => { })); expect(mockDistpatch.getCall(0).args).toStrictEqual([ - { type: BASIC_GAS_ESTIMATE_LOADING_STARTED }, + { type: 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS', value: 'LOADING' }, ]); expect( @@ -168,7 +162,11 @@ describe('Gas Duck', () => { ).toStrictEqual(true); expect(mockDistpatch.getCall(2).args).toStrictEqual([ - { type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }, + { type: 'metamask/gas/SET_ESTIMATE_SOURCE', value: 'MetaSwaps' }, + ]); + + expect(mockDistpatch.getCall(4).args).toStrictEqual([ + { type: 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS', value: 'READY' }, ]); }); @@ -190,9 +188,12 @@ describe('Gas Duck', () => { metamask: { provider: { ...providerStateForTestNetwork } }, })); expect(mockDistpatch.getCall(0).args).toStrictEqual([ - { type: BASIC_GAS_ESTIMATE_LOADING_STARTED }, + { type: 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS', value: 'LOADING' }, ]); expect(mockDistpatch.getCall(1).args).toStrictEqual([ + { type: 'metamask/gas/SET_ESTIMATE_SOURCE', value: 'eth_gasprice' }, + ]); + expect(mockDistpatch.getCall(2).args).toStrictEqual([ { type: SET_BASIC_GAS_ESTIMATE_DATA, value: { @@ -200,8 +201,8 @@ describe('Gas Duck', () => { }, }, ]); - expect(mockDistpatch.getCall(2).args).toStrictEqual([ - { type: BASIC_GAS_ESTIMATE_LOADING_FINISHED }, + expect(mockDistpatch.getCall(3).args).toStrictEqual([ + { type: 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS', value: 'READY' }, ]); }); }); diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/ducks/gas/gas.duck.js similarity index 72% rename from ui/app/ducks/gas/gas.duck.js rename to ui/ducks/gas/gas.duck.js index 5785b2cf3..e991e5e73 100644 --- a/ui/app/ducks/gas/gas.duck.js +++ b/ui/ducks/gas/gas.duck.js @@ -1,6 +1,9 @@ import { cloneDeep } from 'lodash'; import BigNumber from 'bignumber.js'; -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; +import { + getStorageItem, + setStorageItem, +} from '../../helpers/utils/storage-helpers'; import { decGWEIToHexWEI, getValueFromWeiHex, @@ -8,15 +11,24 @@ import { import { getIsMainnet, getCurrentChainId } from '../../selectors'; import fetchWithCache from '../../helpers/utils/fetch-with-cache'; +export const BASIC_ESTIMATE_STATES = { + LOADING: 'LOADING', + FAILED: 'FAILED', + READY: 'READY', +}; + +export const GAS_SOURCE = { + METASWAPS: 'MetaSwaps', + ETHGASPRICE: 'eth_gasprice', +}; + // Actions -const BASIC_GAS_ESTIMATE_LOADING_FINISHED = - 'metamask/gas/BASIC_GAS_ESTIMATE_LOADING_FINISHED'; -const BASIC_GAS_ESTIMATE_LOADING_STARTED = - 'metamask/gas/BASIC_GAS_ESTIMATE_LOADING_STARTED'; +const BASIC_GAS_ESTIMATE_STATUS = 'metamask/gas/BASIC_GAS_ESTIMATE_STATUS'; const RESET_CUSTOM_DATA = 'metamask/gas/RESET_CUSTOM_DATA'; const SET_BASIC_GAS_ESTIMATE_DATA = 'metamask/gas/SET_BASIC_GAS_ESTIMATE_DATA'; const SET_CUSTOM_GAS_LIMIT = 'metamask/gas/SET_CUSTOM_GAS_LIMIT'; const SET_CUSTOM_GAS_PRICE = 'metamask/gas/SET_CUSTOM_GAS_PRICE'; +const SET_ESTIMATE_SOURCE = 'metamask/gas/SET_ESTIMATE_SOURCE'; const initState = { customData: { @@ -28,21 +40,17 @@ const initState = { average: null, fast: null, }, - basicEstimateIsLoading: true, + basicEstimateStatus: BASIC_ESTIMATE_STATES.LOADING, + estimateSource: '', }; // Reducer export default function reducer(state = initState, action) { switch (action.type) { - case BASIC_GAS_ESTIMATE_LOADING_STARTED: + case BASIC_GAS_ESTIMATE_STATUS: return { ...state, - basicEstimateIsLoading: true, - }; - case BASIC_GAS_ESTIMATE_LOADING_FINISHED: - return { - ...state, - basicEstimateIsLoading: false, + basicEstimateStatus: action.value, }; case SET_BASIC_GAS_ESTIMATE_DATA: return { @@ -70,21 +78,21 @@ export default function reducer(state = initState, action) { ...state, customData: cloneDeep(initState.customData), }; + case SET_ESTIMATE_SOURCE: + return { + ...state, + estimateSource: action.value, + }; default: return state; } } // Action Creators -export function basicGasEstimatesLoadingStarted() { +export function setBasicEstimateStatus(status) { return { - type: BASIC_GAS_ESTIMATE_LOADING_STARTED, - }; -} - -export function basicGasEstimatesLoadingFinished() { - return { - type: BASIC_GAS_ESTIMATE_LOADING_FINISHED, + type: BASIC_GAS_ESTIMATE_STATUS, + value: status, }; } @@ -106,18 +114,26 @@ export function fetchBasicGasEstimates() { return async (dispatch, getState) => { const isMainnet = getIsMainnet(getState()); - dispatch(basicGasEstimatesLoadingStarted()); - + dispatch(setBasicEstimateStatus(BASIC_ESTIMATE_STATES.LOADING)); let basicEstimates; - if (isMainnet || process.env.IN_TEST) { - basicEstimates = await fetchExternalBasicGasEstimates(); - } else { - basicEstimates = await fetchEthGasPriceEstimates(getState()); + try { + dispatch(setEstimateSource(GAS_SOURCE.ETHGASPRICE)); + if (isMainnet || process.env.IN_TEST) { + try { + basicEstimates = await fetchExternalBasicGasEstimates(); + dispatch(setEstimateSource(GAS_SOURCE.METASWAPS)); + } catch (error) { + basicEstimates = await fetchEthGasPriceEstimates(getState()); + } + } else { + basicEstimates = await fetchEthGasPriceEstimates(getState()); + } + dispatch(setBasicGasEstimateData(basicEstimates)); + dispatch(setBasicEstimateStatus(BASIC_ESTIMATE_STATES.READY)); + } catch (error) { + dispatch(setBasicEstimateStatus(BASIC_ESTIMATE_STATES.FAILED)); } - dispatch(setBasicGasEstimateData(basicEstimates)); - dispatch(basicGasEstimatesLoadingFinished()); - return basicEstimates; }; } @@ -211,3 +227,10 @@ export function setCustomGasLimit(newLimit) { export function resetCustomData() { return { type: RESET_CUSTOM_DATA }; } + +export function setEstimateSource(estimateSource) { + return { + type: SET_ESTIMATE_SOURCE, + value: estimateSource, + }; +} diff --git a/ui/app/ducks/history/history.js b/ui/ducks/history/history.js similarity index 100% rename from ui/app/ducks/history/history.js rename to ui/ducks/history/history.js diff --git a/ui/app/ducks/index.js b/ui/ducks/index.js similarity index 93% rename from ui/app/ducks/index.js rename to ui/ducks/index.js index 4782acc48..bae560536 100644 --- a/ui/app/ducks/index.js +++ b/ui/ducks/index.js @@ -1,5 +1,5 @@ import { combineReducers } from 'redux'; -import { ALERT_TYPES } from '../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../shared/constants/alerts'; import metamaskReducer from './metamask/metamask'; import localeMessagesReducer from './locale/locale'; import sendReducer from './send/send.duck'; diff --git a/ui/app/ducks/locale/locale.js b/ui/ducks/locale/locale.js similarity index 100% rename from ui/app/ducks/locale/locale.js rename to ui/ducks/locale/locale.js diff --git a/ui/app/ducks/metamask/metamask.js b/ui/ducks/metamask/metamask.js similarity index 95% rename from ui/app/ducks/metamask/metamask.js rename to ui/ducks/metamask/metamask.js index 7569f0ccb..093f3e925 100644 --- a/ui/app/ducks/metamask/metamask.js +++ b/ui/ducks/metamask/metamask.js @@ -1,6 +1,6 @@ import * as actionConstants from '../../store/actionConstants'; -import { ALERT_TYPES } from '../../../../shared/constants/alerts'; -import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { ALERT_TYPES } from '../../../shared/constants/alerts'; +import { NETWORK_TYPE_RPC } from '../../../shared/constants/network'; export default function reduceMetamask(state = {}, action) { const metamaskState = { @@ -93,13 +93,6 @@ export default function reduceMetamask(state = {}, action) { return Object.assign(metamaskState, { identities }); } - case actionConstants.SET_CURRENT_FIAT: - return Object.assign(metamaskState, { - currentCurrency: action.value.currentCurrency, - conversionRate: action.value.conversionRate, - conversionDate: action.value.conversionDate, - }); - case actionConstants.UPDATE_TOKENS: return { ...metamaskState, diff --git a/ui/app/ducks/metamask/metamask.test.js b/ui/ducks/metamask/metamask.test.js similarity index 94% rename from ui/app/ducks/metamask/metamask.test.js rename to ui/ducks/metamask/metamask.test.js index 2c268acc3..c830cd4a2 100644 --- a/ui/app/ducks/metamask/metamask.test.js +++ b/ui/ducks/metamask/metamask.test.js @@ -74,26 +74,6 @@ describe('MetaMask Reducers', () => { }); }); - it('sets current fiat', () => { - const value = { - currentCurrency: 'yen', - conversionRate: 3.14, - conversionDate: new Date(2018, 9), - }; - - const state = reduceMetamask( - {}, - { - type: actionConstants.SET_CURRENT_FIAT, - value, - }, - ); - - expect(state.currentCurrency).toStrictEqual(value.currentCurrency); - expect(state.conversionRate).toStrictEqual(value.conversionRate); - expect(state.conversionDate).toStrictEqual(value.conversionDate); - }); - it('updates tokens', () => { const newTokens = { address: '0x617b3f8050a0bd94b6b1da02b4384ee5b4df13f4', diff --git a/ui/app/ducks/send/send-duck.test.js b/ui/ducks/send/send-duck.test.js similarity index 100% rename from ui/app/ducks/send/send-duck.test.js rename to ui/ducks/send/send-duck.test.js diff --git a/ui/app/ducks/send/send.duck.js b/ui/ducks/send/send.duck.js similarity index 100% rename from ui/app/ducks/send/send.duck.js rename to ui/ducks/send/send.duck.js diff --git a/ui/app/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js similarity index 93% rename from ui/app/ducks/swaps/swaps.js rename to ui/ducks/swaps/swaps.js index f33b06745..34f7a84fe 100644 --- a/ui/app/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -26,6 +26,7 @@ import { cancelTx, } from '../../store/actions'; import { + AWAITING_SIGNATURES_ROUTE, AWAITING_SWAP_ROUTE, BUILD_QUOTE_ROUTE, LOADING_QUOTES_ROUTE, @@ -52,14 +53,17 @@ import { getUSDConversionRate, getSwapsDefaultToken, getCurrentChainId, + isHardwareWallet, + getHardwareWalletType, } from '../../selectors'; import { ERROR_FETCHING_QUOTES, QUOTES_NOT_AVAILABLE_ERROR, + CONTRACT_DATA_DISABLED_ERROR, SWAP_FAILED_ERROR, SWAPS_FETCH_ORDER_CONFLICT, -} from '../../../../shared/constants/swaps'; -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/swaps'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; const GAS_PRICES_LOADING_STATES = { INITIAL: 'INITIAL', @@ -73,6 +77,7 @@ export const FALLBACK_GAS_MULTIPLIER = 1.5; const initialState = { aggregatorMetadata: null, approveTxId: null, + tradeTxId: null, balanceError: false, fetchingQuotes: false, fromToken: null, @@ -95,6 +100,7 @@ const slice = createSlice({ clearSwapsState: () => initialState, navigatedBackToBuildQuote: (state) => { state.approveTxId = null; + state.tradeTxId = null; state.balanceError = false; state.fetchingQuotes = false; state.customGas.limit = null; @@ -437,7 +443,7 @@ export const fetchQuotesAndSetQuoteState = ( if ( toTokenAddress && toTokenSymbol !== swapsDefaultToken.symbol && - !contractExchangeRates[toTokenAddress] + contractExchangeRates[toTokenAddress] === undefined ) { destinationTokenAddedForSwap = true; await dispatch( @@ -479,6 +485,8 @@ export const fetchQuotesAndSetQuoteState = ( dispatch(setFromToken(selectedFromToken)); + const hardwareWalletUsed = isHardwareWallet(state); + const hardwareWalletType = getHardwareWalletType(state); metaMetricsEvent({ event: 'Quotes Requested', category: 'swaps', @@ -489,6 +497,8 @@ export const fetchQuotesAndSetQuoteState = ( request_type: balanceError ? 'Quote' : 'Order', slippage: maxSlippage, custom_slippage: maxSlippage !== 2, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, anonymizedData: true, }, }); @@ -536,6 +546,8 @@ export const fetchQuotesAndSetQuoteState = ( request_type: balanceError ? 'Quote' : 'Order', slippage: maxSlippage, custom_slippage: maxSlippage !== 2, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }); dispatch(setSwapsErrorKey(QUOTES_NOT_AVAILABLE_ERROR)); @@ -559,6 +571,8 @@ export const fetchQuotesAndSetQuoteState = ( response_time: Date.now() - fetchStartTime, best_quote_source: newSelectedQuote.aggregator, available_quotes: Object.values(fetchedQuotes)?.length, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, anonymizedData: true, }, }); @@ -585,7 +599,7 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { return async (dispatch, getState) => { const state = getState(); const chainId = getCurrentChainId(state); - + const hardwareWalletUsed = isHardwareWallet(state); let swapsFeatureIsLive = false; try { swapsFeatureIsLive = await fetchSwapsFeatureLiveness(chainId); @@ -605,7 +619,10 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { const { sourceTokenInfo = {}, destinationTokenInfo = {} } = metaData; await dispatch(setBackgroundSwapRouteState('awaiting')); await dispatch(stopPollingForQuotes()); - history.push(AWAITING_SWAP_ROUTE); + + if (!hardwareWalletUsed) { + history.push(AWAITING_SWAP_ROUTE); + } const { fast: fastGasEstimate } = getSwapGasPriceEstimateData(state); @@ -671,6 +688,8 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { performance_savings: usedQuote.savings?.performance, fee_savings: usedQuote.savings?.fee, median_metamask_fee: usedQuote.savings?.medianMetaMaskFee, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: getHardwareWalletType(state), }; metaMetricsEvent({ @@ -694,6 +713,13 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { let finalApproveTxMeta; const approveTxParams = getApproveTxParams(state); + + // For hardware wallets we go to the Awaiting Signatures page first and only after a user + // completes 1 or 2 confirmations, we redirect to the Awaiting Swap page. + if (hardwareWalletUsed) { + history.push(AWAITING_SIGNATURES_ROUTE); + } + if (approveTxParams) { const approveTxMeta = await dispatch( addUnapprovedTransaction( @@ -760,11 +786,20 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { try { await dispatch(updateAndApproveTx(finalTradeTxMeta, true)); } catch (e) { - await dispatch(setSwapsErrorKey(SWAP_FAILED_ERROR)); + const errorKey = e.message.includes('EthAppPleaseEnableContractData') + ? CONTRACT_DATA_DISABLED_ERROR + : SWAP_FAILED_ERROR; + await dispatch(setSwapsErrorKey(errorKey)); history.push(SWAPS_ERROR_ROUTE); return; } + // Only after a user confirms swapping on a hardware wallet (second `updateAndApproveTx` call above), + // we redirect to the Awaiting Swap page. + if (hardwareWalletUsed) { + history.push(AWAITING_SWAP_ROUTE); + } + await forceUpdateMetamaskState(dispatch); }; }; diff --git a/ui/app/ducks/swaps/swaps.test.js b/ui/ducks/swaps/swaps.test.js similarity index 98% rename from ui/app/ducks/swaps/swaps.test.js rename to ui/ducks/swaps/swaps.test.js index 585571d0e..a94869267 100644 --- a/ui/app/ducks/swaps/swaps.test.js +++ b/ui/ducks/swaps/swaps.test.js @@ -1,7 +1,7 @@ import nock from 'nock'; import { setSwapsLiveness } from '../../store/actions'; -import { setStorageItem } from '../../../lib/storage-helpers'; +import { setStorageItem } from '../../helpers/utils/storage-helpers'; import * as swaps from './swaps'; jest.mock('../../store/actions.js', () => ({ diff --git a/ui/app/helpers/constants/available-conversions.json b/ui/helpers/constants/available-conversions.json similarity index 100% rename from ui/app/helpers/constants/available-conversions.json rename to ui/helpers/constants/available-conversions.json diff --git a/ui/app/helpers/constants/common.js b/ui/helpers/constants/common.js similarity index 100% rename from ui/app/helpers/constants/common.js rename to ui/helpers/constants/common.js diff --git a/ui/app/helpers/constants/connected-sites.js b/ui/helpers/constants/connected-sites.js similarity index 100% rename from ui/app/helpers/constants/connected-sites.js rename to ui/helpers/constants/connected-sites.js diff --git a/ui/app/helpers/constants/design-system.js b/ui/helpers/constants/design-system.js similarity index 100% rename from ui/app/helpers/constants/design-system.js rename to ui/helpers/constants/design-system.js diff --git a/ui/app/helpers/constants/error-keys.js b/ui/helpers/constants/error-keys.js similarity index 55% rename from ui/app/helpers/constants/error-keys.js rename to ui/helpers/constants/error-keys.js index 85ce13d7d..bfdb7474f 100644 --- a/ui/app/helpers/constants/error-keys.js +++ b/ui/helpers/constants/error-keys.js @@ -2,3 +2,6 @@ export const INSUFFICIENT_FUNDS_ERROR_KEY = 'insufficientFunds'; export const GAS_LIMIT_TOO_LOW_ERROR_KEY = 'gasLimitTooLow'; export const TRANSACTION_ERROR_KEY = 'transactionError'; export const TRANSACTION_NO_CONTRACT_ERROR_KEY = 'transactionErrorNoContract'; +export const ETH_GAS_PRICE_FETCH_WARNING_KEY = 'ethGasPriceFetchWarning'; +export const GAS_PRICE_FETCH_FAILURE_ERROR_KEY = 'gasPriceFetchFailed'; +export const GAS_PRICE_EXCESSIVE_ERROR_KEY = 'gasPriceExcessive'; diff --git a/ui/app/helpers/constants/routes.js b/ui/helpers/constants/routes.js similarity index 92% rename from ui/app/helpers/constants/routes.js rename to ui/helpers/constants/routes.js index 1ed9a7f0d..781f51063 100644 --- a/ui/app/helpers/constants/routes.js +++ b/ui/helpers/constants/routes.js @@ -32,6 +32,7 @@ const SWAPS_ROUTE = '/swaps'; const BUILD_QUOTE_ROUTE = '/swaps/build-quote'; const VIEW_QUOTE_ROUTE = '/swaps/view-quote'; const LOADING_QUOTES_ROUTE = '/swaps/loading-quotes'; +const AWAITING_SIGNATURES_ROUTE = '/swaps/awaiting-signatures'; const AWAITING_SWAP_ROUTE = '/swaps/awaiting-swap'; const SWAPS_ERROR_ROUTE = '/swaps/swaps-error'; const SWAPS_MAINTENANCE_ROUTE = '/swaps/maintenance'; @@ -45,6 +46,7 @@ const INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE = const INITIALIZE_SELECT_ACTION_ROUTE = '/initialize/select-action'; const INITIALIZE_SEED_PHRASE_ROUTE = '/initialize/seed-phrase'; const INITIALIZE_BACKUP_SEED_PHRASE_ROUTE = '/initialize/backup-seed-phrase'; +const INITIALIZE_SEED_PHRASE_INTRO_ROUTE = '/initialize/seed-phrase-intro'; const INITIALIZE_END_OF_FLOW_ROUTE = '/initialize/end-of-flow'; const INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE = '/initialize/seed-phrase/confirm'; const INITIALIZE_METAMETRICS_OPT_IN_ROUTE = '/initialize/metametrics-opt-in'; @@ -80,7 +82,7 @@ const PATH_NAME_MAP = { [`${CONTACT_EDIT_ROUTE}/:address`]: 'Edit Contact Settings Page', [CONTACT_ADD_ROUTE]: 'Add Contact Settings Page', [`${CONTACT_VIEW_ROUTE}/:address`]: 'View Contact Settings Page', - [REVEAL_SEED_ROUTE]: 'Reveal Seed Page', + [REVEAL_SEED_ROUTE]: 'Reveal Secret Recovery Phrase Page', [MOBILE_SYNC_ROUTE]: 'Sync With Mobile Page', [RESTORE_VAULT_ROUTE]: 'Restore Vault Page', [ADD_TOKEN_ROUTE]: 'Add Token Page', @@ -112,15 +114,17 @@ const PATH_NAME_MAP = { [INITIALIZE_UNLOCK_ROUTE]: 'Initialization Unlock page', [INITIALIZE_CREATE_PASSWORD_ROUTE]: 'Initialization Create Password Page', [INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE]: - 'Initialization Import Account With Seed Phrase Page', + 'Initialization Import Account With Secret Recovery Phrase Page', [INITIALIZE_SELECT_ACTION_ROUTE]: 'Initialization Choose Restore or New Account Page', - [INITIALIZE_SEED_PHRASE_ROUTE]: 'Initialization Seed Phrase Page', + [INITIALIZE_SEED_PHRASE_ROUTE]: 'Initialization Secret Recovery Phrase Page', [INITIALIZE_BACKUP_SEED_PHRASE_ROUTE]: - 'Initialization Backup Seed Phrase Page', + 'Initialization Backup Secret Recovery Phrase Page', + [INITIALIZE_SEED_PHRASE_INTRO_ROUTE]: + 'Initialization Secret Recovery Phrase Intro Page', [INITIALIZE_END_OF_FLOW_ROUTE]: 'End of Initialization Page', [INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE]: - 'Initialization Confirm Seed Phrase Page', + 'Initialization Confirm Secret Recovery Phrase Page', [INITIALIZE_METAMETRICS_OPT_IN_ROUTE]: 'MetaMetrics Opt In Page', [BUILD_QUOTE_ROUTE]: 'Swaps Build Quote Page', [VIEW_QUOTE_ROUTE]: 'Swaps View Quotes Page', @@ -178,6 +182,7 @@ export { NETWORKS_ROUTE, NETWORKS_FORM_ROUTE, INITIALIZE_BACKUP_SEED_PHRASE_ROUTE, + INITIALIZE_SEED_PHRASE_INTRO_ROUTE, CONNECT_ROUTE, CONNECT_CONFIRM_PERMISSIONS_ROUTE, CONNECTED_ROUTE, @@ -188,6 +193,7 @@ export { VIEW_QUOTE_ROUTE, LOADING_QUOTES_ROUTE, AWAITING_SWAP_ROUTE, + AWAITING_SIGNATURES_ROUTE, SWAPS_ERROR_ROUTE, SWAPS_MAINTENANCE_ROUTE, }; diff --git a/ui/app/helpers/constants/transactions.js b/ui/helpers/constants/transactions.js similarity index 91% rename from ui/app/helpers/constants/transactions.js rename to ui/helpers/constants/transactions.js index 288d497e2..614f0329d 100644 --- a/ui/app/helpers/constants/transactions.js +++ b/ui/helpers/constants/transactions.js @@ -1,7 +1,7 @@ import { TRANSACTION_TYPES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; export const PENDING_STATUS_HASH = { [TRANSACTION_STATUSES.UNAPPROVED]: true, diff --git a/ui/app/helpers/higher-order-components/authenticated/authenticated.component.js b/ui/helpers/higher-order-components/authenticated/authenticated.component.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/authenticated.component.js rename to ui/helpers/higher-order-components/authenticated/authenticated.component.js diff --git a/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js b/ui/helpers/higher-order-components/authenticated/authenticated.container.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/authenticated.container.js rename to ui/helpers/higher-order-components/authenticated/authenticated.container.js diff --git a/ui/app/helpers/higher-order-components/authenticated/index.js b/ui/helpers/higher-order-components/authenticated/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/authenticated/index.js rename to ui/helpers/higher-order-components/authenticated/index.js diff --git a/ui/app/helpers/higher-order-components/feature-toggled-route.js b/ui/helpers/higher-order-components/feature-toggled-route.js similarity index 100% rename from ui/app/helpers/higher-order-components/feature-toggled-route.js rename to ui/helpers/higher-order-components/feature-toggled-route.js diff --git a/ui/app/helpers/higher-order-components/initialized/index.js b/ui/helpers/higher-order-components/initialized/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/index.js rename to ui/helpers/higher-order-components/initialized/index.js diff --git a/ui/app/helpers/higher-order-components/initialized/initialized.component.js b/ui/helpers/higher-order-components/initialized/initialized.component.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/initialized.component.js rename to ui/helpers/higher-order-components/initialized/initialized.component.js diff --git a/ui/app/helpers/higher-order-components/initialized/initialized.container.js b/ui/helpers/higher-order-components/initialized/initialized.container.js similarity index 100% rename from ui/app/helpers/higher-order-components/initialized/initialized.container.js rename to ui/helpers/higher-order-components/initialized/initialized.container.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/index.js b/ui/helpers/higher-order-components/with-modal-props/index.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/index.js rename to ui/helpers/higher-order-components/with-modal-props/index.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js b/ui/helpers/higher-order-components/with-modal-props/with-modal-props.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.js rename to ui/helpers/higher-order-components/with-modal-props/with-modal-props.js diff --git a/ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.test.js b/ui/helpers/higher-order-components/with-modal-props/with-modal-props.test.js similarity index 100% rename from ui/app/helpers/higher-order-components/with-modal-props/with-modal-props.test.js rename to ui/helpers/higher-order-components/with-modal-props/with-modal-props.test.js diff --git a/ui/app/helpers/utils/common.util.js b/ui/helpers/utils/common.util.js similarity index 100% rename from ui/app/helpers/utils/common.util.js rename to ui/helpers/utils/common.util.js diff --git a/ui/app/helpers/utils/common.util.test.js b/ui/helpers/utils/common.util.test.js similarity index 100% rename from ui/app/helpers/utils/common.util.test.js rename to ui/helpers/utils/common.util.test.js diff --git a/ui/app/helpers/utils/confirm-tx.util.js b/ui/helpers/utils/confirm-tx.util.js similarity index 98% rename from ui/app/helpers/utils/confirm-tx.util.js rename to ui/helpers/utils/confirm-tx.util.js index 80fe2f3df..5ae5d13c3 100644 --- a/ui/app/helpers/utils/confirm-tx.util.js +++ b/ui/helpers/utils/confirm-tx.util.js @@ -1,7 +1,7 @@ import currencyFormatter from 'currency-formatter'; import currencies from 'currency-formatter/currencies'; import BigNumber from 'bignumber.js'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { unconfirmedTransactionsCountSelector } from '../../selectors'; import { diff --git a/ui/app/helpers/utils/confirm-tx.util.test.js b/ui/helpers/utils/confirm-tx.util.test.js similarity index 100% rename from ui/app/helpers/utils/confirm-tx.util.test.js rename to ui/helpers/utils/confirm-tx.util.test.js diff --git a/ui/app/helpers/utils/conversion-util.js b/ui/helpers/utils/conversion-util.js similarity index 100% rename from ui/app/helpers/utils/conversion-util.js rename to ui/helpers/utils/conversion-util.js diff --git a/ui/app/helpers/utils/conversion-util.test.js b/ui/helpers/utils/conversion-util.test.js similarity index 100% rename from ui/app/helpers/utils/conversion-util.test.js rename to ui/helpers/utils/conversion-util.test.js diff --git a/ui/app/helpers/utils/conversions.util.js b/ui/helpers/utils/conversions.util.js similarity index 98% rename from ui/app/helpers/utils/conversions.util.js rename to ui/helpers/utils/conversions.util.js index ce4fe8c51..b7c901d97 100644 --- a/ui/app/helpers/utils/conversions.util.js +++ b/ui/helpers/utils/conversions.util.js @@ -1,5 +1,5 @@ import { ETH, GWEI, WEI } from '../constants/common'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { conversionUtil, addCurrencies, diff --git a/ui/app/helpers/utils/conversions.util.test.js b/ui/helpers/utils/conversions.util.test.js similarity index 100% rename from ui/app/helpers/utils/conversions.util.test.js rename to ui/helpers/utils/conversions.util.test.js diff --git a/ui/app/helpers/utils/fetch-with-cache.js b/ui/helpers/utils/fetch-with-cache.js similarity index 90% rename from ui/app/helpers/utils/fetch-with-cache.js rename to ui/helpers/utils/fetch-with-cache.js index 6dc377593..f810864cc 100644 --- a/ui/app/helpers/utils/fetch-with-cache.js +++ b/ui/helpers/utils/fetch-with-cache.js @@ -1,5 +1,5 @@ -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; -import getFetchWithTimeout from '../../../../shared/modules/fetch-with-timeout'; +import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; +import { getStorageItem, setStorageItem } from './storage-helpers'; const fetchWithCache = async ( url, diff --git a/ui/app/helpers/utils/fetch-with-cache.test.js b/ui/helpers/utils/fetch-with-cache.test.js similarity index 97% rename from ui/app/helpers/utils/fetch-with-cache.test.js rename to ui/helpers/utils/fetch-with-cache.test.js index 76e295a77..7244e1d14 100644 --- a/ui/app/helpers/utils/fetch-with-cache.test.js +++ b/ui/helpers/utils/fetch-with-cache.test.js @@ -1,9 +1,9 @@ import nock from 'nock'; import sinon from 'sinon'; -import { getStorageItem, setStorageItem } from '../../../lib/storage-helpers'; +import { getStorageItem, setStorageItem } from './storage-helpers'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('./storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); diff --git a/ui/app/helpers/utils/formatters.js b/ui/helpers/utils/formatters.js similarity index 100% rename from ui/app/helpers/utils/formatters.js rename to ui/helpers/utils/formatters.js diff --git a/ui/app/helpers/utils/i18n-helper.js b/ui/helpers/utils/i18n-helper.js similarity index 97% rename from ui/app/helpers/utils/i18n-helper.js rename to ui/helpers/utils/i18n-helper.js index ea2d7049f..611d1f665 100644 --- a/ui/app/helpers/utils/i18n-helper.js +++ b/ui/helpers/utils/i18n-helper.js @@ -3,7 +3,7 @@ import React from 'react'; import log from 'loglevel'; import * as Sentry from '@sentry/browser'; -import getFetchWithTimeout from '../../../../shared/modules/fetch-with-timeout'; +import getFetchWithTimeout from '../../../shared/modules/fetch-with-timeout'; const fetchWithTimeout = getFetchWithTimeout(30000); diff --git a/ui/app/helpers/utils/i18n-helper.test.js b/ui/helpers/utils/i18n-helper.test.js similarity index 100% rename from ui/app/helpers/utils/i18n-helper.test.js rename to ui/helpers/utils/i18n-helper.test.js diff --git a/ui/lib/icon-factory.js b/ui/helpers/utils/icon-factory.js similarity index 97% rename from ui/lib/icon-factory.js rename to ui/helpers/utils/icon-factory.js index 132f5330d..5189dcfce 100644 --- a/ui/lib/icon-factory.js +++ b/ui/helpers/utils/icon-factory.js @@ -2,7 +2,7 @@ import contractMap from '@metamask/contract-metadata'; import { isValidHexAddress, toChecksumHexAddress, -} from '../../shared/modules/hexstring-utils'; +} from '../../../shared/modules/hexstring-utils'; let iconFactory; diff --git a/ui/lib/is-mobile-view.js b/ui/helpers/utils/is-mobile-view.js similarity index 100% rename from ui/lib/is-mobile-view.js rename to ui/helpers/utils/is-mobile-view.js diff --git a/ui/lib/storage-helpers.js b/ui/helpers/utils/storage-helpers.js similarity index 100% rename from ui/lib/storage-helpers.js rename to ui/helpers/utils/storage-helpers.js diff --git a/ui/app/helpers/utils/switch-direction.js b/ui/helpers/utils/switch-direction.js similarity index 100% rename from ui/app/helpers/utils/switch-direction.js rename to ui/helpers/utils/switch-direction.js diff --git a/ui/app/helpers/utils/token-util.js b/ui/helpers/utils/token-util.js similarity index 92% rename from ui/app/helpers/utils/token-util.js rename to ui/helpers/utils/token-util.js index 8811bec5d..4b6d5dd08 100644 --- a/ui/app/helpers/utils/token-util.js +++ b/ui/helpers/utils/token-util.js @@ -13,7 +13,6 @@ const casedContractMap = Object.keys(contractMap).reduce((acc, base) => { }, {}); const DEFAULT_SYMBOL = ''; -const DEFAULT_DECIMALS = '0'; async function getSymbolFromContract(tokenAddress) { const token = util.getContractAtAddress(tokenAddress); @@ -78,25 +77,6 @@ async function getDecimals(tokenAddress) { return decimals; } -export async function fetchSymbolAndDecimals(tokenAddress) { - let symbol, decimals; - - try { - symbol = await getSymbol(tokenAddress); - decimals = await getDecimals(tokenAddress); - } catch (error) { - log.warn( - `symbol() and decimal() calls for token at address ${tokenAddress} resulted in error:`, - error, - ); - } - - return { - symbol: symbol || DEFAULT_SYMBOL, - decimals: decimals || DEFAULT_DECIMALS, - }; -} - export async function getSymbolAndDecimals(tokenAddress, existingTokens = []) { const existingToken = existingTokens.find( ({ address }) => tokenAddress === address, @@ -123,7 +103,7 @@ export async function getSymbolAndDecimals(tokenAddress, existingTokens = []) { return { symbol: symbol || DEFAULT_SYMBOL, - decimals: decimals || DEFAULT_DECIMALS, + decimals, }; } diff --git a/ui/app/helpers/utils/transactions.util.js b/ui/helpers/utils/transactions.util.js similarity index 98% rename from ui/app/helpers/utils/transactions.util.js rename to ui/helpers/utils/transactions.util.js index 99ce94fe5..21a33112a 100644 --- a/ui/app/helpers/utils/transactions.util.js +++ b/ui/helpers/utils/transactions.util.js @@ -3,12 +3,12 @@ import abi from 'human-standard-token-abi'; import { ethers } from 'ethers'; import log from 'loglevel'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { TRANSACTION_TYPES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import fetchWithCache from './fetch-with-cache'; import { addCurrencies } from './conversion-util'; diff --git a/ui/app/helpers/utils/transactions.util.test.js b/ui/helpers/utils/transactions.util.test.js similarity index 97% rename from ui/app/helpers/utils/transactions.util.test.js rename to ui/helpers/utils/transactions.util.test.js index 9af77ef0f..a8663c3a6 100644 --- a/ui/app/helpers/utils/transactions.util.test.js +++ b/ui/helpers/utils/transactions.util.test.js @@ -2,7 +2,7 @@ import { TRANSACTION_TYPES, TRANSACTION_GROUP_STATUSES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import * as utils from './transactions.util'; describe('Transactions utils', () => { diff --git a/ui/lib/tx-helper.js b/ui/helpers/utils/tx-helper.js similarity index 92% rename from ui/lib/tx-helper.js rename to ui/helpers/utils/tx-helper.js index 7585b33fe..bdfc576e9 100644 --- a/ui/lib/tx-helper.js +++ b/ui/helpers/utils/tx-helper.js @@ -1,6 +1,6 @@ import log from 'loglevel'; -import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; -import { valuesFor } from '../app/helpers/utils/util'; +import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +import { valuesFor } from './util'; export default function txHelper( unapprovedTxs, diff --git a/ui/lib/tx-helper.test.js b/ui/helpers/utils/tx-helper.test.js similarity index 92% rename from ui/lib/tx-helper.test.js rename to ui/helpers/utils/tx-helper.test.js index 502da54af..75565a2d9 100644 --- a/ui/lib/tx-helper.test.js +++ b/ui/helpers/utils/tx-helper.test.js @@ -1,7 +1,7 @@ import { MAINNET_CHAIN_ID, MAINNET_NETWORK_ID, -} from '../../shared/constants/network'; +} from '../../../shared/constants/network'; import txHelper from './tx-helper'; describe('txHelper', () => { diff --git a/ui/app/helpers/utils/util.js b/ui/helpers/utils/util.js similarity index 98% rename from ui/app/helpers/utils/util.js rename to ui/helpers/utils/util.js index 512acaef8..23e49d716 100644 --- a/ui/app/helpers/utils/util.js +++ b/ui/helpers/utils/util.js @@ -3,7 +3,7 @@ import abi from 'human-standard-token-abi'; import BigNumber from 'bignumber.js'; import * as ethUtil from 'ethereumjs-util'; import { DateTime } from 'luxon'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { GOERLI_CHAIN_ID, KOVAN_CHAIN_ID, @@ -11,8 +11,8 @@ import { MAINNET_CHAIN_ID, RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, -} from '../../../../shared/constants/network'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +} from '../../../shared/constants/network'; +import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; // formatData :: ( date: ) -> String export function formatDate(date, format = "M/d/y 'at' T") { diff --git a/ui/app/helpers/utils/util.test.js b/ui/helpers/utils/util.test.js similarity index 100% rename from ui/app/helpers/utils/util.test.js rename to ui/helpers/utils/util.test.js diff --git a/ui/lib/webcam-utils.js b/ui/helpers/utils/webcam-utils.js similarity index 90% rename from ui/lib/webcam-utils.js rename to ui/helpers/utils/webcam-utils.js index 7dd4dd499..ef7e80160 100644 --- a/ui/lib/webcam-utils.js +++ b/ui/helpers/utils/webcam-utils.js @@ -4,8 +4,8 @@ import { ENVIRONMENT_TYPE_POPUP, PLATFORM_BRAVE, PLATFORM_FIREFOX, -} from '../../shared/constants/app'; -import { getEnvironmentType, getPlatform } from '../../app/scripts/lib/util'; +} from '../../../shared/constants/app'; +import { getEnvironmentType, getPlatform } from '../../../app/scripts/lib/util'; class WebcamUtils { static async checkStatus() { diff --git a/ui/app/hooks/useCancelTransaction.js b/ui/hooks/useCancelTransaction.js similarity index 91% rename from ui/app/hooks/useCancelTransaction.js rename to ui/hooks/useCancelTransaction.js index 2e71c184b..03bad3c54 100644 --- a/ui/app/hooks/useCancelTransaction.js +++ b/ui/hooks/useCancelTransaction.js @@ -7,7 +7,11 @@ import { getHexGasTotal, increaseLastGasPrice, } from '../helpers/utils/confirm-tx.util'; -import { getConversionRate, getSelectedAccount } from '../selectors'; +import { + getConversionRate, + getSelectedAccount, + getIsMainnet, +} from '../selectors'; import { setCustomGasLimit, setCustomGasPriceForRetry, @@ -43,7 +47,8 @@ export function useCancelTransaction(transactionGroup) { multiplierBase: 10, }), ); - + const isMainnet = useSelector(getIsMainnet); + const hideBasic = !(isMainnet || process.env.IN_TEST); const cancelTransaction = useCallback( (event) => { event.stopPropagation(); @@ -62,6 +67,7 @@ export function useCancelTransaction(transactionGroup) { transitionName: 'sidebar-left', type: 'customize-gas', props: { + hideBasic, transaction: tx, onSubmit: (newGasLimit, newGasPrice) => { const userCustomizedGasTotal = getHexGasTotal({ @@ -82,7 +88,7 @@ export function useCancelTransaction(transactionGroup) { }), ); }, - [dispatch, transaction, defaultNewGasPrice], + [dispatch, transaction, defaultNewGasPrice, hideBasic], ); const hasEnoughCancelGas = diff --git a/ui/app/hooks/useCancelTransaction.test.js b/ui/hooks/useCancelTransaction.test.js similarity index 98% rename from ui/app/hooks/useCancelTransaction.test.js rename to ui/hooks/useCancelTransaction.test.js index 773f2dbb5..28453bc6c 100644 --- a/ui/app/hooks/useCancelTransaction.test.js +++ b/ui/hooks/useCancelTransaction.test.js @@ -1,7 +1,7 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { getConversionRate, getSelectedAccount } from '../selectors'; import { showModal } from '../store/actions'; import { increaseLastGasPrice } from '../helpers/utils/confirm-tx.util'; diff --git a/ui/app/hooks/useCopyToClipboard.js b/ui/hooks/useCopyToClipboard.js similarity index 100% rename from ui/app/hooks/useCopyToClipboard.js rename to ui/hooks/useCopyToClipboard.js diff --git a/ui/app/hooks/useCurrencyDisplay.js b/ui/hooks/useCurrencyDisplay.js similarity index 100% rename from ui/app/hooks/useCurrencyDisplay.js rename to ui/hooks/useCurrencyDisplay.js diff --git a/ui/app/hooks/useCurrencyDisplay.test.js b/ui/hooks/useCurrencyDisplay.test.js similarity index 100% rename from ui/app/hooks/useCurrencyDisplay.test.js rename to ui/hooks/useCurrencyDisplay.test.js diff --git a/ui/app/hooks/useCurrentAsset.js b/ui/hooks/useCurrentAsset.js similarity index 96% rename from ui/app/hooks/useCurrentAsset.js rename to ui/hooks/useCurrentAsset.js index 832576a0c..068d076e7 100644 --- a/ui/app/hooks/useCurrentAsset.js +++ b/ui/hooks/useCurrentAsset.js @@ -6,7 +6,7 @@ import { ASSET_ROUTE } from '../helpers/constants/routes'; import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP, ETH_SWAPS_TOKEN_OBJECT, -} from '../../../shared/constants/swaps'; +} from '../../shared/constants/swaps'; /** * Returns a token object for the asset that is currently being viewed. diff --git a/ui/app/hooks/useEqualityCheck.js b/ui/hooks/useEqualityCheck.js similarity index 100% rename from ui/app/hooks/useEqualityCheck.js rename to ui/hooks/useEqualityCheck.js diff --git a/ui/app/hooks/useEthFiatAmount.js b/ui/hooks/useEthFiatAmount.js similarity index 100% rename from ui/app/hooks/useEthFiatAmount.js rename to ui/hooks/useEthFiatAmount.js diff --git a/ui/app/hooks/useI18nContext.js b/ui/hooks/useI18nContext.js similarity index 100% rename from ui/app/hooks/useI18nContext.js rename to ui/hooks/useI18nContext.js diff --git a/ui/app/hooks/useMethodData.js b/ui/hooks/useMethodData.js similarity index 100% rename from ui/app/hooks/useMethodData.js rename to ui/hooks/useMethodData.js diff --git a/ui/app/hooks/useMetricEvent.js b/ui/hooks/useMetricEvent.js similarity index 92% rename from ui/app/hooks/useMetricEvent.js rename to ui/hooks/useMetricEvent.js index b30b37eb5..9ca7834f1 100644 --- a/ui/app/hooks/useMetricEvent.js +++ b/ui/hooks/useMetricEvent.js @@ -6,7 +6,7 @@ import { useEqualityCheck } from './useEqualityCheck'; // Type imports /** * @typedef {import('../contexts/metametrics.new').UIMetricsEventPayload} UIMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions */ export function useMetricEvent(config = {}, overrides = {}) { diff --git a/ui/app/hooks/useOriginMetadata.js b/ui/hooks/useOriginMetadata.js similarity index 100% rename from ui/app/hooks/useOriginMetadata.js rename to ui/hooks/useOriginMetadata.js diff --git a/ui/app/hooks/usePrevious.js b/ui/hooks/usePrevious.js similarity index 100% rename from ui/app/hooks/usePrevious.js rename to ui/hooks/usePrevious.js diff --git a/ui/app/hooks/useRetryTransaction.js b/ui/hooks/useRetryTransaction.js similarity index 83% rename from ui/app/hooks/useRetryTransaction.js rename to ui/hooks/useRetryTransaction.js index 0f1532014..44fccb2f4 100644 --- a/ui/app/hooks/useRetryTransaction.js +++ b/ui/hooks/useRetryTransaction.js @@ -1,4 +1,5 @@ -import { useDispatch } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; + import { useCallback } from 'react'; import { showSidebar } from '../store/actions'; import { @@ -7,8 +8,8 @@ import { setCustomGasLimit, } from '../ducks/gas/gas.duck'; import { increaseLastGasPrice } from '../helpers/utils/confirm-tx.util'; +import { getIsMainnet } from '../selectors'; import { useMetricEvent } from './useMetricEvent'; - /** * Provides a reusable hook that, given a transactionGroup, will return * a method for beginning the retry process @@ -17,6 +18,8 @@ import { useMetricEvent } from './useMetricEvent'; */ export function useRetryTransaction(transactionGroup) { const { primaryTransaction } = transactionGroup; + const isMainnet = useSelector(getIsMainnet); + const hideBasic = !(isMainnet || process.env.IN_TEST); // Signature requests do not have a txParams, but this hook is called indiscriminately const gasPrice = primaryTransaction.txParams?.gasPrice; const trackMetricsEvent = useMetricEvent({ @@ -46,11 +49,11 @@ export function useRetryTransaction(transactionGroup) { showSidebar({ transitionName: 'sidebar-left', type: 'customize-gas', - props: { transaction }, + props: { transaction, hideBasic }, }), ); }, - [dispatch, trackMetricsEvent, gasPrice, primaryTransaction], + [dispatch, trackMetricsEvent, gasPrice, primaryTransaction, hideBasic], ); return retryTransaction; diff --git a/ui/app/hooks/useRetryTransaction.test.js b/ui/hooks/useRetryTransaction.test.js similarity index 83% rename from ui/app/hooks/useRetryTransaction.test.js rename to ui/hooks/useRetryTransaction.test.js index c32d98174..3c1f78401 100644 --- a/ui/app/hooks/useRetryTransaction.test.js +++ b/ui/hooks/useRetryTransaction.test.js @@ -1,25 +1,33 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { showSidebar } from '../store/actions'; +import { getIsMainnet } from '../selectors'; import * as methodDataHook from './useMethodData'; import * as metricEventHook from './useMetricEvent'; import { useRetryTransaction } from './useRetryTransaction'; describe('useRetryTransaction', () => { describe('when transaction meets retry enabled criteria', () => { + let useSelector; const dispatch = sinon.spy(() => Promise.resolve({ blockTime: 0 })); const trackEvent = sinon.spy(); const event = { preventDefault: () => undefined, stopPropagation: () => undefined, }; - beforeAll(() => { sinon.stub(reactRedux, 'useDispatch').returns(dispatch); sinon.stub(methodDataHook, 'useMethodData').returns({}); sinon.stub(metricEventHook, 'useMetricEvent').returns(trackEvent); + useSelector = sinon.stub(reactRedux, 'useSelector'); + useSelector.callsFake((selector) => { + if (selector === getIsMainnet) { + return true; + } + return undefined; + }); }); afterEach(() => { @@ -61,7 +69,10 @@ describe('useRetryTransaction', () => { showSidebar({ transitionName: 'sidebar-left', type: 'customize-gas', - props: { transaction: retryEnabledTransaction.initialTransaction }, + props: { + transaction: retryEnabledTransaction.initialTransaction, + hideBasic: false, + }, }), ), ).toStrictEqual(true); @@ -104,7 +115,10 @@ describe('useRetryTransaction', () => { showSidebar({ transitionName: 'sidebar-left', type: 'customize-gas', - props: { transaction: cancelledTransaction.primaryTransaction }, + props: { + transaction: cancelledTransaction.primaryTransaction, + hideBasic: false, + }, }), ), ).toStrictEqual(true); diff --git a/ui/app/hooks/useShouldShowSpeedUp.js b/ui/hooks/useShouldShowSpeedUp.js similarity index 100% rename from ui/app/hooks/useShouldShowSpeedUp.js rename to ui/hooks/useShouldShowSpeedUp.js diff --git a/ui/app/hooks/useSwappedTokenValue.js b/ui/hooks/useSwappedTokenValue.js similarity index 96% rename from ui/app/hooks/useSwappedTokenValue.js rename to ui/hooks/useSwappedTokenValue.js index 6eff3726f..02a2a1a37 100644 --- a/ui/app/hooks/useSwappedTokenValue.js +++ b/ui/hooks/useSwappedTokenValue.js @@ -1,9 +1,9 @@ import { useSelector } from 'react-redux'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../shared/modules/swaps.utils'; +} from '../../shared/modules/swaps.utils'; import { getSwapsTokensReceivedFromTxMeta } from '../pages/swaps/swaps.util'; import { getCurrentChainId } from '../selectors'; import { useTokenFiatAmount } from './useTokenFiatAmount'; diff --git a/ui/app/hooks/useTimeout.js b/ui/hooks/useTimeout.js similarity index 100% rename from ui/app/hooks/useTimeout.js rename to ui/hooks/useTimeout.js diff --git a/ui/app/hooks/useTokenData.js b/ui/hooks/useTokenData.js similarity index 100% rename from ui/app/hooks/useTokenData.js rename to ui/hooks/useTokenData.js diff --git a/ui/app/hooks/useTokenData.test.js b/ui/hooks/useTokenData.test.js similarity index 96% rename from ui/app/hooks/useTokenData.test.js rename to ui/hooks/useTokenData.test.js index 7c5ed8572..1e80f5c9e 100644 --- a/ui/app/hooks/useTokenData.test.js +++ b/ui/hooks/useTokenData.test.js @@ -1,7 +1,7 @@ /* eslint-disable jest/no-conditional-expect */ import { ethers } from 'ethers'; import { renderHook } from '@testing-library/react-hooks'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { useTokenData } from './useTokenData'; const tests = [ diff --git a/ui/app/hooks/useTokenDisplayValue.js b/ui/hooks/useTokenDisplayValue.js similarity index 100% rename from ui/app/hooks/useTokenDisplayValue.js rename to ui/hooks/useTokenDisplayValue.js diff --git a/ui/app/hooks/useTokenDisplayValue.test.js b/ui/hooks/useTokenDisplayValue.test.js similarity index 100% rename from ui/app/hooks/useTokenDisplayValue.test.js rename to ui/hooks/useTokenDisplayValue.test.js diff --git a/ui/app/hooks/useTokenFiatAmount.js b/ui/hooks/useTokenFiatAmount.js similarity index 100% rename from ui/app/hooks/useTokenFiatAmount.js rename to ui/hooks/useTokenFiatAmount.js diff --git a/ui/app/hooks/useTokenTracker.js b/ui/hooks/useTokenTracker.js similarity index 100% rename from ui/app/hooks/useTokenTracker.js rename to ui/hooks/useTokenTracker.js diff --git a/ui/app/hooks/useTokensToSearch.js b/ui/hooks/useTokensToSearch.js similarity index 96% rename from ui/app/hooks/useTokensToSearch.js rename to ui/hooks/useTokensToSearch.js index e4bc6495e..5d6f8dd1a 100644 --- a/ui/app/hooks/useTokensToSearch.js +++ b/ui/hooks/useTokensToSearch.js @@ -12,8 +12,8 @@ import { getCurrentChainId, } from '../selectors'; import { getSwapsTokens } from '../ducks/swaps/swaps'; -import { isSwapsDefaultTokenSymbol } from '../../../shared/modules/swaps.utils'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { isSwapsDefaultTokenSymbol } from '../../shared/modules/swaps.utils'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; import { useEqualityCheck } from './useEqualityCheck'; const tokenList = shuffle( diff --git a/ui/app/hooks/useTransactionDisplayData.js b/ui/hooks/useTransactionDisplayData.js similarity index 99% rename from ui/app/hooks/useTransactionDisplayData.js rename to ui/hooks/useTransactionDisplayData.js index dc589f858..1fad5d2c7 100644 --- a/ui/app/hooks/useTransactionDisplayData.js +++ b/ui/hooks/useTransactionDisplayData.js @@ -22,7 +22,7 @@ import { TRANSACTION_TYPES, TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../shared/constants/transaction'; +} from '../../shared/constants/transaction'; import { useI18nContext } from './useI18nContext'; import { useTokenFiatAmount } from './useTokenFiatAmount'; import { useUserPreferencedCurrency } from './useUserPreferencedCurrency'; diff --git a/ui/app/hooks/useTransactionDisplayData.test.js b/ui/hooks/useTransactionDisplayData.test.js similarity index 97% rename from ui/app/hooks/useTransactionDisplayData.test.js rename to ui/hooks/useTransactionDisplayData.test.js index aa0a9832d..e91566acf 100644 --- a/ui/app/hooks/useTransactionDisplayData.test.js +++ b/ui/hooks/useTransactionDisplayData.test.js @@ -3,7 +3,7 @@ import * as reactRedux from 'react-redux'; import { renderHook } from '@testing-library/react-hooks'; import sinon from 'sinon'; import { MemoryRouter } from 'react-router-dom'; -import transactions from '../../../test/data/transaction-data.json'; +import transactions from '../../test/data/transaction-data.json'; import { getPreferences, getShouldShowFiat, @@ -13,14 +13,14 @@ import { } from '../selectors'; import { getTokens } from '../ducks/metamask/metamask'; import { getMessage } from '../helpers/utils/i18n-helper'; -import messages from '../../../app/_locales/en/messages.json'; +import messages from '../../app/_locales/en/messages.json'; import { ASSET_ROUTE, DEFAULT_ROUTE } from '../helpers/constants/routes'; -import { MAINNET_CHAIN_ID } from '../../../shared/constants/network'; +import { MAINNET_CHAIN_ID } from '../../shared/constants/network'; import { TRANSACTION_TYPES, TRANSACTION_GROUP_CATEGORIES, TRANSACTION_STATUSES, -} from '../../../shared/constants/transaction'; +} from '../../shared/constants/transaction'; import * as i18nhooks from './useI18nContext'; import * as useTokenFiatAmountHooks from './useTokenFiatAmount'; import { useTransactionDisplayData } from './useTransactionDisplayData'; diff --git a/ui/app/hooks/useUserPreferencedCurrency.js b/ui/hooks/useUserPreferencedCurrency.js similarity index 100% rename from ui/app/hooks/useUserPreferencedCurrency.js rename to ui/hooks/useUserPreferencedCurrency.js diff --git a/ui/app/hooks/useUserPreferencedCurrency.test.js b/ui/hooks/useUserPreferencedCurrency.test.js similarity index 100% rename from ui/app/hooks/useUserPreferencedCurrency.test.js rename to ui/hooks/useUserPreferencedCurrency.test.js diff --git a/ui/index.js b/ui/index.js index 16a8f5c7d..4bc8409b0 100644 --- a/ui/index.js +++ b/ui/index.js @@ -7,24 +7,24 @@ import { getEnvironmentType } from '../app/scripts/lib/util'; import { ALERT_TYPES } from '../shared/constants/alerts'; import { SENTRY_STATE } from '../app/scripts/lib/setupSentry'; import { ENVIRONMENT_TYPE_POPUP } from '../shared/constants/app'; -import Root from './app/pages'; -import * as actions from './app/store/actions'; -import configureStore from './app/store/store'; -import txHelper from './lib/tx-helper'; +import * as actions from './store/actions'; +import configureStore from './store/store'; import { fetchLocale, loadRelativeTimeFormatLocaleData, -} from './app/helpers/utils/i18n-helper'; -import switchDirection from './app/helpers/utils/switch-direction'; +} from './helpers/utils/i18n-helper'; +import switchDirection from './helpers/utils/switch-direction'; import { getPermittedAccountsForCurrentTab, getSelectedAddress, -} from './app/selectors'; -import { ALERT_STATE } from './app/ducks/alerts'; +} from './selectors'; +import { ALERT_STATE } from './ducks/alerts'; import { getUnconnectedAccountAlertEnabledness, getUnconnectedAccountAlertShown, -} from './app/ducks/metamask/metamask'; +} from './ducks/metamask/metamask'; +import Root from './pages'; +import txHelper from './helpers/utils/tx-helper'; log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn'); diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js deleted file mode 100644 index 47d36908a..000000000 --- a/ui/lib/account-link.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createAccountLinkForChain } from '@metamask/etherscan-link'; - -export default function getAccountLink(address, chainId, rpcPrefs) { - if (rpcPrefs && rpcPrefs.blockExplorerUrl) { - return `${rpcPrefs.blockExplorerUrl.replace( - /\/+$/u, - '', - )}/address/${address}`; - } - - return createAccountLinkForChain(address, chainId); -} diff --git a/ui/lib/account-link.test.js b/ui/lib/account-link.test.js deleted file mode 100644 index 4e464309f..000000000 --- a/ui/lib/account-link.test.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - MAINNET_CHAIN_ID, - ROPSTEN_CHAIN_ID, -} from '../../shared/constants/network'; -import getAccountLink from './account-link'; - -describe('Account link', () => { - describe('getAccountLink', () => { - it('should return the correct block explorer url for an account', () => { - const tests = [ - { - expected: 'https://etherscan.io/address/0xabcd', - chainId: MAINNET_CHAIN_ID, - address: '0xabcd', - }, - { - expected: 'https://ropsten.etherscan.io/address/0xdef0', - chainId: ROPSTEN_CHAIN_ID, - address: '0xdef0', - rpcPrefs: {}, - }, - { - // test handling of `blockExplorerUrl` for a custom RPC - expected: 'https://block.explorer/address/0xabcd', - chainId: '0x21', - address: '0xabcd', - rpcPrefs: { - blockExplorerUrl: 'https://block.explorer', - }, - }, - { - // test handling of trailing `/` in `blockExplorerUrl` for a custom RPC - expected: 'https://another.block.explorer/address/0xdef0', - chainId: '0x1f', - address: '0xdef0', - rpcPrefs: { - blockExplorerUrl: 'https://another.block.explorer/', - }, - }, - ]; - - tests.forEach(({ expected, address, chainId, rpcPrefs }) => { - expect(getAccountLink(address, chainId, rpcPrefs)).toStrictEqual( - expected, - ); - }); - }); - }); -}); diff --git a/ui/lib/shallow-with-context.js b/ui/lib/shallow-with-context.js deleted file mode 100644 index 9cfb1bd75..000000000 --- a/ui/lib/shallow-with-context.js +++ /dev/null @@ -1,7 +0,0 @@ -import { shallow } from 'enzyme'; - -export default function shallowWithContext(jsxComponent) { - return shallow(jsxComponent, { - context: { t: (str1, str2) => (str2 ? str1 + str2 : str1) }, - }); -} diff --git a/ui/lib/test-timeout.js b/ui/lib/test-timeout.js deleted file mode 100644 index 8c29780a1..000000000 --- a/ui/lib/test-timeout.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function timeout(time) { - return new Promise((resolve) => { - setTimeout(resolve, time || 1500); - }); -} diff --git a/ui/app/pages/add-token/add-token.component.js b/ui/pages/add-token/add-token.component.js similarity index 74% rename from ui/app/pages/add-token/add-token.component.js rename to ui/pages/add-token/add-token.component.js index cceeea624..36c215e2a 100644 --- a/ui/app/pages/add-token/add-token.component.js +++ b/ui/pages/add-token/add-token.component.js @@ -1,15 +1,20 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import { getTokenTrackerLink } from '@metamask/etherscan-link'; import { checkExistingAddresses } from '../../helpers/utils/util'; import { tokenInfoGetter } from '../../helpers/utils/token-util'; import { CONFIRM_ADD_TOKEN_ROUTE } from '../../helpers/constants/routes'; import TextField from '../../components/ui/text-field'; import PageContainer from '../../components/ui/page-container'; import { Tabs, Tab } from '../../components/ui/tabs'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; -import TokenList from './token-list'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; +import ActionableMessage from '../swaps/actionable-message'; +import Typography from '../../components/ui/typography'; +import { TYPOGRAPHY, FONT_WEIGHT } from '../../helpers/constants/design-system'; +import Button from '../../components/ui/button'; import TokenSearch from './token-search'; +import TokenList from './token-list'; const emptyAddr = '0x0000000000000000000000000000000000000000'; @@ -30,6 +35,8 @@ class AddToken extends Component { identities: PropTypes.object, showSearchTab: PropTypes.bool.isRequired, mostRecentOverviewPage: PropTypes.string.isRequired, + chainId: PropTypes.string, + rpcPrefs: PropTypes.object, }; state = { @@ -42,8 +49,9 @@ class AddToken extends Component { customAddressError: null, customSymbolError: null, customDecimalsError: null, - autoFilled: false, forceEditSymbol: false, + symbolAutoFilled: false, + decimalAutoFilled: false, }; componentDidMount() { @@ -148,10 +156,11 @@ class AddToken extends Component { } async attemptToAutoFillTokenParams(address) { - const { symbol = '', decimals = 0 } = await this.tokenInfoGetter(address); + const { symbol = '', decimals } = await this.tokenInfoGetter(address); - const autoFilled = Boolean(symbol && decimals); - this.setState({ autoFilled }); + const symbolAutoFilled = Boolean(symbol); + const decimalAutoFilled = Boolean(decimals); + this.setState({ symbolAutoFilled, decimalAutoFilled }); this.handleCustomSymbolChange(symbol || ''); this.handleCustomDecimalsChange(decimals); } @@ -162,7 +171,8 @@ class AddToken extends Component { customAddress, customAddressError: null, tokenSelectorError: null, - autoFilled: false, + symbolAutoFilled: false, + decimalAutoFilled: false, }); const addressIsValid = isValidHexAddress(customAddress, { @@ -213,16 +223,18 @@ class AddToken extends Component { } handleCustomDecimalsChange(value) { - const customDecimals = value.trim(); - const validDecimals = - customDecimals !== null && - customDecimals !== '' && - customDecimals >= MIN_DECIMAL_VALUE && - customDecimals <= MAX_DECIMAL_VALUE; + let customDecimals; let customDecimalsError = null; - if (!validDecimals) { - customDecimalsError = this.context.t('decimalsMustZerotoTen'); + if (value) { + customDecimals = Number(value.trim()); + customDecimalsError = + value < MIN_DECIMAL_VALUE || value > MAX_DECIMAL_VALUE + ? this.context.t('decimalsMustZerotoTen') + : null; + } else { + customDecimals = ''; + customDecimalsError = this.context.t('tokenDecimalFetchFailed'); } this.setState({ customDecimals, customDecimalsError }); @@ -236,10 +248,23 @@ class AddToken extends Component { customAddressError, customSymbolError, customDecimalsError, - autoFilled, forceEditSymbol, + symbolAutoFilled, + decimalAutoFilled, } = this.state; + const { chainId, rpcPrefs } = this.props; + const blockExplorerTokenLink = getTokenTrackerLink( + customAddress, + chainId, + null, + null, + { blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null }, + ); + const blockExplorerLabel = rpcPrefs?.blockExplorerUrl + ? new URL(blockExplorerTokenLink).hostname + : this.context.t('etherscan'); + return (
{this.context.t('tokenSymbol')} - {autoFilled && !forceEditSymbol && ( + {symbolAutoFilled && !forceEditSymbol && (
this.setState({ forceEditSymbol: true })} @@ -276,7 +301,7 @@ class AddToken extends Component { error={customSymbolError} fullWidth margin="normal" - disabled={autoFilled && !forceEditSymbol} + disabled={symbolAutoFilled && !forceEditSymbol} /> this.handleCustomDecimalsChange(e.target.value)} - error={customDecimalsError} + error={customDecimals ? customDecimalsError : null} fullWidth margin="normal" - disabled={autoFilled} + disabled={decimalAutoFilled} min={MIN_DECIMAL_VALUE} max={MAX_DECIMAL_VALUE} /> + {customDecimals === '' && ( + + + {this.context.t('tokenDecimalFetchFailed')} + + + {this.context.t('verifyThisTokenDecimalOn', [ + , + ])} + + + } + type="warning" + withRightButton + className="add-token__decimal-warning" + /> + )}
); } diff --git a/ui/app/pages/add-token/add-token.container.js b/ui/pages/add-token/add-token.container.js similarity index 74% rename from ui/app/pages/add-token/add-token.container.js rename to ui/pages/add-token/add-token.container.js index ab8bf24c8..08f6505e3 100644 --- a/ui/app/pages/add-token/add-token.container.js +++ b/ui/pages/add-token/add-token.container.js @@ -2,12 +2,20 @@ import { connect } from 'react-redux'; import { setPendingTokens, clearPendingTokens } from '../../store/actions'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; -import { getIsMainnet } from '../../selectors/selectors'; +import { + getIsMainnet, + getRpcPrefsForCurrentProvider, +} from '../../selectors/selectors'; import AddToken from './add-token.component'; const mapStateToProps = (state) => { const { - metamask: { identities, tokens, pendingTokens }, + metamask: { + identities, + tokens, + pendingTokens, + provider: { chainId }, + }, } = state; return { identities, @@ -15,6 +23,8 @@ const mapStateToProps = (state) => { tokens, pendingTokens, showSearchTab: getIsMainnet(state) || process.env.IN_TEST === 'true', + chainId, + rpcPrefs: getRpcPrefsForCurrentProvider(state), }; }; diff --git a/ui/app/pages/add-token/add-token.test.js b/ui/pages/add-token/add-token.test.js similarity index 96% rename from ui/app/pages/add-token/add-token.test.js rename to ui/pages/add-token/add-token.test.js index e91feafa7..4b36e7f39 100644 --- a/ui/app/pages/add-token/add-token.test.js +++ b/ui/pages/add-token/add-token.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { Provider } from 'react-redux'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../test/lib/render-helpers'; import AddToken from './add-token.container'; describe('Add Token', () => { @@ -82,7 +82,7 @@ describe('Add Token', () => { expect( wrapper.find('AddToken').instance().state.customDecimals, - ).toStrictEqual(tokenPrecision); + ).toStrictEqual(Number(tokenPrecision)); }); it('next', () => { diff --git a/ui/app/pages/add-token/index.js b/ui/pages/add-token/index.js similarity index 100% rename from ui/app/pages/add-token/index.js rename to ui/pages/add-token/index.js diff --git a/ui/app/pages/add-token/index.scss b/ui/pages/add-token/index.scss similarity index 80% rename from ui/app/pages/add-token/index.scss rename to ui/pages/add-token/index.scss index 5060a6348..581832ca4 100644 --- a/ui/app/pages/add-token/index.scss +++ b/ui/pages/add-token/index.scss @@ -1,6 +1,8 @@ @import 'token-list/index'; .add-token { + $self: &; + &__custom-token-form { padding: 8px 16px 16px; @@ -13,6 +15,9 @@ -webkit-appearance: none; display: none; } + & #{$self}__decimal-warning { + margin-top: 5px; + } } &__search-token { @@ -41,4 +46,12 @@ cursor: pointer; } } + + &__link { + @include H7; + + display: inline; + color: $primary-blue; + padding-left: 0; + } } diff --git a/ui/app/pages/add-token/token-list/index.js b/ui/pages/add-token/token-list/index.js similarity index 100% rename from ui/app/pages/add-token/token-list/index.js rename to ui/pages/add-token/token-list/index.js diff --git a/ui/app/pages/add-token/token-list/index.scss b/ui/pages/add-token/token-list/index.scss similarity index 100% rename from ui/app/pages/add-token/token-list/index.scss rename to ui/pages/add-token/token-list/index.scss diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/index.js b/ui/pages/add-token/token-list/token-list-placeholder/index.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/index.js rename to ui/pages/add-token/token-list/token-list-placeholder/index.js diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/index.scss b/ui/pages/add-token/token-list/token-list-placeholder/index.scss similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/index.scss rename to ui/pages/add-token/token-list/token-list-placeholder/index.scss diff --git a/ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js b/ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js rename to ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.component.js diff --git a/ui/app/pages/add-token/token-list/token-list.component.js b/ui/pages/add-token/token-list/token-list.component.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list.component.js rename to ui/pages/add-token/token-list/token-list.component.js diff --git a/ui/app/pages/add-token/token-list/token-list.container.js b/ui/pages/add-token/token-list/token-list.container.js similarity index 100% rename from ui/app/pages/add-token/token-list/token-list.container.js rename to ui/pages/add-token/token-list/token-list.container.js diff --git a/ui/app/pages/add-token/token-search/index.js b/ui/pages/add-token/token-search/index.js similarity index 100% rename from ui/app/pages/add-token/token-search/index.js rename to ui/pages/add-token/token-search/index.js diff --git a/ui/app/pages/add-token/token-search/token-search.component.js b/ui/pages/add-token/token-search/token-search.component.js similarity index 100% rename from ui/app/pages/add-token/token-search/token-search.component.js rename to ui/pages/add-token/token-search/token-search.component.js diff --git a/ui/app/pages/asset/asset.js b/ui/pages/asset/asset.js similarity index 100% rename from ui/app/pages/asset/asset.js rename to ui/pages/asset/asset.js diff --git a/ui/app/pages/asset/asset.scss b/ui/pages/asset/asset.scss similarity index 100% rename from ui/app/pages/asset/asset.scss rename to ui/pages/asset/asset.scss diff --git a/ui/app/pages/asset/components/asset-breadcrumb.js b/ui/pages/asset/components/asset-breadcrumb.js similarity index 100% rename from ui/app/pages/asset/components/asset-breadcrumb.js rename to ui/pages/asset/components/asset-breadcrumb.js diff --git a/ui/app/pages/asset/components/asset-navigation.js b/ui/pages/asset/components/asset-navigation.js similarity index 100% rename from ui/app/pages/asset/components/asset-navigation.js rename to ui/pages/asset/components/asset-navigation.js diff --git a/ui/app/pages/asset/components/asset-options.js b/ui/pages/asset/components/asset-options.js similarity index 90% rename from ui/app/pages/asset/components/asset-options.js rename to ui/pages/asset/components/asset-options.js index 3b3ee21c2..dbb4ba5c6 100644 --- a/ui/app/pages/asset/components/asset-options.js +++ b/ui/pages/asset/components/asset-options.js @@ -6,10 +6,11 @@ import { Menu, MenuItem } from '../../../components/ui/menu'; const AssetOptions = ({ onRemove, - onViewEtherscan, + onClickBlockExplorer, onViewAccountDetails, tokenSymbol, isNativeAsset, + isEthNetwork, }) => { const t = useContext(I18nContext); const [assetOptionsButtonElement, setAssetOptionsButtonElement] = useState( @@ -46,10 +47,10 @@ const AssetOptions = ({ data-testid="asset-options__etherscan" onClick={() => { setAssetOptionsOpen(false); - onViewEtherscan(); + onClickBlockExplorer(); }} > - {t('viewOnEtherscan')} + {isEthNetwork ? t('viewOnEtherscan') : t('viewinExplorer')} {isNativeAsset ? null : ( @@ -33,12 +45,14 @@ export default function NativeAsset({ nativeCurrency }) { accountName={selectedAccountName} assetName={nativeCurrency} onBack={() => history.push(DEFAULT_ROUTE)} + isEthNetwork={!rpcPrefs.blockExplorerUrl} optionsButton={ { + onClickBlockExplorer={() => { + blockExplorerLinkClickedEvent(); global.platform.openTab({ - url: getAccountLink(address, chainId, rpcPrefs), + url: accountLink, }); }} onViewAccountDetails={() => { diff --git a/ui/app/pages/asset/components/token-asset.js b/ui/pages/asset/components/token-asset.js similarity index 66% rename from ui/app/pages/asset/components/token-asset.js rename to ui/pages/asset/components/token-asset.js index 76566037e..c5b6410c0 100644 --- a/ui/app/pages/asset/components/token-asset.js +++ b/ui/pages/asset/components/token-asset.js @@ -2,16 +2,17 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; -import { createTokenTrackerLinkForChain } from '@metamask/etherscan-link'; - +import { getTokenTrackerLink } from '@metamask/etherscan-link'; import TransactionList from '../../../components/app/transaction-list'; import { TokenOverview } from '../../../components/app/wallet-overview'; import { getCurrentChainId, getSelectedIdentity, + getRpcPrefsForCurrentProvider, } from '../../../selectors/selectors'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import { showModal } from '../../../store/actions'; +import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; import AssetNavigation from './asset-navigation'; import AssetOptions from './asset-options'; @@ -19,10 +20,30 @@ import AssetOptions from './asset-options'; export default function TokenAsset({ token }) { const dispatch = useDispatch(); const chainId = useSelector(getCurrentChainId); + const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider); const selectedIdentity = useSelector(getSelectedIdentity); const selectedAccountName = selectedIdentity.name; const selectedAddress = selectedIdentity.address; const history = useHistory(); + const tokenTrackerLink = getTokenTrackerLink( + token.address, + chainId, + null, + selectedAddress, + rpcPrefs, + ); + + const blockExplorerLinkClickedEvent = useNewMetricEvent({ + category: 'Navigation', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Token Tracker', + action: 'Token Options', + block_explorer_domain: tokenTrackerLink + ? new URL(tokenTrackerLink)?.hostname + : '', + }, + }); return ( <> @@ -35,13 +56,10 @@ export default function TokenAsset({ token }) { onRemove={() => dispatch(showModal({ name: 'HIDE_TOKEN_CONFIRMATION', token })) } - onViewEtherscan={() => { - const url = createTokenTrackerLinkForChain( - token.address, - chainId, - selectedAddress, - ); - global.platform.openTab({ url }); + isEthNetwork={!rpcPrefs.blockExplorerUrl} + onClickBlockExplorer={() => { + blockExplorerLinkClickedEvent(); + global.platform.openTab({ url: tokenTrackerLink }); }} onViewAccountDetails={() => { dispatch(showModal({ name: 'ACCOUNT_DETAILS' })); diff --git a/ui/app/pages/asset/index.js b/ui/pages/asset/index.js similarity index 100% rename from ui/app/pages/asset/index.js rename to ui/pages/asset/index.js diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js similarity index 97% rename from ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js rename to ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js index 5c8c0e1d6..41d506644 100644 --- a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js +++ b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import Button from '../../components/ui/button'; import Identicon from '../../components/ui/identicon'; import TokenBalance from '../../components/ui/token-balance'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; export default class ConfirmAddSuggestedToken extends Component { static contextTypes = { diff --git a/ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js similarity index 100% rename from ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js rename to ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js diff --git a/ui/app/pages/confirm-add-suggested-token/index.js b/ui/pages/confirm-add-suggested-token/index.js similarity index 100% rename from ui/app/pages/confirm-add-suggested-token/index.js rename to ui/pages/confirm-add-suggested-token/index.js diff --git a/ui/app/pages/confirm-add-token/confirm-add-token.component.js b/ui/pages/confirm-add-token/confirm-add-token.component.js similarity index 100% rename from ui/app/pages/confirm-add-token/confirm-add-token.component.js rename to ui/pages/confirm-add-token/confirm-add-token.component.js diff --git a/ui/app/pages/confirm-add-token/confirm-add-token.container.js b/ui/pages/confirm-add-token/confirm-add-token.container.js similarity index 100% rename from ui/app/pages/confirm-add-token/confirm-add-token.container.js rename to ui/pages/confirm-add-token/confirm-add-token.container.js diff --git a/ui/app/pages/confirm-add-token/index.js b/ui/pages/confirm-add-token/index.js similarity index 100% rename from ui/app/pages/confirm-add-token/index.js rename to ui/pages/confirm-add-token/index.js diff --git a/ui/app/pages/confirm-add-token/index.scss b/ui/pages/confirm-add-token/index.scss similarity index 100% rename from ui/app/pages/confirm-add-token/index.scss rename to ui/pages/confirm-add-token/index.scss diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js similarity index 99% rename from ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js rename to ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js index 8f586d65e..05bb4c77b 100644 --- a/ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js @@ -350,7 +350,7 @@ export default class ConfirmApproveContent extends Component {
{this.renderApproveContentCard({ - symbol: , + symbol: , title: 'Permission', content: this.renderPermissionContent(), showEdit: true, diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/index.js b/ui/pages/confirm-approve/confirm-approve-content/index.js similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve-content/index.js rename to ui/pages/confirm-approve/confirm-approve-content/index.js diff --git a/ui/app/pages/confirm-approve/confirm-approve-content/index.scss b/ui/pages/confirm-approve/confirm-approve-content/index.scss similarity index 100% rename from ui/app/pages/confirm-approve/confirm-approve-content/index.scss rename to ui/pages/confirm-approve/confirm-approve-content/index.scss diff --git a/ui/app/pages/confirm-approve/confirm-approve.js b/ui/pages/confirm-approve/confirm-approve.js similarity index 93% rename from ui/app/pages/confirm-approve/confirm-approve.js rename to ui/pages/confirm-approve/confirm-approve.js index 9eb51bd2a..a0257e7a4 100644 --- a/ui/app/pages/confirm-approve/confirm-approve.js +++ b/ui/pages/confirm-approve/confirm-approve.js @@ -24,6 +24,9 @@ import { getUseNonceField, getCustomNonceValue, getNextSuggestedNonce, + getNoGasPriceFetched, + getIsEthGasPriceFetched, + getIsMainnet, } from '../../selectors'; import { currentNetworkTxListSelector } from '../../selectors/transactions'; import Loading from '../../components/ui/loading-screen'; @@ -116,7 +119,11 @@ export default function ConfirmApprove() { const customData = customPermissionAmount ? getCustomTxParamsData(data, { customPermissionAmount, decimals }) : null; - + const isEthGasPrice = useSelector(getIsEthGasPriceFetched); + const noGasPrice = useSelector(getNoGasPriceFetched); + const isMainnet = useSelector(getIsMainnet); + const hideBasic = + isEthGasPrice || noGasPrice || !(isMainnet || process.env.IN_TEST); return tokenSymbol === undefined ? ( ) : ( @@ -136,7 +143,13 @@ export default function ConfirmApprove() { tokenSymbol={tokenSymbol} tokenBalance={tokenBalance} showCustomizeGasModal={() => - dispatch(showModal({ name: 'CUSTOMIZE_GAS', txData })) + dispatch( + showModal({ + name: 'CUSTOMIZE_GAS', + txData, + hideBasic, + }), + ) } showEditApprovalPermissionModal={({ /* eslint-disable no-shadow */ diff --git a/ui/pages/confirm-approve/confirm-approve.stories.js b/ui/pages/confirm-approve/confirm-approve.stories.js new file mode 100644 index 000000000..31ddae007 --- /dev/null +++ b/ui/pages/confirm-approve/confirm-approve.stories.js @@ -0,0 +1,67 @@ +/* eslint-disable react/prop-types */ +import React, { useEffect } from 'react'; +import { text } from '@storybook/addon-knobs'; +import { useParams } from 'react-router-dom'; +import { useSelector } from 'react-redux'; +import { updateMetamaskState } from '../../store/actions'; +import { currentNetworkTxListSelector } from '../../selectors/transactions'; +import { store } from '../../../.storybook/preview'; + +import { + currentNetworkTxListSample, + domainMetadata, +} from '../../../.storybook/initial-states/approval-screens/token-approval'; +import ConfirmApprove from '.'; + +export default { + title: 'Confirmation Screens', +}; + +// transaction ID, maps to entry in state.metamask.currentNetworkTxList +const txId = 7900715443136469; + +const PageSet = ({ children }) => { + const origin = text('Origin', 'https://metamask.github.io'); + const domainIconUrl = text( + 'Icon URL', + 'https://metamask.github.io/test-dapp/metamask-fox.svg', + ); + + const currentNetworkTxList = useSelector(currentNetworkTxListSelector); + const transaction = currentNetworkTxList.find(({ id }) => id === txId); + + useEffect(() => { + transaction.origin = origin; + store.dispatch( + updateMetamaskState({ currentNetworkTxList: [transaction] }), + ); + }, [origin]); + + useEffect(() => { + store.dispatch( + updateMetamaskState({ + domainMetadata: { + [origin]: { + icon: domainIconUrl, + }, + }, + }), + ); + }, [domainIconUrl]); + + const params = useParams(); + params.id = txId; + return children; +}; + +export const ApproveTokens = () => { + store.dispatch( + updateMetamaskState({ currentNetworkTxList: [currentNetworkTxListSample] }), + ); + store.dispatch(updateMetamaskState({ domainMetadata })); + return ( + + + + ); +}; diff --git a/ui/app/pages/confirm-approve/confirm-approve.util.js b/ui/pages/confirm-approve/confirm-approve.util.js similarity index 94% rename from ui/app/pages/confirm-approve/confirm-approve.util.js rename to ui/pages/confirm-approve/confirm-approve.util.js index 3345b0966..240925611 100644 --- a/ui/app/pages/confirm-approve/confirm-approve.util.js +++ b/ui/pages/confirm-approve/confirm-approve.util.js @@ -1,4 +1,4 @@ -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; import { decimalToHex } from '../../helpers/utils/conversions.util'; import { calcTokenValue, diff --git a/ui/app/pages/confirm-approve/index.js b/ui/pages/confirm-approve/index.js similarity index 100% rename from ui/app/pages/confirm-approve/index.js rename to ui/pages/confirm-approve/index.js diff --git a/ui/app/pages/confirm-approve/index.scss b/ui/pages/confirm-approve/index.scss similarity index 100% rename from ui/app/pages/confirm-approve/index.scss rename to ui/pages/confirm-approve/index.scss diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js similarity index 98% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js index 3ed8f67c2..ffbbccf19 100644 --- a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.component.js +++ b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.component.js @@ -9,8 +9,8 @@ import Identicon from '../../components/ui/identicon'; import Tooltip from '../../components/ui/tooltip'; import Copy from '../../components/ui/icon/copy-icon.component'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { conversionUtil } from '../../helpers/utils/conversion-util'; export default class ConfirmDecryptMessage extends Component { diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js similarity index 100% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.container.js rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.container.js diff --git a/ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.scss b/ui/pages/confirm-decrypt-message/confirm-decrypt-message.scss similarity index 100% rename from ui/app/pages/confirm-decrypt-message/confirm-decrypt-message.scss rename to ui/pages/confirm-decrypt-message/confirm-decrypt-message.scss diff --git a/ui/app/pages/confirm-decrypt-message/index.js b/ui/pages/confirm-decrypt-message/index.js similarity index 100% rename from ui/app/pages/confirm-decrypt-message/index.js rename to ui/pages/confirm-decrypt-message/index.js diff --git a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js similarity index 95% rename from ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js rename to ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js index 231cd484a..63026bfaa 100644 --- a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js +++ b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ConfirmTransactionBase from '../confirm-transaction-base'; -import { toBuffer } from '../../../../shared/modules/buffer-utils'; +import { toBuffer } from '../../../shared/modules/buffer-utils'; export default class ConfirmDeployContract extends Component { static contextTypes = { diff --git a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js b/ui/pages/confirm-deploy-contract/confirm-deploy-contract.container.js similarity index 100% rename from ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.container.js rename to ui/pages/confirm-deploy-contract/confirm-deploy-contract.container.js diff --git a/ui/app/pages/confirm-deploy-contract/index.js b/ui/pages/confirm-deploy-contract/index.js similarity index 100% rename from ui/app/pages/confirm-deploy-contract/index.js rename to ui/pages/confirm-deploy-contract/index.js diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js similarity index 97% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js index fb4100832..2382ea0bc 100644 --- a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js +++ b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.component.js @@ -5,8 +5,8 @@ import AccountListItem from '../../components/app/account-list-item'; import Button from '../../components/ui/button'; import Identicon from '../../components/ui/identicon'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { conversionUtil } from '../../helpers/utils/conversion-util'; export default class ConfirmEncryptionPublicKey extends Component { diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.container.js diff --git a/ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss b/ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss rename to ui/pages/confirm-encryption-public-key/confirm-encryption-public-key.scss diff --git a/ui/app/pages/confirm-encryption-public-key/index.js b/ui/pages/confirm-encryption-public-key/index.js similarity index 100% rename from ui/app/pages/confirm-encryption-public-key/index.js rename to ui/pages/confirm-encryption-public-key/index.js diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js b/ui/pages/confirm-send-ether/confirm-send-ether.component.js similarity index 100% rename from ui/app/pages/confirm-send-ether/confirm-send-ether.component.js rename to ui/pages/confirm-send-ether/confirm-send-ether.component.js diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.container.js b/ui/pages/confirm-send-ether/confirm-send-ether.container.js similarity index 100% rename from ui/app/pages/confirm-send-ether/confirm-send-ether.container.js rename to ui/pages/confirm-send-ether/confirm-send-ether.container.js diff --git a/ui/app/pages/confirm-send-ether/index.js b/ui/pages/confirm-send-ether/index.js similarity index 100% rename from ui/app/pages/confirm-send-ether/index.js rename to ui/pages/confirm-send-ether/index.js diff --git a/ui/app/pages/confirm-send-token/confirm-send-token.component.js b/ui/pages/confirm-send-token/confirm-send-token.component.js similarity index 100% rename from ui/app/pages/confirm-send-token/confirm-send-token.component.js rename to ui/pages/confirm-send-token/confirm-send-token.component.js diff --git a/ui/app/pages/confirm-send-token/confirm-send-token.container.js b/ui/pages/confirm-send-token/confirm-send-token.container.js similarity index 100% rename from ui/app/pages/confirm-send-token/confirm-send-token.container.js rename to ui/pages/confirm-send-token/confirm-send-token.container.js diff --git a/ui/app/pages/confirm-send-token/index.js b/ui/pages/confirm-send-token/index.js similarity index 100% rename from ui/app/pages/confirm-send-token/index.js rename to ui/pages/confirm-send-token/index.js diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js similarity index 98% rename from ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js rename to ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js index a03cee3ef..b15a5f99e 100644 --- a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js +++ b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js @@ -86,7 +86,7 @@ export default function ConfirmTokenTransactionBase({ primaryTotalTextOverride={
{`${tokensText} + `} - + {ethTransactionTotal}
} diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js similarity index 100% rename from ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js rename to ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js diff --git a/ui/app/pages/confirm-token-transaction-base/index.js b/ui/pages/confirm-token-transaction-base/index.js similarity index 100% rename from ui/app/pages/confirm-token-transaction-base/index.js rename to ui/pages/confirm-token-transaction-base/index.js diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js similarity index 90% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index e20efc83a..8a8e9e47e 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -1,16 +1,21 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import ConfirmPageContainer, { ConfirmDetailRow, } from '../../components/app/confirm-page-container'; import { isBalanceSufficient } from '../send/send.utils'; -import { CONFIRM_TRANSACTION_ROUTE } from '../../helpers/constants/routes'; +import { + CONFIRM_TRANSACTION_ROUTE, + DEFAULT_ROUTE, +} from '../../helpers/constants/routes'; import { INSUFFICIENT_FUNDS_ERROR_KEY, TRANSACTION_ERROR_KEY, GAS_LIMIT_TOO_LOW_ERROR_KEY, + ETH_GAS_PRICE_FETCH_WARNING_KEY, + GAS_PRICE_FETCH_FAILURE_ERROR_KEY, } from '../../helpers/constants/error-keys'; import UserPreferencedCurrencyDisplay from '../../components/app/user-preferenced-currency-display'; import { PRIMARY, SECONDARY } from '../../helpers/constants/common'; @@ -20,9 +25,10 @@ import TextField from '../../components/ui/text-field'; import { TRANSACTION_TYPES, TRANSACTION_STATUSES, -} from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/transaction'; import { getTransactionTypeTitle } from '../../helpers/utils/transactions.util'; -import { toBuffer } from '../../../../shared/modules/buffer-utils'; +import ErrorMessage from '../../components/ui/error-message'; +import { toBuffer } from '../../../shared/modules/buffer-utils'; export default class ConfirmTransactionBase extends Component { static contextTypes = { @@ -95,12 +101,16 @@ export default class ConfirmTransactionBase extends Component { showAccountInHeader: PropTypes.bool, mostRecentOverviewPage: PropTypes.string.isRequired, isMainnet: PropTypes.bool, + isEthGasPrice: PropTypes.bool, + noGasPrice: PropTypes.bool, + setDefaultHomeActiveTabName: PropTypes.func, }; state = { submitting: false, submitError: null, submitWarning: '', + ethGasPriceWarning: '', }; componentDidUpdate(prevProps) { @@ -109,17 +119,19 @@ export default class ConfirmTransactionBase extends Component { showTransactionConfirmedModal, history, clearConfirmTransaction, - mostRecentOverviewPage, nextNonce, customNonceValue, toAddress, tryReverseResolveAddress, + isEthGasPrice, + setDefaultHomeActiveTabName, } = this.props; const { customNonceValue: prevCustomNonceValue, nextNonce: prevNextNonce, toAddress: prevToAddress, transactionStatus: prevTxStatus, + isEthGasPrice: prevIsEthGasPrice, } = prevProps; const statusUpdated = transactionStatus !== prevTxStatus; const txDroppedOrConfirmed = @@ -143,7 +155,9 @@ export default class ConfirmTransactionBase extends Component { showTransactionConfirmedModal({ onSubmit: () => { clearConfirmTransaction(); - history.push(mostRecentOverviewPage); + setDefaultHomeActiveTabName('Activity').then(() => { + history.push(DEFAULT_ROUTE); + }); }, }); } @@ -151,6 +165,18 @@ export default class ConfirmTransactionBase extends Component { if (toAddress && toAddress !== prevToAddress) { tryReverseResolveAddress(toAddress); } + + if (isEthGasPrice !== prevIsEthGasPrice) { + if (isEthGasPrice) { + this.setState({ + ethGasPriceWarning: this.context.t(ETH_GAS_PRICE_FETCH_WARNING_KEY), + }); + } else { + this.setState({ + ethGasPriceWarning: '', + }); + } + } } getErrorKey() { @@ -160,6 +186,7 @@ export default class ConfirmTransactionBase extends Component { hexTransactionFee, txData: { simulationFails, txParams: { value: amount } = {} } = {}, customGas, + noGasPrice, } = this.props; const insufficientBalance = @@ -194,6 +221,13 @@ export default class ConfirmTransactionBase extends Component { }; } + if (noGasPrice) { + return { + valid: false, + errorKey: GAS_PRICE_FETCH_FAILURE_ERROR_KEY, + }; + } + return { valid: true, }; @@ -243,9 +277,12 @@ export default class ConfirmTransactionBase extends Component { nextNonce, getNextNonce, isMainnet, + isEthGasPrice, + noGasPrice, } = this.props; const notMainnetOrTest = !(isMainnet || process.env.IN_TEST); + const gasPriceFetchFailure = isEthGasPrice || noGasPrice; return (
@@ -253,18 +290,26 @@ export default class ConfirmTransactionBase extends Component { this.handleEditGas() } - onHeaderClick={notMainnetOrTest ? null : () => this.handleEditGas()} secondaryText={ hideFiatConversion ? this.context.t('noConversionRateAvailable') : '' } /> - {advancedInlineGasShown || notMainnetOrTest ? ( + {advancedInlineGasShown || + notMainnetOrTest || + gasPriceFetchFailure ? ( updateGasAndCalculate({ ...customGas, gasPrice: newGasPrice }) @@ -279,6 +324,11 @@ export default class ConfirmTransactionBase extends Component { isSpeedUp={false} /> ) : null} + {noGasPrice ? ( +
+ +
+ ) : null}
this.handleSubmit()} hideSenderToRecipient={hideSenderToRecipient} origin={txData.origin} + ethGasPriceWarning={ethGasPriceWarning} /> ); } diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.test.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.test.js similarity index 100% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.test.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.component.test.js diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js similarity index 93% rename from ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js rename to ui/pages/confirm-transaction-base/confirm-transaction-base.container.js index 48d4ff814..6af7e49a9 100644 --- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -14,6 +14,7 @@ import { updateTransaction, getNextNonce, tryReverseResolveAddress, + setDefaultHomeActiveTabName, } from '../../store/actions'; import { INSUFFICIENT_FUNDS_ERROR_KEY, @@ -33,10 +34,12 @@ import { getUseNonceField, getPreferences, transactionFeeSelector, + getNoGasPriceFetched, + getIsEthGasPriceFetched, } from '../../selectors'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; -import { transactionMatchesNetwork } from '../../../../shared/modules/transaction.utils'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; import ConfirmTransactionBase from './confirm-transaction-base.component'; const casedContractMap = Object.keys(contractMap).reduce((acc, base) => { @@ -147,6 +150,8 @@ const mapStateToProps = (state, ownProps) => { }; } customNonceValue = getCustomNonceValue(state); + const isEthGasPrice = getIsEthGasPriceFetched(state); + const noGasPrice = getNoGasPriceFetched(state); return { balance, @@ -186,6 +191,8 @@ const mapStateToProps = (state, ownProps) => { nextNonce, mostRecentOverviewPage: getMostRecentOverviewPage(state), isMainnet, + isEthGasPrice, + noGasPrice, }; }; @@ -204,7 +211,12 @@ export const mapDispatchToProps = (dispatch) => { }, showCustomizeGasModal: ({ txData, onSubmit, validate }) => { return dispatch( - showModal({ name: 'CUSTOMIZE_GAS', txData, onSubmit, validate }), + showModal({ + name: 'CUSTOMIZE_GAS', + txData, + onSubmit, + validate, + }), ); }, updateGasAndCalculate: (updatedTx) => { @@ -224,6 +236,8 @@ export const mapDispatchToProps = (dispatch) => { dispatch(updateAndApproveTx(customNonceMerge(txData))), setMetaMetricsSendCount: (val) => dispatch(setMetaMetricsSendCount(val)), getNextNonce: () => dispatch(getNextNonce()), + setDefaultHomeActiveTabName: (tabName) => + dispatch(setDefaultHomeActiveTabName(tabName)), }; }; @@ -275,6 +289,7 @@ const getValidateEditGas = ({ balance, conversionRate, txData }) => { const mergeProps = (stateProps, dispatchProps, ownProps) => { const { balance, conversionRate, txData, unapprovedTxs } = stateProps; + const { cancelAllTransactions: dispatchCancelAllTransactions, showCustomizeGasModal: dispatchShowCustomizeGasModal, diff --git a/ui/app/pages/confirm-transaction-base/index.js b/ui/pages/confirm-transaction-base/index.js similarity index 100% rename from ui/app/pages/confirm-transaction-base/index.js rename to ui/pages/confirm-transaction-base/index.js diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js similarity index 95% rename from ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js rename to ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js index 83aa7cdbc..6a708e54d 100644 --- a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -14,8 +14,8 @@ import { DECRYPT_MESSAGE_REQUEST_PATH, ENCRYPTION_PUBLIC_KEY_REQUEST_PATH, } from '../../helpers/constants/routes'; -import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import { TRANSACTION_TYPES } from '../../../../shared/constants/transaction'; +import { MESSAGE_TYPE } from '../../../shared/constants/app'; +import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; export default class ConfirmTransactionSwitch extends Component { static propTypes = { diff --git a/ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js b/ui/pages/confirm-transaction-switch/confirm-transaction-switch.container.js similarity index 100% rename from ui/app/pages/confirm-transaction-switch/confirm-transaction-switch.container.js rename to ui/pages/confirm-transaction-switch/confirm-transaction-switch.container.js diff --git a/ui/app/pages/confirm-transaction-switch/index.js b/ui/pages/confirm-transaction-switch/index.js similarity index 100% rename from ui/app/pages/confirm-transaction-switch/index.js rename to ui/pages/confirm-transaction-switch/index.js diff --git a/ui/app/pages/confirm-transaction/conf-tx.js b/ui/pages/confirm-transaction/conf-tx.js similarity index 97% rename from ui/app/pages/confirm-transaction/conf-tx.js rename to ui/pages/confirm-transaction/conf-tx.js index ef8657424..23f6e2375 100644 --- a/ui/app/pages/confirm-transaction/conf-tx.js +++ b/ui/pages/confirm-transaction/conf-tx.js @@ -5,13 +5,13 @@ import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; import log from 'loglevel'; import * as actions from '../../store/actions'; -import txHelper from '../../../lib/tx-helper'; +import txHelper from '../../helpers/utils/tx-helper'; import SignatureRequest from '../../components/app/signature-request'; import SignatureRequestOriginal from '../../components/app/signature-request-original'; import Loading from '../../components/ui/loading-screen'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; -import { MESSAGE_TYPE } from '../../../../shared/constants/app'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +import { MESSAGE_TYPE } from '../../../shared/constants/app'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; function mapStateToProps(state) { const { metamask, appState } = state; diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.component.js b/ui/pages/confirm-transaction/confirm-transaction.component.js similarity index 96% rename from ui/app/pages/confirm-transaction/confirm-transaction.component.js rename to ui/pages/confirm-transaction/confirm-transaction.component.js index c08b4f387..b88424cc7 100644 --- a/ui/app/pages/confirm-transaction/confirm-transaction.component.js +++ b/ui/pages/confirm-transaction/confirm-transaction.component.js @@ -23,6 +23,7 @@ import { SIGNATURE_REQUEST_PATH, DECRYPT_MESSAGE_REQUEST_PATH, ENCRYPTION_PUBLIC_KEY_REQUEST_PATH, + DEFAULT_ROUTE, } from '../../helpers/constants/routes'; import ConfTx from './conf-tx'; @@ -45,6 +46,7 @@ export default class ConfirmTransaction extends Component { paramsTransactionId: PropTypes.string, getTokenParams: PropTypes.func, isTokenMethodAction: PropTypes.bool, + setDefaultHomeActiveTabName: PropTypes.func, }; componentDidMount() { @@ -89,6 +91,7 @@ export default class ConfirmTransaction extends Component { history, mostRecentOverviewPage, totalUnapprovedCount, + setDefaultHomeActiveTabName, } = this.props; if ( @@ -104,7 +107,9 @@ export default class ConfirmTransaction extends Component { !transactionId && !totalUnapprovedCount ) { - history.replace(mostRecentOverviewPage); + setDefaultHomeActiveTabName('Activity').then(() => { + history.replace(DEFAULT_ROUTE); + }); } else if ( prevProps.transactionId && transactionId && diff --git a/ui/app/pages/confirm-transaction/confirm-transaction.container.js b/ui/pages/confirm-transaction/confirm-transaction.container.js similarity index 90% rename from ui/app/pages/confirm-transaction/confirm-transaction.container.js rename to ui/pages/confirm-transaction/confirm-transaction.container.js index 68ee7c3ed..21acaa7ff 100644 --- a/ui/app/pages/confirm-transaction/confirm-transaction.container.js +++ b/ui/pages/confirm-transaction/confirm-transaction.container.js @@ -8,7 +8,11 @@ import { import { isTokenMethodAction } from '../../helpers/utils/transactions.util'; import { fetchBasicGasEstimates } from '../../ducks/gas/gas.duck'; -import { getContractMethodData, getTokenParams } from '../../store/actions'; +import { + getContractMethodData, + getTokenParams, + setDefaultHomeActiveTabName, +} from '../../store/actions'; import { unconfirmedTransactionsListSelector } from '../../selectors'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; import ConfirmTransaction from './confirm-transaction.component'; @@ -51,6 +55,8 @@ const mapDispatchToProps = (dispatch) => { fetchBasicGasEstimates: () => dispatch(fetchBasicGasEstimates()), getContractMethodData: (data) => dispatch(getContractMethodData(data)), getTokenParams: (tokenAddress) => dispatch(getTokenParams(tokenAddress)), + setDefaultHomeActiveTabName: (tabName) => + dispatch(setDefaultHomeActiveTabName(tabName)), }; }; diff --git a/ui/app/pages/confirm-transaction/index.js b/ui/pages/confirm-transaction/index.js similarity index 100% rename from ui/app/pages/confirm-transaction/index.js rename to ui/pages/confirm-transaction/index.js diff --git a/ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.js b/ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.js rename to ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js diff --git a/ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.scss b/ui/pages/confirmation/components/confirmation-footer/confirmation-footer.scss similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/confirmation-footer.scss rename to ui/pages/confirmation/components/confirmation-footer/confirmation-footer.scss diff --git a/ui/app/pages/confirmation/components/confirmation-footer/index.js b/ui/pages/confirmation/components/confirmation-footer/index.js similarity index 100% rename from ui/app/pages/confirmation/components/confirmation-footer/index.js rename to ui/pages/confirmation/components/confirmation-footer/index.js diff --git a/ui/app/pages/confirmation/confirmation.js b/ui/pages/confirmation/confirmation.js similarity index 100% rename from ui/app/pages/confirmation/confirmation.js rename to ui/pages/confirmation/confirmation.js diff --git a/ui/app/pages/confirmation/confirmation.scss b/ui/pages/confirmation/confirmation.scss similarity index 100% rename from ui/app/pages/confirmation/confirmation.scss rename to ui/pages/confirmation/confirmation.scss diff --git a/ui/app/pages/confirmation/index.js b/ui/pages/confirmation/index.js similarity index 100% rename from ui/app/pages/confirmation/index.js rename to ui/pages/confirmation/index.js diff --git a/ui/app/pages/confirmation/templates/add-ethereum-chain.js b/ui/pages/confirmation/templates/add-ethereum-chain.js similarity index 100% rename from ui/app/pages/confirmation/templates/add-ethereum-chain.js rename to ui/pages/confirmation/templates/add-ethereum-chain.js diff --git a/ui/app/pages/confirmation/templates/index.js b/ui/pages/confirmation/templates/index.js similarity index 98% rename from ui/app/pages/confirmation/templates/index.js rename to ui/pages/confirmation/templates/index.js index 3c90a68fd..a4e873735 100644 --- a/ui/app/pages/confirmation/templates/index.js +++ b/ui/pages/confirmation/templates/index.js @@ -1,5 +1,5 @@ import { omit, pick } from 'lodash'; -import { MESSAGE_TYPE } from '../../../../../shared/constants/app'; +import { MESSAGE_TYPE } from '../../../../shared/constants/app'; import { rejectPendingApproval, resolvePendingApproval, diff --git a/ui/app/pages/confirmation/templates/switch-ethereum-chain.js b/ui/pages/confirmation/templates/switch-ethereum-chain.js similarity index 96% rename from ui/app/pages/confirmation/templates/switch-ethereum-chain.js rename to ui/pages/confirmation/templates/switch-ethereum-chain.js index 4dc351027..23f255bc6 100644 --- a/ui/app/pages/confirmation/templates/switch-ethereum-chain.js +++ b/ui/pages/confirmation/templates/switch-ethereum-chain.js @@ -1,5 +1,5 @@ import { ethErrors } from 'eth-rpc-errors'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import { JUSTIFY_CONTENT, SEVERITIES, diff --git a/ui/app/pages/connected-accounts/connected-accounts.component.js b/ui/pages/connected-accounts/connected-accounts.component.js similarity index 100% rename from ui/app/pages/connected-accounts/connected-accounts.component.js rename to ui/pages/connected-accounts/connected-accounts.component.js diff --git a/ui/app/pages/connected-accounts/connected-accounts.container.js b/ui/pages/connected-accounts/connected-accounts.container.js similarity index 100% rename from ui/app/pages/connected-accounts/connected-accounts.container.js rename to ui/pages/connected-accounts/connected-accounts.container.js diff --git a/ui/app/pages/connected-accounts/index.js b/ui/pages/connected-accounts/index.js similarity index 100% rename from ui/app/pages/connected-accounts/index.js rename to ui/pages/connected-accounts/index.js diff --git a/ui/app/pages/connected-accounts/index.scss b/ui/pages/connected-accounts/index.scss similarity index 100% rename from ui/app/pages/connected-accounts/index.scss rename to ui/pages/connected-accounts/index.scss diff --git a/ui/app/pages/connected-sites/connected-sites.component.js b/ui/pages/connected-sites/connected-sites.component.js similarity index 100% rename from ui/app/pages/connected-sites/connected-sites.component.js rename to ui/pages/connected-sites/connected-sites.component.js diff --git a/ui/app/pages/connected-sites/connected-sites.container.js b/ui/pages/connected-sites/connected-sites.container.js similarity index 100% rename from ui/app/pages/connected-sites/connected-sites.container.js rename to ui/pages/connected-sites/connected-sites.container.js diff --git a/ui/app/pages/connected-sites/index.js b/ui/pages/connected-sites/index.js similarity index 100% rename from ui/app/pages/connected-sites/index.js rename to ui/pages/connected-sites/index.js diff --git a/ui/app/pages/connected-sites/index.scss b/ui/pages/connected-sites/index.scss similarity index 100% rename from ui/app/pages/connected-sites/index.scss rename to ui/pages/connected-sites/index.scss diff --git a/ui/app/pages/create-account/connect-hardware/account-list.js b/ui/pages/create-account/connect-hardware/account-list.js similarity index 69% rename from ui/app/pages/create-account/connect-hardware/account-list.js rename to ui/pages/create-account/connect-hardware/account-list.js index 5ce75ae81..a3bb775df 100644 --- a/ui/app/pages/create-account/connect-hardware/account-list.js +++ b/ui/pages/create-account/connect-hardware/account-list.js @@ -1,11 +1,18 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import getAccountLink from '../../../../lib/account-link'; +import { getAccountLink } from '@metamask/etherscan-link'; + import Button from '../../../components/ui/button'; import Checkbox from '../../../components/ui/check-box'; import Dropdown from '../../../components/ui/dropdown'; +import Popover from '../../../components/ui/popover'; class AccountList extends Component { + state = { + showPopover: false, + pathValue: null, + }; + goToNextPage = () => { // If we have < 5 accounts, it's restricted by BIP-44 if (this.props.accounts.length === 5) { @@ -19,8 +26,13 @@ class AccountList extends Component { this.props.getPage(this.props.device, -1, this.props.selectedPath); }; + setPath(pathValue) { + this.setState({ pathValue }); + } + renderHdPathSelector() { - const { onPathChange, selectedPath, hdPaths } = this.props; + const { selectedPath, hdPaths } = this.props; + const { pathValue } = this.state; return (
@@ -32,9 +44,9 @@ class AccountList extends Component { { - onPathChange(value); + this.setPath(value); }} />
@@ -47,25 +59,32 @@ class AccountList extends Component { } renderHeader() { - const { device } = this.props; return (

- {`${this.context.t('unlock')} ${this.capitalizeDevice(device)}`} + {this.context.t('selectAnAccount')}

- {device.toLowerCase() === 'ledger' ? this.renderHdPathSelector() : null}

{this.context.t('selectAnAccount')}

{this.context.t('selectAnAccountHelp')} + {this.context.t('selectAnAccountHelpDirections', [ + , + ])}

); } renderAccounts() { - const { accounts, connectedAccounts } = this.props; + const { accounts, connectedAccounts, rpcPrefs, chainId } = this.props; return (
@@ -112,11 +131,27 @@ class AccountList extends Component {
{ + const accountLink = getAccountLink( + account.address, + chainId, + rpcPrefs, + ); + this.context.trackEvent({ + category: 'Account', + event: 'Clicked Block Explorer Link', + properties: { + actions: 'Hardware Connect', + link_type: 'Account Tracker', + block_explorer_domain: accountLink + ? new URL(accountLink)?.hostname + : '', + }, + }); + global.platform.openTab({ + url: accountLink, + }); + }} target="_blank" rel="noopener noreferrer" title={this.context.t('etherscanView')} @@ -193,7 +228,44 @@ class AccountList extends Component { ); } + renderSelectPathPopover() { + const { pathValue } = this.state; + const { onPathChange } = this.props; + + const footer = ( +
+ + +
+ ); + + return ( + + {this.renderHdPathSelector()} + + ); + } + render() { + const { showPopover } = this.state; return (
{this.renderHeader()} @@ -201,6 +273,7 @@ class AccountList extends Component { {this.renderPagination()} {this.renderButtons()} {this.renderForgetDevice()} + {showPopover && this.renderSelectPathPopover()}
); } @@ -226,6 +299,7 @@ AccountList.propTypes = { AccountList.contextTypes = { t: PropTypes.func, + trackEvent: PropTypes.func, }; export default AccountList; diff --git a/ui/app/pages/create-account/connect-hardware/index.js b/ui/pages/create-account/connect-hardware/index.js similarity index 94% rename from ui/app/pages/create-account/connect-hardware/index.js rename to ui/pages/create-account/connect-hardware/index.js index 67051c213..ef9cc3f80 100644 --- a/ui/app/pages/create-account/connect-hardware/index.js +++ b/ui/pages/create-account/connect-hardware/index.js @@ -139,11 +139,24 @@ class ConnectHardwareForm extends Component { this.setState({ browserSupported: false, error: null }); } else if (errorMessage.includes(U2F_ERROR)) { this.setState({ error: U2F_ERROR }); + } else if ( + errorMessage === 'LEDGER_LOCKED' || + errorMessage === 'LEDGER_WRONG_APP' + ) { + this.setState({ + error: this.context.t('ledgerLocked'), + }); + } else if (errorMessage.includes('timeout')) { + this.setState({ + error: this.context.t('ledgerTimeout'), + }); } else if ( errorMessage !== 'Window closed' && errorMessage !== 'Popup closed' ) { - this.setState({ error: errorMessage }); + this.setState({ + error: errorMessage, + }); } }); }; @@ -248,6 +261,7 @@ class ConnectHardwareForm extends Component { ); } @@ -298,6 +312,7 @@ ConnectHardwareForm.propTypes = { connectedAccounts: PropTypes.array.isRequired, defaultHdPaths: PropTypes.object, mostRecentOverviewPage: PropTypes.string.isRequired, + useLedgerLive: PropTypes.bool.isRequired, }; const mapStateToProps = (state) => ({ @@ -307,6 +322,7 @@ const mapStateToProps = (state) => ({ connectedAccounts: getMetaMaskAccountsConnected(state), defaultHdPaths: state.appState.defaultHdPaths, mostRecentOverviewPage: getMostRecentOverviewPage(state), + useLedgerLive: state.metamask.useLedgerLive, }); const mapDispatchToProps = (dispatch) => { diff --git a/ui/app/pages/create-account/connect-hardware/index.scss b/ui/pages/create-account/connect-hardware/index.scss similarity index 80% rename from ui/app/pages/create-account/connect-hardware/index.scss rename to ui/pages/create-account/connect-hardware/index.scss index 03d4de75b..b796812cf 100644 --- a/ui/app/pages/create-account/connect-hardware/index.scss +++ b/ui/pages/create-account/connect-hardware/index.scss @@ -1,7 +1,5 @@ .hw-tutorial { width: 375px; - border-top: 1px solid #d2d8dd; - border-bottom: 1px solid #d2d8dd; overflow: visible; display: block; padding: 15px 30px; @@ -94,23 +92,6 @@ } } - &__learn-more { - @include H6; - - margin-top: 15px; - color: #5b5d67; - text-align: center; - cursor: pointer; - - &__arrow { - transform: rotate(90deg); - display: block; - text-align: center; - height: 30px; - margin: 0 auto 10px; - } - } - &__title { @include H4; @@ -132,6 +113,14 @@ color: #9b9b9b; margin-top: 10px; margin-bottom: 15px; + + &-link { + @include H6; + + text-align: center; + color: $primary-1; + background: unset; + } } &__error { @@ -141,57 +130,6 @@ text-align: center; } - &__link { - color: #2f9ae0; - } - - &__footer { - &__title { - @include H4; - - padding-top: 15px; - padding-bottom: 12px; - font-weight: 400; - text-align: center; - } - - &__msg { - @include H6; - - color: #9b9b9b; - margin-top: 12px; - margin-bottom: 27px; - width: 100%; - display: block; - margin-left: 20px; - } - - &__link { - color: #2f9ae0; - margin-left: 5px; - } - } - - &__get-hw { - width: 100%; - padding-bottom: 10px; - padding-top: 10px; - - &__msg { - @include H6; - - color: #9b9b9b; - } - - &__link { - @include H4; - - text-align: center; - color: #2f9ae0; - cursor: pointer; - } - } - &__step-asset { margin: 0 auto 20px; display: flex; @@ -358,3 +296,18 @@ cursor: pointer; } } + +.switch-ledger-path-popover__content { + padding: 0 24px 48px 24px; +} + +.switch-ledger-path-popover__footer { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; + + button:first-of-type { + margin-right: 15px; + } +} diff --git a/ui/app/pages/create-account/connect-hardware/select-hardware.js b/ui/pages/create-account/connect-hardware/select-hardware.js similarity index 53% rename from ui/app/pages/create-account/connect-hardware/select-hardware.js rename to ui/pages/create-account/connect-hardware/select-hardware.js index 040245c57..bd1bba7c4 100644 --- a/ui/app/pages/create-account/connect-hardware/select-hardware.js +++ b/ui/pages/create-account/connect-hardware/select-hardware.js @@ -11,6 +11,7 @@ export default class SelectHardware extends Component { static propTypes = { connectToHardwareWallet: PropTypes.func.isRequired, browserSupported: PropTypes.bool.isRequired, + useLedgerLive: PropTypes.bool.isRequired, }; state = { @@ -65,19 +66,24 @@ export default class SelectHardware extends Component { {this.renderConnectToLedgerButton()} {this.renderConnectToTrezorButton()}
- ); } + renderContinueButton() { + return ( + + ); + } + renderUnsupportedBrowser() { return (
@@ -117,131 +123,120 @@ export default class SelectHardware extends Component { ); } - getAffiliateLinks() { - const links = { - trezor: `Trezor`, - ledger: `Ledger`, - }; - - const text = this.context.t('orderOneHere'); - const response = text - .replace('Trezor', links.trezor) - .replace('Ledger', links.ledger); - - return ( -
- ); - } - - renderTrezorAffiliateLink() { - return ( -
-

- {this.context.t('dontHaveAHardwareWallet')} -

- {this.getAffiliateLinks()} -
- ); + renderTutorialsteps() { + switch (this.state.selectedDevice) { + case 'ledger': + return this.renderLedgerTutorialSteps(); + case 'trezor': + return this.renderTrezorTutorialSteps(); + default: + return ''; + } } - scrollToTutorial = () => { - if (this.referenceNode) { - this.referenceNode.scrollIntoView({ behavior: 'smooth' }); + renderLedgerTutorialSteps() { + const steps = []; + if (this.props.useLedgerLive) { + steps.push({ + title: this.context.t('step1LedgerWallet'), + message: this.context.t('step1LedgerWalletMsg', [ + + {this.context.t('ledgerLiveApp')} + , + ]), + }); } - }; - renderLearnMore() { + steps.push({ + asset: 'plug-in-wallet', + dimensions: { width: '225px', height: '75px' }, + title: this.context.t('step2LedgerWallet'), + message: this.context.t('step2LedgerWalletMsg', [ + + {this.context.t('hardwareWalletSupportLinkConversion')} + , + ]), + }); + return ( -

- {this.context.t('learnMore')} - -

+
+ {steps.map((step, index) => ( +
+

{step.title}

+

{step.message}

+ {step.asset && ( + + )} +
+ ))} +
); } - renderTutorialSteps() { + renderTrezorTutorialSteps() { const steps = [ { - asset: 'hardware-wallet-step-1', + asset: 'plug-in-wallet', dimensions: { width: '225px', height: '75px' }, - title: this.context.t('step1HardwareWallet'), - message: this.context.t('step1HardwareWalletMsg'), - }, - { - asset: 'hardware-wallet-step-2', - dimensions: { width: '300px', height: '100px' }, - title: this.context.t('step2HardwareWallet'), - message: this.context.t('step2HardwareWalletMsg'), - }, - { - asset: 'hardware-wallet-step-3', - dimensions: { width: '120px', height: '90px' }, - title: this.context.t('step3HardwareWallet'), - message: this.context.t('step3HardwareWalletMsg'), + title: this.context.t('step1TrezorWallet'), + message: this.context.t('step1TrezorWalletMsg', [ + + {this.context.t('hardwareWalletSupportLinkConversion')} + , + ]), }, ]; return ( -
{ - this.referenceNode = node; - }} - > +
{steps.map((step, index) => (

{step.title}

{step.message}

- + {step.asset && ( + + )}
))}
); } - renderFooter() { - return ( -
-

- {this.context.t('readyToConnect')} -

- {this.renderButtons()} -

- {this.context.t('havingTroubleConnecting')} - - {this.context.t('getHelp')} - -

-
- ); - } - renderConnectScreen() { return (
{this.renderHeader()} {this.renderButtons()} - {this.renderTrezorAffiliateLink()} - {this.renderLearnMore()} - {this.renderTutorialSteps()} - {this.renderFooter()} + {this.state.selectedDevice && this.renderTutorialsteps()} + {this.renderContinueButton()}
); } diff --git a/ui/pages/create-account/create-account.component.js b/ui/pages/create-account/create-account.component.js new file mode 100644 index 000000000..4cba7b261 --- /dev/null +++ b/ui/pages/create-account/create-account.component.js @@ -0,0 +1,39 @@ +import React, { Component } from 'react'; +import { Switch, Route } from 'react-router-dom'; + +import { + NEW_ACCOUNT_ROUTE, + IMPORT_ACCOUNT_ROUTE, + CONNECT_HARDWARE_ROUTE, +} from '../../helpers/constants/routes'; +import NewAccountCreateForm from './new-account.container'; +import NewAccountImportForm from './import-account'; +import ConnectHardwareForm from './connect-hardware'; + +export default class CreateAccountPage extends Component { + render() { + return ( +
+
+ + + + + +
+
+ ); + } +} diff --git a/ui/app/pages/create-account/import-account/index.js b/ui/pages/create-account/import-account/index.js similarity index 100% rename from ui/app/pages/create-account/import-account/index.js rename to ui/pages/create-account/import-account/index.js diff --git a/ui/app/pages/create-account/import-account/index.scss b/ui/pages/create-account/import-account/index.scss similarity index 100% rename from ui/app/pages/create-account/import-account/index.scss rename to ui/pages/create-account/import-account/index.scss diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/pages/create-account/import-account/json.js similarity index 100% rename from ui/app/pages/create-account/import-account/json.js rename to ui/pages/create-account/import-account/json.js diff --git a/ui/app/pages/create-account/import-account/private-key.js b/ui/pages/create-account/import-account/private-key.js similarity index 100% rename from ui/app/pages/create-account/import-account/private-key.js rename to ui/pages/create-account/import-account/private-key.js diff --git a/ui/app/pages/create-account/index.js b/ui/pages/create-account/index.js similarity index 100% rename from ui/app/pages/create-account/index.js rename to ui/pages/create-account/index.js diff --git a/ui/app/pages/create-account/index.scss b/ui/pages/create-account/index.scss similarity index 100% rename from ui/app/pages/create-account/index.scss rename to ui/pages/create-account/index.scss diff --git a/ui/app/pages/create-account/new-account.component.js b/ui/pages/create-account/new-account.component.js similarity index 100% rename from ui/app/pages/create-account/new-account.component.js rename to ui/pages/create-account/new-account.component.js diff --git a/ui/app/pages/create-account/new-account.container.js b/ui/pages/create-account/new-account.container.js similarity index 100% rename from ui/app/pages/create-account/new-account.container.js rename to ui/pages/create-account/new-account.container.js diff --git a/ui/app/pages/error/error.component.js b/ui/pages/error/error.component.js similarity index 93% rename from ui/app/pages/error/error.component.js rename to ui/pages/error/error.component.js index 92fad5fa6..eedb1ad64 100644 --- a/ui/app/pages/error/error.component.js +++ b/ui/pages/error/error.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; class ErrorPage extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/error/index.js b/ui/pages/error/index.js similarity index 100% rename from ui/app/pages/error/index.js rename to ui/pages/error/index.js diff --git a/ui/app/pages/error/index.scss b/ui/pages/error/index.scss similarity index 100% rename from ui/app/pages/error/index.scss rename to ui/pages/error/index.scss diff --git a/ui/app/pages/first-time-flow/create-password/create-password.component.js b/ui/pages/first-time-flow/create-password/create-password.component.js similarity index 94% rename from ui/app/pages/first-time-flow/create-password/create-password.component.js rename to ui/pages/first-time-flow/create-password/create-password.component.js index 6913c10fa..357ce283b 100644 --- a/ui/app/pages/first-time-flow/create-password/create-password.component.js +++ b/ui/pages/first-time-flow/create-password/create-password.component.js @@ -5,7 +5,7 @@ import MetaFoxLogo from '../../../components/ui/metafox-logo'; import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE, - INITIALIZE_SEED_PHRASE_ROUTE, + INITIALIZE_SEED_PHRASE_INTRO_ROUTE, } from '../../../helpers/constants/routes'; import NewAccount from './new-account'; import ImportWithSeedPhrase from './import-with-seed-phrase'; @@ -22,7 +22,7 @@ export default class CreatePassword extends PureComponent { const { isInitialized, history } = this.props; if (isInitialized) { - history.push(INITIALIZE_SEED_PHRASE_ROUTE); + history.push(INITIALIZE_SEED_PHRASE_INTRO_ROUTE); } } diff --git a/ui/app/pages/first-time-flow/create-password/create-password.container.js b/ui/pages/first-time-flow/create-password/create-password.container.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/create-password.container.js rename to ui/pages/first-time-flow/create-password/create-password.container.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js similarity index 89% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js index e26639c49..fd76283c7 100644 --- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js +++ b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.test.js @@ -23,7 +23,7 @@ describe('ImportWithSeedPhrase Component', () => { }); describe('parseSeedPhrase', () => { - it('should handle a regular seed phrase', () => { + it('should handle a regular Secret Recovery Phrase', () => { const root = shallowRender({ onSubmit: sinon.spy(), }); @@ -33,7 +33,7 @@ describe('ImportWithSeedPhrase Component', () => { expect(parseSeedPhrase('foo bar baz')).toStrictEqual('foo bar baz'); }); - it('should handle a mixed-case seed phrase', () => { + it('should handle a mixed-case Secret Recovery Phrase', () => { const root = shallowRender({ onSubmit: sinon.spy(), }); @@ -43,7 +43,7 @@ describe('ImportWithSeedPhrase Component', () => { expect(parseSeedPhrase('FOO bAr baZ')).toStrictEqual('foo bar baz'); }); - it('should handle an upper-case seed phrase', () => { + it('should handle an upper-case Secret Recovery Phrase', () => { const root = shallowRender({ onSubmit: sinon.spy(), }); @@ -53,7 +53,7 @@ describe('ImportWithSeedPhrase Component', () => { expect(parseSeedPhrase('FOO BAR BAZ')).toStrictEqual('foo bar baz'); }); - it('should trim extraneous whitespace from the given seed phrase', () => { + it('should trim extraneous whitespace from the given Secret Recovery Phrase', () => { const root = shallowRender({ onSubmit: sinon.spy(), }); diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js b/ui/pages/first-time-flow/create-password/import-with-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js rename to ui/pages/first-time-flow/create-password/import-with-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/create-password/index.js b/ui/pages/first-time-flow/create-password/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/index.js rename to ui/pages/first-time-flow/create-password/index.js diff --git a/ui/app/pages/first-time-flow/create-password/new-account/index.js b/ui/pages/first-time-flow/create-password/new-account/index.js similarity index 100% rename from ui/app/pages/first-time-flow/create-password/new-account/index.js rename to ui/pages/first-time-flow/create-password/new-account/index.js diff --git a/ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js b/ui/pages/first-time-flow/create-password/new-account/new-account.component.js similarity index 98% rename from ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js rename to ui/pages/first-time-flow/create-password/new-account/new-account.component.js index b74cce8a9..1e9417eb1 100644 --- a/ui/app/pages/first-time-flow/create-password/new-account/new-account.component.js +++ b/ui/pages/first-time-flow/create-password/new-account/new-account.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Button from '../../../../components/ui/button'; import { - INITIALIZE_SEED_PHRASE_ROUTE, + INITIALIZE_SEED_PHRASE_INTRO_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE, } from '../../../../helpers/constants/routes'; import TextField from '../../../../components/ui/text-field'; @@ -108,7 +108,7 @@ export default class NewAccount extends PureComponent { }, }); - history.push(INITIALIZE_SEED_PHRASE_ROUTE); + history.push(INITIALIZE_SEED_PHRASE_INTRO_ROUTE); } catch (error) { this.setState({ passwordError: error.message }); } diff --git a/ui/app/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 similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.component.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.component.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.container.js similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.container.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.container.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js similarity index 87% rename from ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js rename to ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js index 314025110..e3f04eaa5 100644 --- a/ui/app/pages/first-time-flow/end-of-flow/end-of-flow.test.js +++ b/ui/pages/first-time-flow/end-of-flow/end-of-flow.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; -import { tick } from '../../../../../test/lib/tick'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { tick } from '../../../../test/lib/tick'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import EndOfFlowScreen from './end-of-flow.container'; diff --git a/ui/app/pages/first-time-flow/end-of-flow/index.js b/ui/pages/first-time-flow/end-of-flow/index.js similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/index.js rename to ui/pages/first-time-flow/end-of-flow/index.js diff --git a/ui/app/pages/first-time-flow/end-of-flow/index.scss b/ui/pages/first-time-flow/end-of-flow/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/end-of-flow/index.scss rename to ui/pages/first-time-flow/end-of-flow/index.scss diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.component.js diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.container.js diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js similarity index 97% rename from ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js rename to ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js index ab057080d..e07331222 100644 --- a/ui/app/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js +++ b/ui/pages/first-time-flow/first-time-flow-switch/first-time-flow-switch.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import { DEFAULT_ROUTE, LOCK_ROUTE, diff --git a/ui/app/pages/first-time-flow/first-time-flow-switch/index.js b/ui/pages/first-time-flow/first-time-flow-switch/index.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow-switch/index.js rename to ui/pages/first-time-flow/first-time-flow-switch/index.js diff --git a/ui/app/pages/first-time-flow/first-time-flow.component.js b/ui/pages/first-time-flow/first-time-flow.component.js similarity index 93% rename from ui/app/pages/first-time-flow/first-time-flow.component.js rename to ui/pages/first-time-flow/first-time-flow.component.js index 5094fb2ba..974c37020 100644 --- a/ui/app/pages/first-time-flow/first-time-flow.component.js +++ b/ui/pages/first-time-flow/first-time-flow.component.js @@ -12,6 +12,7 @@ import { INITIALIZE_END_OF_FLOW_ROUTE, INITIALIZE_METAMETRICS_OPT_IN_ROUTE, INITIALIZE_BACKUP_SEED_PHRASE_ROUTE, + INITIALIZE_SEED_PHRASE_INTRO_ROUTE, } from '../../helpers/constants/routes'; import FirstTimeFlowSwitch from './first-time-flow-switch'; import Welcome from './welcome'; @@ -125,6 +126,16 @@ export default class FirstTimeFlow extends PureComponent { /> )} /> + ( + + )} + /> ( diff --git a/ui/app/pages/first-time-flow/first-time-flow.container.js b/ui/pages/first-time-flow/first-time-flow.container.js similarity index 100% rename from ui/app/pages/first-time-flow/first-time-flow.container.js rename to ui/pages/first-time-flow/first-time-flow.container.js diff --git a/ui/app/pages/first-time-flow/index.js b/ui/pages/first-time-flow/index.js similarity index 100% rename from ui/app/pages/first-time-flow/index.js rename to ui/pages/first-time-flow/index.js diff --git a/ui/app/pages/first-time-flow/index.scss b/ui/pages/first-time-flow/index.scss similarity index 92% rename from ui/app/pages/first-time-flow/index.scss rename to ui/pages/first-time-flow/index.scss index 994d218d3..34a294019 100644 --- a/ui/app/pages/first-time-flow/index.scss +++ b/ui/pages/first-time-flow/index.scss @@ -143,3 +143,13 @@ color: $primary-blue; } } + +.first-time-flow__wrapper.intro { + @media screen and (min-width: $break-large) { + max-width: 1010px; + } + + @media screen and (max-width: 1010px) { + padding: 0 20px; + } +} diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/index.js b/ui/pages/first-time-flow/metametrics-opt-in/index.js similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/index.js rename to ui/pages/first-time-flow/metametrics-opt-in/index.js diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/index.scss b/ui/pages/first-time-flow/metametrics-opt-in/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/index.scss rename to ui/pages/first-time-flow/metametrics-opt-in/index.scss diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js similarity index 98% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js index 5e3be989b..4e13ca634 100644 --- a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js +++ b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js @@ -77,7 +77,7 @@ export default class MetaMetricsOptIn extends Component { {t('metametricsCommitmentsNeverCollectIP', [ {t('metametricsCommitmentsBoldNever')} , @@ -90,7 +90,7 @@ export default class MetaMetricsOptIn extends Component { {t('metametricsCommitmentsNeverSellDataForProfit', [ {t('metametricsCommitmentsBoldNever')} , diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js similarity index 100% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.container.js diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js similarity index 92% rename from ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js rename to ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js index fa1d61889..4a83441b0 100644 --- a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js +++ b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import MetaMetricsOptIn from './metametrics-opt-in.container'; describe('MetaMetricsOptIn', () => { diff --git a/ui/app/pages/first-time-flow/onboarding-initiator-util.js b/ui/pages/first-time-flow/onboarding-initiator-util.js similarity index 100% rename from ui/app/pages/first-time-flow/onboarding-initiator-util.js rename to ui/pages/first-time-flow/onboarding-initiator-util.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase-component.test.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/draggable-seed.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.scss diff --git a/ui/app/pages/first-time-flow/seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/index.scss similarity index 94% rename from ui/app/pages/first-time-flow/seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/index.scss index b4a57912d..15f801632 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/index.scss +++ b/ui/pages/first-time-flow/seed-phrase/index.scss @@ -1,5 +1,6 @@ @import 'confirm-seed-phrase/index'; @import 'reveal-seed-phrase/index'; +@import 'seed-phrase-intro/index'; .seed-phrase { &__sections { diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss diff --git a/ui/app/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 similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js similarity index 100% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js similarity index 93% rename from ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js rename to ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js index ba7191871..262b64f46 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js +++ b/ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.test.js @@ -3,7 +3,7 @@ import sinon from 'sinon'; import { mount } from 'enzyme'; import RevealSeedPhrase from './reveal-seed-phrase.container'; -describe('Reveal Seed Phrase', () => { +describe('Reveal Secret Recovery Phrase', () => { let wrapper; const TEST_SEED = @@ -27,7 +27,7 @@ describe('Reveal Seed Phrase', () => { }); }); - it('seed phrase', () => { + it('secret recovery phrase', () => { const seedPhrase = wrapper.find( '.reveal-seed-phrase__secret-words--hidden', ); diff --git a/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.js b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.js new file mode 100644 index 000000000..c9d6bdbd6 --- /dev/null +++ b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.js @@ -0,0 +1 @@ +export { default } from './seed-phrase-intro.component'; diff --git a/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.scss b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.scss new file mode 100644 index 000000000..f0aeb8979 --- /dev/null +++ b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/index.scss @@ -0,0 +1,44 @@ +.seed-phrase-intro { + &__sections { + display: flex; + + @media screen and (min-width: $break-large) { + flex-direction: row; + } + + @media screen and (max-width: 970px) { + flex-direction: column; + } + } + + &__left { + flex: 3; + min-width: 0; + } + + &__right { + flex: 1; + min-width: 0; + + @media screen and (max-width: 970px) { + margin-top: 24px; + } + } + + video { + border-radius: 8px; + + @media screen and (max-width: 970px) { + width: 95%; + } + } + + &__copy { + max-width: 696px; + } + + &__sidebar_list { + list-style: disc; + padding-left: 20px; + } +} diff --git a/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/seed-phrase-intro.component.js b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/seed-phrase-intro.component.js new file mode 100644 index 000000000..304339967 --- /dev/null +++ b/ui/pages/first-time-flow/seed-phrase/seed-phrase-intro/seed-phrase-intro.component.js @@ -0,0 +1,121 @@ +import React from 'react'; +import { useHistory } from 'react-router-dom'; +import { useI18nContext } from '../../../../hooks/useI18nContext'; +// Components +import Box from '../../../../components/ui/box'; +import Button from '../../../../components/ui/button'; +import Typography from '../../../../components/ui/typography'; +import { + BLOCK_SIZES, + COLORS, + TYPOGRAPHY, + FONT_WEIGHT, + SIZES, + BORDER_STYLE, +} from '../../../../helpers/constants/design-system'; +// Routes +import { INITIALIZE_SEED_PHRASE_ROUTE } from '../../../../helpers/constants/routes'; + +export default function SeedPhraseIntro() { + const t = useI18nContext(); + const history = useHistory(); + + const handleNextStep = () => { + history.push(INITIALIZE_SEED_PHRASE_ROUTE); + }; + + return ( +
+
+
+ + {t('seedPhraseIntroTitle')} + + + {t('seedPhraseIntroTitleCopy')} + + + + + + + +
+
+ + + + {t('seedPhraseIntroSidebarTitleOne')} + + {t('seedPhraseIntroSidebarCopyOne')} + + + + {t('seedPhraseIntroSidebarTitleTwo')} + +
    +
  • {t('seedPhraseIntroSidebarBulletOne')}
  • +
  • {t('seedPhraseIntroSidebarBulletTwo')}
  • +
  • {t('seedPhraseIntroSidebarBulletThree')}
  • +
  • {t('seedPhraseIntroSidebarBulletFour')}
  • +
+
+ + + {t('seedPhraseIntroSidebarTitleThree')} + + {t('seedPhraseIntroSidebarCopyTwo')} + + + {t('seedPhraseIntroSidebarCopyThree')} + +
+
+
+
+ ); +} diff --git a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js b/ui/pages/first-time-flow/seed-phrase/seed-phrase.component.js similarity index 78% rename from ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js rename to ui/pages/first-time-flow/seed-phrase/seed-phrase.component.js index 97d27998a..612e86c77 100644 --- a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js +++ b/ui/pages/first-time-flow/seed-phrase/seed-phrase.component.js @@ -7,11 +7,13 @@ import { INITIALIZE_SEED_PHRASE_ROUTE, INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE, INITIALIZE_BACKUP_SEED_PHRASE_ROUTE, + INITIALIZE_SEED_PHRASE_INTRO_ROUTE, DEFAULT_ROUTE, } from '../../../helpers/constants/routes'; import MetaFoxLogo from '../../../components/ui/metafox-logo'; import ConfirmSeedPhrase from './confirm-seed-phrase'; import RevealSeedPhrase from './reveal-seed-phrase'; +import SeedPhraseIntro from './seed-phrase-intro'; export default class SeedPhrase extends PureComponent { static propTypes = { @@ -39,12 +41,15 @@ export default class SeedPhrase extends PureComponent { } render() { - const { seedPhrase } = this.props; + const { seedPhrase, history } = this.props; const { verifiedSeedPhrase } = this.state; + const pathname = history?.location?.pathname; + const introClass = + pathname === INITIALIZE_SEED_PHRASE_INTRO_ROUTE ? 'intro' : ''; return ( -
+
)} /> + ( + + )} + />
diff --git a/ui/app/pages/first-time-flow/select-action/index.js b/ui/pages/first-time-flow/select-action/index.js similarity index 100% rename from ui/app/pages/first-time-flow/select-action/index.js rename to ui/pages/first-time-flow/select-action/index.js diff --git a/ui/app/pages/first-time-flow/select-action/index.scss b/ui/pages/first-time-flow/select-action/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/select-action/index.scss rename to ui/pages/first-time-flow/select-action/index.scss diff --git a/ui/app/pages/first-time-flow/select-action/select-action.component.js b/ui/pages/first-time-flow/select-action/select-action.component.js similarity index 95% rename from ui/app/pages/first-time-flow/select-action/select-action.component.js rename to ui/pages/first-time-flow/select-action/select-action.component.js index 2f02df189..7420b1333 100644 --- a/ui/app/pages/first-time-flow/select-action/select-action.component.js +++ b/ui/pages/first-time-flow/select-action/select-action.component.js @@ -50,7 +50,7 @@ export default class SelectAction extends PureComponent {
- +
{t('noAlreadyHaveSeed')} @@ -70,7 +70,7 @@ export default class SelectAction extends PureComponent {
- +
{t('letsGoSetUp')} diff --git a/ui/app/pages/first-time-flow/select-action/select-action.container.js b/ui/pages/first-time-flow/select-action/select-action.container.js similarity index 100% rename from ui/app/pages/first-time-flow/select-action/select-action.container.js rename to ui/pages/first-time-flow/select-action/select-action.container.js diff --git a/ui/app/pages/first-time-flow/select-action/select-action.test.js b/ui/pages/first-time-flow/select-action/select-action.test.js similarity index 95% rename from ui/app/pages/first-time-flow/select-action/select-action.test.js rename to ui/pages/first-time-flow/select-action/select-action.test.js index 013176b30..e0b79c789 100644 --- a/ui/app/pages/first-time-flow/select-action/select-action.test.js +++ b/ui/pages/first-time-flow/select-action/select-action.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import SelectAction from './select-action.container'; describe('Selection Action', () => { diff --git a/ui/app/pages/first-time-flow/welcome/index.js b/ui/pages/first-time-flow/welcome/index.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/index.js rename to ui/pages/first-time-flow/welcome/index.js diff --git a/ui/app/pages/first-time-flow/welcome/index.scss b/ui/pages/first-time-flow/welcome/index.scss similarity index 100% rename from ui/app/pages/first-time-flow/welcome/index.scss rename to ui/pages/first-time-flow/welcome/index.scss diff --git a/ui/app/pages/first-time-flow/welcome/welcome.component.js b/ui/pages/first-time-flow/welcome/welcome.component.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/welcome.component.js rename to ui/pages/first-time-flow/welcome/welcome.component.js diff --git a/ui/app/pages/first-time-flow/welcome/welcome.container.js b/ui/pages/first-time-flow/welcome/welcome.container.js similarity index 100% rename from ui/app/pages/first-time-flow/welcome/welcome.container.js rename to ui/pages/first-time-flow/welcome/welcome.container.js diff --git a/ui/app/pages/first-time-flow/welcome/welcome.test.js b/ui/pages/first-time-flow/welcome/welcome.test.js similarity index 95% rename from ui/app/pages/first-time-flow/welcome/welcome.test.js rename to ui/pages/first-time-flow/welcome/welcome.test.js index 2d60b4d57..14d1a22cc 100644 --- a/ui/app/pages/first-time-flow/welcome/welcome.test.js +++ b/ui/pages/first-time-flow/welcome/welcome.test.js @@ -1,7 +1,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; -import { mountWithRouter } from '../../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../../test/lib/render-helpers'; import Welcome from './welcome.container'; describe('Welcome', () => { diff --git a/ui/app/pages/home/home.component.js b/ui/pages/home/home.component.js similarity index 100% rename from ui/app/pages/home/home.component.js rename to ui/pages/home/home.component.js diff --git a/ui/app/pages/home/home.container.js b/ui/pages/home/home.container.js similarity index 93% rename from ui/app/pages/home/home.container.js rename to ui/pages/home/home.container.js index 6020c1510..f5ff5a966 100644 --- a/ui/app/pages/home/home.container.js +++ b/ui/pages/home/home.container.js @@ -29,15 +29,15 @@ import { import { setThreeBoxLastUpdated, hideWhatsNewPopup } from '../../ducks/app/app'; import { getWeb3ShimUsageAlertEnabledness } from '../../ducks/metamask/metamask'; import { getSwapsFeatureLiveness } from '../../ducks/swaps/swaps'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_POPUP, -} from '../../../../shared/constants/app'; +} from '../../../shared/constants/app'; import { ALERT_TYPES, WEB3_SHIM_USAGE_ALERT_STATES, -} from '../../../../shared/constants/alerts'; +} from '../../../shared/constants/alerts'; import Home from './home.component'; const mapStateToProps = (state) => { @@ -52,6 +52,7 @@ const mapStateToProps = (state) => { connectedStatusPopoverHasBeenShown, defaultHomeActiveTabName, swapsState, + dismissSeedBackUpReminder, } = metamask; const accountBalance = getCurrentEthBalance(state); const { forgottenPassword, threeBoxLastUpdated } = appState; @@ -84,7 +85,8 @@ const mapStateToProps = (state) => { unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), shouldShowSeedPhraseReminder: seedPhraseBackedUp === false && - (parseInt(accountBalance, 16) > 0 || tokens.length > 0), + (parseInt(accountBalance, 16) > 0 || tokens.length > 0) && + dismissSeedBackUpReminder === false, isPopup, isNotification, threeBoxSynced, diff --git a/ui/app/pages/home/index.js b/ui/pages/home/index.js similarity index 100% rename from ui/app/pages/home/index.js rename to ui/pages/home/index.js diff --git a/ui/app/pages/home/index.scss b/ui/pages/home/index.scss similarity index 100% rename from ui/app/pages/home/index.scss rename to ui/pages/home/index.scss diff --git a/ui/app/pages/index.js b/ui/pages/index.js similarity index 100% rename from ui/app/pages/index.js rename to ui/pages/index.js diff --git a/ui/app/pages/keychains/index.scss b/ui/pages/keychains/index.scss similarity index 100% rename from ui/app/pages/keychains/index.scss rename to ui/pages/keychains/index.scss diff --git a/ui/app/pages/keychains/restore-vault.js b/ui/pages/keychains/restore-vault.js similarity index 100% rename from ui/app/pages/keychains/restore-vault.js rename to ui/pages/keychains/restore-vault.js diff --git a/ui/app/pages/keychains/reveal-seed.js b/ui/pages/keychains/reveal-seed.js similarity index 100% rename from ui/app/pages/keychains/reveal-seed.js rename to ui/pages/keychains/reveal-seed.js diff --git a/ui/app/pages/keychains/reveal-seed.test.js b/ui/pages/keychains/reveal-seed.test.js similarity index 100% rename from ui/app/pages/keychains/reveal-seed.test.js rename to ui/pages/keychains/reveal-seed.test.js diff --git a/ui/app/pages/lock/index.js b/ui/pages/lock/index.js similarity index 100% rename from ui/app/pages/lock/index.js rename to ui/pages/lock/index.js diff --git a/ui/app/pages/lock/lock.component.js b/ui/pages/lock/lock.component.js similarity index 100% rename from ui/app/pages/lock/lock.component.js rename to ui/pages/lock/lock.component.js diff --git a/ui/app/pages/lock/lock.container.js b/ui/pages/lock/lock.container.js similarity index 100% rename from ui/app/pages/lock/lock.container.js rename to ui/pages/lock/lock.container.js diff --git a/ui/app/pages/lock/lock.test.js b/ui/pages/lock/lock.test.js similarity index 92% rename from ui/app/pages/lock/lock.test.js rename to ui/pages/lock/lock.test.js index 66de4a245..6f7d1def0 100644 --- a/ui/app/pages/lock/lock.test.js +++ b/ui/pages/lock/lock.test.js @@ -1,6 +1,6 @@ import React from 'react'; import sinon from 'sinon'; -import { mountWithRouter } from '../../../../test/lib/render-helpers'; +import { mountWithRouter } from '../../../test/lib/render-helpers'; import Lock from './lock.container'; describe('Lock', () => { diff --git a/ui/app/pages/mobile-sync/index.js b/ui/pages/mobile-sync/index.js similarity index 100% rename from ui/app/pages/mobile-sync/index.js rename to ui/pages/mobile-sync/index.js diff --git a/ui/app/pages/mobile-sync/mobile-sync.component.js b/ui/pages/mobile-sync/mobile-sync.component.js similarity index 100% rename from ui/app/pages/mobile-sync/mobile-sync.component.js rename to ui/pages/mobile-sync/mobile-sync.component.js diff --git a/ui/app/pages/mobile-sync/mobile-sync.container.js b/ui/pages/mobile-sync/mobile-sync.container.js similarity index 100% rename from ui/app/pages/mobile-sync/mobile-sync.container.js rename to ui/pages/mobile-sync/mobile-sync.container.js diff --git a/ui/app/pages/pages.scss b/ui/pages/pages.scss similarity index 100% rename from ui/app/pages/pages.scss rename to ui/pages/pages.scss diff --git a/ui/app/pages/permissions-connect/choose-account/choose-account.component.js b/ui/pages/permissions-connect/choose-account/choose-account.component.js similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/choose-account.component.js rename to ui/pages/permissions-connect/choose-account/choose-account.component.js diff --git a/ui/app/pages/permissions-connect/choose-account/index.js b/ui/pages/permissions-connect/choose-account/index.js similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/index.js rename to ui/pages/permissions-connect/choose-account/index.js diff --git a/ui/app/pages/permissions-connect/choose-account/index.scss b/ui/pages/permissions-connect/choose-account/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/choose-account/index.scss rename to ui/pages/permissions-connect/choose-account/index.scss diff --git a/ui/app/pages/permissions-connect/index.js b/ui/pages/permissions-connect/index.js similarity index 100% rename from ui/app/pages/permissions-connect/index.js rename to ui/pages/permissions-connect/index.js diff --git a/ui/app/pages/permissions-connect/index.scss b/ui/pages/permissions-connect/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/index.scss rename to ui/pages/permissions-connect/index.scss diff --git a/ui/app/pages/permissions-connect/permissions-connect.component.js b/ui/pages/permissions-connect/permissions-connect.component.js similarity index 98% rename from ui/app/pages/permissions-connect/permissions-connect.component.js rename to ui/pages/permissions-connect/permissions-connect.component.js index 1927af9ae..b9706faca 100644 --- a/ui/app/pages/permissions-connect/permissions-connect.component.js +++ b/ui/pages/permissions-connect/permissions-connect.component.js @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Switch, Route } from 'react-router-dom'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; import { DEFAULT_ROUTE } from '../../helpers/constants/routes'; import PermissionPageContainer from '../../components/app/permission-page-container'; import ChooseAccount from './choose-account'; diff --git a/ui/app/pages/permissions-connect/permissions-connect.container.js b/ui/pages/permissions-connect/permissions-connect.container.js similarity index 100% rename from ui/app/pages/permissions-connect/permissions-connect.container.js rename to ui/pages/permissions-connect/permissions-connect.container.js diff --git a/ui/app/pages/permissions-connect/redirect/index.js b/ui/pages/permissions-connect/redirect/index.js similarity index 100% rename from ui/app/pages/permissions-connect/redirect/index.js rename to ui/pages/permissions-connect/redirect/index.js diff --git a/ui/app/pages/permissions-connect/redirect/index.scss b/ui/pages/permissions-connect/redirect/index.scss similarity index 100% rename from ui/app/pages/permissions-connect/redirect/index.scss rename to ui/pages/permissions-connect/redirect/index.scss diff --git a/ui/app/pages/permissions-connect/redirect/permissions-redirect.component.js b/ui/pages/permissions-connect/redirect/permissions-redirect.component.js similarity index 100% rename from ui/app/pages/permissions-connect/redirect/permissions-redirect.component.js rename to ui/pages/permissions-connect/redirect/permissions-redirect.component.js diff --git a/ui/app/pages/routes/index.js b/ui/pages/routes/index.js similarity index 100% rename from ui/app/pages/routes/index.js rename to ui/pages/routes/index.js diff --git a/ui/app/pages/routes/routes.component.js b/ui/pages/routes/routes.component.js similarity index 96% rename from ui/app/pages/routes/routes.component.js rename to ui/pages/routes/routes.component.js index 5648e4e20..d70256e17 100644 --- a/ui/app/pages/routes/routes.component.js +++ b/ui/pages/routes/routes.component.js @@ -59,9 +59,9 @@ import { import { ENVIRONMENT_TYPE_NOTIFICATION, ENVIRONMENT_TYPE_POPUP, -} from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +} from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import ConfirmationPage from '../confirmation'; export default class Routes extends Component { @@ -90,6 +90,7 @@ export default class Routes extends Component { autoLockTimeLimit: PropTypes.number, pageChanged: PropTypes.func.isRequired, prepareToLeaveSwaps: PropTypes.func, + browserEnvironment: PropTypes.object, }; static contextTypes = { @@ -275,6 +276,7 @@ export default class Routes extends Component { submittedPendingTransactions, isMouseUser, prepareToLeaveSwaps, + browserEnvironment, } = this.props; const loadMessage = loadingMessage || isNetworkLoading @@ -296,9 +298,14 @@ export default class Routes extends Component { ({ id }) => id === sidebarTransaction.id, ); + const { os, browser } = browserEnvironment; return (
setMouseUserState(true)} onKeyDown={(e) => { diff --git a/ui/app/pages/routes/routes.container.js b/ui/pages/routes/routes.container.js similarity index 97% rename from ui/app/pages/routes/routes.container.js rename to ui/pages/routes/routes.container.js index 527f9791c..952e077d8 100644 --- a/ui/app/pages/routes/routes.container.js +++ b/ui/pages/routes/routes.container.js @@ -45,6 +45,7 @@ function mapStateToProps(state) { isMouseUser: state.appState.isMouseUser, providerId: getNetworkIdentifier(state), autoLockTimeLimit, + browserEnvironment: state.metamask.browserEnvironment, }; } diff --git a/ui/app/pages/send/index.js b/ui/pages/send/index.js similarity index 100% rename from ui/app/pages/send/index.js rename to ui/pages/send/index.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/pages/send/send-content/add-recipient/add-recipient.component.js similarity index 99% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.component.js rename to ui/pages/send/send-content/add-recipient/add-recipient.component.js index a7afd2141..da7999c94 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.component.js @@ -11,7 +11,7 @@ import Confusable from '../../../../components/ui/confusable'; import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class AddRecipient extends Component { static propTypes = { diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.component.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.component.test.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.container.js rename to ui/pages/send/send-content/add-recipient/add-recipient.container.js diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js similarity index 94% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.container.test.js index 8e02da161..696ca926b 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.container.test.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.container.test.js @@ -13,7 +13,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getSendEnsResolution: (s) => `mockSendEnsResolution:${s}`, getSendEnsResolutionError: (s) => `mockSendEnsResolutionError:${s}`, getAddressBook: (s) => [{ name: `mockAddressBook:${s}` }], @@ -24,7 +24,7 @@ jest.mock('../../../../../app/selectors', () => ({ ], })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ updateSendTo: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.js b/ui/pages/send/send-content/add-recipient/add-recipient.js similarity index 96% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.js rename to ui/pages/send/send-content/add-recipient/add-recipient.js index 3124ccdb5..5141fda1d 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.js @@ -19,7 +19,7 @@ import { isBurnAddress, isValidHexAddress, toChecksumHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export function getToErrorObject(to, sendTokenAddress, chainId) { let toError = null; diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js b/ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js similarity index 91% rename from ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js rename to ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js index 33f70b876..4a9605d32 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js +++ b/ui/pages/send/send-content/add-recipient/add-recipient.utils.test.js @@ -7,18 +7,17 @@ import { } from '../../send.constants'; import { getToErrorObject, getToWarningObject } from './add-recipient'; -jest.mock('../../../../../app/helpers/utils/util', () => ({ +jest.mock('../../../../helpers/utils/util', () => ({ isDefaultMetaMaskChain: jest.fn().mockReturnValue(true), isEthNetwork: jest.fn().mockReturnValue(true), checkExistingAddresses: jest.fn().mockReturnValue(true), - isValidDomainName: jest.requireActual('../../../../../app/helpers/utils/util') + isValidDomainName: jest.requireActual('../../../../helpers/utils/util') .isValidDomainName, - isOriginContractAddress: jest.requireActual( - '../../../../../app/helpers/utils/util', - ).isOriginContractAddress, + isOriginContractAddress: jest.requireActual('../../../../helpers/utils/util') + .isOriginContractAddress, })); -jest.mock('../../../../../../shared/modules/hexstring-utils', () => ({ +jest.mock('../../../../../shared/modules/hexstring-utils', () => ({ isValidHexAddress: jest.fn((to) => Boolean(to.match(/^[0xabcdef123456798]+$/u)), ), diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js b/ui/pages/send/send-content/add-recipient/ens-input.component.js similarity index 98% rename from ui/app/pages/send/send-content/add-recipient/ens-input.component.js rename to ui/pages/send/send-content/add-recipient/ens-input.component.js index 9012ee643..658ac9bde 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.component.js @@ -10,11 +10,11 @@ import log from 'loglevel'; import { isHexString } from 'ethereumjs-util'; import { ellipsify } from '../../send.utils'; import { isValidDomainName } from '../../../../helpers/utils/util'; -import { MAINNET_NETWORK_ID } from '../../../../../../shared/constants/network'; +import { MAINNET_NETWORK_ID } from '../../../../../shared/constants/network'; import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; // Local Constants const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js b/ui/pages/send/send-content/add-recipient/ens-input.container.js similarity index 85% rename from ui/app/pages/send/send-content/add-recipient/ens-input.container.js rename to ui/pages/send/send-content/add-recipient/ens-input.container.js index 42e75e501..90d2c3ff4 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.container.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.container.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { CHAIN_ID_TO_NETWORK_ID_MAP } from '../../../../../../shared/constants/network'; +import { CHAIN_ID_TO_NETWORK_ID_MAP } from '../../../../../shared/constants/network'; import { getSendTo, getSendToNickname, diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.js b/ui/pages/send/send-content/add-recipient/ens-input.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/ens-input.js rename to ui/pages/send/send-content/add-recipient/ens-input.js diff --git a/ui/app/pages/send/send-content/add-recipient/index.js b/ui/pages/send/send-content/add-recipient/index.js similarity index 100% rename from ui/app/pages/send/send-content/add-recipient/index.js rename to ui/pages/send/send-content/add-recipient/index.js diff --git a/ui/app/pages/send/send-content/index.js b/ui/pages/send/send-content/index.js similarity index 100% rename from ui/app/pages/send/send-content/index.js rename to ui/pages/send/send-content/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.component.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js similarity index 93% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js index 4137ce0f2..90f95e6cb 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js +++ b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.container.test.js @@ -15,7 +15,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../../app/selectors', () => ({ +jest.mock('../../../../../selectors', () => ({ getGasTotal: (s) => `mockGasTotal:${s}`, getSendToken: (s) => `mockSendToken:${s}`, getSendFromBalance: (s) => `mockBalance:${s}`, @@ -28,11 +28,11 @@ jest.mock('./amount-max-button.utils.js', () => ({ calcMaxAmount: (mockObj) => mockObj.val + 1, })); -jest.mock('../../../../../../app/store/actions', () => ({ +jest.mock('../../../../../store/actions', () => ({ setMaxModeTo: jest.fn(), updateSendAmount: jest.fn(), })); -jest.mock('../../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js similarity index 89% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js index 934e2fd0a..6826b5e39 100644 --- a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js +++ b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.js @@ -2,7 +2,7 @@ import { multiplyCurrencies, subtractCurrencies, } from '../../../../../helpers/utils/conversion-util'; -import { addHexPrefix } from '../../../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../../../app/scripts/lib/util'; export function calcMaxAmount({ balance, gasTotal, sendToken, tokenBalance }) { const { decimals } = sendToken || {}; diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/amount-max-button.utils.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/amount-max-button/index.js b/ui/pages/send/send-content/send-amount-row/amount-max-button/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/amount-max-button/index.js rename to ui/pages/send/send-content/send-amount-row/amount-max-button/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/index.js b/ui/pages/send/send-content/send-amount-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/index.js rename to ui/pages/send/send-content/send-amount-row/index.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.component.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.test.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.component.test.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.component.test.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.container.js diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js similarity index 95% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js rename to ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js index 1e0979673..6d3b06aef 100644 --- a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.container.test.js +++ b/ui/pages/send/send-content/send-amount-row/send-amount-row.container.test.js @@ -28,12 +28,12 @@ jest.mock('../../send.utils', () => ({ }), })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ setMaxModeTo: jest.fn(), updateSendAmount: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), })); diff --git a/ui/app/pages/send/send-content/send-amount-row/send-amount-row.scss b/ui/pages/send/send-content/send-amount-row/send-amount-row.scss similarity index 100% rename from ui/app/pages/send/send-content/send-amount-row/send-amount-row.scss rename to ui/pages/send/send-content/send-amount-row/send-amount-row.scss diff --git a/ui/app/pages/send/send-content/send-asset-row/index.js b/ui/pages/send/send-content/send-asset-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/index.js rename to ui/pages/send/send-content/send-asset-row/index.js diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js rename to ui/pages/send/send-content/send-asset-row/send-asset-row.component.js diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js b/ui/pages/send/send-content/send-asset-row/send-asset-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js rename to ui/pages/send/send-content/send-asset-row/send-asset-row.container.js diff --git a/ui/app/pages/send/send-content/send-content.component.js b/ui/pages/send/send-content/send-content.component.js similarity index 72% rename from ui/app/pages/send/send-content/send-content.component.js rename to ui/pages/send/send-content/send-content.component.js index 6f4fd7924..6f1a82b92 100644 --- a/ui/app/pages/send/send-content/send-content.component.js +++ b/ui/pages/send/send-content/send-content.component.js @@ -2,6 +2,11 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import PageContainerContent from '../../../components/ui/page-container/page-container-content.component'; import Dialog from '../../../components/ui/dialog'; +import { + ETH_GAS_PRICE_FETCH_WARNING_KEY, + GAS_PRICE_FETCH_FAILURE_ERROR_KEY, + GAS_PRICE_EXCESSIVE_ERROR_KEY, +} from '../../../helpers/constants/error-keys'; import SendAmountRow from './send-amount-row'; import SendGasRow from './send-gas-row'; import SendHexDataRow from './send-hex-data-row'; @@ -21,16 +26,30 @@ export default class SendContent extends Component { warning: PropTypes.string, error: PropTypes.string, gasIsExcessive: PropTypes.bool.isRequired, + isEthGasPrice: PropTypes.bool, + noGasPrice: PropTypes.bool, }; updateGas = (updateData) => this.props.updateGas(updateData); render() { - const { warning, error, gasIsExcessive } = this.props; + const { + warning, + error, + gasIsExcessive, + isEthGasPrice, + noGasPrice, + } = this.props; + + let gasError; + if (gasIsExcessive) gasError = GAS_PRICE_EXCESSIVE_ERROR_KEY; + else if (noGasPrice) gasError = GAS_PRICE_FETCH_FAILURE_ERROR_KEY; + return (
- {gasIsExcessive && this.renderError(true)} + {gasError && this.renderError(gasError)} + {isEthGasPrice && this.renderWarning(ETH_GAS_PRICE_FETCH_WARNING_KEY)} {error && this.renderError()} {warning && this.renderWarning()} {this.maybeRenderAddContact()} @@ -68,24 +87,22 @@ export default class SendContent extends Component { ); } - renderWarning() { + renderWarning(gasWarning = '') { const { t } = this.context; const { warning } = this.props; - return ( - {t(warning)} + {gasWarning === '' ? t(warning) : t(gasWarning)} ); } - renderError(gasError = false) { + renderError(gasError = '') { const { t } = this.context; const { error } = this.props; - return ( - {gasError ? t('gasPriceExcessive') : t(error)} + {gasError === '' ? t(error) : t(gasError)} ); } diff --git a/ui/app/pages/send/send-content/send-content.component.test.js b/ui/pages/send/send-content/send-content.component.test.js similarity index 97% rename from ui/app/pages/send/send-content/send-content.component.test.js rename to ui/pages/send/send-content/send-content.component.test.js index ed4485d76..0e4eb69d8 100644 --- a/ui/app/pages/send/send-content/send-content.component.test.js +++ b/ui/pages/send/send-content/send-content.component.test.js @@ -12,8 +12,13 @@ import SendAssetRow from './send-asset-row/send-asset-row.container'; describe('SendContent Component', () => { let wrapper; + const defaultProps = { + showHexData: true, + gasIsExcessive: false, + }; + beforeEach(() => { - wrapper = shallow(, { + wrapper = shallow(, { context: { t: (str) => `${str}_t` }, }); }); diff --git a/ui/app/pages/send/send-content/send-content.container.js b/ui/pages/send/send-content/send-content.container.js similarity index 88% rename from ui/app/pages/send/send-content/send-content.container.js rename to ui/pages/send/send-content/send-content.container.js index 42e115b94..3c99b3237 100644 --- a/ui/app/pages/send/send-content/send-content.container.js +++ b/ui/pages/send/send-content/send-content.container.js @@ -3,6 +3,8 @@ import { getSendTo, accountsWithSendEtherInfoSelector, getAddressBookEntry, + getIsEthGasPriceFetched, + getNoGasPriceFetched, } from '../../../selectors'; import * as actions from '../../../store/actions'; @@ -19,6 +21,8 @@ function mapStateToProps(state) { ), contact: getAddressBookEntry(state, to), to, + isEthGasPrice: getIsEthGasPriceFetched(state), + noGasPrice: getNoGasPriceFetched(state), }; } diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js diff --git a/ui/app/pages/send/send-content/send-gas-row/gas-fee-display/index.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/gas-fee-display/index.js rename to ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js diff --git a/ui/app/pages/send/send-content/send-gas-row/index.js b/ui/pages/send/send-content/send-gas-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/index.js rename to ui/pages/send/send-content/send-gas-row/index.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.component.js similarity index 91% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.component.js index cf74ee0f3..9cbe21629 100644 --- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.js +++ b/ui/pages/send/send-content/send-gas-row/send-gas-row.component.js @@ -26,6 +26,8 @@ export default class SendGasRow extends Component { gasLimit: PropTypes.string, insufficientBalance: PropTypes.bool, isMainnet: PropTypes.bool, + isEthGasPrice: PropTypes.bool, + noGasPrice: PropTypes.bool, }; static contextTypes = { @@ -35,11 +37,19 @@ export default class SendGasRow extends Component { renderAdvancedOptionsButton() { const { metricsEvent } = this.context; - const { showCustomizeGasModal, isMainnet } = this.props; + const { + showCustomizeGasModal, + isMainnet, + isEthGasPrice, + noGasPrice, + } = this.props; // Tests should behave in same way as mainnet, but are using Localhost if (!isMainnet && !process.env.IN_TEST) { return null; } + if (isEthGasPrice || noGasPrice) { + return null; + } return (
@@ -148,7 +161,11 @@ export default class SendGasRow extends Component {
); // Tests should behave in same way as mainnet, but are using Localhost - if (advancedInlineGasShown || (!isMainnet && !process.env.IN_TEST)) { + if ( + advancedInlineGasShown || + (!isMainnet && !process.env.IN_TEST) || + gasPriceFetchFailure + ) { return advancedGasInputs; } else if (gasButtonGroupShown) { return gasPriceButtonGroup; diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.test.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.component.test.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.component.test.js diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.js similarity index 95% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.container.js index 210819f07..32b0529c4 100644 --- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.js +++ b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.js @@ -18,6 +18,8 @@ import { getRenderableEstimateDataForSmallButtonsFromGWEI, getDefaultActiveButtonIndex, getIsMainnet, + getIsEthGasPriceFetched, + getNoGasPriceFetched, } from '../../../../selectors'; import { isBalanceSufficient, calcGasTotal } from '../../send.utils'; import { calcMaxAmount } from '../send-amount-row/amount-max-button/amount-max-button.utils'; @@ -64,6 +66,8 @@ function mapStateToProps(state) { balance, conversionRate, }); + const isEthGasPrice = getIsEthGasPriceFetched(state); + const noGasPrice = getNoGasPriceFetched(state); return { balance: getSendFromBalance(state), @@ -85,6 +89,8 @@ function mapStateToProps(state) { sendToken: getSendToken(state), tokenBalance: getTokenBalance(state), isMainnet: getIsMainnet(state), + isEthGasPrice, + noGasPrice, }; } diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js similarity index 95% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js rename to ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js index 6bd3b37cf..db322d25a 100644 --- a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.container.test.js +++ b/ui/pages/send/send-content/send-gas-row/send-gas-row.container.test.js @@ -26,7 +26,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../../app/selectors', () => ({ +jest.mock('../../../../selectors', () => ({ getSendMaxModeState: (s) => `mockMaxModeOn:${s}`, })); @@ -37,18 +37,18 @@ jest.mock('../../send.utils.js', () => ({ calcGasTotal: (gasLimit, gasPrice) => gasLimit + gasPrice, })); -jest.mock('../../../../../app/store/actions', () => ({ +jest.mock('../../../../store/actions', () => ({ showModal: jest.fn(), setGasPrice: jest.fn(), setGasTotal: jest.fn(), setGasLimit: jest.fn(), })); -jest.mock('../../../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../../../ducks/send/send.duck', () => ({ showGasButtonGroup: jest.fn(), })); -jest.mock('../../../../../app/ducks/gas/gas.duck', () => ({ +jest.mock('../../../../ducks/gas/gas.duck', () => ({ resetCustomData: jest.fn(), setCustomGasPrice: jest.fn(), setCustomGasLimit: jest.fn(), diff --git a/ui/app/pages/send/send-content/send-gas-row/send-gas-row.scss b/ui/pages/send/send-content/send-gas-row/send-gas-row.scss similarity index 100% rename from ui/app/pages/send/send-content/send-gas-row/send-gas-row.scss rename to ui/pages/send/send-content/send-gas-row/send-gas-row.scss diff --git a/ui/app/pages/send/send-content/send-hex-data-row/index.js b/ui/pages/send/send-content/send-hex-data-row/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/index.js rename to ui/pages/send/send-content/send-hex-data-row/index.js diff --git a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js rename to ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.component.js diff --git a/ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js b/ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js rename to ui/pages/send/send-content/send-hex-data-row/send-hex-data-row.container.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/index.js b/ui/pages/send/send-content/send-row-wrapper/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/index.js rename to ui/pages/send/send-content/send-row-wrapper/index.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/index.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.component.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss b/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss rename to ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.scss diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.component.test.js diff --git a/ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss b/ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss similarity index 100% rename from ui/app/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss rename to ui/pages/send/send-content/send-row-wrapper/send-row-wrapper.scss diff --git a/ui/app/pages/send/send-footer/index.js b/ui/pages/send/send-footer/index.js similarity index 100% rename from ui/app/pages/send/send-footer/index.js rename to ui/pages/send/send-footer/index.js diff --git a/ui/app/pages/send/send-footer/send-footer.component.js b/ui/pages/send/send-footer/send-footer.component.js similarity index 97% rename from ui/app/pages/send/send-footer/send-footer.component.js rename to ui/pages/send/send-footer/send-footer.component.js index 5956d9517..ef18f48b1 100644 --- a/ui/app/pages/send/send-footer/send-footer.component.js +++ b/ui/pages/send/send-footer/send-footer.component.js @@ -27,6 +27,7 @@ export default class SendFooter extends Component { gasEstimateType: PropTypes.string, gasIsLoading: PropTypes.bool, mostRecentOverviewPage: PropTypes.string.isRequired, + noGasPrice: PropTypes.bool, }; static contextTypes = { @@ -109,6 +110,7 @@ export default class SendFooter extends Component { to, gasLimit, gasIsLoading, + noGasPrice, } = this.props; const missingTokenBalance = sendToken && !tokenBalance; const gasLimitTooLow = gasLimit < 5208; // 5208 is hex value of 21000, minimum gas limit @@ -118,7 +120,8 @@ export default class SendFooter extends Component { missingTokenBalance || !(data || to) || gasLimitTooLow || - gasIsLoading; + gasIsLoading || + noGasPrice; return shouldBeDisabled; } diff --git a/ui/app/pages/send/send-footer/send-footer.component.test.js b/ui/pages/send/send-footer/send-footer.component.test.js similarity index 99% rename from ui/app/pages/send/send-footer/send-footer.component.test.js rename to ui/pages/send/send-footer/send-footer.component.test.js index cdcc06308..900c26b2a 100644 --- a/ui/app/pages/send/send-footer/send-footer.component.test.js +++ b/ui/pages/send/send-footer/send-footer.component.test.js @@ -49,6 +49,7 @@ describe('SendFooter Component', () => { update={propsMethodSpies.update} sendErrors={{}} mostRecentOverviewPage="mostRecentOverviewPage" + noGasPrice={false} />, { context: { t: (str) => str, metricsEvent: () => ({}) } }, ); diff --git a/ui/app/pages/send/send-footer/send-footer.container.js b/ui/pages/send/send-footer/send-footer.container.js similarity index 95% rename from ui/app/pages/send/send-footer/send-footer.container.js rename to ui/pages/send/send-footer/send-footer.container.js index ff7b475bc..e8ea039e1 100644 --- a/ui/app/pages/send/send-footer/send-footer.container.js +++ b/ui/pages/send/send-footer/send-footer.container.js @@ -24,9 +24,10 @@ import { getGasIsLoading, getRenderableEstimateDataForSmallButtonsFromGWEI, getDefaultActiveButtonIndex, + getNoGasPriceFetched, } from '../../../selectors'; import { getMostRecentOverviewPage } from '../../../ducks/history/history'; -import { addHexPrefix } from '../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../app/scripts/lib/util'; import SendFooter from './send-footer.component'; import { addressIsNew, @@ -67,6 +68,7 @@ function mapStateToProps(state) { gasEstimateType, gasIsLoading: getGasIsLoading(state), mostRecentOverviewPage: getMostRecentOverviewPage(state), + noGasPrice: getNoGasPriceFetched(state), }; } diff --git a/ui/app/pages/send/send-footer/send-footer.container.test.js b/ui/pages/send/send-footer/send-footer.container.test.js similarity index 96% rename from ui/app/pages/send/send-footer/send-footer.container.test.js rename to ui/pages/send/send-footer/send-footer.container.test.js index 56e280b70..7fb79cbae 100644 --- a/ui/app/pages/send/send-footer/send-footer.container.test.js +++ b/ui/pages/send/send-footer/send-footer.container.test.js @@ -21,7 +21,7 @@ jest.mock('react-redux', () => ({ }, })); -jest.mock('../../../../app/store/actions.js', () => ({ +jest.mock('../../../store/actions.js', () => ({ addToAddressBook: jest.fn(), clearSend: jest.fn(), signTokenTx: jest.fn(), @@ -29,7 +29,7 @@ jest.mock('../../../../app/store/actions.js', () => ({ updateTransaction: jest.fn(), })); -jest.mock('../../../../app/selectors/send.js', () => ({ +jest.mock('../../../selectors/send.js', () => ({ getGasLimit: (s) => `mockGasLimit:${s}`, getGasPrice: (s) => `mockGasPrice:${s}`, getGasTotal: (s) => `mockGasTotal:${s}`, @@ -48,7 +48,7 @@ jest.mock('../../../../app/selectors/send.js', () => ({ getDefaultActiveButtonIndex: () => 0, })); -jest.mock('../../../../app/selectors/custom-gas.js', () => ({ +jest.mock('../../../selectors/custom-gas.js', () => ({ getRenderableEstimateDataForSmallButtonsFromGWEI: (s) => [ { gasEstimateType: `mockGasEstimateType:${s}` }, ], diff --git a/ui/app/pages/send/send-footer/send-footer.scss b/ui/pages/send/send-footer/send-footer.scss similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.scss rename to ui/pages/send/send-footer/send-footer.scss diff --git a/ui/app/pages/send/send-footer/send-footer.utils.js b/ui/pages/send/send-footer/send-footer.utils.js similarity index 96% rename from ui/app/pages/send/send-footer/send-footer.utils.js rename to ui/pages/send/send-footer/send-footer.utils.js index 52be9143f..778b07867 100644 --- a/ui/app/pages/send/send-footer/send-footer.utils.js +++ b/ui/pages/send/send-footer/send-footer.utils.js @@ -1,6 +1,6 @@ import ethAbi from 'ethereumjs-abi'; import { TOKEN_TRANSFER_FUNCTION_SIGNATURE } from '../send.constants'; -import { addHexPrefix } from '../../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../../app/scripts/lib/util'; import { addHexPrefixToObjectValues } from '../../../helpers/utils/util'; export function constructTxParams({ diff --git a/ui/app/pages/send/send-footer/send-footer.utils.test.js b/ui/pages/send/send-footer/send-footer.utils.test.js similarity index 100% rename from ui/app/pages/send/send-footer/send-footer.utils.test.js rename to ui/pages/send/send-footer/send-footer.utils.test.js diff --git a/ui/app/pages/send/send-header/index.js b/ui/pages/send/send-header/index.js similarity index 100% rename from ui/app/pages/send/send-header/index.js rename to ui/pages/send/send-header/index.js diff --git a/ui/app/pages/send/send-header/send-header.component.js b/ui/pages/send/send-header/send-header.component.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.component.js rename to ui/pages/send/send-header/send-header.component.js diff --git a/ui/app/pages/send/send-header/send-header.component.test.js b/ui/pages/send/send-header/send-header.component.test.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.component.test.js rename to ui/pages/send/send-header/send-header.component.test.js diff --git a/ui/app/pages/send/send-header/send-header.container.js b/ui/pages/send/send-header/send-header.container.js similarity index 100% rename from ui/app/pages/send/send-header/send-header.container.js rename to ui/pages/send/send-header/send-header.container.js diff --git a/ui/app/pages/send/send.component.js b/ui/pages/send/send.component.js similarity index 99% rename from ui/app/pages/send/send.component.js rename to ui/pages/send/send.component.js index 24bd3dc7a..6954f9cfc 100644 --- a/ui/app/pages/send/send.component.js +++ b/ui/pages/send/send.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { debounce } from 'lodash'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; import { getAmountErrorObject, getGasFeeErrorObject, diff --git a/ui/app/pages/send/send.component.test.js b/ui/pages/send/send.component.test.js similarity index 99% rename from ui/app/pages/send/send.component.test.js rename to ui/pages/send/send.component.test.js index bfceb20dd..5cc90307e 100644 --- a/ui/app/pages/send/send.component.test.js +++ b/ui/pages/send/send.component.test.js @@ -4,7 +4,7 @@ import sinon from 'sinon'; import { RINKEBY_CHAIN_ID, ROPSTEN_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import SendTransactionScreen from './send.component'; import * as util from './send.utils'; diff --git a/ui/app/pages/send/send.constants.js b/ui/pages/send/send.constants.js similarity index 96% rename from ui/app/pages/send/send.constants.js rename to ui/pages/send/send.constants.js index 93b620d14..ffeaf0397 100644 --- a/ui/app/pages/send/send.constants.js +++ b/ui/pages/send/send.constants.js @@ -2,7 +2,7 @@ import { conversionUtil, multiplyCurrencies, } from '../../helpers/utils/conversion-util'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; const MIN_GAS_PRICE_DEC = '0'; const MIN_GAS_PRICE_HEX = parseInt(MIN_GAS_PRICE_DEC, 10).toString(16); diff --git a/ui/app/pages/send/send.container.js b/ui/pages/send/send.container.js similarity index 100% rename from ui/app/pages/send/send.container.js rename to ui/pages/send/send.container.js diff --git a/ui/app/pages/send/send.container.test.js b/ui/pages/send/send.container.test.js similarity index 97% rename from ui/app/pages/send/send.container.test.js rename to ui/pages/send/send.container.test.js index be7f137e9..bb2aca2dd 100644 --- a/ui/app/pages/send/send.container.test.js +++ b/ui/pages/send/send.container.test.js @@ -25,12 +25,12 @@ jest.mock('redux', () => ({ compose: (_, arg2) => () => arg2(), })); -jest.mock('../../../app/store/actions', () => ({ +jest.mock('../../store/actions', () => ({ updateSendTokenBalance: jest.fn(), updateGasData: jest.fn(), setGasTotal: jest.fn(), })); -jest.mock('../../../app/ducks/send/send.duck', () => ({ +jest.mock('../../ducks/send/send.duck', () => ({ updateSendErrors: jest.fn(), resetSendState: jest.fn(), })); diff --git a/ui/app/pages/send/send.scss b/ui/pages/send/send.scss similarity index 100% rename from ui/app/pages/send/send.scss rename to ui/pages/send/send.scss diff --git a/ui/app/pages/send/send.utils.js b/ui/pages/send/send.utils.js similarity index 99% rename from ui/app/pages/send/send.utils.js rename to ui/pages/send/send.utils.js index ffe76241d..1603061e2 100644 --- a/ui/app/pages/send/send.utils.js +++ b/ui/pages/send/send.utils.js @@ -9,7 +9,7 @@ import { } from '../../helpers/utils/conversion-util'; import { calcTokenAmount } from '../../helpers/utils/token-util'; -import { addHexPrefix } from '../../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../../app/scripts/lib/util'; import { BASE_TOKEN_GAS_COST, diff --git a/ui/app/pages/send/send.utils.test.js b/ui/pages/send/send.utils.test.js similarity index 99% rename from ui/app/pages/send/send.utils.test.js rename to ui/pages/send/send.utils.test.js index f94c00fdc..06d3d8edc 100644 --- a/ui/app/pages/send/send.utils.test.js +++ b/ui/pages/send/send.utils.test.js @@ -29,7 +29,7 @@ import { INSUFFICIENT_TOKENS_ERROR, } from './send.constants'; -jest.mock('../../../app/helpers/utils/conversion-util', () => ({ +jest.mock('../../helpers/utils/conversion-util', () => ({ addCurrencies: jest.fn((a, b) => { let [a1, b1] = [a, b]; if (String(a).match(/^0x.+/u)) { @@ -47,7 +47,7 @@ jest.mock('../../../app/helpers/utils/conversion-util', () => ({ conversionLessThan: (obj1, obj2) => obj1.value < obj2.value, })); -jest.mock('../../../app/helpers/utils/token-util', () => ({ +jest.mock('../../helpers/utils/token-util', () => ({ calcTokenAmount: (a, d) => `calc:${a}${d}`, })); diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/pages/settings/advanced-tab/advanced-tab.component.js similarity index 85% rename from ui/app/pages/settings/advanced-tab/advanced-tab.component.js rename to ui/pages/settings/advanced-tab/advanced-tab.component.js index 742d1c233..09e70a303 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.js @@ -7,6 +7,9 @@ import TextField from '../../../components/ui/text-field'; import Button from '../../../components/ui/button'; import { MOBILE_SYNC_ROUTE } from '../../../helpers/constants/routes'; +import { getPlatform } from '../../../../app/scripts/lib/util'; +import { PLATFORM_FIREFOX } from '../../../../shared/constants/app'; + export default class AdvancedTab extends PureComponent { static contextTypes = { t: PropTypes.func, @@ -33,6 +36,10 @@ export default class AdvancedTab extends PureComponent { threeBoxDisabled: PropTypes.bool.isRequired, setIpfsGateway: PropTypes.func.isRequired, ipfsGateway: PropTypes.string.isRequired, + useLedgerLive: PropTypes.bool.isRequired, + setLedgerLivePreference: PropTypes.func.isRequired, + setDismissSeedBackUpReminder: PropTypes.func.isRequired, + dismissSeedBackUpReminder: PropTypes.bool.isRequired, }; state = { @@ -253,7 +260,7 @@ export default class AdvancedTab extends PureComponent { data-testid="advanced-setting-custom-nonce" >
- {this.context.t('nonceField')} + {t('nonceField')}
{t('nonceFieldDescription')}
@@ -384,6 +391,33 @@ export default class AdvancedTab extends PureComponent { ); } + renderLedgerLiveControl() { + const { t } = this.context; + const { useLedgerLive, setLedgerLivePreference } = this.props; + + return ( +
+
+ {t('ledgerLiveAdvancedSetting')} +
+ {t('ledgerLiveAdvancedSettingDescription')} +
+
+
+
+ setLedgerLivePreference(!value)} + offLabel={t('off')} + onLabel={t('on')} + disabled={getPlatform() === PLATFORM_FIREFOX} + /> +
+
+
+ ); + } + handleIpfsGatewayChange(url) { const { t } = this.context; @@ -462,6 +496,38 @@ export default class AdvancedTab extends PureComponent { ); } + renderDismissSeedBackupReminderControl() { + const { t } = this.context; + const { + dismissSeedBackUpReminder, + setDismissSeedBackUpReminder, + } = this.props; + + return ( +
+
+ {t('dismissReminderField')} +
+ {t('dismissReminderDescriptionField')} +
+
+
+
+ setDismissSeedBackUpReminder(!value)} + offLabel={t('off')} + onLabel={t('on')} + /> +
+
+
+ ); + } + render() { const { warning } = this.props; @@ -478,6 +544,8 @@ export default class AdvancedTab extends PureComponent { {this.renderAutoLockTimeLimit()} {this.renderThreeBoxControl()} {this.renderIpfsGatewayControl()} + {this.renderLedgerLiveControl()} + {this.renderDismissSeedBackupReminderControl()}
); } diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.test.js b/ui/pages/settings/advanced-tab/advanced-tab.component.test.js similarity index 82% rename from ui/app/pages/settings/advanced-tab/advanced-tab.component.test.js rename to ui/pages/settings/advanced-tab/advanced-tab.component.test.js index fc133a5d1..eb78d3c21 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.test.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.component.test.js @@ -15,6 +15,10 @@ describe('AdvancedTab Component', () => { setThreeBoxSyncingPermission={() => undefined} threeBoxDisabled threeBoxSyncingAllowed={false} + useLedgerLive={false} + setLedgerLivePreference={() => undefined} + setDismissSeedBackUpReminder={() => undefined} + dismissSeedBackUpReminder={false} />, { context: { @@ -23,7 +27,7 @@ describe('AdvancedTab Component', () => { }, ); - expect(root.find('.settings-page__content-row')).toHaveLength(10); + expect(root.find('.settings-page__content-row')).toHaveLength(12); }); it('should update autoLockTimeLimit', () => { @@ -37,6 +41,10 @@ describe('AdvancedTab Component', () => { setThreeBoxSyncingPermission={() => undefined} threeBoxDisabled threeBoxSyncingAllowed={false} + useLedgerLive={false} + setLedgerLivePreference={() => undefined} + setDismissSeedBackUpReminder={() => undefined} + dismissSeedBackUpReminder={false} />, { context: { diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js b/ui/pages/settings/advanced-tab/advanced-tab.container.js similarity index 85% rename from ui/app/pages/settings/advanced-tab/advanced-tab.container.js rename to ui/pages/settings/advanced-tab/advanced-tab.container.js index 1bfa82f30..3ea88dc8d 100644 --- a/ui/app/pages/settings/advanced-tab/advanced-tab.container.js +++ b/ui/pages/settings/advanced-tab/advanced-tab.container.js @@ -11,6 +11,8 @@ import { turnThreeBoxSyncingOnAndInitialize, setUseNonceField, setIpfsGateway, + setLedgerLivePreference, + setDismissSeedBackUpReminder, } from '../../../store/actions'; import { getPreferences } from '../../../selectors'; import AdvancedTab from './advanced-tab.component'; @@ -26,6 +28,8 @@ export const mapStateToProps = (state) => { threeBoxDisabled, useNonceField, ipfsGateway, + useLedgerLive, + dismissSeedBackUpReminder, } = metamask; const { showFiatInTestnets, autoLockTimeLimit } = getPreferences(state); @@ -39,6 +43,8 @@ export const mapStateToProps = (state) => { threeBoxDisabled, useNonceField, ipfsGateway, + useLedgerLive, + dismissSeedBackUpReminder, }; }; @@ -68,6 +74,12 @@ export const mapDispatchToProps = (dispatch) => { setIpfsGateway: (value) => { return dispatch(setIpfsGateway(value)); }, + setLedgerLivePreference: (value) => { + return dispatch(setLedgerLivePreference(value)); + }, + setDismissSeedBackUpReminder: (value) => { + return dispatch(setDismissSeedBackUpReminder(value)); + }, }; }; diff --git a/ui/app/pages/settings/advanced-tab/index.js b/ui/pages/settings/advanced-tab/index.js similarity index 100% rename from ui/app/pages/settings/advanced-tab/index.js rename to ui/pages/settings/advanced-tab/index.js diff --git a/ui/app/pages/settings/alerts-tab/alerts-tab.js b/ui/pages/settings/alerts-tab/alerts-tab.js similarity index 96% rename from ui/app/pages/settings/alerts-tab/alerts-tab.js rename to ui/pages/settings/alerts-tab/alerts-tab.js index cdf77c7a5..c8d092470 100644 --- a/ui/app/pages/settings/alerts-tab/alerts-tab.js +++ b/ui/pages/settings/alerts-tab/alerts-tab.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; -import { ALERT_TYPES } from '../../../../../shared/constants/alerts'; +import { ALERT_TYPES } from '../../../../shared/constants/alerts'; import Tooltip from '../../../components/ui/tooltip'; import ToggleButton from '../../../components/ui/toggle-button'; import { setAlertEnabledness } from '../../../store/actions'; diff --git a/ui/app/pages/settings/alerts-tab/alerts-tab.scss b/ui/pages/settings/alerts-tab/alerts-tab.scss similarity index 100% rename from ui/app/pages/settings/alerts-tab/alerts-tab.scss rename to ui/pages/settings/alerts-tab/alerts-tab.scss diff --git a/ui/app/pages/settings/alerts-tab/index.js b/ui/pages/settings/alerts-tab/index.js similarity index 100% rename from ui/app/pages/settings/alerts-tab/index.js rename to ui/pages/settings/alerts-tab/index.js diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js similarity index 98% rename from ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js rename to ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js index 8ddd29ac2..e454838d1 100644 --- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js +++ b/ui/pages/settings/contact-list-tab/add-contact/add-contact.component.js @@ -10,7 +10,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class AddContact extends PureComponent { static contextTypes = { @@ -69,7 +69,6 @@ export default class AddContact extends PureComponent { renderInput() { return ( { this.props.scanQrCode(); }} diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js b/ui/pages/settings/contact-list-tab/add-contact/add-contact.container.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/add-contact/add-contact.container.js rename to ui/pages/settings/contact-list-tab/add-contact/add-contact.container.js diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/index.js b/ui/pages/settings/contact-list-tab/add-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/add-contact/index.js rename to ui/pages/settings/contact-list-tab/add-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js similarity index 97% rename from ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js rename to ui/pages/settings/contact-list-tab/contact-list-tab.component.js index 53e38c0a3..1c8e132a0 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js +++ b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js @@ -49,7 +49,7 @@ export default class ContactListTab extends Component { return (
- Address book icon + Address book icon

{t('builContactList')}

{t('addFriendsAndAddresses')} diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js b/ui/pages/settings/contact-list-tab/contact-list-tab.container.js similarity index 89% rename from ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js rename to ui/pages/settings/contact-list-tab/contact-list-tab.container.js index 0d80480b5..60e760a11 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js +++ b/ui/pages/settings/contact-list-tab/contact-list-tab.container.js @@ -2,8 +2,8 @@ import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { getAddressBook } from '../../../selectors'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import { CONTACT_ADD_ROUTE, diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js similarity index 98% rename from ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js rename to ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js index 00725f6ea..51419b302 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js +++ b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js @@ -8,7 +8,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../../shared/modules/hexstring-utils'; +} from '../../../../../shared/modules/hexstring-utils'; export default class EditContact extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js b/ui/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js rename to ui/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/index.js b/ui/pages/settings/contact-list-tab/edit-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/edit-contact/index.js rename to ui/pages/settings/contact-list-tab/edit-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/index.js b/ui/pages/settings/contact-list-tab/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/index.js rename to ui/pages/settings/contact-list-tab/index.js diff --git a/ui/app/pages/settings/contact-list-tab/index.scss b/ui/pages/settings/contact-list-tab/index.scss similarity index 100% rename from ui/app/pages/settings/contact-list-tab/index.scss rename to ui/pages/settings/contact-list-tab/index.scss diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/index.js b/ui/pages/settings/contact-list-tab/view-contact/index.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/view-contact/index.js rename to ui/pages/settings/contact-list-tab/view-contact/index.js diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js b/ui/pages/settings/contact-list-tab/view-contact/view-contact.component.js similarity index 100% rename from ui/app/pages/settings/contact-list-tab/view-contact/view-contact.component.js rename to ui/pages/settings/contact-list-tab/view-contact/view-contact.component.js diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js similarity index 92% rename from ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js rename to ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js index 2ce020ffa..275273d0a 100644 --- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js +++ b/ui/pages/settings/contact-list-tab/view-contact/view-contact.container.js @@ -6,7 +6,7 @@ import { CONTACT_EDIT_ROUTE, CONTACT_LIST_ROUTE, } from '../../../../helpers/constants/routes'; -import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import ViewContact from './view-contact.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/pages/settings/index.js b/ui/pages/settings/index.js similarity index 100% rename from ui/app/pages/settings/index.js rename to ui/pages/settings/index.js diff --git a/ui/app/pages/settings/index.scss b/ui/pages/settings/index.scss similarity index 100% rename from ui/app/pages/settings/index.scss rename to ui/pages/settings/index.scss diff --git a/ui/app/pages/settings/info-tab/index.js b/ui/pages/settings/info-tab/index.js similarity index 100% rename from ui/app/pages/settings/info-tab/index.js rename to ui/pages/settings/info-tab/index.js diff --git a/ui/app/pages/settings/info-tab/index.scss b/ui/pages/settings/info-tab/index.scss similarity index 100% rename from ui/app/pages/settings/info-tab/index.scss rename to ui/pages/settings/info-tab/index.scss diff --git a/ui/app/pages/settings/info-tab/info-tab.component.js b/ui/pages/settings/info-tab/info-tab.component.js similarity index 100% rename from ui/app/pages/settings/info-tab/info-tab.component.js rename to ui/pages/settings/info-tab/info-tab.component.js diff --git a/ui/app/pages/settings/networks-tab/index.js b/ui/pages/settings/networks-tab/index.js similarity index 100% rename from ui/app/pages/settings/networks-tab/index.js rename to ui/pages/settings/networks-tab/index.js diff --git a/ui/app/pages/settings/networks-tab/index.scss b/ui/pages/settings/networks-tab/index.scss similarity index 100% rename from ui/app/pages/settings/networks-tab/index.scss rename to ui/pages/settings/networks-tab/index.scss diff --git a/ui/app/pages/settings/networks-tab/network-form/index.js b/ui/pages/settings/networks-tab/network-form/index.js similarity index 100% rename from ui/app/pages/settings/networks-tab/network-form/index.js rename to ui/pages/settings/networks-tab/network-form/index.js diff --git a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js b/ui/pages/settings/networks-tab/network-form/network-form.component.js similarity index 91% rename from ui/app/pages/settings/networks-tab/network-form/network-form.component.js rename to ui/pages/settings/networks-tab/network-form/network-form.component.js index 58a3f5754..07163a6a8 100644 --- a/ui/app/pages/settings/networks-tab/network-form/network-form.component.js +++ b/ui/pages/settings/networks-tab/network-form/network-form.component.js @@ -8,8 +8,8 @@ import Tooltip from '../../../../components/ui/tooltip'; import { isPrefixedFormattedHexString, isSafeChainId, -} from '../../../../../../shared/modules/network.utils'; -import { jsonRpcRequest } from '../../../../../../shared/modules/rpc.utils'; +} from '../../../../../shared/modules/network.utils'; +import { jsonRpcRequest } from '../../../../../shared/modules/rpc.utils'; const FORM_STATE_KEYS = [ 'rpcUrl', @@ -139,6 +139,20 @@ export default class NetworkForm extends PureComponent { return parseInt(chainId, 16).toString(10); } + /** + * Prefixes a given id with '0x' if the prefix does not exist + * + * @param {string} chainId - The chainId to prefix + * @returns {string} The chainId, prefixed with '0x' + */ + prefixChainId(chainId) { + let prefixedChainId = chainId; + if (!chainId.startsWith('0x')) { + prefixedChainId = `0x${parseInt(chainId, 10).toString(16)}`; + } + return prefixedChainId; + } + onSubmit = async () => { this.setState({ isSubmitting: true, @@ -162,11 +176,7 @@ export default class NetworkForm extends PureComponent { } = this.state; const formChainId = stateChainId.trim().toLowerCase(); - // Ensure chainId is a 0x-prefixed, lowercase hex string - let chainId = formChainId; - if (!chainId.startsWith('0x')) { - chainId = `0x${parseInt(chainId, 10).toString(16)}`; - } + const chainId = this.prefixChainId(formChainId); if (!(await this.validateChainIdOnSubmit(formChainId, chainId, rpcUrl))) { this.setState({ @@ -317,6 +327,10 @@ export default class NetworkForm extends PureComponent { }); }; + hasError = (errorKey, errorVal) => { + return this.state.errors[errorKey] === errorVal; + }; + validateChainIdOnChange = (chainIdArg = '') => { const chainId = chainIdArg.trim(); let errorMessage = ''; @@ -392,6 +406,8 @@ export default class NetworkForm extends PureComponent { this.setErrorTo('chainId', errorMessage); return false; } + + this.setErrorTo('chainId', ''); return true; }; @@ -416,9 +432,16 @@ export default class NetworkForm extends PureComponent { }; validateUrlRpcUrl = (url, stateKey) => { + const { t } = this.context; const { rpcUrls } = this.props; + const { chainId: stateChainId } = this.state; + const isValidUrl = validUrl.isWebUri(url) && url !== ''; + const chainIdFetchFailed = this.hasError( + 'chainId', + t('failedToFetchChainId'), + ); - if (!validUrl.isWebUri(url) && url !== '') { + if (!isValidUrl) { this.setErrorTo( stateKey, this.context.t( @@ -430,6 +453,13 @@ export default class NetworkForm extends PureComponent { } else { this.setErrorTo(stateKey, ''); } + + // Re-validate the chain id if it could not be found with previous rpc url + if (stateChainId && isValidUrl && chainIdFetchFailed) { + const formChainId = stateChainId.trim().toLowerCase(); + const chainId = this.prefixChainId(formChainId); + this.validateChainIdOnSubmit(formChainId, chainId, url); + } }; renderWarning() { diff --git a/ui/app/pages/settings/networks-tab/networks-tab.component.js b/ui/pages/settings/networks-tab/networks-tab.component.js similarity index 99% rename from ui/app/pages/settings/networks-tab/networks-tab.component.js rename to ui/pages/settings/networks-tab/networks-tab.component.js index f62a40790..e4fb230c7 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.component.js +++ b/ui/pages/settings/networks-tab/networks-tab.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import Button from '../../../components/ui/button'; import LockIcon from '../../../components/ui/lock-icon'; import { diff --git a/ui/app/pages/settings/networks-tab/networks-tab.constants.js b/ui/pages/settings/networks-tab/networks-tab.constants.js similarity index 96% rename from ui/app/pages/settings/networks-tab/networks-tab.constants.js rename to ui/pages/settings/networks-tab/networks-tab.constants.js index 52f6514d7..91fdbe251 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.constants.js +++ b/ui/pages/settings/networks-tab/networks-tab.constants.js @@ -9,7 +9,7 @@ import { RINKEBY_CHAIN_ID, ROPSTEN, ROPSTEN_CHAIN_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; const defaultNetworksData = [ { diff --git a/ui/app/pages/settings/networks-tab/networks-tab.container.js b/ui/pages/settings/networks-tab/networks-tab.container.js similarity index 93% rename from ui/app/pages/settings/networks-tab/networks-tab.container.js rename to ui/pages/settings/networks-tab/networks-tab.container.js index 75b637159..2878cbf11 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.container.js +++ b/ui/pages/settings/networks-tab/networks-tab.container.js @@ -10,9 +10,9 @@ import { showModal, } from '../../../store/actions'; import { NETWORKS_FORM_ROUTE } from '../../../helpers/constants/routes'; -import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../../shared/constants/app'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; -import { getEnvironmentType } from '../../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; +import { getEnvironmentType } from '../../../../app/scripts/lib/util'; import NetworksTab from './networks-tab.component'; import { defaultNetworksData } from './networks-tab.constants'; diff --git a/ui/app/pages/settings/security-tab/index.js b/ui/pages/settings/security-tab/index.js similarity index 100% rename from ui/app/pages/settings/security-tab/index.js rename to ui/pages/settings/security-tab/index.js diff --git a/ui/app/pages/settings/security-tab/security-tab.component.js b/ui/pages/settings/security-tab/security-tab.component.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.component.js rename to ui/pages/settings/security-tab/security-tab.component.js diff --git a/ui/app/pages/settings/security-tab/security-tab.container.js b/ui/pages/settings/security-tab/security-tab.container.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.container.js rename to ui/pages/settings/security-tab/security-tab.container.js diff --git a/ui/app/pages/settings/security-tab/security-tab.container.test.js b/ui/pages/settings/security-tab/security-tab.container.test.js similarity index 100% rename from ui/app/pages/settings/security-tab/security-tab.container.test.js rename to ui/pages/settings/security-tab/security-tab.container.test.js diff --git a/ui/app/pages/settings/settings-tab/index.js b/ui/pages/settings/settings-tab/index.js similarity index 100% rename from ui/app/pages/settings/settings-tab/index.js rename to ui/pages/settings/settings-tab/index.js diff --git a/ui/app/pages/settings/settings-tab/index.scss b/ui/pages/settings/settings-tab/index.scss similarity index 100% rename from ui/app/pages/settings/settings-tab/index.scss rename to ui/pages/settings/settings-tab/index.scss diff --git a/ui/app/pages/settings/settings-tab/settings-tab.component.js b/ui/pages/settings/settings-tab/settings-tab.component.js similarity index 99% rename from ui/app/pages/settings/settings-tab/settings-tab.component.js rename to ui/pages/settings/settings-tab/settings-tab.component.js index 71aae33a6..d40b446c2 100644 --- a/ui/app/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/pages/settings/settings-tab/settings-tab.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import availableCurrencies from '../../../helpers/constants/available-conversions.json'; import Dropdown from '../../../components/ui/dropdown'; import ToggleButton from '../../../components/ui/toggle-button'; -import locales from '../../../../../app/_locales/index.json'; +import locales from '../../../../app/_locales/index.json'; const sortedCurrencies = availableCurrencies.sort((a, b) => { return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase()); diff --git a/ui/app/pages/settings/settings-tab/settings-tab.container.js b/ui/pages/settings/settings-tab/settings-tab.container.js similarity index 100% rename from ui/app/pages/settings/settings-tab/settings-tab.container.js rename to ui/pages/settings/settings-tab/settings-tab.container.js diff --git a/ui/app/pages/settings/settings-tab/settings-tab.container.test.js b/ui/pages/settings/settings-tab/settings-tab.container.test.js similarity index 100% rename from ui/app/pages/settings/settings-tab/settings-tab.container.test.js rename to ui/pages/settings/settings-tab/settings-tab.container.test.js diff --git a/ui/app/pages/settings/settings.component.js b/ui/pages/settings/settings.component.js similarity index 100% rename from ui/app/pages/settings/settings.component.js rename to ui/pages/settings/settings.component.js diff --git a/ui/app/pages/settings/settings.container.js b/ui/pages/settings/settings.container.js similarity index 92% rename from ui/app/pages/settings/settings.container.js rename to ui/pages/settings/settings.container.js index 1121c4755..bf428c4fc 100644 --- a/ui/app/pages/settings/settings.container.js +++ b/ui/pages/settings/settings.container.js @@ -2,13 +2,13 @@ import { compose } from 'redux'; import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { getAddressBookEntryName } from '../../selectors'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; import { isValidHexAddress, isBurnAddress, -} from '../../../../shared/modules/hexstring-utils'; +} from '../../../shared/modules/hexstring-utils'; import { ABOUT_US_ROUTE, diff --git a/ui/app/pages/swaps/__snapshots__/index.test.js.snap b/ui/pages/swaps/__snapshots__/index.test.js.snap similarity index 100% rename from ui/app/pages/swaps/__snapshots__/index.test.js.snap rename to ui/pages/swaps/__snapshots__/index.test.js.snap diff --git a/ui/app/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap b/ui/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap similarity index 100% rename from ui/app/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap rename to ui/pages/swaps/actionable-message/__snapshots__/actionable-message.test.js.snap diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.js b/ui/pages/swaps/actionable-message/actionable-message.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/actionable-message.js rename to ui/pages/swaps/actionable-message/actionable-message.js diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.stories.js b/ui/pages/swaps/actionable-message/actionable-message.stories.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/actionable-message.stories.js rename to ui/pages/swaps/actionable-message/actionable-message.stories.js diff --git a/ui/app/pages/swaps/actionable-message/actionable-message.test.js b/ui/pages/swaps/actionable-message/actionable-message.test.js similarity index 89% rename from ui/app/pages/swaps/actionable-message/actionable-message.test.js rename to ui/pages/swaps/actionable-message/actionable-message.test.js index 6074f4576..aeae55104 100644 --- a/ui/app/pages/swaps/actionable-message/actionable-message.test.js +++ b/ui/pages/swaps/actionable-message/actionable-message.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import ActionableMessage from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/actionable-message/index.js b/ui/pages/swaps/actionable-message/index.js similarity index 100% rename from ui/app/pages/swaps/actionable-message/index.js rename to ui/pages/swaps/actionable-message/index.js diff --git a/ui/app/pages/swaps/actionable-message/index.scss b/ui/pages/swaps/actionable-message/index.scss similarity index 100% rename from ui/app/pages/swaps/actionable-message/index.scss rename to ui/pages/swaps/actionable-message/index.scss diff --git a/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap b/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap new file mode 100644 index 000000000..a7b8b3546 --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/__snapshots__/awaiting-signatures.test.js.snap @@ -0,0 +1,26 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AwaitingSignatures renders the component with initial props for 1 confirmation 1`] = ` +

+`; diff --git a/ui/pages/swaps/awaiting-signatures/__snapshots__/swap-step-icon.test.js.snap b/ui/pages/swaps/awaiting-signatures/__snapshots__/swap-step-icon.test.js.snap new file mode 100644 index 000000000..681947428 --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/__snapshots__/swap-step-icon.test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SwapStepIcon renders the component 1`] = ` +
+ + + + +
+`; diff --git a/ui/pages/swaps/awaiting-signatures/awaiting-signatures.js b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.js new file mode 100644 index 000000000..784c990fb --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.js @@ -0,0 +1,147 @@ +import React, { useContext, useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { useHistory } from 'react-router-dom'; + +import { I18nContext } from '../../../contexts/i18n'; +import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; +import { + getFetchParams, + getApproveTxParams, + prepareToLeaveSwaps, +} from '../../../ducks/swaps/swaps'; +import { + isHardwareWallet, + getHardwareWalletType, +} from '../../../selectors/selectors'; +import { + DEFAULT_ROUTE, + BUILD_QUOTE_ROUTE, +} from '../../../helpers/constants/routes'; +import PulseLoader from '../../../components/ui/pulse-loader'; +import Typography from '../../../components/ui/typography'; +import Box from '../../../components/ui/box'; +import { + BLOCK_SIZES, + COLORS, + TYPOGRAPHY, + FONT_WEIGHT, + JUSTIFY_CONTENT, + DISPLAY, +} from '../../../helpers/constants/design-system'; +import SwapsFooter from '../swaps-footer'; +import SwapStepIcon from './swap-step-icon'; + +export default function AwaitingSignatures() { + const t = useContext(I18nContext); + const history = useHistory(); + const dispatch = useDispatch(); + const fetchParams = useSelector(getFetchParams); + const { destinationTokenInfo, sourceTokenInfo } = fetchParams?.metaData || {}; + const approveTxParams = useSelector(getApproveTxParams); + const hardwareWalletUsed = useSelector(isHardwareWallet); + const hardwareWalletType = useSelector(getHardwareWalletType); + const needsTwoConfirmations = Boolean(approveTxParams); + + const awaitingSignaturesEvent = useNewMetricEvent({ + event: 'Awaiting Signature(s) on a HW wallet', + sensitiveProperties: { + needs_two_confirmations: needsTwoConfirmations, + token_from: sourceTokenInfo?.symbol, + token_from_amount: fetchParams?.value, + token_to: destinationTokenInfo?.symbol, + request_type: fetchParams?.balanceError ? 'Quote' : 'Order', + slippage: fetchParams?.slippage, + custom_slippage: fetchParams?.slippage === 2, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, + }, + category: 'swaps', + }); + + useEffect(() => { + awaitingSignaturesEvent(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const headerText = needsTwoConfirmations + ? t('swapTwoTransactions') + : t('swapConfirmWithHwWallet'); + + return ( +
+ + + + + + {headerText} + + {needsTwoConfirmations && ( + <> + + {t('swapToConfirmWithHwWallet')} + +
    +
  • + + {t('swapAllowSwappingOf', [ + + {destinationTokenInfo?.symbol} + , + ])} +
  • +
  • + + {t('swapFromTo', [ + + {sourceTokenInfo?.symbol} + , + + {destinationTokenInfo?.symbol} + , + ])} +
  • +
+ + {t('swapGasFeesSplit')} + + + )} +
+ { + await dispatch(prepareToLeaveSwaps()); + // Go to the default route and then to the build quote route in order to clean up + // the `inputValue` local state in `pages/swaps/index.js` + history.push(DEFAULT_ROUTE); + history.push(BUILD_QUOTE_ROUTE); + }} + submitText={t('cancel')} + hideCancel + /> +
+ ); +} diff --git a/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js new file mode 100644 index 000000000..c8e466ec2 --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/awaiting-signatures.test.js @@ -0,0 +1,17 @@ +import React from 'react'; +import configureMockStore from 'redux-mock-store'; + +import { + renderWithProvider, + createSwapsMockStore, +} from '../../../../test/jest'; +import AwaitingSignatures from '.'; + +describe('AwaitingSignatures', () => { + it('renders the component with initial props for 1 confirmation', () => { + const store = configureMockStore()(createSwapsMockStore()); + const { getByText } = renderWithProvider(, store); + expect(getByText('Confirm with your hardware wallet')).toBeInTheDocument(); + expect(document.querySelector('.swaps-footer')).toMatchSnapshot(); + }); +}); diff --git a/ui/pages/swaps/awaiting-signatures/index.js b/ui/pages/swaps/awaiting-signatures/index.js new file mode 100644 index 000000000..3950ca6bf --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/index.js @@ -0,0 +1 @@ +export { default } from './awaiting-signatures'; diff --git a/ui/pages/swaps/awaiting-signatures/index.scss b/ui/pages/swaps/awaiting-signatures/index.scss new file mode 100644 index 000000000..9c847236c --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/index.scss @@ -0,0 +1,34 @@ +.awaiting-signatures { + display: flex; + flex-flow: column; + align-items: center; + flex: 1; + width: 100%; + + &__content { + flex-flow: column; + } + + div { + text-align: center; + display: flex; + justify-content: center; + } + + &__steps { + display: flex; + flex-direction: column; + align-items: flex-start; + margin: 16px auto 12px auto; + + li { + margin-bottom: 4px; + display: flex; + align-items: center; + + svg { + margin-right: 4px; + } + } + } +} diff --git a/ui/pages/swaps/awaiting-signatures/swap-step-icon.js b/ui/pages/swaps/awaiting-signatures/swap-step-icon.js new file mode 100644 index 000000000..3e5d50665 --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/swap-step-icon.js @@ -0,0 +1,40 @@ +import React from 'react'; + +export default function SwapStepIcon({ stepNumber = 1 }) { + switch (stepNumber) { + case 1: + return ( + + + + + ); + case 2: + return ( + + + + + ); + default: + return undefined; // Don't return any SVG if a step number is not supported. + } +} diff --git a/ui/pages/swaps/awaiting-signatures/swap-step-icon.test.js b/ui/pages/swaps/awaiting-signatures/swap-step-icon.test.js new file mode 100644 index 000000000..47c92d7aa --- /dev/null +++ b/ui/pages/swaps/awaiting-signatures/swap-step-icon.test.js @@ -0,0 +1,11 @@ +import React from 'react'; + +import { renderWithProvider } from '../../../../test/jest'; +import SwapStepIcon from './swap-step-icon'; + +describe('SwapStepIcon', () => { + it('renders the component', () => { + const { container } = renderWithProvider(); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/awaiting-swap.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/quotes-timeout-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/swap-failure-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap b/ui/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap rename to ui/pages/swaps/awaiting-swap/__snapshots__/swap-success-icon.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.js similarity index 80% rename from ui/app/pages/swaps/awaiting-swap/awaiting-swap.js rename to ui/pages/swaps/awaiting-swap/awaiting-swap.js index af21ce29b..75f7a07b5 100644 --- a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.js @@ -3,7 +3,7 @@ import React, { useContext, useRef, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import { createCustomExplorerLink } from '@metamask/etherscan-link'; +import { getBlockExplorerLink } from '@metamask/etherscan-link'; import { I18nContext } from '../../../contexts/i18n'; import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; import { MetaMetricsContext } from '../../../contexts/metametrics.new'; @@ -13,6 +13,8 @@ import { getCurrentCurrency, getRpcPrefsForCurrentProvider, getUSDConversionRate, + isHardwareWallet, + getHardwareWalletType, } from '../../../selectors'; import { @@ -26,23 +28,23 @@ import { prepareToLeaveSwaps, } from '../../../ducks/swaps/swaps'; import Mascot from '../../../components/ui/mascot'; +import Box from '../../../components/ui/box'; import { QUOTES_EXPIRED_ERROR, SWAP_FAILED_ERROR, ERROR_FETCHING_QUOTES, QUOTES_NOT_AVAILABLE_ERROR, + CONTRACT_DATA_DISABLED_ERROR, OFFLINE_FOR_MAINTENANCE, SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP, -} from '../../../../../shared/constants/swaps'; -import { CHAIN_ID_TO_TYPE_MAP as VALID_INFURA_CHAIN_IDS } from '../../../../../shared/constants/network'; -import { isSwapsDefaultTokenSymbol } from '../../../../../shared/modules/swaps.utils'; +} from '../../../../shared/constants/swaps'; +import { isSwapsDefaultTokenSymbol } from '../../../../shared/modules/swaps.utils'; import PulseLoader from '../../../components/ui/pulse-loader'; import { ASSET_ROUTE, DEFAULT_ROUTE } from '../../../helpers/constants/routes'; import { getRenderableNetworkFeesForQuote } from '../swaps.util'; import SwapsFooter from '../swaps-footer'; -import { getBlockExplorerUrlForTx } from '../../../../../shared/modules/transaction.utils'; import SwapFailureIcon from './swap-failure-icon'; import SwapSuccessIcon from './swap-success-icon'; @@ -95,31 +97,38 @@ export default function AwaitingSwap({ feeinUnformattedFiat = renderableNetworkFees.rawNetworkFees; } + const hardwareWalletUsed = useSelector(isHardwareWallet); + const hardwareWalletType = useSelector(getHardwareWalletType); + const sensitiveProperties = { + token_from: sourceTokenInfo?.symbol, + token_from_amount: fetchParams?.value, + token_to: destinationTokenInfo?.symbol, + request_type: fetchParams?.balanceError ? 'Quote' : 'Order', + slippage: fetchParams?.slippage, + custom_slippage: fetchParams?.slippage === 2, + gas_fees: feeinUnformattedFiat, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, + }; const quotesExpiredEvent = useNewMetricEvent({ event: 'Quotes Timed Out', - sensitiveProperties: { - token_from: sourceTokenInfo?.symbol, - token_from_amount: fetchParams?.value, - token_to: destinationTokenInfo?.symbol, - request_type: fetchParams?.balanceError ? 'Quote' : 'Order', - slippage: fetchParams?.slippage, - custom_slippage: fetchParams?.slippage === 2, - gas_fees: feeinUnformattedFiat, - }, + sensitiveProperties, + category: 'swaps', + }); + const makeAnotherSwapEvent = useNewMetricEvent({ + event: 'Make Another Swap', + sensitiveProperties, category: 'swaps', }); - let blockExplorerUrl; - if (txHash && rpcPrefs.blockExplorerUrl) { - blockExplorerUrl = getBlockExplorerUrlForTx({ hash: txHash }, rpcPrefs); - } else if (txHash && SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId]) { - blockExplorerUrl = createCustomExplorerLink( - txHash, - SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId], - ); - } else if (txHash && VALID_INFURA_CHAIN_IDS[chainId]) { - blockExplorerUrl = getBlockExplorerUrlForTx({ chainId, hash: txHash }); - } + const baseNetworkUrl = + rpcPrefs.blockExplorerUrl ?? + SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId] ?? + null; + const blockExplorerUrl = getBlockExplorerLink( + { hash: txHash, chainId }, + { blockExplorerUrl: baseNetworkUrl }, + ); const isCustomBlockExplorerUrl = SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId] || @@ -178,6 +187,11 @@ export default function AwaitingSwap({ descriptionText = t('swapQuotesNotAvailableErrorDescription'); submitText = t('tryAgain'); statusImage = ; + } else if (errorKey === CONTRACT_DATA_DISABLED_ERROR) { + headerText = t('swapContractDataDisabledErrorTitle'); + descriptionText = t('swapContractDataDisabledErrorDescription'); + submitText = t('tryAgain'); + statusImage = ; } else if (!errorKey && !swapComplete) { headerText = t('swapProcessing'); statusImage = ; @@ -200,7 +214,7 @@ export default function AwaitingSwap({ } else if (!errorKey && swapComplete) { headerText = t('swapTransactionComplete'); statusImage = ; - submitText = t('swapViewToken', [destinationTokenInfo.symbol]); + submitText = t('close'); descriptionText = t('swapTokenAvailable', [ { + return ( + + { + makeAnotherSwapEvent(); + dispatch(navigateBackToBuildQuote(history)); + }} + > + {t('makeAnotherSwap')} + + + ); + }; + return (
@@ -233,6 +263,7 @@ export default function AwaitingSwap({
{descriptionText}
{content}
+ {!errorKey && swapComplete && } { if (errorKey === OFFLINE_FOR_MAINTENANCE) { @@ -251,7 +282,8 @@ export default function AwaitingSwap({ } else if (errorKey) { await dispatch(navigateBackToBuildQuote(history)); } else if ( - isSwapsDefaultTokenSymbol(destinationTokenInfo?.symbol, chainId) + isSwapsDefaultTokenSymbol(destinationTokenInfo?.symbol, chainId) || + swapComplete ) { history.push(DEFAULT_ROUTE); } else { @@ -277,6 +309,7 @@ AwaitingSwap.propTypes = { ERROR_FETCHING_QUOTES, QUOTES_NOT_AVAILABLE_ERROR, OFFLINE_FOR_MAINTENANCE, + CONTRACT_DATA_DISABLED_ERROR, ]), submittingSwap: PropTypes.bool, inputValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), diff --git a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js similarity index 96% rename from ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js rename to ui/pages/swaps/awaiting-swap/awaiting-swap.test.js index 396bcfb51..af9850752 100644 --- a/ui/app/pages/swaps/awaiting-swap/awaiting-swap.test.js +++ b/ui/pages/swaps/awaiting-swap/awaiting-swap.test.js @@ -4,7 +4,7 @@ import configureMockStore from 'redux-mock-store'; import { renderWithProvider, createSwapsMockStore, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import AwaitingSwap from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/awaiting-swap/index.js b/ui/pages/swaps/awaiting-swap/index.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/index.js rename to ui/pages/swaps/awaiting-swap/index.js diff --git a/ui/app/pages/swaps/awaiting-swap/index.scss b/ui/pages/swaps/awaiting-swap/index.scss similarity index 97% rename from ui/app/pages/swaps/awaiting-swap/index.scss rename to ui/pages/swaps/awaiting-swap/index.scss index 0ad246934..f2792eb5a 100644 --- a/ui/app/pages/swaps/awaiting-swap/index.scss +++ b/ui/pages/swaps/awaiting-swap/index.scss @@ -20,6 +20,10 @@ justify-content: center; } + a { + color: $Blue-500; + } + &__status-image { margin-top: 12px; margin-bottom: 16px; diff --git a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.js b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.js rename to ui/pages/swaps/awaiting-swap/quotes-timeout-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js rename to ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js index 6afc922ef..12f2adf45 100644 --- a/ui/app/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/quotes-timeout-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import QuotesTimeoutIcon from './quotes-timeout-icon'; describe('QuotesTimeoutIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.js b/ui/pages/swaps/awaiting-swap/swap-failure-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/swap-failure-icon.js rename to ui/pages/swaps/awaiting-swap/swap-failure-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js b/ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js rename to ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js index be75020f8..02af2db06 100644 --- a/ui/app/pages/swaps/awaiting-swap/swap-failure-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/swap-failure-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapFailureIcon from './swap-failure-icon'; describe('SwapFailureIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.js b/ui/pages/swaps/awaiting-swap/swap-success-icon.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/swap-success-icon.js rename to ui/pages/swaps/awaiting-swap/swap-success-icon.js diff --git a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js b/ui/pages/swaps/awaiting-swap/swap-success-icon.test.js similarity index 81% rename from ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js rename to ui/pages/swaps/awaiting-swap/swap-success-icon.test.js index 39d9eed12..4e735f158 100644 --- a/ui/app/pages/swaps/awaiting-swap/swap-success-icon.test.js +++ b/ui/pages/swaps/awaiting-swap/swap-success-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapSuccessIcon from './swap-success-icon'; describe('SwapSuccessIcon', () => { diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/__snapshots__/view-on-ether-scan-link.test.js.snap diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js similarity index 100% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/index.js diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js similarity index 60% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js index 15fb7d081..ee11b2981 100644 --- a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js +++ b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.js @@ -2,6 +2,7 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { I18nContext } from '../../../../contexts/i18n'; +import { useNewMetricEvent } from '../../../../hooks/useMetricEvent'; export default function ViewOnEtherScanLink({ txHash, @@ -9,13 +10,29 @@ export default function ViewOnEtherScanLink({ isCustomBlockExplorerUrl, }) { const t = useContext(I18nContext); + + const blockExplorerLinkClickedEvent = useNewMetricEvent({ + category: 'Swaps', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Transaction Block Explorer', + action: 'Swap Transaction', + block_explorer_domain: blockExplorerUrl + ? new URL(blockExplorerUrl)?.hostname + : '', + }, + }); + return (
global.platform.openTab({ url: blockExplorerUrl })} + onClick={() => { + blockExplorerLinkClickedEvent(); + global.platform.openTab({ url: blockExplorerUrl }); + }} > {isCustomBlockExplorerUrl ? t('viewOnCustomBlockExplorer', [new URL(blockExplorerUrl).hostname]) diff --git a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js similarity index 94% rename from ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js rename to ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js index 0eb8a4dc7..91e32b82c 100644 --- a/ui/app/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js +++ b/ui/pages/swaps/awaiting-swap/view-on-ether-scan-link/view-on-ether-scan-link.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../../test/jest'; +import { renderWithProvider } from '../../../../../test/jest'; import ViewOnEtherScanLink from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap b/ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap similarity index 100% rename from ui/app/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap rename to ui/pages/swaps/build-quote/__snapshots__/build-quote.test.js.snap diff --git a/ui/app/pages/swaps/build-quote/build-quote.js b/ui/pages/swaps/build-quote/build-quote.js similarity index 91% rename from ui/app/pages/swaps/build-quote/build-quote.js rename to ui/pages/swaps/build-quote/build-quote.js index d93ab6a9b..71e887b5c 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.js +++ b/ui/pages/swaps/build-quote/build-quote.js @@ -4,11 +4,9 @@ import { useDispatch, useSelector } from 'react-redux'; import classnames from 'classnames'; import { uniqBy, isEqual } from 'lodash'; import { useHistory } from 'react-router-dom'; -import { - createCustomTokenTrackerLink, - createTokenTrackerLinkForChain, -} from '@metamask/etherscan-link'; +import { getTokenTrackerLink } from '@metamask/etherscan-link'; import { MetaMetricsContext } from '../../../contexts/metametrics.new'; +import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; import { useTokensToSearch, getRenderableTokenData, @@ -53,8 +51,8 @@ import { useEthFiatAmount } from '../../../hooks/useEthFiatAmount'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../../../shared/modules/swaps.utils'; -import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../../shared/constants/swaps'; +} from '../../../../shared/modules/swaps.utils'; +import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../shared/constants/swaps'; import { resetSwapsPostFetchState, removeToken } from '../../../store/actions'; import { fetchTokenPrice, fetchTokenBalance } from '../swaps.util'; @@ -223,29 +221,34 @@ export default function BuildQuote({ ); }; - let blockExplorerTokenLink; - let blockExplorerLabel; - if (rpcPrefs.blockExplorerUrl) { - blockExplorerTokenLink = createCustomTokenTrackerLink( - selectedToToken.address, - rpcPrefs.blockExplorerUrl, - ); - blockExplorerLabel = new URL(rpcPrefs.blockExplorerUrl).hostname; - } else if (SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId]) { - blockExplorerTokenLink = createCustomTokenTrackerLink( - selectedToToken.address, - SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId], - ); - blockExplorerLabel = new URL( - SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId], - ).hostname; - } else { - blockExplorerTokenLink = createTokenTrackerLinkForChain( - selectedToToken.address, - chainId, - ); - blockExplorerLabel = t('etherscan'); - } + const blockExplorerTokenLink = getTokenTrackerLink( + selectedToToken.address, + chainId, + null, // no networkId + null, // no holderAddress + { + blockExplorerUrl: + rpcPrefs.blockExplorerUrl ?? + SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP[chainId] ?? + null, + }, + ); + + const blockExplorerLabel = rpcPrefs.blockExplorerUrl + ? new URL(blockExplorerTokenLink).hostname + : t('etherscan'); + + const blockExplorerLinkClickedEvent = useNewMetricEvent({ + category: 'Swaps', + event: 'Clicked Block Explorer Link', + properties: { + link_type: 'Token Tracker', + action: 'Swaps Confirmation', + block_explorer_domain: blockExplorerTokenLink + ? new URL(blockExplorerTokenLink)?.hostname + : '', + }, + }); const { destinationTokenAddedForSwap } = fetchParams || {}; const { address: toAddress } = toToken || {}; @@ -401,7 +404,7 @@ export default function BuildQuote({ }} > {t('swapSwapSwitch')} { + blockExplorerLinkClickedEvent(); + global.platform.openTab({ + url: blockExplorerTokenLink, + }); + }} target="_blank" rel="noopener noreferrer" > @@ -488,7 +496,12 @@ export default function BuildQuote({ { + blockExplorerLinkClickedEvent(); + global.platform.openTab({ + url: blockExplorerTokenLink, + }); + }} target="_blank" rel="noopener noreferrer" > @@ -533,7 +546,7 @@ export default function BuildQuote({ !isFeatureFlagLoaded || !Number(inputValue) || !selectedToToken?.address || - Number(maxSlippage) === 0 || + Number(maxSlippage) < 0 || Number(maxSlippage) > MAX_ALLOWED_SLIPPAGE || (toTokenIsNotDefault && occurances < 2 && !verificationClicked) } diff --git a/ui/app/pages/swaps/build-quote/build-quote.stories.js b/ui/pages/swaps/build-quote/build-quote.stories.js similarity index 100% rename from ui/app/pages/swaps/build-quote/build-quote.stories.js rename to ui/pages/swaps/build-quote/build-quote.stories.js diff --git a/ui/app/pages/swaps/build-quote/build-quote.test.js b/ui/pages/swaps/build-quote/build-quote.test.js similarity index 97% rename from ui/app/pages/swaps/build-quote/build-quote.test.js rename to ui/pages/swaps/build-quote/build-quote.test.js index d27990687..960489281 100644 --- a/ui/app/pages/swaps/build-quote/build-quote.test.js +++ b/ui/pages/swaps/build-quote/build-quote.test.js @@ -6,7 +6,7 @@ import { renderWithProvider, createSwapsMockStore, setBackgroundConnection, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import BuildQuote from '.'; const middleware = [thunk]; diff --git a/ui/app/pages/swaps/build-quote/index.js b/ui/pages/swaps/build-quote/index.js similarity index 100% rename from ui/app/pages/swaps/build-quote/index.js rename to ui/pages/swaps/build-quote/index.js diff --git a/ui/app/pages/swaps/build-quote/index.scss b/ui/pages/swaps/build-quote/index.scss similarity index 100% rename from ui/app/pages/swaps/build-quote/index.scss rename to ui/pages/swaps/build-quote/index.scss diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.js b/ui/pages/swaps/countdown-timer/countdown-timer.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.js rename to ui/pages/swaps/countdown-timer/countdown-timer.js diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.stories.js b/ui/pages/swaps/countdown-timer/countdown-timer.stories.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.stories.js rename to ui/pages/swaps/countdown-timer/countdown-timer.stories.js diff --git a/ui/app/pages/swaps/countdown-timer/countdown-timer.test.js b/ui/pages/swaps/countdown-timer/countdown-timer.test.js similarity index 95% rename from ui/app/pages/swaps/countdown-timer/countdown-timer.test.js rename to ui/pages/swaps/countdown-timer/countdown-timer.test.js index ad6697f3a..49f37dcd6 100644 --- a/ui/app/pages/swaps/countdown-timer/countdown-timer.test.js +++ b/ui/pages/swaps/countdown-timer/countdown-timer.test.js @@ -4,7 +4,7 @@ import configureMockStore from 'redux-mock-store'; import { renderWithProvider, createSwapsMockStore, -} from '../../../../../test/jest'; +} from '../../../../test/jest'; import CountdownTimer from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/countdown-timer/index.js b/ui/pages/swaps/countdown-timer/index.js similarity index 100% rename from ui/app/pages/swaps/countdown-timer/index.js rename to ui/pages/swaps/countdown-timer/index.js diff --git a/ui/app/pages/swaps/countdown-timer/index.scss b/ui/pages/swaps/countdown-timer/index.scss similarity index 100% rename from ui/app/pages/swaps/countdown-timer/index.scss rename to ui/pages/swaps/countdown-timer/index.scss diff --git a/ui/app/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap b/ui/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap rename to ui/pages/swaps/dropdown-input-pair/__snapshots__/dropdown-input-pair.test.js.snap diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.stories.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js similarity index 89% rename from ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js rename to ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js index 69420a56c..92a7024a0 100644 --- a/ui/app/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js +++ b/ui/pages/swaps/dropdown-input-pair/dropdown-input-pair.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import DropdownInputPair from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/dropdown-input-pair/index.js b/ui/pages/swaps/dropdown-input-pair/index.js similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/index.js rename to ui/pages/swaps/dropdown-input-pair/index.js diff --git a/ui/app/pages/swaps/dropdown-input-pair/index.scss b/ui/pages/swaps/dropdown-input-pair/index.scss similarity index 100% rename from ui/app/pages/swaps/dropdown-input-pair/index.scss rename to ui/pages/swaps/dropdown-input-pair/index.scss diff --git a/ui/app/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap b/ui/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap rename to ui/pages/swaps/dropdown-search-list/__snapshots__/dropdown-search-list.test.js.snap diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.js diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js diff --git a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js similarity index 89% rename from ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js rename to ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js index 70f0e6a68..a14bc989f 100644 --- a/ui/app/pages/swaps/dropdown-search-list/dropdown-search-list.test.js +++ b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import DropdownSearchList from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/dropdown-search-list/index.js b/ui/pages/swaps/dropdown-search-list/index.js similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/index.js rename to ui/pages/swaps/dropdown-search-list/index.js diff --git a/ui/app/pages/swaps/dropdown-search-list/index.scss b/ui/pages/swaps/dropdown-search-list/index.scss similarity index 100% rename from ui/app/pages/swaps/dropdown-search-list/index.scss rename to ui/pages/swaps/dropdown-search-list/index.scss diff --git a/ui/app/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap b/ui/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap rename to ui/pages/swaps/exchange-rate-display/__snapshots__/exchange-rate-display.test.js.snap diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.js diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.stories.js diff --git a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js similarity index 92% rename from ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js rename to ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js index b0aa8db60..9dc224206 100644 --- a/ui/app/pages/swaps/exchange-rate-display/exchange-rate-display.test.js +++ b/ui/pages/swaps/exchange-rate-display/exchange-rate-display.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import ExchangeRateDisplay from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/exchange-rate-display/index.js b/ui/pages/swaps/exchange-rate-display/index.js similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/index.js rename to ui/pages/swaps/exchange-rate-display/index.js diff --git a/ui/app/pages/swaps/exchange-rate-display/index.scss b/ui/pages/swaps/exchange-rate-display/index.scss similarity index 100% rename from ui/app/pages/swaps/exchange-rate-display/index.scss rename to ui/pages/swaps/exchange-rate-display/index.scss diff --git a/ui/app/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap similarity index 100% rename from ui/app/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap rename to ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap diff --git a/ui/app/pages/swaps/fee-card/fee-card.js b/ui/pages/swaps/fee-card/fee-card.js similarity index 99% rename from ui/app/pages/swaps/fee-card/fee-card.js rename to ui/pages/swaps/fee-card/fee-card.js index 23bb545f9..68ee4faec 100644 --- a/ui/app/pages/swaps/fee-card/fee-card.js +++ b/ui/pages/swaps/fee-card/fee-card.js @@ -6,7 +6,7 @@ import { MAINNET_CHAIN_ID, BSC_CHAIN_ID, LOCALHOST_CHAIN_ID, -} from '../../../../../shared/constants/network'; +} from '../../../../shared/constants/network'; export default function FeeCard({ primaryFee, diff --git a/ui/app/pages/swaps/fee-card/fee-card.stories.js b/ui/pages/swaps/fee-card/fee-card.stories.js similarity index 100% rename from ui/app/pages/swaps/fee-card/fee-card.stories.js rename to ui/pages/swaps/fee-card/fee-card.stories.js diff --git a/ui/app/pages/swaps/fee-card/fee-card.test.js b/ui/pages/swaps/fee-card/fee-card.test.js similarity index 92% rename from ui/app/pages/swaps/fee-card/fee-card.test.js rename to ui/pages/swaps/fee-card/fee-card.test.js index 15c8b0c33..7a81e4903 100644 --- a/ui/app/pages/swaps/fee-card/fee-card.test.js +++ b/ui/pages/swaps/fee-card/fee-card.test.js @@ -1,7 +1,7 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; -import { MAINNET_CHAIN_ID } from '../../../../../shared/constants/network'; +import { renderWithProvider } from '../../../../test/jest'; +import { MAINNET_CHAIN_ID } from '../../../../shared/constants/network'; import FeeCard from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/fee-card/index.js b/ui/pages/swaps/fee-card/index.js similarity index 100% rename from ui/app/pages/swaps/fee-card/index.js rename to ui/pages/swaps/fee-card/index.js diff --git a/ui/app/pages/swaps/fee-card/index.scss b/ui/pages/swaps/fee-card/index.scss similarity index 100% rename from ui/app/pages/swaps/fee-card/index.scss rename to ui/pages/swaps/fee-card/index.scss diff --git a/ui/app/pages/swaps/fee-card/pig-icon.js b/ui/pages/swaps/fee-card/pig-icon.js similarity index 100% rename from ui/app/pages/swaps/fee-card/pig-icon.js rename to ui/pages/swaps/fee-card/pig-icon.js diff --git a/ui/app/pages/swaps/fee-card/pig-icon.test.js b/ui/pages/swaps/fee-card/pig-icon.test.js similarity index 80% rename from ui/app/pages/swaps/fee-card/pig-icon.test.js rename to ui/pages/swaps/fee-card/pig-icon.test.js index 7764681b8..6321b7dc6 100644 --- a/ui/app/pages/swaps/fee-card/pig-icon.test.js +++ b/ui/pages/swaps/fee-card/pig-icon.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import PigIcon from './pig-icon'; describe('PigIcon', () => { diff --git a/ui/app/pages/swaps/index.js b/ui/pages/swaps/index.js similarity index 92% rename from ui/app/pages/swaps/index.js rename to ui/pages/swaps/index.js index 7af7b83b1..05a0d6d42 100644 --- a/ui/app/pages/swaps/index.js +++ b/ui/pages/swaps/index.js @@ -13,6 +13,8 @@ import { getSelectedAccount, getCurrentChainId, getIsSwapsChain, + isHardwareWallet, + getHardwareWalletType, } from '../../selectors/selectors'; import { getQuotes, @@ -33,6 +35,7 @@ import { fetchSwapsLiveness, } from '../../ducks/swaps/swaps'; import { + AWAITING_SIGNATURES_ROUTE, AWAITING_SWAP_ROUTE, BUILD_QUOTE_ROUTE, VIEW_QUOTE_ROUTE, @@ -45,8 +48,9 @@ import { ERROR_FETCHING_QUOTES, QUOTES_NOT_AVAILABLE_ERROR, SWAP_FAILED_ERROR, + CONTRACT_DATA_DISABLED_ERROR, OFFLINE_FOR_MAINTENANCE, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { resetBackgroundSwapsState, @@ -59,13 +63,14 @@ import { currentNetworkTxListSelector } from '../../selectors'; import { useNewMetricEvent } from '../../hooks/useMetricEvent'; import FeatureToggledRoute from '../../helpers/higher-order-components/feature-toggled-route'; -import { TRANSACTION_STATUSES } from '../../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; import { fetchTokens, fetchTopAssets, getSwapsTokensReceivedFromTxMeta, fetchAggregatorMetadata, } from './swaps.util'; +import AwaitingSignatures from './awaiting-signatures'; import AwaitingSwap from './awaiting-swap'; import LoadingQuote from './loading-swaps-quotes'; import BuildQuote from './build-quote'; @@ -78,6 +83,7 @@ export default function Swap() { const { pathname } = useLocation(); const isAwaitingSwapRoute = pathname === AWAITING_SWAP_ROUTE; + const isAwaitingSignaturesRoute = pathname === AWAITING_SIGNATURES_ROUTE; const isSwapsErrorRoute = pathname === SWAPS_ERROR_ROUTE; const isLoadingQuotesRoute = pathname === LOADING_QUOTES_ROUTE; @@ -131,7 +137,7 @@ export default function Swap() { tradeTxData?.txReceipt?.status === '0x0'; const conversionError = approveError || tradeError; - if (conversionError) { + if (conversionError && swapsErrorKey !== CONTRACT_DATA_DISABLED_ERROR) { swapsErrorKey = SWAP_FAILED_ERROR; } @@ -181,6 +187,8 @@ export default function Swap() { }; }, [dispatch, chainId]); + const hardwareWalletUsed = useSelector(isHardwareWallet); + const hardwareWalletType = useSelector(getHardwareWalletType); const exitedSwapsEvent = useNewMetricEvent({ event: 'Exited Swaps', category: 'swaps', @@ -192,6 +200,8 @@ export default function Swap() { slippage: fetchParams?.slippage, custom_slippage: fetchParams?.slippage !== 2, current_screen: pathname.match(/\/swaps\/(.+)/u)[1], + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }); const exitEventRef = useRef(); @@ -243,7 +253,7 @@ export default function Swap() {
{t('swap')}
- {!isAwaitingSwapRoute && ( + {!isAwaitingSwapRoute && !isAwaitingSignaturesRoute && (
{ @@ -267,7 +277,7 @@ export default function Swap() { render={() => { if (tradeTxData && !conversionError) { return ; - } else if (tradeTxData) { + } else if (tradeTxData && routeState) { return ; } else if (routeState === 'loading' && aggregatorMetadata) { return ; @@ -372,6 +382,13 @@ export default function Swap() { ); }} /> + { + return ; + }} + /> { diff --git a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.js b/ui/pages/swaps/loading-swaps-quotes/background-animation.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/background-animation.js rename to ui/pages/swaps/loading-swaps-quotes/background-animation.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js b/ui/pages/swaps/loading-swaps-quotes/background-animation.test.js similarity index 85% rename from ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js rename to ui/pages/swaps/loading-swaps-quotes/background-animation.test.js index 64e31843e..f4601ddc6 100644 --- a/ui/app/pages/swaps/loading-swaps-quotes/background-animation.test.js +++ b/ui/pages/swaps/loading-swaps-quotes/background-animation.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import BackgroundAnimation from './background-animation'; describe('BackgroundAnimation', () => { diff --git a/ui/app/pages/swaps/loading-swaps-quotes/index.js b/ui/pages/swaps/loading-swaps-quotes/index.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/index.js rename to ui/pages/swaps/loading-swaps-quotes/index.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/index.scss b/ui/pages/swaps/loading-swaps-quotes/index.scss similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/index.scss rename to ui/pages/swaps/loading-swaps-quotes/index.scss diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js similarity index 100% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes-stories-metadata.test.js diff --git a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js similarity index 96% rename from ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js rename to ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js index 8835c372e..b0a5760f4 100644 --- a/ui/app/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js +++ b/ui/pages/swaps/loading-swaps-quotes/loading-swaps-quotes.js @@ -10,6 +10,10 @@ import { getFetchParams, getQuotesFetchStartTime, } from '../../../ducks/swaps/swaps'; +import { + isHardwareWallet, + getHardwareWalletType, +} from '../../../selectors/selectors'; import { I18nContext } from '../../../contexts/i18n'; import { MetaMetricsContext } from '../../../contexts/metametrics.new'; import Mascot from '../../../components/ui/mascot'; @@ -67,6 +71,8 @@ export default function LoadingSwapsQuotes({ const fetchParams = useSelector(getFetchParams); const quotesFetchStartTime = useSelector(getQuotesFetchStartTime); + const hardwareWalletUsed = useSelector(isHardwareWallet); + const hardwareWalletType = useSelector(getHardwareWalletType); const quotesRequestCancelledEventConfig = { event: 'Quotes Request Cancelled', category: 'swaps', @@ -78,6 +84,8 @@ export default function LoadingSwapsQuotes({ slippage: fetchParams?.slippage, custom_slippage: fetchParams?.slippage !== 2, response_time: Date.now() - quotesFetchStartTime, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }; diff --git a/ui/app/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap b/ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap rename to ui/pages/swaps/main-quote-summary/__snapshots__/main-quote-summary.test.js.snap diff --git a/ui/app/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap b/ui/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap rename to ui/pages/swaps/main-quote-summary/__snapshots__/quote-backdrop.test.js.snap diff --git a/ui/app/pages/swaps/main-quote-summary/index.js b/ui/pages/swaps/main-quote-summary/index.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/index.js rename to ui/pages/swaps/main-quote-summary/index.js diff --git a/ui/app/pages/swaps/main-quote-summary/index.scss b/ui/pages/swaps/main-quote-summary/index.scss similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/index.scss rename to ui/pages/swaps/main-quote-summary/index.scss diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.js diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.stories.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.stories.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.stories.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.stories.js diff --git a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js b/ui/pages/swaps/main-quote-summary/main-quote-summary.test.js similarity index 94% rename from ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js rename to ui/pages/swaps/main-quote-summary/main-quote-summary.test.js index cc1775363..85e17bd48 100644 --- a/ui/app/pages/swaps/main-quote-summary/main-quote-summary.test.js +++ b/ui/pages/swaps/main-quote-summary/main-quote-summary.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import MainQuoteSummary from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.js b/ui/pages/swaps/main-quote-summary/quote-backdrop.js similarity index 100% rename from ui/app/pages/swaps/main-quote-summary/quote-backdrop.js rename to ui/pages/swaps/main-quote-summary/quote-backdrop.js diff --git a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js b/ui/pages/swaps/main-quote-summary/quote-backdrop.test.js similarity index 90% rename from ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js rename to ui/pages/swaps/main-quote-summary/quote-backdrop.test.js index caab811ca..00d23c265 100644 --- a/ui/app/pages/swaps/main-quote-summary/quote-backdrop.test.js +++ b/ui/pages/swaps/main-quote-summary/quote-backdrop.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import QuotesBackdrop from './quote-backdrop'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap b/ui/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap rename to ui/pages/swaps/searchable-item-list/__snapshots__/searchable-item-list.test.js.snap diff --git a/ui/app/pages/swaps/searchable-item-list/index.js b/ui/pages/swaps/searchable-item-list/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/index.js rename to ui/pages/swaps/searchable-item-list/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/index.scss b/ui/pages/swaps/searchable-item-list/index.scss similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/index.scss rename to ui/pages/swaps/searchable-item-list/index.scss diff --git a/ui/app/pages/swaps/searchable-item-list/item-list/index.js b/ui/pages/swaps/searchable-item-list/item-list/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/item-list/index.js rename to ui/pages/swaps/searchable-item-list/item-list/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/item-list/item-list.component.js b/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/item-list/item-list.component.js rename to ui/pages/swaps/searchable-item-list/item-list/item-list.component.js diff --git a/ui/app/pages/swaps/searchable-item-list/list-item-search/index.js b/ui/pages/swaps/searchable-item-list/list-item-search/index.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/list-item-search/index.js rename to ui/pages/swaps/searchable-item-list/list-item-search/index.js diff --git a/ui/app/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js b/ui/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js rename to ui/pages/swaps/searchable-item-list/list-item-search/list-item-search.component.js diff --git a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.js b/ui/pages/swaps/searchable-item-list/searchable-item-list.js similarity index 100% rename from ui/app/pages/swaps/searchable-item-list/searchable-item-list.js rename to ui/pages/swaps/searchable-item-list/searchable-item-list.js diff --git a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js b/ui/pages/swaps/searchable-item-list/searchable-item-list.test.js similarity index 96% rename from ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js rename to ui/pages/swaps/searchable-item-list/searchable-item-list.test.js index ef9a3a016..c62272e54 100644 --- a/ui/app/pages/swaps/searchable-item-list/searchable-item-list.test.js +++ b/ui/pages/swaps/searchable-item-list/searchable-item-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SearchableItemList from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap b/ui/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap rename to ui/pages/swaps/select-quote-popover/__snapshots__/select-quote-popover.test.js.snap diff --git a/ui/app/pages/swaps/select-quote-popover/index.js b/ui/pages/swaps/select-quote-popover/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/index.js rename to ui/pages/swaps/select-quote-popover/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/index.scss b/ui/pages/swaps/select-quote-popover/index.scss similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/index.scss rename to ui/pages/swaps/select-quote-popover/index.scss diff --git a/ui/app/pages/swaps/select-quote-popover/mock-quote-data.js b/ui/pages/swaps/select-quote-popover/mock-quote-data.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/mock-quote-data.js rename to ui/pages/swaps/select-quote-popover/mock-quote-data.js diff --git a/ui/app/pages/swaps/select-quote-popover/mock-quote-data.test.js b/ui/pages/swaps/select-quote-popover/mock-quote-data.test.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/mock-quote-data.test.js rename to ui/pages/swaps/select-quote-popover/mock-quote-data.test.js diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/index.js b/ui/pages/swaps/select-quote-popover/quote-details/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/quote-details/index.js rename to ui/pages/swaps/select-quote-popover/quote-details/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/index.scss b/ui/pages/swaps/select-quote-popover/quote-details/index.scss similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/quote-details/index.scss rename to ui/pages/swaps/select-quote-popover/quote-details/index.scss diff --git a/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js b/ui/pages/swaps/select-quote-popover/quote-details/quote-details.js similarity index 98% rename from ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js rename to ui/pages/swaps/select-quote-popover/quote-details/quote-details.js index 6d96123e0..86da97ca9 100644 --- a/ui/app/pages/swaps/select-quote-popover/quote-details/quote-details.js +++ b/ui/pages/swaps/select-quote-popover/quote-details/quote-details.js @@ -80,7 +80,7 @@ const QuoteDetails = ({
diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js b/ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover-constants.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover-constants.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.stories.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.stories.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.stories.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.stories.js diff --git a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js similarity index 89% rename from ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js rename to ui/pages/swaps/select-quote-popover/select-quote-popover.test.js index b23a35f68..1eaa99738 100644 --- a/ui/app/pages/swaps/select-quote-popover/select-quote-popover.test.js +++ b/ui/pages/swaps/select-quote-popover/select-quote-popover.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SelectQuotePopover from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap b/ui/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap rename to ui/pages/swaps/select-quote-popover/sort-list/__snapshots__/sort-list.test.js.snap diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/index.js b/ui/pages/swaps/select-quote-popover/sort-list/index.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/index.js rename to ui/pages/swaps/select-quote-popover/sort-list/index.js diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.js similarity index 100% rename from ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.js rename to ui/pages/swaps/select-quote-popover/sort-list/sort-list.js diff --git a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js similarity index 97% rename from ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js rename to ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js index 57896b8e0..99e5a19e5 100644 --- a/ui/app/pages/swaps/select-quote-popover/sort-list/sort-list.test.js +++ b/ui/pages/swaps/select-quote-popover/sort-list/sort-list.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../../test/jest'; +import { renderWithProvider } from '../../../../../test/jest'; import SortList from './sort-list'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap b/ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap rename to ui/pages/swaps/slippage-buttons/__snapshots__/slippage-buttons.test.js.snap diff --git a/ui/app/pages/swaps/slippage-buttons/index.js b/ui/pages/swaps/slippage-buttons/index.js similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/index.js rename to ui/pages/swaps/slippage-buttons/index.js diff --git a/ui/app/pages/swaps/slippage-buttons/index.scss b/ui/pages/swaps/slippage-buttons/index.scss similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/index.scss rename to ui/pages/swaps/slippage-buttons/index.scss diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.js similarity index 90% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.js index 83b230062..66a11f43b 100644 --- a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.js +++ b/ui/pages/swaps/slippage-buttons/slippage-buttons.js @@ -13,8 +13,12 @@ export default function SlippageButtons({ }) { const t = useContext(I18nContext); const [customValue, setCustomValue] = useState(() => { - if (currentSlippage && currentSlippage !== 2 && currentSlippage !== 3) { - return currentSlippage; + if ( + typeof currentSlippage === 'number' && + currentSlippage !== 2 && + currentSlippage !== 3 + ) { + return currentSlippage.toString(); } return ''; }); @@ -24,7 +28,7 @@ export default function SlippageButtons({ return 1; } else if (currentSlippage === 2) { return 0; - } else if (currentSlippage) { + } else if (typeof currentSlippage === 'number') { return 2; } return 1; // Choose activeButtonIndex = 1 for 3% slippage by default. @@ -33,9 +37,12 @@ export default function SlippageButtons({ let errorText = ''; if (customValue) { - if (Number(customValue) <= 0) { - errorText = t('swapSlippageTooLow'); - } else if (Number(customValue) < 0.5) { + // customValue is a string, e.g. '0' + if (Number(customValue) < 0) { + errorText = t('swapSlippageNegative'); + } else if (Number(customValue) > 0 && Number(customValue) <= 1) { + // We will not show this warning for 0% slippage, because we will only + // return non-slippage quotes from off-chain makers. errorText = t('swapLowSlippageError'); } else if ( Number(customValue) >= 5 && @@ -136,10 +143,6 @@ export default function SlippageButtons({ ref={setInputRef} onBlur={() => { setEnteringCustomValue(false); - if (customValue === '0') { - setCustomValue(''); - setActiveButtonIndex(1); - } }} value={customValue || ''} /> diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.stories.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.stories.js similarity index 100% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.stories.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.stories.js diff --git a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js b/ui/pages/swaps/slippage-buttons/slippage-buttons.test.js similarity index 93% rename from ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js rename to ui/pages/swaps/slippage-buttons/slippage-buttons.test.js index 0108f07d2..60ceeff4c 100644 --- a/ui/app/pages/swaps/slippage-buttons/slippage-buttons.test.js +++ b/ui/pages/swaps/slippage-buttons/slippage-buttons.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SlippageButtons from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap b/ui/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap similarity index 100% rename from ui/app/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap rename to ui/pages/swaps/swaps-footer/__snapshots__/swaps-footer.test.js.snap diff --git a/ui/app/pages/swaps/swaps-footer/index.js b/ui/pages/swaps/swaps-footer/index.js similarity index 100% rename from ui/app/pages/swaps/swaps-footer/index.js rename to ui/pages/swaps/swaps-footer/index.js diff --git a/ui/app/pages/swaps/swaps-footer/index.scss b/ui/pages/swaps/swaps-footer/index.scss similarity index 100% rename from ui/app/pages/swaps/swaps-footer/index.scss rename to ui/pages/swaps/swaps-footer/index.scss diff --git a/ui/app/pages/swaps/swaps-footer/swaps-footer.js b/ui/pages/swaps/swaps-footer/swaps-footer.js similarity index 100% rename from ui/app/pages/swaps/swaps-footer/swaps-footer.js rename to ui/pages/swaps/swaps-footer/swaps-footer.js diff --git a/ui/app/pages/swaps/swaps-footer/swaps-footer.test.js b/ui/pages/swaps/swaps-footer/swaps-footer.test.js similarity index 91% rename from ui/app/pages/swaps/swaps-footer/swaps-footer.test.js rename to ui/pages/swaps/swaps-footer/swaps-footer.test.js index 4cff41083..17a2b3355 100644 --- a/ui/app/pages/swaps/swaps-footer/swaps-footer.test.js +++ b/ui/pages/swaps/swaps-footer/swaps-footer.test.js @@ -1,6 +1,6 @@ import React from 'react'; -import { renderWithProvider } from '../../../../../test/jest'; +import { renderWithProvider } from '../../../../test/jest'; import SwapsFooter from '.'; const createProps = (customProps = {}) => { diff --git a/ui/app/pages/swaps/swaps-gas-customization-modal/index.js b/ui/pages/swaps/swaps-gas-customization-modal/index.js similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/index.js rename to ui/pages/swaps/swaps-gas-customization-modal/index.js diff --git a/ui/app/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 similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js rename to ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.component.js diff --git a/ui/app/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 similarity index 100% rename from ui/app/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js rename to ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.container.js diff --git a/ui/app/pages/swaps/swaps-util-test-constants.js b/ui/pages/swaps/swaps-util-test-constants.js similarity index 99% rename from ui/app/pages/swaps/swaps-util-test-constants.js rename to ui/pages/swaps/swaps-util-test-constants.js index cf54889b1..54c0b1e34 100644 --- a/ui/app/pages/swaps/swaps-util-test-constants.js +++ b/ui/pages/swaps/swaps-util-test-constants.js @@ -1,4 +1,4 @@ -import { ETH_SWAPS_TOKEN_OBJECT } from '../../../../shared/constants/swaps'; +import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps'; export const TRADES_BASE_PROD_URL = 'https://api.metaswap.codefi.network/trades?'; diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/pages/swaps/swaps.util.js similarity index 98% rename from ui/app/pages/swaps/swaps.util.js rename to ui/pages/swaps/swaps.util.js index 968802bb3..e72483f35 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/pages/swaps/swaps.util.js @@ -6,16 +6,16 @@ import { METASWAP_CHAINID_API_HOST_MAP, SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, ETH_WETH_CONTRACT_ADDRESS, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { isSwapsDefaultTokenAddress, isSwapsDefaultTokenSymbol, -} from '../../../../shared/modules/swaps.utils'; +} from '../../../shared/modules/swaps.utils'; import { ETH_SYMBOL, WETH_SYMBOL, MAINNET_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import { calcTokenValue, calcTokenAmount, @@ -34,7 +34,7 @@ import { formatCurrency } from '../../helpers/utils/confirm-tx.util'; import fetchWithCache from '../../helpers/utils/fetch-with-cache'; import { calcGasTotal } from '../send/send.utils'; -import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; const TOKEN_TRANSFER_LOG_TOPIC_HASH = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'; diff --git a/ui/app/pages/swaps/swaps.util.test.js b/ui/pages/swaps/swaps.util.test.js similarity index 98% rename from ui/app/pages/swaps/swaps.util.test.js rename to ui/pages/swaps/swaps.util.test.js index cc7f6d9fc..936864f0f 100644 --- a/ui/app/pages/swaps/swaps.util.test.js +++ b/ui/pages/swaps/swaps.util.test.js @@ -5,11 +5,11 @@ import { MAINNET_CHAIN_ID, BSC_CHAIN_ID, LOCALHOST_CHAIN_ID, -} from '../../../../shared/constants/network'; +} from '../../../shared/constants/network'; import { SWAPS_CHAINID_CONTRACT_ADDRESS_MAP, ETH_WETH_CONTRACT_ADDRESS, -} from '../../../../shared/constants/swaps'; +} from '../../../shared/constants/swaps'; import { TOKENS, EXPECTED_TOKENS_RESULT, @@ -26,7 +26,7 @@ import { isContractAddressValid, } from './swaps.util'; -jest.mock('../../../lib/storage-helpers.js', () => ({ +jest.mock('../../helpers/utils/storage-helpers.js', () => ({ getStorageItem: jest.fn(), setStorageItem: jest.fn(), })); diff --git a/ui/app/pages/swaps/view-quote/index.js b/ui/pages/swaps/view-quote/index.js similarity index 100% rename from ui/app/pages/swaps/view-quote/index.js rename to ui/pages/swaps/view-quote/index.js diff --git a/ui/app/pages/swaps/view-quote/index.scss b/ui/pages/swaps/view-quote/index.scss similarity index 77% rename from ui/app/pages/swaps/view-quote/index.scss rename to ui/pages/swaps/view-quote/index.scss index 20c2ea0b4..bdc9bde88 100644 --- a/ui/app/pages/swaps/view-quote/index.scss +++ b/ui/pages/swaps/view-quote/index.scss @@ -95,46 +95,53 @@ &-wrapper { width: 100%; - &.medium .actionable-message, - &.fiat-error .actionable-message { - border-color: $Yellow-500; - background: $Yellow-100; + &.low, + &.medium, + &.high { + .actionable-message { + .actionable-message__message { + color: inherit; + } - .actionable-message__message { - color: inherit; + button { + font-size: $font-size-h8; + padding: 4px 12px; + border-radius: 42px; + } } + } - button { - background: $Yellow-500; - border-radius: 42px; + &.low { + .actionable-message { + button { + background: $Blue-500; + color: #fff; + } } } - &.high { + &.medium { .actionable-message { - border-color: $Red-500; - background: $Red-100; + border-color: $Yellow-500; + background: $Yellow-100; - .actionable-message__message { - color: $Red-500; + button { + background: $Yellow-500; } } + } - button { - background: $Red-500; - color: #fff; - border-radius: 42px; + &.high { + .actionable-message { + border-color: $Red-300; + background: $Red-000; - /* Offsets the width of ActionableMessage icon */ - margin-right: -22px; + button { + background: $Red-500; + color: #fff; + } } } - - /* Hides info tooltip if there's a fiat error message */ - &.fiat-error div[data-tooltipped] { - /* !important overrides style being applied directly to tooltip by component */ - display: none !important; - } } &-contents { @@ -160,10 +167,9 @@ width: 100%; align-items: center; justify-content: center; - width: intrinsic; /* Safari/WebKit uses a non-standard name */ - width: max-content; max-width: 340px; margin-top: 8px; + margin-bottom: 28px; @media screen and (min-width: 576px) { &--thin { diff --git a/ui/app/pages/swaps/view-quote/view-quote-price-difference.js b/ui/pages/swaps/view-quote/view-quote-price-difference.js similarity index 77% rename from ui/app/pages/swaps/view-quote/view-quote-price-difference.js rename to ui/pages/swaps/view-quote/view-quote-price-difference.js index 61d1ad52b..327aaaf49 100644 --- a/ui/app/pages/swaps/view-quote/view-quote-price-difference.js +++ b/ui/pages/swaps/view-quote/view-quote-price-difference.js @@ -6,6 +6,11 @@ import { I18nContext } from '../../../contexts/i18n'; import ActionableMessage from '../actionable-message'; import Tooltip from '../../../components/ui/tooltip'; +import Box from '../../../components/ui/box'; +import { + JUSTIFY_CONTENT, + DISPLAY, +} from '../../../helpers/constants/design-system'; export default function ViewQuotePriceDifference(props) { const { @@ -28,9 +33,10 @@ export default function ViewQuotePriceDifference(props) { let priceDifferenceAcknowledgementText = ''; if (priceSlippageUnknownFiatValue) { // A calculation error signals we cannot determine dollar value - priceDifferenceMessage = t('swapPriceDifferenceUnavailable'); - priceDifferenceClass = 'fiat-error'; - priceDifferenceAcknowledgementText = t('continue'); + priceDifferenceTitle = t('swapPriceUnavailableTitle'); + priceDifferenceMessage = t('swapPriceUnavailableDescription'); + priceDifferenceClass = 'high'; + priceDifferenceAcknowledgementText = t('tooltipApproveButton'); } else { priceDifferenceTitle = t('swapPriceDifferenceTitle', [ priceDifferencePercentage, @@ -44,9 +50,7 @@ export default function ViewQuotePriceDifference(props) { priceSlippageFromDestination, // Destination tokens total value ]); priceDifferenceClass = usedQuote.priceSlippage.bucket; - priceDifferenceAcknowledgementText = t( - 'swapPriceDifferenceAcknowledgement', - ); + priceDifferenceAcknowledgementText = t('tooltipApproveButton'); } return ( @@ -60,11 +64,22 @@ export default function ViewQuotePriceDifference(props) { message={
- {priceDifferenceTitle && ( +
{priceDifferenceTitle}
- )} + + + +
{priceDifferenceMessage} {!acknowledged && (
@@ -78,13 +93,6 @@ export default function ViewQuotePriceDifference(props) {
)}
- - -
} /> diff --git a/ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js similarity index 97% rename from ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js rename to ui/pages/swaps/view-quote/view-quote-price-difference.test.js index c00322959..cd94ab4a0 100644 --- a/ui/app/pages/swaps/view-quote/view-quote-price-difference.test.js +++ b/ui/pages/swaps/view-quote/view-quote-price-difference.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { Provider } from 'react-redux'; import configureMockStore from 'redux-mock-store'; -import { NETWORK_TYPE_RPC } from '../../../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../../../shared/constants/network'; import ViewQuotePriceDifference from './view-quote-price-difference'; describe('View Price Quote Difference', () => { @@ -144,6 +144,6 @@ describe('View Price Quote Difference', () => { 'Could not determine price.'; renderComponent(props); - expect(component.html()).toContain('fiat-error'); + expect(component.html()).toContain('high'); }); }); diff --git a/ui/app/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js similarity index 96% rename from ui/app/pages/swaps/view-quote/view-quote.js rename to ui/pages/swaps/view-quote/view-quote.js index e20e806a0..c472f1f40 100644 --- a/ui/app/pages/swaps/view-quote/view-quote.js +++ b/ui/pages/swaps/view-quote/view-quote.js @@ -39,6 +39,8 @@ import { getSwapsDefaultToken, getCurrentChainId, getNativeCurrency, + isHardwareWallet, + getHardwareWalletType, } from '../../../selectors'; import { toPrecisionWithoutTrailingZeros } from '../../../helpers/utils/util'; import { getTokens } from '../../../ducks/metamask/metamask'; @@ -75,7 +77,7 @@ import { getRenderableNetworkFeesForQuote, } from '../swaps.util'; import { useTokenTracker } from '../../../hooks/useTokenTracker'; -import { QUOTES_EXPIRED_ERROR } from '../../../../../shared/constants/swaps'; +import { QUOTES_EXPIRED_ERROR } from '../../../../shared/constants/swaps'; import CountdownTimer from '../countdown-timer'; import SwapsFooter from '../swaps-footer'; import ViewQuotePriceDifference from './view-quote-price-difference'; @@ -330,6 +332,8 @@ export default function ViewQuote() { available_quotes: numberOfQuotes, }; + const hardwareWalletUsed = useSelector(isHardwareWallet); + const hardwareWalletType = useSelector(getHardwareWalletType); const allAvailableQuotesOpened = useNewMetricEvent({ event: 'All Available Quotes Opened', category: 'swaps', @@ -340,6 +344,8 @@ export default function ViewQuote() { usedQuote?.aggregator === topQuote?.aggregator ? null : usedQuote?.aggregator, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }); const quoteDetailsOpened = useNewMetricEvent({ @@ -352,6 +358,8 @@ export default function ViewQuote() { usedQuote?.aggregator === topQuote?.aggregator ? null : usedQuote?.aggregator, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }); const editSpendLimitOpened = useNewMetricEvent({ @@ -362,13 +370,20 @@ export default function ViewQuote() { custom_spend_limit_set: originalApproveAmount === approveAmount, custom_spend_limit_amount: originalApproveAmount === approveAmount ? null : approveAmount, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, }, }); const bestQuoteReviewedEvent = useNewMetricEvent({ event: 'Best Quote Reviewed', category: 'swaps', - sensitiveProperties: { ...eventObjectBase, network_fees: feeInFiat }, + sensitiveProperties: { + ...eventObjectBase, + network_fees: feeInFiat, + is_hardware_wallet: hardwareWalletUsed, + hardware_wallet_type: hardwareWalletType, + }, }); useEffect(() => { if ( diff --git a/ui/app/pages/unlock-page/index.js b/ui/pages/unlock-page/index.js similarity index 100% rename from ui/app/pages/unlock-page/index.js rename to ui/pages/unlock-page/index.js diff --git a/ui/app/pages/unlock-page/index.scss b/ui/pages/unlock-page/index.scss similarity index 100% rename from ui/app/pages/unlock-page/index.scss rename to ui/pages/unlock-page/index.scss diff --git a/ui/app/pages/unlock-page/unlock-page.component.js b/ui/pages/unlock-page/unlock-page.component.js similarity index 100% rename from ui/app/pages/unlock-page/unlock-page.component.js rename to ui/pages/unlock-page/unlock-page.component.js diff --git a/ui/app/pages/unlock-page/unlock-page.component.test.js b/ui/pages/unlock-page/unlock-page.component.test.js similarity index 84% rename from ui/app/pages/unlock-page/unlock-page.component.test.js rename to ui/pages/unlock-page/unlock-page.component.test.js index 412b7dc6f..5029f6a0e 100644 --- a/ui/app/pages/unlock-page/unlock-page.component.test.js +++ b/ui/pages/unlock-page/unlock-page.component.test.js @@ -2,7 +2,7 @@ import React from 'react'; import sinon from 'sinon'; import configureMockStore from 'redux-mock-store'; import { fireEvent } from '@testing-library/react'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; +import { renderWithProvider } from '../../../test/lib/render-helpers'; import UnlockPage from './unlock-page.component'; describe('Unlock Page Component', () => { @@ -23,7 +23,7 @@ describe('Unlock Page Component', () => { configureMockStore()({ metamask: { currentLocale: 'en' } }), ); - fireEvent.click(getByText('import using seed phrase')); + fireEvent.click(getByText('import using Secret Recovery Phrase')); expect(props.onRestore.calledOnce).toStrictEqual(true); }); }); diff --git a/ui/app/pages/unlock-page/unlock-page.container.js b/ui/pages/unlock-page/unlock-page.container.js similarity index 92% rename from ui/app/pages/unlock-page/unlock-page.container.js rename to ui/pages/unlock-page/unlock-page.container.js index 56da7e661..eb1be797a 100644 --- a/ui/app/pages/unlock-page/unlock-page.container.js +++ b/ui/pages/unlock-page/unlock-page.container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux'; import { withRouter } from 'react-router-dom'; import { compose } from 'redux'; -import { getEnvironmentType } from '../../../../app/scripts/lib/util'; -import { ENVIRONMENT_TYPE_POPUP } from '../../../../shared/constants/app'; +import { getEnvironmentType } from '../../../app/scripts/lib/util'; +import { ENVIRONMENT_TYPE_POPUP } from '../../../shared/constants/app'; import { DEFAULT_ROUTE, RESTORE_VAULT_ROUTE, diff --git a/ui/app/pages/unlock-page/unlock-page.container.test.js b/ui/pages/unlock-page/unlock-page.container.test.js similarity index 100% rename from ui/app/pages/unlock-page/unlock-page.container.test.js rename to ui/pages/unlock-page/unlock-page.container.test.js diff --git a/ui/app/selectors/confirm-transaction.js b/ui/selectors/confirm-transaction.js similarity index 98% rename from ui/app/selectors/confirm-transaction.js rename to ui/selectors/confirm-transaction.js index 2ac609be7..ba837e8ab 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/selectors/confirm-transaction.js @@ -1,5 +1,5 @@ import { createSelector } from 'reselect'; -import txHelper from '../../lib/tx-helper'; +import txHelper from '../helpers/utils/tx-helper'; import { calcTokenAmount } from '../helpers/utils/token-util'; import { roundExponential, @@ -10,7 +10,7 @@ import { addEth, } from '../helpers/utils/confirm-tx.util'; import { sumHexes } from '../helpers/utils/transactions.util'; -import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; import { getCurrentChainId, deprecatedGetCurrentNetworkId } from './selectors'; import { getNativeCurrency } from '.'; diff --git a/ui/app/selectors/confirm-transaction.test.js b/ui/selectors/confirm-transaction.test.js similarity index 95% rename from ui/app/selectors/confirm-transaction.test.js rename to ui/selectors/confirm-transaction.test.js index 1f7acf158..9a899a523 100644 --- a/ui/app/selectors/confirm-transaction.test.js +++ b/ui/selectors/confirm-transaction.test.js @@ -2,8 +2,8 @@ import { KOVAN_CHAIN_ID, KOVAN_NETWORK_ID, MAINNET_CHAIN_ID, -} from '../../../shared/constants/network'; -import { TRANSACTION_TYPES } from '../../../shared/constants/transaction'; +} from '../../shared/constants/network'; +import { TRANSACTION_TYPES } from '../../shared/constants/transaction'; import { unconfirmedTransactionsCountSelector, sendTokenTokenAmountAndToAddressSelector, diff --git a/ui/app/selectors/custom-gas.js b/ui/selectors/custom-gas.js similarity index 89% rename from ui/app/selectors/custom-gas.js rename to ui/selectors/custom-gas.js index c84c48c71..4485c2086 100644 --- a/ui/app/selectors/custom-gas.js +++ b/ui/selectors/custom-gas.js @@ -1,4 +1,4 @@ -import { addHexPrefix } from '../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../app/scripts/lib/util'; import { conversionUtil, conversionGreaterThan, @@ -9,6 +9,7 @@ import { formatETHFee } from '../helpers/utils/formatters'; import { calcGasTotal } from '../pages/send/send.utils'; import { GAS_ESTIMATE_TYPES } from '../helpers/constants/common'; +import { BASIC_ESTIMATE_STATES, GAS_SOURCE } from '../ducks/gas/gas.duck'; import { getCurrentCurrency, getIsMainnet, @@ -27,12 +28,14 @@ export function getCustomGasPrice(state) { } export function getBasicGasEstimateLoadingStatus(state) { - return state.gas.basicEstimateIsLoading; + return state.gas.basicEstimateStatus === 'LOADING'; } export function getAveragePriceEstimateInHexWEI(state) { - const averagePriceEstimate = state.gas.basicEstimates.average; - return getGasPriceInHexWei(averagePriceEstimate || '0x0'); + const averagePriceEstimate = state.gas.basicEstimates + ? state.gas.basicEstimates.average + : '0x0'; + return getGasPriceInHexWei(averagePriceEstimate); } export function getFastPriceEstimateInHexWEI(state) { @@ -355,3 +358,25 @@ export function getRenderableEstimateDataForSmallButtonsFromGWEI(state) { }, ]; } + +export function getIsEthGasPriceFetched(state) { + const gasState = state.gas; + return Boolean( + gasState.estimateSource === GAS_SOURCE.ETHGASPRICE && + gasState.basicEstimateStatus === BASIC_ESTIMATE_STATES.READY && + getIsMainnet(state), + ); +} + +export function getNoGasPriceFetched(state) { + const gasState = state.gas; + return Boolean(gasState.basicEstimateStatus === BASIC_ESTIMATE_STATES.FAILED); +} + +export function getIsGasEstimatesFetched(state) { + const gasState = state.gas; + return Boolean( + gasState.estimateSource === GAS_SOURCE.METASWAPS && + gasState.basicEstimateStatus === BASIC_ESTIMATE_STATES.READY, + ); +} diff --git a/ui/app/selectors/custom-gas.test.js b/ui/selectors/custom-gas.test.js similarity index 100% rename from ui/app/selectors/custom-gas.test.js rename to ui/selectors/custom-gas.test.js diff --git a/ui/app/selectors/first-time-flow.js b/ui/selectors/first-time-flow.js similarity index 100% rename from ui/app/selectors/first-time-flow.js rename to ui/selectors/first-time-flow.js diff --git a/ui/app/selectors/index.js b/ui/selectors/index.js similarity index 100% rename from ui/app/selectors/index.js rename to ui/selectors/index.js diff --git a/ui/app/selectors/permissions.js b/ui/selectors/permissions.js similarity index 99% rename from ui/app/selectors/permissions.js rename to ui/selectors/permissions.js index 8ac46cc96..788275179 100644 --- a/ui/app/selectors/permissions.js +++ b/ui/selectors/permissions.js @@ -1,5 +1,5 @@ import { forOwn } from 'lodash'; -import { CAVEAT_NAMES } from '../../../shared/constants/permissions'; +import { CAVEAT_NAMES } from '../../shared/constants/permissions'; import { getMetaMaskAccountsOrdered, getOriginOfCurrentTab, diff --git a/ui/app/selectors/permissions.test.js b/ui/selectors/permissions.test.js similarity index 99% rename from ui/app/selectors/permissions.test.js rename to ui/selectors/permissions.test.js index 3cebfd1a5..16d3057fc 100644 --- a/ui/app/selectors/permissions.test.js +++ b/ui/selectors/permissions.test.js @@ -1,4 +1,4 @@ -import { KOVAN_CHAIN_ID } from '../../../shared/constants/network'; +import { KOVAN_CHAIN_ID } from '../../shared/constants/network'; import { getConnectedDomainsForSelectedAddress, getOrderedConnectedAccountsForActiveTab, diff --git a/ui/app/selectors/selectors.js b/ui/selectors/selectors.js similarity index 92% rename from ui/app/selectors/selectors.js rename to ui/selectors/selectors.js index eed91f858..5b429c8f7 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1,17 +1,18 @@ import { stripHexPrefix } from 'ethereumjs-util'; import { createSelector } from 'reselect'; -import { addHexPrefix } from '../../../app/scripts/lib/util'; +import { addHexPrefix } from '../../app/scripts/lib/util'; import { MAINNET_CHAIN_ID, + BSC_CHAIN_ID, TEST_CHAINS, NETWORK_TYPE_RPC, NATIVE_CURRENCY_TOKEN_IMAGE_MAP, -} from '../../../shared/constants/network'; +} from '../../shared/constants/network'; import { SWAPS_CHAINID_DEFAULT_TOKEN_MAP, ALLOWED_SWAPS_CHAIN_IDS, -} from '../../../shared/constants/swaps'; +} from '../../shared/constants/swaps'; import { shortenAddress, getAccountByAddress } from '../helpers/utils/util'; import { @@ -21,7 +22,7 @@ import { import { TEMPLATED_CONFIRMATION_MESSAGE_TYPES } from '../pages/confirmation/templates'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; import { getNativeCurrency } from './send'; /** @@ -75,6 +76,26 @@ export function getCurrentKeyring(state) { return keyring; } +/** + * Checks if the current wallet is a hardware wallet. + * @param {Object} state + * @returns {Boolean} + */ +export function isHardwareWallet(state) { + const keyring = getCurrentKeyring(state); + return keyring.type.includes('Hardware'); +} + +/** + * Get a HW wallet type, e.g. "Ledger Hardware" + * @param {Object} state + * @returns {String|undefined} + */ +export function getHardwareWalletType(state) { + const keyring = getCurrentKeyring(state); + return keyring.type.includes('Hardware') ? keyring.type : undefined; +} + export function getAccountType(state) { const currentKeyring = getCurrentKeyring(state); const type = currentKeyring && currentKeyring.type; @@ -496,6 +517,21 @@ export function getShowWhatsNewPopup(state) { return state.appState.showWhatsNewPopup; } +/** + * Get an object of notification IDs and if they are allowed or not. + * @param {Object} state + * @returns {Object} + */ +function getAllowedNotificationIds(state) { + return { + 1: true, + 2: true, + 3: true, + 4: getCurrentChainId(state) === BSC_CHAIN_ID, + 5: true, + }; +} + /** * @typedef {Object} Notification * @property {number} id - A unique identifier for the notification @@ -516,8 +552,10 @@ export function getShowWhatsNewPopup(state) { export function getSortedNotificationsToShow(state) { const notifications = Object.values(state.metamask.notifications); + const allowedNotificationIds = getAllowedNotificationIds(state); const notificationsToShow = notifications.filter( - (notification) => !notification.isShown, + (notification) => + !notification.isShown && allowedNotificationIds[notification.id], ); const notificationsSortedByDate = notificationsToShow.sort( (a, b) => new Date(b.date) - new Date(a.date), diff --git a/ui/app/selectors/selectors.test.js b/ui/selectors/selectors.test.js similarity index 69% rename from ui/app/selectors/selectors.test.js rename to ui/selectors/selectors.test.js index 0b476f727..b83697ab3 100644 --- a/ui/app/selectors/selectors.test.js +++ b/ui/selectors/selectors.test.js @@ -1,4 +1,4 @@ -import mockState from '../../../test/data/mock-state.json'; +import mockState from '../../test/data/mock-state.json'; import * as selectors from './selectors'; describe('Selectors', () => { @@ -15,6 +15,44 @@ describe('Selectors', () => { }); }); + describe('#isHardwareWallet', () => { + it('returns false if it is not a HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Simple Key Pair'; + expect(selectors.isHardwareWallet(mockState)).toBe(false); + }); + + it('returns true if it is a Ledger HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Ledger Hardware'; + expect(selectors.isHardwareWallet(mockState)).toBe(true); + }); + + it('returns true if it is a Trezor HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Trezor Hardware'; + expect(selectors.isHardwareWallet(mockState)).toBe(true); + }); + }); + + describe('#getHardwareWalletType', () => { + it('returns undefined if it is not a HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Simple Key Pair'; + expect(selectors.getHardwareWalletType(mockState)).toBeUndefined(); + }); + + it('returns "Ledger Hardware" if it is a Ledger HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Ledger Hardware'; + expect(selectors.getHardwareWalletType(mockState)).toBe( + 'Ledger Hardware', + ); + }); + + it('returns "Trezor Hardware" if it is a Trezor HW wallet', () => { + mockState.metamask.keyrings[0].type = 'Trezor Hardware'; + expect(selectors.getHardwareWalletType(mockState)).toBe( + 'Trezor Hardware', + ); + }); + }); + it('returns selected identity', () => { expect(selectors.getSelectedIdentity(mockState)).toStrictEqual({ address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', diff --git a/ui/app/selectors/send-selectors-test-data.js b/ui/selectors/send-selectors-test-data.js similarity index 98% rename from ui/app/selectors/send-selectors-test-data.js rename to ui/selectors/send-selectors-test-data.js index f6c077798..e6c0d230c 100644 --- a/ui/app/selectors/send-selectors-test-data.js +++ b/ui/selectors/send-selectors-test-data.js @@ -1,4 +1,4 @@ -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; const state = { metamask: { diff --git a/ui/app/selectors/send.js b/ui/selectors/send.js similarity index 100% rename from ui/app/selectors/send.js rename to ui/selectors/send.js diff --git a/ui/app/selectors/send.test.js b/ui/selectors/send.test.js similarity index 99% rename from ui/app/selectors/send.test.js rename to ui/selectors/send.test.js index b4f94c56b..bab7b63fe 100644 --- a/ui/app/selectors/send.test.js +++ b/ui/selectors/send.test.js @@ -1,5 +1,5 @@ import sinon from 'sinon'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import { getBlockGasLimit, getConversionRate, diff --git a/ui/app/selectors/transactions.js b/ui/selectors/transactions.js similarity index 98% rename from ui/app/selectors/transactions.js rename to ui/selectors/transactions.js index 628b856f0..e05d7f3fa 100644 --- a/ui/app/selectors/transactions.js +++ b/ui/selectors/transactions.js @@ -4,12 +4,12 @@ import { PENDING_STATUS_HASH, } from '../helpers/constants/transactions'; import { hexToDecimal } from '../helpers/utils/conversions.util'; -import txHelper from '../../lib/tx-helper'; +import txHelper from '../helpers/utils/tx-helper'; import { TRANSACTION_STATUSES, TRANSACTION_TYPES, -} from '../../../shared/constants/transaction'; -import { transactionMatchesNetwork } from '../../../shared/modules/transaction.utils'; +} from '../../shared/constants/transaction'; +import { transactionMatchesNetwork } from '../../shared/modules/transaction.utils'; import { getCurrentChainId, deprecatedGetCurrentNetworkId } from './selectors'; import { getSelectedAddress } from '.'; diff --git a/ui/app/selectors/transactions.test.js b/ui/selectors/transactions.test.js similarity index 98% rename from ui/app/selectors/transactions.test.js rename to ui/selectors/transactions.test.js index 4493c3e96..4f538e232 100644 --- a/ui/app/selectors/transactions.test.js +++ b/ui/selectors/transactions.test.js @@ -1,8 +1,8 @@ import { KOVAN_CHAIN_ID, MAINNET_CHAIN_ID, -} from '../../../shared/constants/network'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +} from '../../shared/constants/network'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import { unapprovedMessagesSelector, transactionsSelector, diff --git a/ui/app/store/actionConstants.js b/ui/store/actionConstants.js similarity index 98% rename from ui/app/store/actionConstants.js rename to ui/store/actionConstants.js index 8613318c8..8a9f5cd84 100644 --- a/ui/app/store/actionConstants.js +++ b/ui/store/actionConstants.js @@ -29,7 +29,6 @@ export const HIDE_WARNING = 'HIDE_WARNING'; export const SHOW_ACCOUNT_DETAIL = 'SHOW_ACCOUNT_DETAIL'; export const SHOW_ACCOUNTS_PAGE = 'SHOW_ACCOUNTS_PAGE'; export const SHOW_CONF_TX_PAGE = 'SHOW_CONF_TX_PAGE'; -export const SET_CURRENT_FIAT = 'SET_CURRENT_FIAT'; // account detail screen export const SHOW_SEND_TOKEN_PAGE = 'SHOW_SEND_TOKEN_PAGE'; export const SHOW_PRIVATE_KEY = 'SHOW_PRIVATE_KEY'; @@ -72,6 +71,7 @@ export const BUY_ETH = 'BUY_ETH'; export const TOGGLE_ACCOUNT_MENU = 'TOGGLE_ACCOUNT_MENU'; +// preferences export const SET_USE_BLOCKIE = 'SET_USE_BLOCKIE'; export const SET_USE_NONCEFIELD = 'SET_USE_NONCEFIELD'; export const UPDATE_CUSTOM_NONCE = 'UPDATE_CUSTOM_NONCE'; diff --git a/ui/app/store/actionConstants.test.js b/ui/store/actionConstants.test.js similarity index 96% rename from ui/app/store/actionConstants.test.js rename to ui/store/actionConstants.test.js index 306704aea..7cfef827f 100644 --- a/ui/app/store/actionConstants.test.js +++ b/ui/store/actionConstants.test.js @@ -1,6 +1,6 @@ import freeze from 'deep-freeze-strict'; import reducers from '../ducks'; -import { NETWORK_TYPE_RPC } from '../../../shared/constants/network'; +import { NETWORK_TYPE_RPC } from '../../shared/constants/network'; import * as actionConstants from './actionConstants'; describe('Redux actionConstants', () => { diff --git a/ui/app/store/actions.js b/ui/store/actions.js similarity index 97% rename from ui/app/store/actions.js rename to ui/store/actions.js index cbd90fe84..d701d20ad 100644 --- a/ui/app/store/actions.js +++ b/ui/store/actions.js @@ -2,31 +2,28 @@ import abi from 'human-standard-token-abi'; import pify from 'pify'; import log from 'loglevel'; import { capitalize } from 'lodash'; -import getBuyEthUrl from '../../../app/scripts/lib/buy-eth-url'; +import getBuyEthUrl from '../../app/scripts/lib/buy-eth-url'; import { calcTokenBalance, estimateGasForSend } from '../pages/send/send.utils'; import { fetchLocale, loadRelativeTimeFormatLocaleData, } from '../helpers/utils/i18n-helper'; import { getMethodDataAsync } from '../helpers/utils/transactions.util'; -import { fetchSymbolAndDecimals } from '../helpers/utils/token-util'; +import { getSymbolAndDecimals } from '../helpers/utils/token-util'; import switchDirection from '../helpers/utils/switch-direction'; -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../shared/constants/app'; +import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../shared/constants/app'; import { hasUnconfirmedTransactions } from '../helpers/utils/confirm-tx.util'; import { setCustomGasLimit } from '../ducks/gas/gas.duck'; -import txHelper from '../../lib/tx-helper'; -import { - getEnvironmentType, - addHexPrefix, -} from '../../../app/scripts/lib/util'; +import txHelper from '../helpers/utils/tx-helper'; +import { getEnvironmentType, addHexPrefix } from '../../app/scripts/lib/util'; import { getPermittedAccountsForCurrentTab, getSelectedAddress, } from '../selectors'; import { switchedToUnconnectedAccount } from '../ducks/alerts/unconnected-account'; import { getUnconnectedAccountAlertEnabledness } from '../ducks/metamask/metamask'; -import { LISTED_CONTRACT_ADDRESSES } from '../../../shared/constants/tokens'; -import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; +import { LISTED_CONTRACT_ADDRESSES } from '../../shared/constants/tokens'; +import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; import * as actionConstants from './actionConstants'; let background = null; @@ -473,25 +470,16 @@ export function setCurrentCurrency(currencyCode) { return async (dispatch) => { dispatch(showLoadingIndication()); log.debug(`background.setCurrentCurrency`); - let data; try { - data = await promisifiedBackground.setCurrentCurrency(currencyCode); + await promisifiedBackground.setCurrentCurrency(currencyCode); + await forceUpdateMetamaskState(dispatch); } catch (error) { - log.error(error.stack); + log.error(error); dispatch(displayWarning(error.message)); return; } finally { dispatch(hideLoadingIndication()); } - - dispatch({ - type: actionConstants.SET_CURRENT_FIAT, - value: { - currentCurrency: data.currentCurrency, - conversionRate: data.conversionRate, - conversionDate: data.conversionDate, - }, - }); }; } @@ -2050,8 +2038,9 @@ export function updatePreferences(value) { } export function setDefaultHomeActiveTabName(value) { - return async () => { + return async (dispatch) => { await promisifiedBackground.setDefaultHomeActiveTabName(value); + await forceUpdateMetamaskState(dispatch); }; } @@ -2262,7 +2251,7 @@ export function setPendingTokens(pendingTokens) { const { customToken = {}, selectedTokens = {} } = pendingTokens; const { address, symbol, decimals } = customToken; const tokens = - address && symbol && decimals + address && symbol && decimals >= 0 <= 36 ? { ...selectedTokens, [address]: { @@ -2563,6 +2552,14 @@ export function setLastActiveTime() { }; } +export function setDismissSeedBackUpReminder(value) { + return async (dispatch) => { + dispatch(showLoadingIndication()); + await promisifiedBackground.setDismissSeedBackUpReminder(value); + dispatch(hideLoadingIndication()); + }; +} + export function setConnectedStatusPopoverHasBeenShown() { return () => { background.setConnectedStatusPopoverHasBeenShown((err) => { @@ -2656,12 +2653,10 @@ export function getTokenParams(tokenAddress) { dispatch(loadingTokenParamsStarted()); log.debug(`loadingTokenParams`); - return fetchSymbolAndDecimals(tokenAddress, existingTokens).then( - ({ symbol, decimals }) => { - dispatch(addToken(tokenAddress, symbol, Number(decimals))); - dispatch(loadingTokenParamsFinished()); - }, - ); + return getSymbolAndDecimals(tokenAddress).then(({ symbol, decimals }) => { + dispatch(addToken(tokenAddress, symbol, Number(decimals))); + dispatch(loadingTokenParamsFinished()); + }); }; } @@ -2845,12 +2840,20 @@ export function getCurrentWindowTab() { }; } +export function setLedgerLivePreference(value) { + return async (dispatch) => { + dispatch(showLoadingIndication()); + await promisifiedBackground.setLedgerLivePreference(value); + dispatch(hideLoadingIndication()); + }; +} + // MetaMetrics /** - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPagePayload} MetaMetricsPagePayload - * @typedef {import('../../../shared/constants/metametrics').MetaMetricsPageOptions} MetaMetricsPageOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventPayload} MetaMetricsEventPayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsEventOptions} MetaMetricsEventOptions + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPagePayload} MetaMetricsPagePayload + * @typedef {import('../../shared/constants/metametrics').MetaMetricsPageOptions} MetaMetricsPageOptions */ /** diff --git a/ui/app/store/actions.test.js b/ui/store/actions.test.js similarity index 98% rename from ui/app/store/actions.test.js rename to ui/store/actions.test.js index d3281701e..73975843d 100644 --- a/ui/app/store/actions.test.js +++ b/ui/store/actions.test.js @@ -2,9 +2,9 @@ import sinon from 'sinon'; import configureStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import EthQuery from 'eth-query'; -import enLocale from '../../../app/_locales/en/messages.json'; -import MetaMaskController from '../../../app/scripts/metamask-controller'; -import { TRANSACTION_STATUSES } from '../../../shared/constants/transaction'; +import enLocale from '../../app/_locales/en/messages.json'; +import MetaMaskController from '../../app/scripts/metamask-controller'; +import { TRANSACTION_STATUSES } from '../../shared/constants/transaction'; import * as actions from './actions'; const middleware = [thunk]; @@ -618,28 +618,18 @@ describe('Actions', () => { it('calls setCurrentCurrency', async () => { const store = mockStore(); - const setCurrentCurrency = background.setCurrentCurrency.callsFake( - (_, cb) => - cb(null, { - currentCurrency: 'currency', - conversionRate: 100, - conversionDate: 1611839083653, - }), - ); - + background.setCurrentCurrency = sinon.stub().callsFake((_, cb) => cb()); actions._setBackgroundConnection(background); await store.dispatch(actions.setCurrentCurrency('jpy')); - expect(setCurrentCurrency.callCount).toStrictEqual(1); + expect(background.setCurrentCurrency.callCount).toStrictEqual(1); }); it('throws if setCurrentCurrency throws', async () => { const store = mockStore(); - - background.setCurrentCurrency.callsFake((_, cb) => - cb(new Error('error')), - ); - + background.setCurrentCurrency = sinon + .stub() + .callsFake((_, cb) => cb(new Error('error'))); actions._setBackgroundConnection(background); const expectedActions = [ diff --git a/ui/app/store/store.js b/ui/store/store.js similarity index 100% rename from ui/app/store/store.js rename to ui/store/store.js diff --git a/yarn.lock b/yarn.lock index c40f5432a..2d0438f7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2538,11 +2538,12 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@lavamoat/allow-scripts@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@lavamoat/allow-scripts/-/allow-scripts-1.0.4.tgz#1804c552c40e522ad5210879181869030737321a" - integrity sha512-720ZQn/PGI1kOvO51I4bTknX3jhztbuytHSHh4i9D4fAqz4NHW14vLR6xbvyk8gh+QtbmsLloeulrA81+if1bw== +"@lavamoat/allow-scripts@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@lavamoat/allow-scripts/-/allow-scripts-1.0.6.tgz#fbdf7c35a5c2c2cff05ba002b7bc8f3355bda22c" + integrity sha512-bBUN2xuQEXWmWTJrfkwaM8Ige7TNfTTRodyW353VYnzX7kW866Tm/Ag0hdbukFvJfNjRHabVmLKxYYL8l/uyZQ== dependencies: + "@lavamoat/preinstall-always-fail" "^1.0.0" "@npmcli/run-script" "^1.8.1" "@yarnpkg/lockfile" "^1.1.0" npm-logical-tree "^1.2.1" @@ -2619,7 +2620,17 @@ prop-types "^15.7.2" react-is "^16.8.0" -"@metamask/contract-metadata@^1.19.0", "@metamask/contract-metadata@^1.22.0", "@metamask/contract-metadata@^1.23.0": +"@metamask/auto-changelog@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@metamask/auto-changelog/-/auto-changelog-2.1.0.tgz#5cb546f05b07695476d9489540b8d2744d350eda" + integrity sha512-FO1NsgcrHQY6CWlD9wFEWgmxWgam1GqtfFGiRH7lp4aYSGn/43ktBMkZ/rF0//7XvUDXn27nC2CClRUBCrg8Jg== + dependencies: + cross-spawn "^7.0.3" + diff "^5.0.0" + semver "^7.3.5" + yargs "^17.0.1" + +"@metamask/contract-metadata@^1.19.0", "@metamask/contract-metadata@^1.22.0", "@metamask/contract-metadata@^1.25.0": version "1.25.0" resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.25.0.tgz#442ace91fb40165310764b68d8096d0017bb0492" integrity sha512-yhmYB9CQPv0dckNcPoWDcgtrdUp0OgK0uvkRE5QIBv4b3qENI1/03BztvK2ijbTuMlORUpjPq7/1MQDUPoRPVw== @@ -2652,20 +2663,20 @@ web3 "^0.20.7" web3-provider-engine "^16.0.1" -"@metamask/controllers@^6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-6.2.1.tgz#b7ca32011c814a3f629911cf455f02c609336dbf" - integrity sha512-ASysK0IJ/bBvI/C9htaupKYapN+Me7AkbR7xS9WTmoWNyf0mhMLvCtwVcYo34xPmzcnuTNA8huyfVHanEa1rXw== +"@metamask/controllers@^9.0.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-9.1.0.tgz#4434f22eba2522889224b35aa08bc7b67d7248b7" + integrity sha512-jn/F0BNbaPsgEevHaPqk0lGAONKom4re1a4yBC67h7Vu6yu26CRi30SJl4xIh3IW4+ySbPhVLaiXFiXr3fESRQ== dependencies: - "@metamask/contract-metadata" "^1.23.0" + "@metamask/contract-metadata" "^1.25.0" "@types/uuid" "^8.3.0" async-mutex "^0.2.6" babel-runtime "^6.26.0" eth-ens-namehash "^2.0.8" eth-json-rpc-infura "^5.1.0" - eth-keyring-controller "^6.1.0" + eth-keyring-controller "^6.2.1" eth-method-registry "1.1.0" - eth-phishing-detect "^1.1.13" + eth-phishing-detect "^1.1.14" eth-query "^2.1.2" eth-rpc-errors "^4.0.0" eth-sig-util "^3.0.0" @@ -2679,6 +2690,7 @@ isomorphic-fetch "^3.0.0" jsonschema "^1.2.4" nanoid "^3.1.12" + punycode "^2.1.1" single-call-balance-checker-abi "^1.0.0" uuid "^8.3.2" web3 "^0.20.7" @@ -2704,14 +2716,14 @@ resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-6.0.0.tgz#ec53e8ab278073e882411ed89705bc7d06b78c81" integrity sha512-LyakGYGwM8UQOGhwWa+5erAI1hXuiTgf/y7USzOomX6H9KiuY09IAUYnPh7ToPG2sedD2F48UF1bUm8yvCoZOw== -"@metamask/eth-ledger-bridge-keyring@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.3.0.tgz#4fc2a6345199e18f94c098d8c632d3d55add5c36" - integrity sha512-Iv9fmxPClBohIK6ciy0ZVYNTUodlmrdQt19cZDAicSfFdR2Gcgbq2FDA75o63+fW8TwPEohhDRV/vWQ0MU5esw== +"@metamask/eth-ledger-bridge-keyring@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@metamask/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.5.0.tgz#c1ee89819c493239290a940da6285e6844240383" + integrity sha512-p7dvnAQ6n9AFf7JoJFwNsdIKoX5poP0bBwrgmCA/mLAdb5Z+bBAnHMSbKOZrH7rEsj7jExdbmUiJLI5qKnV0zA== dependencies: - eth-sig-util "^1.4.2" + eth-sig-util "^2.0.0" ethereumjs-tx "^1.3.4" - ethereumjs-util "^5.1.5" + ethereumjs-util "^7.0.9" events "^2.0.0" hdkey "0.8.0" @@ -2728,30 +2740,16 @@ human-standard-token-abi "^1.0.2" safe-event-emitter "^1.0.1" -"@metamask/etherscan-link@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.0.0.tgz#89035736515a39532ba1142d87b9a8c2b4f920f1" - integrity sha512-/YS32hS2UTTxs0KyUmAgaDj1w4dzAvOrT+p4TJtpICeH3E/k51r2FO0Or7WJJI/mpzTqNKgcH5yyS2oCtupGiA== +"@metamask/etherscan-link@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@metamask/etherscan-link/-/etherscan-link-2.1.0.tgz#c0be8e68445b7b83cf85bcc03a56cdf8e256c973" + integrity sha512-ADuWlTUkFfN2vXlz81Bg/0BA+XRor+CdK1055p6k7H6BLIPoDKn9SBOFld9haQFuR9cKh/JYHcnlSIv5R4fUEw== "@metamask/forwarder@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@metamask/forwarder/-/forwarder-1.1.0.tgz#13829d8244bbf19ea658c0b20d21a77b67de0bdd" integrity sha512-Hggj4y0QIjDzKGTXzarhEPIQyFSB2bi2y6YLJNwaT4JmP30UB5Cj6gqoY0M4pj3QT57fzp0BUuGp7F/AUe28tw== -"@metamask/inpage-provider@^8.0.4": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@metamask/inpage-provider/-/inpage-provider-8.0.4.tgz#6534fbdba4445a3aff639e32db66bb0ab5f0cd79" - integrity sha512-jdI0gVWW/0wQvKZe6shXl70cU+vIb8GpAimKFU4udc/HKtgp8tLd21ezq74RaMP/lHR+qq0coOQ2KnOnl8iNNg== - dependencies: - "@metamask/object-multiplex" "^1.1.0" - "@metamask/safe-event-emitter" "^2.0.0" - eth-rpc-errors "^4.0.2" - 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" - "@metamask/jazzicon@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/jazzicon/-/jazzicon-2.0.0.tgz#5615528e91c0fc5c9d79202d1f0954a7922525a0" @@ -2786,6 +2784,31 @@ readable-stream "^2.2.2" through2 "^2.0.3" +"@metamask/post-message-stream@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@metamask/post-message-stream/-/post-message-stream-4.0.0.tgz#72f120e562346ca86ccc9b3684023ad44265f0df" + integrity sha512-r0JcoWXNuHycProx8ClxiIElJY/GVb/0/WWXTMsZu7qDejLo52VNXlwfydCdVjbMXeoT2nK1Yt3d5gjmHy5BWw== + dependencies: + readable-stream "2.3.3" + +"@metamask/providers@^8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-8.1.1.tgz#7b0dbb54700c949aafba24c9b98e6f4e9d81f325" + integrity sha512-CG1sAuD6Mp4MZ5U90anf1FT0moDbStGXT+80TQFYXJbBeTQjhp321WgC/F2IgIJ3mFqOiByC3MQHLuunEVMQOA== + 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/safe-event-emitter@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" @@ -3655,11 +3678,31 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.0.tgz#7da1c0d44ff1c7eb660a36ec078ea61ba7eb42cb" integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== +"@types/chrome@^0.0.136": + version "0.0.136" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.136.tgz#7c011b9f997b0156f25a140188a0c5689d3f368f" + integrity sha512-XDEiRhLkMd+SB7Iw3ZUIj/fov3wLd4HyTdLltVszkgl1dBfc3Rb7oPMVZ2Mz2TLqnF7Ow+StbR8E7r9lqpb4DA== + dependencies: + "@types/filesystem" "*" + "@types/har-format" "*" + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/filesystem@*": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.30.tgz#a7373a2edf34d13e298baf7ee1101f738b2efb7e" + integrity sha512-NCoRgmGmLpTT9VFL6Bb6z0jQuqI3d0E5FGl7M0JOv/J5RQYo9s5aOItPYnpckx9MbYQk1APLXcF8f20Vqnf2yA== + dependencies: + "@types/filewriter" "*" + +"@types/filewriter@*": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.29.tgz#a48795ecadf957f6c0d10e0c34af86c098fa5bee" + integrity sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ== + "@types/glob-base@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@types/glob-base/-/glob-base-0.3.0.tgz#a581d688347e10e50dd7c17d6f2880a10354319d" @@ -3680,6 +3723,11 @@ dependencies: "@types/node" "*" +"@types/har-format@*": + version "1.2.5" + resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.5.tgz#4f6648814d0fdcb6a510e3364a9db439a753c4b1" + integrity sha512-IG8AE1m2pWtPqQ7wXhFhy6Q59bwwnLwO36v5Rit2FrbXCIp8Sk8E2PfUCreyrdo17STwFSKDAkitVuVYbpEHvQ== + "@types/hast@^2.0.0": version "2.3.1" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.1.tgz#b16872f2a6144c7025f296fb9636a667ebb79cd9" @@ -9056,6 +9104,11 @@ destroy@^1.0.4, destroy@~1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-browser@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.2.0.tgz#c9cd5afa96a6a19fda0bbe9e9be48a6b6e1e9c97" + integrity sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA== + detect-file@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" @@ -9178,6 +9231,11 @@ diff@^4.0.2: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" @@ -10457,20 +10515,6 @@ eth-ens-namehash@^1.0.2: idna-uts46 "^1.0.1" js-sha3 "^0.5.7" -eth-hd-keyring@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/eth-hd-keyring/-/eth-hd-keyring-3.5.0.tgz#3976d83a27b24305481c389178f290d9264e839d" - integrity sha512-Ix1LcWYxHMxCCSIMz+TLXLtt50zF6ZDd/TRVXthdw91IwOk1ajuf7QHg3bCDcfeUpdf9oEpwIPbL3xjDqEEjYw== - dependencies: - bip39 "^2.2.0" - eth-sig-util "^2.4.4" - eth-simple-keyring "^3.5.0" - ethereumjs-abi "^0.6.5" - ethereumjs-util "^5.1.1" - ethereumjs-wallet "^0.6.0" - events "^1.1.1" - xtend "^4.0.1" - 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" @@ -10551,25 +10595,10 @@ eth-json-rpc-middleware@^6.0.0: pify "^3.0.0" safe-event-emitter "^1.0.1" -eth-keyring-controller@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/eth-keyring-controller/-/eth-keyring-controller-6.1.0.tgz#dc9313d0b793e085dc1badf84dd4f5e3004e127e" - integrity sha512-wPxH++98VDBcDv9YkPzxhZC0gF1ixuRbyKR2u/NOT/roBpNQDe4reqyllBRC7jhPehiKnRxzf7r6HEyirRnPxQ== - dependencies: - bip39 "^2.4.0" - bluebird "^3.5.0" - browser-passworder "^2.0.3" - eth-hd-keyring "^3.5.0" - eth-sig-util "^1.4.0" - eth-simple-keyring "^3.5.0" - ethereumjs-util "^5.1.2" - loglevel "^1.5.0" - obs-store "^4.0.3" - -eth-keyring-controller@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/eth-keyring-controller/-/eth-keyring-controller-6.2.0.tgz#c649e7ced9bc9a11c2a6ab48234fae212569d390" - integrity sha512-UYYs+hTgrJNqy7xkI56QpekfsPuZw4kLxrFEUkHefCkBv9poSg/Abx4rvBsRwcj7yxXcxfgTNtoltJfR2we4uw== +eth-keyring-controller@^6.1.0, 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: bip39 "^2.4.0" bluebird "^3.5.0" @@ -10646,7 +10675,7 @@ eth-rpc-errors@^4.0.0, eth-rpc-errors@^4.0.2: dependencies: fast-safe-stringify "^2.0.6" -eth-sig-util@^1.4.0, eth-sig-util@^1.4.2: +eth-sig-util@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= @@ -10654,7 +10683,7 @@ eth-sig-util@^1.4.0, eth-sig-util@^1.4.2: ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" ethereumjs-util "^5.1.1" -eth-sig-util@^2.0.0, eth-sig-util@^2.4.4, eth-sig-util@^2.5.0: +eth-sig-util@^2.0.0: version "2.5.4" resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== @@ -10674,18 +10703,6 @@ eth-sig-util@^3.0.0, eth-sig-util@^3.0.1: tweetnacl "^1.0.3" tweetnacl-util "^0.15.0" -eth-simple-keyring@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/eth-simple-keyring/-/eth-simple-keyring-3.5.0.tgz#c7fa285ca58d31ef44bc7db678b689f9ffd7b453" - integrity sha512-z9IPt9aoMWAw5Zc3Jk/HKbWPJNc7ivZ5ECNtl3ZoQUGRnwoWO71W5+liVPJtXFNacGOOGsBfqTqrXL9C4EnYYQ== - dependencies: - eth-sig-util "^2.5.0" - ethereumjs-abi "^0.6.5" - ethereumjs-util "^5.1.1" - ethereumjs-wallet "^0.6.0" - events "^1.1.1" - xtend "^4.0.1" - eth-simple-keyring@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/eth-simple-keyring/-/eth-simple-keyring-4.2.0.tgz#c197a4bd4cce7d701b5f3607d0b843112ddb17e3" @@ -10776,7 +10793,7 @@ ethereum-ens-network-map@^1.0.0, ethereum-ens-network-map@^1.0.2: resolved "https://registry.yarnpkg.com/ethereum-ens-network-map/-/ethereum-ens-network-map-1.0.2.tgz#4e27bad18dae7bd95d84edbcac2c9e739fc959b9" integrity sha512-5qwJ5n3YhjSpE6O/WEBXCAb2nagUgyagJ6C0lGUBWC4LjKp/rRzD+pwtDJ6KCiITFEAoX4eIrWOjRy0Sylq5Hg== -ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.4, ethereumjs-abi@^0.6.5, ethereumjs-abi@^0.6.8: +ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.4, ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== @@ -10899,19 +10916,7 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^7.0.2: - version "7.0.8" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.8.tgz#5258762b7b17e3d828e41834948363ff0a703ffd" - integrity sha512-JJt7tDpCAmDPw/sGoFYeq0guOVqT3pTE9xlEbBmc/nlCij3JRCoS2c96SQ6kXVHOT3xWUNLDm5QCJLQaUnVAtQ== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.4" - -ethereumjs-util@^7.0.9: +ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.9: version "7.0.9" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.9.tgz#2038baeb30f370a3e576ec175bd70bbbb6807d42" integrity sha512-cRqvYYKJoitq6vMKMf8pXeVwvTrX+dRD0JwHaYqm8jvogK14tqIoCWH/KUHcRwnVxVXEYF/o6pup5jRG4V0xzg== @@ -10974,7 +10979,7 @@ ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: rustbn.js "~0.2.0" safe-buffer "^5.1.1" -ethereumjs-wallet@0.6.5, ethereumjs-wallet@^0.6.0, ethereumjs-wallet@^0.6.4: +ethereumjs-wallet@0.6.5, ethereumjs-wallet@^0.6.4: version "0.6.5" resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== @@ -11500,6 +11505,13 @@ extension-port-stream@^2.0.0: resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-2.0.0.tgz#c52da241eef4643171b7c6d696baa4a3453c5a9a" integrity sha512-7ju8jisPXY8w8UiUczF61hRN6bpx/YTZYU9J901GnEqu7vQnweMAwS30k+SgXCcY9S38Zno+fhuu1iaxd+0swg== +extension-port-stream@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-2.0.1.tgz#d374820c581418c2275d3c4439ade0b82c4cfac6" + integrity sha512-ltrv4Dh/979I04+D4Te6TFygfRSOc5EBzzlHRldWMS8v73V80qWluxH88hqF0qyUsBXTb8NmzlmSipcre6a+rg== + dependencies: + webextension-polyfill-ts "^0.22.0" + extensionizer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/extensionizer/-/extensionizer-1.0.1.tgz#504544239a7610ba8404b15c1832091a37768d09" @@ -11719,9 +11731,9 @@ fetch-ponyfill@^4.0.0: node-fetch "~1.7.1" figgy-pudding@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" - integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== + version "3.5.2" + 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" @@ -13474,6 +13486,13 @@ history@^4.9.0: tiny-warning "^1.0.0" value-equal "^1.0.1" +history@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/history/-/history-5.0.0.tgz#0cabbb6c4bbf835addb874f8259f6d25101efd08" + integrity sha512-3NyRMKIiFSJmIPdq7FxkNMJkQ7ZEtVblOQ38VtKaA0zZMW1Eo6Q6W8oDKEflr1kNNTItSnk4JMCO1deeSgbLLg== + dependencies: + "@babel/runtime" "^7.7.6" + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -13516,9 +13535,9 @@ homedir-polyfill@^1.0.1: parse-passwd "^1.0.0" hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - integrity sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg== + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== html-element-map@^1.0.0: version "1.2.0" @@ -20694,13 +20713,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -post-message-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/post-message-stream/-/post-message-stream-3.0.0.tgz#90d9f54bd209e6b6f5d74795b87588205b547048" - integrity sha1-kNn1S9IJ5rb110eVuHWIIFtUcEg= - dependencies: - readable-stream "^2.1.4" - postcss-flexbugs-fixes@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.1.0.tgz#e094a9df1783e2200b7b19f875dcad3b3aff8b20" @@ -21021,7 +21033,7 @@ probe-image-size@5.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, 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" integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= @@ -22242,7 +22254,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.3, readable-stream@~2.3.5, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.3, readable-stream@~2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -22274,6 +22286,19 @@ readable-stream@1.1.x, readable-stream@^1.0.33: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + integrity sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + readable-stream@~1.0.15: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -24229,9 +24254,9 @@ sshpk@^1.7.0: tweetnacl "~0.14.0" ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + version "6.0.2" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" + integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== dependencies: figgy-pudding "^3.5.1" @@ -24592,6 +24617,13 @@ string_decoder@^1.0.0, string_decoder@^1.1.1: dependencies: safe-buffer "~5.1.0" +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + integrity sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ== + dependencies: + safe-buffer "~5.1.0" + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -26271,12 +26303,7 @@ uuid@^3.1.0, uuid@^3.2.1, uuid@^3.2.2, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== -uuid@^8.0.0: - version "8.3.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" - integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== - -uuid@^8.3.0, uuid@^8.3.2: +uuid@^8.0.0, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -26868,6 +26895,25 @@ web3@^0.20.7: version "0.1.1" resolved "https://codeload.github.com/dignifiedquire/webcrypto-shim/tar.gz/190bc9ec341375df6025b17ae12ddb2428ea49c8" +webextension-polyfill-ts@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.22.0.tgz#86cfd7bab4d9d779d98c8340983f4b691b2343f3" + integrity sha512-3P33ClMwZ/qiAT7UH1ROrkRC1KM78umlnPpRhdC/292UyoTTW9NcjJEqDsv83HbibcTB6qCtpVeuB2q2/oniHQ== + dependencies: + webextension-polyfill "^0.7.0" + +webextension-polyfill-ts@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill-ts/-/webextension-polyfill-ts-0.25.0.tgz#fff041626365dbd0e29c40b197e989a55ec221ca" + integrity sha512-ikQhwwHYkpBu00pFaUzIKY26I6L87DeRI+Q6jBT1daZUNuu8dSrg5U9l/ZbqdaQ1M/TTSPKeAa3kolP5liuedw== + dependencies: + webextension-polyfill "^0.7.0" + +webextension-polyfill@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.7.0.tgz#0df1120ff0266056319ce1a622b09ad8d4a56505" + integrity sha512-su48BkMLxqzTTvPSE1eWxKToPS2Tv5DLGxKexLEVpwFd6Po6N8hhSLIvG6acPAg7qERoEaDL+Y5HQJeJeml5Aw== + webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -27535,6 +27581,19 @@ yargs@^16.0.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"