1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Merge branch 'develop' of github.com:MetaMask/metamask-extension into minimal

This commit is contained in:
Matthias Kretschmann 2023-08-15 12:53:09 +01:00
commit 1be7c9784b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
153 changed files with 2112 additions and 2615 deletions

View File

@ -19,6 +19,15 @@ const state = {
url: 'https://metamask.github.io/test-dapp/', url: 'https://metamask.github.io/test-dapp/',
}, },
metamask: { metamask: {
announcements: {
22: {
id: 22,
date: null,
image: {
src: 'images/global-menu-block-explorer.svg',
},
}
},
tokenList: { tokenList: {
'0x514910771af9ca656af840dff83e8264ecf986ca': { '0x514910771af9ca656af840dff83e8264ecf986ca': {
address: '0x514910771af9ca656af840dff83e8264ecf986ca', address: '0x514910771af9ca656af840dff83e8264ecf986ca',

View File

@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [10.34.4]
### Changed
- Updated snaps execution environment ([#20420](https://github.com/MetaMask/metamask-extension/pull/20420))
## [10.34.3]
### Fixed
- Ensure users phishing warning list is properly updated ([#20381](https://github.com/MetaMask/metamask-extension/pull/20381))
- Fix inaccurate info in swaps flow for zero-balance tokens ([#20388](https://github.com/MetaMask/metamask-extension/pull/20388))
- Fix 'Global Menu Explorer / Account Details' What's New notification display ([#20371](https://github.com/MetaMask/metamask-extension/pull/20371))
## [10.34.2] ## [10.34.2]
### Added ### Added
- Add Address Details and View on Explorer to Global Menu ([#20013](https://github.com/MetaMask/metamask-extension/pull/20013)) - Add Address Details and View on Explorer to Global Menu ([#20013](https://github.com/MetaMask/metamask-extension/pull/20013))
@ -26,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [10.34.1] ## [10.34.1]
### Fixed ### Fixed
- Fix bug that could cause a failure in the persistence of network related data ([#20080](https://github.com/MetaMask/metamask-extension/pull/20080)) - Fix bug that could cause a failure in the persistence of network related data ([#20080](https://github.com/MetaMask/metamask-extension/pull/20080))
- Fix ([#20080](https://github.com/MetaMask/metamask-extension/pull/20080)) - Fix possible crash when opening the network menu ([#20181](https://github.com/MetaMask/metamask-extension/pull/20181))
## [10.34.0] ## [10.34.0]
### Added ### Added
@ -3875,7 +3885,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Uncategorized ### Uncategorized
- Added the ability to restore accounts from seed words. - Added the ability to restore accounts from seed words.
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.34.2...HEAD [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.34.4...HEAD
[10.34.4]: https://github.com/MetaMask/metamask-extension/compare/v10.34.3...v10.34.4
[10.34.3]: https://github.com/MetaMask/metamask-extension/compare/v10.34.2...v10.34.3
[10.34.2]: https://github.com/MetaMask/metamask-extension/compare/v10.34.1...v10.34.2 [10.34.2]: https://github.com/MetaMask/metamask-extension/compare/v10.34.1...v10.34.2
[10.34.1]: https://github.com/MetaMask/metamask-extension/compare/v10.34.0...v10.34.1 [10.34.1]: https://github.com/MetaMask/metamask-extension/compare/v10.34.0...v10.34.1
[10.34.0]: https://github.com/MetaMask/metamask-extension/compare/v10.33.1...v10.34.0 [10.34.0]: https://github.com/MetaMask/metamask-extension/compare/v10.33.1...v10.34.0

View File

@ -609,9 +609,6 @@
"searchResults": { "searchResults": {
"message": "ውጤቶችን ፈልግ" "message": "ውጤቶችን ፈልግ"
}, },
"searchTokens": {
"message": "ተለዋጭ ስሞችን ፈልግ"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "ደህንነት እና ግላዊነት" "message": "ደህንነት እና ግላዊነት"
}, },

View File

@ -621,9 +621,6 @@
"searchResults": { "searchResults": {
"message": "نتائج البحث" "message": "نتائج البحث"
}, },
"searchTokens": {
"message": "البحث عن العملات الرمزية"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "الأمن والخصوصية" "message": "الأمن والخصوصية"
}, },

View File

@ -620,9 +620,6 @@
"searchResults": { "searchResults": {
"message": "Резултати от търсенето" "message": "Резултати от търсенето"
}, },
"searchTokens": {
"message": "Търсене на маркери"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Сигурност и поверителност" "message": "Сигурност и поверителност"
}, },

View File

@ -618,9 +618,6 @@
"searchResults": { "searchResults": {
"message": "অনুসন্ধানের ফলাফলগুলি" "message": "অনুসন্ধানের ফলাফলগুলি"
}, },
"searchTokens": {
"message": "টোকেনগুলি অনুসন্ধান করুন"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "নিরাপত্তা এবং গোপনীয়তা" "message": "নিরাপত্তা এবং গোপনীয়তা"
}, },

View File

@ -605,9 +605,6 @@
"searchResults": { "searchResults": {
"message": "Resultats de Cerca" "message": "Resultats de Cerca"
}, },
"searchTokens": {
"message": "Tokens per cercar"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Seguretat i privacitat" "message": "Seguretat i privacitat"
}, },

View File

@ -289,9 +289,6 @@
"search": { "search": {
"message": "Hledat" "message": "Hledat"
}, },
"searchTokens": {
"message": "Hledat tokeny"
},
"seedPhraseReq": { "seedPhraseReq": {
"message": "klíčové fráze mají 12 slov" "message": "klíčové fráze mají 12 slov"
}, },

View File

@ -605,9 +605,6 @@
"searchResults": { "searchResults": {
"message": "Søg Resultater" "message": "Søg Resultater"
}, },
"searchTokens": {
"message": "Søg efter tokens"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Sikkerhed & Privatliv" "message": "Sikkerhed & Privatliv"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Benutzerdefiniertes Netzwerk hinzufügen" "message": "Benutzerdefiniertes Netzwerk hinzufügen"
}, },
"addCustomToken": {
"message": "Kunden-Token hinzufügen"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Dadurch kann dieses Netzwerk innerhalb MetaMask verwendet werden." "message": "Dadurch kann dieses Netzwerk innerhalb MetaMask verwendet werden."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Suchergebnisse" "message": "Suchergebnisse"
}, },
"searchTokens": {
"message": "Token suchen"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Geheime Wiederherstellungsphrase" "message": "Geheime Wiederherstellungsphrase"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Προσθήκη προσαρμοσμένου δικτύου" "message": "Προσθήκη προσαρμοσμένου δικτύου"
}, },
"addCustomToken": {
"message": "Προσθήκη Προσαρμοσμένου Token"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Αυτό θα επιτρέψει σε αυτό το δίκτυο να χρησιμοποιηθεί στο MetaMask." "message": "Αυτό θα επιτρέψει σε αυτό το δίκτυο να χρησιμοποιηθεί στο MetaMask."
}, },
@ -2977,9 +2974,6 @@
"searchAccounts": { "searchAccounts": {
"message": "Αναζήτηση Λογαριασμών" "message": "Αναζήτηση Λογαριασμών"
}, },
"searchTokens": {
"message": "Αναζήτηση Tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Μυστική Φράση Ανάκτησης" "message": "Μυστική Φράση Ανάκτησης"
}, },

View File

@ -192,9 +192,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Add custom network" "message": "Add custom network"
}, },
"addCustomToken": {
"message": "Add custom token"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "This will allow this network to be used within MetaMask." "message": "This will allow this network to be used within MetaMask."
}, },
@ -568,6 +565,9 @@
"blockaidDescriptionBlurFarming": { "blockaidDescriptionBlurFarming": {
"message": "If you approve this request, someone can steal your assets listed on Blur." "message": "If you approve this request, someone can steal your assets listed on Blur."
}, },
"blockaidDescriptionFailed": {
"message": "Because of an error, this request was not verified by the security provider. Proceed with caution."
},
"blockaidDescriptionMaliciousDomain": { "blockaidDescriptionMaliciousDomain": {
"message": "You're interacting with a malicious domain. If you approve this request, you might lose your assets." "message": "You're interacting with a malicious domain. If you approve this request, you might lose your assets."
}, },
@ -583,6 +583,9 @@
"blockaidTitleDeceptive": { "blockaidTitleDeceptive": {
"message": "This is a deceptive request" "message": "This is a deceptive request"
}, },
"blockaidTitleMayNotBeSafe": {
"message": "Request may not be safe"
},
"blockaidTitleSuspicious": { "blockaidTitleSuspicious": {
"message": "This is a suspicious request" "message": "This is a suspicious request"
}, },
@ -3653,9 +3656,6 @@
"searchResults": { "searchResults": {
"message": "Search results" "message": "Search results"
}, },
"searchTokens": {
"message": "Search tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Secret Recovery Phrase" "message": "Secret Recovery Phrase"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Agregar red personalizada" "message": "Agregar red personalizada"
}, },
"addCustomToken": {
"message": "Añadir token personalizado"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Esto permitirá que la red se utilice en MetaMask." "message": "Esto permitirá que la red se utilice en MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Resultados de la búsqueda" "message": "Resultados de la búsqueda"
}, },
"searchTokens": {
"message": "Buscar tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Frase secreta de recuperación" "message": "Frase secreta de recuperación"
}, },

View File

@ -100,9 +100,6 @@
"addContact": { "addContact": {
"message": "Agregar contacto" "message": "Agregar contacto"
}, },
"addCustomToken": {
"message": "Añadir token personalizado"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Esto permitirá que la red se utilice en MetaMask." "message": "Esto permitirá que la red se utilice en MetaMask."
}, },
@ -1882,9 +1879,6 @@
"searchResults": { "searchResults": {
"message": "Resultados de la búsqueda" "message": "Resultados de la búsqueda"
}, },
"searchTokens": {
"message": "Buscar tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Frase secreta de recuperación" "message": "Frase secreta de recuperación"
}, },

View File

@ -614,9 +614,6 @@
"searchResults": { "searchResults": {
"message": "Otsingutulemused" "message": "Otsingutulemused"
}, },
"searchTokens": {
"message": "Lubade otsimine"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Turvalisus ja privaatsus" "message": "Turvalisus ja privaatsus"
}, },

View File

@ -624,9 +624,6 @@
"searchResults": { "searchResults": {
"message": "نتایج جستجو" "message": "نتایج جستجو"
}, },
"searchTokens": {
"message": "رمزیاب های جستجو"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "امنیت و حریم خصوصی" "message": "امنیت و حریم خصوصی"
}, },

View File

@ -621,9 +621,6 @@
"searchResults": { "searchResults": {
"message": "Hakutulokset" "message": "Hakutulokset"
}, },
"searchTokens": {
"message": "Hae tietueita"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Turva & yksityisyys" "message": "Turva & yksityisyys"
}, },

View File

@ -548,9 +548,6 @@
"searchResults": { "searchResults": {
"message": "Mga Resulta ng Paghahanap" "message": "Mga Resulta ng Paghahanap"
}, },
"searchTokens": {
"message": "Maghanap ng Mga Token"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Seguridad at Privacy" "message": "Seguridad at Privacy"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Ajouter un réseau personnalisé" "message": "Ajouter un réseau personnalisé"
}, },
"addCustomToken": {
"message": "Ajouter un jeton personnalisé"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Cela permettra dutiliser ce réseau dans MetaMask." "message": "Cela permettra dutiliser ce réseau dans MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Résultats de la recherche" "message": "Résultats de la recherche"
}, },
"searchTokens": {
"message": "Rechercher des jetons"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Phrase secrète de récupération" "message": "Phrase secrète de récupération"
}, },

View File

@ -621,9 +621,6 @@
"searchResults": { "searchResults": {
"message": "תוצאות חיפוש" "message": "תוצאות חיפוש"
}, },
"searchTokens": {
"message": "חיפוש טוקנים"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "אבטחה ופרטיות" "message": "אבטחה ופרטיות"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "कस्टम नेटवर्क जोड़ें" "message": "कस्टम नेटवर्क जोड़ें"
}, },
"addCustomToken": {
"message": "कस्टम टोकन जोड़ें"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "इससे इस नेटवर्क को MetaMask के अंदर उपयोग करने की अनुमति मिलेगी।" "message": "इससे इस नेटवर्क को MetaMask के अंदर उपयोग करने की अनुमति मिलेगी।"
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "खोज परिणाम" "message": "खोज परिणाम"
}, },
"searchTokens": {
"message": "टोकन खोजें"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "सीक्रेट रिकवरी फ्रेज" "message": "सीक्रेट रिकवरी फ्रेज"
}, },

View File

@ -617,9 +617,6 @@
"searchResults": { "searchResults": {
"message": "Rezultati pretraživanja" "message": "Rezultati pretraživanja"
}, },
"searchTokens": {
"message": "Pretraži tokene"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Sigurnost i privatnost" "message": "Sigurnost i privatnost"
}, },

