From 86c9928e6ba618ee2bc5b3b720a6badebf3856a5 Mon Sep 17 00:00:00 2001 From: Pedro Figueiredo Date: Fri, 24 Jan 2025 17:01:29 +0000 Subject: [PATCH] feat: Delete legacy transaction confirmation code --- .storybook/test-data.js | 1 - app/_locales/am/messages.json | 3 - app/_locales/ar/messages.json | 3 - app/_locales/bg/messages.json | 3 - app/_locales/bn/messages.json | 3 - app/_locales/ca/messages.json | 3 - app/_locales/da/messages.json | 3 - app/_locales/de/messages.json | 142 -- app/_locales/el/messages.json | 142 -- app/_locales/en/messages.json | 142 -- app/_locales/en_GB/messages.json | 142 -- app/_locales/es/messages.json | 142 -- app/_locales/es_419/messages.json | 60 - app/_locales/et/messages.json | 3 - app/_locales/fa/messages.json | 3 - app/_locales/fi/messages.json | 3 - app/_locales/fil/messages.json | 3 - app/_locales/fr/messages.json | 142 -- app/_locales/he/messages.json | 3 - app/_locales/hi/messages.json | 142 -- app/_locales/hr/messages.json | 3 - app/_locales/hu/messages.json | 3 - app/_locales/id/messages.json | 142 -- app/_locales/it/messages.json | 38 - app/_locales/ja/messages.json | 142 -- app/_locales/kn/messages.json | 3 - app/_locales/ko/messages.json | 142 -- app/_locales/lt/messages.json | 3 - app/_locales/lv/messages.json | 3 - app/_locales/ms/messages.json | 3 - app/_locales/no/messages.json | 3 - app/_locales/ph/messages.json | 19 - app/_locales/pl/messages.json | 3 - app/_locales/pt/messages.json | 142 -- app/_locales/pt_BR/messages.json | 60 - app/_locales/ro/messages.json | 3 - app/_locales/ru/messages.json | 142 -- app/_locales/sk/messages.json | 3 - app/_locales/sl/messages.json | 3 - app/_locales/sr/messages.json | 3 - app/_locales/sv/messages.json | 3 - app/_locales/sw/messages.json | 3 - app/_locales/tl/messages.json | 142 -- app/_locales/tr/messages.json | 142 -- app/_locales/uk/messages.json | 3 - app/_locales/vi/messages.json | 142 -- app/_locales/zh_CN/messages.json | 142 -- app/_locales/zh_TW/messages.json | 22 - app/scripts/constants/sentry-state.ts | 1 - .../preferences-controller.test.ts | 13 - .../controllers/preferences-controller.ts | 17 - app/scripts/fixtures/with-preferences.js | 1 - app/scripts/lib/backup.test.js | 1 - app/scripts/metamask-controller.js | 3 - app/scripts/migrations/143.test.ts | 67 + app/scripts/migrations/143.ts | 37 + app/scripts/migrations/index.js | 1 + package.json | 2 - test/e2e/restore/MetaMaskUserData.json | 1 - .../contract-interaction-redesign.spec.ts | 30 - ...rs-after-init-opt-in-background-state.json | 1 - .../errors-after-init-opt-in-ui-state.json | 1 - ...s-before-init-opt-in-background-state.json | 1 - .../errors-before-init-opt-in-ui-state.json | 1 - .../data/integration-init-state.json | 1 - .../data/onboarding-completion-route.json | 1 - ui/helpers/constants/routes.ts | 40 - ui/helpers/constants/settings.js | 16 +- ui/helpers/utils/settings-search.test.js | 6 +- .../approve-content-card.js | 286 ---- .../approve-content-card.stories.js | 195 --- .../components/approve-content-card/index.js | 1 - .../approve-content-card/index.scss | 51 - .../confirm-gas-display.test.js.snap | 132 -- .../confirm-gas-display.js | 47 - .../confirm-gas-display.stories.js | 19 - .../confirm-gas-display.test.js | 129 -- .../confirm-legacy-gas-display/README.mdx | 9 - .../confirm-legacy-gas-display.test.js.snap | 120 -- .../confirm-legacy-gas-display.js | 156 --- .../confirm-legacy-gas-display.stories.js | 28 - .../confirm-legacy-gas-display.test.js | 145 -- .../confirm-legacy-gas-display/index.js | 1 - .../components/confirm-gas-display/index.js | 1 - .../components/custom-nonce/custom-nonce.js | 79 -- .../custom-nonce/custom-nonce.test.js | 65 - .../components/custom-nonce/index.js | 1 - .../components/custom-nonce/index.scss | 15 - ui/pages/confirmations/components/index.scss | 2 - ...irm-approve-content.component.test.js.snap | 714 ---------- .../confirm-approve-content.component.js | 730 ---------- .../confirm-approve-content.component.test.js | 375 ----- .../confirm-approve-content.stories.js | 141 -- .../confirm-approve-content/index.js | 1 - .../confirm-approve-content/index.scss | 394 ------ .../confirm-approve/confirm-approve.js | 356 ----- .../confirm-approve.stories-to-do.js | 82 -- .../confirmations/confirm-approve/index.js | 1 - .../confirmations/confirm-approve/index.scss | 1 - .../confirm-contract-interaction.js | 34 - .../confirm-contract-interaction/index.js | 1 - .../confirm-deploy-contract.component.js | 89 -- .../confirm-deploy-contract.container.js | 12 - .../confirm-deploy-contract.stories-to-do.js | 23 - .../confirm-deploy-contract/index.js | 1 - .../confirm-send-ether.test.js.snap | 576 -------- .../confirm-send-ether/confirm-send-ether.js | 35 - .../confirm-send-ether.stories.js | 59 - .../confirm-send-ether.test.js | 77 - .../confirmations/confirm-send-ether/index.js | 1 - .../confirm-send-token.component.js | 32 - .../confirm-send-token.container.js | 33 - .../confirm-send-token/confirm-send-token.js | 119 -- .../confirm-send-token.stories-to-do.js | 21 - .../confirmations/confirm-send-token/index.js | 1 - .../confirm-token-transaction-base.js | 231 --- ...rm-token-transaction-base.stories-to-do.js | 25 - .../confirm-token-transaction-base/index.js | 1 - .../confirm-transaction-base.test.js.snap | 537 ------- .../confirm-transaction-base.component.js | 1243 ----------------- .../confirm-transaction-base.container.js | 532 ------- .../confirm-transaction-base.stories-to-do.js | 22 - .../confirm-transaction-base.test.js | 1112 --------------- .../confirm-transaction-base/index.js | 1 - .../confirm-transaction-switch.component.js | 65 +- .../confirm-token-transaction-switch.js | 227 +-- .../confirm-transaction.component.js | 21 - .../confirm-transaction.test.js | 57 +- .../confirm-transaction.transaction.test.js | 62 - ui/pages/confirmations/index.scss | 3 - .../send/gas-display/gas-display.js | 288 ---- .../confirmations/send/gas-display/index.js | 1 - .../confirmations/send/gas-display/index.scss | 59 - .../token-allowance.test.js.snap | 479 ------- .../confirmations/token-allowance/index.js | 1 - .../confirmations/token-allowance/index.scss | 46 - .../token-allowance/token-allowance.js | 833 ----------- .../token-allowance.stories-to-do.js | 196 --- .../token-allowance.stories.js | 277 ---- .../token-allowance/token-allowance.test.js | 565 -------- .../advanced-tab.component.test.js.snap | 66 - .../advanced-tab/advanced-tab.component.js | 37 - .../advanced-tab/advanced-tab.container.js | 4 - .../advanced-tab/advanced-tab.stories.js | 12 - ui/selectors/selectors.js | 6 - ui/store/actions.ts | 15 - yarn.lock | 260 +--- 147 files changed, 128 insertions(+), 15339 deletions(-) create mode 100644 app/scripts/migrations/143.test.ts create mode 100644 app/scripts/migrations/143.ts delete mode 100644 ui/pages/confirmations/components/approve-content-card/approve-content-card.js delete mode 100644 ui/pages/confirmations/components/approve-content-card/approve-content-card.stories.js delete mode 100644 ui/pages/confirmations/components/approve-content-card/index.js delete mode 100644 ui/pages/confirmations/components/approve-content-card/index.scss delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.stories.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.test.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/README.mdx delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.stories.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.test.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js delete mode 100644 ui/pages/confirmations/components/confirm-gas-display/index.js delete mode 100644 ui/pages/confirmations/components/custom-nonce/custom-nonce.js delete mode 100644 ui/pages/confirmations/components/custom-nonce/custom-nonce.test.js delete mode 100644 ui/pages/confirmations/components/custom-nonce/index.js delete mode 100644 ui/pages/confirmations/components/custom-nonce/index.scss delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/__snapshots__/confirm-approve-content.component.test.js.snap delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.js delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/index.js delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve-content/index.scss delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve.js delete mode 100644 ui/pages/confirmations/confirm-approve/confirm-approve.stories-to-do.js delete mode 100644 ui/pages/confirmations/confirm-approve/index.js delete mode 100644 ui/pages/confirmations/confirm-approve/index.scss delete mode 100644 ui/pages/confirmations/confirm-contract-interaction/confirm-contract-interaction.js delete mode 100644 ui/pages/confirmations/confirm-contract-interaction/index.js delete mode 100644 ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.component.js delete mode 100644 ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.container.js delete mode 100644 ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.stories-to-do.js delete mode 100644 ui/pages/confirmations/confirm-deploy-contract/index.js delete mode 100644 ui/pages/confirmations/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap delete mode 100644 ui/pages/confirmations/confirm-send-ether/confirm-send-ether.js delete mode 100644 ui/pages/confirmations/confirm-send-ether/confirm-send-ether.stories.js delete mode 100644 ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js delete mode 100644 ui/pages/confirmations/confirm-send-ether/index.js delete mode 100644 ui/pages/confirmations/confirm-send-token/confirm-send-token.component.js delete mode 100644 ui/pages/confirmations/confirm-send-token/confirm-send-token.container.js delete mode 100644 ui/pages/confirmations/confirm-send-token/confirm-send-token.js delete mode 100644 ui/pages/confirmations/confirm-send-token/confirm-send-token.stories-to-do.js delete mode 100644 ui/pages/confirmations/confirm-send-token/index.js delete mode 100644 ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.js delete mode 100644 ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.stories-to-do.js delete mode 100644 ui/pages/confirmations/confirm-token-transaction-base/index.js delete mode 100644 ui/pages/confirmations/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap delete mode 100644 ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js delete mode 100644 ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js delete mode 100644 ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.stories-to-do.js delete mode 100644 ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js delete mode 100644 ui/pages/confirmations/confirm-transaction-base/index.js delete mode 100644 ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js delete mode 100644 ui/pages/confirmations/send/gas-display/gas-display.js delete mode 100644 ui/pages/confirmations/send/gas-display/index.js delete mode 100644 ui/pages/confirmations/send/gas-display/index.scss delete mode 100644 ui/pages/confirmations/token-allowance/__snapshots__/token-allowance.test.js.snap delete mode 100644 ui/pages/confirmations/token-allowance/index.js delete mode 100644 ui/pages/confirmations/token-allowance/index.scss delete mode 100644 ui/pages/confirmations/token-allowance/token-allowance.js delete mode 100644 ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js delete mode 100644 ui/pages/confirmations/token-allowance/token-allowance.stories.js delete mode 100644 ui/pages/confirmations/token-allowance/token-allowance.test.js diff --git a/.storybook/test-data.js b/.storybook/test-data.js index 0b920470526f..9deea3c9a0f3 100644 --- a/.storybook/test-data.js +++ b/.storybook/test-data.js @@ -1317,7 +1317,6 @@ const state = { '0xaD6D458402F60fD3Bd25163575031ACDce07538D': './sai.svg', }, hiddenTokens: [], - useNonceField: false, usePhishDetect: true, useTokenDetection: true, useCurrencyRateCheck: true, diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index fac85861828c..453fc10d572e 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -692,9 +692,6 @@ "transactionErrored": { "message": "ግብይቱ እንከን አጋጥሞታል።" }, - "transactionFee": { - "message": " የግብይት ክፍያ" - }, "transactionResubmitted": { "message": "ግብይቱ በድጋሚ ሲቀርብ የነዳጅ ክፍያ ወደ $1በ$2ጨምሯል" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 33585243d016..18af5c0b2717 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -708,9 +708,6 @@ "transactionErrored": { "message": "لقد حدث خطأ ما أثناء معالجة المعاملة." }, - "transactionFee": { - "message": "رسوم التحويل" - }, "transactionResubmitted": { "message": "زادت رسوم جاس على المعاملة التي أعيد تقديمها إلى $1 عند $2" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index a6dbac690242..bd6ca7366ab1 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "Възникна грешка в транзакцията." }, - "transactionFee": { - "message": "Такса за транзакция" - }, "transactionResubmitted": { "message": "Повторната транзакция с такса за газ се увеличи до $1 при $2" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index 1df74dc0e941..c331c9a0fe7c 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -701,9 +701,6 @@ "transactionErrored": { "message": "লেনদেনে একটি ত্রুটি হয়েছে।" }, - "transactionFee": { - "message": "লেনদেন ফী" - }, "transactionResubmitted": { "message": "$2 এ গ্যাস ফী $1 তে বাড়িয়ে লেনদেন আবার জমা করা হয়েছে" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index b988ae488143..753398cbaf0f 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -686,9 +686,6 @@ "transactionErrored": { "message": "La transacció ha tingut un error." }, - "transactionFee": { - "message": "Preu de la transacció" - }, "transactionResubmitted": { "message": "Transacció reenviada amb tarifa del gas incrementada d'$1 a $2" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 080dd75f22d6..bf2d385922ad 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -680,9 +680,6 @@ "transactionErrored": { "message": "Transaktionen stødte på en fejl." }, - "transactionFee": { - "message": "Transaktionsgebyr" - }, "transactionResubmitted": { "message": "Transaktion genindsendt med brændstofgebyr forøget til $1 på $2" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index f1e121d15aef..5bf0602ce6fd 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -113,10 +113,6 @@ "message": "Ich habe die $1 gelesen und stimme ihnen zu.", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 kann auf dieses Asset zugreifen und es ausgeben.", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Greifen Sie mit Ihrer geheimen Wiederherstellungsphrase auf Ihre Wallet zu." }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Keine verbindbaren Konten verfügbar" }, - "allOfYour": { - "message": "Alle Ihre $1.", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Alle Genehmigungen" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Allzeittief" }, - "allYourNFTsOf": { - "message": "Alle Ihre NFTs von $1.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Genehmigen" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Benachrichtigungen erlauben" }, - "allowSpendToken": { - "message": "Genehmigung zum Zugriff auf Ihr $1 erteilen?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "$1 erlauben, bis zu dem folgenden Betrag abzuheben und auszugeben:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Ausgabenlimit genehmigen" }, - "approveAllTokensTitle": { - "message": "Erlauben Sie den Zugriff auf und die Übertragung von all Ihren $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Zugriff und Übertragung aller Ihrer NFTs aus $1 erlauben?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Genehmigen" }, @@ -584,23 +560,9 @@ "message": "$1 Ausgabenobergrenze genehmigen", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Dies gestattet es Dritten, ohne weitere Benachrichtigung auf die folgenden NFTs zuzugreifen und diese zu übertragen, bis Sie dieses Zugriffsrecht widerrufen." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Dies gestattet es Dritten, ohne weitere Benachrichtigung auf alle Ihre NFTs von $1 zuzugreifen und diese zu übertragen, bis Sie dieses Zugriffsrecht widerrufen.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Zugriff auf und Übertragung Ihrer $1 erlauben?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Genehmigt" }, - "approvedAsset": { - "message": "Genehmigtes Asset" - }, "approvedOn": { "message": "Genehmigt am $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "$1-Netzwerk löschen?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Einzahlung" - }, "depositCrypto": { "message": "Zahlen Sie Krypto von einem anderen Konto über eine Wallet-Adresse oder einen QR-Code ein." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Dieses Netzwerk erfordert ein „Gas-Preis“-Feld beim Absenden einer Transaktion. Der Gas-Preis ist der Betrag, den Sie pro Gas-Einheit bezahlen." }, - "editGasSubTextAmountLabel": { - "message": "Maximaler Betrag:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Maximale Gebühr:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Schnell" }, - "feeAssociatedRequest": { - "message": "Mit dieser Anfrage ist eine Gebühr verbunden." - }, "feeDetails": { "message": "Details zur Gebühr" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Funktion: $1" }, - "functionApprove": { - "message": "Funktion: Genehmigen" - }, - "functionSetApprovalForAll": { - "message": "Funktion: ErlaubnisFürAlle" - }, "functionType": { "message": "Funktionstyp" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Verstanden!" }, - "grantedToWithColon": { - "message": "Ermöglicht zu:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Konto verbergen" }, - "hideFullTransactionDetails": { - "message": "Vollständige Transaktionsdetails verbergen" - }, "hideSeedPhrase": { "message": "Seed-Phrase verbergen" }, @@ -2489,10 +2429,6 @@ "message": "Sie haben nicht genügend $1 auf Ihrem Konto, um die Transaktionsgebühren im $2-Netzwerk zu zahlen. $3 oder von einem anderen Konto einzahlen.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Sie haben nicht genügend $1 auf Ihrem Konto, um die Transaktionsgebühren im Netzwerk $2 zu zahlen. $3 oder $4 von einem anderen Konto.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Sie haben nicht genügend $1 auf Ihrem Konto, um die Transaktionsgebühren im $2-Netzwerk zu zahlen. $1 von einem anderen Konto einzahlen.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Wird geladen ..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Bitte schließen Sie die Transaktion im Hardware-Wallet ab." - }, "loadingScreenSnapMessage": { "message": "Bitte schließen Sie die Transaktion im Snap ab." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Weiter" }, - "nextNonceWarning": { - "message": "Nonce ist höher als vorgeschlagen Nonce von $1.", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "NFT kann nicht hinzugefügt werden, da die Eigentumsangaben nicht übereinstimmen. Stellen Sie sicher, dass Sie die richtigen Informationen eingegeben haben." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Unbekannt" }, - "nonceField": { - "message": "Transaktions-Nonce anpassen" - }, - "nonceFieldDesc": { - "message": "Aktivieren Sie diese Funktion, um die Nonce (Transaktionsnummer) beim Senden von Assets zu ändern. Es handelt sich hierbei um eine erweiterte Funktion, also nutzen Sie sie mit Bedacht." - }, - "nonceFieldHeading": { - "message": "Eigene Nonce" - }, "none": { "message": "Keine" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Genehmigung von" }, - "permissionRequest": { - "message": "Genehmigungsanfrage" - }, "permissionRequested": { "message": "Jetzt angefragt" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Genehmigungen prüfen" }, - "revokeAllTokensTitle": { - "message": "Genehmigung zum Zugriff auf alle Ihre $1 sowie deren Übertragung entziehen?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Genehmigung zum Zugriff auf alle Ihre NFTs von $1 sowie zu deren Übertragung entziehen?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Wenn Sie diese Genehmigung widerrufen, werden Dritte ohne weiteren Hinweis keinen Zugriff mehr auf alle Ihre $1 haben und diese nicht mehr überweisen können.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Dadruch wird die Genehmigung für Dritte widerrufen, auf Ihre gesamten NFTs von $1 zuzugreifen und sie zu übertragen, ohne dass eine weitere Mitteilung erfolgt.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Genehmigung widerrufen" }, "revokeSimulationDetailsDesc": { "message": "Sie entziehen einer Person die Genehmigung, Tokens von Ihrem Konto auszugeben." }, - "revokeSpendingCap": { - "message": "Ausgabenobergrenze für Ihr $1 widerrufen", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Dieser Drittanbieter kann keine weiteren Ihrer aktuellen oder zukünftigen Tokens ausgeben." }, @@ -5247,9 +5144,6 @@ "message": "Geben Sie nur eine Nummer ein, auf die $1 jetzt oder in Zukunft zugreifen kann. Sie können das Token-Limit später jederzeit ändern.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Ausgabenobergrenze-Anfrage für $1" - }, "spendingCapTooltipDesc": { "message": "Dies ist die Menge an Tokens, auf die der Spender in Ihrem Namen zugreifen kann." }, @@ -5928,9 +5822,6 @@ "message": "Mitteilung bzgl. Drittanbieter-Software", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "diese Sammlung" - }, "threeMonthsAbbreviation": { "message": "3 M", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Funktion" }, - "transactionDetailDappGasMoreInfo": { - "message": "Seite vorgeschlagen" - }, - "transactionDetailDappGasTooltip": { - "message": "Bearbeiten, um die von MetaMask empfohlene Gas-Gebühr auf der Grundlage des letzten Blocks zu verwenden." - }, "transactionDetailGasHeading": { "message": "Voraussichtliche Gas-Gebühr" }, - "transactionDetailGasTooltipConversion": { - "message": "Erfahren Sie mehr über Gas-Gebühren." - }, - "transactionDetailGasTooltipExplanation": { - "message": "Die Gas-Gebühren werden vom Netzwerk festgelegt und schwanken je nach Netzwerk-Traffic und Transaktionskomplexität." - }, - "transactionDetailGasTooltipIntro": { - "message": "Gas-Gebühren werden an Krypto-Miner gezahlt, die Transaktionen im $1-Netzwerk verarbeiten. MetaMask profitiert nicht von den Gas-Gebühren." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Betrag + Gas-Gebühr" - }, - "transactionDetailLayer2GasHeading": { - "message": "Layer 2 Gas-Gebühr" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Betrag + Gebühren" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Transaktion fehlgeschlagen" }, - "transactionFee": { - "message": "Transaktionsgebühr" - }, "transactionFlowNetwork": { "message": "Netzwerk" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "Beim Starten von MetaMask ist ein Problem aufgetreten. Dies könnte ein vorübergehendes Problem sein. Versuchen Sie daher, die Erweiterung neu zu starten." }, - "trustSiteApprovePermission": { - "message": "Durch Erteilung der Genehmigung erlauben Sie den folgenden $1 Zugriff auf Ihre Gelder." - }, "tryAgain": { "message": "Erneut versuchen" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Kontakt anzeigen" }, - "viewDetails": { - "message": "Details anzeigen" - }, - "viewFullTransactionDetails": { - "message": "Alle Transaktionsdetails anzeigen" - }, "viewMore": { "message": "Mehr anzeigen" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 5a99c08ebfeb..12c9af74d130 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -113,10 +113,6 @@ "message": "Έχω διαβάσει και συμφωνώ με το $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "Το $1 ίσως αποκτήσει πρόσβαση και δαπανήσει αυτό το περιουσιακό στοιχείο", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Αποκτήστε πρόσβαση στο πορτοφόλι σας με τη Μυστική σας Φράση Ανάκτησης" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Δεν υπάρχουν διαθέσιμοι λογαριασμοί για σύνδεση" }, - "allOfYour": { - "message": "Όλα σας τα $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Όλες οι άδειες χρήσης" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Χαμηλό όλων των εποχών" }, - "allYourNFTsOf": { - "message": "Όλα τα NFT σας από το $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Να επιτρέπεται" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Να επιτρέπονται οι ειδοποιήσεις" }, - "allowSpendToken": { - "message": "Δίνετε άδεια για να αποκτήσετε πρόσβαση στο $1;", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Επιτρέψτε στο $1 να κάνει ανάληψη και να ξοδέψει μέχρι το ακόλουθο ποσό:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Έγκριση ορίου δαπανών" }, - "approveAllTokensTitle": { - "message": "Επιτρέπετε την πρόσβαση και τη μεταφορά όλων των $1;", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Επιτρέπετε την πρόσβαση και τη μεταφορά όλων των NFT σας από το $1;", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Έγκριση" }, @@ -584,23 +560,9 @@ "message": "Έγκριση $1 ως ανώτατο όριο δαπανών", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Αυτό επιτρέπει σε τρίτα μέρη να έχουν πρόσβαση και να μεταφέρουν τα ακόλουθα NFT χωρίς περαιτέρω ειδοποίηση μέχρι να ανακαλέσετε την πρόσβασή τους." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Αυτό επιτρέπει σε ένα τρίτο μέρος να έχει πρόσβαση και να μεταφέρει όλα τα NFT σας από το $1 χωρίς περαιτέρω ειδοποίηση μέχρι να ανακαλέσετε την πρόσβασή του.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Επιτρέπετε την πρόσβαση και τη μεταφορά του $1;", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Εγκρίθηκε" }, - "approvedAsset": { - "message": "Εγκεκριμένο περιουσιακό στοιχείο" - }, "approvedOn": { "message": "Εγκρίθηκε στις $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Διαγραφή του δικτύου $1;", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Κατάθεση" - }, "depositCrypto": { "message": "Κατάθεση κρυπτονομισμάτων από άλλο λογαριασμό με διεύθυνση πορτοφολιού ή κωδικό QR." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Αυτό το δίκτυο απαιτεί ένα πεδίο \"Τέλος συναλλαγής\" κατά την υποβολή μιας συναλλαγής. Η τιμή τέλους συναλλαγής είναι το ποσό που θα πληρώσετε ανά μονάδα τέλους συναλλαγής." }, - "editGasSubTextAmountLabel": { - "message": "Μέγιστο ποσό:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Μέγιστη χρέωση:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Γρήγορα" }, - "feeAssociatedRequest": { - "message": "Ένα τέλος σχετίζεται με αυτό το αίτημα." - }, "feeDetails": { "message": "Λεπτομέρειες χρεώσεων" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Λειτουργία: $1" }, - "functionApprove": { - "message": "Λειτουργία: Έγκριση" - }, - "functionSetApprovalForAll": { - "message": "Λειτουργία: SetApprovalForAll" - }, "functionType": { "message": "Τύπος λειτουργίας" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Το κατάλαβα" }, - "grantedToWithColon": { - "message": "Χορηγήθηκε στο:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Απόκρυψη λογαριασμού" }, - "hideFullTransactionDetails": { - "message": "Απόκρυψη αναλυτικών στοιχείων συναλλαγών" - }, "hideSeedPhrase": { "message": "Απόκρυψη φράσης ανάκτησης" }, @@ -2489,10 +2429,6 @@ "message": "Δεν έχετε αρκετά $1 στον λογαριασμό σας για να πληρώσετε τα τέλη της συναλλαγής στο δίκτυο $2. $3 ή πραγματοποιήστε κατάθεση από άλλον λογαριασμό.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Δεν έχετε αρκετά $1 στον λογαριασμό σας για να πληρώσετε τα τέλη της συναλλαγής στο δίκτυο $2. $3 ή $4 από άλλον λογαριασμό.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Δεν έχετε αρκετά $1 στον λογαριασμό σας για να πληρώσετε τα τέλη της συναλλαγής στο δίκτυο $2. Καταθέστε $1 από άλλον λογαριασμό.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Φόρτωση..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Ολοκληρώστε τη συναλλαγή στο πορτοφόλι υλικού." - }, "loadingScreenSnapMessage": { "message": "Ολοκληρώστε τη συναλλαγή στο Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Επόμενο" }, - "nextNonceWarning": { - "message": "Το Nonce είναι υψηλότερο από το προτεινόμενο nonce του $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Το NFT δεν μπορεί να προστεθεί καθώς τα στοιχεία ιδιοκτησίας δεν ταιριάζουν. Βεβαιωθείτε ότι έχετε εισαγάγει τα σωστά στοιχεία." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Αριθμολέξημα" }, - "nonceField": { - "message": "Προσαρμόστε τη συναλλαγή nonce" - }, - "nonceFieldDesc": { - "message": "Ενεργοποιήστε την επιλογή αυτή για να αλλάξετε το nonce (αριθμός συναλλαγής) κατά την αποστολή περιουσιακών στοιχείων. Αυτή είναι μια προηγμένη λειτουργία, χρησιμοποιήστε τη με προσοχή." - }, - "nonceFieldHeading": { - "message": "Προσαρμοσμένο Nonce" - }, "none": { "message": "Κανένα" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Άδεια από" }, - "permissionRequest": { - "message": "Αίτημα άδειας" - }, "permissionRequested": { "message": "Ζητήθηκε τώρα" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Έλεγχος αδειών" }, - "revokeAllTokensTitle": { - "message": "Ανάκληση της άδειας πρόσβασης και μεταφοράς όλων των $1;", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Ανάκληση της άδειας πρόσβασης και μεταφοράς όλων των NFT σας από το $1;", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Αυτό ανακαλεί την άδεια για ένα τρίτο μέρος να έχει πρόσβαση και να μεταφέρει όλα τα $1 σας χωρίς περαιτέρω ειδοποίηση.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Αυτό ανακαλεί την άδεια για ένα τρίτο μέρος να έχει πρόσβαση και να μεταφέρει όλα τα NFT σας από το $1 χωρίς περαιτέρω ειδοποίηση.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Ανάκληση άδειας" }, "revokeSimulationDetailsDesc": { "message": "Αφαιρείτε την άδεια κάποιου να ξοδεύει tokens από τον λογαριασμό σας." }, - "revokeSpendingCap": { - "message": "Ανάκληση του ανώτατου ορίου δαπανών για το $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Αυτός ο τρίτος δεν θα μπορεί να ξοδέψει άλλα από τα τρέχοντα ή μελλοντικά σας tokens." }, @@ -5247,9 +5144,6 @@ "message": "Εισαγάγετε μόνο έναν αριθμό στον οποίο αισθάνεστε άνετα με το $1 να έχει πρόσβαση τώρα ή στο μέλλον. Μπορείτε πάντα να αυξήσετε το όριο του token αργότερα.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Αίτημα ανώτατου ορίου δαπανών για το $1" - }, "spendingCapTooltipDesc": { "message": "Αυτό είναι το ποσό των tokens που θα μπορεί να έχει πρόσβαση ο διαθέτης για λογαριασμό σας." }, @@ -5928,9 +5822,6 @@ "message": "Ειδοποίηση για λογισμικό τρίτων", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "αυτή η συλλογή" - }, "threeMonthsAbbreviation": { "message": "3Μ", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Λειτουργία" }, - "transactionDetailDappGasMoreInfo": { - "message": "Προτεινόμενος ιστότοπος" - }, - "transactionDetailDappGasTooltip": { - "message": "Επεξεργαστείτε για να χρησιμοποιήσετε το προτεινόμενο τέλος συναλλαγής του MetaMask με βάση το τελευταίο μπλοκ." - }, "transactionDetailGasHeading": { "message": "Εκτιμώμενο τέλος συναλλαγής" }, - "transactionDetailGasTooltipConversion": { - "message": "Μάθετε περισσότερα για τα τέλη συναλλαγών" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Τα τέλη συναλλαγών καθορίζονται από το δίκτυο και αυξομειώνονται ανάλογα με την κίνηση του δικτύου και την πολυπλοκότητα των συναλλαγών." - }, - "transactionDetailGasTooltipIntro": { - "message": "Τα τέλη συναλλαγών καταβάλλονται σε κρυπτονομίσματα στους αναλυτές που επεξεργάζονται συναλλαγές στο δίκτυο $1. Το MetaMask δεν επωφελείται από τα τέλη συναλλαγών." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Ποσό + τέλος συναλλαγής" - }, - "transactionDetailLayer2GasHeading": { - "message": "Τέλος συναλλαγής Επιπέδου 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Ποσά + τέλη" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Η συναλλαγή απέτυχε" }, - "transactionFee": { - "message": "Χρέωση συναλλαγής" - }, "transactionFlowNetwork": { "message": "Δίκτυο" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "Το MetaMask αντιμετώπισε πρόβλημα κατά την εκκίνηση. Αυτό το σφάλμα μπορεί να είναι τυχαίο, γι' αυτό προσπαθήστε να επανεκκινήσετε την επέκταση." }, - "trustSiteApprovePermission": { - "message": "Χορηγώντας άδεια, επιτρέπετε στο ακόλουθο $1 να έχει πρόσβαση στα χρήματά σας" - }, "tryAgain": { "message": "Προσπαθήστε ξανά" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Προβολή επαφής" }, - "viewDetails": { - "message": "Προβολή λεπτομερειών" - }, - "viewFullTransactionDetails": { - "message": "Δείτε όλες τις λεπτομέρειες της συναλλαγής" - }, "viewMore": { "message": "Δείτε περισσότερα" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 32f993334570..5d0a4d00b532 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -113,10 +113,6 @@ "message": "I have read and agree to the $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 may access and spend this asset", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Access your wallet with your Secret Recovery Phrase" }, @@ -503,10 +499,6 @@ "allNetworks": { "message": "All networks" }, - "allOfYour": { - "message": "All of your $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "All Permissions" }, @@ -516,10 +508,6 @@ "allTimeLow": { "message": "All time low" }, - "allYourNFTsOf": { - "message": "All of your NFTs from $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Allow" }, @@ -529,10 +517,6 @@ "allowNotifications": { "message": "Allow notifications" }, - "allowSpendToken": { - "message": "Give permission to access your $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Allow $1 to withdraw and spend up to the following amount:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -580,14 +564,6 @@ "approve": { "message": "Approve spend limit" }, - "approveAllTokensTitle": { - "message": "Allow access to and transfer of all your $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Allow access to and transfer all of your NFTs from $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Approve" }, @@ -599,23 +575,9 @@ "message": "Approve $1 spending cap", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "This allows a third party to access and transfer the following NFTs without further notice until you revoke its access." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "This allows a third party to access and transfer all of your NFTs from $1 without further notice until you revoke its access.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Allow access to and transfer of your $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Approved" }, - "approvedAsset": { - "message": "Approved asset" - }, "approvedOn": { "message": "Approved on $1", "description": "$1 is the approval date for a permission" @@ -1715,9 +1677,6 @@ "message": "Delete $1 network?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Deposit" - }, "depositCrypto": { "message": "Deposit crypto from another account with a wallet address or QR code." }, @@ -1913,10 +1872,6 @@ "editGasPriceTooltip": { "message": "This network requires a “Gas price” field when submitting a transaction. Gas price is the amount you will pay pay per unit of gas." }, - "editGasSubTextAmountLabel": { - "message": "Max amount:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Max fee:" }, @@ -2191,9 +2146,6 @@ "fast": { "message": "Fast" }, - "feeAssociatedRequest": { - "message": "A fee is associated with this request." - }, "feeDetails": { "message": "Fee details" }, @@ -2256,12 +2208,6 @@ "function": { "message": "Function: $1" }, - "functionApprove": { - "message": "Function: Approve" - }, - "functionSetApprovalForAll": { - "message": "Function: SetApprovalForAll" - }, "functionType": { "message": "Function type" }, @@ -2369,9 +2315,6 @@ "grantExactAccess": { "message": "Grant exact access" }, - "grantedToWithColon": { - "message": "Granted to:" - }, "gwei": { "message": "GWEI" }, @@ -2413,9 +2356,6 @@ "hideAccount": { "message": "Hide account" }, - "hideFullTransactionDetails": { - "message": "Hide full transaction details" - }, "hideSeedPhrase": { "message": "Hide seed phrase" }, @@ -2662,10 +2602,6 @@ "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. $3 or deposit from another account.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. $3 or $4 from another account.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. Deposit $1 from another account.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2936,9 +2872,6 @@ "loading": { "message": "Loading..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Please complete the transaction on the hardware wallet." - }, "loadingScreenSnapMessage": { "message": "Please complete the transaction on the Snap." }, @@ -3416,10 +3349,6 @@ "next": { "message": "Next" }, - "nextNonceWarning": { - "message": "Nonce is higher than suggested nonce of $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "NFT can’t be added as the ownership details do not match. Make sure you have entered correct information." }, @@ -3510,15 +3439,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Customize transaction nonce" - }, - "nonceFieldDesc": { - "message": "Turn this on to change the nonce (transaction number) when sending assets. This is an advanced feature, use cautiously." - }, - "nonceFieldHeading": { - "message": "Custom nonce" - }, "none": { "message": "None" }, @@ -4023,9 +3943,6 @@ "permissionFrom": { "message": "Permission from" }, - "permissionRequest": { - "message": "Permission request" - }, "permissionRequested": { "message": "Requested now" }, @@ -4768,32 +4685,12 @@ "reviewPermissions": { "message": "Review permissions" }, - "revokeAllTokensTitle": { - "message": "Revoke permission to access and transfer all of your $1?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Revoke permission to access and transfer all of your NFTs from $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "This revokes the permission for a third party to access and transfer all of your $1 without further notice.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "This revokes the permission for a third party to access and transfer all of your NFTs from $1 without further notice.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Revoke permission" }, "revokeSimulationDetailsDesc": { "message": "You're removing someone's permission to spend tokens from your account." }, - "revokeSpendingCap": { - "message": "Revoke spending cap for your $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "This third party will be unable to spend any more of your current or future tokens." }, @@ -5545,9 +5442,6 @@ "message": "Only enter a number that you're comfortable with $1 accessing now or in the future. You can always increase the token limit later.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Spending cap request for your $1" - }, "spendingCapTooltipDesc": { "message": "This is the amount of tokens the spender will be able to access on your behalf." }, @@ -6233,9 +6127,6 @@ "message": "Third-party software notice", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "this collection" - }, "threeMonthsAbbreviation": { "message": "3M", "description": "Shortened form of '3 months'" @@ -6353,30 +6244,9 @@ "transactionDataFunction": { "message": "Function" }, - "transactionDetailDappGasMoreInfo": { - "message": "Site suggested" - }, - "transactionDetailDappGasTooltip": { - "message": "Edit to use MetaMask's recommended gas fee based on the latest block." - }, "transactionDetailGasHeading": { "message": "Estimated gas fee" }, - "transactionDetailGasTooltipConversion": { - "message": "Learn more about gas fees" - }, - "transactionDetailGasTooltipExplanation": { - "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 $1 network. MetaMask does not profit from gas fees." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Amount + gas fee" - }, - "transactionDetailLayer2GasHeading": { - "message": "Layer 2 gas fee" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Amount + fees" }, @@ -6398,9 +6268,6 @@ "transactionFailedBannerMessage": { "message": "This transaction would have cost you extra fees, so we stopped it. Your money is still in your wallet." }, - "transactionFee": { - "message": "Transaction fee" - }, "transactionFlowNetwork": { "message": "Network" }, @@ -6482,9 +6349,6 @@ "troubleStarting": { "message": "MetaMask had trouble starting. This error could be intermittent, so try restarting the extension." }, - "trustSiteApprovePermission": { - "message": "By granting permission, you are allowing the following $1 to access your funds" - }, "tryAgain": { "message": "Try again" }, @@ -6677,12 +6541,6 @@ "viewContact": { "message": "View contact" }, - "viewDetails": { - "message": "View details" - }, - "viewFullTransactionDetails": { - "message": "View full transaction details" - }, "viewMore": { "message": "View more" }, diff --git a/app/_locales/en_GB/messages.json b/app/_locales/en_GB/messages.json index 81b65957c732..6a4119e90c26 100644 --- a/app/_locales/en_GB/messages.json +++ b/app/_locales/en_GB/messages.json @@ -113,10 +113,6 @@ "message": "I have read and agree to the $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 may access and spend this asset", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Access your wallet with your Secret Recovery Phrase" }, @@ -475,10 +471,6 @@ "allCustodianAccountsConnectedTitle": { "message": "No accounts available to connect" }, - "allOfYour": { - "message": "All of your $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "All Permissions" }, @@ -488,10 +480,6 @@ "allTimeLow": { "message": "All time low" }, - "allYourNFTsOf": { - "message": "All of your NFTs from $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Allow" }, @@ -507,10 +495,6 @@ "allowNotifications": { "message": "Allow notifications" }, - "allowSpendToken": { - "message": "Give permission to access your $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Allow $1 to withdraw and spend up to the following amount:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -555,14 +539,6 @@ "approve": { "message": "Approve spend limit" }, - "approveAllTokensTitle": { - "message": "Allow access to and transfer of all your $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Allow access to and transfer all of your NFTs from $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Approve" }, @@ -574,23 +550,9 @@ "message": "Approve $1 spending cap", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "This allows a third party to access and transfer the following NFTs without further notice until you revoke its access." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "This allows a third party to access and transfer all of your NFTs from $1 without further notice until you revoke its access.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Allow access to and transfer of your $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Approved" }, - "approvedAsset": { - "message": "Approved asset" - }, "approvedOn": { "message": "Approved on $1", "description": "$1 is the approval date for a permission" @@ -1479,9 +1441,6 @@ "deleteRpcUrl": { "message": "Delete RPC URL" }, - "deposit": { - "message": "Deposit" - }, "deprecatedGoerliNtwrkMsg": { "message": "Because of updates to the Ethereum system, the Goerli test network will be phased out soon." }, @@ -1670,10 +1629,6 @@ "editGasPriceTooltip": { "message": "This network requires a “Gas price” field when submitting a transaction. Gas price is the amount you will pay pay per unit of gas." }, - "editGasSubTextAmountLabel": { - "message": "Max amount:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Max fee:" }, @@ -1886,9 +1841,6 @@ "fast": { "message": "Fast" }, - "feeAssociatedRequest": { - "message": "A fee is associated with this request." - }, "feeDetails": { "message": "Fee details" }, @@ -1954,12 +1906,6 @@ "function": { "message": "Function: $1" }, - "functionApprove": { - "message": "Function: Approve" - }, - "functionSetApprovalForAll": { - "message": "Function: SetApprovalForAll" - }, "functionType": { "message": "Function type" }, @@ -2073,9 +2019,6 @@ "gotIt": { "message": "Got it" }, - "grantedToWithColon": { - "message": "Granted to:" - }, "gwei": { "message": "GWEI" }, @@ -2117,9 +2060,6 @@ "hideAccount": { "message": "Hide account" }, - "hideFullTransactionDetails": { - "message": "Hide full transaction details" - }, "hideSeedPhrase": { "message": "Hide seed phrase" }, @@ -2362,10 +2302,6 @@ "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. $3 or deposit from another account.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. $3 or $4 from another account.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "You do not have enough $1 in your account to pay for transaction fees on $2 network. Deposit $1 from another account.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2632,9 +2568,6 @@ "loading": { "message": "Loading..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Please complete the transaction on the hardware wallet." - }, "loadingScreenSnapMessage": { "message": "Please complete the transaction on the Snap." }, @@ -3062,10 +2995,6 @@ "next": { "message": "Next" }, - "nextNonceWarning": { - "message": "Nonce is higher than suggested nonce of $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "NFT can’t be added as the ownership details do not match. Make sure you have entered correct information." }, @@ -3150,15 +3079,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Customize transaction nonce" - }, - "nonceFieldDesc": { - "message": "Turn this on to change the nonce (transaction number) when sending assets. This is an advanced feature, use cautiously." - }, - "nonceFieldHeading": { - "message": "Custom nonce" - }, "notBusy": { "message": "Not busy" }, @@ -3659,9 +3579,6 @@ "permissionDetails": { "message": "Permission details" }, - "permissionRequest": { - "message": "Permission request" - }, "permissionRequested": { "message": "Requested now" }, @@ -4343,29 +4260,9 @@ "reviewAlerts": { "message": "Review alerts" }, - "revokeAllTokensTitle": { - "message": "Revoke permission to access and transfer all of your $1?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Revoke permission to access and transfer all of your NFTs from $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "This revokes the permission for a third party to access and transfer all of your $1 without further notice.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "This revokes the permission for a third party to access and transfer all of your NFTs from $1 without further notice.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Revoke permission" }, - "revokeSpendingCap": { - "message": "Revoke spending cap for your $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "This third party will be unable to spend any more of your current or future tokens." }, @@ -5005,9 +4902,6 @@ "message": "Only enter a number that you're comfortable with $1 accessing now or in the future. You can always increase the token limit later.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Spending cap request for your $1" - }, "srpInputNumberOfWords": { "message": "I have a $1-word phrase", "description": "This is the text for each option in the dropdown where a user selects how many words their secret recovery phrase has during import. The $1 is the number of words (either 12, 15, 18, 21, or 24)." @@ -5676,9 +5570,6 @@ "message": "Third-party software notice", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "this collection" - }, "threeMonthsAbbreviation": { "message": "3M", "description": "Shortened form of '3 months'" @@ -5829,30 +5720,9 @@ "transactionDataFunction": { "message": "Function" }, - "transactionDetailDappGasMoreInfo": { - "message": "Site suggested" - }, - "transactionDetailDappGasTooltip": { - "message": "Edit to use MetaMask's recommended gas fee based on the latest block." - }, "transactionDetailGasHeading": { "message": "Estimated gas fee" }, - "transactionDetailGasTooltipConversion": { - "message": "Learn more about gas fees" - }, - "transactionDetailGasTooltipExplanation": { - "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 $1 network. MetaMask does not profit from gas fees." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Amount + gas fee" - }, - "transactionDetailLayer2GasHeading": { - "message": "Layer 2 gas fee" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Amount + fees" }, @@ -5871,9 +5741,6 @@ "transactionFailed": { "message": "Transaction Failed" }, - "transactionFee": { - "message": "Transaction fee" - }, "transactionHistoryBaseFee": { "message": "Base fee (GWEI)" }, @@ -5946,9 +5813,6 @@ "troubleStarting": { "message": "MetaMask had trouble starting. This error could be intermittent, so try restarting the extension." }, - "trustSiteApprovePermission": { - "message": "By granting permission, you are allowing the following $1 to access your funds" - }, "tryAgain": { "message": "Try again" }, @@ -6143,12 +6007,6 @@ "viewContact": { "message": "View contact" }, - "viewDetails": { - "message": "View details" - }, - "viewFullTransactionDetails": { - "message": "View full transaction details" - }, "viewMore": { "message": "View more" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 76a6ed8339ca..41bc0f8d3785 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -113,10 +113,6 @@ "message": "Leí y estoy de acuerdo con $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 puede acceder y gastar este activo", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Acceda a su monedero con la frase secreta de recuperación" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "No hay cuentas disponibles para conectarse" }, - "allOfYour": { - "message": "Todo su $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Todos los permisos" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Punto más bajo" }, - "allYourNFTsOf": { - "message": "Todos sus NFT de $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Permitir" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Permitir notificaciones" }, - "allowSpendToken": { - "message": "¿Dar permiso para acceder a su $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Permitir que se retire $1 y gastar hasta el siguiente importe:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Aprobar límite de gastos" }, - "approveAllTokensTitle": { - "message": "¿Dar permiso para acceder a todo su $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "¿Permitir acceder a y transferir todos sus NFT desde $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Aprobar" }, @@ -584,23 +560,9 @@ "message": "Aprobar límite de gasto $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Esto permite que un tercero acceda y transfiera los siguientes NFT sin previo aviso hasta que usted revoque su acceso." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Esto permite que un tercero acceda y transfiera todos sus NFT de $1 sin previo aviso hasta que usted revoque su acceso.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "¿Permitir el acceso y la transferencia de su $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Aprobado" }, - "approvedAsset": { - "message": "Activo aprobado" - }, "approvedOn": { "message": "Aprobado el $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "¿Eliminar la red de $1?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Depositar" - }, "depositCrypto": { "message": "Deposite criptomonedas desde otra cuenta con una dirección de monedero o un código QR." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Esta red requiere un campo \"Precio del gas\" cuando se envía una transacción. El precio del gas es la cantidad que se pagará por unidad de gas." }, - "editGasSubTextAmountLabel": { - "message": "Cantidad máxima:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Tarifa máxima:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Rápido" }, - "feeAssociatedRequest": { - "message": "Esta solicitud tiene asociada una tarifa." - }, "feeDetails": { "message": "Detalles de la tarifa" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Función: $1" }, - "functionApprove": { - "message": "Función: Aprobar" - }, - "functionSetApprovalForAll": { - "message": "Función: SetApprovalForAll" - }, "functionType": { "message": "Tipo de función" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Entendido" }, - "grantedToWithColon": { - "message": "Concedido a:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Ocultar cuenta" }, - "hideFullTransactionDetails": { - "message": "Esconder los detalles completos de la transacción" - }, "hideSeedPhrase": { "message": "Ocultar frase inicial" }, @@ -2489,10 +2429,6 @@ "message": "No tiene suficiente $1 en su cuenta para pagar las tarifas de transacción en la red de $2. $3 o deposite desde otra cuenta.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "No tiene suficiente $1 en su cuenta para pagar las tarifas de transacción en la red de $2. $3 o $4 desde otra cuenta.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "No tiene suficiente $1 en su cuenta para pagar las tarifas de transacción en la red de $2. Deposite $1 desde otra cuenta.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Cargando…" }, - "loadingScreenHardwareWalletMessage": { - "message": "Por favor, complete la transacción en el monedero físico." - }, "loadingScreenSnapMessage": { "message": "Por favor, complete la transacción en el Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Siguiente" }, - "nextNonceWarning": { - "message": "El nonce es superior al nonce sugerido de $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "No se puede agregar el NFT porque los detalles de propiedad no coinciden. Asegúrese de haber ingresado la información correcta." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Personalizar nonce de transacción" - }, - "nonceFieldDesc": { - "message": "Active esta opción para cambiar el nonce (número de transacción) al enviar activos. Esta es una función avanzada, úsela con precaución." - }, - "nonceFieldHeading": { - "message": "Nonce personalizado" - }, "none": { "message": "Ninguna" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Permiso de" }, - "permissionRequest": { - "message": "Solicitud de permiso" - }, "permissionRequested": { "message": "Solicitado ahora" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Revisar permisos" }, - "revokeAllTokensTitle": { - "message": "¿Revocar el permiso para acceder y transferir todos sus $1?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "¿Revocar el permiso para acceder y transferir todos sus NFT desde $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Esto revoca el permiso para que un tercero acceda y transfiera la totalidad de su $1 sin previo aviso.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Esto revoca el permiso para que un tercero acceda y transfiera todos sus NFT desde $1 sin previo aviso.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Revocar permiso" }, "revokeSimulationDetailsDesc": { "message": "Está eliminando el permiso de una persona para gastar tokens de su cuenta." }, - "revokeSpendingCap": { - "message": "Revocar un límite de gasto para su $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Este tercero no podrá gastar más de sus tokens actuales o futuros." }, @@ -5247,9 +5144,6 @@ "message": "Ingrese solo una cantidad con la que se sienta cómodo para que $1 acceda ahora o en el futuro. Siempre puede aumentar el límite de tokens más tarde.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Solicitud de límite de gastos para su $1" - }, "spendingCapTooltipDesc": { "message": "Esta es la cantidad de tokens a la que el gastador podrá acceder en su nombre." }, @@ -5928,9 +5822,6 @@ "message": "Aviso de software de terceros", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "esta colección" - }, "threeMonthsAbbreviation": { "message": "3 m", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Función" }, - "transactionDetailDappGasMoreInfo": { - "message": "Sitio sugerido" - }, - "transactionDetailDappGasTooltip": { - "message": "Editar para utilizar la tarifa de gas recomendada por MetaMask según el último bloque." - }, "transactionDetailGasHeading": { "message": "Tarifa estimada de gas" }, - "transactionDetailGasTooltipConversion": { - "message": "Obtenga más información sobre las tarifas de gas" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Las tarifas de gas las establece la red y fluctúan según el tráfico y la complejidad de la transacción." - }, - "transactionDetailGasTooltipIntro": { - "message": "Las tarifas de gas se pagan a los mineros de criptomonedas que procesan transacciones en la red $1. MetaMask no se beneficia de las tarifas de gas." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Cantidad + tarifa de gas" - }, - "transactionDetailLayer2GasHeading": { - "message": "Tarifa de gas de la capa 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Monto + cargos" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Transacción fallida" }, - "transactionFee": { - "message": "Tarifa de transacción" - }, "transactionFlowNetwork": { "message": "Red" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask tuvo problemas para iniciar. Este error podría ser intermitente, así que intente reiniciar la extensión." }, - "trustSiteApprovePermission": { - "message": "Al conceder el permiso, usted permite que los siguientes $1 tengan acceso a sus fondos" - }, "tryAgain": { "message": "Vuelva a intentarlo" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Ver contacto" }, - "viewDetails": { - "message": "Ver detalles" - }, - "viewFullTransactionDetails": { - "message": "Ver detalles completos de la transacción" - }, "viewMore": { "message": "Ver más" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 4e82c875c760..e0461b707c00 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -143,10 +143,6 @@ "alerts": { "message": "Alertas" }, - "allowSpendToken": { - "message": "¿Dar permiso para acceder a su $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Permitir que se retire $1 y gastar hasta el siguiente importe:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -627,10 +623,6 @@ "editGasPriceTooltip": { "message": "Esta red requiere un campo \"Precio del gas\" cuando se envía una transacción. El precio del gas es la cantidad que se pagará por unidad de gas." }, - "editGasSubTextAmountLabel": { - "message": "Cantidad máxima:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Tarifa máxima:" }, @@ -738,9 +730,6 @@ "fast": { "message": "Rápido" }, - "feeAssociatedRequest": { - "message": "Esta solicitud tiene asociada una tarifa." - }, "fileImportFail": { "message": "¿No funciona la importación del archivo? ¡Haga clic aquí!", "description": "Helps user import their account from a JSON file" @@ -781,9 +770,6 @@ "message": "De: $1", "description": "$1 is the address to include in the From label. It is typically shortened first using shortenAddress" }, - "functionApprove": { - "message": "Función: Aprobar" - }, "functionType": { "message": "Tipo de función" }, @@ -858,9 +844,6 @@ "goerli": { "message": "Red de prueba Goerli" }, - "grantedToWithColon": { - "message": "Concedido a:" - }, "gwei": { "message": "GWEI" }, @@ -1257,10 +1240,6 @@ "next": { "message": "Siguiente" }, - "nextNonceWarning": { - "message": "El nonce es superior al nonce sugerido de $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nfts": { "message": "NFT" }, @@ -1282,12 +1261,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Personalizar nonce de transacción" - }, - "nonceFieldHeading": { - "message": "Nonce personalizado" - }, "notBusy": { "message": "No ocupado" }, @@ -1412,9 +1385,6 @@ "message": "Tiene (1) transacción pendiente.", "description": "$1 is count of pending transactions" }, - "permissionRequest": { - "message": "Solicitud de permiso" - }, "permission_ethereumAccounts": { "message": "Ver dirección, saldo de cuenta, actividad e iniciar transacciones", "description": "The description for the `eth_accounts` permission" @@ -2152,30 +2122,9 @@ "transactionCreated": { "message": "La transacción se creó con un valor de $1 en $2." }, - "transactionDetailDappGasMoreInfo": { - "message": "Sitio sugerido" - }, - "transactionDetailDappGasTooltip": { - "message": "Editar para utilizar la tarifa de gas recomendada por MetaMask según el último bloque." - }, "transactionDetailGasHeading": { "message": "Tarifa estimada de gas" }, - "transactionDetailGasTooltipConversion": { - "message": "Más información sobre las tarifas de gas" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Las tarifas de gas son fijadas por la red y fluctúan en función del tráfico de la red y la complejidad de las transacciones." - }, - "transactionDetailGasTooltipIntro": { - "message": "Las tarifas de gas se pagan a los mineros de criptomonedas que procesan transacciones en la red $1. MetaMask no se beneficia de las tarifas de gas." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Cantidad + tarifa de gas" - }, - "transactionDetailLayer2GasHeading": { - "message": "Tarifa de gas de la capa 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Monto + cargos" }, @@ -2191,9 +2140,6 @@ "transactionErrored": { "message": "La transacción encontró un error." }, - "transactionFee": { - "message": "Tarifa de transacción" - }, "transactionHistoryBaseFee": { "message": "Tarifa base (GWEI)" }, @@ -2234,9 +2180,6 @@ "message": "Tuvimos problemas al conectar su $1. Pruebe revisar $2 e inténtelo de nuevo.", "description": "$1 is the wallet device name; $2 is a link to wallet connection guide" }, - "trustSiteApprovePermission": { - "message": "Al conceder el permiso, usted permite que los siguientes $1 tengan acceso a sus fondos" - }, "tryAgain": { "message": "Vuelva a intentarlo" }, @@ -2303,9 +2246,6 @@ "viewContact": { "message": "Ver contacto" }, - "viewFullTransactionDetails": { - "message": "Ver detalles completos de la transacción" - }, "viewMore": { "message": "Ver más" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index a2a85b36d987..5a6865167e17 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -701,9 +701,6 @@ "transactionErrored": { "message": "Tehingul ilmnes tõrge." }, - "transactionFee": { - "message": "Tehingutasu" - }, "transactionResubmitted": { "message": "Tehing uuesti edastatud, suurendatud gaasihinnaga $1 asukohas $2" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 3ec5211c2dfb..d0aa63352257 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "معامله با خطا مواجه شد." }, - "transactionFee": { - "message": "فیس معامله" - }, "transactionResubmitted": { "message": "معامله دوباره با فیس افزایش یافته گاز به 1$1 در 2$2 تسلیم داده شد" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index c49ea583598d..14404e7d58c1 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -704,9 +704,6 @@ "transactionErrored": { "message": "Tapahtumissa tapahtui virhe." }, - "transactionFee": { - "message": "Siirtomaksu" - }, "transactionResubmitted": { "message": "Tapahtuma toimitettiin uudelleen bensataksan noustessa summaan $1 kohdassa $2." }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 14f91bc5c16a..d9baef4df06d 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -623,9 +623,6 @@ "transactionErrored": { "message": "Nagkaroon ng error ang transaksyon." }, - "transactionFee": { - "message": "Fee sa Transaksyon" - }, "transactionResubmitted": { "message": "Nasumite ulit ang transaksyon nang may gas fee na ginawang $1 sa ganap na $2" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 1bafcefb952f..f43f44001bb3 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -113,10 +113,6 @@ "message": "J’ai lu et j’accepte les $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 peut accéder à cet actif et le dépenser", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Accédez à votre portefeuille en utilisant votre phrase secrète de récupération" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Aucun compte à connecter" }, - "allOfYour": { - "message": "Tous vos $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Toutes les autorisations" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Le plus bas niveau jamais atteint" }, - "allYourNFTsOf": { - "message": "Tous vos NFT via $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Autoriser" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Autoriser les notifications" }, - "allowSpendToken": { - "message": "Donner l’autorisation d’accéder à votre $1 ?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Permettre à $1 de retirer et de dépenser jusqu’au montant suivant :", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Approuver" }, - "approveAllTokensTitle": { - "message": "Voulez-vous lui accorder l’autorisation d’accéder et de transférer tous vos $1 ?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Autoriser l’accès et le transfert de vos NFT via $1 ?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Approuver" }, @@ -584,23 +560,9 @@ "message": "Approuver le plafond de dépenses de $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Tant que vous n’aurez pas révoqué cette autorisation, l’autre partie pourra accéder à votre portefeuille et transférer sans préavis les NFT suivants." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Tant que vous n’aurez pas révoqué cette autorisation, l’autre partie pourra accéder à votre portefeuille et transférer sans préavis les NFT via $1.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Autoriser l’accès et le transfert de vos $1 ?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Approuvé" }, - "approvedAsset": { - "message": "Actif approuvé" - }, "approvedOn": { "message": "Approuver le $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Supprimer le réseau $1 ?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Effectuez un dépôt" - }, "depositCrypto": { "message": "Déposez des crypto-monnaies à partir d’un autre compte à l’aide d’une adresse de portefeuille ou d’un code QR." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Ce réseau exige un champ « Prix du carburant » lors de la soumission d’une transaction. Le prix du carburant correspond au montant que vous paierez par unité de carburant." }, - "editGasSubTextAmountLabel": { - "message": "Montant maximal :", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Frais maximaux :" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Rapide" }, - "feeAssociatedRequest": { - "message": "Des frais sont associés à cette demande." - }, "feeDetails": { "message": "Détails des frais" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Fonction : $1" }, - "functionApprove": { - "message": "Fonction : approuver" - }, - "functionSetApprovalForAll": { - "message": "Fonction : SetApprovalForAll" - }, "functionType": { "message": "Type de fonction" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "D’accord" }, - "grantedToWithColon": { - "message": "Accordé à :" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Compte caché" }, - "hideFullTransactionDetails": { - "message": "Masquer tous les détails de la transaction" - }, "hideSeedPhrase": { "message": "Masquer la phrase mnémonique" }, @@ -2489,10 +2429,6 @@ "message": "Vous n’avez pas assez de $1 sur votre compte pour payer les frais de transaction sur le réseau de $2. $3 ou effectuez un dépôt depuis un autre compte.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Vous n’avez pas assez de $1 sur votre compte pour payer les frais de transaction sur le réseau $2. $3 ou $4 depuis un autre compte.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Vous n’avez pas assez de $1 sur votre compte pour payer les frais de transaction sur le réseau de $2. Effectuez un dépôt de $1 à partir d’un autre compte.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Chargement..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Veuillez conclure la transaction sur le portefeuille matériel." - }, "loadingScreenSnapMessage": { "message": "Veuillez conclure la transaction sur le snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Suivant" }, - "nextNonceWarning": { - "message": "Le nonce est supérieur au nonce suggéré de $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Ce NFT ne peut pas être ajouté, car les informations de propriété ne correspondent pas. Vérifiez que votre saisie est correcte." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Personnaliser le nonce de transaction" - }, - "nonceFieldDesc": { - "message": "Activez cette option pour modifier le nonce (numéro de transaction) lors de l’envoi d’actifs. Il s’agit d’une fonctionnalité avancée que vous devez utiliser avec prudence." - }, - "nonceFieldHeading": { - "message": "Nonce personnalisé" - }, "none": { "message": "Aucun" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Autorisation de" }, - "permissionRequest": { - "message": "Demande d’autorisation" - }, "permissionRequested": { "message": "Demandé maintenant" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Revoir les autorisations" }, - "revokeAllTokensTitle": { - "message": "Révoquer l’autorisation d’accès et de transfert de tous vos $1 ?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Révoquer l’autorisation d’accès et de transfert de tous vos NFT via $1 ?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Cela révoque l’autorisation pour un tiers d’accéder et de transférer la totalité de vos $1 sans préavis.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Tant que vous n’aurez pas révoqué cette autorisation, l’autre partie pourra accéder à votre portefeuille et transférer sans préavis les NFT via $1.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Retirer l'autorisation" }, "revokeSimulationDetailsDesc": { "message": "Vous révoquez l’autorisation que vous avez accordée à quelqu’un d’autre de dépenser des jetons à partir de votre compte." }, - "revokeSpendingCap": { - "message": "Supprimez le plafond des dépenses pour vos $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Ce tiers ne pourra plus dépenser vos jetons actuels ou futurs." }, @@ -5247,9 +5144,6 @@ "message": "Saisissez uniquement le nombre de jetons $1 que vous êtes prêt à utiliser maintenant ou à l’avenir. Vous pourrez toujours augmenter la limite de jetons plus tard.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Demande de fixer un plafond de dépenses pour votre $1" - }, "spendingCapTooltipDesc": { "message": "Il s’agit du nombre de jetons auquel le dépenseur pourra accéder en votre nom." }, @@ -5928,9 +5822,6 @@ "message": "Avis sur les logiciels développés par des tiers", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "cette collection" - }, "threeMonthsAbbreviation": { "message": "3 mois", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Fonction" }, - "transactionDetailDappGasMoreInfo": { - "message": "Site suggéré" - }, - "transactionDetailDappGasTooltip": { - "message": "Modifier pour utiliser les frais de carburant recommandé par MetaMask selon le dernier bloc." - }, "transactionDetailGasHeading": { "message": "Frais de carburant estimés" }, - "transactionDetailGasTooltipConversion": { - "message": "En savoir plus sur les frais de carburant" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Les frais de carburant sont définis par le réseau et fluctuent selon le trafic réseau et la complexité de la transaction." - }, - "transactionDetailGasTooltipIntro": { - "message": "Les frais de carburant sont payés aux mineurs de cryptomonnaies qui traitent les transactions sur le réseau $1. MetaMask ne tire aucun profit des frais de carburant." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Montant + frais de carburant" - }, - "transactionDetailLayer2GasHeading": { - "message": "Frais de carburant de couche 2 (L2)" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Montant + frais" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "La transaction a échoué" }, - "transactionFee": { - "message": "Frais de transaction" - }, "transactionFlowNetwork": { "message": "Réseau" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "Impossible de démarrer MetaMask. Cette erreur peut être occasionnelle, essayez donc de redémarrer lextension." }, - "trustSiteApprovePermission": { - "message": "En accordant cette autorisation, vous permettez au(x) $1 suivant(s) d’accéder à vos fonds" - }, "tryAgain": { "message": "Réessayez" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Voir le contact" }, - "viewDetails": { - "message": "Afficher les détails" - }, - "viewFullTransactionDetails": { - "message": "Afficher tous les détails de la transaction" - }, "viewMore": { "message": "Afficher plus" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index c9360ff612de..595397de906d 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -704,9 +704,6 @@ "transactionErrored": { "message": "העסקה נתקלה בשגיאה." }, - "transactionFee": { - "message": "עמלת עסקה" - }, "transactionResubmitted": { "message": "העסקה הוגשה מחדש עם עמלת דלק שעלתה ל-$1 ב-$2" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index f476567d095c..ed112e3554fa 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -113,10 +113,6 @@ "message": "मैंने $1 पढ़ लिया है और मैं सहमत हूं", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 एक्सेस कर सकता है और इस एसेट को खर्च कर सकता है", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "अपने सीक्रेट रिकवरी फ्रेज़ का इस्तेमाल कर अपने वॉलेट का एक्सेस पाएं" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "कनेक्ट करने के लिए कोई अकाउंट उपलब्ध नहीं हैं" }, - "allOfYour": { - "message": "आपके सभी $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "सभी अनुमतियां" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "अब तक के सबसे निचले स्तर पर" }, - "allYourNFTsOf": { - "message": "आपके सभी NFTs $1 से शुरू", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "अनुमति दें" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "नोटिफिकेशंस की अनुमति दें" }, - "allowSpendToken": { - "message": "आपके $1 को एक्सेस करने की अनुमति दें?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "$1 को निम्नलिखित तक अमाउंट निकालने और खर्च करने की अनुमति दें:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "खर्च करने की लिमिट को एप्रूव करें" }, - "approveAllTokensTitle": { - "message": "आपके सभी $1 को एक्सेस और ट्रांसफर करने के लिए अनुमति दें", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "अपने सभी NFT's को $1 से एक्सेस करने और ट्रांसफ़र करने की अनुमति दें?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "एप्रूव करें" }, @@ -584,23 +560,9 @@ "message": "खर्च करने की लिमिट $1 को एप्रूव करें", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "यह किसी थर्ड पार्टी को बिना किसी नोटिस के निम्नलिखित NFTs को ऐक्सेस करने और ट्रांसफ़र करने की अनुमति देता है जब तक कि आप इसकी ऐक्सेस को हटा नहीं देते।" - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "यह किसी थर्ड पार्टी को आपके सभी NFTs को $1 से बिना किसी और सूचना के तब तक एक्सेस और ट्रांसफ़र करने की अनुमति देता है जब तक कि आप इसकी ऐक्सेस को हटा नहीं देते।", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "अपने $1 को ऐक्सेस करने और ट्रांसफ़र की अनुमति दें?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "एप्रूव किया गया" }, - "approvedAsset": { - "message": "एप्रूव किया गया एसेट" - }, "approvedOn": { "message": "$1 पर एप्रूव किया गया", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "$1 नेटवर्क को हटाएं?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "डिपॉज़िट करें" - }, "depositCrypto": { "message": "वॉलेट एड्रेस या QR कोड के साथ किसी अन्य अकाउंट से क्रिप्टो डिपॉज़िट करना।" }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "ट्रांसेक्शन सबमिट करते समय इस नेटवर्क को \"गैस प्राइस\" फील्ड की आवश्यकता होती है। गैस प्राइस वह अमाउंट है जो आप प्रति यूनिट गैस के लिए पेमेंट करेंगे।" }, - "editGasSubTextAmountLabel": { - "message": "अधिकतम अमाउंट:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "अधिकतम फ़ीस:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "तेज़" }, - "feeAssociatedRequest": { - "message": "इस रिक्वेस्ट के साथ एक फ़ीस जुड़ी हुई है।" - }, "feeDetails": { "message": "फ़ीस का ब्यौरा" }, @@ -2092,12 +2044,6 @@ "function": { "message": "फंक्शन: $1" }, - "functionApprove": { - "message": "फंक्शन: एप्रूव करें" - }, - "functionSetApprovalForAll": { - "message": "फंक्शन: SetApprovalForAll" - }, "functionType": { "message": "फ़ंक्शन का प्रकार" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "समझ आ गया!" }, - "grantedToWithColon": { - "message": "को प्रदान की गई:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "अकाउंट छिपाएं" }, - "hideFullTransactionDetails": { - "message": "ट्रांसेक्शन की पूरी जानकारी छिपा कर रखें" - }, "hideSeedPhrase": { "message": "सीड फ्रेज़ छुपा दें" }, @@ -2489,10 +2429,6 @@ "message": "$2 नेटवर्क पर ट्रांसेक्शन फ़ीस का पेमेंट करने के लिए आपके अकाउंट में $1 कम है। $3 या किसी अन्य अकाउंट से जमा करें।", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "आपके अकाउंट में $2 नेटवर्क पर ट्रांसेक्शन फ़ीस का पेमेंट करने के लिए $1 कम है। दूसरे अकाउंट से $3 या $4।", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "$2 नेटवर्क पर ट्रांसेक्शन फ़ीस का पेमेंट करने के लिए आपके अकाउंट में $1 कम हैं। अन्य अकाउंट से $1 जमा करें।", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "लोड हो रहा है..." }, - "loadingScreenHardwareWalletMessage": { - "message": "कृपया hardware wallet पर ट्रांजेक्शन पूरा करें।" - }, "loadingScreenSnapMessage": { "message": "कृपया Snap पर ट्रांजेक्शन पूरा करें।" }, @@ -3222,10 +3155,6 @@ "next": { "message": "अगला" }, - "nextNonceWarning": { - "message": "Nonce $1 के सुझाए गए Nonce से अधिक है", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "NFT जोड़ा नहीं जा सकता क्योंकि ओनरशिप की जानकारी मेल नहीं खा रही है। पक्का करें कि आपने सही जानकारी दर्ज की है।" }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "ट्रांसेक्शन Nonce कस्टमाइज़ करें" - }, - "nonceFieldDesc": { - "message": "एसेट भेजते समय Nonce (ट्रांसेक्शन संख्या) बदलने के लिए इसे चालू करें। यह एक एडवांस्ड सुविधा है, सावधानी से उपयोग करें।" - }, - "nonceFieldHeading": { - "message": "कस्टम Nonce" - }, "none": { "message": "कुछ नहीं" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "से अनुमतियां" }, - "permissionRequest": { - "message": "अनुमति अनुरोध" - }, "permissionRequested": { "message": "अब रिक्वेस्ट किया गया" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "अनुमतियों की समीक्षा करें" }, - "revokeAllTokensTitle": { - "message": "आपके सभी $1 को एक्सेस और ट्रांसफ़र करने की अनुमति निरस्त करें?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "आपके सभी NFT's को $1 से एक्सेस और ट्रांसफ़र करने की अनुमति कैंसिल करें?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "यह बिना किसी नोटिस के आपके सभी $1 तक पहुंचने और ट्रांसफ़र करने के लिए किसी थर्ड पार्टी की अनुमति को निरस्त करता है।", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "यह बिना किसी सूचना के आपके सभी NFT को $1 से एक्सेस और ट्रांसफ़र करने के लिए किसी थर्ड पार्टी की अनुमति को कैंसिल कर देता है।", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "अनुमति कैंसिल करने की" }, "revokeSimulationDetailsDesc": { "message": "आप किसी अन्य को आपके अकाउंट से टोकन ख़र्च करने के लिए दी गई अनुमति हटा रहे हैं।" }, - "revokeSpendingCap": { - "message": "अपने $1 के लिए खर्च करने की लिमिट को हटा दें", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "यह थर्ड पार्टी आपके वर्तमान या भविष्य के और ज्यादा टोकन खर्च करने में असमर्थ होगा।" }, @@ -5247,9 +5144,6 @@ "message": "केवल वही संख्या डालें जिसे आप अभी या भविष्य में $1 तक ऐक्सेस करने में सहज महसूस करते हैं। आप टोकन सीमा को बाद में कभी भी बढ़ा सकते हैं।", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "आपके $1 के लिए खर्च करने की लिमिट का अनुरोध" - }, "spendingCapTooltipDesc": { "message": "यह टोकन की वह राशि है जिसे खर्च करने वाला आपकी ओर से प्राप्त कर सकेगा।" }, @@ -5928,9 +5822,6 @@ "message": "थर्ड-पार्टी सॉफ्टवेयर नोटिस", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "यह संग्रह" - }, "threeMonthsAbbreviation": { "message": "3M", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "फंक्शन" }, - "transactionDetailDappGasMoreInfo": { - "message": "साइट का सुझाव दिया गया" - }, - "transactionDetailDappGasTooltip": { - "message": "लेटेस्ट ब्लॉक के आधार पर MetaMask द्वारा अनुशंसित गैस फ़ीस का इस्तेमाल करने के लिए बदलें।" - }, "transactionDetailGasHeading": { "message": "अनुमानित गैस फ़ीस" }, - "transactionDetailGasTooltipConversion": { - "message": "गैस फ़ीस के बारे में और अधिक जानें" - }, - "transactionDetailGasTooltipExplanation": { - "message": "गैस फ़ीस नेटवर्क द्वारा निर्धारित किया जाता है और नेटवर्क ट्रैफिक और ट्रांसेक्शन की जटिलता के आधार पर उतार-चढ़ाव होता है।" - }, - "transactionDetailGasTooltipIntro": { - "message": "क्रिप्टो माइनरों को गैस फ़ीस का पेमेंट किया जाता है जो $1 नेटवर्क पर ट्रांसेक्शन की प्रक्रिया करते हैं। MetaMask को गैस फ़ीस से लाभ नहीं होता है।" - }, - "transactionDetailGasTotalSubtitle": { - "message": "अमाउंट + गैस फ़ीस" - }, - "transactionDetailLayer2GasHeading": { - "message": "लेयर 2 गैस फ़ीस" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "अमाउंट + फ़ीस" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "ट्रांसेक्शन नहीं हो पाया" }, - "transactionFee": { - "message": "ट्रांसेक्शन फ़ीस" - }, "transactionFlowNetwork": { "message": "नेटवर्क" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask को शुरू करने में परेशानी आई। यह गड़बड़ी रुक-रुक कर हो सकती है, इसलिए एक्सटेंशन को फिर से शुरू करके देखें।" }, - "trustSiteApprovePermission": { - "message": "अनुमति प्रदान करके, आप निम्नलिखित $1 को अपने फंड तक पहुंचने की इजाजत दे रहे हैं" - }, "tryAgain": { "message": "फिर से कोशिश करें" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "कॉन्टेक्ट देखें" }, - "viewDetails": { - "message": "विवरण देखें" - }, - "viewFullTransactionDetails": { - "message": "ट्रांसेक्शन की पूरी जानकारी देखें" - }, "viewMore": { "message": "और देखें" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 77b864172ae2..e2d98d9a84bd 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -701,9 +701,6 @@ "transactionErrored": { "message": "Došlo je do greške prilikom transakcije." }, - "transactionFee": { - "message": "Naknada za transakciju" - }, "transactionResubmitted": { "message": "Transakcija je ponovno poslana s naknadom za gorivo povećanom do vrijednosti od $1 u $2." }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 9255c752b4a7..0965aca9162c 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -701,9 +701,6 @@ "transactionErrored": { "message": "Hiba történt a tranzakció során." }, - "transactionFee": { - "message": "Tranzakciós költség" - }, "transactionResubmitted": { "message": "A tranzakció újra beküldve $1 / $2 emelt gázdíjjal." }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index db5b98b83e2e..e1ac4ae889ff 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -113,10 +113,6 @@ "message": "Saya telah membaca dan menyetujui $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 dapat mengakses dan membelanjakan aset ini", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Akses dompet Anda dengan Frasa Pemulihan Rahasia" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Tidak ada akun yang tersedia untuk dihubungkan" }, - "allOfYour": { - "message": "Seluruh $1 Anda", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Semua Izin" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Terendah sepanjang waktu" }, - "allYourNFTsOf": { - "message": "Seluruh NFT Anda dari $1 ", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Izinkan" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Izinkan notifikasi" }, - "allowSpendToken": { - "message": "Berikan izin untuk mengakses $1 Anda?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Izinkan $1 untuk menarik dan menggunakan hingga jumlah berikut:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Setujui batas penggunaan" }, - "approveAllTokensTitle": { - "message": "Berikan izin untuk mengakses dan mentransfer seluruh $1 Anda?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Berikan izin untuk mengakses dan mentransfer seluruh NFT Anda dari $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Setujui" }, @@ -584,23 +560,9 @@ "message": "Setujui batas penggunaan $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Hal ini memungkinkan pihak ketiga untuk mengakses dan mentransfer NFT berikut tanpa pemberitahuan lebih lanjut sampai Anda mencabut aksesnya." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Hal ini memungkinkan pihak ketiga untuk mengakses dan mentransfer seluruh NFT dari $1 Anda tanpa pemberitahuan lebih lanjut sampai Anda mencabut aksesnya.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Berikan izin untuk mengakses dan mentransfer $1 Anda?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Disetujui" }, - "approvedAsset": { - "message": "Aset yang disetujui" - }, "approvedOn": { "message": "Disetujui pada $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Hapus jaringan $1?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Deposit" - }, "depositCrypto": { "message": "Mendeposit kripto dari akun lain dengan alamat dompet atau kode QR." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Jaringan ini memerlukan kolom “Harga gas” saat mengirimkan transaksi. Harga gas merupakan jumlah yang akan Anda bayar per unit gas." }, - "editGasSubTextAmountLabel": { - "message": "Jumlah maks:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Biaya maks:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Cepat" }, - "feeAssociatedRequest": { - "message": "Biaya dikaitkan dengan permintaan ini." - }, "feeDetails": { "message": "Detail biaya" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Fungsi: $1" }, - "functionApprove": { - "message": "Fungsi: Setujui" - }, - "functionSetApprovalForAll": { - "message": "Fungsi: SetApprovalForAll" - }, "functionType": { "message": "Jenis fungsi" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Mengerti" }, - "grantedToWithColon": { - "message": "Diberikan kepada:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Sembunyikan akun" }, - "hideFullTransactionDetails": { - "message": "Sembunyikan detail transaksi lengkap" - }, "hideSeedPhrase": { "message": "Sembunyikan frasa seed" }, @@ -2489,10 +2429,6 @@ "message": "$1 di akun Anda tidak cukup untuk membayar biaya transaksi di jaringan $2. $3 atau depositkan dari akun lain.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "$1 di akun Anda tidak cukup untuk membayar biaya transaksi di jaringan $2. $3 atau $4 dari akun lain.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "$1 di akun Anda tidak cukup untuk membayar biaya transaksi di jaringan $2. Depositkan $1 dari akun lain.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Memuat..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Selesaikan transaksi di dompet perangkat keras." - }, "loadingScreenSnapMessage": { "message": "Selesaikan transaksi di Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Berikutnya" }, - "nextNonceWarning": { - "message": "Nonce lebih tinggi dari nonce $1 yang disarankan", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "NFT tidak dapat ditambahkan karena detail kepemilikan tidak cocok. Pastikan Anda telah memasukkan informasi yang benar." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Sesuaikan nonce transaksi" - }, - "nonceFieldDesc": { - "message": "Aktifkan ini untuk mengubah nonce (nomor transaksi) saat mengirim aset. Ini merupakan fitur lanjutan, gunakan dengan hati-hati." - }, - "nonceFieldHeading": { - "message": "Nonce kustom" - }, "none": { "message": "Tidak ada" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Izin dari" }, - "permissionRequest": { - "message": "Permintaan izin" - }, "permissionRequested": { "message": "Diminta sekarang" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Tinjau izin" }, - "revokeAllTokensTitle": { - "message": "Cabut izin untuk mengakses dan mentransfer seluruh $1 Anda?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Cabut izin untuk mengakses dan mentransfer seluruh NFT dari $1 Anda?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Hal ini mencabut izin pihak ketiga untuk mengakses dan mentransfer seluruh $1 Anda tanpa pemberitahuan lebih lanjut.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Hal ini mencabut izin pihak ketiga untuk mengakses dan mentransfer seluruh NFT dari $1 Anda tanpa pemberitahuan lebih lanjut.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Cabut izin" }, "revokeSimulationDetailsDesc": { "message": "Anda menghapus izin orang lain untuk menggunakan token dari akun Anda." }, - "revokeSpendingCap": { - "message": "Cabut batas penggunaan untuk $1 Anda", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Pihak ketiga ini tidak akan dapat menggunakan token Anda saat ini atau di masa mendatang." }, @@ -5247,9 +5144,6 @@ "message": "Masukkan angka yang menurut Anda dapat diakses $1 sekarang atau di masa mendatang. Anda selalu dapat meningkatkan batas token nanti.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Permintaan batas penggunaan untuk $1 Anda" - }, "spendingCapTooltipDesc": { "message": "Ini adalah jumlah token yang dapat diakses oleh pembeli atas nama Anda." }, @@ -5928,9 +5822,6 @@ "message": "Pemberitahuan perangkat lunak pihak ketiga", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "koleksi ini" - }, "threeMonthsAbbreviation": { "message": "3B", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Fungsi" }, - "transactionDetailDappGasMoreInfo": { - "message": "Situs yang disarankan" - }, - "transactionDetailDappGasTooltip": { - "message": "Edit untuk menggunakan biaya gas yang direkomendasikan MetaMask berdasarkan blok terbaru." - }, "transactionDetailGasHeading": { "message": "Estimasi biaya gas" }, - "transactionDetailGasTooltipConversion": { - "message": "Pelajari selengkapnya seputar biaya gas" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Biaya gas ditetapkan oleh jaringan dan berfluktuasi berdasarkan lalu lintas jaringan dan kompleksitas transaksi." - }, - "transactionDetailGasTooltipIntro": { - "message": "Biaya gas dibayarkan kepada penambang kripto yang memproses transaksi di jaringan $1. MetaMask tidak mengambil keuntungan dari biaya gas." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Jumlah + biaya gas" - }, - "transactionDetailLayer2GasHeading": { - "message": "Biaya gas layer 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Jumlah + biaya" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Transaksi Gagal" }, - "transactionFee": { - "message": "Biaya transaksi" - }, "transactionFlowNetwork": { "message": "Jaringan" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask mengalami masalah saat memulai. Kesalahan ini dapat terjadi berselang, coba mulai ulang ekstensi." }, - "trustSiteApprovePermission": { - "message": "Dengan memberikan izin, Anda mengizinkan $1 berikut untuk mengakses dana Anda" - }, "tryAgain": { "message": "Coba lagi" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Lihat kontak" }, - "viewDetails": { - "message": "Lihat detail" - }, - "viewFullTransactionDetails": { - "message": "Lihat detail transaksi lengkap" - }, "viewMore": { "message": "Lihat selengkapnya" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index a88d710a6f81..ccdaf1d73a06 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -92,10 +92,6 @@ "message": "Ho letto e accetto i $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 può accedere e spendere questa risorsa", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Accedi al tuo portafoglio con la tua frase di recupero segreta" }, @@ -195,14 +191,6 @@ "alerts": { "message": "Avvisi" }, - "allOfYour": { - "message": "Tutti i tuoi $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, - "allowSpendToken": { - "message": "Dai il permesso di spendere tuoi $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Consenti a $1 di ritirare e spendere fino a questo importo:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -229,19 +217,12 @@ "approve": { "message": "Approva" }, - "approveAllTokensTitle": { - "message": "Consenti l'accesso e il trasferimento di tutti i tuoi $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approveButtonText": { "message": "Approva" }, "approved": { "message": "Approvato" }, - "approvedAsset": { - "message": "Asset approvato" - }, "approvedOn": { "message": "Approvato il $1", "description": "$1 is the approval date for a permission" @@ -766,9 +747,6 @@ "fast": { "message": "Veloce" }, - "feeAssociatedRequest": { - "message": "Una tassa è associata a questa richiesta." - }, "fileImportFail": { "message": "Importazione file non funziona? Clicca qui!", "description": "Helps user import their account from a JSON file" @@ -789,9 +767,6 @@ "message": "Da: $1", "description": "$1 is the address to include in the From label. It is typically shortened first using shortenAddress" }, - "functionApprove": { - "message": "Funzione: Approve" - }, "functionType": { "message": "Tipo della Funzione" }, @@ -1029,10 +1004,6 @@ "next": { "message": "Avanti" }, - "nextNonceWarning": { - "message": "Numero di transazione deve essere maggiore di $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Non è possibile aggiungere questo NFT poiché i dettagli della proprietà non corrispondono. Assicurati di aver inserito le informazioni corrette." }, @@ -1052,12 +1023,6 @@ "noWebcamFoundTitle": { "message": "Fotocamera non trovata" }, - "nonceField": { - "message": "Personalizza il numero della transazione" - }, - "nonceFieldHeading": { - "message": "Numero Transazione Personalizzato" - }, "notCurrentAccount": { "message": "È questo l'account corretto? È diverso dall'account selezionato nel tuo portafoglio" }, @@ -1552,9 +1517,6 @@ "transactionErrored": { "message": "La transazione ha riscontrato un errore." }, - "transactionFee": { - "message": "Costo Transazione" - }, "transactionResubmitted": { "message": "Transazione reinviata con costo in gas aumentato a $1 alle $2" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index aeb5066ad16b..f7979764d412 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -113,10 +113,6 @@ "message": "$1を読んで同意しました", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1はこのアセットにアクセスし、使用できます", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "シークレットリカバリーフレーズでウォレットにアクセス" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "接続できるアカウントがありません" }, - "allOfYour": { - "message": "すべての$1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "すべてのアクセス許可" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "最低記録" }, - "allYourNFTsOf": { - "message": "$1のすべてのNFT", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "許可する" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "通知を許可する" }, - "allowSpendToken": { - "message": "$1へのアクセス許可を与えますか?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "$1に以下の額までの引き出しと使用を許可します。", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "使用限度額の承認" }, - "approveAllTokensTitle": { - "message": "すべての$1へのアクセスとその送金を許可しますか?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "$1のすべてのNFTへのアクセスとそれらの転送を許可しますか?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "承認" }, @@ -584,23 +560,9 @@ "message": "$1の使用上限を承認する", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "これにより、アクセス許可を取り消すまで、第三者が今後通知なしに次のNFTにアクセスし、転送できるようになります。" - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "これにより、アクセス許可を取り消すまで、第三者が今後通知なしに$1のすべてのNFTにアクセスし、それらを転送できるようになります。", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "$1へのアクセスと転送を許可しますか?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "承認済み" }, - "approvedAsset": { - "message": "承認済みのアセット" - }, "approvedOn": { "message": "$1に承認", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "$1ネットワークを削除しますか?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "入金" - }, "depositCrypto": { "message": "ウォレットアドレスまたはQRコードを使った別のアカウントからの仮想通貨のデポジット" }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "このネットワークは、トランザクションの送信時に「ガス価格」フィールドが必要です。ガス価格は、ガス1単位あたりに支払う金額です。" }, - "editGasSubTextAmountLabel": { - "message": "最大額:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "最大手数料:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "高速" }, - "feeAssociatedRequest": { - "message": "このリクエストには手数料がかかります。" - }, "feeDetails": { "message": "手数料の詳細" }, @@ -2092,12 +2044,6 @@ "function": { "message": "機能: $1" }, - "functionApprove": { - "message": "機能: 承認" - }, - "functionSetApprovalForAll": { - "message": "関数: SetApprovalForAll" - }, "functionType": { "message": "機能の種類" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "了解" }, - "grantedToWithColon": { - "message": "付与先:" - }, "gwei": { "message": "gwei" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "アカウントを非表示" }, - "hideFullTransactionDetails": { - "message": "完全なトランザクション情報を非表示" - }, "hideSeedPhrase": { "message": "シードフレーズを非表示" }, @@ -2489,10 +2429,6 @@ "message": "アカウントに、$2ネットワークでトランザクション手数料を支払うのに十分な$1がありません。$3するか、別のアカウントからデポジットしてください。", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "アカウントに、$2ネットワークでトランザクション手数料を支払うのに十分な$1がありません。$3するか、別のアカウントから$4してください。", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "アカウントに、$2ネットワークでトランザクション手数料を支払うのに十分な$1がありません。別のアカウントから$1を入金してください。", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "ロードしています..." }, - "loadingScreenHardwareWalletMessage": { - "message": "ハードウェアウォレットでトランザクションを完了させてください。" - }, "loadingScreenSnapMessage": { "message": "Snapでトランザクションを完了させてください。" }, @@ -3222,10 +3155,6 @@ "next": { "message": "次へ" }, - "nextNonceWarning": { - "message": "ナンスが提案された$1よりも大きいです", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "所有者情報が一致していないため、NFTを追加できません。入力された情報が正しいことを確認してください。" }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "ナンス" }, - "nonceField": { - "message": "トランザクション ナンスのカスタマイズ" - }, - "nonceFieldDesc": { - "message": "資産を送る際にナンス (トランザクション番号) を変更するには、この機能をオンにします。これは高度な機能であり、慎重に使用してください。" - }, - "nonceFieldHeading": { - "message": "カスタムナンス" - }, "none": { "message": "なし" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "次からのアクセス許可:" }, - "permissionRequest": { - "message": "許可のリクエスト" - }, "permissionRequested": { "message": "現在リクエスト中" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": " アクセス許可を確認する" }, - "revokeAllTokensTitle": { - "message": "すべての$1へのアクセスおよび転送許可を取り消しますか?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "$1のすべてのNFTへのアクセスおよびそれらの転送の許可を取り消しますか?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "これにより、別途通知なしで第三者によるユーザーの$1へのアクセスおよび転送の許可が取り消されます。", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "これにより、第三者が別途通知なしで$1のすべてのNFTにアクセスし、それらを転送する許可が取り消されます。", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "許可を取り消す" }, "revokeSimulationDetailsDesc": { "message": "別のユーザーに付与したアカウントのトークン使用許可を取り消そうとしています。" }, - "revokeSpendingCap": { - "message": "$1の使用上限を取り消す", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "このサードパーティは、現在または今後のトークンをこれ以上使用できなくなります。" }, @@ -5247,9 +5144,6 @@ "message": "現在または今後$1がアクセスしても構わない額のみを入力してください。トークン上限は後でいつでも増額できます。", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "$1の使用上限のリクエスト" - }, "spendingCapTooltipDesc": { "message": "これは、使用者が代理でアクセスできるようになるトークンの金額です。" }, @@ -5928,9 +5822,6 @@ "message": "サードパーティソフトウェアに関する通知", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "このコレクション" - }, "threeMonthsAbbreviation": { "message": "3か月", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "関数" }, - "transactionDetailDappGasMoreInfo": { - "message": "サイトが提案されました" - }, - "transactionDetailDappGasTooltip": { - "message": "最新のブロックに基づくMetaMaskの推奨ガス代を使用するように編集します。" - }, "transactionDetailGasHeading": { "message": "ガス代見積もり" }, - "transactionDetailGasTooltipConversion": { - "message": "ガス代に関する詳細" - }, - "transactionDetailGasTooltipExplanation": { - "message": "ガス代はネットワークにより設定され、ネットワークトラフィックとトランザクションの複雑さに基づき変動します。" - }, - "transactionDetailGasTooltipIntro": { - "message": "ガス代は、$1ネットワークでトランザクションを処理するクリプトマイナーに支払われます。MetaMaskはガス代から利益を得ません。" - }, - "transactionDetailGasTotalSubtitle": { - "message": "金額 + ガス代" - }, - "transactionDetailLayer2GasHeading": { - "message": "レイヤー2のガス代" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "金額 + 手数料" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "トランザクションに失敗しました" }, - "transactionFee": { - "message": "トランザクション手数料" - }, "transactionFlowNetwork": { "message": "ネットワーク" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMaskがうまく起動しませんでした。このエラーは断続的に発生する可能性があるため、拡張機能を再起動してみてください。" }, - "trustSiteApprovePermission": { - "message": "アクセス許可を付与することで、次の$1による資金へのアクセスが許可されます" - }, "tryAgain": { "message": "再試行" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "連絡先を表示" }, - "viewDetails": { - "message": "詳細を表示" - }, - "viewFullTransactionDetails": { - "message": "トランザクションの完全な詳細を表示" - }, "viewMore": { "message": "詳細を表示" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 148a820f5bfa..3034aac572a9 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "ವಹಿವಾಟಿನಲ್ಲಿ ದೋಷ ಕಂಡುಬಂದಿದೆ." }, - "transactionFee": { - "message": "ವಹಿವಾಟು ಶುಲ್ಕ" - }, "transactionResubmitted": { "message": "$2 ನಲ್ಲಿ $1 ಗೆ ಏರಿದ ಗ್ಯಾಸ್ ಶುಲ್ಕದೊಂದಿಗೆ ವಹಿವಾಟನ್ನು ಮರುಸಲ್ಲಿಸಲಾಗಿದೆ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index babb38ddb218..a3e36ee1734b 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -113,10 +113,6 @@ "message": "$1의 내용을 읽고 이에 동의합니다", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 측이 이 자산에 접근하여 사용할 수 있습니다", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "비밀복구구문으로 지갑에 액세스하세요" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "연결할 계정 없음" }, - "allOfYour": { - "message": "내 모든 $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "모든 권한" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "역대 최저" }, - "allYourNFTsOf": { - "message": "$1의 모든 내 NFT", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "허용" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "알림 허용" }, - "allowSpendToken": { - "message": "$1에 액세스할 수 있는 권한을 부여하시겠습니까?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "$1에서 다음 금액까지 인출 및 지출하도록 허용:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "지출 한도 승인" }, - "approveAllTokensTitle": { - "message": "액세스를 허용하고 모든 $1 전송 권한을 부여하시겠습니까?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "$1에 액세스하여 모든 NFT 전송 권한을 부여하시겠습니까?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "승인" }, @@ -584,23 +560,9 @@ "message": "$1 지출 한도 승인", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "이렇게 하면 사용자가 해당 액세스를 취소할 때까지 제삼자가 별도의 통보 없이 다음과 같은 NFT에 액세스하고 이를 전송할 수 있습니다." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "이렇게 하면 회원님이 해당 액세스를 취소할 때까지 제삼자가 별도의 통보 없이 회원님의 $1에 액세스하여 모든 NFT를 전송하게 됩니다.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "내 $1에 액세스 및 전송할 수 있는 권한을 부여하시겠습니까?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "승인됨" }, - "approvedAsset": { - "message": "승인된 자산" - }, "approvedOn": { "message": "$1에 승인", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "$1 네트워크를 삭제하시겠습니까?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "예치" - }, "depositCrypto": { "message": "지갑 주소 또는 QR 코드를 사용하여 다른 계정에서 암호화폐를 입금합니다." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "이 네트워크에서는 트랜잭션을 제출할 때 \"가스 가격\"을 필수 입력해야 합니다. 가스 가격은 가스 단위당 지급할 금액입니다." }, - "editGasSubTextAmountLabel": { - "message": "최대 금액:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "최대 요금" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "빠름" }, - "feeAssociatedRequest": { - "message": "수수료가 이 요청과 연결되어 있습니다." - }, "feeDetails": { "message": "수수료 세부 정보" }, @@ -2092,12 +2044,6 @@ "function": { "message": "기능: $1" }, - "functionApprove": { - "message": "기능: 승인" - }, - "functionSetApprovalForAll": { - "message": "함수: SetApprovalForAll" - }, "functionType": { "message": "기능 유형" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "확인" }, - "grantedToWithColon": { - "message": "부여 대상:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "계정 숨기기" }, - "hideFullTransactionDetails": { - "message": "전체 트랜잭션 세부 정보 숨기기" - }, "hideSeedPhrase": { "message": "시드 구문 숨기기" }, @@ -2489,10 +2429,6 @@ "message": "$2 네트워크의 트랜잭션 수수료를 지불할 계정에 $1(이)가 부족합니다. $3 또는 다른 계정에서 입금하세요.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "$2 네트워크의 트랜잭션 수수료를 지불할 계정에 $1(이)가 부족합니다. 다른 계정에서 $3 또는 $4 하세요.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "$2 네트워크의 트랜잭션 수수료를 지불할 계정에 $1(이)가 부족합니다. 다른 계좌에서 $1(을)를 입금하세요.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "로드 중..." }, - "loadingScreenHardwareWalletMessage": { - "message": "하드웨어 지갑에서 트랜잭션을 완료하세요." - }, "loadingScreenSnapMessage": { "message": "Snap에서 트랜잭션을 완료하세요." }, @@ -3222,10 +3155,6 @@ "next": { "message": "다음" }, - "nextNonceWarning": { - "message": "논스가 권장 논스값인 $1보다 큽니다.", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "소유권 정보가 일치하지 않아 NFT를 추가할 수 없습니다. 올바른 정보를 입력했는지 확인하세요." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "논스" }, - "nonceField": { - "message": "트랜잭션 논스 맞춤화" - }, - "nonceFieldDesc": { - "message": "자산을 전송할 때 논스(트랜잭션 번호)를 변경하려면 이 기능을 켭니다. 이 기능은 고급 기능이므로 신중하게 사용하세요." - }, - "nonceFieldHeading": { - "message": "맞춤 논스" - }, "none": { "message": "없음" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "승인자:" }, - "permissionRequest": { - "message": "권한 요청" - }, "permissionRequested": { "message": "지금 요청됨" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "권한 검토" }, - "revokeAllTokensTitle": { - "message": "모든 $1에 액세스할 수 있는 권한을 철회하시겠습니까?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "$1에 액세스하여 모든 NFT를 전송하는 권한을 취소하시겠습니까?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "권한을 철회하면 제삼자가 별도의 통보 없이 회원님의 $1에 액세스하거나 이를 모두 전송할 수 없습니다.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "권한을 철회하면 제삼자가 별도의 통보 없이 회원님의 $1에 액세스하거나 모든 NFT를 전송할 수 없습니다.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "권한 철회" }, "revokeSimulationDetailsDesc": { "message": "계정에서 토큰을 사용할 수 있는 다른 사람의 권한을 제거합니다." }, - "revokeSpendingCap": { - "message": "$1에 대한 지출 한도 취소", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "해당 타사는 현재는 물론 미래에도 토큰을 더 이상 사용할 수 없습니다." }, @@ -5247,9 +5144,6 @@ "message": "$1에서 현재나 추후 지출하기에 무리가 없는 금액만 입력하세요. 지출 한도는 나중에 언제든지 상향할 수 있습니다.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "$1 관련 지출 한도 요청" - }, "spendingCapTooltipDesc": { "message": "지출자가 회원님을 대신하여 접근할 수 있는 토큰의 양입니다." }, @@ -5928,9 +5822,6 @@ "message": "타사 소프트웨어 알림", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "이 컬렉션" - }, "threeMonthsAbbreviation": { "message": "3개월", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "기능" }, - "transactionDetailDappGasMoreInfo": { - "message": "추천 사이트" - }, - "transactionDetailDappGasTooltip": { - "message": "최신 블록을 기반으로 MetaMask의 권장 가스비를 사용하도록 편집합니다." - }, "transactionDetailGasHeading": { "message": "예상 가스비" }, - "transactionDetailGasTooltipConversion": { - "message": "가스 요금 자세히 알아보기" - }, - "transactionDetailGasTooltipExplanation": { - "message": "가스비는 네트워크에 의해 설정되며 네트워크 트래픽 및 트랜잭션의 복잡성에 따라 변동합니다." - }, - "transactionDetailGasTooltipIntro": { - "message": "가스비는 $1 네트워크에서 트랜잭션을 처리하는 암호화폐 채굴자에게 지급됩니다. MetaMask는 가스 요금으로 수익을 창출하지 않습니다." - }, - "transactionDetailGasTotalSubtitle": { - "message": "금액 + 가스비" - }, - "transactionDetailLayer2GasHeading": { - "message": "레이어 2 가스비" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "금액 + 요금" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "트랜잭션 실패" }, - "transactionFee": { - "message": "트랜잭션 수수료" - }, "transactionFlowNetwork": { "message": "네트워크" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask 실행 중 오류가 발생했습니다. 일시적인 오류일 수 있으니 확장 프로그램을 재시작해 보세요." }, - "trustSiteApprovePermission": { - "message": "권한을 부여하면 다음 $1에서 회원님의 자금에 액세스할 수 있습니다." - }, "tryAgain": { "message": "다시 시도" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "연락처 보기" }, - "viewDetails": { - "message": "세부 정보 보기" - }, - "viewFullTransactionDetails": { - "message": "전체 트랜잭션 세부정보 표시" - }, "viewMore": { "message": "더 보기" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 3e5586f39f50..860a3e36cc77 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "Įvyko operacijos klaida" }, - "transactionFee": { - "message": "Operacijos mokestis" - }, "transactionResubmitted": { "message": "Operacija pakartotinai pateikta$2 su iki $1 padidintu dujų mokesčiu" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index a1e166937385..2d919d21ee21 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "Darījumā radusies kļūda." }, - "transactionFee": { - "message": "Darījuma nodeva" - }, "transactionResubmitted": { "message": "Darījums atkārtoti iesniegts ar maksu par Gas, palielinātu līdz $1 pie $2" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 3605febbc7d7..644d4666dd7a 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -688,9 +688,6 @@ "transactionErrored": { "message": "Transaksi berdepan ralat." }, - "transactionFee": { - "message": "Yuran Transaksi" - }, "transactionResubmitted": { "message": "Transaksi dihantar semula dengan fi gas ditingkatkan kepada $1 pada $2." }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 8459d3ef3a5f..5ca7b9eaf605 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -686,9 +686,6 @@ "transactionErrored": { "message": "Det oppsto en feil under transaksjonen." }, - "transactionFee": { - "message": "Transaksjonsavgift" - }, "transactionResubmitted": { "message": "Transaksjonen som ble sendt inn igjen med bensinavgift økte til $1 på $2" }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 3dd9ae28d896..c2d43308b466 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -469,9 +469,6 @@ "fast": { "message": "Mabilis" }, - "feeAssociatedRequest": { - "message": "May nauugnay na bayarin para sa request na ito." - }, "fileImportFail": { "message": "Hindi gumagana ang pag-import ng file? Mag-click dito!", "description": "Helps user import their account from a JSON file" @@ -489,9 +486,6 @@ "message": "Mula kay/sa: $1", "description": "$1 is the address to include in the From label. It is typically shortened first using shortenAddress" }, - "functionApprove": { - "message": "Function: Aprubahan" - }, "functionType": { "message": "Uri ng Function" }, @@ -809,10 +803,6 @@ "next": { "message": "Susunod" }, - "nextNonceWarning": { - "message": "Mas mataas ang nonce sa iminumungkahing nonce na $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "noAccountsFound": { "message": "Walang nakitang account para sa ibinigay na query sa paghahanap" }, @@ -828,12 +818,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "I-customize ang nonce ng transaksyon" - }, - "nonceFieldHeading": { - "message": "Custom na Nonce" - }, "notCurrentAccount": { "message": "Ito ba ang tamang account? Iba ito sa kasalukuyang napiling account sa iyong wallet" }, @@ -1491,9 +1475,6 @@ "transactionErrored": { "message": "Nagkaroon ng error sa transaksyon." }, - "transactionFee": { - "message": "Bayarin sa Transaksyon" - }, "transactionResubmitted": { "message": "Isinumite ulit ang transaksyon nang may bayarin sa gas na tumaas at naging $1 sa $2" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index f7f5111c9973..c650f5812f00 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -695,9 +695,6 @@ "transactionErrored": { "message": "Wystąpił błąd podczas wykonywania transakcji." }, - "transactionFee": { - "message": "Opłata transakcyjna" - }, "transactionResubmitted": { "message": "Transakcja wysłana ponownie z opłatą za gaz podwyższoną do $1 – $2" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 69ceb3a9d97e..0ff25571f607 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -113,10 +113,6 @@ "message": "Eu li e concordo com os $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 pode(m) acessar e usar esse ativo", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Acesse sua carteira com sua Frase de Recuperação Secreta" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Nenhuma conta disponível para conectar" }, - "allOfYour": { - "message": "Todos os seus $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Todas as permissões" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Baixa histórica" }, - "allYourNFTsOf": { - "message": "Todos os seus NFTs de $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Permitir" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Permitir notificações" }, - "allowSpendToken": { - "message": "Você dá permissão para acessar seus $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Permitir que $1 saque e gaste até o seguinte valor:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Aprovar limite de gastos" }, - "approveAllTokensTitle": { - "message": "Permitir acesso e transferência de todos os seus $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Permitir acesso e transferência de todos os seus NFTs de $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Aprovar" }, @@ -584,23 +560,9 @@ "message": "Aprovar limite de gastos de $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Isso permite que terceiros acessem e transfiram os seguintes NFTs sem aviso prévio até que você revogue o acesso." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Isso permite que um terceiro acesse e transfira todos os seus NFTs de $1 sem aviso até que você revogue esse acesso.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Permitir acesso e transferência de seu $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Aprovado" }, - "approvedAsset": { - "message": "Ativo aprovado" - }, "approvedOn": { "message": "Aprovada em $1", "description": "$1 is the approval date for a permission" @@ -1563,9 +1525,6 @@ "message": "Excluir rede $1?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Depositar" - }, "depositCrypto": { "message": "Deposite criptomoedas de outra conta com um endereço de carteira ou código QR." }, @@ -1755,10 +1714,6 @@ "editGasPriceTooltip": { "message": "Essa rede requer um campo de \"preço do gás\" ao enviar uma transação. O preço do gás é o valor pago por unidade de gás." }, - "editGasSubTextAmountLabel": { - "message": "Valor máximo:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Taxa máxima:" }, @@ -2030,9 +1985,6 @@ "fast": { "message": "Rápido" }, - "feeAssociatedRequest": { - "message": "Há uma taxa associada a essa solicitação." - }, "feeDetails": { "message": "Detalhes da taxa" }, @@ -2095,12 +2047,6 @@ "function": { "message": "Função: $1" }, - "functionApprove": { - "message": "Função: aprovar" - }, - "functionSetApprovalForAll": { - "message": "Função: SetApprovalForAll" - }, "functionType": { "message": "Tipo de função" }, @@ -2205,9 +2151,6 @@ "gotIt": { "message": "Entendi" }, - "grantedToWithColon": { - "message": "Concedido a:" - }, "gwei": { "message": "GWEI" }, @@ -2249,9 +2192,6 @@ "hideAccount": { "message": "Ocultar conta" }, - "hideFullTransactionDetails": { - "message": "Ocultar detalhes completos da transação" - }, "hideSeedPhrase": { "message": "Ocultar frase-semente" }, @@ -2492,10 +2432,6 @@ "message": "Você não tem $1 suficiente em sua conta para pagar as taxas de transação da rede $2. $3 ou deposite de outra conta.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Você não tem $1 suficiente em sua conta para pagar as taxas de transação na rede $2. $3 ou $4 de outra conta.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Você não tem $1 suficiente em sua conta para pagar as taxas de transação na rede $2. Deposite $1 de outra conta.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2766,9 +2702,6 @@ "loading": { "message": "Carregando..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Por favor, conclua a transação na carteira de hardware." - }, "loadingScreenSnapMessage": { "message": "Por favor, conclua a transação no Snap." }, @@ -3225,10 +3158,6 @@ "next": { "message": "Próximo" }, - "nextNonceWarning": { - "message": "Nonce é maior que o nonce sugerido de $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "O NFT não pôde ser adicionado, pois os dados de propriedade não coincidem. Certifique-se de ter inserido as informações corretas." }, @@ -3313,15 +3242,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Personalizar o nonce da transação" - }, - "nonceFieldDesc": { - "message": "Ative esta opção para alterar o nonce (número da transação) ao enviar ativos. Use com cautela, pois este é um recurso avançado." - }, - "nonceFieldHeading": { - "message": "Nonce personalizado" - }, "none": { "message": "Nenhum" }, @@ -3818,9 +3738,6 @@ "permissionFrom": { "message": "Permissão de" }, - "permissionRequest": { - "message": "Solicitação de permissão" - }, "permissionRequested": { "message": "Solicitada agora" }, @@ -4530,32 +4447,12 @@ "reviewPermissions": { "message": "Revisar permissões" }, - "revokeAllTokensTitle": { - "message": "Revogar permissão de acesso e transferência de todos os seus $1?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Revogar a permissão para acessar e transferir todos os seus NFTs de $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Isso revoga a permissão de terceiros para acessar e transferir todos os seus $1 sem aviso prévio.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Isso revoga a permissão de um terceiro para acessar e transferir todos os seus NFTs de $1 sem aviso.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Revogar permissão" }, "revokeSimulationDetailsDesc": { "message": "Você está removendo a permissão para alguém gastar tokens da sua conta." }, - "revokeSpendingCap": { - "message": "Revogar limite de gastos de seu $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Esse terceiro não poderá gastar mais nenhum dos seus tokens atuais ou futuros." }, @@ -5250,9 +5147,6 @@ "message": "Somente insira um número com o qual esteja confortável de $1 acessar agora ou no futuro. Você pode aumentar o limite de tokens a qualquer momento.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Solicitação de limite de gastos para seu $1" - }, "spendingCapTooltipDesc": { "message": "Esta é a quantidade de tokens que o consumidor poderá acessar em seu nome." }, @@ -5931,9 +5825,6 @@ "message": "Aviso de software de terceiros", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "esta coleção" - }, "threeMonthsAbbreviation": { "message": "3M", "description": "Shortened form of '3 months'" @@ -6048,30 +5939,9 @@ "transactionDataFunction": { "message": "Função" }, - "transactionDetailDappGasMoreInfo": { - "message": "Site sugerido" - }, - "transactionDetailDappGasTooltip": { - "message": "Edite para usar a taxa de gás recomendada pela MetaMask com base no bloco mais recente." - }, "transactionDetailGasHeading": { "message": "Taxa de gás estimada" }, - "transactionDetailGasTooltipConversion": { - "message": "Saiba mais sobre as taxas de gás" - }, - "transactionDetailGasTooltipExplanation": { - "message": "As taxas de gás são definidas pela rede e oscilam com base no tráfego da rede e na complexidade da transação." - }, - "transactionDetailGasTooltipIntro": { - "message": "As taxas de gás são pagas aos mineradores de criptoativos que processam as transações na rede de $1. A MetaMask não lucra com taxas de gás." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Valor + taxa de gás" - }, - "transactionDetailLayer2GasHeading": { - "message": "Taxa de gás de camada 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Valor + taxas" }, @@ -6090,9 +5960,6 @@ "transactionFailed": { "message": "Falha na transação" }, - "transactionFee": { - "message": "Taxa de transação" - }, "transactionFlowNetwork": { "message": "Rede" }, @@ -6174,9 +6041,6 @@ "troubleStarting": { "message": "A MetaMask teve problemas para iniciar. Esse erro pode ser intermitente, por isso tente reiniciar a extensão." }, - "trustSiteApprovePermission": { - "message": "Ao conceder permissão, você estará autorizando que o $1 a seguir acesse seus fundos" - }, "tryAgain": { "message": "Tente novamente" }, @@ -6369,12 +6233,6 @@ "viewContact": { "message": "Ver contato" }, - "viewDetails": { - "message": "Ver detalhes" - }, - "viewFullTransactionDetails": { - "message": "Ver detalhes completos da transação" - }, "viewMore": { "message": "Ver mais" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 3c9c30147276..5f62fc6e7047 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -143,10 +143,6 @@ "alerts": { "message": "Alertas" }, - "allowSpendToken": { - "message": "Você concede acesso aos seus $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Permitir que $1 saque e gaste até o seguinte valor:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -627,10 +623,6 @@ "editGasPriceTooltip": { "message": "Essa rede requer um campo de \"Preço do gás\" ao enviar uma transação. O preço do gás é o valor pago por unidade de gás." }, - "editGasSubTextAmountLabel": { - "message": "Valor máximo:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Taxa máxima:" }, @@ -738,9 +730,6 @@ "fast": { "message": "Rápido" }, - "feeAssociatedRequest": { - "message": "Há uma taxa associada a essa solicitação." - }, "fileImportFail": { "message": "A importação de arquivo não está funcionando? Clique aqui!", "description": "Helps user import their account from a JSON file" @@ -781,9 +770,6 @@ "message": "De: $1", "description": "$1 is the address to include in the From label. It is typically shortened first using shortenAddress" }, - "functionApprove": { - "message": "Função: aprovar" - }, "functionType": { "message": "Tipo de função" }, @@ -858,9 +844,6 @@ "goerli": { "message": "Rede de testes Goerli" }, - "grantedToWithColon": { - "message": "Concedido a:" - }, "gwei": { "message": "GWEI" }, @@ -1257,10 +1240,6 @@ "next": { "message": "Seguinte" }, - "nextNonceWarning": { - "message": "Nonce é maior que o nonce sugerido de $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nfts": { "message": "NFTs" }, @@ -1282,12 +1261,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "Personalizar nonce da transação" - }, - "nonceFieldHeading": { - "message": "Nonce personalizado" - }, "notBusy": { "message": "Não ocupado" }, @@ -1412,9 +1385,6 @@ "message": "Você tem (1) transação pendente.", "description": "$1 is count of pending transactions" }, - "permissionRequest": { - "message": "Solicitação de permissão" - }, "permission_ethereumAccounts": { "message": "Ver endereço, saldo da conta, atividade e iniciar transações", "description": "The description for the `eth_accounts` permission" @@ -2152,30 +2122,9 @@ "transactionCreated": { "message": "Transação criada com valor de $1 às $2." }, - "transactionDetailDappGasMoreInfo": { - "message": "Site sugerido" - }, - "transactionDetailDappGasTooltip": { - "message": "Edite para usar a taxa de gás recomendada pela MetaMask com base no bloco mais recente." - }, "transactionDetailGasHeading": { "message": "Taxa de gás estimada" }, - "transactionDetailGasTooltipConversion": { - "message": "Saiba mais sobre taxas de gás" - }, - "transactionDetailGasTooltipExplanation": { - "message": "As taxas de gás são determinadas pela rede e oscilam com base no tráfego da rede e na complexidade da transação." - }, - "transactionDetailGasTooltipIntro": { - "message": "As taxas de gás são pagas aos mineradores de criptoativos que processam as transações na rede de $1. A MetaMask não lucra com taxas de gás." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Valor + taxa de gás" - }, - "transactionDetailLayer2GasHeading": { - "message": "Taxa de gás de camada 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Valor + taxas" }, @@ -2191,9 +2140,6 @@ "transactionErrored": { "message": "A transação encontrou um erro." }, - "transactionFee": { - "message": "Taxa de transação" - }, "transactionHistoryBaseFee": { "message": "Taxa de base (GWEI)" }, @@ -2234,9 +2180,6 @@ "message": "Tivemos dificuldade para conectar-nos à sua $1. Revise $2 e tente novamente.", "description": "$1 is the wallet device name; $2 is a link to wallet connection guide" }, - "trustSiteApprovePermission": { - "message": "Ao conceder permissão, você estará autorizando que o $1 a seguir acesse seus fundos" - }, "tryAgain": { "message": "Tente novamente" }, @@ -2303,9 +2246,6 @@ "viewContact": { "message": "Ver contato" }, - "viewFullTransactionDetails": { - "message": "Ver detalhes completos da transação" - }, "viewMore": { "message": "Ver mais" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index db440fcfd264..6e9a913f5864 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -695,9 +695,6 @@ "transactionErrored": { "message": "Tranzacția a întâlnit o eroare." }, - "transactionFee": { - "message": "Taxa tranzacției" - }, "transactionResubmitted": { "message": "Tranzacția a fost redepusă cu taxa gaz majorată de la $1 la $2" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 24da515930f3..575e5baa71c8 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -113,10 +113,6 @@ "message": "Я прочитал(-а) $1 и согласен(-на) с ними", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 может получить доступ к этому активу и потратить его", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Получайте доступ к кошельку с помощью секретной фразы для восстановления" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Нет доступных счетов для подключения" }, - "allOfYour": { - "message": "Все ваши $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Все разрешения" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Минимум за все время" }, - "allYourNFTsOf": { - "message": "Все ваши NFT из $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Разрешить" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Разрешить уведомления" }, - "allowSpendToken": { - "message": "Разрешить доступ к вашему $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Разрешить $1 снять и потратить до следующей суммы:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Одобрить лимит расходов" }, - "approveAllTokensTitle": { - "message": "Разрешить доступ ко всем вашим $1 и перевести их?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Разрешить доступ к вашим NFT из $1 и перевести их?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Одобрить" }, @@ -584,23 +560,9 @@ "message": "Одобрить лимит расходов в размере $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Это позволяет третьей стороне получать доступ и переводить следующие NFT без дополнительного уведомления, пока вы не отзовете ее доступ." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Это позволяет третьей стороне получать доступ и переводить все ваши NFT из $1 без дополнительного уведомления, пока вы не закроете ей доступ.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Разрешить доступ и перевод ваших $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Одобрен" }, - "approvedAsset": { - "message": "Одобренный актив" - }, "approvedOn": { "message": "Одобрено $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Удалить сеть $1?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Депозит" - }, "depositCrypto": { "message": "Внесите криптовалюту с другого счета, используя адрес кошелька или QR-код." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "В этой сети необходимо заполнить поле «Цена газа» при отправке транзакции. Цена газа — это сумма, которую вы будете платить за единицу газа." }, - "editGasSubTextAmountLabel": { - "message": "Макс. сумма:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Макс. комиссия:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Быстрый" }, - "feeAssociatedRequest": { - "message": "За выполнение этого запроса взимается комиссия." - }, "feeDetails": { "message": "Сведения о комиссии" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Функция: $1" }, - "functionApprove": { - "message": "Функция: Одобрить" - }, - "functionSetApprovalForAll": { - "message": "Функция: SetApprovalForAll" - }, "functionType": { "message": "Тип функции" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Понятно!" }, - "grantedToWithColon": { - "message": "Предоставляется:" - }, "gwei": { "message": "Гвей" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Скрыть счет" }, - "hideFullTransactionDetails": { - "message": "Скрыть полную информацию о транзакции" - }, "hideSeedPhrase": { "message": "Скрыть сид-фразу" }, @@ -2489,10 +2429,6 @@ "message": "У вас недостаточно $1 для оплаты комиссий за транзакцию в сети $2. $3 или внесите депозит с другого счета.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "У вас недостаточно $1 на счету для оплаты комиссий за транзакцию в сети $2. $3 или $4 с другого счета.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "У вас недостаточно $1 для оплаты комиссий за транзакцию в сети $2. Внесите депозит $1 с другого счета.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Загрузка..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Завершите транзакцию в аппаратном кошельке." - }, "loadingScreenSnapMessage": { "message": "Завершите транзакцию в Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Далее" }, - "nextNonceWarning": { - "message": "Одноразовый номер больше, чем предложенный одноразовый номер $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Невозможно добавить NFT, так как сведения о владельце не совпадают. Убедитесь, что вы ввели правильную информацию." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Одноразовый номер" }, - "nonceField": { - "message": "Настроить одноразовый номер транзакции" - }, - "nonceFieldDesc": { - "message": "Включите это, чтобы изменить одноразовый номер (номер транзакции) при отправке активов. Это продвинутая функция, используйте ее с осторожностью." - }, - "nonceFieldHeading": { - "message": "Пользовательский одноразовый номер" - }, "none": { "message": "Нет" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Разрешение от" }, - "permissionRequest": { - "message": "Запрос разрешения" - }, "permissionRequested": { "message": "Запрошено сейчас" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Проверить разрешения" }, - "revokeAllTokensTitle": { - "message": "Отозвать разрешение на доступ ко всем вашим $1 и их перевод?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Отозвать разрешение на доступ ко всем вашим NFT из $1 и их перевод?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Это отменит разрешение третьей стороне на доступ ко всем вашим $1 и их перевод без дальнейшего уведомления.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Это отменит разрешение третьей стороне на доступ ко всем вашим NFT из $1 и их перевод без дальнейшего уведомления.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Отозвать разрешение" }, "revokeSimulationDetailsDesc": { "message": "Вы удаляете чье-либо разрешение на трату токенов с вашего счета." }, - "revokeSpendingCap": { - "message": "Отменить верхний лимит расходов для вашего $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Эта третья сторона больше не сможет тратить ваши текущие или будущие токены." }, @@ -5247,9 +5144,6 @@ "message": "Введите только то число в качестве лимита для $1, которое приемлемо для вас. Вы всегда можете увеличить лимит токенов позже.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Запрос лимита расходов для вашего $1" - }, "spendingCapTooltipDesc": { "message": "Это количество токенов, к которым покупатель сможет получить доступ от вашего имени." }, @@ -5928,9 +5822,6 @@ "message": "Уведомление о стороннем ПО", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "эта коллекция" - }, "threeMonthsAbbreviation": { "message": "3 М", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Функция" }, - "transactionDetailDappGasMoreInfo": { - "message": "Рекомендовано сайтом" - }, - "transactionDetailDappGasTooltip": { - "message": "Измените, чтобы использовать рекомендованную MetaMask плату за газ с учетом последнего блока." - }, "transactionDetailGasHeading": { "message": "Примерная плата за газ" }, - "transactionDetailGasTooltipConversion": { - "message": "Подробнее о плате за газ" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Плата за газ устанавливается сетью и варьируется в зависимости от сетевого трафика и сложности транзакции." - }, - "transactionDetailGasTooltipIntro": { - "message": "Плата за газ переводится криптомайнерам, которые обрабатывают транзакции в сети $1. MetaMask не получает прибыли от платы за газ." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Сумма + плата за газ" - }, - "transactionDetailLayer2GasHeading": { - "message": "Плата за газ 2-го уровня" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Сумма + комиссии" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Транзакция не удалась" }, - "transactionFee": { - "message": "Комиссия за транзакцию" - }, "transactionFlowNetwork": { "message": "Сеть" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "У MetaMask возникли проблемы с запуском. Эта ошибка может быть непостоянной, поэтому попробуйте перезапустить расширение." }, - "trustSiteApprovePermission": { - "message": "Давая разрешение, вы предоставляете следующему $1 доступ к вашим средствам." - }, "tryAgain": { "message": "Попробуйте еще раз" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Смотреть контакт" }, - "viewDetails": { - "message": "Просмотр сведений" - }, - "viewFullTransactionDetails": { - "message": "Смотреть все реквизиты транзакции" - }, "viewMore": { "message": "Больше" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index a65bc68593f6..c33314bc1d26 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -673,9 +673,6 @@ "transactionErrored": { "message": "Pri transakcii sa vyskytla chyba." }, - "transactionFee": { - "message": "Poplatok za transakciu" - }, "transactionResubmitted": { "message": "Transakcia znovu odoslaná s poplatkom za GAS zvýšeným na $1 na $2" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index ebc303e90c5c..0f1304c80514 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -695,9 +695,6 @@ "transactionErrored": { "message": "Napaka pri transakciji." }, - "transactionFee": { - "message": "Transakcijska provizija" - }, "transactionResubmitted": { "message": "Transakcija ponovno oddana s povečanim gas fee $1 na $2" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 1bbcd0754b92..acfee950bab0 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -695,9 +695,6 @@ "transactionErrored": { "message": "Transakcija je naišla na grešku" }, - "transactionFee": { - "message": "Provizija" - }, "transactionResubmitted": { "message": "Transakcija je ponovo prosleđena sa naknadom za gas povećanom sa $1 na $2" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 818f1eb498d6..07fa52e6eb46 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -686,9 +686,6 @@ "transactionErrored": { "message": "Transaktionen påträffade ett fel." }, - "transactionFee": { - "message": "Transaktionsavgift" - }, "transactionResubmitted": { "message": "Transaktion skickad igen med gas-avgift ökad till $1 på $2" }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index c33abcb51a18..c595de8a1489 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -689,9 +689,6 @@ "transactionErrored": { "message": "Muamala umepata hitilafu." }, - "transactionFee": { - "message": "Ada ya Muamala" - }, "transactionResubmitted": { "message": "Muamala umewasilishwa tena ukiwa na ada ya gesi iliyoongezeka hadi $1 manamo $2" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index c9d46e999a9a..9cd167922bb5 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -113,10 +113,6 @@ "message": "Nabasa ko at sumasang-ayon ako sa $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 maaaring i-access at gamitin ang asset na ito", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "I-access ang iyong wallet gamit ang iyong Lihim na Parirala sa Pagbawi" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Walang mga account na available para ikonekta" }, - "allOfYour": { - "message": "Lahat ng iyong $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Lahat ng Pahintulot" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "All time low" }, - "allYourNFTsOf": { - "message": "Lahat ng iyong NFT mula sa $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Payagan" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Payagan ang mga notipikasyon" }, - "allowSpendToken": { - "message": "Magbigay ng pahintulot na ma-access ang iyong $1?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Payagan ang $1 na mag-withdraw at gastusin ang sumusunod na halaga:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Aprubahan ang limitasyon sa paggastos" }, - "approveAllTokensTitle": { - "message": "Payagan ang pag-access sa at paglilipat ng lahat ng iyong $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Payagan ang pag-access sa at paglilipat ng lahat ng iyong NFT mula sa $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Aprubahan" }, @@ -584,23 +560,9 @@ "message": "Aprubahan ang limitasyon sa paggastos ng $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Nagbibigay-daan ito sa third party na i-access at ilipat ang mga sumusunod na NFT nang walang karagdagang abiso hanggang sa bawiin mo ang pag-access nito." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Nagbibigay-daan ito sa isang third party na i-access at ilipat ang lahat ng iyong NFT mula sa $1 nang walang karagdagang abiso hanggang sa bawiin mo ang pag-access nito.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Payagan ang pag-access sa at paglilipat ng iyong $1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Inaprubahan" }, - "approvedAsset": { - "message": "Aprubadong asset" - }, "approvedOn": { "message": "Inaprubahan noong $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Tanggalin ang $1 network?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Deposito" - }, "depositCrypto": { "message": "Magdeposito ng crypto mula sa ibang account gamit ang wallet address o QR code." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Ang network na ito ay nangangailangan ng field ng “Presyo ng gas” kapag nagsusumite ng transaksyon. Ang presyo ng gas ay ang halaga na babayaran mo kada yunit ng gas." }, - "editGasSubTextAmountLabel": { - "message": "Max na halaga:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Pinakamataas na bayad:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Mabilis" }, - "feeAssociatedRequest": { - "message": "May nauugnay na bayad para sa kahilingang ito." - }, "feeDetails": { "message": "Mga detalye ng singil" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Function: $1" }, - "functionApprove": { - "message": "Function: Aprubahan" - }, - "functionSetApprovalForAll": { - "message": "Function: ItakdaAngPag-aprubaParaSaLahat" - }, "functionType": { "message": "Uri ng Function" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Nakuha ko" }, - "grantedToWithColon": { - "message": "Ipinagkaloob kay:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Itago ang account" }, - "hideFullTransactionDetails": { - "message": "Itago ang buong detalye ng transaksyon" - }, "hideSeedPhrase": { "message": "Itago ang pariralang binhi" }, @@ -2489,10 +2429,6 @@ "message": "Wala kang sapat na $1 sa iyong account para bayaran ang mga transaksyon sa $2 network. $3 o magdeposito mula sa ibang account.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Wala kang sapat na $1 sa iyong account para mabayaran ang mga bayarin sa transaksyon sa $2 network. $3 o $4 mula sa ibang account.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Wala kang sapat na $1 sa iyong account para bayaran ang mga transaksyon sa $2 network. Magdeposito ng $1 mula sa ibang account.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Nilo-load..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Mangyaring kumpletuhin ang transaksyon sa hardware wallet." - }, "loadingScreenSnapMessage": { "message": "Mangyaring kumpletuhin ang transaksyon sa Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Susunod" }, - "nextNonceWarning": { - "message": "Mas mataas ang noncesa iminumungkahing nonce na $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Hindi maidaragdag ang NFT dahil hindi tumutugma ang mga detalye ng pagmamay-ari. Siguraduhing tamang impormasyon ang iyong nailagay." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "I-customize ang nonce ng transaksyon" - }, - "nonceFieldDesc": { - "message": "I-on ito para baguhin ang nonce (numero ng transaksyon) kapag nagpapadala ng mga asset. Ito ay isang advanced na feature, gamitin nang may pag-iingat." - }, - "nonceFieldHeading": { - "message": "I-custom ang nonce" - }, "none": { "message": "Wala" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Pahintulot mula sa" }, - "permissionRequest": { - "message": "Kahilingan sa pahintulot" - }, "permissionRequested": { "message": "Hiniling ngayon" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Suriin ang mga pahintulot" }, - "revokeAllTokensTitle": { - "message": "Bawiin ang pahintulot na i-access at ilipat ang lahat ng iyong $1?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Bawiin ang pahintulot na i-access at ilipat ang lahat ng iyong NFT mula sa $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Binabawi nito ang pahintulot para sa isang third party na i-access at ilipat ang lahat ng iyong $1 nang walang karagdagang abiso.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Binabawi nito ang pahintulot para sa isang third party na i-access at ilipat ang lahat ng iyong NFT mula sa $1 nang walang karagdagang abiso.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Bawiin ang pahintulot" }, "revokeSimulationDetailsDesc": { "message": "Aalisin mo ang pahintulot sa ibang tao na gumastos ng mga token mula sa account mo." }, - "revokeSpendingCap": { - "message": "Bawiin ang limitasyon sa paggastos para sa iyong $1", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Ang third party na ito ay hindi na makakagastos pa sa iyong kasalukuyan o hinaharap na mga token." }, @@ -5247,9 +5144,6 @@ "message": "Maglagay lamang ng numero na komportable kang i-access ng $1 ngayon o sa hinaharap. Palagi mong madadagdagan ang limitasyon ng token sa ibang pagkakataon.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Kahilingan na limitasyon sa paggastos para sa iyong $1" - }, "spendingCapTooltipDesc": { "message": "Ito ang halaga ng mga token na maa-access ng gumagastos sa ngalan mo." }, @@ -5928,9 +5822,6 @@ "message": "Paunawa ng third-party na software", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "koleksyong ito" - }, "threeMonthsAbbreviation": { "message": "3M", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Function" }, - "transactionDetailDappGasMoreInfo": { - "message": "Minungkahing site" - }, - "transactionDetailDappGasTooltip": { - "message": "I-edit upang magamit ang inirerekomendang bayad sa gas ng MetaMask batay sa pinakabagong block." - }, "transactionDetailGasHeading": { "message": "Tinantyang bayad sa gas" }, - "transactionDetailGasTooltipConversion": { - "message": "Alamin pa ang tungkol sa mga bayad sa gas" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Ang mga bayad sa gas ay itinakda ng network at nagbabago-bago batay sa network traffic at pagiging kumplikado ng transaksyon." - }, - "transactionDetailGasTooltipIntro": { - "message": "Ang mga bayad sa gas ay binabayaran sa mga minero ng crypto na nagpoproseso ng mga transaksyon sa $1 na network. Ang MetaMask ay hindi kumikita mula sa mga bayad sa gas." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Halaga + bayad sa gas" - }, - "transactionDetailLayer2GasHeading": { - "message": "Layer 2 na bayad sa gas" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Halaga + fees" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Nabigo ang Transaksyon" }, - "transactionFee": { - "message": "Bayad sa transaksyon" - }, "transactionFlowNetwork": { "message": "Network" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "Nagkaproblema ang MetaMask sa pagsisimula. Maaaring paulit-ulit ang error na ito, kaya subukang i-restart ang extension." }, - "trustSiteApprovePermission": { - "message": "Sa pamamagitan ng pagbibigay ng pahintulot, pinapayagan mo ang sumusunod na $1 para ma-access ang pondo mo" - }, "tryAgain": { "message": "Subukan ulit" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Tingnan ang Contact" }, - "viewDetails": { - "message": "Tingnan ang mga detalye" - }, - "viewFullTransactionDetails": { - "message": "Tingnan ang buong detalye ng transaksyon" - }, "viewMore": { "message": "Tingnan Pa" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 9b6d35760346..fbfc5c016593 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -113,10 +113,6 @@ "message": "$1 bölümünü okudum ve kabul ediyorum", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 bu varlığa erişebilir ve harcayabilir", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Gizli Kurtarma İfadenizle cüzdanınıza erişin" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Bağlayabilecek hesap yok" }, - "allOfYour": { - "message": "Sahip olduğunuz tüm $1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Tüm İzinler" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Tüm zamanların en düşüğü" }, - "allYourNFTsOf": { - "message": "Tüm $1 NFT'leriniz", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "İzin Ver" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Bildirimlere izin ver" }, - "allowSpendToken": { - "message": "$1 erişimine izin ver?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "$1 için şu tutara kadar para çekme ve harcama izni ver:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Harcama limitini onayla" }, - "approveAllTokensTitle": { - "message": "Sahip olduğun tüm $1 için erişim ve transfer izni verilsin mi?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Tüm $1 NFT'lerinizin erişimine ve transferine izin verilsin mi?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Onayla" }, @@ -584,23 +560,9 @@ "message": "$1 harcama üst limitini onayla", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Üçüncü bir tarafın, siz bu erişimi iptal edene kadar başka bildirim yapılmaksızın aşağıdaki NFT'lere erişim sağlamasına ve onları transfer edebilmesine izin verir." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Üçüncü bir tarafın, siz bu erişimi geri çekene kadar başkaca bildiri olmaksızın tüm $1 NFT'lerinize erişim sağlamasına ve onları transfer edebilmesine izin verir.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "$1 için erişim ve transferine izin ver?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Onaylandı" }, - "approvedAsset": { - "message": "Onaylanan varlık" - }, "approvedOn": { "message": "$1 üzerinde onaylandı", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "$1 ağını sil?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Para Yatır" - }, "depositCrypto": { "message": "Cüzdan adresi veya QR kodu ile başka bir hesaptan kripto yatırın." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Bu ağ, bir işlem gönderirken bir \"Gaz fiyatı\" alanı gerektirir. Gaz fiyatı, gaz birimi başına ödeyeceğiniz miktardır." }, - "editGasSubTextAmountLabel": { - "message": "Maks. tutar:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Maks. ücret:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Hızlı" }, - "feeAssociatedRequest": { - "message": "Bu talep ile ilişkili bir ücret mevcuttur." - }, "feeDetails": { "message": "Ücret bilgileri" }, @@ -2092,12 +2044,6 @@ "function": { "message": "İşlev: $1" }, - "functionApprove": { - "message": "İşlev: Onayla" - }, - "functionSetApprovalForAll": { - "message": "İşlev: TümüİçinOnayVer" - }, "functionType": { "message": "İşlev türü" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Anladım" }, - "grantedToWithColon": { - "message": "İzin verilen:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Hesabı gizle" }, - "hideFullTransactionDetails": { - "message": "Tam işlem bilgilerini gizle" - }, "hideSeedPhrase": { "message": "Anahtar cümleyi gizle" }, @@ -2489,10 +2429,6 @@ "message": "Hesabında $2 ağındaki işlem ücretlerini ödemek için yeterli $1 bulunmuyor. $3 veya başka bir hesaptan para yatır.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Hesabınızda $2 ağındaki işlemleri ödemek için yeterli $1 yok. Başka bir hesaptan $3 veya $4.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Hesabında $2 ağındaki işlem ücretlerini ödemek için yeterli $1 bulunmuyor. Başka bir hesaptan $1 yatır.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Yükleniyor..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Lütfen işlemi donanım cüzdanında tamamlayın." - }, "loadingScreenSnapMessage": { "message": "Lütfen işlemi Snap üzerinde tamamlayın." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Sonraki" }, - "nextNonceWarning": { - "message": "Nonce, önerilen $1 nonce'undan büyük", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Sahiplik bilgileri eşleşmediği için NFT eklenemiyor. Doğru bilgileri girdiğinizden emin olun." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "İşlem nonce'unu özelleştir" - }, - "nonceFieldDesc": { - "message": "Varlık gönderirken nonce'u (işlem numarasını) değiştirmek için bunu açın. Bu gelişmiş bir özelliktir, dikkatli kullanın." - }, - "nonceFieldHeading": { - "message": "Özel nonce" - }, "none": { "message": "Yok" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Şuradan izin:" }, - "permissionRequest": { - "message": "İzin talebi" - }, "permissionRequested": { "message": "Şimdi talep edildi" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "İzinleri incele" }, - "revokeAllTokensTitle": { - "message": "Tüm $1 için izin erişim ve transfer izni geri çekilsin mi?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Tüm $1 NFT'lerinize erişim ve transfer izni geri çekilsin mi?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Bu durumda üçüncü bir tarafın başkaca bildiride bulunmaksızın tüm $1 erişim ve transfer izni geri çekilir.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Üçüncü bir tarafın, başkaca bildiri olmaksızın tüm $1 NFT'lerinize erişim sağlama ve onları transfer etme iznini geri çeker.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "İzni geri al" }, "revokeSimulationDetailsDesc": { "message": "Birisinin sizin hesabınızdan token harcama iznini kaldırıyorsunuz." }, - "revokeSpendingCap": { - "message": "$1 için harcama üst limitini iptal et", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Bu üçüncü taraf şimdiki ya da gelecekteki tokenlerinizi artık kullanamayacak." }, @@ -5247,9 +5144,6 @@ "message": "Sadece şu anda ya da gelecekte $1 erişimi konusunda rahat olduğunuz bir sayı girin. Token limitini daha sonra dilediğiniz zaman artırabilirsiniz.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "$1 için harcama üst limiti talebi" - }, "spendingCapTooltipDesc": { "message": "Bu, harcama yapan tarafın sizin adınıza erişim sağlayabileceği token miktarıdır." }, @@ -5928,9 +5822,6 @@ "message": "Üçüncü taraf yazılım uyarısı", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "bu koleksiyon" - }, "threeMonthsAbbreviation": { "message": "3A", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "İşlev" }, - "transactionDetailDappGasMoreInfo": { - "message": "Site önerisi" - }, - "transactionDetailDappGasTooltip": { - "message": "En son bloka göre MetaMask'in önerilen gaz ücretini kullanmak için düzenleyin." - }, "transactionDetailGasHeading": { "message": "Tahmini gaz ücreti" }, - "transactionDetailGasTooltipConversion": { - "message": "Gaz ücretleri hakkında daha fazla bilgi edinin" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Gaz ücretleri ağ tarafından belirlenir ve ağ trafiği ve işlem karmaşıklığına göre dalgalanır." - }, - "transactionDetailGasTooltipIntro": { - "message": "Gaz ücretleri, $1 ağında işlemleri gerçekleştiren kripto madencilerine ödenir. MetaMask gaz ücretlerinden herhangi bir kazanç elde etmemektedir." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Tutar + gaz ücreti" - }, - "transactionDetailLayer2GasHeading": { - "message": "Katman 2 gaz ücreti" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Tutar + ücretler" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "İşlem Başarısız Oldu" }, - "transactionFee": { - "message": "İşlem ücreti" - }, "transactionFlowNetwork": { "message": "Ağ" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask başlatılırken bir sorun oldu. Bu hata sürekli bir hata olmayabilir; bu yüzden uzantıyı yeniden başlatmayı dene." }, - "trustSiteApprovePermission": { - "message": "İzin verdiğinizde paranıza aşağıdaki $1 erişimine izin verirsiniz" - }, "tryAgain": { "message": "Tekrar dene" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Kişiyi görüntüle" }, - "viewDetails": { - "message": "Ayrıntıları görüntüle" - }, - "viewFullTransactionDetails": { - "message": "Tüm işlem bilgilerini görüntüle" - }, "viewMore": { "message": "Daha fazlasını görüntüle" }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 58787e9a2238..e05a45bcfc74 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -707,9 +707,6 @@ "transactionErrored": { "message": "Під час виконання транзакції сталася помилка." }, - "transactionFee": { - "message": "Комісія за транзакцію" - }, "transactionResubmitted": { "message": "Транзакція повторно подана з підвищеною платою за газ до $1 о $2" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index c85c3a005111..c69d37c52088 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -113,10 +113,6 @@ "message": "Tôi đã đọc và đồng ý với $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1 có thể truy cập và chi tiêu tài sản này", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "Truy cập ví của bạn bằng Cụm từ khôi phục bí mật" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "Không có tài khoản để kết nối" }, - "allOfYour": { - "message": "Tất cả $1 của bạn", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "Tất cả các quyền" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "Thấp nhất lịch sử" }, - "allYourNFTsOf": { - "message": "Tất cả NFT của bạn từ $1", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "Cho phép" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "Cho phép thông báo" }, - "allowSpendToken": { - "message": "Cấp quyền truy cập vào $1 của bạn?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "Cho phép $1 rút và chi tiêu tối đa số tiền sau đây:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "Chấp thuận hạn mức chi tiêu" }, - "approveAllTokensTitle": { - "message": "Cho phép truy cập và chuyển tất cả $1 của bạn?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "Cho phép truy cập và chuyển tất cả NFT của bạn từ $1?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "Chấp thuận" }, @@ -584,23 +560,9 @@ "message": "Duyệt hạn mức chi tiêu $1", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "Điều này cho phép bên thứ ba được quyền truy cập và chuyển các NFT sau đây mà không cần thông báo thêm cho đến khi bạn thu hồi quyền truy cập của họ." - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "Điều này cho phép bên thứ ba truy cập và chuyển tất cả NFT của bạn từ $1 mà không cần thông báo thêm cho đến khi bạn thu hồi quyền truy cập của họ.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "Cho phép truy cập và chuyển $1 của bạn?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "Đã chấp thuận" }, - "approvedAsset": { - "message": "Tài sản được chấp thuận" - }, "approvedOn": { "message": "Đã chấp thuận vào $1", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "Xóa mạng $1?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "Nạp" - }, "depositCrypto": { "message": "Nạp tiền mã hóa từ tài khoản khác bằng địa chỉ ví hoặc mã QR." }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "Mạng này yêu cầu trường \"Giá gas\" khi gửi giao dịch. Giá gas là số tiền bạn sẽ trả cho mỗi đơn vị gas." }, - "editGasSubTextAmountLabel": { - "message": "Số tiền tối đa:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "Phí tối đa:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "Nhanh" }, - "feeAssociatedRequest": { - "message": "Yêu cầu này có kèm theo một khoản phí." - }, "feeDetails": { "message": "Chi tiết phí" }, @@ -2092,12 +2044,6 @@ "function": { "message": "Chức năng: $1" }, - "functionApprove": { - "message": "Chức năng: Chấp thuận" - }, - "functionSetApprovalForAll": { - "message": "Chức năng: SetApprovalForAll" - }, "functionType": { "message": "Loại chức năng" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "Đã hiểu" }, - "grantedToWithColon": { - "message": "Cấp cho:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "Ẩn tài khoản" }, - "hideFullTransactionDetails": { - "message": "Ẩn chi tiết giao dịch đầy đủ" - }, "hideSeedPhrase": { "message": "Ẩn cụm từ khôi phục bí mật" }, @@ -2489,10 +2429,6 @@ "message": "Bạn không có đủ $1 trong tài khoản để thanh toán phí giao dịch trên mạng $2. $3 hoặc nạp từ một tài khoản khác.", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "Bạn không có đủ $1 trong tài khoản để thanh toán phí giao dịch trên mạng $2. $3 hoặc $4 từ một tài khoản khác.", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "Bạn không có đủ $1 trong tài khoản để thanh toán phí giao dịch trên mạng $2. Nạp $1 từ một tài khoản khác.", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "Đang tải..." }, - "loadingScreenHardwareWalletMessage": { - "message": "Vui lòng hoàn tất giao dịch trên ví cứng." - }, "loadingScreenSnapMessage": { "message": "Vui lòng hoàn tất giao dịch trên Snap." }, @@ -3222,10 +3155,6 @@ "next": { "message": "Tiếp theo" }, - "nextNonceWarning": { - "message": "Số nonce lớn hơn số nonce gợi ý là $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "Không thể thêm NFT vì thông tin quyền sở hữu không trùng khớp. Đảm bảo bạn đã nhập đúng thông tin." }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Số nonce" }, - "nonceField": { - "message": "Tùy chỉnh số nonce của giao dịch" - }, - "nonceFieldDesc": { - "message": "Bật tính năng này để thay đổi số nonce (số giao dịch) khi gửi tài sản. Đây là một tính năng nâng cao, hãy sử dụng thận trọng." - }, - "nonceFieldHeading": { - "message": "Số nonce tùy chỉnh" - }, "none": { "message": "Không có" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "Quyền từ" }, - "permissionRequest": { - "message": "Yêu cầu cấp quyền" - }, "permissionRequested": { "message": "Đã yêu cầu ngay" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "Xem lại quyền" }, - "revokeAllTokensTitle": { - "message": "Thu hồi quyền truy cập và chuyển tất cả $1 của bạn?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "Thu hồi quyền truy cập và chuyển tất cả NFT của bạn từ $1?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "Hành động này sẽ thu hồi quyền cho phép bên thứ ba truy cập và chuyển tất cả $1 của bạn mà không cần thông báo thêm.", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "Hành động này sẽ thu hồi quyền cho phép bên thứ ba truy cập và chuyển tất cả NFT của bạn từ $1 mà không cần thông báo thêm.", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "Thu hồi quyền" }, "revokeSimulationDetailsDesc": { "message": "Bạn đang xóa quyền chi tiêu token của người khác khỏi tài khoản của bạn." }, - "revokeSpendingCap": { - "message": "Thu hồi hạn mức chi tiêu cho $1 của bạn", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "Bên thứ ba này sẽ không thể chi tiêu thêm bất kỳ token hiện tại hoặc tương lai nào của bạn." }, @@ -5247,9 +5144,6 @@ "message": "Chỉ nhập số mà bạn cảm thấy thoải mái khi truy cập $1 ở hiện tại hoặc trong tương lai. Bạn luôn có thể tăng giới hạn token sau này.", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "Yêu cầu hạn mức chi tiêu cho $1 của bạn" - }, "spendingCapTooltipDesc": { "message": "Đây là số lượng token mà người chi tiêu có thể truy cập thay mặt cho bạn." }, @@ -5928,9 +5822,6 @@ "message": "Thông báo phần mềm của bên thứ ba", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "bộ sưu tập này" - }, "threeMonthsAbbreviation": { "message": "3 Tháng", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "Chức năng" }, - "transactionDetailDappGasMoreInfo": { - "message": "Trang web gợi ý" - }, - "transactionDetailDappGasTooltip": { - "message": "Chỉnh sửa để sử dụng mức phí gas được đề xuất của MetaMask dựa trên khối mới nhất." - }, "transactionDetailGasHeading": { "message": "Phí gas ước tính" }, - "transactionDetailGasTooltipConversion": { - "message": "Tìm hiểu thêm về phí gas" - }, - "transactionDetailGasTooltipExplanation": { - "message": "Phí gas do mạng thiết lập và sẽ dao động dựa trên lưu lượng mạng và độ phức tạp của giao dịch." - }, - "transactionDetailGasTooltipIntro": { - "message": "Phí gas được trả cho thợ đào tiền điện tử, họ là những người xử lý các giao dịch trên mạng $1. MetaMask không thu lợi nhuận từ phí gas." - }, - "transactionDetailGasTotalSubtitle": { - "message": "Số lượng + phí gas" - }, - "transactionDetailLayer2GasHeading": { - "message": "Phí gas Lớp 2" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "Số lượng + phí" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "Giao dịch không thành công" }, - "transactionFee": { - "message": "Phí giao dịch" - }, "transactionFlowNetwork": { "message": "Mạng" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask đã gặp sự cố khi khởi động. Lỗi này có thể xảy ra không liên tục, vì vậy hãy thử khởi động lại tiện ích." }, - "trustSiteApprovePermission": { - "message": "Bằng cách cấp quyền, bạn cho phép $1 sau đây truy cập vào các khoản tiền của mình" - }, "tryAgain": { "message": "Thử lại" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "Xem địa chỉ liên hệ" }, - "viewDetails": { - "message": "Xem chi tiết" - }, - "viewFullTransactionDetails": { - "message": "Xem chi tiết giao dịch đầy đủ" - }, "viewMore": { "message": "Xem thêm" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index bdc4610d1e8a..f70f81a97944 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -113,10 +113,6 @@ "message": "我已阅读并同意 $1", "description": "$1 is the `terms` message" }, - "accessAndSpendNoticeNFT": { - "message": "$1可以访问并使用此资产", - "description": "$1 is the url of the site requesting ability to spend" - }, "accessYourWalletWithSRP": { "message": "使用账户私钥助记词访问钱包" }, @@ -491,10 +487,6 @@ "allCustodianAccountsConnectedTitle": { "message": "没有可连接的账户" }, - "allOfYour": { - "message": "您的所有$1", - "description": "$1 is the symbol or name of the token that the user is approving spending" - }, "allPermissions": { "message": "所有许可" }, @@ -504,10 +496,6 @@ "allTimeLow": { "message": "有史以来新低" }, - "allYourNFTsOf": { - "message": "您所有在$1的NFT", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "allow": { "message": "允许" }, @@ -517,10 +505,6 @@ "allowNotifications": { "message": "允许通知" }, - "allowSpendToken": { - "message": "授予访问您的 $1 的权限?", - "description": "$1 is the symbol of the token that are requesting to spend" - }, "allowWithdrawAndSpend": { "message": "允许 $1 提取和消费最高以下金额:", "description": "The url of the site that requested permission to 'withdraw and spend'" @@ -565,14 +549,6 @@ "approve": { "message": "批准消费限额" }, - "approveAllTokensTitle": { - "message": "是否允许访问并转账您所有的$1?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, - "approveAllTokensTitleWithoutSymbol": { - "message": "是否允许访问并转账您所有在$1的NFT?", - "description": "$1 a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "approveButtonText": { "message": "批准" }, @@ -584,23 +560,9 @@ "message": "批准 $1 支出上限", "description": "The token symbol that is being approved" }, - "approveTokenDescription": { - "message": "这允许第三方访问并转账以下 NFT,而无需另行通知,直到您撤销其访问权限。" - }, - "approveTokenDescriptionWithoutSymbol": { - "message": "这会允许第三方访问并转账您所有在$1的NFT,而无需另行通知,直到您撤销其访问权限。", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "approveTokenTitle": { - "message": "是否允许访问并转账您的 $1 ?", - "description": "$1 is the symbol of the token for which the user is granting approval" - }, "approved": { "message": "已批准" }, - "approvedAsset": { - "message": "已获批准的资产" - }, "approvedOn": { "message": "于$1获得批准", "description": "$1 is the approval date for a permission" @@ -1560,9 +1522,6 @@ "message": "要删除$1网络吗?", "description": "$1 represents the name of the network" }, - "deposit": { - "message": "保证金" - }, "depositCrypto": { "message": "使用钱包地址或二维码从另一账户存入加密货币。" }, @@ -1752,10 +1711,6 @@ "editGasPriceTooltip": { "message": "此网络在提交交易时需要一个“燃料价格”字段。燃料价格是您支付的每单位燃料金额。" }, - "editGasSubTextAmountLabel": { - "message": "最大金额:", - "description": "This is meant to be used as the $1 substitution editGasSubTextAmount" - }, "editGasSubTextFeeLabel": { "message": "最大费用:" }, @@ -2027,9 +1982,6 @@ "fast": { "message": "快" }, - "feeAssociatedRequest": { - "message": "此请求需要支付一定的费用。" - }, "feeDetails": { "message": "费用详情" }, @@ -2092,12 +2044,6 @@ "function": { "message": "功能:$1" }, - "functionApprove": { - "message": "功能:批准" - }, - "functionSetApprovalForAll": { - "message": "功能:SetApprovalForAll" - }, "functionType": { "message": "功能类型" }, @@ -2202,9 +2148,6 @@ "gotIt": { "message": "知道了" }, - "grantedToWithColon": { - "message": "授予:" - }, "gwei": { "message": "GWEI" }, @@ -2246,9 +2189,6 @@ "hideAccount": { "message": "隐藏账户" }, - "hideFullTransactionDetails": { - "message": "隐藏完整的交易细节" - }, "hideSeedPhrase": { "message": "隐藏助记词" }, @@ -2489,10 +2429,6 @@ "message": "您的账户中没有足够的$1可以支付$2网络上的交易费用。$3或从另一个账户存入保证金。", "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button" }, - "insufficientCurrencyBuyOrReceive": { - "message": "您的账户中没有足够的 $1 可以用来支付 $2 网络的交易费用。请使用另一个账户的 $3 或 $4。", - "description": "$1 is the native currency of the network, $2 is the name of the current network, $3 is the key 'buy' + the ticker symbol of the native currency of the chain wrapped in a button, $4 is the key 'deposit' button" - }, "insufficientCurrencyDeposit": { "message": "您的账户中没有足够的$1可以支付$2网络上的交易费用。请从另一个账户存入保证金 $1。", "description": "$1 is the native currency of the network, $2 is the name of the current network" @@ -2763,9 +2699,6 @@ "loading": { "message": "正在加载..." }, - "loadingScreenHardwareWalletMessage": { - "message": "请在硬件钱包上完成交易。" - }, "loadingScreenSnapMessage": { "message": "请在Snap上完成交易。" }, @@ -3222,10 +3155,6 @@ "next": { "message": "下一步" }, - "nextNonceWarning": { - "message": "Nonce 高于所指出的 Nonce: $1", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftAddFailedMessage": { "message": "由于所有权信息不匹配,无法添加NFT。请确保所输入的信息正确无误。" }, @@ -3310,15 +3239,6 @@ "nonce": { "message": "Nonce" }, - "nonceField": { - "message": "自定义交易 nonce" - }, - "nonceFieldDesc": { - "message": "启用此功能可更改发送资产时的唯一交易标识号(交易编号)。这是一个高级功能,请谨慎使用。" - }, - "nonceFieldHeading": { - "message": "自定义 nonce" - }, "none": { "message": "无" }, @@ -3815,9 +3735,6 @@ "permissionFrom": { "message": "权限来自" }, - "permissionRequest": { - "message": "权限请求" - }, "permissionRequested": { "message": "立即请求" }, @@ -4527,32 +4444,12 @@ "reviewPermissions": { "message": "查看许可" }, - "revokeAllTokensTitle": { - "message": "撤销访问和转移您的所有 $1 的权限?", - "description": "$1 is the symbol of the token for which the user is revoking approval" - }, - "revokeAllTokensTitleWithoutSymbol": { - "message": "要撤销访问并转账您所有在$1的NFT的权限吗?", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, - "revokeApproveForAllDescription": { - "message": "这将撤销第三方访问并转账您的所有 $1 的权限,而无需另行通知。", - "description": "$1 is either a string or link of a given token symbol or name" - }, - "revokeApproveForAllDescriptionWithoutSymbol": { - "message": "这会撤销第三方在无需另行通知的情况下访问并转账您所有在$1的NFT的权限。", - "description": "$1 is a link to contract on the block explorer when we're not able to retrieve a erc721 or erc1155 name" - }, "revokePermission": { "message": "撤销权限" }, "revokeSimulationDetailsDesc": { "message": "您正在从您的账户中删除某人使用代币的权限。" }, - "revokeSpendingCap": { - "message": "撤销 $1 的支出上限", - "description": "$1 is a token symbol" - }, "revokeSpendingCapTooltipText": { "message": "第三方将无法再使用您当前或未来的任何代币。" }, @@ -5247,9 +5144,6 @@ "message": "仅输入一个您觉得比较恰当的现在或将来存取 $1 的数字。您稍后可以随时增加代币限额。", "description": "$1 is origin of the site requesting the token limit" }, - "spendingCapRequest": { - "message": "$1的支出上限请求" - }, "spendingCapTooltipDesc": { "message": "他人可代表您访问该代币金额并进行消费。" }, @@ -5928,9 +5822,6 @@ "message": "第三方软件通告", "description": "Title of a popup modal displayed when installing a snap for the first time." }, - "thisCollection": { - "message": "这个收藏品" - }, "threeMonthsAbbreviation": { "message": "3 个月", "description": "Shortened form of '3 months'" @@ -6045,30 +5936,9 @@ "transactionDataFunction": { "message": "功能" }, - "transactionDetailDappGasMoreInfo": { - "message": "建议的网站" - }, - "transactionDetailDappGasTooltip": { - "message": "编辑以使用 MetaMask 建议的基于最新区块的燃料费用。" - }, "transactionDetailGasHeading": { "message": "估算的燃料费" }, - "transactionDetailGasTooltipConversion": { - "message": "了解更多关于燃料费的信息" - }, - "transactionDetailGasTooltipExplanation": { - "message": "燃料费由网络设定,并根据网络流量和交易的复杂性而波动。" - }, - "transactionDetailGasTooltipIntro": { - "message": "燃料费用支付给在 $1 网络上处理交易的加密矿工。MetaMask 不会从燃料费用中获利。" - }, - "transactionDetailGasTotalSubtitle": { - "message": "金额 + 燃料费" - }, - "transactionDetailLayer2GasHeading": { - "message": "二层公链燃料费" - }, "transactionDetailMultiLayerTotalSubtitle": { "message": "金额 + 费用" }, @@ -6087,9 +5957,6 @@ "transactionFailed": { "message": "交易失败" }, - "transactionFee": { - "message": "交易费用" - }, "transactionFlowNetwork": { "message": "网络" }, @@ -6171,9 +6038,6 @@ "troubleStarting": { "message": "MetaMask无法启动。可能发生间歇性错误,因此请尝试重新启动扩展程序。" }, - "trustSiteApprovePermission": { - "message": "通过授予权限,您允许以下 $1 访问您的资金" - }, "tryAgain": { "message": "重试" }, @@ -6366,12 +6230,6 @@ "viewContact": { "message": "查看联系人" }, - "viewDetails": { - "message": "查看详情" - }, - "viewFullTransactionDetails": { - "message": "查看全部交易详情" - }, "viewMore": { "message": "查看更多" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 7b4a425a03ad..e16c0328ae1f 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -468,9 +468,6 @@ "fast": { "message": "快" }, - "feeAssociatedRequest": { - "message": "這個請求會附帶一筆手續費。" - }, "fileImportFail": { "message": "檔案匯入失敗?點擊這裡!", "description": "Helps user import their account from a JSON file" @@ -488,9 +485,6 @@ "message": "來自:$1", "description": "$1 is the address to include in the From label. It is typically shortened first using shortenAddress" }, - "functionApprove": { - "message": "函式:Approve" - }, "functionType": { "message": "函式型別" }, @@ -799,10 +793,6 @@ "next": { "message": "下一頁" }, - "nextNonceWarning": { - "message": "Nonce 比建議的 $1 高", - "description": "The next nonce according to MetaMask's internal logic" - }, "nftTokenIdPlaceholder": { "message": "Enter the NFT ID" }, @@ -818,12 +808,6 @@ "noWebcamFoundTitle": { "message": "找不到攝影鏡頭" }, - "nonceField": { - "message": "自訂交易 nonce" - }, - "nonceFieldHeading": { - "message": "自訂 nonce" - }, "notCurrentAccount": { "message": "這是正確的帳戶嗎?它與您的錢包目前所選擇的帳戶不同" }, @@ -1264,9 +1248,6 @@ "transactionErrored": { "message": "交易遇到錯誤。" }, - "transactionFee": { - "message": "交易手續費" - }, "transactionResubmitted": { "message": "交易重新送出,手續費提高至 $1 @ $2" }, @@ -1286,9 +1267,6 @@ "message": "我們在連線到您的 $1 的時候遇到問題,試著檢查 $2 然後再試一次。", "description": "$1 is the wallet device name; $2 is a link to wallet connection guide" }, - "trustSiteApprovePermission": { - "message": "您信任這個網站嗎?當您授予這個權限,$1 就能提領您的 $2 並且代替您自動發送交易。" - }, "tryAgain": { "message": "再試一次" }, diff --git a/app/scripts/constants/sentry-state.ts b/app/scripts/constants/sentry-state.ts index 114df4904d5e..94bfbb0db29c 100644 --- a/app/scripts/constants/sentry-state.ts +++ b/app/scripts/constants/sentry-state.ts @@ -263,7 +263,6 @@ export const SENTRY_BACKGROUND_STATE = { useCurrencyRateCheck: true, useMultiAccountBalanceChecker: true, useNftDetection: true, - useNonceField: true, usePhishDetect: true, useTokenDetection: true, useTransactionSimulations: true, diff --git a/app/scripts/controllers/preferences-controller.test.ts b/app/scripts/controllers/preferences-controller.test.ts index a86fc35578b9..f2ae9503825f 100644 --- a/app/scripts/controllers/preferences-controller.test.ts +++ b/app/scripts/controllers/preferences-controller.test.ts @@ -582,19 +582,6 @@ describe('preferences controller', () => { }); }); - describe('useNonceField', () => { - it('defaults useNonceField to false', () => { - const { controller } = setupController({}); - expect(controller.state.useNonceField).toStrictEqual(false); - }); - - it('setUseNonceField to true', () => { - const { controller } = setupController({}); - controller.setUseNonceField(true); - expect(controller.state.useNonceField).toStrictEqual(true); - }); - }); - describe('globalThis.setPreference', () => { it('setFeatureFlags to true', () => { const { controller } = setupController({}); diff --git a/app/scripts/controllers/preferences-controller.ts b/app/scripts/controllers/preferences-controller.ts index 88292d619eaf..c6db0ecc45ff 100644 --- a/app/scripts/controllers/preferences-controller.ts +++ b/app/scripts/controllers/preferences-controller.ts @@ -133,7 +133,6 @@ export type PreferencesControllerState = Omit< | 'useMultiRpcMigration' > & { useBlockie: boolean; - useNonceField: boolean; usePhishDetect: boolean; dismissSeedBackUpReminder: boolean; overrideContentSecurityPolicyHeader: boolean; @@ -174,7 +173,6 @@ export const getDefaultPreferencesControllerState = (): PreferencesControllerState => ({ selectedAddress: '', useBlockie: false, - useNonceField: false, usePhishDetect: true, dismissSeedBackUpReminder: false, overrideContentSecurityPolicyHeader: true, @@ -294,10 +292,6 @@ const controllerMetadata = { persist: true, anonymous: true, }, - useNonceField: { - persist: true, - anonymous: true, - }, usePhishDetect: { persist: true, anonymous: true, @@ -530,17 +524,6 @@ export class PreferencesController extends BaseController< }); } - /** - * Setter for the `useNonceField` property - * - * @param val - Whether or not the user prefers to set nonce - */ - setUseNonceField(val: boolean): void { - this.update((state) => { - state.useNonceField = val; - }); - } - /** * Setter for the `usePhishDetect` property * diff --git a/app/scripts/fixtures/with-preferences.js b/app/scripts/fixtures/with-preferences.js index f3e67a98b0b6..eea5cd6c9023 100644 --- a/app/scripts/fixtures/with-preferences.js +++ b/app/scripts/fixtures/with-preferences.js @@ -24,7 +24,6 @@ export const FIXTURES_PREFERENCES = { participateInMetaMetrics: true, dataCollectionForMarketing: true, useNftDetection: true, - useNonceField: true, usePhishDetect: true, useTokenDetection: true, useCurrencyRateCheck: true, diff --git a/app/scripts/lib/backup.test.js b/app/scripts/lib/backup.test.js index 242b9174add4..1435bd59acb2 100644 --- a/app/scripts/lib/backup.test.js +++ b/app/scripts/lib/backup.test.js @@ -147,7 +147,6 @@ const jsonData = JSON.stringify({ }, preferences: { useBlockie: false, - useNonceField: false, usePhishDetect: true, dismissSeedBackUpReminder: false, overrideContentSecurityPolicyHeader: true, diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index bf9b50104d17..7398b713163b 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -3411,9 +3411,6 @@ export default class MetamaskController extends EventEmitter { setUseBlockie: preferencesController.setUseBlockie.bind( preferencesController, ), - setUseNonceField: preferencesController.setUseNonceField.bind( - preferencesController, - ), setUsePhishDetect: preferencesController.setUsePhishDetect.bind( preferencesController, ), diff --git a/app/scripts/migrations/143.test.ts b/app/scripts/migrations/143.test.ts new file mode 100644 index 000000000000..1a456d5c0b47 --- /dev/null +++ b/app/scripts/migrations/143.test.ts @@ -0,0 +1,67 @@ +import { migrate, version } from './143'; + +const oldVersion = 142; + +describe(`migration #${version}`, () => { + it('updates the version metadata', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: {}, + }; + const newStorage = await migrate(oldStorage); + expect(newStorage.meta).toStrictEqual({ version }); + }); + + describe(`migration #${version}`, () => { + it('removes the useNonceField preference if it is set to true', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + PreferencesController: { + useNonceField: true, + }, + }, + }; + const expectedData = { + PreferencesController: {}, + }; + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + + it('removes the useNonceField preference if it is set to false', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + PreferencesController: { + useNonceField: false, + }, + }, + }; + const expectedData = { + PreferencesController: {}, + }; + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + + it('does nothing to other PreferencesController state if there is not a useNonceField preference', async () => { + const oldStorage = { + meta: { version: oldVersion }, + data: { + existingPreference: true, + }, + }; + + const expectedData = { + existingPreference: true, + }; + + const newStorage = await migrate(oldStorage); + + expect(newStorage.data).toStrictEqual(expectedData); + }); + }); +}); diff --git a/app/scripts/migrations/143.ts b/app/scripts/migrations/143.ts new file mode 100644 index 000000000000..2d240d4e7f16 --- /dev/null +++ b/app/scripts/migrations/143.ts @@ -0,0 +1,37 @@ +import { cloneDeep } from 'lodash'; + +type VersionedData = { + meta: { version: number }; + data: Record; +}; + +export const version = 143; + +/** + * This migration deletes the `useNonceField` state property if the user has + * existing data. + * + * @param originalVersionedData - Versioned MetaMask extension state, exactly + * what we persist to dist. + * @param originalVersionedData.meta - State metadata. + * @param originalVersionedData.meta.version - The current state version. + * @param originalVersionedData.data - The persisted MetaMask state, keyed by + * controller. + * @returns Updated versioned MetaMask extension state. + */ +export async function migrate( + originalVersionedData: VersionedData, +): Promise { + const versionedData = cloneDeep(originalVersionedData); + versionedData.meta.version = version; + transformState(versionedData.data); + return versionedData; +} + +function transformState(state: Record) { + const preferencesControllerState = state?.PreferencesController as + | Record + | undefined; + + delete preferencesControllerState?.useNonceField; +} diff --git a/app/scripts/migrations/index.js b/app/scripts/migrations/index.js index fe95c2d4bd80..c1cb32965bec 100644 --- a/app/scripts/migrations/index.js +++ b/app/scripts/migrations/index.js @@ -166,6 +166,7 @@ const migrations = [ require('./140'), require('./141'), require('./142'), + require('./143'), ]; export default migrations; diff --git a/package.json b/package.json index 6bac8d3a9dbc..116f83cb8e6e 100644 --- a/package.json +++ b/package.json @@ -486,13 +486,11 @@ "@storybook/addon-designs": "^7.0.9", "@storybook/addon-docs": "^7.6.20", "@storybook/addon-essentials": "^7.6.20", - "@storybook/addon-knobs": "^7.0.2", "@storybook/addon-mdx-gfm": "^7.6.20", "@storybook/addons": "^7.6.20", "@storybook/api": "^7.6.20", "@storybook/client-api": "^7.6.20", "@storybook/components": "^7.6.20", - "@storybook/core-events": "^7.6.20", "@storybook/react": "^7.6.20", "@storybook/react-webpack5": "^7.6.20", "@storybook/storybook-deployer": "^2.8.16", diff --git a/test/e2e/restore/MetaMaskUserData.json b/test/e2e/restore/MetaMaskUserData.json index 6f08305db357..0876f65fb518 100644 --- a/test/e2e/restore/MetaMaskUserData.json +++ b/test/e2e/restore/MetaMaskUserData.json @@ -41,7 +41,6 @@ "theme": "light", "useBlockie": false, "useNftDetection": false, - "useNonceField": false, "usePhishDetect": true, "useTokenDetection": false, "useCurrencyRateCheck": true, diff --git a/test/e2e/tests/confirmations/transactions/contract-interaction-redesign.spec.ts b/test/e2e/tests/confirmations/transactions/contract-interaction-redesign.spec.ts index d0af539b8755..a1455f365ceb 100644 --- a/test/e2e/tests/confirmations/transactions/contract-interaction-redesign.spec.ts +++ b/test/e2e/tests/confirmations/transactions/contract-interaction-redesign.spec.ts @@ -186,9 +186,6 @@ describe('Confirmation Redesign Contract Interaction Component', function () { dapp: true, fixtures: new FixtureBuilder() .withPermissionControllerConnectedToTestDapp() - .withPreferencesController({ - useNonceField: true, - }) .build(), ganacheOptions: defaultGanacheOptionsForType2Transactions, smartContract, @@ -233,33 +230,6 @@ describe('Confirmation Redesign Contract Interaction Component', function () { ); }); - it('If nonce editing is enabled, advanced details are shown', async function () { - await withFixtures( - { - dapp: true, - fixtures: new FixtureBuilder() - .withPermissionControllerConnectedToTestDapp() - .withPreferencesController({ - useNonceField: true, - }) - .build(), - ganacheOptions: defaultGanacheOptionsForType2Transactions, - smartContract, - title: this.test?.fullTitle(), - }, - async ({ driver, contractRegistry }: TestSuiteArguments) => { - await openDAppWithContract(driver, contractRegistry, smartContract); - - await createDepositTransaction(driver); - - await driver.waitUntilXWindowHandles(3); - await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); - - await assertAdvancedGasDetails(driver); - }, - ); - }); - it('If hex data is enabled, advanced details are shown', async function () { await withFixtures( { diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json index 9070f7f034ce..9f636ad802ca 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-background-state.json @@ -197,7 +197,6 @@ "PreferencesController": { "selectedAddress": "string", "useBlockie": false, - "useNonceField": false, "usePhishDetect": true, "dismissSeedBackUpReminder": true, "overrideContentSecurityPolicyHeader": true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json index d6ca4a7cc524..c1bdabf2ace9 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-after-init-opt-in-ui-state.json @@ -166,7 +166,6 @@ "networkConfigurationsByChainId": "object", "keyrings": "object", "selectedAddress": "string", - "useNonceField": false, "usePhishDetect": true, "dismissSeedBackUpReminder": true, "overrideContentSecurityPolicyHeader": true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json index ff53b4cd0543..70bbb581af96 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-background-state.json @@ -119,7 +119,6 @@ "theme": "light", "useBlockie": false, "useNftDetection": false, - "useNonceField": false, "usePhishDetect": true, "useTokenDetection": false, "useCurrencyRateCheck": true, diff --git a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json index ea51aae6df28..82a46bb5bf6e 100644 --- a/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json +++ b/test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json @@ -119,7 +119,6 @@ "theme": "light", "useBlockie": false, "useNftDetection": false, - "useNonceField": false, "usePhishDetect": true, "useTokenDetection": false, "useCurrencyRateCheck": true, diff --git a/test/integration/data/integration-init-state.json b/test/integration/data/integration-init-state.json index abc3676ba477..4f963c93ca5d 100644 --- a/test/integration/data/integration-init-state.json +++ b/test/integration/data/integration-init-state.json @@ -2062,7 +2062,6 @@ "useExternalNameSources": true, "useMultiAccountBalanceChecker": false, "useNftDetection": false, - "useNonceField": false, "usePhishDetect": true, "useSafeChainsListValidation": true, "useTokenDetection": false, diff --git a/test/integration/data/onboarding-completion-route.json b/test/integration/data/onboarding-completion-route.json index 159de09122be..605624c117d2 100644 --- a/test/integration/data/onboarding-completion-route.json +++ b/test/integration/data/onboarding-completion-route.json @@ -475,7 +475,6 @@ "useExternalServices": true, "useMultiAccountBalanceChecker": true, "useNftDetection": false, - "useNonceField": false, "usePhishDetect": true, "useSafeChainsListValidation": true, "useTokenDetection": true, diff --git a/ui/helpers/constants/routes.ts b/ui/helpers/constants/routes.ts index ac21c32a2b1b..ab0699df1f59 100644 --- a/ui/helpers/constants/routes.ts +++ b/ui/helpers/constants/routes.ts @@ -179,46 +179,6 @@ export const CONFIRMATION_V_NEXT_ROUTE = '/confirmation'; PATH_NAME_MAP[CONFIRMATION_V_NEXT_ROUTE] = 'New Confirmation Page'; PATH_NAME_MAP[`${CONFIRMATION_V_NEXT_ROUTE}/:id`] = 'New Confirmation Page'; -export const CONFIRM_SEND_ETHER_PATH = '/send-ether'; -PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_ETHER_PATH}`] = - 'Confirm Send Ether Transaction Page'; - -export const CONFIRM_SEND_TOKEN_PATH = '/send-token'; -PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SEND_TOKEN_PATH}`] = - 'Confirm Send Token Transaction Page'; - -export const CONFIRM_DEPLOY_CONTRACT_PATH = '/deploy-contract'; -PATH_NAME_MAP[ - `${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_DEPLOY_CONTRACT_PATH}` -] = 'Confirm Deploy Contract Transaction Page'; - -export const CONFIRM_APPROVE_PATH = '/approve'; -PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_APPROVE_PATH}`] = - 'Confirm Approve Transaction Page'; - -export const CONFIRM_SET_APPROVAL_FOR_ALL_PATH = '/set-approval-for-all'; -PATH_NAME_MAP[ - `${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SET_APPROVAL_FOR_ALL_PATH}` -] = 'Confirm Set Approval For All Transaction Page'; - -export const CONFIRM_TRANSFER_FROM_PATH = '/transfer-from'; -PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TRANSFER_FROM_PATH}`] = - 'Confirm Transfer From Transaction Page'; - -export const CONFIRM_SAFE_TRANSFER_FROM_PATH = '/safe-transfer-from'; -PATH_NAME_MAP[ - `${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_SAFE_TRANSFER_FROM_PATH}` -] = 'Confirm Safe Transfer From Transaction Page'; - -export const CONFIRM_TOKEN_METHOD_PATH = '/token-method'; -PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_TOKEN_METHOD_PATH}`] = - 'Confirm Token Method Transaction Page'; - -export const CONFIRM_INCREASE_ALLOWANCE_PATH = '/increase-allowance'; -PATH_NAME_MAP[ - `${CONFIRM_TRANSACTION_ROUTE}/:id${CONFIRM_INCREASE_ALLOWANCE_PATH}` -] = 'Confirm Increase Allowance Transaction Page'; - export const SIGNATURE_REQUEST_PATH = '/signature-request'; PATH_NAME_MAP[`${CONFIRM_TRANSACTION_ROUTE}/:id${SIGNATURE_REQUEST_PATH}`] = 'Signature Request Page'; diff --git a/ui/helpers/constants/settings.js b/ui/helpers/constants/settings.js index dc81794364ad..4b6df4a1b941 100644 --- a/ui/helpers/constants/settings.js +++ b/ui/helpers/constants/settings.js @@ -120,14 +120,6 @@ const SETTINGS_CONSTANTS = [ icon: 'fas fa-sliders-h', }, // advanced settingsRefs[6] - { - tabMessage: (t) => t('advanced'), - sectionMessage: (t) => t('nonceField'), - descriptionMessage: (t) => t('nonceFieldDesc'), - route: `${ADVANCED_ROUTE}#customize-nonce`, - icon: 'fas fa-sliders-h', - }, - // advanced settingsRefs[7] { tabMessage: (t) => t('advanced'), sectionMessage: (t) => t('autoLockTimeLimit'), @@ -135,7 +127,7 @@ const SETTINGS_CONSTANTS = [ route: `${ADVANCED_ROUTE}#autolock-timer`, icon: 'fas fa-sliders-h', }, - // advanced settingsRefs[8] + // advanced settingsRefs[7] { tabMessage: (t) => t('advanced'), sectionMessage: (t) => t('showExtensionInFullSizeView'), @@ -143,7 +135,7 @@ const SETTINGS_CONSTANTS = [ route: `${ADVANCED_ROUTE}#extension-full-size-view`, icon: 'fas fa-sliders-h', }, - // advanced settingsRefs[9] + // advanced settingsRefs[8] { tabMessage: (t) => t('advanced'), sectionMessage: (t) => t('dismissReminderField'), @@ -151,7 +143,7 @@ const SETTINGS_CONSTANTS = [ route: `${ADVANCED_ROUTE}#dismiss-secretrecovery`, icon: 'fas fa-sliders-h', }, - // advanced settingsRefs[10] + // advanced settingsRefs[9] { tabMessage: (t) => t('advanced'), sectionMessage: (t) => t('exportYourData'), @@ -159,7 +151,7 @@ const SETTINGS_CONSTANTS = [ route: `${ADVANCED_ROUTE}#export-data`, icon: 'fas fa-download', }, - // advanced settingsRefs[11] + // advanced settingsRefs[10] { tabMessage: (t) => t('advanced'), sectionMessage: (t) => t('overrideContentSecurityPolicyHeader'), diff --git a/ui/helpers/utils/settings-search.test.js b/ui/helpers/utils/settings-search.test.js index a3db1abf443e..2e49d522c0dd 100644 --- a/ui/helpers/utils/settings-search.test.js +++ b/ui/helpers/utils/settings-search.test.js @@ -52,10 +52,6 @@ const t = (key) => { return 'Show test networks'; case 'showTestnetNetworksDescription': return 'Select this to show test networks in network list'; - case 'nonceField': - return 'Customize transaction nonce'; - case 'nonceFieldDesc': - return 'Turn this on to change the nonce (transaction number) when sending assets. This is an advanced feature, use cautiously.'; case 'autoLockTimeLimit': return 'Auto-lock timer (minutes)'; case 'autoLockTimeLimitDescription': @@ -167,7 +163,7 @@ describe('Settings Search Utils', () => { }); it('returns "Advanced" section count', () => { - expect(getNumberOfSettingRoutesInTab(t, t('advanced'))).toStrictEqual(11); + expect(getNumberOfSettingRoutesInTab(t, t('advanced'))).toStrictEqual(10); }); it('returns "Contact" section count', () => { diff --git a/ui/pages/confirmations/components/approve-content-card/approve-content-card.js b/ui/pages/confirmations/components/approve-content-card/approve-content-card.js deleted file mode 100644 index 247a8148dcfc..000000000000 --- a/ui/pages/confirmations/components/approve-content-card/approve-content-card.js +++ /dev/null @@ -1,286 +0,0 @@ -import React, { useContext } from 'react'; -import PropTypes from 'prop-types'; -import classnames from 'classnames'; - -import Box from '../../../../components/ui/box/box'; -import Button from '../../../../components/ui/button'; -import { Text } from '../../../../components/component-library'; -import { - AlignItems, - BlockSize, - Display, - FlexDirection, - FontWeight, - JustifyContent, - TextAlign, - TextColor, - TextVariant, -} from '../../../../helpers/constants/design-system'; -import { I18nContext } from '../../../../contexts/i18n'; -import { ConfirmGasDisplay } from '../confirm-gas-display'; -import { formatCurrency } from '../../../../helpers/utils/confirm-tx.util'; -import { parseStandardTokenTransactionData } from '../../../../../shared/modules/transaction.utils'; - -export default function ApproveContentCard({ - showHeader = true, - symbol, - title, - showEdit, - showAdvanceGasFeeOptions = false, - onEditClick, - footer, - noBorder, - supportsEIP1559, - renderTransactionDetailsContent, - renderDataContent, - ethTransactionTotal, - nativeCurrency, - fiatTransactionTotal, - currentCurrency, - isSetApproveForAll, - isApprovalOrRejection, - data, - userAcknowledgedGasMissing, - renderSimulationFailureWarning, - useCurrencyRateCheck, -}) { - const t = useContext(I18nContext); - - const tokenData = parseStandardTokenTransactionData(data); - const functionName = tokenData?.name; - const capitalizedFnName = - functionName?.charAt(0).toUpperCase() + functionName?.slice(1); - - return ( - - {showHeader && ( - - {supportsEIP1559 && title === t('transactionFee') ? null : ( - <> - - {symbol} - - - - {title} - - - - )} - {showEdit && (!showAdvanceGasFeeOptions || !supportsEIP1559) && ( - - - - )} - - )} - - {renderTransactionDetailsContent && - (supportsEIP1559 && !renderSimulationFailureWarning ? ( - - ) : ( - - - - {t('feeAssociatedRequest')} - - - - {useCurrencyRateCheck && ( - - - {formatCurrency(fiatTransactionTotal, currentCurrency)} - - - )} - - - {`${ethTransactionTotal} ${nativeCurrency}`} - - - - - ))} - {renderDataContent && ( - - - - {`${t('function', [capitalizedFnName])}`} - - - {isSetApproveForAll && isApprovalOrRejection !== undefined ? ( - - - {`${t('parameters')}: ${isApprovalOrRejection}`} - - - ) : null} - - - {data} - - - - )} - - {footer} - - ); -} - -ApproveContentCard.propTypes = { - /** - * Whether to show header including icon, transaction fee text and edit button - */ - showHeader: PropTypes.bool, - /** - * Symbol icon - */ - symbol: PropTypes.node, - /** - * Title to be included in the header - */ - title: PropTypes.string, - /** - * Whether to show edit button or not - */ - showEdit: PropTypes.bool, - /** - * Whether to show advanced gas fee options or not - */ - showAdvanceGasFeeOptions: PropTypes.bool, - /** - * Should open customize gas modal when edit button is clicked - */ - onEditClick: PropTypes.func, - /** - * Footer to be shown - */ - footer: PropTypes.node, - /** - * Whether to include border-bottom or not - */ - noBorder: PropTypes.bool, - /** - * Is enhanced gas fee enabled or not - */ - supportsEIP1559: PropTypes.bool, - /** - * Whether to render transaction details content or not - */ - renderTransactionDetailsContent: PropTypes.bool, - /** - * Whether to render data content or not - */ - renderDataContent: PropTypes.bool, - /** - * Total sum of the transaction in native currency - */ - ethTransactionTotal: PropTypes.string, - /** - * Current native currency - */ - nativeCurrency: PropTypes.string, - /** - * Total sum of the transaction in fiat currency - */ - fiatTransactionTotal: PropTypes.string, - /** - * Current fiat currency - */ - currentCurrency: PropTypes.string, - /** - * Is set approve for all or not - */ - isSetApproveForAll: PropTypes.bool, - /** - * Whether a current set approval for all transaction will approve or revoke access - */ - isApprovalOrRejection: PropTypes.bool, - /** - * Current transaction data - */ - data: PropTypes.string, - /** - * User acknowledge gas is missing or not - */ - userAcknowledgedGasMissing: PropTypes.bool, - /** - * Render simulation failure warning - */ - renderSimulationFailureWarning: PropTypes.bool, - /** - * Fiat conversion control - */ - useCurrencyRateCheck: PropTypes.bool, -}; diff --git a/ui/pages/confirmations/components/approve-content-card/approve-content-card.stories.js b/ui/pages/confirmations/components/approve-content-card/approve-content-card.stories.js deleted file mode 100644 index 0555c48425a4..000000000000 --- a/ui/pages/confirmations/components/approve-content-card/approve-content-card.stories.js +++ /dev/null @@ -1,195 +0,0 @@ -import React from 'react'; -import { Icon, IconName } from '../../../../components/component-library'; -import ApproveContentCard from './approve-content-card'; - -export default { - title: 'Confirmations/Components/ApproveContentCard', - - argTypes: { - showHeader: { - control: 'boolean', - }, - symbol: { - control: 'array', - }, - title: { - control: 'text', - }, - showEdit: { - control: 'boolean', - }, - showAdvanceGasFeeOptions: { - control: 'boolean', - }, - footer: { - control: 'array', - }, - noBorder: { - control: 'boolean', - }, - supportsEIP1559: { - control: 'boolean', - }, - renderTransactionDetailsContent: { - control: 'boolean', - }, - renderDataContent: { - control: 'boolean', - }, - hasLayer1GasFee: { - control: 'boolean', - }, - ethTransactionTotal: { - control: 'text', - }, - nativeCurrency: { - control: 'text', - }, - fullTxData: { - control: 'object', - }, - hexTransactionTotal: { - control: 'text', - }, - fiatTransactionTotal: { - control: 'text', - }, - currentCurrency: { - control: 'text', - }, - isSetApproveForAll: { - control: 'boolean', - }, - isApprovalOrRejection: { - control: 'boolean', - }, - data: { - control: 'text', - }, - onEditClick: { - control: 'onEditClick', - }, - }, - args: { - showHeader: true, - symbol: , - title: 'Transaction fee', - showEdit: true, - showAdvanceGasFeeOptions: true, - noBorder: true, - supportsEIP1559: false, - renderTransactionDetailsContent: true, - renderDataContent: false, - hasLayer1GasFee: false, - ethTransactionTotal: '0.0012', - nativeCurrency: 'GoerliETH', - hexTransactionTotal: '0x44364c5bb0000', - fiatTransactionTotal: '1.54', - currentCurrency: 'usd', - isSetApproveForAll: false, - isApprovalOrRejection: false, - data: '', - fullTxData: { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - history: [ - { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: true, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - gasPrice: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - }, - [ - { - op: 'remove', - path: '/txParams/gasPrice', - note: 'Added new unapproved transaction.', - timestamp: 1664449553939, - }, - { - op: 'add', - path: '/txParams/maxFeePerGas', - value: '0x4a817c800', - }, - { - op: 'add', - path: '/txParams/maxPriorityFeePerGas', - value: '0x4a817c800', - }, - { - op: 'replace', - path: '/loadingDefaults', - value: false, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'custom', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - ], - ], - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - }, -}; - -export const DefaultStory = (args) => { - return ; -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/components/approve-content-card/index.js b/ui/pages/confirmations/components/approve-content-card/index.js deleted file mode 100644 index 02838ddb5ab0..000000000000 --- a/ui/pages/confirmations/components/approve-content-card/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './approve-content-card'; diff --git a/ui/pages/confirmations/components/approve-content-card/index.scss b/ui/pages/confirmations/components/approve-content-card/index.scss deleted file mode 100644 index 8dd9badc1d5d..000000000000 --- a/ui/pages/confirmations/components/approve-content-card/index.scss +++ /dev/null @@ -1,51 +0,0 @@ -.approve-content-card-container { - &__card, - &__card--no-border { - border-bottom: 1px solid var(--color-border-default); - position: relative; - padding-inline-start: 24px; - padding-inline-end: 24px; - } - - &__card--no-border { - border-bottom: none; - } - - &__card-header { - position: relative; - - &__symbol { - width: auto; - } - - &__symbol--aligned { - width: 100%; - } - - &__title { - width: 100%; - } - - &__title--aligned { - margin-inline-start: 27px; - position: absolute; - width: auto; - } - } - - &__card-content--aligned { - margin-inline-start: 42px; - } - - &__transaction-details-extra-content { - width: 100%; - } - - &__data { - width: 100%; - - &__data-block { - overflow-wrap: break-word; - } - } -} diff --git a/ui/pages/confirmations/components/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap b/ui/pages/confirmations/components/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap deleted file mode 100644 index aa39688362e6..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/__snapshots__/confirm-gas-display.test.js.snap +++ /dev/null @@ -1,132 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ConfirmGasDisplay should match snapshot 1`] = ` -
-
-
-
- Estimated fee -
-
-
-
- -
-
-
-
-
- - 0.001197 - - - ETH - -
-
-
-
-
-
-
-
-

- 🦊 Market -

-

- - ~ - 5 min - -

-
-
-
-
-
-

- Max fee: -

-
-
-
- - 0.00147 - - - ETH - -
-
-
-
-
-
-
-`; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js deleted file mode 100644 index bf354ff4bf87..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { useSelector } from 'react-redux'; - -import { TransactionEnvelopeType } from '@metamask/transaction-controller'; -import { - checkNetworkAndAccountSupports1559, - txDataSelector, -} from '../../../../selectors'; -import { isLegacyTransaction } from '../../../../helpers/utils/transactions.util'; -import GasDetailsItem from '../gas-details-item'; -import { getCurrentDraftTransaction } from '../../../../ducks/send'; -import { ConfirmLegacyGasDisplay } from './confirm-legacy-gas-display'; - -const ConfirmGasDisplay = ({ userAcknowledgedGasMissing = false }) => { - const { txParams } = useSelector((state) => txDataSelector(state)); - - const draftTransaction = useSelector(getCurrentDraftTransaction); - const transactionType = draftTransaction?.transactionType; - let isLegacyTxn; - if (transactionType) { - isLegacyTxn = transactionType === TransactionEnvelopeType.legacy; - } else { - isLegacyTxn = isLegacyTransaction(txParams); - } - - const networkAndAccountSupports1559 = useSelector( - checkNetworkAndAccountSupports1559, - ); - const supportsEIP1559 = networkAndAccountSupports1559 && !isLegacyTxn; - const dataTestId = 'confirm-gas-display'; - - return supportsEIP1559 ? ( - - ) : ( - - ); -}; - -ConfirmGasDisplay.propTypes = { - userAcknowledgedGasMissing: PropTypes.bool, -}; - -export default ConfirmGasDisplay; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.stories.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.stories.js deleted file mode 100644 index 524c3bc00f1e..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.stories.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import ConfirmGasDisplay from './confirm-gas-display'; - -export default { - title: 'Confirmations/Components/ConfirmGasDisplay', - component: ConfirmGasDisplay, - argTypes: { - userAcknowledgedGasMissing: { - control: 'boolean', - }, - }, - args: { - userAcknowledgedGasMissing: true, - }, -}; - -export const DefaultStory = (args) => ; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.test.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.test.js deleted file mode 100644 index 614e7c613cca..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-gas-display.test.js +++ /dev/null @@ -1,129 +0,0 @@ -import React from 'react'; -import { act, screen } from '@testing-library/react'; - -import { GasEstimateTypes } from '../../../../../shared/constants/gas'; -import mockEstimates from '../../../../../test/data/mock-estimates.json'; -import mockState from '../../../../../test/data/mock-state.json'; -import { renderWithProvider } from '../../../../../test/jest'; -import configureStore from '../../../../store/store'; - -import { GasFeeContextProvider } from '../../../../contexts/gasFee'; -import { getSelectedInternalAccountFromMockState } from '../../../../../test/jest/mocks'; -import { CHAIN_IDS } from '../../../../../shared/constants/network'; -import { mockNetworkState } from '../../../../../test/stub/networks'; -import ConfirmGasDisplay from './confirm-gas-display'; - -jest.mock('../../../../store/actions', () => ({ - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), - gasFeeStopPollingByPollingToken: jest.fn(), - getNetworkConfigurationByNetworkClientId: jest - .fn() - .mockResolvedValue({ chainId: '0x5' }), - getGasFeeTimeEstimate: jest.fn().mockImplementation(() => Promise.resolve()), -})); - -const mockSelectedInternalAccount = - getSelectedInternalAccountFromMockState(mockState); - -const render = async ({ transactionProp = {}, contextProps = {} } = {}) => { - const store = configureStore({ - ...mockState, - ...contextProps, - metamask: { - ...mockState.metamask, - accounts: { - [mockSelectedInternalAccount.address]: { - address: mockSelectedInternalAccount.address, - balance: '0x1F4', - }, - }, - preferences: {}, - gasFeeEstimates: - mockEstimates[GasEstimateTypes.feeMarket].gasFeeEstimates, - gasFeeEstimatesByChainId: { - ...mockState.metamask.gasFeeEstimatesByChainId, - '0x5': { - ...mockState.metamask.gasFeeEstimatesByChainId['0x5'], - gasFeeEstimates: - mockEstimates[GasEstimateTypes.feeMarket].gasFeeEstimates, - }, - }, - }, - }); - - let result; - - await act( - async () => - (result = renderWithProvider( - - - , - store, - )), - ); - - return result; -}; - -describe('ConfirmGasDisplay', () => { - it('should match snapshot', async () => { - const { container } = await render({ - transactionProp: { - txParams: { - gas: '0x5208', - }, - gasLimitNoBuffer: '0x5208', - userFeeLevel: 'medium', - }, - }); - expect(container).toMatchSnapshot(); - }); - it('should render gas display labels for EIP1559 transcations', async () => { - await render({ - transactionProp: { - txParams: { - gas: '0x5208', - maxFeePerGas: '0x59682f10', - maxPriorityFeePerGas: '0x59682f00', - }, - userFeeLevel: 'medium', - }, - }); - expect(screen.queryByText('Estimated fee')).toBeInTheDocument(); - expect(screen.queryByText('Max fee:')).toBeInTheDocument(); - expect(screen.queryAllByText('ETH').length).toBeGreaterThan(0); - }); - it('should render gas display labels for legacy transcations', async () => { - await render({ - contextProps: { - metamask: { - ...mockNetworkState({ - chainId: CHAIN_IDS.GOERLI, - metadata: { EIPS: { 1559: false } }, - }), - }, - confirmTransaction: { - txData: { - id: 8393540981007587, - status: 'unapproved', - chainId: '0x5', - txParams: { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0xc42edfcc21ed14dda456aa0756c153f7985d8813', - value: '0x0', - gas: '0x5208', - gasPrice: '0x3b9aca00', - type: '0x0', - }, - }, - }, - }, - }); - expect(screen.queryByText('Estimated gas fee')).toBeInTheDocument(); - expect(screen.queryByText('Max fee:')).toBeInTheDocument(); - expect(screen.queryAllByText('ETH').length).toBeGreaterThan(0); - }); -}); diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/README.mdx b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/README.mdx deleted file mode 100644 index 602bc4ada90a..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/README.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'; -import { ConfirmLegacyGasDisplay } from '.'; - -# Confirm Legacy Gas Display -Confirm Legacy Gas Display is used on confirmation screen and send screen to display gas details for legacy transaction. - - - - \ No newline at end of file diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap deleted file mode 100644 index db005f8c02e0..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/__snapshots__/confirm-legacy-gas-display.test.js.snap +++ /dev/null @@ -1,120 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ConfirmLegacyGasDisplay should match snapshot 1`] = ` -
-
-
-
- Estimated gas fee -
-
-
- - - -
-
-
-
-
-
-
-
- - 0.000021 - -
-
-
-
-
-
- - 0.000021 - - - ETH - -
-
-
-
-
-
-
-
- - Max fee: - -
-
- - 0.000021 - - - ETH - -
-
-
-
-
-
-`; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js deleted file mode 100644 index 70d5ed1070f4..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.js +++ /dev/null @@ -1,156 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { useSelector } from 'react-redux'; - -import { useI18nContext } from '../../../../../hooks/useI18nContext'; -import { - getIsMainnet, - getUnapprovedTransactions, - getUseCurrencyRateCheck, - transactionFeeSelector, - txDataSelector, -} from '../../../../../selectors'; -import { PRIMARY, SECONDARY } from '../../../../../helpers/constants/common'; - -import TransactionDetailItem from '../../transaction-detail-item'; -import UserPreferencedCurrencyDisplay from '../../../../../components/app/user-preferenced-currency-display'; -import InfoTooltip from '../../../../../components/ui/info-tooltip'; -import LoadingHeartBeat from '../../../../../components/ui/loading-heartbeat'; -import { - TextVariant, - TextColor, -} from '../../../../../helpers/constants/design-system'; -import { useDraftTransactionWithTxParams } from '../../../hooks/useDraftTransactionWithTxParams'; -import { Icon, IconName } from '../../../../../components/component-library'; -import { addHexes } from '../../../../../../shared/modules/conversion.utils'; - -const renderHeartBeatIfNotInTest = () => - process.env.IN_TEST ? null : ; - -const ConfirmLegacyGasDisplay = ({ 'data-testid': dataTestId } = {}) => { - const t = useI18nContext(); - - // state selectors - const isMainnet = useSelector(getIsMainnet); - const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck); - const unapprovedTxs = useSelector(getUnapprovedTransactions); - const transactionData = useDraftTransactionWithTxParams(); - const txData = useSelector((state) => txDataSelector(state)); - const { id: transactionId, dappSuggestedGasFees, layer1GasFee } = txData; - const transaction = Object.keys(transactionData).length - ? transactionData - : unapprovedTxs[transactionId] || {}; - const { hexMinimumTransactionFee, hexMaximumTransactionFee } = useSelector( - (state) => transactionFeeSelector(state, transaction), - ); - - const estimatedHexMinFeeTotal = addHexes( - hexMinimumTransactionFee, - layer1GasFee ?? '0x0', - ); - - const estimatedHexMaxFeeTotal = addHexes( - hexMaximumTransactionFee, - layer1GasFee ?? '0x0', - ); - - return ( - - {t('transactionDetailGasHeading')} - - - - - ) : ( - <> - {t('transactionDetailGasHeading')} - -

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

-

{t('transactionDetailGasTooltipExplanation')}

-

- - {t('transactionDetailGasTooltipConversion')} - -

- - } - position="top" - > - -
- - ) - } - detailText={ - useCurrencyRateCheck && ( -
- {renderHeartBeatIfNotInTest()} - -
- ) - } - detailTotal={ -
- {renderHeartBeatIfNotInTest()} - -
- } - subText={ - <> - - {t('editGasSubTextFeeLabel')} - -
- {renderHeartBeatIfNotInTest()} - -
- - } - subTitle={dappSuggestedGasFees && t('transactionDetailDappGasMoreInfo')} - /> - ); -}; - -ConfirmLegacyGasDisplay.propTypes = { - 'data-testid': PropTypes.string, -}; - -export default ConfirmLegacyGasDisplay; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.stories.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.stories.js deleted file mode 100644 index 20a1314060a3..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.stories.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; - -import mockState from '../../../../../../test/data/mock-state.json'; -import configureStore from '../../../../../store/store'; - -import README from './README.mdx'; -import ConfirmLegacyGasDisplay from './confirm-legacy-gas-display'; - -const store = configureStore(mockState); - -export default { - title: 'Confirmations/Components/ConfirmLegacyGasDisplay', - - component: ConfirmLegacyGasDisplay, - decorators: [(story) => {story()}], - parameters: { - docs: { - page: README, - }, - }, -}; - -export const DefaultStory = () => { - return ; -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.test.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.test.js deleted file mode 100644 index 4952fb87edca..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/confirm-legacy-gas-display.test.js +++ /dev/null @@ -1,145 +0,0 @@ -import React from 'react'; -import { screen, waitFor } from '@testing-library/react'; - -import mockState from '../../../../../../test/data/mock-state.json'; -import { renderWithProvider } from '../../../../../../test/jest'; -import configureStore from '../../../../../store/store'; - -import { getSelectedInternalAccountFromMockState } from '../../../../../../test/jest/mocks'; -import ConfirmLegacyGasDisplay from './confirm-legacy-gas-display'; - -const mockSelectedInternalAccount = - getSelectedInternalAccountFromMockState(mockState); - -const mmState = { - ...mockState, - metamask: { - ...mockState.metamask, - accounts: { - [mockSelectedInternalAccount.address]: { - address: mockSelectedInternalAccount.address, - balance: '0x1F4', - }, - }, - }, - confirmTransaction: { - txData: { - id: 8393540981007587, - status: 'unapproved', - chainId: '0x5', - txParams: { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0xc42edfcc21ed14dda456aa0756c153f7985d8813', - value: '0x0', - gas: '0x5208', - gasPrice: '0x3b9aca00', - type: '0x0', - }, - }, - }, -}; - -mmState.metamask.transactions[0].txParams = { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0xc42edfcc21ed14dda456aa0756c153f7985d8813', - value: '0x0', - gas: '0x5208', - gasPrice: '0x3b9aca00', - type: '0x0', -}; - -const render = (state = mmState) => { - const store = configureStore(state); - - return renderWithProvider(, store); -}; - -describe('ConfirmLegacyGasDisplay', () => { - it('should match snapshot', async () => { - const { container } = render(); - await waitFor(() => { - expect(container).toMatchSnapshot(); - }); - }); - - it('should render label', async () => { - render(); - await waitFor(() => { - expect(screen.queryByText('Estimated gas fee')).toBeInTheDocument(); - expect(screen.queryByText('Max fee:')).toBeInTheDocument(); - expect(screen.queryAllByText('ETH').length).toBeGreaterThan(0); - }); - }); - - it('should render gas fee details', async () => { - render(); - await waitFor(() => { - expect(screen.queryAllByTitle('0.000021 ETH').length).toBeGreaterThan(0); - expect(screen.queryAllByText('ETH').length).toBeGreaterThan(0); - }); - }); - - it('should render label and gas details with draftTransaction', async () => { - render({ - ...mmState, - send: { - currentTransactionUUID: '1d40b578-6184-4607-8513-762c24d0a19b', - draftTransactions: { - '1d40b578-6184-4607-8513-762c24d0a19b': { - gas: { - error: null, - gasLimit: '0x5208', - gasPrice: '0x3b9aca00', - gasTotal: '0x157c9fbb9a000', - maxFeePerGas: '0x0', - maxPriorityFeePerGas: '0x0', - wasManuallyEdited: false, - }, - transactionType: '0x0', - }, - }, - }, - }); - await waitFor(() => { - expect(screen.queryByText('Estimated gas fee')).toBeInTheDocument(); - expect(screen.queryByText('Max fee:')).toBeInTheDocument(); - expect(screen.queryAllByText('ETH').length).toBeGreaterThan(0); - expect(screen.queryAllByTitle('0.000021 ETH').length).toBeGreaterThan(0); - }); - }); - - it('displays the Estimated Fee', () => { - const { container } = render({ - ...mmState, - confirmTransaction: { - ...mmState.confirmTransaction, - txData: { - ...mmState.confirmTransaction.txData, - }, - }, - }); - - expect( - container.querySelector('.currency-display-component__text'), - ).toHaveTextContent('0.000021'); - }); - - it('displays the Estimated Fee on L2 Networks', () => { - const { container } = render({ - ...mmState, - confirmTransaction: { - ...mmState.confirmTransaction, - txData: { - ...mmState.confirmTransaction.txData, - layer1GasFee: '0x0653b2c7980981', - }, - }, - }); - - expect(screen.queryByText('Estimated gas fee')).toBeInTheDocument(); - expect(screen.queryByText('Max fee:')).toBeInTheDocument(); - expect( - container.querySelector('.currency-display-component__text'), - ).toHaveTextContent('0.00180188'); - }); -}); diff --git a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js b/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js deleted file mode 100644 index 68d5f4767e19..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/confirm-legacy-gas-display/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as ConfirmLegacyGasDisplay } from './confirm-legacy-gas-display'; diff --git a/ui/pages/confirmations/components/confirm-gas-display/index.js b/ui/pages/confirmations/components/confirm-gas-display/index.js deleted file mode 100644 index 6ba715cdf22e..000000000000 --- a/ui/pages/confirmations/components/confirm-gas-display/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as ConfirmGasDisplay } from './confirm-gas-display'; diff --git a/ui/pages/confirmations/components/custom-nonce/custom-nonce.js b/ui/pages/confirmations/components/custom-nonce/custom-nonce.js deleted file mode 100644 index 60ac4a6bbda1..000000000000 --- a/ui/pages/confirmations/components/custom-nonce/custom-nonce.js +++ /dev/null @@ -1,79 +0,0 @@ -import React, { useContext } from 'react'; -import PropTypes from 'prop-types'; -import { I18nContext } from '../../../../../.storybook/i18n'; -import { - Box, - ButtonLink, - Text, -} from '../../../../components/component-library'; -import { - AlignItems, - BorderRadius, - Display, - JustifyContent, - Size, - TextVariant, -} from '../../../../helpers/constants/design-system'; - -export default function CustomNonce({ - nextNonce, - customNonceValue, - showCustomizeNonceModal, -}) { - const t = useContext(I18nContext); - - return ( - - - - {t('nonce')} - - showCustomizeNonceModal()} - > - {t('edit')} - - - - {customNonceValue || nextNonce} - - - ); -} - -CustomNonce.propTypes = { - /** - * Getting the next suggested nonce - */ - nextNonce: PropTypes.number, - /** - * Custom nonce value - */ - customNonceValue: PropTypes.string, - /** - * Function that is supposed to open the customized nonce modal - */ - showCustomizeNonceModal: PropTypes.func, -}; diff --git a/ui/pages/confirmations/components/custom-nonce/custom-nonce.test.js b/ui/pages/confirmations/components/custom-nonce/custom-nonce.test.js deleted file mode 100644 index f4defe24de2a..000000000000 --- a/ui/pages/confirmations/components/custom-nonce/custom-nonce.test.js +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react'; -import configureMockStore from 'redux-mock-store'; -import { fireEvent } from '@testing-library/react'; -import { renderWithProvider } from '../../../../../test/lib/render-helpers'; -import CustomNonce from './custom-nonce'; - -describe('CustomNonce', () => { - const store = configureMockStore()({}); - let props = {}; - - beforeEach(() => { - props = { - nextNonce: 1, - customNonceValue: '', - showCustomizeNonceModal: jest.fn(), - }; - }); - - it('should render CustomNonce component header', () => { - const { queryByText } = renderWithProvider( - , - store, - ); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('Edit')).toBeInTheDocument(); - }); - - it('should render CustomNonce component value when custom nonce value is a empty string', () => { - const { queryByText } = renderWithProvider( - , - store, - ); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('Edit')).toBeInTheDocument(); - expect(queryByText('1')).toBeInTheDocument(); - }); - - it('should render CustomNonce component value when custom nonce value is edited', () => { - props.customNonceValue = '3'; - const { queryByText } = renderWithProvider( - , - store, - ); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('Edit')).toBeInTheDocument(); - expect(queryByText('3')).toBeInTheDocument(); - }); - - it('should render CustomNonce component to show customize nonce modal', () => { - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - - const editButton = getByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(editButton).toBeInTheDocument(); - expect(queryByText('1')).toBeInTheDocument(); - fireEvent.click(editButton); - expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(1); - }); -}); diff --git a/ui/pages/confirmations/components/custom-nonce/index.js b/ui/pages/confirmations/components/custom-nonce/index.js deleted file mode 100644 index 60b5eedde2df..000000000000 --- a/ui/pages/confirmations/components/custom-nonce/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './custom-nonce'; diff --git a/ui/pages/confirmations/components/custom-nonce/index.scss b/ui/pages/confirmations/components/custom-nonce/index.scss deleted file mode 100644 index be5994928cec..000000000000 --- a/ui/pages/confirmations/components/custom-nonce/index.scss +++ /dev/null @@ -1,15 +0,0 @@ -.custom-nonce { - &__content { - height: 49px; - border: 1px solid var(--color-border-muted); - box-sizing: border-box; - } - - &__header { - flex: 1; - } - - &__value { - flex: 0; - } -} diff --git a/ui/pages/confirmations/components/index.scss b/ui/pages/confirmations/components/index.scss index 275dcfa3b032..5c4ff005a386 100644 --- a/ui/pages/confirmations/components/index.scss +++ b/ui/pages/confirmations/components/index.scss @@ -7,7 +7,6 @@ @import 'advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/index'; @import 'advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/index'; @import 'advanced-gas-fee-popover/advanced-gas-fee-input-subtext/index'; -@import 'approve-content-card/index'; @import 'confirmation-warning-modal/index'; @import 'confirm-page-container/index'; @import 'confirm/footer'; @@ -16,7 +15,6 @@ @import 'confirm/nav/nav.scss'; @import "confirm/network-change-toast/index"; @import 'contract-details-modal/index'; -@import 'custom-nonce/index'; @import 'edit-gas-display/index'; @import 'edit-gas-fee-button/index'; @import 'edit-gas-fee-popover/index'; diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/__snapshots__/confirm-approve-content.component.test.js.snap b/ui/pages/confirmations/confirm-approve/confirm-approve-content/__snapshots__/confirm-approve-content.component.test.js.snap deleted file mode 100644 index a4bd02de6c35..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/__snapshots__/confirm-approve-content.component.test.js.snap +++ /dev/null @@ -1,714 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ConfirmApproveContent Component should render Confirm approve page correctly and display fallback copy for when we are able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when giving a setApprovalForAll allowance 1`] = ` -
-
-
-
-
- https://metamask.github.io/test-dapp/ -
-
- https://metamask.github.io/test-dapp/ -
-
-
-
- - - Allow access to and transfer of all your - - ZenAcademy - - - ? - - -
-
- This allows a third party to access and transfer the following NFTs without further notice until you revoke its access. -
- -
-
-
-
- -
-
- Transaction fee -
-
-
-
-
- A fee is associated with this request. -
-
-
- $10.00 -
-
- 20 ETH -
-
-
-
-
-
-
-
-
-
-
-
-
- Nonce -
- -
-
- 2 -
-
-
-
-
-
- View full transaction details -
- -
-
-
-
-
-
-`; - -exports[`ConfirmApproveContent Component should render Confirm approve page correctly and display fallback copy for when we are able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when revoking a setApprovalForAll allowance 1`] = ` -
-
-
-
-
- https://metamask.github.io/test-dapp/ -
-
- https://metamask.github.io/test-dapp/ -
-
-
-
- - - Revoke permission to access and transfer all of your - - ZenAcademy - - - ? - - -
-
- - - This revokes the permission for a third party to access and transfer all of your - - ZenAcademy - - - without further notice. - - -
- -
-
-
-
- -
-
- Transaction fee -
-
-
-
-
- A fee is associated with this request. -
-
-
- $10.00 -
-
- 20 ETH -
-
-
-
-
-
-
-
-
-
-
-
-
- Nonce -
- -
-
- 2 -
-
-
-
-
-
- View full transaction details -
- -
-
-
-
-
-
-`; - -exports[`ConfirmApproveContent Component should render Confirm approve page correctly and display fallback copy for when we are not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when giving a setApprovalForAll allowance 1`] = ` -
-
-
-
-
- https://metamask.github.io/test-dapp/ -
-
- https://metamask.github.io/test-dapp/ -
-
-
-
- - - Allow access to and transfer all of your NFTs from - - this collection - - - ? - - -
-
- - - This allows a third party to access and transfer all of your NFTs from - - this collection - - - without further notice until you revoke its access. - - -
- -
-
-
-
- -
-
- Transaction fee -
-
-
-
-
- A fee is associated with this request. -
-
-
- $10.00 -
-
- 20 ETH -
-
-
-
-
-
-
-
-
-
-
-
-
- Nonce -
- -
-
- 2 -
-
-
-
-
-
- View full transaction details -
- -
-
-
-
-
-
-`; - -exports[`ConfirmApproveContent Component should render Confirm approve page correctly and display fallback copy for when we are not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when revoking a setApprovalForAll allowance 1`] = ` -
-
-
-
-
- https://metamask.github.io/test-dapp/ -
-
- https://metamask.github.io/test-dapp/ -
-
-
-
- - - Revoke permission to access and transfer all of your NFTs from - - this collection - - - ? - - -
-
- - - This revokes the permission for a third party to access and transfer all of your NFTs from - - this collection - - - without further notice. - - -
- -
-
-
-
- -
-
- Transaction fee -
-
-
-
-
- A fee is associated with this request. -
-
-
- $10.00 -
-
- 20 ETH -
-
-
-
-
-
-
-
-
-
-
-
-
- Nonce -
- -
-
- 2 -
-
-
-
-
-
- View full transaction details -
- -
-
-
-
-
-
-`; diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.js deleted file mode 100644 index 007aec372c62..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ /dev/null @@ -1,730 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import classnames from 'classnames'; -import copyToClipboard from 'copy-to-clipboard'; -import { getTokenTrackerLink } from '@metamask/etherscan-link'; -import UrlIcon from '../../../../components/ui/url-icon'; -import { addressSummary } from '../../../../helpers/utils/util'; -import { formatCurrency } from '../../../../helpers/utils/confirm-tx.util'; -import Button from '../../../../components/ui/button'; -import SimulationErrorMessage from '../../components/simulation-error-message'; -import MultiLayerFeeMessage from '../../components/multilayer-fee-message'; -import SecurityProviderBannerMessage from '../../components/security-provider-banner-message/security-provider-banner-message'; -import { - DISPLAY, - TextColor, - IconColor, - TextVariant, - AlignItems, -} from '../../../../helpers/constants/design-system'; -import { ConfirmPageContainerWarning } from '../../components/confirm-page-container/confirm-page-container-content'; -import LedgerInstructionField from '../../components/ledger-instruction-field'; -import BlockaidBannerAlert from '../../components/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert'; -import { isSuspiciousResponse } from '../../../../../shared/modules/security-provider.utils'; - -import { TokenStandard } from '../../../../../shared/constants/transaction'; -import { - CHAIN_IDS, - TEST_CHAINS, -} from '../../../../../shared/constants/network'; -import ContractDetailsModal from '../../components/contract-details-modal/contract-details-modal'; -import { - ButtonIcon, - Icon, - IconName, - Text, - Box, -} from '../../../../components/component-library'; -import TransactionDetailItem from '../../components/transaction-detail-item/transaction-detail-item.component'; -import UserPreferencedCurrencyDisplay from '../../../../components/app/user-preferenced-currency-display'; -import { PRIMARY, SECONDARY } from '../../../../helpers/constants/common'; -import { ConfirmGasDisplay } from '../../components/confirm-gas-display'; -import CustomNonce from '../../components/custom-nonce'; -import { COPY_OPTIONS } from '../../../../../shared/constants/copy'; -import FeeDetailsComponent from '../../components/fee-details-component/fee-details-component'; - -export default class ConfirmApproveContent extends Component { - static contextTypes = { - t: PropTypes.func, - trackEvent: PropTypes.func, - }; - - static propTypes = { - tokenSymbol: PropTypes.string, - siteImage: PropTypes.string, - origin: PropTypes.string, - data: PropTypes.string, - toAddress: PropTypes.string, - currentCurrency: PropTypes.string, - nativeCurrency: PropTypes.string, - fiatTransactionTotal: PropTypes.string, - ethTransactionTotal: PropTypes.string, - useNonceField: PropTypes.bool, - customNonceValue: PropTypes.string, - updateCustomNonce: PropTypes.func, - getNextNonce: PropTypes.func, - nextNonce: PropTypes.number, - showCustomizeNonceModal: PropTypes.func, - warning: PropTypes.string, - txData: PropTypes.object, - fromAddressIsLedger: PropTypes.bool, - chainId: PropTypes.string, - tokenAddress: PropTypes.string, - blockExplorerUrl: PropTypes.string, - isContract: PropTypes.bool, - hexTransactionTotal: PropTypes.string, - hexMinimumTransactionFee: PropTypes.string, - hasLayer1GasFee: PropTypes.bool, - supportsEIP1559: PropTypes.bool, - assetName: PropTypes.string, - tokenId: PropTypes.string, - assetStandard: PropTypes.string, - isSetApproveForAll: PropTypes.bool, - isApprovalOrRejection: PropTypes.bool, - userAddress: PropTypes.string, - userAcknowledgedGasMissing: PropTypes.bool, - setUserAcknowledgedGasMissing: PropTypes.func, - renderSimulationFailureWarning: PropTypes.bool, - useCurrencyRateCheck: PropTypes.bool, - }; - - state = { - showFullTxDetails: false, - copied: false, - setShowContractDetails: false, - }; - - renderApproveContentCard({ - showHeader = true, - symbol, - title, - content, - footer, - noBorder, - showFeeDetails = false, - }) { - const { supportsEIP1559, txData, useCurrencyRateCheck } = this.props; - const { t } = this.context; - return ( -
- {showHeader && ( -
- {supportsEIP1559 && title === t('transactionFee') ? null : ( - <> -
- {symbol} -
-
- {title} -
- - )} -
- )} -
{content}
- - {showFeeDetails && ( - - - - )} - - {footer} -
- ); - } - - // TODO: Add "Learn Why" with link to the feeAssociatedRequest text - renderTransactionDetailsContent() { - const { t } = this.context; - const { - currentCurrency, - nativeCurrency, - ethTransactionTotal, - fiatTransactionTotal, - hexTransactionTotal, - hexMinimumTransactionFee, - txData, - hasLayer1GasFee, - supportsEIP1559, - userAcknowledgedGasMissing, - renderSimulationFailureWarning, - useCurrencyRateCheck, - } = this.props; - if ( - !hasLayer1GasFee && - supportsEIP1559 && - !renderSimulationFailureWarning - ) { - return ( - - ); - } - return ( -
- {hasLayer1GasFee ? ( -
- - } - detailText={ - - } - noBold - flexWidthValues - /> - -
- ) : ( - <> -
- {t('feeAssociatedRequest')} -
-
-
- {useCurrencyRateCheck && - formatCurrency(fiatTransactionTotal, currentCurrency)} -
-
- {`${ethTransactionTotal} ${nativeCurrency}`} -
-
- - )} -
- ); - } - - renderERC721OrERC1155PermissionContent() { - const { t } = this.context; - const { origin, toAddress, isContract, isSetApproveForAll, tokenSymbol } = - this.props; - - const titleTokenDescription = this.getTitleTokenDescription(); - const approvedAssetText = tokenSymbol - ? t('allOfYour', [titleTokenDescription]) - : t('allYourNFTsOf', [titleTokenDescription]); - - const displayedAddress = isContract - ? `${t('contract')} (${addressSummary(toAddress)})` - : addressSummary(toAddress); - return ( -
-
- {t('accessAndSpendNoticeNFT', [origin])} -
-
-
- {t('approvedAsset')}: -
-
- {isSetApproveForAll ? approvedAssetText : titleTokenDescription} -
-
-
-
- {t('grantedToWithColon')} -
-
- {displayedAddress} -
-
- copyToClipboard(toAddress, COPY_OPTIONS)} - color={IconColor.iconDefault} - iconName={ - this.state.copied ? IconName.CopySuccess : IconName.Copy - } - title={ - this.state.copied - ? t('copiedExclamation') - : t('copyToClipboard') - } - /> -
-
-
- ); - } - - renderDataContent() { - const { t } = this.context; - const { data, isSetApproveForAll, isApprovalOrRejection } = this.props; - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const { tokenAddress } = this.props; - ///: END:ONLY_INCLUDE_IF - - return ( - - - {isSetApproveForAll - ? t('functionSetApprovalForAll') - : t('functionApprove')} - - {isSetApproveForAll && isApprovalOrRejection !== undefined ? ( - <> - - {`${t('parameters')}: ${isApprovalOrRejection}`} - - { - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - - {`${t('tokenContractAddress')}: ${tokenAddress}`} - - ///: END:ONLY_INCLUDE_IF - } - - ) : null} - - {data} - - - ); - } - - renderFullDetails() { - const { t } = this.context; - const { assetStandard } = this.props; - if ( - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 - ) { - return ( -
-
- {this.renderApproveContentCard({ - symbol: , - title: t('permissionRequest'), - content: this.renderERC721OrERC1155PermissionContent(), - showEdit: false, - })} -
-
- {this.renderApproveContentCard({ - symbol: , - title: t('data'), - content: this.renderDataContent(), - noBorder: true, - })} -
-
- ); - } - return null; - } - - getTokenName() { - const { tokenId, assetName, assetStandard, tokenSymbol } = this.props; - const { t } = this.context; - - let titleTokenDescription = t('token'); - if ( - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 || - // if we don't have an asset standard but we do have either both an assetname and a tokenID or both a tokenSymbol and tokenId we assume its an NFT - (assetName && tokenId) || - (tokenSymbol && tokenId) - ) { - if (assetName || tokenSymbol) { - titleTokenDescription = `${assetName ?? tokenSymbol}`; - } else { - titleTokenDescription = t('thisCollection'); - } - } - - return titleTokenDescription; - } - - getTitleTokenDescription() { - const { tokenId, tokenAddress, blockExplorerUrl, chainId, userAddress } = - this.props; - const useBlockExplorer = - blockExplorerUrl || - [...TEST_CHAINS, CHAIN_IDS.MAINNET, CHAIN_IDS.LINEA_MAINNET].includes( - chainId, - ); - - const titleTokenDescription = this.getTokenName(); - const tokenIdWrapped = tokenId ? ` (#${tokenId})` : ''; - - if (useBlockExplorer) { - const blockExplorerLink = getTokenTrackerLink( - tokenAddress, - chainId, - null, - userAddress, - { - blockExplorerUrl: blockExplorerUrl ?? null, - }, - ); - const blockExplorerElement = ( - <> - - {titleTokenDescription} - - {tokenIdWrapped && {tokenIdWrapped}} - - ); - return blockExplorerElement; - } - - return ( - <> - { - copyToClipboard(tokenAddress, COPY_OPTIONS); - }} - title={tokenAddress} - > - {titleTokenDescription} - - {tokenIdWrapped && {tokenIdWrapped}} - - ); - } - - renderTitle() { - const { t } = this.context; - const { - assetName, - tokenId, - tokenSymbol, - assetStandard, - isSetApproveForAll, - isApprovalOrRejection, - } = this.props; - const titleTokenDescription = this.getTitleTokenDescription(); - - let title; - - if (isSetApproveForAll) { - if (tokenSymbol) { - title = t('approveAllTokensTitle', [titleTokenDescription]); - if (isApprovalOrRejection === false) { - title = t('revokeAllTokensTitle', [titleTokenDescription]); - } - } else { - title = t('approveAllTokensTitleWithoutSymbol', [ - titleTokenDescription, - ]); - if (isApprovalOrRejection === false) { - title = t('revokeAllTokensTitleWithoutSymbol', [ - titleTokenDescription, - ]); - } - } - } else if ( - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 || - // if we don't have an asset standard but we do have either both an assetname and a tokenID or both a tokenSymbol and tokenId we assume its an NFT - (assetName && tokenId) || - (tokenSymbol && tokenId) - ) { - title = t('approveTokenTitle', [titleTokenDescription]); - } - return title || t('allowSpendToken', [titleTokenDescription]); - } - - renderDescription() { - const { t } = this.context; - const { - assetStandard, - assetName, - tokenId, - tokenSymbol, - isContract, - isSetApproveForAll, - isApprovalOrRejection, - } = this.props; - const grantee = isContract - ? t('contract').toLowerCase() - : t('account').toLowerCase(); - - let description = t('trustSiteApprovePermission', [grantee]); - - if (isSetApproveForAll && isApprovalOrRejection === false) { - if (tokenSymbol) { - description = t('revokeApproveForAllDescription', [ - this.getTitleTokenDescription(), - ]); - } else { - description = t('revokeApproveForAllDescriptionWithoutSymbol', [ - this.getTitleTokenDescription(), - ]); - } - } else if ( - isSetApproveForAll || - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 || - // if we don't have an asset standard but we do have either both an assetname and a tokenID or both a tokenSymbol and tokenId we assume its an NFT - (assetName && tokenId) || - (tokenSymbol && tokenId) - ) { - if (tokenSymbol) { - description = t('approveTokenDescription'); - } else { - description = t('approveTokenDescriptionWithoutSymbol', [ - this.getTitleTokenDescription(), - ]); - } - } - return description; - } - - render() { - const { t } = this.context; - const { - siteImage, - origin, - tokenSymbol, - useNonceField, - warning, - txData, - fromAddressIsLedger, - toAddress, - chainId, - blockExplorerUrl, - assetStandard, - tokenId, - tokenAddress, - assetName, - userAcknowledgedGasMissing, - setUserAcknowledgedGasMissing, - renderSimulationFailureWarning, - nextNonce, - getNextNonce, - customNonceValue, - updateCustomNonce, - showCustomizeNonceModal, - } = this.props; - const { showFullTxDetails, setShowContractDetails } = this.state; - - return ( -
- - {isSuspiciousResponse(txData?.securityProviderResponse) && ( - - )} - {warning && ( -
- -
- )} - - - - - {origin} - - - -
- {this.renderTitle()} -
-
- {this.renderDescription()} -
- - - {setShowContractDetails && ( - this.setState({ setShowContractDetails: false })} - tokenName={tokenSymbol} - tokenAddress={tokenAddress} - toAddress={toAddress} - chainId={chainId} - blockExplorerUrl={blockExplorerUrl} - tokenId={tokenId} - assetName={assetName} - assetStandard={assetStandard} - /> - )} - -
- {renderSimulationFailureWarning && ( - - - setUserAcknowledgedGasMissing(true) - } - /> - - )} - {this.renderApproveContentCard({ - symbol: , - title: t('transactionFee'), - showEdit: true, - showAdvanceGasFeeOptions: true, - showFeeDetails: true, - content: this.renderTransactionDetailsContent(), - noBorder: useNonceField || !showFullTxDetails, - footer: !useNonceField && ( -
- this.setState({ - showFullTxDetails: !this.state.showFullTxDetails, - }) - } - > -
-
- {this.state.showFullTxDetails - ? t('hideFullTransactionDetails') - : t('viewFullTransactionDetails')} -
- -
-
- ), - })} - - {useNonceField && - this.renderApproveContentCard({ - showHeader: false, - content: ( - { - showCustomizeNonceModal({ - nextNonce, - customNonceValue, - updateCustomNonce, - getNextNonce, - }); - }} - /> - ), - useNonceField, - noBorder: !showFullTxDetails, - footer: ( -
- this.setState({ - showFullTxDetails: !this.state.showFullTxDetails, - }) - } - > -
-
- {this.state.showFullTxDetails - ? t('hideFullTransactionDetails') - : t('viewFullTransactionDetails')} -
- -
-
- ), - })} -
- - {fromAddressIsLedger ? ( -
- -
- ) : null} - - {showFullTxDetails ? this.renderFullDetails() : null} -
- ); - } -} diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js b/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js deleted file mode 100644 index ba1c7c5a568c..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.component.test.js +++ /dev/null @@ -1,375 +0,0 @@ -import React from 'react'; -import configureMockStore from 'redux-mock-store'; -import { fireEvent } from '@testing-library/react'; -import { renderWithProvider } from '../../../../../test/jest/rendering'; -import { TokenStandard } from '../../../../../shared/constants/transaction'; -import { BlockaidResultType } from '../../../../../shared/constants/security-provider'; -import { mockNetworkState } from '../../../../../test/stub/networks'; -import ConfirmApproveContent from '.'; - -const renderComponent = (props) => { - const store = configureMockStore([])({ - metamask: { - ...mockNetworkState({ chainId: '0x0' }), - preferences: {}, - currencyRates: {}, - }, - }); - return renderWithProvider(, store); -}; - -const props = { - siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - origin: 'https://metamask.github.io/test-dapp/', - tokenSymbol: 'TestDappNFTs (#1)', - assetStandard: TokenStandard.ERC721, - tokenImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', - currentCurrency: 'usd', - nativeCurrency: 'ETH', - ethTransactionTotal: '20', - fiatTransactionTotal: '10', - useNonceField: true, - nextNonce: 1, - customNonceValue: '2', - txData: { simulationFails: null }, - userAcknowledgedGasMissing: false, - setUserAcknowledgedGasMissing: jest.fn(), - renderSimulationFailureWarning: false, - showCustomizeNonceModal: jest.fn(), - chainId: '1337', - rpcPrefs: {}, - isContract: true, - useCurrencyRateCheck: true, - isSetApproveForAll: false, - isApprovalOrRejection: true, -}; - -describe('ConfirmApproveContent Component', () => { - it('should render Confirm approve page correctly', () => { - const { queryByText, getByText, getAllByText, getByTestId } = - renderComponent(props); - expect( - queryByText('https://metamask.github.io/test-dapp/'), - ).toBeInTheDocument(); - expect(getByTestId('confirm-approve-title').textContent).toStrictEqual( - ' Allow access to and transfer of your TestDappNFTs (#1)? ', - ); - expect( - queryByText( - 'This allows a third party to access and transfer the following NFTs without further notice until you revoke its access.', - ), - ).toBeInTheDocument(); - expect(queryByText('Verify third-party details')).toBeInTheDocument(); - expect( - queryByText( - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.', - ), - ).not.toBeInTheDocument(); - expect(queryByText('I want to proceed anyway')).not.toBeInTheDocument(); - expect(queryByText('View full transaction details')).toBeInTheDocument(); - - const editButtons = getAllByText('Edit'); - - expect(queryByText('Transaction fee')).toBeInTheDocument(); - expect( - queryByText('A fee is associated with this request.'), - ).toBeInTheDocument(); - expect(queryByText(`${props.ethTransactionTotal} ETH`)).toBeInTheDocument(); - expect(queryByText(`$10.00`)).toBeInTheDocument(); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButtons[0]); - expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(1); - - const showViewTxDetails = getByText('View full transaction details'); - expect(queryByText('Permission request')).not.toBeInTheDocument(); - expect(queryByText('Approved asset:')).not.toBeInTheDocument(); - expect(queryByText('Granted to:')).not.toBeInTheDocument(); - expect(queryByText('Data')).not.toBeInTheDocument(); - fireEvent.click(showViewTxDetails); - expect(getByText('Hide full transaction details')).toBeInTheDocument(); - expect(getByText('Permission request')).toBeInTheDocument(); - expect(getByText('Approved asset:')).toBeInTheDocument(); - expect(getByText('Granted to:')).toBeInTheDocument(); - expect(getByText('Contract (0x9bc5baF8...fEF4)')).toBeInTheDocument(); - expect(getByText('Data')).toBeInTheDocument(); - expect(getByText('Function: Approve')).toBeInTheDocument(); - expect( - getByText( - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - ), - ).toBeInTheDocument(); - }); - - it('should render Confirm approve page correctly and simulation error message without I want to procced anyway link', () => { - const { queryByText, getByText, getAllByText, getByTestId } = - renderComponent({ - ...props, - userAcknowledgedGasMissing: true, - renderSimulationFailureWarning: true, - }); - expect( - queryByText('https://metamask.github.io/test-dapp/'), - ).toBeInTheDocument(); - expect(getByTestId('confirm-approve-title').textContent).toStrictEqual( - ' Allow access to and transfer of your TestDappNFTs (#1)? ', - ); - expect( - queryByText( - 'This allows a third party to access and transfer the following NFTs without further notice until you revoke its access.', - ), - ).toBeInTheDocument(); - expect(queryByText('Verify third-party details')).toBeInTheDocument(); - expect( - queryByText( - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.', - ), - ).toBeInTheDocument(); - expect(queryByText('I want to proceed anyway')).not.toBeInTheDocument(); - expect(queryByText('View full transaction details')).toBeInTheDocument(); - - const editButtons = getAllByText('Edit'); - - expect(queryByText('Transaction fee')).toBeInTheDocument(); - expect( - queryByText('A fee is associated with this request.'), - ).toBeInTheDocument(); - expect(queryByText(`${props.ethTransactionTotal} ETH`)).toBeInTheDocument(); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButtons[0]); - expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(2); - - const showViewTxDetails = getByText('View full transaction details'); - expect(queryByText('Permission request')).not.toBeInTheDocument(); - expect(queryByText('Approved asset:')).not.toBeInTheDocument(); - expect(queryByText('Granted to:')).not.toBeInTheDocument(); - expect(queryByText('Data')).not.toBeInTheDocument(); - fireEvent.click(showViewTxDetails); - expect(getByText('Hide full transaction details')).toBeInTheDocument(); - expect(getByText('Permission request')).toBeInTheDocument(); - expect(getByText('Approved asset:')).toBeInTheDocument(); - expect(getByText('Granted to:')).toBeInTheDocument(); - expect(getByText('Contract (0x9bc5baF8...fEF4)')).toBeInTheDocument(); - expect(getByText('Data')).toBeInTheDocument(); - expect(getByText('Function: Approve')).toBeInTheDocument(); - expect( - getByText( - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - ), - ).toBeInTheDocument(); - }); - - it('should render Confirm approve page correctly and simulation error message with I want to procced anyway link', () => { - const { queryByText, getByText, getAllByText, getByTestId } = - renderComponent({ - ...props, - userAcknowledgedGasMissing: false, - renderSimulationFailureWarning: true, - }); - expect( - queryByText('https://metamask.github.io/test-dapp/'), - ).toBeInTheDocument(); - expect(getByTestId('confirm-approve-title').textContent).toStrictEqual( - ' Allow access to and transfer of your TestDappNFTs (#1)? ', - ); - expect( - queryByText( - 'This allows a third party to access and transfer the following NFTs without further notice until you revoke its access.', - ), - ).toBeInTheDocument(); - expect(queryByText('Verify third-party details')).toBeInTheDocument(); - expect( - queryByText( - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.', - ), - ).toBeInTheDocument(); - expect(queryByText('I want to proceed anyway')).toBeInTheDocument(); - expect(queryByText('View full transaction details')).toBeInTheDocument(); - - const editButtons = getAllByText('Edit'); - - expect(queryByText('Transaction fee')).toBeInTheDocument(); - expect( - queryByText('A fee is associated with this request.'), - ).toBeInTheDocument(); - expect(queryByText(`${props.ethTransactionTotal} ETH`)).toBeInTheDocument(); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButtons[0]); - expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(3); - - const showViewTxDetails = getByText('View full transaction details'); - expect(queryByText('Permission request')).not.toBeInTheDocument(); - expect(queryByText('Approved asset:')).not.toBeInTheDocument(); - expect(queryByText('Granted to:')).not.toBeInTheDocument(); - expect(queryByText('Data')).not.toBeInTheDocument(); - fireEvent.click(showViewTxDetails); - expect(getByText('Hide full transaction details')).toBeInTheDocument(); - expect(getByText('Permission request')).toBeInTheDocument(); - expect(getByText('Approved asset:')).toBeInTheDocument(); - expect(getByText('Granted to:')).toBeInTheDocument(); - expect(getByText('Contract (0x9bc5baF8...fEF4)')).toBeInTheDocument(); - expect(getByText('Data')).toBeInTheDocument(); - expect(getByText('Function: Approve')).toBeInTheDocument(); - expect( - getByText( - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - ), - ).toBeInTheDocument(); - }); - - it('should render Confirm approve page correctly when the fiat conversion is OFF', () => { - const { queryByText, getByText, getAllByText, getByTestId } = - renderComponent({ ...props, useCurrencyRateCheck: false }); - expect( - queryByText('https://metamask.github.io/test-dapp/'), - ).toBeInTheDocument(); - expect(getByTestId('confirm-approve-title').textContent).toStrictEqual( - ' Allow access to and transfer of your TestDappNFTs (#1)? ', - ); - expect( - queryByText( - 'This allows a third party to access and transfer the following NFTs without further notice until you revoke its access.', - ), - ).toBeInTheDocument(); - expect(queryByText('Verify third-party details')).toBeInTheDocument(); - expect( - queryByText( - 'We were not able to estimate gas. There might be an error in the contract and this transaction may fail.', - ), - ).not.toBeInTheDocument(); - expect(queryByText('I want to proceed anyway')).not.toBeInTheDocument(); - expect(queryByText('View full transaction details')).toBeInTheDocument(); - - const editButtons = getAllByText('Edit'); - - expect(queryByText('Transaction fee')).toBeInTheDocument(); - expect( - queryByText('A fee is associated with this request.'), - ).toBeInTheDocument(); - expect(queryByText(`${props.ethTransactionTotal} ETH`)).toBeInTheDocument(); - expect(queryByText(`$10.00`)).not.toBeInTheDocument(); - - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButtons[0]); - expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(4); - - const showViewTxDetails = getByText('View full transaction details'); - expect(queryByText('Permission request')).not.toBeInTheDocument(); - expect(queryByText('Approved asset:')).not.toBeInTheDocument(); - expect(queryByText('Granted to:')).not.toBeInTheDocument(); - expect(queryByText('Data')).not.toBeInTheDocument(); - fireEvent.click(showViewTxDetails); - expect(getByText('Hide full transaction details')).toBeInTheDocument(); - expect(getByText('Permission request')).toBeInTheDocument(); - expect(getByText('Approved asset:')).toBeInTheDocument(); - expect(getByText('Granted to:')).toBeInTheDocument(); - expect(getByText('Contract (0x9bc5baF8...fEF4)')).toBeInTheDocument(); - expect(getByText('Data')).toBeInTheDocument(); - expect(getByText('Function: Approve')).toBeInTheDocument(); - expect( - getByText( - '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - ), - ).toBeInTheDocument(); - }); - - it('should render Confirm approve page correctly and display fallback copy for when we are able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when giving a setApprovalForAll allowance', () => { - const { container } = renderComponent({ - ...props, - tokenSymbol: 'ZenAcademy', - isSetApproveForAll: true, - }); - - expect(container).toMatchSnapshot(); - }); - - it('should render Confirm approve page correctly and display fallback copy for when we are not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when giving a setApprovalForAll allowance', () => { - const { container } = renderComponent({ - ...props, - tokenSymbol: '', - isSetApproveForAll: true, - }); - - expect(container).toMatchSnapshot(); - }); - - it('should render Confirm approve page correctly and display fallback copy for when we are able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when revoking a setApprovalForAll allowance', () => { - const { container } = renderComponent({ - ...props, - tokenSymbol: 'ZenAcademy', - isSetApproveForAll: true, - isApprovalOrRejection: false, - }); - - expect(container).toMatchSnapshot(); - }); - - it('should render Confirm approve page correctly and display fallback copy for when we are not able to retrieve a erc721 or erc1155 name in the setApprovalForAll screen and when revoking a setApprovalForAll allowance', () => { - const { container } = renderComponent({ - ...props, - tokenSymbol: '', - isSetApproveForAll: true, - isApprovalOrRejection: false, - }); - - expect(container).toMatchSnapshot(); - }); - - it('should render security provider response if transaction is malicious', () => { - const securityProviderResponse = { - flagAsDangerous: 1, - reason: - 'This has been flagged as potentially suspicious. If you sign, you could lose access to all of your NFTs and any funds or other assets in your wallet.', - reason_header: 'Warning', - }; - const { getByText } = renderComponent({ - ...props, - txData: { - ...props.txData, - securityProviderResponse, - }, - }); - - expect(getByText(securityProviderResponse.reason)).toBeInTheDocument(); - }); - - it('should render security alert if provided', () => { - const mockSecurityAlertResponse = { - result_type: BlockaidResultType.Malicious, - reason: 'blur_farming', - }; - - const { getByText } = renderComponent({ - ...props, - txData: { - ...props.txData, - securityAlertResponse: mockSecurityAlertResponse, - }, - }); - - expect(getByText('This is a deceptive request')).toBeInTheDocument(); - }); - - it('should render token contract address when isSetApproveForAll and isApprovalOrRejection are true', () => { - const { getByText } = renderComponent({ - ...props, - isSetApproveForAll: true, - isApprovalOrRejection: true, - tokenAddress: '0x', - }); - - const showViewTxDetails = getByText('View full transaction details'); - - fireEvent.click(showViewTxDetails); - - expect(getByText(/Token contract address: 0x/u)).toBeInTheDocument(); - }); -}); diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js b/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js deleted file mode 100644 index d1a5afcff6dd..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/confirm-approve-content.stories.js +++ /dev/null @@ -1,141 +0,0 @@ -import React from 'react'; -import { TokenStandard } from '../../../../../shared/constants/transaction'; -import ConfirmApproveContent from '.'; - -export default { - title: 'Pages/ConfirmApprove/ConfirmApproveContent', - - component: ConfirmApproveContent, - argTypes: { - decimals: { - control: 'number', - }, - tokenAmount: { - control: 'text', - }, - customTokenAmount: { - control: 'text', - }, - tokenSymbol: { - control: 'text', - }, - siteImage: { - control: 'text', - }, - showCustomizeGasModal: { - action: 'showCustomizeGasModal', - }, - showEditApprovalPermissionModal: { - action: 'showEditApprovalPermissionModal', - }, - origin: { - control: 'text', - }, - setCustomAmount: { - action: 'setCustomAmount', - }, - tokenBalance: { - control: 'text', - }, - data: { - control: 'text', - }, - toAddress: { - control: 'text', - }, - currentCurrency: { - control: 'text', - }, - nativeCurrency: { - control: 'text', - }, - fiatTransactionTotal: { - control: 'text', - }, - ethTransactionTotal: { - control: 'text', - }, - useNonceField: { - control: 'boolean', - }, - customNonceValue: { - control: 'text', - }, - updateCustomNonce: { - action: 'updateCustomNonce', - }, - getNextNonce: { - action: 'getNextNonce', - }, - nextNonce: { - control: 'number', - }, - showCustomizeNonceModal: { - action: 'showCustomizeNonceModal', - }, - warning: { - control: 'text', - }, - txData: { - control: 'object', - }, - fromAddressIsLedger: { - control: 'boolean', - }, - chainId: { - control: 'text', - }, - rpcPrefs: { - control: 'object', - }, - isContract: { - control: 'boolean', - }, - hexTransactionTotal: { - control: 'text', - }, - hasLayer1GasFee: { - control: 'boolean', - }, - supportsEIP1559: { - control: 'boolean', - }, - assetName: { - control: 'text', - }, - tokenId: { - control: 'text', - }, - assetStandard: { - control: 'text', - }, - }, - args: { - decimals: 16, - siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - customTokenAmount: '10', - tokenAmount: '10', - origin: 'https://metamask.github.io/test-dapp/', - tokenSymbol: 'TST', - assetStandard: TokenStandard.ERC20, - tokenImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - tokenBalance: '15', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', - currentCurrency: 'TST', - nativeCurrency: 'ETH', - ethTransactionTotal: '20', - fiatTransactionTotal: '10', - useNonceField: true, - nextNonce: 1, - customNonceValue: '2', - txData: { simulationFails: null }, - chainId: '1337', - rpcPrefs: {}, - isContract: true, - }, -}; - -export const DefaultStory = (args) => ; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.js b/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.js deleted file mode 100644 index b9d1c365090e..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-approve-content.component'; diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.scss b/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.scss deleted file mode 100644 index ecccf76cb962..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve-content/index.scss +++ /dev/null @@ -1,394 +0,0 @@ -@use "design-system"; - -.confirm-approve-content { - display: flex; - flex-flow: column; - align-items: center; - width: 100%; - font-style: normal; - flex: 1 1 auto; - - &__warning { - padding: 0 24px 16px 24px; - } - - &__approval-asset-link { - color: var(--color-primary-default); - } - - &__approval-asset-title { - cursor: pointer; - } - - &__icon-display-content { - height: 40px; - margin-top: 16px; - padding: 12px 12px 14px 12px; - border: 1px solid var(--color-border-muted); - box-sizing: border-box; - border-radius: 100px; - align-items: center; - position: relative; - } - - &__metafoxlogo, - &__siteinfo { - position: absolute; - } - - &__address-display-content { - display: flex; - height: 27px; - padding: 12px 12px 14px 12px; - background-color: var(--color-background-alternative); - border-radius: 100px; - align-items: center; - justify-content: center; - } - - &__siteimage-identicon { - width: 24px; - height: 24px; - margin-top: 4px; - box-shadow: none; - background: none; - } - - &__address-identicon { - margin: 4px 8px 0 4px; - } - - &__copy-address, - &__etherscan-link { - padding: 0 0 0 8px; - } - - &__etherscan-link img { - width: 9px; - height: 9px; - } - - .app-header__logo-container { - margin-right: 0; - } - - .app-header__metafox-logo--icon { - height: 33px; - width: 33px; - } - - &__full-tx-content { - display: flex; - flex-flow: column; - align-items: center; - max-width: 100%; - font-style: normal; - } - - &__card-wrapper { - width: 100%; - } - - &__title { - @include design-system.H3; - - width: 100%; - display: flex; - justify-content: center; - text-align: center; - margin-top: 22px; - padding-left: 24px; - padding-right: 24px; - } - - &__description { - @include design-system.H6; - - margin-top: 16px; - color: var(--color-text-alternative); - text-align: center; - padding-left: 24px; - padding-right: 24px; - } - - &__card, - &__card--no-border { - display: flex; - flex-flow: column; - border-bottom: 1px solid var(--color-border-default); - position: relative; - padding-left: 24px; - padding-right: 24px; - - &__bold-text { - @include design-system.H6; - - font-weight: bold; - } - - &__thin-text { - @include design-system.H7; - - color: var(--color-text-alternative); - } - } - - &__card--no-border { - border-bottom: none; - } - - &__card-header { - display: flex; - flex-flow: row; - margin-top: 20px; - align-items: center; - position: relative; - justify-content: flex-end; - - &__symbol { - width: auto; - } - - &__symbol--aligned { - width: 100%; - } - - &__title, - &__title-value { - @include design-system.H6; - - font-weight: bold; - } - - &__title { - width: 100%; - margin-left: 16px; - } - - &__title--aligned { - margin-left: 27px; - position: absolute; - width: auto; - } - } - - &__card-content { - margin-top: 6px; - margin-bottom: 12px; - } - - &__card-content--aligned { - margin-left: 42px; - } - - &__transaction-total-symbol { - width: 16px; - display: flex; - justify-content: center; - align-items: center; - height: 16px; - - &__x { - display: flex; - justify-content: center; - align-items: center; - - div { - width: 22px; - height: 2px; - background: var(--color-primary-default); - position: absolute; - } - - div:first-of-type { - transform: rotate(45deg); - } - - div:last-of-type { - transform: rotate(-45deg); - } - } - - &__circle { - width: 14px; - height: 14px; - border: 2px solid var(--color-primary-default); - border-radius: 50%; - background: var(--color-background-default); - position: absolute; - } - } - - &__ledger-instruction-wrapper { - padding-left: 10px; - padding-right: 10px; - } - - &__transaction-details-content { - display: flex; - flex-flow: row; - justify-content: space-between; - - .confirm-approve-content__small-text { - width: 160px; - } - - &__fee { - display: flex; - flex-flow: column; - align-items: flex-end; - text-align: right; - } - - &__primary-fee { - @include design-system.H4; - - font-weight: bold; - color: var(--color-text-default); - } - - &__secondary-fee, - &__labelled-fee { - @include design-system.H6; - - font-weight: normal; - color: var(--color-text-muted); - } - - &__labelled-fee { - display: flex; - justify-content: space-between; - - h6.typography--h6 { - font-weight: normal; - } - } - } - - &__transaction-details-extra-content { - display: flex; - flex-flow: column; - width: 100%; - } - - &__view-full-tx-button-wrapper { - display: flex; - flex-flow: row; - margin-bottom: 16px; - justify-content: center; - - i { - margin-left: 6px; - display: flex; - color: var(--color-primary-default); - align-items: center; - } - } - - &__view-full-tx-button { - display: flex; - flex-flow: row; - } - - &__edit-submission-button-container { - display: flex; - flex-flow: row; - padding-top: 15px; - padding-bottom: 30px; - border-bottom: 1px solid var(--color-border-muted); - width: 100%; - justify-content: center; - padding-left: 24px; - padding-right: 24px; - } - - &__large-text { - @include design-system.H4; - - color: var(--color-text-default); - } - - &__medium-link-text { - @include design-system.H6; - - font-weight: 500; - color: var(--color-primary-default); - } - - &__medium-text, - &__label { - @include design-system.H6; - - color: var(--color-text-default); - } - - &__label { - font-weight: bold; - margin-right: 4px; - } - - &__small-text, - &__small-blue-text, - &__info-row { - @include design-system.H7; - - color: var(--color-text-alternative); - } - - &__small-blue-text { - color: var(--color-primary-default); - } - - &__verify-contract-details { - @include design-system.H6; - - color: var(--color-primary-default); - padding: 0; - } - - &__info-row { - display: flex; - justify-content: space-between; - margin-bottom: 6px; - } - - &__data, - &__permission { - width: 100%; - } - - &__permission { - .flex-row { - margin-top: 14px; - } - } - - &__data { - &__data-block { - overflow-wrap: break-word; - margin-right: 16px; - margin-top: 12px; - } - } - - &__footer { - display: flex; - align-items: flex-end; - margin-top: 16px; - padding-left: 34px; - padding-right: 24px; - - .confirm-approve-content__small-text { - margin-left: 16px; - } - } - - &__custom-nonce-warning { - width: 100%; - height: 30px; - } -} - -.confirm-approve-content--full { - height: auto; -} diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve.js b/ui/pages/confirmations/confirm-approve/confirm-approve.js deleted file mode 100644 index 2ab4cd5a0b7d..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve.js +++ /dev/null @@ -1,356 +0,0 @@ -import React, { useEffect, useRef, useState, useCallback } from 'react'; -import PropTypes from 'prop-types'; -import { useDispatch, useSelector } from 'react-redux'; -import ConfirmTransactionBase from '../confirm-transaction-base'; -import { EditGasModes } from '../../../../shared/constants/gas'; -import { - showModal, - updateCustomNonce, - getNextNonce, -} from '../../../store/actions'; -import { getTokenApprovedParam } from '../../../helpers/utils/token-util'; -import { readAddressAsContract } from '../../../../shared/modules/contract-utils'; -import { GasFeeContextProvider } from '../../../contexts/gasFee'; -import { TransactionModalContextProvider } from '../../../contexts/transaction-modal'; -import { - isAddressLedger, - getCurrentCurrency, -} from '../../../ducks/metamask/metamask'; -import ConfirmContractInteraction from '../confirm-contract-interaction'; -import { - getSubjectMetadata, - getUseNonceField, - getCustomNonceValue, - getNextSuggestedNonce, - checkNetworkAndAccountSupports1559, - getUseCurrencyRateCheck, - selectNetworkConfigurationByChainId, -} from '../../../selectors'; -import { useApproveTransaction } from '../hooks/useApproveTransaction'; -import { useSimulationFailureWarning } from '../hooks/useSimulationFailureWarning'; -import AdvancedGasFeePopover from '../components/advanced-gas-fee-popover'; -import EditGasFeePopover from '../components/edit-gas-fee-popover'; -import EditGasPopover from '../components/edit-gas-popover/edit-gas-popover.component'; -import Loading from '../../../components/ui/loading-screen'; -import { parseStandardTokenTransactionData } from '../../../../shared/modules/transaction.utils'; -import { TokenStandard } from '../../../../shared/constants/transaction'; -import { calcTokenAmount } from '../../../../shared/lib/transactions-controller-utils'; -import TokenAllowance from '../token-allowance/token-allowance'; -import { NetworkChangeToastLegacy } from '../components/confirm/network-change-toast'; -import { getCustomTxParamsData } from './confirm-approve.util'; -import ConfirmApproveContent from './confirm-approve-content'; - -const isAddressLedgerByFromAddress = (address) => (state) => { - return isAddressLedger(state, address); -}; - -export default function ConfirmApprove({ - assetStandard, - assetName, - userBalance, - tokenSymbol, - decimals, - tokenImage, - tokenAmount, - tokenId, - userAddress, - toAddress, - tokenAddress, - transaction, - ethTransactionTotal, - fiatTransactionTotal, - hexTransactionTotal, - hexMinimumTransactionFee, - isSetApproveForAll, -}) { - const dispatch = useDispatch(); - const { chainId, txParams: { data: transactionData, from } = {} } = - transaction; - - const currentCurrency = useSelector(getCurrentCurrency); - - const { nativeCurrency } = useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ); - - const subjectMetadata = useSelector(getSubjectMetadata); - const useNonceField = useSelector(getUseNonceField); - const nextNonce = useSelector(getNextSuggestedNonce); - const customNonceValue = useSelector(getCustomNonceValue); - const { blockExplorerUrls } = useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ); - const blockExplorerUrl = blockExplorerUrls?.[0]; - const networkAndAccountSupports1559 = useSelector( - checkNetworkAndAccountSupports1559, - ); - const fromAddressIsLedger = useSelector( - isAddressLedgerByFromAddress(userAddress), - ); - const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck); - const [customPermissionAmount, setCustomPermissionAmount] = useState(''); - const [submitWarning, setSubmitWarning] = useState(''); - const [isContract, setIsContract] = useState(false); - const [userAcknowledgedGasMissing, setUserAcknowledgedGasMissing] = - useState(false); - - const supportsEIP1559 = networkAndAccountSupports1559; - - const previousTokenAmount = useRef(tokenAmount); - const { - approveTransaction, - showCustomizeGasPopover, - closeCustomizeGasPopover, - } = useApproveTransaction(); - const renderSimulationFailureWarning = useSimulationFailureWarning( - userAcknowledgedGasMissing, - ); - - useEffect(() => { - if (customPermissionAmount && previousTokenAmount.current !== tokenAmount) { - setCustomPermissionAmount(tokenAmount); - } - previousTokenAmount.current = tokenAmount; - }, [customPermissionAmount, tokenAmount]); - - const prevNonce = useRef(nextNonce); - const prevCustomNonce = useRef(customNonceValue); - useEffect(() => { - if ( - prevNonce.current !== nextNonce || - prevCustomNonce.current !== customNonceValue - ) { - if (nextNonce !== null && customNonceValue > nextNonce) { - setSubmitWarning( - `Nonce is higher than suggested nonce of ${nextNonce}`, - ); - } else { - setSubmitWarning(''); - } - } - prevCustomNonce.current = customNonceValue; - prevNonce.current = nextNonce; - }, [customNonceValue, nextNonce]); - - const checkIfContract = useCallback(async () => { - const { isContractAddress } = await readAddressAsContract( - global.ethereumProvider, - toAddress, - ); - setIsContract(isContractAddress); - }, [setIsContract, toAddress]); - - useEffect(() => { - checkIfContract(); - }, [checkIfContract]); - - const { origin, layer1GasFee } = transaction; - const formattedOrigin = origin || ''; - - const { iconUrl: siteImage = '' } = subjectMetadata[origin] || {}; - - // Code below may need a additional look as ERC1155 tokens do not have a name - let tokensText; - if ( - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 - ) { - tokensText = assetName; - } - - const tokenBalance = userBalance - ? calcTokenAmount(userBalance, decimals).toString(10) - : ''; - const customData = customPermissionAmount - ? getCustomTxParamsData(transactionData, { - customPermissionAmount, - decimals, - }) - : null; - - const parsedTransactionData = - parseStandardTokenTransactionData(transactionData); - const isApprovalOrRejection = getTokenApprovedParam(parsedTransactionData); - - if (tokenSymbol === undefined && assetName === undefined) { - return ; - } - if (assetStandard === undefined) { - return ; - } - - if (assetStandard === TokenStandard.ERC20 && !isSetApproveForAll) { - return ( - - - - {showCustomizeGasPopover && !supportsEIP1559 && ( - - )} - {supportsEIP1559 && ( - <> - - - - )} - - - - ); - } - - return ( - - - { - dispatch(updateCustomNonce(value)); - }} - getNextNonce={() => dispatch(getNextNonce(from))} - showCustomizeNonceModal={({ - /* eslint-disable no-shadow */ - useNonceField, - nextNonce, - customNonceValue, - updateCustomNonce, - getNextNonce, - /* eslint-disable no-shadow */ - }) => - dispatch( - showModal({ - name: 'CUSTOMIZE_NONCE', - useNonceField, - nextNonce, - customNonceValue, - updateCustomNonce, - getNextNonce, - }), - ) - } - warning={submitWarning} - txData={transaction} - fromAddressIsLedger={fromAddressIsLedger} - chainId={chainId} - blockExplorerUrl={blockExplorerUrl} - isContract={isContract} - hasLayer1GasFee={layer1GasFee !== undefined} - supportsEIP1559={supportsEIP1559} - useCurrencyRateCheck={useCurrencyRateCheck} - /> - {showCustomizeGasPopover && !supportsEIP1559 && ( - - )} - {supportsEIP1559 && ( - <> - - - - )} - - } - hideSenderToRecipient - customTxParamsData={customData} - assetStandard={assetStandard} - displayAccountBalanceHeader - /> - - ); -} - -ConfirmApprove.propTypes = { - assetStandard: PropTypes.string, - assetName: PropTypes.string, - tokenAddress: PropTypes.string, - userBalance: PropTypes.string, - tokenSymbol: PropTypes.string, - decimals: PropTypes.string, - tokenImage: PropTypes.string, - tokenAmount: PropTypes.string, - tokenId: PropTypes.string, - userAddress: PropTypes.string, - toAddress: PropTypes.string, - transaction: PropTypes.shape({ - chainId: PropTypes.string, - layer1GasFee: PropTypes.string, - origin: PropTypes.string, - txParams: PropTypes.shape({ - data: PropTypes.string, - to: PropTypes.string, - from: PropTypes.string, - }), - }), - ethTransactionTotal: PropTypes.string, - fiatTransactionTotal: PropTypes.string, - hexTransactionTotal: PropTypes.string, - hexMinimumTransactionFee: PropTypes.string, - isSetApproveForAll: PropTypes.bool, -}; diff --git a/ui/pages/confirmations/confirm-approve/confirm-approve.stories-to-do.js b/ui/pages/confirmations/confirm-approve/confirm-approve.stories-to-do.js deleted file mode 100644 index d48e8fa19b58..000000000000 --- a/ui/pages/confirmations/confirm-approve/confirm-approve.stories-to-do.js +++ /dev/null @@ -1,82 +0,0 @@ -/* eslint-disable react/prop-types */ -import React, { useEffect } from 'react'; -import { text } from '@storybook/addon-knobs'; -import { useParams } from 'react-router-dom'; -import { useSelector } from 'react-redux'; -import { updateMetamaskState } from '../../../store/actions'; -import { getCurrentNetworkTransactions } from '../../../selectors/transactions'; -import { store } from '../../../../.storybook/preview'; - -import { subjectMetadata } from '../../../../.storybook/initial-states/approval-screens/token-approval'; -import ConfirmApprove from '.'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/ConfirmApprove', -}; - -// transaction ID, maps to entry in state.metamask.transactions -const txId = 7900715443136469; - -const PageSet = ({ children }) => { - const origin = text('Origin', 'https://metamask.github.io'); - const subjectIconUrl = text( - 'Icon URL', - 'https://metamask.github.io/test-dapp/metamask-fox.svg', - ); - const currentNetworkTxList = useSelector(getCurrentNetworkTransactions); - const transaction = currentNetworkTxList.find(({ id }) => id === txId); - - useEffect(() => { - transaction.origin = origin; - store.dispatch( - updateMetamaskState([ - { - op: 'replace', - path: ['transactions'], - value: [transaction], - }, - ]), - ); - }, [origin, transaction]); - - useEffect(() => { - store.dispatch( - updateMetamaskState([ - { - op: 'replace', - path: ['subjectMetadata'], - value: { - [origin]: { - iconUrl: subjectIconUrl, - }, - }, - }, - ]), - ); - }, [subjectIconUrl, origin]); - - const params = useParams(); - params.id = txId; - return children; -}; - -export const DefaultStory = () => { - store.dispatch( - updateMetamaskState([ - { - op: 'replace', - path: ['subjectMetadata'], - value: subjectMetadata, - }, - ]), - ); - - return ( - - - - ); -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-approve/index.js b/ui/pages/confirmations/confirm-approve/index.js deleted file mode 100644 index 36d3ae1356af..000000000000 --- a/ui/pages/confirmations/confirm-approve/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-approve'; diff --git a/ui/pages/confirmations/confirm-approve/index.scss b/ui/pages/confirmations/confirm-approve/index.scss deleted file mode 100644 index 18d7c29e82e7..000000000000 --- a/ui/pages/confirmations/confirm-approve/index.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'confirm-approve-content/index'; diff --git a/ui/pages/confirmations/confirm-contract-interaction/confirm-contract-interaction.js b/ui/pages/confirmations/confirm-contract-interaction/confirm-contract-interaction.js deleted file mode 100644 index 75f0eaa910d5..000000000000 --- a/ui/pages/confirmations/confirm-contract-interaction/confirm-contract-interaction.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { useDispatch } from 'react-redux'; -import { useHistory } from 'react-router-dom'; -import ConfirmTransactionBase from '../confirm-transaction-base'; - -import { SEND_ROUTE } from '../../../helpers/constants/routes'; -import { editExistingTransaction } from '../../../ducks/send'; - -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; -import { AssetType } from '../../../../shared/constants/transaction'; - -export default function ConfirmContractInteraction() { - const dispatch = useDispatch(); - const history = useHistory(); - - const handleEditTransaction = async ({ txData }) => { - const { id } = txData; - await dispatch(editExistingTransaction(AssetType.native, id.toString())); - dispatch(clearConfirmTransaction()); - }; - - const handleEdit = (confirmTransactionData) => { - handleEditTransaction(confirmTransactionData).then(() => { - history.push(SEND_ROUTE); - }); - }; - - return ( - handleEdit(confirmTransactionData)} - /> - ); -} diff --git a/ui/pages/confirmations/confirm-contract-interaction/index.js b/ui/pages/confirmations/confirm-contract-interaction/index.js deleted file mode 100644 index 01ff97ab145c..000000000000 --- a/ui/pages/confirmations/confirm-contract-interaction/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-contract-interaction'; diff --git a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.component.js deleted file mode 100644 index 3bcff1937937..000000000000 --- a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.component.js +++ /dev/null @@ -1,89 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import ConfirmTransactionBase from '../confirm-transaction-base'; -import { toBuffer } from '../../../../shared/modules/buffer-utils'; -import Box from '../../../components/ui/box'; -import { Text } from '../../../components/component-library'; -import { - Color, - DISPLAY, - OVERFLOW_WRAP, - TextVariant, - TEXT_TRANSFORM, -} from '../../../helpers/constants/design-system'; - -export default class ConfirmDeployContract extends Component { - static contextTypes = { - t: PropTypes.func, - }; - - static propTypes = { - txData: PropTypes.object, - }; - - renderData() { - const { t } = this.context; - const { txData: { origin, txParams: { data } = {} } = {} } = this.props; - - return ( - - - - - {`${t('origin')}:`} - - - {origin} - - - - - {`${t('bytes')}:`} - - {toBuffer(data).length} - - - {`${t('hexData')}:`} - - {data} - - - ); - } - - render() { - return ( - - ); - } -} diff --git a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.container.js b/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.container.js deleted file mode 100644 index 633454c0f58c..000000000000 --- a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.container.js +++ /dev/null @@ -1,12 +0,0 @@ -import { connect } from 'react-redux'; -import ConfirmDeployContract from './confirm-deploy-contract.component'; - -const mapStateToProps = (state) => { - const { confirmTransaction: { txData } = {} } = state; - - return { - txData, - }; -}; - -export default connect(mapStateToProps)(ConfirmDeployContract); diff --git a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.stories-to-do.js b/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.stories-to-do.js deleted file mode 100644 index bf57fb641dff..000000000000 --- a/ui/pages/confirmations/confirm-deploy-contract/confirm-deploy-contract.stories-to-do.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable react/prop-types */ -import React from 'react'; -import ConfirmDeployContract from '.'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/ConfirmDeployContract', - - component: ConfirmDeployContract, - argTypes: { - txData: { - control: { - type: 'object', - }, - }, - }, -}; - -export const DefaultStory = (args) => { - return ; -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-deploy-contract/index.js b/ui/pages/confirmations/confirm-deploy-contract/index.js deleted file mode 100644 index 02f222fb2127..000000000000 --- a/ui/pages/confirmations/confirm-deploy-contract/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-deploy-contract.container'; diff --git a/ui/pages/confirmations/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap b/ui/pages/confirmations/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap deleted file mode 100644 index 3058b6fac001..000000000000 --- a/ui/pages/confirmations/confirm-send-ether/__snapshots__/confirm-send-ether.test.js.snap +++ /dev/null @@ -1,576 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ConfirmSendEther should render correct information for for confirm send ether 1`] = ` -[ -
- -
-
-
-
- G -
-

- Goerli -

- -
-
-
-
-
-
-
-
- - - - - -
-
-
-
-
-
-
- Test Account -
-
-
-
-
-
- -
-
-
-
-
-
-
- - - - - -
-
-
-
-
-
-
- 0x0c54F...7AaFb -
-
-
-
-
-
-
- -
-
- - https://metamask.github.io - -
-
-
- - Sending ETH - -
-
-
-

-
-
-
- G -
-
- - 0 - -
-

-
-
-
-
-
- -
-

- You are sending 0 ETH. -

-
-
-
-
-
-
-

- Estimated changes -

-
-
- -
-
-
-
- - - - - - - - - -
-
-
-
-
-
-
-
-
- Estimated fee -
-
-
-
- -
-
-
-
-
- - 0.000021 - - - ETH - -
-
-
-
-
-
-
-
-

- Unknown processing time -

- -
-
-
-
-
-

- Max fee: -

-
-
-
- - 0.00021 - - - ETH - -
-
-
-
-
-
-
-
-
-
-
- -
-
, -] -`; diff --git a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.js b/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.js deleted file mode 100644 index 32b45d264c78..000000000000 --- a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { useDispatch } from 'react-redux'; -import { useHistory } from 'react-router-dom'; - -import { AssetType } from '../../../../shared/constants/transaction'; -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; -import { editExistingTransaction } from '../../../ducks/send'; -import { SEND_ROUTE } from '../../../helpers/constants/routes'; -import ConfirmTransactionBase from '../confirm-transaction-base'; - -const ConfirmSendEther = () => { - const dispatch = useDispatch(); - const history = useHistory(); - - const editTransaction = async (txData) => { - const { id } = txData; - await dispatch(editExistingTransaction(AssetType.native, id.toString())); - dispatch(clearConfirmTransaction()); - }; - - const handleEdit = ({ txData }) => { - editTransaction(txData).then(() => { - history.push(SEND_ROUTE); - }); - }; - - return ( - handleEdit(confirmTransactionData)} - /> - ); -}; - -export default ConfirmSendEther; diff --git a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.stories.js b/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.stories.js deleted file mode 100644 index 7ce7c189fdd7..000000000000 --- a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.stories.js +++ /dev/null @@ -1,59 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; - -import mockState from '../../../../test/data/mock-state.json'; -import configureStore from '../../../store/store'; -import ConfirmSendEther from './confirm-send-ether'; - -const sendEther = { - id: 9597986287241458, - time: 1681203297082, - status: 'unapproved', - originalGasEstimate: '0x5208', - userEditedGasLimit: false, - chainId: '0x5', - loadingDefaults: false, - dappSuggestedGasFees: { - maxPriorityFeePerGas: '0x3b9aca00', - maxFeePerGas: '0x2540be400', - }, - sendFlowHistory: [], - txParams: { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0x0c54fccd2e384b4bb6f2e405bf5cbc15a017aafb', - value: '0x0', - gas: '0x5208', - maxFeePerGas: '0x2540be400', - maxPriorityFeePerGas: '0x3b9aca00', - }, - origin: 'https://metamask.github.io', - actionId: 1830698773, - type: 'simpleSend', - securityProviderResponse: null, - userFeeLevel: 'dappSuggested', - defaultGasEstimates: { - estimateType: 'dappSuggested', - gas: '0x5208', - maxFeePerGas: '0x2540be400', - maxPriorityFeePerGas: '0x3b9aca00', - }, -}; - -mockState.metamask.transactions.push(sendEther); - -mockState.confirmTransaction = { - txData: sendEther, -}; - -const store = configureStore(mockState); - -export default { - title: 'Pages/ConfirmSendEther', - decorators: [(story) => {story()}], -}; - -export const DefaultStory = () => { - return ; -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js b/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js deleted file mode 100644 index 046fa6615c7c..000000000000 --- a/ui/pages/confirmations/confirm-send-ether/confirm-send-ether.test.js +++ /dev/null @@ -1,77 +0,0 @@ -import React from 'react'; - -import { act } from 'react-dom/test-utils'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; -import { setBackgroundConnection } from '../../../store/background-connection'; -import mockState from '../../../../test/data/mock-state.json'; -import configureStore from '../../../store/store'; -import ConfirmSendEther from './confirm-send-ether'; - -jest.mock('../components/simulation-details/useSimulationMetrics'); - -setBackgroundConnection({ - gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), - gasFeeStopPollingByPollingToken: jest.fn(), - getNetworkConfigurationByNetworkClientId: jest.fn().mockImplementation(() => - Promise.resolve({ - chainId: '0x5', - }), - ), - getGasFeeTimeEstimate: jest.fn(), - promisifiedBackground: jest.fn(), - tryReverseResolveAddress: jest.fn(), - getNextNonce: jest.fn(), - addKnownMethodData: jest.fn(), - getLastInteractedConfirmationInfo: jest.fn(), -}); - -const sendEther = { - id: 9597986287241458, - time: 1681203297082, - status: 'unapproved', - originalGasEstimate: '0x5208', - userEditedGasLimit: false, - chainId: '0x5', - loadingDefaults: false, - gasLimitNoBuffer: '0x5208', - dappSuggestedGasFees: { - maxPriorityFeePerGas: '0x3b9aca00', - maxFeePerGas: '0x2540be400', - }, - sendFlowHistory: [], - txParams: { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0x0c54fccd2e384b4bb6f2e405bf5cbc15a017aafb', - value: '0x0', - gas: '0x5208', - maxFeePerGas: '0x2540be400', - maxPriorityFeePerGas: '0x3b9aca00', - }, - origin: 'https://metamask.github.io', - actionId: 1830698773, - type: 'simpleSend', - securityProviderResponse: null, - userFeeLevel: 'dappSuggested', - defaultGasEstimates: { - estimateType: 'dappSuggested', - gas: '0x5208', - maxFeePerGas: '0x2540be400', - maxPriorityFeePerGas: '0x3b9aca00', - }, -}; - -mockState.metamask.transactions.push(sendEther); - -mockState.confirmTransaction = { - txData: sendEther, -}; - -const store = configureStore(mockState); - -describe('ConfirmSendEther', () => { - it('should render correct information for for confirm send ether', async () => { - const { getAllByTestId } = renderWithProvider(, store); - expect(getAllByTestId('page-container')).toMatchSnapshot(); - await act(async () => 0); - }); -}); diff --git a/ui/pages/confirmations/confirm-send-ether/index.js b/ui/pages/confirmations/confirm-send-ether/index.js deleted file mode 100644 index f57cbc84e29f..000000000000 --- a/ui/pages/confirmations/confirm-send-ether/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-send-ether'; diff --git a/ui/pages/confirmations/confirm-send-token/confirm-send-token.component.js b/ui/pages/confirmations/confirm-send-token/confirm-send-token.component.js deleted file mode 100644 index 6e9c9d5d7567..000000000000 --- a/ui/pages/confirmations/confirm-send-token/confirm-send-token.component.js +++ /dev/null @@ -1,32 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import ConfirmTokenTransactionBaseContainer from '../confirm-token-transaction-base'; -import { SEND_ROUTE } from '../../../helpers/constants/routes'; - -export default class ConfirmSendToken extends Component { - static propTypes = { - history: PropTypes.object, - editExistingTransaction: PropTypes.func, - tokenAmount: PropTypes.string, - }; - - handleEdit(confirmTransactionData) { - const { editExistingTransaction, history } = this.props; - editExistingTransaction(confirmTransactionData).then(() => { - history.push(SEND_ROUTE); - }); - } - - render() { - const { tokenAmount } = this.props; - - return ( - - this.handleEdit(confirmTransactionData) - } - tokenAmount={tokenAmount} - /> - ); - } -} diff --git a/ui/pages/confirmations/confirm-send-token/confirm-send-token.container.js b/ui/pages/confirmations/confirm-send-token/confirm-send-token.container.js deleted file mode 100644 index 52a93b276874..000000000000 --- a/ui/pages/confirmations/confirm-send-token/confirm-send-token.container.js +++ /dev/null @@ -1,33 +0,0 @@ -import { connect } from 'react-redux'; -import { compose } from 'redux'; -import { withRouter } from 'react-router-dom'; -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; -import { showSendTokenPage } from '../../../store/actions'; -import { editExistingTransaction } from '../../../ducks/send'; -import { sendTokenTokenAmountAndToAddressSelector } from '../../../selectors'; -import { AssetType } from '../../../../shared/constants/transaction'; -import ConfirmSendToken from './confirm-send-token.component'; - -const mapStateToProps = (state) => { - const { tokenAmount } = sendTokenTokenAmountAndToAddressSelector(state); - - return { - tokenAmount, - }; -}; - -const mapDispatchToProps = (dispatch) => { - return { - editExistingTransaction: async ({ txData }) => { - const { id } = txData; - await dispatch(editExistingTransaction(AssetType.token, id.toString())); - await dispatch(clearConfirmTransaction()); - await dispatch(showSendTokenPage()); - }, - }; -}; - -export default compose( - withRouter, - connect(mapStateToProps, mapDispatchToProps), -)(ConfirmSendToken); diff --git a/ui/pages/confirmations/confirm-send-token/confirm-send-token.js b/ui/pages/confirmations/confirm-send-token/confirm-send-token.js deleted file mode 100644 index b3b13622ea3e..000000000000 --- a/ui/pages/confirmations/confirm-send-token/confirm-send-token.js +++ /dev/null @@ -1,119 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { useDispatch, useSelector } from 'react-redux'; -import { useHistory } from 'react-router-dom'; -import ConfirmTokenTransactionBase from '../confirm-token-transaction-base/confirm-token-transaction-base'; -import { SEND_ROUTE } from '../../../helpers/constants/routes'; -import { editExistingTransaction } from '../../../ducks/send'; -import { - contractExchangeRateSelector, - selectConversionRateByChainId, - selectNetworkConfigurationByChainId, -} from '../../../selectors'; -import { getCurrentCurrency } from '../../../ducks/metamask/metamask'; -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; -import { showSendTokenPage } from '../../../store/actions'; -import { - AssetType, - TokenStandard, -} from '../../../../shared/constants/transaction'; - -export default function ConfirmSendToken({ - assetStandard, - toAddress, - tokenAddress, - assetName, - tokenSymbol, - tokenAmount, - tokenId, - transaction, - image, - ethTransactionTotal, - fiatTransactionTotal, - hexMaximumTransactionFee, -}) { - const dispatch = useDispatch(); - const history = useHistory(); - - const handleEditTransaction = async ({ txData }) => { - const { id } = txData; - await dispatch(editExistingTransaction(AssetType.token, id.toString())); - dispatch(clearConfirmTransaction()); - dispatch(showSendTokenPage()); - }; - - const handleEdit = (confirmTransactionData) => { - handleEditTransaction(confirmTransactionData).then(() => { - history.push(SEND_ROUTE); - }); - }; - - const { chainId } = transaction; - - const conversionRate = useSelector((state) => - selectConversionRateByChainId(state, chainId), - ); - - const { nativeCurrency } = useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ); - - const currentCurrency = useSelector(getCurrentCurrency); - const contractExchangeRate = useSelector(contractExchangeRateSelector); - - let title, subtitle; - - if (assetStandard === TokenStandard.ERC721) { - title = assetName; - subtitle = `#${tokenId}`; - } else if (assetStandard === TokenStandard.ERC20) { - title = `${tokenAmount} ${tokenSymbol}`; - } - - return ( - - ); -} - -ConfirmSendToken.propTypes = { - tokenAmount: PropTypes.string, - assetStandard: PropTypes.string, - assetName: PropTypes.string, - tokenSymbol: PropTypes.string, - image: PropTypes.string, - tokenId: PropTypes.string, - toAddress: PropTypes.string, - tokenAddress: PropTypes.string, - transaction: PropTypes.shape({ - chainId: PropTypes.string, - origin: PropTypes.string, - txParams: PropTypes.shape({ - data: PropTypes.string, - to: PropTypes.string, - from: PropTypes.string, - }), - }), - ethTransactionTotal: PropTypes.string, - fiatTransactionTotal: PropTypes.string, - hexMaximumTransactionFee: PropTypes.string, -}; diff --git a/ui/pages/confirmations/confirm-send-token/confirm-send-token.stories-to-do.js b/ui/pages/confirmations/confirm-send-token/confirm-send-token.stories-to-do.js deleted file mode 100644 index 3594696a037c..000000000000 --- a/ui/pages/confirmations/confirm-send-token/confirm-send-token.stories-to-do.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import ConfirmSendToken from './confirm-send-token.component'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/ConfirmSendToken', -}; - -const PageSet = ({ children }) => { - return children; -}; - -export const DefaultStory = () => { - return ( - - - - ); -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-send-token/index.js b/ui/pages/confirmations/confirm-send-token/index.js deleted file mode 100644 index 3bf86d3192b7..000000000000 --- a/ui/pages/confirmations/confirm-send-token/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-send-token'; diff --git a/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.js b/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.js deleted file mode 100644 index d5af4bdf8cad..000000000000 --- a/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.js +++ /dev/null @@ -1,231 +0,0 @@ -import React, { useContext, useMemo } from 'react'; -import PropTypes from 'prop-types'; -import BigNumber from 'bignumber.js'; -import { useSelector } from 'react-redux'; -import { getTokenTrackerLink } from '@metamask/etherscan-link'; -import { I18nContext } from '../../../contexts/i18n'; -import ConfirmTransactionBase from '../confirm-transaction-base'; -import UserPreferencedCurrencyDisplay from '../../../components/app/user-preferenced-currency-display'; -import { - formatCurrency, - convertTokenToFiat, - addFiat, - roundExponential, -} from '../../../helpers/utils/confirm-tx.util'; -import { PRIMARY } from '../../../helpers/constants/common'; -import { - contractExchangeRateSelector, - getSelectedInternalAccount, - selectConversionRateByChainId, - selectNetworkConfigurationByChainId, - selectNftContractsByChainId, -} from '../../../selectors'; -import { getCurrentCurrency } from '../../../ducks/metamask/metamask'; -import { TokenStandard } from '../../../../shared/constants/transaction'; -import { - getWeiHexFromDecimalValue, - hexWEIToDecETH, -} from '../../../../shared/modules/conversion.utils'; -import { EtherDenomination } from '../../../../shared/constants/common'; -import { CHAIN_IDS, TEST_CHAINS } from '../../../../shared/constants/network'; -import { ETH_DEFAULT_DECIMALS } from '../../../constants'; - -export default function ConfirmTokenTransactionBase({ - image = '', - assetName, - toAddress, - tokenAddress, - tokenAmount = '0', - tokenSymbol, - tokenId, - assetStandard, - onEdit, - ethTransactionTotal, - fiatTransactionTotal, - hexMaximumTransactionFee, - transaction, -}) { - const t = useContext(I18nContext); - const contractExchangeRate = useSelector(contractExchangeRateSelector); - const { chainId } = transaction; - - const { blockExplorerUrls, nativeCurrency } = useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ); - - const blockExplorerUrl = blockExplorerUrls?.[0]; - const currentCurrency = useSelector(getCurrentCurrency); - - const conversionRate = useSelector((state) => - selectConversionRateByChainId(state, chainId), - ); - - const { address: userAddress } = useSelector(getSelectedInternalAccount); - - const nftCollections = useSelector((state) => - selectNftContractsByChainId(state, chainId), - ); - - const ethTransactionTotalMaxAmount = Number( - hexWEIToDecETH(hexMaximumTransactionFee), - ).toFixed(ETH_DEFAULT_DECIMALS); - - const getTitleTokenDescription = (renderType) => { - const useBlockExplorer = - blockExplorerUrl || - [...TEST_CHAINS, CHAIN_IDS.MAINNET, CHAIN_IDS.LINEA_MAINNET].includes( - chainId, - ); - - const nftCollection = nftCollections.find( - (collection) => - collection.address.toLowerCase() === tokenAddress.toLowerCase(), - ); - const titleTokenDescription = - tokenSymbol || nftCollection?.name || t('unknownCollection'); - - if (renderType === 'text') { - return titleTokenDescription; - } - - if (useBlockExplorer) { - const blockExplorerLink = getTokenTrackerLink( - tokenAddress, - chainId, - null, - userAddress, - { - blockExplorerUrl: blockExplorerUrl ?? null, - }, - ); - const blockExplorerElement = ( - <> - - {titleTokenDescription} - - - ); - return blockExplorerElement; - } - return ( - <> - - {titleTokenDescription} - - - ); - }; - - const assetImage = image; - let title, subtitle, subtotalDisplay; - if ( - assetStandard === TokenStandard.ERC721 || - assetStandard === TokenStandard.ERC1155 - ) { - title = assetName || getTitleTokenDescription(); - subtitle = `#${tokenId}`; - subtotalDisplay = - assetName || `${getTitleTokenDescription('text')} #${tokenId}`; - } else if (assetStandard === TokenStandard.ERC20) { - title = `${tokenAmount} ${tokenSymbol}`; - subtotalDisplay = `${tokenAmount} ${tokenSymbol}`; - } - - const hexWeiValue = useMemo(() => { - if (tokenAmount === '0' || !contractExchangeRate) { - return '0'; - } - - const decimalEthValue = new BigNumber(tokenAmount) - .times( - new BigNumber(contractExchangeRate ? String(contractExchangeRate) : 0), - ) - .toFixed(); - - return getWeiHexFromDecimalValue({ - value: decimalEthValue, - fromCurrency: EtherDenomination.ETH, - fromDenomination: EtherDenomination.ETH, - }); - }, [tokenAmount, contractExchangeRate]); - - const secondaryTotalTextOverride = useMemo(() => { - if (typeof contractExchangeRate === 'undefined') { - return formatCurrency(fiatTransactionTotal, currentCurrency); - } - - const fiatTransactionAmount = convertTokenToFiat({ - value: tokenAmount, - toCurrency: currentCurrency, - conversionRate, - contractExchangeRate, - }); - const fiatTotal = addFiat(fiatTransactionAmount, fiatTransactionTotal); - const roundedFiatTotal = roundExponential(fiatTotal); - return formatCurrency(roundedFiatTotal, currentCurrency); - }, [ - currentCurrency, - conversionRate, - contractExchangeRate, - fiatTransactionTotal, - tokenAmount, - ]); - - const subtitleComponent = () => { - if (contractExchangeRate === undefined && subtitle === undefined) { - return {t('noConversionRateAvailable')}; - } - if (subtitle) { - return {subtitle}; - } - return ( - - ); - }; - - return ( - - ); -} - -ConfirmTokenTransactionBase.propTypes = { - image: PropTypes.string, - assetName: PropTypes.string, - toAddress: PropTypes.string, - tokenAddress: PropTypes.string, - tokenAmount: PropTypes.string, - tokenSymbol: PropTypes.string, - tokenId: PropTypes.string, - assetStandard: PropTypes.string, - onEdit: PropTypes.func, - ethTransactionTotal: PropTypes.string, - fiatTransactionTotal: PropTypes.string, - hexMaximumTransactionFee: PropTypes.string, - transaction: PropTypes.string, -}; diff --git a/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.stories-to-do.js b/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.stories-to-do.js deleted file mode 100644 index 541ff93060a0..000000000000 --- a/ui/pages/confirmations/confirm-token-transaction-base/confirm-token-transaction-base.stories-to-do.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { store } from '../../../../.storybook/preview'; -import ConfirmTokenTransactionBase from './confirm-token-transaction-base'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/ConfirmTokenTransactionBase', -}; - -const state = store.getState(); - -export const DefaultStory = () => { - const { metamask, confirmTransaction } = state; - const { currentCurrency } = metamask; - const { fiatTransactionTotal } = confirmTransaction; - return ( - - ); -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-token-transaction-base/index.js b/ui/pages/confirmations/confirm-token-transaction-base/index.js deleted file mode 100644 index 9c9fb78c47d4..000000000000 --- a/ui/pages/confirmations/confirm-token-transaction-base/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-token-transaction-base'; diff --git a/ui/pages/confirmations/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap b/ui/pages/confirmations/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap deleted file mode 100644 index 28045194b316..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/__snapshots__/confirm-transaction-base.test.js.snap +++ /dev/null @@ -1,537 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Confirm Transaction Base should match snapshot 1`] = ` -
-
- -
-
-
-
-
-
- - - - - -
-
-
-
-
-
-
- Account 1 -
-
-
-
-
-
- -
-
-
-
-
-
-
- - - - - -
-
-
-
-
-
-
- 0x85c16...DD65e -
-
-
-
-
-
- -
-
-
- - Sending ETH - -
-
- #70 -
-
-
-

-
- - 0.0001 - -
-

-
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
-
-
-
-

- Estimated changes -

-
-
- -
-
-
-

- No changes -

-
-
-
-
- -
-
-
-
-
-
- Estimated gas fee -
-
-
- - - -
-
-
-
-
-
-
-
- - 0.000021 - - - ETH - -
-
-
-
-
-
-
-
- - Max fee: - -
-
- - 0.000021 - - - ETH - -
-
-
-
-
-
-
-
-
-
-
-
- Custom nonce -
-
-
- -
-
-
-
-
-
-
-
- -
-

- You do not have enough in your account to pay for transaction fees on Goerli network. Deposit from another account. -

-

-

-
- -
-
-
-`; diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js deleted file mode 100644 index 30e0ff6d2033..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.component.js +++ /dev/null @@ -1,1243 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { - TransactionStatus, - TransactionType, -} from '@metamask/transaction-controller'; -import ConfirmPageContainer from '../components/confirm-page-container'; -import { isBalanceSufficient } from '../send/send.utils'; -import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'; -import { - TextVariant, - TextColor, -} from '../../../helpers/constants/design-system'; -import { - INSUFFICIENT_FUNDS_ERROR_KEY, - GAS_LIMIT_TOO_LOW_ERROR_KEY, - ETH_GAS_PRICE_FETCH_WARNING_KEY, - GAS_PRICE_FETCH_FAILURE_ERROR_KEY, - IS_SIGNING_OR_SUBMITTING, - USER_OP_CONTRACT_DEPLOY_ERROR_KEY, -} from '../../../helpers/constants/error-keys'; - -import UserPreferencedCurrencyDisplay from '../../../components/app/user-preferenced-currency-display'; - -import { PRIMARY, SECONDARY } from '../../../helpers/constants/common'; -import { MetaMetricsEventCategory } from '../../../../shared/constants/metametrics'; -import { getMethodName } from '../../../helpers/utils/metrics'; -import { - getTransactionTypeTitle, - isLegacyTransaction, -} from '../../../helpers/utils/transactions.util'; - -///: BEGIN:ONLY_INCLUDE_IF(build-mmi) -import TabbedNoteToTrader from '../../../components/institutional/note-to-trader/note-to-trader-tabbed'; -///: END:ONLY_INCLUDE_IF -import { - AccountType, - CustodyStatus, -} from '../../../../shared/constants/custody'; - -import { TransactionModalContextProvider } from '../../../contexts/transaction-modal'; -import TransactionDetail from '../components/transaction-detail/transaction-detail.component'; -import TransactionDetailItem from '../components/transaction-detail-item/transaction-detail-item.component'; -import { Text, TextField } from '../../../components/component-library'; -import LoadingHeartBeat from '../../../components/ui/loading-heartbeat'; -import LedgerInstructionField from '../components/ledger-instruction-field'; -import { - addPollingTokenToAppState, - removePollingTokenFromAppState, - gasFeeStartPollingByNetworkClientId, - gasFeeStopPollingByPollingToken, -} from '../../../store/actions'; - -import { MIN_GAS_LIMIT_DEC } from '../send/send.constants'; - -import { NETWORK_TO_NAME_MAP } from '../../../../shared/constants/network'; -import { - sumHexes, - hexToDecimal, -} from '../../../../shared/modules/conversion.utils'; -import TransactionAlerts from '../components/transaction-alerts'; -import { ConfirmHexData } from '../components/confirm-hexdata'; -import { ConfirmTitle } from '../components/confirm-title'; -import { ConfirmSubTitle } from '../components/confirm-subtitle'; -import { ConfirmGasDisplay } from '../components/confirm-gas-display'; -import updateTxData from '../../../../shared/modules/updateTxData'; -///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) -import { KeyringType } from '../../../../shared/constants/keyring'; -import SnapAccountTransactionLoadingScreen from '../../snap-account-transaction-loading-screen/snap-account-transaction-loading-screen'; -///: END:ONLY_INCLUDE_IF -import { isHardwareKeyring } from '../../../helpers/utils/hardware'; -import FeeDetailsComponent from '../components/fee-details-component/fee-details-component'; -import { SimulationDetails } from '../components/simulation-details'; -import { fetchSwapsFeatureFlags } from '../../swaps/swaps.util'; -import { NetworkChangeToastLegacy } from '../components/confirm/network-change-toast'; -import { hasTransactionData } from '../../../../shared/modules/transaction.utils'; - -export default class ConfirmTransactionBase extends Component { - static contextTypes = { - t: PropTypes.func, - trackEvent: PropTypes.func, - }; - - static propTypes = { - // react-router props - history: PropTypes.object, - // Redux props - balance: PropTypes.string, - cancelTransaction: PropTypes.func, - cancelAllTransactions: PropTypes.func, - clearConfirmTransaction: PropTypes.func, - conversionRate: PropTypes.number, - fromAddress: PropTypes.string, - fromName: PropTypes.string, - hexTransactionAmount: PropTypes.string, - hexMaximumTransactionFee: PropTypes.string, - hexMinimumTransactionFee: PropTypes.string, - methodData: PropTypes.object, - nonce: PropTypes.string, - useNonceField: PropTypes.bool, - customNonceValue: PropTypes.string, - updateCustomNonce: PropTypes.func, - sendTransaction: PropTypes.func, - showTransactionConfirmedModal: PropTypes.func, - showRejectTransactionsConfirmationModal: PropTypes.func, - toAccounts: PropTypes.array, - toAddress: PropTypes.string, - tokenData: PropTypes.object, - tokenProps: PropTypes.object, - toName: PropTypes.string, - toEns: PropTypes.string, - toNickname: PropTypes.string, - transactionStatus: PropTypes.string, - txData: PropTypes.object, - unapprovedTxCount: PropTypes.number, - customGas: PropTypes.object, - addToAddressBookIfNew: PropTypes.func, - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) - fromInternalAccount: PropTypes.object, - ///: END:ONLY_INCLUDE_IF - keyringForAccount: PropTypes.object, - // Component props - actionKey: PropTypes.string, - contentComponent: PropTypes.node, - dataHexComponent: PropTypes.node, - tokenAddress: PropTypes.string, - customTokenAmount: PropTypes.string, - dappProposedTokenAmount: PropTypes.string, - currentTokenBalance: PropTypes.string, - onEdit: PropTypes.func, - subtitleComponent: PropTypes.node, - title: PropTypes.string, - image: PropTypes.string, - type: PropTypes.string, - getNextNonce: PropTypes.func, - setNextNonce: PropTypes.func, - nextNonce: PropTypes.number, - tryReverseResolveAddress: PropTypes.func.isRequired, - hideSenderToRecipient: PropTypes.bool, - showAccountInHeader: PropTypes.bool, - mostRecentOverviewPage: PropTypes.string.isRequired, - isEthGasPriceFetched: PropTypes.bool, - noGasPrice: PropTypes.bool, - setDefaultHomeActiveTabName: PropTypes.func, - primaryTotalTextOverride: PropTypes.string, - secondaryTotalTextOverride: PropTypes.string, - gasIsLoading: PropTypes.bool, - primaryTotalTextOverrideMaxAmount: PropTypes.string, - maxFeePerGas: PropTypes.string, - maxPriorityFeePerGas: PropTypes.string, - baseFeePerGas: PropTypes.string, - gasFeeIsCustom: PropTypes.bool, - showLedgerSteps: PropTypes.bool.isRequired, - nativeCurrency: PropTypes.string, - supportsEIP1559: PropTypes.bool, - hardwareWalletRequiresConnection: PropTypes.bool, - isBuyableChain: PropTypes.bool, - isApprovalOrRejection: PropTypes.bool, - assetStandard: PropTypes.string, - useCurrencyRateCheck: PropTypes.bool, - isNotification: PropTypes.bool, - accountType: PropTypes.string, - setWaitForConfirmDeepLinkDialog: PropTypes.func, - showTransactionsFailedModal: PropTypes.func, - showCustodianDeepLink: PropTypes.func, - isNoteToTraderSupported: PropTypes.bool, - custodianPublishesTransaction: PropTypes.bool, - rpcUrl: PropTypes.string, - isMainBetaFlask: PropTypes.bool, - displayAccountBalanceHeader: PropTypes.bool, - tokenSymbol: PropTypes.string, - updateTransaction: PropTypes.func, - updateTransactionValue: PropTypes.func, - setSwapsFeatureFlags: PropTypes.func, - fetchSmartTransactionsLiveness: PropTypes.func, - isUsingPaymaster: PropTypes.bool, - isSigningOrSubmitting: PropTypes.bool, - isUserOpContractDeployError: PropTypes.bool, - useMaxValue: PropTypes.bool, - maxValue: PropTypes.string, - smartTransactionsPreferenceEnabled: PropTypes.bool, - currentChainSupportsSmartTransactions: PropTypes.bool, - selectedNetworkClientId: PropTypes.string, - isSmartTransactionsEnabled: PropTypes.bool, - hasPriorityApprovalRequest: PropTypes.bool, - chainId: PropTypes.string, - setSmartTransactionsRefreshInterval: PropTypes.func, - }; - - state = { - submitting: false, - submitError: null, - submitWarning: '', - ethGasPriceWarning: '', - editingGas: false, - userAcknowledgedGasMissing: false, - showWarningModal: false, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - noteText: '', - ///: END:ONLY_INCLUDE_IF - }; - - componentDidUpdate(prevProps) { - const { - transactionStatus, - showTransactionConfirmedModal, - history, - clearConfirmTransaction, - nextNonce, - customNonceValue, - toAddress, - tryReverseResolveAddress, - isEthGasPriceFetched, - setDefaultHomeActiveTabName, - hexMaximumTransactionFee, - useMaxValue, - hasPriorityApprovalRequest, - mostRecentOverviewPage, - txData, - getNextNonce, - fromAddress, - } = this.props; - - const { - customNonceValue: prevCustomNonceValue, - nextNonce: prevNextNonce, - toAddress: prevToAddress, - transactionStatus: prevTxStatus, - isEthGasPriceFetched: prevIsEthGasPriceFetched, - hexMaximumTransactionFee: prevHexMaximumTransactionFee, - hasPriorityApprovalRequest: prevHasPriorityApprovalRequest, - txData: prevTxData, - } = prevProps; - - const statusUpdated = transactionStatus !== prevTxStatus; - const txDroppedOrConfirmed = - transactionStatus === TransactionStatus.dropped || - transactionStatus === TransactionStatus.confirmed; - - if (txData.id !== prevTxData.id) { - getNextNonce(fromAddress); - } - - if ( - nextNonce !== prevNextNonce || - customNonceValue !== prevCustomNonceValue - ) { - if (nextNonce !== null && customNonceValue > nextNonce) { - this.setState({ - submitWarning: this.context.t('nextNonceWarning', [nextNonce]), - }); - } else { - this.setState({ submitWarning: '' }); - } - } - - if (statusUpdated && txDroppedOrConfirmed) { - showTransactionConfirmedModal({ - onSubmit: () => { - clearConfirmTransaction(); - setDefaultHomeActiveTabName('activity').then(() => { - history.push(DEFAULT_ROUTE); - }); - }, - }); - } - - if (toAddress && toAddress !== prevToAddress) { - tryReverseResolveAddress(toAddress); - } - - if (isEthGasPriceFetched !== prevIsEthGasPriceFetched) { - if (isEthGasPriceFetched) { - this.setState({ - ethGasPriceWarning: this.context.t(ETH_GAS_PRICE_FETCH_WARNING_KEY), - }); - } else { - this.setState({ - ethGasPriceWarning: '', - }); - } - } - - if ( - hexMaximumTransactionFee !== prevHexMaximumTransactionFee && - useMaxValue && - transactionStatus === TransactionStatus.unapproved - ) { - this.updateValueToMax(); - } - - if (hasPriorityApprovalRequest && !prevHasPriorityApprovalRequest) { - // Redirect to home which will redirect to the priority confirmation. - history.push(mostRecentOverviewPage); - } - } - - getErrorKey() { - const { - balance, - conversionRate, - hexMaximumTransactionFee, - txData: { txParams: { value: amount } = {} } = {}, - customGas, - noGasPrice, - gasFeeIsCustom, - isSigningOrSubmitting, - isUserOpContractDeployError, - } = this.props; - - if (isUserOpContractDeployError) { - return { - valid: false, - errorKey: USER_OP_CONTRACT_DEPLOY_ERROR_KEY, - }; - } - - const insufficientBalance = - balance && - !isBalanceSufficient({ - amount, - gasTotal: hexMaximumTransactionFee || '0x0', - balance, - conversionRate, - }); - - if (insufficientBalance) { - return { - valid: false, - errorKey: INSUFFICIENT_FUNDS_ERROR_KEY, - }; - } - - if (hexToDecimal(customGas.gasLimit) < Number(MIN_GAS_LIMIT_DEC)) { - return { - valid: false, - errorKey: GAS_LIMIT_TOO_LOW_ERROR_KEY, - }; - } - - if (noGasPrice && !gasFeeIsCustom) { - return { - valid: false, - errorKey: GAS_PRICE_FETCH_FAILURE_ERROR_KEY, - }; - } - - if (isSigningOrSubmitting) { - return { - valid: false, - errorKey: IS_SIGNING_OR_SUBMITTING, - }; - } - - return { - valid: true, - }; - } - - handleEditGas() { - const { - actionKey, - txData: { origin }, - methodData = {}, - } = this.props; - - this.context.trackEvent({ - category: MetaMetricsEventCategory.Transactions, - event: 'User clicks "Edit" on gas', - properties: { - action: 'Confirm Screen', - legacy_event: true, - recipientKnown: null, - functionType: - actionKey || - getMethodName(methodData.name) || - TransactionType.contractInteraction, - origin, - }, - }); - - this.setState({ editingGas: true }); - } - - handleCloseEditGas() { - this.setState({ editingGas: false }); - } - - setUserAcknowledgedGasMissing() { - this.setState({ userAcknowledgedGasMissing: true }); - } - - updateValueToMax() { - const { maxValue: value, txData, updateTransactionValue } = this.props; - - updateTransactionValue(txData.id, value); - } - - renderDetails() { - const { - primaryTotalTextOverride, - secondaryTotalTextOverride, - hexMaximumTransactionFee, - hexMinimumTransactionFee, - useNonceField, - customNonceValue, - updateCustomNonce, - nextNonce, - getNextNonce, - txData, - primaryTotalTextOverrideMaxAmount, - showLedgerSteps, - nativeCurrency, - isBuyableChain, - useCurrencyRateCheck, - tokenSymbol, - isUsingPaymaster, - isSigningOrSubmitting, - fromAddress, - } = this.props; - - const { t } = this.context; - const { userAcknowledgedGasMissing } = this.state; - - const { valid } = this.getErrorKey(); - const isDisabled = () => { - return userAcknowledgedGasMissing ? false : !valid; - }; - - const hasSimulationError = Boolean(txData.simulationFails); - - const renderSimulationFailureWarning = - hasSimulationError && !userAcknowledgedGasMissing; - const networkName = NETWORK_TO_NAME_MAP[txData.chainId]; - - const getTotalAmount = (useMaxFee) => { - return sumHexes( - txData.txParams.value, - useMaxFee ? hexMaximumTransactionFee : hexMinimumTransactionFee, - txData.layer1GasFee ?? 0, - ); - }; - - const handleNonceChange = ({ target: { value } }) => { - const inputValue = Number(value); - - if (inputValue < 0 || isNaN(inputValue)) { - updateCustomNonce(undefined); - return; - } - - updateCustomNonce(inputValue); - - getNextNonce(fromAddress); - }; - - const renderTotalMaxAmount = ({ - useMaxFee, - isBoldTextAndNotOverridden = false, - } = {}) => { - if ( - primaryTotalTextOverrideMaxAmount === undefined && - secondaryTotalTextOverride === undefined - ) { - // Native Send - return ( - - ); - } - - // Token send - const primaryTotal = useMaxFee - ? primaryTotalTextOverrideMaxAmount - : primaryTotalTextOverride; - - const totalMaxAmount = primaryTotal; - - return isBoldTextAndNotOverridden ? ( - {totalMaxAmount} - ) : ( - totalMaxAmount - ); - }; - - const renderTotalDetailText = (value) => { - if ( - (primaryTotalTextOverride === undefined && - secondaryTotalTextOverride === undefined) || - value === '0x0' - ) { - return ( -
- - -
- ); - } - return secondaryTotalTextOverride; - }; - - const nextNonceValue = - typeof nextNonce === 'number' ? nextNonce.toString() : null; - const renderNonceField = useNonceField && !isSigningOrSubmitting; - - if (renderNonceField && !customNonceValue && nextNonceValue) { - updateCustomNonce(nextNonceValue); - } - - const nonceField = renderNonceField ? ( -
-
-
- {t('nonceFieldHeading')} -
-
- -
-
-
- ) : null; - - const { simulationData } = txData; - - const simulationDetails = ( - - ); - - const showTotals = Boolean(simulationData?.error); - - return ( -
- - this.setUserAcknowledgedGasMissing() - } - userAcknowledgedGasMissing={userAcknowledgedGasMissing} - nativeCurrency={nativeCurrency} - networkName={networkName} - type={txData.type} - isBuyableChain={isBuyableChain} - tokenSymbol={tokenSymbol} - isUsingPaymaster={isUsingPaymaster} - /> - {simulationDetails} - {!renderSimulationFailureWarning && ( - this.handleEditGas()} - rows={[ -
- - -
, - ]} - /> - )} - {showTotals && ( - - - - {t('editGasSubTextAmountLabel')} - {' '} - {renderTotalMaxAmount({ - useMaxFee: true, - })} -
- } - />, - ]} - /> - )} - {nonceField} - {showLedgerSteps ? ( - - ) : null} -
- ); - } - - renderDataHex() { - const { txData, dataHexComponent } = this.props; - const { - txParams: { data }, - } = txData; - if (!hasTransactionData(data)) { - return null; - } - return ( - - ); - } - - handleEdit() { - const { - txData, - tokenData, - tokenProps, - onEdit, - actionKey, - txData: { origin }, - methodData = {}, - } = this.props; - - this.context.trackEvent({ - category: MetaMetricsEventCategory.Transactions, - event: 'Edit Transaction', - properties: { - action: 'Confirm Screen', - legacy_event: true, - recipientKnown: null, - functionType: - actionKey || - getMethodName(methodData.name) || - TransactionType.contractInteraction, - origin, - }, - }); - - onEdit({ txData, tokenData, tokenProps }); - } - - handleCancelAll() { - const { - cancelAllTransactions, - clearConfirmTransaction, - history, - mostRecentOverviewPage, - showRejectTransactionsConfirmationModal, - unapprovedTxCount, - } = this.props; - - showRejectTransactionsConfirmationModal({ - unapprovedTxCount, - onSubmit: async () => { - this._removeBeforeUnload(); - await cancelAllTransactions(); - clearConfirmTransaction(); - history.push(mostRecentOverviewPage); - }, - }); - } - - async handleCancel() { - const { - txData, - cancelTransaction, - history, - mostRecentOverviewPage, - updateCustomNonce, - setNextNonce, - } = this.props; - - this._removeBeforeUnload(); - await cancelTransaction(txData); - history.push(mostRecentOverviewPage); - updateCustomNonce(''); - setNextNonce(''); - } - - handleSubmit() { - const { submitting } = this.state; - - if (submitting) { - return; - } - - this.props.isMainBetaFlask - ? this.handleMainSubmit() - : this.handleMMISubmit(); - } - - handleMainSubmit() { - const { - sendTransaction, - txData, - history, - mostRecentOverviewPage, - updateCustomNonce, - setNextNonce, - methodData, - maxFeePerGas, - customTokenAmount, - dappProposedTokenAmount, - currentTokenBalance, - maxPriorityFeePerGas, - baseFeePerGas, - addToAddressBookIfNew, - toAccounts, - toAddress, - keyringForAccount, - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) - fromInternalAccount, - ///: END:ONLY_INCLUDE_IF - } = this.props; - - let loadingIndicatorMessage; - - switch (keyringForAccount?.type) { - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) - case KeyringType.snap: - loadingIndicatorMessage = ( - - ); - break; - ///: END:ONLY_INCLUDE_IF - default: - if (isHardwareKeyring(keyringForAccount?.type)) { - loadingIndicatorMessage = this.context.t( - 'loadingScreenHardwareWalletMessage', - ); - } else { - loadingIndicatorMessage = null; - } - break; - } - - updateTxData({ - txData, - maxFeePerGas, - customTokenAmount, - dappProposedTokenAmount, - currentTokenBalance, - maxPriorityFeePerGas, - baseFeePerGas, - addToAddressBookIfNew, - toAccounts, - toAddress, - name: methodData.name, - }); - - this.setState( - { - submitting: true, - submitError: null, - }, - () => { - this._removeBeforeUnload(); - - sendTransaction(txData, false, loadingIndicatorMessage) - .then(() => { - updateCustomNonce(''); - setNextNonce(''); - - if (!this._isMounted) { - return; - } - - this.setState( - { - submitting: false, - }, - () => { - history.push(mostRecentOverviewPage); - }, - ); - }) - .catch((error) => { - updateCustomNonce(''); - setNextNonce(''); - if (!this._isMounted) { - return; - } - this.setState({ - submitting: false, - submitError: error.message, - }); - }); - }, - ); - } - - async handleMMISubmit() { - const { - sendTransaction, - updateTransaction, - txData, - history, - mostRecentOverviewPage, - updateCustomNonce, - setNextNonce, - unapprovedTxCount, - accountType, - isNotification, - setWaitForConfirmDeepLinkDialog, - showTransactionsFailedModal, - fromAddress, - isNoteToTraderSupported, - custodianPublishesTransaction, - rpcUrl, - methodData, - maxFeePerGas, - customTokenAmount, - dappProposedTokenAmount, - currentTokenBalance, - maxPriorityFeePerGas, - baseFeePerGas, - addToAddressBookIfNew, - toAccounts, - toAddress, - showCustodianDeepLink, - clearConfirmTransaction, - isSmartTransactionsEnabled, - } = this.props; - const { noteText } = this.state; - - if (accountType === AccountType.CUSTODY) { - txData.custodyStatus = CustodyStatus.CREATED; - txData.metadata = txData.metadata || {}; - - if (isNoteToTraderSupported) { - txData.metadata.note = noteText; - } - - if (isSmartTransactionsEnabled) { - txData.origin += '#smartTransaction'; - } - - txData.metadata.custodianPublishesTransaction = - custodianPublishesTransaction; - txData.metadata.rpcUrl = rpcUrl; - - await updateTransaction(txData); - } - - updateTxData({ - txData, - maxFeePerGas, - customTokenAmount, - dappProposedTokenAmount, - currentTokenBalance, - maxPriorityFeePerGas, - baseFeePerGas, - addToAddressBookIfNew, - toAccounts, - toAddress, - name: methodData.name, - }); - - this.setState( - { - submitting: true, - submitError: null, - }, - () => { - this._removeBeforeUnload(); - - if (txData.custodyStatus) { - setWaitForConfirmDeepLinkDialog(true); - } - - sendTransaction(txData) - .then(() => { - updateCustomNonce(''); - setNextNonce(''); - if (txData.custodyStatus) { - showCustodianDeepLink({ - fromAddress, - closeNotification: isNotification && unapprovedTxCount === 1, - txId: txData.id, - onDeepLinkFetched: () => { - this.context.trackEvent({ - category: 'MMI', - event: 'Show deeplink for transaction', - }); - }, - onDeepLinkShown: () => { - clearConfirmTransaction(); - if (!this._isMounted) { - return; - } - this.setState({ submitting: false }, () => { - history.push(mostRecentOverviewPage); - }); - }, - }); - } else { - if (!this._isMounted) { - return; - } - this.setState( - { - submitting: false, - }, - () => { - history.push(mostRecentOverviewPage); - }, - ); - } - }) - .catch((error) => { - updateCustomNonce(''); - setNextNonce(''); - - if (!this._isMounted) { - return; - } - - showTransactionsFailedModal(error.message, isNotification); - - this.setState({ - submitting: false, - submitError: error.message, - }); - setWaitForConfirmDeepLinkDialog(true); - }); - }, - ); - } - - handleSetApprovalForAll() { - this.setState({ showWarningModal: true }); - } - - renderTitleComponent() { - const { title, hexTransactionAmount, txData } = this.props; - - return ( - - ); - } - - renderSubtitleComponent() { - const { assetStandard, subtitleComponent, hexTransactionAmount, txData } = - this.props; - - return ( - - ); - } - - _beforeUnloadForGasPolling = () => { - this._isMounted = false; - if (this.state.pollingToken) { - gasFeeStopPollingByPollingToken(this.state.pollingToken); - removePollingTokenFromAppState(this.state.pollingToken); - } - }; - - _removeBeforeUnload = () => { - window.removeEventListener('beforeunload', this._beforeUnloadForGasPolling); - }; - - componentDidMount() { - this._isMounted = true; - const { - toAddress, - fromAddress, - txData: { origin } = {}, - getNextNonce, - tryReverseResolveAddress, - smartTransactionsPreferenceEnabled, - currentChainSupportsSmartTransactions, - setSwapsFeatureFlags, - fetchSmartTransactionsLiveness, - setSmartTransactionsRefreshInterval, - } = this.props; - - const { trackEvent } = this.context; - trackEvent({ - category: MetaMetricsEventCategory.Transactions, - event: 'Confirm: Started', - properties: { - action: 'Confirm Screen', - legacy_event: true, - origin, - }, - }); - - getNextNonce(fromAddress); - if (toAddress) { - tryReverseResolveAddress(toAddress); - } - - /** - * This makes a request to get estimates and begin polling, keeping track of the poll - * token in component state. - * It then disconnects polling upon componentWillUnmount. If the hook is unmounted - * while waiting for `gasFeeStartPollingByNetworkClientId` to resolve, the `_isMounted` - * flag ensures that a call to disconnect happens after promise resolution. - */ - gasFeeStartPollingByNetworkClientId( - this.props.selectedNetworkClientId, - ).then((pollingToken) => { - if (this._isMounted) { - addPollingTokenToAppState(pollingToken); - this.setState({ pollingToken }); - } else { - gasFeeStopPollingByPollingToken(pollingToken); - removePollingTokenFromAppState(this.state.pollingToken); - } - }); - - window.addEventListener('beforeunload', this._beforeUnloadForGasPolling); - - if ( - smartTransactionsPreferenceEnabled && - currentChainSupportsSmartTransactions - ) { - // TODO: Fetching swaps feature flags, which include feature flags for smart transactions, is only a short-term solution. - // Long-term, we want to have a new proxy service specifically for feature flags. - Promise.all([ - fetchSwapsFeatureFlags(), - fetchSmartTransactionsLiveness(), - ]).then(([swapsFeatureFlags]) => { - setSwapsFeatureFlags(swapsFeatureFlags); - setSmartTransactionsRefreshInterval( - swapsFeatureFlags?.smartTransactions?.batchStatusPollingInterval, - ); - }); - } - } - - componentWillUnmount() { - this._beforeUnloadForGasPolling(); - this._removeBeforeUnload(); - this.props.clearConfirmTransaction(); - } - - supportsEIP1559 = - this.props.supportsEIP1559 && !isLegacyTransaction(this.props.txData); - - render() { - const { t } = this.context; - const { - fromName, - fromAddress, - toName, - toAddress, - toEns, - toNickname, - methodData, - tokenAddress, - contentComponent, - onEdit, - nonce, - customNonceValue, - unapprovedTxCount, - type, - hideSenderToRecipient, - showAccountInHeader, - txData, - gasIsLoading, - gasFeeIsCustom, - nativeCurrency, - hardwareWalletRequiresConnection, - image, - isApprovalOrRejection, - assetStandard, - displayAccountBalanceHeader, - title, - isSigningOrSubmitting, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - isNoteToTraderSupported, - ///: END:ONLY_INCLUDE_IF - } = this.props; - const { - submitting, - submitError, - submitWarning, - ethGasPriceWarning, - editingGas, - userAcknowledgedGasMissing, - showWarningModal, - } = this.state; - const { name } = methodData; - const { valid, errorKey } = this.getErrorKey(); - const hasSimulationError = Boolean(txData.simulationFails); - const renderSimulationFailureWarning = - hasSimulationError && !userAcknowledgedGasMissing; - - // This `isTokenApproval` case is added to handle possible rendering of this component from - // confirm-approve.js when `assetStandard` is `undefined`. That will happen if the request to - // get the asset standard fails. In that scenario, confirm-approve.js returns the `` - // component, which in turn returns this `` component. We meed to prevent - // the user from editing the transaction in those cases. - - // as this component is made functional, useTransactionFunctionType can be used to get functionType - const isTokenApproval = - txData.type === TransactionType.tokenMethodSetApprovalForAll || - txData.type === TransactionType.tokenMethodApprove || - txData.type === TransactionType.tokenMethodIncreaseAllowance; - const isContractInteraction = - txData.type === TransactionType.contractInteraction; - - const isContractInteractionFromDapp = - (isTokenApproval || isContractInteraction) && - txData.origin !== 'metamask'; - let functionType; - if (isContractInteractionFromDapp) { - functionType = getMethodName(name); - } - - if (!functionType) { - if (type) { - functionType = getTransactionTypeTitle(t, type, nativeCurrency); - } else { - functionType = t('contractInteraction'); - } - } - - return ( - - this.setState({ noteText: value })} - noteText={this.state.noteText} - labelText={t('transactionNote')} - /> - ) - } - ///: END:ONLY_INCLUDE_IF - nonce={customNonceValue || nonce} - unapprovedTxCount={unapprovedTxCount} - tokenAddress={tokenAddress} - errorMessage={submitError} - errorKey={errorKey} - hasSimulationError={hasSimulationError} - warning={submitWarning} - disabled={ - renderSimulationFailureWarning || - !valid || - submitting || - hardwareWalletRequiresConnection || - (gasIsLoading && !gasFeeIsCustom) || - isSigningOrSubmitting - } - onEdit={() => this.handleEdit()} - onCancelAll={() => this.handleCancelAll()} - onCancel={() => this.handleCancel()} - onSubmit={() => this.handleSubmit()} - onSetApprovalForAll={() => this.handleSetApprovalForAll()} - showWarningModal={showWarningModal} - hideSenderToRecipient={hideSenderToRecipient} - origin={txData.origin} - ethGasPriceWarning={ethGasPriceWarning} - editingGas={editingGas} - handleCloseEditGas={() => this.handleCloseEditGas()} - currentTransaction={txData} - supportsEIP1559={this.supportsEIP1559} - nativeCurrency={nativeCurrency} - isApprovalOrRejection={isApprovalOrRejection} - assetStandard={assetStandard} - txData={txData} - displayAccountBalanceHeader={displayAccountBalanceHeader} - /> - - - ); - } -} diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js deleted file mode 100644 index 54295addf7a6..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.container.js +++ /dev/null @@ -1,532 +0,0 @@ -import { connect } from 'react-redux'; -import { compose } from 'redux'; -import { withRouter } from 'react-router-dom'; -import { - TransactionStatus, - TransactionType, -} from '@metamask/transaction-controller'; -import { captureException } from '@sentry/browser'; - -///: BEGIN:ONLY_INCLUDE_IF(build-mmi) -import { showCustodianDeepLink } from '@metamask-institutional/extension'; -import { mmiActionsFactory } from '../../../store/institutional/institution-background'; -import { CHAIN_ID_TO_RPC_URL_MAP } from '../../../../shared/constants/network'; - -///: END:ONLY_INCLUDE_IF -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; - -import { - updateCustomNonce, - cancelTx, - cancelTxs, - updateAndApproveTx, - showModal, - getNextNonce, - tryReverseResolveAddress, - setDefaultHomeActiveTabName, - addToAddressBook, - updateTransaction, - updateEditableParams, - setSwapsFeatureFlags, - fetchSmartTransactionsLiveness, - setNextNonce, - setSmartTransactionsRefreshInterval, -} from '../../../store/actions'; -import { isBalanceSufficient } from '../send/send.utils'; -import { shortenAddress, valuesFor } from '../../../helpers/utils/util'; -import { - getAdvancedInlineGasShown, - getCustomNonceValue, - getIsMainnet, - getKnownMethodData, - getMetaMaskAccounts, - getUseNonceField, - transactionFeeSelector, - getNoGasPriceFetched, - getIsEthGasPriceFetched, - getShouldShowFiat, - checkNetworkAndAccountSupports1559, - doesAddressRequireLedgerHidConnection, - getTokenList, - getEnsResolutionByAddress, - getUnapprovedTransaction, - getFullTxData, - getUseCurrencyRateCheck, - getUnapprovedTransactions, - getInternalAccountByAddress, - getApprovedAndSignedTransactions, - getPrioritizedUnapprovedTemplatedConfirmations, -} from '../../../selectors'; -import { - getCurrentChainSupportsSmartTransactions, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - getSmartTransactionsEnabled, - ///: END:ONLY_INCLUDE_IF - getSmartTransactionsPreferenceEnabled, -} from '../../../../shared/modules/selectors'; -import { getMostRecentOverviewPage } from '../../../ducks/history/history'; -import { - isAddressLedger, - updateGasFees, - getIsGasEstimatesLoading, - getSendToAccounts, - findKeyringForAddress, -} from '../../../ducks/metamask/metamask'; -import { getSelectedNetworkClientId } from '../../../../shared/modules/selectors/networks'; -import { - addHexPrefix, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - getEnvironmentType, - ///: END:ONLY_INCLUDE_IF - // TODO: Remove restricted import - // eslint-disable-next-line import/no-restricted-paths -} from '../../../../app/scripts/lib/util'; - -import { - parseStandardTokenTransactionData, - txParamsAreDappSuggested, -} from '../../../../shared/modules/transaction.utils'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; - -import { getGasLoadingAnimationIsShowing } from '../../../ducks/app/app'; -import { isLegacyTransaction } from '../../../helpers/utils/transactions.util'; -import { CUSTOM_GAS_ESTIMATE } from '../../../../shared/constants/gas'; - -// eslint-disable-next-line import/no-duplicates -import { getIsUsingPaymaster } from '../../../selectors/account-abstraction'; - -import { - selectConversionRateByChainId, - selectNetworkConfigurationByChainId, - // eslint-disable-next-line import/no-duplicates -} from '../../../selectors/selectors'; - -///: BEGIN:ONLY_INCLUDE_IF(build-mmi) -import { - getAccountType, - selectDefaultRpcEndpointByChainId, - // eslint-disable-next-line import/no-duplicates -} from '../../../selectors/selectors'; -// eslint-disable-next-line import/no-duplicates -import { ENVIRONMENT_TYPE_NOTIFICATION } from '../../../../shared/constants/app'; -import { - getIsNoteToTraderSupported, - getIsCustodianPublishesTransactionSupported, -} from '../../../selectors/institutional/selectors'; -import { showCustodyConfirmLink } from '../../../store/institutional/institution-actions'; -///: END:ONLY_INCLUDE_IF -import { calcGasTotal } from '../../../../shared/lib/transactions-controller-utils'; -import { subtractHexes } from '../../../../shared/modules/conversion.utils'; -import { getIsNativeTokenBuyable } from '../../../ducks/ramps'; -import ConfirmTransactionBase from './confirm-transaction-base.component'; - -let customNonceValue = ''; -const customNonceMerge = (txData) => { - return customNonceValue - ? { - ...txData, - customNonceValue, - } - : txData; -}; - -function addressIsNew(toAccounts, newAddress) { - const newAddressNormalized = newAddress.toLowerCase(); - const foundMatching = toAccounts.some( - ({ address }) => address.toLowerCase() === newAddressNormalized, - ); - return !foundMatching; -} - -function getTokenToAddress(data, type) { - if ( - ![ - TransactionType.tokenMethodTransferFrom, - TransactionType.tokenMethodSafeTransferFrom, - TransactionType.tokenMethodTransfer, - ].includes(type) - ) { - return undefined; - } - - const transactionData = parseStandardTokenTransactionData(data); - - const value = transactionData?.args?._to || transactionData?.args?.to; - - return value?.toString().toLowerCase(); -} - -const mapStateToProps = (state, ownProps) => { - const { - toAddress: propsToAddress, - customTxParamsData, - match: { params = {} }, - } = ownProps; - const { id: paramsTransactionId } = params; - const isMainnet = getIsMainnet(state); - const selectedNetworkClientId = getSelectedNetworkClientId(state); - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const envType = getEnvironmentType(); - const isNotification = envType === ENVIRONMENT_TYPE_NOTIFICATION; - ///: END:ONLY_INCLUDE_IF - - const isGasEstimatesLoading = getIsGasEstimatesLoading(state); - const gasLoadingAnimationIsShowing = getGasLoadingAnimationIsShowing(state); - const isBuyableChain = getIsNativeTokenBuyable(state); - const { confirmTransaction, metamask } = state; - const { addressBook, nextNonce } = metamask; - const unapprovedTxs = getUnapprovedTransactions(state); - - const { tokenData, txData, tokenProps, nonce } = confirmTransaction; - const { txParams = {}, id: transactionId, type } = txData; - const txId = transactionId || paramsTransactionId; - const transaction = getUnapprovedTransaction(state, txId) ?? {}; - const { chainId } = transaction; - const conversionRate = selectConversionRateByChainId(state, chainId); - - const { - from: fromAddress, - to: txParamsToAddress, - gasPrice, - gas: gasLimit, - data, - } = (transaction && transaction.txParams) || txParams; - - const accounts = getMetaMaskAccounts(state); - const smartTransactionsPreferenceEnabled = - getSmartTransactionsPreferenceEnabled(state); - const currentChainSupportsSmartTransactions = - getCurrentChainSupportsSmartTransactions(state); - - if (!accounts[fromAddress]) { - captureException( - new Error( - `ConfirmTransactionBase: Unexpected state - No account found for sender address. ` + - `chainId: ${chainId}. fromAddress?: ${Boolean(fromAddress)}`, - ), - ); - } - - const { balance } = accounts[fromAddress] || { balance: '0x0' }; - const fromInternalAccount = getInternalAccountByAddress(state, fromAddress); - const fromName = fromInternalAccount?.metadata.name; - const keyring = findKeyringForAddress(state, fromAddress); - - const tokenToAddress = getTokenToAddress(data, type); - const toAddress = propsToAddress || tokenToAddress || txParamsToAddress; - - const toAccounts = getSendToAccounts(state); - - const tokenList = getTokenList(state); - - const toName = - getInternalAccountByAddress(state, toAddress)?.metadata.name || - tokenList[toAddress?.toLowerCase()]?.name || - shortenAddress(toChecksumHexAddress(toAddress)); - - const checksummedAddress = toChecksumHexAddress(toAddress); - const addressBookObject = - addressBook && - addressBook[chainId] && - addressBook[chainId][checksummedAddress]; - const toEns = getEnsResolutionByAddress(state, checksummedAddress); - const toNickname = addressBookObject ? addressBookObject.name : ''; - const transactionStatus = transaction ? transaction.status : ''; - const supportsEIP1559 = - checkNetworkAndAccountSupports1559(state) && !isLegacyTransaction(txParams); - - const { - hexTransactionAmount: initialHexTransactionAmount, - hexMaximumTransactionFee, - hexMinimumTransactionFee, - gasEstimationObject, - } = transactionFeeSelector(state, transaction); - - const useMaxValue = state.confirmTransaction.maxValueMode?.[txId] ?? false; - const maxValue = subtractHexes(balance, hexMaximumTransactionFee); - - const hexTransactionAmount = useMaxValue - ? maxValue - : initialHexTransactionAmount; - - const currentNetworkUnapprovedTxs = Object.keys(unapprovedTxs) - .filter((key) => unapprovedTxs[key].chainId === chainId) - .reduce((acc, key) => ({ ...acc, [key]: unapprovedTxs[key] }), {}); - const unapprovedTxCount = valuesFor(currentNetworkUnapprovedTxs).length; - - const insufficientBalance = !isBalanceSufficient({ - hexTransactionAmount, - gasTotal: calcGasTotal(gasLimit, gasPrice), - balance, - conversionRate, - }); - - const methodData = getKnownMethodData(state, data) || {}; - - const fullTxData = getFullTxData( - state, - txId, - TransactionStatus.unapproved, - customTxParamsData, - hexTransactionAmount, - ); - - customNonceValue = getCustomNonceValue(state); - const isEthGasPriceFetched = getIsEthGasPriceFetched(state); - const noGasPrice = !supportsEIP1559 && getNoGasPriceFetched(state); - const gasFeeIsCustom = - fullTxData.userFeeLevel === CUSTOM_GAS_ESTIMATE || - txParamsAreDappSuggested(fullTxData); - const fromAddressIsLedger = isAddressLedger(state, fromAddress); - - const { nativeCurrency } = - selectNetworkConfigurationByChainId(state, chainId) ?? {}; - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const accountType = getAccountType(state, fromAddress); - const fromChecksumHexAddress = toChecksumHexAddress(fromAddress); - const isNoteToTraderSupported = getIsNoteToTraderSupported( - state, - fromChecksumHexAddress, - ); - const custodianPublishesTransaction = - getIsCustodianPublishesTransactionSupported(state, fromChecksumHexAddress); - const builtinRpcUrl = CHAIN_ID_TO_RPC_URL_MAP[chainId]; - - const { url: customRpcUrl } = - selectDefaultRpcEndpointByChainId(state, chainId) ?? {}; - - const rpcUrl = customRpcUrl || builtinRpcUrl; - - ///: END:ONLY_INCLUDE_IF - - const hardwareWalletRequiresConnection = - doesAddressRequireLedgerHidConnection(state, fromAddress); - - const isUsingPaymaster = getIsUsingPaymaster(state); - - let isSigningOrSubmitting = Boolean( - getApprovedAndSignedTransactions(state).length, - ); - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - isSigningOrSubmitting = false; - ///: END:ONLY_INCLUDE_IF - - const isUserOpContractDeployError = - fullTxData.isUserOperation && type === TransactionType.deployContract; - - const hasPriorityApprovalRequest = Boolean( - getPrioritizedUnapprovedTemplatedConfirmations(state).length, - ); - - return { - balance, - fromAddress, - fromName, - toAccounts, - toAddress, - toEns, - toName, - toNickname, - hexTransactionAmount, - hexMaximumTransactionFee, - hexMinimumTransactionFee, - txData: fullTxData, - tokenData, - methodData, - tokenProps, - conversionRate, - transactionStatus, - nonce, - unapprovedTxs, - unapprovedTxCount, - customGas: { - gasLimit, - gasPrice, - }, - advancedInlineGasShown: getAdvancedInlineGasShown(state), - useNonceField: getUseNonceField(state), - customNonceValue, - insufficientBalance, - hideFiatConversion: !getShouldShowFiat(state), - type, - nextNonce, - mostRecentOverviewPage: getMostRecentOverviewPage(state), - isMainnet, - selectedNetworkClientId, - isEthGasPriceFetched, - noGasPrice, - supportsEIP1559, - gasIsLoading: isGasEstimatesLoading || gasLoadingAnimationIsShowing, - maxFeePerGas: gasEstimationObject.maxFeePerGas, - maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas, - baseFeePerGas: gasEstimationObject.baseFeePerGas, - gasFeeIsCustom, - showLedgerSteps: fromAddressIsLedger, - nativeCurrency, - hardwareWalletRequiresConnection, - chainId, - isBuyableChain, - useCurrencyRateCheck: getUseCurrencyRateCheck(state), - keyringForAccount: keyring, - ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) - fromInternalAccount, - ///: END:ONLY_INCLUDE_IF - isUsingPaymaster, - isSigningOrSubmitting, - isUserOpContractDeployError, - useMaxValue, - maxValue, - smartTransactionsPreferenceEnabled, - currentChainSupportsSmartTransactions, - hasPriorityApprovalRequest, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - accountType, - isNoteToTraderSupported, - isNotification, - custodianPublishesTransaction, - rpcUrl, - isSmartTransactionsEnabled: getSmartTransactionsEnabled(state), - ///: END:ONLY_INCLUDE_IF - }; -}; - -export const mapDispatchToProps = (dispatch) => { - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const mmiActions = mmiActionsFactory(); - ///: END:ONLY_INCLUDE_IF - return { - tryReverseResolveAddress: (address) => { - return dispatch(tryReverseResolveAddress(address)); - }, - updateCustomNonce: (value) => { - customNonceValue = value; - dispatch(updateCustomNonce(value)); - }, - clearConfirmTransaction: () => dispatch(clearConfirmTransaction()), - showTransactionConfirmedModal: ({ onSubmit }) => { - return dispatch(showModal({ name: 'TRANSACTION_CONFIRMED', onSubmit })); - }, - showRejectTransactionsConfirmationModal: ({ - onSubmit, - unapprovedTxCount, - }) => { - return dispatch( - showModal({ name: 'REJECT_TRANSACTIONS', onSubmit, unapprovedTxCount }), - ); - }, - cancelTransaction: ({ id }) => dispatch(cancelTx({ id })), - cancelAllTransactions: (txList) => dispatch(cancelTxs(txList)), - sendTransaction: ( - txData, - dontShowLoadingIndicator, - loadingIndicatorMessage, - ) => - dispatch( - updateAndApproveTx( - customNonceMerge(txData), - dontShowLoadingIndicator, - loadingIndicatorMessage, - ), - ), - updateTransaction: (txMeta) => { - dispatch(updateTransaction(txMeta, true)); - }, - updateTransactionValue: (id, value) => { - dispatch(updateEditableParams(id, { value })); - }, - setSwapsFeatureFlags: (swapsFeatureFlags) => { - dispatch(setSwapsFeatureFlags(swapsFeatureFlags)); - }, - fetchSmartTransactionsLiveness: () => { - dispatch(fetchSmartTransactionsLiveness()); - }, - getNextNonce: (address) => dispatch(getNextNonce(address)), - setNextNonce: (val) => dispatch(setNextNonce(val)), - setDefaultHomeActiveTabName: (tabName) => - dispatch(setDefaultHomeActiveTabName(tabName)), - updateTransactionGasFees: (gasFees) => { - dispatch(updateGasFees({ ...gasFees, expectHexWei: true })); - }, - addToAddressBookIfNew: (newAddress, toAccounts, nickname = '') => { - const hexPrefixedAddress = addHexPrefix(newAddress); - if (addressIsNew(toAccounts, hexPrefixedAddress)) { - dispatch(addToAddressBook(hexPrefixedAddress, nickname)); - } - }, - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - getCustodianConfirmDeepLink: (id) => - dispatch(mmiActions.getCustodianConfirmDeepLink(id)), - showTransactionsFailedModal: (errorMessage, closeNotification) => - dispatch( - showModal({ - name: 'TRANSACTION_FAILED', - errorMessage, - closeNotification, - }), - ), - showCustodianDeepLink: ({ - txId, - fromAddress, - closeNotification, - onDeepLinkFetched, - onDeepLinkShown, - }) => - showCustodianDeepLink({ - dispatch, - mmiActions, - txId, - fromAddress, - closeNotification, - onDeepLinkFetched, - onDeepLinkShown, - showCustodyConfirmLink, - }), - setWaitForConfirmDeepLinkDialog: (wait) => - dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(wait)), - ///: END:ONLY_INCLUDE_IF - setSmartTransactionsRefreshInterval: (interval) => - dispatch(setSmartTransactionsRefreshInterval(interval)), - }; -}; - -const mergeProps = (stateProps, dispatchProps, ownProps) => { - const { txData, unapprovedTxs } = stateProps; - - const { - cancelAllTransactions: dispatchCancelAllTransactions, - updateTransactionGasFees: dispatchUpdateTransactionGasFees, - ...otherDispatchProps - } = dispatchProps; - - let isMainBetaFlask = ownProps.isMainBetaFlask || false; - - ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask) - if (ownProps.isMainBetaFlask === undefined) { - isMainBetaFlask = true; - } - ///: END:ONLY_INCLUDE_IF - - return { - ...stateProps, - ...otherDispatchProps, - ...ownProps, - cancelAllTransactions: () => - dispatchCancelAllTransactions(valuesFor(unapprovedTxs)), - updateGasAndCalculate: ({ gasLimit, gasPrice }) => { - dispatchUpdateTransactionGasFees({ - gasLimit, - gasPrice, - transaction: txData, - }); - }, - isMainBetaFlask, - }; -}; - -export default compose( - withRouter, - connect(mapStateToProps, mapDispatchToProps, mergeProps), -)(ConfirmTransactionBase); diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.stories-to-do.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.stories-to-do.js deleted file mode 100644 index f2d7ad4b2344..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.stories-to-do.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; - -import ConfirmTransactionBase from '.'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/ConfirmTransactionBase', -}; - -const PageSet = ({ children }) => { - return children; -}; - -export const DefaultStory = () => { - return ( - - - - ); -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js b/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js deleted file mode 100644 index e07991f96d52..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/confirm-transaction-base.test.js +++ /dev/null @@ -1,1112 +0,0 @@ -import React from 'react'; -import configureMockStore from 'redux-mock-store'; -import thunk from 'redux-thunk'; -import { fireEvent, waitFor } from '@testing-library/react'; -import nock from 'nock'; -import { EthAccountType } from '@metamask/keyring-api'; -import { - TransactionStatus, - TransactionType, -} from '@metamask/transaction-controller'; -import { act } from 'react-dom/test-utils'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; -import { setBackgroundConnection } from '../../../store/background-connection'; -import { INITIAL_SEND_STATE_FOR_EXISTING_DRAFT } from '../../../../test/jest/mocks'; -import { GasEstimateTypes } from '../../../../shared/constants/gas'; -import { KeyringType } from '../../../../shared/constants/keyring'; -import { CHAIN_IDS } from '../../../../shared/constants/network'; -import { domainInitialState } from '../../../ducks/domains'; - -import { - BlockaidReason, - BlockaidResultType, -} from '../../../../shared/constants/security-provider'; -import { defaultBuyableChains } from '../../../ducks/ramps/constants'; -import { ETH_EOA_METHODS } from '../../../../shared/constants/eth-methods'; -import { mockNetworkState } from '../../../../test/stub/networks'; -import { setStorageItem } from '../../../../shared/lib/storage-helpers'; -import ConfirmTransactionBase from './confirm-transaction-base.container'; - -jest.mock('../components/simulation-details/useSimulationMetrics'); - -const middleware = [thunk]; - -setBackgroundConnection({ - gasFeeStartPolling: jest.fn().mockResolvedValue('pollingToken'), - gasFeeStopPollingByPollingToken: jest.fn(), - getNetworkConfigurationByNetworkClientId: jest.fn().mockImplementation(() => - Promise.resolve({ - chainId: '0x5', - }), - ), - getGasFeeTimeEstimate: jest.fn(), - tryReverseResolveAddress: jest.fn(), - getNextNonce: jest.fn(), - updateTransaction: jest.fn(), - getLastInteractedConfirmationInfo: jest.fn(), - setAlertEnabledness: jest.fn(), - setSwapsFeatureFlags: jest.fn(), -}); - -const mockTxParamsFromAddress = '0x123456789'; - -const mockTxParamsToAddress = '0x85c1685cfceaa5c0bdb1609fc536e9a8387dd65e'; -const mockMaliciousToAddress = '0x5FbDB2315678afecb367f032d93F642f64180aa3'; -const mockTxParamsToAddressConcat = '0x85c16...DD65e'; - -const mockParsedTxDataToAddressWithout0x = - 'e57e7847fd3661a9b7c86aaf1daea08d9da5750a'; -const mockParsedTxDataToAddress = '0xe57E7...5750A'; - -const mockPropsToAddress = '0x33m1685cfceaa5c0bdb1609fc536e9a8387dd567'; -const mockPropsToAddressConcat = '0x33m16...dd567'; - -const mockTxParams = { - from: mockTxParamsFromAddress, - to: mockTxParamsToAddress, - value: '0x5af3107a4000', - gas: '0x5208', - maxFeePerGas: '0x59682f16', - maxPriorityFeePerGas: '0x59682f00', - type: '0x2', - data: `0xa22cb465000000000000000000000000${mockParsedTxDataToAddressWithout0x}0000000000000000000000000000000000000000000000000000000000000001`, -}; - -const baseStore = { - send: { - ...INITIAL_SEND_STATE_FOR_EXISTING_DRAFT, - currentTransactionUUID: null, - draftTransactions: {}, - }, - DNS: domainInitialState, - gas: { - customData: { limit: null, price: null }, - }, - history: { mostRecentOverviewPage: '/' }, - metamask: { - transactions: [ - { - id: 1, - chainId: '0x5', - txParams: { ...mockTxParams }, - status: 'unapproved', - simulationData: {}, - gasLimitNoBuffer: '0x5208', - }, - ], - gasEstimateType: GasEstimateTypes.legacy, - gasFeeEstimates: { - low: '0', - medium: '1', - fast: '2', - }, - keyrings: [ - { - type: KeyringType.hdKeyTree, - accounts: ['0x0'], - }, - ], - ...mockNetworkState({ - chainId: CHAIN_IDS.GOERLI, - }), - tokens: [], - preferences: {}, - currentCurrency: 'USD', - currencyRates: {}, - featureFlags: { - sendHexData: false, - }, - addressBook: { - [CHAIN_IDS.GOERLI]: [], - }, - accountsByChainId: { - [CHAIN_IDS.GOERLI]: {}, - }, - accounts: { - [mockTxParamsFromAddress]: { - balance: '0x0', - address: mockTxParamsFromAddress, - }, - }, - internalAccounts: { - accounts: { - 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': { - address: mockTxParamsFromAddress, - id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - metadata: { - name: 'Account 1', - keyring: { - type: 'HD Key Tree', - }, - }, - options: {}, - methods: ETH_EOA_METHODS, - type: EthAccountType.Eoa, - }, - }, - selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - }, - pendingApprovals: { - '741bad30-45b6-11ef-b6ec-870d18dd6c01': { - id: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - origin: 'http://127.0.0.1:8080', - type: 'transaction', - time: 1721383540624, - requestData: { - txId: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - }, - requestState: null, - expectsResult: true, - }, - }, - tokenAddress: '0x32e6c34cd57087abbd59b5a4aecc4cb495924356', - tokenList: {}, - ensResolutionsByAddress: {}, - snaps: {}, - useNonceField: true, - }, - confirmTransaction: { - txData: { - id: 1, - txParams: { ...mockTxParams }, - time: 1675012496170, - status: TransactionStatus.unapproved, - originalGasEstimate: '0x5208', - userEditedGasLimit: false, - chainId: '0x5', - loadingDefaults: false, - dappSuggestedGasFees: null, - sendFlowHistory: [], - origin: 'metamask', - actionId: 1675012496153.2039, - type: 'simpleSend', - history: [], - userFeeLevel: 'medium', - gasLimitNoBuffer: '0x5208', - defaultGasEstimates: { - estimateType: 'medium', - gas: '0x5208', - maxFeePerGas: '0x59682f16', - maxPriorityFeePerGas: '0x59682f00', - }, - }, - tokenData: {}, - tokenProps: {}, - fiatTransactionAmount: '0.16', - fiatTransactionFee: '0', - fiatTransactionTotal: '0.16', - ethTransactionAmount: '0.0001', - ethTransactionFee: '0', - ethTransactionTotal: '0.0001', - hexTransactionAmount: '0x5af3107a4000', - hexTransactionFee: '0x0', - hexTransactionTotal: '0x5af3107a4000', - nonce: '', - }, - appState: { - sendInputCurrencySwitched: false, - customNonceValue: '70', - }, - ramps: { - buyableChains: defaultBuyableChains, - }, -}; - -const mockedStoreWithConfirmTxParams = ( - store, - _mockTxParams = mockTxParams, -) => { - const [firstTx, ...restTxs] = store.metamask.transactions; - - return { - ...store, - metamask: { - ...store.metamask, - transactions: [ - { - ...firstTx, - txParams: { - ..._mockTxParams, - }, - }, - ...restTxs, - ], - }, - confirmTransaction: { - ...store.confirmTransaction, - txData: { - ...store.confirmTransaction.txData, - txParams: { - ..._mockTxParams, - }, - }, - }, - }; -}; - -const sendToRecipientSelector = - '.sender-to-recipient__party--recipient .sender-to-recipient__name'; - -const render = async ({ props, state, renderer } = {}) => { - const store = configureMockStore(middleware)({ - ...baseStore, - ...state, - }); - - const componentProps = { - actionKey: 'confirm', - ...props, - }; - - let result; - - await act( - async () => - (result = renderWithProvider( - , - store, - undefined, - renderer, - )), - ); - - return result; -}; - -describe('Confirm Transaction Base', () => { - it('should match snapshot', async () => { - const state = { - ...baseStore, - metamask: { - ...baseStore.metamask, - ...mockNetworkState({ chainId: CHAIN_IDS.GOERLI, ticker: undefined }), - }, - }; - - const { container } = await render({ state }); - expect(container).toMatchSnapshot(); - }); - - it('should not contain L1 L2 fee details for chains that are not optimism', async () => { - const { queryByText } = await render(); - - expect(queryByText('Layer 1 fees')).not.toBeInTheDocument(); - expect(queryByText('Layer 2 gas fee')).not.toBeInTheDocument(); - }); - - it('should render only total fee details if simulation fails', async () => { - const state = { - send: { - ...baseStore.send, - hasSimulationError: true, - }, - metamask: { - ...baseStore.metamask, - transactions: [ - { - ...baseStore.metamask.transactions[0], - simulationData: { error: {} }, - }, - ], - }, - }; - - const { queryByText } = await render({ state }); - - expect(queryByText('Total')).toBeInTheDocument(); - expect(queryByText('Amount + gas fee')).toBeInTheDocument(); - - expect(queryByText('Estimated fee')).not.toBeInTheDocument(); - }); - - it('renders blockaid security alert if recipient is a malicious address', async () => { - const state = { - send: { - ...baseStore.send, - hasSimulationError: false, - }, - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - txParams: { - ...baseStore.confirmTransaction.txData.txParams, - to: mockMaliciousToAddress, - }, - securityAlertResponse: { - reason: BlockaidReason.maliciousDomain, - result_type: BlockaidResultType.Malicious, - features: [], - }, - }, - }, - }; - - const { getByTestId } = await render({ state }); - - const securityProviderBanner = getByTestId( - 'security-provider-banner-alert', - ); - expect(securityProviderBanner).toBeInTheDocument(); - }); - - it('should estimated fee details for optimism', async () => { - const state = { - metamask: { - ...baseStore.metamask, - ...mockNetworkState({ chainId: CHAIN_IDS.OPTIMISM }), - }, - - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - chainId: CHAIN_IDS.OPTIMISM, - layer1GasFee: '0x1', - }, - }, - }; - - const { queryByText } = await render({ state }); - - expect(queryByText('Estimated fee')).not.toBeInTheDocument(); - }); - - it('should render NoteToTrader when isNoteToTraderSupported is true', async () => { - const state = { - metamask: { - ...baseStore.metamask, - custodyAccountDetails: { - [mockTxParamsFromAddress]: { - address: mockTxParamsFromAddress, - details: 'details', - custodyType: 'testCustody - Saturn', - custodianName: 'saturn-dev', - }, - }, - mmiConfiguration: { - custodians: [ - { - envName: 'saturn-dev', - displayName: 'Saturn Custody', - isNoteToTraderSupported: true, - }, - ], - }, - }, - }; - - const { getByTestId } = await render({ state }); - - expect(getByTestId('note-tab')).toBeInTheDocument(); - }); - - it('handleMMISubmit calls sendTransaction correctly when isNoteToTraderSupported is false', async () => { - const state = { - appState: { - ...baseStore.appState, - gasLoadingAnimationIsShowing: false, - }, - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - custodyStatus: true, - }, - }, - metamask: { - ...baseStore.metamask, - accounts: { - [mockTxParamsFromAddress]: { - balance: '0x1000000000000000000', - address: mockTxParamsFromAddress, - }, - }, - gasEstimateType: GasEstimateTypes.feeMarket, - ...mockNetworkState({ - chainId: CHAIN_IDS.GOERLI, - metadata: { EIPS: { 1559: true } }, - }), - customGas: { - gasLimit: '0x5208', - gasPrice: '0x59682f00', - }, - noGasPrice: false, - keyrings: [ - { - type: 'Custody', - accounts: ['0x123456789'], - }, - ], - custodyAccountDetails: { - [mockTxParamsFromAddress]: { - address: mockTxParamsFromAddress, - details: 'details', - custodyType: 'testCustody - Saturn', - custodianName: 'saturn-dev', - }, - }, - mmiConfiguration: { - custodians: [ - { - envName: 'saturn-dev', - displayName: 'Saturn Custody', - isNoteToTraderSupported: false, - }, - ], - }, - }, - send: { - ...baseStore.send, - gas: { - ...baseStore.send.gas, - gasEstimateType: GasEstimateTypes.legacy, - gasFeeEstimates: { - low: '0', - medium: '1', - high: '2', - }, - }, - hasSimulationError: false, - userAcknowledgedGasMissing: false, - submitting: false, - hardwareWalletRequiresConnection: false, - gasIsLoading: false, - gasFeeIsCustom: true, - }, - }; - - const sendTransaction = jest - .fn() - .mockResolvedValue(state.confirmTransaction.txData); - const updateTransactionValue = jest.fn().mockResolvedValue(); - const showCustodianDeepLink = jest.fn(); - const setWaitForConfirmDeepLinkDialog = jest.fn(); - - const props = { - sendTransaction, - updateTransactionValue, - showCustodianDeepLink, - setWaitForConfirmDeepLinkDialog, - toAddress: mockPropsToAddress, - toAccounts: [{ address: mockPropsToAddress }], - isMainBetaFlask: false, - }; - - const { getByTestId } = await render({ props, state }); - - const confirmButton = getByTestId('page-container-footer-next'); - - await act(async () => { - fireEvent.click(confirmButton); - }); - - expect(sendTransaction).toHaveBeenCalled(); - }); - - it('handleMMISubmit calls sendTransaction correctly and then showCustodianDeepLink', async () => { - const state = { - ...baseStore, - appState: { - ...baseStore.appState, - gasLoadingAnimationIsShowing: false, - }, - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - custodyStatus: true, - }, - }, - metamask: { - ...baseStore.metamask, - accounts: { - [mockTxParamsFromAddress]: { - balance: '0x1000000000000000000', - address: mockTxParamsFromAddress, - }, - }, - gasEstimateType: GasEstimateTypes.feeMarket, - ...mockNetworkState({ - chainId: CHAIN_IDS.GOERLI, - metadata: { EIPS: { 1559: true } }, - }), - customGas: { - gasLimit: '0x5208', - gasPrice: '0x59682f00', - }, - noGasPrice: false, - keyrings: [ - { - type: 'Custody', - accounts: [mockTxParamsFromAddress], - }, - ], - custodyAccountDetails: { - [mockTxParamsFromAddress]: { - address: mockTxParamsFromAddress, - details: 'details', - custodyType: 'testCustody - Saturn', - custodianName: 'saturn-dev', - }, - }, - mmiConfiguration: { - custodians: [ - { - envName: 'saturn-dev', - displayName: 'Saturn Custody', - isNoteToTraderSupported: false, - }, - ], - }, - internalAccounts: { - accounts: { - 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': { - address: mockTxParamsFromAddress, - id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - metadata: { - name: 'Custody Account A', - keyring: { - type: 'Custody', - }, - }, - options: {}, - methods: ETH_EOA_METHODS, - type: EthAccountType.Eoa, - }, - }, - selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - }, - pendingApprovals: { - '741bad30-45b6-11ef-b6ec-870d18dd6c01': { - id: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - origin: 'http://127.0.0.1:8080', - type: 'transaction', - time: 1721383540624, - requestData: { - txId: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - }, - requestState: null, - expectsResult: true, - }, - }, - }, - send: { - ...baseStore.send, - gas: { - ...baseStore.send.gas, - gasEstimateType: GasEstimateTypes.legacy, - gasFeeEstimates: { - low: '0', - medium: '1', - high: '2', - }, - }, - hasSimulationError: false, - userAcknowledgedGasMissing: false, - submitting: false, - hardwareWalletRequiresConnection: false, - gasIsLoading: false, - gasFeeIsCustom: true, - }, - }; - - const sendTransaction = jest - .fn() - .mockResolvedValue(state.confirmTransaction.txData); - const showCustodianDeepLink = jest.fn(); - const setWaitForConfirmDeepLinkDialog = jest.fn(); - - const props = { - sendTransaction, - showCustodianDeepLink, - setWaitForConfirmDeepLinkDialog, - toAddress: mockPropsToAddress, - toAccounts: [{ address: mockPropsToAddress }], - isMainBetaFlask: false, - }; - - const { getByTestId } = await render({ props, state }); - - const confirmButton = getByTestId('page-container-footer-next'); - await act(async () => { - fireEvent.click(confirmButton); - }); - expect(setWaitForConfirmDeepLinkDialog).toHaveBeenCalled(); - await expect(sendTransaction).toHaveBeenCalled(); - expect(showCustodianDeepLink).toHaveBeenCalled(); - }); - - it('should append #smartTransaction to txData.origin when smartTransactionsOptInStatus and currentChainSupportsSmartTransactions are true', async () => { - const state = { - appState: { - ...baseStore.appState, - gasLoadingAnimationIsShowing: false, - }, - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - custodyStatus: true, - origin: 'metamask#smartTransaction', - }, - }, - metamask: { - ...baseStore.metamask, - accounts: { - [mockTxParamsFromAddress]: { - balance: '0x1000000000000000000', - address: mockTxParamsFromAddress, - }, - }, - gasEstimateType: GasEstimateTypes.feeMarket, - ...mockNetworkState({ - chainId: CHAIN_IDS.GOERLI, - metadata: { EIPS: { 1559: true } }, - }), - customGas: { - gasLimit: '0x5208', - gasPrice: '0x59682f00', - }, - noGasPrice: false, - keyrings: [ - { - type: 'Custody', - accounts: [mockTxParamsFromAddress], - }, - ], - custodyAccountDetails: { - [mockTxParamsFromAddress]: { - address: mockTxParamsFromAddress, - details: 'details', - custodyType: 'testCustody - Saturn', - custodianName: 'saturn-dev', - }, - }, - mmiConfiguration: { - custodians: [ - { - envName: 'saturn-dev', - displayName: 'Saturn Custody', - isNoteToTraderSupported: false, - }, - ], - }, - internalAccounts: { - accounts: { - 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': { - address: mockTxParamsFromAddress, - id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - metadata: { - name: 'Custody Account A', - keyring: { - type: 'Custody', - }, - }, - options: {}, - methods: ETH_EOA_METHODS, - type: EthAccountType.Eoa, - }, - }, - selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - }, - pendingApprovals: { - '741bad30-45b6-11ef-b6ec-870d18dd6c01': { - id: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - origin: 'http://127.0.0.1:8080', - type: 'transaction', - time: 1721383540624, - requestData: { - txId: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - }, - requestState: null, - expectsResult: true, - }, - }, - }, - send: { - ...baseStore.send, - gas: { - ...baseStore.send.gas, - gasEstimateType: GasEstimateTypes.legacy, - gasFeeEstimates: { - low: '0', - medium: '1', - high: '2', - }, - }, - hasSimulationError: false, - userAcknowledgedGasMissing: false, - submitting: false, - hardwareWalletRequiresConnection: false, - gasIsLoading: false, - gasFeeIsCustom: true, - }, - }; - - const sendTransaction = jest - .fn() - .mockResolvedValue(state.confirmTransaction.txData); - const showCustodianDeepLink = jest.fn(); - const setWaitForConfirmDeepLinkDialog = jest.fn(); - - const props = { - sendTransaction, - showCustodianDeepLink, - setWaitForConfirmDeepLinkDialog, - toAddress: mockPropsToAddress, - toAccounts: [{ address: mockPropsToAddress }], - isMainBetaFlask: false, - }; - - const { getByTestId } = await render({ props, state }); - - const confirmButton = getByTestId('page-container-footer-next'); - await act(async () => { - fireEvent.click(confirmButton); - }); - - expect(sendTransaction).toHaveBeenCalledWith( - expect.objectContaining({ - origin: 'metamask#smartTransaction', - }), - ); - }); - - describe('when rendering the recipient value', () => { - describe(`when the transaction is a ${TransactionType.simpleSend} type`, () => { - it(`should use txParams.to address`, async () => { - const { container } = await render(); - - const recipientElem = container.querySelector(sendToRecipientSelector); - expect(recipientElem).toHaveTextContent(mockTxParamsToAddressConcat); - }); - - it(`should use txParams.to address even if there is no amount sent`, async () => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - value: '0x0', - }); - const { container } = await render({ state }); - - const recipientElem = container.querySelector(sendToRecipientSelector); - expect(recipientElem).toHaveTextContent(mockTxParamsToAddressConcat); - }); - }); - describe(`when the transaction is NOT a ${TransactionType.simpleSend} type`, () => { - beforeEach(() => { - baseStore.confirmTransaction.txData.type = - TransactionType.contractInteraction; - }); - - describe('when there is an amount being sent (it should be treated as a general contract interaction rather than custom one)', () => { - it('should use txParams.to address (contract address)', async () => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - value: '0x45666', - }); - state.confirmTransaction.txData = { - ...state.confirmTransaction.txData, - type: TransactionType.contractInteraction, - }; - - const { container } = await render({ state }); - - const recipientElem = container.querySelector( - sendToRecipientSelector, - ); - expect(recipientElem).toHaveTextContent(mockTxParamsToAddressConcat); - }); - }); - - describe('when determines the recipient from transaction data args', () => { - const testCases = [ - { - type: TransactionType.tokenMethodTransfer, - data: `0xa9059cbb000000000000000000000000${mockParsedTxDataToAddressWithout0x}0000000000000000000000000000000000000000000000000000000000000001`, - description: 'tokenMethodTransfer', - }, - { - type: TransactionType.tokenMethodSafeTransferFrom, - data: `0x42842e0e000000000000000000000000806627172af48bd5b0765d3449a7def80d6576ff000000000000000000000000${mockParsedTxDataToAddressWithout0x}000000000000000000000000000000000000000000000000000000000009a7cc`, - description: 'tokenMethodSafeTransferFrom', - }, - { - type: TransactionType.tokenMethodTransferFrom, - data: `0x23b872dd000000000000000000000000ac9539a7d5c43940af498008a7c8f3abb35c3725000000000000000000000000${mockParsedTxDataToAddressWithout0x}000000000000000000000000000000000000000000000000000000000009a7b8`, - description: 'tokenMethodTransferFrom', - }, - ]; - - it.each(testCases)( - 'identifies correctly the recipient for $description transactions', - async ({ type, data }) => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - data, - }); - state.confirmTransaction.txData = { - ...state.confirmTransaction.txData, - type, - }; - - const { container } = await render({ state }); - - const recipientElem = container.querySelector( - sendToRecipientSelector, - ); - expect(recipientElem).toHaveTextContent(mockParsedTxDataToAddress); - }, - ); - }); - - describe('when a non-transfer function matching the ABIs', () => { - it('does not determine the recipient from transaction data args', async () => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - data: `0xa22cb465000000000000000000000000${mockParsedTxDataToAddressWithout0x}0000000000000000000000000000000000000000000000000000000000000001`, - }); - state.confirmTransaction.txData = { - ...state.confirmTransaction.txData, - type: TransactionType.contractInteraction, - }; - - const { container } = await render({ state }); - - const recipientElem = container.querySelector( - sendToRecipientSelector, - ); - expect(recipientElem).toHaveTextContent(mockTxParamsToAddressConcat); - }); - }); - - describe(`when there is no amount being sent`, () => { - it('should use propToAddress (toAddress passed as prop)', async () => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - value: '0x0', - }); - state.confirmTransaction.txData = { - ...state.confirmTransaction.txData, - type: TransactionType.contractInteraction, - }; - - const props = { - // we want to test toAddress provided by ownProps in mapStateToProps, but this - // currently overrides toAddress this should pan out fine when we refactor the - // component into a functional component and remove the container.js file - toAddress: mockPropsToAddress, - }; - - const { container } = await render({ props, state }); - - const recipientElem = container.querySelector( - sendToRecipientSelector, - ); - expect(recipientElem).toHaveTextContent(mockPropsToAddressConcat); - }); - - it('should use txParams.to if neither propToAddress is not provided nor the transaction data to address were provided', async () => { - const state = mockedStoreWithConfirmTxParams(baseStore, { - ...mockTxParams, - data: '0x', - value: '0x0', - }); - state.confirmTransaction.txData = { - ...state.confirmTransaction.txData, - type: TransactionType.contractInteraction, - }; - - const props = {}; - - const { container } = await render({ props, state }); - - const recipientElem = container.querySelector( - sendToRecipientSelector, - ); - expect(recipientElem).toHaveTextContent(mockTxParamsToAddressConcat); - }); - }); - }); - }); - describe('user op contract deploy attempt', () => { - it('should show error and disable Confirm button', async () => { - const txParams = { - ...mockTxParams, - to: undefined, - data: '0xa22cb46500000000000000', - }; - const state = { - ...baseStore, - metamask: { - ...baseStore.metamask, - transactions: [ - { - id: baseStore.confirmTransaction.txData.id, - chainId: '0x5', - status: 'unapproved', - txParams, - }, - ], - }, - confirmTransaction: { - ...baseStore.confirmTransaction, - txData: { - ...baseStore.confirmTransaction.txData, - type: TransactionType.deployContract, - value: '0x0', - isUserOperation: true, - txParams, - }, - }, - }; - - const { getByTestId } = await render({ state }); - - const banner = getByTestId( - 'confirm-page-container-content-error-banner-2', - ); - expect(banner).toHaveTextContent( - /Contract deployment from a smart contract account is not supported/u, - ); - - const confirmButton = getByTestId('page-container-footer-next'); - expect(confirmButton).toBeDisabled(); - }); - }); - - describe('if useMaxValue is settled', () => { - const baseStoreState = { - ...baseStore, - metamask: { - ...baseStore.metamask, - ...mockNetworkState({ chainId: CHAIN_IDS.GOERLI, ticker: undefined }), - }, - }; - - const updateTransactionValue = jest.fn(); - - const maxValueSettledProps = { - useMaxValue: true, - hexMaximumTransactionFee: '0x111', - updateTransactionValue, - }; - - beforeEach(() => { - updateTransactionValue.mockClear(); - }); - - it('should update transaction value when new hexMaximumTransactionFee is provided', async () => { - const { rerender } = await render({ - state: baseStoreState, - props: maxValueSettledProps, - }); - - const newHexMaximumTransactionFee = '0x222'; - - render({ - renderer: rerender, - state: baseStoreState, - props: { - ...maxValueSettledProps, - hexMaximumTransactionFee: newHexMaximumTransactionFee, - }, - }); - - expect(updateTransactionValue).toHaveBeenCalledTimes(1); - }); - - it('should not update transaction value if transactionStatus is not unapproved', async () => { - const { rerender } = await render({ - state: baseStoreState, - props: maxValueSettledProps, - }); - - const newHexMaximumTransactionFee = '0x222'; - - render({ - renderer: rerender, - state: { ...baseStoreState }, - props: { - ...maxValueSettledProps, - hexMaximumTransactionFee: newHexMaximumTransactionFee, - transactionStatus: TransactionStatus.submitted, - }, - }); - - expect(updateTransactionValue).toHaveBeenCalledTimes(0); - }); - }); - - describe('Smart Transactions Refresh Interval', () => { - const cleanFeatureFlagApiCache = () => { - setStorageItem( - 'cachedFetch:https://swap.api.cx.metamask.io/featureFlags', - null, - ); - }; - - beforeEach(() => { - cleanFeatureFlagApiCache(); - nock.cleanAll(); - }); - - it('calls setSmartTransactionsRefreshInterval when smart transactions are enabled', async () => { - nock('https://swap.api.cx.metamask.io') - .get('/featureFlags') - .reply(200, { - smartTransactions: { - batchStatusPollingInterval: 1000, - }, - }); - - const state = { - ...baseStore, - metamask: { - ...baseStore.metamask, - smartTransactionsState: { - fees: {}, - liveness: true, - }, - }, - }; - - const setSmartTransactionsRefreshInterval = jest.fn(); - const props = { - setSmartTransactionsRefreshInterval, - smartTransactionsPreferenceEnabled: true, - currentChainSupportsSmartTransactions: true, - }; - - await render({ props, state }); - - await waitFor(() => { - expect(setSmartTransactionsRefreshInterval).toHaveBeenCalledWith(1000); - }); - }); - - it('does not call setSmartTransactionsRefreshInterval when smart transactions are disabled', async () => { - const state = { - ...baseStore, - metamask: { - ...baseStore.metamask, - smartTransactionsState: { - fees: {}, - liveness: false, - }, - }, - }; - - const setSmartTransactionsRefreshInterval = jest.fn(); - const props = { - setSmartTransactionsRefreshInterval, - smartTransactionsPreferenceEnabled: false, - currentChainSupportsSmartTransactions: false, - }; - - await render({ props, state }); - - expect(setSmartTransactionsRefreshInterval).not.toHaveBeenCalled(); - }); - }); -}); diff --git a/ui/pages/confirmations/confirm-transaction-base/index.js b/ui/pages/confirmations/confirm-transaction-base/index.js deleted file mode 100644 index 0ea19b073cdd..000000000000 --- a/ui/pages/confirmations/confirm-transaction-base/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-transaction-base.container'; diff --git a/ui/pages/confirmations/confirm-transaction-switch/confirm-transaction-switch.component.js b/ui/pages/confirmations/confirm-transaction-switch/confirm-transaction-switch.component.js index 0762dfd02eaf..e7670b1f7184 100644 --- a/ui/pages/confirmations/confirm-transaction-switch/confirm-transaction-switch.component.js +++ b/ui/pages/confirmations/confirm-transaction-switch/confirm-transaction-switch.component.js @@ -1,22 +1,12 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Redirect } from 'react-router-dom'; -import { TransactionType } from '@metamask/transaction-controller'; import Loading from '../../../components/ui/loading-screen'; import { CONFIRM_TRANSACTION_ROUTE, - CONFIRM_DEPLOY_CONTRACT_PATH, - CONFIRM_SEND_ETHER_PATH, - CONFIRM_SEND_TOKEN_PATH, - CONFIRM_APPROVE_PATH, - CONFIRM_TRANSFER_FROM_PATH, - CONFIRM_TOKEN_METHOD_PATH, SIGNATURE_REQUEST_PATH, DECRYPT_MESSAGE_REQUEST_PATH, ENCRYPTION_PUBLIC_KEY_REQUEST_PATH, - CONFIRM_SAFE_TRANSFER_FROM_PATH, - CONFIRM_SET_APPROVAL_FOR_ALL_PATH, - CONFIRM_INCREASE_ALLOWANCE_PATH, } from '../../../helpers/constants/routes'; import { MESSAGE_TYPE } from '../../../../shared/constants/app'; @@ -25,62 +15,9 @@ export default class ConfirmTransactionSwitch extends Component { txData: PropTypes.object, }; - redirectToTransaction() { - const { txData } = this.props; - const { id, txParams: { data } = {}, type } = txData; - - if (type === TransactionType.deployContract) { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_DEPLOY_CONTRACT_PATH}`; - return ; - } - - if (type === TransactionType.simpleSend) { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SEND_ETHER_PATH}`; - return ; - } - - if (data) { - switch (type) { - case TransactionType.tokenMethodTransfer: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SEND_TOKEN_PATH}`; - return ; - } - case TransactionType.tokenMethodApprove: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_APPROVE_PATH}`; - return ; - } - case TransactionType.tokenMethodSetApprovalForAll: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SET_APPROVAL_FOR_ALL_PATH}`; - return ; - } - case TransactionType.tokenMethodTransferFrom: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_TRANSFER_FROM_PATH}`; - return ; - } - case TransactionType.tokenMethodSafeTransferFrom: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SAFE_TRANSFER_FROM_PATH}`; - return ; - } - case TransactionType.tokenMethodIncreaseAllowance: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_INCREASE_ALLOWANCE_PATH}`; - return ; - } - default: { - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_TOKEN_METHOD_PATH}`; - return ; - } - } - } - - const pathname = `${CONFIRM_TRANSACTION_ROUTE}/${id}${CONFIRM_SEND_ETHER_PATH}`; - return ; - } - render() { const { txData } = this.props; - if (txData.txParams) { - return this.redirectToTransaction(); - } else if (txData.msgParams) { + if (txData.msgParams) { let pathname = `${CONFIRM_TRANSACTION_ROUTE}/${txData.id}${SIGNATURE_REQUEST_PATH}`; if (txData.type === MESSAGE_TYPE.ETH_DECRYPT) { pathname = `${CONFIRM_TRANSACTION_ROUTE}/${txData.id}${DECRYPT_MESSAGE_REQUEST_PATH}`; diff --git a/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js b/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js index 72f570c5b98b..db58200d8f97 100644 --- a/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js +++ b/ui/pages/confirmations/confirm-transaction/confirm-token-transaction-switch.js @@ -1,234 +1,11 @@ import React from 'react'; -import PropTypes from 'prop-types'; -import { useDispatch, useSelector } from 'react-redux'; -import { Switch, Route, useHistory } from 'react-router-dom'; - -import { sumHexes } from '../../../../shared/modules/conversion.utils'; -import { - CONFIRM_APPROVE_PATH, - CONFIRM_INCREASE_ALLOWANCE_PATH, - CONFIRM_SAFE_TRANSFER_FROM_PATH, - CONFIRM_SEND_TOKEN_PATH, - CONFIRM_SET_APPROVAL_FOR_ALL_PATH, - CONFIRM_TRANSACTION_ROUTE, - CONFIRM_TRANSFER_FROM_PATH, - SEND_ROUTE, -} from '../../../helpers/constants/routes'; -import { transactionFeeSelector } from '../../../selectors'; -import ConfirmApprove from '../confirm-approve'; -import ConfirmSendToken from '../confirm-send-token'; -import ConfirmTokenTransactionBase from '../confirm-token-transaction-base'; +import { Switch, Route } from 'react-router-dom'; import ConfirmTransactionSwitch from '../confirm-transaction-switch'; -import { editExistingTransaction } from '../../../ducks/send'; -import { AssetType } from '../../../../shared/constants/transaction'; -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; - -import { useAssetDetails } from '../hooks/useAssetDetails'; - -export default function ConfirmTokenTransactionSwitch({ transaction }) { - const { - chainId, - txParams: { data, to: tokenAddress, from: userAddress } = {}, - layer1GasFee, - } = transaction; - - const dispatch = useDispatch(); - const history = useHistory(); - - const { - assetStandard, - assetName, - userBalance, - tokenSymbol, - decimals, - tokenImage, - tokenAmount, - tokenId, - toAddress, - } = useAssetDetails(tokenAddress, userAddress, data, chainId); - - const { - ethTransactionTotal, - fiatTransactionTotal, - hexTransactionTotal, - hexMaximumTransactionFee, - hexMinimumTransactionFee, - } = useSelector((state) => transactionFeeSelector(state, transaction)); +export default function ConfirmTokenTransactionSwitch() { return ( - ( - - )} - /> - ( - - )} - /> - ( - { - const { id } = txData; - await dispatch( - editExistingTransaction(AssetType.NFT, id.toString()), - ); - dispatch(clearConfirmTransaction()); - history.push(SEND_ROUTE); - }} - toAddress={toAddress} - tokenAmount={tokenAmount} - tokenId={tokenId} - userAddress={userAddress} - transaction={transaction} - ethTransactionTotal={ethTransactionTotal} - fiatTransactionTotal={fiatTransactionTotal} - hexMaximumTransactionFee={hexMaximumTransactionFee} - /> - )} - /> - ( - { - const { id } = txData; - await dispatch( - editExistingTransaction(AssetType.NFT, id.toString()), - ); - dispatch(clearConfirmTransaction()); - history.push(SEND_ROUTE); - }} - toAddress={toAddress} - tokenAmount={tokenAmount} - tokenId={tokenId} - userAddress={userAddress} - transaction={transaction} - ethTransactionTotal={ethTransactionTotal} - fiatTransactionTotal={fiatTransactionTotal} - hexMaximumTransactionFee={hexMaximumTransactionFee} - /> - )} - /> - ( - - )} - /> - ( - - )} - /> ); } - -ConfirmTokenTransactionSwitch.propTypes = { - transaction: PropTypes.shape({ - chainId: PropTypes.string, - origin: PropTypes.string, - txParams: PropTypes.shape({ - data: PropTypes.string, - to: PropTypes.string, - from: PropTypes.string, - }), - layer1GasFee: PropTypes.number, - }), -}; diff --git a/ui/pages/confirmations/confirm-transaction/confirm-transaction.component.js b/ui/pages/confirmations/confirm-transaction/confirm-transaction.component.js index f5858e853dd1..ce218da20f55 100644 --- a/ui/pages/confirmations/confirm-transaction/confirm-transaction.component.js +++ b/ui/pages/confirmations/confirm-transaction/confirm-transaction.component.js @@ -15,9 +15,6 @@ import { getMostRecentOverviewPage } from '../../../ducks/history/history'; import { getSendTo } from '../../../ducks/send'; import { getSelectedNetworkClientId } from '../../../../shared/modules/selectors/networks'; import { - CONFIRM_DEPLOY_CONTRACT_PATH, - CONFIRM_SEND_ETHER_PATH, - CONFIRM_TOKEN_METHOD_PATH, CONFIRM_TRANSACTION_ROUTE, DECRYPT_MESSAGE_REQUEST_PATH, DEFAULT_ROUTE, @@ -41,9 +38,6 @@ import { } from '../../../store/actions'; import ConfirmDecryptMessage from '../../confirm-decrypt-message'; import ConfirmEncryptionPublicKey from '../../confirm-encryption-public-key'; -import ConfirmContractInteraction from '../confirm-contract-interaction'; -import ConfirmDeployContract from '../confirm-deploy-contract'; -import ConfirmSendEther from '../confirm-send-ether'; import ConfirmSignatureRequest from '../confirm-signature-request'; import ConfirmTransactionSwitch from '../confirm-transaction-switch'; import Confirm from '../confirm/confirm'; @@ -203,21 +197,6 @@ const ConfirmTransaction = () => { // support URLs of /confirm-transaction or /confirm-transaction/ return isValidTransactionId ? ( - - - { }; }); -jest.mock('../confirm-contract-interaction', () => { - return { - __esModule: true, - default: () => { - return
; - }, - }; -}); jest.mock('../../confirm-decrypt-message', () => { return { __esModule: true, @@ -83,14 +72,7 @@ jest.mock('../../confirm-decrypt-message', () => { }, }; }); -jest.mock('../confirm-deploy-contract', () => { - return { - __esModule: true, - default: () => { - return
; - }, - }; -}); + jest.mock('../../confirm-encryption-public-key', () => { return { __esModule: true, @@ -99,14 +81,7 @@ jest.mock('../../confirm-encryption-public-key', () => { }, }; }); -jest.mock('../confirm-send-ether', () => { - return { - __esModule: true, - default: () => { - return
; - }, - }; -}); + jest.mock('../confirm-signature-request', () => { return { __esModule: true, @@ -159,9 +134,6 @@ describe('Confirmation Transaction Page', () => { }); [ - [CONFIRM_DEPLOY_CONTRACT_PATH, '.mock-confirm-deploy-contract'], - [CONFIRM_SEND_ETHER_PATH, '.mock-confirm-send-ether'], - [CONFIRM_TOKEN_METHOD_PATH, '.mock-confirm-contract-interaction'], [DECRYPT_MESSAGE_REQUEST_PATH, '.mock-confirm-decrypt-message'], [ENCRYPTION_PUBLIC_KEY_REQUEST_PATH, '.mock-confirm-encryption-public-key'], [SIGNATURE_REQUEST_PATH, '.mock-confirm-signature-request'], @@ -178,31 +150,6 @@ describe('Confirmation Transaction Page', () => { }); }); - it(`should render ConfirmTokenTransactionSwitch component if it's a valid ERC20 token method`, () => { - const mockStore = configureMockStore(middleware)({ - ...mockState, - metamask: { - ...mockState.metamask, - transactions: [ - { - ...mockUnapprovedTx, - type: 'transfer', - }, - ], - }, - }); - const { container } = renderWithProvider( - , - mockStore, - // use valid matched route path to check against ConfirmTokenTransactionSwitch - `${CONFIRM_TRANSACTION_ROUTE}/${mockUnapprovedTx.id}${CONFIRM_DEPLOY_CONTRACT_PATH}`, - ); - - expect( - container.querySelector('.mock-confirm-token-transaction-switch'), - ).toBeInTheDocument(); - }); - it(`should render ConfirmTransactionSwitch component if the route path is unmatched and the transaction is valid`, () => { const mockStore = configureMockStore(middleware)(mockState); const { container } = renderWithProvider( diff --git a/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js b/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js deleted file mode 100644 index a7db429a90e8..000000000000 --- a/ui/pages/confirmations/confirm-transaction/confirm-transaction.transaction.test.js +++ /dev/null @@ -1,62 +0,0 @@ -import React from 'react'; -import configureMockStore from 'redux-mock-store'; -import thunk from 'redux-thunk'; -import { act } from '@testing-library/react'; -import * as Actions from '../../../store/actions'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; -import { setBackgroundConnection } from '../../../store/background-connection'; -import mockState from '../../../../test/data/mock-state.json'; -import { - CONFIRM_SEND_ETHER_PATH, - CONFIRM_TRANSACTION_ROUTE, -} from '../../../helpers/constants/routes'; - -import ConfirmTransaction from './confirm-transaction.component'; - -jest.mock('../components/simulation-details/useSimulationMetrics'); - -const middleware = [thunk]; - -setBackgroundConnection({ - getGasFeeTimeEstimate: jest.fn(), - gasFeeStartPolling: jest.fn(), - gasFeeStopPollingByPollingToken: jest.fn(), - promisifiedBackground: jest.fn(), - tryReverseResolveAddress: jest.fn(), - getNextNonce: jest.fn(), - addKnownMethodData: jest.fn(), - addPollingTokenToAppState: jest.fn(), - removePollingTokenFromAppState: jest.fn(), - getLastInteractedConfirmationInfo: jest.fn(), -}); - -describe('Confirm Transaction', () => { - const unapprovedTransactionId = Object.keys( - mockState.metamask.transactions, - )[0]; - it('should render correct information for approve transaction with value', async () => { - jest - .spyOn(Actions, 'gasFeeStartPollingByNetworkClientId') - .mockResolvedValue(null); - const store = configureMockStore(middleware)({ - ...mockState, - confirmTransaction: { - txData: mockState.metamask.transactions[0], - }, - }); - let result; - - await act( - async () => - (result = renderWithProvider( - , - store, - `${CONFIRM_TRANSACTION_ROUTE}/${unapprovedTransactionId}${CONFIRM_SEND_ETHER_PATH}`, - )), - ); - - expect(result.getByText('Ledger Hardware 2')).toBeInTheDocument(); - expect(result.getByRole('button', { name: 'Details' })).toBeInTheDocument(); - expect(result.getByRole('button', { name: 'Hex' })).toBeInTheDocument(); - }); -}); diff --git a/ui/pages/confirmations/index.scss b/ui/pages/confirmations/index.scss index 3efbea025238..a17258f47c5b 100644 --- a/ui/pages/confirmations/index.scss +++ b/ui/pages/confirmations/index.scss @@ -1,8 +1,5 @@ /** Please import your files in alphabetical order **/ -@import 'confirm-approve/index'; @import 'confirm/index'; @import 'confirmation/confirmation'; -@import 'send/gas-display/index'; @import 'send/send'; -@import 'token-allowance/index'; @import './components/index' diff --git a/ui/pages/confirmations/send/gas-display/gas-display.js b/ui/pages/confirmations/send/gas-display/gas-display.js deleted file mode 100644 index 312854d168a7..000000000000 --- a/ui/pages/confirmations/send/gas-display/gas-display.js +++ /dev/null @@ -1,288 +0,0 @@ -import React, { useContext } from 'react'; -import { useSelector, useDispatch } from 'react-redux'; -import PropTypes from 'prop-types'; -import { I18nContext } from '../../../../contexts/i18n'; -import { useGasFeeContext } from '../../../../contexts/gasFee'; -import { PRIMARY, SECONDARY } from '../../../../helpers/constants/common'; -import UserPreferencedCurrencyDisplay from '../../../../components/app/user-preferenced-currency-display'; -import Typography from '../../../../components/ui/typography'; -import Button from '../../../../components/ui/button'; -import Box from '../../../../components/ui/box'; -import { - TypographyVariant, - DISPLAY, - FLEX_DIRECTION, - BLOCK_SIZES, -} from '../../../../helpers/constants/design-system'; -import { TokenStandard } from '../../../../../shared/constants/transaction'; -import LoadingHeartBeat from '../../../../components/ui/loading-heartbeat'; -import TransactionDetailItem from '../../components/transaction-detail-item'; -import { ConfirmGasDisplay } from '../../components/confirm-gas-display'; -import { NETWORK_TO_NAME_MAP } from '../../../../../shared/constants/network'; -import TransactionDetail from '../../components/transaction-detail'; -import ActionableMessage from '../../../../components/ui/actionable-message'; -import { - getPreferences, - transactionFeeSelector, - getIsTestnet, - getUseCurrencyRateCheck, - getUnapprovedTransactions, - selectNetworkConfigurationByChainId, -} from '../../../../selectors'; - -import { INSUFFICIENT_TOKENS_ERROR } from '../send.constants'; -import { getCurrentDraftTransaction } from '../../../../ducks/send'; -import { showModal } from '../../../../store/actions'; -import { - addHexes, - hexWEIToDecETH, -} from '../../../../../shared/modules/conversion.utils'; -import { - MetaMetricsEventCategory, - MetaMetricsEventName, -} from '../../../../../shared/constants/metametrics'; -import { MetaMetricsContext } from '../../../../contexts/metametrics'; -import useRamps from '../../../../hooks/ramps/useRamps/useRamps'; -import { getIsNativeTokenBuyable } from '../../../../ducks/ramps'; - -// This function is no longer used in codebase, to be deleted. -export default function GasDisplay({ gasError }) { - const t = useContext(I18nContext); - const dispatch = useDispatch(); - const { estimateUsed, transaction } = useGasFeeContext(); - const { chainId } = transaction; - const trackEvent = useContext(MetaMetricsContext); - const { openBuyCryptoInPdapp } = useRamps(); - - const { name: networkNickname, nativeCurrency } = useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ); - - const isTestnet = useSelector(getIsTestnet); - const isBuyableChain = useSelector(getIsNativeTokenBuyable); - const draftTransaction = useSelector(getCurrentDraftTransaction); - const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck); - const { showFiatInTestnets } = useSelector(getPreferences); - const unapprovedTxs = useSelector(getUnapprovedTransactions); - const networkName = NETWORK_TO_NAME_MAP[chainId]; - const isInsufficientTokenError = - draftTransaction?.amount?.error === INSUFFICIENT_TOKENS_ERROR; - const editingTransaction = unapprovedTxs[draftTransaction.id]; - const currentNetworkName = networkName || networkNickname; - - const transactionData = { - txParams: { - gasPrice: draftTransaction.gas?.gasPrice, - gas: editingTransaction?.userEditedGasLimit - ? editingTransaction?.txParams?.gas - : draftTransaction.gas?.gasLimit, - maxFeePerGas: editingTransaction?.txParams?.maxFeePerGas - ? editingTransaction?.txParams?.maxFeePerGas - : draftTransaction.gas?.maxFeePerGas, - maxPriorityFeePerGas: editingTransaction?.txParams?.maxPriorityFeePerGas - ? editingTransaction?.txParams?.maxPriorityFeePerGas - : draftTransaction.gas?.maxPriorityFeePerGas, - value: draftTransaction.amount?.value, - type: draftTransaction.transactionType, - }, - userFeeLevel: editingTransaction?.userFeeLevel, - }; - - const { hexMaximumTransactionFee, hexTransactionTotal } = useSelector( - (state) => transactionFeeSelector(state, transactionData), - ); - - let title; - if ( - draftTransaction?.sendAsset.details?.standard === TokenStandard.ERC721 || - draftTransaction?.sendAsset.details?.standard === TokenStandard.ERC1155 - ) { - title = draftTransaction?.sendAsset.details?.name; - } else if ( - draftTransaction?.sendAsset.details?.standard === TokenStandard.ERC20 - ) { - title = `${hexWEIToDecETH(draftTransaction.amount.value)} ${ - draftTransaction?.sendAsset.details?.symbol - }`; - } - - const ethTransactionTotalMaxAmount = Number( - hexWEIToDecETH(hexMaximumTransactionFee), - ); - - const primaryTotalTextOverrideMaxAmount = `${title} + ${ethTransactionTotalMaxAmount} ${nativeCurrency}`; - - const showCurrencyRateCheck = - useCurrencyRateCheck && (!isTestnet || showFiatInTestnets); - - let detailTotal, maxAmount; - - if (draftTransaction?.sendAsset.type === 'NATIVE') { - detailTotal = ( - - - - - ); - maxAmount = ( - - ); - } else { - detailTotal = primaryTotalTextOverrideMaxAmount; - maxAmount = primaryTotalTextOverrideMaxAmount; - } - return ( - <> - - , - (gasError || isInsufficientTokenError) && ( - - - - - ) - } - detailTotal={detailTotal} - subTitle={t('transactionDetailGasTotalSubtitle')} - subText={ - - - - {t('editGasSubTextAmountLabel')} - {' '} - {maxAmount} - - } - /> - ), - ]} - /> - - {(gasError || isInsufficientTokenError) && currentNetworkName && ( - - - - {t('insufficientCurrencyBuyOrReceive', [ - nativeCurrency, - currentNetworkName, - , - , - ])} - - ) : ( - - {t('insufficientCurrencyBuyOrReceive', [ - nativeCurrency, - currentNetworkName, - `${t('buyAsset', [nativeCurrency])}`, - , - ])} - - ) - } - useIcon - iconFillColor="var(--color-error-default)" - type="danger" - /> - - - )} - - ); -} -GasDisplay.propTypes = { - gasError: PropTypes.string, -}; diff --git a/ui/pages/confirmations/send/gas-display/index.js b/ui/pages/confirmations/send/gas-display/index.js deleted file mode 100644 index 2e1e485d8b7f..000000000000 --- a/ui/pages/confirmations/send/gas-display/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './gas-display'; diff --git a/ui/pages/confirmations/send/gas-display/index.scss b/ui/pages/confirmations/send/gas-display/index.scss deleted file mode 100644 index 63f4da3a1856..000000000000 --- a/ui/pages/confirmations/send/gas-display/index.scss +++ /dev/null @@ -1,59 +0,0 @@ -@use "design-system"; - -.gas-display { - overflow-y: auto; - flex: 1; - - .transaction-detail-rows { - padding: 10px; - - .transaction-detail-item { - &:not(:first-child) { - border-top: 1px solid var(--color-border-default); - } - } - } - - &__title { - &__estimate { - font-size: 12px; - line-height: inherit; - } - } - - &__gas-fee-warning { - color: var(--color-warning-default); - } - - &__gas-fee-label { - position: relative; - white-space: nowrap; - } - - &__warning-message { - height: 120px; - } - - &__total-amount, - &__total-value { - position: relative; - } - - &__confirm-approve-content { - &__warning { - @media screen and (max-width: design-system.$break-small) { - padding: 0 32px 16px 16px; - position: fixed; - bottom: 80px; - // We set z-index above ".send-v2__hex-data__input" by 1 index. ".send-v2__hex-data__input" - // was set to `z-index: 1025;` 4 years ago from the time of this comment. This should be a temp fix. - // TODO: Refactor z-indexes - z-index: 1026; - } - } - } - - &__link { - text-transform: lowercase; - } -} diff --git a/ui/pages/confirmations/token-allowance/__snapshots__/token-allowance.test.js.snap b/ui/pages/confirmations/token-allowance/__snapshots__/token-allowance.test.js.snap deleted file mode 100644 index 9d8fe0947ee3..000000000000 --- a/ui/pages/confirmations/token-allowance/__snapshots__/token-allowance.test.js.snap +++ /dev/null @@ -1,479 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TokenAllowancePage when mounted should match snapshot 1`] = ` -
-
-
- -
-
-
-
-
- 1 - - of - 2 -
-
-
- - -
-
-
- https://metamask.github.io -
-
- https://metamask.github.io -
-
-
-
-

- - - Spending cap request for your -
-
-
-
-
- - - - - -
-
-
-

- TST -

-
-
- -
-
-
-
- -
-
-
-
- - -
-

-
- -
-
-
-
- -
-
-
- -
-
-
-
- -
-
- - -
-
- - - This allows the third party to spend - - 1 - - TST - - from your current balance. - - -
- - Learn more - -
-
-
-
-
- - -
-
-`; diff --git a/ui/pages/confirmations/token-allowance/index.js b/ui/pages/confirmations/token-allowance/index.js deleted file mode 100644 index 4f7bc6c57add..000000000000 --- a/ui/pages/confirmations/token-allowance/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './token-allowance'; diff --git a/ui/pages/confirmations/token-allowance/index.scss b/ui/pages/confirmations/token-allowance/index.scss deleted file mode 100644 index 1a02474a1990..000000000000 --- a/ui/pages/confirmations/token-allowance/index.scss +++ /dev/null @@ -1,46 +0,0 @@ -.token-allowance-container { - &__icon-display-content { - width: fit-content; - height: 40px; - box-sizing: border-box; - border-radius: 100px; - position: relative; - - &__siteimage-identicon { - width: 24px; - height: 24px; - box-shadow: none; - background: none; - } - } - - a.token-allowance-container__verify-link { - width: fit-content; - margin-inline-start: auto; - margin-inline-end: auto; - padding: 0; - } - - a.token-allowance-container__view-details { - width: fit-content; - margin-inline-start: 108px; - margin-inline-end: 108px; - } - - &__card-wrapper { - width: 100%; - } - - &__data { - width: 100%; - } - - &__full-tx-content { - max-width: 100%; - } - - &__custom-nonce-warning { - width: 100%; - height: 30px; - } -} diff --git a/ui/pages/confirmations/token-allowance/token-allowance.js b/ui/pages/confirmations/token-allowance/token-allowance.js deleted file mode 100644 index d4e6f9d884d7..000000000000 --- a/ui/pages/confirmations/token-allowance/token-allowance.js +++ /dev/null @@ -1,833 +0,0 @@ -import React, { useState, useContext, useEffect, useCallback } from 'react'; -import { useDispatch, useSelector } from 'react-redux'; -import { useHistory } from 'react-router-dom'; -import PropTypes from 'prop-types'; -import BigNumber from 'bignumber.js'; -///: BEGIN:ONLY_INCLUDE_IF(build-mmi) -import { showCustodianDeepLink } from '@metamask-institutional/extension'; -///: END:ONLY_INCLUDE_IF -import Box from '../../../components/ui/box/box'; -import NetworkAccountBalanceHeader from '../../../components/app/network-account-balance-header/network-account-balance-header'; -import UrlIcon from '../../../components/ui/url-icon/url-icon'; -import { - AlignItems, - BorderStyle, - Color, - DISPLAY, - FLEX_DIRECTION, - FontWeight, - JustifyContent, - TextAlign, - TextColor, - TextVariant, -} from '../../../helpers/constants/design-system'; -import { I18nContext } from '../../../contexts/i18n'; -import ContractTokenValues from '../components/contract-token-values/contract-token-values'; -import Button from '../../../components/ui/button'; -import ReviewSpendingCap from '../components/review-spending-cap/review-spending-cap'; -import { PageContainerFooter } from '../../../components/ui/page-container'; -import ContractDetailsModal from '../components/contract-details-modal/contract-details-modal'; -import { - getCustomTokenAmount, - transactionFeeSelector, - getKnownMethodData, - getUnapprovedTxCount, - getUnapprovedTransactions, - getUseCurrencyRateCheck, - getTargetAccountWithSendEtherInfo, - getCustomNonceValue, - getNextSuggestedNonce, -} from '../../../selectors'; -import { NETWORK_TO_NAME_MAP } from '../../../../shared/constants/network'; -import { - cancelTx, - cancelTxs, - showModal, - updateAndApproveTx, - getNextNonce, - updateCustomNonce, -} from '../../../store/actions'; -import { clearConfirmTransaction } from '../../../ducks/confirm-transaction/confirm-transaction.duck'; -import { getMostRecentOverviewPage } from '../../../ducks/history/history'; -import ApproveContentCard from '../components/approve-content-card/approve-content-card'; -import CustomSpendingCap from '../components/custom-spending-cap/custom-spending-cap'; -import Dialog from '../../../components/ui/dialog'; -import { useGasFeeContext } from '../../../contexts/gasFee'; -import { getCustomTxParamsData } from '../confirm-approve/confirm-approve.util'; -import { setCustomTokenAmount } from '../../../ducks/app/app'; -import { valuesFor } from '../../../helpers/utils/util'; -import { calcTokenAmount } from '../../../../shared/lib/transactions-controller-utils'; -import { - MAX_TOKEN_ALLOWANCE_AMOUNT, - NUM_W_OPT_DECIMAL_COMMA_OR_DOT_REGEX, -} from '../../../../shared/constants/tokens'; -import { isSuspiciousResponse } from '../../../../shared/modules/security-provider.utils'; -import BlockaidBannerAlert from '../components/security-provider-banner-alert/blockaid-banner-alert/blockaid-banner-alert'; -import { ConfirmPageContainerNavigation } from '../components/confirm-page-container'; -import { useSimulationFailureWarning } from '../hooks/useSimulationFailureWarning'; -import SimulationErrorMessage from '../components/simulation-error-message'; -import LedgerInstructionField from '../components/ledger-instruction-field/ledger-instruction-field'; -import SecurityProviderBannerMessage from '../components/security-provider-banner-message/security-provider-banner-message'; -import { Icon, IconName, Text } from '../../../components/component-library'; -import { ConfirmPageContainerWarning } from '../components/confirm-page-container/confirm-page-container-content'; -import CustomNonce from '../components/custom-nonce'; -import FeeDetailsComponent from '../components/fee-details-component/fee-details-component'; -import { BlockaidResultType } from '../../../../shared/constants/security-provider'; -import { QueuedRequestsBannerAlert } from '../confirmation/components/queued-requests-banner-alert/queued-requests-banner-alert'; - -import { - selectNetworkConfigurationByChainId, - selectNetworkIdentifierByChainId, - // eslint-disable-next-line import/no-duplicates -} from '../../../selectors/selectors'; - -///: BEGIN:ONLY_INCLUDE_IF(build-mmi) -// eslint-disable-next-line import/no-duplicates -import { getAccountType } from '../../../selectors/selectors'; -import { mmiActionsFactory } from '../../../store/institutional/institution-background'; -import { showCustodyConfirmLink } from '../../../store/institutional/institution-actions'; -import { - AccountType, - CustodyStatus, -} from '../../../../shared/constants/custody'; -///: END:ONLY_INCLUDE_IF - -const ALLOWED_HOSTS = ['portfolio.metamask.io']; - -export default function TokenAllowance({ - origin, - siteImage, - showCustomizeGasModal, - useNonceField, - currentCurrency, - nativeCurrency, - ethTransactionTotal, - fiatTransactionTotal, - hexTransactionTotal, - hexMinimumTransactionFee, - txData, - supportsEIP1559, - userAddress, - tokenAddress, - data, - isSetApproveForAll, - isApprovalOrRejection, - decimals, - dappProposedTokenAmount, - currentTokenBalance, - toAddress, - tokenSymbol, - fromAddressIsLedger, - warning, -}) { - const t = useContext(I18nContext); - const dispatch = useDispatch(); - const history = useHistory(); - const mostRecentOverviewPage = useSelector(getMostRecentOverviewPage); - - const { hostname } = new URL(origin); - const thisOriginIsAllowedToSkipFirstPage = ALLOWED_HOSTS.includes(hostname); - - const customTokenAmount = useSelector(getCustomTokenAmount); - const [customSpendingCap, setCustomSpendingCap] = useState(customTokenAmount); - - const [showContractDetails, setShowContractDetails] = useState(false); - const [inputChangeInProgress, setInputChangeInProgress] = useState(false); - const [showFullTxDetails, setShowFullTxDetails] = useState(false); - const [isFirstPage, setIsFirstPage] = useState( - dappProposedTokenAmount !== '0' && !thisOriginIsAllowedToSkipFirstPage, - ); - const [errorText, setErrorText] = useState(''); - const [userAcknowledgedGasMissing, setUserAcknowledgedGasMissing] = - useState(false); - - const renderSimulationFailureWarning = useSimulationFailureWarning( - userAcknowledgedGasMissing, - ); - const fromAccount = useSelector((state) => - getTargetAccountWithSendEtherInfo(state, userAddress), - ); - - const { chainId } = txData; - - const networkIdentifier = useSelector((state) => - selectNetworkIdentifierByChainId(state, chainId), - ); - - const { blockExplorerUrls } = - useSelector((state) => - selectNetworkConfigurationByChainId(state, chainId), - ) ?? {}; - - const blockExplorerUrl = blockExplorerUrls?.[0]; - const unapprovedTxCount = useSelector(getUnapprovedTxCount); - const unapprovedTxs = useSelector(getUnapprovedTransactions); - const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck); - const nextNonce = useSelector(getNextSuggestedNonce); - const customNonceValue = useSelector(getCustomNonceValue); - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const accountType = useSelector((state) => - getAccountType(state, fromAccount.address), - ); - const mmiActions = mmiActionsFactory(); - ///: END:ONLY_INCLUDE_IF - - /** - * We set the customSpendingCap to the dappProposedTokenAmount, if provided, rather than setting customTokenAmount - * because customTokenAmount is reserved for custom user input. This is only set once when the component is mounted. - */ - const initializeCustomSpendingCap = () => { - if ( - (!customSpendingCap || customSpendingCap === '') && - dappProposedTokenAmount - ) { - setCustomSpendingCap(dappProposedTokenAmount); - } - }; - - useEffect(() => { - initializeCustomSpendingCap(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - const replaceCommaToDot = (inputValue) => { - return inputValue.replace(/,/gu, '.'); - }; - - let customPermissionAmount = NUM_W_OPT_DECIMAL_COMMA_OR_DOT_REGEX.test( - customSpendingCap, - ) - ? replaceCommaToDot(customSpendingCap).toString() - : '0'; - - const maxTokenAmount = calcTokenAmount(MAX_TOKEN_ALLOWANCE_AMOUNT, decimals); - if (customSpendingCap.length > 1 && Number(customSpendingCap)) { - const customSpendLimitNumber = new BigNumber(customSpendingCap); - if (customSpendLimitNumber.greaterThan(maxTokenAmount)) { - customPermissionAmount = 0; - } - } - - const customTxParamsData = customPermissionAmount - ? getCustomTxParamsData(data, { - customPermissionAmount, - decimals, - }) - : null; - - let fullTxData = { ...txData }; - - if (customTxParamsData) { - fullTxData = { - ...fullTxData, - txParams: { - ...fullTxData.txParams, - data: customTxParamsData, - }, - }; - } - - const fee = useSelector((state) => transactionFeeSelector(state, fullTxData)); - const methodData = useSelector( - (state) => getKnownMethodData(state, data) ?? {}, - ); - - const { balanceError } = useGasFeeContext(); - - const disableNextButton = - isFirstPage && (customSpendingCap === '' || errorText !== ''); - - const disableApproveButton = !isFirstPage && balanceError; - - const networkName = - NETWORK_TO_NAME_MAP[fullTxData.chainId] || networkIdentifier; - - const customNonceMerge = (transactionData) => - customNonceValue - ? { - ...transactionData, - customNonceValue, - } - : transactionData; - - const handleReject = () => { - dispatch(updateCustomNonce('')); - dispatch(setCustomTokenAmount('')); - - dispatch(cancelTx(fullTxData)).then(() => { - dispatch(clearConfirmTransaction()); - history.push(mostRecentOverviewPage); - }); - }; - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - const mmiApprovalFlow = () => { - if (accountType === AccountType.CUSTODY) { - fullTxData.custodyStatus = CustodyStatus.CREATED; - fullTxData.metadata = fullTxData.metadata || {}; - - dispatch(mmiActions.setWaitForConfirmDeepLinkDialog(true)); - - const txId = fullTxData.id; - const fromAddress = fullTxData.txParams.from; - const closeNotification = false; - dispatch(updateAndApproveTx(customNonceMerge(fullTxData))).then(() => { - showCustodianDeepLink({ - dispatch, - mmiActions, - txId, - fromAddress, - closeNotification, - onDeepLinkFetched: () => undefined, - onDeepLinkShown: () => { - dispatch(clearConfirmTransaction()); - history.push(mostRecentOverviewPage); - }, - showCustodyConfirmLink, - }); - history.push(mostRecentOverviewPage); - }); - } else { - // Non Custody accounts follow normal flow - dispatch(updateAndApproveTx(customNonceMerge(fullTxData))).then(() => { - dispatch(clearConfirmTransaction()); - history.push(mostRecentOverviewPage); - }); - } - }; - ///: END:ONLY_INCLUDE_IF - - const handleApprove = () => { - const { name } = methodData; - - if (fee.gasEstimationObject.baseFeePerGas) { - fullTxData.estimatedBaseFee = fee.gasEstimationObject.baseFeePerGas; - } - - if (name) { - fullTxData.contractMethodName = name; - } - - if (dappProposedTokenAmount) { - fullTxData.dappProposedTokenAmount = dappProposedTokenAmount; - fullTxData.originalApprovalAmount = dappProposedTokenAmount; - } - - if (customSpendingCap) { - fullTxData.customTokenAmount = customSpendingCap; - fullTxData.finalApprovalAmount = customSpendingCap; - } else if (dappProposedTokenAmount !== undefined) { - fullTxData.finalApprovalAmount = dappProposedTokenAmount; - } - - if (currentTokenBalance) { - fullTxData.currentTokenBalance = currentTokenBalance; - } - - dispatch(updateCustomNonce('')); - - ///: BEGIN:ONLY_INCLUDE_IF(build-mmi) - mmiApprovalFlow(); - ///: END:ONLY_INCLUDE_IF - - ///: BEGIN:ONLY_INCLUDE_IF(build-main,build-beta,build-flask) - dispatch(updateAndApproveTx(customNonceMerge(fullTxData))).then(() => { - dispatch(clearConfirmTransaction()); - history.push(mostRecentOverviewPage); - }); - ///: END:ONLY_INCLUDE_IF - }; - - const handleNextClick = () => { - setShowFullTxDetails(false); - setIsFirstPage(false); - }; - - const handleBackClick = () => { - setShowFullTxDetails(false); - setIsFirstPage(true); - }; - - const handleCancelAll = () => { - dispatch( - showModal({ - name: 'REJECT_TRANSACTIONS', - unapprovedTxCount, - onSubmit: async () => { - await dispatch(cancelTxs(valuesFor(unapprovedTxs))); - dispatch(clearConfirmTransaction()); - history.push(mostRecentOverviewPage); - }, - }), - ); - }; - - const handleNextNonce = useCallback(() => { - dispatch(getNextNonce(txData.txParams.from)); - }, [dispatch, txData.txParams.from]); - - useEffect(() => { - dispatch(getNextNonce(txData.txParams.from)); - }, [dispatch, txData.txParams.from]); - - const handleUpdateCustomNonce = (value) => { - dispatch(updateCustomNonce(value)); - }; - - const handleCustomizeNonceModal = ( - /* eslint-disable no-shadow */ - useNonceField, - nextNonce, - customNonceValue, - updateCustomNonce, - getNextNonce, - /* eslint-disable no-shadow */ - ) => { - dispatch( - showModal({ - name: 'CUSTOMIZE_NONCE', - useNonceField, - nextNonce, - customNonceValue, - updateCustomNonce, - getNextNonce, - }), - ); - }; - - const isEmpty = customSpendingCap === ''; - - const renderContractTokenValues = ( - - - - ); - - const submitButtonType = - txData.securityAlertResponse?.result_type === BlockaidResultType.Malicious - ? 'danger-primary' - : 'primary'; - - return ( - - - - - - - {!isFirstPage && ( - - )} - - - - {isFirstPage ? 1 : 2} {t('ofTextNofM')} 2 - - - - - - - {isSuspiciousResponse(txData?.securityProviderResponse) && ( - - )} - {warning && ( - - - - )} - - - - - {origin} - - - - - - {isFirstPage ? ( - t('spendingCapRequest', [renderContractTokenValues]) - ) : ( - - {customSpendingCap === '0' || isEmpty - ? t('revokeSpendingCap', [renderContractTokenValues]) - : t('spendingCapRequest', [renderContractTokenValues])} - - )} - - - - - - - {isFirstPage ? ( - setErrorText(value)} - decimals={decimals} - setInputChangeInProgress={setInputChangeInProgress} - customSpendingCap={customSpendingCap} - setCustomSpendingCap={setCustomSpendingCap} - /> - ) : ( - handleBackClick()} - /> - )} - - {!isFirstPage && balanceError && ( - - {t('insufficientFundsForGas')} - - )} - {!isFirstPage && ( - - {renderSimulationFailureWarning && ( - - - setUserAcknowledgedGasMissing(true) - } - /> - - )} - } - title={t('transactionFee')} - showEdit - showAdvanceGasFeeOptions - onEditClick={showCustomizeGasModal} - renderTransactionDetailsContent - noBorder={useNonceField || !showFullTxDetails} - supportsEIP1559={supportsEIP1559} - ethTransactionTotal={ethTransactionTotal} - nativeCurrency={nativeCurrency} - fullTxData={fullTxData} - userAcknowledgedGasMissing={userAcknowledgedGasMissing} - renderSimulationFailureWarning={renderSimulationFailureWarning} - hexTransactionTotal={hexTransactionTotal} - hexMinimumTransactionFee={hexMinimumTransactionFee} - fiatTransactionTotal={fiatTransactionTotal} - currentCurrency={currentCurrency} - useCurrencyRateCheck={useCurrencyRateCheck} - /> - - )} - - - - {useNonceField && ( - - - handleCustomizeNonceModal( - useNonceField, - nextNonce, - customNonceValue, - handleUpdateCustomNonce, - handleNextNonce, - ) - } - /> - - )} - - - - {showFullTxDetails ? ( - - - } - title={t('data')} - renderDataContent - noBorder - supportsEIP1559={supportsEIP1559} - isSetApproveForAll={isSetApproveForAll} - fullTxData={fullTxData} - userAcknowledgedGasMissing={userAcknowledgedGasMissing} - renderSimulationFailureWarning={renderSimulationFailureWarning} - isApprovalOrRejection={isApprovalOrRejection} - data={customTxParamsData || data} - useCurrencyRateCheck={useCurrencyRateCheck} - hexMinimumTransactionFee={hexMinimumTransactionFee} - /> - - - ) : null} - {!isFirstPage && fromAddressIsLedger && ( - - - - )} - handleReject()} - onSubmit={() => (isFirstPage ? handleNextClick() : handleApprove())} - disabled={ - inputChangeInProgress || disableNextButton || disableApproveButton - } - submitButtonType={submitButtonType} - > - {unapprovedTxCount > 1 && ( - - )} - - {showContractDetails && ( - setShowContractDetails(false)} - tokenAddress={tokenAddress} - toAddress={toAddress} - chainId={fullTxData.chainId} - blockExplorerUrl={blockExplorerUrl} - /> - )} - - ); -} - -TokenAllowance.propTypes = { - /** - * Dapp URL - */ - origin: PropTypes.string, - /** - * Dapp image - */ - siteImage: PropTypes.string, - /** - * Function that is supposed to open the customized gas modal - */ - showCustomizeGasModal: PropTypes.func, - /** - * Whether nonce field should be used or not - */ - useNonceField: PropTypes.bool, - /** - * Current fiat currency (e.g. USD) - */ - currentCurrency: PropTypes.string, - /** - * Current native currency (e.g. RopstenETH) - */ - nativeCurrency: PropTypes.string, - /** - * Total sum of the transaction in native currency - */ - ethTransactionTotal: PropTypes.string, - /** - * Total sum of the transaction in fiat currency - */ - fiatTransactionTotal: PropTypes.string, - /** - * Total sum of the transaction converted to hex value - */ - hexTransactionTotal: PropTypes.string, - /** - * Minimum transaction fee converted to hex value - */ - hexMinimumTransactionFee: PropTypes.string, - /** - * Current transaction - */ - txData: PropTypes.object, - /** - * Is the enhanced gas fee enabled or not - */ - supportsEIP1559: PropTypes.bool, - /** - * User's address - */ - userAddress: PropTypes.string, - /** - * Address of the token that is waiting to be allowed - */ - tokenAddress: PropTypes.string, - /** - * Current transaction data - */ - data: PropTypes.string, - /** - * Is set approve for all or not - */ - isSetApproveForAll: PropTypes.bool, - /** - * Whether a current set approval for all transaction will approve or revoke access - */ - isApprovalOrRejection: PropTypes.bool, - /** - * Number of decimals - */ - decimals: PropTypes.string, - /** - * Token amount proposed by the Dapp - */ - dappProposedTokenAmount: PropTypes.string, - /** - * Token balance of the current account - */ - currentTokenBalance: PropTypes.string, - /** - * Contract address requesting spending cap - */ - toAddress: PropTypes.string, - /** - * Symbol of the token that is waiting to be allowed - */ - tokenSymbol: PropTypes.string, - /** - * Whether the address sending the transaction is a ledger address - */ - fromAddressIsLedger: PropTypes.bool, - /** - * Customize nonce warning message - */ - warning: PropTypes.string, -}; diff --git a/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js b/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js deleted file mode 100644 index 9c08a176b4d4..000000000000 --- a/ui/pages/confirmations/token-allowance/token-allowance.stories-to-do.js +++ /dev/null @@ -1,196 +0,0 @@ -import React from 'react'; -import TokenAllowance from './token-allowance'; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/TokenAllowance', - - argTypes: { - origin: { - control: 'text', - }, - siteImage: { - control: 'text', - }, - showCustomizeGasModal: { - action: 'showCustomizeGasModal', - }, - useNonceField: { - control: 'boolean', - }, - currentCurrency: { - control: 'text', - }, - nativeCurrency: { - control: 'text', - }, - ethTransactionTotal: { - control: 'text', - }, - fiatTransactionTotal: { - control: 'text', - }, - hexTransactionTotal: { - control: 'text', - }, - supportsEIP1559: { - control: 'boolean', - }, - userAddress: { - control: 'text', - }, - tokenAddress: { - control: 'text', - }, - data: { - control: 'text', - }, - isSetApproveForAll: { - control: 'boolean', - }, - setApproveForAllArg: { - control: 'boolean', - }, - decimals: { - control: 'text', - }, - dappProposedTokenAmount: { - control: 'text', - }, - currentTokenBalance: { - control: 'text', - }, - toAddress: { - control: 'text', - }, - tokenSymbol: { - control: 'text', - }, - txData: { - control: 'object', - }, - }, - args: { - origin: 'https://metamask.github.io', - siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - useNonceField: false, - currentCurrency: 'usd', - nativeCurrency: 'RopstenETH', - ethTransactionTotal: '0.0012', - fiatTransactionTotal: '1.6', - hexTransactionTotal: '0x44364c5bb0000', - supportsEIP1559: false, - userAddress: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1', - tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - isSetApproveForAll: false, - setApproveForAllArg: false, - decimals: '4', - dappProposedTokenAmount: '7', - currentTokenBalance: '10', - toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', - tokenSymbol: 'TST', - txData: { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - history: [ - { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: true, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0xdd34b35ca1de17dfcdc07f79ff1f8f94868c40a1', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - gasPrice: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - }, - [ - { - op: 'remove', - path: '/txParams/gasPrice', - note: 'Added new unapproved transaction.', - timestamp: 1664449553939, - }, - { - op: 'add', - path: '/txParams/maxFeePerGas', - value: '0x4a817c800', - }, - { - op: 'add', - path: '/txParams/maxPriorityFeePerGas', - value: '0x4a817c800', - }, - { - op: 'replace', - path: '/loadingDefaults', - value: false, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'custom', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - ], - ], - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - }, -}; - -export const DefaultStory = (args) => { - return ; -}; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/confirmations/token-allowance/token-allowance.stories.js b/ui/pages/confirmations/token-allowance/token-allowance.stories.js deleted file mode 100644 index ed6078bf2a87..000000000000 --- a/ui/pages/confirmations/token-allowance/token-allowance.stories.js +++ /dev/null @@ -1,277 +0,0 @@ -import React from 'react'; -import { Provider } from 'react-redux'; -import testData from '../../../../.storybook/test-data'; -import configureStore from '../../../store/store'; -import { - BlockaidReason, - BlockaidResultType, - SECURITY_PROVIDER_MESSAGE_SEVERITY, -} from '../../../../shared/constants/security-provider'; - -import TokenAllowance from './token-allowance'; - -const defaultArgs = { - origin: 'https://metamask.github.io', - siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - useNonceField: false, - currentCurrency: 'usd', - nativeCurrency: 'GoerliETH', - ethTransactionTotal: '0.0012', - fiatTransactionTotal: '1.6', - hexTransactionTotal: '0x44364c5bb0000', - supportsEIP1559: false, - userAddress: '0x9d0ba4ddac06032527b140912ec808ab9451b788', - tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - isSetApproveForAll: false, - setApproveForAllArg: false, - decimals: '4', - dappProposedTokenAmount: '7', - currentTokenBalance: '10', - toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', - tokenSymbol: 'TST', - fromAddressIsLedger: false, - txData: { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0x9d0ba4ddac06032527b140912ec808ab9451b788', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - history: [ - { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: '0x3', - loadingDefaults: true, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0x9d0ba4ddac06032527b140912ec808ab9451b788', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - gasPrice: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - }, - [ - { - op: 'remove', - path: '/txParams/gasPrice', - note: 'Added new unapproved transaction.', - timestamp: 1664449553939, - }, - { - op: 'add', - path: '/txParams/maxFeePerGas', - value: '0x4a817c800', - }, - { - op: 'add', - path: '/txParams/maxPriorityFeePerGas', - value: '0x4a817c800', - }, - { - op: 'replace', - path: '/loadingDefaults', - value: false, - }, - { - op: 'add', - path: '/userFeeLevel', - value: 'custom', - }, - { - op: 'add', - path: '/defaultGasEstimates', - value: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, - ], - ], - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - }, - }, -}; - -// eslint-disable-next-line import/no-anonymous-default-export -export default { - title: 'Pages/TokenAllowance', - argTypes: { - origin: { - control: 'text', - }, - siteImage: { - control: 'text', - }, - showCustomizeGasModal: { - action: 'showCustomizeGasModal', - }, - useNonceField: { - control: 'boolean', - }, - currentCurrency: { - control: 'text', - }, - nativeCurrency: { - control: 'text', - }, - ethTransactionTotal: { - control: 'text', - }, - fiatTransactionTotal: { - control: 'text', - }, - hexTransactionTotal: { - control: 'text', - }, - supportsEIP1559: { - control: 'boolean', - }, - userAddress: { - control: 'text', - }, - tokenAddress: { - control: 'text', - }, - data: { - control: 'text', - }, - isSetApproveForAll: { - control: 'boolean', - }, - setApproveForAllArg: { - control: 'boolean', - }, - decimals: { - control: 'text', - }, - dappProposedTokenAmount: { - control: 'text', - }, - currentTokenBalance: { - control: 'text', - }, - toAddress: { - control: 'text', - }, - tokenSymbol: { - control: 'text', - }, - txData: { - control: 'object', - }, - warning: { - control: 'text', - }, - fromAddressIsLedger: { - control: 'boolean', - }, - }, - args: { - ...defaultArgs, - }, -}; - -const Template = (args) => ; - -export const DefaultStory = Template.bind({}); - -DefaultStory.storyName = 'Default'; - -const storeWithErrors = configureStore({ - ...testData, - metamask: { - ...testData.metamask, - // TODO: Mock state correctly to show insufficient funds error - // - accounts: { - ...testData.metamask.accounts, - '0x9d0ba4ddac06032527b140912ec808ab9451b788': { - balance: '0x0', - }, - }, - }, - confirmTransaction: { - txData: { - // SimulationErrorMessage warning - simulationFails: true, - }, - }, -}); - -export const AllBannerAlerts = Template.bind({}); - -AllBannerAlerts.decorators = [ - (story) => {story()}, -]; - -AllBannerAlerts.args = { - ...defaultArgs, - origin: 'https://portfolio.metamask.io', - txData: { - ...defaultArgs.txData, - // SecurityProviderBannerMessage warning - securityAlertResponse: { - result_type: BlockaidResultType.Warning, - reason: BlockaidReason.setApprovalForAll, - description: - 'A SetApprovalForAll request was made on {contract}. We found the operator {operator} to be malicious', - args: { - contract: '0xa7206d878c5c3871826dfdb42191c49b1d11f466', - operator: '0x92a3b9773b1763efa556f55ccbeb20441962d9b2', - }, - }, - securityProviderResponse: { - flagAsDangerous: SECURITY_PROVIDER_MESSAGE_SEVERITY.MALICIOUS, - reason: - 'Approval is to an unverified smart contract known for stealing NFTs in the past.', - reason_header: 'This could be a scam', - }, - }, - // Non specific warning - warning: 'This is a warning', - // Sending from Ledger - fromAddressIsLedger: true, -}; - -export const UseNonceField = Template.bind({}); -UseNonceField.args = { - ...defaultArgs, - useNonceField: true, -}; diff --git a/ui/pages/confirmations/token-allowance/token-allowance.test.js b/ui/pages/confirmations/token-allowance/token-allowance.test.js deleted file mode 100644 index 8be80a0bcfaf..000000000000 --- a/ui/pages/confirmations/token-allowance/token-allowance.test.js +++ /dev/null @@ -1,565 +0,0 @@ -import React from 'react'; -import configureMockStore from 'redux-mock-store'; -import { act, fireEvent } from '@testing-library/react'; -import thunk from 'redux-thunk'; -import { EthAccountType } from '@metamask/keyring-api'; -import { renderWithProvider } from '../../../../test/lib/render-helpers'; -import { KeyringType } from '../../../../shared/constants/keyring'; -import { ETH_EOA_METHODS } from '../../../../shared/constants/eth-methods'; -import { mockNetworkState } from '../../../../test/stub/networks'; -import { CHAIN_IDS } from '../../../../shared/constants/network'; -import TokenAllowance from './token-allowance'; - -const testTokenAddress = '0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F'; -const state = { - appState: { - customTokenAmount: '1', - nextNonce: 1, - customNonceValue: '', - }, - metamask: { - ...mockNetworkState({ chainId: CHAIN_IDS.MAINNET }), - accounts: { - '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': { - address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - balance: '0x0', - }, - }, - gasEstimateType: 'none', - internalAccounts: { - accounts: { - 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3': { - address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - id: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - metadata: { - name: 'Account 1', - keyring: { - type: 'HD Key Tree', - }, - }, - options: {}, - methods: ETH_EOA_METHODS, - type: EthAccountType.Eoa, - }, - '07c2cfec-36c9-46c4-8115-3836d3ac9047': { - address: '0xc42edfcc21ed14dda456aa0756c153f7985d8813', - id: '07c2cfec-36c9-46c4-8115-3836d3ac9047', - metadata: { - name: 'Account 2', - keyring: { - type: 'HD Key Tree', - }, - }, - options: {}, - methods: ETH_EOA_METHODS, - type: EthAccountType.Eoa, - }, - }, - selectedAccount: 'cf8dace4-9439-4bd4-b3a8-88c821c8fcb3', - }, - accountsByChainId: { - '0x1': { - '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': { - address: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - balance: '0x0', - }, - }, - }, - addressBook: [ - { - address: '0xc42edfcc21ed14dda456aa0756c153f7985d8813', - chainId: '0x5', - isEns: false, - memo: '', - name: 'Address Book Account 1', - }, - ], - ...mockNetworkState({ chainId: CHAIN_IDS.MAINNET, nickname: 'mainnet' }), - preferences: { - showFiatInTestnets: true, - }, - currencyRates: {}, - knownMethodData: {}, - tokens: [ - { - address: testTokenAddress, - symbol: 'SNX', - decimals: 18, - image: 'testImage', - isERC721: false, - }, - { - address: '0xaD6D458402F60fD3Bd25163575031ACDce07538U', - symbol: 'DAU', - decimals: 18, - image: null, - isERC721: false, - }, - ], - transactions: [], - keyrings: [ - { - type: KeyringType.hdKeyTree, - accounts: ['0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc'], - }, - ], - pendingApprovals: { - '741bad30-45b6-11ef-b6ec-870d18dd6c01': { - id: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - origin: 'http://127.0.0.1:8080', - type: 'transaction', - time: 1721383540624, - requestData: { - txId: '741bad30-45b6-11ef-b6ec-870d18dd6c01', - }, - requestState: null, - expectsResult: true, - }, - }, - }, - history: { - mostRecentOverviewPage: '/', - }, - confirmTransaction: { - txData: {}, - }, - send: { - draftTransactions: {}, - }, -}; - -const mockShowModal = jest.fn(); -const mockedState = jest.mocked(state); - -jest.mock('../../../store/actions', () => ({ - getGasFeeTimeEstimate: jest.fn().mockImplementation(() => Promise.resolve()), - gasFeeStartPollingByNetworkClientId: jest - .fn() - .mockResolvedValue('pollingToken'), - gasFeeStopPollingByPollingToken: jest.fn(), - addPollingTokenToAppState: jest.fn(), - removePollingTokenFromAppState: jest.fn(), - getNetworkConfigurationByNetworkClientId: jest.fn().mockImplementation(() => - Promise.resolve({ - chainId: '0x5', - }), - ), - updateTransactionGasFees: () => ({ type: 'UPDATE_TRANSACTION_PARAMS' }), - updatePreviousGasParams: () => ({ type: 'UPDATE_TRANSACTION_PARAMS' }), - createTransactionEventFragment: jest.fn(), - getNextNonce: () => jest.fn(), - showModal: () => mockShowModal, - updateCustomNonce: () => ({ type: 'UPDATE_TRANSACTION_PARAMS' }), - estimateGas: jest.fn().mockImplementation(() => Promise.resolve()), -})); - -jest.mock('../../../contexts/gasFee', () => ({ - useGasFeeContext: () => ({ - maxPriorityFeePerGas: '0.1', - maxFeePerGas: '0.1', - updateTransaction: jest.fn(), - }), -})); - -jest.mock('react-router-dom', () => { - const original = jest.requireActual('react-router-dom'); - return { - ...original, - useHistory: () => ({ - push: jest.fn(), - }), - useParams: () => ({ - address: testTokenAddress, - }), - }; -}); - -describe('TokenAllowancePage', () => { - const props = { - origin: 'https://metamask.github.io', - siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', - useNonceField: false, - currentCurrency: 'usd', - nativeCurrency: 'GoerliETH', - ethTransactionTotal: '0.0012', - fiatTransactionTotal: '1.6', - hexTransactionTotal: '0x44364c5bb0000', - supportsEIP1559: true, - userAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - tokenAddress: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - isSetApproveForAll: false, - setApproveForAllArg: false, - decimals: '4', - dappProposedTokenAmount: '7', - currentTokenBalance: '10', - toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', - tokenSymbol: 'TST', - showCustomizeGasModal: jest.fn(), - warning: '', - txData: { - id: 3049568294499567, - time: 1664449552289, - status: 'unapproved', - originalGasEstimate: '0xea60', - userEditedGasLimit: false, - chainId: CHAIN_IDS.MAINNET, - loadingDefaults: false, - dappSuggestedGasFees: { - gasPrice: '0x4a817c800', - gas: '0xea60', - }, - sendFlowHistory: [], - txParams: { - from: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc', - to: '0x55797717b9947b31306f4aac7ad1365c6e3923bd', - value: '0x0', - data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', - gas: '0xea60', - gasPrice: '0x4a817c800', - maxFeePerGas: '0x4a817c800', - }, - origin: 'https://metamask.github.io', - type: 'approve', - userFeeLevel: 'custom', - defaultGasEstimates: { - estimateType: 'custom', - gas: '0xea60', - maxFeePerGas: '0x4a817c800', - maxPriorityFeePerGas: '0x4a817c800', - gasPrice: '0x4a817c800', - }, - }, - }; - - let store; - beforeEach(() => { - store = configureMockStore([thunk])(state); - }); - - describe('when mounted', () => { - it('should match snapshot', () => { - const { container } = renderWithProvider( - , - store, - ); - - expect(container).toMatchSnapshot(); - }); - - it('should load the page with dappProposedAmount prefilled and "Use site suggestion" should not be displayed', () => { - mockedState.appState.customTokenAmount = ''; - - const { queryByText, getByTestId } = renderWithProvider( - , - configureMockStore([thunk])(mockedState), - ); - - const useSiteSuggestion = queryByText('Use site suggestion'); - expect(useSiteSuggestion).not.toBeInTheDocument(); - - const input = getByTestId('custom-spending-cap-input'); - expect(input.value).toBe('7'); - }); - }); - - it('should render title "Spending cap request for your" in token allowance page', () => { - const { getByText } = renderWithProvider( - , - store, - ); - expect(getByText('Spending cap request for your')).toBeInTheDocument(); - }); - - it('should render reject button', () => { - const { getByTestId } = renderWithProvider( - , - store, - ); - const onCloseBtn = getByTestId('page-container-footer-cancel'); - expect(onCloseBtn).toBeInTheDocument(); - }); - - it('should not render customize nonce modal if useNonceField is set to false', () => { - const { queryByText } = renderWithProvider( - , - store, - ); - expect(queryByText('Nonce')).not.toBeInTheDocument(); - expect(queryByText('1')).not.toBeInTheDocument(); - expect(mockShowModal).not.toHaveBeenCalledTimes(1); - }); - - it('should render customize nonce modal if useNonceField is set to true', () => { - props.useNonceField = true; - props.nextNonce = 1; - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - const editButton = getByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('1')).toBeInTheDocument(); - fireEvent.click(editButton); - expect(mockShowModal).toHaveBeenCalledTimes(1); - }); - - it('should render nextNonce value when custom nonce value is a empty string', () => { - props.useNonceField = true; - props.customNonceValue = ''; - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - const editButton = getByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('1')).toBeInTheDocument(); - fireEvent.click(editButton); - expect(mockShowModal).toHaveBeenCalledTimes(2); - }); - - it('should render edited custom nonce value', () => { - props.useNonceField = true; - state.appState.customNonceValue = '3'; - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - const editButton = getByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('3')).toBeInTheDocument(); - fireEvent.click(editButton); - expect(mockShowModal).toHaveBeenCalledTimes(3); - }); - - it('should render customize nonce warning if custom nonce value is higher than nextNonce value', () => { - props.useNonceField = true; - props.nextNonce = 2; - props.customNonceValue = '3'; - props.warning = 'Nonce is higher than suggested nonce of 2'; - const { getByText } = renderWithProvider( - , - store, - ); - expect( - getByText('Nonce is higher than suggested nonce of 2'), - ).toBeInTheDocument(); - }); - - it('should not render customize nonce warning if custom nonce value is lower than nextNonce value', () => { - props.useNonceField = true; - props.nextNonce = 2; - props.customNonceValue = '1'; - props.warning = ''; - const { container } = renderWithProvider( - , - store, - ); - const customizeNonceWarning = container.querySelector( - '.token-allowance-container__custom-nonce-warning', - ); - expect(customizeNonceWarning).not.toBeInTheDocument(); - }); - - it('should render customize nonce modal when next button is clicked and if useNonceField is set to true', () => { - props.useNonceField = true; - state.appState.customNonceValue = '2'; - const { getByText, getAllByText, queryByText } = renderWithProvider( - , - store, - ); - - const nextButton = getByText('Next'); - fireEvent.click(nextButton); - - const editButton = getAllByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButton[1]); - expect(mockShowModal).toHaveBeenCalledTimes(4); - }); - - it('should render customize nonce modal when next button is clicked, than back button is clicked, than return to previous page and if useNonceField is set to true', () => { - props.useNonceField = true; - state.appState.customNonceValue = '2'; - const { getByText, queryByText } = renderWithProvider( - , - store, - ); - - const nextButton = getByText('Next'); - fireEvent.click(nextButton); - - const backButton = getByText('< Back'); - fireEvent.click(backButton); - - const editButton = getByText('Edit'); - expect(queryByText('Nonce')).toBeInTheDocument(); - expect(queryByText('2')).toBeInTheDocument(); - fireEvent.click(editButton); - expect(mockShowModal).toHaveBeenCalledTimes(5); - }); - - it('should click View details and show function type', () => { - const { getByText } = renderWithProvider( - , - store, - ); - - const viewDetailsButton = getByText('View details'); - fireEvent.click(viewDetailsButton); - expect(getByText('Function: Approve')).toBeInTheDocument(); - }); - - it('should click "Use site suggestion" and set input value to dappProposedTokenAmount', () => { - mockedState.appState.customTokenAmount = ''; - - const { getByText, getByTestId } = renderWithProvider( - , - configureMockStore([thunk])(mockedState), - ); - const textField = getByTestId('custom-spending-cap-input'); - - expect(textField.value).toBe('7'); - fireEvent.change(textField, { target: { value: '1' } }); - expect(textField.value).toBe('1'); - - const useSiteSuggestion = getByText('Use site suggestion'); - expect(useSiteSuggestion).toBeInTheDocument(); - - act(() => { - fireEvent.click(useSiteSuggestion); - }); - - expect(textField.value).toBe('7'); - }); - - it('should call back button when button is clicked and return to previous page', () => { - const { getByText } = renderWithProvider( - , - store, - ); - - const nextButton = getByText('Next'); - fireEvent.click(nextButton); - - expect(getByText('Site requested spending cap')).toBeInTheDocument(); - - const backButton = getByText('< Back'); - fireEvent.click(backButton); - - expect(getByText('Spending cap request for your')).toBeInTheDocument(); - }); - - it('should click Verify third-party details and show popup Third-party details, then close popup', () => { - const { getByText } = renderWithProvider( - , - store, - ); - - const verifyThirdPartyDetails = getByText('Verify third-party details'); - fireEvent.click(verifyThirdPartyDetails); - - expect(getByText('Third-party details')).toBeInTheDocument(); - - const gotIt = getByText('Got it'); - fireEvent.click(gotIt); - expect(gotIt).not.toBeInTheDocument(); - }); - - it('should show ledger info text if the sending address is ledger', () => { - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - - expect(queryByText('Prior to clicking confirm:')).toBeNull(); - - const nextButton = getByText('Next'); - fireEvent.click(nextButton); - - expect(queryByText('Prior to clicking confirm:')).toBeInTheDocument(); - }); - - it('should not show ledger info text if the sending address is not ledger', () => { - const { queryByText, getByText } = renderWithProvider( - , - store, - ); - - expect(queryByText('Prior to clicking confirm:')).toBeNull(); - - const nextButton = getByText('Next'); - fireEvent.click(nextButton); - - expect(queryByText('Prior to clicking confirm:')).toBeNull(); - }); - - it('should render security provider response if transaction is malicious', () => { - const securityProviderResponse = { - flagAsDangerous: 1, - reason: - 'This has been flagged as potentially suspicious. If you sign, you could lose access to all of your NFTs and any funds or other assets in your wallet.', - reason_header: 'Warning', - }; - const { getByText } = renderWithProvider( - , - store, - ); - - expect(getByText(securityProviderResponse.reason)).toBeInTheDocument(); - }); - - it('should render from account name in header', () => { - const { getByText } = renderWithProvider( - , - store, - ); - - expect(getByText('Account 1')).toBeInTheDocument(); - }); - - it('should account name from transaction even if currently selected account is different', () => { - const newState = { - ...state, - metamask: { - ...state.metamask, - }, - }; - const newStore = configureMockStore([thunk])(newState); - const { queryByText } = renderWithProvider( - , - newStore, - ); - - expect(queryByText('Account 1')).toBeInTheDocument(); - expect(queryByText('Account 2')).not.toBeInTheDocument(); - }); - - it('should display security alert if present', () => { - const { getByText } = renderWithProvider( - , - store, - ); - - expect(getByText('This is a deceptive request')).toBeInTheDocument(); - }); -}); diff --git a/ui/pages/settings/advanced-tab/__snapshots__/advanced-tab.component.test.js.snap b/ui/pages/settings/advanced-tab/__snapshots__/advanced-tab.component.test.js.snap index 5b6825dc1533..5c73717745ea 100644 --- a/ui/pages/settings/advanced-tab/__snapshots__/advanced-tab.component.test.js.snap +++ b/ui/pages/settings/advanced-tab/__snapshots__/advanced-tab.component.test.js.snap @@ -410,72 +410,6 @@ exports[`AdvancedTab Component should match snapshot 1`] = `
-
-
- - Customize transaction nonce - -
- Turn this on to change the nonce (transaction number) when sending assets. This is an advanced feature, use cautiously. -
-
-
-