diff --git a/.storybook/test-data.js b/.storybook/test-data.js
index c85ab72596cd..65bb7fb4c39a 100644
--- a/.storybook/test-data.js
+++ b/.storybook/test-data.js
@@ -1,5 +1,5 @@
import { draftTransactionInitialState } from '../ui/ducks/send';
-import { HardwareKeyringTypes } from '../shared/constants/hardware-wallets';
+import { KeyringType } from '../shared/constants/keyring';
const state = {
invalidCustomNetwork: {
@@ -1168,14 +1168,14 @@ const state = {
unapprovedTypedMessages: {},
unapprovedTypedMessagesCount: 0,
keyringTypes: [
- HardwareKeyringTypes.imported,
- HardwareKeyringTypes.hdKeyTree,
- HardwareKeyringTypes.trezor,
- HardwareKeyringTypes.ledger,
+ KeyringType.imported,
+ KeyringType.hdKeyTree,
+ KeyringType.trezor,
+ KeyringType.ledger,
],
keyrings: [
{
- type: HardwareKeyringTypes.hdKeyTree,
+ type: KeyringType.hdKeyTree,
accounts: [
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
'0xb19ac54efa18cc3a14a5b821bfec73d284bf0c5e',
diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json
index d6b92d26f7ac..1d11f9a3572f 100644
--- a/app/_locales/am/messages.json
+++ b/app/_locales/am/messages.json
@@ -157,6 +157,9 @@
"connectingToGoerli": {
"message": "ከ Goerli የሙከራ አውታረ መረብ ጋር መገናኘት"
},
+ "connectingToLineaTestnet": {
+ "message": "ከ Linea Goerli የሙከራ አውታረ መረብ ጋር መገናኘት"
+ },
"connectingToMainnet": {
"message": "ከዋናው የ Ethereum አውታረ መረብ ጋር መገናኘት"
},
@@ -400,6 +403,9 @@
"likeToImportTokens": {
"message": "እነዚህን ተለዋጭ ስሞች ለማከል ይፈልጋሉ?"
},
+ "lineatestnet": {
+ "message": "የ Linea Goerli የሙከራ አውታረ መረብ"
+ },
"links": {
"message": "ማስፈንጠሪያዎች"
},
diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json
index 4fcdad96044a..aac31f24665e 100644
--- a/app/_locales/ar/messages.json
+++ b/app/_locales/ar/messages.json
@@ -167,6 +167,9 @@
"connectingToGoerli": {
"message": "الاتصال بشبكة اختبار Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "الاتصال بشبكة اختبار Linea Goerli"
+ },
"connectingToMainnet": {
"message": "جارِ الاتصال بشبكة إيثيريوم الرئيسية"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "هل ترغب في إضافة هذه الرموز؟"
},
+ "lineatestnet": {
+ "message": "شبكة اختبار Linea Goerli"
+ },
"links": {
"message": "الروابط"
},
diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json
index dcd59943183e..eea674ea692a 100644
--- a/app/_locales/bg/messages.json
+++ b/app/_locales/bg/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Свързване с тестова мрежа на Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Свързване с тестова мрежа на Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Свързване с главната мрежа Ethereum"
},
@@ -408,6 +411,9 @@
"likeToImportTokens": {
"message": "Искате ли да добавите тези жетони?"
},
+ "lineatestnet": {
+ "message": "Тестова мрежа на Linea Goerli"
+ },
"links": {
"message": "Връзки"
},
diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json
index 14c6c1a62456..c382f3619b1e 100644
--- a/app/_locales/ca/messages.json
+++ b/app/_locales/ca/messages.json
@@ -160,6 +160,9 @@
"connectingToGoerli": {
"message": "Connectant a Xarxa de Prova Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Connectant a Xarxa de Prova Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Connectant a Xarxa Principal Ethereum"
},
@@ -399,6 +402,9 @@
"likeToImportTokens": {
"message": "T'agradaria afegir aquestes fitxes?"
},
+ "lineatestnet": {
+ "message": "Xarxa de test Linea Goerli"
+ },
"links": {
"message": "Enllaços"
},
diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json
index 8826e12633a5..68974f4e7966 100644
--- a/app/_locales/da/messages.json
+++ b/app/_locales/da/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Opretter forbindelse til Goerli Testnetværk"
},
+ "connectingToLineaTestnet": {
+ "message": "Opretter forbindelse til Linea Goerli Testnetværk"
+ },
"connectingToMainnet": {
"message": "Forbinder til dit Primære Ethereum Netværk"
},
@@ -405,6 +408,9 @@
"likeToImportTokens": {
"message": "Ønsker du at tilføje disse tokens?"
},
+ "lineatestnet": {
+ "message": "Linea-testnetværk"
+ },
"loadMore": {
"message": "Indlæs Mere"
},
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index 3923e2b5e5c9..a92a7de6aee1 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Verbindungsaufbau zum Goerli-Testnetzwerk"
},
+ "connectingToLineaTestnet": {
+ "message": "Verbindungsaufbau zum Linea-Testnetzwerk"
+ },
"connectingToMainnet": {
"message": "Verbinde zum Ethereum Mainnet"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Auf Etherscan anzeigen"
},
- "expandExperience": {
- "message": "Erweitern Sie Ihre Web3-Erfahrung"
- },
"expandView": {
"message": "Ansicht erweitern"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Möchtest du diese Token hinzufügen?"
},
+ "lineatestnet": {
+ "message": "Linea-Testnetzwerk"
+ },
"link": {
"message": "Link"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Fehlerhafte Daten"
},
- "manageSnaps": {
- "message": "Verwalten Sie Ihre installierten Snaps"
- },
"max": {
"message": "Max."
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index 19f736c5fdc0..bb17e4e33696 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Σύνδεση στο Δίκτυο Δοκιμής Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Σύνδεση στο δίκτυο δοκιμών Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Σύνδεση στο Κύριο Δίκτυο Ethereum"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Προβολή στην Etherscan"
},
- "expandExperience": {
- "message": "Επεκτείνετε την εμπειρία σας στο web3 με τα Snap του MetaMask"
- },
"expandView": {
"message": "Ανάπτυξη Προβολής"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Θέλετε να προσθέσετε αυτά τα token;"
},
+ "lineatestnet": {
+ "message": "Δίκτυο δοκιμών Linea Goerli"
+ },
"link": {
"message": "Σύνδεσμος"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Παραμορφωμένα δεδομένα"
},
- "manageSnaps": {
- "message": "Διαχειριστείτε τα εγκατεστημένα Snap σας"
- },
"max": {
"message": "Μέγ."
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 7b45679ff7b7..1dfc9ec31738 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -732,6 +732,9 @@
"connectingToGoerli": {
"message": "Connecting to Goerli test network"
},
+ "connectingToLineaTestnet": {
+ "message": "Connecting to Linea Goerli test network"
+ },
"connectingToMainnet": {
"message": "Connecting to Ethereum Mainnet"
},
@@ -1344,18 +1347,21 @@
"etherscanViewOn": {
"message": "View on Etherscan"
},
- "expandExperience": {
- "message": "Expand your web3 experience with MetaMask Snaps"
- },
"expandView": {
"message": "Expand view"
},
"experimental": {
"message": "Experimental"
},
+ "exploreMetaMaskSnaps": {
+ "message": "Explore MetaMask Snaps"
+ },
"exportPrivateKey": {
"message": "Export private key"
},
+ "extendWalletWithSnaps": {
+ "message": "Extend the wallet experience."
+ },
"externalExtension": {
"message": "External extension"
},
@@ -1937,6 +1943,9 @@
"likeToImportTokens": {
"message": "Would you like to import these tokens?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli test network"
+ },
"link": {
"message": "Link"
},
@@ -1997,9 +2006,6 @@
"malformedData": {
"message": "Malformed data"
},
- "manageSnaps": {
- "message": "Manage your installed snaps"
- },
"max": {
"message": "Max"
},
@@ -2285,7 +2291,7 @@
"message": "No NFTs yet"
},
"noSnaps": {
- "message": "No Snaps installed"
+ "message": "You don't have any snaps installed."
},
"noThanksVariant2": {
"message": "No, thanks."
@@ -3215,7 +3221,7 @@
"message": "Reveal seed phrase"
},
"reviewSpendingCap": {
- "message": "Review your spending cap"
+ "message": "Review the spending cap for your"
},
"revokeAllTokensTitle": {
"message": "Revoke permission to access and transfer all of your $1?",
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index 94b2d78dac63..e987868a466d 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Estableciendo conexión a la red de prueba Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Conectando a la red de prueba Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Estableciendo conexión a la red principal de Ethereum"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Ver en Etherscan"
},
- "expandExperience": {
- "message": "Amplíe su experiencia web3 con complementos de MetaMask"
- },
"expandView": {
"message": "Expandir vista"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "¿Le gustaría agregar estos tokens?"
},
+ "lineatestnet": {
+ "message": "Red de prueba Linea Goerli"
+ },
"link": {
"message": "Vínculo"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Datos con formato incorrecto"
},
- "manageSnaps": {
- "message": "Administre sus complementos instalados"
- },
"max": {
"message": "Máx."
},
diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json
index 2a4ffbb8ebcb..5e90a0c91aa7 100644
--- a/app/_locales/es_419/messages.json
+++ b/app/_locales/es_419/messages.json
@@ -451,6 +451,9 @@
"connectingToGoerli": {
"message": "Estableciendo conexión a la red de prueba Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Estableciendo conexión a la red de prueba Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Estableciendo conexión a la red principal de Ethereum"
},
@@ -1269,6 +1272,9 @@
"likeToImportTokens": {
"message": "¿Quiere agregar estos tokens?"
},
+ "lineatestnet": {
+ "message": "Red de prueba Linea Goerli"
+ },
"link": {
"message": "Enlace"
},
diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json
index 59aefc86c175..1efe138a8db1 100644
--- a/app/_locales/et/messages.json
+++ b/app/_locales/et/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Ühendamine Goerli testvõrguga"
},
+ "connectingToLineaTestnet": {
+ "message": "Ühendamine Linea Goerli testvõrguga"
+ },
"connectingToMainnet": {
"message": "Ühenduse loomine peamise Etherumi võrguga"
},
@@ -408,6 +411,9 @@
"likeToImportTokens": {
"message": "Kas soovite need load lisada?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli testvõrk"
+ },
"links": {
"message": "Lingid"
},
diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json
index 9603c04f370e..ccf627d31540 100644
--- a/app/_locales/fa/messages.json
+++ b/app/_locales/fa/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "در حال اتصال به شبکه آزمایشی Goerli "
},
+ "connectingToLineaTestnet": {
+ "message": "در حال اتصال به شبکه آزمایشی Linea Goerli"
+ },
"connectingToMainnet": {
"message": "در حال اتصال به شبکه اصلی ایتریم"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "آیا میخواهید این رمزیاب ها را اضافه نمایید؟"
},
+ "lineatestnet": {
+ "message": "شبکه آزمایشی Linea Goerli"
+ },
"links": {
"message": "لینک ها"
},
diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json
index 2ba49aee4b6e..b43b0bc46caa 100644
--- a/app/_locales/fi/messages.json
+++ b/app/_locales/fi/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Yhdistetään Goerlin testiverkostoon"
},
+ "connectingToLineaTestnet": {
+ "message": "Yhdistetään Linea Goerli testiverkostoon"
+ },
"connectingToMainnet": {
"message": "Yhdistetään Ethereumin pääverkkoon"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "Haluaisitko lisätä nämä poletit?"
},
+ "lineatestnet": {
+ "message": "Linea-testiverkko"
+ },
"links": {
"message": "Linkit"
},
diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json
index a8262f9aee17..158a9b6dc5a7 100644
--- a/app/_locales/fil/messages.json
+++ b/app/_locales/fil/messages.json
@@ -142,6 +142,9 @@
"connectingToGoerli": {
"message": "Kumokonekta sa Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "Kumokonekta sa Linea Goerli Test Network"
+ },
"connectingToMainnet": {
"message": "Kumokonekta sa Ethereum Mainnet"
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index 34849859e4bc..e2f21611a001 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Connexion au testnet Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Connexion au réseau de test Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Connexion au réseau principal Ethereum"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Afficher sur Etherscan"
},
- "expandExperience": {
- "message": "Développez votre expérience web3 avec les Snaps MetaMask"
- },
"expandView": {
"message": "Agrandir la vue"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Souhaitez-vous ajouter ces jetons ?"
},
+ "lineatestnet": {
+ "message": "Réseau de test Linea Goerli"
+ },
"link": {
"message": "Associer"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Données malformées"
},
- "manageSnaps": {
- "message": "Gérez vos Snaps installés"
- },
"max": {
"message": "Max."
},
diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json
index 646efc5b6fcf..ac025101079d 100644
--- a/app/_locales/he/messages.json
+++ b/app/_locales/he/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "מתחבר ל-Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "מתחבר ל-Linea Goerli Test Network"
+ },
"connectingToMainnet": {
"message": "מתחבר לרשת אתריום הראשית"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "האם ברצונך להוסיף טוקנים אלה?"
},
+ "lineatestnet": {
+ "message": "רשת בדיקה Linea Goerli"
+ },
"links": {
"message": "קישורים"
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index b57d88ae82e2..2c2da2a6ebf0 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Goerli टेस्ट नेटवर्क से कनेक्ट हो रहा है"
},
+ "connectingToLineaTestnet": {
+ "message": "Linea Goerli टेस्ट नेटवर्क से कनेक्ट हो रहा है"
+ },
"connectingToMainnet": {
"message": "Ethereum Mainnet से कनेक्ट हो रहा है"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Etherscan पर देखें"
},
- "expandExperience": {
- "message": "MetaMask स्नैप्स के साथ अपने web3 अनुभव का विस्तार करें"
- },
"expandView": {
"message": "दृश्य का विस्तार करें"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "क्या आप इन टोकन को इंपोर्ट करना चाहते हैं?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli टेस्ट नेटवर्क"
+ },
"link": {
"message": "लिंक"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "विकृत डेटा"
},
- "manageSnaps": {
- "message": "अपने इंस्टाल किए गए स्नैप्स मैनेज करें"
- },
"max": {
"message": "अधिकतम"
},
diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json
index 9aed6392c2a7..decdfbb9cb94 100644
--- a/app/_locales/hr/messages.json
+++ b/app/_locales/hr/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Povezivanje na testnu mrežu Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Povezivanje na testnu mrežu Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Povezivanje na glavnu mrežu Ethereum"
},
@@ -408,6 +411,9 @@
"likeToImportTokens": {
"message": "Želite li dodati ove tokene?"
},
+ "lineatestnet": {
+ "message": "Testna mreža Linea Goerli"
+ },
"links": {
"message": "Poveznice"
},
diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json
index 7a48cf68ace3..340e7e7c1f02 100644
--- a/app/_locales/hu/messages.json
+++ b/app/_locales/hu/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Csatlakozás a Goerli teszthálózathoz"
},
+ "connectingToLineaTestnet": {
+ "message": "Csatlakozás a Linea Goerli teszthálózathoz"
+ },
"connectingToMainnet": {
"message": "Csatlakozás a fő Ethereum hálózathoz"
},
@@ -408,6 +411,9 @@
"likeToImportTokens": {
"message": "Hozzá szeretné adni ezeket az érméket?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli teszthálózat"
+ },
"links": {
"message": "Linkek"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index a5c4bd5e2c26..370ffdf72441 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Menghubungkan ke jaringan uji Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Menghubungkan ke jaringan uji Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Menghubungkan ke Ethereum Mainnet"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Lihat di Etherscan"
},
- "expandExperience": {
- "message": "Perluas pengalaman web3 Anda dengan MetaMask Snaps"
- },
"expandView": {
"message": "Perluas tampilan"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Apakah Anda ingin menambahkan token ini?"
},
+ "lineatestnet": {
+ "message": "Jaringan uji Linea Goerli"
+ },
"link": {
"message": "Tautan"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Format data salah"
},
- "manageSnaps": {
- "message": "Kelola Snap yang Anda instal"
- },
"max": {
"message": "Maks"
},
diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json
index 4e5fe8a4aea2..8e6e396831c3 100644
--- a/app/_locales/it/messages.json
+++ b/app/_locales/it/messages.json
@@ -551,6 +551,9 @@
"connectingToGoerli": {
"message": "Connessione alla Rete di Test Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Connessione alla Rete di test Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Connessione alla Rete Ethereum Principale"
},
@@ -1125,6 +1128,9 @@
"likeToImportTokens": {
"message": "Vorresti aggiungere questi token?"
},
+ "lineatestnet": {
+ "message": "Rete di test Linea Goerli"
+ },
"links": {
"message": "Collegamenti"
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index 04461f0f604b..57d53796f4ca 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Goerliテストネットワークに接続中"
},
+ "connectingToLineaTestnet": {
+ "message": "Linea Goerli テストネットワークに接続中"
+ },
"connectingToMainnet": {
"message": "イーサリアムメインネットに接続中"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Etherscanで表示"
},
- "expandExperience": {
- "message": "MetaMask Snaps で web3 エクスペリエンスを拡張"
- },
"expandView": {
"message": "ビューを展開"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "これらのトークンを追加しますか?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli テストネットワーク"
+ },
"link": {
"message": "リンク"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "不正な形式のデータ"
},
- "manageSnaps": {
- "message": "インストールされたスナップの管理"
- },
"max": {
"message": "最大"
},
diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json
index 42de7215fa94..b1ab67888b3a 100644
--- a/app/_locales/kn/messages.json
+++ b/app/_locales/kn/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Goerli ಪರೀಕ್ಷಾ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ"
},
+ "connectingToLineaTestnet": {
+ "message": "Linea Goerli ಪರೀಕ್ಷಾ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ"
+ },
"connectingToMainnet": {
"message": "ಮುಖ್ಯ ಎಥೆರಿಯಮ್ ನೆಟ್ವರ್ಕ್ಗೆ ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "ನೀವು ಈ ಟೋಕನ್ಗಳನ್ನು ಸೇರಿಸಲು ಬಯಸುತ್ತೀರಾ?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli ಪರೀಕ್ಷೆ ನೆಟ್ವರ್ಕ್"
+ },
"links": {
"message": "ಲಿಂಕ್ಗಳು"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index b321862ab0cf..2826089ef4ab 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Goerli 테스트 네트워크에 연결 중"
},
+ "connectingToLineaTestnet": {
+ "message": "Linea Goerli 테스트 네트워크에 연결 중"
+ },
"connectingToMainnet": {
"message": "이더리움 메인넷에 연결 중"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Etherscan에서 보기"
},
- "expandExperience": {
- "message": "MetaMask 스냅으로 web3 경험을 확대하세요"
- },
"expandView": {
"message": "보기 확장"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "이 토큰을 추가할까요?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli 테스트 네트워크"
+ },
"link": {
"message": "링크"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "잘못된 데이터"
},
- "manageSnaps": {
- "message": "설치된 스냅을 관리하세요"
- },
"max": {
"message": "최대"
},
diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json
index f703eb3b50ff..d39141facc2d 100644
--- a/app/_locales/lt/messages.json
+++ b/app/_locales/lt/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Jungiamasi prie „Goerli“ bandomojo tinklo"
},
+ "connectingToLineaTestnet": {
+ "message": "Jungiamasi prie „Linea“ bandomojo tinklo"
+ },
"connectingToMainnet": {
"message": "Jungiamasi prie pagrindinio „Ethereum“ tinklo"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "Ar norėtumėte pridėti šiuos žetonus?"
},
+ "lineatestnet": {
+ "message": "„Linea“ bandomasis tinklas"
+ },
"links": {
"message": "Nuorodos"
},
diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json
index 46d4b0a7b8f9..d174f8442d1e 100644
--- a/app/_locales/lv/messages.json
+++ b/app/_locales/lv/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Pieslēdzas Goerli testa tīklam"
},
+ "connectingToLineaTestnet": {
+ "message": "Pieslēdzas Linea Goerli testa tīklam"
+ },
"connectingToMainnet": {
"message": "Savienojas ar galveno Ethereum tīklu"
},
@@ -408,6 +411,9 @@
"likeToImportTokens": {
"message": "Vai vēlaties pievienot šos marķierus?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli testa tīkls"
+ },
"links": {
"message": "Saites"
},
diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json
index fbc374dbbf21..5dd5a821699e 100644
--- a/app/_locales/ms/messages.json
+++ b/app/_locales/ms/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Menyambung kepada Rangkaian Ujian Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Menyambung kepada Rangkaian Ujian Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Menyambung kepada Rangkaian Ethereum Utama"
},
@@ -401,6 +404,9 @@
"likeToImportTokens": {
"message": "Adakah anda ingin menambah token ini?"
},
+ "lineatestnet": {
+ "message": "Rangkaian Ujian Linea Goerli"
+ },
"links": {
"message": "Pautan"
},
diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json
index 8f9639b6e7ee..5e904cf861f2 100644
--- a/app/_locales/no/messages.json
+++ b/app/_locales/no/messages.json
@@ -160,6 +160,9 @@
"connectingToGoerli": {
"message": "Oppretter forbindelse med Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "Oppretter forbindelse med Linea Goerli Test Network"
+ },
"connectingToMainnet": {
"message": "Forbinder med hoved-Ethereumnettverk "
},
diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json
index 59e85e10487a..48f21c3c4baf 100644
--- a/app/_locales/ph/messages.json
+++ b/app/_locales/ph/messages.json
@@ -314,6 +314,9 @@
"connectingToGoerli": {
"message": "Kumokonekta sa Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "Kumokonekta sa Linea Goerli Test Network"
+ },
"connectingToMainnet": {
"message": "Kumokonekta sa Ethereum Mainnet"
},
@@ -804,6 +807,9 @@
"likeToImportTokens": {
"message": "Gusto mo bang idagdag ang mga token na ito?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli Test Network"
+ },
"links": {
"message": "Mga Link"
},
diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json
index aaf196fa7868..531164a020e8 100644
--- a/app/_locales/pl/messages.json
+++ b/app/_locales/pl/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Łączenie z siecią testową Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Łączenie z siecią testową Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Łączenie z główną siecią Ethereum"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "Czy chcesz dodać te tokeny?"
},
+ "lineatestnet": {
+ "message": "Sieć testowa Linea Goerli"
+ },
"links": {
"message": "Łącza"
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index 86f69b1c0ba8..46fc9910facf 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Conectando à rede de testes Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Conectando à rede de teste Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Conectando à mainnet do Ethereum"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Ver no Etherscan"
},
- "expandExperience": {
- "message": "Expanda sua experiência web3 com os snaps da MetaMask"
- },
"expandView": {
"message": "Expandir exibição"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Gostaria de adicionar estes tokens?"
},
+ "lineatestnet": {
+ "message": "Rede de teste Linea Goerli"
+ },
"link": {
"message": "Link"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Dados inválidos"
},
- "manageSnaps": {
- "message": "Gerencie seus snaps instalados"
- },
"max": {
"message": "Máximo"
},
diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json
index a2a6580cc4f2..e051519b879b 100644
--- a/app/_locales/pt_BR/messages.json
+++ b/app/_locales/pt_BR/messages.json
@@ -451,6 +451,9 @@
"connectingToGoerli": {
"message": "Conectando à rede de testes Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Conectando à rede de testes Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Conectando à mainnet do Ethereum"
},
@@ -1269,6 +1272,9 @@
"likeToImportTokens": {
"message": "Você gostaria de importar esses tokens?"
},
+ "lineatestnet": {
+ "message": "Rede de testes Linea Goerli"
+ },
"link": {
"message": "Link"
},
diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json
index 37e59a3456b8..4fc35628625c 100644
--- a/app/_locales/ro/messages.json
+++ b/app/_locales/ro/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Se conectează la rețeaua de test Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Se conectează la rețeaua de test Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Se conectează la rețeaua Ethereum principală"
},
@@ -402,6 +405,9 @@
"likeToImportTokens": {
"message": "Adăugați aceste indicative?"
},
+ "lineatestnet": {
+ "message": "Rețea de test Linea Goerli"
+ },
"links": {
"message": "Link-uri"
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index dd8db16a5db0..d906e91fec79 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Подключение к тестовой сети Goerli..."
},
+ "connectingToLineaTestnet": {
+ "message": "Подключение к тестовой сети Linea..."
+ },
"connectingToMainnet": {
"message": "Подключение к сети Ethereum Mainnet..."
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Посмотреть на Etherscan"
},
- "expandExperience": {
- "message": "Расширьте свои возможности web3 с помощью MetaMask Snaps"
- },
"expandView": {
"message": "Развернуть представление"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Вы хотели бы импортировать эти токены?"
},
+ "lineatestnet": {
+ "message": "Тестовая сеть Linea Goerli"
+ },
"link": {
"message": "Привязать"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Искаженные данные"
},
- "manageSnaps": {
- "message": "Управляйте установленными снапами"
- },
"max": {
"message": "Макс."
},
diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json
index b98b4022f943..7ab10cf1e29e 100644
--- a/app/_locales/sk/messages.json
+++ b/app/_locales/sk/messages.json
@@ -157,6 +157,9 @@
"connectingToGoerli": {
"message": "Pripája sa k testovacej sieti Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Pripája sa k testovacej sieti Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Připojuji se k Ethereum Mainnet"
},
@@ -399,6 +402,9 @@
"likeToImportTokens": {
"message": "Chcete přidat tyto tokeny?"
},
+ "lineatestnet": {
+ "message": "Testovacia sieť Linea Goerli"
+ },
"links": {
"message": "Odkazy"
},
diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json
index 247fc2eb3a8a..2c774019e850 100644
--- a/app/_locales/sl/messages.json
+++ b/app/_locales/sl/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Povezovanje na testno omrežje Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Povezovanje na testno omrežje Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Povezovanje na glavno omrežje"
},
@@ -406,6 +409,9 @@
"likeToImportTokens": {
"message": "Želite dodati te žetone?"
},
+ "lineatestnet": {
+ "message": "Testno omrežje Linea Goerli"
+ },
"links": {
"message": "Povezave"
},
diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json
index 875be6323bce..c87c6972c1f0 100644
--- a/app/_locales/sr/messages.json
+++ b/app/_locales/sr/messages.json
@@ -160,6 +160,9 @@
"connectingToGoerli": {
"message": "Povezuje se sa test mrežom Goerli "
},
+ "connectingToLineaTestnet": {
+ "message": "Povezuje se sa test mrežom Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Povezuje se na glavnu Ethereum mrežu"
},
@@ -409,6 +412,9 @@
"likeToImportTokens": {
"message": "Želite li da dodate ove tokene?"
},
+ "lineatestnet": {
+ "message": "Test mreža Linea Goerli"
+ },
"links": {
"message": "Veze"
},
diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json
index 2b4eb8734cb1..f8912daa6e42 100644
--- a/app/_locales/sv/messages.json
+++ b/app/_locales/sv/messages.json
@@ -157,6 +157,9 @@
"connectingToGoerli": {
"message": "Ansluter till Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "Ansluter till Linea Goerli Test Network"
+ },
"connectingToMainnet": {
"message": "Koppla till Ethereums huvudnätverk"
},
@@ -402,6 +405,9 @@
"likeToImportTokens": {
"message": "Vill du lägga till dessa tokens?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli testnätverk"
+ },
"links": {
"message": "Länkar"
},
diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json
index 161b59ee6d20..c50e6e0bc774 100644
--- a/app/_locales/sw/messages.json
+++ b/app/_locales/sw/messages.json
@@ -157,6 +157,9 @@
"connectingToGoerli": {
"message": "Inaunganisha kwenye Mtandao wa Majaribio wa Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Inaunganisha kwenye Mtandao wa Majaribio wa Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Inaunganisha kwenye Mtandao Mkuu wa Ethereum"
},
@@ -399,6 +402,9 @@
"likeToImportTokens": {
"message": "Je, ungependa kuongeza vianzio hivi?"
},
+ "lineatestnet": {
+ "message": "Mtandao wa Majaribio wa Linea Goerli"
+ },
"links": {
"message": "Viungo"
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index d7e0c937ddd4..334c05393a01 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Kumokonekta sa Goerli Test Network"
},
+ "connectingToLineaTestnet": {
+ "message": "Kumokonekta sa Linea Goerli test network"
+ },
"connectingToMainnet": {
"message": "Kumokonekta sa Ethereum Mainnet"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Tingnan sa Etherscan"
},
- "expandExperience": {
- "message": "Palawakin ang iyong karanasan sa web3 gamit ang MetaMask Snaps"
- },
"expandView": {
"message": "I-expand ang view"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Gusto mo bang idagdag ang mga token na ito?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli test network"
+ },
"link": {
"message": "Link"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Pangit na datos"
},
- "manageSnaps": {
- "message": "Pamahalaan ang iyong mga naka-install na snap"
- },
"max": {
"message": "Max"
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index 5887a63d5615..3b85a7dc8da7 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Goerli Test Ağına Bağlanıyor"
},
+ "connectingToLineaTestnet": {
+ "message": "Linea Goerli test ağına bağlanılıyor"
+ },
"connectingToMainnet": {
"message": "Ethereum Mainnet ağına bağlanıyor"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Etherscan'de görüntüle"
},
- "expandExperience": {
- "message": "MetaMask Snap'leri ile web3 deneyimini genişlet"
- },
"expandView": {
"message": "Görünümü genişlet"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Bu tokenleri içe aktarmak ister misiniz?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli test ağı"
+ },
"link": {
"message": "Bağlantı"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Hatalı biçimlendirilmiş veri"
},
- "manageSnaps": {
- "message": "Yüklü snap'lerini yönet"
- },
"max": {
"message": "Maksimum"
},
diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json
index 6609fec2f0f1..83f6857dee85 100644
--- a/app/_locales/uk/messages.json
+++ b/app/_locales/uk/messages.json
@@ -163,6 +163,9 @@
"connectingToGoerli": {
"message": "Підключення до тестової мережі Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Підключення до тестової мережі Linea Goerli"
+ },
"connectingToMainnet": {
"message": "З'єднуємось з Головною мережею Ethereum"
},
@@ -412,6 +415,9 @@
"likeToImportTokens": {
"message": "Ви б хотіли додати ці токени?"
},
+ "lineatestnet": {
+ "message": "Тестова мережа Linea Goerli"
+ },
"links": {
"message": "Посилання"
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index 9a19d71b3da3..00897f945df9 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "Đang kết nối với mạng thử nghiệm Goerli"
},
+ "connectingToLineaTestnet": {
+ "message": "Đang kết nối với mạng thử nghiệm Linea Goerli"
+ },
"connectingToMainnet": {
"message": "Đang kết nối với mạng chính thức của Ethereum"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "Xem trên Etherscan"
},
- "expandExperience": {
- "message": "Mở rộng trải nghiệm web3 của bạn với MetaMask Snap"
- },
"expandView": {
"message": "Mở rộng cửa sổ xem"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "Bạn có muốn nhập những token này không?"
},
+ "lineatestnet": {
+ "message": "Mạng thử nghiệm Linea Goerli"
+ },
"link": {
"message": "Liên kết"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "Dữ liệu không đúng định dạng"
},
- "manageSnaps": {
- "message": "Quản lý các Snap đã cài đặt"
- },
"max": {
"message": "Tối đa"
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index 49b04ecd2435..096dcd1e4c29 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -711,6 +711,9 @@
"connectingToGoerli": {
"message": "正在连接 Goerli 测试网络"
},
+ "connectingToLineaTestnet": {
+ "message": "正在连接Linea测试网络"
+ },
"connectingToMainnet": {
"message": "正在连接到以太坊主网"
},
@@ -1320,9 +1323,6 @@
"etherscanViewOn": {
"message": "在 Etherscan 上查看"
},
- "expandExperience": {
- "message": "扩展MetaMask Snap的web3体验"
- },
"expandView": {
"message": "展开视图"
},
@@ -1895,6 +1895,9 @@
"likeToImportTokens": {
"message": "您想导入这些代币吗?"
},
+ "lineatestnet": {
+ "message": "Linea测试网络"
+ },
"link": {
"message": "链接"
},
@@ -1955,9 +1958,6 @@
"malformedData": {
"message": "格式错误的数据"
},
- "manageSnaps": {
- "message": "管理已安装的Snap"
- },
"max": {
"message": "最大"
},
diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json
index 6fb45813b863..ccb72664bb66 100644
--- a/app/_locales/zh_TW/messages.json
+++ b/app/_locales/zh_TW/messages.json
@@ -313,6 +313,9 @@
"connectingToGoerli": {
"message": "連線到 Goerli 測試網路"
},
+ "connectingToLineaTestnet": {
+ "message": "連線到 Linea Goerli 測試網路"
+ },
"connectingToMainnet": {
"message": "連線到 Ethereum 主網路"
},
@@ -812,6 +815,9 @@
"likeToImportTokens": {
"message": "確定要加入代幣?"
},
+ "lineatestnet": {
+ "message": "Linea Goerli 測試網路"
+ },
"links": {
"message": "連結"
},
diff --git a/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js b/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js
index 65ba5a2b1024..935b9ec60111 100644
--- a/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js
+++ b/app/scripts/lib/rpc-method-middleware/handlers/switch-ethereum-chain.js
@@ -110,7 +110,8 @@ async function switchEthereumChainHandler(
});
if (
chainId in CHAIN_ID_TO_TYPE_MAP &&
- approvedRequestData.type !== NETWORK_TYPES.LOCALHOST
+ approvedRequestData.type !== NETWORK_TYPES.LOCALHOST &&
+ approvedRequestData.type !== NETWORK_TYPES.LINEA_TESTNET
) {
setProviderType(approvedRequestData.type);
} else {
diff --git a/app/scripts/lib/seed-phrase-verifier.js b/app/scripts/lib/seed-phrase-verifier.js
index 5fcaf4481627..28c0b856dbd5 100644
--- a/app/scripts/lib/seed-phrase-verifier.js
+++ b/app/scripts/lib/seed-phrase-verifier.js
@@ -1,7 +1,7 @@
import { KeyringController } from '@metamask/eth-keyring-controller';
import log from 'loglevel';
-import { HardwareKeyringTypes } from '../../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../../shared/constants/keyring';
const seedPhraseVerifier = {
/**
@@ -23,7 +23,7 @@ const seedPhraseVerifier = {
const keyringController = new KeyringController({});
const keyringBuilder = keyringController.getKeyringBuilderForType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
const keyring = keyringBuilder();
const opts = {
diff --git a/app/scripts/lib/seed-phrase-verifier.test.js b/app/scripts/lib/seed-phrase-verifier.test.js
index bf888f79b8e9..be549034c354 100644
--- a/app/scripts/lib/seed-phrase-verifier.test.js
+++ b/app/scripts/lib/seed-phrase-verifier.test.js
@@ -6,13 +6,13 @@ import { cloneDeep } from 'lodash';
import { KeyringController } from '@metamask/eth-keyring-controller';
import firstTimeState from '../first-time-state';
import mockEncryptor from '../../../test/lib/mock-encryptor';
-import { HardwareKeyringTypes } from '../../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../../shared/constants/keyring';
import seedPhraseVerifier from './seed-phrase-verifier';
describe('SeedPhraseVerifier', () => {
describe('verifyAccounts', () => {
const password = 'passw0rd1';
- const { hdKeyTree } = HardwareKeyringTypes;
+ const { hdKeyTree } = KeyringType;
let keyringController;
let primaryKeyring;
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 3e567c5d69c6..0a395106a9d2 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -74,10 +74,8 @@ import {
SWAPS_CLIENT_ID,
} from '../../shared/constants/swaps';
import { CHAIN_IDS, NETWORK_TYPES } from '../../shared/constants/network';
-import {
- HardwareDeviceNames,
- HardwareKeyringTypes,
-} from '../../shared/constants/hardware-wallets';
+import { HardwareDeviceNames } from '../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../shared/constants/keyring';
import {
CaveatTypes,
RestrictedMethods,
@@ -2372,7 +2370,7 @@ export default class MetamaskController extends EventEmitter {
);
const [primaryKeyring] = keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
if (!primaryKeyring) {
throw new Error('MetamaskController - No HD Key Tree found');
@@ -2496,10 +2494,10 @@ export default class MetamaskController extends EventEmitter {
// Accounts
const [hdKeyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
const simpleKeyPairKeyrings = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
const hdAccounts = await hdKeyring.getAccounts();
const simpleKeyPairKeyringAccounts = await Promise.all(
@@ -2663,7 +2661,7 @@ export default class MetamaskController extends EventEmitter {
*/
getPrimaryKeyringMnemonic() {
const [keyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
if (!keyring.mnemonic) {
throw new Error('Primary keyring mnemonic unavailable.');
@@ -2803,12 +2801,12 @@ export default class MetamaskController extends EventEmitter {
async getAccountType(address) {
const keyring = await this.keyringController.getKeyringForAccount(address);
switch (keyring.type) {
- case HardwareKeyringTypes.trezor:
- case HardwareKeyringTypes.lattice:
- case HardwareKeyringTypes.qr:
- case HardwareKeyringTypes.ledger:
+ case KeyringType.trezor:
+ case KeyringType.lattice:
+ case KeyringType.qr:
+ case KeyringType.ledger:
return 'hardware';
- case HardwareKeyringTypes.imported:
+ case KeyringType.imported:
return 'imported';
default:
return 'MetaMask';
@@ -2826,14 +2824,14 @@ export default class MetamaskController extends EventEmitter {
async getDeviceModel(address) {
const keyring = await this.keyringController.getKeyringForAccount(address);
switch (keyring.type) {
- case HardwareKeyringTypes.trezor:
+ case KeyringType.trezor:
return keyring.getModel();
- case HardwareKeyringTypes.qr:
+ case KeyringType.qr:
return keyring.getName();
- case HardwareKeyringTypes.ledger:
+ case KeyringType.ledger:
// TODO: get model after ledger keyring exposes method
return HardwareDeviceNames.ledger;
- case HardwareKeyringTypes.lattice:
+ case KeyringType.lattice:
// TODO: get model after lattice keyring exposes method
return HardwareDeviceNames.lattice;
default:
@@ -2907,7 +2905,7 @@ export default class MetamaskController extends EventEmitter {
*/
async addNewAccount(accountCount) {
const [primaryKeyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
if (!primaryKeyring) {
throw new Error('MetamaskController - No HD Key Tree found');
@@ -2952,7 +2950,7 @@ export default class MetamaskController extends EventEmitter {
*/
async verifySeedPhrase() {
const [primaryKeyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.hdKeyTree,
+ KeyringType.hdKeyTree,
);
if (!primaryKeyring) {
throw new Error('MetamaskController - No HD Key Tree found');
@@ -3074,7 +3072,7 @@ export default class MetamaskController extends EventEmitter {
async importAccountWithStrategy(strategy, args) {
const privateKey = await accountImporter.importAccount(strategy, args);
const keyring = await this.keyringController.addNewKeyring(
- HardwareKeyringTypes.imported,
+ KeyringType.imported,
[privateKey],
);
const [firstAccount] = await keyring.getAccounts();
@@ -3229,7 +3227,7 @@ export default class MetamaskController extends EventEmitter {
const keyring = await this.keyringController.getKeyringForAccount(address);
switch (keyring.type) {
- case HardwareKeyringTypes.ledger: {
+ case KeyringType.ledger: {
return new Promise((_, reject) => {
reject(
new Error('Ledger does not support eth_getEncryptionPublicKey.'),
@@ -3237,7 +3235,7 @@ export default class MetamaskController extends EventEmitter {
});
}
- case HardwareKeyringTypes.trezor: {
+ case KeyringType.trezor: {
return new Promise((_, reject) => {
reject(
new Error('Trezor does not support eth_getEncryptionPublicKey.'),
@@ -3245,7 +3243,7 @@ export default class MetamaskController extends EventEmitter {
});
}
- case HardwareKeyringTypes.lattice: {
+ case KeyringType.lattice: {
return new Promise((_, reject) => {
reject(
new Error('Lattice does not support eth_getEncryptionPublicKey.'),
@@ -3253,7 +3251,7 @@ export default class MetamaskController extends EventEmitter {
});
}
- case HardwareKeyringTypes.qr: {
+ case KeyringType.qr: {
return Promise.reject(
new Error('QR hardware does not support eth_getEncryptionPublicKey.'),
);
@@ -4296,14 +4294,14 @@ export default class MetamaskController extends EventEmitter {
*/
setLocked() {
const [trezorKeyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.trezor,
+ KeyringType.trezor,
);
if (trezorKeyring) {
trezorKeyring.dispose();
}
const [ledgerKeyring] = this.keyringController.getKeyringsByType(
- HardwareKeyringTypes.ledger,
+ KeyringType.ledger,
);
ledgerKeyring?.destroy?.();
diff --git a/app/scripts/metamask-controller.test.js b/app/scripts/metamask-controller.test.js
index 03e335a26c94..7506c17cb9ea 100644
--- a/app/scripts/metamask-controller.test.js
+++ b/app/scripts/metamask-controller.test.js
@@ -11,10 +11,8 @@ import { TransactionStatus } from '../../shared/constants/transaction';
import createTxMeta from '../../test/lib/createTxMeta';
import { NETWORK_TYPES } from '../../shared/constants/network';
import { createTestProviderTools } from '../../test/stub/provider';
-import {
- HardwareDeviceNames,
- HardwareKeyringTypes,
-} from '../../shared/constants/hardware-wallets';
+import { HardwareDeviceNames } from '../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../shared/constants/keyring';
import { deferredPromise } from './lib/util';
const Ganache = require('../../test/e2e/ganache');
@@ -275,7 +273,7 @@ describe('MetaMaskController', function () {
it('adds private key to keyrings in KeyringController', async function () {
const simpleKeyrings =
metamaskController.keyringController.getKeyringsByType(
- HardwareKeyringTypes.imported,
+ KeyringType.imported,
);
const pubAddressHexArr = await simpleKeyrings[0].getAccounts();
const privKeyHex = await simpleKeyrings[0].exportAccount(
@@ -555,11 +553,11 @@ describe('MetaMaskController', function () {
.catch(() => null);
const keyrings =
await metamaskController.keyringController.getKeyringsByType(
- HardwareKeyringTypes.trezor,
+ KeyringType.trezor,
);
assert.deepEqual(
metamaskController.keyringController.addNewKeyring.getCall(0).args,
- [HardwareKeyringTypes.trezor],
+ [KeyringType.trezor],
);
assert.equal(keyrings.length, 1);
});
@@ -571,11 +569,11 @@ describe('MetaMaskController', function () {
.catch(() => null);
const keyrings =
await metamaskController.keyringController.getKeyringsByType(
- HardwareKeyringTypes.ledger,
+ KeyringType.ledger,
);
assert.deepEqual(
metamaskController.keyringController.addNewKeyring.getCall(0).args,
- [HardwareKeyringTypes.ledger],
+ [KeyringType.ledger],
);
assert.equal(keyrings.length, 1);
});
@@ -651,7 +649,7 @@ describe('MetaMaskController', function () {
await metamaskController.forgetDevice(HardwareDeviceNames.trezor);
const keyrings =
await metamaskController.keyringController.getKeyringsByType(
- HardwareKeyringTypes.trezor,
+ KeyringType.trezor,
);
assert.deepEqual(keyrings[0].accounts, []);
@@ -711,7 +709,7 @@ describe('MetaMaskController', function () {
it('should set unlockedAccount in the keyring', async function () {
const keyrings =
await metamaskController.keyringController.getKeyringsByType(
- HardwareKeyringTypes.trezor,
+ KeyringType.trezor,
);
assert.equal(keyrings[0].unlockedAccount, accountToUnlock);
});
diff --git a/development/states/navigate-txs.json b/development/states/navigate-txs.json
index 68d2535a2d13..6a4605e9afa1 100644
--- a/development/states/navigate-txs.json
+++ b/development/states/navigate-txs.json
@@ -304,7 +304,8 @@
"infuraNetworkStatus": {
"mainnet": "ok",
"goerli": "ok",
- "sepolia": "ok"
+ "sepolia": "ok",
+ "lineatestnet": "ok"
}
},
"send": {
diff --git a/development/static-server.js b/development/static-server.js
index facdc915bf2f..bb15133d6fdd 100755
--- a/development/static-server.js
+++ b/development/static-server.js
@@ -1,14 +1,13 @@
#!/usr/bin/env node
-const fs = require('fs');
+const fs = require('fs').promises;
const path = require('path');
const chalk = require('chalk');
-const pify = require('pify');
const createStaticServer = require('./create-static-server');
const { parsePort } = require('./lib/parse-port');
-const fsStat = pify(fs.stat);
+const fsStat = fs.stat;
const DEFAULT_PORT = 9080;
const onResponse = (request, response) => {
diff --git a/shared/constants/hardware-wallets.ts b/shared/constants/hardware-wallets.ts
index 71cdeb0384ff..4f549aa2fb9d 100644
--- a/shared/constants/hardware-wallets.ts
+++ b/shared/constants/hardware-wallets.ts
@@ -1,15 +1,11 @@
/**
- * Accounts can be instantiated from simple, HD or the multiple hardware wallet
- * keyring types. Both simple and HD are treated as default but we do special
- * case accounts managed by a hardware wallet.
+ * Hardware wallets supported by MetaMask.
*/
-export enum HardwareKeyringTypes {
+export enum HardwareKeyringType {
ledger = 'Ledger Hardware',
trezor = 'Trezor Hardware',
lattice = 'Lattice Hardware',
qr = 'QR Hardware Wallet Device',
- hdKeyTree = 'HD Key Tree',
- imported = 'Simple Key Pair',
}
export enum HardwareKeyringNames {
diff --git a/shared/constants/keyring.ts b/shared/constants/keyring.ts
new file mode 100644
index 000000000000..f285fa468f9c
--- /dev/null
+++ b/shared/constants/keyring.ts
@@ -0,0 +1,17 @@
+import { HardwareKeyringType } from './hardware-wallets';
+
+/**
+ * These are the keyrings that are managed entirely by MetaMask.
+ */
+export enum InternalKeyringType {
+ hdKeyTree = 'HD Key Tree',
+ imported = 'Simple Key Pair',
+}
+
+/**
+ * All keyrings supported by MetaMask.
+ */
+export const KeyringType = {
+ ...HardwareKeyringType,
+ ...InternalKeyringType,
+};
diff --git a/shared/constants/network.ts b/shared/constants/network.ts
index 58ca0ce1c464..16bafb208dda 100644
--- a/shared/constants/network.ts
+++ b/shared/constants/network.ts
@@ -95,6 +95,7 @@ export const NETWORK_TYPES = {
MAINNET: 'mainnet',
RPC: 'rpc',
SEPOLIA: 'sepolia',
+ LINEA_TESTNET: 'lineatestnet',
} as const;
/**
@@ -120,6 +121,7 @@ export const NETWORK_IDS = {
GOERLI: '5',
LOCALHOST: '1337',
SEPOLIA: '11155111',
+ LINEA_TESTNET: '59140',
} as const;
/**
@@ -145,6 +147,7 @@ export const CHAIN_IDS = {
HARMONY: '0x63564c40',
PALM: '0x2a15c308d',
SEPOLIA: '0xaa36a7',
+ LINEA_TESTNET: '0xe704',
AURORA: '0x4e454152',
MOONBEAM: '0x504',
MOONBEAM_TESTNET: '0x507',
@@ -160,6 +163,7 @@ export const MAX_SAFE_CHAIN_ID = 4503599627370476;
export const MAINNET_DISPLAY_NAME = 'Ethereum Mainnet';
export const GOERLI_DISPLAY_NAME = 'Goerli';
export const SEPOLIA_DISPLAY_NAME = 'Sepolia';
+export const LINEA_TESTNET_DISPLAY_NAME = 'Linea Goerli test network';
export const LOCALHOST_DISPLAY_NAME = 'Localhost 8545';
export const BSC_DISPLAY_NAME = 'Binance Smart Chain';
export const POLYGON_DISPLAY_NAME = 'Polygon';
@@ -189,6 +193,7 @@ export const MAINNET_RPC_URL = getRpcUrl({
});
export const GOERLI_RPC_URL = getRpcUrl({ network: NETWORK_TYPES.GOERLI });
export const SEPOLIA_RPC_URL = getRpcUrl({ network: NETWORK_TYPES.SEPOLIA });
+export const LINEA_TESTNET_RPC_URL = 'https://rpc.goerli.linea.build';
export const LOCALHOST_RPC_URL = 'http://localhost:8545';
/**
@@ -238,6 +243,7 @@ export const INFURA_PROVIDER_TYPES = [
export const TEST_CHAINS = [
CHAIN_IDS.GOERLI,
CHAIN_IDS.SEPOLIA,
+ CHAIN_IDS.LINEA_TESTNET,
CHAIN_IDS.LOCALHOST,
];
@@ -256,6 +262,10 @@ export const TEST_NETWORK_TICKER_MAP: {
[NETWORK_TYPES.SEPOLIA]: `${typedCapitalize(NETWORK_TYPES.SEPOLIA)}${
CURRENCY_SYMBOLS.ETH
}`,
+ [NETWORK_TYPES.LINEA_TESTNET]:
+ `Linea${CURRENCY_SYMBOLS.ETH}` as `${Capitalize<
+ typeof NETWORK_TYPES.LINEA_TESTNET
+ >}${typeof CURRENCY_SYMBOLS.ETH}`,
};
/**
@@ -274,6 +284,12 @@ export const BUILT_IN_NETWORKS = {
ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.SEPOLIA],
blockExplorerUrl: `https://${NETWORK_TYPES.SEPOLIA}.etherscan.io`,
},
+ [NETWORK_TYPES.LINEA_TESTNET]: {
+ networkId: NETWORK_IDS.LINEA_TESTNET,
+ chainId: CHAIN_IDS.LINEA_TESTNET,
+ ticker: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.LINEA_TESTNET],
+ blockExplorerUrl: 'https://explorer.goerli.linea.build',
+ },
[NETWORK_TYPES.MAINNET]: {
networkId: NETWORK_IDS.MAINNET,
chainId: CHAIN_IDS.MAINNET,
@@ -289,15 +305,18 @@ export const NETWORK_TO_NAME_MAP = {
[NETWORK_TYPES.MAINNET]: MAINNET_DISPLAY_NAME,
[NETWORK_TYPES.GOERLI]: GOERLI_DISPLAY_NAME,
[NETWORK_TYPES.SEPOLIA]: SEPOLIA_DISPLAY_NAME,
+ [NETWORK_TYPES.LINEA_TESTNET]: LINEA_TESTNET_DISPLAY_NAME,
[NETWORK_TYPES.LOCALHOST]: LOCALHOST_DISPLAY_NAME,
[NETWORK_IDS.GOERLI]: GOERLI_DISPLAY_NAME,
[NETWORK_IDS.SEPOLIA]: SEPOLIA_DISPLAY_NAME,
+ [NETWORK_IDS.LINEA_TESTNET]: LINEA_TESTNET_DISPLAY_NAME,
[NETWORK_IDS.MAINNET]: MAINNET_DISPLAY_NAME,
[NETWORK_IDS.LOCALHOST]: LOCALHOST_DISPLAY_NAME,
[CHAIN_IDS.GOERLI]: GOERLI_DISPLAY_NAME,
[CHAIN_IDS.SEPOLIA]: SEPOLIA_DISPLAY_NAME,
+ [CHAIN_IDS.LINEA_TESTNET]: LINEA_TESTNET_DISPLAY_NAME,
[CHAIN_IDS.MAINNET]: MAINNET_DISPLAY_NAME,
[CHAIN_IDS.LOCALHOST]: LOCALHOST_DISPLAY_NAME,
} as const;
@@ -306,12 +325,14 @@ export const CHAIN_ID_TO_TYPE_MAP = {
[CHAIN_IDS.MAINNET]: NETWORK_TYPES.MAINNET,
[CHAIN_IDS.GOERLI]: NETWORK_TYPES.GOERLI,
[CHAIN_IDS.SEPOLIA]: NETWORK_TYPES.SEPOLIA,
+ [CHAIN_IDS.LINEA_TESTNET]: NETWORK_TYPES.LINEA_TESTNET,
[CHAIN_IDS.LOCALHOST]: NETWORK_TYPES.LOCALHOST,
} as const;
export const CHAIN_ID_TO_RPC_URL_MAP = {
[CHAIN_IDS.GOERLI]: GOERLI_RPC_URL,
[CHAIN_IDS.SEPOLIA]: SEPOLIA_RPC_URL,
+ [CHAIN_IDS.LINEA_TESTNET]: LINEA_TESTNET_RPC_URL,
[CHAIN_IDS.MAINNET]: MAINNET_RPC_URL,
[CHAIN_IDS.LOCALHOST]: LOCALHOST_RPC_URL,
} as const;
@@ -333,6 +354,7 @@ export const CHAIN_ID_TO_NETWORK_IMAGE_URL_MAP = {
export const NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP = {
[NETWORK_IDS.GOERLI]: NETWORK_TYPES.GOERLI,
[NETWORK_IDS.SEPOLIA]: NETWORK_TYPES.SEPOLIA,
+ [NETWORK_IDS.LINEA_TESTNET]: NETWORK_TYPES.LINEA_TESTNET,
[NETWORK_IDS.MAINNET]: NETWORK_NAMES.HOMESTEAD,
} as const;
@@ -340,6 +362,7 @@ export const CHAIN_ID_TO_NETWORK_ID_MAP = {
[CHAIN_IDS.MAINNET]: NETWORK_IDS.MAINNET,
[CHAIN_IDS.GOERLI]: NETWORK_IDS.GOERLI,
[CHAIN_IDS.SEPOLIA]: NETWORK_IDS.SEPOLIA,
+ [CHAIN_IDS.LINEA_TESTNET]: NETWORK_IDS.LINEA_TESTNET,
[CHAIN_IDS.LOCALHOST]: NETWORK_IDS.LOCALHOST,
} as const;
@@ -380,6 +403,11 @@ export const ETHERSCAN_SUPPORTED_NETWORKS = {
}`,
networkId: CHAIN_ID_TO_NETWORK_ID_MAP[CHAIN_IDS.SEPOLIA],
},
+ [CHAIN_IDS.LINEA_TESTNET]: {
+ domain: 'linea.build',
+ subdomain: 'explorer.goerli',
+ networkId: CHAIN_ID_TO_NETWORK_ID_MAP[CHAIN_IDS.LINEA_TESTNET],
+ },
[CHAIN_IDS.BSC]: {
domain: 'bscscan.com',
subdomain: defaultEtherscanSubdomainPrefix,
@@ -504,6 +532,7 @@ export const BUYABLE_CHAINS_MAP: {
| typeof CHAIN_IDS.MOONBEAM_TESTNET
| typeof CHAIN_IDS.MOONRIVER
| typeof CHAIN_IDS.AURORA
+ | typeof CHAIN_IDS.LINEA_TESTNET
>]: BuyableChainSettings;
} = {
[CHAIN_IDS.MAINNET]: {
@@ -650,3 +679,6 @@ export const FEATURED_RPCS: RPCDefinition[] = [
},
},
];
+
+export const SHOULD_SHOW_LINEA_TESTNET_NETWORK =
+ new Date().getTime() > Date.UTC(2023, 2, 28);
diff --git a/test/e2e/snaps/test-snap-management.spec.js b/test/e2e/snaps/test-snap-management.spec.js
index b8eab6b0b390..cb44e7d57e4a 100644
--- a/test/e2e/snaps/test-snap-management.spec.js
+++ b/test/e2e/snaps/test-snap-management.spec.js
@@ -145,9 +145,12 @@ describe('Test Snap Management', function () {
// check the results of the removal
await driver.delay(2000);
const removeResult = await driver.findElement(
- '.snap-list-tab__container--no-snaps',
+ '.snap-list-tab__container--no-snaps_inner',
+ );
+ assert.equal(
+ await removeResult.getText(),
+ "You don't have any snaps installed.",
);
- assert.equal(await removeResult.getText(), 'No Snaps installed');
},
);
});
diff --git a/test/e2e/tests/custom-token-add-approve.spec.js b/test/e2e/tests/custom-token-add-approve.spec.js
index 62700d389016..b520f1bcf73d 100644
--- a/test/e2e/tests/custom-token-add-approve.spec.js
+++ b/test/e2e/tests/custom-token-add-approve.spec.js
@@ -162,7 +162,7 @@ describe('Create token, approve token and approve token without gas', function (
await driver.clickElement({ text: 'Next', tag: 'button' });
await driver.findElement({
- text: 'Review your spending cap',
+ text: 'Review the spending cap for your',
tag: 'div',
});
diff --git a/test/jest/mock-store.js b/test/jest/mock-store.js
index b0dd8eaee13c..80c477a10db2 100644
--- a/test/jest/mock-store.js
+++ b/test/jest/mock-store.js
@@ -1,5 +1,5 @@
import { CHAIN_IDS } from '../../shared/constants/network';
-import { HardwareKeyringTypes } from '../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../shared/constants/keyring';
const createGetSmartTransactionFeesApiResponse = () => {
return {
@@ -252,13 +252,10 @@ export const createSwapsMockStore = () => {
},
},
selectedAddress: '0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
- keyringTypes: [
- HardwareKeyringTypes.imported,
- HardwareKeyringTypes.hdKeyTree,
- ],
+ keyringTypes: [KeyringType.imported, KeyringType.hdKeyTree],
keyrings: [
{
- type: HardwareKeyringTypes.hdKeyTree,
+ type: KeyringType.hdKeyTree,
accounts: [
'0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
'c5b8dbac4c1d3f152cdeb400e2313f309c410acb',
@@ -266,7 +263,7 @@ export const createSwapsMockStore = () => {
],
},
{
- type: HardwareKeyringTypes.imported,
+ type: KeyringType.imported,
accounts: ['0xd85a4b6a394794842887b8284293d69163007bbb'],
},
],
diff --git a/ui/components/app/account-menu/account-menu.test.js b/ui/components/app/account-menu/account-menu.test.js
index 494171fa0b40..f7ded9a92c76 100644
--- a/ui/components/app/account-menu/account-menu.test.js
+++ b/ui/components/app/account-menu/account-menu.test.js
@@ -3,7 +3,7 @@ import sinon from 'sinon';
import configureMockStore from 'redux-mock-store';
import { fireEvent, screen } from '@testing-library/react';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
-import { HardwareKeyringTypes } from '../../../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../../../shared/constants/keyring';
import AccountMenu from '.';
describe('Account Menu', () => {
@@ -37,11 +37,11 @@ describe('Account Menu', () => {
],
keyrings: [
{
- type: HardwareKeyringTypes.hdKeyTree,
+ type: KeyringType.hdKeyTree,
accounts: ['0xAdress'],
},
{
- type: HardwareKeyringTypes.imported,
+ type: KeyringType.imported,
accounts: ['0x1'],
},
],
diff --git a/ui/components/app/account-menu/keyring-label.js b/ui/components/app/account-menu/keyring-label.js
index 985c54ae583a..c4cf8b85c8c5 100644
--- a/ui/components/app/account-menu/keyring-label.js
+++ b/ui/components/app/account-menu/keyring-label.js
@@ -2,10 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useI18nContext } from '../../../hooks/useI18nContext';
-import {
- HardwareKeyringNames,
- HardwareKeyringTypes,
-} from '../../../../shared/constants/hardware-wallets';
+import { HardwareKeyringNames } from '../../../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../../../shared/constants/keyring';
export default function KeyRingLabel({ keyring }) {
const t = useI18nContext();
@@ -19,19 +17,19 @@ export default function KeyRingLabel({ keyring }) {
const { type } = keyring;
switch (type) {
- case HardwareKeyringTypes.qr:
+ case KeyringType.qr:
label = HardwareKeyringNames.qr;
break;
- case HardwareKeyringTypes.imported:
+ case KeyringType.imported:
label = t('imported');
break;
- case HardwareKeyringTypes.trezor:
+ case KeyringType.trezor:
label = HardwareKeyringNames.trezor;
break;
- case HardwareKeyringTypes.ledger:
+ case KeyringType.ledger:
label = HardwareKeyringNames.ledger;
break;
- case HardwareKeyringTypes.lattice:
+ case KeyringType.lattice:
label = HardwareKeyringNames.lattice;
break;
default:
diff --git a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js
index 42fe9d67e752..c710da525f63 100644
--- a/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js
+++ b/ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.test.js
@@ -11,7 +11,7 @@ import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import * as actions from '../../../../store/actions';
import { CHAIN_IDS } from '../../../../../shared/constants/network';
-import { HardwareKeyringTypes } from '../../../../../shared/constants/hardware-wallets';
+import { KeyringType } from '../../../../../shared/constants/keyring';
import UnconnectedAccountAlert from '.';
@@ -49,7 +49,7 @@ describe('Unconnected Account Alert', () => {
const keyrings = [
{
- type: HardwareKeyringTypes.hdKeyTree,
+ type: KeyringType.hdKeyTree,
accounts: [
'0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc',
'0xec1adf982415d2ef5ec55899b9bfb8bc0f29251b',
diff --git a/ui/components/app/dropdowns/network-dropdown.js b/ui/components/app/dropdowns/network-dropdown.js
index f8c7e6e971b9..09e94c4981d7 100644
--- a/ui/components/app/dropdowns/network-dropdown.js
+++ b/ui/components/app/dropdowns/network-dropdown.js
@@ -8,8 +8,13 @@ import Button from '../../ui/button';
import * as actions from '../../../store/actions';
import { openAlert as displayInvalidCustomNetworkAlert } from '../../../ducks/alerts/invalid-custom-network';
import {
+ BUILT_IN_NETWORKS,
+ CHAIN_ID_TO_RPC_URL_MAP,
+ LINEA_TESTNET_RPC_URL,
LOCALHOST_RPC_URL,
+ NETWORK_TO_NAME_MAP,
NETWORK_TYPES,
+ SHOULD_SHOW_LINEA_TESTNET_NETWORK,
} from '../../../../shared/constants/network';
import { isPrefixedFormattedHexString } from '../../../../shared/modules/network.utils';
@@ -65,6 +70,8 @@ function mapDispatchToProps(dispatch) {
setActiveNetwork: (networkConfigurationId) => {
dispatch(actions.setActiveNetwork(networkConfigurationId));
},
+ upsertNetworkConfiguration: (...args) =>
+ dispatch(actions.upsertNetworkConfiguration(...args)),
hideNetworkDropdown: () => dispatch(actions.hideNetworkDropdown()),
displayInvalidCustomNetworkAlert: (networkName) => {
dispatch(displayInvalidCustomNetworkAlert(networkName));
@@ -109,6 +116,7 @@ class NetworkDropdown extends Component {
dropdownStyles: PropTypes.object,
hideElementsForOnboarding: PropTypes.bool,
onAddClick: PropTypes.func,
+ upsertNetworkConfiguration: PropTypes.func.isRequired,
};
handleClick(newProviderType) {
@@ -231,6 +239,8 @@ class NetworkDropdown extends Component {
return t('goerli');
case NETWORK_TYPES.SEPOLIA:
return t('sepolia');
+ case NETWORK_TYPES.LINEA_TESTNET:
+ return t('lineatestnet');
case NETWORK_TYPES.LOCALHOST:
return t('localhost');
default:
@@ -275,6 +285,78 @@ class NetworkDropdown extends Component {
);
}
+ renderNonInfuraDefaultNetwork(networkConfigurations, network) {
+ const {
+ provider: { type: providerType },
+ setActiveNetwork,
+ upsertNetworkConfiguration,
+ } = this.props;
+
+ const isCurrentRpcTarget = providerType === NETWORK_TYPES.RPC;
+ return (
+