1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 23:06:37 +01:00

Enable the Token Allowance flow by default for all users (#16740)

This commit is contained in:
Vladimir Saric 2023-01-23 17:19:55 +01:00 committed by GitHub
parent af83e120dc
commit f988dc1c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 508 additions and 1308 deletions

View File

@ -6,7 +6,6 @@ SWAPS_USE_DEV_APIS=
NFTS_V1= NFTS_V1=
PUBNUB_PUB_KEY= PUBNUB_PUB_KEY=
PUBNUB_SUB_KEY= PUBNUB_SUB_KEY=
TOKEN_ALLOWANCE_IMPROVEMENTS=
PORTFOLIO_URL= PORTFOLIO_URL=
TRANSACTION_SECURITY_PROVIDER= TRANSACTION_SECURITY_PROVIDER=

View File

@ -12,10 +12,6 @@
"message": "لقد قرأت دولار واحد وأوافق عليه", "message": "لقد قرأت دولار واحد وأوافق عليه",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 يمكن الوصول إلى هذا المبلغ الأقصى وإنفاقه حتى",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessingYourCamera": { "accessingYourCamera": {
"message": "جاري استخدام كاميرتك..." "message": "جاري استخدام كاميرتك..."
}, },

View File

@ -110,10 +110,6 @@
"message": "Ich habe die $1 gelesen und stimme ihnen zu", "message": "Ich habe die $1 gelesen und stimme ihnen zu",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 kann bis zu diesem maximalen Betrag abrufen und ausgeben",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 kann auf dieses Asset zugreifen und es ausgeben", "message": "$1 kann auf dieses Asset zugreifen und es ausgeben",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Genehmigt" "message": "Genehmigt"
}, },
"approvedAmountWithColon": {
"message": "Genehmigter Betrag:"
},
"approvedAsset": { "approvedAsset": {
"message": "Genehmigtes Asset" "message": "Genehmigtes Asset"
}, },
@ -1709,12 +1702,6 @@
"message": "Importiert", "message": "Importiert",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Verbesserte Erfahrung mit der Token-Erlaubnis"
},
"improvedTokenAllowanceDescription": {
"message": "Aktivieren Sie diese Option, um die verbesserte Token-Erlaubnis zu erhalten, wenn ein Dapp eine ERC20-Genehmigung anfordert."
},
"inYourSettings": { "inYourSettings": {
"message": "in Ihren Einstellungen" "message": "in Ihren Einstellungen"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Ethereum Merge ist da!" "message": "Ethereum Merge ist da!"
}, },
"notifications16ActionText": {
"message": "Hier ausprobieren"
},
"notifications16Description": {
"message": "Wir haben unsere Token-Bestätigung neu gestaltet, um Ihnen zu helfen, fundiertere Entscheidungen zu treffen."
},
"notifications16Title": {
"message": "Verbesserte Erfahrung mit der Token-Erlaubnis"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Sicherheits- und Datenschutzeinstellungen anzeigen" "message": "Sicherheits- und Datenschutzeinstellungen anzeigen"
}, },

View File

@ -110,10 +110,6 @@
"message": "Έχω διαβάσει και συμφωνώ με το $1", "message": "Έχω διαβάσει και συμφωνώ με το $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 μπορεί να έχει πρόσβαση και να ξοδέψει μέχρι αυτό το μέγιστο ποσό",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "Το $1 ίσως αποκτήσει πρόσβαση και δαπανήσει αυτό το περιουσιακό στοιχείο", "message": "Το $1 ίσως αποκτήσει πρόσβαση και δαπανήσει αυτό το περιουσιακό στοιχείο",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Εγκρίθηκε" "message": "Εγκρίθηκε"
}, },
"approvedAmountWithColon": {
"message": "Εγκεκριμένο ποσό:"
},
"approvedAsset": { "approvedAsset": {
"message": "Εγκεκριμένο περιουσιακό στοιχείο" "message": "Εγκεκριμένο περιουσιακό στοιχείο"
}, },
@ -1709,12 +1702,6 @@
"message": "Έγινε εισαγωγή", "message": "Έγινε εισαγωγή",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Βελτιωμένη εμπειρία χορήγησης tokens"
},
"improvedTokenAllowanceDescription": {
"message": "Ενεργοποιήστε το για να μεταβείτε στη βελτιωμένη εμπειρία χορήγησης tokens κάθε φορά που μια αποκεντρωμένη εφαρμογή ζητά έγκριση ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "στις Ρυθμίσεις σας" "message": "στις Ρυθμίσεις σας"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Η συγχώνευση στο Ethereum είναι εδώ!" "message": "Η συγχώνευση στο Ethereum είναι εδώ!"
}, },
"notifications16ActionText": {
"message": "Δοκιμάστε το εδώ"
},
"notifications16Description": {
"message": "Επανασχεδιάσαμε την επιβεβαίωση χορήγησης tokens για να σας βοηθήσουμε να λάβετε πιο συνειδητές αποφάσεις."
},
"notifications16Title": {
"message": "Βελτιωμένη εμπειρία χορήγησης tokens"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Εμφάνιση ρυθμίσεων Ασφάλειας & Απορρήτου" "message": "Εμφάνιση ρυθμίσεων Ασφάλειας & Απορρήτου"
}, },

View File

@ -110,10 +110,6 @@
"message": "I have read and agree to the $1", "message": "I have read and agree to the $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 may access and spend up to this max amount",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 may access and spend this asset", "message": "$1 may access and spend this asset",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Approved" "message": "Approved"
}, },
"approvedAmountWithColon": {
"message": "Approved amount:"
},
"approvedAsset": { "approvedAsset": {
"message": "Approved asset" "message": "Approved asset"
}, },
@ -1722,12 +1715,6 @@
"message": "Imported", "message": "Imported",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Improved token allowance experience"
},
"improvedTokenAllowanceDescription": {
"message": "Turn this on to go through the improved token allowance experience whenever a dapp requests an ERC20 approve"
},
"inYourSettings": { "inYourSettings": {
"message": "in your Settings" "message": "in your Settings"
}, },
@ -2420,15 +2407,6 @@
"notifications15Title": { "notifications15Title": {
"message": "The Ethereum Merge is here!" "message": "The Ethereum Merge is here!"
}, },
"notifications16ActionText": {
"message": "Try it out here"
},
"notifications16Description": {
"message": "We redesigned our token allowance confirmation to help you make more informed decisions."
},
"notifications16Title": {
"message": "Improved token allowance experience"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Show Security & Privacy settings" "message": "Show Security & Privacy settings"
}, },

View File

@ -110,10 +110,6 @@
"message": "Leí y estoy de acuerdo con $1", "message": "Leí y estoy de acuerdo con $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 puede acceder y gastar hasta este importe máximo",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 puede acceder y gastar este activo", "message": "$1 puede acceder y gastar este activo",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Aprobado" "message": "Aprobado"
}, },
"approvedAmountWithColon": {
"message": "Monto aprobado:"
},
"approvedAsset": { "approvedAsset": {
"message": "Activo aprobado" "message": "Activo aprobado"
}, },
@ -1709,12 +1702,6 @@
"message": "Importado", "message": "Importado",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Experiencia mejorada de asignación de tokens"
},
"improvedTokenAllowanceDescription": {
"message": "Actívelo para pasar por la experiencia de asignación de token mejorada cada vez que una dapp solicite una aprobación ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "en su Configuración" "message": "en su Configuración"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "¡La Fusión de Ethereum está aquí!" "message": "¡La Fusión de Ethereum está aquí!"
}, },
"notifications16ActionText": {
"message": "Inténtelo aquí"
},
"notifications16Description": {
"message": "Rediseñamos nuestra confirmación de asignación de tokens para ayudarlo a tomar decisiones más informadas."
},
"notifications16Title": {
"message": "Experiencia mejorada de asignación de tokens"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Mostrar configuración de seguridad y privacidad" "message": "Mostrar configuración de seguridad y privacidad"
}, },

View File

@ -51,10 +51,6 @@
"message": "Leí y estoy de acuerdo con $1", "message": "Leí y estoy de acuerdo con $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 puede acceder y gastar hasta este importe máximo",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessingYourCamera": { "accessingYourCamera": {
"message": "Accediendo a la cámara..." "message": "Accediendo a la cámara..."
}, },
@ -237,9 +233,6 @@
"approved": { "approved": {
"message": "Aprobado" "message": "Aprobado"
}, },
"approvedAmountWithColon": {
"message": "Monto aprobado:"
},
"asset": { "asset": {
"message": "Activo" "message": "Activo"
}, },

View File

@ -110,10 +110,6 @@
"message": "Jai lu et jaccepte les $1", "message": "Jai lu et jaccepte les $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 peut accéder et dépenser jusquà ce montant maximal",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 peut accéder à cet actif et le dépenser", "message": "$1 peut accéder à cet actif et le dépenser",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Approuvé" "message": "Approuvé"
}, },
"approvedAmountWithColon": {
"message": "Montant approuvé:"
},
"approvedAsset": { "approvedAsset": {
"message": "Actif approuvé" "message": "Actif approuvé"
}, },
@ -1709,12 +1702,6 @@
"message": "Importé", "message": "Importé",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Amélioration du processus dapprobation des jetons"
},
"improvedTokenAllowanceDescription": {
"message": "Activez cette option si vous voulez lancer le processus amélioré dapprobation des jetons chaque fois quune dApp demande lapprobation de jetons ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "dans vos paramètres" "message": "dans vos paramètres"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "La fusion Ethereum est en marche !" "message": "La fusion Ethereum est en marche !"
}, },
"notifications16ActionText": {
"message": "Essayez-le"
},
"notifications16Description": {
"message": "Nous avons amélioré le processus dapprobation des jetons pour vous aider à prendre des décisions plus éclairées."
},
"notifications16Title": {
"message": "Amélioration du processus dapprobation des jetons"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Afficher les paramètres de sécurité et de confidentialité" "message": "Afficher les paramètres de sécurité et de confidentialité"
}, },

View File

