diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 961b60bbf..420fcfd34 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -145,9 +145,9 @@
"allowExternalExtensionTo": {
"message": "Allow this external extension to:"
},
- "allowOriginSpendToken": {
- "message": "Allow $1 to spend your $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
+ "allowSpendToken": {
+ "message": "Give permission to access your $1?",
+ "description": "$1 is the symbol of the token that are requesting to spend"
},
"allowThisSiteTo": {
"message": "Allow this site to:"
@@ -2838,8 +2838,7 @@
"description": "Followed by a link (here) to view token balances"
},
"trustSiteApprovePermission": {
- "message": "Do you trust this site? By granting this permission, you’re allowing $1 to withdraw your $2 and automate transactions for you.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
+ "message": "By granting permission, you are allowing the following $1 to access your funds"
},
"tryAgain": {
"message": "Try again"
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index fe7d84f99..1755531c6 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Permitir que esta extensión externa haga lo siguiente:"
},
- "allowOriginSpendToken": {
- "message": "¿Permitir que $1 gaste su $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Permitir que este sitio haga lo siguiente:"
},
@@ -2278,10 +2274,6 @@
"message": "Tuvimos problemas al cargar los saldos de token. Puede verlos ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "¿Este sitio es de confianza? Al conceder este permiso, autoriza que $1 retire su $2 y automatice las transacciones por usted.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Vuelva a intentarlo"
},
diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json
index fe7d84f99..1755531c6 100644
--- a/app/_locales/es_419/messages.json
+++ b/app/_locales/es_419/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Permitir que esta extensión externa haga lo siguiente:"
},
- "allowOriginSpendToken": {
- "message": "¿Permitir que $1 gaste su $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Permitir que este sitio haga lo siguiente:"
},
@@ -2278,10 +2274,6 @@
"message": "Tuvimos problemas al cargar los saldos de token. Puede verlos ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "¿Este sitio es de confianza? Al conceder este permiso, autoriza que $1 retire su $2 y automatice las transacciones por usted.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Vuelva a intentarlo"
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index 10b13b7df..9f2105f99 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "इस बाहरी एक्सटेंशन को इसकी अनुमति दें:"
},
- "allowOriginSpendToken": {
- "message": "$1 को आपका $2 खर्च करने की अनुमति दें?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "इस साइट को इसकी अनुमति दें:"
},
@@ -2278,10 +2274,6 @@
"message": "हमें आपके टोकन की शेषराशि लोड करने में परेशानी हुई। आप उन्हें देख सकते हैं ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "क्या आप इस साइट पर भरोसा करते हैं? यह अनुमति देकर, आप $1 को अपने $2 की निकासी करने और आपके लिए लेनदेनों को स्वचालित करने की अनुमति दे रहे हैं।",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "पुनः प्रयास करें"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index be60e06e5..b20bcacc4 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Izinkan ekstensi eksternal ini untuk:"
},
- "allowOriginSpendToken": {
- "message": "Izinkan $1 untuk menggunakan $2 Anda?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Izinkan situs ini untuk:"
},
@@ -2278,10 +2274,6 @@
"message": "Kami mengalami masalah saat memuat saldo token Anda. Anda dapat melihatnya ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Anda percaya situs ini? Dengan memberikan izin ini, Anda mengizinkan $1 untuk menarik $2 Anda dan mengotomatiskan transaksi untuk Anda.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Coba lagi"
},
diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json
index 3add07dea..af85d3b27 100644
--- a/app/_locales/it/messages.json
+++ b/app/_locales/it/messages.json
@@ -103,10 +103,6 @@
"allowExternalExtensionTo": {
"message": "Permetti a questa estensione di:"
},
- "allowOriginSpendToken": {
- "message": "Vuoi consentire a $1 di spendere $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Permetti a questo sito di:"
},
@@ -1864,10 +1860,6 @@
"message": "Abbiamo avuto un problema a caricare il bilancio dei tuoi token. Puoi vederlo ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Ti fidi di questo sito? Autorizzandolo, stai consentendo a $1 di ritirare i tuoi $2 e automatizzare transazioni per te.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Prova di nuovo"
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 4d7c053e3..b78dbb3a7 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "この外部拡張機能に次の操作を許可します"
},
- "allowOriginSpendToken": {
- "message": "$1 に $2 の使用を許可しますか?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "このサイトに次の操作を許可します"
},
@@ -2278,10 +2274,6 @@
"message": "トークン バランスのロードに問題があります。トークン バランスを表示できます",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "このサイトを信頼しますか?許可を与えることにより、$1 は $2 を取り消して、トランザクションを自動化できます。",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "再試行"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index 034787b39..c6b881117 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "이 외부 확장을 통해 다음을 하도록 허용:"
},
- "allowOriginSpendToken": {
- "message": "$1에서 $2을(를) 지출하도록 허용하시겠어요?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "이 사이트에서 다음을 하도록 허용:"
},
@@ -2278,10 +2274,6 @@
"message": "토큰 잔액을 로드하는 도중 문제가 발생했습니다. 다음에서 잔액을 확인하세요. ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "이 사이트를 신뢰하시나요? 이 권한을 부여하면 $1에서 귀하의 $2을(를) 인출하고 거래를 자동으로 처리하게 됩니다.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "다시 시도"
},
diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json
index ad8d87989..cedb35598 100644
--- a/app/_locales/ph/messages.json
+++ b/app/_locales/ph/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Payagan ang external extension na ito na:"
},
- "allowOriginSpendToken": {
- "message": "Payagan ang $1 na gastusin ang iyong $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Payagan ang site na ito na:"
},
@@ -2278,10 +2274,6 @@
"message": "Nagkaproblema kami sa pag-load ng mga balanse ng iyong token. Puwede mong tingnan ang mga iyon ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Pinagkakatiwalaan mo ba ang site na ito? Sa pamamagitan ng pagbibigay ng pahintulot na ito, pinapayagan mo ang $1 na i-withdraw ang iyong $2 at i-automate ang mga transaksyon para sa iyo.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Subukan ulit"
},
diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json
index fe8563b78..cfb0592ac 100644
--- a/app/_locales/pt_BR/messages.json
+++ b/app/_locales/pt_BR/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Permitir que esta extensão externa:"
},
- "allowOriginSpendToken": {
- "message": "Permitir que $1 gaste seus(suas) $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Permitir que este site:"
},
@@ -2278,10 +2274,6 @@
"message": "Tivemos dificuldade para carregar os saldos do seu token. Você pode exibi-los ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Você confia neste site? Ao conceder esta permissão, você está permitindo que $1 saque seus(suas) $2 e automatize as transações por você.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Tente novamente"
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index 15d6eee5e..e838d57e2 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Разрешить этому внешнему расширению:"
},
- "allowOriginSpendToken": {
- "message": "Разрешить $1 потратить ваши $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Разрешить этому сайту:"
},
@@ -2278,10 +2274,6 @@
"message": "У нас возникли проблемы с загрузкой вашего баланса токенов. Вы можете просмотреть их ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Вы доверяете этому сайту? Предоставляя это разрешение, вы разрешаете $1 вывести ваши $2 и автоматизировать транзакции для вас.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Попробуйте еще раз"
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index 7142e80d5..a92b420e1 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -97,10 +97,6 @@
"allowExternalExtensionTo": {
"message": "Payagan ang external extension na ito na:"
},
- "allowOriginSpendToken": {
- "message": "Payagan ang $1 na gastusin ang iyong $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Payagan ang site na ito na:"
},
@@ -1820,10 +1816,6 @@
"message": "Nagkaproblema kami sa pag-load ng mga balanse ng iyong token. Puwede mong tingnan ang mga iyon ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Pinagkakatiwalaan mo ba ang site na ito? Sa pamamagitan ng pagbibigay ng pahintulot na ito, pinapayagan mo ang $1 na i-withdraw ang iyong $2 at i-automate ang mga transaksyon para sa iyo.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Subukan ulit"
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index 93a1fbae5..a572f30fc 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -130,10 +130,6 @@
"allowExternalExtensionTo": {
"message": "Cho phép tiện ích bên ngoài này:"
},
- "allowOriginSpendToken": {
- "message": "Cho phép $1 chi tiêu $2 của bạn?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "Cho phép trang web này:"
},
@@ -2278,10 +2274,6 @@
"message": "Chúng tôi đã gặp phải vấn đề khi tải số dư token của bạn. Bạn có thể xem số dư ",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "Bạn có tin tưởng trang web này không? Bằng việc cấp quyền này, bạn sẽ cho phép $1 rút $2 của bạn và tự động thực hiện các giao dịch cho bạn.",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "Thử lại"
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index 31e56dfef..6ea8d3ad6 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -103,10 +103,6 @@
"allowExternalExtensionTo": {
"message": "允许这个外部扩展到:"
},
- "allowOriginSpendToken": {
- "message": "允许 $1 使用您的 $2?",
- "description": "$1 is the url of the site and $2 is the symbol of the token they are requesting to spend"
- },
"allowThisSiteTo": {
"message": "允许本网站:"
},
@@ -1844,10 +1840,6 @@
"message": "我们无法加载您的代币余额。您可以查看它们",
"description": "Followed by a link (here) to view token balances"
},
- "trustSiteApprovePermission": {
- "message": "您信任这个网站吗?授权即表示您允许 $1 提取您的 $2,并为您自动进行交易。",
- "description": "$1 is the url requesting permission and $2 is the symbol of the currency that the request is for"
- },
"tryAgain": {
"message": "重试"
},
diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
index 40f8e13de..393b70b5e 100644
--- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
+++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
@@ -1,19 +1,29 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
+import copyToClipboard from 'copy-to-clipboard';
+import { getTokenTrackerLink, getAccountLink } from '@metamask/etherscan-link';
import UrlIcon from '../../../components/ui/url-icon';
import { addressSummary, getURLHostName } from '../../../helpers/utils/util';
import { formatCurrency } from '../../../helpers/utils/confirm-tx.util';
-import { ConfirmPageContainerWarning } from '../../../components/app/confirm-page-container/confirm-page-container-content';
+import { isBeta } from '../../../helpers/utils/build-types';
+import { ellipsify } from '../../send/send.utils';
import Typography from '../../../components/ui/typography';
+import Box from '../../../components/ui/box';
+import Button from '../../../components/ui/button';
+import MetaFoxLogo from '../../../components/ui/metafox-logo';
+import Identicon from '../../../components/ui/identicon';
+import CopyIcon from '../../../components/ui/icon/copy-icon.component';
import {
TYPOGRAPHY,
FONT_WEIGHT,
BLOCK_SIZES,
JUSTIFY_CONTENT,
+ COLORS,
+ DISPLAY,
} from '../../../helpers/constants/design-system';
-import Box from '../../../components/ui/box';
-import Button from '../../../components/ui/button';
+import { SECOND } from '../../../../shared/constants/time';
+import { ConfirmPageContainerWarning } from '../../../components/app/confirm-page-container/confirm-page-container-content';
import LedgerInstructionField from '../../../components/app/ledger-instruction-field';
export default class ConfirmApproveContent extends Component {
@@ -47,10 +57,15 @@ export default class ConfirmApproveContent extends Component {
warning: PropTypes.string,
txData: PropTypes.object,
ledgerWalletRequiredHidConnection: PropTypes.bool,
+ tokenImage: PropTypes.string,
+ chainId: PropTypes.string,
+ rpcPrefs: PropTypes.object,
+ isContract: PropTypes.bool,
};
state = {
showFullTxDetails: false,
+ copied: false,
};
renderApproveContentCard({
@@ -243,6 +258,11 @@ export default class ConfirmApproveContent extends Component {
warning,
txData,
ledgerWalletRequiredHidConnection,
+ tokenImage,
+ toAddress,
+ chainId,
+ rpcPrefs,
+ isContract,
} = this.props;
const { showFullTxDetails } = this.state;
@@ -257,20 +277,104 @@ export default class ConfirmApproveContent extends Component {