diff --git a/.circleci/config.yml b/.circleci/config.yml index 3313db7f8..973ee001a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -304,7 +304,7 @@ jobs: steps: - run: name: Validate changelog - command: yarn auto-changelog validate + command: yarn lint:changelog - when: condition: matches: @@ -313,7 +313,7 @@ jobs: steps: - run: name: Validate release candidate changelog - command: yarn auto-changelog validate --rc + command: yarn lint:changelog:rc test-deps-audit: diff --git a/.eslintrc.js b/.eslintrc.js index d3763fdef..b6094c794 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -166,6 +166,16 @@ module.exports = { sourceType: 'script', }, }, + { + files: [ + 'app/scripts/lockdown-run.js', + 'test/unit-global/protect-intrinsics.test.js', + ], + globals: { + harden: 'readonly', + Compartment: 'readonly', + }, + }, ], settings: { diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 9bef72a01..b97bb8247 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -22,6 +22,6 @@ jobs: url-to-cladocument: 'https://metamask.io/cla.html' # This branch can't have protections, commits are made directly to the specified branch. branch: 'cla-signatures' - allowlist: 'dependabot[bot],metamaskbot,muji' + allowlist: 'dependabot[bot],metamaskbot' allow-organization-members: true blockchain-storage-flag: false diff --git a/.storybook/images/UNI.png b/.storybook/images/UNI.png new file mode 100644 index 000000000..01ffcf726 Binary files /dev/null and b/.storybook/images/UNI.png differ diff --git a/.storybook/initial-states/approval-screens/add-suggested-token.js b/.storybook/initial-states/approval-screens/add-suggested-token.js new file mode 100644 index 000000000..0b623e3f7 --- /dev/null +++ b/.storybook/initial-states/approval-screens/add-suggested-token.js @@ -0,0 +1,65 @@ +export const suggestedTokens = { + "0x6b175474e89094c44da98b954eedeac495271d0f": { + "address": "0x6b175474e89094c44da98b954eedeac495271d0f", + "symbol": "META", + "decimals": 18, + "image": "metamark.svg", + "unlisted": false + }, + "0xB8c77482e45F1F44dE1745F52C74426C631bDD52": { + "address": "0xB8c77482e45F1F44dE1745F52C74426C631bDD52", + "symbol": "0X", + "decimals": 18, + "image": "0x.svg", + "unlisted": false + }, + "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984": { + "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", + "symbol": "AST", + "decimals": 18, + "image": "ast.png", + "unlisted": false + }, + "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2": { + "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", + "symbol": "BAT", + "decimals": 18, + "image": "BAT_icon.svg", + "unlisted": false + }, + "0xe83cccfabd4ed148903bf36d4283ee7c8b3494d1": { + "address": "0xe83cccfabd4ed148903bf36d4283ee7c8b3494d1", + "symbol": "CVL", + "decimals": 18, + "image": "CVL_token.svg", + "unlisted": false + }, + "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e": { + "address": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e", + "symbol": "GLA", + "decimals": 18, + "image": "gladius.svg", + "unlisted": false + }, + "0x467Bccd9d29f223BcE8043b84E8C8B282827790F": { + "address": "0x467Bccd9d29f223BcE8043b84E8C8B282827790F", + "symbol": "GNO", + "decimals": 18, + "image": "gnosis.svg", + "unlisted": false + }, + "0xff20817765cb7f73d4bde2e66e067e58d11095c2": { + "address": "0xff20817765cb7f73d4bde2e66e067e58d11095c2", + "symbol": "OMG", + "decimals": 18, + "image": "omg.jpg", + "unlisted": false + }, + "0x8e870d67f660d95d5be530380d0ec0bd388289e1": { + "address": "0x8e870d67f660d95d5be530380d0ec0bd388289e1", + "symbol": "WED", + "decimals": 18, + "image": "wed.png", + "unlisted": false + }, + } \ No newline at end of file diff --git a/.storybook/initial-states/approval-screens/add-token.js b/.storybook/initial-states/approval-screens/add-token.js new file mode 100644 index 000000000..c5a7699f1 --- /dev/null +++ b/.storybook/initial-states/approval-screens/add-token.js @@ -0,0 +1,56 @@ +export const tokens = { + "0x33f90dee07c6e8b9682dd20f73e6c358b2ed0f03": { + "address": "0x33f90dee07c6e8b9682dd20f73e6c358b2ed0f03", + "symbol": "TRDT", + "decimals": 18, + "unlisted": false + }, + "0x39013f961c378f02c2b82a6e1d31e9812786fd9d": { + "address": "0x39013f961c378f02c2b82a6e1d31e9812786fd9d", + "symbol": "SMS", + "decimals": 18, + "unlisted": false + }, + "0x78b7fada55a64dd895d8c8c35779dd8b67fa8a05": { + "address": "0x78b7fada55a64dd895d8c8c35779dd8b67fa8a05", + "symbol": "ATL", + "decimals": 18, + "unlisted": false + }, + "0xfd8971d5e8e1740ce2d0a84095fca4de729d0c16": { + "address": "0xfd8971d5e8e1740ce2d0a84095fca4de729d0c16", + "symbol": "ZLA", + "decimals": 18, + "unlisted": false + }, + "0xe83cccfabd4ed148903bf36d4283ee7c8b3494d1": { + "address": "0xe83cccfabd4ed148903bf36d4283ee7c8b3494d1", + "symbol": "BTT", + "decimals": 18, + "unlisted": false + }, + "0x7a07e1a0c2514d51132183ecfea2a880ec3b7648": { + "address": "0x7a07e1a0c2514d51132183ecfea2a880ec3b7648", + "symbol": "IXE", + "decimals": 18, + "unlisted": false + }, + "0x467Bccd9d29f223BcE8043b84E8C8B282827790F": { + "address": "0x467Bccd9d29f223BcE8043b84E8C8B282827790F", + "symbol": "TEL", + "decimals": 18, + "unlisted": false + }, + "0xff20817765cb7f73d4bde2e66e067e58d11095c2": { + "address": "0xff20817765cb7f73d4bde2e66e067e58d11095c2", + "symbol": "AMP", + "decimals": 18, + "unlisted": false + }, + "0x15bda08c3afbf5955d6e9b235fd55a1fd0dbc829": { + "address": "0x15bda08c3afbf5955d6e9b235fd55a1fd0dbc829", + "symbol": "APC", + "decimals": 18, + "unlisted": false + }, + } \ No newline at end of file diff --git a/.storybook/test-data.js b/.storybook/test-data.js index eede73242..242a70acb 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -8,7 +8,13 @@ const state = { "unconnectedAccount": { "state": "CLOSED" }, - "activeTab": {}, + "activeTab": { + "id": 113, + "title": "E2E Test Dapp", + "origin": "https://metamask.github.io", + "protocol": "https:", + "url": "https://metamask.github.io/test-dapp/" + }, "metamask": { "networkDetails": { "EIPS": { @@ -34,8 +40,8 @@ const state = { } }, "unapprovedTxs": { - "7786962153682822": { - "id": 7786962153682822, + "3111025347726181": { + "id": 3111025347726181, "time": 1620710815484, "status": "unapproved", "metamaskNetworkId": "3", @@ -43,7 +49,7 @@ const state = { "loadingDefaults": false, "txParams": { "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", - "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "to": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "value": "0x0", "data": "0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000", "gas": "0xcb28", @@ -62,7 +68,7 @@ const state = { "loadingDefaults": true, "txParams": { "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", - "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "to": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "value": "0x0", "data": "0xa9059cbb000000000000000000000000b19ac54efa18cc3a14a5b821bfec73d284bf0c5e0000000000000000000000000000000000000000000000003782dace9d900000", "gas": "0xcb28", @@ -95,11 +101,11 @@ const state = { } }, "contractExchangeRates": { - "0xad6d458402f60fd3bd25163575031acdce07538d": 0 + "0xaD6D458402F60fD3Bd25163575031ACDce07538D": 0 }, "tokens": [ { - "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "address": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "symbol": "DAI", "decimals": 18 } @@ -122,7 +128,7 @@ const state = { "ensResolution": null, "ensResolutionError": "", "token": { - "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "address": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "symbol": "DAI", "decimals": 18 } @@ -259,7 +265,7 @@ const state = { ], "0x3": [ { - "address": "0xad6d458402f60fd3bd25163575031acdce07538d", + "address": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "symbol": "DAI", "decimals": 18 } @@ -274,7 +280,7 @@ const state = { } }, "assetImages": { - "0xad6d458402f60fd3bd25163575031acdce07538d": "./images/logo.png" + "0xaD6D458402F60fD3Bd25163575031ACDce07538D": "./sai.svg" }, "hiddenTokens": [], "suggestedTokens": {}, @@ -547,7 +553,7 @@ const state = { } ], "permissionsHistory": { - "https://app.uniswap.org": { + "https://metamask.github.io": { "eth_accounts": { "lastApproved": 1620710693213, "accounts": { @@ -562,6 +568,12 @@ const state = { "icon": "https://metamask.github.io/test-dapp/metamask-fox.svg", "lastUpdated": 1620723443380, "host": "metamask.github.io" + }, + "https://app.uniswap.org": { + "name": "Uniswap", + "icon": "./UNI.png", + "lastUpdated": 1620723443380, + "host": "app.uniswap.org" } }, "threeBoxSyncingAllowed": false, @@ -652,14 +664,14 @@ const state = { "chainId": "0x3", "loadingDefaults": false, "txParams": { - "from": "0x983211ce699ea5ab57cc528086154b6db1ad8e55", - "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "from": "0x64a845a5b02460acf8a3d84503b0d68d028b4bb4", + "to": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "value": "0x0", "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", "gas": "0xea60", "gasPrice": "0x4a817c800" }, - "type": "standard", + "type": "transfer", "origin": "https://metamask.github.io", "transactionCategory": "approve", "history": [ @@ -672,7 +684,7 @@ const state = { "loadingDefaults": true, "txParams": { "from": "0x983211ce699ea5ab57cc528086154b6db1ad8e55", - "to": "0xad6d458402f60fd3bd25163575031acdce07538d", + "to": "0xaD6D458402F60fD3Bd25163575031ACDce07538D", "value": "0x0", "data": "0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170", "gas": "0xea60", diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 2a19d1ced..6622ee03c 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "አውታረ መረብ አክል" }, - "addRecipient": { - "message": "ተቀባይ አክል" - }, "addSuggestedTokens": { "message": "የተጠቆሙ ተለዋጭ ስሞችን አክል" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 4b7cd7bb7..200cf48a5 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "أضف شبكة" }, - "addRecipient": { - "message": "إضافة مستلم" - }, "addSuggestedTokens": { "message": "أضف العملات الرمزية المقترحة" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 803779b79..6fdc24928 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Добавяне на мрежа" }, - "addRecipient": { - "message": "Добавете получател" - }, "addSuggestedTokens": { "message": "Добавете препоръчани жетони" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index e0d45ad97..58f0a92b5 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "নেটওয়ার্ক যোগ করুন" }, - "addRecipient": { - "message": "প্রাপক যোগ করুন" - }, "addSuggestedTokens": { "message": "প্রস্তাবিত টোকেনগুলি যোগ করুন" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index ab0cbd0a8..b7c5ed7b6 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Afegir Xarxa" }, - "addRecipient": { - "message": "Afegeix un recipient" - }, "addSuggestedTokens": { "message": "Afegir Fitxes Suggerides" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 8a5143637..d41c80913 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Tilføj netværk" }, - "addRecipient": { - "message": "Tilføj modtager" - }, "addSuggestedTokens": { "message": "Tilføj foreslåede tokens" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 116d81b4b..109851fe5 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -35,9 +35,6 @@ "addNetwork": { "message": "Netzwerk hinzufügen" }, - "addRecipient": { - "message": "Empfänger hinzufügen" - }, "addSuggestedTokens": { "message": "Vorgeschlagene Token hinzufügen" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 50edf7795..033aeaa75 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Προσθήκη Δικτύου" }, - "addRecipient": { - "message": "Προσθήκη Παραλήπτη" - }, "addSuggestedTokens": { "message": "Προσθέστε τα Προτεινόμενα Tokens" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 8928ca36e..8e528f42e 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Add Network" }, - "addRecipient": { - "message": "Add Recipient" - }, "addSuggestedTokens": { "message": "Add Suggested Tokens" }, @@ -323,10 +320,10 @@ "message": "Confirm password" }, "confirmSecretBackupPhrase": { - "message": "Confirm your Secret Backup Phrase" + "message": "Confirm your Secret Recovery Phrase" }, "confirmSeedPhrase": { - "message": "Confirm Seed Phrase" + "message": "Confirm Secret Recovery Phrase" }, "confirmed": { "message": "Confirmed" @@ -594,10 +591,10 @@ "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" + "message": "Turn this on to dismiss the Secret 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" + "message": "Dismiss Secret Recovery Phrase backup reminder" }, "domain": { "message": "Domain" @@ -612,7 +609,7 @@ "message": "Download Google Chrome" }, "downloadSecretBackup": { - "message": "Download this Secret Backup Phrase and keep it stored safely on an external encrypted hard drive or storage medium." + "message": "Download this Secret Recovery Phrase and keep it stored safely on an external encrypted hard drive or storage medium." }, "downloadStateLogs": { "message": "Download State Logs" @@ -630,16 +627,16 @@ "message": "How should I choose?" }, "editGasEducationHighExplanation": { - "message": "This is best for swaps or other time sensitive transactions. If a swap takes too long to process it will often fail and you may lose funds." + "message": "This is best for time sensitive transactions (like Swaps) as it increases the likelihood of a successful transaction. If a Swap takes too long to process it may fail and result in losing some of your gas fee." }, "editGasEducationLowExplanation": { - "message": "A lower gas fee should only be selected for transactions where processing time is less important. With a lower fee, it can be hard to predict when (or if) your transaction will be successful." + "message": "A lower gas fee should only be used when processing time is less important. Lower fees make it hard predict when (or if) your transaction will be successful." }, "editGasEducationMediumExplanation": { - "message": "A medium gas fee is good for sending, withdrawing or other non-time sensitive but important transactions." + "message": "A medium gas fee is good for sending, withdrawing or other non-time sensitive transactions. This setting will most often result in a successful transaction." }, "editGasEducationModalIntro": { - "message": "The right gas amount to select depends on the type of transaction and how important it is." + "message": "Selecting the right gas fee depends on the type of transaction and how important it is to you." }, "editGasEducationModalTitle": { "message": "How to choose?" @@ -675,7 +672,7 @@ "message": "Max priority fee is higher than necessary. You may pay more than needed." }, "editGasMaxPriorityFeeLow": { - "message": "Max priority fee extremely low for network conditions" + "message": "Max priority fee is low for current network conditions" }, "editGasMaxPriorityFeeTooltip": { "message": "Max priority fee (aka “miner tip”) goes directly to miners and incentivizes them to prioritize your transaction. You’ll most often pay your max setting" @@ -714,9 +711,8 @@ "editGasTooLowTooltip": { "message": "Your max fee or max priority fee may be low for current market conditions. We don't know when (or if) your transaction will be processed. " }, - "editGasTotalBannerSubtitle": { - "message": "Up to $1 ($2)", - "display": "$1 represents a fiat value" + "editGasTooLowWarningTooltip": { + "message": "This lowers your maximum fee but if network traffic increases your transaction may be delayed or fail." }, "editNonceField": { "message": "Edit Nonce" @@ -1048,6 +1044,9 @@ "importAccount": { "message": "Import Account" }, + "importAccountError": { + "message": "Error importing account." + }, "importAccountLinkText": { "message": "import using Secret Recovery Phrase" }, @@ -1221,7 +1220,7 @@ }, "makeSureNoOneWatching": { "message": "Make sure no one is watching your screen", - "description": "Warning to users to be care while creating and saving their new seed phrase" + "description": "Warning to users to be care while creating and saving their new Secret Recovery Phrase" }, "max": { "message": "Max" @@ -1774,13 +1773,13 @@ "message": "Search Tokens" }, "secretBackupPhrase": { - "message": "Secret Backup Phrase" + "message": "Secret Recovery Phrase" }, "secretBackupPhraseDescription": { - "message": "Your secret backup phrase makes it easy to back up and restore your account." + "message": "Your Secret Recovery Phrase makes it easy to back up and restore your account." }, "secretBackupPhraseWarning": { - "message": "WARNING: Never disclose your backup phrase. Anyone with this phrase can take your Ether forever." + "message": "WARNING: Never disclose your Secret Recovery Phrase. Anyone with this phrase can take your Ether forever." }, "secretPhrase": { "message": "Enter your secret phrase here to restore your vault." @@ -1813,28 +1812,28 @@ "message": "Store in a bank vault." }, "seedPhraseIntroSidebarCopyOne": { - "message": "Your recovery phrase is the “master key” to your wallet and funds." + "message": "Your Secret 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." + "message": "If someone asks for your Secret Recovery Phrase, they are most likely trying to scam you." }, "seedPhraseIntroSidebarCopyTwo": { - "message": "Never, ever share your recovery phrase, even with MetaMask!" + "message": "Never, ever share your Secret Recovery Phrase, even with MetaMask!" }, "seedPhraseIntroSidebarTitleOne": { - "message": "What is a recovery phrase?" + "message": "What is a Secret Recovery Phrase?" }, "seedPhraseIntroSidebarTitleThree": { - "message": "Should I share my recovery phrase?" + "message": "Should I share my Secret Recovery Phrase?" }, "seedPhraseIntroSidebarTitleTwo": { - "message": "How do I save my recovery phrase?" + "message": "How do I save my Secret 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." + "message": "Before getting started, watch this short video to learn about your Secret Recovery Phrase and how to keep your wallet safe." }, "seedPhrasePlaceholder": { "message": "Separate each word with a single space" @@ -1898,6 +1897,9 @@ "message": "Send $1", "description": "Symbol of the specified token" }, + "sendTo": { + "message": "Send to" + }, "sendTokens": { "message": "Send Tokens" }, @@ -1956,7 +1958,7 @@ "message": "Sign" }, "signNotice": { - "message": "Signing this message can have \ndangerous side effects. Only sign messages from \nsites you fully trust with your entire account.\n This dangerous method will be removed in a future version. " + "message": "We are unable to predict the result of this signature. This signature could potentially perform any operation on your account's behalf, including granting complete control of your account and all of its assets to the requesting site. Only sign this message if you know what you're doing or completely trust the requesting site." }, "signatureRequest": { "message": "Signature Request" @@ -2416,6 +2418,9 @@ "symbolBetweenZeroTwelve": { "message": "Symbol must be 11 characters or fewer." }, + "syncFailed": { + "message": "Sync failed" + }, "syncInProgress": { "message": "Sync in progress" }, @@ -2510,9 +2515,8 @@ "transactionCreated": { "message": "Transaction created with a value of $1 at $2." }, - "transactionDetailDappGasHeading": { - "message": "$1 suggested gas fee", - "description": "$1 represents a dapp origin" + "transactionDetailDappGasMoreInfo": { + "message": "Site suggested" }, "transactionDetailDappGasTooltip": { "message": "Edit to use MetaMask's recommended gas fee based on the latest block." @@ -2527,7 +2531,7 @@ "message": "Gas fees are set by the network and fluctuate based on network traffic and transaction complexity." }, "transactionDetailGasTooltipIntro": { - "message": "Gas fees are paid to crypto miners who process transactions on the Ethereum network. MetaMask does not profit from gas fees." + "message": "Gas fees are paid to crypto miners who process transactions on the $1 network. MetaMask does not profit from gas fees." }, "transactionDetailGasTotalSubtitle": { "message": "Amount + gas fee" diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 33fb6d0e5..50cab00ed 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Agregar red" }, - "addRecipient": { - "message": "Agregar destinatario" - }, "addSuggestedTokens": { "message": "Agregar tokens sugeridos" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 33fb6d0e5..50cab00ed 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Agregar red" }, - "addRecipient": { - "message": "Agregar destinatario" - }, "addSuggestedTokens": { "message": "Agregar tokens sugeridos" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index 58d69b71e..c85dc3a29 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Lisage võrk" }, - "addRecipient": { - "message": "Lisa saaja" - }, "addSuggestedTokens": { "message": "Lisa soovitatud lube" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 3d95df38b..4c09d9770 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "اضافه شبکه" }, - "addRecipient": { - "message": "اضافه کردن دریافت کننده" - }, "addSuggestedTokens": { "message": "اضافه رمزیاب های پیشنهاد شده" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index 9df9c20d5..41aeff611 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Lisää verkko" }, - "addRecipient": { - "message": "Lisää vastaanottaja" - }, "addSuggestedTokens": { "message": "Lisää ehdotetut käyttötunnukset" }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 91c808bfc..809d4ac43 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -35,9 +35,6 @@ "addNetwork": { "message": "Magdagdag ng Network" }, - "addRecipient": { - "message": "Magdagdag ng Recipient" - }, "addSuggestedTokens": { "message": "Magdagdag ng Mga Iminungkahing Token" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 2f8e52fed..fefa18ca1 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Ajouter un réseau" }, - "addRecipient": { - "message": "Ajouter destinataire" - }, "addSuggestedTokens": { "message": "Ajouter les jetons suggérés" }, @@ -657,7 +654,7 @@ "message": "de" }, "off": { - "message": "Déconnecté" + "message": "Désactivé" }, "on": { "message": "Activé" diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index a0d2e9686..14761f635 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "הוסף/י רשת" }, - "addRecipient": { - "message": "הוסף נמען" - }, "addSuggestedTokens": { "message": "הוסף/י אסימונים מוצעים" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 31736f438..b94ffe20d 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "नेटवर्क जोड़ें" }, - "addRecipient": { - "message": "प्राप्तकर्ता को जोड़ें" - }, "addSuggestedTokens": { "message": "सुझाए गए टोकन जोड़ें" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 44ca7e1db..ca55da6c5 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Dodaj mrežu" }, - "addRecipient": { - "message": "Dodaj primatelja" - }, "addSuggestedTokens": { "message": "Dodaj predložene tokene" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index f7ea54d5b..ecee8c255 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Hálózat hozzáadása" }, - "addRecipient": { - "message": "Címzett hozzáadása" - }, "addSuggestedTokens": { "message": "Javasolt tokenek hozzáadása" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 0c1b5a0c8..1179db5e1 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Tambahkan Jaringan" }, - "addRecipient": { - "message": "Tambahkan Penerima" - }, "addSuggestedTokens": { "message": "Tambahkan Token yang Disarankan" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index f3923d480..7ff83f0ed 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -52,9 +52,6 @@ "addNetwork": { "message": "Aggiungi Rete" }, - "addRecipient": { - "message": "Aggiungi destinatario" - }, "addSuggestedTokens": { "message": "Aggiungi Token Suggeriti" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index bc3b961d2..45b023b4c 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "ネットワークの追加" }, - "addRecipient": { - "message": "受信者の追加" - }, "addSuggestedTokens": { "message": "推奨されたトークンの追加" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index d5c178c3e..f847d8957 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "ನೆಟ್‌ವರ್ಕ್ ಸೇರಿಸಿ" }, - "addRecipient": { - "message": "ಸ್ವೀಕೃತಿದಾರರನ್ನು ಸೇರಿಸಿ" - }, "addSuggestedTokens": { "message": "ಸೂಚಿಸಲಾದ ಟೋಕನ್‌ಗಳನ್ನು ಸೇರಿಸಿ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index d8e78ce2b..b79004c42 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "네트워크 추가" }, - "addRecipient": { - "message": "수신인 추가" - }, "addSuggestedTokens": { "message": "추천 토큰 추가" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 4daca63f5..54c9f6531 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Pridėti tinklą" }, - "addRecipient": { - "message": "Pridėti gavėją" - }, "addSuggestedTokens": { "message": "Pridėti siūlomų žetonų" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index e2dc7dccc..f05e6f544 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Pievienot tīklu" }, - "addRecipient": { - "message": "Pievienot saņēmēju" - }, "addSuggestedTokens": { "message": "Pievienot ieteiktos marķierus" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 340cecf2f..79523de48 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Tambah Rangkaian" }, - "addRecipient": { - "message": "Tambah Penerima" - }, "addSuggestedTokens": { "message": "Tambah Token yang Disyorkan" }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index a62885187..e9c168390 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Legg til nettverk" }, - "addRecipient": { - "message": "Legg til mottaker " - }, "addSuggestedTokens": { "message": "Legg til foreslåtte tokener " }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 96637d9bf..0e831ca3a 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Magdagdag ng Network" }, - "addRecipient": { - "message": "Magdagdag ng Recipient" - }, "addSuggestedTokens": { "message": "Magdagdag ng Mga Iminumungkahing Token" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index 903a977e0..154b70941 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Dodaj sieć" }, - "addRecipient": { - "message": "Dodaj odbiorcę" - }, "addSuggestedTokens": { "message": "Dodaj sugerowane tokeny." }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 344179b45..7f08ceb34 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Adicionar rede" }, - "addRecipient": { - "message": "Adicionar destinatário" - }, "addSuggestedTokens": { "message": "Adicionar tokens sugeridos" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index ec7270acf..bb0c4b73c 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Adăugați rețea" }, - "addRecipient": { - "message": "Adăugați destinatarul" - }, "addSuggestedTokens": { "message": "Adăugați indicativele sugerate" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 353a543a3..b6091fa3e 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Добавить сеть" }, - "addRecipient": { - "message": "Добавить получателя" - }, "addSuggestedTokens": { "message": "Добавить предложенные токены" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 5f273558e..caa5cff7f 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Pridať sieť" }, - "addRecipient": { - "message": "Pridať príjemcu" - }, "addSuggestedTokens": { "message": "Pridať navrhované tokeny" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index 726dbb591..3b50867eb 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Dodaj omrežje" }, - "addRecipient": { - "message": "Dodaj prejemnika" - }, "addSuggestedTokens": { "message": "Dodaj priporočene žetone" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 37a43945d..4511f86b0 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Dodajte mrežu" }, - "addRecipient": { - "message": "Dodaj primaoca" - }, "addSuggestedTokens": { "message": "Dodajte sugerisane tokene" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index c6e35a7a5..16f772796 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Lägg till nätverk" }, - "addRecipient": { - "message": "Lägg till mottagare" - }, "addSuggestedTokens": { "message": "Lägg till föreslagna tokens" }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index f2c3a4fa4..353e0fced 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Ongeza Mtandao" }, - "addRecipient": { - "message": "Ongeza Mpokeaji" - }, "addSuggestedTokens": { "message": "Ongeza Vianzio Vilivyopendekezwa" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 523b97d57..24dc2646a 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -52,9 +52,6 @@ "addNetwork": { "message": "Magdagdag ng Network" }, - "addRecipient": { - "message": "Magdagdag ng Recipient" - }, "addSuggestedTokens": { "message": "Magdagdag ng Mga Iminumungkahing Token" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 3c4bdebf7..2875cc770 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -322,7 +322,7 @@ "message": "Gelecekte Bu jetonu hesap seçenekleri menüsünde “Jeton ekle”'ye giderek geri ekleyebilirsiniz." }, "reject": { - "message": "Reddetmek" + "message": "Reddet" }, "rejected": { "message": "Rededildi" diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 6beb7c861..c7c8cd9ac 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -38,9 +38,6 @@ "addNetwork": { "message": "Додати мережу" }, - "addRecipient": { - "message": "Додати отримувача" - }, "addSuggestedTokens": { "message": "Додати рекомендовані токени" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index c6f1af5a3..51bf77096 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -79,9 +79,6 @@ "addNetwork": { "message": "Thêm mạng" }, - "addRecipient": { - "message": "Thêm người nhận" - }, "addSuggestedTokens": { "message": "Thêm token được đề xuất" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index e9de843e4..d7b1b0e1b 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -52,9 +52,6 @@ "addNetwork": { "message": "添加网络" }, - "addRecipient": { - "message": "添加接收方" - }, "addSuggestedTokens": { "message": "添加推荐代币" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 208b184a1..4a5c3deaa 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -41,9 +41,6 @@ "addNetwork": { "message": "新增網路" }, - "addRecipient": { - "message": "新增接收人" - }, "addSuggestedTokens": { "message": "加入建議的代幣" }, diff --git a/app/images/videos/recovery-onboarding/subtitles-en.vtt b/app/images/videos/recovery-onboarding/subtitles/en.vtt similarity index 100% rename from app/images/videos/recovery-onboarding/subtitles-en.vtt rename to app/images/videos/recovery-onboarding/subtitles/en.vtt diff --git a/app/images/videos/recovery-onboarding/subtitles/es.vtt b/app/images/videos/recovery-onboarding/subtitles/es.vtt new file mode 100644 index 000000000..2f56d35be --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/es.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask es una nueva forma de conectarse +a sitios y aplicaciones. + +2 +00:00:04.580 --> 00:00:08.860 +En los sitios web tradicionales, una base de datos +o un banco central es responsable de controlar y + +3 +00:00:08.860 --> 00:00:10.179 +recuperar sus cuentas. + +4 +00:00:10.179 --> 00:00:15.050 +Pero con MetaMask, todo el control lo tiene +el titular de la clave maestra. + +5 +00:00:15.050 --> 00:00:18.460 +La persona que tenga esta clave controlará las cuentas. + +6 +00:00:18.460 --> 00:00:21.110 +La “clave maestra” +es su frase secreta de recuperación. + +7 +00:00:21.110 --> 00:00:26.070 +Esta frase está compuesta por 12 palabras y se crea +la primera vez que se configura MetaMask; le permite + +8 +00:00:26.070 --> 00:00:30.120 +recuperar su cartera y los fondos en caso de que +alguna vez pierda su clave de acceso. + +9 +00:00:30.120 --> 00:00:33.451 +Es fundamental que proteja +su cartera + +10 +00:00:33.451 --> 00:00:37.510 +guardando la frase secreta de recuperación +en un lugar sumamente seguro y secreto. + +11 +00:00:37.510 --> 00:00:41.429 +Si alguna persona llegara a encontrarla, accederá +a la “clave maestra” de su cartera y podrá + +12 +00:00:41.429 --> 00:00:45.190 +ingresar a todos sus fondos y tomarlos libremente. + +13 +00:00:45.190 --> 00:00:50.109 +Para proteger su cartera en MetaMask, +guarde en un lugar seguro su frase secreta de recuperación. + +14 +00:00:50.109 --> 00:00:54.930 +Puede anotarla, esconderla en algún lugar, +guardarla en una caja de seguridad + +15 +00:00:54.930 --> 00:00:57.729 +o utilizar un administrador seguro de contraseñas. + +16 +00:00:57.729 --> 00:01:01.050 +Inclusive, algunos usuarios graban +la frase en una placa metálica. + +17 +00:01:01.050 --> 00:01:04.440 +Si llegara a perder su frase secreta de recuperación, +ninguna persona, ni siquiera el equipo de MetaMask, podrá ayudarlo + +18 +00:01:04.440 --> 00:01:07.820 +a recuperar +su cartera. + +19 +00:01:07.820 --> 00:01:12.072 +Si aún no ha anotado ni guardado en un lugar seguro su +frase secreta de recuperación, + +20 +00:01:12.072 --> 00:01:15.492 +hágalo ahora mismo. Lo esperamos. + +21 +00:01:15.500 --> 00:01:20.780 +Y recuerde no compartir nunca su +frase secreta de recuperación con nadie; ni siquiera con nosotros. + +22 +00:01:20.780 --> 00:01:24.910 +Si alguien se la pide alguna vez, +será con intenciones de estafarlo. + +23 +00:01:24.910 --> 00:01:26.250 +¡Eso es todo! + +24 +00:01:26.250 --> 00:01:31.020 +Ahora ya sabe qué es una frase secreta de recuperación +y qué debe hacer para mantener protegida su cartera. diff --git a/app/images/videos/recovery-onboarding/subtitles/hi.vtt b/app/images/videos/recovery-onboarding/subtitles/hi.vtt new file mode 100644 index 000000000..f82c69566 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/hi.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask साइटों और एप्लिकेशन से +जुड़ने का एक नया तरीका है। + +2 +00:00:04.580 --> 00:00:08.860 +पारंपरिक वेबसाइटों पर, आपके खातों को नियंत्रित करने और +पुनर्प्राप्त करने के लिए एक केंद्रीय डेटाबेस या + +3 +00:00:08.860 --> 00:00:10.179 +बैंक ज़िम्मेदार होता है। + +4 +00:00:10.179 --> 00:00:15.050 +लेकिन MetaMask पर, सारी शक्ति +मास्टर कुंजी के धारक की होती है। + +5 +00:00:15.050 --> 00:00:18.460 +जो भी कुंजी रखता है, वह खातों को नियंत्रित करता है। + +6 +00:00:18.460 --> 00:00:21.110 +आपका गुप्त रिकवरी फ्रेज़ +आपकी "मास्टर कुंजी" है। + +7 +00:00:21.110 --> 00:00:26.070 +यह 12 शब्दों की एक सीरीज़ होती है, जो +आपके द्वारा पहली बार MetaMask सेट करने पर जेनरेट होती है, जिससे + +8 +00:00:26.070 --> 00:00:30.120 +आप कभी भी एक्सेस खोने पर अपने वॉलेट और धन को +पुनर्प्राप्त कर सकते हैं। + +9 +00:00:30.120 --> 00:00:33.451 +यह महत्वपूर्ण है कि आप +अपने गुप्त रिकवरी फ्रेज़ को + +10 +00:00:33.451 --> 00:00:37.510 +बहुत सुरक्षित और बहुत गुप्त रखकर +अपने वॉलेट को सुरक्षित रखें। + +11 +00:00:37.510 --> 00:00:41.429 +अगर किसी को भी इसकी सुविधा का एक्सेस मिल जाता है, तो +उनके पास आपके वॉलेट की "मास्टर कुंजी" होगी और + +12 +00:00:41.429 --> 00:00:45.190 +वे आपके सारे धन को आसानी से एक्सेस कर सकते हैं। + +13 +00:00:45.190 --> 00:00:50.109 +अपने MetaMask वॉलेट को सुरक्षित करने के लिए आप अपने +गुप्त रिकवरी फ्रेज़ को सुरक्षित रूप से सहेजना चाहेंगे। + +14 +00:00:50.109 --> 00:00:54.930 +आप इसे लिख सकते हैं, इसे कहीं छुपा सकते हैं, +इसे सेफ़ डिपोज़िट बॉक्स में रख सकते हैं + +15 +00:00:54.930 --> 00:00:57.729 +या सुरक्षित पासवर्ड मैनेजर का उपयोग कर सकते हैं। + +16 +00:00:57.729 --> 00:01:01.050 +कुछ उपयोगकर्ता अपने +फ्रेज़ को धातु की प्लेट पर भी उकेर कर रखते हैं! + +17 +00:01:01.050 --> 00:01:04.440 +यदि आप अपना गुप्त रिकवरी फ्रेज़ खो देते हैं, तो +कोई भी, यहां तक कि MetaMask की टीम भी, + +18 +00:01:04.440 --> 00:01:07.820 +आपके वॉलेट को पुनर्प्राप्त करने में आपकी +सहायता नहीं कर सकती है। + +19 +00:01:07.820 --> 00:01:12.072 +यदि आपने अपना गुप्त रिकवरी फ्रेज़ +लिखा नहीं है और इसे कहीं सुरक्षित संग्रहीत नहीं किया है, + +20 +00:01:12.072 --> 00:01:15.492 +तो अभी करें। हम इंतजार करेंगे। + +21 +00:01:15.500 --> 00:01:20.780 +और याद रखें, कभी भी अपना गुप्त रिकवरी फ्रेज़ +किसी के साथ साझा न करें: हमसे भी नहीं। + +22 +00:01:20.780 --> 00:01:24.910 +यदि कोई आपसे कभी भी इसे मांगता है, तो +वे आपके साथ धोखाधड़ी करने की कोशिश कर सकते हैं। + +23 +00:01:24.910 --> 00:01:26.250 +बस इतना ही! + +24 +00:01:26.250 --> 00:01:31.020 +अब आपको पता चल गया है कि गुप्त रिकवरी फ्रेज़ क्या है +और अपने वॉलेट को कैसे सकुशल और सुरक्षित रखा जाए। diff --git a/app/images/videos/recovery-onboarding/subtitles/id.vtt b/app/images/videos/recovery-onboarding/subtitles/id.vtt new file mode 100644 index 000000000..94761496b --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/id.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask adalah cara baru untuk terhubung +ke situs dan aplikasi. + +2 +00:00:04.580 --> 00:00:08.860 +Di situs web tradisional, database sentral +atau bank bertanggung jawab untuk mengontrol dan + +3 +00:00:08.860 --> 00:00:10.179 +memulihkan akun Anda. + +4 +00:00:10.179 --> 00:00:15.050 +Tetapi di MetaMask, semua kuasa milik +pemegang kunci induk. + +5 +00:00:15.050 --> 00:00:18.460 +Siapa pun yang memegang kunci tersebut, akan mengontrol akun. + +6 +00:00:18.460 --> 00:00:21.110 +Frasa pemulihan rahasia +adalah "kunci induk" Anda. + +7 +00:00:21.110 --> 00:00:26.070 +Ini adalah rangkaian 12 kata yang dibuat +saat Anda menyiapkan MetaMask pertama kali, yang memungkinkan + +8 +00:00:26.070 --> 00:00:30.120 +Anda memulihkan dompet dan dana jika Anda +kehilangan akses. + +9 +00:00:30.120 --> 00:00:33.451 +Penting agar Anda mengamankan +dompet Anda dengan menjaga + +10 +00:00:33.451 --> 00:00:37.510 +frasa pemulihan rahasia +Anda dengan sangat aman dan sangat rahasia. + +11 +00:00:37.510 --> 00:00:41.429 +Jika seseorang mendapatkan aksesnya, mereka akan memiliki +"kunci induk" ke dompet Anda dan dapat + +12 +00:00:41.429 --> 00:00:45.190 +mengakses secara bebas dan mengambil semua dana Anda. + +13 +00:00:45.190 --> 00:00:50.109 +Untuk mengamankan dompet MetaMask, Anda pasti ingin +menyimpan frasa pemulihan rahasia Anda secara aman. + +14 +00:00:50.109 --> 00:00:54.930 +Anda dapat menuliskannya, menyembunyikannya di suatu tempat, +menempatkannya di kotak deposit yang aman + +15 +00:00:54.930 --> 00:00:57.729 +atau menggunakan pengelola kata sandi yang aman. + +16 +00:00:57.729 --> 00:01:01.050 +Beberapa pengguna bahkan mengukir frasa +mereka pada pelat logam! + +17 +00:01:01.050 --> 00:01:04.440 +Tidak ada seorang pun, bahkan tidak juga tim +di MetaMask, dapat membantu Anda + +18 +00:01:04.440 --> 00:01:07.820 +memulihkan dompet Anda jika Anda menghilangkan +frasa pemulihan rahasia Anda. + +19 +00:01:07.820 --> 00:01:12.072 +Jika belum menuliskan frasa pemulihan rahasia Anda +dan menyimpannya di suatu tempat yang aman, + +20 +00:01:12.072 --> 00:01:15.492 +lakukan sekarang. Kami akan menunggu. + +21 +00:01:15.500 --> 00:01:20.780 +Dan ingat, jangan membagikan frasa pemulihan rahasia +Anda kepada siapa pun: bahkan tidak kepada kami. + +22 +00:01:20.780 --> 00:01:24.910 +Jika ada yang menanyakannya, +mereka akan mencoba menipu Anda. + +23 +00:01:24.910 --> 00:01:26.250 +Begitulah! + +24 +00:01:26.250 --> 00:01:31.020 +Sekarang, Anda tahu apa itu frasa pemulihan rahasia +dan cara menjaga dompet Anda tetap aman. diff --git a/app/images/videos/recovery-onboarding/subtitles/ja.vtt b/app/images/videos/recovery-onboarding/subtitles/ja.vtt new file mode 100644 index 000000000..e99b3b7a4 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/ja.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask は +をサイトとアプリケーションにつなぐ新たな方法です。 + +2 +00:00:04.580 --> 00:00:08.860 +従来のウェブサイト上では、中央データベース +または銀行がアカウントの制御と + +3 +00:00:08.860 --> 00:00:10.179 +回復の責任を負います。 + +4 +00:00:10.179 --> 00:00:15.050 +しかし、MetaMask 上では、全ての権限は +マスターキーの保持者に属します。 + +5 +00:00:15.050 --> 00:00:18.460 +当該のキーの保持者が、アカウントを制御します。 + +6 +00:00:18.460 --> 00:00:21.110 +あなたのシークレット リカバリー フレーズ +があなたの「マスターキー」です。 + +7 +00:00:21.110 --> 00:00:26.070 +これは一連の 12 の単語で +あなたが最初に MetaMask を設定した際に自動生成され、これにより + +8 +00:00:26.070 --> 00:00:30.120 +あなたは万が一アクセス出来なくなった場合に +ウォレットと資金を復元できます。 + +9 +00:00:30.120 --> 00:00:33.451 +ウォレットの安全性を確保することは非常に重要 +であり、あなたの + +10 +00:00:33.451 --> 00:00:37.510 +シークレット リカバリー フレーズ +を非常に安全かつ秘密に保つことで実現します。 + +11 +00:00:37.510 --> 00:00:41.429 +誰かがそれにアクセスすれば、彼らは +あなたのウォレットの「マスターキー」を得て、 + +12 +00:00:41.429 --> 00:00:45.190 +あなたの資金に自由にアクセスして全てを奪えます。 + +13 +00:00:45.190 --> 00:00:50.109 +MetaMask ウォレットの安全性を確保するため +あなたは シークレット リカバリー フレーズを安全に保存したくなるでしょう。 + +14 +00:00:50.109 --> 00:00:54.930 +それを書き留めたり、どこかへ隠したり、 +セーフティボックスに入れたり + +15 +00:00:54.930 --> 00:00:57.729 +または安全確保のためのパスワードマネジャーを使用できます。 + +16 +00:00:57.729 --> 00:01:01.050 +自分たちの +フレーズをメタルプレートに彫るユーザーさえいます! + +17 +00:01:01.050 --> 00:01:04.440 +何者も、 +MetaMask のチームのメンバーですら、あなたが + +18 +00:01:04.440 --> 00:01:07.820 +シークレット リカバリー フレーズを無くしたら +あなたのウォレットを復元する手助けはできません。 + +19 +00:01:07.820 --> 00:01:12.072 +あなたがシークレット リカバリー +フレーズを書き留め安全な場所に保管していないのならば、 + +20 +00:01:12.072 --> 00:01:15.492 +ぜひ今それを実行してください。お待ちしております。 + +21 +00:01:15.500 --> 00:01:20.780 +さらに、あなたのシークレット リカバリー +フレーズを誰とも決して共有しないことを忘れないでください。私たちでさえも。 + +22 +00:01:20.780 --> 00:01:24.910 +それを尋ねる者がいたら、 +彼らはあなたを騙そうとしているのです。 + +23 +00:01:24.910 --> 00:01:26.250 +以上です! + +24 +00:01:26.250 --> 00:01:31.020 +これでシークレット リカバリ フレーズ +が何であるか、あなたのウォレットと資金の安全を確保する方法が判りました。 diff --git a/app/images/videos/recovery-onboarding/subtitles/ko.vtt b/app/images/videos/recovery-onboarding/subtitles/ko.vtt new file mode 100644 index 000000000..68c04d1ae --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/ko.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask는 사이트와 애플리케이션에 +연결할 수 있는 새로운 방법입니다. + +2 +00:00:04.580 --> 00:00:08.860 +전통적인 웹사이트에서는 중앙 데이터베이스 +또는 은행에게 계정을 제어 및 + +3 +00:00:08.860 --> 00:00:10.179 +복구할 책임이 있습니다. + +4 +00:00:10.179 --> 00:00:15.050 +하지만 MetaMask에서는 모든 권한이 +마스터 키의 소유자에게 있습니다. + +5 +00:00:15.050 --> 00:00:18.460 +키를 보유하고 있는 사람은 계정을 제어합니다. + +6 +00:00:18.460 --> 00:00:21.110 +계정 시드 구문은 +"마스터 키"입니다. + +7 +00:00:21.110 --> 00:00:26.070 +먼저 MetaMask를 설정하면, 일련의 +12단어가 생성되어, + +8 +00:00:26.070 --> 00:00:30.120 +접근 권한을 상실했을 때 지갑과 +자금을 복구할 수 있습니다. + +9 +00:00:30.120 --> 00:00:33.451 +계정 시드 구문을 +안전하게 비밀을 + +10 +00:00:33.451 --> 00:00:37.510 +유지하여 지갑을 안전하게 +지키는 것이 중요합니다. + +11 +00:00:37.510 --> 00:00:41.429 +계정 시드 구문에 액세스하는 사람에게는 +지갑에 대한 "마스터 키"가 있어 자유롭게 + +12 +00:00:41.429 --> 00:00:45.190 +액세스하여 모든 자금을 가져갈 수 있습니다. + +13 +00:00:45.190 --> 00:00:50.109 +MetaMask 지갑을 안전하게 보호하려면, 계정 시드 +구문을 저장할 수 있습니다. + +14 +00:00:50.109 --> 00:00:54.930 +계정 시드 구문을 적어서 어딘가에 숨겨두거나 +대여 금고에 두거나 + +15 +00:00:54.930 --> 00:00:57.729 +보안 암호 관리자를 사용할 수 있습니다. + +16 +00:00:57.729 --> 00:01:01.050 +일부 사용자는 자신의 구문을 +금속판에 새겨두기도 합니다! + +17 +00:01:01.050 --> 00:01:04.440 +계정 시드 구문을 잊으면, +MetaMask의 팀이라고 + +18 +00:01:04.440 --> 00:01:07.820 +해도 지갑을 +복구할 수 없습니다. + +19 +00:01:07.820 --> 00:01:12.072 +게정 시드 구문을 적어두지 +않으면, 안전한 장소에 + +20 +00:01:12.072 --> 00:01:15.492 +보관하십시오. 기다리겠습니다. + +21 +00:01:15.500 --> 00:01:20.780 +다른 사람과 계정 시드 구문을 +고유하면 안 됩니다. 당사하고도 공유하지 마십시오. + +22 +00:01:20.780 --> 00:01:24.910 +계정 시드 구문을 요청하는 사람은 +사기를 치려고 하는 것입니다. + +23 +00:01:24.910 --> 00:01:26.250 +이제 다 됐습니다. + +24 +00:01:26.250 --> 00:01:31.020 +이제 여러분은 계정 시드 구문이 무엇이고 +지갑을 안전하게 보관하는 방법을 알고 있습니다. diff --git a/app/images/videos/recovery-onboarding/subtitles/pt.vtt b/app/images/videos/recovery-onboarding/subtitles/pt.vtt new file mode 100644 index 000000000..bebef88e1 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/pt.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +O MetaMask é um novo jeito de se conectar +a sites e aplicativos. + +2 +00:00:04.580 --> 00:00:08.860 +Em websites tradicionais, um banco ou base de dados central +é responsável por controlar e + +3 +00:00:08.860 --> 00:00:10.179 +recuperar as suas contas. + +4 +00:00:10.179 --> 00:00:15.050 +Mas, no MetaMask, todo o poder pertence +ao titular de uma chave-mestra. + +5 +00:00:15.050 --> 00:00:18.460 +Quem quer que detenha a chave controla as contas. + +6 +00:00:18.460 --> 00:00:21.110 +A sua frase de recuperação secreta +é a sua "chave-mestra". + +7 +00:00:21.110 --> 00:00:26.070 +É uma série de 12 palavras que são geradas +quando você configura o MetaMask na primeira vez, o que permite que + +8 +00:00:26.070 --> 00:00:30.120 +você recupere a sua carteira e recursos, caso você +venha a perder o acesso. + +9 +00:00:30.120 --> 00:00:33.451 +É importante que você mantenha protegida +a sua carteira ao manter a sua + +10 +00:00:33.451 --> 00:00:37.510 +frase de recuperação secreta +muito segura e muito secreta. + +11 +00:00:37.510 --> 00:00:41.429 +Caso alguém obtenha acesso a ela, essa pessoa terá +a "chave-mestra" para a sua carteira e poderá + +12 +00:00:41.429 --> 00:00:45.190 +acessá-la livremente e tome todos os seus recursos. + +13 +00:00:45.190 --> 00:00:50.109 +A fim de proteger a sua carteira MetaMask, você desejará +manter em segurança a sua frase de recuperação secreta. + +14 +00:00:50.109 --> 00:00:54.930 +Você pode escrevê-la, escondê-la em algum lugar, +colocá-la em um cofre + +15 +00:00:54.930 --> 00:00:57.729 +ou usar um gerenciador de senhas seguras. + +16 +00:00:57.729 --> 00:01:01.050 +Alguns usuários até mesmo gravam sua +frase em uma placa de metal! + +17 +00:01:01.050 --> 00:01:04.440 +Ninguém, nem mesmo a equipe +na MetaMask, pode lhe ajudar + +18 +00:01:04.440 --> 00:01:07.820 +a recuperar a sua carteira, caso você perca +a sua frase de recuperação secreta. + +19 +00:01:07.820 --> 00:01:12.072 +Caso você não tenha escrito a sua frase de recuperação +secreta e a tenha armazenado em algum lugar seguro, + +20 +00:01:12.072 --> 00:01:15.492 +faça isso agora. Iremos aguardar. + +21 +00:01:15.500 --> 00:01:20.780 +E lembre-se de jamais compartilhar a sua frase de recuperação +secreta com ninguém: nem mesmo conosco. + +22 +00:01:20.780 --> 00:01:24.910 +Caso alguém venha a lhe pedir a sua frase de recuperação secreta, +essa pessoa está tentando dar um golpe em você. + +23 +00:01:24.910 --> 00:01:26.250 +É isso! + +24 +00:01:26.250 --> 00:01:31.020 +Agora, você sabe o que é uma frase de recuperação secreta +e como manter a sua carteira protegida e segura. diff --git a/app/images/videos/recovery-onboarding/subtitles/ru.vtt b/app/images/videos/recovery-onboarding/subtitles/ru.vtt new file mode 100644 index 000000000..46c165a6a --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/ru.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask — это новый способ подключения +к сайтам и приложениям. + +2 +00:00:04.580 --> 00:00:08.860 +На традиционных сайтах центральная база данных +или банк несет ответственность за контроль и + +3 +00:00:08.860 --> 00:00:10.179 +восстановление ваших счетов. + +4 +00:00:10.179 --> 00:00:15.050 +На MetaMask все полномочия находятся +в руках владельца мастер-ключа. + +5 +00:00:15.050 --> 00:00:18.460 +Тот, в чьих руках находится ключ, контролирует счета. + +6 +00:00:18.460 --> 00:00:21.110 +Ваша секретная фраза восстановления +— это ваш «мастер-ключ». + +7 +00:00:21.110 --> 00:00:26.070 +Это набор из 12 слов, которые генерируются +при первой настройке MetaMask, он позволяет + +8 +00:00:26.070 --> 00:00:30.120 +вам восстанавливать ваш кошелек и средства, если вы +теряете к ним доступ. + +9 +00:00:30.120 --> 00:00:33.451 +Важно, чтобы вы обезопасили +свой кошелек, храня вашу + +10 +00:00:33.451 --> 00:00:37.510 +секретную фразу восстановления +в очень надежном и тайном месте. + +11 +00:00:37.510 --> 00:00:41.429 +Если кто-то получит доступ к ней, у этого человека окажется в руках +«мастер-ключ» от вашего кошелька, и он сможет + +12 +00:00:41.429 --> 00:00:45.190 +распоряжаться им и завладеть всеми вашими средствами. + +13 +00:00:45.190 --> 00:00:50.109 +Чтобы обезопасить ваш кошелек MetaMask, +сохраните секретную фразу восстановления в безопасном месте. + +14 +00:00:50.109 --> 00:00:54.930 +Вы можете записать ее, спрятать ее где-то, +положить ее в банковский сейф + +15 +00:00:54.930 --> 00:00:57.729 +или воспользоваться безопасным диспетчером паролей. + +16 +00:00:57.729 --> 00:01:01.050 +Некоторые пользователи даже гравируют свою +фразу на металлической пластине! + +17 +00:01:01.050 --> 00:01:04.440 +Никто, даже команда +MetaMask, не сможет помочь вам + +18 +00:01:04.440 --> 00:01:07.820 +восстановить ваш кошелек, если вы потеряете +вашу секретную фразу восстановления. + +19 +00:01:07.820 --> 00:01:12.072 +Если вы еще не записали секретную фразу +восстановления и не поместили ее в надежное место, + +20 +00:01:12.072 --> 00:01:15.492 +сделайте это сейчас. Мы подождем. + +21 +00:01:15.500 --> 00:01:20.780 +И помните, никогда не сообщайте свою секретную фразу +восстановления никому: даже нам. + +22 +00:01:20.780 --> 00:01:24.910 +Если кто-нибудь когда-либо спросит у вас ее, +этот человек пытается вас обмануть. + +23 +00:01:24.910 --> 00:01:26.250 +Вот и все! + +24 +00:01:26.250 --> 00:01:31.020 +Теперь вы знаете, что такое секретная фраза восстановления +и как обезопасить ваш кошелек. diff --git a/app/images/videos/recovery-onboarding/subtitles/tl.vtt b/app/images/videos/recovery-onboarding/subtitles/tl.vtt new file mode 100644 index 000000000..cfb3ebca7 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/tl.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +Ang MetaMask ay isang bagong paraan para kumonekta +sa mga site at application. + +2 +00:00:04.580 --> 00:00:08.860 +Sa mga tradisyonal na website, ang isang central database +o bangko ang magiging responsable sa pagkontrol at + +3 +00:00:08.860 --> 00:00:10.179 +pag-recover ng iyong mga account. + +4 +00:00:10.179 --> 00:00:15.050 +Pero sa MetaMask, ang lahat ng kakayahan ay nasa +may hawak ng master key. + +5 +00:00:15.050 --> 00:00:18.460 +Kung sino man ang may hawak ng key, siya ang magkokontrol sa mga account. + +6 +00:00:18.460 --> 00:00:21.110 +Ang iyong lihim na recovery phrase +ay ang iyong "master key". + +7 +00:00:21.110 --> 00:00:26.070 +Isa itong 12 salita na nagagawa +sa unang pagkakataong i-set up mo ang MetaMask, na magbibigay-daan sa iyo + +8 +00:00:26.070 --> 00:00:30.120 +na maibalik ang iyong wallet at pera kung sakaling +mawalan ka ng access. + +9 +00:00:30.120 --> 00:00:33.451 +Mahalagang i-secure +ang iyong wallet sa pamamagitan ng pagpapanatiling sobrang ligtas at walang nakakaalam ng iyong + +10 +00:00:33.451 --> 00:00:37.510 +lihim na recovery phrase +. + +11 +00:00:37.510 --> 00:00:41.429 +Kung may ibang taong makaka-access nito, makukuha nila +ang "master key" sa iyong wallet at + +12 +00:00:41.429 --> 00:00:45.190 +madali nilang maa-access at makukuha ang lahat ng pera mo. + +13 +00:00:45.190 --> 00:00:50.109 +Para ma-secure ang iyong MetaMask wallet, +ligtas na i-save ang iyong lihim na recovery phrase. + +14 +00:00:50.109 --> 00:00:54.930 +Puwede mo itong isulat, itago, +ilagay sa isang safe deposit box + +15 +00:00:54.930 --> 00:00:57.729 +o kaya ay gumamit ng ligtas na password manager. + +16 +00:00:57.729 --> 00:01:01.050 +Ang ilang user nga ay inuukit pa ang kanilang +phrase sa isang metal plate! + +17 +00:01:01.050 --> 00:01:04.440 +Walang sinuman, maging ang team +sa MetaMask, ang makakatulong sa iyong + +18 +00:01:04.440 --> 00:01:07.820 +maibalik ang wallet mo kung maiwawala mo +iyong lihim na recovery phrase. + +19 +00:01:07.820 --> 00:01:12.072 +Kung hindi mo pa naisusulat ang iyong lihim na recovery +phrase at hindi pa naitatago sa ligtas na lugar, + +20 +00:01:12.072 --> 00:01:15.492 +gawin mo na ngayon. Hihintayin ka namin. + +21 +00:01:15.500 --> 00:01:20.780 +At tandaan, huwag kailanman ipaalam sa iba ang iyong lihim na recovery +phrase: maging sa amin. + +22 +00:01:20.780 --> 00:01:24.910 +Kung may magtatanong man sa iyo, +sinusubukan ka nilang i-scam. + +23 +00:01:24.910 --> 00:01:26.250 +´Yun lang! + +24 +00:01:26.250 --> 00:01:31.020 +Ngayon ay alam mo na kung ano ang lihim na recovery phrase +at kung paano mapapanatiling ligtas ang iyong wallet. diff --git a/app/images/videos/recovery-onboarding/subtitles/vi.vtt b/app/images/videos/recovery-onboarding/subtitles/vi.vtt new file mode 100644 index 000000000..a05e97d85 --- /dev/null +++ b/app/images/videos/recovery-onboarding/subtitles/vi.vtt @@ -0,0 +1,115 @@ +WEBVTT + +1 +00:00:00.780 --> 00:00:04.580 +MetaMask là cách thức mới để kết nối +với các trang web và ứng dụng. + +2 +00:00:04.580 --> 00:00:08.860 +Trên các trang web truyền thống, một cơ sở dữ liệu trung tâm +hay ngân hàng sẽ chịu trách nhiệm kiểm soát và + +3 +00:00:08.860 --> 00:00:10.179 +khôi phục các tài khoản của bạn. + +4 +00:00:10.179 --> 00:00:15.050 +Tuy nhiên, trên MetaMask, toàn bộ quyền sẽ thuộc về +người nắm giữ khóa chính. + +5 +00:00:15.050 --> 00:00:18.460 +Người có khóa chính sẽ kiểm soát được tài khoản. + +6 +00:00:18.460 --> 00:00:21.110 +Cụm mật khẩu khôi phục bí mật +là “khóa chính” của bạn. + +7 +00:00:21.110 --> 00:00:26.070 +Đây là chuỗi gồm 12 từ được tạo +vào lần đầu tiên bạn thiết lập MetaMask, chuỗi này cho phép + +8 +00:00:26.070 --> 00:00:30.120 +bạn khôi phục ví và tiền của mình nếu +bạn bị mất quyền truy cập. + +9 +00:00:30.120 --> 00:00:33.451 +Bạn cần phải bảo vệ an toàn cho +ví của mình bằng cách lưu giữ + +10 +00:00:33.451 --> 00:00:37.510 +cụm mật khẩu khôi phục bí mật +thật an toàn và bí mật. + +11 +00:00:37.510 --> 00:00:41.429 +Nếu ai đó có được cụm mật khẩu khôi phục bí mật của bạn thì người đó sẽ có +“khóa chính” cho ví của bạn và có thể + +12 +00:00:41.429 --> 00:00:45.190 +tự do truy cập và lấy toàn bộ tiền của bạn. + +13 +00:00:45.190 --> 00:00:50.109 +Để bảo vệ an toàn cho ví MetaMask, bạn cần +lưu giữ cụm mật khẩu khôi phục bí mật một cách an toàn. + +14 +00:00:50.109 --> 00:00:54.930 +Bạn có thể chép lại và giấu ở một nơi nào đó, +cất trong hộp ký gửi an toàn + +15 +00:00:54.930 --> 00:00:57.729 +hoặc dùng một trình quản lý mật khẩu an toàn. + +16 +00:00:57.729 --> 00:01:01.050 +Một số người dùng thậm chí còn khắc +cụm mật khẩu của họ lên một tấm kim loại! + +17 +00:01:01.050 --> 00:01:04.440 +Không một ai, kể cả đội ngũ +tại MetaMask, có thể giúp bạn + +18 +00:01:04.440 --> 00:01:07.820 +khôi phục lại ví nếu bạn đánh mất +cụm mật khẩu khôi phục bí mật của mình. + +19 +00:01:07.820 --> 00:01:12.072 +Nếu chưa ghi lại cụm mật khẩu khôi phục bí mật +của mình và lưu giữ ở nơi an toàn, + +20 +00:01:12.072 --> 00:01:15.492 +thì bạn hãy thực hiện ngay bây giờ. Chúng tôi sẽ chờ bạn. + +21 +00:01:15.500 --> 00:01:20.780 +Và đừng bao giờ chia sẻ cụm mật khẩu khôi phục +bí mật với bất kỳ ai: kể cả chúng tôi. + +22 +00:01:20.780 --> 00:01:24.910 +Nếu ai đó hỏi bạn cụm mật khẩu khôi phục bí mật, +thì họ đang cố gắng lừa đảo bạn. + +23 +00:01:24.910 --> 00:01:26.250 +Xin hãy ghi nhớ! + +24 +00:01:26.250 --> 00:01:31.020 +Bây giờ bạn đã biết cụm mật khẩu khôi phục bí mật +là gì và cách bảo vệ ví của bạn an toàn và bảo mật. diff --git a/app/manifest/chrome.json b/app/manifest/chrome.json index 281c847a4..e4bb01cdd 100644 --- a/app/manifest/chrome.json +++ b/app/manifest/chrome.json @@ -3,5 +3,5 @@ "matches": ["https://metamask.io/*"], "ids": ["*"] }, - "minimum_chrome_version": "63" + "minimum_chrome_version": "66" } diff --git a/app/phishing.html b/app/phishing.html index 5460447b9..dd180fb77 100644 --- a/app/phishing.html +++ b/app/phishing.html @@ -51,7 +51,7 @@ Ethereum Phishing Detector. Domains on these warning lists may include outright malicious websites and legitimate websites that have been compromised by a malicious actor.

-

To read more about this site please search for the domain on CryptoScamDB.

+

To read more about this site please search for the domain on CryptoScamDB.

Note that this warning list is compiled on a voluntary basis. This list may be inaccurate or incomplete. Just because a domain does not appear on this list is not an implicit guarantee of that domain's safety. @@ -60,7 +60,7 @@

If you think this domain is incorrectly flagged or if a blocked legitimate website has resolved its security issues, - please file an issue. + please file an issue.

diff --git a/app/scripts/background.js b/app/scripts/background.js index 56044213c..d8d99150f 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -2,9 +2,6 @@ * @file The entry point for the web extension singleton process. */ -// polyfills -import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'; - import endOfStream from 'end-of-stream'; import pump from 'pump'; import debounce from 'debounce-stream'; @@ -435,12 +432,16 @@ function setupController(initState, initLangCode) { METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE, updateBadge, ); - controller.approvalController.subscribe(updateBadge); controller.appStateController.on( METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE, updateBadge, ); + controller.controllerMessenger.subscribe( + METAMASK_CONTROLLER_EVENTS.APPROVAL_STATE_CHANGE, + updateBadge, + ); + /** * Updates the Web Extension's "badge" number, on the little fox in the toolbar. * The number reflects the current number of pending transactions or message signatures needing user approval. diff --git a/app/scripts/controllers/permissions/enums.js b/app/scripts/controllers/permissions/enums.js index 447040bed..4901140a1 100644 --- a/app/scripts/controllers/permissions/enums.js +++ b/app/scripts/controllers/permissions/enums.js @@ -40,6 +40,7 @@ export const SAFE_METHODS = [ 'eth_coinbase', 'eth_decrypt', 'eth_estimateGas', + 'eth_feeHistory', 'eth_gasPrice', 'eth_getBalance', 'eth_getBlockByHash', diff --git a/app/scripts/controllers/permissions/index.js b/app/scripts/controllers/permissions/index.js index 281c4e8a3..061782c23 100644 --- a/app/scripts/controllers/permissions/index.js +++ b/app/scripts/controllers/permissions/index.js @@ -249,7 +249,7 @@ export class PermissionsController { approved.permissions, accounts, ); - this.approvals.resolve(id, approved.permissions); + this.approvals.accept(id, approved.permissions); } } catch (err) { // if finalization fails, reject the request diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index bd2c91a09..11b38a478 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -816,7 +816,6 @@ export default class PreferencesController { return await tokenContract .supportsInterface(ERC721_INTERFACE_ID) .catch((error) => { - console.log('error', error); log.debug(error); return false; }); diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 5a1d72611..5fe5cc4e6 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -1383,6 +1383,10 @@ export default class TransactionController extends EventEmitter { * @param {Object} extraParams - optional props and values to include in sensitiveProperties */ _trackTransactionMetricsEvent(txMeta, event, extraParams = {}) { + if (!txMeta) { + return; + } + const { type, time, diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.js b/app/scripts/controllers/transactions/pending-tx-tracker.js index 52e686cf6..96e7d9793 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.js @@ -136,8 +136,8 @@ export default class PendingTransactionTracker extends EventEmitter { const retryCount = txMeta.retryCount || 0; - // Exponential backoff to limit retries at publishing - if (txBlockDistance <= Math.pow(2, retryCount) - 1) { + // Exponential backoff to limit retries at publishing (capped at ~15 minutes between retries) + if (txBlockDistance < Math.min(50, Math.pow(2, retryCount))) { return undefined; } diff --git a/app/scripts/lib/ComposableObservableStore.js b/app/scripts/lib/ComposableObservableStore.js index 789a12d80..1563ae548 100644 --- a/app/scripts/lib/ComposableObservableStore.js +++ b/app/scripts/lib/ComposableObservableStore.js @@ -1,4 +1,5 @@ import { ObservableStore } from '@metamask/obs-store'; +import { getPersistentState } from '@metamask/controllers'; /** * @typedef {import('@metamask/controllers').ControllerMessenger} ControllerMessenger @@ -27,9 +28,11 @@ export default class ComposableObservableStore extends ObservableStore { * messenger, used for subscribing to events from BaseControllerV2-based * controllers. * @param {Object} [options.state] - The initial store state + * @param {boolean} [options.persist] - Wether or not to apply the persistence for v2 controllers */ - constructor({ config, controllerMessenger, state }) { + constructor({ config, controllerMessenger, state, persist }) { super(state); + this.persist = persist; this.controllerMessenger = controllerMessenger; if (config) { this.updateStructure(config); @@ -60,7 +63,11 @@ export default class ComposableObservableStore extends ObservableStore { this.controllerMessenger.subscribe( `${store.name}:stateChange`, (state) => { - this.updateState({ [key]: state }); + let updatedState = state; + if (this.persist) { + updatedState = getPersistentState(state, config[key].metadata); + } + this.updateState({ [key]: updatedState }); }, ); } diff --git a/app/scripts/lockdown-run.js b/app/scripts/lockdown-run.js index f0682654e..3c7276fdf 100644 --- a/app/scripts/lockdown-run.js +++ b/app/scripts/lockdown-run.js @@ -12,9 +12,103 @@ try { // If the `lockdown` call throws an exception, it interferes with the // contentscript injection on some versions of Firefox. The error is // caught and logged here so that the contentscript still gets injected. - // This affects Firefox v56 and Waterfox Classic + // This affects Firefox v56 and Waterfox Classic. console.error('Lockdown failed:', error); if (globalThis.sentry && globalThis.sentry.captureException) { - globalThis.sentry.captureException(error); + globalThis.sentry.captureException( + new Error(`Lockdown failed: ${error.message}`), + ); + } +} + +// Make all "object" and "function" own properties of globalThis +// non-configurable and non-writable, when possible. +// We call the a property that is non-configurable and non-writable, +// "non-modifiable". +try { + /** + * `lockdown` only hardens the properties enumerated by the + * universalPropertyNames constant specified in 'ses/src/whitelist'. This + * function makes all function and object properties on the start compartment + * global non-configurable and non-writable, unless they are already + * non-configurable. + * + * It is critical that this function runs at the right time during + * initialization, which should always be immediately after `lockdown` has been + * called. At the time of writing, the modifications this function makes to the + * runtime environment appear to be non-breaking, but that could change with + * the addition of dependencies, or the order of our scripts in our HTML files. + * Exercise caution. + * + * See inline comments for implementation details. + * + * We write this function in IIFE format to avoid polluting global scope. + */ + (function protectIntrinsics() { + const namedIntrinsics = Reflect.ownKeys(new Compartment().globalThis); + + // These named intrinsics are not automatically hardened by `lockdown` + const shouldHardenManually = new Set(['eval', 'Function']); + + const globalProperties = new Set([ + // universalPropertyNames is a constant added by lockdown to global scope + // at the time of writing, it is initialized in 'ses/src/whitelist'. + // These properties tend to be non-enumerable. + ...namedIntrinsics, + + // TODO: Also include the named platform globals + // This grabs every enumerable property on globalThis. + // ...Object.keys(globalThis), + ]); + + globalProperties.forEach((propertyName) => { + const descriptor = Reflect.getOwnPropertyDescriptor( + globalThis, + propertyName, + ); + + if (descriptor) { + if (descriptor.configurable) { + // If the property on globalThis is configurable, make it + // non-configurable. If it has no accessor properties, also make it + // non-writable. + if (hasAccessor(descriptor)) { + Object.defineProperty(globalThis, propertyName, { + configurable: false, + }); + } else { + Object.defineProperty(globalThis, propertyName, { + configurable: false, + writable: false, + }); + } + } + + if (shouldHardenManually.has(propertyName)) { + harden(globalThis[propertyName]); + } + } + }); + + /** + * Checks whether the given propertyName descriptor has any accessors, i.e. the + * properties `get` or `set`. + * + * We want to make globals non-writable, and we can't set the `writable` + * property and accessor properties at the same time. + * + * @param {Object} descriptor - The propertyName descriptor to check. + * @returns {boolean} Whether the propertyName descriptor has any accessors. + */ + function hasAccessor(descriptor) { + return 'set' in descriptor || 'get' in descriptor; + } + })(); +} catch (error) { + console.error('Protecting intrinsics failed:', error); + if (globalThis.sentry && globalThis.sentry.captureException) { + globalThis.sentry.captureException( + new Error(`Protecting intrinsics failed: ${error.message}`), + ); } } diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 115110620..17405884c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -76,6 +76,8 @@ export const METAMASK_CONTROLLER_EVENTS = { // Fired after state changes that impact the extension badge (unapproved msg count) // The process of updating the badge happens in app/scripts/background.js. UPDATE_BADGE: 'updateBadge', + // TODO: Add this and similar enums to @metamask/controllers and export them + APPROVAL_STATE_CHANGE: 'ApprovalController:stateChange', }; export default class MetamaskController extends EventEmitter { @@ -106,12 +108,13 @@ export default class MetamaskController extends EventEmitter { this.getRequestAccountTabIds = opts.getRequestAccountTabIds; this.getOpenMetamaskTabsIds = opts.getOpenMetamaskTabsIds; - const controllerMessenger = new ControllerMessenger(); + this.controllerMessenger = new ControllerMessenger(); // observable state store this.store = new ComposableObservableStore({ state: initState, - controllerMessenger, + controllerMessenger: this.controllerMessenger, + persist: true, }); // external connections by origin @@ -131,6 +134,9 @@ export default class MetamaskController extends EventEmitter { // controller initialization order matters this.approvalController = new ApprovalController({ + messenger: this.controllerMessenger.getRestricted({ + name: 'ApprovalController', + }), showApprovalRequest: opts.showUserConfirmation, }); @@ -169,7 +175,7 @@ export default class MetamaskController extends EventEmitter { initState: initState.MetaMetricsController, }); - const gasFeeMessenger = controllerMessenger.getRestricted({ + const gasFeeMessenger = this.controllerMessenger.getRestricted({ name: 'GasFeeController', }); @@ -210,7 +216,7 @@ export default class MetamaskController extends EventEmitter { preferencesStore: this.preferencesController.store, }); - const currencyRateMessenger = controllerMessenger.getRestricted({ + const currencyRateMessenger = this.controllerMessenger.getRestricted({ name: 'CurrencyRateController', }); this.currencyRateController = new CurrencyRateController({ @@ -219,7 +225,7 @@ export default class MetamaskController extends EventEmitter { state: initState.CurrencyController, }); - const tokenListMessenger = controllerMessenger.getRestricted({ + const tokenListMessenger = this.controllerMessenger.getRestricted({ name: 'TokenListController', }); this.tokenListController = new TokenListController({ @@ -569,7 +575,7 @@ export default class MetamaskController extends EventEmitter { GasFeeController: this.gasFeeController, TokenListController: this.tokenListController, }, - controllerMessenger, + controllerMessenger: this.controllerMessenger, }); this.memStore.subscribe(this.sendUpdate.bind(this)); @@ -1097,7 +1103,7 @@ export default class MetamaskController extends EventEmitter { // approval controller resolvePendingApproval: nodeify( - approvalController.resolve, + approvalController.accept, approvalController, ), rejectPendingApproval: nodeify( diff --git a/app/scripts/migrations/053.js b/app/scripts/migrations/053.js index f9d4dc55c..318ce1614 100644 --- a/app/scripts/migrations/053.js +++ b/app/scripts/migrations/053.js @@ -23,23 +23,27 @@ function transformState(state) { state?.IncomingTransactionsController?.incomingTransactions; if (Array.isArray(transactions)) { transactions.forEach((transaction) => { - if ( - transaction.type !== TRANSACTION_TYPES.RETRY && - transaction.type !== TRANSACTION_TYPES.CANCEL - ) { - transaction.type = transaction.transactionCategory; + if (transaction) { + if ( + transaction.type !== TRANSACTION_TYPES.RETRY && + transaction.type !== TRANSACTION_TYPES.CANCEL + ) { + transaction.type = transaction.transactionCategory; + } + delete transaction.transactionCategory; } - delete transaction.transactionCategory; }); } if (incomingTransactions) { const incomingTransactionsEntries = Object.entries(incomingTransactions); incomingTransactionsEntries.forEach(([key, transaction]) => { - delete transaction.transactionCategory; - state.IncomingTransactionsController.incomingTransactions[key] = { - ...transaction, - type: TRANSACTION_TYPES.INCOMING, - }; + if (transaction) { + delete transaction.transactionCategory; + state.IncomingTransactionsController.incomingTransactions[key] = { + ...transaction, + type: TRANSACTION_TYPES.INCOMING, + }; + } }); } return state; diff --git a/app/scripts/migrations/056.js b/app/scripts/migrations/056.js index f11d4b3f1..70300f363 100644 --- a/app/scripts/migrations/056.js +++ b/app/scripts/migrations/056.js @@ -15,14 +15,14 @@ export default { const { PreferencesController } = versionedData.data; - if (Array.isArray(PreferencesController.tokens)) { + if (Array.isArray(PreferencesController?.tokens)) { PreferencesController.tokens = PreferencesController.tokens.filter( ({ address }) => address, ); } if ( - PreferencesController.accountTokens && + PreferencesController?.accountTokens && typeof PreferencesController.accountTokens === 'object' ) { Object.keys(PreferencesController.accountTokens).forEach((account) => { @@ -40,7 +40,7 @@ export default { } if ( - PreferencesController.assetImages && + PreferencesController?.assetImages && 'undefined' in PreferencesController.assetImages ) { delete PreferencesController.assetImages.undefined; diff --git a/app/scripts/phishing-detect.js b/app/scripts/phishing-detect.js index f036461c3..bb6bf5b2e 100644 --- a/app/scripts/phishing-detect.js +++ b/app/scripts/phishing-detect.js @@ -12,7 +12,12 @@ function start() { const hash = window.location.hash.substring(1); const suspect = querystring.parse(hash); - document.getElementById('csdbLink').href = `https://cryptoscamdb.org/search`; + const newIssueLink = document.getElementById('new-issue-link'); + const newIssueUrl = `https://github.com/MetaMask/eth-phishing-detect/issues/new`; + const newIssueParams = `?title=[Legitimate%20Site%20Blocked]%20${encodeURIComponent( + suspect.hostname, + )}&body=${encodeURIComponent(suspect.href)}`; + newIssueLink.href = `${newIssueUrl}${newIssueParams}`; global.platform = new ExtensionPlatform(); diff --git a/app/scripts/ui.js b/app/scripts/ui.js index ee4539370..362567aa8 100644 --- a/app/scripts/ui.js +++ b/app/scripts/ui.js @@ -1,5 +1,4 @@ // polyfills -import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'; import '@formatjs/intl-relativetimeformat/polyfill'; // dev only, "react-devtools" import is skipped in prod builds diff --git a/babel.config.js b/babel.config.js index 6c98e6df4..efd474696 100644 --- a/babel.config.js +++ b/babel.config.js @@ -6,7 +6,7 @@ module.exports = function (api) { '@babel/preset-env', { targets: { - browsers: ['chrome >= 63', 'firefox >= 68'], + browsers: ['chrome >= 66', 'firefox >= 68'], }, }, ], diff --git a/development/build/index.js b/development/build/index.js index 9a60ead28..452b6bce0 100755 --- a/development/build/index.js +++ b/development/build/index.js @@ -28,12 +28,17 @@ require('@babel/preset-react'); require('@babel/core'); const browserPlatforms = ['firefox', 'chrome', 'brave', 'opera']; +const shouldIncludeLockdown = !process.argv.includes('--omit-lockdown'); defineAllTasks(); detectAndRunEntryTask(); function defineAllTasks() { - const staticTasks = createStaticAssetTasks({ livereload, browserPlatforms }); + const staticTasks = createStaticAssetTasks({ + livereload, + browserPlatforms, + shouldIncludeLockdown, + }); const manifestTasks = createManifestTasks({ browserPlatforms }); const styleTasks = createStyleTasks({ livereload }); const scriptTasks = createScriptTasks({ livereload, browserPlatforms }); diff --git a/development/build/static.js b/development/build/static.js index 9d6ba3060..ed7e9290a 100644 --- a/development/build/static.js +++ b/development/build/static.js @@ -7,107 +7,17 @@ const locales = require('../../app/_locales/index.json'); const { createTask, composeSeries } = require('./task'); -module.exports = createStaticAssetTasks; +const EMPTY_JS_FILE = './development/empty.js'; -const copyTargets = [ - { - src: `./app/_locales/`, - dest: `_locales`, - }, - { - src: `./app/images/`, - dest: `images`, - }, - { - src: `./node_modules/@metamask/contract-metadata/images/`, - dest: `images/contract`, - }, - { - src: `./app/fonts/`, - dest: `fonts`, - }, - { - src: `./app/vendor/`, - dest: `vendor`, - }, - { - src: `./node_modules/@fortawesome/fontawesome-free/webfonts/`, - dest: `fonts/fontawesome`, - }, - { - src: `./ui/css/output/`, - pattern: `*.css`, - dest: ``, - }, - { - src: `./app/loading.html`, - dest: `loading.html`, - }, - { - src: `./node_modules/globalthis/dist/browser.js`, - dest: `globalthis.js`, - }, - { - src: `./node_modules/ses/dist/lockdown.cjs`, - dest: `lockdown-install.js`, - }, - { - src: `./app/scripts/lockdown-run.js`, - dest: `lockdown-run.js`, - }, - { - // eslint-disable-next-line node/no-extraneous-require - src: require.resolve('@lavamoat/lavapack/src/runtime-cjs.js'), - dest: `runtime-cjs.js`, - }, - { - src: `./app/phishing.html`, - dest: `phishing.html`, - }, -]; +module.exports = function createStaticAssetTasks({ + livereload, + browserPlatforms, + shouldIncludeLockdown = true, +}) { + const [copyTargetsProd, copyTargetsDev] = getCopyTargets( + shouldIncludeLockdown, + ); -const languageTags = new Set(); -for (const locale of locales) { - const { code } = locale; - const tag = code.split('_')[0]; - languageTags.add(tag); -} - -for (const tag of languageTags) { - copyTargets.push({ - src: `./node_modules/@formatjs/intl-relativetimeformat/dist/locale-data/${tag}.json`, - dest: `intl/${tag}/relative-time-format-data.json`, - }); -} - -const copyTargetsDev = [ - ...copyTargets, - { - src: './development', - pattern: '/chromereload.js', - dest: ``, - }, - // empty files to suppress missing file errors - { - src: './development/empty.js', - dest: `bg-libs.js`, - }, - { - src: './development/empty.js', - dest: `ui-libs.js`, - }, -]; - -const copyTargetsProd = [ - ...copyTargets, - // empty files to suppress missing file errors - { - src: './development/empty.js', - dest: `chromereload.js`, - }, -]; - -function createStaticAssetTasks({ livereload, browserPlatforms }) { const prod = createTask( 'static:prod', composeSeries( @@ -169,4 +79,110 @@ function createStaticAssetTasks({ livereload, browserPlatforms }) { }), ); } +}; + +function getCopyTargets(shouldIncludeLockdown) { + const allCopyTargets = [ + { + src: `./app/_locales/`, + dest: `_locales`, + }, + { + src: `./app/images/`, + dest: `images`, + }, + { + src: `./node_modules/@metamask/contract-metadata/images/`, + dest: `images/contract`, + }, + { + src: `./app/fonts/`, + dest: `fonts`, + }, + { + src: `./app/vendor/`, + dest: `vendor`, + }, + { + src: `./node_modules/@fortawesome/fontawesome-free/webfonts/`, + dest: `fonts/fontawesome`, + }, + { + src: `./ui/css/output/`, + pattern: `*.css`, + dest: ``, + }, + { + src: `./app/loading.html`, + dest: `loading.html`, + }, + { + src: `./node_modules/globalthis/dist/browser.js`, + dest: `globalthis.js`, + }, + { + src: shouldIncludeLockdown + ? `./node_modules/ses/dist/lockdown.umd.min.js` + : EMPTY_JS_FILE, + dest: `lockdown-install.js`, + }, + { + src: shouldIncludeLockdown + ? `./app/scripts/lockdown-run.js` + : EMPTY_JS_FILE, + dest: `lockdown-run.js`, + }, + { + // eslint-disable-next-line node/no-extraneous-require + src: require.resolve('@lavamoat/lavapack/src/runtime-cjs.js'), + dest: `runtime-cjs.js`, + }, + { + src: `./app/phishing.html`, + dest: `phishing.html`, + }, + ]; + + const languageTags = new Set(); + for (const locale of locales) { + const { code } = locale; + const tag = code.split('_')[0]; + languageTags.add(tag); + } + + for (const tag of languageTags) { + allCopyTargets.push({ + src: `./node_modules/@formatjs/intl-relativetimeformat/dist/locale-data/${tag}.json`, + dest: `intl/${tag}/relative-time-format-data.json`, + }); + } + + const copyTargetsDev = [ + ...allCopyTargets, + { + src: './development', + pattern: '/chromereload.js', + dest: ``, + }, + // empty files to suppress missing file errors + { + src: EMPTY_JS_FILE, + dest: `bg-libs.js`, + }, + { + src: EMPTY_JS_FILE, + dest: `ui-libs.js`, + }, + ]; + + const copyTargetsProd = [ + ...allCopyTargets, + // empty files to suppress missing file errors + { + src: EMPTY_JS_FILE, + dest: `chromereload.js`, + }, + ]; + + return [copyTargetsProd, copyTargetsDev]; } diff --git a/docs/extension_description/en.txt b/docs/extension_description/en.txt index 53bc4780d..b52d476cc 100644 --- a/docs/extension_description/en.txt +++ b/docs/extension_description/en.txt @@ -5,4 +5,4 @@ The extension injects the Ethereum web3 API into every website's javascript cont MetaMask also lets the user create and manage their own identities, so when a Dapp wants to perform a transaction and write to the blockchain, the user gets a secure interface to review the transaction, before approving or rejecting it. Because it adds functionality to the normal browser context, MetaMask requires the permission to read and write to any webpage. You can always "view the source" of MetaMask the way you do any extension, or view the source code on Github: -https://github.com/MetaMask/metamask-plugin \ No newline at end of file +https://github.com/MetaMask/metamask-extension \ No newline at end of file diff --git a/package.json b/package.json index 71d4aa3f1..626ee32f7 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,8 @@ "lint:fix": "prettier --write '**/*.json' && eslint . --ext js --cache --fix", "lint:changed": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint", "lint:changed:fix": "{ git ls-files --others --exclude-standard ; git diff-index --name-only --diff-filter=d HEAD ; } | grep --regexp='[.]js$' | tr '\\n' '\\0' | xargs -0 eslint --fix", + "lint:changelog": "auto-changelog validate", + "lint:changelog:rc": "auto-changelog validate --rc", "lint:shellcheck": "./development/shellcheck.sh", "lint:styles": "stylelint '*/**/*.scss'", "lint:lockfile": "lockfile-lint --path yarn.lock --allowed-hosts npm yarn github.com codeload.github.com --empty-hostname false --allowed-schemes \"https:\" \"git+https:\"", @@ -60,8 +62,8 @@ "devtools:redux": "remotedev --hostname=localhost --port=8000", "start:dev": "concurrently -k -n build,react,redux yarn:start yarn:devtools:react yarn:devtools:redux", "announce": "node development/announcer.js", - "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": "start-storybook -p 6006 -c .storybook -s ./app,./.storybook/images", + "storybook:build": "build-storybook -c .storybook -o storybook-build -s ./app,./.storybook/images", "storybook:deploy": "storybook-to-ghpages --existing-output-dir storybook-build --remote storybook --branch master", "update-changelog": "auto-changelog update", "generate:migration": "./development/generate-migration.sh", @@ -102,7 +104,7 @@ "@fortawesome/fontawesome-free": "^5.13.0", "@material-ui/core": "^4.11.0", "@metamask/contract-metadata": "^1.28.0", - "@metamask/controllers": "^14.0.2", + "@metamask/controllers": "^15.0.2", "@metamask/eth-ledger-bridge-keyring": "^0.7.0", "@metamask/eth-token-tracker": "^3.0.1", "@metamask/etherscan-link": "^2.1.0", @@ -116,7 +118,6 @@ "@sentry/browser": "^5.26.0", "@sentry/integrations": "^5.26.0", "@zxing/library": "^0.8.0", - "abortcontroller-polyfill": "^1.4.0", "analytics-node": "^3.4.0-beta.3", "await-semaphore": "^0.1.1", "base32-encode": "^1.2.0", diff --git a/shared/modules/fetch-with-timeout.test.js b/shared/modules/fetch-with-timeout.test.js index a7400e617..d7b1f2624 100644 --- a/shared/modules/fetch-with-timeout.test.js +++ b/shared/modules/fetch-with-timeout.test.js @@ -30,7 +30,9 @@ describe('getFetchWithTimeout', function () { throw new Error('Request should throw'); }; - await expect(fetchWithTimeoutThrowsError()).rejects.toThrow('Aborted'); + await expect(fetchWithTimeoutThrowsError()).rejects.toThrow( + 'The user aborted a request.', + ); }); it('should abort the request when the custom timeout is hit', async function () { @@ -48,7 +50,9 @@ describe('getFetchWithTimeout', function () { throw new Error('Request should be aborted'); }; - await expect(fetchWithTimeoutThrowsError()).rejects.toThrow('Aborted'); + await expect(fetchWithTimeoutThrowsError()).rejects.toThrow( + 'The user aborted a request.', + ); }); it('throws on invalid timeout', async function () { diff --git a/test/e2e/benchmark.js b/test/e2e/benchmark.js index c5ad8ebb7..fe2dc7926 100644 --- a/test/e2e/benchmark.js +++ b/test/e2e/benchmark.js @@ -7,7 +7,7 @@ const { hideBin } = require('yargs/helpers'); const ttest = require('ttest'); const { retry } = require('../../development/lib/retry'); const { exitWithError } = require('../../development/lib/exit-with-error'); -const { withFixtures } = require('./helpers'); +const { withFixtures, tinyDelayMs } = require('./helpers'); const { PAGES } = require('./webdriver/driver'); const DEFAULT_NUM_SAMPLES = 20; @@ -16,6 +16,7 @@ const ALL_PAGES = Object.values(PAGES); async function measurePage(pageName) { let metrics; await withFixtures({ fixtures: 'imported-account' }, async ({ driver }) => { + await driver.delay(tinyDelayMs); await driver.navigate(); await driver.fill('#password', 'correct horse battery staple'); await driver.press('#password', driver.Key.ENTER); diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index b799f1d53..e5ed3a831 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -12,6 +12,8 @@ const { ensureXServerIsRunning } = require('./x-server'); const tinyDelayMs = 200; const regularDelayMs = tinyDelayMs * 2; const largeDelayMs = regularDelayMs * 2; +const xLargeDelayMs = largeDelayMs * 2; +const xxLargeDelayMs = xLargeDelayMs * 2; const dappPort = 8080; @@ -148,5 +150,7 @@ module.exports = { tinyDelayMs, regularDelayMs, largeDelayMs, + xLargeDelayMs, + xxLargeDelayMs, withFixtures, }; diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js index 73af211d0..2c7044a2b 100644 --- a/test/e2e/metamask-ui.spec.js +++ b/test/e2e/metamask-ui.spec.js @@ -191,25 +191,6 @@ describe('MetaMask', function () { }); }); - describe('Show account information', function () { - it('shows the QR code for the account', async function () { - await driver.clickElement('[data-testid="account-options-menu-button"]'); - await driver.clickElement( - '[data-testid="account-options-menu__account-details"]', - ); - await driver.findVisibleElement('.qr-code__wrapper'); - await driver.delay(regularDelayMs); - - // wait for permission modal to be visible. - const permissionModal = await driver.findVisibleElement('span .modal'); - await driver.clickElement('.account-modal__close'); - - // wait for permission modal to be removed from DOM. - await permissionModal.waitForElementState('hidden'); - await driver.delay(regularDelayMs); - }); - }); - describe('Import Secret Recovery Phrase', function () { it('logs out of the vault', async function () { await driver.clickElement('.account-menu__icon'); diff --git a/test/e2e/metrics.spec.js b/test/e2e/metrics.spec.js index fb54eea5d..498a6ccd0 100644 --- a/test/e2e/metrics.spec.js +++ b/test/e2e/metrics.spec.js @@ -1,6 +1,6 @@ const { strict: assert } = require('assert'); const waitUntilCalled = require('../lib/wait-until-called'); -const { withFixtures } = require('./helpers'); +const { withFixtures, tinyDelayMs } = require('./helpers'); /** * WARNING: These tests must be run using a build created with `yarn build:test:metrics`, so that it has @@ -30,6 +30,7 @@ describe('Segment metrics', function () { const threeSegmentEventsReceived = waitUntilCalled(segmentStub, null, { callCount: 3, }); + await driver.delay(tinyDelayMs); await driver.navigate(); await driver.fill('#password', 'correct horse battery staple'); diff --git a/test/e2e/tests/account-details.spec.js b/test/e2e/tests/account-details.spec.js new file mode 100644 index 000000000..82f28ad15 --- /dev/null +++ b/test/e2e/tests/account-details.spec.js @@ -0,0 +1,38 @@ +const { strict: assert } = require('assert'); +const { withFixtures } = require('../helpers'); + +describe('Show account details', function () { + const ganacheOptions = { + accounts: [ + { + secretKey: + '0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC', + balance: 25000000000000000000, + }, + ], + }; + it('should show the QR code for the account', 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( + '[data-testid="account-options-menu-button"]', + ); + await driver.clickElement( + '[data-testid="account-options-menu__account-details"]', + ); + + const qrCode = await driver.findElement('.qr-code__wrapper'); + assert.equal(await qrCode.isDisplayed(), true); + }, + ); + }); +}); diff --git a/test/e2e/tests/custom-rpc-history.spec.js b/test/e2e/tests/custom-rpc-history.spec.js index 792bfa980..08a2bdd31 100644 --- a/test/e2e/tests/custom-rpc-history.spec.js +++ b/test/e2e/tests/custom-rpc-history.spec.js @@ -49,7 +49,7 @@ describe('Stores custom RPC history', function () { await chainIdInput.sendKeys(chainId.toString()); await driver.clickElement('.network-form__footer .btn-secondary'); - await driver.findElement({ text: networkName, tag: 'div' }); + await driver.findElement({ text: networkName, tag: 'span' }); }, ); }); diff --git a/test/e2e/tests/permissions.spec.js b/test/e2e/tests/permissions.spec.js index afc860731..503066626 100644 --- a/test/e2e/tests/permissions.spec.js +++ b/test/e2e/tests/permissions.spec.js @@ -1,5 +1,5 @@ const { strict: assert } = require('assert'); -const { withFixtures } = require('../helpers'); +const { withFixtures, xxLargeDelayMs } = require('../helpers'); describe('Permissions', function () { it('sets permissions and connect to Dapp', async function () { @@ -34,6 +34,7 @@ describe('Permissions', function () { await driver.waitUntilXWindowHandles(3); const windowHandles = await driver.getAllWindowHandles(); const extension = windowHandles[0]; + await driver.delay(xxLargeDelayMs); await driver.switchToWindowWithTitle( 'MetaMask Notification', windowHandles, diff --git a/test/e2e/tests/provider-events.spec.js b/test/e2e/tests/provider-events.spec.js index 0949dbf46..196b0bc08 100644 --- a/test/e2e/tests/provider-events.spec.js +++ b/test/e2e/tests/provider-events.spec.js @@ -1,5 +1,5 @@ const { strict: assert } = require('assert'); -const { withFixtures, regularDelayMs } = require('../helpers'); +const { withFixtures, regularDelayMs, xxLargeDelayMs } = require('../helpers'); describe('MetaMask', function () { it('provider should inform dapp when switching networks', async function () { @@ -27,7 +27,7 @@ describe('MetaMask', function () { await driver.openNewPage('http://127.0.0.1:8080/'); const networkDiv = await driver.findElement('#network'); const chainIdDiv = await driver.findElement('#chainId'); - await driver.delay(regularDelayMs); + await driver.delay(xxLargeDelayMs); assert.equal(await networkDiv.getText(), '1337'); assert.equal(await chainIdDiv.getText(), '0x539'); diff --git a/test/helpers/setup-helper.js b/test/helpers/setup-helper.js index 749577c40..6e371a790 100644 --- a/test/helpers/setup-helper.js +++ b/test/helpers/setup-helper.js @@ -56,17 +56,12 @@ const popoverContent = window.document.createElement('div'); popoverContent.setAttribute('id', 'popover-content'); window.document.body.appendChild(popoverContent); -// delete AbortController added by jsdom so it can be polyfilled correctly below -delete window.AbortController; - // fetch const fetch = require('node-fetch'); const { Headers, Request, Response } = fetch; Object.assign(window, { fetch, Headers, Request, Response }); -require('abortcontroller-polyfill/dist/polyfill-patch-fetch'); - // localStorage window.localStorage = { removeItem: () => null, diff --git a/test/mocks/permission-controller.js b/test/mocks/permission-controller.js index 1a2ee0d20..048fcde01 100644 --- a/test/mocks/permission-controller.js +++ b/test/mocks/permission-controller.js @@ -1,7 +1,7 @@ import { ethErrors, errorCodes } from 'eth-rpc-errors'; import deepFreeze from 'deep-freeze-strict'; -import { ApprovalController } from '@metamask/controllers'; +import { ApprovalController, ControllerMessenger } from '@metamask/controllers'; import _getRestrictedMethods from '../../app/scripts/controllers/permissions/restrictedMethods'; @@ -70,6 +70,7 @@ const getRestrictedMethods = (permController) => { export function getPermControllerOpts() { return { approvals: new ApprovalController({ + messenger: new ControllerMessenger(), showApprovalRequest: noop, }), getKeyringAccounts: async () => [...keyringAccounts], diff --git a/test/unit-global/frozenPromise.test.js b/test/unit-global/frozenPromise.test.js deleted file mode 100644 index b41362266..000000000 --- a/test/unit-global/frozenPromise.test.js +++ /dev/null @@ -1,53 +0,0 @@ -// Should occur before anything else -import './globalPatch'; -import 'ses/lockdown'; -import '../../app/scripts/lockdown-run'; -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 () { - try { - // eslint-disable-next-line no-global-assign,no-native-reassign - Promise = {}; - assert.fail('did not throw error'); - } catch (err) { - assert.ok(err, 'did throw error'); - } - }); - - it('throws when reassinging promise (syntax 2)', function () { - try { - global.Promise = {}; - assert.fail('did not throw error'); - } catch (err) { - assert.ok(err, 'did throw error'); - } - }); - - it('throws when mutating existing Promise property', function () { - try { - Promise.all = () => undefined; - assert.fail('did not throw error'); - } catch (err) { - assert.ok(err, 'did throw error'); - } - }); - - it('throws when adding new Promise property', function () { - try { - Promise.foo = 'bar'; - assert.fail('did not throw error'); - } catch (err) { - assert.ok(err, 'did throw error'); - } - }); - - it('throws when deleting Promise from global', function () { - try { - delete global.Promise; - assert.fail('did not throw error'); - } catch (err) { - assert.ok(err, 'did throw error'); - } - }); -}); diff --git a/test/unit-global/globalPatch.js b/test/unit-global/globalPatch.js deleted file mode 100644 index da239953c..000000000 --- a/test/unit-global/globalPatch.js +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line import/unambiguous,node/no-unsupported-features/es-builtins -global.globalThis = global; diff --git a/test/unit-global/protect-intrinsics.test.js b/test/unit-global/protect-intrinsics.test.js new file mode 100644 index 000000000..5075080f9 --- /dev/null +++ b/test/unit-global/protect-intrinsics.test.js @@ -0,0 +1,71 @@ +import 'ses/lockdown'; +import '../../app/scripts/lockdown-run'; +import { strict as assert } from 'assert'; + +// These are Agoric inventions, and we don't care about them. +const ignoreList = new Set([ + 'Compartment', + 'HandledPromise', + 'StaticModuleRecord', +]); + +describe('non-modifiable intrinsics', function () { + const namedIntrinsics = Reflect.ownKeys(new Compartment().globalThis); + + const globalProperties = new Set( + [ + // Added to global scope by ses/dist/lockdown.cjs. + ...namedIntrinsics, + + // TODO: Also include the named platform globals + // This grabs every enumerable property on globalThis. + // ...Object.keys(globalThis), + ].filter((propertyName) => !ignoreList.has(propertyName)), + ); + + globalProperties.forEach((propertyName) => { + it(`intrinsic globalThis["${propertyName}"]`, function () { + const descriptor = Reflect.getOwnPropertyDescriptor( + globalThis, + propertyName, + ); + + assert.ok( + descriptor, + `globalThis["${propertyName}"] should have a descriptor`, + ); + + // As long as Object.isFrozen is the true Object.isFrozen, the object + // it is called with cannot lie about being frozen. + const value = globalThis[propertyName]; + if (value !== globalThis) { + assert.equal( + Object.isFrozen(value), + true, + `value of universal property globalThis["${propertyName}"] should be frozen`, + ); + } + + // The writability of properties with accessors cannot be modified. + if ('set' in descriptor || 'get' in descriptor) { + assert.equal( + descriptor.configurable, + false, + `globalThis["${propertyName}"] should be non-configurable`, + ); + } else { + assert.equal( + descriptor.configurable, + false, + `globalThis["${propertyName}"] should be non-configurable`, + ); + + assert.equal( + descriptor.writable, + false, + `globalThis["${propertyName}"] should be non-writable`, + ); + } + }); + }); +}); diff --git a/ui/components/app/account-list-item/account-list-item.stories.js b/ui/components/app/account-list-item/account-list-item.stories.js new file mode 100644 index 000000000..8cdc99220 --- /dev/null +++ b/ui/components/app/account-list-item/account-list-item.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import AccountListItem from './account-list-item'; + +export default { + title: 'AccountListItem', +}; + +export const AccountListItemComponent = () => { + return ; +}; diff --git a/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js b/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js index 16f8e82c7..93f3e5ee3 100644 --- a/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js +++ b/ui/components/app/advanced-gas-controls/advanced-gas-controls.component.js @@ -131,5 +131,5 @@ AdvancedGasControls.propTypes = { maxPriorityFeeFiat: PropTypes.string, maxFeeFiat: PropTypes.string, gasErrors: PropTypes.object, - minimumGasLimit: PropTypes.number, + minimumGasLimit: PropTypes.string, }; diff --git a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js index c73de3f84..1b887bba4 100644 --- a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js +++ b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js @@ -15,7 +15,7 @@ import { getSelectedAddress, getSelectedIdentity, } from '../../../../selectors'; -import { isExtensionUrl } from '../../../../helpers/utils/util'; +import { isExtensionUrl, getURLHost } from '../../../../helpers/utils/util'; import Popover from '../../../ui/popover'; import Button from '../../../ui/button'; import Checkbox from '../../../ui/check-box'; @@ -88,7 +88,7 @@ const UnconnectedAccountAlert = () => { return ( { + const firstLetter = contact.name[0].toUpperCase(); + return { + ...obj, + [firstLetter]: [...(obj[firstLetter] || []), contact], + }; + }, {}); - const contactGroups = contacts.reduce((acc, contact) => { - const firstLetter = contact.name.slice(0, 1).toUpperCase(); - acc[firstLetter] = acc[firstLetter] || []; - const bucket = acc[firstLetter]; - bucket.push(contact); - return acc; - }, {}); + const letters = Object.keys(unsortedContactsByLetter).sort(); - return Object.entries(contactGroups) - .sort(([letter1], [letter2]) => { - if (letter1 > letter2) { - return 1; - } else if (letter1 === letter2) { - return 0; - } - return -1; - }) - .map(([letter, groupItems]) => ( - - )); + const sortedContactGroups = letters.map((letter) => { + return [ + letter, + sortBy(unsortedContactsByLetter[letter], (contact) => { + return contact.name.toLowerCase(); + }), + ]; + }); + + return sortedContactGroups.map(([letter, groupItems]) => ( + + )); } renderMyAccounts() { diff --git a/ui/components/app/contact-list/contact-list.test.js b/ui/components/app/contact-list/contact-list.test.js new file mode 100644 index 000000000..71b638dee --- /dev/null +++ b/ui/components/app/contact-list/contact-list.test.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { within } from '@testing-library/react'; +import configureMockStore from 'redux-mock-store'; +import { renderWithProvider } from '../../../../test/jest/rendering'; +import ContactList from '.'; + +describe('Contact List', () => { + const store = configureMockStore([])({ metamask: {} }); + + describe('given searchForContacts', () => { + const selectRecipient = () => null; + const selectedAddress = null; + + it('sorts contacts by name within each letter group', () => { + const { getAllByTestId } = renderWithProvider( + { + return [ + { + name: 'Al', + address: '0x0000000000000000000000000000000000000000', + }, + { + name: 'aa', + address: '0x0000000000000000000000000000000000000001', + }, + { + name: 'Az', + address: '0x0000000000000000000000000000000000000002', + }, + { + name: 'bbb', + address: '0x0000000000000000000000000000000000000003', + }, + ]; + }} + selectRecipient={selectRecipient} + selectedAddress={selectedAddress} + />, + store, + ); + + const recipientGroups = getAllByTestId('recipient-group'); + expect(within(recipientGroups[0]).getByText('A')).toBeInTheDocument(); + const recipientsInA = within(recipientGroups[0]).getAllByTestId( + 'recipient', + ); + expect(recipientsInA[0]).toHaveTextContent('aa0x0000...0001'); + expect(recipientsInA[1]).toHaveTextContent('Al0x0000...0000'); + expect(recipientsInA[2]).toHaveTextContent('Az0x0000...0002'); + expect(within(recipientGroups[1]).getByText('B')).toBeInTheDocument(); + const recipientsInB = within(recipientGroups[1]).getAllByTestId( + 'recipient', + ); + expect(recipientsInB[0]).toHaveTextContent('bbb0x0000...0003'); + }); + }); +}); diff --git a/ui/components/app/contact-list/recipient-group/recipient-group.component.js b/ui/components/app/contact-list/recipient-group/recipient-group.component.js index d57854917..a8fd589db 100644 --- a/ui/components/app/contact-list/recipient-group/recipient-group.component.js +++ b/ui/components/app/contact-list/recipient-group/recipient-group.component.js @@ -19,7 +19,10 @@ export default function RecipientGroup({ } return ( -
+
{label && (
{label} @@ -41,7 +44,10 @@ export default function RecipientGroup({ })} > -
+
{name || ellipsify(address)}
diff --git a/ui/components/app/edit-gas-display/edit-gas-display.component.js b/ui/components/app/edit-gas-display/edit-gas-display.component.js index ad41a8c11..07a201117 100644 --- a/ui/components/app/edit-gas-display/edit-gas-display.component.js +++ b/ui/components/app/edit-gas-display/edit-gas-display.component.js @@ -161,19 +161,23 @@ export default function EditGasDisplay({ } detail={ networkAndAccountSupport1559 && - estimatedMaximumFiat !== undefined && - t('editGasTotalBannerSubtitle', [ - - {estimatedMaximumFiat} - , - - {estimatedMaximumNative} - , - ]) + estimatedMaximumFiat !== undefined && ( + <> + + {t('editGasSubTextFeeLabel')} + + + {estimatedMaximumFiat} + + + {`(${estimatedMaximumNative})`} + + + ) } timing={ hasGasErrors === false && ( @@ -315,7 +319,7 @@ EditGasDisplay.propTypes = { gasErrors: PropTypes.object, gasWarnings: PropTypes.object, onManualChange: PropTypes.func, - minimumGasLimit: PropTypes.number, + minimumGasLimit: PropTypes.string, balanceError: PropTypes.bool, estimatesUnavailableWarning: PropTypes.bool, hasGasErrors: PropTypes.bool, diff --git a/ui/components/app/gas-timing/gas-timing.component.js b/ui/components/app/gas-timing/gas-timing.component.js index 4f34141f2..0f28ea7dc 100644 --- a/ui/components/app/gas-timing/gas-timing.component.js +++ b/ui/components/app/gas-timing/gas-timing.component.js @@ -126,7 +126,6 @@ export default function GasTiming({ let text = ''; let attitude = 'positive'; - let fontWeight = FONT_WEIGHT.NORMAL; // Anything medium or faster is positive if ( @@ -159,7 +158,6 @@ export default function GasTiming({ customEstimatedTime === 'unknown' || customEstimatedTime?.upperTimeBound === 'unknown' ) { - fontWeight = FONT_WEIGHT.BOLD; text = unknownProcessingTimeText; } else { text = t('gasTimingNegative', [ @@ -167,16 +165,23 @@ export default function GasTiming({ ]); } } else { - text = t('gasTimingNegative', [ - toHumanReadableTime(low.maxWaitTimeEstimate, t), - ]); + text = ( + <> + {t('gasTimingNegative', [ + toHumanReadableTime(low.maxWaitTimeEstimate, t), + ])} + + + ); } } return ( { - try { - return new URL(blockExplorerUrl)?.hostname; - } catch (err) { - return ''; - } - }; + const blockExplorerUrlSubTitle = getURLHostName(blockExplorerUrl); const openFullscreenEvent = useMetricEvent({ eventOpts: { @@ -71,12 +65,11 @@ export default function AccountOptionsMenu({ anchorElement, onClose }) { properties: { link_type: 'Account Tracker', action: 'Account Options', - block_explorer_domain: addressLink ? new URL(addressLink)?.hostname : '', + block_explorer_domain: getURLHostName(addressLink), }, }); const isRemovable = keyring.type !== 'HD Key Tree'; - const blockExplorerUrlSubTitle = getBlockExplorerUrlHost(); return ( ; + } else if (isLast) { + return
; + } + return ( + <> +
+
+ + ); +} + +Connector.propTypes = { + isFirst: PropTypes.boolean, + isLast: PropTypes.boolean, +}; + export default function RadioGroup({ options, name, selectedValue, onChange }) { const t = useContext(I18nContext); + const hasRecommendation = Boolean( + options.find((option) => option.recommended), + ); + return ( -
- {options.map((option) => { +
+ {options.map((option, index) => { const checked = option.value === selectedValue; return (
-
diff --git a/ui/css/design-system/attributes.scss b/ui/css/design-system/attributes.scss index 72fdcb51f..d2836769b 100644 --- a/ui/css/design-system/attributes.scss +++ b/ui/css/design-system/attributes.scss @@ -70,3 +70,4 @@ $directions: top, right, bottom, left; $display: block, grid, flex, inline-block, inline-grid, inline-flex, list-item; $text-align: left, right, center, justify, end; $font-weight: bold, normal, 100, 200, 300, 400, 500, 600, 700, 800, 900; +$font-style: normal, italic, oblique; diff --git a/ui/helpers/constants/design-system.js b/ui/helpers/constants/design-system.js index 38e85f779..9716b5567 100644 --- a/ui/helpers/constants/design-system.js +++ b/ui/helpers/constants/design-system.js @@ -10,6 +10,7 @@ export const COLORS = { UI3: 'ui-3', UI4: 'ui-4', BLACK: 'black', + GRAY: 'gray', WHITE: 'white', PRIMARY1: 'primary-1', PRIMARY2: 'primary-2', @@ -156,6 +157,12 @@ export const FONT_WEIGHT = { 900: 900, }; +export const FONT_STYLE = { + ITALIC: 'italic', + NORMAL: 'normal', + OBLIQUE: 'oblique', +}; + export const SEVERITIES = { DANGER: 'danger', WARNING: 'warning', diff --git a/ui/helpers/utils/fetch-with-cache.test.js b/ui/helpers/utils/fetch-with-cache.test.js index 7244e1d14..76e7ebd01 100644 --- a/ui/helpers/utils/fetch-with-cache.test.js +++ b/ui/helpers/utils/fetch-with-cache.test.js @@ -79,7 +79,10 @@ describe('Fetch with cache', () => { {}, { timeout: 20 }, ), - ).rejects.toThrow({ name: 'AbortError', message: 'Aborted' }); + ).rejects.toThrow({ + name: 'AbortError', + message: 'The user aborted a request.', + }); }); it('throws when the response is unsuccessful', async () => { diff --git a/ui/helpers/utils/util.js b/ui/helpers/utils/util.js index 1a02e930a..83c94a944 100644 --- a/ui/helpers/utils/util.js +++ b/ui/helpers/utils/util.js @@ -379,3 +379,19 @@ export function bnLessThanEqualTo(a, b) { } return new BigNumber(a, 10).lte(b, 10); } + +export function getURL(url) { + try { + return new URL(url); + } catch (err) { + return ''; + } +} + +export function getURLHost(url) { + return getURL(url)?.host || ''; +} + +export function getURLHostName(url) { + return getURL(url)?.hostname || ''; +} diff --git a/ui/pages/add-token/add-token.component.js b/ui/pages/add-token/add-token.component.js index 57852de20..a2cf0a702 100644 --- a/ui/pages/add-token/add-token.component.js +++ b/ui/pages/add-token/add-token.component.js @@ -1,7 +1,10 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { getTokenTrackerLink } from '@metamask/etherscan-link'; -import { checkExistingAddresses } from '../../helpers/utils/util'; +import { + checkExistingAddresses, + getURLHostName, +} 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'; @@ -262,7 +265,7 @@ class AddToken extends Component { { blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null }, ); const blockExplorerLabel = rpcPrefs?.blockExplorerUrl - ? new URL(blockExplorerTokenLink).hostname + ? getURLHostName(blockExplorerTokenLink) : this.context.t('etherscan'); return ( diff --git a/ui/pages/add-token/add-token.stories.js b/ui/pages/add-token/add-token.stories.js new file mode 100644 index 000000000..56906f890 --- /dev/null +++ b/ui/pages/add-token/add-token.stories.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { boolean } from '@storybook/addon-knobs'; + +import AddToken from './add-token.component'; + +export default { + title: 'Add Token', +}; + +export const AddTokenComponent = () => { + return ; +}; diff --git a/ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.stories.js b/ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.stories.js new file mode 100644 index 000000000..a64886737 --- /dev/null +++ b/ui/pages/add-token/token-list/token-list-placeholder/token-list-placeholder.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import TokenListPlaceholder from './token-list-placeholder.component'; + +export default { + title: 'TokenListPlaceholder', +}; + +export const TokenListPlaceholderComponent = () => { + return ; +}; diff --git a/ui/pages/add-token/token-search/token-search.stories.js b/ui/pages/add-token/token-search/token-search.stories.js new file mode 100644 index 000000000..2f60f4555 --- /dev/null +++ b/ui/pages/add-token/token-search/token-search.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import TokenSearch from './token-search.component'; + +export default { + title: 'TokenSearch', +}; + +export const TokenSearchComponent = () => { + return ; +}; diff --git a/ui/pages/asset/components/native-asset.js b/ui/pages/asset/components/native-asset.js index 6d17f512c..11fd1cc4d 100644 --- a/ui/pages/asset/components/native-asset.js +++ b/ui/pages/asset/components/native-asset.js @@ -13,6 +13,7 @@ import { } from '../../../selectors/selectors'; import { showModal } from '../../../store/actions'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; +import { getURLHostName } from '../../../helpers/utils/util'; import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; import AssetNavigation from './asset-navigation'; import AssetOptions from './asset-options'; @@ -35,7 +36,7 @@ export default function NativeAsset({ nativeCurrency }) { properties: { link_type: 'Account Tracker', action: 'Asset Options', - block_explorer_domain: accountLink ? new URL(accountLink)?.hostname : '', + block_explorer_domain: getURLHostName(accountLink), }, }); diff --git a/ui/pages/asset/components/token-asset.js b/ui/pages/asset/components/token-asset.js index c5b6410c0..e48d0168f 100644 --- a/ui/pages/asset/components/token-asset.js +++ b/ui/pages/asset/components/token-asset.js @@ -11,6 +11,7 @@ import { getRpcPrefsForCurrentProvider, } from '../../../selectors/selectors'; import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; +import { getURLHostName } from '../../../helpers/utils/util'; import { showModal } from '../../../store/actions'; import { useNewMetricEvent } from '../../../hooks/useMetricEvent'; @@ -39,9 +40,7 @@ export default function TokenAsset({ token }) { properties: { link_type: 'Token Tracker', action: 'Token Options', - block_explorer_domain: tokenTrackerLink - ? new URL(tokenTrackerLink)?.hostname - : '', + block_explorer_domain: getURLHostName(tokenTrackerLink), }, }); diff --git a/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js new file mode 100644 index 000000000..ce7979472 --- /dev/null +++ b/ui/pages/confirm-add-suggested-token/confirm-add-suggested-token.stories.js @@ -0,0 +1,47 @@ +/* eslint-disable react/prop-types */ +import React, { useEffect } from 'react'; +import { text } from '@storybook/addon-knobs'; +import { store } from '../../../.storybook/preview'; +import { suggestedTokens } from '../../../.storybook/initial-states/approval-screens/add-suggested-token'; +import { updateMetamaskState } from '../../store/actions'; +import ConfirmAddSuggestedToken from '.'; + +export default { + title: 'Confirmation Screens', +}; + +const PageSet = ({ children }) => { + const symbol = text('symbol', 'META'); + const image = text('Icon URL', 'metamark.svg'); + + const state = store.getState(); + const suggestedTokensState = state.metamask.suggestedTokens; + + useEffect(() => { + suggestedTokensState[ + '0x6b175474e89094c44da98b954eedeac495271d0f' + ].symbol = symbol; + store.dispatch( + updateMetamaskState({ suggestedTokens: suggestedTokensState }), + ); + }, [symbol, suggestedTokensState]); + useEffect(() => { + suggestedTokensState[ + '0x6b175474e89094c44da98b954eedeac495271d0f' + ].image = image; + store.dispatch( + updateMetamaskState({ suggestedTokens: suggestedTokensState }), + ); + }, [image, suggestedTokensState]); + + return children; +}; + +export const AddSuggestedToken = () => { + store.dispatch(updateMetamaskState({ suggestedTokens, pendingTokens: {} })); + return ( + + + + ); +}; diff --git a/ui/pages/confirm-add-token/confirm-add-token.stories.js b/ui/pages/confirm-add-token/confirm-add-token.stories.js new file mode 100644 index 000000000..e46e3ab37 --- /dev/null +++ b/ui/pages/confirm-add-token/confirm-add-token.stories.js @@ -0,0 +1,38 @@ +/* eslint-disable react/prop-types */ +import React, { useEffect } from 'react'; + +import { createBrowserHistory } from 'history'; +import { text } from '@storybook/addon-knobs'; +import { store } from '../../../.storybook/preview'; +import { tokens } from '../../../.storybook/initial-states/approval-screens/add-token'; +import { updateMetamaskState } from '../../store/actions'; +import ConfirmAddToken from '.'; + +export default { + title: 'Confirmation Screens', +}; + +const history = createBrowserHistory(); + +const PageSet = ({ children }) => { + const symbol = text('symbol', 'TRDT'); + const state = store.getState(); + const pendingTokensState = state.metamask.pendingTokens; + // only change the first token in the list + useEffect(() => { + const pendingTokens = { ...pendingTokensState }; + pendingTokens['0x33f90dee07c6e8b9682dd20f73e6c358b2ed0f03'].symbol = symbol; + store.dispatch(updateMetamaskState({ pendingTokens })); + }, [symbol, pendingTokensState]); + + return children; +}; + +export const AddToken = () => { + store.dispatch(updateMetamaskState({ pendingTokens: tokens })); + return ( + + + + ); +}; diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js index e8230a9f5..d589eb4c6 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import UrlIcon from '../../../components/ui/url-icon'; -import { addressSummary } from '../../../helpers/utils/util'; +import { addressSummary, getURLHostName } from '../../../helpers/utils/util'; import { formatCurrency } from '../../../helpers/utils/confirm-tx.util'; import { ConfirmPageContainerWarning } from '../../../components/app/confirm-page-container/confirm-page-container-content'; import Typography from '../../../components/ui/typography'; @@ -256,7 +256,7 @@ export default class ConfirmApproveContent extends Component {
diff --git a/ui/pages/confirm-send-ether/confirm-send-ether.stories.js b/ui/pages/confirm-send-ether/confirm-send-ether.stories.js new file mode 100644 index 000000000..92efb0aee --- /dev/null +++ b/ui/pages/confirm-send-ether/confirm-send-ether.stories.js @@ -0,0 +1,56 @@ +import React, { useEffect } from 'react'; + +import { select } from '@storybook/addon-knobs'; +import { store } from '../../../.storybook/preview'; +import { updateTransactionParams } from '../../store/actions'; +import ConfirmSendEther from '.'; + +export default { + title: 'Confirmation Screens', +}; + +// transaction id for redux dispatcher +const id = 3111025347726181; + +const PageSet = ({ children }) => { + const options = []; + const receiverOptions = { + 'Address 1': '0xaD6D458402F60fD3Bd25163575031ACDce07538D', + 'Address 2': '0x55e0bfb2d400e9be8cf9b114e38a40969a02f69a', + }; + const state = store.getState(); + const { identities } = state.metamask; + Object.keys(identities).forEach(function (key) { + options.push({ + label: identities[key].name, + address: key, + }); + }); + const sender = select('Sender', options, options[0]); + const receiver = select( + 'Receiver', + receiverOptions, + '0xaD6D458402F60fD3Bd25163575031ACDce07538D', + ); + + const confirmTransactionState = state.confirmTransaction.txData.txParams; + + useEffect(() => { + confirmTransactionState.from = sender.address; + store.dispatch(updateTransactionParams(id, confirmTransactionState)); + }, [sender, confirmTransactionState]); + + useEffect(() => { + confirmTransactionState.to = receiver; + store.dispatch(updateTransactionParams(id, confirmTransactionState)); + }, [receiver, confirmTransactionState]); + return children; +}; + +export const SendEther = () => { + return ( + + + + ); +}; diff --git a/ui/pages/confirm-send-token/confirm-send-token.stories.js b/ui/pages/confirm-send-token/confirm-send-token.stories.js new file mode 100644 index 000000000..b3418d4ad --- /dev/null +++ b/ui/pages/confirm-send-token/confirm-send-token.stories.js @@ -0,0 +1,18 @@ +import React from 'react'; +import ConfirmSendToken from './confirm-send-token.component'; + +export default { + title: 'Confirmation Screens', +}; + +const PageSet = ({ children }) => { + return children; +}; + +export const SendToken = () => { + return ( + + + + ); +}; diff --git a/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.stories.js b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.stories.js new file mode 100644 index 000000000..a1d22cd22 --- /dev/null +++ b/ui/pages/confirm-token-transaction-base/confirm-token-transaction-base.stories.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { store } from '../../../.storybook/preview'; +import ConfirmTokenTransactionBase from './confirm-token-transaction-base.component'; + +export default { + title: 'Confirmation Screens', +}; + +const state = store.getState(); + +export const ConfirmTokenTransaction = () => { + const { metamask, confirmTransaction } = state; + const { currentCurrency } = metamask; + const { fiatTransactionTotal } = confirmTransaction; + return ( + + ); +}; diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 84080d842..8f6751c4a 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -36,7 +36,11 @@ import InfoTooltip from '../../components/ui/info-tooltip/info-tooltip'; import LoadingHeartBeat from '../../components/ui/loading-heartbeat'; import GasTiming from '../../components/app/gas-timing/gas-timing.component'; -import { COLORS } from '../../helpers/constants/design-system'; +import { + COLORS, + FONT_STYLE, + TYPOGRAPHY, +} from '../../helpers/constants/design-system'; import { disconnectGasFeeEstimatePoller, getGasFeeEstimatesAndStartPolling, @@ -44,6 +48,8 @@ import { removePollingTokenFromAppState, } from '../../store/actions'; +import Typography from '../../components/ui/typography/typography'; + const renderHeartBeatIfNotInTest = () => process.env.IN_TEST === 'true' ? null : ; @@ -116,6 +122,7 @@ export default class ConfirmTransactionBase extends Component { maxFeePerGas: PropTypes.string, maxPriorityFeePerGas: PropTypes.string, baseFeePerGas: PropTypes.string, + isMainnet: PropTypes.bool, gasFeeIsCustom: PropTypes.bool, }; @@ -295,17 +302,10 @@ export default class ConfirmTransactionBase extends Component { primaryTotalTextOverrideMaxAmount, maxFeePerGas, maxPriorityFeePerGas, + isMainnet, } = this.props; const { t } = this.context; - const getRequestingOrigin = () => { - try { - return new URL(txData.origin)?.hostname; - } catch (err) { - return ''; - } - }; - const renderTotalMaxAmount = () => { if ( primaryTotalTextOverrideMaxAmount === undefined && @@ -315,6 +315,7 @@ export default class ConfirmTransactionBase extends Component { return ( @@ -335,6 +336,7 @@ export default class ConfirmTransactionBase extends Component { return ( @@ -353,6 +355,7 @@ export default class ConfirmTransactionBase extends Component { return ( @@ -403,9 +406,7 @@ export default class ConfirmTransactionBase extends Component { detailTitle={ txData.dappSuggestedGasFees ? ( <> - {t('transactionDetailDappGasHeading', [ - getRequestingOrigin(), - ])} + {t('transactionDetailGasHeading')} -

{t('transactionDetailGasTooltipIntro')}

+

+ {t('transactionDetailGasTooltipIntro', [ + isMainnet ? t('networkNameEthereum') : '', + ])} +

{t('transactionDetailGasTooltipExplanation')}

) } - detailTitleColor={ - txData.dappSuggestedGasFees ? COLORS.SECONDARY1 : COLORS.BLACK - } + detailTitleColor={COLORS.BLACK} detailText={

, ])} subTitle={ - + {txData.dappSuggestedGasFees ? ( + + {t('transactionDetailDappGasMoreInfo')} + + ) : ( + '' )} - maxFeePerGas={hexWEIToDecGWEI( - maxFeePerGas || txData.txParams.maxFeePerGas, - )} - /> + + } />, { + return children; +}; + +export const ConfirmTransactionBaseComponent = () => { + return ( + + + + ); +}; diff --git a/ui/pages/connected-accounts/connected-accounts.component.js b/ui/pages/connected-accounts/connected-accounts.component.js index 5b9e5f06f..ad40257a9 100644 --- a/ui/pages/connected-accounts/connected-accounts.component.js +++ b/ui/pages/connected-accounts/connected-accounts.component.js @@ -3,6 +3,7 @@ import React, { PureComponent } from 'react'; import Popover from '../../components/ui/popover'; import ConnectedAccountsList from '../../components/app/connected-accounts-list'; import ConnectedAccountsPermissions from '../../components/app/connected-accounts-permissions'; +import { getURLHost } from '../../helpers/utils/util'; export default class ConnectedAccounts extends PureComponent { static contextTypes = { @@ -54,7 +55,7 @@ export default class ConnectedAccounts extends PureComponent { title={ isActiveTabExtension ? t('currentExtension') - : new URL(activeTabOrigin).host + : getURLHost(activeTabOrigin) } subtitle={ connectedAccounts.length diff --git a/ui/pages/connected-accounts/connected-accounts.stories.js b/ui/pages/connected-accounts/connected-accounts.stories.js new file mode 100644 index 000000000..dfd343ac1 --- /dev/null +++ b/ui/pages/connected-accounts/connected-accounts.stories.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import ConnectedAccounts from './connected-accounts.component'; + +export default { + title: 'Connected Accounts', +}; + +const account = [ + { + name: 'Account 1', + address: '0x983211ce699ea5ab57cc528086154b6db1ad8e55', + }, +]; +const identities = { + name: 'Account 1', + address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4', +}; +export const ConnectedAccountComponent = () => { + return ( + + ); +}; diff --git a/ui/pages/connected-sites/connected-sites.stories.js b/ui/pages/connected-sites/connected-sites.stories.js new file mode 100644 index 000000000..6a95d1027 --- /dev/null +++ b/ui/pages/connected-sites/connected-sites.stories.js @@ -0,0 +1,19 @@ +import React from 'react'; + +import ConnectedSites from '.'; + +export default { + title: 'Connected Sites', +}; + +const PageSet = ({ children }) => { + return children; +}; + +export const ConnectedSitesComponent = () => { + return ( + + + + ); +}; diff --git a/ui/pages/create-account/connect-hardware/account-list.js b/ui/pages/create-account/connect-hardware/account-list.js index a3bb775df..96a31bd05 100644 --- a/ui/pages/create-account/connect-hardware/account-list.js +++ b/ui/pages/create-account/connect-hardware/account-list.js @@ -7,6 +7,8 @@ import Checkbox from '../../../components/ui/check-box'; import Dropdown from '../../../components/ui/dropdown'; import Popover from '../../../components/ui/popover'; +import { getURLHostName } from '../../../helpers/utils/util'; + class AccountList extends Component { state = { showPopover: false, @@ -143,9 +145,7 @@ class AccountList extends Component { properties: { actions: 'Hardware Connect', link_type: 'Account Tracker', - block_explorer_domain: accountLink - ? new URL(accountLink)?.hostname - : '', + block_explorer_domain: getURLHostName(accountLink), }, }); global.platform.openTab({ diff --git a/ui/pages/create-account/import-account/index.js b/ui/pages/create-account/import-account/index.js index 9c2a38b44..4f94f0965 100644 --- a/ui/pages/create-account/import-account/index.js +++ b/ui/pages/create-account/import-account/index.js @@ -36,41 +36,44 @@ export default class AccountImportSubview extends Component { render() { const menuItems = this.getMenuItemTexts(); const { type } = this.state; + const { t } = this.context; return ( -
-
- {this.context.t('importAccountMsg')} - { - global.platform.openTab({ - url: - 'https://metamask.zendesk.com/hc/en-us/articles/360015289932', - }); - }} - > - {this.context.t('here')} - -
-
-
- {this.context.t('selectType')} + <> +
+
Import Account
+
+ {t('importAccountMsg')} + { + global.platform.openTab({ + url: + 'https://metamask.zendesk.com/hc/en-us/articles/360015289932', + }); + }} + > + {t('here')} +
- ({ value: text }))} - selectedOption={type || menuItems[0]} - onChange={(value) => { - this.setState({ type: value }); - }} - />
- {this.renderImportView()} -
+
+
+
+ {t('selectType')} +
+ ({ value: text }))} + selectedOption={type || menuItems[0]} + onChange={(value) => { + this.setState({ type: value }); + }} + /> +
+ {this.renderImportView()} +
+ ); } } diff --git a/ui/pages/create-account/import-account/index.scss b/ui/pages/create-account/import-account/index.scss index 1e5efe7f0..91580b70a 100644 --- a/ui/pages/create-account/import-account/index.scss +++ b/ui/pages/create-account/import-account/index.scss @@ -1,11 +1,7 @@ -.new-account-import-disclaimer { - @include H7; - - width: 120%; - background-color: #f4f9fc; - display: inline-block; - align-items: center; - padding: 20px 30px 20px; +.new-account-info-link { + cursor: pointer; + text-decoration: underline; + color: $primary-blue; } .new-account-import-form { diff --git a/ui/pages/create-account/import-account/json.js b/ui/pages/create-account/import-account/json.js index afaeb7751..1aa35c493 100644 --- a/ui/pages/create-account/import-account/json.js +++ b/ui/pages/create-account/import-account/json.js @@ -102,9 +102,10 @@ class JsonImportSubview extends Component { setSelectedAddress, } = this.props; const { fileContents } = this.state; + const { t } = this.context; if (!fileContents) { - const message = this.context.t('needImportFile'); + const message = t('needImportFile'); displayWarning(message); return; } @@ -124,7 +125,7 @@ class JsonImportSubview extends Component { }); displayWarning(null); } else { - displayWarning('Error importing account.'); + displayWarning(t('importAccountError')); this.context.metricsEvent({ eventOpts: { category: 'Accounts', diff --git a/ui/pages/create-account/import-account/private-key.js b/ui/pages/create-account/import-account/private-key.js index c360424be..507fb09f6 100644 --- a/ui/pages/create-account/import-account/private-key.js +++ b/ui/pages/create-account/import-account/private-key.js @@ -38,6 +38,7 @@ class PrivateKeyImportView extends Component { setSelectedAddress, firstAddress, } = this.props; + const { t } = this.context; importNewAccount('Private Key', [privateKey]) .then(({ selectedAddress }) => { @@ -52,7 +53,7 @@ class PrivateKeyImportView extends Component { history.push(mostRecentOverviewPage); displayWarning(null); } else { - displayWarning('Error importing account.'); + displayWarning(t('importAccountError')); this.context.metricsEvent({ eventOpts: { category: 'Accounts', diff --git a/ui/pages/create-account/new-account.stories.js b/ui/pages/create-account/new-account.stories.js new file mode 100644 index 000000000..b7a3f1dbd --- /dev/null +++ b/ui/pages/create-account/new-account.stories.js @@ -0,0 +1,11 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import NewAccountCreateForm from './new-account.component'; + +export default { + title: 'New Account', +}; + +export const NewAccountComponent = () => { + return ; +}; diff --git a/ui/pages/first-time-flow/create-password/create-password.stories.js b/ui/pages/first-time-flow/create-password/create-password.stories.js new file mode 100644 index 000000000..1bc453e36 --- /dev/null +++ b/ui/pages/first-time-flow/create-password/create-password.stories.js @@ -0,0 +1,16 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import ImportWithSeedPhrase from './import-with-seed-phrase/import-with-seed-phrase.component'; +import NewAccount from './new-account'; + +export default { + title: 'Create Password', +}; + +export const ImportWithSeedPhraseComponent = () => { + return ; +}; + +export const NewAccountComponent = () => { + return ; +}; diff --git a/ui/pages/first-time-flow/end-of-flow/end-of-flow.stories.js b/ui/pages/first-time-flow/end-of-flow/end-of-flow.stories.js new file mode 100644 index 000000000..d8fa4c53b --- /dev/null +++ b/ui/pages/first-time-flow/end-of-flow/end-of-flow.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import EndOfFlowScreen from './end-of-flow.component'; + +export default { + title: 'First Time Flow', +}; + +export const EndOfFlowComponent = () => { + return ; +}; diff --git a/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.stories.js b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.stories.js new file mode 100644 index 000000000..e839ccf7c --- /dev/null +++ b/ui/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.stories.js @@ -0,0 +1,15 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import MetaMetricsOptIn from './metametrics-opt-in.component'; + +export default { + title: 'First Time Flow', +}; + +export const MetaMetricsOptInComponent = () => { + return ( + + ); +}; 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 index 304339967..0930eb995 100644 --- 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 @@ -24,6 +24,19 @@ export default function SeedPhraseIntro() { history.push(INITIALIZE_SEED_PHRASE_ROUTE); }; + const subtitles = { + en: 'English', + es: 'Spanish', + hi: 'Hindi', + id: 'Indonesian', + ja: 'Japanese', + ko: 'Korean', + pt: 'Portuguese', + ru: 'Russian', + tl: 'Tagalog', + vi: 'Vietnamese', + }; + return (
@@ -49,13 +62,18 @@ export default function SeedPhraseIntro() { type="video/webm" src="./images/videos/recovery-onboarding/video.webm" /> - + {Object.keys(subtitles).map((key) => { + return ( + + ); + })} diff --git a/ui/pages/first-time-flow/select-action/select-action.stories.js b/ui/pages/first-time-flow/select-action/select-action.stories.js new file mode 100644 index 000000000..8dbe98772 --- /dev/null +++ b/ui/pages/first-time-flow/select-action/select-action.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import SelectAction from './select-action.component'; + +export default { + title: 'First Time Flow', +}; + +export const SelectActionComponent = () => { + return ; +}; diff --git a/ui/pages/first-time-flow/welcome/welcome.stories.js b/ui/pages/first-time-flow/welcome/welcome.stories.js new file mode 100644 index 000000000..5a2fd57a7 --- /dev/null +++ b/ui/pages/first-time-flow/welcome/welcome.stories.js @@ -0,0 +1,10 @@ +import React from 'react'; +import Welcome from './welcome.component'; + +export default { + title: 'First Time Flow', +}; + +export const WelcomeComponent = () => { + return ; +}; diff --git a/ui/pages/mobile-sync/mobile-sync.component.js b/ui/pages/mobile-sync/mobile-sync.component.js index 0eab239dd..5f4e2ee40 100644 --- a/ui/pages/mobile-sync/mobile-sync.component.js +++ b/ui/pages/mobile-sync/mobile-sync.component.js @@ -28,6 +28,7 @@ export default class MobileSyncPage extends Component { requestRevealSeedWords: PropTypes.func.isRequired, exportAccounts: PropTypes.func.isRequired, keyrings: PropTypes.array, + hideWarning: PropTypes.func.isRequired, }; state = { @@ -200,9 +201,9 @@ export default class MobileSyncPage extends Component { sendByPost: false, // true to send via post storeInHistory: false, }, - (status, response) => { + (status, _response) => { if (status.error) { - reject(response); + reject(status.errorData); } else { resolve(); } @@ -224,6 +225,7 @@ export default class MobileSyncPage extends Component { preferences, transactions, } = await this.props.fetchInfoToSync(); + const { t } = this.context; const allDataStr = JSON.stringify({ accounts, @@ -244,7 +246,7 @@ export default class MobileSyncPage extends Component { await this.sendMessage(chunks[i], i + 1, totalChunks); } } catch (e) { - this.props.displayWarning('Sync failed :('); + this.props.displayWarning(`${t('syncFailed')} :(`); this.setState({ syncing: false }); this.syncing = false; this.notifyError(e.toString()); @@ -265,9 +267,9 @@ export default class MobileSyncPage extends Component { sendByPost: false, // true to send via post storeInHistory: false, }, - (status, response) => { + (status, _response) => { if (status.error) { - reject(response); + reject(status.errorData); } else { resolve(); } @@ -277,6 +279,9 @@ export default class MobileSyncPage extends Component { } componentWillUnmount() { + if (this.state.error) { + this.props.hideWarning(); + } this.clearTimeouts(); this.disconnectWebsockets(); } diff --git a/ui/pages/mobile-sync/mobile-sync.container.js b/ui/pages/mobile-sync/mobile-sync.container.js index 1172a97dc..9f70adae9 100644 --- a/ui/pages/mobile-sync/mobile-sync.container.js +++ b/ui/pages/mobile-sync/mobile-sync.container.js @@ -4,6 +4,7 @@ import { requestRevealSeedWords, fetchInfoToSync, exportAccounts, + hideWarning, } from '../../store/actions'; import { getMostRecentOverviewPage } from '../../ducks/history/history'; import { getMetaMaskKeyrings } from '../../selectors'; @@ -17,6 +18,7 @@ const mapDispatchToProps = (dispatch) => { displayWarning: (message) => dispatch(displayWarning(message || null)), exportAccounts: (password, addresses) => dispatch(exportAccounts(password, addresses)), + hideWarning: () => dispatch(hideWarning()), }; }; diff --git a/ui/pages/mobile-sync/mobile-sync.stories.js b/ui/pages/mobile-sync/mobile-sync.stories.js new file mode 100644 index 000000000..79c0e3730 --- /dev/null +++ b/ui/pages/mobile-sync/mobile-sync.stories.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import MobileSyncPage from './mobile-sync.component'; + +export default { + title: 'Mobile Sync', +}; + +export const MobileSyncComponent = () => { + return ( + + ); +}; diff --git a/ui/pages/permissions-connect/permissions-connect.stories.js b/ui/pages/permissions-connect/permissions-connect.stories.js new file mode 100644 index 000000000..9307842bf --- /dev/null +++ b/ui/pages/permissions-connect/permissions-connect.stories.js @@ -0,0 +1,82 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import { PermissionPageContainerContent } from '../../components/app/permission-page-container'; +import PermissionsConnectFooter from '../../components/app/permissions-connect-footer'; +import { PageContainerFooter } from '../../components/ui/page-container'; +import ChooseAccount from './choose-account'; + +export default { + title: 'Permissions Connect', +}; + +export const ChooseAccountComponent = () => { + return ( + + ); +}; + +export const PermissionPageContainerComponent = () => { + return ( +
+ +
+ + +
+
+ ); +}; diff --git a/ui/pages/send/send-content/add-recipient/ens-input.component.js b/ui/pages/send/send-content/add-recipient/ens-input.component.js index f2e84dc49..abb3788e3 100644 --- a/ui/pages/send/send-content/add-recipient/ens-input.component.js +++ b/ui/pages/send/send-content/add-recipient/ens-input.component.js @@ -36,15 +36,18 @@ export default class EnsInput extends Component { } onPaste = (event) => { - event.clipboardData.items[0].getAsString((text) => { - const input = text.trim(); - if ( - !isBurnAddress(input) && - isValidHexAddress(input, { mixedCaseUseChecksum: true }) - ) { - this.props.onPaste(input); - } - }); + if (event.clipboardData.items?.length) { + const clipboardItem = event.clipboardData.items[0]; + clipboardItem?.getAsString((text) => { + const input = text.trim(); + if ( + !isBurnAddress(input) && + isValidHexAddress(input, { mixedCaseUseChecksum: true }) + ) { + this.props.onPaste(input); + } + }); + } }; onChange = ({ target: { value } }) => { diff --git a/ui/pages/send/send-content/send-content.stories.js b/ui/pages/send/send-content/send-content.stories.js new file mode 100644 index 000000000..345543a76 --- /dev/null +++ b/ui/pages/send/send-content/send-content.stories.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { boolean, text } from '@storybook/addon-knobs'; + +import SendContent from './send-content.component'; + +export default { + title: 'SendContent', +}; + +export const SendContentComponent = () => { + return ( + + ); +}; diff --git a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js new file mode 100644 index 000000000..7f4c85e63 --- /dev/null +++ b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import { number, boolean } from '@storybook/addon-knobs'; +import GasFeeDisplay from './gas-fee-display.component'; + +export default { + title: 'GasFeeDisplay', +}; + +export const GasFeeDisplayComponent = () => { + const gasTotal = number('Gas Total', 10000000000); + return ( + + ); +}; diff --git a/ui/pages/send/send-header/send-header.component.js b/ui/pages/send/send-header/send-header.component.js index e77c2c012..8b5d54c51 100644 --- a/ui/pages/send/send-header/send-header.component.js +++ b/ui/pages/send/send-header/send-header.component.js @@ -28,7 +28,7 @@ export default function SendHeader() { let title = asset.type === ASSET_TYPES.NATIVE ? t('send') : t('sendTokens'); if (stage === SEND_STAGES.ADD_RECIPIENT || stage === SEND_STAGES.INACTIVE) { - title = t('addRecipient'); + title = t('sendTo'); } else if (stage === SEND_STAGES.EDIT) { title = t('edit'); } diff --git a/ui/pages/send/send-header/send-header.component.test.js b/ui/pages/send/send-header/send-header.component.test.js index 02598756d..6d61a1ea3 100644 --- a/ui/pages/send/send-header/send-header.component.test.js +++ b/ui/pages/send/send-header/send-header.component.test.js @@ -21,7 +21,7 @@ jest.mock('react-router-dom', () => { describe('SendHeader Component', () => { describe('Title', () => { - it('should render "Add Recipient" for INACTIVE or ADD_RECIPIENT stages', () => { + it('should render "Send to" for INACTIVE or ADD_RECIPIENT stages', () => { const { getByText, rerender } = renderWithProvider( , configureMockStore(middleware)({ @@ -30,7 +30,7 @@ describe('SendHeader Component', () => { history: { mostRecentOverviewPage: 'activity' }, }), ); - expect(getByText('Add Recipient')).toBeTruthy(); + expect(getByText('Send to')).toBeTruthy(); rerender( , configureMockStore(middleware)({ @@ -39,7 +39,7 @@ describe('SendHeader Component', () => { history: { mostRecentOverviewPage: 'activity' }, }), ); - expect(getByText('Add Recipient')).toBeTruthy(); + expect(getByText('Send to')).toBeTruthy(); }); it('should render "Send" for DRAFT stage when asset type is NATIVE', () => { diff --git a/ui/pages/send/send.scss b/ui/pages/send/send.scss index e416b41b2..36d26e6b6 100644 --- a/ui/pages/send/send.scss +++ b/ui/pages/send/send.scss @@ -136,6 +136,10 @@ &__title { @include H6; + max-width: 20em; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; color: $black; } diff --git a/ui/pages/send/send.test.js b/ui/pages/send/send.test.js index 5110a37e3..af638d1ea 100644 --- a/ui/pages/send/send.test.js +++ b/ui/pages/send/send.test.js @@ -124,11 +124,11 @@ describe('Send Page', () => { }); }); - describe('Add Recipient Flow', () => { - it('should render the header with Add Recipient displayed', () => { + describe('Send Flow', () => { + it('should render the header with Send to displayed', () => { const store = configureMockStore(middleware)(baseStore); const { getByText } = renderWithProvider(, store); - expect(getByText('Add Recipient')).toBeTruthy(); + expect(getByText('Send to')).toBeTruthy(); }); it('should render the EnsInput field', () => { @@ -146,7 +146,7 @@ describe('Send Page', () => { }); }); - describe('Send and Edit Flow', () => { + describe('Send and Edit Flow (draft)', () => { it('should render the header with Send displayed', () => { const store = configureMockStore(middleware)({ ...baseStore, diff --git a/ui/pages/settings/contact-list-tab/contact-list-tab.component.js b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js index a0651b817..2f4b135f0 100644 --- a/ui/pages/settings/contact-list-tab/contact-list-tab.component.js +++ b/ui/pages/settings/contact-list-tab/contact-list-tab.component.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; +import classnames from 'classnames'; import ContactList from '../../../components/app/contact-list'; import { CONTACT_ADD_ROUTE, @@ -68,12 +69,16 @@ export default class ContactListTab extends Component { } renderAddButton() { - const { history } = this.props; + const { history, viewingContact, editingContact } = this.props; return (
); diff --git a/ui/pages/swaps/build-quote/build-quote.js b/ui/pages/swaps/build-quote/build-quote.js index b894794ff..0a3b7b00b 100644 --- a/ui/pages/swaps/build-quote/build-quote.js +++ b/ui/pages/swaps/build-quote/build-quote.js @@ -43,6 +43,7 @@ import { hexToDecimal, } from '../../../helpers/utils/conversions.util'; import { calcTokenAmount } from '../../../helpers/utils/token-util'; +import { getURLHostName } from '../../../helpers/utils/util'; import { usePrevious } from '../../../hooks/usePrevious'; import { useTokenTracker } from '../../../hooks/useTokenTracker'; import { useTokenFiatAmount } from '../../../hooks/useTokenFiatAmount'; @@ -241,7 +242,7 @@ export default function BuildQuote({ ); const blockExplorerLabel = rpcPrefs.blockExplorerUrl - ? new URL(blockExplorerTokenLink).hostname + ? getURLHostName(blockExplorerTokenLink) : t('etherscan'); const blockExplorerLinkClickedEvent = useNewMetricEvent({ @@ -250,9 +251,7 @@ export default function BuildQuote({ properties: { link_type: 'Token Tracker', action: 'Swaps Confirmation', - block_explorer_domain: blockExplorerTokenLink - ? new URL(blockExplorerTokenLink)?.hostname - : '', + block_explorer_domain: getURLHostName(blockExplorerTokenLink), }, }); diff --git a/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js index cbc9de4aa..110505551 100644 --- a/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js +++ b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.js @@ -23,6 +23,7 @@ import { getRpcPrefsForCurrentProvider, } from '../../../selectors/selectors'; import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../shared/constants/swaps'; +import { getURLHostName } from '../../../helpers/utils/util'; export default function DropdownSearchList({ searchListClassName, @@ -138,7 +139,7 @@ export default function DropdownSearchList({ null; const blockExplorerLabel = rpcPrefs.blockExplorerUrl - ? new URL(blockExplorerLink).hostname + ? getURLHostName(blockExplorerLink) : t('etherscan'); const blockExplorerLinkClickedEvent = useNewMetricEvent({ @@ -147,9 +148,7 @@ export default function DropdownSearchList({ properties: { link_type: 'Token Tracker', action: 'Verify Contract Address', - block_explorer_domain: blockExplorerLink - ? new URL(blockExplorerLink)?.hostname - : '', + block_explorer_domain: getURLHostName(blockExplorerLink), }, }); diff --git a/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js index dacbc21a6..0dd6ac3b9 100644 --- a/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js +++ b/ui/pages/swaps/dropdown-search-list/dropdown-search-list.stories.js @@ -5,7 +5,7 @@ const tokens = [ { primaryLabel: 'MetaMark (META)', name: 'MetaMark', - iconUrl: '.storybook/images/metamark.svg', + iconUrl: 'metamark.svg', erc20: true, decimals: 18, symbol: 'META', @@ -14,7 +14,7 @@ const tokens = [ { primaryLabel: '0x (ZRX)', name: '0x', - iconUrl: '.storybook/images/0x.svg', + iconUrl: '0x.svg', erc20: true, symbol: 'ZRX', decimals: 18, @@ -23,7 +23,7 @@ const tokens = [ { primaryLabel: 'AirSwap Token (AST)', name: 'AirSwap Token', - iconUrl: '.storybook/images/AST.png', + iconUrl: 'AST.png', erc20: true, symbol: 'AST', decimals: 4, @@ -32,7 +32,7 @@ const tokens = [ { primaryLabel: 'Basic Attention Token (BAT)', name: 'Basic Attention Token', - iconUrl: '.storybook/images/BAT_icon.svg', + iconUrl: 'BAT_icon.svg', erc20: true, symbol: 'BAT', decimals: 18, @@ -41,7 +41,7 @@ const tokens = [ { primaryLabel: 'Civil Token (CVL)', name: 'Civil Token', - iconUrl: '.storybook/images/CVL_token.svg', + iconUrl: 'CVL_token.svg', erc20: true, symbol: 'CVL', decimals: 18, @@ -50,7 +50,7 @@ const tokens = [ { primaryLabel: 'Gladius (GLA)', name: 'Gladius', - iconUrl: '.storybook/images/gladius.svg', + iconUrl: 'gladius.svg', erc20: true, symbol: 'GLA', decimals: 8, @@ -59,7 +59,7 @@ const tokens = [ { primaryLabel: 'Gnosis Token (GNO)', name: 'Gnosis Token', - iconUrl: '.storybook/images/gnosis.svg', + iconUrl: 'gnosis.svg', erc20: true, symbol: 'GNO', decimals: 18, @@ -68,7 +68,7 @@ const tokens = [ { primaryLabel: 'OmiseGO (OMG)', name: 'OmiseGO', - iconUrl: '.storybook/images/omg.jpg', + iconUrl: 'omg.jpg', erc20: true, symbol: 'OMG', decimals: 18, @@ -77,7 +77,7 @@ const tokens = [ { primaryLabel: 'Sai Stablecoin v1.0 (SAI)', name: 'Sai Stablecoin v1.0', - iconUrl: '.storybook/images/sai.svg', + iconUrl: 'sai.svg', erc20: true, symbol: 'SAI', decimals: 18, @@ -86,7 +86,7 @@ const tokens = [ { primaryLabel: 'Tether USD (USDT)', name: 'Tether USD', - iconUrl: '.storybook/images/tether_usd.png', + iconUrl: 'tether_usd.png', erc20: true, symbol: 'USDT', decimals: 6, @@ -95,7 +95,7 @@ const tokens = [ { primaryLabel: 'WednesdayCoin (WED)', name: 'WednesdayCoin', - iconUrl: '.storybook/images/wed.png', + iconUrl: 'wed.png', erc20: true, symbol: 'WED', decimals: 18, @@ -104,7 +104,7 @@ const tokens = [ { primaryLabel: 'Wrapped BTC (WBTC)', name: 'Wrapped BTC', - iconUrl: '.storybook/images/wbtc.png', + iconUrl: 'wbtc.png', erc20: true, symbol: 'WBTC', decimals: 8, diff --git a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap index e10139024..6d1efdfaa 100644 --- a/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap +++ b/ui/pages/swaps/fee-card/__snapshots__/fee-card.test.js.snap @@ -52,7 +52,7 @@ exports[`FeeCard renders the component with EIP-1559 enabled 2`] = ` class="fee-card__info-tooltip-container" >
{ + const data = { + iconUrl: './BAT_icon.svg', + name: 'Basic Attention Token', + symbol: 'BAT', + address: '0x0d8775f648430679a709e98d2b0cb6250d2887ef', + }; + return ( + + ); +}; diff --git a/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js b/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js index 484e4ed65..13ee5afa8 100644 --- a/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js +++ b/ui/pages/swaps/searchable-item-list/item-list/item-list.component.js @@ -13,6 +13,7 @@ import { } from '../../../../selectors'; import { SWAPS_CHAINID_DEFAULT_BLOCK_EXPLORER_URL_MAP } from '../../../../../shared/constants/swaps'; import { useNewMetricEvent } from '../../../../hooks/useMetricEvent'; +import { getURLHostName } from '../../../../helpers/utils/util'; export default function ItemList({ results = [], @@ -36,7 +37,7 @@ export default function ItemList({ null; const blockExplorerLabel = rpcPrefs.blockExplorerUrl - ? new URL(blockExplorerLink).hostname + ? getURLHostName(blockExplorerLink) : t('etherscan'); const blockExplorerLinkClickedEvent = useNewMetricEvent({ @@ -45,9 +46,7 @@ export default function ItemList({ properties: { link_type: 'Token Tracker', action: 'Verify Contract Address', - block_explorer_domain: blockExplorerLink - ? new URL(blockExplorerLink)?.hostname - : '', + block_explorer_domain: getURLHostName(blockExplorerLink), }, }); diff --git a/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js new file mode 100644 index 000000000..c8d018fb2 --- /dev/null +++ b/ui/pages/swaps/swaps-gas-customization-modal/swaps-gas-customization-modal.stories.js @@ -0,0 +1,157 @@ +import React, { useEffect, useState } from 'react'; +import { Provider } from 'react-redux'; +import { number } from '@storybook/addon-knobs'; +import configureStore from '../../../store/store'; +import testData from '../../../../.storybook/test-data'; +import { formatETHFee } from '../../../helpers/utils/formatters'; +import { + addHexes, + getValueFromWeiHex, + getWeiHexFromDecimalValue, + sumHexWEIsToRenderableFiat, +} from '../../../helpers/utils/conversions.util'; +import { ETH } from '../../../helpers/constants/common'; +import { calcGasTotal, isBalanceSufficient } from '../../send/send.utils'; +import { conversionLessThan } from '../../../../shared/modules/conversion.utils'; +import GasModalPageContainer from './swaps-gas-customization-modal.component'; + +// Using Test Data For Redux +const store = configureStore(testData); + +export default { + title: 'Swap', + decorators: [(story) => {story()}], +}; + +// Convert Hex Wei to Decimal ETH +const sumHexWEIsToRenderableEth = (hexWEIs, currencySymbol = 'ETH') => { + const hexWEIsSum = hexWEIs.filter(Boolean).reduce(addHexes); + return formatETHFee( + getValueFromWeiHex({ + value: hexWEIsSum, + fromCurrency: currencySymbol, + toCurrency: currencySymbol, + numberOfDecimals: 6, + }), + currencySymbol, + ); +}; + +export const GasModalPageContainerComponent = () => { + // Send Amount Data + const hexWei = getWeiHexFromDecimalValue({ + value: String(number('Send Amount (this should be static)', 0.01)), + fromCurrency: ETH, + fromDenomination: ETH, + }); + + // ETH Balance + const balanceHexWei = getWeiHexFromDecimalValue({ + value: String(number('Wallet Balance (this should be static)', 1.582717)), + fromCurrency: ETH, + fromDenomination: ETH, + }); + + const sendAmount = sumHexWEIsToRenderableEth([hexWei, '0x0']); + const [gasLimit, setGasLimit] = useState('5208'); + const [gasPrice, setGasPrice] = useState('ee6b2800'); + const [transactionFee, setTransactionFee] = useState(''); + const [totalETH, setTotalETH] = useState(''); + const [totalFiat, setTotalFiat] = useState(''); + const [isInsufficientBalance, setIsInsufficientBalance] = useState(false); + + const { metamask } = store.getState(); + const { currentCurrency, conversionRate } = metamask; + + console.log('metamask', store.getState()); + + useEffect(() => { + // Transfer Fee + const customGasTotal = calcGasTotal(gasLimit, gasPrice); + setTransactionFee(sumHexWEIsToRenderableEth(['0x0', customGasTotal])); + + // New Total ETH + setTotalETH(sumHexWEIsToRenderableEth([hexWei, customGasTotal, ''])); + + // New Total Fiat + setTotalFiat( + sumHexWEIsToRenderableFiat( + [hexWei, customGasTotal, ''], + currentCurrency, + conversionRate, + ), + ); + + // Check If Balance is Sufficient + setIsInsufficientBalance( + !isBalanceSufficient({ + amount: hexWei, + gasTotal: customGasTotal, + balance: balanceHexWei, + conversionRate, + }), + ); + }, [ + gasPrice, + gasLimit, + hexWei, + totalETH, + conversionRate, + currentCurrency, + totalFiat, + balanceHexWei, + ]); + + // Check If Gas Price Is Too Low + const shouldShowCustomPriceTooLowWarning = () => { + const average = number('Average Gas Price', 2); + + const customGasPrice = gasPrice; + + if (!customGasPrice || average === undefined) { + return false; + } + + const customPriceRisksSwapFailure = conversionLessThan( + { + value: customGasPrice, + fromNumericBase: 'hex', + fromDenomination: 'WEI', + toDenomination: 'GWEI', + }, + { value: average, fromNumericBase: 'dec' }, + ); + + return customPriceRisksSwapFailure; + }; + + return ( + { + console.log('updatedPrice', newPrice); + setGasPrice(newPrice); + }} + setSwapsCustomizationModalLimit={(newLimit) => { + console.log('updatedLimit', newLimit); + setGasLimit(newLimit); + }} + customGasPrice={gasPrice} + customGasLimit={gasLimit} + disableSave={ + isInsufficientBalance || shouldShowCustomPriceTooLowWarning() + } + /> + ); +}; diff --git a/ui/pages/unlock-page/unlock-page.stories.js b/ui/pages/unlock-page/unlock-page.stories.js new file mode 100644 index 000000000..c141e08cb --- /dev/null +++ b/ui/pages/unlock-page/unlock-page.stories.js @@ -0,0 +1,20 @@ +import React from 'react'; +import { action } from '@storybook/addon-actions'; +import UnlockPage from './unlock-page.component'; + +export default { + title: 'UnlockPage', +}; + +export const UnlockPageComponent = () => { + return ( + ({ + participateInMetaMetrics: true, + })} + showOptInModal={() => null} + history={{}} + /> + ); +}; diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index c0b6fb4e5..48e1ab2f5 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -102,7 +102,7 @@ export function checkNetworkAndAccountSupports1559(state) { */ export function isHardwareWallet(state) { const keyring = getCurrentKeyring(state); - return keyring.type.includes('Hardware'); + return Boolean(keyring?.type?.includes('Hardware')); } /** @@ -112,7 +112,7 @@ export function isHardwareWallet(state) { */ export function getHardwareWalletType(state) { const keyring = getCurrentKeyring(state); - return keyring.type.includes('Hardware') ? keyring.type : undefined; + return isHardwareWallet(state) ? keyring.type : undefined; } export function getAccountType(state) { diff --git a/yarn.lock b/yarn.lock index 80cf68a8f..bf906a850 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1556,15 +1556,7 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@ethereumjs/common@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.3.1.tgz#d692e3aff5adb35dd587dd1e6caab69e0ed2fa0b" - integrity sha512-V8hrULExoq0H4HFs3cCmdRGbgmipmlNzak6Xg34nHYfQyqkSdrCuflvYjyWmsNpI8GtrcZhzifAbgX/1C1Cjwg== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.0.10" - -"@ethereumjs/common@^2.4.0": +"@ethereumjs/common@^2.3.1", "@ethereumjs/common@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.4.0.tgz#2d67f6e6ba22246c5c89104e6b9a119fb3039766" integrity sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w== @@ -1595,21 +1587,6 @@ "@ethersproject/properties" ">=5.0.0-beta.131" "@ethersproject/strings" ">=5.0.0-beta.130" -"@ethersproject/abi@5.0.13", "@ethersproject/abi@^5.0.10": - version "5.0.13" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.13.tgz#600a559c3730467716595658beaa2894b4352bcc" - integrity sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg== - dependencies: - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/hash" "^5.0.10" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/abi@5.4.0", "@ethersproject/abi@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.0.tgz#a6d63bdb3672f738398846d4279fa6b6c9818242" @@ -1625,19 +1602,6 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/abstract-provider@5.0.10", "@ethersproject/abstract-provider@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz#a533aed39a5f27312745c8c4c40fa25fc884831c" - integrity sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/networks" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/web" "^5.0.12" - "@ethersproject/abstract-provider@5.4.0", "@ethersproject/abstract-provider@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz#415331031b0f678388971e1987305244edc04e1d" @@ -1664,17 +1628,6 @@ "@ethersproject/transactions" "^5.0.5" "@ethersproject/web" "^5.0.6" -"@ethersproject/abstract-signer@5.0.14", "@ethersproject/abstract-signer@^5.0.10": - version "5.0.14" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz#30ef912b0f86599d90fdffc65c110452e7b55cf1" - integrity sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g== - dependencies: - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/abstract-signer@5.4.0", "@ethersproject/abstract-signer@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz#cd5f50b93141ee9f9f49feb4075a0b3eafb57d65" @@ -1697,17 +1650,6 @@ "@ethersproject/logger" "^5.0.5" "@ethersproject/properties" "^5.0.3" -"@ethersproject/address@5.0.11", "@ethersproject/address@^5.0.9": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.11.tgz#12022e8c590c33939beb5ab18b401ecf585eac59" - integrity sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/rlp" "^5.0.7" - "@ethersproject/address@5.4.0", "@ethersproject/address@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" @@ -1731,13 +1673,6 @@ "@ethersproject/rlp" "^5.0.3" bn.js "^4.4.0" -"@ethersproject/base64@5.0.9", "@ethersproject/base64@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.9.tgz#bb1f35d3dba92082a574d5e2418f9202a0a1a7e6" - integrity sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" @@ -1752,14 +1687,6 @@ dependencies: "@ethersproject/bytes" "^5.0.4" -"@ethersproject/basex@5.0.9", "@ethersproject/basex@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.0.9.tgz#00d727a031bac563cb8bb900955206f1bf3cf1fc" - integrity sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" @@ -1768,15 +1695,6 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/properties" "^5.4.0" -"@ethersproject/bignumber@5.0.15", "@ethersproject/bignumber@^5.0.13": - version "5.0.15" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.15.tgz#b089b3f1e0381338d764ac1c10512f0c93b184ed" - integrity sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - bn.js "^4.4.0" - "@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@^5.4.0": version "5.4.1" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d" @@ -1795,13 +1713,6 @@ "@ethersproject/logger" "^5.0.5" bn.js "^4.4.0" -"@ethersproject/bytes@5.0.11", "@ethersproject/bytes@^5.0.9": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.11.tgz#21118e75b1d00db068984c15530e316021101276" - integrity sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg== - dependencies: - "@ethersproject/logger" "^5.0.8" - "@ethersproject/bytes@5.4.0", "@ethersproject/bytes@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" @@ -1816,12 +1727,12 @@ dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/constants@5.0.10", "@ethersproject/constants@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.10.tgz#eb0c604fbc44c53ba9641eed31a1d0c9e1ebcadc" - integrity sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw== +"@ethersproject/bytes@^5.0.9": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.11.tgz#21118e75b1d00db068984c15530e316021101276" + integrity sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg== dependencies: - "@ethersproject/bignumber" "^5.0.13" + "@ethersproject/logger" "^5.0.8" "@ethersproject/constants@5.4.0", "@ethersproject/constants@^5.4.0": version "5.4.0" @@ -1837,21 +1748,6 @@ dependencies: "@ethersproject/bignumber" "^5.0.7" -"@ethersproject/contracts@5.0.12": - version "5.0.12" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.12.tgz#6d488db46221258399dfe80b89bf849b3afd7897" - integrity sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ== - dependencies: - "@ethersproject/abi" "^5.0.10" - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/contracts@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.0.tgz#e05fe6bd33acc98741e27d553889ec5920078abb" @@ -1868,20 +1764,6 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/transactions" "^5.4.0" -"@ethersproject/hash@5.0.12", "@ethersproject/hash@^5.0.10": - version "5.0.12" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.12.tgz#1074599f7509e2ca2bb7a3d4f4e39ab3a796da42" - integrity sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q== - dependencies: - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/hash@5.4.0", "@ethersproject/hash@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" @@ -1910,24 +1792,6 @@ "@ethersproject/properties" "^5.0.4" "@ethersproject/strings" "^5.0.4" -"@ethersproject/hdnode@5.0.10", "@ethersproject/hdnode@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.0.10.tgz#f7cdf154bf5d104c76dce2940745fc71d9e7eb1b" - integrity sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg== - dependencies: - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/basex" "^5.0.7" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/pbkdf2" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/sha2" "^5.0.7" - "@ethersproject/signing-key" "^5.0.8" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/wordlists" "^5.0.8" - "@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" @@ -1946,25 +1810,6 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/json-wallets@5.0.12", "@ethersproject/json-wallets@^5.0.10": - version "5.0.12" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz#8946a0fcce1634b636313a50330b7d30a24996e8" - integrity sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg== - dependencies: - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/hdnode" "^5.0.8" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/pbkdf2" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/random" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/transactions" "^5.0.9" - aes-js "3.0.0" - scrypt-js "3.0.1" - "@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95" @@ -1984,14 +1829,6 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.0.9", "@ethersproject/keccak256@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.9.tgz#ca0d86e4af56c13b1ef25e533bde3e96d28f647d" - integrity sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw== - dependencies: - "@ethersproject/bytes" "^5.0.9" - js-sha3 "0.5.7" - "@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" @@ -2008,11 +1845,6 @@ "@ethersproject/bytes" "^5.0.4" js-sha3 "0.5.7" -"@ethersproject/logger@5.0.10", "@ethersproject/logger@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.10.tgz#fd884688b3143253e0356ef92d5f22d109d2e026" - integrity sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw== - "@ethersproject/logger@5.4.0", "@ethersproject/logger@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" @@ -2023,12 +1855,10 @@ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.6.tgz#faa484203e86e08be9e07fef826afeef7183fe88" integrity sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ== -"@ethersproject/networks@5.0.9", "@ethersproject/networks@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.9.tgz#ec5da11e4d4bfd69bec4eaebc9ace33eb9569279" - integrity sha512-L8+VCQwArBLGkxZb/5Ns/OH/OxP38AcaveXIxhUTq+VWpXYjrObG3E7RDQIKkUx1S1IcQl/UWTz5w4DK0UitJg== - dependencies: - "@ethersproject/logger" "^5.0.8" +"@ethersproject/logger@^5.0.8": + version "5.0.10" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.10.tgz#fd884688b3143253e0356ef92d5f22d109d2e026" + integrity sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw== "@ethersproject/networks@5.4.1", "@ethersproject/networks@^5.4.0": version "5.4.1" @@ -2044,14 +1874,6 @@ dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/pbkdf2@5.0.9", "@ethersproject/pbkdf2@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.0.9.tgz#be39c7f0a66c0d3cb1ad1dbb12a78e9bcdf9b5ae" - integrity sha512-ItE/wQ/WVw/ajEHPUVgfu0aEvksPgOQc+278bke8sGKnGO3ppjmqp0MHh17tHc1EBTzJbSms5aLIqc56qZ/oiA== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/sha2" "^5.0.7" - "@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" @@ -2060,13 +1882,6 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/sha2" "^5.4.0" -"@ethersproject/properties@5.0.9", "@ethersproject/properties@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.9.tgz#d7aae634680760136ea522e25c3ef043ec15b5c2" - integrity sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg== - dependencies: - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties@5.4.0", "@ethersproject/properties@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7" @@ -2081,30 +1896,12 @@ dependencies: "@ethersproject/logger" "^5.0.5" -"@ethersproject/providers@5.0.24": - version "5.0.24" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.24.tgz#4c638a029482d052faa18364b5e0e2d3ddd9c0cb" - integrity sha512-M4Iw1r4gGJkt7ZUa++iREuviKL/DIpmIMsaUlVlXtV+ZrUXeN8xQ3zOTrbz7R4h9W9oljBZM7i4D3Kn1krJ30A== +"@ethersproject/properties@^5.0.7": + version "5.0.9" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.9.tgz#d7aae634680760136ea522e25c3ef043ec15b5c2" + integrity sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg== dependencies: - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/basex" "^5.0.7" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/hash" "^5.0.10" "@ethersproject/logger" "^5.0.8" - "@ethersproject/networks" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/random" "^5.0.7" - "@ethersproject/rlp" "^5.0.7" - "@ethersproject/sha2" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/web" "^5.0.12" - bech32 "1.1.4" - ws "7.2.3" "@ethersproject/providers@5.4.2": version "5.4.2" @@ -2131,14 +1928,6 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@5.0.9", "@ethersproject/random@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.9.tgz#1903d4436ba66e4c8ac77968b16f756abea3a0d0" - integrity sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16" @@ -2147,14 +1936,6 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/rlp@5.0.9", "@ethersproject/rlp@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.9.tgz#da205bf8a34d3c3409eb73ddd237130a4b376aff" - integrity sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" @@ -2171,15 +1952,6 @@ "@ethersproject/bytes" "^5.0.4" "@ethersproject/logger" "^5.0.5" -"@ethersproject/sha2@5.0.9", "@ethersproject/sha2@^5.0.7": - version "5.0.9" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.0.9.tgz#41275ee03e6e1660b3c997754005e089e936adc6" - integrity sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - hash.js "1.1.3" - "@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" @@ -2189,16 +1961,6 @@ "@ethersproject/logger" "^5.4.0" hash.js "1.1.7" -"@ethersproject/signing-key@5.0.11", "@ethersproject/signing-key@^5.0.4", "@ethersproject/signing-key@^5.0.8": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.11.tgz#19fc5c4597e18ad0a5efc6417ba5b74069fdd2af" - integrity sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - elliptic "6.5.4" - "@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" @@ -2211,16 +1973,15 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.0.10": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.0.10.tgz#128c9289761cf83d81ff62a1195d6079a924a86c" - integrity sha512-8OG3HLqynWXDA6mVIHuHfF/ojTTwBahON7hc9GAKCqglzXCkVA3OpyxOJXPzjHClRIAUUiU7r9oy9Z/nsjtT/g== +"@ethersproject/signing-key@^5.0.4": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.11.tgz#19fc5c4597e18ad0a5efc6417ba5b74069fdd2af" + integrity sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ== dependencies: - "@ethersproject/bignumber" "^5.0.13" "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/sha2" "^5.0.7" - "@ethersproject/strings" "^5.0.8" + "@ethersproject/logger" "^5.0.8" + "@ethersproject/properties" "^5.0.7" + elliptic "6.5.4" "@ethersproject/solidity@5.4.0": version "5.4.0" @@ -2233,15 +1994,6 @@ "@ethersproject/sha2" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/strings@5.0.10", "@ethersproject/strings@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.10.tgz#ddce1e9724f4ac4f3f67e0cac0b48748e964bfdb" - integrity sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/strings@5.4.0", "@ethersproject/strings@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" @@ -2260,21 +2012,6 @@ "@ethersproject/constants" "^5.0.4" "@ethersproject/logger" "^5.0.5" -"@ethersproject/transactions@5.0.11", "@ethersproject/transactions@^5.0.9": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.11.tgz#b31df5292f47937136a45885d6ee6112477c13df" - integrity sha512-ftsRvR9+gQp7L63F6+XmstvsZ4w8GtWvQB08e/zB+oB86Fnhq8+i/tkgpJplSHC8I/qgiCisva+M3u2GVhDFPA== - dependencies: - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/rlp" "^5.0.7" - "@ethersproject/signing-key" "^5.0.8" - "@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" @@ -2305,15 +2042,6 @@ "@ethersproject/rlp" "^5.0.3" "@ethersproject/signing-key" "^5.0.4" -"@ethersproject/units@5.0.11": - version "5.0.11" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.0.11.tgz#f82f6e353ac0d6fa43b17337790f1f9aa72cb4c8" - integrity sha512-nOSPmcCWyB/dwoBRhhTtPGCsTbiXqmc7Q0Adwvafc432AC7hy3Fj3IFZtnSXsbtJ/GdHCIUIoA8gtvxSsFuBJg== - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/units@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" @@ -2323,27 +2051,6 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/wallet@5.0.12": - version "5.0.12" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.0.12.tgz#bfb96f95e066b4b1b4591c4615207b87afedda8b" - integrity sha512-rboJebGf47/KPZrKZQdYg9BAYuXbc/OwcUyML1K1f2jnJeo1ObWV11U1PAWTjTbhhSy6/Fg+34GO2yMb5Dt1Rw== - dependencies: - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/hash" "^5.0.10" - "@ethersproject/hdnode" "^5.0.8" - "@ethersproject/json-wallets" "^5.0.10" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/random" "^5.0.7" - "@ethersproject/signing-key" "^5.0.8" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/wordlists" "^5.0.8" - "@ethersproject/wallet@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" @@ -2365,17 +2072,6 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/web@5.0.14", "@ethersproject/web@^5.0.12": - version "5.0.14" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.14.tgz#6e7bebdd9fb967cb25ee60f44d9218dc0803bac4" - integrity sha512-QpTgplslwZ0Sp9oKNLoRuS6TKxnkwfaEk3gr7zd7XLF8XBsYejsrQO/03fNfnMx/TAT/RR6WEw/mbOwpRSeVRA== - dependencies: - "@ethersproject/base64" "^5.0.7" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" @@ -2398,17 +2094,6 @@ "@ethersproject/properties" "^5.0.3" "@ethersproject/strings" "^5.0.4" -"@ethersproject/wordlists@5.0.10", "@ethersproject/wordlists@^5.0.8": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.0.10.tgz#177b9a0b4d72b9c4f304d08b36612d6c60e9b896" - integrity sha512-jWsEm1iJzpg9SCXnNfFz+tcp4Ofzv0TJb6mj+soCNcar9GcT0yGz62ZsHC3pLQWaF4LkCzGwRJHJTXKjHQfG1A== - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/hash" "^5.0.10" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - "@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" @@ -3031,34 +2716,30 @@ react-is "^16.8.0" "@metamask/auto-changelog@^2.1.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@metamask/auto-changelog/-/auto-changelog-2.4.0.tgz#d249034a5010060e4db2addfc27863787fe4546c" - integrity sha512-6kIeKT4vy18dKUQEIsfIwVGBHDcLO3jBZB0klRDD+CayAqjh3Rcpi/AXr6NPI+c0rF802vAbqMX+/KFaU3scVg== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@metamask/auto-changelog/-/auto-changelog-2.5.0.tgz#078f38142a3086fdb5556c758969a015c71dfdc9" + integrity sha512-39FeU98Poll3eTqv/bggqo3Yisza0WQJ8l9IiYloMVa2LV8XqTNqVkS4cNEU/5yq62n47JSAv6lZBtWCqeAjZQ== dependencies: diff "^5.0.0" execa "^5.1.1" semver "^7.3.5" yargs "^17.0.1" -"@metamask/contract-metadata@^1.19.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== +"@metamask/contract-metadata@^1.19.0", "@metamask/contract-metadata@^1.28.0", "@metamask/contract-metadata@^1.29.0": + version "1.29.0" + resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.29.0.tgz#4ca86a2f03d4dad4350d09216a7fe92f9dd21c8e" + integrity sha512-wxsC0ZCyhPKqThvmsL8+2zVWGWPqofSo8HNtOuOnQM9oGbXX9294imJ3T+A/Lov8fkX4jAWZOeNV0uR80zkNtA== -"@metamask/contract-metadata@^1.28.0": - version "1.28.0" - resolved "https://registry.yarnpkg.com/@metamask/contract-metadata/-/contract-metadata-1.28.0.tgz#76796f5010aa4aa6d28bf6fe36392017cea687cb" - integrity sha512-QZj6Y1nmSs9BHufBS1GSuPX5TVFa5gbtMhEo/KRuSdKyY43OdlbBKuyT36/l5p30krlzfMX8bN0MAWqw3g0Bog== - -"@metamask/controllers@^14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-14.0.2.tgz#5b7cc044e6c5442e9728a6923ab7d29c7a07b2f3" - integrity sha512-abR1GTDxyOI2+2+jl8xv0WweFzHTmiuvvfe1y7qFtVKHpswO4p+xUjT7UmyDFe4nxsjqf6npct7ZDeS/EjEudg== +"@metamask/controllers@^15.0.2": + version "15.0.2" + resolved "https://registry.yarnpkg.com/@metamask/controllers/-/controllers-15.0.2.tgz#b4012a8bf28bd2c8dbb3c96f4d934d6cf1bb778c" + integrity sha512-MPxfZ2OOTzEa5lUzDsSkINtlTDU4q4udjpBNM5Dq1yCnLKIuPKzYC5nl/rA88Ssr9Hs6babCtMbnUpbbjQjLOg== dependencies: "@ethereumjs/common" "^2.3.1" "@ethereumjs/tx" "^3.2.1" - "@metamask/contract-metadata" "^1.28.0" + "@metamask/contract-metadata" "^1.29.0" "@types/uuid" "^8.3.0" + abort-controller "^3.0.0" async-mutex "^0.2.6" babel-runtime "^6.26.0" eth-ens-namehash "^2.0.8" @@ -4962,11 +4643,6 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -abortcontroller-polyfill@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.4.0.tgz#0d5eb58e522a461774af8086414f68e1dda7a6c4" - integrity sha512-3ZFfCRfDzx3GFjO6RAkYx81lPGpUS20ISxux9gLxuKnqafNcFQo59+IoZqpO2WvQlyc287B62HDnDdNYRmlvWA== - abstract-leveldown@0.12.3: version "0.12.3" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-0.12.3.tgz#116b1ec5c7710ef7a2d5706768bbdb4440be1070" @@ -8271,7 +7947,7 @@ chokidar@^2.0.0, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chownr@^1.1.1: +chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -11735,31 +11411,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.10: - version "7.0.10" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f" - integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw== - dependencies: - "@types/bn.js" "^5.1.0" - 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.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== - dependencies: - "@types/bn.js" "^5.1.0" - 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.1.0: +ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.9, ethereumjs-util@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== @@ -11866,43 +11518,7 @@ ethers@^4.0.20, ethers@^4.0.28: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.8: - version "5.0.32" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.0.32.tgz#f009970be31d96a589bf0ce597a39c10c7e297a6" - integrity sha512-rORfGWR0HsA4pjKMMcWZorw12DHsXqfIAuPVHJsXt+vI24jvXcVqx+rLsSvgOoLdaCMdxiN5qlIq2+4axKG31g== - dependencies: - "@ethersproject/abi" "5.0.13" - "@ethersproject/abstract-provider" "5.0.10" - "@ethersproject/abstract-signer" "5.0.14" - "@ethersproject/address" "5.0.11" - "@ethersproject/base64" "5.0.9" - "@ethersproject/basex" "5.0.9" - "@ethersproject/bignumber" "5.0.15" - "@ethersproject/bytes" "5.0.11" - "@ethersproject/constants" "5.0.10" - "@ethersproject/contracts" "5.0.12" - "@ethersproject/hash" "5.0.12" - "@ethersproject/hdnode" "5.0.10" - "@ethersproject/json-wallets" "5.0.12" - "@ethersproject/keccak256" "5.0.9" - "@ethersproject/logger" "5.0.10" - "@ethersproject/networks" "5.0.9" - "@ethersproject/pbkdf2" "5.0.9" - "@ethersproject/properties" "5.0.9" - "@ethersproject/providers" "5.0.24" - "@ethersproject/random" "5.0.9" - "@ethersproject/rlp" "5.0.9" - "@ethersproject/sha2" "5.0.9" - "@ethersproject/signing-key" "5.0.11" - "@ethersproject/solidity" "5.0.10" - "@ethersproject/strings" "5.0.10" - "@ethersproject/transactions" "5.0.11" - "@ethersproject/units" "5.0.11" - "@ethersproject/wallet" "5.0.12" - "@ethersproject/web" "5.0.14" - "@ethersproject/wordlists" "5.0.10" - -ethers@^5.4.1: +ethers@^5.0.8, ethers@^5.4.1: version "5.4.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.2.tgz#91368e4d9c39f1111157de1c2aa1d8c1616c0f7b" integrity sha512-JcFcNWjULzhm4tMp5cZKnU45zqN/c7rqabIITiUiQzZuP7LcYSD4WAbADo4Ja6G2orU4d/PbhAWGHGtAKYrB4Q== @@ -13196,7 +12812,7 @@ fs-extra@^9.0.0: jsonfile "^6.0.1" universalify "^1.0.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== @@ -19322,7 +18938,7 @@ minipass-pipeline@^1.2.2: dependencies: minipass "^3.0.0" -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -19337,7 +18953,7 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== @@ -19803,12 +19419,7 @@ nanoid@^2.0.0, nanoid@^2.1.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== -nanoid@^3.1.12: - version "3.1.16" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.16.tgz#b21f0a7d031196faf75314d7c65d36352beeef64" - integrity sha512-+AK8MN0WHji40lj8AEuwLOvLSbWYApQpre/aFJZD71r43wVRLrOYS4FmJOPQYon1TqB462RzrrxlfA74XRES8w== - -nanoid@^3.1.23: +nanoid@^3.1.12, nanoid@^3.1.23: version "3.1.23" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== @@ -24461,7 +24072,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1, safe-buffer@~5.1.2: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -26323,17 +25934,17 @@ tar@6.0.2: yallist "^4.0.0" tar@^4, tar@^4.0.2: - version "4.4.15" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" - integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" tar@^6.0.2, tar@^6.1.2: version "6.1.3" @@ -28102,35 +27713,7 @@ web3-provider-engine@14.2.1: xhr "^2.2.0" xtend "^4.0.1" -web3-provider-engine@^16.0.1: - version "16.0.1" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-16.0.1.tgz#2600a39ede364cdc0a1fc773bf40a94f2177e605" - integrity sha512-/Eglt2aocXMBiDj7Se/lyZnNDaHBaoJlaUfbP5HkLJQC/HlGbR+3/W+dINirlJDhh7b54DzgykqY7ksaU5QgTg== - dependencies: - async "^2.5.0" - backoff "^2.5.0" - clone "^2.0.0" - cross-fetch "^2.1.0" - eth-block-tracker "^4.4.2" - eth-json-rpc-filters "^4.2.1" - eth-json-rpc-infura "^5.1.0" - eth-json-rpc-middleware "^6.0.0" - eth-rpc-errors "^3.0.0" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.5" - ethereumjs-vm "^2.3.4" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - readable-stream "^2.2.9" - request "^2.85.0" - semaphore "^1.0.3" - ws "^5.1.1" - xhr "^2.2.0" - xtend "^4.0.1" - -web3-provider-engine@^16.0.3: +web3-provider-engine@^16.0.1, web3-provider-engine@^16.0.3: version "16.0.3" resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-16.0.3.tgz#8ff93edf3a8da2f70d7f85c5116028c06a0d9f07" integrity sha512-Q3bKhGqLfMTdLvkd4TtkGYJHcoVQ82D1l8jTIwwuJp/sAp7VHnRYb9YJ14SW/69VMWoOhSpPLZV2tWb9V0WJoA== @@ -28629,7 +28212,7 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -ws@7.1.0, ws@7.2.3, ws@7.4.6, ws@^1.1.0, ws@^3.0.0, ws@^5.1.1, ws@^7, ws@^7.2.0, ws@^7.4.0, ws@^7.4.4, ws@^7.4.6, ws@~7.4.2: +ws@7.1.0, ws@7.4.6, ws@^1.1.0, ws@^3.0.0, ws@^5.1.1, ws@^7, ws@^7.2.0, ws@^7.4.0, ws@^7.4.4, ws@^7.4.6, ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== @@ -28763,7 +28346,7 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==