diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index 6d0878b57d5c..ec9779e4d1af 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Wir können mit dieser Transaktion nicht fortfahren, bis Sie die Gebühr manuell aktualisieren."
},
- "alertMessagePendingTransactions": {
- "message": "Diese Transaktion wird erst dann durchgeführt, wenn eine vorherige Transaktion abgeschlossen ist. Erfahren Sie, wie Sie eine Transaktion abbrechen oder beschleunigen können."
- },
"alertMessageSignInDomainMismatch": {
"message": "Die Website, die die Anfrage stellt, ist nicht die Website, bei der Sie sich anmelden. Dies könnte ein Versuch sein, Ihre Anmeldedaten zu stehlen."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Hier können Sie die Genehmigungen sehen, die Sie installierten Snaps oder verbundenen Websites gegeben haben."
},
- "permissionsPageTourDescription": {
- "message": "Dies ist Ihr Kontrollfeld zum Verwalten der Genehmigungen für verbundene Websites und installierte Snaps."
- },
- "permissionsPageTourTitle": {
- "message": "Verbundene Websites sind nun Genehmigungen"
- },
"permitSimulationDetailInfo": {
"message": "Sie erteilen dem Spender die Genehmigung, diese Menge an Tokens von Ihrem Konto auszugeben."
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index 58045c5b0578..42d08fa2f602 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Δεν μπορούμε να συνεχίσουμε με αυτή τη συναλλαγή μέχρι να ενημερώσετε τα τέλη μη αυτόματα."
},
- "alertMessagePendingTransactions": {
- "message": "Αυτή η συναλλαγή δεν θα πραγματοποιηθεί μέχρι να ολοκληρωθεί μια προηγούμενη συναλλαγή. Μάθετε πώς να ακυρώσετε ή να επισπεύσετε μια συναλλαγή."
- },
"alertMessageSignInDomainMismatch": {
"message": "Ο ιστότοπος που υποβάλλει το αίτημα δεν είναι ο ιστότοπος στον οποίο έχετε συνδεθεί. Αυτό θα μπορούσε να είναι μια απόπειρα κλοπής των στοιχείων σύνδεσής σας."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Εδώ μπορείτε να δείτε τις άδειες χρήσης που έχετε δώσει στα εγκατεστημένα Snaps ή στους συνδεδεμένους ιστότοπους."
},
- "permissionsPageTourDescription": {
- "message": "Αυτός είναι ο πίνακας ελέγχου για τη διαχείριση των αδειών χρήσης που έχετε δώσει στους συνδεδεμένους ιστότοπους και στα εγκατεστημένα Snaps."
- },
- "permissionsPageTourTitle": {
- "message": "Οι συνδεδεμένοι ιστότοποι είναι τώρα με άδειες χρήσης"
- },
"permitSimulationDetailInfo": {
"message": "Δίνετε στον διαθέτη την άδεια να δαπανήσει τα tokens από τον λογαριασμό σας."
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index f42a539277d1..466615b0343a 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -440,9 +440,6 @@
"alertMessageNoGasPrice": {
"message": "We can’t move forward with this transaction until you manually update the fee."
},
- "alertMessagePendingTransactions": {
- "message": "This transaction won’t go through until a previous transaction is complete. Learn how to cancel or speed up a transaction."
- },
"alertMessageSignInDomainMismatch": {
"message": "The site making the request is not the site you’re signing into. This could be an attempt to steal your login credentials."
},
@@ -750,8 +747,7 @@
"message": "Beta"
},
"betaHeaderText": {
- "message": "This is a beta version. Please report bugs $1",
- "description": "$1 represents the word 'here' in a hyperlink"
+ "message": "This is a beta version. Please report bugs $1"
},
"betaMetamaskInstitutionalVersion": {
"message": "MetaMask Institutional Beta Version"
@@ -865,9 +861,6 @@
"bridgeCalculatingAmount": {
"message": "Calculating..."
},
- "bridgeDestination": {
- "message": "Destination"
- },
"bridgeDontSend": {
"message": "Bridge, don't send"
},
@@ -892,9 +885,6 @@
"bridgeSelectTokenAndAmount": {
"message": "Select token and amount"
},
- "bridgeSource": {
- "message": "Source"
- },
"bridgeStepActionBridgeComplete": {
"message": "$1 received on $2",
"description": "$1 is the amount of the destination asset, $2 is the name of the destination network"
@@ -927,14 +917,8 @@
"bridgeTotalFeesTooltipText": {
"message": "This includes gas fees (paid to crypto miners) and relayer fees (paid to power complex services like bridging).\nFees are based on network traffic and transaction complexity. MetaMask does not profit from either fee."
},
- "bridgeTxDetailsBaseFee": {
- "message": "Base fee (GWEI)"
- },
- "bridgeTxDetailsBridgeAmount": {
- "message": "Bridge amount"
- },
- "bridgeTxDetailsBridgeType": {
- "message": "Bridge type"
+ "bridgeTxDetailsBridging": {
+ "message": "Bridging"
},
"bridgeTxDetailsDelayedDescription": {
"message": "Reach out to"
@@ -945,21 +929,9 @@
"bridgeTxDetailsDelayedTitle": {
"message": "Has it been longer than 3 hours?"
},
- "bridgeTxDetailsGasLimit": {
- "message": "Gas limit (units)"
- },
- "bridgeTxDetailsGasUsed": {
- "message": "Gas used (units)"
- },
- "bridgeTxDetailsMaxFeePerGas": {
- "message": "Max fee per gas"
- },
"bridgeTxDetailsNonce": {
"message": "Nonce"
},
- "bridgeTxDetailsPriorityFee": {
- "message": "Priority fee (GWEI)"
- },
"bridgeTxDetailsStatus": {
"message": "Status"
},
@@ -970,14 +942,18 @@
"message": "$1 at $2",
"description": "$1 is the date, $2 is the time"
},
- "bridgeTxDetailsTotal": {
- "message": "Total"
+ "bridgeTxDetailsTokenAmountOnChain": {
+ "message": "$1 $2 on",
+ "description": "$1 is the amount of the token, $2 is the ticker symbol of the token"
},
"bridgeTxDetailsTotalGasFee": {
"message": "Total gas fee"
},
- "bridgeTypeDirectionTo": {
- "message": "To"
+ "bridgeTxDetailsYouReceived": {
+ "message": "You received"
+ },
+ "bridgeTxDetailsYouSent": {
+ "message": "You sent"
},
"browserNotSupported": {
"message": "Your browser is not supported..."
@@ -3994,6 +3970,14 @@
"pending": {
"message": "Pending"
},
+ "pendingTransactionAlertMessage": {
+ "message": "This transaction won't go through until a previous transaction is complete. $1",
+ "description": "$1 represents the words 'how to cancel or speed up a transaction' in a hyperlink"
+ },
+ "pendingTransactionAlertMessageHyperlink": {
+ "message": "Learn how to cancel or speed up a transaction.",
+ "description": "The text for the hyperlink in the pending transaction alert message"
+ },
"pendingTransactionInfo": {
"message": "This transaction will not process until that one is complete."
},
@@ -4251,12 +4235,6 @@
"permissionsPageEmptySubContent": {
"message": "This is where you can see the permissions you've given to installed Snaps or connected sites."
},
- "permissionsPageTourDescription": {
- "message": "This is your control panel for managing permissions given to connected sites and installed Snaps."
- },
- "permissionsPageTourTitle": {
- "message": "Connected sites are now permissions"
- },
"permitSimulationChange_approve": {
"message": "Spending cap"
},
diff --git a/app/_locales/en_GB/messages.json b/app/_locales/en_GB/messages.json
index 2addf34f3c26..c72cccd973d9 100644
--- a/app/_locales/en_GB/messages.json
+++ b/app/_locales/en_GB/messages.json
@@ -421,9 +421,6 @@
"alertMessageNoGasPrice": {
"message": "We can’t move forward with this transaction until you manually update the fee."
},
- "alertMessagePendingTransactions": {
- "message": "This transaction won’t go through until a previous transaction is complete. Learn how to cancel or speed up a transaction."
- },
"alertMessageSignInDomainMismatch": {
"message": "The site making the request is not the site you’re signing into. This could be an attempt to steal your login credentials."
},
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index f5bec514637e..9d3b9028c734 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "No podemos seguir adelante con esta transacción hasta que actualice manualmente la tarifa."
},
- "alertMessagePendingTransactions": {
- "message": "Esta transacción no se realizará hasta que se complete una transacción anterior. Aprenda cómo cancelar o acelerar una transacción."
- },
"alertMessageSignInDomainMismatch": {
"message": "El sitio que realiza la solicitud no es el sitio en el que está iniciando sesión. Esto podría ser un intento de robar sus credenciales de inicio de sesión."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Aquí es donde puedes ver los permisos que has otorgado a los Snaps instalados o a los sitios conectados."
},
- "permissionsPageTourDescription": {
- "message": "Este es su panel de control para administrar los permisos otorgados a los sitios conectados y los Snaps instalados."
- },
- "permissionsPageTourTitle": {
- "message": "Los sitios conectados ahora tienen permisos"
- },
"permitSimulationDetailInfo": {
"message": "Le está dando permiso al gastador para gastar esta cantidad de tokens de su cuenta."
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index 4d5e59b25c52..6b9f60d35678 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Nous ne pouvons pas valider cette transaction tant que vous n’avez pas mis à jour manuellement les frais."
},
- "alertMessagePendingTransactions": {
- "message": "La transaction précédente doit être finalisée avant que celle-ci ne soit traitée. Découvrez comment vous pouvez annuler ou accélérer une transaction."
- },
"alertMessageSignInDomainMismatch": {
"message": "Le site auquel vous êtes en train de vous connecter n’est pas le site à l’origine de la demande. Il pourrait s’agir d’une tentative de vol de vos identifiants de connexion."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Ici, vous pouvez voir les autorisations que vous avez accordées aux Snaps installés ou aux sites connectés."
},
- "permissionsPageTourDescription": {
- "message": "C’’est votre panneau de configuration pour gérer les autorisations accordées aux sites connectés et aux Snaps installés."
- },
- "permissionsPageTourTitle": {
- "message": "Les sites connectés sont maintenant des autorisations"
- },
"permitSimulationDetailInfo": {
"message": "Vous autorisez la dépenseur à dépenser ce nombre de jetons de votre compte."
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index 2d4bcc52b891..7e4df895fbd8 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "जब तक आप शुल्क को मैन्युअल रूप से अपडेट नहीं करते, हम इस ट्रांसेक्शन को आगे नहीं बढ़ा सकते।"
},
- "alertMessagePendingTransactions": {
- "message": "यह ट्रांसेक्शन तब तक नहीं होगा जब तक पिछला ट्रांसेक्शन पूरा न हो जाए। किसी ट्रांसेक्शन को रद्द करने या तेज़ करने का तरीका जानें।"
- },
"alertMessageSignInDomainMismatch": {
"message": "अनुरोध करने वाली साइट वह साइट नहीं है जिस पर आप साइन इन कर रहे हैं। यह आपके लॉगिन क्रेडेंशियल चुराने का प्रयास हो सकता है।"
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "यहां पर आप इंस्टॉल किए गए Snaps या कनेक्टेड साइटों को दी गई अनुमतियां देख सकते हैं।"
},
- "permissionsPageTourDescription": {
- "message": "कनेक्टेड साइटों और इंस्टॉल किए गए Snaps को दी गई अनुमतियों को मैनेज करने के लिए यह आपका कंट्रोल पैनल है।"
- },
- "permissionsPageTourTitle": {
- "message": "कनेक्टेड साइटें अब अनुमतियां हैं"
- },
"permitSimulationDetailInfo": {
"message": "आप खर्च करने वाले को अपने अकाउंट से इतने सारे टोकन खर्च करने की अनुमति दे रहे हैं।"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index 9135a2e56bcf..9cc407f17b1c 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Kami tidak dapat melanjutkan transaksi ini hingga Anda memperbarui biayanya secara manual."
},
- "alertMessagePendingTransactions": {
- "message": "Transaksi ini tidak akan dilanjutkan hingga transaksi sebelumnya selesai. Pelajari cara membatalkan atau mempercepat transaksi."
- },
"alertMessageSignInDomainMismatch": {
"message": "Situs yang membuat permintaan bukanlah situs yang Anda masuki. Ini dapat merupakan upaya untuk mencuri kredensial login Anda."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Di sinilah Anda dapat melihat izin yang Anda berikan untuk Snap yang terinstal atau situs yang terhubung."
},
- "permissionsPageTourDescription": {
- "message": "Ini merupakan panel kontrol Anda untuk mengelola izin yang diberikan ke situs yang terhubung dan Snap yang terinstal."
- },
- "permissionsPageTourTitle": {
- "message": "Situs yang terhubung kini memiliki izin"
- },
"permitSimulationDetailInfo": {
"message": "Anda memberikan izin kepada pengguna untuk menggunakan token sebanyak ini dari akun."
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 8404c4eb3af4..08b8022108d1 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "手数料を手動で更新するまでこのトランザクションを進めることができません。"
},
- "alertMessagePendingTransactions": {
- "message": "前のトランザクションが完了するまでこのトランザクションを実行できません。トランザクションをキャンセルするか加速させる方法をご覧ください。"
- },
"alertMessageSignInDomainMismatch": {
"message": "要求元のサイトはサインインしようとしているサイトではありません。ログイン情報を盗もうとしている可能性があります。"
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "ここには、インストールされたSnapや接続されたサイトに付与したアクセス許可が表示されます。"
},
- "permissionsPageTourDescription": {
- "message": "これは、接続されたサイトやインストールされたSnapに付与したアクセス許可を管理するための、コントロールパネルです。"
- },
- "permissionsPageTourTitle": {
- "message": "「接続済みのサイト」が「アクセス許可」に変更されました"
- },
"permitSimulationDetailInfo": {
"message": "この数量のトークンをアカウントから転送する権限を使用者に付与しようとしています。"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index cbd48592c7d0..11c9e64de010 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "수수료를 직접 업데이트할 때까지는 이 트랜잭션을 진행할 수 없습니다."
},
- "alertMessagePendingTransactions": {
- "message": "이 트랜잭션은 이전 트랜잭션이 완료될 때까지 진행되지 않습니다. 트랜잭션을 취소하거나 속도를 올리는 법을 알아보세요."
- },
"alertMessageSignInDomainMismatch": {
"message": "요청을 보낸 사이트에 로그인되어 있지 않습니다. 이는 로그인 정보를 도용하려는 시도일 수 있습니다."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "여기에서 설치된 Snap 또는 연결된 사이트의 권한을 확인할 수 있습니다."
},
- "permissionsPageTourDescription": {
- "message": "연결된 사이트 또는 설치된 Snap의 권한을 관리하기 위한 제어판입니다."
- },
- "permissionsPageTourTitle": {
- "message": "이제 연결된 사이트에 권한이 부여됩니다"
- },
"permitSimulationDetailInfo": {
"message": "내 계정에서 이만큼의 토큰을 사용할 수 있도록 승인합니다."
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index 3a01b378c686..af31962e7066 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Não podemos prosseguir com essa transação até você atualizar manualmente a taxa."
},
- "alertMessagePendingTransactions": {
- "message": "Essa transação não será processada até que a transação anterior seja concluída. Saiba como cancelar ou acelerar uma transação."
- },
"alertMessageSignInDomainMismatch": {
"message": "O site solicitante não é o mesmo em que você está entrando. Isso pode se tratar de uma tentativa de roubar suas credenciais de login."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Aqui você pode ver as permissões que deu aos snaps instalados ou sites conectados."
},
- "permissionsPageTourDescription": {
- "message": "Este é o seu painel de controle para gerenciar as permissões dadas aos sites conectados e snaps instalados."
- },
- "permissionsPageTourTitle": {
- "message": "Sites conectados agora são permissões"
- },
"permitSimulationDetailInfo": {
"message": "Você está autorizando o consumidor a gastar esta quantidade de tokens de sua conta."
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index 385670721c1f..c8c54df2d25d 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Мы не сможем продолжить эту транзакцию, пока вы не обновите комиссию вручную."
},
- "alertMessagePendingTransactions": {
- "message": "Эта транзакция не будет выполнена, пока не завершится предыдущая транзакция. Узнайте, как отменить или ускорить транзакцию."
- },
"alertMessageSignInDomainMismatch": {
"message": "Сайт, отправляющий запрос, не является сайтом, на который вы входите. Это может быть попыткой украсть ваши учетные данные."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Здесь вы можете увидеть разрешения, которые вы предоставили установленным Snaps или подключенным сайтам."
},
- "permissionsPageTourDescription": {
- "message": "Это ваша панель управления для управления разрешениями, предоставленными подключенным сайтам и установленным Snaps."
- },
- "permissionsPageTourTitle": {
- "message": "Подключенные сайты теперь имеют разрешения"
- },
"permitSimulationDetailInfo": {
"message": "Вы даёте расходующему лицу разрешение потратить именно столько токенов из вашего аккаунта"
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index a13c9c6d3006..34f248e7ec8c 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Hindi tayo makakapagpatuloy sa transaksyong ito hanggang sa manwal mong i-update ang bayad."
},
- "alertMessagePendingTransactions": {
- "message": "Hindi magpapatuloy ang transaksyong ito hanggang makumpleto ang naunang transaksyon. Alamin kung paano kanselahin o pabilisin ang transaksyon."
- },
"alertMessageSignInDomainMismatch": {
"message": "Ang site na humihiling ay hindi ang site kung saan ka nagsa-signin. Ito ay maaring isang pagtatangka para nakawin ang iyong mga kredensiyal sa pag-login."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Dito mo makikita ang mga pahintulot na iyong binigay sa mga naka-install na Snap o konektadong site."
},
- "permissionsPageTourDescription": {
- "message": "Ito ang iyong control panel para pamahalaan ang mga permiso na ibinigay sa mga konektadong Snap."
- },
- "permissionsPageTourTitle": {
- "message": "Ang mga konektadong site ay pahintulot na ngayon"
- },
"permitSimulationDetailInfo": {
"message": "Binibigyan mo ang gumagastos ng permiso upang gumastos ng ganito karaming token mula sa iyong account."
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index 8f761e554caa..3bfcbe9812c1 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Siz ücreti manuel olarak güncelleyene dek bu işleme devam edemiyoruz."
},
- "alertMessagePendingTransactions": {
- "message": "Önceki bir işlem tamamlanana dek bu işlem gerçekleşmeyecektir. Bir işlemi nasıl iptal edeceğinizi veya hızlandıracağınızı öğrenin."
- },
"alertMessageSignInDomainMismatch": {
"message": "Talepte bulunan site giriş yaptığınız site değil. Bu durum oturum açma bilgilerinizi çalma teşebbüsü olabilir."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Burada, yüklü Snap'lere veya bağlı sitelere verdiğiniz izinleri görebilirsiniz."
},
- "permissionsPageTourDescription": {
- "message": "Burası, bağlı sitelere ve yüklü Snap'lere verilen izinleri yönetebileceğiniz kontrol panelinizdir."
- },
- "permissionsPageTourTitle": {
- "message": "Bağlı siteler şimdi izinler oldu"
- },
"permitSimulationDetailInfo": {
"message": "Harcama yapan tarafa hesabınızdan bu kadar çok token'i harcama izni veriyorsunuz."
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index 883f08f49a7e..47ca7fad8568 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "Chúng tôi không thể tiếp tục giao dịch này cho đến khi bạn cập nhật phí thủ công."
},
- "alertMessagePendingTransactions": {
- "message": "Giao dịch này sẽ không được thực hiện cho đến khi giao dịch trước đó hoàn tất. Tìm hiểu cách hủy hoặc đẩy nhanh giao dịch."
- },
"alertMessageSignInDomainMismatch": {
"message": "Trang web đưa ra yêu cầu không phải là trang web bạn đang đăng nhập. Đây có thể là một nỗ lực đánh cắp thông tin đăng nhập của bạn."
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "Đây là nơi bạn có thể xem các quyền mà bạn đã cấp cho các Snap đã cài đặt hoặc các trang web đã kết nối."
},
- "permissionsPageTourDescription": {
- "message": "Đây là bảng điều khiển để bạn quản lý các quyền được cấp cho các trang web đã kết nối và các Snap đã cài đặt."
- },
- "permissionsPageTourTitle": {
- "message": "Các trang web đã kết nối hiện đã được cấp quyền"
- },
"permitSimulationDetailInfo": {
"message": "Bạn đang cấp cho người chi tiêu quyền chi tiêu số lượng token này từ tài khoản của bạn."
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index fb7ed008d6f6..2e8a8ee3a052 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -437,9 +437,6 @@
"alertMessageNoGasPrice": {
"message": "您手动更新费用后,我们才能继续进行此交易。"
},
- "alertMessagePendingTransactions": {
- "message": "上一笔交易完成后,此交易才能继续进行。了解如何取消或加快交易。"
- },
"alertMessageSignInDomainMismatch": {
"message": "提出请求的网站不是您正在登录的网站。这可能试图窃取您的登录凭据。"
},
@@ -4108,12 +4105,6 @@
"permissionsPageEmptySubContent": {
"message": "您可以在此处查看您授予已安装 Snap 或已连接站点的许可。"
},
- "permissionsPageTourDescription": {
- "message": "这是您的控制面板,用于管理授予已连接站点和已安装 Snap 的许可。"
- },
- "permissionsPageTourTitle": {
- "message": "已连接的站点现已获得许可"
- },
"permitSimulationDetailInfo": {
"message": "您将授予该消费者许可从您的账户中支出这些代币。"
},
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 550d9e844a4a..7610b45a3c43 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -735,6 +735,49 @@ function trackDappView(remotePort) {
}
}
+/**
+ * Emit App Opened event
+ */
+function emitAppOpenedMetricEvent() {
+ const { metaMetricsId, participateInMetaMetrics } =
+ controller.metaMetricsController.state;
+
+ // Skip if user hasn't opted into metrics
+ if (metaMetricsId === null && !participateInMetaMetrics) {
+ return;
+ }
+
+ controller.metaMetricsController.trackEvent({
+ event: MetaMetricsEventName.AppOpened,
+ category: MetaMetricsEventCategory.App,
+ });
+}
+
+/**
+ * This function checks if the app is being opened
+ * and emits an event only if no other UI instances are currently open.
+ *
+ * @param {string} environment - The environment type where the app is opening
+ */
+function trackAppOpened(environment) {
+ // List of valid environment types to track
+ const environmentTypeList = [
+ ENVIRONMENT_TYPE_POPUP,
+ ENVIRONMENT_TYPE_NOTIFICATION,
+ ENVIRONMENT_TYPE_FULLSCREEN,
+ ];
+
+ // Check if any UI instances are currently open
+ const isFullscreenOpen = Object.values(openMetamaskTabsIDs).some(Boolean);
+ const isAlreadyOpen =
+ isFullscreenOpen || notificationIsOpen || openPopupCount > 0;
+
+ // Only emit event if no UI is open and environment is valid
+ if (!isAlreadyOpen && environmentTypeList.includes(environment)) {
+ emitAppOpenedMetricEvent();
+ }
+}
+
/**
* Initializes the MetaMask Controller with any initial state and default language.
* Configures platform-specific error reporting strategy.
@@ -877,6 +920,7 @@ export function setupController(
// communication with popup
controller.isClientOpen = true;
controller.setupTrustedCommunication(portStream, remotePort.sender);
+ trackAppOpened(processName);
initializeRemoteFeatureFlags();
diff --git a/app/scripts/controllers/bridge-status/utils.ts b/app/scripts/controllers/bridge-status/utils.ts
index 33af3c09cb03..d8dbac9e1590 100644
--- a/app/scripts/controllers/bridge-status/utils.ts
+++ b/app/scripts/controllers/bridge-status/utils.ts
@@ -6,6 +6,7 @@ import fetchWithCache from '../../../../shared/lib/fetch-with-cache';
import {
StatusResponse,
StatusRequestWithSrcTxHash,
+ StatusRequestDto,
} from '../../../../shared/types/bridge-status';
// TODO fix this
// eslint-disable-next-line import/no-restricted-paths
@@ -16,18 +17,32 @@ const CLIENT_ID_HEADER = { 'X-Client-Id': BRIDGE_CLIENT_ID };
export const BRIDGE_STATUS_BASE_URL = `${BRIDGE_API_BASE_URL}/getTxStatus`;
-export const fetchBridgeTxStatus = async (
+export const getStatusRequestDto = (
statusRequest: StatusRequestWithSrcTxHash,
-) => {
- // Assemble params
+): StatusRequestDto => {
const { quote, ...statusRequestNoQuote } = statusRequest;
+
const statusRequestNoQuoteFormatted = Object.fromEntries(
Object.entries(statusRequestNoQuote).map(([key, value]) => [
key,
value.toString(),
]),
- );
- const params = new URLSearchParams(statusRequestNoQuoteFormatted);
+ ) as unknown as Omit;
+
+ const requestId: { requestId: string } | Record =
+ quote?.requestId ? { requestId: quote.requestId } : {};
+
+ return {
+ ...statusRequestNoQuoteFormatted,
+ ...requestId,
+ };
+};
+
+export const fetchBridgeTxStatus = async (
+ statusRequest: StatusRequestWithSrcTxHash,
+) => {
+ const statusRequestDto = getStatusRequestDto(statusRequest);
+ const params = new URLSearchParams(statusRequestDto);
// Fetch
const url = `${BRIDGE_STATUS_BASE_URL}?${params.toString()}`;
diff --git a/jest.integration.config.js b/jest.integration.config.js
index 685080330fb3..5a110d7a5632 100644
--- a/jest.integration.config.js
+++ b/jest.integration.config.js
@@ -25,8 +25,7 @@ module.exports = {
setupFilesAfterEnv: ['/test/integration/config/setupAfter.js'],
testMatch: ['/test/integration/**/*.test.(js|ts|tsx)'],
testPathIgnorePatterns: ['/test/integration/config/*'],
- // This was increased from 5500 to 10000 to when lazy loading was introduced
- testTimeout: 10000,
+ testTimeout: 15000,
// We have to specify the environment we are running in, which is jsdom. The
// default is 'node'. This can be modified *per file* using a comment at the
// head of the file. So it may be worthwhile to switch to 'node' in any
diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json
index 79058c8c6954..4212ef454eea 100644
--- a/lavamoat/browserify/beta/policy.json
+++ b/lavamoat/browserify/beta/policy.json
@@ -150,7 +150,7 @@
"console.warn": true
},
"packages": {
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
@@ -158,11 +158,6 @@
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": {
- "globals": {
- "TextEncoder": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -188,8 +183,8 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
+ "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true,
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": {
@@ -197,32 +192,14 @@
"TextEncoder": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
- "@metamask/utils>@scure/base": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@metamask/utils>@scure/base": true,
+ "@noble/hashes": true
}
},
"@ethersproject/abi": {
@@ -389,9 +366,9 @@
"@ethereumjs/tx": true,
"@keystonehq/bc-ur-registry-eth": true,
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": true,
+ "@keystonehq/metamask-airgapped-keyring>rlp": true,
"@metamask/obs-store": true,
"browserify>buffer": true,
- "ethereumjs-util>rlp": true,
"uuid": true,
"webpack>events": true
}
@@ -401,15 +378,16 @@
"@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@keystonehq/bc-ur-registry-eth": true,
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": true,
"@metamask/eth-trezor-keyring>hdkey": true,
"browserify>buffer": true,
+ "eth-lattice-keyring>rlp": true,
"uuid": true
}
},
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": {
- "globals": {
- "TextEncoder": true
+ "@keystonehq/metamask-airgapped-keyring>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@lavamoat/lavadome-react": {
@@ -1608,12 +1586,18 @@
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
- "ethereumjs-util>create-hash": true,
- "ethereumjs-util>rlp": true
+ "ethereumjs-util>create-hash": true
+ }
+ },
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@metamask/logging-controller": {
@@ -2364,9 +2348,20 @@
"@metamask/smart-transactions-controller>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/util": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": {
+ "packages": {
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": true
+ "webpack>events": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": {
+ "globals": {
+ "TextEncoder": true
}
},
"@metamask/smart-transactions-controller>@ethereumjs/util": {
@@ -2376,7 +2371,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
"webpack>events": true
}
},
@@ -2615,6 +2610,7 @@
},
"packages": {
"@ethereumjs/tx": true,
+ "@ethereumjs/tx>@ethereumjs/common": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@ethersproject/abi": true,
"@ethersproject/contracts": true,
@@ -2627,7 +2623,6 @@
"@metamask/name-controller>async-mutex": true,
"@metamask/network-controller": true,
"@metamask/rpc-errors": true,
- "@metamask/transaction-controller>@ethereumjs/common": true,
"@metamask/transaction-controller>@metamask/nonce-tracker": true,
"@metamask/utils": true,
"bn.js": true,
@@ -2639,14 +2634,6 @@
"webpack>events": true
}
},
- "@metamask/transaction-controller>@ethereumjs/common": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
- "@ethereumjs/tx>@ethereumjs/util": true,
- "browserify>buffer": true,
- "webpack>events": true
- }
- },
"@metamask/transaction-controller>@metamask/nonce-tracker": {
"packages": {
"@ethersproject/providers": true,
@@ -3101,23 +3088,6 @@
"define": true
}
},
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": {
- "packages": {
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": true,
- "webpack>events": true
- }
- },
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": {
- "globals": {
- "console.warn": true,
- "fetch": true
- },
- "packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
- }
- },
"@trezor/connect-web>@trezor/connect>@trezor/protobuf": {
"packages": {
"@swc/helpers>tslib": true,
@@ -3749,16 +3719,59 @@
"setInterval": true
},
"packages": {
- "@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"bn.js": true,
"browserify>buffer": true,
"crypto-browserify": true,
+ "eth-lattice-keyring>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk": true,
"eth-lattice-keyring>rlp": true,
"webpack>events": true
}
},
+ "eth-lattice-keyring>@ethereumjs/tx": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/common": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": {
+ "packages": {
+ "browserify": true,
+ "browserify>buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": {
+ "globals": {
+ "WeakRef": true
+ },
+ "packages": {
+ "browserify": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": {
+ "globals": {
+ "TextDecoder": true,
+ "crypto": true
+ },
+ "packages": {
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk": {
"globals": {
"AbortController": true,
@@ -3776,54 +3789,67 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "@metamask/eth-sig-util": true,
"@metamask/ethjs>js-sha3": true,
"@metamask/keyring-api>bech32": true,
- "@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"eth-lattice-keyring>gridplus-sdk>bignumber.js": true,
+ "eth-lattice-keyring>gridplus-sdk>bitwise": true,
"eth-lattice-keyring>gridplus-sdk>borc": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check": true,
- "eth-lattice-keyring>gridplus-sdk>secp256k1": true,
+ "eth-lattice-keyring>gridplus-sdk>elliptic": true,
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true,
"eth-lattice-keyring>gridplus-sdk>uuid": true,
+ "eth-lattice-keyring>rlp": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethers>@ethersproject/sha2>hash.js": true,
+ "ganache>secp256k1": true,
"lodash": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": {
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true,
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": {
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": {
"globals": {
- "console.warn": true,
- "fetch": true
+ "TextDecoder": true,
+ "crypto": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
}
},
"eth-lattice-keyring>gridplus-sdk>aes-js": {
@@ -3837,6 +3863,11 @@
"define": true
}
},
+ "eth-lattice-keyring>gridplus-sdk>bitwise": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk>borc": {
"globals": {
"console": true
@@ -3858,24 +3889,28 @@
"globals": {
"URL": true,
"URLSearchParams": true,
- "location": true,
- "navigator": true
- }
- },
- "eth-lattice-keyring>gridplus-sdk>bs58check": {
- "packages": {
- "@noble/hashes": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true
+ "location": true
}
},
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": {
+ "eth-lattice-keyring>gridplus-sdk>elliptic": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58>base-x": true
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
- "eth-lattice-keyring>gridplus-sdk>secp256k1": {
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": {
+ "globals": {
+ "intToBuffer": true
+ },
"packages": {
- "@metamask/ppom-validator>elliptic": true
+ "@metamask/ethjs>js-sha3": true,
+ "bn.js": true,
+ "buffer": true
}
},
"eth-lattice-keyring>gridplus-sdk>uuid": {
@@ -4199,9 +4234,20 @@
"ethers>@ethersproject/signing-key": {
"packages": {
"@ethersproject/bytes": true,
- "@metamask/ppom-validator>elliptic": true,
"ethers>@ethersproject/logger": true,
- "ethers>@ethersproject/properties": true
+ "ethers>@ethersproject/properties": true,
+ "ethers>@ethersproject/signing-key>elliptic": true
+ }
+ },
+ "ethers>@ethersproject/signing-key>elliptic": {
+ "packages": {
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
"ethers>@ethersproject/solidity": {
diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json
index 79058c8c6954..4212ef454eea 100644
--- a/lavamoat/browserify/flask/policy.json
+++ b/lavamoat/browserify/flask/policy.json
@@ -150,7 +150,7 @@
"console.warn": true
},
"packages": {
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
@@ -158,11 +158,6 @@
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": {
- "globals": {
- "TextEncoder": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -188,8 +183,8 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
+ "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true,
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": {
@@ -197,32 +192,14 @@
"TextEncoder": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
- "@metamask/utils>@scure/base": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@metamask/utils>@scure/base": true,
+ "@noble/hashes": true
}
},
"@ethersproject/abi": {
@@ -389,9 +366,9 @@
"@ethereumjs/tx": true,
"@keystonehq/bc-ur-registry-eth": true,
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": true,
+ "@keystonehq/metamask-airgapped-keyring>rlp": true,
"@metamask/obs-store": true,
"browserify>buffer": true,
- "ethereumjs-util>rlp": true,
"uuid": true,
"webpack>events": true
}
@@ -401,15 +378,16 @@
"@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@keystonehq/bc-ur-registry-eth": true,
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": true,
"@metamask/eth-trezor-keyring>hdkey": true,
"browserify>buffer": true,
+ "eth-lattice-keyring>rlp": true,
"uuid": true
}
},
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": {
- "globals": {
- "TextEncoder": true
+ "@keystonehq/metamask-airgapped-keyring>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@lavamoat/lavadome-react": {
@@ -1608,12 +1586,18 @@
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
- "ethereumjs-util>create-hash": true,
- "ethereumjs-util>rlp": true
+ "ethereumjs-util>create-hash": true
+ }
+ },
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@metamask/logging-controller": {
@@ -2364,9 +2348,20 @@
"@metamask/smart-transactions-controller>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/util": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": {
+ "packages": {
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": true
+ "webpack>events": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": {
+ "globals": {
+ "TextEncoder": true
}
},
"@metamask/smart-transactions-controller>@ethereumjs/util": {
@@ -2376,7 +2371,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
"webpack>events": true
}
},
@@ -2615,6 +2610,7 @@
},
"packages": {
"@ethereumjs/tx": true,
+ "@ethereumjs/tx>@ethereumjs/common": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@ethersproject/abi": true,
"@ethersproject/contracts": true,
@@ -2627,7 +2623,6 @@
"@metamask/name-controller>async-mutex": true,
"@metamask/network-controller": true,
"@metamask/rpc-errors": true,
- "@metamask/transaction-controller>@ethereumjs/common": true,
"@metamask/transaction-controller>@metamask/nonce-tracker": true,
"@metamask/utils": true,
"bn.js": true,
@@ -2639,14 +2634,6 @@
"webpack>events": true
}
},
- "@metamask/transaction-controller>@ethereumjs/common": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
- "@ethereumjs/tx>@ethereumjs/util": true,
- "browserify>buffer": true,
- "webpack>events": true
- }
- },
"@metamask/transaction-controller>@metamask/nonce-tracker": {
"packages": {
"@ethersproject/providers": true,
@@ -3101,23 +3088,6 @@
"define": true
}
},
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": {
- "packages": {
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": true,
- "webpack>events": true
- }
- },
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": {
- "globals": {
- "console.warn": true,
- "fetch": true
- },
- "packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
- }
- },
"@trezor/connect-web>@trezor/connect>@trezor/protobuf": {
"packages": {
"@swc/helpers>tslib": true,
@@ -3749,16 +3719,59 @@
"setInterval": true
},
"packages": {
- "@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"bn.js": true,
"browserify>buffer": true,
"crypto-browserify": true,
+ "eth-lattice-keyring>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk": true,
"eth-lattice-keyring>rlp": true,
"webpack>events": true
}
},
+ "eth-lattice-keyring>@ethereumjs/tx": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/common": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": {
+ "packages": {
+ "browserify": true,
+ "browserify>buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": {
+ "globals": {
+ "WeakRef": true
+ },
+ "packages": {
+ "browserify": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": {
+ "globals": {
+ "TextDecoder": true,
+ "crypto": true
+ },
+ "packages": {
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk": {
"globals": {
"AbortController": true,
@@ -3776,54 +3789,67 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "@metamask/eth-sig-util": true,
"@metamask/ethjs>js-sha3": true,
"@metamask/keyring-api>bech32": true,
- "@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"eth-lattice-keyring>gridplus-sdk>bignumber.js": true,
+ "eth-lattice-keyring>gridplus-sdk>bitwise": true,
"eth-lattice-keyring>gridplus-sdk>borc": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check": true,
- "eth-lattice-keyring>gridplus-sdk>secp256k1": true,
+ "eth-lattice-keyring>gridplus-sdk>elliptic": true,
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true,
"eth-lattice-keyring>gridplus-sdk>uuid": true,
+ "eth-lattice-keyring>rlp": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethers>@ethersproject/sha2>hash.js": true,
+ "ganache>secp256k1": true,
"lodash": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": {
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true,
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": {
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": {
"globals": {
- "console.warn": true,
- "fetch": true
+ "TextDecoder": true,
+ "crypto": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
}
},
"eth-lattice-keyring>gridplus-sdk>aes-js": {
@@ -3837,6 +3863,11 @@
"define": true
}
},
+ "eth-lattice-keyring>gridplus-sdk>bitwise": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk>borc": {
"globals": {
"console": true
@@ -3858,24 +3889,28 @@
"globals": {
"URL": true,
"URLSearchParams": true,
- "location": true,
- "navigator": true
- }
- },
- "eth-lattice-keyring>gridplus-sdk>bs58check": {
- "packages": {
- "@noble/hashes": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true
+ "location": true
}
},
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": {
+ "eth-lattice-keyring>gridplus-sdk>elliptic": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58>base-x": true
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
- "eth-lattice-keyring>gridplus-sdk>secp256k1": {
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": {
+ "globals": {
+ "intToBuffer": true
+ },
"packages": {
- "@metamask/ppom-validator>elliptic": true
+ "@metamask/ethjs>js-sha3": true,
+ "bn.js": true,
+ "buffer": true
}
},
"eth-lattice-keyring>gridplus-sdk>uuid": {
@@ -4199,9 +4234,20 @@
"ethers>@ethersproject/signing-key": {
"packages": {
"@ethersproject/bytes": true,
- "@metamask/ppom-validator>elliptic": true,
"ethers>@ethersproject/logger": true,
- "ethers>@ethersproject/properties": true
+ "ethers>@ethersproject/properties": true,
+ "ethers>@ethersproject/signing-key>elliptic": true
+ }
+ },
+ "ethers>@ethersproject/signing-key>elliptic": {
+ "packages": {
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
"ethers>@ethersproject/solidity": {
diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json
index 79058c8c6954..4212ef454eea 100644
--- a/lavamoat/browserify/main/policy.json
+++ b/lavamoat/browserify/main/policy.json
@@ -150,7 +150,7 @@
"console.warn": true
},
"packages": {
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
@@ -158,11 +158,6 @@
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": {
- "globals": {
- "TextEncoder": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -188,8 +183,8 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
+ "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true,
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": {
@@ -197,32 +192,14 @@
"TextEncoder": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
- "@metamask/utils>@scure/base": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@metamask/utils>@scure/base": true,
+ "@noble/hashes": true
}
},
"@ethersproject/abi": {
@@ -389,9 +366,9 @@
"@ethereumjs/tx": true,
"@keystonehq/bc-ur-registry-eth": true,
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": true,
+ "@keystonehq/metamask-airgapped-keyring>rlp": true,
"@metamask/obs-store": true,
"browserify>buffer": true,
- "ethereumjs-util>rlp": true,
"uuid": true,
"webpack>events": true
}
@@ -401,15 +378,16 @@
"@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@keystonehq/bc-ur-registry-eth": true,
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": true,
"@metamask/eth-trezor-keyring>hdkey": true,
"browserify>buffer": true,
+ "eth-lattice-keyring>rlp": true,
"uuid": true
}
},
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": {
- "globals": {
- "TextEncoder": true
+ "@keystonehq/metamask-airgapped-keyring>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@lavamoat/lavadome-react": {
@@ -1608,12 +1586,18 @@
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
- "ethereumjs-util>create-hash": true,
- "ethereumjs-util>rlp": true
+ "ethereumjs-util>create-hash": true
+ }
+ },
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@metamask/logging-controller": {
@@ -2364,9 +2348,20 @@
"@metamask/smart-transactions-controller>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/util": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": {
+ "packages": {
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": true
+ "webpack>events": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": {
+ "globals": {
+ "TextEncoder": true
}
},
"@metamask/smart-transactions-controller>@ethereumjs/util": {
@@ -2376,7 +2371,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
"webpack>events": true
}
},
@@ -2615,6 +2610,7 @@
},
"packages": {
"@ethereumjs/tx": true,
+ "@ethereumjs/tx>@ethereumjs/common": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@ethersproject/abi": true,
"@ethersproject/contracts": true,
@@ -2627,7 +2623,6 @@
"@metamask/name-controller>async-mutex": true,
"@metamask/network-controller": true,
"@metamask/rpc-errors": true,
- "@metamask/transaction-controller>@ethereumjs/common": true,
"@metamask/transaction-controller>@metamask/nonce-tracker": true,
"@metamask/utils": true,
"bn.js": true,
@@ -2639,14 +2634,6 @@
"webpack>events": true
}
},
- "@metamask/transaction-controller>@ethereumjs/common": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
- "@ethereumjs/tx>@ethereumjs/util": true,
- "browserify>buffer": true,
- "webpack>events": true
- }
- },
"@metamask/transaction-controller>@metamask/nonce-tracker": {
"packages": {
"@ethersproject/providers": true,
@@ -3101,23 +3088,6 @@
"define": true
}
},
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": {
- "packages": {
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": true,
- "webpack>events": true
- }
- },
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": {
- "globals": {
- "console.warn": true,
- "fetch": true
- },
- "packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
- }
- },
"@trezor/connect-web>@trezor/connect>@trezor/protobuf": {
"packages": {
"@swc/helpers>tslib": true,
@@ -3749,16 +3719,59 @@
"setInterval": true
},
"packages": {
- "@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"bn.js": true,
"browserify>buffer": true,
"crypto-browserify": true,
+ "eth-lattice-keyring>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk": true,
"eth-lattice-keyring>rlp": true,
"webpack>events": true
}
},
+ "eth-lattice-keyring>@ethereumjs/tx": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/common": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": {
+ "packages": {
+ "browserify": true,
+ "browserify>buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": {
+ "globals": {
+ "WeakRef": true
+ },
+ "packages": {
+ "browserify": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": {
+ "globals": {
+ "TextDecoder": true,
+ "crypto": true
+ },
+ "packages": {
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk": {
"globals": {
"AbortController": true,
@@ -3776,54 +3789,67 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "@metamask/eth-sig-util": true,
"@metamask/ethjs>js-sha3": true,
"@metamask/keyring-api>bech32": true,
- "@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"eth-lattice-keyring>gridplus-sdk>bignumber.js": true,
+ "eth-lattice-keyring>gridplus-sdk>bitwise": true,
"eth-lattice-keyring>gridplus-sdk>borc": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check": true,
- "eth-lattice-keyring>gridplus-sdk>secp256k1": true,
+ "eth-lattice-keyring>gridplus-sdk>elliptic": true,
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true,
"eth-lattice-keyring>gridplus-sdk>uuid": true,
+ "eth-lattice-keyring>rlp": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethers>@ethersproject/sha2>hash.js": true,
+ "ganache>secp256k1": true,
"lodash": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": {
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true,
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": {
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": {
"globals": {
- "console.warn": true,
- "fetch": true
+ "TextDecoder": true,
+ "crypto": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
}
},
"eth-lattice-keyring>gridplus-sdk>aes-js": {
@@ -3837,6 +3863,11 @@
"define": true
}
},
+ "eth-lattice-keyring>gridplus-sdk>bitwise": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk>borc": {
"globals": {
"console": true
@@ -3858,24 +3889,28 @@
"globals": {
"URL": true,
"URLSearchParams": true,
- "location": true,
- "navigator": true
- }
- },
- "eth-lattice-keyring>gridplus-sdk>bs58check": {
- "packages": {
- "@noble/hashes": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true
+ "location": true
}
},
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": {
+ "eth-lattice-keyring>gridplus-sdk>elliptic": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58>base-x": true
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
- "eth-lattice-keyring>gridplus-sdk>secp256k1": {
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": {
+ "globals": {
+ "intToBuffer": true
+ },
"packages": {
- "@metamask/ppom-validator>elliptic": true
+ "@metamask/ethjs>js-sha3": true,
+ "bn.js": true,
+ "buffer": true
}
},
"eth-lattice-keyring>gridplus-sdk>uuid": {
@@ -4199,9 +4234,20 @@
"ethers>@ethersproject/signing-key": {
"packages": {
"@ethersproject/bytes": true,
- "@metamask/ppom-validator>elliptic": true,
"ethers>@ethersproject/logger": true,
- "ethers>@ethersproject/properties": true
+ "ethers>@ethersproject/properties": true,
+ "ethers>@ethersproject/signing-key>elliptic": true
+ }
+ },
+ "ethers>@ethersproject/signing-key>elliptic": {
+ "packages": {
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
"ethers>@ethersproject/solidity": {
diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json
index 08a75ac8612b..5234fe8d6fbb 100644
--- a/lavamoat/browserify/mmi/policy.json
+++ b/lavamoat/browserify/mmi/policy.json
@@ -150,7 +150,7 @@
"console.warn": true
},
"packages": {
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": true,
"@ethereumjs/tx>ethereum-cryptography": true,
"browserify>buffer": true,
@@ -158,11 +158,6 @@
"webpack>events": true
}
},
- "@ethereumjs/tx>@ethereumjs/util>@ethereumjs/rlp": {
- "globals": {
- "TextEncoder": true
- }
- },
"@ethereumjs/tx>@ethereumjs/util>micro-ftch": {
"globals": {
"Headers": true,
@@ -188,8 +183,8 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
+ "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true,
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": {
@@ -197,32 +192,14 @@
"TextEncoder": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@noble/hashes": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
- "@metamask/utils>@scure/base": true
- }
- },
- "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
- "globals": {
- "TextEncoder": true,
- "crypto": true
+ "@metamask/utils>@scure/base": true,
+ "@noble/hashes": true
}
},
"@ethersproject/abi": {
@@ -389,9 +366,9 @@
"@ethereumjs/tx": true,
"@keystonehq/bc-ur-registry-eth": true,
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": true,
+ "@keystonehq/metamask-airgapped-keyring>rlp": true,
"@metamask/obs-store": true,
"browserify>buffer": true,
- "ethereumjs-util>rlp": true,
"uuid": true,
"webpack>events": true
}
@@ -401,15 +378,16 @@
"@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@keystonehq/bc-ur-registry-eth": true,
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": true,
"@metamask/eth-trezor-keyring>hdkey": true,
"browserify>buffer": true,
+ "eth-lattice-keyring>rlp": true,
"uuid": true
}
},
- "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>rlp": {
- "globals": {
- "TextEncoder": true
+ "@keystonehq/metamask-airgapped-keyring>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@lavamoat/lavadome-react": {
@@ -1700,12 +1678,18 @@
"@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": {
"packages": {
"@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true,
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true,
"bn.js": true,
"browserify>assert": true,
"browserify>buffer": true,
"browserify>insert-module-globals>is-buffer": true,
- "ethereumjs-util>create-hash": true,
- "ethereumjs-util>rlp": true
+ "ethereumjs-util>create-hash": true
+ }
+ },
+ "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": {
+ "packages": {
+ "bn.js": true,
+ "browserify>buffer": true
}
},
"@metamask/logging-controller": {
@@ -2456,9 +2440,20 @@
"@metamask/smart-transactions-controller>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/util": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": {
+ "packages": {
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": true
+ "webpack>events": true
+ }
+ },
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": {
+ "globals": {
+ "TextEncoder": true
}
},
"@metamask/smart-transactions-controller>@ethereumjs/util": {
@@ -2468,7 +2463,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true,
"webpack>events": true
}
},
@@ -2707,6 +2702,7 @@
},
"packages": {
"@ethereumjs/tx": true,
+ "@ethereumjs/tx>@ethereumjs/common": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@ethersproject/abi": true,
"@ethersproject/contracts": true,
@@ -2719,7 +2715,6 @@
"@metamask/name-controller>async-mutex": true,
"@metamask/network-controller": true,
"@metamask/rpc-errors": true,
- "@metamask/transaction-controller>@ethereumjs/common": true,
"@metamask/transaction-controller>@metamask/nonce-tracker": true,
"@metamask/utils": true,
"bn.js": true,
@@ -2731,14 +2726,6 @@
"webpack>events": true
}
},
- "@metamask/transaction-controller>@ethereumjs/common": {
- "packages": {
- "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
- "@ethereumjs/tx>@ethereumjs/util": true,
- "browserify>buffer": true,
- "webpack>events": true
- }
- },
"@metamask/transaction-controller>@metamask/nonce-tracker": {
"packages": {
"@ethersproject/providers": true,
@@ -3193,23 +3180,6 @@
"define": true
}
},
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common": {
- "packages": {
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": true,
- "webpack>events": true
- }
- },
- "@trezor/connect-web>@trezor/connect>@ethereumjs/common>@ethereumjs/util": {
- "globals": {
- "console.warn": true,
- "fetch": true
- },
- "packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
- }
- },
"@trezor/connect-web>@trezor/connect>@trezor/protobuf": {
"packages": {
"@swc/helpers>tslib": true,
@@ -3841,16 +3811,59 @@
"setInterval": true
},
"packages": {
- "@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"bn.js": true,
"browserify>buffer": true,
"crypto-browserify": true,
+ "eth-lattice-keyring>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk": true,
"eth-lattice-keyring>rlp": true,
"webpack>events": true
}
},
+ "eth-lattice-keyring>@ethereumjs/tx": {
+ "packages": {
+ "@ethereumjs/tx>@ethereumjs/common": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": {
+ "packages": {
+ "browserify": true,
+ "browserify>buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>case": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz>@chainsafe/persistent-merkle-tree": {
+ "globals": {
+ "WeakRef": true
+ },
+ "packages": {
+ "browserify": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": {
+ "globals": {
+ "TextDecoder": true,
+ "crypto": true
+ },
+ "packages": {
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk": {
"globals": {
"AbortController": true,
@@ -3868,54 +3881,67 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "@metamask/eth-sig-util": true,
"@metamask/ethjs>js-sha3": true,
"@metamask/keyring-api>bech32": true,
- "@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"eth-lattice-keyring>gridplus-sdk>bignumber.js": true,
+ "eth-lattice-keyring>gridplus-sdk>bitwise": true,
"eth-lattice-keyring>gridplus-sdk>borc": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check": true,
- "eth-lattice-keyring>gridplus-sdk>secp256k1": true,
+ "eth-lattice-keyring>gridplus-sdk>elliptic": true,
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": true,
"eth-lattice-keyring>gridplus-sdk>uuid": true,
+ "eth-lattice-keyring>rlp": true,
+ "ethereumjs-util>ethereum-cryptography>bs58check": true,
"ethers>@ethersproject/sha2>hash.js": true,
+ "ganache>secp256k1": true,
"lodash": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": {
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/rlp": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethersproject/providers": true,
+ "browserify>buffer": true,
+ "browserify>insert-module-globals>is-buffer": true,
+ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true,
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true,
+ "@ethereumjs/tx>@ethereumjs/common>crc-32": true,
+ "@ethereumjs/tx>@ethereumjs/util": true,
+ "browserify>buffer": true,
"webpack>events": true
}
},
- "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": {
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": {
"globals": {
- "console.warn": true,
- "fetch": true
+ "TextDecoder": true,
+ "crypto": true
},
"packages": {
- "@ethereumjs/tx>ethereum-cryptography": true,
- "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
- "webpack>events": true
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true
+ }
+ },
+ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
+ "globals": {
+ "TextEncoder": true,
+ "crypto": true
}
},
"eth-lattice-keyring>gridplus-sdk>aes-js": {
@@ -3929,6 +3955,11 @@
"define": true
}
},
+ "eth-lattice-keyring>gridplus-sdk>bitwise": {
+ "packages": {
+ "browserify>buffer": true
+ }
+ },
"eth-lattice-keyring>gridplus-sdk>borc": {
"globals": {
"console": true
@@ -3950,24 +3981,28 @@
"globals": {
"URL": true,
"URLSearchParams": true,
- "location": true,
- "navigator": true
- }
- },
- "eth-lattice-keyring>gridplus-sdk>bs58check": {
- "packages": {
- "@noble/hashes": true,
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true
+ "location": true
}
},
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": {
+ "eth-lattice-keyring>gridplus-sdk>elliptic": {
"packages": {
- "eth-lattice-keyring>gridplus-sdk>bs58check>bs58>base-x": true
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
- "eth-lattice-keyring>gridplus-sdk>secp256k1": {
+ "eth-lattice-keyring>gridplus-sdk>eth-eip712-util-browser": {
+ "globals": {
+ "intToBuffer": true
+ },
"packages": {
- "@metamask/ppom-validator>elliptic": true
+ "@metamask/ethjs>js-sha3": true,
+ "bn.js": true,
+ "buffer": true
}
},
"eth-lattice-keyring>gridplus-sdk>uuid": {
@@ -4291,9 +4326,20 @@
"ethers>@ethersproject/signing-key": {
"packages": {
"@ethersproject/bytes": true,
- "@metamask/ppom-validator>elliptic": true,
"ethers>@ethersproject/logger": true,
- "ethers>@ethersproject/properties": true
+ "ethers>@ethersproject/properties": true,
+ "ethers>@ethersproject/signing-key>elliptic": true
+ }
+ },
+ "ethers>@ethersproject/signing-key>elliptic": {
+ "packages": {
+ "@metamask/ppom-validator>elliptic>brorand": true,
+ "@metamask/ppom-validator>elliptic>hmac-drbg": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
+ "@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
+ "bn.js": true,
+ "ethers>@ethersproject/sha2>hash.js": true,
+ "pumpify>inherits": true
}
},
"ethers>@ethersproject/solidity": {
diff --git a/package.json b/package.json
index 223372f5dcc5..8533cd4b4e16 100644
--- a/package.json
+++ b/package.json
@@ -134,11 +134,6 @@
},
"resolutions": {
"chokidar": "^3.6.0",
- "gridplus-sdk/elliptic": "^6.5.7",
- "gridplus-sdk/secp256k1": "^5.0.1",
- "eth-lattice-keyring/@ethereumjs/tx": "^4.2.0",
- "@ethersproject/signing-key/elliptic": "^6.5.7",
- "ganache/secp256k1": "^4.0.4",
"simple-update-notifier@^1.0.0": "^2.0.0",
"@types/react": "^16.9.53",
"analytics-node/axios": "^0.21.2",
@@ -251,7 +246,11 @@
"@ledgerhq/hw-app-eth@npm:^6.39.0": "patch:@ledgerhq/hw-app-eth@npm%3A6.39.0#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch",
"@ledgerhq/evm-tools@npm:^1.2.3": "patch:@ledgerhq/evm-tools@npm%3A1.2.3#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch",
"cross-spawn@npm:^5.0.1": "^7.0.6",
- "@solana/web3.js@npm:^1.95.0": "^1.95.8"
+ "@solana/web3.js@npm:^1.95.0": "^1.95.8",
+ "secp256k1@npm:^4.0.0": "4.0.4",
+ "secp256k1@npm:^4.0.1": "4.0.4",
+ "secp256k1@npm:4.0.2": "4.0.4",
+ "secp256k1@npm:4.0.3": "4.0.4"
},
"dependencies": {
"@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch",
@@ -347,7 +346,7 @@
"@metamask/snaps-rpc-methods": "^11.7.0",
"@metamask/snaps-sdk": "^6.13.0",
"@metamask/snaps-utils": "^8.6.1",
- "@metamask/solana-wallet-snap": "^0.1.9",
+ "@metamask/solana-wallet-snap": "^1.0.3",
"@metamask/transaction-controller": "^42.0.0",
"@metamask/user-operation-controller": "^19.0.0",
"@metamask/utils": "^10.0.1",
@@ -692,10 +691,17 @@
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>@ledgerhq/hw-transport-node-hid-noevents>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>node-hid": false,
"@eth-optimism/contracts>@ethersproject/hardware-wallets>@ledgerhq/hw-transport-node-hid>usb": false,
+ "@metamask/controllers>web3-provider-engine>ethereumjs-util>keccak": false,
+ "@metamask/controllers>web3-provider-engine>ethereumjs-util>secp256k1": false,
+ "@metamask/controllers>web3-provider-engine>ethereumjs-vm>merkle-patricia-tree>ethereumjs-util>keccak": false,
+ "@metamask/controllers>web3-provider-engine>ethereumjs-vm>merkle-patricia-tree>ethereumjs-util>secp256k1": false,
+ "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": false,
"@storybook/api>core-js": false,
"@storybook/core>@storybook/core-client>@storybook/ui>core-js-pure": false,
"@storybook/test-runner>@storybook/core-common>esbuild": false,
- "eth-lattice-keyring>gridplus-sdk": true,
+ "eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>keccak": false,
+ "eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>secp256k1": false,
+ "eth-lattice-keyring>gridplus-sdk": false,
"ethereumjs-util>ethereum-cryptography>keccak": false,
"ganache>@trufflesuite/bigint-buffer": false,
"ganache>@trufflesuite/uws-js-unofficial>bufferutil": false,
@@ -705,10 +711,13 @@
"ganache>leveldown": false,
"ganache>secp256k1": false,
"ganache>utf-8-validate": false,
+ "ethereumjs-util>ethereum-cryptography>secp256k1": false,
"gulp-watch>chokidar>fsevents": false,
"gulp>glob-watcher>chokidar>fsevents": false,
"webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false,
+ "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": false,
"eth-lattice-keyring>gridplus-sdk>secp256k1": false,
+ "eth-lattice-keyring>secp256k1": false,
"@storybook/react>@pmmmwh/react-refresh-webpack-plugin>core-js-pure": false,
"@testing-library/jest-dom>aria-query>@babel/runtime-corejs3>core-js-pure": false,
"web3": false,
@@ -717,6 +726,7 @@
"web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>es5-ext": false,
"web3>web3-core>web3-core-requestmanager>web3-providers-ws>websocket>utf-8-validate": false,
"web3>web3-shh": false,
+ "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>hdkey>secp256k1": false,
"@metamask/base-controller>simple-git-hooks": false,
"@storybook/core>@storybook/core-server>webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false,
"resolve-url-loader>es6-iterator>es5-ext": false,
diff --git a/shared/constants/metametrics.ts b/shared/constants/metametrics.ts
index d46bad603a83..700bead89320 100644
--- a/shared/constants/metametrics.ts
+++ b/shared/constants/metametrics.ts
@@ -640,6 +640,7 @@ export enum MetaMetricsEventName {
ActivityDetailsClosed = 'Activity Details Closed',
AnalyticsPreferenceSelected = 'Analytics Preference Selected',
AppInstalled = 'App Installed',
+ AppOpened = 'App Opened',
AppUnlocked = 'App Unlocked',
AppUnlockedFailed = 'App Unlocked Failed',
AppLocked = 'App Locked',
diff --git a/shared/types/bridge-status.ts b/shared/types/bridge-status.ts
index 4c3f79bcd672..fc9357ef968a 100644
--- a/shared/types/bridge-status.ts
+++ b/shared/types/bridge-status.ts
@@ -28,6 +28,16 @@ export type StatusRequest = {
refuel?: boolean; // lifi
};
+export type StatusRequestDto = Omit<
+ StatusRequest,
+ 'quote' | 'srcChainId' | 'destChainId' | 'refuel'
+> & {
+ srcChainId: string; // lifi, socket, squid
+ destChainId: string; // lifi, socket, squid
+ requestId?: string;
+ refuel?: string; // lifi
+};
+
export type StatusRequestWithSrcTxHash = StatusRequest & {
srcTxHash: string;
};
diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js
index 4ade3f2e48ba..9c5fd6359486 100644
--- a/test/e2e/helpers.js
+++ b/test/e2e/helpers.js
@@ -651,25 +651,20 @@ async function createWebSocketConnection(driver, hostname) {
try {
await driver.executeScript(async (wsHostname) => {
const url = `ws://${wsHostname}:8000`;
-
const socket = new WebSocket(url);
-
socket.onopen = () => {
console.log('WebSocket connection opened');
socket.send('Hello, server!');
};
-
socket.onerror = (error) => {
console.error(
'WebSocket error:',
error.message || 'Connection blocked',
);
};
-
socket.onmessage = (event) => {
console.log('Message received from server:', event.data);
};
-
socket.onclose = () => {
console.log('WebSocket connection closed');
};
diff --git a/test/e2e/page-objects/pages/account-list-page.ts b/test/e2e/page-objects/pages/account-list-page.ts
index 955dd5111fe1..bbf25013f607 100644
--- a/test/e2e/page-objects/pages/account-list-page.ts
+++ b/test/e2e/page-objects/pages/account-list-page.ts
@@ -1,6 +1,6 @@
import { strict as assert } from 'assert';
import { Driver } from '../../webdriver/driver';
-import { largeDelayMs } from '../../helpers';
+import { largeDelayMs, regularDelayMs } from '../../helpers';
import messages from '../../../../app/_locales/en/messages.json';
class AccountListPage {
@@ -8,6 +8,9 @@ class AccountListPage {
private readonly accountAddressText = '.qr-code__address-segments';
+ private readonly accountListAddressItem =
+ '[data-testid="account-list-address"]';
+
private readonly accountListBalance =
'[data-testid="second-currency-display"]';
@@ -40,6 +43,11 @@ class AccountListPage {
private readonly addEthereumAccountButton =
'[data-testid="multichain-account-menu-popover-add-account"]';
+ private readonly addHardwareWalletButton = {
+ text: 'Add hardware wallet',
+ tag: 'button',
+ };
+
private readonly addImportedAccountButton =
'[data-testid="multichain-account-menu-popover-add-imported-account"]';
@@ -378,6 +386,15 @@ class AccountListPage {
await this.driver.waitForSelector(this.addEthereumAccountButton);
}
+ async openConnectHardwareWalletModal(): Promise {
+ console.log(`Open connect hardware wallet modal`);
+ await this.driver.clickElement(this.createAccountButton);
+ await this.driver.clickElement(this.addHardwareWalletButton);
+ // This delay is needed to mitigate an existing bug in FF
+ // See https://github.com/metamask/metamask-extension/issues/25851
+ await this.driver.delay(regularDelayMs);
+ }
+
async openHiddenAccountOptions(): Promise {
console.log(`Open hidden accounts options menu`);
await this.driver.clickElement(this.hiddenAccountOptionsMenuButton);
@@ -436,6 +453,18 @@ class AccountListPage {
await this.driver.clickElement(this.pinUnpinAccountButton);
}
+ async check_accountAddressDisplayedInAccountList(
+ expectedAddress: string,
+ ): Promise {
+ console.log(
+ `Check that account address ${expectedAddress} is displayed in account list`,
+ );
+ await this.driver.waitForSelector({
+ css: this.accountListAddressItem,
+ text: expectedAddress,
+ });
+ }
+
/**
* Checks that the account balance is displayed in the account list.
*
diff --git a/test/e2e/page-objects/pages/hardware-wallet/connect-hardware-wallet-page.ts b/test/e2e/page-objects/pages/hardware-wallet/connect-hardware-wallet-page.ts
new file mode 100644
index 000000000000..e3b4de3fb522
--- /dev/null
+++ b/test/e2e/page-objects/pages/hardware-wallet/connect-hardware-wallet-page.ts
@@ -0,0 +1,54 @@
+import { Driver } from '../../../webdriver/driver';
+
+/**
+ * Represents the page for connecting hardware wallets.
+ * This page allows users to initiate connections with various hardware wallet types.
+ */
+class ConnectHardwareWalletPage {
+ private driver: Driver;
+
+ private readonly connectHardwareWalletPageTitle = {
+ text: 'Connect a hardware wallet',
+ tag: 'h3',
+ };
+
+ private readonly connectLatticeButton = '[data-testid="connect-lattice-btn"]';
+
+ private readonly connectTrezorButton = '[data-testid="connect-trezor-btn"]';
+
+ private readonly continueButton = { text: 'Continue', tag: 'button' };
+
+ constructor(driver: Driver) {
+ this.driver = driver;
+ }
+
+ async check_pageIsLoaded(): Promise {
+ try {
+ await this.driver.waitForMultipleSelectors([
+ this.connectHardwareWalletPageTitle,
+ this.connectLatticeButton,
+ ]);
+ } catch (e) {
+ console.log(
+ 'Timeout while waiting for connect hardware wallet page to be loaded',
+ e,
+ );
+ throw e;
+ }
+ console.log('Connect hardware wallet page is loaded');
+ }
+
+ async openConnectLatticePage(): Promise {
+ console.log(`Open connect lattice page`);
+ await this.driver.clickElement(this.connectLatticeButton);
+ await this.driver.clickElement(this.continueButton);
+ }
+
+ async openConnectTrezorPage(): Promise {
+ console.log(`Open connect trezor page`);
+ await this.driver.clickElement(this.connectTrezorButton);
+ await this.driver.clickElement(this.continueButton);
+ }
+}
+
+export default ConnectHardwareWalletPage;
diff --git a/test/e2e/page-objects/pages/hardware-wallet/select-trezor-account-page.ts b/test/e2e/page-objects/pages/hardware-wallet/select-trezor-account-page.ts
new file mode 100644
index 000000000000..65a00808c0bb
--- /dev/null
+++ b/test/e2e/page-objects/pages/hardware-wallet/select-trezor-account-page.ts
@@ -0,0 +1,94 @@
+import { Driver } from '../../../webdriver/driver';
+
+/**
+ * Represents the select trezor hardware wallet account page.
+ * This page allows users to select Trezor accounts to connect.
+ */
+class SelectTrezorAccountPage {
+ private driver: Driver;
+
+ private readonly cancelButton = { text: 'Cancel', tag: 'button' };
+
+ private readonly selectTrezorAccountPageTitle = {
+ text: 'Select an account',
+ tag: 'h3',
+ };
+
+ private readonly trezorAccountCheckbox = '.hw-account-list__item__checkbox';
+
+ private readonly unlockButton = { text: 'Unlock', tag: 'button' };
+
+ constructor(driver: Driver) {
+ this.driver = driver;
+ }
+
+ async check_pageIsLoaded(): Promise {
+ try {
+ await this.driver.waitForMultipleSelectors([
+ this.selectTrezorAccountPageTitle,
+ this.cancelButton,
+ ]);
+ } catch (e) {
+ console.log(
+ 'Timeout while waiting for select trezor account page to be loaded',
+ e,
+ );
+ throw e;
+ }
+ console.log('Select trezor account page is loaded');
+ }
+
+ async clickUnlockButton(): Promise {
+ console.log(`Click unlock button on select trezor account page`);
+ await this.driver.clickElement(this.unlockButton);
+ }
+
+ async selectTrezorAccount(accountIndex: number): Promise {
+ console.log(`Select trezor account ${accountIndex}`);
+ const accountCheckboxes = await this.driver.findElements(
+ this.trezorAccountCheckbox,
+ );
+ await accountCheckboxes[accountIndex - 1].click();
+ }
+
+ async unlockAccount(accountIndex: number): Promise {
+ console.log(`Unlock trezor account ${accountIndex}`);
+ await this.selectTrezorAccount(accountIndex);
+ await this.clickUnlockButton();
+ }
+
+ /**
+ * Check that the specified address is displayed in the list of accounts.
+ *
+ * @param address - The address to check for.
+ */
+ async check_addressIsDisplayed(address: string): Promise {
+ console.log(
+ `Check that account address ${address} is displayed on select trezor account page`,
+ );
+ await this.driver.waitForSelector({ text: address });
+ }
+
+ /**
+ * This function checks if the specified number of trezor account items is displayed in the trezor account list.
+ *
+ * @param expectedNumber - The number of trezor account items expected to be displayed. Defaults to 5.
+ * @returns A promise that resolves if the expected number of trezor account items is displayed.
+ */
+ async check_trezorAccountNumber(expectedNumber: number = 5): Promise {
+ console.log(
+ `Waiting for ${expectedNumber} trezor account items to be displayed`,
+ );
+ await this.driver.wait(async () => {
+ const trezorAccountItems = await this.driver.findElements(
+ this.trezorAccountCheckbox,
+ );
+ return trezorAccountItems.length === expectedNumber;
+ }, 10000);
+ console.log(
+ `Expected number of trezor account items ${expectedNumber} is displayed.`,
+ );
+ }
+}
+
+export default SelectTrezorAccountPage;
diff --git a/test/e2e/page-objects/pages/home/asset-list.ts b/test/e2e/page-objects/pages/home/asset-list.ts
index abc5870ec04a..db9367991bf7 100644
--- a/test/e2e/page-objects/pages/home/asset-list.ts
+++ b/test/e2e/page-objects/pages/home/asset-list.ts
@@ -81,15 +81,6 @@ class AssetListPage {
throw new Error(`${assetName} button not found`);
}
- async getAllNetworksOptionTotal(): Promise {
- console.log(`Retrieving the "All networks" option fiat value`);
- const allNetworksValueElement = await this.driver.findElement(
- this.allNetworksTotal,
- );
- const value = await allNetworksValueElement.getText();
- return value;
- }
-
async getCurrentNetworksOptionTotal(): Promise {
console.log(`Retrieving the "Current network" option fiat value`);
const allNetworksValueElement = await this.driver.findElement(
@@ -156,30 +147,6 @@ class AssetListPage {
);
}
- async selectNetworkFilterAllNetworks(): Promise {
- console.log(`Selecting "All networks" from the network filter`);
- await this.driver.clickElement(this.allNetworksOption);
- await this.driver.waitUntil(
- async () => {
- const label = await this.getNetworksFilterLabel();
- return label === 'All networks';
- },
- { timeout: 5000, interval: 100 },
- );
- }
-
- async selectNetworkFilterCurrentNetwork(): Promise {
- console.log(`Selecting "Current network" from the network filter`);
- await this.driver.clickElement(this.currentNetworkOption);
- await this.driver.waitUntil(
- async () => {
- const label = await this.getNetworksFilterLabel();
- return label !== 'All networks';
- },
- { timeout: 5000, interval: 100 },
- );
- }
-
async waitUntilFilterLabelIs(label: string): Promise {
console.log(`Waiting until the filter label is ${label}`);
await this.driver.waitUntil(
@@ -191,17 +158,6 @@ class AssetListPage {
);
}
- async check_ifAssetIsVisible(assetName: string): Promise {
- const assets = await this.driver.findElements(this.tokenListItem);
- for (const asset of assets) {
- const text = await asset.getText();
- if (text.includes(assetName)) {
- return true;
- }
- }
- return false;
- }
-
async check_networkFilterText(expectedText: string): Promise {
console.log(
`Verify the displayed account label in header is: ${expectedText}`,
diff --git a/test/e2e/page-objects/pages/snap-simple-keyring-page.ts b/test/e2e/page-objects/pages/snap-simple-keyring-page.ts
index c75adb06da3a..21722cf7b36a 100644
--- a/test/e2e/page-objects/pages/snap-simple-keyring-page.ts
+++ b/test/e2e/page-objects/pages/snap-simple-keyring-page.ts
@@ -306,7 +306,10 @@ class SnapSimpleKeyringPage {
await this.driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
await this.driver.clickElement(this.confirmConnectionButton);
- await this.driver.waitForSelector(this.addtoMetamaskMessage);
+ // set a bigger timeout to wait for element as a temporary fix to reduce flakiness
+ await this.driver.waitForSelector(this.addtoMetamaskMessage, {
+ timeout: 15000,
+ });
await this.driver.clickElementSafe(this.snapInstallScrollButton, 200);
await this.driver.waitForSelector(this.confirmAddtoMetamask);
await this.driver.clickElement(this.confirmAddtoMetamask);
diff --git a/test/e2e/page-objects/pages/test-dapp.ts b/test/e2e/page-objects/pages/test-dapp.ts
index c31ee497152e..5155707663b6 100644
--- a/test/e2e/page-objects/pages/test-dapp.ts
+++ b/test/e2e/page-objects/pages/test-dapp.ts
@@ -16,9 +16,15 @@ class TestDapp {
private readonly confirmDialogScrollButton =
'[data-testid="signature-request-scroll-button"]';
+ private readonly confirmScrollToBottomButtonRedesign =
+ '.confirm-scroll-to-bottom__button';
+
private readonly confirmSignatureButton =
'[data-testid="page-container-footer-next"]';
+ private readonly confirmSignatureButtonRedesign =
+ '[data-testid="confirm-footer-button"]';
+
private readonly connectAccountButton = '#connectButton';
private readonly connectMetaMaskMessage = {
@@ -116,6 +122,11 @@ class TestDapp {
tag: 'div',
};
+ private readonly signTypedDataV3V4SignatureRequestMessageRedesign = {
+ text: 'Hello, Bob!',
+ tag: 'p',
+ };
+
private readonly signTypedDataV3VerifyButton = '#signTypedDataV3Verify';
private readonly signTypedDataV3VerifyResult = '#signTypedDataV3VerifyResult';
@@ -159,11 +170,6 @@ class TestDapp {
tag: 'h2',
};
- private readonly updateNetworkButton = {
- text: 'Update',
- tag: 'button',
- };
-
private readonly userRejectedRequestMessage = {
tag: 'span',
text: 'Error: User rejected the request.',
@@ -657,18 +663,33 @@ class TestDapp {
/**
* Sign a message with the signTypedDataV4 method.
+ *
+ * @param confirmationRedesign - Indicates whether the redesigned signature confirmation flow is used. Defaults to false.
*/
- async signTypedDataV4() {
+ async signTypedDataV4(confirmationRedesign: boolean = false) {
console.log('Sign message with signTypedDataV4');
await this.clickSignTypedDatav4();
await this.driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
- await this.driver.waitForSelector(
- this.signTypedDataV3V4SignatureRequestMessage,
- );
- await this.driver.clickElementSafe(this.confirmDialogScrollButton, 200);
- await this.driver.clickElementAndWaitForWindowToClose(
- this.confirmSignatureButton,
- );
+ if (confirmationRedesign) {
+ await this.driver.waitForSelector(
+ this.signTypedDataV3V4SignatureRequestMessageRedesign,
+ );
+ await this.driver.clickElementSafe(
+ this.confirmScrollToBottomButtonRedesign,
+ 200,
+ );
+ await this.driver.clickElementAndWaitForWindowToClose(
+ this.confirmSignatureButtonRedesign,
+ );
+ } else {
+ await this.driver.waitForSelector(
+ this.signTypedDataV3V4SignatureRequestMessage,
+ );
+ await this.driver.clickElementSafe(this.confirmDialogScrollButton, 200);
+ await this.driver.clickElementAndWaitForWindowToClose(
+ this.confirmSignatureButton,
+ );
+ }
}
async pasteIntoEip747ContractAddressInput() {
diff --git a/test/e2e/tests/connections/connect-with-metamask.spec.js b/test/e2e/tests/connections/connect-with-metamask.spec.js
index 5611b40346db..b46fc8730d84 100644
--- a/test/e2e/tests/connections/connect-with-metamask.spec.js
+++ b/test/e2e/tests/connections/connect-with-metamask.spec.js
@@ -55,10 +55,6 @@ describe('Connections page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/connections/edit-account-flow.spec.js b/test/e2e/tests/connections/edit-account-flow.spec.js
index 7b05f439714c..1c4899ed8328 100644
--- a/test/e2e/tests/connections/edit-account-flow.spec.js
+++ b/test/e2e/tests/connections/edit-account-flow.spec.js
@@ -58,10 +58,6 @@ describe('Edit Accounts Flow', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/connections/edit-networks-flow.spec.js b/test/e2e/tests/connections/edit-networks-flow.spec.js
index 1db224f0ac0a..95a091f7e504 100644
--- a/test/e2e/tests/connections/edit-networks-flow.spec.js
+++ b/test/e2e/tests/connections/edit-networks-flow.spec.js
@@ -43,10 +43,6 @@ describe('Edit Networks Flow', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/connections/review-permissions-page.spec.js b/test/e2e/tests/connections/review-permissions-page.spec.js
index d411a343b2c9..60b7df8de4e0 100644
--- a/test/e2e/tests/connections/review-permissions-page.spec.js
+++ b/test/e2e/tests/connections/review-permissions-page.spec.js
@@ -36,10 +36,6 @@ describe('Review Permissions page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
@@ -90,10 +86,6 @@ describe('Review Permissions page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/dapp-interactions/dapp-interactions.spec.js b/test/e2e/tests/dapp-interactions/dapp-interactions.spec.js
index 584408134f1a..05d9528ce6b4 100644
--- a/test/e2e/tests/dapp-interactions/dapp-interactions.spec.js
+++ b/test/e2e/tests/dapp-interactions/dapp-interactions.spec.js
@@ -83,11 +83,6 @@ describe('Dapp interactions', function () {
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
-
const connectedDapp1 = await driver.isElementPresent({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/dapp-interactions/permissions.spec.js b/test/e2e/tests/dapp-interactions/permissions.spec.js
index 4b6c210f0a98..b8da733d3160 100644
--- a/test/e2e/tests/dapp-interactions/permissions.spec.js
+++ b/test/e2e/tests/dapp-interactions/permissions.spec.js
@@ -46,10 +46,6 @@ describe('Permissions', function () {
text: 'All Permissions',
tag: 'div',
});
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.waitForSelector({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/hardware-wallets/lattice-connect.spec.ts b/test/e2e/tests/hardware-wallets/lattice-connect.spec.ts
index b8497a9df692..e20e0bd6fb45 100644
--- a/test/e2e/tests/hardware-wallets/lattice-connect.spec.ts
+++ b/test/e2e/tests/hardware-wallets/lattice-connect.spec.ts
@@ -2,39 +2,33 @@ import { strict as assert } from 'assert';
import { Suite } from 'mocha';
import { Driver } from '../../webdriver/driver';
import FixtureBuilder from '../../fixture-builder';
-import { withFixtures, unlockWallet } from '../../helpers';
+import { withFixtures } from '../../helpers';
import { isManifestV3 } from '../../../../shared/modules/mv3.utils';
+import AccountListPage from '../../page-objects/pages/account-list-page';
+import ConnectHardwareWalletPage from '../../page-objects/pages/hardware-wallet/connect-hardware-wallet-page';
+import HeaderNavbar from '../../page-objects/pages/header-navbar';
+import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow';
describe('Lattice hardware wallet @no-mmi', function (this: Suite) {
- it('connects to lattice hardware wallet', async function () {
+ it('lattice page rendering validation', async function () {
await withFixtures(
{
fixtures: new FixtureBuilder().build(),
title: this.test?.fullTitle(),
},
async ({ driver }: { driver: Driver }) => {
- await unlockWallet(driver);
+ await loginWithBalanceValidation(driver);
+ const headerNavbar = new HeaderNavbar(driver);
+ await headerNavbar.openAccountMenu();
- // choose Connect hardware wallet from the account menu
- await driver.clickElement('[data-testid="account-menu-icon"]');
+ // Choose connect hardware wallet from the account menu
+ const accountListPage = new AccountListPage(driver);
+ await accountListPage.check_pageIsLoaded();
+ await accountListPage.openConnectHardwareWalletModal();
- // Wait until account list is loaded to mitigate race condition
- await driver.waitForSelector({
- text: 'Account 1',
- tag: 'span',
- });
- await driver.clickElement(
- '[data-testid="multichain-account-menu-popover-action-button"]',
- );
- await driver.clickElement({
- text: 'Add hardware wallet',
- tag: 'button',
- });
- await driver.findClickableElement(
- '[data-testid="hardware-connect-close-btn"]',
- );
- await driver.clickElement('[data-testid="connect-lattice-btn"]');
- await driver.clickElement({ text: 'Continue', tag: 'button' });
+ const connectHardwareWalletPage = new ConnectHardwareWalletPage(driver);
+ await connectHardwareWalletPage.check_pageIsLoaded();
+ await connectHardwareWalletPage.openConnectLatticePage();
const allWindows = await driver.waitUntilXWindowHandles(2);
assert.equal(allWindows.length, isManifestV3 ? 3 : 2);
diff --git a/test/e2e/tests/hardware-wallets/trezor-account.spec.js b/test/e2e/tests/hardware-wallets/trezor-account.spec.js
deleted file mode 100644
index 9abf6e67974d..000000000000
--- a/test/e2e/tests/hardware-wallets/trezor-account.spec.js
+++ /dev/null
@@ -1,156 +0,0 @@
-const { strict: assert } = require('assert');
-const FixtureBuilder = require('../../fixture-builder');
-const {
- defaultGanacheOptions,
- unlockWallet,
- withFixtures,
- regularDelayMs,
-} = require('../../helpers');
-const { shortenAddress } = require('../../../../ui/helpers/utils/util');
-const { KNOWN_PUBLIC_KEY_ADDRESSES } = require('../../../stub/keyring-bridge');
-
-/**
- * Connect Trezor hardware wallet without selecting an account
- *
- * @param {*} driver - Selenium driver
- */
-async function connectTrezor(driver) {
- // Open add hardware wallet modal
- await driver.clickElement('[data-testid="account-menu-icon"]');
- await driver.clickElement(
- '[data-testid="multichain-account-menu-popover-action-button"]',
- );
- await driver.clickElement({ text: 'Add hardware wallet' });
- // This delay is needed to mitigate an existing bug in FF
- // See https://github.com/metamask/metamask-extension/issues/25851
- await driver.delay(regularDelayMs);
- // Select Trezor
- await driver.clickElement('[data-testid="connect-trezor-btn"]');
- await driver.clickElement({ text: 'Continue' });
-}
-
-describe('Trezor Hardware', function () {
- it('derives the correct accounts', async function () {
- await withFixtures(
- {
- fixtures: new FixtureBuilder().build(),
- ganacheOptions: defaultGanacheOptions,
- title: this.test.fullTitle(),
- },
- async ({ driver }) => {
- await unlockWallet(driver);
- await connectTrezor(driver);
-
- // Check that the first page of accounts is correct
- for (const { address, index } of KNOWN_PUBLIC_KEY_ADDRESSES.slice(
- 0,
- 4,
- )) {
- const shortenedAddress = `${address.slice(0, 4)}...${address.slice(
- -4,
- )}`;
- assert(
- await driver.isElementPresent({
- text: shortenedAddress,
- }),
- `Known account ${index} not found`,
- );
- }
- },
- );
- });
-
- it('unlocks the first account', async function () {
- await withFixtures(
- {
- fixtures: new FixtureBuilder().build(),
- ganacheOptions: defaultGanacheOptions,
- title: this.test.fullTitle(),
- },
- async ({ driver }) => {
- await unlockWallet(driver);
- await connectTrezor(driver);
-
- // Select first account of first page and unlock
- await driver.clickElement('.hw-account-list__item__checkbox');
- await driver.clickElement({ text: 'Unlock' });
-
- // Check that the correct account has been added
- await driver.clickElement('[data-testid="account-menu-icon"]');
- assert(
- await driver.isElementPresent({
- text: 'Trezor 1',
- }),
- 'Trezor account not found',
- );
- assert(
- await driver.isElementPresent({
- text: shortenAddress(KNOWN_PUBLIC_KEY_ADDRESSES[0].address),
- }),
- 'Unlocked account is wrong',
- );
- },
- );
- });
-
- it('unlocks multiple accounts at once and removes one', async function () {
- await withFixtures(
- {
- fixtures: new FixtureBuilder().build(),
- ganacheOptions: defaultGanacheOptions,
- title: this.test.fullTitle(),
- },
- async ({ driver }) => {
- await unlockWallet(driver);
- await connectTrezor(driver);
-
- // Unlock 5 Trezor accounts
- const accountCheckboxes = await driver.findElements(
- '.hw-account-list__item__checkbox',
- );
- await accountCheckboxes[0].click();
- await accountCheckboxes[1].click();
- await accountCheckboxes[2].click();
- await accountCheckboxes[3].click();
- await accountCheckboxes[4].click();
-
- await driver.clickElement({ text: 'Unlock' });
-
- // Check that all 5 Trezor accounts are present
- await driver.clickElement('[data-testid="account-menu-icon"]');
- for (let i = 0; i < 5; i++) {
- assert(
- await driver.isElementPresent({
- text: `Trezor ${i + 1}`,
- }),
- `Trezor account ${i + 1} not found`,
- );
- assert(
- await driver.isElementPresent({
- text: shortenAddress(KNOWN_PUBLIC_KEY_ADDRESSES[i].address),
- }),
- `Unlocked account ${i + 1} is wrong`,
- );
- }
-
- // Remove Trezor account
- const accountDetailsButton = await driver.findElements(
- '[data-testid="account-list-item-menu-button"',
- );
- await accountDetailsButton[1].click();
- await driver.clickElement('[data-testid="account-list-menu-remove"');
- await driver.clickElement({
- text: 'Remove',
- tag: 'button',
- });
-
- // Assert Trezor account is removed
- await driver.clickElement('[data-testid="account-menu-icon"]');
-
- await driver.assertElementNotPresent({
- text: 'Trezor 1',
- });
- },
- );
- });
-});
diff --git a/test/e2e/tests/hardware-wallets/trezor-account.spec.ts b/test/e2e/tests/hardware-wallets/trezor-account.spec.ts
new file mode 100644
index 000000000000..44a382023881
--- /dev/null
+++ b/test/e2e/tests/hardware-wallets/trezor-account.spec.ts
@@ -0,0 +1,117 @@
+import FixtureBuilder from '../../fixture-builder';
+import { withFixtures } from '../../helpers';
+import { shortenAddress } from '../../../../ui/helpers/utils/util';
+import { KNOWN_PUBLIC_KEY_ADDRESSES } from '../../../stub/keyring-bridge';
+import AccountListPage from '../../page-objects/pages/account-list-page';
+import ConnectHardwareWalletPage from '../../page-objects/pages/hardware-wallet/connect-hardware-wallet-page';
+import HeaderNavbar from '../../page-objects/pages/header-navbar';
+import HomePage from '../../page-objects/pages/home/homepage';
+import SelectTrezorAccountPage from '../../page-objects/pages/hardware-wallet/select-trezor-account-page';
+import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow';
+
+describe('Trezor Hardware', function () {
+ it('derives the correct accounts and unlocks the first account', async function () {
+ await withFixtures(
+ {
+ fixtures: new FixtureBuilder().build(),
+ title: this.test?.fullTitle(),
+ },
+ async ({ driver }) => {
+ await loginWithBalanceValidation(driver);
+
+ const headerNavbar = new HeaderNavbar(driver);
+ await headerNavbar.openAccountMenu();
+
+ // Choose connect hardware wallet from the account menu
+ const accountListPage = new AccountListPage(driver);
+ await accountListPage.check_pageIsLoaded();
+ await accountListPage.openConnectHardwareWalletModal();
+
+ const connectHardwareWalletPage = new ConnectHardwareWalletPage(driver);
+ await connectHardwareWalletPage.check_pageIsLoaded();
+ await connectHardwareWalletPage.openConnectTrezorPage();
+
+ const selectTrezorAccountPage = new SelectTrezorAccountPage(driver);
+ await selectTrezorAccountPage.check_pageIsLoaded();
+
+ // Check that the first page of accounts is correct
+ await selectTrezorAccountPage.check_trezorAccountNumber();
+ for (const { address } of KNOWN_PUBLIC_KEY_ADDRESSES.slice(0, 4)) {
+ const shortenedAddress = `${address.slice(0, 4)}...${address.slice(
+ -4,
+ )}`;
+ await selectTrezorAccountPage.check_addressIsDisplayed(
+ shortenedAddress,
+ );
+ }
+
+ // Unlock first account of first page and check that the correct account has been added
+ await selectTrezorAccountPage.unlockAccount(1);
+ await headerNavbar.check_pageIsLoaded();
+ await new HomePage(driver).check_expectedBalanceIsDisplayed();
+ await headerNavbar.openAccountMenu();
+ await accountListPage.check_pageIsLoaded();
+ await accountListPage.check_accountDisplayedInAccountList('Trezor 1');
+ await accountListPage.check_accountAddressDisplayedInAccountList(
+ shortenAddress(KNOWN_PUBLIC_KEY_ADDRESSES[0].address),
+ );
+ },
+ );
+ });
+
+ it('unlocks multiple accounts at once and removes one', async function () {
+ await withFixtures(
+ {
+ fixtures: new FixtureBuilder().build(),
+ title: this.test?.fullTitle(),
+ },
+ async ({ driver }) => {
+ await loginWithBalanceValidation(driver);
+ const headerNavbar = new HeaderNavbar(driver);
+ await headerNavbar.openAccountMenu();
+
+ // Choose connect hardware wallet from the account menu
+ const accountListPage = new AccountListPage(driver);
+ await accountListPage.check_pageIsLoaded();
+ await accountListPage.openConnectHardwareWalletModal();
+
+ const connectHardwareWalletPage = new ConnectHardwareWalletPage(driver);
+ await connectHardwareWalletPage.check_pageIsLoaded();
+ await connectHardwareWalletPage.openConnectTrezorPage();
+
+ // Unlock 5 Trezor accounts
+ const selectTrezorAccountPage = new SelectTrezorAccountPage(driver);
+ await selectTrezorAccountPage.check_pageIsLoaded();
+ await selectTrezorAccountPage.check_trezorAccountNumber();
+ for (let i = 1; i <= 5; i++) {
+ await selectTrezorAccountPage.selectTrezorAccount(i);
+ }
+ await selectTrezorAccountPage.clickUnlockButton();
+
+ // Check that all 5 Trezor accounts are displayed in account list
+ const homePage = new HomePage(driver);
+ await homePage.check_pageIsLoaded();
+ await homePage.check_expectedBalanceIsDisplayed();
+ await headerNavbar.openAccountMenu();
+ await accountListPage.check_pageIsLoaded();
+ for (let i = 0; i < 5; i++) {
+ await accountListPage.check_accountDisplayedInAccountList(
+ `Trezor ${i + 1}`,
+ );
+ await accountListPage.check_accountAddressDisplayedInAccountList(
+ shortenAddress(KNOWN_PUBLIC_KEY_ADDRESSES[i].address),
+ );
+ }
+
+ // Remove Trezor 1 account and check Trezor 1 account is removed
+ await accountListPage.removeAccount('Trezor 1');
+ await homePage.check_pageIsLoaded();
+ await homePage.check_expectedBalanceIsDisplayed();
+ await headerNavbar.openAccountMenu();
+ await accountListPage.check_accountIsNotDisplayedInAccountList(
+ 'Trezor 1',
+ );
+ },
+ );
+ });
+});
diff --git a/test/e2e/tests/hardware-wallets/trezor-send.spec.ts b/test/e2e/tests/hardware-wallets/trezor-send.spec.ts
index b10269c69ef0..5bb6fcb45220 100644
--- a/test/e2e/tests/hardware-wallets/trezor-send.spec.ts
+++ b/test/e2e/tests/hardware-wallets/trezor-send.spec.ts
@@ -2,13 +2,11 @@ import { Suite } from 'mocha';
import { Driver } from '../../webdriver/driver';
import { Ganache } from '../../seeder/ganache';
import FixtureBuilder from '../../fixture-builder';
-import {
- defaultGanacheOptions,
- logInWithBalanceValidation,
- sendTransaction,
- withFixtures,
-} from '../../helpers';
+import { logInWithBalanceValidation, withFixtures } from '../../helpers';
import { KNOWN_PUBLIC_KEY_ADDRESSES } from '../../../stub/keyring-bridge';
+import ActivityListPage from '../../page-objects/pages/home/activity-list';
+import HomePage from '../../page-objects/pages/home/homepage';
+import { sendRedesignedTransactionToAddress } from '../../page-objects/flows/send-transaction.flow';
const RECIPIENT = '0x0Cc5261AB8cE458dc977078A3623E2BaDD27afD3';
@@ -17,7 +15,6 @@ describe('Trezor Hardware', function (this: Suite) {
await withFixtures(
{
fixtures: new FixtureBuilder().withTrezorAccount().build(),
- ganacheOptions: defaultGanacheOptions,
title: this.test?.fullTitle(),
},
async ({
@@ -33,14 +30,16 @@ describe('Trezor Hardware', function (this: Suite) {
'0x100000000000000000000',
);
await logInWithBalanceValidation(driver);
-
- await sendTransaction(driver, RECIPIENT, '1');
-
- // Wait for transaction to be confirmed
- await driver.waitForSelector({
- css: '.transaction-status-label',
- text: 'Confirmed',
+ await sendRedesignedTransactionToAddress({
+ driver,
+ recipientAddress: RECIPIENT,
+ amount: '1',
});
+ const homePage = new HomePage(driver);
+ await homePage.check_pageIsLoaded();
+ const activityList = new ActivityListPage(driver);
+ await activityList.check_confirmedTxNumberDisplayedInActivity();
+ await activityList.check_txAmountInActivity();
},
);
});
diff --git a/test/e2e/tests/hardware-wallets/trezor-sign.spec.ts b/test/e2e/tests/hardware-wallets/trezor-sign.spec.ts
index f4cbf87b9dd4..418758a4d426 100644
--- a/test/e2e/tests/hardware-wallets/trezor-sign.spec.ts
+++ b/test/e2e/tests/hardware-wallets/trezor-sign.spec.ts
@@ -1,15 +1,10 @@
-import { strict as assert } from 'assert';
import { Suite } from 'mocha';
import { Driver } from '../../webdriver/driver';
import FixtureBuilder from '../../fixture-builder';
-import {
- defaultGanacheOptions,
- openDapp,
- unlockWallet,
- WINDOW_TITLES,
- withFixtures,
-} from '../../helpers';
+import { defaultGanacheOptions, withFixtures } from '../../helpers';
import { KNOWN_PUBLIC_KEY_ADDRESSES } from '../../../stub/keyring-bridge';
+import TestDappPage from '../../page-objects/pages/test-dapp';
+import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow';
describe('Trezor Hardware Signatures', function (this: Suite) {
it('sign typed v4', async function () {
@@ -26,28 +21,13 @@ describe('Trezor Hardware Signatures', function (this: Suite) {
dapp: true,
},
async ({ driver }: { driver: Driver }) => {
- await unlockWallet(driver);
-
- await openDapp(driver);
- await driver.clickElement('#signTypedDataV4');
- await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
- await driver.delay(1000);
-
- await driver.clickElementSafe('.confirm-scroll-to-bottom__button');
- await driver.clickElement({ text: 'Confirm', tag: 'button' });
- await driver.delay(1000);
-
- await driver.waitUntilXWindowHandles(2);
- await driver.switchToWindowWithTitle(WINDOW_TITLES.TestDApp);
- await driver.clickElement('#signTypedDataV4Verify');
-
- const verifyRecoverAddress = await driver.findElement(
- '#signTypedDataV4VerifyResult',
- );
-
- assert.equal(
- await verifyRecoverAddress.getText(),
- KNOWN_PUBLIC_KEY_ADDRESSES[0].address.toLocaleLowerCase(),
+ await loginWithBalanceValidation(driver);
+ const testDappPage = new TestDappPage(driver);
+ await testDappPage.openTestDappPage();
+ await testDappPage.check_pageIsLoaded();
+ await testDappPage.signTypedDataV4(true);
+ await testDappPage.check_successSignTypedDataV4(
+ KNOWN_PUBLIC_KEY_ADDRESSES[0].address,
);
},
);
diff --git a/test/e2e/tests/metrics/app-opened.spec.ts b/test/e2e/tests/metrics/app-opened.spec.ts
new file mode 100644
index 000000000000..80169e36c369
--- /dev/null
+++ b/test/e2e/tests/metrics/app-opened.spec.ts
@@ -0,0 +1,104 @@
+import { strict as assert } from 'assert';
+import { Mockttp } from 'mockttp';
+import {
+ withFixtures,
+ getEventPayloads,
+ unlockWallet,
+ connectToDapp,
+} from '../../helpers';
+import FixtureBuilder from '../../fixture-builder';
+import { loginWithoutBalanceValidation } from '../../page-objects/flows/login.flow';
+
+/**
+ * Mocks the segment API for the App Opened event that we expect to see when
+ * these tests are run.
+ *
+ * @param mockServer - The mock server instance.
+ * @returns The mocked endpoints
+ */
+async function mockSegment(mockServer: Mockttp) {
+ return [
+ await mockServer
+ .forPost('https://api.segment.io/v1/batch')
+ .withJsonBodyIncluding({
+ batch: [{ type: 'track', event: 'App Opened' }],
+ })
+ .thenCallback(() => {
+ return {
+ statusCode: 200,
+ };
+ }),
+ ];
+}
+
+describe('App Opened metric @no-mmi', function () {
+ it('should send AppOpened metric when app is opened and metrics are enabled', async function () {
+ await withFixtures(
+ {
+ fixtures: new FixtureBuilder()
+ .withMetaMetricsController({
+ metaMetricsId: 'fake-metrics-fd20',
+ participateInMetaMetrics: true,
+ })
+ .build(),
+ title: this.test?.fullTitle(),
+ testSpecificMock: mockSegment,
+ },
+ async ({ driver, mockedEndpoint: mockedEndpoints }) => {
+ await loginWithoutBalanceValidation(driver);
+
+ const events = await getEventPayloads(driver, mockedEndpoints);
+ assert.equal(events.length, 1);
+ assert.equal(events[0].properties.category, 'App');
+ },
+ );
+ });
+
+ it('should not send AppOpened metric when metrics are disabled', async function () {
+ await withFixtures(
+ {
+ fixtures: new FixtureBuilder()
+ .withMetaMetricsController({
+ metaMetricsId: 'fake-metrics-fd20',
+ participateInMetaMetrics: false,
+ })
+ .build(),
+ title: this.test?.fullTitle(),
+ testSpecificMock: mockSegment,
+ },
+ async ({ driver, mockedEndpoint: mockedEndpoints }) => {
+ await unlockWallet(driver);
+
+ const events = await getEventPayloads(driver, mockedEndpoints);
+ assert.equal(events.length, 0);
+ },
+ );
+ });
+
+ it('should send AppOpened metric when dapp opens MetaMask', async function () {
+ await withFixtures(
+ {
+ dapp: true,
+ fixtures: new FixtureBuilder()
+ .withMetaMetricsController({
+ metaMetricsId: 'fake-metrics-fd20',
+ participateInMetaMetrics: true,
+ })
+ .build(),
+ title: this.test?.fullTitle(),
+ testSpecificMock: mockSegment,
+ },
+ async ({ driver, mockedEndpoint: mockedEndpoints }) => {
+ await unlockWallet(driver);
+
+ // Connect to dapp which will trigger MetaMask to open
+ await connectToDapp(driver);
+
+ // Wait for events to be tracked
+ const events = await getEventPayloads(driver, mockedEndpoints);
+ assert.equal(events.length, 1);
+ assert.equal(events[0].properties.category, 'App');
+ },
+ );
+ });
+});
diff --git a/test/e2e/tests/metrics/dapp-viewed.spec.js b/test/e2e/tests/metrics/dapp-viewed.spec.js
index 668f93e65dc5..a747ea658937 100644
--- a/test/e2e/tests/metrics/dapp-viewed.spec.js
+++ b/test/e2e/tests/metrics/dapp-viewed.spec.js
@@ -297,10 +297,6 @@ describe('Dapp viewed Event @no-mmi', function () {
text: 'All Permissions',
tag: 'div',
});
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/multichain/all-permissions-page.spec.js b/test/e2e/tests/multichain/all-permissions-page.spec.js
index 5bb718bd8d20..47601c58bb2f 100644
--- a/test/e2e/tests/multichain/all-permissions-page.spec.js
+++ b/test/e2e/tests/multichain/all-permissions-page.spec.js
@@ -32,10 +32,6 @@ describe('Permissions Page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
const connectedDapp = await driver.isElementPresent({
text: '127.0.0.1:8080',
tag: 'p',
@@ -83,10 +79,6 @@ describe('Permissions Page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
const connectedDapp = await driver.isElementPresent({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/multichain/permission-page.spec.js b/test/e2e/tests/multichain/permission-page.spec.js
index 5ae3f71b6046..e2b7208045e0 100644
--- a/test/e2e/tests/multichain/permission-page.spec.js
+++ b/test/e2e/tests/multichain/permission-page.spec.js
@@ -32,10 +32,6 @@ describe('Permissions Page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
const connectedDapp = await driver.isElementPresent({
text: '127.0.0.1:8080',
tag: 'p',
@@ -68,10 +64,6 @@ describe('Permissions Page', function () {
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'All Permissions', tag: 'div' });
- await driver.clickElementAndWaitToDisappear({
- text: 'Got it',
- tag: 'button',
- });
await driver.clickElement({
text: '127.0.0.1:8080',
tag: 'p',
diff --git a/test/e2e/tests/phishing-controller/phishing-detection.spec.js b/test/e2e/tests/phishing-controller/phishing-detection.spec.js
index 3a912fbc3d5f..1fabd8f901bc 100644
--- a/test/e2e/tests/phishing-controller/phishing-detection.spec.js
+++ b/test/e2e/tests/phishing-controller/phishing-detection.spec.js
@@ -2,6 +2,7 @@ const { strict: assert } = require('assert');
const { createServer } = require('node:http');
const { createDeferredPromise } = require('@metamask/utils');
const { until } = require('selenium-webdriver');
+
const {
defaultGanacheOptions,
withFixtures,
diff --git a/test/integration/confirmations/transactions/alerts.test.tsx b/test/integration/confirmations/transactions/alerts.test.tsx
index ffbad48b352b..72acf02efc60 100644
--- a/test/integration/confirmations/transactions/alerts.test.tsx
+++ b/test/integration/confirmations/transactions/alerts.test.tsx
@@ -362,7 +362,7 @@ describe('Contract Interaction Confirmation Alerts', () => {
expect(
await screen.findByTestId('alert-modal__selected-alert'),
).toHaveTextContent(
- 'This transaction won’t go through until a previous transaction is complete. Learn how to cancel or speed up a transaction.',
+ "This transaction won't go through until a previous transaction is complete. Learn how to cancel or speed up a transaction.",
);
});
diff --git a/ui/components/app/alert-system/alert-modal/alert-modal.tsx b/ui/components/app/alert-system/alert-modal/alert-modal.tsx
index 10f5d90c3e77..2eb78fba44c1 100644
--- a/ui/components/app/alert-system/alert-modal/alert-modal.tsx
+++ b/ui/components/app/alert-system/alert-modal/alert-modal.tsx
@@ -164,12 +164,15 @@ function AlertDetails({
>
{customDetails ?? (
-
- {selectedAlert.message}
-
+ {Boolean(selectedAlert.content) && selectedAlert.content}
+ {Boolean(selectedAlert.message) && (
+
+ {selectedAlert.message}
+
+ )}
{selectedAlert.alertDetails?.length ? (
{t('alertModalDetails')}
diff --git a/ui/components/app/alert-system/general-alert/general-alert.tsx b/ui/components/app/alert-system/general-alert/general-alert.tsx
index 5ac2b2a335fb..5c222902b3ab 100644
--- a/ui/components/app/alert-system/general-alert/general-alert.tsx
+++ b/ui/components/app/alert-system/general-alert/general-alert.tsx
@@ -21,13 +21,14 @@ import { AlertProvider } from '../alert-provider';
import { AlertSeverity } from '../../../../ducks/confirm-alerts/confirm-alerts';
export type GeneralAlertProps = {
- description: string;
+ description?: string;
details?: React.ReactNode | string[];
onClickSupportLink?: () => void;
provider?: SecurityProvider;
reportUrl?: string;
severity: AlertSeverity;
title?: string;
+ children?: React.ReactNode;
};
function ReportLink({
@@ -119,6 +120,7 @@ function GeneralAlert({
description={description}
{...props}
>
+ {props.children}
{
diff --git a/ui/components/app/confirm/info/row/text.tsx b/ui/components/app/confirm/info/row/text.tsx
index 1f026f53c7d4..0e26b5a75bdc 100644
--- a/ui/components/app/confirm/info/row/text.tsx
+++ b/ui/components/app/confirm/info/row/text.tsx
@@ -53,18 +53,6 @@ export const ConfirmInfoRowText: React.FC = ({
gap={2}
minWidth={BlockSize.Zero}
>
- {tooltip ? (
-
-
-
- ) : (
-
- )}
{isEditable ? (
= ({
onClick={onEditClick}
size={ButtonIconSize.Sm}
// to reset the button padding
- style={{ marginLeft: '-4px' }}
+ style={{ marginRight: '-4px' }}
data-testid={editIconDataTestId}
/>
) : null}
+ {tooltip ? (
+
+
+
+ ) : (
+
+ )}
);
};
diff --git a/ui/components/app/transaction-list-item/transaction-list-item.component.js b/ui/components/app/transaction-list-item/transaction-list-item.component.js
index fed0f925a3ac..09e8983b9196 100644
--- a/ui/components/app/transaction-list-item/transaction-list-item.component.js
+++ b/ui/components/app/transaction-list-item/transaction-list-item.component.js
@@ -99,6 +99,7 @@ function TransactionListItemInner({
const { bridgeTxHistoryItem, isBridgeComplete, showBridgeTxDetails } =
useBridgeTxHistoryData({
transactionGroup,
+ isEarliestNonce,
});
const {
diff --git a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap
index ab9bc540fe7a..fb3bed6fd34b 100644
--- a/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap
+++ b/ui/components/multichain/account-list-item/__snapshots__/account-list-item.test.js.snap
@@ -269,25 +269,36 @@ exports[`AccountListItem renders AccountListItem component and shows account nam
+
+
+
-
-
-
+ 1
+
+
+ BTC
+
diff --git a/ui/components/multichain/account-list-item/account-list-item.js b/ui/components/multichain/account-list-item/account-list-item.js
index 365d09de8ecf..3ab048597f40 100644
--- a/ui/components/multichain/account-list-item/account-list-item.js
+++ b/ui/components/multichain/account-list-item/account-list-item.js
@@ -367,8 +367,7 @@ const AccountListItem = ({
{shortenAddress(normalizeSafeAddress(account.address))}
- {/* For non-EVM networks we always want to show tokens */}
- {mappedOrderedTokenList.length > 1 || !isEvmNetwork ? (
+ {mappedOrderedTokenList.length > 1 ? (
) : (
{
expect(avatarGroup).not.toBeInTheDocument();
});
- it('renders fiat for non-EVM account', () => {
+ it('renders fiat and native balance for non-EVM account', () => {
const { container } = render(
{
account: mockNonEvmAccount,
@@ -308,8 +308,8 @@ describe('AccountListItem', () => {
expectedBalance,
);
expect(firstCurrencyDisplay.lastChild.textContent).toContain('USD');
- expect(secondCurrencyDisplay).not.toBeInTheDocument();
- expect(avatarGroup).toBeInTheDocument();
+ expect(secondCurrencyDisplay.textContent).toContain('1BTC');
+ expect(avatarGroup).not.toBeInTheDocument();
});
});
});
diff --git a/ui/components/multichain/pages/permissions-page/permissions-page.js b/ui/components/multichain/pages/permissions-page/permissions-page.js
index 8cdeae0ed57d..3f4680bf0350 100644
--- a/ui/components/multichain/pages/permissions-page/permissions-page.js
+++ b/ui/components/multichain/pages/permissions-page/permissions-page.js
@@ -1,4 +1,3 @@
-import classnames from 'classnames';
import React, { useEffect, useRef, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { useSelector } from 'react-redux';
@@ -26,13 +25,7 @@ import {
DEFAULT_ROUTE,
REVIEW_PERMISSIONS,
} from '../../../../helpers/constants/routes';
-import {
- getOnboardedInThisUISession,
- getShowPermissionsTour,
- getConnectedSitesListWithNetworkInfo,
-} from '../../../../selectors';
-import { ProductTour } from '../../product-tour-popover';
-import { hidePermissionsTour } from '../../../../store/actions';
+import { getConnectedSitesListWithNetworkInfo } from '../../../../selectors';
import { isSnapId } from '../../../../helpers/utils/snaps';
import { ConnectionListItem } from './connection-list-item';
@@ -44,8 +37,6 @@ export const PermissionsPage = () => {
const sitesConnectionsList = useSelector(
getConnectedSitesListWithNetworkInfo,
);
- const showPermissionsTour = useSelector(getShowPermissionsTour);
- const onboardedInThisUISession = useSelector(getOnboardedInThisUISession);
useEffect(() => {
setTotalConnections(Object.keys(sitesConnectionsList).length);
@@ -94,20 +85,6 @@ export const PermissionsPage = () => {
{t('permissions')}
- {showPermissionsTour && !onboardedInThisUISession ? (
-
- ) : null}
{totalConnections > 0 ? (
diff --git a/ui/components/multichain/token-list-item/token-list-item.tsx b/ui/components/multichain/token-list-item/token-list-item.tsx
index 76152770dbc9..40b91a001f17 100644
--- a/ui/components/multichain/token-list-item/token-list-item.tsx
+++ b/ui/components/multichain/token-list-item/token-list-item.tsx
@@ -44,7 +44,6 @@ import {
getParticipateInMetaMetrics,
getDataCollectionForMarketing,
getMarketData,
- getNetworkConfigurationIdByChainId,
getCurrencyRates,
} from '../../../selectors';
import { getMultichainIsEvm } from '../../../selectors/multichain';
@@ -69,6 +68,7 @@ import {
useSafeChains,
} from '../../../pages/settings/networks-tab/networks-form/use-safe-chains';
import { NETWORK_TO_SHORT_NETWORK_NAME_MAP } from '../../../../shared/constants/bridge';
+import { getNetworkConfigurationsByChainId } from '../../../../shared/modules/selectors/networks';
import { PercentageChange } from './price/percentage-change/percentage-change';
type TokenListItemProps = {
@@ -227,9 +227,7 @@ export const TokenListItem = ({
);
// Used for badge icon
- const allNetworks: Record = useSelector(
- getNetworkConfigurationIdByChainId,
- );
+ const allNetworks = useSelector(getNetworkConfigurationsByChainId);
const testNetworkBackgroundColor = useSelector(getTestNetworkBackgroundColor);
return (
@@ -285,7 +283,7 @@ export const TokenListItem = ({
badge={
{
- history.push(`${CROSS_CHAIN_SWAP_TX_DETAILS_ROUTE}/${srcTxMetaId}`);
+ history.push({
+ pathname: `${CROSS_CHAIN_SWAP_TX_DETAILS_ROUTE}/${srcTxMetaId}`,
+ state: { transactionGroup, isEarliestNonce },
+ });
};
return {
diff --git a/ui/hooks/bridge/useBridging.ts b/ui/hooks/bridge/useBridging.ts
index a8307658e285..2b7ffb0083c9 100644
--- a/ui/hooks/bridge/useBridging.ts
+++ b/ui/hooks/bridge/useBridging.ts
@@ -10,6 +10,7 @@ import {
getIsBridgeEnabled,
getMetaMetricsId,
getParticipateInMetaMetrics,
+ getUseExternalServices,
SwapsEthToken,
///: END:ONLY_INCLUDE_IF
} from '../../selectors';
@@ -45,6 +46,7 @@ const useBridging = () => {
const isMarketingEnabled = useSelector(getDataCollectionForMarketing);
const providerConfig = useSelector(getProviderConfig);
const keyring = useSelector(getCurrentKeyring);
+ const isExternalServicesEnabled = useSelector(getUseExternalServices);
// @ts-expect-error keyring type is wrong maybe?
const usingHardwareWallet = isHardwareKeyring(keyring.type);
@@ -52,7 +54,9 @@ const useBridging = () => {
const isBridgeChain = useSelector(getIsBridgeChain);
useEffect(() => {
- dispatch(setBridgeFeatureFlags());
+ if (isExternalServicesEnabled) {
+ dispatch(setBridgeFeatureFlags());
+ }
}, [dispatch, setBridgeFeatureFlags]);
const openBridgeExperience = useCallback(
diff --git a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts
index 39e905631e82..847df1204ab3 100644
--- a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts
+++ b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts
@@ -2,18 +2,25 @@ import { useDispatch, useSelector } from 'react-redux';
import { zeroAddress } from 'ethereumjs-util';
import { useHistory } from 'react-router-dom';
import { TransactionMeta } from '@metamask/transaction-controller';
+import { createProjectLogger, Hex } from '@metamask/utils';
import { QuoteMetadata, QuoteResponse } from '../types';
import { DEFAULT_ROUTE } from '../../../helpers/constants/routes';
import { setDefaultHomeActiveTabName } from '../../../store/actions';
import { startPollingForBridgeTxStatus } from '../../../ducks/bridge-status/actions';
import { getQuoteRequest } from '../../../ducks/bridge/selectors';
+import { CHAIN_IDS } from '../../../../shared/constants/network';
+import { getCurrentChainId } from '../../../../shared/modules/selectors/networks';
import useAddToken from './useAddToken';
import useHandleApprovalTx from './useHandleApprovalTx';
import useHandleBridgeTx from './useHandleBridgeTx';
+const debugLog = createProjectLogger('bridge');
+const LINEA_DELAY_MS = 5000;
+
export default function useSubmitBridgeTransaction() {
const history = useHistory();
const dispatch = useDispatch();
+ const srcChainId = useSelector(getCurrentChainId);
const { addSourceToken, addDestToken } = useAddToken();
const { handleApprovalTx } = useHandleApprovalTx();
const { handleBridgeTx } = useHandleBridgeTx();
@@ -33,6 +40,24 @@ export default function useSubmitBridgeTransaction() {
});
}
+ if (
+ (
+ [
+ CHAIN_IDS.LINEA_MAINNET,
+ CHAIN_IDS.LINEA_GOERLI,
+ CHAIN_IDS.LINEA_SEPOLIA,
+ ] as Hex[]
+ ).includes(srcChainId)
+ ) {
+ debugLog(
+ 'Delaying submitting bridge tx to make Linea confirmation more likely',
+ );
+ const waitPromise = new Promise((resolve) =>
+ setTimeout(resolve, LINEA_DELAY_MS),
+ );
+ await waitPromise;
+ }
+
const bridgeTxMeta = await handleBridgeTx({
quoteResponse,
approvalTxId: approvalTxMeta?.id,
diff --git a/ui/pages/bridge/prepare/bridge-cta-button.tsx b/ui/pages/bridge/prepare/bridge-cta-button.tsx
index c8738a6551de..931b6cb4e8ea 100644
--- a/ui/pages/bridge/prepare/bridge-cta-button.tsx
+++ b/ui/pages/bridge/prepare/bridge-cta-button.tsx
@@ -35,6 +35,7 @@ export const BridgeCTAButton = () => {
const { maxRefreshCount, refreshRate } = useSelector(getBridgeQuotesConfig);
const { submitBridgeTransaction } = useSubmitBridgeTransaction();
+ const [isSubmitting, setIsSubmitting] = useState(false);
const { isNoQuotesAvailable, isInsufficientBalance } =
useSelector(getValidationErrors);
@@ -108,20 +109,29 @@ export const BridgeCTAButton = () => {
data-testid="bridge-cta-button"
onClick={() => {
if (activeQuote && isTxSubmittable) {
- quoteRequestProperties &&
- requestMetadataProperties &&
- tradeProperties &&
- trackCrossChainSwapsEvent({
- event: MetaMetricsEventName.ActionSubmitted,
- properties: {
- ...quoteRequestProperties,
- ...requestMetadataProperties,
- ...tradeProperties,
- },
- });
- submitBridgeTransaction(activeQuote);
+ try {
+ // We don't need to worry about setting to true if the tx submission succeeds
+ // because we route immediately to Activity list page
+ setIsSubmitting(true);
+
+ quoteRequestProperties &&
+ requestMetadataProperties &&
+ tradeProperties &&
+ trackCrossChainSwapsEvent({
+ event: MetaMetricsEventName.ActionSubmitted,
+ properties: {
+ ...quoteRequestProperties,
+ ...requestMetadataProperties,
+ ...tradeProperties,
+ },
+ });
+ submitBridgeTransaction(activeQuote);
+ } catch (error) {
+ setIsSubmitting(false);
+ }
}
}}
+ loading={isSubmitting}
disabled={!isTxSubmittable || isQuoteExpired}
>
{label}
diff --git a/ui/pages/bridge/transaction-details/transaction-details.tsx b/ui/pages/bridge/transaction-details/transaction-details.tsx
index fe81e8e3b3dd..762e2c1218d9 100644
--- a/ui/pages/bridge/transaction-details/transaction-details.tsx
+++ b/ui/pages/bridge/transaction-details/transaction-details.tsx
@@ -1,8 +1,9 @@
import React, { useContext } from 'react';
import { useSelector } from 'react-redux';
-import { useHistory, useParams } from 'react-router-dom';
+import { useHistory, useParams, useLocation } from 'react-router-dom';
import { NetworkConfiguration } from '@metamask/network-controller';
import { TransactionMeta } from '@metamask/transaction-controller';
+import { BigNumber } from 'bignumber.js';
import {
AvatarNetwork,
AvatarNetworkSize,
@@ -12,7 +13,9 @@ import {
ButtonIcon,
ButtonIconSize,
ButtonLink,
+ Icon,
IconName,
+ IconSize,
Text,
} from '../../../components/component-library';
import { Content, Header } from '../../../components/multichain/pages/page';
@@ -28,7 +31,6 @@ import {
PRIMARY,
SUPPORT_REQUEST_LINK,
} from '../../../helpers/constants/common';
-import CurrencyDisplay from '../../../components/ui/currency-display/currency-display.component';
import {
BridgeHistoryItem,
StatusTypes,
@@ -51,6 +53,10 @@ import {
MetaMetricsEventName,
} from '../../../../shared/constants/metametrics';
import { MetaMetricsContext } from '../../../contexts/metametrics';
+import { formatAmount } from '../../confirmations/components/simulation-details/formatAmount';
+import { getIntlLocale } from '../../../ducks/locale/locale';
+import { TransactionGroup } from '../../../hooks/bridge/useBridgeTxHistoryData';
+import TransactionActivityLog from '../../../components/app/transaction-activity-log';
import TransactionDetailRow from './transaction-detail-row';
import BridgeExplorerLinks from './bridge-explorer-links';
import BridgeStepList from './bridge-step-list';
@@ -77,18 +83,47 @@ const getBlockExplorerUrl = (
/**
* @param options0
* @param options0.bridgeHistoryItem
+ * @param options0.locale
* @returns A string representing the bridge amount in decimal form
*/
-const getBridgeAmount = ({
+const getBridgeAmountSentFormatted = ({
+ locale,
bridgeHistoryItem,
}: {
+ locale: string;
bridgeHistoryItem?: BridgeHistoryItem;
}) => {
- if (bridgeHistoryItem) {
- return bridgeHistoryItem.pricingData?.amountSent;
+ if (!bridgeHistoryItem?.pricingData?.amountSent) {
+ return undefined;
+ }
+
+ return formatAmount(
+ locale,
+ new BigNumber(bridgeHistoryItem.pricingData.amountSent),
+ );
+};
+
+const getBridgeAmountReceivedFormatted = ({
+ locale,
+ bridgeHistoryItem,
+}: {
+ locale: string;
+ bridgeHistoryItem?: BridgeHistoryItem;
+}) => {
+ if (!bridgeHistoryItem) {
+ return undefined;
}
- return undefined;
+ const destAmount = bridgeHistoryItem.status.destChain?.amount;
+ if (!destAmount) {
+ return undefined;
+ }
+
+ const destAssetDecimals = bridgeHistoryItem.quote.destAsset.decimals;
+ return formatAmount(
+ locale,
+ new BigNumber(destAmount).dividedBy(10 ** destAssetDecimals),
+ );
};
/**
@@ -118,9 +153,11 @@ const StatusToColorMap: Record = {
const CrossChainSwapTxDetails = () => {
const t = useI18nContext();
+ const locale = useSelector(getIntlLocale);
const trackEvent = useContext(MetaMetricsContext);
const rootState = useSelector((state) => state);
const history = useHistory();
+ const location = useLocation();
const { srcTxMetaId } = useParams<{ srcTxMetaId: string }>();
const bridgeHistory = useSelector(selectBridgeHistoryForAccount);
const selectedAddressTxList = useSelector(
@@ -131,6 +168,10 @@ const CrossChainSwapTxDetails = () => {
getNetworkConfigurationsByChainId,
);
+ const { transactionGroup, isEarliestNonce } = location.state as {
+ transactionGroup: TransactionGroup;
+ isEarliestNonce: boolean;
+ };
const srcChainTxMeta = selectedAddressTxList.find(
(tx) => tx.id === srcTxMetaId,
);
@@ -154,12 +195,18 @@ const CrossChainSwapTxDetails = () => {
? bridgeHistoryItem?.status.status
: StatusTypes.PENDING;
+ const srcChainIconUrl = srcNetwork
+ ? CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[
+ srcNetwork.chainId as keyof typeof CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP
+ ]
+ : undefined;
+
const destChainIconUrl = destNetwork
? CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP[
destNetwork.chainId as keyof typeof CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP
]
: undefined;
- const bridgeTypeDirection = t('bridgeTypeDirectionTo');
+
const srcNetworkName = srcNetwork?.name;
const destNetworkName = destNetwork?.name;
@@ -171,9 +218,41 @@ const CrossChainSwapTxDetails = () => {
})
: undefined;
- const bridgeAmount = getBridgeAmount({ bridgeHistoryItem });
+ const bridgeAmountSent = getBridgeAmountSentFormatted({
+ locale,
+ bridgeHistoryItem,
+ });
+ const bridgeAmountReceived = getBridgeAmountReceivedFormatted({
+ locale,
+ bridgeHistoryItem,
+ });
const isDelayed = getIsDelayed(status, bridgeHistoryItem);
+ const srcNetworkIconName = (
+
+ {srcNetwork && (
+
+ )}
+ {srcNetworkName}
+
+ );
+ const destNetworkIconName = (
+
+ {destNetwork && (
+
+ )}
+ {destNetworkName}
+
+ );
+
return (
@@ -196,6 +275,7 @@ const CrossChainSwapTxDetails = () => {
flexDirection={FlexDirection.Column}
gap={4}
>
+ {/* Delayed banner */}
{isDelayed && (
{
)}
+ {/* Bridge step list */}
{status !== StatusTypes.COMPLETE &&
(bridgeHistoryItem || srcChainTxMeta) && (
{
srcBlockExplorerUrl={srcBlockExplorerUrl}
destBlockExplorerUrl={destBlockExplorerUrl}
/>
+
- {/* General tx details */}
+ {/* Bridge tx details */}
{
}
/>
-
- {status !== StatusTypes.COMPLETE && (
-
- {bridgeTypeDirection}{' '}
- {destNetwork && (
-
- )}
- {destNetworkName}
-
- }
- />
- )}
- {status === StatusTypes.COMPLETE && (
- <>
-
-
- >
- )}
+
+ {srcNetworkIconName}
+
+ {destNetworkIconName}
+
+ }
+ />
{
formatDate(srcChainTxMeta?.time, 'hh:mm a'),
])}
/>
-
+ {/* Bridge tx details 2 */}
-
+ {t('bridgeTxDetailsTokenAmountOnChain', [
+ bridgeAmountSent,
+ bridgeHistoryItem?.quote.srcAsset.symbol,
+ ])}
+ {srcNetworkIconName}
+
+ }
/>
+ {t('bridgeTxDetailsTokenAmountOnChain', [
+ bridgeAmountReceived,
+ bridgeHistoryItem?.quote.destAsset.symbol,
+ ])}
+ {destNetworkIconName}
+
+ }
/>
- {data?.isEIP1559Transaction &&
- typeof data?.baseFee !== 'undefined' && (
-
- }
- />
- )}
- {data?.isEIP1559Transaction &&
- typeof data?.priorityFee !== 'undefined' && (
-
- }
- />
- )}
-
{
/>
}
/>
-
- }
- />
-
- }
- />
+ {/* Generic tx details */}
+
+
-
+
+
diff --git a/ui/pages/bridge/types.ts b/ui/pages/bridge/types.ts
index db6d7e8e1394..e753207f1631 100644
--- a/ui/pages/bridge/types.ts
+++ b/ui/pages/bridge/types.ts
@@ -94,12 +94,11 @@ export type Quote = {
requestId: string;
srcChainId: ChainId;
srcAsset: BridgeAsset;
- // This is amount sent - metabridge fee, however, some tokens have a fee of 0
- // So sometimes it's equal to amount sent
- srcTokenAmount: string;
+ // Some tokens have a fee of 0, so sometimes it's equal to amount sent
+ srcTokenAmount: string; // Atomic amount, the amount sent - fees
destChainId: ChainId;
destAsset: BridgeAsset;
- destTokenAmount: string;
+ destTokenAmount: string; // Atomic amount, the amount received
feeData: Record
&
Partial>;
bridgeId: string;
diff --git a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx
index 09d1fdf5753b..bd026848bd95 100644
--- a/ui/pages/confirmations/components/confirm/footer/footer.test.tsx
+++ b/ui/pages/confirmations/components/confirm/footer/footer.test.tsx
@@ -1,15 +1,10 @@
import React from 'react';
-
import {
LedgerTransportTypes,
WebHIDConnectedStatuses,
} from '../../../../../../shared/constants/hardware-wallets';
import { BlockaidResultType } from '../../../../../../shared/constants/security-provider';
-import {
- signatureRequestSIWE,
- unapprovedPersonalSignMsg,
-} from '../../../../../../test/data/confirmations/personal_sign';
-import { permitSignatureMsg } from '../../../../../../test/data/confirmations/typed_sign';
+import { genUnapprovedContractInteractionConfirmation } from '../../../../../../test/data/confirmations/contract-interaction';
import {
getMockContractInteractionConfirmState,
getMockPersonalSignConfirmState,
@@ -17,17 +12,21 @@ import {
getMockTypedSignConfirmState,
getMockTypedSignConfirmStateForRequest,
} from '../../../../../../test/data/confirmations/helper';
+import {
+ signatureRequestSIWE,
+ unapprovedPersonalSignMsg,
+} from '../../../../../../test/data/confirmations/personal_sign';
+import { permitSignatureMsg } from '../../../../../../test/data/confirmations/typed_sign';
import mockState from '../../../../../../test/data/mock-state.json';
import { fireEvent } from '../../../../../../test/jest';
import { renderWithConfirmContextProvider } from '../../../../../../test/lib/confirmations/render-helpers';
+import { Alert } from '../../../../../ducks/confirm-alerts/confirm-alerts';
+import { Severity } from '../../../../../helpers/constants/design-system';
import * as MMIConfirmations from '../../../../../hooks/useMMIConfirmations';
import * as Actions from '../../../../../store/actions';
import configureStore from '../../../../../store/store';
-import { Severity } from '../../../../../helpers/constants/design-system';
-import { SignatureRequestType } from '../../../types/confirm';
import * as confirmContext from '../../../context/confirm';
-
-import { Alert } from '../../../../../ducks/confirm-alerts/confirm-alerts';
+import { SignatureRequestType } from '../../../types/confirm';
import Footer from './footer';
jest.mock('react-redux', () => ({
@@ -107,13 +106,11 @@ describe('ConfirmFooter', () => {
describe('renders disabled "Confirm" Button', () => {
it('when isScrollToBottomCompleted is false', () => {
jest.spyOn(confirmContext, 'useConfirmContext').mockReturnValue({
- currentConfirmation: unapprovedPersonalSignMsg,
+ currentConfirmation: genUnapprovedContractInteractionConfirmation(),
isScrollToBottomCompleted: false,
setIsScrollToBottomCompleted: () => undefined,
});
- const mockStateTypedSign = getMockPersonalSignConfirmStateForRequest(
- unapprovedPersonalSignMsg,
- );
+ const mockStateTypedSign = getMockContractInteractionConfirmState();
const { getByText } = render(mockStateTypedSign);
const confirmButton = getByText('Confirm');
diff --git a/ui/pages/confirmations/components/confirm/footer/footer.tsx b/ui/pages/confirmations/components/confirm/footer/footer.tsx
index a9aea54c03f7..82b10a9511a8 100644
--- a/ui/pages/confirmations/components/confirm/footer/footer.tsx
+++ b/ui/pages/confirmations/components/confirm/footer/footer.tsx
@@ -1,4 +1,7 @@
-import { TransactionMeta } from '@metamask/transaction-controller';
+import {
+ TransactionMeta,
+ TransactionType,
+} from '@metamask/transaction-controller';
import { providerErrors, serializeError } from '@metamask/rpc-errors';
import React, { useCallback, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
@@ -187,9 +190,14 @@ const Footer = () => {
const isSIWE = isSIWESignatureRequest(currentConfirmation);
const isPermit = isPermitSignatureRequest(currentConfirmation);
const isPermitSimulationShown = isPermit && useTransactionSimulations;
+ const isPersonalSign =
+ currentConfirmation?.type === TransactionType.personalSign;
const isConfirmDisabled =
- (!isScrollToBottomCompleted && !isSIWE && !isPermitSimulationShown) ||
+ (!isScrollToBottomCompleted &&
+ !isSIWE &&
+ !isPermitSimulationShown &&
+ !isPersonalSign) ||
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
mmiSubmitDisabled ||
///: END:ONLY_INCLUDE_IF
diff --git a/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap
index a3f98126b093..2ff281c5186e 100644
--- a/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap
+++ b/ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap
@@ -92,18 +92,6 @@ exports[`Info renders info section for approve request 1`] = `
-
- 0.0001 ETH
-
-
- $0.08
-
+
+ 0.0001 ETH
+
+
+ $0.08
+
-
- 0.0001 ETH
-
-
- $0.04
-
+
+ 0.0001 ETH
+
+
+ $0.04
+
-
- 0.0001 ETH
-
-
- $0.08
-
+
+ 0.0001 ETH
+
+
+ $0.08
+
renders component for approve request 1`] = `
@@ -475,18 +475,6 @@ exports[` renders component for approve request 1`] = `
-
- 0.0001 ETH
-
-
- $0.08
-
renders component for approve request 1`] = `
class="mm-box mm-text mm-text--inherit mm-box--color-primary-default"
/>
+
+ 0.0001 ETH
+
+
+ $0.08
+
renders component 1`] = `
diff --git a/ui/pages/confirmations/components/confirm/info/base-transaction-info/__snapshots__/base-transaction-info.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/base-transaction-info/__snapshots__/base-transaction-info.test.tsx.snap
index ee15d22e6363..f82c33d3d0f2 100644
--- a/ui/pages/confirmations/components/confirm/info/base-transaction-info/__snapshots__/base-transaction-info.test.tsx.snap
+++ b/ui/pages/confirmations/components/confirm/info/base-transaction-info/__snapshots__/base-transaction-info.test.tsx.snap
@@ -276,18 +276,6 @@ exports[` renders component for contract interaction requ
-
- 0.0001 ETH
-
-
- $0.04
-
renders component for contract interaction requ
class="mm-box mm-text mm-text--inherit mm-box--color-primary-default"
/>
+
+ 0.0001 ETH
+
+
+ $0.04
+
{
decodedTransferValue: '7',
displayTransferValue: '7',
fiatDisplayValue: '$6.37',
+ fiatValue: 6.37,
pending: false,
});
});
@@ -122,6 +123,7 @@ describe('useTokenValues', () => {
decodedTransferValue: '7',
displayTransferValue: '7',
fiatDisplayValue: null,
+ fiatValue: null,
pending: false,
});
});
diff --git a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts
index 53987ffd06e6..b53e2842e5e7 100644
--- a/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts
+++ b/ui/pages/confirmations/components/confirm/info/hooks/use-token-values.ts
@@ -89,6 +89,7 @@ export const useTokenValues = (transactionMeta: TransactionMeta) => {
decodedTransferValue,
displayTransferValue,
fiatDisplayValue,
+ fiatValue,
pending: pending || isDecodedTransferValuePending,
};
};
diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.test.ts
new file mode 100644
index 000000000000..c143dc2879cd
--- /dev/null
+++ b/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.test.ts
@@ -0,0 +1,104 @@
+import { TransactionMeta } from '@metamask/transaction-controller';
+import { renderHook } from '@testing-library/react-hooks';
+import { useEffect, useState } from 'react';
+import { genUnapprovedTokenTransferConfirmation } from '../../../../../../../test/data/confirmations/token-transfer';
+import { useTransactionEventFragment } from '../../../../hooks/useTransactionEventFragment';
+import { useSendingValueMetric } from './useSendingValueMetric';
+
+jest.mock('react-redux', () => ({
+ ...jest.requireActual('react-redux'),
+ useSelector: jest.fn(),
+}));
+
+jest.mock('react', () => ({
+ ...jest.requireActual('react'),
+ useEffect: jest.fn(),
+ useState: jest.fn(),
+}));
+
+jest.mock('../../../../hooks/useTransactionEventFragment');
+
+describe('useSimulationMetrics', () => {
+ const useTransactionEventFragmentMock = jest.mocked(
+ useTransactionEventFragment,
+ );
+
+ const useStateMock = jest.mocked(useState);
+ const useEffectMock = jest.mocked(useEffect);
+
+ // TODO: Replace `any` with type
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ let updateTransactionEventFragmentMock: jest.MockedFunction
;
+
+ beforeEach(() => {
+ jest.resetAllMocks();
+
+ updateTransactionEventFragmentMock = jest.fn();
+
+ useTransactionEventFragmentMock.mockReturnValue({
+ updateTransactionEventFragment: updateTransactionEventFragmentMock,
+ });
+
+ // TODO: Replace `any` with type
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ useStateMock.mockImplementation(((initialValue: any) => [
+ initialValue,
+ jest.fn(),
+ // TODO: Replace `any` with type
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ ]) as any);
+
+ useEffectMock.mockImplementation((fn) => fn());
+ });
+
+ describe('useSendingValueMetric', () => {
+ it('Updates the event property', async () => {
+ const MOCK_FIAT_VALUE = 10;
+ const transactionMeta = genUnapprovedTokenTransferConfirmation(
+ {},
+ ) as TransactionMeta;
+ const props = { transactionMeta, fiatValue: MOCK_FIAT_VALUE };
+
+ renderHook(() => useSendingValueMetric(props));
+
+ expect(updateTransactionEventFragmentMock).toHaveBeenCalledWith(
+ expect.objectContaining({
+ properties: expect.objectContaining({
+ sending_value: MOCK_FIAT_VALUE,
+ }),
+ }),
+ '1d7c08c0-fe54-11ee-9243-91b1e533746a',
+ );
+
+ jest.restoreAllMocks();
+ });
+
+ it('Does not updates the event property if fiat value is undefined', async () => {
+ const MOCK_FIAT_VALUE = undefined;
+ const transactionMeta = genUnapprovedTokenTransferConfirmation(
+ {},
+ ) as TransactionMeta;
+ const props = { transactionMeta, fiatValue: MOCK_FIAT_VALUE };
+
+ renderHook(() => useSendingValueMetric(props));
+
+ expect(updateTransactionEventFragmentMock).not.toHaveBeenCalled();
+
+ jest.restoreAllMocks();
+ });
+
+ it('Does not updates the event property if fiat value is empty string', async () => {
+ const MOCK_FIAT_VALUE = '' as const;
+ const transactionMeta = genUnapprovedTokenTransferConfirmation(
+ {},
+ ) as TransactionMeta;
+ const props = { transactionMeta, fiatValue: MOCK_FIAT_VALUE };
+
+ renderHook(() => useSendingValueMetric(props));
+
+ expect(updateTransactionEventFragmentMock).not.toHaveBeenCalled();
+
+ jest.restoreAllMocks();
+ });
+ });
+});
diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts b/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts
new file mode 100644
index 000000000000..06d7bff39c03
--- /dev/null
+++ b/ui/pages/confirmations/components/confirm/info/hooks/useSendingValueMetric.ts
@@ -0,0 +1,26 @@
+import { TransactionMeta } from '@metamask/transaction-controller';
+import { useEffect } from 'react';
+import { useTransactionEventFragment } from '../../../../hooks/useTransactionEventFragment';
+
+export type UseSendingValueMetricProps = {
+ transactionMeta: TransactionMeta;
+ fiatValue: number | undefined | '';
+};
+
+export const useSendingValueMetric = ({
+ transactionMeta,
+ fiatValue,
+}: UseSendingValueMetricProps) => {
+ const { updateTransactionEventFragment } = useTransactionEventFragment();
+
+ const transactionId = transactionMeta.id;
+ const properties = { sending_value: fiatValue };
+ const sensitiveProperties = {};
+ const params = { properties, sensitiveProperties };
+
+ useEffect(() => {
+ if (fiatValue !== undefined && fiatValue !== '') {
+ updateTransactionEventFragment(params, transactionId);
+ }
+ }, [updateTransactionEventFragment, transactionId, JSON.stringify(params)]);
+};
diff --git a/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap
index c194a43564f7..4fe5c3f41bbd 100644
--- a/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap
+++ b/ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap
@@ -321,18 +321,6 @@ exports[`NativeTransferInfo renders correctly 1`] = `
-
- 0.0001 ETH
-
-
- $0.08
-
+
+ 0.0001 ETH
+
+
+ $0.08
+
-
- 0.0001 ETH
-
-
- $0.08
-
+
+ 0.0001 ETH
+
+
+ $0.08
+
renders component for approve request 1`] = `
-
- 0.0001 ETH
-
-
- $0.08
-
renders component for approve request 1`] = `
class="mm-box mm-text mm-text--inherit mm-box--color-primary-default"
/>
+
+ 0.0001 ETH
+
+
+ $0.08
+
renders component 1`] = `
+
renders component 1`] = `
-
diff --git a/ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx b/ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx
index e351516941b8..2d3697c6f949 100644
--- a/ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx
+++ b/ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/edit-gas-fees-row.tsx
@@ -58,6 +58,10 @@ export const EditGasFeesRow = ({
alignItems={AlignItems.center}
textAlign={TextAlign.Center}
>
+
)}
-
);
diff --git a/ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/__snapshots__/gas-fees-details.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/__snapshots__/gas-fees-details.test.tsx.snap
index 8cc9a9c3bfb5..081f1038b24b 100644
--- a/ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/__snapshots__/gas-fees-details.test.tsx.snap
+++ b/ui/pages/confirmations/components/confirm/info/shared/gas-fees-details/__snapshots__/gas-fees-details.test.tsx.snap
@@ -39,18 +39,6 @@ exports[` renders component for gas fees section 1`] = `
-
- 0.0001 ETH
-
-
- $0.04
-
renders component for gas fees section 1`] = `
class="mm-box mm-text mm-text--inherit mm-box--color-primary-default"
/>
+
+ 0.0001 ETH
+
+
+ $0.04
+
renders component for gas fees section 1`] = `
-
- 0.0001 ETH
-
-
- $0.04
-
renders component for gas fees section 1`] = `
class="mm-box mm-text mm-text--inherit mm-box--color-primary-default"
/>
+
+ 0.0001 ETH
+
+
+ $0.04
+
{
const { currentConfirmation: transactionMeta } =
@@ -114,6 +115,8 @@ const NativeSendHeading = () => {
);
+ useSendingValueMetric({ transactionMeta, fiatValue });
+
return (
{
decodedTransferValue,
displayTransferValue,
fiatDisplayValue,
+ fiatValue,
pending,
} = useTokenValues(transactionMeta);
@@ -85,6 +87,8 @@ const SendHeading = () => {
);
+ useSendingValueMetric({ transactionMeta, fiatValue });
+
if (pending) {
return ;
}
diff --git a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.test.tsx b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.test.tsx
index 1263acf08397..f283ee6c4530 100644
--- a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.test.tsx
+++ b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.test.tsx
@@ -1,7 +1,8 @@
import React from 'react';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
-import { SimulationErrorCode } from '@metamask/transaction-controller';
+import { Hex } from '@metamask/utils';
+import { toHex } from '@metamask/controller-utils';
import {
getMockConfirmState,
getMockConfirmStateForTransaction,
@@ -44,21 +45,104 @@ describe('', () => {
expect(container).toMatchSnapshot();
});
- it('renders component for transaction details with amount', () => {
- const simulationDataMock = {
- error: { code: SimulationErrorCode.Disabled },
- tokenBalanceChanges: [],
- };
- const contractInteraction = genUnapprovedContractInteractionConfirmation({
- simulationData: simulationDataMock,
- chainId: CHAIN_IDS.GOERLI,
+ describe('AmountRow', () => {
+ describe('should be in the document', () => {
+ it('when showAdvancedDetails is true', () => {
+ const contractInteraction =
+ genUnapprovedContractInteractionConfirmation({
+ chainId: CHAIN_IDS.GOERLI,
+ });
+ const state = getMockConfirmStateForTransaction(contractInteraction, {
+ metamask: {
+ preferences: {
+ showConfirmationAdvancedDetails: true,
+ },
+ },
+ });
+ const mockStore = configureMockStore(middleware)(state);
+ const { getByTestId } = renderWithConfirmContextProvider(
+ ,
+ mockStore,
+ );
+ expect(
+ getByTestId('transaction-details-amount-row'),
+ ).toBeInTheDocument();
+ });
+
+ it('when value and simulated native balance mismatch', () => {
+ // Transaction value is set to 0x3782dace9d900000 below mock
+ const simulationDataMock = {
+ tokenBalanceChanges: [],
+ nativeBalanceChange: {
+ difference: '0x1' as Hex,
+ isDecrease: false,
+ previousBalance: '0x2' as Hex,
+ newBalance: '0x1' as Hex,
+ },
+ };
+ const contractInteraction =
+ genUnapprovedContractInteractionConfirmation({
+ simulationData: simulationDataMock,
+ chainId: CHAIN_IDS.GOERLI,
+ });
+ const state = getMockConfirmStateForTransaction(contractInteraction, {
+ metamask: {
+ preferences: {
+ // Intentionally setting to false to test the condition
+ showConfirmationAdvancedDetails: false,
+ },
+ },
+ });
+ const mockStore = configureMockStore(middleware)(state);
+ const { getByTestId } = renderWithConfirmContextProvider(
+ ,
+ mockStore,
+ );
+ expect(
+ getByTestId('transaction-details-amount-row'),
+ ).toBeInTheDocument();
+ });
+ });
+
+ it('should not be in the document when value and simulated native balance mismatch is within threshold', () => {
+ // Transaction value is set to 0x3782dace9d900000 below mock
+ const transactionValueInDecimal = 4000000000000000000;
+ const transactionValueInHex = toHex(transactionValueInDecimal);
+ const newBalanceInDecimal = 1;
+ const newBalanceInHex = toHex(newBalanceInDecimal);
+ const previousBalanceInDecimal =
+ transactionValueInDecimal + newBalanceInDecimal;
+ const previousBalanceInHex = toHex(previousBalanceInDecimal);
+
+ const simulationDataMock = {
+ tokenBalanceChanges: [],
+ nativeBalanceChange: {
+ difference: transactionValueInHex,
+ isDecrease: true,
+ previousBalance: previousBalanceInHex,
+ newBalance: newBalanceInHex,
+ },
+ };
+ const contractInteraction = genUnapprovedContractInteractionConfirmation({
+ simulationData: simulationDataMock,
+ chainId: CHAIN_IDS.GOERLI,
+ });
+ const state = getMockConfirmStateForTransaction(contractInteraction, {
+ metamask: {
+ preferences: {
+ // Intentionally setting to false to test the condition
+ showConfirmationAdvancedDetails: false,
+ },
+ },
+ });
+ const mockStore = configureMockStore(middleware)(state);
+ const { queryByTestId } = renderWithConfirmContextProvider(
+ ,
+ mockStore,
+ );
+ expect(
+ queryByTestId('transaction-details-amount-row'),
+ ).not.toBeInTheDocument();
});
- const state = getMockConfirmStateForTransaction(contractInteraction);
- const mockStore = configureMockStore(middleware)(state);
- const { getByTestId } = renderWithConfirmContextProvider(
- ,
- mockStore,
- );
- expect(getByTestId('transaction-details-amount-row')).toBeInTheDocument();
});
});
diff --git a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx
index 79cea5963c45..2cf6426f1975 100644
--- a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx
+++ b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx
@@ -1,6 +1,6 @@
import { TransactionMeta } from '@metamask/transaction-controller';
import { isValidAddress } from 'ethereumjs-util';
-import React from 'react';
+import React, { useMemo } from 'react';
import { useSelector } from 'react-redux';
import {
ConfirmInfoRow,
@@ -20,6 +20,7 @@ import { ConfirmInfoRowCurrency } from '../../../../../../../components/app/conf
import { PRIMARY } from '../../../../../../../helpers/constants/common';
import { useUserPreferencedCurrency } from '../../../../../../../hooks/useUserPreferencedCurrency';
import { HEX_ZERO } from '../constants';
+import { hasValueAndNativeBalanceMismatch as checkValueAndNativeBalanceMismatch } from '../../utils';
import { SigningInWithRow } from '../sign-in-with-row/sign-in-with-row';
export const OriginRow = () => {
@@ -99,9 +100,8 @@ const AmountRow = () => {
const { currency } = useUserPreferencedCurrency(PRIMARY);
const value = currentConfirmation?.txParams?.value;
- const simulationData = currentConfirmation?.simulationData;
- if (!value || value === HEX_ZERO || !simulationData?.error) {
+ if (!value || value === HEX_ZERO) {
return null;
}
@@ -150,6 +150,11 @@ export const TransactionDetails = () => {
const showAdvancedDetails = useSelector(
selectConfirmationAdvancedDetailsOpen,
);
+ const { currentConfirmation } = useConfirmContext();
+ const hasValueAndNativeBalanceMismatch = useMemo(
+ () => checkValueAndNativeBalanceMismatch(currentConfirmation),
+ [currentConfirmation],
+ );
return (
<>
@@ -159,7 +164,9 @@ export const TransactionDetails = () => {
{showAdvancedDetails && }
-
+ {(showAdvancedDetails || hasValueAndNativeBalanceMismatch) && (
+
+ )}
>
);
diff --git a/ui/pages/confirmations/components/confirm/info/token-transfer/__snapshots__/token-transfer.test.tsx.snap b/ui/pages/confirmations/components/confirm/info/token-transfer/__snapshots__/token-transfer.test.tsx.snap
index 4cb3213f8dae..a9cdce1b702c 100644
--- a/ui/pages/confirmations/components/confirm/info/token-transfer/__snapshots__/token-transfer.test.tsx.snap
+++ b/ui/pages/confirmations/components/confirm/info/token-transfer/__snapshots__/token-transfer.test.tsx.snap
@@ -350,18 +350,6 @@ exports[`TokenTransferInfo renders correctly 1`] = `
-
- 0.0001 ETH
-
-
- $0.08
-
+
+ 0.0001 ETH
+
+
+ $0.08
+
{
);
expect(tooltip).toBe('signature_decoding_bid_nft_tooltip');
});
+
+ it('renders label only once if there are multiple state changes of same changeType', async () => {
+ const state = getMockTypedSignConfirmStateForRequest({
+ ...permitSignatureMsg,
+ decodingLoading: false,
+ decodingData: {
+ stateChanges: [
+ decodingData.stateChanges[0],
+ decodingData.stateChanges[0],
+ decodingData.stateChanges[0],
+ ],
+ },
+ });
+ const mockStore = configureMockStore([])(state);
+
+ const { findAllByText } = renderWithConfirmContextProvider(
+
,
+ mockStore,
+ );
+
+ expect(await findAllByText('Spending cap')).toHaveLength(1);
+ });
});
diff --git a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx
index ec07ae253405..fe2be9d76261 100644
--- a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx
+++ b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign-v4-simulation/decoded-simulation/decoded-simulation.tsx
@@ -60,10 +60,12 @@ const StateChangeRow = ({
stateChangeList,
stateChange,
chainId,
+ shouldDisplayLabel,
}: {
stateChangeList: DecodingDataStateChanges | null;
stateChange: DecodingDataStateChange;
chainId: Hex;
+ shouldDisplayLabel: boolean;
}) => {
const t = useI18nContext();
const { assetType, changeType, amount, contractAddress, tokenID } =
@@ -71,7 +73,7 @@ const StateChangeRow = ({
const tooltip = getStateChangeToolip(stateChangeList, stateChange, t);
return (
{(assetType === TokenStandard.ERC20 ||
@@ -104,19 +106,31 @@ const DecodedSimulation: React.FC