@ -110,10 +110,6 @@
"message": "मैंने $1 पढ़ लिया है और मैं सहमत हूं", "message": "मैंने $1 पढ़ लिया है और मैं सहमत हूं",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 इस अधिकतम राशि तक पहुंच सकते हैं और खर्च कर सकते हैं",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 एक्सेस कर सकता है और इस एसेट को खर्च कर सकता है", "message": "$1 एक्सेस कर सकता है और इस एसेट को खर्च कर सकता है",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "अनुमोदित" "message": "अनुमोदित"
}, },
"approvedAmountWithColon": {
"message": "स्वीकृत राशि:"
},
"approvedAsset": { "approvedAsset": {
"message": "स्वीकृत एसेट" "message": "स्वीकृत एसेट"
}, },
@ -1709,12 +1702,6 @@
"message": "आयातित", "message": "आयातित",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "बेहतर टोकन भत्ता अनुभव"
},
"improvedTokenAllowanceDescription": {
"message": "जब भी कोई डैप ERC20 स्वीकृति का अनुरोध करता है तो बेहतर टोकन भत्ता अनुभव प्राप्त करने के लिए इसे चालू करें"
},
"inYourSettings": { "inYourSettings": {
"message": "आपके सेटिंग्स में" "message": "आपके सेटिंग्स में"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "इथेरियम मर्ज यहाँ है!" "message": "इथेरियम मर्ज यहाँ है!"
}, },
"notifications16ActionText": {
"message": "इसे यहां आजमाएं"
},
"notifications16Description": {
"message": "अधिक सूचित निर्णय लेने में आपकी सहायता करने के लिए हमने अपने टोकन भत्ता पुष्टिकरण को फिर से डिजाइन किया।"
},
"notifications16Title": {
"message": "बेहतर टोकन भत्ता अनुभव"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "सुरक्षा और गोपनीयता सेटिंग्स को दिखाएं" "message": "सुरक्षा और गोपनीयता सेटिंग्स को दिखाएं"
}, },

View File

@ -110,10 +110,6 @@
"message": "Saya telah membaca dan menyetujui $1", "message": "Saya telah membaca dan menyetujui $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 dapat diakses dan digunakan hingga jumlah maksimum ini",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 dapat mengakses dan membelanjakan aset ini", "message": "$1 dapat mengakses dan membelanjakan aset ini",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Disetujui" "message": "Disetujui"
}, },
"approvedAmountWithColon": {
"message": "Jumlah yang disetujui:"
},
"approvedAsset": { "approvedAsset": {
"message": "Aset yang disetujui" "message": "Aset yang disetujui"
}, },
@ -1709,12 +1702,6 @@
"message": "Diimpor", "message": "Diimpor",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Peningkatan pengalaman tunjangan token"
},
"improvedTokenAllowanceDescription": {
"message": "Aktifkan ini untuk memperoleh peningkatan pengalaman tunjangan token setiap kali aplikasi terdesentralisasi (dapp) meminta persetujuan ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "di Pengaturan Anda" "message": "di Pengaturan Anda"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Penggabungan Ethereum telah tiba!" "message": "Penggabungan Ethereum telah tiba!"
}, },
"notifications16ActionText": {
"message": "Cobalah di sini"
},
"notifications16Description": {
"message": "Kami mendesain ulang konfirmasi tunjangan token kami untuk membantu Anda membuat keputusan yang lebih tepat."
},
"notifications16Title": {
"message": "Peningkatan pengalaman tunjangan token"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Tampilkan pengaturan Keamanan & Privasi" "message": "Tampilkan pengaturan Keamanan & Privasi"
}, },

View File

@ -92,10 +92,6 @@
"message": "Ho letto e accetto i $1", "message": "Ho letto e accetto i $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 può avere accesso e spendere al massimo",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 può accedere e spendere questa risorsa", "message": "$1 può accedere e spendere questa risorsa",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -316,9 +312,6 @@
"approved": { "approved": {
"message": "Approvato" "message": "Approvato"
}, },
"approvedAmountWithColon": {
"message": "Importo approvato:"
},
"approvedAsset": { "approvedAsset": {
"message": "Asset approvato" "message": "Asset approvato"
}, },

View File

@ -110,10 +110,6 @@
"message": "$1を読んで同意しました", "message": "$1を読んで同意しました",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1はアクセスしてこの最大量まで消費できます",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 はこのアセットにアクセスし、使用できます", "message": "$1 はこのアセットにアクセスし、使用できます",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "承認済み" "message": "承認済み"
}, },
"approvedAmountWithColon": {
"message": "承認された金額:"
},
"approvedAsset": { "approvedAsset": {
"message": "承認済みのアセット" "message": "承認済みのアセット"
}, },
@ -1709,12 +1702,6 @@
"message": "インポート済み", "message": "インポート済み",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "改善されたトークンの許可設定"
},
"improvedTokenAllowanceDescription": {
"message": "これをオンにすると、DApp が ERC20 の承認を求めた際に、改善されたトークン許可設定が利用できます"
},
"inYourSettings": { "inYourSettings": {
"message": "設定で" "message": "設定で"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Ethereum のマージ (Merge) が完了しました!" "message": "Ethereum のマージ (Merge) が完了しました!"
}, },
"notifications16ActionText": {
"message": "こちらでお試しください"
},
"notifications16Description": {
"message": "より多くの情報に基づき決定を下せるよう、トークン許可設定の確認のデザインを変更しました。"
},
"notifications16Title": {
"message": "改善されたトークン許可設定"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "セキュリティおよびプライバシー設定を表示" "message": "セキュリティおよびプライバシー設定を表示"
}, },

View File

@ -110,10 +110,6 @@
"message": "$1의 내용을 읽고 이에 동의합니다.", "message": "$1의 내용을 읽고 이에 동의합니다.",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1의 경우, 이 최대 금액까지 액세스 및 지출할 수 있습니다.",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1(은)는 이 자산에 접근하여 사용할 수 있습니다", "message": "$1(은)는 이 자산에 접근하여 사용할 수 있습니다",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "승인됨" "message": "승인됨"
}, },
"approvedAmountWithColon": {
"message": "승인 금액:"
},
"approvedAsset": { "approvedAsset": {
"message": "승인된 자산" "message": "승인된 자산"
}, },
@ -1709,12 +1702,6 @@
"message": "가져옴", "message": "가져옴",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "토큰 허용 기능이 개선되었습니다"
},
"improvedTokenAllowanceDescription": {
"message": "Dapp에서 ERC20 승인을 요청할 때마다 이 기능을 켜시면 토큰 허용 기능을 이용할 수 있습니다"
},
"inYourSettings": { "inYourSettings": {
"message": "설정에서" "message": "설정에서"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "이더리움 머지가 완료되었습니다!" "message": "이더리움 머지가 완료되었습니다!"
}, },
"notifications16ActionText": {
"message": "여기서 체험하세요"
},
"notifications16Description": {
"message": "토큰 허용 확인 과정을 재설계하여 사용자가 정보에 의한 결정을 할 수 있도록 하였습니다."
},
"notifications16Title": {
"message": "토큰 허용 경험 개선됨"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "보안 및 개인정보 설정 표시" "message": "보안 및 개인정보 설정 표시"
}, },

View File

@ -6,10 +6,6 @@
"message": "Nabasa ko at sumasang-ayon ako sa $1", "message": "Nabasa ko at sumasang-ayon ako sa $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "Maaaring i-access ng $1 ang max na halagang ito at gumastos hanggang sa max na halagang ito",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessingYourCamera": { "accessingYourCamera": {
"message": "Ina-access ang iyong camera..." "message": "Ina-access ang iyong camera..."
}, },

View File

@ -110,10 +110,6 @@
"message": "Eu li e concordo com os $1", "message": "Eu li e concordo com os $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 pode acessar e gastar até esse valor máximo",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 pode(m) acessar e usar esse ativo", "message": "$1 pode(m) acessar e usar esse ativo",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Aprovado" "message": "Aprovado"
}, },
"approvedAmountWithColon": {
"message": "Valor aprovado:"
},
"approvedAsset": { "approvedAsset": {
"message": "Ativo aprovado" "message": "Ativo aprovado"
}, },
@ -1709,12 +1702,6 @@
"message": "Importado", "message": "Importado",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Experiência aprimorada nas permissões de tokens"
},
"improvedTokenAllowanceDescription": {
"message": "Ative para ter a experiência aprimorada nas permissões de tokens sempre que um dapp solicitar uma aprovação de ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "em suas Configurações" "message": "em suas Configurações"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "A fusão do Ethereum chegou!" "message": "A fusão do Ethereum chegou!"
}, },
"notifications16ActionText": {
"message": "Teste aqui"
},
"notifications16Description": {
"message": "Reprojetamos nossa confirmação de permissões de token para ajudar você a tomar decisões mais informadas."
},
"notifications16Title": {
"message": "Experiência aprimorada nas permissões de tokens"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Mostrar configurações de segurança e privacidade" "message": "Mostrar configurações de segurança e privacidade"
}, },

View File

@ -51,10 +51,6 @@
"message": "Eu li e concordo com os $1", "message": "Eu li e concordo com os $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 pode acessar e gastar até esse valor máximo",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessingYourCamera": { "accessingYourCamera": {
"message": "Acessando sua câmera..." "message": "Acessando sua câmera..."
}, },
@ -237,9 +233,6 @@
"approved": { "approved": {
"message": "Aprovado" "message": "Aprovado"
}, },
"approvedAmountWithColon": {
"message": "Valor aprovado:"
},
"asset": { "asset": {
"message": "Ativo" "message": "Ativo"
}, },

View File

@ -110,10 +110,6 @@
"message": "Я прочитал(-а) $1 и согласен(-на) с ними", "message": "Я прочитал(-а) $1 и согласен(-на) с ними",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 может получить доступ и потратить до этой максимальной суммы",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 может получить доступ к этому активу и потратить его", "message": "$1 может получить доступ к этому активу и потратить его",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Одобрен" "message": "Одобрен"
}, },
"approvedAmountWithColon": {
"message": "Одобренная сумма:"
},
"approvedAsset": { "approvedAsset": {
"message": "Одобренный актив" "message": "Одобренный актив"
}, },
@ -1709,12 +1702,6 @@
"message": "Импортирован", "message": "Импортирован",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Улучшенный опыт предоставления токенов"
},
"improvedTokenAllowanceDescription": {
"message": "Включите этот параметр, чтобы воспользоваться улучшенным доступом к токенам всякий раз, когда децентрализованное приложение запрашивает одобрение ERC20."
},
"inYourSettings": { "inYourSettings": {
"message": "в ваших Настройках" "message": "в ваших Настройках"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Ethereum Merge уже досутпно!" "message": "Ethereum Merge уже досутпно!"
}, },
"notifications16ActionText": {
"message": "Попробуйте это здесь"
},
"notifications16Description": {
"message": "Мы переработали наше подтверждение допустимых токенов, чтобы помочь вам принимать более обоснованные решения."
},
"notifications16Title": {
"message": "Улучшенный опыт предоставления токенов"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Показать настройки безопасности и конфиденциальности" "message": "Показать настройки безопасности и конфиденциальности"
}, },

View File