View File

@ -452,9 +452,6 @@
"searchResults": { "searchResults": {
"message": "Rezilta rechèch" "message": "Rezilta rechèch"
}, },
"searchTokens": {
"message": "Rechèch Tokens"
},
"seedPhraseReq": { "seedPhraseReq": {
"message": "Seed fraz yo se 12 long mo" "message": "Seed fraz yo se 12 long mo"
}, },

View File

@ -617,9 +617,6 @@
"searchResults": { "searchResults": {
"message": "Keresési eredmények" "message": "Keresési eredmények"
}, },
"searchTokens": {
"message": "Keresés a tokenek között"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Biztonság és adatvédelem" "message": "Biztonság és adatvédelem"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Tambahkan jaringan khusus" "message": "Tambahkan jaringan khusus"
}, },
"addCustomToken": {
"message": "Tambahkan token kustom"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Tindakan ini akan membantu jaringan ini agar dapat digunakan dengan MetaMask." "message": "Tindakan ini akan membantu jaringan ini agar dapat digunakan dengan MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Cari hasil" "message": "Cari hasil"
}, },
"searchTokens": {
"message": "Cari token"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Frasa Pemulihan Rahasia" "message": "Frasa Pemulihan Rahasia"
}, },

View File

@ -155,9 +155,6 @@
"addContact": { "addContact": {
"message": "Aggiungi contatto" "message": "Aggiungi contatto"
}, },
"addCustomToken": {
"message": "Aggiungi token personalizzato"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Ciò consentirà a questa rete di essere utilizzata all'interno di MetaMask." "message": "Ciò consentirà a questa rete di essere utilizzata all'interno di MetaMask."
}, },
@ -1380,9 +1377,6 @@
"searchResults": { "searchResults": {
"message": "Risultati Ricerca" "message": "Risultati Ricerca"
}, },
"searchTokens": {
"message": "Cerca Tokens"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Sicurezza & Privacy" "message": "Sicurezza & Privacy"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "カスタムネットワークを追加" "message": "カスタムネットワークを追加"
}, },
"addCustomToken": {
"message": "カスタムトークンを追加"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "これにより、このネットワークはMetaMask内で使用できるようになります。" "message": "これにより、このネットワークはMetaMask内で使用できるようになります。"
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "検索結果" "message": "検索結果"
}, },
"searchTokens": {
"message": "トークンを検索"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "シークレットリカバリーフレーズ" "message": "シークレットリカバリーフレーズ"
}, },

View File

@ -624,9 +624,6 @@
"searchResults": { "searchResults": {
"message": "ಹುಡುಕಾಟ ಫಲಿತಾಂಶಗಳು" "message": "ಹುಡುಕಾಟ ಫಲಿತಾಂಶಗಳು"
}, },
"searchTokens": {
"message": "ಟೋಕನ್‌ಗಳನ್ನು ಹುಡುಕಿ"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "ಭದ್ರತೆ ಮತ್ತು ಗೌಪ್ಯತೆ" "message": "ಭದ್ರತೆ ಮತ್ತು ಗೌಪ್ಯತೆ"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "커스텀 네트워크 추가" "message": "커스텀 네트워크 추가"
}, },
"addCustomToken": {
"message": "커스텀 토큰 추가"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "이렇게 하면 MetaMask 내에서 이 네트워크를 사용할 수 있습니다." "message": "이렇게 하면 MetaMask 내에서 이 네트워크를 사용할 수 있습니다."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "검색 결과" "message": "검색 결과"
}, },
"searchTokens": {
"message": "토큰 검색"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "비밀 복구 구문" "message": "비밀 복구 구문"
}, },

View File

@ -624,9 +624,6 @@
"searchResults": { "searchResults": {
"message": "Paieškos rezultatai" "message": "Paieškos rezultatai"
}, },
"searchTokens": {
"message": "Ieškoti žetonų"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Sauga ir privatumas" "message": "Sauga ir privatumas"
}, },

View File

@ -620,9 +620,6 @@
"searchResults": { "searchResults": {
"message": "Meklēšanas rezultāti" "message": "Meklēšanas rezultāti"
}, },
"searchTokens": {
"message": "Meklēt marķierus"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Drošība un konfidencialitāte" "message": "Drošība un konfidencialitāte"
}, },

View File

@ -604,9 +604,6 @@
"searchResults": { "searchResults": {
"message": "Hasil Carian" "message": "Hasil Carian"
}, },
"searchTokens": {
"message": "Cari Token"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Keselamatan & Privasi" "message": "Keselamatan & Privasi"
}, },

View File

@ -608,9 +608,6 @@
"searchResults": { "searchResults": {
"message": "Søkeresultater" "message": "Søkeresultater"
}, },
"searchTokens": {
"message": "Søk i sjetonger"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Sikkerhet og personvern" "message": "Sikkerhet og personvern"
}, },

View File

@ -1211,9 +1211,6 @@
"searchResults": { "searchResults": {
"message": "Mga Resulta ng Paghahanap" "message": "Mga Resulta ng Paghahanap"
}, },
"searchTokens": {
"message": "Maghanap ng Mga Token"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Seguridad at Privacy" "message": "Seguridad at Privacy"
}, },

View File

@ -618,9 +618,6 @@
"searchResults": { "searchResults": {
"message": "Wyniki wyszukiwania" "message": "Wyniki wyszukiwania"
}, },
"searchTokens": {
"message": "Szukaj tokenów"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Bezpieczeństwo i prywatność" "message": "Bezpieczeństwo i prywatność"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Adicionar rede personalizada" "message": "Adicionar rede personalizada"
}, },
"addCustomToken": {
"message": "Adicionar token personalizado"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Isso permitirá que essa rede seja usada dentro da MetaMask." "message": "Isso permitirá que essa rede seja usada dentro da MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Resultados da busca" "message": "Resultados da busca"
}, },
"searchTokens": {
"message": "Buscar tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Frase Secreta de Recuperação" "message": "Frase Secreta de Recuperação"
}, },

View File

@ -100,9 +100,6 @@
"addContact": { "addContact": {
"message": "Adicionar contato" "message": "Adicionar contato"
}, },
"addCustomToken": {
"message": "Adicionar token personalizado"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Isso permitirá que essa rede seja usada dentro da MetaMask." "message": "Isso permitirá que essa rede seja usada dentro da MetaMask."
}, },
@ -1882,9 +1879,6 @@
"searchResults": { "searchResults": {
"message": "Resultados da busca" "message": "Resultados da busca"
}, },
"searchTokens": {
"message": "Buscar tokens"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Frase de Recuperação Secreta" "message": "Frase de Recuperação Secreta"
}, },

View File

@ -611,9 +611,6 @@
"searchResults": { "searchResults": {
"message": "Rezultate căutare" "message": "Rezultate căutare"
}, },
"searchTokens": {
"message": "Căutați token-uri"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Securitate și confidențialitate" "message": "Securitate și confidențialitate"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Добавить пользовательскую сеть" "message": "Добавить пользовательскую сеть"
}, },
"addCustomToken": {
"message": "Добавить пользовательский токен"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Это позволит использовать эту сеть в MetaMask." "message": "Это позволит использовать эту сеть в MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Результаты поиска" "message": "Результаты поиска"
}, },
"searchTokens": {
"message": "Поиск токенов"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Секретная фраза для восстановления" "message": "Секретная фраза для восстановления"
}, },

View File

@ -596,9 +596,6 @@
"searchResults": { "searchResults": {
"message": "Výsledky vyhľadávania" "message": "Výsledky vyhľadávania"
}, },
"searchTokens": {
"message": "Hledat tokeny"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Bezpečnosť a súkromie" "message": "Bezpečnosť a súkromie"
}, },

View File

@ -612,9 +612,6 @@
"searchResults": { "searchResults": {
"message": "Rezultati iskanja" "message": "Rezultati iskanja"
}, },
"searchTokens": {
"message": "Iskanje žetonov"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Varnost in zasebnost" "message": "Varnost in zasebnost"
}, },

View File

@ -615,9 +615,6 @@
"searchResults": { "searchResults": {
"message": "Rezultati pretrage" "message": "Rezultati pretrage"
}, },
"searchTokens": {
"message": "Pretražite tokene"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Bezbednost i privatnost" "message": "Bezbednost i privatnost"
}, },

View File

@ -608,9 +608,6 @@
"searchResults": { "searchResults": {
"message": "Sökresultat" "message": "Sökresultat"
}, },
"searchTokens": {
"message": "Sök tokens"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Säkerhet och integritet" "message": "Säkerhet och integritet"
}, },

View File

@ -602,9 +602,6 @@
"searchResults": { "searchResults": {
"message": "Matokeo ya Utafutaji" "message": "Matokeo ya Utafutaji"
}, },
"searchTokens": {
"message": "Tafuta Vianzio"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Ulinzi na Faragha" "message": "Ulinzi na Faragha"
}, },

View File

@ -359,9 +359,6 @@
"search": { "search": {
"message": "தேடல்" "message": "தேடல்"
}, },
"searchTokens": {
"message": "தேடல் டோக்கன்ஸ்"
},
"seedPhraseReq": { "seedPhraseReq": {
"message": "விதை வாக்கியங்கள் 12 வார்த்தைகள் நீண்டவை" "message": "விதை வாக்கியங்கள் 12 வார்த்தைகள் நீண்டவை"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Magdagdag ng custom na network" "message": "Magdagdag ng custom na network"
}, },
"addCustomToken": {
"message": "Magdagdag ng Custom na Token"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Magpapahintulot ito sa network na ito na gamitin sa loob ng MetaMask." "message": "Magpapahintulot ito sa network na ito na gamitin sa loob ng MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Mga Resulta ng Paghahanap" "message": "Mga Resulta ng Paghahanap"
}, },
"searchTokens": {
"message": "Maghanap ng Mga Token"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Lihim na recovery phrase" "message": "Lihim na recovery phrase"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Özel ağ ekle" "message": "Özel ağ ekle"
}, },
"addCustomToken": {
"message": "Özel token ekle"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Bu, bu ağın MetaMas dahilinde kullanılmasına olanak tanıyacaktır." "message": "Bu, bu ağın MetaMas dahilinde kullanılmasına olanak tanıyacaktır."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Arama sonuçları" "message": "Arama sonuçları"
}, },
"searchTokens": {
"message": "Token ara"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Gizli Kurtarma İfadesi" "message": "Gizli Kurtarma İfadesi"
}, },

View File

@ -624,9 +624,6 @@
"searchResults": { "searchResults": {
"message": "Результати пошуку" "message": "Результати пошуку"
}, },
"searchTokens": {
"message": "Шукати токени"
},
"securityAndPrivacy": { "securityAndPrivacy": {
"message": "Безпека й конфіденційність" "message": "Безпека й конфіденційність"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "Thêm mạng tùy chỉnh" "message": "Thêm mạng tùy chỉnh"
}, },
"addCustomToken": {
"message": "Thêm token tùy chỉnh"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "Thao tác này sẽ cho phép sử dụng mạng này trong MetaMask." "message": "Thao tác này sẽ cho phép sử dụng mạng này trong MetaMask."
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "Kết quả tìm kiếm" "message": "Kết quả tìm kiếm"
}, },
"searchTokens": {
"message": "Tìm kiếm token"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "Cụm Mật Khẩu Khôi Phục Bí Mật" "message": "Cụm Mật Khẩu Khôi Phục Bí Mật"
}, },

View File

@ -186,9 +186,6 @@
"addCustomNetwork": { "addCustomNetwork": {
"message": "添加自定义网络" "message": "添加自定义网络"
}, },
"addCustomToken": {
"message": "添加自定义代币"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "这将允许在 MetaMask 中使用此网络。" "message": "这将允许在 MetaMask 中使用此网络。"
}, },
@ -2980,9 +2977,6 @@
"searchResults": { "searchResults": {
"message": "搜索结果" "message": "搜索结果"
}, },
"searchTokens": {
"message": "搜索代币"
},
"secretRecoveryPhrase": { "secretRecoveryPhrase": {
"message": "助记词" "message": "助记词"
}, },

View File

@ -42,9 +42,6 @@
"addContact": { "addContact": {
"message": "新增合約" "message": "新增合約"
}, },
"addCustomToken": {
"message": "Add Custom Token"
},
"addEthereumChainConfirmationDescription": { "addEthereumChainConfirmationDescription": {
"message": "這會允許在 MetaMask 內使用這個網路。" "message": "這會允許在 MetaMask 內使用這個網路。"
}, },
@ -1133,9 +1130,6 @@
"searchResults": { "searchResults": {
"message": "搜尋結果" "message": "搜尋結果"
}, },
"searchTokens": {
"message": "搜尋代幣"
},
"secureWallet": { "secureWallet": {
"message": "Secure Wallet" "message": "Secure Wallet"
}, },

View File

