From 539a2b65f34966327e987570364f0c2a27a7fe2e Mon Sep 17 00:00:00 2001 From: Austin Akers Date: Tue, 27 Apr 2021 11:25:58 -0700 Subject: [PATCH] [Fix] 10365 My Accounts Removal (#10680) * pushing my-accounts removal * removed CONTACT_MY_ACCOUNTS_ROUTE * removed CONTACT_MY_ACCOUNTS_VIEW_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removing CONTACT_MY_ACCOUNTS_EDIT_ROUTE * removed showingMyAccounts dead code * removed more dead code related to isMyAccountsPage * removing more dead code * fixed linting error(s) * removing my-accounts component/folder * added empty contact screen ui * styled empty contact page ui * fixed linting, removed add contacts button, and fixed errors * localized text and centered No Contacts * pushing localized verification and fixed e2e test * added listRoute redirect * added listroute and fixed linting error --- app/_locales/am/messages.json | 6 - app/_locales/ar/messages.json | 6 - app/_locales/bg/messages.json | 6 - app/_locales/bn/messages.json | 6 - app/_locales/ca/messages.json | 6 - app/_locales/da/messages.json | 6 - app/_locales/de/messages.json | 6 - app/_locales/el/messages.json | 6 - app/_locales/en/messages.json | 18 +-- app/_locales/es/messages.json | 9 -- app/_locales/es_419/messages.json | 9 -- app/_locales/et/messages.json | 6 - app/_locales/fa/messages.json | 6 - app/_locales/fi/messages.json | 6 - app/_locales/fil/messages.json | 6 - app/_locales/fr/messages.json | 6 - app/_locales/he/messages.json | 6 - app/_locales/hi/messages.json | 9 -- app/_locales/hr/messages.json | 6 - app/_locales/hu/messages.json | 6 - app/_locales/id/messages.json | 9 -- app/_locales/it/messages.json | 9 -- app/_locales/ja/messages.json | 9 -- app/_locales/kn/messages.json | 6 - app/_locales/ko/messages.json | 9 -- app/_locales/lt/messages.json | 6 - app/_locales/lv/messages.json | 6 - app/_locales/ms/messages.json | 6 - app/_locales/no/messages.json | 6 - app/_locales/pl/messages.json | 6 - app/_locales/pt_BR/messages.json | 6 - app/_locales/ro/messages.json | 6 - app/_locales/ru/messages.json | 9 -- app/_locales/sk/messages.json | 6 - app/_locales/sl/messages.json | 6 - app/_locales/sr/messages.json | 6 - app/_locales/sv/messages.json | 6 - app/_locales/sw/messages.json | 6 - app/_locales/tl/messages.json | 9 -- app/_locales/uk/messages.json | 6 - app/_locales/vi/messages.json | 9 -- app/_locales/zh_CN/messages.json | 9 -- app/_locales/zh_TW/messages.json | 6 - app/images/address-book.svg | 1 + test/e2e/tests/threebox.spec.js | 2 +- ui/app/helpers/constants/routes.js | 11 -- .../contact-list-tab.component.js | 103 ++++++------------ .../contact-list-tab.container.js | 19 +--- .../edit-contact/edit-contact.component.js | 1 + .../edit-contact/edit-contact.container.js | 16 +-- .../settings/contact-list-tab/index.scss | 35 +++++- .../contact-list-tab/my-accounts/index.js | 1 - .../my-accounts/my-accounts.component.js | 34 ------ .../my-accounts/my-accounts.container.js | 15 --- .../view-contact/view-contact.container.js | 15 +-- ui/app/pages/settings/settings.component.js | 18 --- ui/app/pages/settings/settings.container.js | 24 +--- 57 files changed, 85 insertions(+), 513 deletions(-) create mode 100644 app/images/address-book.svg delete mode 100644 ui/app/pages/settings/contact-list-tab/my-accounts/index.js delete mode 100644 ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.component.js delete mode 100644 ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index d9fc32750..91c2eb214 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -594,12 +594,6 @@ "myAccounts": { "message": "የእኔ መለያዎች" }, - "myWalletAccounts": { - "message": "የቋት መለያዎቼ" - }, - "myWalletAccountsDescription": { - "message": "በ MetaMask የተፈጠሩ መለያዎችዎ በሙሉ በራስ ሰር መንገድ ወደዚህ ክፍል ይታከላሉ።" - }, "needEtherInWallet": { "message": "MetaMask በመጠቀም ያልተማከሉ መተግበሪያዎች ጋር ግንኙነት ለማድረግ፣ በቋትዎ ውስጥ Ether ያስፈልግዎታል።" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index 7fdcf1e08..ffe065f16 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -590,12 +590,6 @@ "myAccounts": { "message": "حساباتي" }, - "myWalletAccounts": { - "message": "حسابات محفظتي" - }, - "myWalletAccountsDescription": { - "message": "ستتم إضافة جميع حسابات MetaMask الخاصة بك والتي تم إنشاؤها تلقائياً إلى هذا القسم." - }, "needEtherInWallet": { "message": "للتفاعل مع التطبيقات اللامركزية باستخدام MetaMask، ستحتاج إلى الإيثير في محفظتك." }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index 5f67c391e..dde63701f 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -593,12 +593,6 @@ "myAccounts": { "message": "Моите акаунти" }, - "myWalletAccounts": { - "message": "Моите акаунти в портфейла" - }, - "myWalletAccountsDescription": { - "message": "Всичките ви създадени от MetaMask акаунти ще бъдат автоматично добавени в този раздел." - }, "needEtherInWallet": { "message": "За да взаимодействате с децентрализираните приложения, използвайки MetaMask, ще ви е необходим етер в портфейла ви." }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index 617d12be8..d2c08ab7b 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "আমার অ্যাকাউন্টগুলি" }, - "myWalletAccounts": { - "message": "আমার ওয়ালেট অ্যাকাউন্টগুলি" - }, - "myWalletAccountsDescription": { - "message": "MetaMask এর তৈরি করা আপনার সমস্ত অ্যাকাউন্টগুলি স্বয়ংক্রিয়ভাবে এই বিভাগে যোগ হয়ে যাবে।" - }, "needEtherInWallet": { "message": "MetaMask ব্যবহার করে ছড়িয়ে ছিটিয়ে থাকা অ্যাপ্লিকেশনগুলির সাথে যোগাযোগ করতে, আপনার ওয়ালেটে ইথার লাগবে।" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index 5451316e4..ab0e91b84 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -581,12 +581,6 @@ "myAccounts": { "message": "Els meus Comptes" }, - "myWalletAccounts": { - "message": "Els meus Comptes de Moneder" - }, - "myWalletAccountsDescription": { - "message": "Tots els teus comptes creats a MetaMask s'afegiran automàticament a aquesta secció." - }, "needEtherInWallet": { "message": "Per a interactuar amb aplicacions descentralitzades fent servir MetaMask, necessitaràs Ether al teu moneder." }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index bd648c9f1..24fd9a480 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -581,12 +581,6 @@ "myAccounts": { "message": "Mine Konti" }, - "myWalletAccounts": { - "message": "Mine Pungkonti" - }, - "myWalletAccountsDescription": { - "message": "Alle dine MetaMask-oprettede konti føjes automatisk til dette afsnit." - }, "needEtherInWallet": { "message": "Du skal have Ether i din tegnebog for at interagere med decentraliserede applikationer, der bruger MetaMask." }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index b212cd6e0..f04fba67c 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -576,12 +576,6 @@ "myAccounts": { "message": "Meine Accounts" }, - "myWalletAccounts": { - "message": "Meine Wallet-Konten" - }, - "myWalletAccountsDescription": { - "message": "Jedes Ihrer von MetaMask erstellten Konten wird automatisch zu diesem Abschnitt hinzugefügt." - }, "needEtherInWallet": { "message": "Um dezentralisierte Applikationen mit MetaMask verwenden zu können, benötigst du Ether in deiner Wallet." }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 3621cbdf2..d7902743a 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -594,12 +594,6 @@ "myAccounts": { "message": "Οι Λογαριασμοί μου" }, - "myWalletAccounts": { - "message": "Λογαριασμοί Πορτοφολιού" - }, - "myWalletAccountsDescription": { - "message": "Όλοι οι λογαριασμοί σας που έχετε δημιουργήσει στο MetaMask θα προστεθούν αυτόματα σε αυτήν την ενότητα." - }, "needEtherInWallet": { "message": "Για να αλληλεπιδράσετε με αποκεντρωμένες εφαρμογές χρησιμοποιώντας το MetaMask, θα χρειαστείτε Ether στο πορτοφόλι σας." }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index be2cfd51c..450190d54 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -43,15 +43,15 @@ "activityLog": { "message": "activity log" }, - "addAccount": { - "message": "Add an account" - }, "addAcquiredTokens": { "message": "Add the tokens you've acquired using MetaMask" }, "addAlias": { "message": "Add alias" }, + "addContact": { + "message": "Add contact" + }, "addEthereumChainConfirmationDescription": { "message": "This will allow this network to be used within MetaMask." }, @@ -69,6 +69,9 @@ "addEthereumChainConfirmationTitle": { "message": "Allow this site to add a network?" }, + "addFriendsAndAddresses": { + "message": "Add friends and addresses you trust" + }, "addNetwork": { "message": "Add Network" }, @@ -243,6 +246,9 @@ "browserNotSupported": { "message": "Your Browser is not supported..." }, + "builContactList": { + "message": "Build your contact list" + }, "builtInCalifornia": { "message": "MetaMask is designed and built in California." }, @@ -1096,12 +1102,6 @@ "myAccounts": { "message": "My Accounts" }, - "myWalletAccounts": { - "message": "My Wallet Accounts" - }, - "myWalletAccountsDescription": { - "message": "All of your MetaMask created accounts will automatically be added to this section." - }, "needEtherInWallet": { "message": "To interact with decentralized applications using MetaMask, you’ll need Ether in your wallet." }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 4f64607e2..b14d2744f 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "registro de actividades" }, - "addAccount": { - "message": "Agregar una cuenta" - }, "addAcquiredTokens": { "message": "Agregar los tokens que has adquirido usando MetaMask" }, @@ -975,12 +972,6 @@ "myAccounts": { "message": "Mis cuentas" }, - "myWalletAccounts": { - "message": "Mis cuentas de monedero" - }, - "myWalletAccountsDescription": { - "message": "Todas tus cuentas creadas con MetaMask serán automáticamente agregadas a esta sección." - }, "needEtherInWallet": { "message": "Para interactuar con una aplicación descentralizada usando MetaMask, necesitas tener Ether en tu monedero" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 5ed747a59..c336611d0 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "registro de actividad" }, - "addAccount": { - "message": "Agregar una cuenta" - }, "addAcquiredTokens": { "message": "Agrega los tokens adquiridos con MetaMask" }, @@ -975,12 +972,6 @@ "myAccounts": { "message": "Mis cuentas" }, - "myWalletAccounts": { - "message": "Las cuentas de mi billetera" - }, - "myWalletAccountsDescription": { - "message": "Todas tus cuentas creadas en MetaMask se agregarán automáticamente a esta sección." - }, "needEtherInWallet": { "message": "Necesitarás tener Ether en tu billetera para poder interactuar con aplicaciones descentralizadas a través de MetaMask." }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index b392fcfe1..4139c4a92 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -587,12 +587,6 @@ "myAccounts": { "message": "Minu kontod" }, - "myWalletAccounts": { - "message": "Minu rahakotikontod" - }, - "myWalletAccountsDescription": { - "message": "Sellesse jaotisesse lisatakse automaatselt kõik teie MetaMaski kontod." - }, "needEtherInWallet": { "message": "Selleks, et suhelda MetaMaski abil detsentraliseeritud rakendustega, peab teil rahakotis eetrit olema." }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 947530eb8..a60b658cf 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "حساب های من" }, - "myWalletAccounts": { - "message": "حساب های کیف من" - }, - "myWalletAccountsDescription": { - "message": "همه حساب های ایجاد شده MetaMask شما بصورت خودکار در این بخش اضافه خواهد شد." - }, "needEtherInWallet": { "message": "برای تعامل با اپلیکیشن های غیر متمرکز شده با استفاده از MetaMask، شما نیاز به ایتر در کیف تان خواهید داشت." }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index 027a38a5e..79b779fbb 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "Omat tilit" }, - "myWalletAccounts": { - "message": "Omat kukkarotilini" - }, - "myWalletAccountsDescription": { - "message": "Kaikki MetaMaskilla luodut tilisi lisätään automaattisesti tähän osastoon." - }, "needEtherInWallet": { "message": "Ollaksesi vuorovaikutuksessa hajautettujen sovellusten kanssa sinulla on oltava lompakossasi Ether." }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 8d2b438d7..be0fef29c 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -535,12 +535,6 @@ "myAccounts": { "message": "Mga Account Ko" }, - "myWalletAccounts": { - "message": "Mga Wallet Account Ko" - }, - "myWalletAccountsDescription": { - "message": "Ang lahat ng iyong account na ginawa sa MetaMask ay awtomatikong idadagdag sa seksyong ito." - }, "needEtherInWallet": { "message": "Para gumamit ng mga decentralized na application gamit ang MetaMask, mangangailangan ka ng Ether sa iyong wallet." }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index d68ac77dc..77207d133 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -582,12 +582,6 @@ "myAccounts": { "message": "Mes comptes" }, - "myWalletAccounts": { - "message": "Mes comptes de portefeuille" - }, - "myWalletAccountsDescription": { - "message": "Tous vos comptes MetaMask créés seront automatiquement ajoutés à cette section." - }, "needEtherInWallet": { "message": "Pour interagir avec des applications décentralisées à l'aide de MetaMask, vous avez besoin d'Ether dans votre portefeuille." }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index d1f6d21fc..72123870b 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -594,12 +594,6 @@ "myAccounts": { "message": "החשבונות שלי" }, - "myWalletAccounts": { - "message": "חשבונות הארנק שלי" - }, - "myWalletAccountsDescription": { - "message": "כל חשבונותיך שנוצרו ב-MetaMask יתווספו אוטומטית לחלק זה." - }, "needEtherInWallet": { "message": "כדי לתקשר עם אפליקציות מבוזרות באמצעות MetaMask, צריך להיות לך את'ר בארנק." }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index cc1cb53cb..89f5f6893 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "गतिविधि लॉग" }, - "addAccount": { - "message": "एक खाता जोड़ें" - }, "addAcquiredTokens": { "message": "आपके द्वारा MetaMask का उपयोग करके प्राप्त किए गए टोकन जोड़ें" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "मेरे खाते" }, - "myWalletAccounts": { - "message": "मेरे वॉलेट खाते" - }, - "myWalletAccountsDescription": { - "message": "आपके सभी MetaMask निर्मित खाते स्वतः ही इस अनुभाग में जोड़ दिए जाएँगे।" - }, "needEtherInWallet": { "message": "MetaMask का उपयोग करके विकेंद्रीकृत एप्लिकेशन के साथ सहभागिता करने के लिए, आपको अपने वॉलेट में Ether की आवश्यकता होगी।" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 1eb42d189..bf02b3939 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -590,12 +590,6 @@ "myAccounts": { "message": "Moji računi" }, - "myWalletAccounts": { - "message": "Moji računi za novčanik" - }, - "myWalletAccountsDescription": { - "message": "Svi se vaši računi za MetaMask automatski dodaju u ovaj odjeljak." - }, "needEtherInWallet": { "message": "Trebate Ether u svojem novčaniku kako biste ostvarili interakciju s decentraliziranim aplikacijama uporabom usluge MetaMask. " }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 06ffb1cab..cb397cd69 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -590,12 +590,6 @@ "myAccounts": { "message": "Fiókjaim" }, - "myWalletAccounts": { - "message": "Saját tárca fiókjai" - }, - "myWalletAccountsDescription": { - "message": "Az összes MetaMask által létrehozott fiókot automatikusan hozzáadja a munkamenethez." - }, "needEtherInWallet": { "message": "Ha a MetaMaskon keresztül szeretne interakcióba lépni decentralizált alkalmazással, ahhoz a tárcájában Ethernek kell lennie." }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index b4951b626..c2994711f 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "log aktivitas" }, - "addAccount": { - "message": "Tambahkan akun" - }, "addAcquiredTokens": { "message": "Tambahkan token yang Anda peroleh menggunakan MetaMask" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "Akun Saya" }, - "myWalletAccounts": { - "message": "Akun Dompet Saya" - }, - "myWalletAccountsDescription": { - "message": "Semua akun Anda yang dibuat MetaMask akan secara otomatis ditambahkan ke bagian ini." - }, "needEtherInWallet": { "message": "Untuk berinteraksi dengan aplikasi yang terdesentralisasi menggunakan MetaMask, Anda memerlukan Ether di dompet Anda." }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 2eb7d83a7..ea9f973be 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "log attività" }, - "addAccount": { - "message": "Aggiungi un account" - }, "addAcquiredTokens": { "message": "Aggiungi i token che hai acquistato usando MetaMask" }, @@ -981,12 +978,6 @@ "myAccounts": { "message": "Miei Account" }, - "myWalletAccounts": { - "message": "I miei account di portafoglio" - }, - "myWalletAccountsDescription": { - "message": "Tutti gli account creati con MetaMask saranno automaticamente aggiunti a questa sezione." - }, "needEtherInWallet": { "message": "Per interagire con applicazioni decentralizzate con MetaMask, devi possedere Ether nel tuo portafoglio." }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index 9dedd528b..1644e5897 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "アクティビティのログ" }, - "addAccount": { - "message": "アカウントの追加" - }, "addAcquiredTokens": { "message": "MetaMaskで取得したトークンを追加する" }, @@ -978,12 +975,6 @@ "myAccounts": { "message": "マイアカウント" }, - "myWalletAccounts": { - "message": "このウォレットのアカウント" - }, - "myWalletAccountsDescription": { - "message": "MetaMaskで作成したすべてのアカウントは、このセクションに自動的に追加されます。" - }, "needEtherInWallet": { "message": "MetaMaskで分散型アプリケーションを操作するには、ウォレットにEtherが必要です。" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index e04ed8d77..cbe33d70e 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "ನನ್ನ ಖಾತೆಗಳು" }, - "myWalletAccounts": { - "message": "ನನ್ನ ವ್ಯಾಲೆಟ್ ಖಾತೆಗಳು" - }, - "myWalletAccountsDescription": { - "message": "ನಿಮ್ಮ MetaMask ರಚಿಸಿದ ಎಲ್ಲಾ ಖಾತೆಗಳನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಈ ವಿಭಾಗಕ್ಕೆ ಸೇರಿಸಲಾಗುತ್ತದೆ." - }, "needEtherInWallet": { "message": "MetaMask ಬಳಸಿಕೊಂಡು ವಿಕೇಂದ್ರೀಕೃತ ಖಾತೆಗಳೊಂದಿಗೆ ಸಂವಹನ ನಡೆಸಲು, ನಿಮ್ಮ ವ್ಯಾಲೆಟ್‌ನಲ್ಲಿ ನಿಮಗೆ ಎಥರ್ ಅಗತ್ಯವಿದೆ." }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 19dd1eb62..ea089e71b 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "활동 로그" }, - "addAccount": { - "message": "계정 추가" - }, "addAcquiredTokens": { "message": "MetaMask를 이용해 얻은 토큰 추가" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "내 계정" }, - "myWalletAccounts": { - "message": "내 지갑 계정" - }, - "myWalletAccountsDescription": { - "message": "MetaMask에서 생성한 모든 계정으로 이 섹션에 자동으로 추가됩니다." - }, "needEtherInWallet": { "message": "MetaMask를 이용하는 분산형 애플리케이션과 상호작용하려면 지갑에 Ether가 있어야 합니다." }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 6ae7e26a6..f18067844 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "Mano paskyros" }, - "myWalletAccounts": { - "message": "Mano piniginės paskyros" - }, - "myWalletAccountsDescription": { - "message": "Visos jūsų „MetaMask“ sukurtos paskyros bus automatiškai įtrauktos į šį skyrių." - }, "needEtherInWallet": { "message": "Norėdami dirbti su decentralizuotomis programomis „MetaMask“, savo piniginėje turite turėti eterių." }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index feb2c796b..85848338a 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -593,12 +593,6 @@ "myAccounts": { "message": "Mani konti" }, - "myWalletAccounts": { - "message": "Mana maka konti" - }, - "myWalletAccountsDescription": { - "message": "Visi jūsu izveidotie MetaMask konti tiks automātiski pievienoti šajā sadaļā." - }, "needEtherInWallet": { "message": "Lai izmantotu decentralizētas lietotnes ar MetaMask, jūsu makā jābūt Ether." }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index e3d948a21..483925f9c 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -577,12 +577,6 @@ "myAccounts": { "message": "Akaun Saya" }, - "myWalletAccounts": { - "message": "Akaun Dompet Saya" - }, - "myWalletAccountsDescription": { - "message": "Semua akaun ciptaan MetaMask anda akan ditambahkan secara automatik kepada bahagian ini." - }, "needEtherInWallet": { "message": "Untuk berinteraksi dengan aplikasi ternyahpusat menggunakan MetaMask, anda memerlukan Ether di dalam dompet anda." }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index bb0c17ef4..a6bba8253 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -584,12 +584,6 @@ "myAccounts": { "message": "Mine kontoer " }, - "myWalletAccounts": { - "message": "mine lommebokkontoer" - }, - "myWalletAccountsDescription": { - "message": "Alle dine opprettede MetaMask-kontoer vil automatisk bli lagt til denne seksjonen. " - }, "needEtherInWallet": { "message": "Du må ha Ether i lommeboken din for å samhandle med desentraliserte applikasjoner gjennom MateMask." }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index 51919059a..e2f4db68c 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -594,12 +594,6 @@ "myAccounts": { "message": "Moje konta" }, - "myWalletAccounts": { - "message": "Moja konta portfeli" - }, - "myWalletAccountsDescription": { - "message": "Wszystkie Twoje konta utworzone w MetaMask zostaną automatycznie dodane do tej sekcji." - }, "needEtherInWallet": { "message": "Żeby skorzystać ze zdecentraliowanych aplikacji (dApps) przy pomocy MetaMask, potrzebujesz Eteru w swoim portfelu." }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index fe2723200..f5c307e86 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -585,12 +585,6 @@ "myAccounts": { "message": "Minhas Contas" }, - "myWalletAccounts": { - "message": "Contas da Minha Carteira" - }, - "myWalletAccountsDescription": { - "message": "Todas as suas contas criadas no MetaMask serão automaticamente adicionadas a esta seção." - }, "needEtherInWallet": { "message": "Para interagir com aplicações descentralizadas usando o MetaMask, você precisará de Ether na sua carteira." }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index e4d1077f1..444ba049f 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -584,12 +584,6 @@ "myAccounts": { "message": "Conturile mele" }, - "myWalletAccounts": { - "message": "Conturi My Wallet" - }, - "myWalletAccountsDescription": { - "message": "Toate conturile dvs. create pe MetaMask vor fi adăugate automat la această secțiune." - }, "needEtherInWallet": { "message": "Pentru a interacționa cu aplicațiile descentralizate prin intermediul MetaMask, trebuie să aveți Ether în portofel." }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 8d7f83259..7fce60d66 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "Журнал активности" }, - "addAccount": { - "message": "Добавить счет" - }, "addAcquiredTokens": { "message": "Добавьте токены, которые вы приобрели с помощью MetaMask" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "Мои счета" }, - "myWalletAccounts": { - "message": "Счета моего кошелька" - }, - "myWalletAccountsDescription": { - "message": "Все ваши счета, созданные в MetaMask, будут автоматически добавлены в этот раздел." - }, "needEtherInWallet": { "message": "Для взаимодействия с децентрализованными приложениями с помощью MetaMask вам понадобится Ether в вашем кошельке." }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index f7b7071b8..e23dfb73e 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -569,12 +569,6 @@ "myAccounts": { "message": "Moje účty" }, - "myWalletAccounts": { - "message": "Účty v Mojej peňaženke" - }, - "myWalletAccountsDescription": { - "message": "Do tejto sekcie sa automaticky pridajú všetky vaše účty vytvorené pomocou MetaMask." - }, "needEtherInWallet": { "message": "Potřebujete Ether v peněžence, abyste mohli pomocí MetaMasku interagovat s decentralizovanými aplikacemi." }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index 481f307c5..47a5a1737 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -585,12 +585,6 @@ "myAccounts": { "message": "Moji računi" }, - "myWalletAccounts": { - "message": "Moji računi Denarnice" - }, - "myWalletAccountsDescription": { - "message": "Vsi vaši računi, ustvarjeni v MetaMasku, bodo samodejno dodani v ta razdelek." - }, "needEtherInWallet": { "message": "Za interakcijo z decentraliziranimi aplikacijami boste v svoji denarnici potrebovali Eter." }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index b8a5b3036..7cbcdf175 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -588,12 +588,6 @@ "myAccounts": { "message": "Moji nalozi" }, - "myWalletAccounts": { - "message": "Moji nalozi novčanika" - }, - "myWalletAccountsDescription": { - "message": "Svi vaši nalozi kreirani u aplikaciji MetaMask biće automatski dodati u ovaj deo." - }, "needEtherInWallet": { "message": "Da biste stupili u interakciju sa decentralizovanim aplikacijama koristeći MetaMask, biće vam potreban Ether u vašem novčaniku." }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 0819fe3a3..bfa2e92f6 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -581,12 +581,6 @@ "myAccounts": { "message": "Mina konton" }, - "myWalletAccounts": { - "message": "Mina plånbokskonton" - }, - "myWalletAccountsDescription": { - "message": "Alla dina MetaMask-skapade konton läggs automatiskt till i denna avdelning." - }, "needEtherInWallet": { "message": "För att interagera med decentraliserade applikationer med MetaMask behöver du Ether i din plånbok." }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index 21647d0b6..f4d9acc5b 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -575,12 +575,6 @@ "myAccounts": { "message": "Akaunti zangu" }, - "myWalletAccounts": { - "message": "Akaunti angu za Waleti" - }, - "myWalletAccountsDescription": { - "message": "Akaunti zako zote za MetaMask zilizofunguliwa zitaongezwa kiotomatiki kwenye sehemu hii." - }, "needEtherInWallet": { "message": "Ili kuingiliana na programu zilizosambazwa kwa kutumia MetaMask, utahitaji kuwa na Ether kwenye waleti yako." }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index c7415c2b9..15ad973ee 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "log ng aktibidad" }, - "addAccount": { - "message": "Magdagdag ng account" - }, "addAcquiredTokens": { "message": "Idagdag ang mga token na nakuha mo gamit ang MetaMask" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "Mga Account Ko" }, - "myWalletAccounts": { - "message": "Mga Wallet Account Ko" - }, - "myWalletAccountsDescription": { - "message": "Ang lahat ng iyong ginawang account sa MetaMask ay awtomatikong maidaragdag sa seksyong ito." - }, "needEtherInWallet": { "message": "Para makaugnayan ang mga decentralized ma application gamit ang MetaMask, kakailanganin mo ang Ether sa iyong wallet." }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 086d48515..27766159a 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -597,12 +597,6 @@ "myAccounts": { "message": "Мої облікові записи" }, - "myWalletAccounts": { - "message": "Облікові записи мого гаманця" - }, - "myWalletAccountsDescription": { - "message": "Усі ваші створені облікові записи MetaMask буде автоматично додано в цей розділ." - }, "needEtherInWallet": { "message": "Щоб взаємодіяти з децентралізованими застосунками використовуючи MetaMask, вам буде потрібен Ether у вашому гаманці." }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 02288e7cc..988745ab9 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "nhật ký hoạt động" }, - "addAccount": { - "message": "Thêm tài khoản" - }, "addAcquiredTokens": { "message": "Thêm token mà bạn đã mua bằng MetaMask" }, @@ -966,12 +963,6 @@ "myAccounts": { "message": "Tài khoản của tôi" }, - "myWalletAccounts": { - "message": "Các tài khoản trong ví của tôi" - }, - "myWalletAccountsDescription": { - "message": "Tất cả các tài khoản đã tạo của bạn trong MetaMask sẽ tự động được thêm vào phần này." - }, "needEtherInWallet": { "message": "Để tương tác với các ứng dụng phi tập trung bằng MetaMask, bạn sẽ cần phải có Ether trong ví của mình." }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 5c58a2d26..e8286a675 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -43,9 +43,6 @@ "activityLog": { "message": "活动日志" }, - "addAccount": { - "message": "添加一个账户" - }, "addAcquiredTokens": { "message": "在 MetaMask 上添加获得的代币" }, @@ -978,12 +975,6 @@ "myAccounts": { "message": "我的账户" }, - "myWalletAccounts": { - "message": "我的钱包账户" - }, - "myWalletAccountsDescription": { - "message": "所有创建的 MetaMask 账户将自动添加到此部分。" - }, "needEtherInWallet": { "message": "使用 MetaMask 与分布式应用交互,需要您的钱包里需要有 Ether。" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 9069d20c7..bd95f859e 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -603,12 +603,6 @@ "myAccounts": { "message": "我的帳戶" }, - "myWalletAccounts": { - "message": "我的錢包帳號" - }, - "myWalletAccountsDescription": { - "message": "所有你在 MetaMask 創建的帳號將自動新增到此區塊。" - }, "needEtherInWallet": { "message": "要使用 MetaMask 存取去中心化應用服務時,您的錢包中需要有以太幣。" }, diff --git a/app/images/address-book.svg b/app/images/address-book.svg new file mode 100644 index 000000000..7559babab --- /dev/null +++ b/app/images/address-book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/e2e/tests/threebox.spec.js b/test/e2e/tests/threebox.spec.js index ca2fcbab5..cae0ebca8 100644 --- a/test/e2e/tests/threebox.spec.js +++ b/test/e2e/tests/threebox.spec.js @@ -52,7 +52,7 @@ describe('Threebox', function () { // adds an address to the contact list await driver.clickElement({ text: 'Contacts', tag: 'div' }); - await driver.clickElement('.address-book-add-button__button'); + await driver.clickElement('.address-book__link'); await driver.fill('#nickname', 'Test User Name 11'); await driver.fill( 'input[placeholder="Search, public address (0x), or ENS"]', diff --git a/ui/app/helpers/constants/routes.js b/ui/app/helpers/constants/routes.js index fb1e751ce..f2666ffbf 100644 --- a/ui/app/helpers/constants/routes.js +++ b/ui/app/helpers/constants/routes.js @@ -14,11 +14,6 @@ const CONTACT_LIST_ROUTE = '/settings/contact-list'; const CONTACT_EDIT_ROUTE = '/settings/contact-list/edit-contact'; const CONTACT_ADD_ROUTE = '/settings/contact-list/add-contact'; const CONTACT_VIEW_ROUTE = '/settings/contact-list/view-contact'; -const CONTACT_MY_ACCOUNTS_ROUTE = '/settings/contact-list/my-accounts'; -const CONTACT_MY_ACCOUNTS_VIEW_ROUTE = - '/settings/contact-list/my-accounts/view'; -const CONTACT_MY_ACCOUNTS_EDIT_ROUTE = - '/settings/contact-list/my-accounts/edit'; const REVEAL_SEED_ROUTE = '/seed'; const MOBILE_SYNC_ROUTE = '/mobile-sync'; const RESTORE_VAULT_ROUTE = '/restore-vault'; @@ -86,9 +81,6 @@ const PATH_NAME_MAP = { [`${CONTACT_EDIT_ROUTE}/:address`]: 'Edit Contact Settings Page', [CONTACT_ADD_ROUTE]: 'Add Contact Settings Page', [`${CONTACT_VIEW_ROUTE}/:address`]: 'View Contact Settings Page', - [CONTACT_MY_ACCOUNTS_ROUTE]: 'My Accounts List Settings Page', - [`${CONTACT_MY_ACCOUNTS_VIEW_ROUTE}/:account`]: 'View Account Settings Page', - [`${CONTACT_MY_ACCOUNTS_EDIT_ROUTE}/:account`]: 'Edit Account Settings Page', [REVEAL_SEED_ROUTE]: 'Reveal Seed Page', [MOBILE_SYNC_ROUTE]: 'Sync With Mobile Page', [RESTORE_VAULT_ROUTE]: 'Restore Vault Page', @@ -185,9 +177,6 @@ export { CONTACT_EDIT_ROUTE, CONTACT_ADD_ROUTE, CONTACT_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, NETWORKS_ROUTE, NETWORKS_FORM_ROUTE, INITIALIZE_BACKUP_SEED_PHRASE_ROUTE, diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js b/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js index d16db37b9..625bfbb09 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js +++ b/ui/app/pages/settings/contact-list-tab/contact-list-tab.component.js @@ -4,12 +4,10 @@ import ContactList from '../../../components/app/contact-list'; import { CONTACT_ADD_ROUTE, CONTACT_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, } from '../../../helpers/constants/routes'; import EditContact from './edit-contact'; import AddContact from './add-contact'; import ViewContact from './view-contact'; -import MyAccounts from './my-accounts'; export default class ContactListTab extends Component { static contextTypes = { @@ -25,65 +23,44 @@ export default class ContactListTab extends Component { addingContact: PropTypes.bool, showContactContent: PropTypes.bool, hideAddressBook: PropTypes.bool, - showingMyAccounts: PropTypes.bool, }; renderAddresses() { const { addressBook, history, selectedAddress } = this.props; const contacts = addressBook.filter(({ name }) => Boolean(name)); const nonContacts = addressBook.filter(({ name }) => !name); - - return ( -
- contacts} - searchForRecents={() => nonContacts} - selectRecipient={(address) => { - history.push(`${CONTACT_VIEW_ROUTE}/${address}`); - }} - selectedAddress={selectedAddress} - /> -
- ); - } - - renderAddButton() { - const { history } = this.props; - - return ( -
{ - history.push(CONTACT_ADD_ROUTE); - }} - > - {this.context.t('addAccount')} -
- ); - } - - renderMyAccountsButton() { - const { history } = this.props; const { t } = this.context; - return ( -
{ - history.push(CONTACT_MY_ACCOUNTS_ROUTE); - }} - > -
- {t('myWalletAccounts')} + + if (addressBook.length) { + return ( +
+ contacts} + searchForRecents={() => nonContacts} + selectRecipient={(address) => { + history.push(`${CONTACT_VIEW_ROUTE}/${address}`); + }} + selectedAddress={selectedAddress} + />
-
-
- {t('myWalletAccountsDescription')} -
-
+ ); + } + return ( +
+
+ Address book icon +

{t('builContactList')}

+

+ {t('addFriendsAndAddresses')} +

+
); @@ -120,33 +97,19 @@ export default class ContactListTab extends Component { } renderAddressBookContent() { - const { hideAddressBook, showingMyAccounts } = this.props; + const { hideAddressBook } = this.props; - if (!hideAddressBook && !showingMyAccounts) { - return ( -
- {this.renderMyAccountsButton()} - {this.renderAddresses()} -
- ); - } else if (!hideAddressBook && showingMyAccounts) { - return ; + if (!hideAddressBook) { + return
{this.renderAddresses()}
; } return null; } render() { - const { addingContact } = this.props; - return (
{this.renderAddressBookContent()} {this.renderContactContent()} - {!addingContact && ( -
- {this.renderAddButton()} -
- )}
); } diff --git a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js b/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js index 19749eafd..0d80480b5 100644 --- a/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js +++ b/ui/app/pages/settings/contact-list-tab/contact-list-tab.container.js @@ -9,9 +9,6 @@ import { CONTACT_ADD_ROUTE, CONTACT_EDIT_ROUTE, CONTACT_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, } from '../../../helpers/constants/routes'; import ContactListTab from './contact-list-tab.component'; @@ -22,20 +19,9 @@ const mapStateToProps = (state, ownProps) => { const pathNameTail = pathname.match(/[^/]+$/u)[0]; const pathNameTailIsAddress = pathNameTail.includes('0x'); - const viewingContact = Boolean( - pathname.match(CONTACT_VIEW_ROUTE) || - pathname.match(CONTACT_MY_ACCOUNTS_VIEW_ROUTE), - ); - const editingContact = Boolean( - pathname.match(CONTACT_EDIT_ROUTE) || - pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE), - ); + const viewingContact = Boolean(pathname.match(CONTACT_VIEW_ROUTE)); + const editingContact = Boolean(pathname.match(CONTACT_EDIT_ROUTE)); const addingContact = Boolean(pathname.match(CONTACT_ADD_ROUTE)); - const showingMyAccounts = Boolean( - pathname.match(CONTACT_MY_ACCOUNTS_ROUTE) || - pathname.match(CONTACT_MY_ACCOUNTS_VIEW_ROUTE) || - pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE), - ); const envIsPopup = getEnvironmentType() === ENVIRONMENT_TYPE_POPUP; const hideAddressBook = @@ -45,7 +31,6 @@ const mapStateToProps = (state, ownProps) => { viewingContact, editingContact, addingContact, - showingMyAccounts, addressBook: getAddressBook(state), selectedAddress: pathNameTailIsAddress ? pathNameTail : '', hideAddressBook, diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js index e705dd7fb..0ccc1f64a 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js +++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js @@ -68,6 +68,7 @@ export default class EditContact extends PureComponent { className="settings-page__address-book-button" onClick={async () => { await removeFromAddressBook(chainId, address); + history.push(listRoute); }} > {t('deleteAccount')} diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js index dfb23aabd..205ec7ed5 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.container.js @@ -4,9 +4,6 @@ import { withRouter } from 'react-router-dom'; import { getAddressBookEntry } from '../../../../selectors'; import { CONTACT_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, CONTACT_LIST_ROUTE, } from '../../../../helpers/constants/routes'; import { @@ -31,22 +28,13 @@ const mapStateToProps = (state, ownProps) => { const { chainId } = state.metamask.provider; - const showingMyAccounts = Boolean( - pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE), - ); - return { address: contact ? address : null, chainId, name, memo, - viewRoute: showingMyAccounts - ? CONTACT_MY_ACCOUNTS_VIEW_ROUTE - : CONTACT_VIEW_ROUTE, - listRoute: showingMyAccounts - ? CONTACT_MY_ACCOUNTS_ROUTE - : CONTACT_LIST_ROUTE, - showingMyAccounts, + viewRoute: CONTACT_VIEW_ROUTE, + listRoute: CONTACT_LIST_ROUTE, }; }; diff --git a/ui/app/pages/settings/contact-list-tab/index.scss b/ui/app/pages/settings/contact-list-tab/index.scss index aef7c208c..7d1d26606 100644 --- a/ui/app/pages/settings/contact-list-tab/index.scss +++ b/ui/app/pages/settings/contact-list-tab/index.scss @@ -5,12 +5,15 @@ } .address-book { - flex: 0.4 1 40%; - max-width: 40%; + flex: 0.4 1 100%; @media screen and (max-width: 576px) { flex: 1; max-width: 100%; + + &__container { + min-height: 100%; + } } &__entry { @@ -51,6 +54,32 @@ } } + &__container { + margin: 0 auto; + min-height: 70%; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + } + + &__title { + @include H4; + + font-weight: 600; + margin-bottom: 0.5em; + } + + &__sub-title { + font-size: small; + margin-bottom: 0.5em; + } + + &__link { + background-color: #fff; + color: #037dd6; + } + &__input { @include H4; @@ -247,7 +276,7 @@ } .address-book-contact-content { - flex: 0.4 1 40%; + flex: 0.4 1 100%; @media screen and (max-width: 576px) { flex: 1; diff --git a/ui/app/pages/settings/contact-list-tab/my-accounts/index.js b/ui/app/pages/settings/contact-list-tab/my-accounts/index.js deleted file mode 100644 index e5bde6530..000000000 --- a/ui/app/pages/settings/contact-list-tab/my-accounts/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './my-accounts.container'; diff --git a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.component.js b/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.component.js deleted file mode 100644 index bb7702c56..000000000 --- a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.component.js +++ /dev/null @@ -1,34 +0,0 @@ -import React, { PureComponent } from 'react'; -import PropTypes from 'prop-types'; -import ContactList from '../../../../components/app/contact-list'; -import { CONTACT_MY_ACCOUNTS_VIEW_ROUTE } from '../../../../helpers/constants/routes'; - -export default class ViewContact extends PureComponent { - static contextTypes = { - t: PropTypes.func, - }; - - static propTypes = { - myAccounts: PropTypes.array, - history: PropTypes.object, - }; - - renderMyAccounts() { - const { myAccounts, history } = this.props; - - return ( -
- myAccounts} - selectRecipient={(address) => { - history.push(`${CONTACT_MY_ACCOUNTS_VIEW_ROUTE}/${address}`); - }} - /> -
- ); - } - - render() { - return
{this.renderMyAccounts()}
; - } -} diff --git a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js b/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js deleted file mode 100644 index 82ac4b4ef..000000000 --- a/ui/app/pages/settings/contact-list-tab/my-accounts/my-accounts.container.js +++ /dev/null @@ -1,15 +0,0 @@ -import { compose } from 'redux'; -import { connect } from 'react-redux'; -import { withRouter } from 'react-router-dom'; -import { accountsWithSendEtherInfoSelector } from '../../../../selectors'; -import ViewContact from './my-accounts.component'; - -const mapStateToProps = (state) => { - const myAccounts = accountsWithSendEtherInfoSelector(state); - - return { - myAccounts, - }; -}; - -export default compose(withRouter, connect(mapStateToProps))(ViewContact); diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js index 8fe58a5b4..06a753446 100644 --- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js @@ -6,9 +6,6 @@ import { checksumAddress } from '../../../../helpers/utils/util'; import { CONTACT_EDIT_ROUTE, CONTACT_LIST_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, } from '../../../../helpers/constants/routes'; import ViewContact from './view-contact.component'; @@ -25,21 +22,13 @@ const mapStateToProps = (state, ownProps) => { getAddressBookEntry(state, address) || state.metamask.identities[address]; const { memo, name } = contact || {}; - const showingMyAccounts = Boolean( - pathname.match(CONTACT_MY_ACCOUNTS_VIEW_ROUTE), - ); - return { name, address: contact ? address : null, checkSummedAddress: checksumAddress(address), memo, - editRoute: showingMyAccounts - ? CONTACT_MY_ACCOUNTS_EDIT_ROUTE - : CONTACT_EDIT_ROUTE, - listRoute: showingMyAccounts - ? CONTACT_MY_ACCOUNTS_ROUTE - : CONTACT_LIST_ROUTE, + editRoute: CONTACT_EDIT_ROUTE, + listRoute: CONTACT_LIST_ROUTE, }; }; diff --git a/ui/app/pages/settings/settings.component.js b/ui/app/pages/settings/settings.component.js index 2b02eccfd..2ef3f15d3 100644 --- a/ui/app/pages/settings/settings.component.js +++ b/ui/app/pages/settings/settings.component.js @@ -15,9 +15,6 @@ import { CONTACT_ADD_ROUTE, CONTACT_EDIT_ROUTE, CONTACT_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, } from '../../helpers/constants/routes'; import SettingsTab from './settings-tab'; import AlertsTab from './alerts-tab'; @@ -222,11 +219,6 @@ class SettingsPage extends PureComponent { - - - ); diff --git a/ui/app/pages/settings/settings.container.js b/ui/app/pages/settings/settings.container.js index ed664bc2f..57fedadd2 100644 --- a/ui/app/pages/settings/settings.container.js +++ b/ui/app/pages/settings/settings.container.js @@ -14,9 +14,6 @@ import { CONTACT_LIST_ROUTE, CONTACT_ADD_ROUTE, CONTACT_EDIT_ROUTE, - CONTACT_MY_ACCOUNTS_ROUTE, - CONTACT_MY_ACCOUNTS_EDIT_ROUTE, - CONTACT_MY_ACCOUNTS_VIEW_ROUTE, CONTACT_VIEW_ROUTE, GENERAL_ROUTE, NETWORKS_FORM_ROUTE, @@ -34,7 +31,6 @@ const ROUTES_TO_I18N_KEYS = { [CONTACT_ADD_ROUTE]: 'newContact', [CONTACT_EDIT_ROUTE]: 'editContact', [CONTACT_LIST_ROUTE]: 'contacts', - [CONTACT_MY_ACCOUNTS_ROUTE]: 'myAccounts', [CONTACT_VIEW_ROUTE]: 'viewContact', [NETWORKS_ROUTE]: 'networks', [NETWORKS_FORM_ROUTE]: 'networks', @@ -47,38 +43,24 @@ const mapStateToProps = (state, ownProps) => { const pathNameTail = pathname.match(/[^/]+$/u)[0]; const isAddressEntryPage = pathNameTail.includes('0x'); - const isMyAccountsPage = pathname.match('my-accounts'); const isAddContactPage = Boolean(pathname.match(CONTACT_ADD_ROUTE)); const isEditContactPage = Boolean(pathname.match(CONTACT_EDIT_ROUTE)); - const isEditMyAccountsContactPage = Boolean( - pathname.match(CONTACT_MY_ACCOUNTS_EDIT_ROUTE), - ); const isNetworksFormPage = Boolean(pathname.match(NETWORKS_FORM_ROUTE)); const isPopup = getEnvironmentType() === ENVIRONMENT_TYPE_POPUP; const pathnameI18nKey = ROUTES_TO_I18N_KEYS[pathname]; let backRoute = SETTINGS_ROUTE; - if (isMyAccountsPage && isAddressEntryPage) { - backRoute = CONTACT_MY_ACCOUNTS_ROUTE; - } else if (isEditContactPage) { + if (isEditContactPage) { backRoute = `${CONTACT_VIEW_ROUTE}/${pathNameTail}`; - } else if (isEditMyAccountsContactPage) { - backRoute = `${CONTACT_MY_ACCOUNTS_VIEW_ROUTE}/${pathNameTail}`; - } else if (isAddressEntryPage || isMyAccountsPage || isAddContactPage) { + } else if (isAddressEntryPage || isAddContactPage) { backRoute = CONTACT_LIST_ROUTE; } else if (isNetworksFormPage) { backRoute = NETWORKS_ROUTE; } let initialBreadCrumbRoute; - let breadCrumbTextKey; let initialBreadCrumbKey; - if (isMyAccountsPage) { - initialBreadCrumbRoute = CONTACT_LIST_ROUTE; - breadCrumbTextKey = 'myWalletAccounts'; - initialBreadCrumbKey = ROUTES_TO_I18N_KEYS[initialBreadCrumbRoute]; - } const addressName = getAddressBookEntryName( state, @@ -87,14 +69,12 @@ const mapStateToProps = (state, ownProps) => { return { isAddressEntryPage, - isMyAccountsPage, backRoute, currentPath: pathname, isPopup, pathnameI18nKey, addressName, initialBreadCrumbRoute, - breadCrumbTextKey, initialBreadCrumbKey, mostRecentOverviewPage: getMostRecentOverviewPage(state), };