@ -110,10 +110,6 @@
"message": "Nabasa ko at sumasang-ayon ako sa $1", "message": "Nabasa ko at sumasang-ayon ako sa $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "Maaaring i-access ng $1 ang max na halagang ito at gumastos hanggang sa max na halagang ito",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 maaaring i-access at gamitin ang asset na ito", "message": "$1 maaaring i-access at gamitin ang asset na ito",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Inaprubahan" "message": "Inaprubahan"
}, },
"approvedAmountWithColon": {
"message": "Inaprubahang halaga:"
},
"approvedAsset": { "approvedAsset": {
"message": "Aprubadong asset" "message": "Aprubadong asset"
}, },
@ -1709,12 +1702,6 @@
"message": "Na-import", "message": "Na-import",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Pinahusay na karanasan sa allowance ng token"
},
"improvedTokenAllowanceDescription": {
"message": "I-on ito para dumaan sa pinahusay na karanasan sa allowance ng token tuwing humihiling ang isang dapp na aprubahan ng ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "sa iyong Mga Setting" "message": "sa iyong Mga Setting"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Narito na ang Ethereum Merge!" "message": "Narito na ang Ethereum Merge!"
}, },
"notifications16ActionText": {
"message": "Subukan ito dito"
},
"notifications16Description": {
"message": "Muli naming idinisenyo ang aming kumpirmasyon ng allowance ng token upang matulungan kang gumawa ng mas matalinong mga desisyon."
},
"notifications16Title": {
"message": "Pinahusay na karanasan sa allowance ng token"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Ipakita ang mga setting ng Seguridad at Pagkapribado" "message": "Ipakita ang mga setting ng Seguridad at Pagkapribado"
}, },

View File

@ -110,10 +110,6 @@
"message": "$1 bölümünü okudum ve kabul ediyorum", "message": "$1 bölümünü okudum ve kabul ediyorum",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 bu maksimum tutara kadar erişim sağlayabilir ve harcama yapabilir",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 bu varlığa erişebilir ve harcayabilir", "message": "$1 bu varlığa erişebilir ve harcayabilir",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Onaylandı" "message": "Onaylandı"
}, },
"approvedAmountWithColon": {
"message": "Onaylanan tutar:"
},
"approvedAsset": { "approvedAsset": {
"message": "Onaylanan varlık" "message": "Onaylanan varlık"
}, },
@ -1709,12 +1702,6 @@
"message": "İçe Aktarıldı", "message": "İçe Aktarıldı",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Gelişmiş token hakediş deneyimi"
},
"improvedTokenAllowanceDescription": {
"message": "Merkeziyetsiz bir uygulama ERC20 onayı istediğinde gelişmiş token hakediş deneyimini kullanmak için bunu açın"
},
"inYourSettings": { "inYourSettings": {
"message": "Ayarlar kısmında" "message": "Ayarlar kısmında"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Ethereum Birleşmesi başladı!" "message": "Ethereum Birleşmesi başladı!"
}, },
"notifications16ActionText": {
"message": "Burada dene"
},
"notifications16Description": {
"message": "Token hakediş onayımızı daha bilgiye dayalı kararlar almanıza yardımcı olacak şekilde yeniden tasarladık."
},
"notifications16Title": {
"message": "Gelişmiş token hakedişi deneyimi"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Güvenlik ve Gizlilik ayarlarını göster" "message": "Güvenlik ve Gizlilik ayarlarını göster"
}, },

View File

@ -110,10 +110,6 @@
"message": "Tôi đã đọc và đồng ý với $1", "message": "Tôi đã đọc và đồng ý với $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 có thể truy cập và chi tiêu đến số tiền tối đa",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1 có thể truy cập và chi tiêu tài sản này", "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" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "Đã phê duyệt" "message": "Đã phê duyệt"
}, },
"approvedAmountWithColon": {
"message": "Số tiền được duyệt:"
},
"approvedAsset": { "approvedAsset": {
"message": "Tài sản được chấp nhận" "message": "Tài sản được chấp nhận"
}, },
@ -1709,12 +1702,6 @@
"message": "Đã nhập", "message": "Đã nhập",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "Trải nghiệm cho phép token được cải thiện"
},
"improvedTokenAllowanceDescription": {
"message": "Bật tính năng này để có trải nghiệm cho phép token được cải thiện mỗi khi có một dapp yêu cầu phê duyệt ERC20"
},
"inYourSettings": { "inYourSettings": {
"message": "trong phần Cài đặt" "message": "trong phần Cài đặt"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "Hợp nhất Ethereum đã được triển khai!" "message": "Hợp nhất Ethereum đã được triển khai!"
}, },
"notifications16ActionText": {
"message": "Dùng thử tại đây"
},
"notifications16Description": {
"message": "Chúng tôi đã thiết kế lại xác nhận cho phép token để giúp bạn đưa ra quyết định sáng suốt hơn."
},
"notifications16Title": {
"message": "Trải nghiệm cho phép token được cải thiện"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "Hiển thị cài đặt Bảo mật và Quyền riêng tư" "message": "Hiển thị cài đặt Bảo mật và Quyền riêng tư"
}, },

View File

@ -110,10 +110,6 @@
"message": "我已阅读并同意 $1", "message": "我已阅读并同意 $1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 可以访问并使用此最大金额",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessAndSpendNoticeNFT": { "accessAndSpendNoticeNFT": {
"message": "$1可以访问并使用此资产", "message": "$1可以访问并使用此资产",
"description": "$1 is the url of the site requesting ability to spend" "description": "$1 is the url of the site requesting ability to spend"
@ -388,9 +384,6 @@
"approved": { "approved": {
"message": "已批准" "message": "已批准"
}, },
"approvedAmountWithColon": {
"message": "已批准金额:"
},
"approvedAsset": { "approvedAsset": {
"message": "已获批准的资产" "message": "已获批准的资产"
}, },
@ -1709,12 +1702,6 @@
"message": "已导入", "message": "已导入",
"description": "status showing that an account has been fully loaded into the keyring" "description": "status showing that an account has been fully loaded into the keyring"
}, },
"improvedTokenAllowance": {
"message": "经过改进的代币津贴体验"
},
"improvedTokenAllowanceDescription": {
"message": "每当分布式应用请求 ERC20 批准时,打开此项以查看经过改进的代币津贴体验"
},
"inYourSettings": { "inYourSettings": {
"message": "在设置中" "message": "在设置中"
}, },
@ -2398,15 +2385,6 @@
"notifications15Title": { "notifications15Title": {
"message": "以太坊合并来了!" "message": "以太坊合并来了!"
}, },
"notifications16ActionText": {
"message": "在此处尝试"
},
"notifications16Description": {
"message": "我们重新设计了代币津贴确认,助您作出更明智的决策。"
},
"notifications16Title": {
"message": "经过改进的代币津贴体验"
},
"notifications17ActionText": { "notifications17ActionText": {
"message": "显示安全和隐私设置" "message": "显示安全和隐私设置"
}, },

View File

@ -6,10 +6,6 @@
"message": "我已閱讀並同意$1", "message": "我已閱讀並同意$1",
"description": "$1 is the `terms` message" "description": "$1 is the `terms` message"
}, },
"accessAndSpendNotice": {
"message": "$1 可能會存取並最多花費以下額度",
"description": "$1 is the url of the site requesting ability to spend"
},
"accessingYourCamera": { "accessingYourCamera": {
"message": "正在存取您的攝影鏡頭..." "message": "正在存取您的攝影鏡頭..."
}, },

View File