@ -45,7 +45,10 @@ export type CoreMessage = AbstractMessage & {
}; };
export type StateMessage = Required< export type StateMessage = Required<
Omit<AbstractMessage, 'securityProviderResponse' | 'metadata' | 'error'> Omit<
AbstractMessage,
'securityAlertResponse' | 'securityProviderResponse' | 'metadata' | 'error'
>
>; >;
export type DecryptMessageControllerState = { export type DecryptMessageControllerState = {

View File

@ -44,7 +44,10 @@ export type CoreMessage = AbstractMessage & {
}; };
export type StateMessage = Required< export type StateMessage = Required<
Omit<AbstractMessage, 'securityProviderResponse' | 'metadata' | 'error'> Omit<
AbstractMessage,
'securityAlertResponse' | 'securityProviderResponse' | 'metadata' | 'error'
>
> & { > & {
msgParams: string; msgParams: string;
}; };

View File

@ -28,7 +28,7 @@ try {
const namedIntrinsics = Reflect.ownKeys(new Compartment().globalThis); const namedIntrinsics = Reflect.ownKeys(new Compartment().globalThis);
// These named intrinsics are not automatically hardened by `lockdown` // These named intrinsics are not automatically hardened by `lockdown`
const shouldHardenManually = new Set(['eval', 'Function']); const shouldHardenManually = new Set(['eval', 'Function', 'Symbol']);
const globalProperties = new Set([ const globalProperties = new Set([
// universalPropertyNames is a constant added by lockdown to global scope // universalPropertyNames is a constant added by lockdown to global scope

View File

@ -89,6 +89,7 @@ import {
ERC20, ERC20,
ERC721, ERC721,
} from '@metamask/controller-utils'; } from '@metamask/controller-utils';
import { wordlist } from '@metamask/scure-bip39/dist/wordlists/english';
///: BEGIN:ONLY_INCLUDE_IN(build-mmi) ///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils';
@ -2905,8 +2906,6 @@ export default class MetamaskController extends EventEmitter {
const seedPhraseAsBuffer = Buffer.from(encodedSeedPhrase); const seedPhraseAsBuffer = Buffer.from(encodedSeedPhrase);
const { keyringController } = this;
// clear known identities // clear known identities
this.preferencesController.setAddresses([]); this.preferencesController.setAddresses([]);
@ -2930,29 +2929,22 @@ export default class MetamaskController extends EventEmitter {
this.txController.txStateManager.clearUnapprovedTxs(); this.txController.txStateManager.clearUnapprovedTxs();
// create new vault // create new vault
const vault = await keyringController.createNewVaultAndRestore( const vault = await this.coreKeyringController.createNewVaultAndRestore(
password, password,
seedPhraseAsBuffer, this._convertMnemonicToWordlistIndices(seedPhraseAsBuffer),
); );
const ethQuery = new EthQuery(this.provider); const ethQuery = new EthQuery(this.provider);
accounts = await keyringController.getAccounts(); accounts = await this.coreKeyringController.getAccounts();
lastBalance = await this.getBalance( lastBalance = await this.getBalance(
accounts[accounts.length - 1], accounts[accounts.length - 1],
ethQuery, ethQuery,
); );
const [primaryKeyring] = this.coreKeyringController.getKeyringsByType(
KeyringType.hdKeyTree,
);
if (!primaryKeyring) {
throw new Error('MetamaskController - No HD Key Tree found');
}
// seek out the first zero balance // seek out the first zero balance
while (lastBalance !== '0x0') { while (lastBalance !== '0x0') {
await keyringController.addNewAccount(primaryKeyring); await this.coreKeyringController.addNewAccount(accounts.length);
accounts = await keyringController.getAccounts(); accounts = await this.coreKeyringController.getAccounts();
lastBalance = await this.getBalance( lastBalance = await this.getBalance(
accounts[accounts.length - 1], accounts[accounts.length - 1],
ethQuery, ethQuery,
@ -2962,7 +2954,7 @@ export default class MetamaskController extends EventEmitter {
// remove extra zero balance account potentially created from seeking ahead // remove extra zero balance account potentially created from seeking ahead
if (accounts.length > 1 && lastBalance === '0x0') { if (accounts.length > 1 && lastBalance === '0x0') {
await this.removeAccount(accounts[accounts.length - 1]); await this.removeAccount(accounts[accounts.length - 1]);
accounts = await keyringController.getAccounts(); accounts = await this.coreKeyringController.getAccounts();
} }
// This must be set as soon as possible to communicate to the // This must be set as soon as possible to communicate to the
@ -2973,8 +2965,6 @@ export default class MetamaskController extends EventEmitter {
this.preferencesController.getLedgerTransportPreference(); this.preferencesController.getLedgerTransportPreference();
this.setLedgerTransportPreference(transportPreference); this.setLedgerTransportPreference(transportPreference);
// set new identities
this.preferencesController.setAddresses(accounts);
this.selectFirstIdentity(); this.selectFirstIdentity();
return vault; return vault;
@ -2983,6 +2973,20 @@ export default class MetamaskController extends EventEmitter {
} }
} }
/**
* Encodes a BIP-39 mnemonic as the indices of words in the English BIP-39 wordlist.
*
* @param {Buffer} mnemonic - The BIP-39 mnemonic.
* @returns {Buffer} The Unicode code points for the seed phrase formed from the words in the wordlist.
*/
_convertMnemonicToWordlistIndices(mnemonic) {
const indices = mnemonic
.toString()
.split(' ')
.map((word) => wordlist.indexOf(word));
return new Uint8Array(new Uint16Array(indices).buffer);
}
/** /**
* Get an account balance from the AccountTracker or request it directly from the network. * Get an account balance from the AccountTracker or request it directly from the network.
* *

View File

@ -307,7 +307,7 @@ describe('MetaMaskController', function () {
'createNewVaultAndKeychain', 'createNewVaultAndKeychain',
); );
sandbox.spy( sandbox.spy(
metamaskController.keyringController, metamaskController.coreKeyringController,
'createNewVaultAndRestore', 'createNewVaultAndRestore',
); );
}); });
@ -423,7 +423,7 @@ describe('MetaMaskController', function () {
await metamaskController.createNewVaultAndRestore(password, TEST_SEED); await metamaskController.createNewVaultAndRestore(password, TEST_SEED);
assert( assert(
metamaskController.keyringController.createNewVaultAndRestore metamaskController.coreKeyringController.createNewVaultAndRestore
.calledTwice, .calledTwice,
); );
}); });

View File

@ -47,7 +47,7 @@ buildTypes:
- desktop - desktop
- build-flask - build-flask
- keyring-snaps - keyring-snaps
# - blockaid - blockaid
env: env:
- INFURA_FLASK_PROJECT_ID - INFURA_FLASK_PROJECT_ID
- SEGMENT_FLASK_WRITE_KEY - SEGMENT_FLASK_WRITE_KEY

View File

@ -380,7 +380,7 @@
"@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true, "@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/abi>@ethersproject/properties": true,
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"@ethersproject/hdnode>@ethersproject/transactions": { "@ethersproject/hdnode>@ethersproject/transactions": {
@ -1088,6 +1088,7 @@
}, },
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -1095,8 +1096,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-ledger-bridge-keyring>hdkey": { "@metamask/eth-ledger-bridge-keyring>hdkey": {
@ -1111,11 +1111,11 @@
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
@ -1422,11 +1422,11 @@
"@metamask/eth-trezor-keyring>hdkey>secp256k1": { "@metamask/eth-trezor-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": { "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": {
@ -1802,6 +1802,33 @@
"eslint>optionator>fast-levenshtein": true "eslint>optionator>fast-levenshtein": true
} }
}, },
"@metamask/ppom-validator>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,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"pumpify>inherits": true
}
},
"@metamask/ppom-validator>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/ppom-validator>elliptic>hmac-drbg": {
"packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true
}
},
"@metamask/rpc-methods": { "@metamask/rpc-methods": {
"packages": { "packages": {
"@metamask/browser-passworder": true, "@metamask/browser-passworder": true,
@ -2853,7 +2880,7 @@
}, },
"browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -2865,6 +2892,7 @@
}, },
"browserify>crypto-browserify>browserify-sign": { "browserify>crypto-browserify>browserify-sign": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true, "browserify>crypto-browserify>create-hmac": true,
@ -2872,15 +2900,14 @@
"browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>crypto-browserify>public-encrypt>parse-asn1": true,
"browserify>stream-browserify": true, "browserify>stream-browserify": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ganache>secp256k1>elliptic": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
"browserify>crypto-browserify>create-ecdh": { "browserify>crypto-browserify>create-ecdh": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"browserify>crypto-browserify>create-hmac": { "browserify>crypto-browserify>create-hmac": {
@ -2903,8 +2930,8 @@
}, },
"browserify>crypto-browserify>diffie-hellman>miller-rabin": { "browserify>crypto-browserify>diffie-hellman>miller-rabin": {
"packages": { "packages": {
"bn.js": true, "@metamask/ppom-validator>elliptic>brorand": true,
"ganache>secp256k1>elliptic>brorand": true "bn.js": true
} }
}, },
"browserify>crypto-browserify>pbkdf2": { "browserify>crypto-browserify>pbkdf2": {
@ -2951,10 +2978,10 @@
}, },
"browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": { "browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>vm-browserify": true, "browserify>vm-browserify": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3315,6 +3342,7 @@
"packages": { "packages": {
"@ethereumjs/common>crc-32": true, "@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true, "@ethersproject/abi": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
@ -3331,7 +3359,6 @@
"ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>aes-js": true,
"ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>bs58check": true,
"ganache>secp256k1>elliptic": true,
"lodash": true "lodash": true
} }
}, },
@ -3455,7 +3482,7 @@
}, },
"eth-lattice-keyring>gridplus-sdk>secp256k1": { "eth-lattice-keyring>gridplus-sdk>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"eth-lattice-keyring>gridplus-sdk>uuid": { "eth-lattice-keyring>gridplus-sdk>uuid": {
@ -3496,6 +3523,7 @@
}, },
"eth-sig-util>ethereumjs-util": { "eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -3503,8 +3531,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"eth-sig-util>ethereumjs-util>ethjs-util": { "eth-sig-util>ethereumjs-util>ethjs-util": {
@ -3542,14 +3569,14 @@
}, },
"ethereumjs-abi>ethereumjs-util": { "ethereumjs-abi>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-util": { "ethereumjs-util": {
@ -3642,7 +3669,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>hash.js": { "ethereumjs-util>ethereum-cryptography>hash.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3674,7 +3701,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>secp256k1": { "ethereumjs-util>ethereum-cryptography>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"ethereumjs-util>rlp": { "ethereumjs-util>rlp": {
@ -3720,14 +3747,14 @@
}, },
"ethereumjs-wallet>ethereumjs-util": { "ethereumjs-wallet>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-wallet>randombytes": { "ethereumjs-wallet>randombytes": {
@ -3926,33 +3953,6 @@
"define": true "define": true
} }
}, },
"ganache>secp256k1>elliptic": {
"packages": {
"bn.js": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>brorand": true,
"ganache>secp256k1>elliptic>hmac-drbg": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true,
"pumpify>inherits": true
}
},
"ganache>secp256k1>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ganache>secp256k1>elliptic>hmac-drbg": {
"packages": {
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true
}
},
"globalthis>define-properties": { "globalthis>define-properties": {
"packages": { "packages": {
"globalthis>define-properties>has-property-descriptors": true, "globalthis>define-properties>has-property-descriptors": true,

View File

@ -380,7 +380,7 @@
"@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true, "@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/abi>@ethersproject/properties": true,
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"@ethersproject/hdnode>@ethersproject/transactions": { "@ethersproject/hdnode>@ethersproject/transactions": {
@ -1159,6 +1159,7 @@
}, },
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -1166,8 +1167,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-ledger-bridge-keyring>hdkey": { "@metamask/eth-ledger-bridge-keyring>hdkey": {
@ -1182,11 +1182,11 @@
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-snap-keyring": { "@metamask/eth-snap-keyring": {
@ -1550,11 +1550,11 @@
"@metamask/eth-trezor-keyring>hdkey>secp256k1": { "@metamask/eth-trezor-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": { "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": {
@ -2006,6 +2006,33 @@
"@metamask/post-message-stream>readable-stream>safe-buffer": true "@metamask/post-message-stream>readable-stream>safe-buffer": true
} }
}, },
"@metamask/ppom-validator>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,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"pumpify>inherits": true
}
},
"@metamask/ppom-validator>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/ppom-validator>elliptic>hmac-drbg": {
"packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true
}
},
"@metamask/providers>@metamask/object-multiplex": { "@metamask/providers>@metamask/object-multiplex": {
"globals": { "globals": {
"console.warn": true "console.warn": true
@ -3388,7 +3415,7 @@
}, },
"browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3400,6 +3427,7 @@
}, },
"browserify>crypto-browserify>browserify-sign": { "browserify>crypto-browserify>browserify-sign": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true, "browserify>crypto-browserify>create-hmac": true,
@ -3407,15 +3435,14 @@
"browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>crypto-browserify>public-encrypt>parse-asn1": true,
"browserify>stream-browserify": true, "browserify>stream-browserify": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ganache>secp256k1>elliptic": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
"browserify>crypto-browserify>create-ecdh": { "browserify>crypto-browserify>create-ecdh": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"browserify>crypto-browserify>create-hmac": { "browserify>crypto-browserify>create-hmac": {
@ -3438,8 +3465,8 @@
}, },
"browserify>crypto-browserify>diffie-hellman>miller-rabin": { "browserify>crypto-browserify>diffie-hellman>miller-rabin": {
"packages": { "packages": {
"bn.js": true, "@metamask/ppom-validator>elliptic>brorand": true,
"ganache>secp256k1>elliptic>brorand": true "bn.js": true
} }
}, },
"browserify>crypto-browserify>pbkdf2": { "browserify>crypto-browserify>pbkdf2": {
@ -3486,10 +3513,10 @@
}, },
"browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": { "browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>vm-browserify": true, "browserify>vm-browserify": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3866,6 +3893,7 @@
"packages": { "packages": {
"@ethereumjs/common>crc-32": true, "@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true, "@ethersproject/abi": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
@ -3882,7 +3910,6 @@
"ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>aes-js": true,
"ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>bs58check": true,
"ganache>secp256k1>elliptic": true,
"lodash": true "lodash": true
} }
}, },
@ -4006,7 +4033,7 @@
}, },
"eth-lattice-keyring>gridplus-sdk>secp256k1": { "eth-lattice-keyring>gridplus-sdk>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"eth-lattice-keyring>gridplus-sdk>uuid": { "eth-lattice-keyring>gridplus-sdk>uuid": {
@ -4047,6 +4074,7 @@
}, },
"eth-sig-util>ethereumjs-util": { "eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -4054,8 +4082,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"eth-sig-util>ethereumjs-util>ethjs-util": { "eth-sig-util>ethereumjs-util>ethjs-util": {
@ -4093,14 +4120,14 @@
}, },
"ethereumjs-abi>ethereumjs-util": { "ethereumjs-abi>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-util": { "ethereumjs-util": {
@ -4193,7 +4220,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>hash.js": { "ethereumjs-util>ethereum-cryptography>hash.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -4225,7 +4252,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>secp256k1": { "ethereumjs-util>ethereum-cryptography>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"ethereumjs-util>rlp": { "ethereumjs-util>rlp": {
@ -4271,14 +4298,14 @@
}, },
"ethereumjs-wallet>ethereumjs-util": { "ethereumjs-wallet>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-wallet>randombytes": { "ethereumjs-wallet>randombytes": {
@ -4477,33 +4504,6 @@
"define": true "define": true
} }
}, },
"ganache>secp256k1>elliptic": {
"packages": {
"bn.js": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>brorand": true,
"ganache>secp256k1>elliptic>hmac-drbg": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true,
"pumpify>inherits": true
}
},
"ganache>secp256k1>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ganache>secp256k1>elliptic>hmac-drbg": {
"packages": {
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true
}
},
"globalthis>define-properties": { "globalthis>define-properties": {
"packages": { "packages": {
"globalthis>define-properties>has-property-descriptors": true, "globalthis>define-properties>has-property-descriptors": true,

View File

@ -380,7 +380,7 @@
"@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true, "@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/abi>@ethersproject/properties": true,
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"@ethersproject/hdnode>@ethersproject/transactions": { "@ethersproject/hdnode>@ethersproject/transactions": {
@ -1159,6 +1159,7 @@
}, },
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -1166,8 +1167,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-ledger-bridge-keyring>hdkey": { "@metamask/eth-ledger-bridge-keyring>hdkey": {
@ -1182,11 +1182,11 @@
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-snap-keyring": { "@metamask/eth-snap-keyring": {
@ -1550,11 +1550,11 @@
"@metamask/eth-trezor-keyring>hdkey>secp256k1": { "@metamask/eth-trezor-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": { "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": {
@ -2006,6 +2006,48 @@
"@metamask/post-message-stream>readable-stream>safe-buffer": true "@metamask/post-message-stream>readable-stream>safe-buffer": true
} }
}, },
"@metamask/ppom-validator": {
"globals": {
"clearInterval": true,
"console.error": true,
"setInterval": true
},
"packages": {
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/ppom-validator>elliptic": true,
"await-semaphore": true,
"browserify>buffer": true,
"eth-query>json-rpc-random-id": true
}
},
"@metamask/ppom-validator>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,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"pumpify>inherits": true
}
},
"@metamask/ppom-validator>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/ppom-validator>elliptic>hmac-drbg": {
"packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true
}
},
"@metamask/providers>@metamask/object-multiplex": { "@metamask/providers>@metamask/object-multiplex": {
"globals": { "globals": {
"console.warn": true "console.warn": true
@ -3388,7 +3430,7 @@
}, },
"browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3400,6 +3442,7 @@
}, },
"browserify>crypto-browserify>browserify-sign": { "browserify>crypto-browserify>browserify-sign": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true, "browserify>crypto-browserify>create-hmac": true,
@ -3407,15 +3450,14 @@
"browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>crypto-browserify>public-encrypt>parse-asn1": true,
"browserify>stream-browserify": true, "browserify>stream-browserify": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ganache>secp256k1>elliptic": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
"browserify>crypto-browserify>create-ecdh": { "browserify>crypto-browserify>create-ecdh": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"browserify>crypto-browserify>create-hmac": { "browserify>crypto-browserify>create-hmac": {
@ -3438,8 +3480,8 @@
}, },
"browserify>crypto-browserify>diffie-hellman>miller-rabin": { "browserify>crypto-browserify>diffie-hellman>miller-rabin": {
"packages": { "packages": {
"bn.js": true, "@metamask/ppom-validator>elliptic>brorand": true,
"ganache>secp256k1>elliptic>brorand": true "bn.js": true
} }
}, },
"browserify>crypto-browserify>pbkdf2": { "browserify>crypto-browserify>pbkdf2": {
@ -3486,10 +3528,10 @@
}, },
"browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": { "browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>vm-browserify": true, "browserify>vm-browserify": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3866,6 +3908,7 @@
"packages": { "packages": {
"@ethereumjs/common>crc-32": true, "@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true, "@ethersproject/abi": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
@ -3882,7 +3925,6 @@
"ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>aes-js": true,
"ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>bs58check": true,
"ganache>secp256k1>elliptic": true,
"lodash": true "lodash": true
} }
}, },
@ -4006,7 +4048,7 @@
}, },
"eth-lattice-keyring>gridplus-sdk>secp256k1": { "eth-lattice-keyring>gridplus-sdk>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"eth-lattice-keyring>gridplus-sdk>uuid": { "eth-lattice-keyring>gridplus-sdk>uuid": {
@ -4047,6 +4089,7 @@
}, },
"eth-sig-util>ethereumjs-util": { "eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -4054,8 +4097,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"eth-sig-util>ethereumjs-util>ethjs-util": { "eth-sig-util>ethereumjs-util>ethjs-util": {
@ -4093,14 +4135,14 @@
}, },
"ethereumjs-abi>ethereumjs-util": { "ethereumjs-abi>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-util": { "ethereumjs-util": {
@ -4193,7 +4235,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>hash.js": { "ethereumjs-util>ethereum-cryptography>hash.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -4225,7 +4267,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>secp256k1": { "ethereumjs-util>ethereum-cryptography>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"ethereumjs-util>rlp": { "ethereumjs-util>rlp": {
@ -4271,14 +4313,14 @@
}, },
"ethereumjs-wallet>ethereumjs-util": { "ethereumjs-wallet>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-wallet>randombytes": { "ethereumjs-wallet>randombytes": {
@ -4477,33 +4519,6 @@
"define": true "define": true
} }
}, },
"ganache>secp256k1>elliptic": {
"packages": {
"bn.js": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>brorand": true,
"ganache>secp256k1>elliptic>hmac-drbg": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true,
"pumpify>inherits": true
}
},
"ganache>secp256k1>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ganache>secp256k1>elliptic>hmac-drbg": {
"packages": {
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true
}
},
"globalthis>define-properties": { "globalthis>define-properties": {
"packages": { "packages": {
"globalthis>define-properties>has-property-descriptors": true, "globalthis>define-properties>has-property-descriptors": true,

View File

@ -380,7 +380,7 @@
"@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true, "@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/abi>@ethersproject/properties": true,
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"@ethersproject/hdnode>@ethersproject/transactions": { "@ethersproject/hdnode>@ethersproject/transactions": {
@ -1088,6 +1088,7 @@
}, },
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -1095,8 +1096,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-ledger-bridge-keyring>hdkey": { "@metamask/eth-ledger-bridge-keyring>hdkey": {
@ -1111,11 +1111,11 @@
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
@ -1422,11 +1422,11 @@
"@metamask/eth-trezor-keyring>hdkey>secp256k1": { "@metamask/eth-trezor-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": { "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": {
@ -1802,6 +1802,33 @@
"eslint>optionator>fast-levenshtein": true "eslint>optionator>fast-levenshtein": true
} }
}, },
"@metamask/ppom-validator>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,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"pumpify>inherits": true
}
},
"@metamask/ppom-validator>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/ppom-validator>elliptic>hmac-drbg": {
"packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true
}
},
"@metamask/rpc-methods": { "@metamask/rpc-methods": {
"packages": { "packages": {
"@metamask/browser-passworder": true, "@metamask/browser-passworder": true,
@ -2853,7 +2880,7 @@
}, },
"browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -2865,6 +2892,7 @@
}, },
"browserify>crypto-browserify>browserify-sign": { "browserify>crypto-browserify>browserify-sign": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true, "browserify>crypto-browserify>create-hmac": true,
@ -2872,15 +2900,14 @@
"browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>crypto-browserify>public-encrypt>parse-asn1": true,
"browserify>stream-browserify": true, "browserify>stream-browserify": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ganache>secp256k1>elliptic": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
"browserify>crypto-browserify>create-ecdh": { "browserify>crypto-browserify>create-ecdh": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"browserify>crypto-browserify>create-hmac": { "browserify>crypto-browserify>create-hmac": {
@ -2903,8 +2930,8 @@
}, },
"browserify>crypto-browserify>diffie-hellman>miller-rabin": { "browserify>crypto-browserify>diffie-hellman>miller-rabin": {
"packages": { "packages": {
"bn.js": true, "@metamask/ppom-validator>elliptic>brorand": true,
"ganache>secp256k1>elliptic>brorand": true "bn.js": true
} }
}, },
"browserify>crypto-browserify>pbkdf2": { "browserify>crypto-browserify>pbkdf2": {
@ -2951,10 +2978,10 @@
}, },
"browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": { "browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>vm-browserify": true, "browserify>vm-browserify": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3315,6 +3342,7 @@
"packages": { "packages": {
"@ethereumjs/common>crc-32": true, "@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true, "@ethersproject/abi": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
@ -3331,7 +3359,6 @@
"ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>aes-js": true,
"ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>bs58check": true,
"ganache>secp256k1>elliptic": true,
"lodash": true "lodash": true
} }
}, },
@ -3455,7 +3482,7 @@
}, },
"eth-lattice-keyring>gridplus-sdk>secp256k1": { "eth-lattice-keyring>gridplus-sdk>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"eth-lattice-keyring>gridplus-sdk>uuid": { "eth-lattice-keyring>gridplus-sdk>uuid": {
@ -3496,6 +3523,7 @@
}, },
"eth-sig-util>ethereumjs-util": { "eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -3503,8 +3531,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"eth-sig-util>ethereumjs-util>ethjs-util": { "eth-sig-util>ethereumjs-util>ethjs-util": {
@ -3542,14 +3569,14 @@
}, },
"ethereumjs-abi>ethereumjs-util": { "ethereumjs-abi>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-util": { "ethereumjs-util": {
@ -3642,7 +3669,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>hash.js": { "ethereumjs-util>ethereum-cryptography>hash.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3674,7 +3701,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>secp256k1": { "ethereumjs-util>ethereum-cryptography>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"ethereumjs-util>rlp": { "ethereumjs-util>rlp": {
@ -3720,14 +3747,14 @@
}, },
"ethereumjs-wallet>ethereumjs-util": { "ethereumjs-wallet>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-wallet>randombytes": { "ethereumjs-wallet>randombytes": {
@ -3926,33 +3953,6 @@
"define": true "define": true
} }
}, },
"ganache>secp256k1>elliptic": {
"packages": {
"bn.js": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>brorand": true,
"ganache>secp256k1>elliptic>hmac-drbg": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true,
"pumpify>inherits": true
}
},
"ganache>secp256k1>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ganache>secp256k1>elliptic>hmac-drbg": {
"packages": {
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true
}
},
"globalthis>define-properties": { "globalthis>define-properties": {
"packages": { "packages": {
"globalthis>define-properties>has-property-descriptors": true, "globalthis>define-properties>has-property-descriptors": true,

View File

@ -380,7 +380,7 @@
"@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/abi>@ethersproject/bytes": true,
"@ethersproject/abi>@ethersproject/logger": true, "@ethersproject/abi>@ethersproject/logger": true,
"@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/abi>@ethersproject/properties": true,
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"@ethersproject/hdnode>@ethersproject/transactions": { "@ethersproject/hdnode>@ethersproject/transactions": {
@ -1316,6 +1316,7 @@
}, },
"@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": { "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -1323,8 +1324,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-ledger-bridge-keyring>hdkey": { "@metamask/eth-ledger-bridge-keyring>hdkey": {
@ -1339,11 +1339,11 @@
"@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": { "@metamask/eth-ledger-bridge-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "@metamask/eth-snap-keyring>@metamask/eth-sig-util": {
@ -1650,11 +1650,11 @@
"@metamask/eth-trezor-keyring>hdkey>secp256k1": { "@metamask/eth-trezor-keyring>hdkey>secp256k1": {
"packages": { "packages": {
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true, "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>insert-module-globals>is-buffer": true, "browserify>insert-module-globals>is-buffer": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": { "@metamask/eth-trezor-keyring>hdkey>secp256k1>bip66": {
@ -2030,6 +2030,33 @@
"eslint>optionator>fast-levenshtein": true "eslint>optionator>fast-levenshtein": true
} }
}, },
"@metamask/ppom-validator>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,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"pumpify>inherits": true
}
},
"@metamask/ppom-validator>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"@metamask/ppom-validator>elliptic>hmac-drbg": {
"packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"@metamask/ppom-validator>elliptic>minimalistic-crypto-utils": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true
}
},
"@metamask/rpc-methods": { "@metamask/rpc-methods": {
"packages": { "packages": {
"@metamask/browser-passworder": true, "@metamask/browser-passworder": true,
@ -3081,7 +3108,7 @@
}, },
"browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3093,6 +3120,7 @@
}, },
"browserify>crypto-browserify>browserify-sign": { "browserify>crypto-browserify>browserify-sign": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>crypto-browserify>create-hmac": true, "browserify>crypto-browserify>create-hmac": true,
@ -3100,15 +3128,14 @@
"browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>crypto-browserify>public-encrypt>parse-asn1": true,
"browserify>stream-browserify": true, "browserify>stream-browserify": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ganache>secp256k1>elliptic": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
"browserify>crypto-browserify>create-ecdh": { "browserify>crypto-browserify>create-ecdh": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"browserify>crypto-browserify>create-hmac": { "browserify>crypto-browserify>create-hmac": {
@ -3131,8 +3158,8 @@
}, },
"browserify>crypto-browserify>diffie-hellman>miller-rabin": { "browserify>crypto-browserify>diffie-hellman>miller-rabin": {
"packages": { "packages": {
"bn.js": true, "@metamask/ppom-validator>elliptic>brorand": true,
"ganache>secp256k1>elliptic>brorand": true "bn.js": true
} }
}, },
"browserify>crypto-browserify>pbkdf2": { "browserify>crypto-browserify>pbkdf2": {
@ -3179,10 +3206,10 @@
}, },
"browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": { "browserify>crypto-browserify>public-encrypt>parse-asn1>asn1.js": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>vm-browserify": true, "browserify>vm-browserify": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3543,6 +3570,7 @@
"packages": { "packages": {
"@ethereumjs/common>crc-32": true, "@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true, "@ethersproject/abi": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
@ -3559,7 +3587,6 @@
"ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-util>ethereum-cryptography>hash.js": true,
"ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>aes-js": true,
"ethereumjs-wallet>bs58check": true, "ethereumjs-wallet>bs58check": true,
"ganache>secp256k1>elliptic": true,
"lodash": true "lodash": true
} }
}, },
@ -3683,7 +3710,7 @@
}, },
"eth-lattice-keyring>gridplus-sdk>secp256k1": { "eth-lattice-keyring>gridplus-sdk>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"eth-lattice-keyring>gridplus-sdk>uuid": { "eth-lattice-keyring>gridplus-sdk>uuid": {
@ -3724,6 +3751,7 @@
}, },
"eth-sig-util>ethereumjs-util": { "eth-sig-util>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
@ -3731,8 +3759,7 @@
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true,
"ethereumjs-wallet>safe-buffer": true, "ethereumjs-wallet>safe-buffer": true
"ganache>secp256k1>elliptic": true
} }
}, },
"eth-sig-util>ethereumjs-util>ethjs-util": { "eth-sig-util>ethereumjs-util>ethjs-util": {
@ -3770,14 +3797,14 @@
}, },
"ethereumjs-abi>ethereumjs-util": { "ethereumjs-abi>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-util": { "ethereumjs-util": {
@ -3870,7 +3897,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>hash.js": { "ethereumjs-util>ethereum-cryptography>hash.js": {
"packages": { "packages": {
"ganache>secp256k1>elliptic>minimalistic-assert": true, "@metamask/ppom-validator>elliptic>minimalistic-assert": true,
"pumpify>inherits": true "pumpify>inherits": true
} }
}, },
@ -3902,7 +3929,7 @@
}, },
"ethereumjs-util>ethereum-cryptography>secp256k1": { "ethereumjs-util>ethereum-cryptography>secp256k1": {
"packages": { "packages": {
"ganache>secp256k1>elliptic": true "@metamask/ppom-validator>elliptic": true
} }
}, },
"ethereumjs-util>rlp": { "ethereumjs-util>rlp": {
@ -3948,14 +3975,14 @@
}, },
"ethereumjs-wallet>ethereumjs-util": { "ethereumjs-wallet>ethereumjs-util": {
"packages": { "packages": {
"@metamask/ppom-validator>elliptic": true,
"bn.js": true, "bn.js": true,
"browserify>assert": true, "browserify>assert": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-sig-util>ethereumjs-util>ethjs-util": true, "eth-sig-util>ethereumjs-util>ethjs-util": true,
"ethereumjs-util>create-hash": true, "ethereumjs-util>create-hash": true,
"ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>ethereum-cryptography": true,
"ethereumjs-util>rlp": true, "ethereumjs-util>rlp": true
"ganache>secp256k1>elliptic": true
} }
}, },
"ethereumjs-wallet>randombytes": { "ethereumjs-wallet>randombytes": {
@ -4154,33 +4181,6 @@
"define": true "define": true
} }
}, },
"ganache>secp256k1>elliptic": {
"packages": {
"bn.js": true,
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>brorand": true,
"ganache>secp256k1>elliptic>hmac-drbg": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true,
"pumpify>inherits": true
}
},
"ganache>secp256k1>elliptic>brorand": {
"globals": {
"crypto": true,
"msCrypto": true
},
"packages": {
"browserify>browser-resolve": true
}
},
"ganache>secp256k1>elliptic>hmac-drbg": {
"packages": {
"ethereumjs-util>ethereum-cryptography>hash.js": true,
"ganache>secp256k1>elliptic>minimalistic-assert": true,
"ganache>secp256k1>elliptic>minimalistic-crypto-utils": true
}
},
"globalthis>define-properties": { "globalthis>define-properties": {
"packages": { "packages": {
"globalthis>define-properties>has-property-descriptors": true, "globalthis>define-properties>has-property-descriptors": true,

View File

@ -1,6 +1,6 @@
{ {
"name": "metamask-crx", "name": "metamask-crx",
"version": "10.34.2", "version": "10.34.4",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -205,7 +205,7 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.9", "@babel/runtime": "^7.18.9",
"@blockaid/ppom": "^0.1.2", "@blockaid/ppom": "^1.0.2",
"@download/blockies": "^1.0.3", "@download/blockies": "^1.0.3",
"@ensdomains/content-hash": "^2.5.6", "@ensdomains/content-hash": "^2.5.6",
"@ethereumjs/common": "^3.1.1", "@ethereumjs/common": "^3.1.1",
@ -250,7 +250,7 @@
"@metamask/key-tree": "^9.0.0", "@metamask/key-tree": "^9.0.0",
"@metamask/keyring-controller": "^7.0.0", "@metamask/keyring-controller": "^7.0.0",
"@metamask/logo": "^3.1.1", "@metamask/logo": "^3.1.1",
"@metamask/message-manager": "^7.0.2", "@metamask/message-manager": "^7.3.0",
"@metamask/metamask-eth-abis": "^3.0.0", "@metamask/metamask-eth-abis": "^3.0.0",
"@metamask/network-controller": "^12.0.0", "@metamask/network-controller": "^12.0.0",
"@metamask/notification-controller": "^3.0.0", "@metamask/notification-controller": "^3.0.0",
@ -258,21 +258,21 @@
"@metamask/permission-controller": "^4.0.0", "@metamask/permission-controller": "^4.0.0",
"@metamask/phishing-controller": "^6.0.0", "@metamask/phishing-controller": "^6.0.0",
"@metamask/post-message-stream": "^6.0.0", "@metamask/post-message-stream": "^6.0.0",
"@metamask/ppom-validator": "^0.1.2", "@metamask/ppom-validator": "^0.2.0",
"@metamask/providers": "^11.1.0", "@metamask/providers": "^11.1.0",
"@metamask/rate-limit-controller": "^3.0.0", "@metamask/rate-limit-controller": "^3.0.0",
"@metamask/rpc-methods": "^1.0.0-prerelease.1", "@metamask/rpc-methods": "^1.0.0",
"@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.37.2-flask.1", "@metamask/rpc-methods-flask": "npm:@metamask/rpc-methods@0.37.2-flask.1",
"@metamask/safe-event-emitter": "^2.0.0", "@metamask/safe-event-emitter": "^2.0.0",
"@metamask/scure-bip39": "^2.0.3", "@metamask/scure-bip39": "^2.0.3",
"@metamask/signature-controller": "^5.3.0", "@metamask/signature-controller": "^5.3.0",
"@metamask/slip44": "^3.0.0", "@metamask/slip44": "^3.0.0",
"@metamask/smart-transactions-controller": "^4.0.0", "@metamask/smart-transactions-controller": "^4.0.0",
"@metamask/snaps-controllers": "^1.0.0-prerelease.1", "@metamask/snaps-controllers": "^1.0.0",
"@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.38.0-flask.1", "@metamask/snaps-controllers-flask": "npm:@metamask/snaps-controllers@0.38.0-flask.1",
"@metamask/snaps-ui": "^1.0.0-prerelease.1", "@metamask/snaps-ui": "^1.0.0",
"@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.3-flask.1", "@metamask/snaps-ui-flask": "npm:@metamask/snaps-ui@0.37.3-flask.1",
"@metamask/snaps-utils": "^1.0.0-prerelease.1", "@metamask/snaps-utils": "^1.0.0",
"@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.0-flask.1", "@metamask/snaps-utils-flask": "npm:@metamask/snaps-utils@0.38.0-flask.1",
"@metamask/subject-metadata-controller": "^2.0.0", "@metamask/subject-metadata-controller": "^2.0.0",
"@metamask/utils": "^5.0.0", "@metamask/utils": "^5.0.0",
@ -358,7 +358,7 @@
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"remove-trailing-slash": "^0.1.1", "remove-trailing-slash": "^0.1.1",
"reselect": "^3.0.1", "reselect": "^3.0.1",
"ses": "^0.18.4", "ses": "^0.18.7",
"single-call-balance-checker-abi": "^1.0.0", "single-call-balance-checker-abi": "^1.0.0",
"unicode-confusables": "^0.1.1", "unicode-confusables": "^0.1.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",

View File

@ -138,6 +138,8 @@ export const CHAIN_IDS = {
BSC_TESTNET: '0x61', BSC_TESTNET: '0x61',
OPTIMISM: '0xa', OPTIMISM: '0xa',
OPTIMISM_TESTNET: '0x1a4', OPTIMISM_TESTNET: '0x1a4',
BASE: '0x2105',
BASE_TESTNET: '0x14a33',
POLYGON: '0x89', POLYGON: '0x89',
POLYGON_TESTNET: '0x13881', POLYGON_TESTNET: '0x13881',
AVALANCHE: '0xa86a', AVALANCHE: '0xa86a',
@ -553,6 +555,8 @@ export const BUYABLE_CHAINS_MAP: {
ChainId, ChainId,
| typeof CHAIN_IDS.LOCALHOST | typeof CHAIN_IDS.LOCALHOST
| typeof CHAIN_IDS.OPTIMISM_TESTNET | typeof CHAIN_IDS.OPTIMISM_TESTNET
| typeof CHAIN_IDS.BASE_TESTNET
| typeof CHAIN_IDS.BASE
| typeof CHAIN_IDS.BSC_TESTNET | typeof CHAIN_IDS.BSC_TESTNET
| typeof CHAIN_IDS.POLYGON_TESTNET | typeof CHAIN_IDS.POLYGON_TESTNET
| typeof CHAIN_IDS.AVALANCHE_TESTNET | typeof CHAIN_IDS.AVALANCHE_TESTNET

View File

@ -49,8 +49,8 @@ export enum BlockaidReason {
other = 'other', other = 'other',
// Locally defined // Locally defined
notApplicable = 'NotApplicable',
failed = 'Failed', failed = 'Failed',
notApplicable = 'NotApplicable',
} }
export enum BlockaidResultType { export enum BlockaidResultType {

View File

@ -257,13 +257,18 @@ describe('MetaMask', function () {
}); });
await driver.delay(regularDelayMs); await driver.delay(regularDelayMs);
await driver.fill('#custom-address', tokenAddress); await driver.fill(
'[data-testid="import-tokens-modal-custom-address"]',
tokenAddress,
);
await driver.delay(regularDelayMs); await driver.delay(regularDelayMs);
await driver.clickElement({ text: 'Add custom token', tag: 'button' }); await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.delay(regularDelayMs); await driver.delay(regularDelayMs);
await driver.clickElement({ text: 'Import tokens', tag: 'button' }); await driver.clickElement(
'[data-testid="import-tokens-modal-import-button"]',
);
await driver.delay(regularDelayMs); await driver.delay(regularDelayMs);
}); });

View File

@ -108,13 +108,15 @@ describe('Add existing token using search', function () {
await driver.press('#password', driver.Key.ENTER); await driver.press('#password', driver.Key.ENTER);
await driver.clickElement({ text: 'Import tokens', tag: 'button' }); await driver.clickElement({ text: 'Import tokens', tag: 'button' });
await driver.fill('#search-tokens', 'BAT'); await driver.fill('input[placeholder="Search"]', 'BAT');
await driver.clickElement({ await driver.clickElement({
text: 'BAT', text: 'BAT',
tag: 'span', tag: 'span',
}); });
await driver.clickElement({ text: 'Next', tag: 'button' }); await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.clickElement({ text: 'Import tokens', tag: 'button' }); await driver.clickElement(
'[data-testid="import-tokens-modal-import-button"]',
);
await driver.waitForSelector({ await driver.waitForSelector({
css: '.token-overview__primary-balance', css: '.token-overview__primary-balance',

View File

@ -51,20 +51,24 @@ describe('Create token, approve token and approve token without gas', function (
text: 'Custom token', text: 'Custom token',
tag: 'button', tag: 'button',
}); });
await driver.fill('#custom-address', contractAddress); await driver.fill(
await driver.waitForSelector('#custom-decimals'); '[data-testid="import-tokens-modal-custom-address"]',
contractAddress,
);
await driver.waitForSelector(
'[data-testid="import-tokens-modal-custom-decimals"]',
);
await driver.delay(2000); await driver.delay(2000);
await driver.clickElement({ await driver.clickElement({
text: 'Add custom token', text: 'Next',
tag: 'button', tag: 'button',
}); });
await driver.delay(2000); await driver.delay(2000);
await driver.clickElement({ await driver.clickElement(
text: 'Import tokens', '[data-testid="import-tokens-modal-import-button"]',
tag: 'button', );
});
// renders balance for newly created token // renders balance for newly created token
await driver.clickElement('.app-header__logo-container'); await driver.clickElement('.app-header__logo-container');

View File

@ -37,14 +37,20 @@ describe('Import flow', function () {
await driver.delay(regularDelayMs); await driver.delay(regularDelayMs);
await driver.clickElement('[data-testid="import-token-button"]'); await driver.clickElement('[data-testid="import-token-button"]');
await driver.fill('input[placeholder="Search tokens"]', 'cha'); await driver.fill('input[placeholder="Search"]', 'cha');
await driver.clickElement('.token-list__token'); await driver.clickElement('.token-list__token');
await driver.clickElement('.token-list__token:nth-of-type(2)'); await driver.clickElement('.token-list__token:nth-of-type(2)');
await driver.clickElement('.token-list__token:nth-of-type(3)'); await driver.clickElement('.token-list__token:nth-of-type(3)');
await driver.clickElement({ css: 'button', text: 'Next' }); await driver.clickElement({
await driver.clickElement({ css: 'button', text: 'Import' }); css: '.import-tokens-modal button',
text: 'Next',
});
await driver.clickElement({
css: '.import-tokens-modal button',
text: 'Import',
});
await driver.clickElement('.asset-breadcrumb'); await driver.clickElement('.asset-breadcrumb');

View File

@ -30,11 +30,19 @@ describe('Token Details', function () {
const tokenAddress = '0x2EFA2Cb29C2341d8E5Ba7D3262C9e9d6f1Bf3711'; const tokenAddress = '0x2EFA2Cb29C2341d8E5Ba7D3262C9e9d6f1Bf3711';
const tokenSymbol = 'AAVE'; const tokenSymbol = 'AAVE';
await driver.fill('#custom-address', tokenAddress); await driver.fill(
await driver.waitForSelector('#custom-symbol-helper-text'); '[data-testid="import-tokens-modal-custom-address"]',
await driver.fill('#custom-symbol', tokenSymbol); tokenAddress,
await driver.clickElement({ text: 'Add custom token', tag: 'button' }); );
await driver.clickElement({ text: 'Import tokens', tag: 'button' }); await driver.waitForSelector('p.mm-box--color-error-default');
await driver.fill(
'[data-testid="import-tokens-modal-custom-symbol"]',
tokenSymbol,
);
await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.clickElement(
'[data-testid="import-tokens-modal-import-button"]',
);
await driver.clickElement('[aria-label="Asset options"]'); await driver.clickElement('[aria-label="Asset options"]');
await driver.clickElement({ text: 'Token details', tag: 'div' }); await driver.clickElement({ text: 'Token details', tag: 'div' });

View File

@ -11,6 +11,7 @@
@import 'confirm-data/index'; @import 'confirm-data/index';
@import 'confirmation-warning-modal/index'; @import 'confirmation-warning-modal/index';
@import 'custom-nonce/index'; @import 'custom-nonce/index';
@import 'import-token/index';
@import 'nfts-items/index'; @import 'nfts-items/index';
@import 'nfts-tab/index'; @import 'nfts-tab/index';
@import 'nft-details/index'; @import 'nft-details/index';

View File

@ -0,0 +1 @@
@import 'token-list/index';

View File

@ -1,5 +1,3 @@
@import 'token-list-placeholder/index';
.token-list { .token-list {
&__title { &__title {
@include H7; @include H7;

View File

@ -0,0 +1,35 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ZENDESK_URLS from '../../../../../helpers/constants/zendesk-url';
import { ButtonLink, Text, Box } from '../../../../component-library';
import {
Display,
FlexDirection,
TextAlign,
TextColor,
AlignItems,
} from '../../../../../helpers/constants/design-system';
export default class TokenListPlaceholder extends Component {
static contextTypes = {
t: PropTypes.func,
};
render() {
return (
<Box
display={Display.Flex}
alignItems={AlignItems.center}
flexDirection={FlexDirection.Column}
textAlign={TextAlign.Center}
>
<Text color={TextColor.textAlternative}>
{this.context.t('addAcquiredTokens')}
</Text>
<ButtonLink href={ZENDESK_URLS.ADD_CUSTOM_TOKENS} externalLink>
{this.context.t('learnMoreUpperCase')}
</ButtonLink>
</Box>
);
}
}

View File

@ -2,7 +2,7 @@ import React from 'react';
import TokenListPlaceholder from './token-list-placeholder.component'; import TokenListPlaceholder from './token-list-placeholder.component';
export default { export default {
title: 'Pages/ImportToken/TokenList/TokenListPlaceholder', title: 'Components/App/TokenList/TokenListPlaceholder',
}; };
export const DefaultStory = () => { export const DefaultStory = () => {

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classnames from 'classnames'; import classnames from 'classnames';
import { checkExistingAddresses } from '../../../helpers/utils/util'; import { checkExistingAddresses } from '../../../../helpers/utils/util';
import TokenListPlaceholder from './token-list-placeholder'; import TokenListPlaceholder from './token-list-placeholder';
export default class TokenList extends Component { export default class TokenList extends Component {

View File

@ -1,10 +1,9 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Fuse from 'fuse.js'; import Fuse from 'fuse.js';
import InputAdornment from '@material-ui/core/InputAdornment'; import { isEqualCaseInsensitive } from '../../../../../shared/modules/string-utils';
import TextField from '../../../components/ui/text-field'; import { TextFieldSearch } from '../../../component-library';
import { isEqualCaseInsensitive } from '../../../../shared/modules/string-utils'; import { BlockSize } from '../../../../helpers/constants/design-system';
import SearchIcon from '../../../components/ui/icon/search-icon';
export default class TokenSearch extends Component { export default class TokenSearch extends Component {
static contextTypes = { static contextTypes = {
@ -57,30 +56,19 @@ export default class TokenSearch extends Component {
this.props.onSearch({ searchQuery, results }); this.props.onSearch({ searchQuery, results });
} }
renderAdornment() {
return (
<InputAdornment position="start" style={{ marginRight: '12px' }}>
<SearchIcon color="var(--color-icon-muted)" />
</InputAdornment>
);
}
render() { render() {
const { error } = this.props; const { error } = this.props;
const { searchQuery } = this.state; const { searchQuery } = this.state;
return ( return (
<TextField <TextFieldSearch
id="search-tokens" placeholder={this.context.t('search')}
placeholder={this.context.t('searchTokens')}
type="text"
value={searchQuery} value={searchQuery}
onChange={(e) => this.handleSearch(e.target.value)} onChange={(e) => this.handleSearch(e.target.value)}
error={error} error={error}
fullWidth
autoFocus autoFocus
autoComplete="off" autoComplete={false}
startAdornment={this.renderAdornment()} width={BlockSize.Full}
/> />
); );
} }

View File

@ -1,9 +1,9 @@
import React from 'react'; import React from 'react';
import testData from '../../../../.storybook/test-data'; import testData from '../../../../../.storybook/test-data';
import TokenSearch from './token-search.component'; import TokenSearch from './token-search.component';
export default { export default {
title: 'Pages/ImportToken/TokenSearch', title: 'Components/App/ImportToken/TokenSearch',
argTypes: { argTypes: {
error: { error: {

View File

@ -9,6 +9,7 @@ import {
ButtonLink, ButtonLink,
ButtonPrimary, ButtonPrimary,
ButtonSecondary, ButtonSecondary,
ButtonSecondarySize,
FormTextField, FormTextField,
Icon, Icon,
IconName, IconName,
@ -152,7 +153,11 @@ const EthSignModal = ({ hideModal }) => {
gap={4} gap={4}
marginTop={6} marginTop={6}
> >
<ButtonSecondary onClick={() => hideModal()} size={Size.LG} block> <ButtonSecondary
onClick={() => hideModal()}
size={ButtonSecondarySize.Lg}
block
>
{t('cancel')} {t('cancel')}
</ButtonSecondary> </ButtonSecondary>
{showTextField ? ( {showTextField ? (

View File

@ -2,6 +2,10 @@
&__collection { &__collection {
margin-bottom: 24px; margin-bottom: 24px;
&:last-child {
margin-bottom: 0;
}
&-accordion-title { &-accordion-title {
cursor: pointer; cursor: pointer;
} }

View File

@ -59,7 +59,7 @@ exports[`Security Provider Banner Alert should match snapshot 1`] = `
</details> </details>
</div> </div>
<p <p
class="mm-box mm-text mm-text--body-sm mm-box--margin-top-2 mm-box--align-items-center mm-box--color-text-alternative" class="mm-box mm-text mm-text--body-sm mm-box--margin-top-3 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
> >
<span <span
class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default" class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default"

View File

@ -21,7 +21,7 @@ exports[`Blockaid Banner Alert should render 'danger' UI when securityAlertRespo
If you approve this request, a third party known for scams might take all your assets. If you approve this request, a third party known for scams might take all your assets.
</p> </p>
<p <p
class="mm-box mm-text mm-text--body-sm mm-box--margin-top-2 mm-box--align-items-center mm-box--color-text-alternative" class="mm-box mm-text mm-text--body-sm mm-box--margin-top-3 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
> >
<span <span
class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default" class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default"
@ -46,6 +46,30 @@ exports[`Blockaid Banner Alert should render 'danger' UI when securityAlertRespo
</div> </div>
`; `;
exports[`Blockaid Banner Alert should render 'warning' UI when securityAlertResponse.result_type is 'Failed 1`] = `
<div
class="box mm-banner-base mm-banner-alert mm-banner-alert--severity-warning box--margin-4 box--padding-3 box--padding-left-2 box--display-flex box--gap-2 box--flex-direction-row box--background-color-warning-muted box--rounded-sm"
>
<span
class="mm-box mm-icon mm-icon--size-lg mm-box--display-inline-block mm-box--color-warning-default"
style="mask-image: url('./images/icons/warning.svg');"
/>
<div>
<h5
class="mm-box mm-text mm-banner-base__title mm-text--body-lg-medium mm-box--color-text-default"
data-testid="mm-banner-base-title"
>
This is a deceptive request
</h5>
<p
class="mm-box mm-text mm-text--body-md mm-box--margin-top-2 mm-box--color-text-default"
>
If you approve this request, a third party known for scams might take all your assets.
</p>
</div>
</div>
`;
exports[`Blockaid Banner Alert should render 'warning' UI when securityAlertResponse.result_type is 'Warning 1`] = ` exports[`Blockaid Banner Alert should render 'warning' UI when securityAlertResponse.result_type is 'Warning 1`] = `
<div <div
class="box mm-banner-base mm-banner-alert mm-banner-alert--severity-warning box--margin-4 box--padding-3 box--padding-left-2 box--display-flex box--gap-2 box--flex-direction-row box--background-color-warning-muted box--rounded-sm" class="box mm-banner-base mm-banner-alert mm-banner-alert--severity-warning box--margin-4 box--padding-3 box--padding-left-2 box--display-flex box--gap-2 box--flex-direction-row box--background-color-warning-muted box--rounded-sm"
@ -67,7 +91,7 @@ exports[`Blockaid Banner Alert should render 'warning' UI when securityAlertResp
If you approve this request, a third party known for scams might take all your assets. If you approve this request, a third party known for scams might take all your assets.
</p> </p>
<p <p
class="mm-box mm-text mm-text--body-sm mm-box--margin-top-2 mm-box--align-items-center mm-box--color-text-alternative" class="mm-box mm-text mm-text--body-sm mm-box--margin-top-3 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
> >
<span <span
class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default" class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default"
@ -152,7 +176,7 @@ exports[`Blockaid Banner Alert should render details when provided 1`] = `
</details> </details>
</div> </div>
<p <p
class="mm-box mm-text mm-text--body-sm mm-box--margin-top-2 mm-box--align-items-center mm-box--color-text-alternative" class="mm-box mm-text mm-text--body-sm mm-box--margin-top-3 mm-box--display-flex mm-box--align-items-center mm-box--color-text-alternative"
> >
<span <span
class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default" class="mm-box disclosure__summary--icon mm-icon mm-icon--size-sm mm-box--margin-inline-end-1 mm-box--display-inline-block mm-box--color-primary-default"

View File

@ -21,6 +21,8 @@ const REASON_TO_DESCRIPTION_TKEY = Object.freeze({
[BlockaidReason.blurFarming]: 'blockaidDescriptionBlurFarming', [BlockaidReason.blurFarming]: 'blockaidDescriptionBlurFarming',
[BlockaidReason.failed]: 'blockaidDescriptionFailed',
[BlockaidReason.seaportFarming]: 'blockaidDescriptionSeaportFarming', [BlockaidReason.seaportFarming]: 'blockaidDescriptionSeaportFarming',
[BlockaidReason.maliciousDomain]: 'blockaidDescriptionMaliciousDomain', [BlockaidReason.maliciousDomain]: 'blockaidDescriptionMaliciousDomain',
@ -36,8 +38,11 @@ const REASON_TO_DESCRIPTION_TKEY = Object.freeze({
[BlockaidReason.other]: 'blockaidDescriptionMightLoseAssets', [BlockaidReason.other]: 'blockaidDescriptionMightLoseAssets',
}); });
/** List of suspicious reason(s). Other reasons will be deemed as deceptive. */ /** Reason to title translation key mapping. */
const SUSPCIOUS_REASON = [BlockaidReason.rawSignatureFarming]; const REASON_TO_TITLE_TKEY = Object.freeze({
[BlockaidReason.failed]: 'blockaidTitleMayNotBeSafe',
[BlockaidReason.rawSignatureFarming]: 'blockaidTitleSuspicious',
});
function BlockaidBannerAlert({ securityAlertResponse }) { function BlockaidBannerAlert({ securityAlertResponse }) {
const t = useContext(I18nContext); const t = useContext(I18nContext);
@ -48,10 +53,7 @@ function BlockaidBannerAlert({ securityAlertResponse }) {
const { reason, result_type: resultType, features } = securityAlertResponse; const { reason, result_type: resultType, features } = securityAlertResponse;
if ( if (resultType === BlockaidResultType.Benign) {
resultType === BlockaidResultType.Benign ||
resultType === BlockaidResultType.Failed
) {
return null; return null;
} }
@ -69,21 +71,20 @@ function BlockaidBannerAlert({ securityAlertResponse }) {
</Text> </Text>
); );
const isFailedResultType = resultType === BlockaidResultType.Failed;
const severity = const severity =
resultType === BlockaidResultType.Malicious resultType === BlockaidResultType.Malicious
? Severity.Danger ? Severity.Danger
: Severity.Warning; : Severity.Warning;
const title = const title = t(REASON_TO_TITLE_TKEY[reason] || 'blockaidTitleDeceptive');
SUSPCIOUS_REASON.indexOf(reason) > -1
? t('blockaidTitleSuspicious')
: t('blockaidTitleDeceptive');
return ( return (
<SecurityProviderBannerAlert <SecurityProviderBannerAlert
description={description} description={description}
details={details} details={details}
provider={SecurityProvider.Blockaid} provider={isFailedResultType ? null : SecurityProvider.Blockaid}
severity={severity} severity={severity}
title={title} title={title}
/> />

View File

@ -40,7 +40,7 @@ describe('Blockaid Banner Alert', () => {
expect(container.querySelector('.mm-banner-alert')).toBeNull(); expect(container.querySelector('.mm-banner-alert')).toBeNull();
}); });
it(`should not render when securityAlertResponse.result_type is '${BlockaidResultType.Failed}'`, () => { it(`should render '${Severity.Warning}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Failed}`, () => {
const { container } = renderWithLocalization( const { container } = renderWithLocalization(
<BlockaidBannerAlert <BlockaidBannerAlert
securityAlertResponse={{ securityAlertResponse={{
@ -49,8 +49,24 @@ describe('Blockaid Banner Alert', () => {
}} }}
/>, />,
); );
const warningBannerAlert = container.querySelector(
'.mm-banner-alert--severity-warning',
);
expect(container.querySelector('.mm-banner-alert')).toBeNull(); expect(warningBannerAlert).toBeInTheDocument();
expect(warningBannerAlert).toMatchSnapshot();
});
it(`should render '${Severity.Warning}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Warning}`, () => {
const { container } = renderWithLocalization(
<BlockaidBannerAlert securityAlertResponse={mockSecurityAlertResponse} />,
);
const warningBannerAlert = container.querySelector(
'.mm-banner-alert--severity-warning',
);
expect(warningBannerAlert).toBeInTheDocument();
expect(warningBannerAlert).toMatchSnapshot();
}); });
it(`should render '${Severity.Danger}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Malicious}`, () => { it(`should render '${Severity.Danger}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Malicious}`, () => {
@ -70,18 +86,6 @@ describe('Blockaid Banner Alert', () => {
expect(dangerBannerAlert).toMatchSnapshot(); expect(dangerBannerAlert).toMatchSnapshot();
}); });
it(`should render '${Severity.Warning}' UI when securityAlertResponse.result_type is '${BlockaidResultType.Warning}`, () => {
const { container } = renderWithLocalization(
<BlockaidBannerAlert securityAlertResponse={mockSecurityAlertResponse} />,
);
const warningBannerAlert = container.querySelector(
'.mm-banner-alert--severity-warning',
);
expect(warningBannerAlert).toBeInTheDocument();
expect(warningBannerAlert).toMatchSnapshot();
});
it('should render title, "This is a deceptive request"', () => { it('should render title, "This is a deceptive request"', () => {
const { getByText } = renderWithLocalization( const { getByText } = renderWithLocalization(
<BlockaidBannerAlert securityAlertResponse={mockSecurityAlertResponse} />, <BlockaidBannerAlert securityAlertResponse={mockSecurityAlertResponse} />,
@ -90,7 +94,20 @@ describe('Blockaid Banner Alert', () => {
expect(getByText('This is a deceptive request')).toBeInTheDocument(); expect(getByText('This is a deceptive request')).toBeInTheDocument();
}); });
it('should render title, "This is a suspicious request", when the reason is "raw_signature_farming"', () => { it(`should render title, "This is a suspicious request", when the reason is "${BlockaidReason.failed}"`, () => {
const { getByText } = renderWithLocalization(
<BlockaidBannerAlert
securityAlertResponse={{
...mockSecurityAlertResponse,
reason: BlockaidReason.failed,
}}
/>,
);
expect(getByText('Request may not be safe')).toBeInTheDocument();
});
it(`should render title, "This is a suspicious request", when the reason is "${BlockaidReason.rawSignatureFarming}"`, () => {
const { getByText } = renderWithLocalization( const { getByText } = renderWithLocalization(
<BlockaidBannerAlert <BlockaidBannerAlert
securityAlertResponse={{ securityAlertResponse={{
@ -131,6 +148,8 @@ describe('Blockaid Banner Alert', () => {
'If you approve this request, a third party known for scams might take all your assets.', 'If you approve this request, a third party known for scams might take all your assets.',
[BlockaidReason.blurFarming]: [BlockaidReason.blurFarming]:
'If you approve this request, someone can steal your assets listed on Blur.', 'If you approve this request, someone can steal your assets listed on Blur.',
[BlockaidReason.failed]:
'Because of an error, this request was not verified by the security provider. Proceed with caution.',
[BlockaidReason.maliciousDomain]: [BlockaidReason.maliciousDomain]:
"You're interacting with a malicious domain. If you approve this request, you might lose your assets.", "You're interacting with a malicious domain. If you approve this request, you might lose your assets.",
[BlockaidReason.other]: [BlockaidReason.other]:

View File

@ -15,6 +15,7 @@ import { I18nContext } from '../../../contexts/i18n';
import { import {
AlignItems, AlignItems,
Color, Color,
Display,
IconColor, IconColor,
Severity, Severity,
Size, Size,
@ -45,8 +46,10 @@ function SecurityProviderBannerAlert({
</Disclosure> </Disclosure>
)} )}
{provider && (
<Text <Text
marginTop={2} marginTop={3}
display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
color={Color.textAlternative} color={Color.textAlternative}
variant={TextVariant.bodySm} variant={TextVariant.bodySm}
@ -69,6 +72,7 @@ function SecurityProviderBannerAlert({
</ButtonLink>, </ButtonLink>,
])} ])}
</Text> </Text>
)}
</BannerAlert> </BannerAlert>
); );
} }
@ -78,9 +82,6 @@ SecurityProviderBannerAlert.propTypes = {
description: PropTypes.oneOfType([PropTypes.string, PropTypes.element]) description: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
.isRequired, .isRequired,
/** Name of the security provider */
provider: PropTypes.oneOfType(Object.values(SecurityProvider)).isRequired,
/** Severity level */ /** Severity level */
severity: PropTypes.oneOfType([Severity.Danger, Severity.Warning]).isRequired, severity: PropTypes.oneOfType([Severity.Danger, Severity.Warning]).isRequired,
@ -93,6 +94,9 @@ SecurityProviderBannerAlert.propTypes = {
/** Additional details to be displayed under the description */ /** Additional details to be displayed under the description */
details: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), details: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
/** Name of the security provider */
provider: PropTypes.oneOfType(Object.values(SecurityProvider)),
}; };
export default SecurityProviderBannerAlert; export default SecurityProviderBannerAlert;

View File

@ -53,7 +53,10 @@ export default {
control: { control: {
type: 'select', type: 'select',
}, },
options: [Object.values(SecurityProvider)], options: ['none', ...Object.values(SecurityProvider)],
mapping: {
none: null,
},
}, },
severity: { severity: {
control: { control: {

View File

@ -1,41 +0,0 @@
import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import SnapSettingsCard from '.';
# SnapSettingsCard
A card component that displays information and the status of a snap. The `SnapSettingsCard` component is made up of the `Card`, `IconBorder`, `IconWithFallback`, `ToggleButton`, `Chip`, `ColorIndicator` and `Button` components
<Canvas>
<Story id="components-app-flask-snapsettingscard--default-story" />
</Canvas>
## Props
<ArgsTable of={SnapSettingsCard} />
## Usage
The following describes the props and example usage for this component.
### Status
There are 4 statuses the `SnapSettingsCard` can have: `'installing'`,`'running'`,`'stopped'` and `'crashed'`.
<Canvas>
<Story id="components-app-flask-snapsettingscard--status" />
</Canvas>
### isEnabled / onToggle
Use the `isEnabled` and `onToggle` to control the `ToggleButton` component inside of the `SnapSettingsCard`
```jsx
const [isEnabled, setIsEnabled] = React.useState(false);
const handleOnToggle = () => {
setIsEnabled(!isEnabled);
};
return <SnapSettingsCard isEnabled={isEnabled} onToggle={handleOnToggle} />;
```

View File

@ -1,42 +1,46 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Box from '../../../ui/box';
import { import {
Color, Color,
AlignItems, AlignItems,
JustifyContent, JustifyContent,
DISPLAY, Display,
BLOCK_SIZES, BlockSize,
IconColor, IconColor,
TextVariant, TextVariant,
} from '../../../../helpers/constants/design-system'; } from '../../../../helpers/constants/design-system';
import { Icon, IconName, IconSize, Text } from '../../../component-library'; import {
Icon,
IconName,
IconSize,
Text,
Box,
} from '../../../component-library';
import SnapAvatar from '../snap-avatar'; import SnapAvatar from '../snap-avatar';
const SnapSettingsCard = ({ name, packageName, onClick, snapId }) => { const SnapSettingsCard = ({ name, packageName, onClick, snapId }) => {
return ( return (
<Box <Box
className="snap-settings-card" className="snap-settings-card"
display={DISPLAY.FLEX} display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
justifyContent={JustifyContent.spaceBetween} justifyContent={JustifyContent.spaceBetween}
width={BLOCK_SIZES.FULL} width={BlockSize.Full}
padding={[4, 4, 4, 4]} padding={4}
> >
<Box <Box
className="snap-settings-card__inner-wrapper" className="snap-settings-card__inner-wrapper"
display={DISPLAY.FLEX} display={Display.Flex}
alignItems={AlignItems.center} alignItems={AlignItems.center}
justifyContent={JustifyContent.flexStart} justifyContent={JustifyContent.flexStart}
width={BLOCK_SIZES.FULL} width={BlockSize.Full}
onClick={onClick} onClick={onClick}
> >
<Box> <Box>
<SnapAvatar snapId={snapId} /> <SnapAvatar snapId={snapId} />
</Box> </Box>
<Box paddingLeft={4} paddingRight={4} width={BLOCK_SIZES.FULL}> <Box paddingLeft={4} paddingRight={4} width={BlockSize.Full}>
<Text <Text
className="snap-settings-card__title" className="snap-settings-card__title"
color={Color.textDefault} color={Color.textDefault}
@ -66,7 +70,7 @@ const SnapSettingsCard = ({ name, packageName, onClick, snapId }) => {
SnapSettingsCard.propTypes = { SnapSettingsCard.propTypes = {
/** /**
* Name of the snap used for the title of the card and fallback letter for the snap icon * Name of the snap
*/ */
name: PropTypes.string, name: PropTypes.string,
/** /**
@ -74,7 +78,7 @@ SnapSettingsCard.propTypes = {
*/ */
packageName: PropTypes.string, packageName: PropTypes.string,
/** /**
* onClick function of the "See Details" Button * onClick event handler
*/ */
onClick: PropTypes.func, onClick: PropTypes.func,
/** /**
@ -82,5 +86,4 @@ SnapSettingsCard.propTypes = {
*/ */
snapId: PropTypes.string.isRequired, snapId: PropTypes.string.isRequired,
}; };
export default SnapSettingsCard; export default SnapSettingsCard;

View File

@ -1,152 +1,30 @@
import React from 'react'; import React from 'react';
import { useArgs } from '@storybook/client-api';
import README from './README.mdx';
import SnapSettingsCard from '.'; import SnapSettingsCard from '.';
export default { export default {
title: 'Components/App/Snaps/SnapSettingsCard', title: 'Components/App/Snaps/SnapSettingsCard',
component: SnapSettingsCard, component: SnapSettingsCard,
parameters: {
docs: {
page: README,
},
},
argTypes: { argTypes: {
name: { name: {
control: 'text', control: 'text',
}, },
description: { packageName: {
control: 'text', control: 'text',
}, },
icon: {
control: 'text',
},
dateAdded: {
control: 'text',
},
version: {
control: 'text',
},
url: {
control: 'text',
},
onToggle: {
action: 'onToggle',
},
isEnabled: {
control: 'boolean',
},
onClick: { onClick: {
action: 'onClick', action: 'onClick',
}, },
status: { snapId: {
control: { control: 'text',
type: 'select',
}, },
options: ['installing', 'stopped', 'running', 'crashed'],
},
className: {
control: 'string',
},
cardProps: {
control: 'object',
},
toggleButtonProps: {
control: 'object',
},
buttonProps: {
control: 'object',
},
chipProps: {
control: 'object',
}, },
args: {
name: 'Snap Name',
packageName: 'Snap Package Name',
snapId: 'npm:@metamask/test-snap-bip44',
}, },
}; };
export const DefaultStory = (args) => { export const DefaultStory = (args) => <SnapSettingsCard {...args} />;
const [{ isEnabled }, updateArgs] = useArgs();
const handleOnToggle = () => {
updateArgs({
isEnabled: !isEnabled,
status: isEnabled ? 'stopped' : 'running',
});
};
return (
<SnapSettingsCard
{...args}
isEnabled={isEnabled}
onToggle={handleOnToggle}
/>
);
};
DefaultStory.storyName = 'Default'; DefaultStory.storyName = 'Default';
let d = new Date();
d = d.toDateString();
DefaultStory.args = {
name: 'Snap name',
description:
'This snap provides developers everywhere access to an entirely new data storage paradigm, even letting your programs store data autonomously.',
icon: 'AST.png',
dateAdded: d,
version: '10.5.1234',
url: 'https://metamask.io/',
status: 'stopped',
};
export const Status = () => (
<>
<SnapSettingsCard
name="Installing snap"
description="This snap is Installing"
icon="AST.png"
dateAdded={d}
version="10.5.1234"
url="https://metamask.io/"
status="installing"
cardProps={{
marginBottom: 3,
}}
/>
<SnapSettingsCard
isEnabled
name="Running snap"
description="This snap is Running"
icon="AST.png"
dateAdded={d}
version="10.5.1234"
url="https://metamask.io/"
status="running"
cardProps={{
marginBottom: 3,
}}
/>
<SnapSettingsCard
name="Stopped snap"
description="This snap is stopped"
icon="AST.png"
dateAdded={d}
version="10.5.1234"
url="https://metamask.io/"
status="stopped"
cardProps={{
marginBottom: 3,
}}
/>
<SnapSettingsCard
isEnabled
name="Crashed snap"
description="This snap is Crashed"
icon="AST.png"
dateAdded={d}
version="10.5.1234"
url="https://metamask.io/"
status="crashed"
/>
</>
);

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { getWeightedPermissions } from '../../../../helpers/utils/permission'; import { getWeightedPermissions } from '../../../../helpers/utils/permission';
import { useI18nContext } from '../../../../hooks/useI18nContext'; import { useI18nContext } from '../../../../hooks/useI18nContext';
import PermissionCell from '../../permission-cell'; import PermissionCell from '../../permission-cell';
import Box from '../../../ui/box'; import { Box } from '../../../component-library';
export default function UpdateSnapPermissionList({ export default function UpdateSnapPermissionList({
approvedPermissions, approvedPermissions,

View File

@ -2,21 +2,23 @@ import React from 'react';
import UpdateSnapPermissionList from './update-snap-permission-list'; import UpdateSnapPermissionList from './update-snap-permission-list';
export default { export default {
title: 'Components/App/UpdateSnapPermissionList', title: 'Components/App/Snaps/UpdateSnapPermissionList',
component: UpdateSnapPermissionList, component: UpdateSnapPermissionList,
argTypes: { argTypes: {
permissions: { approvedPermissions: {
control: 'object',
},
revokedPermissions: {
control: 'object',
},
newPermissions: {
control: 'object',
},
targetSubjectMetadata: {
control: 'object', control: 'object',
}, },
}, },
}; args: {
export const DefaultStory = (args) => <UpdateSnapPermissionList {...args} />;
DefaultStory.storyName = 'Default';
DefaultStory.args = {
approvedPermissions: { approvedPermissions: {
'endowment:network-access': { 'endowment:network-access': {
date: 1620710693178, date: 1620710693178,
@ -48,4 +50,17 @@ DefaultStory.args = {
date: 1620710693178, date: 1620710693178,
}, },
}, },
targetSubjectMetadata: {
extensionId: null,
iconUrl: null,
name: 'TypeScript Example Snap',
origin: 'local:http://localhost:8080',
subjectType: 'snap',
version: '0.2.2',
},
},
}; };
export const DefaultStory = (args) => <UpdateSnapPermissionList {...args} />;
DefaultStory.storyName = 'Default';

View File

@ -10,7 +10,7 @@ import { useEqualityCheck } from '../../../hooks/useEqualityCheck';
import Popover from '../../ui/popover'; import Popover from '../../ui/popover';
import { import {
Text, Text,
Button, ButtonPrimary,
///: BEGIN:ONLY_INCLUDE_IN(build-mmi) ///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
IconName, IconName,
///: END:ONLY_INCLUDE_IN ///: END:ONLY_INCLUDE_IN
@ -202,8 +202,7 @@ const renderFirstNotification = ({
</div> </div>
{placeImageBelowDescription && imageComponent} {placeImageBelowDescription && imageComponent}
{actionText && ( {actionText && (
<Button <ButtonPrimary
type="primary"
className="whats-new-popup__button" className="whats-new-popup__button"
onClick={() => { onClick={() => {
actionFunction(); actionFunction();
@ -212,14 +211,15 @@ const renderFirstNotification = ({
event: MetaMetricsEventName.WhatsNewClicked, event: MetaMetricsEventName.WhatsNewClicked,
}); });
}} }}
block
> >
{actionText} {actionText}
</Button> </ButtonPrimary>
)} )}
{ {
///: BEGIN:ONLY_INCLUDE_IN(build-mmi) ///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
customButton && customButton.name === 'mmi-portfolio' && ( customButton && customButton.name === 'mmi-portfolio' && (
<Button <ButtonPrimary
className="whats-new-popup__button" className="whats-new-popup__button"
data-testid="view-mmi-portfolio" data-testid="view-mmi-portfolio"
size={Size.SM} size={Size.SM}
@ -229,9 +229,10 @@ const renderFirstNotification = ({
onClose(); onClose();
window.open(mmiPortfolioUrl, '_blank'); window.open(mmiPortfolioUrl, '_blank');
}} }}
block
> >
{customButton.text} {customButton.text}
</Button> </ButtonPrimary>
) )
///: END:ONLY_INCLUDE_IN ///: END:ONLY_INCLUDE_IN
} }

View File

@ -0,0 +1,16 @@
import React from 'react';
import WhatsNewPopup from '.';
export default {
title: 'Components/Multichain/WhatsNewPopup',
component: WhatsNewPopup,
argTypes: {
onClose: {
action: 'onClose',
},
},
};
export const DefaultStory = (args) => <WhatsNewPopup {...args} />;
DefaultStory.storyName = 'Default';

View File

@ -12,33 +12,28 @@ The `ButtonSecondary` is an extension of `ButtonBase` to support secondary style
## Props ## Props
The `ButtonSecondary` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) and [ButtonBase](/docs/components-componentlibrary-buttonbase--default-story#props) component props
<ArgsTable of={ButtonSecondary} /> <ArgsTable of={ButtonSecondary} />
### Size ### Size
Use the `size` prop and the `Size` object from `./ui/helpers/constants/design-system.js` to change the size of `ButtonSecondary`. Defaults to `Size.MD` Use the `size` prop and the `ButtonSecondarySize` enum from `./ui/components/component-library` to change the size of `ButtonSecondary`. Defaults to `ButtonSecondarySize.Md`
Optional: `BUTTON_SIZES` from `./button-base` object can be used instead of `Size`.
Possible sizes include: Possible sizes include:
- `Size.SM` 32px - `ButtonSecondarySize.Sm` 32px
- `Size.MD` 40px - `ButtonSecondarySize.Md` 40px
- `Size.LG` 48px - `ButtonSecondarySize.Lg` 48px
<Canvas> <Canvas>
<Story id="components-componentlibrary-buttonsecondary--size-story" /> <Story id="components-componentlibrary-buttonsecondary--size-story" />
</Canvas> </Canvas>
```jsx ```jsx
import { Size } from '../../../helpers/constants/design-system'; import { ButtonSecondary, ButtonSecondarySize } from '../../component-library';
import { ButtonSecondary } from '../../component-library';
<ButtonSecondary size={Size.SM} /> <ButtonSecondary size={ButtonSecondarySize.Sm} />
<ButtonSecondary size={Size.MD} /> <ButtonSecondary size={ButtonSecondarySize.Md} />
<ButtonSecondary size={Size.LG} /> <ButtonSecondary size={ButtonSecondarySize.Lg} />
``` ```
### Danger ### Danger

View File

@ -1,7 +0,0 @@
import { Size } from '../../../helpers/constants/design-system';
export const BUTTON_SECONDARY_SIZES = {
SM: Size.SM,
MD: Size.MD,
LG: Size.LG,
};

Some files were not shown because too many files have changed in this diff Show More