diff --git a/.circleci/scripts/chrome-install.sh b/.circleci/scripts/chrome-install.sh index c4cf6bb706..e2cbd7bdc6 100755 --- a/.circleci/scripts/chrome-install.sh +++ b/.circleci/scripts/chrome-install.sh @@ -5,12 +5,12 @@ set -u set -o pipefail # To get the latest version, see -CHROME_VERSION='98.0.4758.80-1' +CHROME_VERSION='99.0.4844.51-1' CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb" CHROME_BINARY_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_BINARY}" # To retrieve this checksum, run the `wget` and `shasum` commands below -CHROME_BINARY_SHA512SUM='83d151f05017ee1f255f4134ee84efdb5c7826d6c64d43e6d402bef1569e4800806be0f87af3cacd240917cacaeedb9cae5833ccbc65740482f6aafbef9b38e7' +CHROME_BINARY_SHA512SUM='f0fa5c6c23d9e8373aafa14622ed4362cbf3a101691ce309864e4aa0030dc3bf7b8e7c8ce294c06106b26eb6b8dc0f2b80376bf2a49d703fc9f6597961b9432e' wget -O "${CHROME_BINARY}" -t 5 "${CHROME_BINARY_URL}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a58844f6b..45d71761ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [10.11.3] +### Changed +- Split secret recovery phrase input into one-field-per-word ([#14016](https://github.com/MetaMask/metamask-extension/pull/14016)) + ## [10.11.2] ### Fixed - Fix bug that users who are connected to another extension would hit when viewing connected sites ([#13974](https://github.com/MetaMask/metamask-extension/pull/13974)) @@ -2779,7 +2783,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.11.2...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.11.3...HEAD +[10.11.3]: https://github.com/MetaMask/metamask-extension/compare/v10.11.2...v10.11.3 [10.11.2]: https://github.com/MetaMask/metamask-extension/compare/v10.11.1...v10.11.2 [10.11.1]: https://github.com/MetaMask/metamask-extension/compare/v10.11.0...v10.11.1 [10.11.0]: https://github.com/MetaMask/metamask-extension/compare/v10.10.2...v10.11.0 diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 51ea3e6537..eede6a17ed 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -804,9 +804,6 @@ "securityAndPrivacy": { "message": "ደህንነት እና ግላዊነት" }, - "seedPhrasePlaceholder": { - "message": "እያንዳንዱን ቃል በነጠላ ክፍት ቦታ ይለያዩ" - }, "seedPhraseReq": { "message": "የዘር ሐረጋት የ 12 ቃላት ርዝመት አላቸው" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 0a93bbd3e2..0aa9684b78 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -820,9 +820,6 @@ "securityAndPrivacy": { "message": "الأمن والخصوصية" }, - "seedPhrasePlaceholder": { - "message": "يرجى فصل كل كلمة بمسافة واحدة" - }, "seedPhraseReq": { "message": "طول الجمل البذرية 12 كلمة" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 35f765175e..69d60edd94 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -815,9 +815,6 @@ "securityAndPrivacy": { "message": "Сигурност и поверителност" }, - "seedPhrasePlaceholder": { - "message": "Отделете всяка дума с един интервал" - }, "seedPhraseReq": { "message": "Фразите зародиш се състоят от 12 думи" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index 69577c0e71..fe484e6de3 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -819,9 +819,6 @@ "securityAndPrivacy": { "message": "নিরাপত্তা এবং গোপনীয়তা" }, - "seedPhrasePlaceholder": { - "message": "প্রতিটি শব্দকে একটি স্পেস দিয়ে আলাদা করুন" - }, "seedPhraseReq": { "message": "সীড ফ্রেজগুলি 12 শব্দের" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index 03ff652ce9..9585515d27 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -797,9 +797,6 @@ "securityAndPrivacy": { "message": "Seguretat i privacitat" }, - "seedPhrasePlaceholder": { - "message": "Separa cada paraula amb un únic espai" - }, "seedPhraseReq": { "message": "Les frases de recuperació tenen 12 paraules" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 709e63bccc..290993179b 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -800,9 +800,6 @@ "securityAndPrivacy": { "message": "Sikkerhed & Privatliv" }, - "seedPhrasePlaceholder": { - "message": "Adskil hvert ord med et enkelt mellemrum" - }, "seedPhraseReq": { "message": "Backupsætninger er 12 ord lange" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 5549b95d74..edab4e7a49 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -2359,9 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Bevor Sie loslegen, schauen Sie sich dieses kurze Video an, um mehr über Ihre Geheime Wiederherstellungsphrase zu erfahren und wie Sie Ihre Wallet sicher halten können." }, - "seedPhrasePlaceholder": { - "message": "Trennen Sie jedes Wort durch ein einzelnes Leerzeichen." - }, "seedPhraseReq": { "message": "Seed-Wörterfolgen bestehen aus 12 Wörtern" }, @@ -2469,9 +2466,6 @@ "showRecommendations": { "message": "Empfehlungen anzeigen" }, - "showSeedPhrase": { - "message": "Geheime Wiederherstellungsphrase zeigen" - }, "showTestnetNetworks": { "message": "Test-Netzwerke anzeigen" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 387bf6031b..0932794cb7 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Πριν ξεκινήσετε, παρακολουθήστε αυτό το σύντομο βίντεο για να μάθετε για τη Μυστική Φράση Ανάκτησης σας και πώς να κρατήσετε το πορτοφόλι σας ασφαλές." }, - "seedPhrasePlaceholder": { - "message": "Διαχωρίστε κάθε λέξη μ' ένα κενό" - }, - "seedPhrasePlaceholderPaste": { - "message": "Επικόλληση Μυστικής Φράσης Ανάκτησης από το πρόχειρο" - }, "seedPhraseReq": { "message": "Οι Μυστικές Φράσεις Ανάκτησης έχουν μήκος 12 λέξεων" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Εμφάνιση Προτάσεων" }, - "showSeedPhrase": { - "message": "Εμφάνιση Μυστικής Φράσης Ανάκτησης" - }, "showTestnetNetworks": { "message": "Εμφάνιση δοκιμαστικών δικτύων" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index ba8a7c3703..7fb8285907 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2588,12 +2588,6 @@ "seedPhraseIntroTitleCopy": { "message": "Before getting started, watch this short video to learn about your Secret Recovery Phrase and how to keep your wallet safe." }, - "seedPhrasePlaceholder": { - "message": "Separate each word with a single space" - }, - "seedPhrasePlaceholderPaste": { - "message": "Enter your Secret Recovery Phrase" - }, "seedPhraseReq": { "message": "Secret Recovery Phrases contain 12, 15, 18, 21, or 24 words" }, @@ -2707,9 +2701,6 @@ "showRecommendations": { "message": "Show Recommendations" }, - "showSeedPhrase": { - "message": "Show Secret Recovery Phrase" - }, "showTestnetNetworks": { "message": "Show test networks" }, @@ -2831,6 +2822,30 @@ "spendLimitTooLarge": { "message": "Spend limit too large" }, + "srpInputNumberOfWords": { + "message": "I have a $1-word phrase", + "description": "This is the text for each option in the dropdown where a user selects how many words their secret recovery phrase has during import. The $1 is the number of words (either 12, 15, 18, 21, or 24)." + }, + "srpPasteFailedTooManyWords": { + "message": "Paste failed because it contained over 24 words. A secret recovery phrase can have a maximum of 24 words.", + "description": "Description of SRP paste erorr when the pasted content has too many words" + }, + "srpPasteTip": { + "message": "You can paste your entire secret recovery phrase into any field", + "description": "Our secret recovery phrase input is split into one field per word. This message explains to users that they can paste their entire secrete recovery phrase into any field, and we will handle it correctly." + }, + "srpToggleShow": { + "message": "Show/Hide this word of the secret recovery phrase", + "description": "Describes a toggle that is used to show or hide a single word of the secret recovery phrase" + }, + "srpWordHidden": { + "message": "This word is hidden", + "description": "Explains that a word in the secret recovery phrase is hidden" + }, + "srpWordShown": { + "message": "This word is being shown", + "description": "Explains that a word in the secret recovery phrase is being shown" + }, "stable": { "message": "Stable" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index cefb30eaa1..1e08c80b10 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -1530,12 +1530,6 @@ "seedPhraseIntroTitleCopy": { "message": "Antes de comenzar, mire este breve video para aprender sobre su frase de recuperación y sobre cómo mantener segura su cartera." }, - "seedPhrasePlaceholder": { - "message": "Separar cada palabra con un solo espacio" - }, - "seedPhrasePlaceholderPaste": { - "message": "Pegar la frase secreta de recuperación desde el Portapapeles" - }, "seedPhraseReq": { "message": "Las frases secretas de recuperación contienen 12, 15, 18, 21 o 24 palabras" }, @@ -1615,9 +1609,6 @@ "showPrivateKeys": { "message": "Mostrar claves privadas" }, - "showSeedPhrase": { - "message": "Mostrar frase secreta de recuperación" - }, "sigRequest": { "message": "Solicitud de firma" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index b1d29d4a93..99a8cd1424 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -2408,12 +2408,6 @@ "seedPhraseIntroTitleCopy": { "message": "Antes de comenzar, mire este breve video para aprender sobre su frase de recuperación y sobre cómo proteger su cartera." }, - "seedPhrasePlaceholder": { - "message": "Separar cada palabra con un solo espacio" - }, - "seedPhrasePlaceholderPaste": { - "message": "Pegar la frase secreta de recuperación desde el Portapapeles" - }, "seedPhraseReq": { "message": "Las frases secretas de recuperación contienen 12, 15, 18, 21 o 24 palabras" }, @@ -2527,9 +2521,6 @@ "showRecommendations": { "message": "Mostrar recomendaciones" }, - "showSeedPhrase": { - "message": "Mostrar frase secreta de recuperación" - }, "showTestnetNetworks": { "message": "Mostrar redes de prueba" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index b349b34b2f..4fb324dc20 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -809,9 +809,6 @@ "securityAndPrivacy": { "message": "Turvalisus ja privaatsus" }, - "seedPhrasePlaceholder": { - "message": "Eraldage iga sõna ühe tühikuga" - }, "seedPhraseReq": { "message": "Seemnefraasid on 12 sõna pikad" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index eb43442d2b..a5a46a0cc5 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -819,9 +819,6 @@ "securityAndPrivacy": { "message": "امنیت و حریم خصوصی" }, - "seedPhrasePlaceholder": { - "message": "هر کلمه را با یک فاصله واحد جدا سازید" - }, "seedPhraseReq": { "message": "عبارات بازیاب 12 کلمه اند" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index d00a8ff3e8..54932cba4a 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -816,9 +816,6 @@ "securityAndPrivacy": { "message": "Turva & yksityisyys" }, - "seedPhrasePlaceholder": { - "message": "Erota kukin sana yhdellä välilyönnillä" - }, "seedPhraseReq": { "message": "Juurilauseet ovat 12 sanan pituisia" }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 06999930df..e82df7c931 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -737,9 +737,6 @@ "securityAndPrivacy": { "message": "Seguridad at Privacy" }, - "seedPhrasePlaceholder": { - "message": "Paghiwa-hiwalayin ang bawat salita gamit ang isang space" - }, "seedPhraseReq": { "message": "Ang mga seed phrase ay may habang 12 salita" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index b1bc21ee4d..99168b4684 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Avant de commencer, regardez cette courte vidéo pour vous informer sur votre phrase secrète de récupération et sur la manière de sécuriser votre portefeuille." }, - "seedPhrasePlaceholder": { - "message": "Séparez chaque mot par un espace simple" - }, - "seedPhrasePlaceholderPaste": { - "message": "Collez la Phrase secrète de récupération depuis le presse-papiers" - }, "seedPhraseReq": { "message": "Les phrases secrètes de récupération sont composées de 12, 15, 18, 21 ou 24 mots" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Afficher les recommandations" }, - "showSeedPhrase": { - "message": "Afficher la phrase secrète de récupération" - }, "showTestnetNetworks": { "message": "Afficher les réseaux de test" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 70a04be831..7e7ca2db50 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -813,9 +813,6 @@ "securityAndPrivacy": { "message": "אבטחה ופרטיות" }, - "seedPhrasePlaceholder": { - "message": "הפרד/י בין המילים ברווח אחד" - }, "seedPhraseReq": { "message": "צירופי גרעין מורכבים מ-12 מילים" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 0853cd02b2..db88253d99 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "शुरुआत करने से पहले, अपने गुप्त रिकवरी फ्रेज और अपने वॉलेट को सुरक्षित रखने के तरीके के बारे में जानने के लिए यह छोटा-सा वीडियो देखें।" }, - "seedPhrasePlaceholder": { - "message": "प्रत्येक शब्द को एक रिक्ति से अलग करें" - }, - "seedPhrasePlaceholderPaste": { - "message": "क्लिपबोर्ड से गुप्त रिकवरी फ्रेज़ को चिपकाएँ" - }, "seedPhraseReq": { "message": "गुप्त रिकवरी फ्रेज में 12, 15, 18, 21 या 24 शब्द होते हैं" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "अनुशंसा दिखाएं" }, - "showSeedPhrase": { - "message": "गुप्त रिकवरी फ्रेज दिखाएं" - }, "showTestnetNetworks": { "message": "परीक्षण नेटवर्क दिखाएं" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 1de58c64d8..1c50602b4d 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -812,9 +812,6 @@ "securityAndPrivacy": { "message": "Sigurnost i privatnost" }, - "seedPhrasePlaceholder": { - "message": "Odvojite pojedinačne riječi jednim razmakom" - }, "seedPhraseReq": { "message": "Početne rečenice imaju 12 riječi" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 764e55689d..ce6a131399 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -812,9 +812,6 @@ "securityAndPrivacy": { "message": "Biztonság és adatvédelem" }, - "seedPhrasePlaceholder": { - "message": "A szavakat egy-egy szóközzel válassza el" - }, "seedPhraseReq": { "message": "A seed mondat 12 szóból áll" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 84418a0628..1a15f81100 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Sebelum memulai, lihat video singkat ini untuk mempelajari tentang Frasa Pemulihan Rahasia Anda dan cara menjaga keamanan dompet Anda." }, - "seedPhrasePlaceholder": { - "message": "Pisahkan setiap kata dengan satu spasi" - }, - "seedPhrasePlaceholderPaste": { - "message": "Tempel Frasa Pemulihan Rahasia dari clipboard" - }, "seedPhraseReq": { "message": "Frasa Pemulihan Rahasia berisi 12, 15, 18, 21, atau 24 kata" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Tampilkan Rekomendasi" }, - "showSeedPhrase": { - "message": "Tampilkan Frasa Pemulihan Rahasia" - }, "showTestnetNetworks": { "message": "Tampilkan jaringan pengujian" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 3ebfc6e95d..8a06c463e2 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -1219,12 +1219,6 @@ "securityAndPrivacy": { "message": "Sicurezza & Privacy" }, - "seedPhrasePlaceholder": { - "message": "Separa ogni parola con un singolo spazio" - }, - "seedPhrasePlaceholderPaste": { - "message": "Incolla frase seed dagli appunti" - }, "seedPhraseReq": { "message": "le frasi seed sono lunghe 12 parole" }, @@ -1301,9 +1295,6 @@ "showPrivateKeys": { "message": "Mostra Chiave Privata" }, - "showSeedPhrase": { - "message": "Mostra frase seed" - }, "sigRequest": { "message": "Firma Richiesta" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 88ff324760..4512be6fe5 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "始める前に、この短いビデオを見て、シークレットリカバリーフレーズとウォレットを安全に保つ方法について確認してください。" }, - "seedPhrasePlaceholder": { - "message": "単語ごとにスペースを1つ置いて分離します" - }, - "seedPhrasePlaceholderPaste": { - "message": "クリップボードからシークレット リカバリー フレーズを貼り付けます" - }, "seedPhraseReq": { "message": "シークレットリカバリーフレーズは、12、15、18、21、24語で構成されます" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "推奨を表示" }, - "showSeedPhrase": { - "message": "シークレットリカバリーフレーズを表示" - }, "showTestnetNetworks": { "message": "テストネットワークを表示" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 5e74dd3752..79bcad27a1 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -819,9 +819,6 @@ "securityAndPrivacy": { "message": "ಭದ್ರತೆ ಮತ್ತು ಗೌಪ್ಯತೆ" }, - "seedPhrasePlaceholder": { - "message": "ಒಂದು ಸ್ಪೇಸ್ ಮೂಲಕ ಪ್ರತಿ ಪದವನ್ನು ಬೇರ್ಪಡಿಸಿ" - }, "seedPhraseReq": { "message": "ಸೀಡ್ ಫ್ರೇಸ್‌ಗಳು 12 ಪದಗಳಷ್ಟು ದೀರ್ಘವಾಗಿವೆ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 413bb02120..ccaaec61b7 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "시작하기 전에 이 짧은 동영상을 보고 비밀 복구 구문과 지갑을 안전하게 보호하는 방법에 대해 알아보세요." }, - "seedPhrasePlaceholder": { - "message": "공백 한 칸으로 각 단어를 구분하세요." - }, - "seedPhrasePlaceholderPaste": { - "message": "클립보드에서 비밀 복구 구문 붙여넣기" - }, "seedPhraseReq": { "message": "비밀 복구 구문은 12, 15, 18, 21 또는 24개의 단어로 구성됩니다" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "추천 보기" }, - "showSeedPhrase": { - "message": "비밀 복구 구문 표시" - }, "showTestnetNetworks": { "message": "테스트 네트워크 보기" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index efb5c8ab89..9d8453bc80 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -819,9 +819,6 @@ "securityAndPrivacy": { "message": "Sauga ir privatumas" }, - "seedPhrasePlaceholder": { - "message": "Kiekvieną žodį atskirkite viengubu tarpu" - }, "seedPhraseReq": { "message": "Atkūrimo frazės yra 12 žodžių ilgio" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index 2739046824..14c0dfe4de 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -815,9 +815,6 @@ "securityAndPrivacy": { "message": "Drošība un konfidencialitāte" }, - "seedPhrasePlaceholder": { - "message": "Atdaliet katru vārdu ar vienu atstarpi" - }, "seedPhraseReq": { "message": "Atkopšanas frāzes ir 12 vārdus garas" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index 60ca3829c9..7c9e3b8bce 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -799,9 +799,6 @@ "securityAndPrivacy": { "message": "Keselamatan & Privasi" }, - "seedPhrasePlaceholder": { - "message": "Pisahkan setiap perkataan dengan satu ruang" - }, "seedPhraseReq": { "message": "Frasa benih panjangnya 12 patah perkataan" }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 444a812296..3d9489ad4c 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -803,9 +803,6 @@ "securityAndPrivacy": { "message": "Sikkerhet og personvern" }, - "seedPhrasePlaceholder": { - "message": "Skill hvert ord med ett enkelt mellomrom" - }, "seedPhraseReq": { "message": "Mnemoniske gjenopprettingsfraser består av 12 ord " }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 6d82062e4a..41c6859626 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -1555,12 +1555,6 @@ "seedPhraseIntroTitleCopy": { "message": "Bago magsimula, panoorin ang maikling video na ito para matuto tungkol sa recovery phrase at kung paano panatilihing ligtas ang iyong wallet." }, - "seedPhrasePlaceholder": { - "message": "Paghiwa-hiwalayin ang bawat salita gamit ang isang space" - }, - "seedPhrasePlaceholderPaste": { - "message": "I-paste ang Secret Recovery Phrase mula sa clipboard" - }, "seedPhraseReq": { "message": "Ang mga Secret Recovery Phrase ay naglalaman ng 12, 15, 18, 21, o 24 na salita" }, @@ -1640,9 +1634,6 @@ "showPrivateKeys": { "message": "Ipakita ang Mga Private Key" }, - "showSeedPhrase": { - "message": "Ipakita ang Secret Recovery Phrase" - }, "sigRequest": { "message": "Request ng Signature" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index e37cdeca01..1c174945b9 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -813,9 +813,6 @@ "securityAndPrivacy": { "message": "Bezpieczeństwo i prywatność" }, - "seedPhrasePlaceholder": { - "message": "Oddziel słowa pojedynczą spacją" - }, "seedPhraseReq": { "message": "Frazy seed mają 12 słów" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index d6c8a39230..afbeb96b55 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -2392,12 +2392,6 @@ "seedPhraseIntroTitleCopy": { "message": "Antes de iniciar, assista a esse vídeo curto para aprender sobre sua Frase de Recuperação Secreta e sobre como manter sua carteira segura." }, - "seedPhrasePlaceholder": { - "message": "Separe cada palavra com um único espaço" - }, - "seedPhrasePlaceholderPaste": { - "message": "Cole a Frase de recuperação secreta da área de transferência" - }, "seedPhraseReq": { "message": "As Frases de Recuperação Secretas contêm 12, 15, 18, 21 ou 24 palavras" }, @@ -2511,9 +2505,6 @@ "showRecommendations": { "message": "Mostrar recomendações" }, - "showSeedPhrase": { - "message": "Mostrar Frase de Recuperação Secreta" - }, "showTestnetNetworks": { "message": "Mostrar redes de teste" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index 37135974e3..fe5d4482c9 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -806,9 +806,6 @@ "securityAndPrivacy": { "message": "Securitate și confidențialitate" }, - "seedPhrasePlaceholder": { - "message": "Despărțiți fiecare cuvânt cu un spațiu" - }, "seedPhraseReq": { "message": "Expresiile seed sunt lungi de 12 cuvinte" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 23c46ab20d..6e839d17b8 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Прежде чем приступить к делу, посмотрите это короткое видео о секретной фразе для восстановления и споособах обезопасить кошелек." }, - "seedPhrasePlaceholder": { - "message": "Отделяйте каждое слово одним пробелом" - }, - "seedPhrasePlaceholderPaste": { - "message": "Вставить секретную фразу восстановления из буфера обмена" - }, "seedPhraseReq": { "message": "Секретные фразы для восстановления содержат 12, 15, 18, 21 или 24 слова" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Показать рекомендации" }, - "showSeedPhrase": { - "message": "Показать секретную фразу для восстановления" - }, "showTestnetNetworks": { "message": "Показать тестовые сети" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 5e818d979d..60cd3a48ee 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -782,9 +782,6 @@ "securityAndPrivacy": { "message": "Bezpečnosť a súkromie" }, - "seedPhrasePlaceholder": { - "message": "Každé slovo oddeľte jednou medzerou" - }, "seedPhraseReq": { "message": "klíčové fráze mají 12 slov" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index d2cfea50b1..046dc927c8 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -807,9 +807,6 @@ "securityAndPrivacy": { "message": "Varnost in zasebnost" }, - "seedPhrasePlaceholder": { - "message": "Vsako besedo ločite z enim presledkom" - }, "seedPhraseReq": { "message": "Seed phrase mora biti dolg 12 besed" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index c6c35376c8..0a49cbb199 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -810,9 +810,6 @@ "securityAndPrivacy": { "message": "Bezbednost i privatnost" }, - "seedPhrasePlaceholder": { - "message": "Odvojite svaku reč jednim razmakom" - }, "seedPhraseReq": { "message": "Šifre za oporavak naloga (seed phrases) imaju 12 reči" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 0000c49494..3e62b14abe 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -803,9 +803,6 @@ "securityAndPrivacy": { "message": "Säkerhet och integritet" }, - "seedPhrasePlaceholder": { - "message": "Separera varje ord med ett enda mellanslag." - }, "seedPhraseReq": { "message": "Nyckelfraser är 12 ord långa." }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index 247318676a..a2634a0881 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -797,9 +797,6 @@ "securityAndPrivacy": { "message": "Ulinzi na Faragha" }, - "seedPhrasePlaceholder": { - "message": "Tenganisha kila neno kwa nafasi moja" - }, "seedPhraseReq": { "message": "Virai vianzio vina urefu wa maneno 12" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 20d2c11824..ace2ed1ee8 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Bago magsimula, panoorin ang maikling video na ito upang malaman ang tungkol sa iyong Secret Recovery Phrase at paano mapapanatiling ligtas ang wallet mo." }, - "seedPhrasePlaceholder": { - "message": "Paghiwa-hiwalayin ang bawat salita gamit ang espasyo" - }, - "seedPhrasePlaceholderPaste": { - "message": "I-paste ang Secret Recovery Phrase mula sa clipboard" - }, "seedPhraseReq": { "message": "Ang mga Secret Recovery Phrase ay naglalaman ng 12, 15, 18, 21, o 24 na salita" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Ipakita ang mga Rekomendasyon" }, - "showSeedPhrase": { - "message": "Ipakita ang Secret Recovery Phrase" - }, "showTestnetNetworks": { "message": "Ipakita ang mga test network" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index a6d03b419f..263ca97dc8 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Başlamadan önce Gizli Kurtarma İfadeniz ve cüzdanınızı nasıl güvende tutacağınız hakkında bilgi edinmek için bu kısa videoyu izleyin." }, - "seedPhrasePlaceholder": { - "message": "Her kelimeyi tek bir boşluk ile ayırın" - }, - "seedPhrasePlaceholderPaste": { - "message": "Hafıza panosundan Gizli Kurtarma İfadesini yapıştır" - }, "seedPhraseReq": { "message": "Gizli Kurtarma İfadeleri 12, 15, 18, 21 veya 24 kelimeden oluşur" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Önerileri Göster" }, - "showSeedPhrase": { - "message": "Gizli Kurtarma İfadesini Göster" - }, "showTestnetNetworks": { "message": "Test ağlarını göster" }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index ec6b773715..29d9ce0b39 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -819,9 +819,6 @@ "securityAndPrivacy": { "message": "Безпека й конфіденційність" }, - "seedPhrasePlaceholder": { - "message": "Відділіть кожне слово одним пробілом" - }, "seedPhraseReq": { "message": "Початкові фрази мають 12 слів" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 503ce34952..cc8ee51f9d 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "Trước khi bắt đầu, hãy xem video ngắn này để tìm hiểu thêm về cụm mật khẩu khôi phục bí mật của bạn và cách bảo vệ ví của bạn." }, - "seedPhrasePlaceholder": { - "message": "Phân tách mỗi từ bằng một dấu cách" - }, - "seedPhrasePlaceholderPaste": { - "message": "Dán Cụm mật khẩu khôi phục bí mật từ khay nhớ tạm" - }, "seedPhraseReq": { "message": "Cụm mật khẩu khôi phục bí mật gồm 12, 15, 18, 21 hoặc 24 từ" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "Hiển Thị Đề Xuất" }, - "showSeedPhrase": { - "message": "Hiển thị Cụm mật khẩu khôi phục bí mật" - }, "showTestnetNetworks": { "message": "Hiển thị các mạng thử nghiệm" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 1e662c7b1a..9035fbaa7e 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -2359,12 +2359,6 @@ "seedPhraseIntroTitleCopy": { "message": "在开始之前,观看这个简短的视频来了解您的账户助记词以及如何保护您的钱包安全。" }, - "seedPhrasePlaceholder": { - "message": "用空格分隔每个单词" - }, - "seedPhrasePlaceholderPaste": { - "message": "从剪贴板粘贴账户助记词" - }, "seedPhraseReq": { "message": "账户助记词由 12、15、18、21 或 24 个单词组成" }, @@ -2475,9 +2469,6 @@ "showRecommendations": { "message": "显示建议" }, - "showSeedPhrase": { - "message": "显示账户助记词" - }, "showTestnetNetworks": { "message": "显示测试网络" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 92d7e10b92..7cabd6945a 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -801,9 +801,6 @@ "securityAndPrivacy": { "message": "安全&隱私" }, - "seedPhrasePlaceholder": { - "message": "單詞之間請用空白分隔" - }, "seedPhraseReq": { "message": "助憶詞為 12 個詞語" }, diff --git a/package.json b/package.json index 04949d2471..b09149dab6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.11.2", + "version": "10.11.3", "private": true, "repository": { "type": "git", @@ -83,8 +83,8 @@ "3box/ipfs/ipld-zcash/zcash-bitcore-lib/elliptic": "^6.5.4", "3box/ipfs/libp2p-mdns/multicast-dns/dns-packet": "^5.2.2", "3box/ipfs/prometheus-gc-stats/gc-stats/node-pre-gyp/tar": "^6.1.2", - "3box/**/libp2p-crypto/node-forge": "^1.0.0", - "3box/**/libp2p-keychain/node-forge": "^1.0.0", + "3box/**/libp2p-crypto/node-forge": "^1.3.0", + "3box/**/libp2p-keychain/node-forge": "^1.3.0", "3box/ipfs/libp2p-webrtc-star/socket.io/engine.io": "^4.0.0", "analytics-node/axios": "^0.21.2", "ganache-core/lodash": "^4.17.21", @@ -261,6 +261,7 @@ "@testing-library/jest-dom": "^5.11.10", "@testing-library/react": "^10.4.8", "@testing-library/react-hooks": "^3.2.1", + "@testing-library/user-event": "^14.0.0-beta.12", "@types/react": "^16.9.53", "addons-linter": "1.14.0", "babelify": "^10.0.0", @@ -269,7 +270,7 @@ "browser-util-inspect": "^0.2.0", "browserify": "^16.5.1", "chalk": "^3.0.0", - "chromedriver": "^98.0.0", + "chromedriver": "^99.0.0", "concurrently": "^5.2.0", "copy-webpack-plugin": "^6.0.3", "cross-spawn": "^7.0.3", diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js index 7dbc962716..26db7f7d89 100644 --- a/test/e2e/metamask-ui.spec.js +++ b/test/e2e/metamask-ui.spec.js @@ -200,11 +200,10 @@ describe('MetaMask', function () { await restoreSeedLink.click(); await driver.delay(regularDelayMs); - await driver.fill( - 'input[placeholder="Enter your Secret Recovery Phrase"]', + await driver.pasteIntoField( + '[data-testid="import-srp__srp-word-0"]', testSeedPhrase, ); - await driver.delay(regularDelayMs); await driver.fill('#password', 'correct horse battery staple'); await driver.fill('#confirm-password', 'correct horse battery staple'); diff --git a/test/e2e/tests/from-import-ui.spec.js b/test/e2e/tests/from-import-ui.spec.js index a1a8e1da43..415a533190 100644 --- a/test/e2e/tests/from-import-ui.spec.js +++ b/test/e2e/tests/from-import-ui.spec.js @@ -76,8 +76,8 @@ describe('Metamask Import UI', function () { await driver.clickElement('.btn-secondary'); // Import Secret Recovery Phrase - await driver.fill( - 'input[placeholder="Enter your Secret Recovery Phrase"]', + await driver.pasteIntoField( + '[data-testid="import-srp__srp-word-0"]', testSeedPhrase, ); diff --git a/test/e2e/tests/metamask-responsive-ui.spec.js b/test/e2e/tests/metamask-responsive-ui.spec.js index 3bf8684fb2..e08a6a30c7 100644 --- a/test/e2e/tests/metamask-responsive-ui.spec.js +++ b/test/e2e/tests/metamask-responsive-ui.spec.js @@ -172,8 +172,8 @@ describe('Metamask Responsive UI', function () { ); await restoreSeedLink.click(); - await driver.fill( - 'input[placeholder="Enter your Secret Recovery Phrase"]', + await driver.pasteIntoField( + '[data-testid="import-srp__srp-word-0"]', testSeedPhrase, ); diff --git a/test/e2e/webdriver/driver.js b/test/e2e/webdriver/driver.js index 4971cef594..770b702b81 100644 --- a/test/e2e/webdriver/driver.js +++ b/test/e2e/webdriver/driver.js @@ -1,6 +1,6 @@ const { promises: fs } = require('fs'); const { strict: assert } = require('assert'); -const { until, error: webdriverError, By } = require('selenium-webdriver'); +const { until, error: webdriverError, By, Key } = require('selenium-webdriver'); const cssToXPath = require('css-to-xpath'); /** @@ -248,6 +248,26 @@ class Driver { assert.ok(!dataTab, 'Found element that should not be present'); } + /** + * Paste a string into a field. + * + * @param {string} element - The element locator. + * @param {string} contentToPaste - The content to paste. + */ + async pasteIntoField(element, contentToPaste) { + // Throw if double-quote is present in content to paste + // so that we don't have to worry about escaping double-quotes + if (contentToPaste.includes('"')) { + throw new Error('Cannot paste content with double-quote'); + } + // Click to focus the field + await this.clickElement(element); + await this.executeScript( + `navigator.clipboard.writeText("${contentToPaste}")`, + ); + await this.fill(element, Key.chord(Key.CONTROL, 'v')); + } + // Navigation async navigate(page = Driver.PAGES.HOME) { diff --git a/test/helpers/setup-helper.js b/test/helpers/setup-helper.js index f9d2112aa0..9d4b7d8926 100644 --- a/test/helpers/setup-helper.js +++ b/test/helpers/setup-helper.js @@ -79,3 +79,11 @@ if (!window.crypto.getRandomValues) { // eslint-disable-next-line node/global-require window.crypto.getRandomValues = require('polyfill-crypto.getrandomvalues'); } + +// Used to test `clearClipboard` function +if (!window.navigator.clipboard) { + window.navigator.clipboard = {}; +} +if (!window.navigator.clipboard.writeText) { + window.navigator.clipboard.writeText = () => undefined; +} diff --git a/test/lib/render-helpers.js b/test/lib/render-helpers.js index 37c5d63707..9fc7aad169 100644 --- a/test/lib/render-helpers.js +++ b/test/lib/render-helpers.js @@ -95,3 +95,17 @@ export function renderWithProvider(component, store) { return render(component, { wrapper: Wrapper }); } + +export function renderWithLocalization(component) { + const Wrapper = ({ children }) => ( + + {children} + + ); + + Wrapper.propTypes = { + children: PropTypes.node, + }; + + return render(component, { wrapper: Wrapper }); +} diff --git a/ui/components/app/app-components.scss b/ui/components/app/app-components.scss index c11ff6027c..a135c07666 100644 --- a/ui/components/app/app-components.scss +++ b/ui/components/app/app-components.scss @@ -54,6 +54,7 @@ @import 'selected-account/index'; @import 'signature-request/index'; @import 'signature-request-original/index'; +@import 'srp-input/srp-input'; @import 'tab-bar/index'; @import 'token-cell/token-cell'; @import 'token-list-display/token-list-display'; diff --git a/ui/components/app/create-new-vault/create-new-vault.js b/ui/components/app/create-new-vault/create-new-vault.js index 3c2b5007b6..9fef846f47 100644 --- a/ui/components/app/create-new-vault/create-new-vault.js +++ b/ui/components/app/create-new-vault/create-new-vault.js @@ -1,17 +1,12 @@ -import { ethers } from 'ethers'; import React, { useCallback, useContext, useState } from 'react'; import PropTypes from 'prop-types'; import { useI18nContext } from '../../../hooks/useI18nContext'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import TextField from '../../ui/text-field'; import Button from '../../ui/button'; -import { clearClipboard } from '../../../helpers/utils/util'; import CheckBox from '../../ui/check-box'; import Typography from '../../ui/typography'; -import { COLORS } from '../../../helpers/constants/design-system'; -import { parseSecretRecoveryPhrase } from './parse-secret-recovery-phrase'; - -const { isValidMnemonic } = ethers.utils; +import SrpInput from '../srp-input'; export default function CreateNewVault({ disabled = false, @@ -24,33 +19,11 @@ export default function CreateNewVault({ const [password, setPassword] = useState(''); const [passwordError, setPasswordError] = useState(''); const [seedPhrase, setSeedPhrase] = useState(''); - const [seedPhraseError, setSeedPhraseError] = useState(''); - const [showSeedPhrase, setShowSeedPhrase] = useState(false); const [termsChecked, setTermsChecked] = useState(false); const t = useI18nContext(); const metricsEvent = useContext(MetaMetricsContext); - const onSeedPhraseChange = useCallback( - (rawSeedPhrase) => { - let newSeedPhraseError = ''; - - if (rawSeedPhrase) { - const parsedSeedPhrase = parseSecretRecoveryPhrase(rawSeedPhrase); - const wordCount = parsedSeedPhrase.split(/\s/u).length; - if (wordCount % 3 !== 0 || wordCount > 24 || wordCount < 12) { - newSeedPhraseError = t('seedPhraseReq'); - } else if (!isValidMnemonic(parsedSeedPhrase)) { - newSeedPhraseError = t('invalidSeedPhrase'); - } - } - - setSeedPhrase(rawSeedPhrase); - setSeedPhraseError(newSeedPhraseError); - }, - [setSeedPhrase, setSeedPhraseError, t], - ); - const onPasswordChange = useCallback( (newPassword) => { let newConfirmPasswordError = ''; @@ -93,8 +66,7 @@ export default function CreateNewVault({ seedPhrase && (!includeTerms || termsChecked) && !passwordError && - !confirmPasswordError && - !seedPhraseError; + !confirmPasswordError; const onImport = useCallback( async (event) => { @@ -104,7 +76,7 @@ export default function CreateNewVault({ return; } - await onSubmit(password, parseSecretRecoveryPhrase(seedPhrase)); + await onSubmit(password, seedPhrase); }, [isValid, onSubmit, password, seedPhrase], ); @@ -121,10 +93,6 @@ export default function CreateNewVault({ setTermsChecked((currentTermsChecked) => !currentTermsChecked); }, [metricsEvent]); - const toggleShowSeedPhrase = useCallback(() => { - setShowSeedPhrase((currentShowSeedPhrase) => !currentShowSeedPhrase); - }, []); - const termsOfUse = t('acceptTermsOfUse', [ -
- - {showSeedPhrase ? ( -