From 2c33ad3eb48bdb367784a3edfff1dbc553465471 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Tue, 3 Dec 2019 12:00:03 -0330 Subject: [PATCH] Enable react/no-unused-state rule for ESLint (#7609) * eslint: Enable react/no-unused-state rule * Fix unused state issues * Remove now unused validFileImport localized message --- .eslintrc | 1 + app/_locales/am/messages.json | 3 --- app/_locales/ar/messages.json | 3 --- app/_locales/bg/messages.json | 3 --- app/_locales/bn/messages.json | 3 --- app/_locales/ca/messages.json | 3 --- app/_locales/cs/messages.json | 3 --- app/_locales/da/messages.json | 3 --- app/_locales/de/messages.json | 3 --- app/_locales/el/messages.json | 3 --- app/_locales/en/messages.json | 3 --- app/_locales/es/messages.json | 3 --- app/_locales/es_419/messages.json | 3 --- app/_locales/et/messages.json | 3 --- app/_locales/fa/messages.json | 3 --- app/_locales/fi/messages.json | 3 --- app/_locales/fil/messages.json | 3 --- app/_locales/fr/messages.json | 3 --- app/_locales/he/messages.json | 3 --- app/_locales/hi/messages.json | 3 --- app/_locales/hn/messages.json | 3 --- app/_locales/hr/messages.json | 3 --- app/_locales/ht/messages.json | 3 --- app/_locales/hu/messages.json | 3 --- app/_locales/id/messages.json | 3 --- app/_locales/it/messages.json | 3 --- app/_locales/kn/messages.json | 3 --- app/_locales/ko/messages.json | 3 --- app/_locales/lt/messages.json | 3 --- app/_locales/lv/messages.json | 3 --- app/_locales/ms/messages.json | 3 --- app/_locales/nl/messages.json | 3 --- app/_locales/no/messages.json | 3 --- app/_locales/pl/messages.json | 3 --- app/_locales/pt/messages.json | 3 --- app/_locales/pt_BR/messages.json | 3 --- app/_locales/ro/messages.json | 3 --- app/_locales/ru/messages.json | 3 --- app/_locales/sk/messages.json | 3 --- app/_locales/sl/messages.json | 3 --- app/_locales/sr/messages.json | 3 --- app/_locales/sv/messages.json | 3 --- app/_locales/sw/messages.json | 3 --- app/_locales/ta/messages.json | 3 --- app/_locales/th/messages.json | 3 --- app/_locales/tr/messages.json | 3 --- app/_locales/uk/messages.json | 3 --- app/_locales/zh_CN/messages.json | 3 --- app/_locales/zh_TW/messages.json | 3 --- ...transaction-list-item-details.component.js | 1 - .../sender-to-recipient.component.js | 3 --- ui/app/pages/add-token/add-token.component.js | 6 +---- .../create-account/import-account/json.js | 24 ++++++------------- .../add-recipient/add-recipient.component.js | 1 - .../add-recipient/ens-input.component.js | 5 ++-- .../add-contact/add-contact.component.js | 2 +- 56 files changed, 12 insertions(+), 175 deletions(-) diff --git a/.eslintrc b/.eslintrc index b8a5c4094..f77127da8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -150,6 +150,7 @@ "operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }], "padded-blocks": "off", "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], + "react/no-unused-state": 2, "react/jsx-boolean-value": 2, "react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }], "react/jsx-equals-spacing": 2, diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 70da475f4..bbb076896 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -1332,9 +1332,6 @@ "userName": { "message": "የተጣቃሚ ስም" }, - "validFileImport": { - "message": "የሚያስመጡትን ትክክለኛ ፋይል መምረጥ አለብዎ፡" - }, "viewAccount": { "message": "መለያን ይመልከቱ" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index f9bceb60d..2a9451d61 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -1328,9 +1328,6 @@ "userName": { "message": "اسم المستخدم" }, - "validFileImport": { - "message": "يجب عليك تحديد ملف صالح للاستيراد." - }, "viewAccount": { "message": "عرض حساب" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index c029ceb4b..bd66c78c7 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -1331,9 +1331,6 @@ "userName": { "message": "Потребителско име" }, - "validFileImport": { - "message": "Трябва да изберете валиден файл, който да импортирате." - }, "viewAccount": { "message": "Преглед на профила" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index ee2024115..7580e8e53 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -1335,9 +1335,6 @@ "userName": { "message": "ইউজারনেম" }, - "validFileImport": { - "message": "আমদানি করার জন্য আপনাকে অবশ্যই একটি বৈধ ফাইল নির্বাচন করতে হবে।" - }, "viewAccount": { "message": "আ্যাকাউন্ট দেখুন" }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index 7b8bdf896..07ec4c914 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -1304,9 +1304,6 @@ "userName": { "message": "Nom d'usuari" }, - "validFileImport": { - "message": "Has de seleccionar un arxiu vàlid per a importar." - }, "viewAccount": { "message": "Mostra el compte" }, diff --git a/app/_locales/cs/messages.json b/app/_locales/cs/messages.json index 72c4a7bce..452e5fb5e 100644 --- a/app/_locales/cs/messages.json +++ b/app/_locales/cs/messages.json @@ -514,9 +514,6 @@ "usedByClients": { "message": "Používána různými klienty" }, - "validFileImport": { - "message": "Musíte vybrat validní soubor k importu." - }, "viewAccount": { "message": "Zobrazit účet" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 9d68e86cf..d47cc3046 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -1301,9 +1301,6 @@ "userName": { "message": "Brugernavn" }, - "validFileImport": { - "message": "Du skal vælge en gyldig fil at importere." - }, "viewAccount": { "message": "Vis konto" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 1f7409ee2..5ea773ba3 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -1292,9 +1292,6 @@ "userName": { "message": "Nutzername" }, - "validFileImport": { - "message": "Du musst eine gültige Datei für den Import auswählen." - }, "viewAccount": { "message": " Account einsehen" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 44fa55db0..9d6725632 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -1329,9 +1329,6 @@ "userName": { "message": "Όνομα χρήστη" }, - "validFileImport": { - "message": "Πρέπει να επιλέξετε έναν έγκυρο φάκελο για εισαγωγή." - }, "viewAccount": { "message": "Προβολή λογαριασμού" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index f85b64a02..2afe8e0c3 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1472,9 +1472,6 @@ "userName": { "message": "Username" }, - "validFileImport": { - "message": "You must select a valid file to import." - }, "viewAccount": { "message": "View Account" }, diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 79d508a07..5aeb4ebe0 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -1076,9 +1076,6 @@ "usedByClients": { "message": "Utilizado por una variedad de clientes diferentes" }, - "validFileImport": { - "message": "Debes selecionar un archivo valido para importar" - }, "viewAccount": { "message": "Mirar cuenta" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 39d45ddaf..e75b4c27b 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -1314,9 +1314,6 @@ "userName": { "message": "Nombre de usuario" }, - "validFileImport": { - "message": "Selecciona un archivo válido para importar." - }, "viewAccount": { "message": "Ver cuenta" }, diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index 63c7ca53e..3b5f4ced8 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -1325,9 +1325,6 @@ "userName": { "message": "Kasutajanimi" }, - "validFileImport": { - "message": "Peate valima importimiseks sobiva faili." - }, "viewAccount": { "message": "Kuva konto" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 1e93ec772..6d9741344 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -1335,9 +1335,6 @@ "userName": { "message": "نام کاربری" }, - "validFileImport": { - "message": "شما باید یک فایل معتبر را جهت وارد سازی انتخاب کنید." - }, "viewAccount": { "message": "مشاهده حساب" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index e2d8a59c5..352600b26 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -1332,9 +1332,6 @@ "userName": { "message": "Käyttäjätunnus" }, - "validFileImport": { - "message": "Valittava tuotavaksi kelpaava tiedosto." - }, "viewAccount": { "message": "Näytä tili" }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index 2734fecc3..8c453bca5 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -1223,9 +1223,6 @@ "usedByClients": { "message": "Ginagamit ng iba't ibang client" }, - "validFileImport": { - "message": "Dapat kang pumili ng valid na file na ii-import." - }, "viewAccount": { "message": "Tingnan ang Account" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index 98925ad69..ddcddb6be 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -1296,9 +1296,6 @@ "userName": { "message": "Nom d'utilisateur" }, - "validFileImport": { - "message": "Vous devez selectionner un fichier valide à importer." - }, "viewAccount": { "message": "Afficher le compte" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 9c9966edc..62e69e1d5 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -1329,9 +1329,6 @@ "userName": { "message": "שם משתמש" }, - "validFileImport": { - "message": "עליך לבחור קובץ חוקי לייבוא." - }, "viewAccount": { "message": "הצג חשבון" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 25e8014ff..92fa40af6 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -1329,9 +1329,6 @@ "userName": { "message": "उपयोगकर्ता नाम" }, - "validFileImport": { - "message": "आयात करने के लिए आपको एक मान्य फ़ाइल को चुनना होगा।" - }, "viewAccount": { "message": "खाता देखें" }, diff --git a/app/_locales/hn/messages.json b/app/_locales/hn/messages.json index e15b244ca..1dd4fd117 100644 --- a/app/_locales/hn/messages.json +++ b/app/_locales/hn/messages.json @@ -476,9 +476,6 @@ "usedByClients": { "message": "विभिन्न क्लाइंट्स द्वारा उपयोग किया जाता है" }, - "validFileImport": { - "message": "आयात करने के लिए आपको एक वैध फ़ाइल चुननी होगी।" - }, "viewAccount": { "message": "खाता देखें" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index 318713b7d..2e224f36f 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -1325,9 +1325,6 @@ "userName": { "message": "Korisničko ime" }, - "validFileImport": { - "message": "Morate odabrati valjanu datoteku za uvoz." - }, "viewAccount": { "message": "Prikaz računa" }, diff --git a/app/_locales/ht/messages.json b/app/_locales/ht/messages.json index d3a9dd4ba..472409017 100644 --- a/app/_locales/ht/messages.json +++ b/app/_locales/ht/messages.json @@ -836,9 +836,6 @@ "usedByClients": { "message": "Itilize pa yon varyete de kliyan diferan" }, - "validFileImport": { - "message": "Ou dwe chwazi yon dosye ki valab pou enpòte." - }, "viewAccount": { "message": "Wè Kont" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index 870972e5b..f1554299b 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -1325,9 +1325,6 @@ "userName": { "message": "Felhasználónév" }, - "validFileImport": { - "message": "Ki kell választanod egy érvényes fájlt az importáláshoz." - }, "viewAccount": { "message": "Fiók megtekintése" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 42d847289..eaddf42eb 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -1304,9 +1304,6 @@ "userName": { "message": "Nama Pengguna" }, - "validFileImport": { - "message": "Anda harus memilih berkas yang sah untuk diimpor." - }, "viewAccount": { "message": "Lihat Akun" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 83b637859..e51b5a477 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -1295,9 +1295,6 @@ "userName": { "message": "Nome utente" }, - "validFileImport": { - "message": "Devi selezionare un file valido da importare." - }, "viewAccount": { "message": "Vedi Account" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 480abe20d..e4c8b38fe 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -1335,9 +1335,6 @@ "userName": { "message": "ಬಳಕೆದಾರಹೆಸರು" }, - "validFileImport": { - "message": "ನೀವು ಆಮದು ಮಾಡಲು ಮಾನ್ಯ ಫೈಲ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಬೇಕು." - }, "viewAccount": { "message": "ಖಾತೆಯನ್ನು ವೀಕ್ಷಿಸಿ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 47af1dbff..39c68a85e 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -1326,9 +1326,6 @@ "userName": { "message": "사용자이름" }, - "validFileImport": { - "message": "가져오기 위해 유효한 파일을 선택해야 합니다." - }, "viewAccount": { "message": "계정 보기" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 51113ffe4..961eedc91 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -1335,9 +1335,6 @@ "userName": { "message": "Vartotojo vardas" }, - "validFileImport": { - "message": "Turite pasirinkti galiojantį failą, kurį pageidaujate importuoti." - }, "viewAccount": { "message": "Žiūrėti paskyrą" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index db678240b..18d80c900 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -1331,9 +1331,6 @@ "userName": { "message": "Lietotājvārds" }, - "validFileImport": { - "message": "Importēšanai jāatlasa derīga datne." - }, "viewAccount": { "message": "Skatīt kontu" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index ed1daeb3d..e573eabc4 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -1303,9 +1303,6 @@ "userName": { "message": "Nama pengguna" }, - "validFileImport": { - "message": "Anda mesti pilih fail yang sah untuk diimport." - }, "viewAccount": { "message": "Paparkan Akaun" }, diff --git a/app/_locales/nl/messages.json b/app/_locales/nl/messages.json index b026ec93a..265542aed 100644 --- a/app/_locales/nl/messages.json +++ b/app/_locales/nl/messages.json @@ -463,9 +463,6 @@ "usedByClients": { "message": "Gebruikt door verschillende klanten" }, - "validFileImport": { - "message": "U moet een geldig bestand selecteren om te importeren." - }, "viewAccount": { "message": "Bekijk account" }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 1f9368421..b0bf0d6de 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -1307,9 +1307,6 @@ "userName": { "message": "Brukernavn" }, - "validFileImport": { - "message": "Du må velge en gyldig fil å importere" - }, "viewAccount": { "message": "Se konto" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index ea9bac563..3fa36bd39 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -1320,9 +1320,6 @@ "userName": { "message": "Nazwa użytkownika" }, - "validFileImport": { - "message": "Należy wybrać prawidłowy plik do zaimportowania." - }, "viewAccount": { "message": "Zobacz konto" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 0c8949603..519369349 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -473,9 +473,6 @@ "usedByClients": { "message": "Utilizado por vários tipos de clientes" }, - "validFileImport": { - "message": "Deve selecionar um ficheiro válido para importar." - }, "viewAccount": { "message": "Ver Conta" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index 6f496b57c..44ed790ef 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -1314,9 +1314,6 @@ "userName": { "message": "Nome de usuário" }, - "validFileImport": { - "message": "Você precisa selecionar um arquivo válido para importar." - }, "viewAccount": { "message": "Visualizar conta" }, diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index a5fe91697..f891a40df 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -1316,9 +1316,6 @@ "userName": { "message": "Nume utilizator" }, - "validFileImport": { - "message": "Trebuie să selectați un fișier valabil pentru importare." - }, "viewAccount": { "message": "Afișați contul" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index ac6aa65e2..660b2799e 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -527,9 +527,6 @@ "usedByClients": { "message": "Используется различными клиентами" }, - "validFileImport": { - "message": "Вам нужно выбрать правильный файл для импорта." - }, "viewAccount": { "message": "Посмотреть счет" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 2de10f9ab..5238e076d 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -1289,9 +1289,6 @@ "userName": { "message": "Meno používateľa" }, - "validFileImport": { - "message": "Musíte vybrat validní soubor k importu." - }, "viewAccount": { "message": "Zobrazit účet" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index 1e1884a26..8530dd43d 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -1317,9 +1317,6 @@ "userName": { "message": "Uporabniško ime" }, - "validFileImport": { - "message": "Za uvoz morate izbrati pravilno datoteko." - }, "viewAccount": { "message": "Poglej račun" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 58d31c183..d3fd1cbd4 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -1320,9 +1320,6 @@ "userName": { "message": "Корисничко име" }, - "validFileImport": { - "message": "Morate odabrati važeću datoteku da biste ih uvezli." - }, "viewAccount": { "message": "Прикажи налог" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index e808703f1..1b7ecc06e 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -1310,9 +1310,6 @@ "userName": { "message": "Användarnamn" }, - "validFileImport": { - "message": "Du måste välja en giltig fil för att importera." - }, "viewAccount": { "message": "Visa konto" }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index ad5878733..c8c2e36ee 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -1313,9 +1313,6 @@ "userName": { "message": "Jina la mtumiaji" }, - "validFileImport": { - "message": "Ni lazima uchague faili halali ili uhamishe." - }, "viewAccount": { "message": "Angalia Akaunti" }, diff --git a/app/_locales/ta/messages.json b/app/_locales/ta/messages.json index ba173def5..698349c24 100644 --- a/app/_locales/ta/messages.json +++ b/app/_locales/ta/messages.json @@ -539,9 +539,6 @@ "usedByClients": { "message": "பல்வேறு வாடிக்கையாளர்கள் பல்வேறு பயன்படுத்திய" }, - "validFileImport": { - "message": "இறக்குமதி செய்ய சரியான கோப்பு தேர்ந்தெடுக்க வேண்டும்." - }, "viewAccount": { "message": "கணக்கைப் பார்" }, diff --git a/app/_locales/th/messages.json b/app/_locales/th/messages.json index c32044bb1..f07f3421e 100644 --- a/app/_locales/th/messages.json +++ b/app/_locales/th/messages.json @@ -641,9 +641,6 @@ "usedByClients": { "message": "ถูกใช้งานโดยหลายไคลเอนท์" }, - "validFileImport": { - "message": "คุณต้องเลือกไฟล์ที่ถูกต้องเพื่อนำเข้า" - }, "viewAccount": { "message": "ดูบัญชี" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index dbfe3cf08..c6027a42d 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -536,9 +536,6 @@ "usedByClients": { "message": "Farklı istemciler tarafından kullanılmakta" }, - "validFileImport": { - "message": "Almak için geçerli bir dosya seçmelisiniz" - }, "viewAccount": { "message": "Hesabı İncele" }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index a4252cb3e..49d04a096 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -1335,9 +1335,6 @@ "userName": { "message": "Ім’я користувача" }, - "validFileImport": { - "message": "Потрібно вибрати дійсний файл для імпорту." - }, "viewAccount": { "message": "Переглянути обліковий запис" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index c0b10a973..cade6ee71 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -1314,9 +1314,6 @@ "userName": { "message": "用户名" }, - "validFileImport": { - "message": "您必须选择一个有效的文件进行导入." - }, "viewAccount": { "message": "查看账户" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index 5a0a2e3ea..3d0e299a6 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -1308,9 +1308,6 @@ "userName": { "message": "使用者名稱" }, - "validFileImport": { - "message": "您必須選擇一個合法的檔案來匯入." - }, "viewAccount": { "message": "查看帳戶" }, diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js index f27c74970..554e99a5b 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js +++ b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.component.js @@ -39,7 +39,6 @@ export default class TransactionListItemDetails extends PureComponent { state = { justCopied: false, - cancelDisabled: false, } handleEtherscanClick = () => { diff --git a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js index 3102f17e3..01ad167ca 100644 --- a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js +++ b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js @@ -39,7 +39,6 @@ export default class SenderToRecipient extends PureComponent { state = { senderAddressCopied: false, - recipientAddressCopied: false, } renderSenderIdenticon () { @@ -112,7 +111,6 @@ export default class SenderToRecipient extends PureComponent {
{ - this.setState({ recipientAddressCopied: true }) copyToClipboard(checksummedRecipientAddress) if (onRecipientClick) { onRecipientClick() @@ -136,7 +134,6 @@ export default class SenderToRecipient extends PureComponent { } wrapperClassName="sender-to-recipient__tooltip-wrapper" containerClassName="sender-to-recipient__tooltip-container" - onHidden={() => this.setState({ recipientAddressCopied: false })} >
{ addressOnly ? `${t('to')}: ` : '' } diff --git a/ui/app/pages/add-token/add-token.component.js b/ui/app/pages/add-token/add-token.component.js index 40c1ff7fd..0db281b29 100644 --- a/ui/app/pages/add-token/add-token.component.js +++ b/ui/app/pages/add-token/add-token.component.js @@ -11,8 +11,6 @@ import PageContainer from '../../components/ui/page-container' import { Tabs, Tab } from '../../components/ui/tabs' const emptyAddr = '0x0000000000000000000000000000000000000000' -const SEARCH_TAB = 'SEARCH' -const CUSTOM_TOKEN_TAB = 'CUSTOM_TOKEN' class AddToken extends Component { static contextTypes = { @@ -42,7 +40,6 @@ class AddToken extends Component { customSymbolError: null, customDecimalsError: null, autoFilled: false, - displayedTab: SEARCH_TAB, forceEditSymbol: false, } } @@ -73,8 +70,7 @@ class AddToken extends Component { decimals: customDecimals = 0, } = customToken - const displayedTab = Object.keys(selectedTokens).length > 0 ? SEARCH_TAB : CUSTOM_TOKEN_TAB - this.setState({ selectedTokens, customAddress, customSymbol, customDecimals, displayedTab }) + this.setState({ selectedTokens, customAddress, customSymbol, customDecimals }) } } diff --git a/ui/app/pages/create-account/import-account/json.js b/ui/app/pages/create-account/import-account/json.js index c9ff8d926..7fd27264d 100644 --- a/ui/app/pages/create-account/import-account/json.js +++ b/ui/app/pages/create-account/import-account/json.js @@ -12,13 +12,8 @@ import Button from '../../../components/ui/button' const HELP_LINK = 'https://metamask.zendesk.com/hc/en-us/articles/360015489351-Importing-Accounts' class JsonImportSubview extends Component { - constructor (props) { - super(props) - - this.state = { - file: null, - fileContents: '', - } + state = { + fileContents: '', } render () { @@ -73,8 +68,10 @@ class JsonImportSubview extends Component { ) } - onLoad (event, file) { - this.setState({file: file, fileContents: event.target.result}) + onLoad (event) { + this.setState({ + fileContents: event.target.result, + }) } createKeyringOnEnter (event) { @@ -86,14 +83,7 @@ class JsonImportSubview extends Component { createNewKeychain () { const { firstAddress, displayWarning, importNewJsonAccount, setSelectedAddress, history } = this.props - const state = this.state - - if (!state) { - const message = this.context.t('validFileImport') - return displayWarning(message) - } - - const { fileContents } = state + const { fileContents } = this.state if (!fileContents) { const message = this.context.t('needImportFile') diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js index e5edbc08d..bad912c0a 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js +++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js @@ -64,7 +64,6 @@ export default class AddRecipient extends Component { state = { isShowingTransfer: false, - isShowingAllRecent: false, } selectRecipient = (to, nickname = '') => { diff --git a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js b/ui/app/pages/send/send-content/add-recipient/ens-input.component.js index 5294388ac..a4b5c8810 100644 --- a/ui/app/pages/send/send-content/add-recipient/ens-input.component.js +++ b/ui/app/pages/send/send-content/add-recipient/ens-input.component.js @@ -37,10 +37,9 @@ export default class EnsInput extends Component { } state = { - recipient: null, input: '', toError: null, - toWarning: null, + ensResolution: undefined, } componentDidMount () { @@ -234,7 +233,7 @@ export default class EnsInput extends Component { } ensIconContents () { - const { loadingEns, ensFailure, ensResolution, toError } = this.state || { ensResolution: ZERO_ADDRESS } + const { loadingEns, ensFailure, ensResolution, toError } = this.state if (toError) { return diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js index 9e3bc791b..91489be1c 100644 --- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js +++ b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js @@ -23,7 +23,7 @@ export default class AddContact extends PureComponent { } state = { - nickname: '', + newName: '', ethAddress: '', ensAddress: '', error: '',