@ -66,7 +66,6 @@ export default class PreferencesController {
ledgerTransportType: window.navigator.hid ledgerTransportType: window.navigator.hid
? LedgerTransportTypes.webhid ? LedgerTransportTypes.webhid
: LedgerTransportTypes.u2f, : LedgerTransportTypes.u2f,
improvedTokenAllowanceEnabled: false,
transactionSecurityCheckEnabled: false, transactionSecurityCheckEnabled: false,
theme: THEME_TYPE.OS, theme: THEME_TYPE.OS,
...opts.initState, ...opts.initState,
@ -195,17 +194,6 @@ export default class PreferencesController {
this.store.updateState({ theme: val }); this.store.updateState({ theme: val });
} }
/**
* Setter for the `improvedTokenAllowanceEnabled` property
*
* @param improvedTokenAllowanceEnabled
*/
setImprovedTokenAllowanceEnabled(improvedTokenAllowanceEnabled) {
this.store.updateState({
improvedTokenAllowanceEnabled,
});
}
/** /**
* Setter for the `transactionSecurityCheckEnabled` property * Setter for the `transactionSecurityCheckEnabled` property
* *

View File

@ -1802,10 +1802,6 @@ export default class MetamaskController extends EventEmitter {
preferencesController, preferencesController,
), ),
setTheme: preferencesController.setTheme.bind(preferencesController), setTheme: preferencesController.setTheme.bind(preferencesController),
setImprovedTokenAllowanceEnabled:
preferencesController.setImprovedTokenAllowanceEnabled.bind(
preferencesController,
),
setTransactionSecurityCheckEnabled: setTransactionSecurityCheckEnabled:
preferencesController.setTransactionSecurityCheckEnabled.bind( preferencesController.setTransactionSecurityCheckEnabled.bind(
preferencesController, preferencesController,

View File

@ -78,10 +78,6 @@ export const UI_NOTIFICATIONS = {
id: 15, id: 15,
date: '2022-09-15', date: '2022-09-15',
}, },
16: {
id: 16,
date: null,
},
17: { 17: {
id: 17, id: 17,
date: null, date: null,
@ -232,17 +228,6 @@ export const getTranslatedUINotifications = (t, locale) => {
) )
: '', : '',
}, },
16: {
...UI_NOTIFICATIONS[16],
title: t('notifications16Title'),
description: t('notifications16Description'),
actionText: t('notifications16ActionText'),
date: UI_NOTIFICATIONS[16].date
? new Intl.DateTimeFormat(formattedLocale).format(
new Date(UI_NOTIFICATIONS[16].date),
)
: '',
},
17: { 17: {
...UI_NOTIFICATIONS[17], ...UI_NOTIFICATIONS[17],
title: t('notifications17Title'), title: t('notifications17Title'),

View File

@ -106,11 +106,6 @@ function defaultFixture() {
id: 15, id: 15,
isShown: false, isShown: false,
}, },
16: {
date: null,
id: 16,
isShown: true,
},
17: { 17: {
date: null, date: null,
id: 17, id: 17,

View File

@ -474,136 +474,6 @@ describe('MetaMask', function () {
}); });
}); });
describe('Approves a custom token from dapp', function () {
it('approves an already created token', async function () {
const windowHandles = await driver.getAllWindowHandles();
const extension = windowHandles[0];
const dapp = await driver.switchToWindowWithTitle(
'E2E Test Dapp',
windowHandles,
);
await driver.closeAllWindowHandlesExcept([extension, dapp]);
await driver.delay(regularDelayMs);
await driver.switchToWindow(dapp);
await driver.delay(tinyDelayMs);
await driver.clickElement({ text: 'Approve Tokens', tag: 'button' });
await driver.switchToWindow(extension);
await driver.delay(regularDelayMs);
await driver.wait(async () => {
const pendingTxes = await driver.findElements(
'.transaction-list__pending-transactions .transaction-list-item',
);
return pendingTxes.length === 1;
}, 10000);
await driver.waitForSelector({
// Selects only the very first transaction list item immediately following the 'Pending' header
css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading',
text: 'Approve TST spend limit',
});
await driver.clickElement('.transaction-list-item');
await driver.delay(regularDelayMs);
});
it('displays the token approval data', async function () {
await driver.clickElement({
text: 'View full transaction details',
css: '.confirm-approve-content__small-blue-text',
});
const functionType = await driver.findElement(
'.confirm-approve-content__data .confirm-approve-content__small-text',
);
const functionTypeText = await functionType.getText();
assert.equal(functionTypeText, 'Function: Approve');
const confirmDataDiv = await driver.findElement(
'.confirm-approve-content__data__data-block',
);
const confirmDataText = await confirmDataDiv.getText();
assert(
confirmDataText.match(
/0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef4/u,
),
);
});
it('customizes gas', async function () {
await driver.clickElement('.confirm-approve-content__small-blue-text');
await driver.delay(regularDelayMs);
await driver.clickElement({
text: 'Edit suggested gas fee',
tag: 'button',
});
await driver.delay(regularDelayMs);
const [gasLimitInput, gasPriceInput] = await driver.findElements(
'input[type="number"]',
);
await gasPriceInput.fill('10');
await driver.delay(50);
await gasLimitInput.fill('60001');
await driver.delay(veryLargeDelayMs);
await driver.clickElement({ text: 'Save', tag: 'button' });
await driver.delay(veryLargeDelayMs);
const gasFeeInEth = await driver.findElement(
'.confirm-approve-content__transaction-details-content__secondary-fee',
);
assert.equal(await gasFeeInEth.getText(), '0.0006 ETH');
});
it('edits the permission', async function () {
const editButtons = await driver.findClickableElements(
'.confirm-approve-content__small-blue-text',
);
await editButtons[2].click();
// wait for permission modal to be visible
const permissionModal = await driver.findVisibleElement('span .modal');
const radioButtons = await driver.findClickableElements(
'.edit-approval-permission__edit-section__radio-button',
);
await radioButtons[1].click();
await driver.fill('input', '5');
await driver.delay(regularDelayMs);
await driver.clickElement({ text: 'Save', tag: 'button' });
await driver.delay(veryLargeDelayMs);
// wait for permission modal to be removed from DOM.
await permissionModal.waitForElementState('hidden');
const permissionInfo = await driver.findElements(
'.confirm-approve-content__medium-text',
);
const amountDiv = permissionInfo[0];
assert.equal(await amountDiv.getText(), '5 TST');
});
it('submits the transaction', async function () {
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.delay(regularDelayMs);
});
it('finds the transaction in the transactions list', async function () {
await driver.waitForSelector({
// Select only the heading of the first entry in the transaction list.
css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve TST spend limit',
});
});
});
describe('Transfers a custom token from dapp when no gas value is specified', function () { describe('Transfers a custom token from dapp when no gas value is specified', function () {
it('transfers an already created token, without specifying gas', async function () { it('transfers an already created token, without specifying gas', async function () {
const windowHandles = await driver.getAllWindowHandles(); const windowHandles = await driver.getAllWindowHandles();
@ -660,69 +530,4 @@ describe('MetaMask', function () {
}); });
}); });
}); });
describe('Approves a custom token from dapp when no gas value is specified', function () {
it('approves an already created token', async function () {
const windowHandles = await driver.getAllWindowHandles();
const extension = windowHandles[0];
const dapp = await driver.switchToWindowWithTitle(
'E2E Test Dapp',
windowHandles,
);
await driver.closeAllWindowHandlesExcept([extension, dapp]);
await driver.delay(regularDelayMs);
await driver.switchToWindow(dapp);
await driver.delay(tinyDelayMs);
await driver.clickElement({
text: 'Approve Tokens Without Gas',
tag: 'button',
});
await driver.switchToWindow(extension);
await driver.delay(regularDelayMs);
await driver.wait(async () => {
const pendingTxes = await driver.findElements(
'.transaction-list__pending-transactions .transaction-list-item',
);
return pendingTxes.length === 1;
}, 10000);
await driver.waitForSelector({
// Selects only the very first transaction list item immediately following the 'Pending' header
css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading',
text: 'Approve TST spend limit',
});
await driver.clickElement('.transaction-list-item');
await driver.delay(regularDelayMs);
});
it('shows the correct recipient', async function () {
await driver.clickElement({
text: 'View full transaction details',
css: '.confirm-approve-content__small-blue-text',
});
const permissionInfo = await driver.findElements(
'.confirm-approve-content__medium-text',
);
const recipientDiv = permissionInfo[1];
assert.equal(await recipientDiv.getText(), '0x2f318C33...C970');
});
it('submits the transaction', async function () {
await driver.delay(veryLargeDelayMs);
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.delay(regularDelayMs);
});
it('finds the transaction in the transactions list', async function () {
await driver.waitForSelector({
css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve TST spend limit',
});
});
});
}); });

View File

@ -1,15 +1,11 @@
/* eslint-disable mocha/no-skipped-tests */
const { strict: assert } = require('assert'); const { strict: assert } = require('assert');
const { const { convertToHexValue, withFixtures } = require('../helpers');
convertToHexValue,
withFixtures,
getWindowHandles,
} = require('../helpers');
const FixtureBuilder = require('../fixture-builder'); const FixtureBuilder = require('../fixture-builder');
const { SMART_CONTRACTS } = require('../seeder/smart-contracts');
describe.skip('Create token, approve token and approve token without gas', function () { describe('Create token, approve token and approve token without gas', function () {
describe('Add a custom token from a dapp', function () { const smartContract = SMART_CONTRACTS.HST;
const ganacheOptions = { const ganacheOptions = {
accounts: [ accounts: [
{ {
@ -20,7 +16,7 @@ describe.skip('Create token, approve token and approve token without gas', funct
], ],
}; };
it('creates, imports and renders the balance for the new token', async function () { it('imports and renders the balance for the new token', async function () {
await withFixtures( await withFixtures(
{ {
dapp: true, dapp: true,
@ -28,40 +24,27 @@ describe.skip('Create token, approve token and approve token without gas', funct
.withPermissionControllerConnectedToTestDapp() .withPermissionControllerConnectedToTestDapp()
.build(), .build(),
ganacheOptions, ganacheOptions,
smartContract,
title: this.test.title, title: this.test.title,
}, },
async ({ driver }) => { async ({ driver, contractRegistry }) => {
const contractAddress = await contractRegistry.getContractAddress(
smartContract,
);
await driver.navigate(); await driver.navigate();
await driver.fill('#password', 'correct horse battery staple'); await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER); await driver.press('#password', driver.Key.ENTER);
// create token // create token
await driver.openNewPage(`http://127.0.0.1:8080/`); await driver.openNewPage(
await driver.waitForSelector({ text: 'Create Token', tag: 'button' }); `http://127.0.0.1:8080/?contract=${contractAddress}`,
await driver.clickElement({ text: 'Create Token', tag: 'button' }); );
const windowHandles = await getWindowHandles(driver, 3); const windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindow(windowHandles.popup); const extension = windowHandles[0];
await driver.clickElement({ text: 'Edit', tag: 'button' });
const inputs = await driver.findElements('input[type="number"]');
const gasLimitInput = inputs[0];
const gasPriceInput = inputs[1];
await gasLimitInput.fill('4700000');
await gasPriceInput.fill('20');
await driver.waitForSelector({ text: 'Save', tag: 'button' });
await driver.clickElement({ text: 'Save', tag: 'button' });
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.switchToWindow(windowHandles.dapp);
const tokenContractAddress = await driver.waitForSelector({
css: '#tokenAddress',
text: '0x',
});
const tokenAddress = await tokenContractAddress.getText();
// imports custom token from extension // imports custom token from extension
await driver.switchToWindow(windowHandles.extension); await driver.switchToWindow(extension);
await driver.clickElement(`[data-testid="home__asset-tab"]`); await driver.clickElement(`[data-testid="home__asset-tab"]`);
await driver.clickElement({ tag: 'button', text: 'Assets' }); await driver.clickElement({ tag: 'button', text: 'Assets' });
@ -70,9 +53,7 @@ describe.skip('Create token, approve token and approve token without gas', funct
text: 'Custom token', text: 'Custom token',
tag: 'button', tag: 'button',
}); });
await driver.waitForSelector('#custom-address'); await driver.fill('#custom-address', contractAddress);
await driver.fill('#custom-address', tokenAddress);
await driver.waitForSelector('#custom-symbol');
await driver.waitForSelector('#custom-decimals'); await driver.waitForSelector('#custom-decimals');
await driver.delay(2000); await driver.delay(2000);
@ -88,7 +69,6 @@ describe.skip('Create token, approve token and approve token without gas', funct
}); });
// renders balance for newly created token // renders balance for newly created token
await driver.waitForSelector('.app-header__logo-container');
await driver.clickElement('.app-header__logo-container'); await driver.clickElement('.app-header__logo-container');
await driver.clickElement({ tag: 'button', text: 'Assets' }); await driver.clickElement({ tag: 'button', text: 'Assets' });
const asset = await driver.waitForSelector({ const asset = await driver.waitForSelector({
@ -99,20 +79,7 @@ describe.skip('Create token, approve token and approve token without gas', funct
}, },
); );
}); });
});
describe('Approves a custom token from dapp', function () {
let windowHandles;
const ganacheOptions = {
accounts: [
{
secretKey:
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
balance: convertToHexValue(25000000000000000000),
},
],
};
it('approves an already created token and displays the token approval data', async function () { it('approves an already created token and displays the token approval data', async function () {
await withFixtures( await withFixtures(
{ {
@ -121,41 +88,70 @@ describe.skip('Create token, approve token and approve token without gas', funct
.withPermissionControllerConnectedToTestDapp() .withPermissionControllerConnectedToTestDapp()
.build(), .build(),
ganacheOptions, ganacheOptions,
smartContract,
title: this.test.title, title: this.test.title,
}, },
async ({ driver }) => { async ({ driver, contractRegistry }) => {
const contractAddress = await contractRegistry.getContractAddress(
smartContract,
);
await driver.navigate(); await driver.navigate();
await driver.fill('#password', 'correct horse battery staple'); await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER); await driver.press('#password', driver.Key.ENTER);
await driver.openNewPage(`http://127.0.0.1:8080/`); // create token
await driver.openNewPage(
await driver.waitForSelector({ text: 'Create Token', tag: 'button' }); `http://127.0.0.1:8080/?contract=${contractAddress}`,
await driver.clickElement({ text: 'Create Token', tag: 'button' });
windowHandles = await getWindowHandles(driver, 3);
await driver.switchToWindow(windowHandles.popup);
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.switchToWindow(windowHandles.dapp);
await driver.waitForSelector({
text: 'Approve Tokens',
tag: 'button',
});
await driver.clickElement({ text: 'Approve Tokens', tag: 'button' });
// displays the token approval data
// switch to popup
windowHandles = await getWindowHandles(driver, 3);
await driver.switchToWindow(windowHandles.popup);
const functionType = await driver.findElement(
'.confirm-approve-content__data .confirm-approve-content__small-text',
); );
await driver.scrollToElement(functionType); let windowHandles = await driver.getAllWindowHandles();
const functionTypeText = await functionType.getText(); const extension = windowHandles[0];
assert.equal(functionTypeText, 'Function: Approve');
await driver.findClickableElement('#deployButton');
// approve token from dapp
await driver.clickElement({ text: 'Approve Tokens', tag: 'button' });
await driver.waitUntilXWindowHandles(3);
windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindowWithTitle(
'MetaMask Notification',
windowHandles,
);
await driver.clickElement({
text: 'Verify contract details',
css: '.token-allowance-container__verify-link',
});
const modalTitle = await driver.waitForSelector({
text: 'Contract details',
tag: 'h5',
});
assert.equal(await modalTitle.getText(), 'Contract details');
await driver.clickElement({
text: 'Got it',
tag: 'button',
});
await driver.clickElement({
text: 'Use default',
css: '.mm-button-link',
});
await driver.clickElement({
text: 'View details',
css: '.token-allowance-container__view-details',
});
// checks elements on approve token popup
const functionType = await driver.findElement({
text: 'Function: Approve',
tag: 'h6',
});
assert.equal(await functionType.getText(), 'Function: Approve');
const confirmDataDiv = await driver.findElement( const confirmDataDiv = await driver.findElement(
'.confirm-approve-content__data__data-block', '.approve-content-card-container__data__data-block',
); );
const confirmDataText = await confirmDataDiv.getText(); const confirmDataText = await confirmDataDiv.getText();
assert( assert(
@ -163,27 +159,54 @@ describe.skip('Create token, approve token and approve token without gas', funct
/0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef4/u, /0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef4/u,
), ),
); );
await driver.clickElement({ text: 'Confirm', tag: 'button' }); await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.switchToWindow(windowHandles.extension);
await driver.findElement({
text: 'Review your spending cap',
tag: 'div',
});
const defaultSpendingCup = await driver.findElement({
text: '7 TST',
css: '.box--flex-direction-row > h6',
});
assert.equal(
await defaultSpendingCup.getText(),
'7 TST',
'Default value is not correctly set',
);
await driver.clickElement({
text: 'Approve',
tag: 'button',
});
await driver.switchToWindow(extension);
await driver.clickElement({ tag: 'button', text: 'Activity' }); await driver.clickElement({ tag: 'button', text: 'Activity' });
// check list of pending transactions in extension
await driver.wait(async () => { await driver.wait(async () => {
const pendingTxes = await driver.findElements( const pendingTxes = await driver.findElements(
'.transaction-list-item', '.transaction-list-item',
); );
return pendingTxes.length === 2; return pendingTxes.length === 1;
}, 10000); }, 10000);
await driver.waitForSelector({ const approveTokenTask = await driver.waitForSelector({
// Selects only the very first transaction list item immediately following the 'Pending' header // Selects only the very first transaction list item immediately following the 'Pending' header
css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve Token spend limit', text: 'Approve Token spend limit',
}); });
assert.equal(
await approveTokenTask.getText(),
'Approve Token spend limit',
);
}, },
); );
}); });
it('customizes gas, edit permissions and checks transaction in transaction list', async function () { it('set custom spending cap, customizes gas, edit spending cap and checks transaction in transaction list', async function () {
await withFixtures( await withFixtures(
{ {
dapp: true, dapp: true,
@ -191,36 +214,71 @@ describe.skip('Create token, approve token and approve token without gas', funct
.withPermissionControllerConnectedToTestDapp() .withPermissionControllerConnectedToTestDapp()
.build(), .build(),
ganacheOptions, ganacheOptions,
smartContract,
title: this.test.title, title: this.test.title,
}, },
async ({ driver }) => { async ({ driver, contractRegistry }) => {
const contractAddress = await contractRegistry.getContractAddress(
smartContract,
);
await driver.navigate(); await driver.navigate();
await driver.fill('#password', 'correct horse battery staple'); await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER); await driver.press('#password', driver.Key.ENTER);
await driver.openNewPage(`http://127.0.0.1:8080/`); // create token
await driver.openNewPage(
`http://127.0.0.1:8080/?contract=${contractAddress}`,
);
await driver.waitForSelector({ text: 'Create Token', tag: 'button' }); let windowHandles = await driver.getAllWindowHandles();
await driver.clickElement({ text: 'Create Token', tag: 'button' }); const extension = windowHandles[0];
windowHandles = await getWindowHandles(driver, 3);
await driver.switchToWindow(windowHandles.popup);
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.switchToWindow(windowHandles.dapp); await driver.findClickableElement('#deployButton');
await driver.waitForSelector({ // approve token from dapp
text: 'Approve Tokens',
tag: 'button',
});
await driver.clickElement({ text: 'Approve Tokens', tag: 'button' }); await driver.clickElement({ text: 'Approve Tokens', tag: 'button' });
// switch to popup await driver.waitUntilXWindowHandles(3);
windowHandles = await getWindowHandles(driver, 3); windowHandles = await driver.getAllWindowHandles();
await driver.switchToWindow(windowHandles.popup); await driver.switchToWindowWithTitle(
'MetaMask Notification',
await driver.clickElement( windowHandles,
'.confirm-approve-content__small-blue-text',
); );
// set custom spending cap
let setSpendingCap = await driver.findElement(
'[data-testid="custom-spending-cap-input"]',
);
await setSpendingCap.fill('5');
await driver.clickElement({
text: 'View details',
css: '.token-allowance-container__view-details',
});
await driver.clickElement({
text: 'Next',
tag: 'button',
});
let spendingCup = await driver.findElement({
text: '5 TST',
css: '.box--flex-direction-row > h6',
});
assert.equal(
await spendingCup.getText(),
'5 TST',
'Default value is not correctly set',
);
// editing gas fee
const editBtn = await driver.findElements({
text: 'Edit',
class: 'btn-link > h6',
});
editBtn[1].click();
await driver.clickElement({ await driver.clickElement({
text: 'Edit suggested gas fee', text: 'Edit suggested gas fee',
tag: 'button', tag: 'button',
@ -232,70 +290,66 @@ describe.skip('Create token, approve token and approve token without gas', funct
await gasPriceInput.fill('10'); await gasPriceInput.fill('10');
await gasLimitInput.clear(); await gasLimitInput.clear();
await gasLimitInput.fill('60001'); await gasLimitInput.fill('60001');
await driver.findClickableElement({ text: 'Save', tag: 'button' });
await driver.clickElement({ text: 'Save', tag: 'button' }); await driver.clickElement({ text: 'Save', tag: 'button' });
await driver.waitForSelector({ await driver.waitForSelector({
css: '.confirm-approve-content__transaction-details-content__secondary-fee', css: '.box--flex-direction-row > h6',
text: '0.0006 ETH', text: '0.0006 ETH',
}); });
// edits the permission // editing spending cap
const editButtons = await driver.findClickableElements( await driver.clickElement({
'.confirm-approve-content__small-blue-text', class: '.review-spending-cap__heading-detail__button',
); text: 'Edit',
await editButtons[2].click(); });
// wait for permission modal to be visible setSpendingCap = await driver.findElement(
const permissionModal = await driver.findVisibleElement( '[data-testid="custom-spending-cap-input"]',
'span .modal',
); );
const radioButtons = await driver.findClickableElements( await setSpendingCap.fill('9');
'.edit-approval-permission__edit-section__radio-button',
);
const customSpendLimit = await radioButtons[1];
await customSpendLimit.click();
await driver.fill('input', '5');
await driver.clickElement({ text: 'Save', tag: 'button' });
// wait for permission modal to be removed from DOM. await driver.clickElement({
await permissionModal.waitForElementState('hidden'); text: 'Next',
const permissionInfo = await driver.findElements( tag: 'button',
'.confirm-approve-content__medium-text', });
spendingCup = await driver.findElement({
text: '9 TST',
css: '.box--flex-direction-row > h6',
});
assert.equal(
await spendingCup.getText(),
'9 TST',
'Default value is not correctly set',
); );
const amountDiv = permissionInfo[0];
assert.equal(await amountDiv.getText(), '5 TST');
// submits the transaction // submits the transaction
await driver.clickElement({ text: 'Confirm', tag: 'button' }); await driver.clickElement({ text: 'Approve', tag: 'button' });
// finds the transaction in transaction list // finds the transaction in transaction list
await driver.switchToWindow(windowHandles.extension); await driver.switchToWindow(extension);
await driver.clickElement({ tag: 'button', text: 'Activity' }); await driver.clickElement({ tag: 'button', text: 'Activity' });
await driver.waitForSelector({
await driver.wait(async () => {
const pendingTxes = await driver.findElements(
'.transaction-list-item',
);
return pendingTxes.length === 1;
}, 10000);
const approveTokenTask = await driver.waitForSelector({
// Select only the heading of the first entry in the transaction list. // Select only the heading of the first entry in the transaction list.
css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve Token spend limit', text: 'Approve Token spend limit',
}); });
assert.equal(
await approveTokenTask.getText(),
'Approve Token spend limit',
);
}, },
); );
}); });
});
describe('Approves a custom token from dapp when no gas value is specified', function () { it('set maximum spending cap, submits the transaction and finds the transaction in the transactions list', async function () {
let windowHandles;
const ganacheOptions = {
accounts: [
{
secretKey:
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC',
balance: convertToHexValue(25000000000000000000),
},
],
};
it('approves an already created token, shows the correct recipient, submits the transaction and finds the transaction in the transactions list', async function () {
await withFixtures( await withFixtures(
{ {
dapp: true, dapp: true,
@ -303,60 +357,146 @@ describe.skip('Create token, approve token and approve token without gas', funct
.withPermissionControllerConnectedToTestDapp() .withPermissionControllerConnectedToTestDapp()
.build(), .build(),
ganacheOptions, ganacheOptions,
smartContract,
title: this.test.title, title: this.test.title,
}, },
async ({ driver }) => { async ({ driver, contractRegistry }) => {
const contractAddress = await contractRegistry.getContractAddress(
smartContract,
);
await driver.navigate(); await driver.navigate();
await driver.fill('#password', 'correct horse battery staple'); await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER); await driver.press('#password', driver.Key.ENTER);
await driver.openNewPage(`http://127.0.0.1:8080/`); // create token
await driver.openNewPage(
`http://127.0.0.1:8080/?contract=${contractAddress}`,
);
await driver.waitForSelector({ text: 'Create Token', tag: 'button' }); const windowHandles = await driver.getAllWindowHandles();
await driver.clickElement({ text: 'Create Token', tag: 'button' }); const extension = windowHandles[0];
windowHandles = await getWindowHandles(driver, 3);
await driver.switchToWindow(windowHandles.popup);
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.switchToWindow(windowHandles.dapp); await driver.findClickableElement('#deployButton');
// approve token from dapp
await driver.clickElement({ text: 'Approve Tokens', tag: 'button' });
await driver.switchToWindow(extension);
await driver.clickElement({ tag: 'button', text: 'Activity' });
const pendingTxes = await driver.findElements(
'.transaction-list__pending-transactions .transaction-list-item',
);
pendingTxes[0].click();
// set max spending cap
await driver.clickElement({
css: '.custom-spending-cap__max',
text: 'Max',
});
await driver.clickElement({
tag: 'button',
text: 'Next',
});
// checks the balance
const balance = await driver.findElement({
css: '.box--display-flex > h6',
text: '10 TST',
});
const maxSpendingCap = await driver.findElement({
text: '10 TST',
css: '.box--flex-direction-row > h6',
});
assert.equal(
await maxSpendingCap.getText(),
await balance.getText(),
'Max spending cap is not set corectly',
);
await driver.delay(500);
await driver.clickElement({
tag: 'button',
text: 'Approve',
});
const approveTokenTask = await driver.waitForSelector({
// Select only the heading of the first entry in the transaction list.
css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve Token spend limit',
});
assert.equal(
await approveTokenTask.getText(),
'Approve Token spend limit',
);
},
);
});
it('approves token without gas, set default spending cap, submits the transaction and finds the transaction in the transactions list', async function () {
await withFixtures(
{
dapp: true,
fixtures: new FixtureBuilder()
.withPermissionControllerConnectedToTestDapp()
.build(),
ganacheOptions,
smartContract,
title: this.test.title,
},
async ({ driver, contractRegistry }) => {
const contractAddress = await contractRegistry.getContractAddress(
smartContract,
);
await driver.navigate();
await driver.fill('#password', 'correct horse battery staple');
await driver.press('#password', driver.Key.ENTER);
await driver.openNewPage(
`http://127.0.0.1:8080/?contract=${contractAddress}`,
);
const windowHandles = await driver.getAllWindowHandles();
const extension = windowHandles[0];
await driver.findClickableElement('#deployButton');
// approve token without gas from dapp
await driver.clickElement({ await driver.clickElement({
text: 'Approve Tokens Without Gas', text: 'Approve Tokens Without Gas',
tag: 'button', tag: 'button',
}); });
await driver.switchToWindow(windowHandles.extension); // switch to extension
await driver.switchToWindow(extension);
await driver.clickElement({ tag: 'button', text: 'Activity' }); await driver.clickElement({ tag: 'button', text: 'Activity' });
await driver.wait(async () => { const pendingTxes = await driver.findElements('.transaction-list-item');
const pendingTxes = await driver.findElements( pendingTxes[0].click();
'.transaction-list__pending-transactions .transaction-list-item', // set spending cap
); await driver.clickElement({
return pendingTxes.length === 1; text: 'Use default',
}, 10000); css: '.mm-button-link',
});
await driver.waitForSelector({ await driver.clickElement({
// Selects only the very first transaction list item immediately following the 'Pending' header text: 'Next',
css: '.transaction-list__pending-transactions .transaction-list__header + .transaction-list-item .list-item__heading', tag: 'button',
text: 'Approve Token spend limit',
}); });
await driver.clickElement('.transaction-list-item'); await driver.delay(500);
await driver.clickElement({ text: 'Approve', tag: 'button' });
const permissionInfo = await driver.findElements( // check transaction in Activity tab
'.confirm-approve-content__medium-text', const approveTokenTask = await driver.waitForSelector({
);
const recipientDiv = permissionInfo[1];
assert.equal(await recipientDiv.getText(), '0x2f318C33...C970');
await driver.clickElement({ text: 'Confirm', tag: 'button' });
await driver.waitForSelector({
css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading', css: '.transaction-list__completed-transactions .transaction-list-item:first-child .list-item__heading',
text: 'Approve Token spend limit', text: 'Approve Token spend limit',
}); });
assert.equal(
await approveTokenTask.getText(),
'Approve Token spend limit',
);
}, },
); );
}); });
});
}); });

View File

@ -59,10 +59,6 @@ function getActionFunctionById(id, history) {
updateViewedNotifications({ 14: true }); updateViewedNotifications({ 14: true });
history.push(`${ADVANCED_ROUTE}#backup-userdata`); history.push(`${ADVANCED_ROUTE}#backup-userdata`);
}, },
16: () => {
updateViewedNotifications({ 16: true });
history.push(EXPERIMENTAL_ROUTE);
},
17: () => { 17: () => {
updateViewedNotifications({ 17: true }); updateViewedNotifications({ 17: true });
history.push(SECURITY_ROUTE); history.push(SECURITY_ROUTE);

View File

@ -350,13 +350,6 @@ export const SETTINGS_CONSTANTS = [
route: `${ADVANCED_ROUTE}#restore-userdata`, route: `${ADVANCED_ROUTE}#restore-userdata`,
icon: 'fas fa-upload', icon: 'fas fa-upload',
}, },
{
tabMessage: (t) => t('experimental'),
sectionMessage: (t) => t('improvedTokenAllowance'),
descriptionMessage: (t) => t('improvedTokenAllowanceDescription'),
route: `${EXPERIMENTAL_ROUTE}#improved-token-allowance`,
icon: 'fa fa-flask',
},
{ {
tabMessage: (t) => t('experimental'), tabMessage: (t) => t('experimental'),
sectionMessage: (t) => t('transactionSecurityCheck'), sectionMessage: (t) => t('transactionSecurityCheck'),

View File

@ -182,7 +182,7 @@ describe('Settings Search Utils', () => {
it('should get good experimental section number', () => { it('should get good experimental section number', () => {
expect(getNumberOfSettingsInSection(t, t('experimental'))).toStrictEqual( expect(getNumberOfSettingsInSection(t, t('experimental'))).toStrictEqual(
2, 1,
); );
}); });

View File

@ -2,16 +2,14 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classnames from 'classnames'; import classnames from 'classnames';
import copyToClipboard from 'copy-to-clipboard'; import copyToClipboard from 'copy-to-clipboard';
import { getTokenTrackerLink, getAccountLink } from '@metamask/etherscan-link'; import { getTokenTrackerLink } from '@metamask/etherscan-link';
import UrlIcon from '../../../components/ui/url-icon'; import UrlIcon from '../../../components/ui/url-icon';
import { addressSummary } from '../../../helpers/utils/util'; import { addressSummary } from '../../../helpers/utils/util';
import { formatCurrency } from '../../../helpers/utils/confirm-tx.util'; import { formatCurrency } from '../../../helpers/utils/confirm-tx.util';
import { ellipsify } from '../../send/send.utils';
import Typography from '../../../components/ui/typography'; import Typography from '../../../components/ui/typography';
import Box from '../../../components/ui/box'; import Box from '../../../components/ui/box';
import Button from '../../../components/ui/button'; import Button from '../../../components/ui/button';
import EditGasFeeButton from '../../../components/app/edit-gas-fee-button'; import EditGasFeeButton from '../../../components/app/edit-gas-fee-button';
import Identicon from '../../../components/ui/identicon';
import MultiLayerFeeMessage from '../../../components/app/multilayer-fee-message'; import MultiLayerFeeMessage from '../../../components/app/multilayer-fee-message';
import CopyIcon from '../../../components/ui/icon/copy-icon.component'; import CopyIcon from '../../../components/ui/icon/copy-icon.component';
import { import {
@ -36,16 +34,10 @@ export default class ConfirmApproveContent extends Component {
}; };
static propTypes = { static propTypes = {
decimals: PropTypes.number,
tokenAmount: PropTypes.string,
customTokenAmount: PropTypes.string,
tokenSymbol: PropTypes.string, tokenSymbol: PropTypes.string,
siteImage: PropTypes.string, siteImage: PropTypes.string,
showCustomizeGasModal: PropTypes.func, showCustomizeGasModal: PropTypes.func,
showEditApprovalPermissionModal: PropTypes.func,
origin: PropTypes.string, origin: PropTypes.string,
setCustomAmount: PropTypes.func,
tokenBalance: PropTypes.string,
data: PropTypes.string, data: PropTypes.string,
toAddress: PropTypes.string, toAddress: PropTypes.string,
currentCurrency: PropTypes.string, currentCurrency: PropTypes.string,
@ -243,66 +235,6 @@ export default class ConfirmApproveContent extends Component {
); );
} }
renderERC20PermissionContent() {
const { t } = this.context;
const {
customTokenAmount,
tokenAmount,
tokenSymbol,
origin,
toAddress,
isContract,
} = this.props;
const displayedAddress = isContract
? `${t('contract')} (${addressSummary(toAddress)})`
: addressSummary(toAddress);
return (
<div className="flex-column">
<div className="confirm-approve-content__small-text">
{t('accessAndSpendNotice', [origin])}
</div>
<div className="flex-row">
<div className="confirm-approve-content__label">
{t('approvedAmountWithColon')}
</div>
<div className="confirm-approve-content__medium-text">
{`${Number(customTokenAmount || tokenAmount)} ${tokenSymbol}`}
</div>
</div>
<div className="flex-row">
<div className="confirm-approve-content__label">
{t('grantedToWithColon')}
</div>
<div className="confirm-approve-content__medium-text">
{`${displayedAddress}`}
</div>
<div className="confirm-approve-content__medium-text">
<Button
type="link"
className="confirm-approve-content__copy-address"
onClick={() => {
this.setState({ copied: true });
this.copyTimeout = setTimeout(
() => this.setState({ copied: false }),
SECOND * 3,
);
copyToClipboard(toAddress);
}}
title={
this.state.copied
? t('copiedExclamation')
: t('copyToClipboard')
}
>
<CopyIcon size={14} color="var(--color-icon-default)" />
</Button>
</div>
</div>
</div>
);
}
renderDataContent() { renderDataContent() {
const { t } = this.context; const { t } = this.context;
const { data, isSetApproveForAll, isApprovalOrRejection } = this.props; const { data, isSetApproveForAll, isApprovalOrRejection } = this.props;
@ -327,49 +259,8 @@ export default class ConfirmApproveContent extends Component {
renderFullDetails() { renderFullDetails() {
const { t } = this.context; const { t } = this.context;
const { const { assetStandard } = this.props;
assetStandard, if (
showEditApprovalPermissionModal,
customTokenAmount,
tokenAmount,
decimals,
origin,
setCustomAmount,
tokenSymbol,
tokenBalance,
} = this.props;
if (assetStandard === TokenStandard.ERC20) {
return (
<div className="confirm-approve-content__full-tx-content">
<div className="confirm-approve-content__permission">
{this.renderApproveContentCard({
symbol: <i className="fa fa-user-check" />,
title: t('permissionRequest'),
content: this.renderERC20PermissionContent(),
showEdit: true,
onEditClick: () =>
showEditApprovalPermissionModal({
customTokenAmount,
decimals,
origin,
setCustomAmount,
tokenAmount,
tokenSymbol,
tokenBalance,
}),
})}
</div>
<div className="confirm-approve-content__data">
{this.renderApproveContentCard({
symbol: <i className="fa fa-file" />,
title: 'Data',
content: this.renderDataContent(),
noBorder: true,
})}
</div>
</div>
);
} else if (
assetStandard === TokenStandard.ERC721 || assetStandard === TokenStandard.ERC721 ||
assetStandard === TokenStandard.ERC1155 assetStandard === TokenStandard.ERC1155
) { ) {
@ -450,22 +341,11 @@ export default class ConfirmApproveContent extends Component {
} }
getTokenName() { getTokenName() {
const { const { tokenId, assetName, assetStandard, tokenSymbol } = this.props;
tokenId,
assetName,
assetStandard,
tokenSymbol,
isSetApproveForAll,
} = this.props;
const { t } = this.context; const { t } = this.context;
let titleTokenDescription = t('token'); let titleTokenDescription = t('token');
if ( if (
assetStandard === TokenStandard.ERC20 ||
(tokenSymbol && !tokenId && !isSetApproveForAll)
) {
titleTokenDescription = tokenSymbol;
} else if (
assetStandard === TokenStandard.ERC721 || assetStandard === TokenStandard.ERC721 ||
assetStandard === TokenStandard.ERC1155 || 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 // 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
@ -604,16 +484,10 @@ export default class ConfirmApproveContent extends Component {
render() { render() {
const { t } = this.context; const { t } = this.context;
const { const {
decimals,
siteImage, siteImage,
tokenAmount,
customTokenAmount,
origin, origin,
tokenSymbol, tokenSymbol,
showCustomizeGasModal, showCustomizeGasModal,
showEditApprovalPermissionModal,
setCustomAmount,
tokenBalance,
useNonceField, useNonceField,
warning, warning,
txData, txData,
@ -621,13 +495,10 @@ export default class ConfirmApproveContent extends Component {
toAddress, toAddress,
chainId, chainId,
rpcPrefs, rpcPrefs,
isContract,
assetStandard, assetStandard,
userAddress,
tokenId, tokenId,
tokenAddress, tokenAddress,
assetName, assetName,
isSetApproveForAll,
} = this.props; } = this.props;
const { showFullTxDetails, setshowContractDetails } = this.state; const { showFullTxDetails, setshowContractDetails } = this.state;
@ -672,81 +543,6 @@ export default class ConfirmApproveContent extends Component {
<div className="confirm-approve-content__description"> <div className="confirm-approve-content__description">
{this.renderDescription()} {this.renderDescription()}
</div> </div>
{assetStandard === TokenStandard.ERC20 ||
(tokenSymbol && !tokenId && !isSetApproveForAll) ? (
<Box className="confirm-approve-content__address-display-content">
<Box display={DISPLAY.FLEX}>
<Identicon
className="confirm-approve-content__address-identicon"
diameter={20}
address={toAddress}
/>
<Typography
variant={TYPOGRAPHY.H6}
fontWeight={FONT_WEIGHT.NORMAL}
color={COLORS.TEXT_ALTERNATIVE}
boxProps={{ marginBottom: 0 }}
>
{ellipsify(toAddress)}
</Typography>
<Button
type="link"
className="confirm-approve-content__copy-address"
onClick={() => {
this.setState({ copied: true });
this.copyTimeout = setTimeout(
() => this.setState({ copied: false }),
SECOND * 3,
);
copyToClipboard(toAddress);
}}
title={
this.state.copied
? t('copiedExclamation')
: t('copyToClipboard')
}
>
<CopyIcon size={9} color="var(--color-icon-default)" />
</Button>
<Button
type="link"
className="confirm-approve-content__etherscan-link"
onClick={() => {
const blockExplorerTokenLink = isContract
? getTokenTrackerLink(
toAddress,
chainId,
null,
userAddress,
{
blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null,
},
)
: getAccountLink(
toAddress,
chainId,
{
blockExplorerUrl: rpcPrefs?.blockExplorerUrl ?? null,
},
null,
);
global.platform.openTab({
url: blockExplorerTokenLink,
});
}}
target="_blank"
rel="noopener noreferrer"
title={t('etherscanView')}
>
<i
className="fa fa-share-square fa-sm"
style={{ color: 'var(--color-icon-default)', fontSize: 11 }}
title={t('etherscanView')}
/>
</Button>
</Box>
</Box>
) : (
<Box marginBottom={4} marginTop={2}> <Box marginBottom={4} marginTop={2}>
<Button <Button
type="link" type="link"
@ -769,27 +565,6 @@ export default class ConfirmApproveContent extends Component {
/> />
)} )}
</Box> </Box>
)}
{assetStandard === TokenStandard.ERC20 ? (
<div className="confirm-approve-content__edit-submission-button-container">
<div
className="confirm-approve-content__medium-link-text cursor-pointer"
onClick={() =>
showEditApprovalPermissionModal({
customTokenAmount,
decimals,
origin,
setCustomAmount,
tokenAmount,
tokenSymbol,
tokenBalance,
})
}
>
{t('editPermission')}
</div>
</div>
) : null}
<div className="confirm-approve-content__card-wrapper"> <div className="confirm-approve-content__card-wrapper">
{this.renderApproveContentCard({ {this.renderApproveContentCard({
symbol: <i className="fa fa-tag" />, symbol: <i className="fa fa-tag" />,

View File

@ -13,17 +13,12 @@ const renderComponent = (props) => {
}; };
const props = { const props = {
decimals: 16,
siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', siteImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg',
customTokenAmount: '10',
tokenAmount: '10',
origin: 'https://metamask.github.io/test-dapp/', origin: 'https://metamask.github.io/test-dapp/',
tokenSymbol: 'TST', tokenSymbol: 'TestDappCollectibles (#1)',
assetStandard: TokenStandard.ERC20, assetStandard: TokenStandard.ERC721,
tokenImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg', tokenImage: 'https://metamask.github.io/test-dapp/metamask-fox.svg',
tokenBalance: '15',
showCustomizeGasModal: jest.fn(), showCustomizeGasModal: jest.fn(),
showEditApprovalPermissionModal: jest.fn(),
data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170', data: '0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4', toAddress: '0x9bc5baf874d2da8d216ae9f137804184ee5afef4',
currentCurrency: 'TST', currentCurrency: 'TST',
@ -47,21 +42,16 @@ describe('ConfirmApproveContent Component', () => {
queryByText('https://metamask.github.io/test-dapp/'), queryByText('https://metamask.github.io/test-dapp/'),
).toBeInTheDocument(); ).toBeInTheDocument();
expect(getByTestId('confirm-approve-title').textContent).toStrictEqual( expect(getByTestId('confirm-approve-title').textContent).toStrictEqual(
' Give permission to access your TST? ', ' Allow access to and transfer of your TestDappCollectibles (#1)? ',
); );
expect( expect(
queryByText( queryByText(
'By granting permission, you are allowing the following contract to access your funds', 'This allows a third party to access and transfer the following NFTs without further notice until you revoke its access.',
), ),
).toBeInTheDocument(); ).toBeInTheDocument();
expect(queryByText('0x9bc5...fef4')).toBeInTheDocument(); expect(queryByText('Verify contract details')).toBeInTheDocument();
expect(queryByText('View full transaction details')).toBeInTheDocument(); expect(queryByText('View full transaction details')).toBeInTheDocument();
expect(queryByText('Edit permission')).toBeInTheDocument();
const editPermission = getByText('Edit permission');
fireEvent.click(editPermission);
expect(props.showEditApprovalPermissionModal).toHaveBeenCalledTimes(1);
const editButtons = getAllByText('Edit'); const editButtons = getAllByText('Edit');
expect(queryByText('Transaction fee')).toBeInTheDocument(); expect(queryByText('Transaction fee')).toBeInTheDocument();
@ -79,13 +69,21 @@ describe('ConfirmApproveContent Component', () => {
const showViewTxDetails = getByText('View full transaction details'); const showViewTxDetails = getByText('View full transaction details');
expect(queryByText('Permission request')).not.toBeInTheDocument(); expect(queryByText('Permission request')).not.toBeInTheDocument();
expect(queryByText('Approved amount:')).not.toBeInTheDocument(); expect(queryByText('Approved asset:')).not.toBeInTheDocument();
expect(queryByText('Granted to:')).not.toBeInTheDocument(); expect(queryByText('Granted to:')).not.toBeInTheDocument();
expect(queryByText('Data')).not.toBeInTheDocument();
fireEvent.click(showViewTxDetails); fireEvent.click(showViewTxDetails);
expect(getByText('Hide full transaction details')).toBeInTheDocument(); expect(getByText('Hide full transaction details')).toBeInTheDocument();
expect(getByText('Permission request')).toBeInTheDocument(); expect(getByText('Permission request')).toBeInTheDocument();
expect(getByText('Approved amount:')).toBeInTheDocument(); expect(getByText('Approved asset:')).toBeInTheDocument();
expect(getByText('Granted to:')).toBeInTheDocument(); expect(getByText('Granted to:')).toBeInTheDocument();
expect(getByText('0x9bc5...fef4')).toBeInTheDocument(); expect(getByText('Contract (0x9bc5baF8...fEF4)')).toBeInTheDocument();
expect(getByText('Data')).toBeInTheDocument();
expect(getByText('Function: Approve')).toBeInTheDocument();
expect(
getByText(
'0x095ea7b30000000000000000000000009bc5baf874d2da8d216ae9f137804184ee5afef40000000000000000000000000000000000000000000000000000000000011170',
),
).toBeInTheDocument();
}); });
}); });

View File

@ -27,7 +27,6 @@ import {
getRpcPrefsForCurrentProvider, getRpcPrefsForCurrentProvider,
getIsMultiLayerFeeNetwork, getIsMultiLayerFeeNetwork,
checkNetworkAndAccountSupports1559, checkNetworkAndAccountSupports1559,
getIsImprovedTokenAllowanceEnabled,
} from '../../selectors'; } from '../../selectors';
import { useApproveTransaction } from '../../hooks/useApproveTransaction'; import { useApproveTransaction } from '../../hooks/useApproveTransaction';
import AdvancedGasFeePopover from '../../components/app/advanced-gas-fee-popover'; import AdvancedGasFeePopover from '../../components/app/advanced-gas-fee-popover';
@ -87,10 +86,6 @@ export default function ConfirmApprove({
const supportsEIP1559 = networkAndAccountSupports1559; const supportsEIP1559 = networkAndAccountSupports1559;
const improvedTokenAllowanceEnabled = useSelector(
getIsImprovedTokenAllowanceEnabled,
);
const previousTokenAmount = useRef(tokenAmount); const previousTokenAmount = useRef(tokenAmount);
const { const {
approveTransaction, approveTransaction,
@ -142,9 +137,7 @@ export default function ConfirmApprove({
const { iconUrl: siteImage = '' } = subjectMetadata[origin] || {}; const { iconUrl: siteImage = '' } = subjectMetadata[origin] || {};
let tokensText; let tokensText;
if (assetStandard === TokenStandard.ERC20) { if (
tokensText = `${Number(tokenAmount)} ${tokenSymbol}`;
} else if (
assetStandard === TokenStandard.ERC721 || assetStandard === TokenStandard.ERC721 ||
assetStandard === TokenStandard.ERC1155 assetStandard === TokenStandard.ERC1155
) { ) {
@ -171,7 +164,7 @@ export default function ConfirmApprove({
if (assetStandard === undefined) { if (assetStandard === undefined) {
return <ConfirmContractInteraction />; return <ConfirmContractInteraction />;
} }
if (improvedTokenAllowanceEnabled && assetStandard === TokenStandard.ERC20) { if (assetStandard === TokenStandard.ERC20) {
return ( return (
<GasFeeContextProvider transaction={transaction}> <GasFeeContextProvider transaction={transaction}>
<TransactionModalContextProvider> <TransactionModalContextProvider>
@ -234,46 +227,15 @@ export default function ConfirmApprove({
userAddress={userAddress} userAddress={userAddress}
isSetApproveForAll={isSetApproveForAll} isSetApproveForAll={isSetApproveForAll}
isApprovalOrRejection={isApprovalOrRejection} isApprovalOrRejection={isApprovalOrRejection}
decimals={decimals}
siteImage={siteImage} siteImage={siteImage}
setCustomAmount={setCustomPermissionAmount}
customTokenAmount={String(customPermissionAmount)}
tokenAmount={tokenAmount}
origin={formattedOrigin} origin={formattedOrigin}
tokenSymbol={tokenSymbol} tokenSymbol={tokenSymbol}
tokenImage={tokenImage} tokenImage={tokenImage}
tokenBalance={tokenBalance}
tokenId={tokenId} tokenId={tokenId}
assetName={assetName} assetName={assetName}
assetStandard={assetStandard} assetStandard={assetStandard}
tokenAddress={tokenAddress} tokenAddress={tokenAddress}
showCustomizeGasModal={approveTransaction} showCustomizeGasModal={approveTransaction}
showEditApprovalPermissionModal={({
/* eslint-disable no-shadow */
customTokenAmount,
decimals,
origin,
setCustomAmount,
tokenAmount,
tokenBalance,
tokenSymbol,
/* eslint-enable no-shadow */
}) =>
dispatch(
showModal({
name: 'EDIT_APPROVAL_PERMISSION',
customTokenAmount,
decimals,
origin,
setCustomAmount,
tokenAmount,
tokenBalance,
tokenSymbol,
tokenId,
assetStandard,
}),
)
}
data={customData || transactionData} data={customData || transactionData}
toAddress={toAddress} toAddress={toAddress}
currentCurrency={currentCurrency} currentCurrency={currentCurrency}

View File

@ -24,8 +24,6 @@ export default class ExperimentalTab extends PureComponent {
setUseNftDetection: PropTypes.func, setUseNftDetection: PropTypes.func,
setOpenSeaEnabled: PropTypes.func, setOpenSeaEnabled: PropTypes.func,
openSeaEnabled: PropTypes.bool, openSeaEnabled: PropTypes.bool,
improvedTokenAllowanceEnabled: PropTypes.bool,
setImprovedTokenAllowanceEnabled: PropTypes.func,
transactionSecurityCheckEnabled: PropTypes.bool, transactionSecurityCheckEnabled: PropTypes.bool,
setTransactionSecurityCheckEnabled: PropTypes.func, setTransactionSecurityCheckEnabled: PropTypes.func,
}; };
@ -102,43 +100,6 @@ export default class ExperimentalTab extends PureComponent {
); );
} }
renderImprovedTokenAllowanceToggle() {
const { t } = this.context;
const { improvedTokenAllowanceEnabled, setImprovedTokenAllowanceEnabled } =
this.props;
return (
<div ref={this.settingsRefs[2]} className="settings-page__content-row">
<div className="settings-page__content-item">
<span>{t('improvedTokenAllowance')}</span>
<div className="settings-page__content-description">
{t('improvedTokenAllowanceDescription')}
</div>
</div>
<div className="settings-page__content-item">
<div className="settings-page__content-item-col">
<ToggleButton
value={improvedTokenAllowanceEnabled}
onToggle={(value) => {
this.context.trackEvent({
category: EVENT.CATEGORIES.SETTINGS,
event: 'Enabled/Disable ImprovedTokenAllowance',
properties: {
action: 'Enabled/Disable ImprovedTokenAllowance',
legacy_event: true,
},
});
setImprovedTokenAllowanceEnabled(!value);
}}
offLabel={t('off')}
onLabel={t('on')}
/>
</div>
</div>
</div>
);
}
renderTransactionSecurityCheckToggle() { renderTransactionSecurityCheckToggle() {
const { t } = this.context; const { t } = this.context;
@ -229,7 +190,6 @@ export default class ExperimentalTab extends PureComponent {
<div className="settings-page__body"> <div className="settings-page__body">
{process.env.TRANSACTION_SECURITY_PROVIDER && {process.env.TRANSACTION_SECURITY_PROVIDER &&
this.renderTransactionSecurityCheckToggle()} this.renderTransactionSecurityCheckToggle()}
{this.renderImprovedTokenAllowanceToggle()}
{this.renderOpenSeaEnabledToggle()} {this.renderOpenSeaEnabledToggle()}
</div> </div>
); );

View File

@ -4,13 +4,11 @@ import { withRouter } from 'react-router-dom';
import { import {
setUseNftDetection, setUseNftDetection,
setOpenSeaEnabled, setOpenSeaEnabled,
setImprovedTokenAllowanceEnabled,
setTransactionSecurityCheckEnabled, setTransactionSecurityCheckEnabled,
} from '../../../store/actions'; } from '../../../store/actions';
import { import {
getUseNftDetection, getUseNftDetection,
getOpenSeaEnabled, getOpenSeaEnabled,
getIsImprovedTokenAllowanceEnabled,
getIsTransactionSecurityCheckEnabled, getIsTransactionSecurityCheckEnabled,
} from '../../../selectors'; } from '../../../selectors';
import ExperimentalTab from './experimental-tab.component'; import ExperimentalTab from './experimental-tab.component';
@ -19,7 +17,6 @@ const mapStateToProps = (state) => {
return { return {
useNftDetection: getUseNftDetection(state), useNftDetection: getUseNftDetection(state),
openSeaEnabled: getOpenSeaEnabled(state), openSeaEnabled: getOpenSeaEnabled(state),
improvedTokenAllowanceEnabled: getIsImprovedTokenAllowanceEnabled(state),
transactionSecurityCheckEnabled: transactionSecurityCheckEnabled:
getIsTransactionSecurityCheckEnabled(state), getIsTransactionSecurityCheckEnabled(state),
}; };
@ -29,8 +26,6 @@ const mapDispatchToProps = (dispatch) => {
return { return {
setUseNftDetection: (val) => dispatch(setUseNftDetection(val)), setUseNftDetection: (val) => dispatch(setUseNftDetection(val)),
setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)), setOpenSeaEnabled: (val) => dispatch(setOpenSeaEnabled(val)),
setImprovedTokenAllowanceEnabled: (val) =>
dispatch(setImprovedTokenAllowanceEnabled(val)),
setTransactionSecurityCheckEnabled: (val) => setTransactionSecurityCheckEnabled: (val) =>
dispatch(setTransactionSecurityCheckEnabled(val)), dispatch(setTransactionSecurityCheckEnabled(val)),
}; };

View File

@ -1306,16 +1306,6 @@ export function getIstokenDetectionInactiveOnNonMainnetSupportedNetwork(state) {
return isDynamicTokenListAvailable && !useTokenDetection && !isMainnet; return isDynamicTokenListAvailable && !useTokenDetection && !isMainnet;
} }
/**
* To get the `improvedTokenAllowanceEnabled` value which determines whether we use the improved token allowance
*
* @param {*} state
* @returns Boolean
*/
export function getIsImprovedTokenAllowanceEnabled(state) {
return state.metamask.improvedTokenAllowanceEnabled;
}
/** /**
* To get the `transactionSecurityCheckEnabled` value which determines whether we use the transaction security check * To get the `transactionSecurityCheckEnabled` value which determines whether we use the transaction security check
* *

View File

@ -3811,20 +3811,6 @@ export function setCollectiblesDetectionNoticeDismissed() {
]); ]);
} }
export function setImprovedTokenAllowanceEnabled(
improvedTokenAllowanceEnabled,
) {
return async () => {
try {
await submitRequestToBackground('setImprovedTokenAllowanceEnabled', [
improvedTokenAllowanceEnabled,
]);
} catch (error) {
log.error(error);
}
};
}
export function setTransactionSecurityCheckEnabled( export function setTransactionSecurityCheckEnabled(
transactionSecurityCheckEnabled, transactionSecurityCheckEnabled,
) { ) {