1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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
This commit is contained in:
Whymarrh Whitby 2019-12-03 12:00:03 -03:30 committed by GitHub
parent e61745a821
commit 2c33ad3eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 12 additions and 175 deletions

View File

@ -150,6 +150,7 @@
"operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }], "operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"padded-blocks": "off", "padded-blocks": "off",
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"react/no-unused-state": 2,
"react/jsx-boolean-value": 2, "react/jsx-boolean-value": 2,
"react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }], "react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }],
"react/jsx-equals-spacing": 2, "react/jsx-equals-spacing": 2,

View File

@ -1332,9 +1332,6 @@
"userName": { "userName": {
"message": "የተጣቃሚ ስም" "message": "የተጣቃሚ ስም"
}, },
"validFileImport": {
"message": "የሚያስመጡትን ትክክለኛ ፋይል መምረጥ አለብዎ፡"
},
"viewAccount": { "viewAccount": {
"message": "መለያን ይመልከቱ" "message": "መለያን ይመልከቱ"
}, },

View File

@ -1328,9 +1328,6 @@
"userName": { "userName": {
"message": "اسم المستخدم" "message": "اسم المستخدم"
}, },
"validFileImport": {
"message": "يجب عليك تحديد ملف صالح للاستيراد."
},
"viewAccount": { "viewAccount": {
"message": "عرض حساب" "message": "عرض حساب"
}, },

View File

@ -1331,9 +1331,6 @@
"userName": { "userName": {
"message": "Потребителско име" "message": "Потребителско име"
}, },
"validFileImport": {
"message": "Трябва да изберете валиден файл, който да импортирате."
},
"viewAccount": { "viewAccount": {
"message": "Преглед на профила" "message": "Преглед на профила"
}, },

View File

@ -1335,9 +1335,6 @@
"userName": { "userName": {
"message": "ইউজারনেম" "message": "ইউজারনেম"
}, },
"validFileImport": {
"message": "আমদানি করার জন্য আপনাকে অবশ্যই একটি বৈধ ফাইল নির্বাচন করতে হবে।"
},
"viewAccount": { "viewAccount": {
"message": "আ্যাকাউন্ট দেখুন" "message": "আ্যাকাউন্ট দেখুন"
}, },

View File

@ -1304,9 +1304,6 @@
"userName": { "userName": {
"message": "Nom d'usuari" "message": "Nom d'usuari"
}, },
"validFileImport": {
"message": "Has de seleccionar un arxiu vàlid per a importar."
},
"viewAccount": { "viewAccount": {
"message": "Mostra el compte" "message": "Mostra el compte"
}, },

View File

@ -514,9 +514,6 @@
"usedByClients": { "usedByClients": {
"message": "Používána různými klienty" "message": "Používána různými klienty"
}, },
"validFileImport": {
"message": "Musíte vybrat validní soubor k importu."
},
"viewAccount": { "viewAccount": {
"message": "Zobrazit účet" "message": "Zobrazit účet"
}, },

View File

@ -1301,9 +1301,6 @@
"userName": { "userName": {
"message": "Brugernavn" "message": "Brugernavn"
}, },
"validFileImport": {
"message": "Du skal vælge en gyldig fil at importere."
},
"viewAccount": { "viewAccount": {
"message": "Vis konto" "message": "Vis konto"
}, },

View File

@ -1292,9 +1292,6 @@
"userName": { "userName": {
"message": "Nutzername" "message": "Nutzername"
}, },
"validFileImport": {
"message": "Du musst eine gültige Datei für den Import auswählen."
},
"viewAccount": { "viewAccount": {
"message": " Account einsehen" "message": " Account einsehen"
}, },

View File

@ -1329,9 +1329,6 @@
"userName": { "userName": {
"message": "Όνομα χρήστη" "message": "Όνομα χρήστη"
}, },
"validFileImport": {
"message": "Πρέπει να επιλέξετε έναν έγκυρο φάκελο για εισαγωγή."
},
"viewAccount": { "viewAccount": {
"message": "Προβολή λογαριασμού" "message": "Προβολή λογαριασμού"
}, },

View File

@ -1472,9 +1472,6 @@
"userName": { "userName": {
"message": "Username" "message": "Username"
}, },
"validFileImport": {
"message": "You must select a valid file to import."
},
"viewAccount": { "viewAccount": {
"message": "View Account" "message": "View Account"
}, },

View File

@ -1076,9 +1076,6 @@
"usedByClients": { "usedByClients": {
"message": "Utilizado por una variedad de clientes diferentes" "message": "Utilizado por una variedad de clientes diferentes"
}, },
"validFileImport": {
"message": "Debes selecionar un archivo valido para importar"
},
"viewAccount": { "viewAccount": {
"message": "Mirar cuenta" "message": "Mirar cuenta"
}, },

View File

@ -1314,9 +1314,6 @@
"userName": { "userName": {
"message": "Nombre de usuario" "message": "Nombre de usuario"
}, },
"validFileImport": {
"message": "Selecciona un archivo válido para importar."
},
"viewAccount": { "viewAccount": {
"message": "Ver cuenta" "message": "Ver cuenta"
}, },

View File

@ -1325,9 +1325,6 @@
"userName": { "userName": {
"message": "Kasutajanimi" "message": "Kasutajanimi"
}, },
"validFileImport": {
"message": "Peate valima importimiseks sobiva faili."
},
"viewAccount": { "viewAccount": {
"message": "Kuva konto" "message": "Kuva konto"
}, },

View File

@ -1335,9 +1335,6 @@
"userName": { "userName": {
"message": "نام کاربری" "message": "نام کاربری"
}, },
"validFileImport": {
"message": "شما باید یک فایل معتبر را جهت وارد سازی انتخاب کنید."
},
"viewAccount": { "viewAccount": {
"message": "مشاهده حساب" "message": "مشاهده حساب"
}, },

View File

@ -1332,9 +1332,6 @@
"userName": { "userName": {
"message": "Käyttäjätunnus" "message": "Käyttäjätunnus"
}, },
"validFileImport": {
"message": "Valittava tuotavaksi kelpaava tiedosto."
},
"viewAccount": { "viewAccount": {
"message": "Näytä tili" "message": "Näytä tili"
}, },

View File

@ -1223,9 +1223,6 @@
"usedByClients": { "usedByClients": {
"message": "Ginagamit ng iba't ibang client" "message": "Ginagamit ng iba't ibang client"
}, },
"validFileImport": {
"message": "Dapat kang pumili ng valid na file na ii-import."
},
"viewAccount": { "viewAccount": {
"message": "Tingnan ang Account" "message": "Tingnan ang Account"
}, },

View File

@ -1296,9 +1296,6 @@
"userName": { "userName": {
"message": "Nom d'utilisateur" "message": "Nom d'utilisateur"
}, },
"validFileImport": {
"message": "Vous devez selectionner un fichier valide à importer."
},
"viewAccount": { "viewAccount": {
"message": "Afficher le compte" "message": "Afficher le compte"
}, },

View File

@ -1329,9 +1329,6 @@
"userName": { "userName": {
"message": "שם משתמש" "message": "שם משתמש"
}, },
"validFileImport": {
"message": "עליך לבחור קובץ חוקי לייבוא."
},
"viewAccount": { "viewAccount": {
"message": "הצג חשבון" "message": "הצג חשבון"
}, },

View File

@ -1329,9 +1329,6 @@
"userName": { "userName": {
"message": "उपयोगकर्ता नाम" "message": "उपयोगकर्ता नाम"
}, },
"validFileImport": {
"message": "आयात करने के लिए आपको एक मान्य फ़ाइल को चुनना होगा।"
},
"viewAccount": { "viewAccount": {
"message": "खाता देखें" "message": "खाता देखें"
}, },

View File

@ -476,9 +476,6 @@
"usedByClients": { "usedByClients": {
"message": "विभिन्न क्लाइंट्स द्वारा उपयोग किया जाता है" "message": "विभिन्न क्लाइंट्स द्वारा उपयोग किया जाता है"
}, },
"validFileImport": {
"message": "आयात करने के लिए आपको एक वैध फ़ाइल चुननी होगी।"
},
"viewAccount": { "viewAccount": {
"message": "खाता देखें" "message": "खाता देखें"
}, },

View File

@ -1325,9 +1325,6 @@
"userName": { "userName": {
"message": "Korisničko ime" "message": "Korisničko ime"
}, },
"validFileImport": {
"message": "Morate odabrati valjanu datoteku za uvoz."
},
"viewAccount": { "viewAccount": {
"message": "Prikaz računa" "message": "Prikaz računa"
}, },

View File

@ -836,9 +836,6 @@
"usedByClients": { "usedByClients": {
"message": "Itilize pa yon varyete de kliyan diferan" "message": "Itilize pa yon varyete de kliyan diferan"
}, },
"validFileImport": {
"message": "Ou dwe chwazi yon dosye ki valab pou enpòte."
},
"viewAccount": { "viewAccount": {
"message": "Wè Kont" "message": "Wè Kont"
}, },

View File

@ -1325,9 +1325,6 @@
"userName": { "userName": {
"message": "Felhasználónév" "message": "Felhasználónév"
}, },
"validFileImport": {
"message": "Ki kell választanod egy érvényes fájlt az importáláshoz."
},
"viewAccount": { "viewAccount": {
"message": "Fiók megtekintése" "message": "Fiók megtekintése"
}, },

View File

@ -1304,9 +1304,6 @@
"userName": { "userName": {
"message": "Nama Pengguna" "message": "Nama Pengguna"
}, },
"validFileImport": {
"message": "Anda harus memilih berkas yang sah untuk diimpor."
},
"viewAccount": { "viewAccount": {
"message": "Lihat Akun" "message": "Lihat Akun"
}, },

View File

@ -1295,9 +1295,6 @@
"userName": { "userName": {
"message": "Nome utente" "message": "Nome utente"
}, },
"validFileImport": {
"message": "Devi selezionare un file valido da importare."
},
"viewAccount": { "viewAccount": {
"message": "Vedi Account" "message": "Vedi Account"
}, },

View File

@ -1335,9 +1335,6 @@
"userName": { "userName": {
"message": "ಬಳಕೆದಾರಹೆಸರು" "message": "ಬಳಕೆದಾರಹೆಸರು"
}, },
"validFileImport": {
"message": "ನೀವು ಆಮದು ಮಾಡಲು ಮಾನ್ಯ ಫೈಲ್ ಅನ್ನು ಆಯ್ಕೆಮಾಡಬೇಕು."
},
"viewAccount": { "viewAccount": {
"message": "ಖಾತೆಯನ್ನು ವೀಕ್ಷಿಸಿ" "message": "ಖಾತೆಯನ್ನು ವೀಕ್ಷಿಸಿ"
}, },

View File

@ -1326,9 +1326,6 @@
"userName": { "userName": {
"message": "사용자이름" "message": "사용자이름"
}, },
"validFileImport": {
"message": "가져오기 위해 유효한 파일을 선택해야 합니다."
},
"viewAccount": { "viewAccount": {
"message": "계정 보기" "message": "계정 보기"
}, },

View File

@ -1335,9 +1335,6 @@
"userName": { "userName": {
"message": "Vartotojo vardas" "message": "Vartotojo vardas"
}, },
"validFileImport": {
"message": "Turite pasirinkti galiojantį failą, kurį pageidaujate importuoti."
},
"viewAccount": { "viewAccount": {
"message": "Žiūrėti paskyrą" "message": "Žiūrėti paskyrą"
}, },

View File

@ -1331,9 +1331,6 @@
"userName": { "userName": {
"message": "Lietotājvārds" "message": "Lietotājvārds"
}, },
"validFileImport": {
"message": "Importēšanai jāatlasa derīga datne."
},
"viewAccount": { "viewAccount": {
"message": "Skatīt kontu" "message": "Skatīt kontu"
}, },

View File

@ -1303,9 +1303,6 @@
"userName": { "userName": {
"message": "Nama pengguna" "message": "Nama pengguna"
}, },
"validFileImport": {
"message": "Anda mesti pilih fail yang sah untuk diimport."
},
"viewAccount": { "viewAccount": {
"message": "Paparkan Akaun" "message": "Paparkan Akaun"
}, },

View File

@ -463,9 +463,6 @@
"usedByClients": { "usedByClients": {
"message": "Gebruikt door verschillende klanten" "message": "Gebruikt door verschillende klanten"
}, },
"validFileImport": {
"message": "U moet een geldig bestand selecteren om te importeren."
},
"viewAccount": { "viewAccount": {
"message": "Bekijk account" "message": "Bekijk account"
}, },

View File

@ -1307,9 +1307,6 @@
"userName": { "userName": {
"message": "Brukernavn" "message": "Brukernavn"
}, },
"validFileImport": {
"message": "Du må velge en gyldig fil å importere"
},
"viewAccount": { "viewAccount": {
"message": "Se konto" "message": "Se konto"
}, },

View File

@ -1320,9 +1320,6 @@
"userName": { "userName": {
"message": "Nazwa użytkownika" "message": "Nazwa użytkownika"
}, },
"validFileImport": {
"message": "Należy wybrać prawidłowy plik do zaimportowania."
},
"viewAccount": { "viewAccount": {
"message": "Zobacz konto" "message": "Zobacz konto"
}, },

View File

@ -473,9 +473,6 @@
"usedByClients": { "usedByClients": {
"message": "Utilizado por vários tipos de clientes" "message": "Utilizado por vários tipos de clientes"
}, },
"validFileImport": {
"message": "Deve selecionar um ficheiro válido para importar."
},
"viewAccount": { "viewAccount": {
"message": "Ver Conta" "message": "Ver Conta"
}, },

View File

@ -1314,9 +1314,6 @@
"userName": { "userName": {
"message": "Nome de usuário" "message": "Nome de usuário"
}, },
"validFileImport": {
"message": "Você precisa selecionar um arquivo válido para importar."
},
"viewAccount": { "viewAccount": {
"message": "Visualizar conta" "message": "Visualizar conta"
}, },

View File

@ -1316,9 +1316,6 @@
"userName": { "userName": {
"message": "Nume utilizator" "message": "Nume utilizator"
}, },
"validFileImport": {
"message": "Trebuie să selectați un fișier valabil pentru importare."
},
"viewAccount": { "viewAccount": {
"message": "Afișați contul" "message": "Afișați contul"
}, },

View File

@ -527,9 +527,6 @@
"usedByClients": { "usedByClients": {
"message": "Используется различными клиентами" "message": "Используется различными клиентами"
}, },
"validFileImport": {
"message": "Вам нужно выбрать правильный файл для импорта."
},
"viewAccount": { "viewAccount": {
"message": "Посмотреть счет" "message": "Посмотреть счет"
}, },

View File

@ -1289,9 +1289,6 @@
"userName": { "userName": {
"message": "Meno používateľa" "message": "Meno používateľa"
}, },
"validFileImport": {
"message": "Musíte vybrat validní soubor k importu."
},
"viewAccount": { "viewAccount": {
"message": "Zobrazit účet" "message": "Zobrazit účet"
}, },

View File

@ -1317,9 +1317,6 @@
"userName": { "userName": {
"message": "Uporabniško ime" "message": "Uporabniško ime"
}, },
"validFileImport": {
"message": "Za uvoz morate izbrati pravilno datoteko."
},
"viewAccount": { "viewAccount": {
"message": "Poglej račun" "message": "Poglej račun"
}, },

View File

@ -1320,9 +1320,6 @@
"userName": { "userName": {
"message": "Корисничко име" "message": "Корисничко име"
}, },
"validFileImport": {
"message": "Morate odabrati važeću datoteku da biste ih uvezli."
},
"viewAccount": { "viewAccount": {
"message": "Прикажи налог" "message": "Прикажи налог"
}, },

View File

@ -1310,9 +1310,6 @@
"userName": { "userName": {
"message": "Användarnamn" "message": "Användarnamn"
}, },
"validFileImport": {
"message": "Du måste välja en giltig fil för att importera."
},
"viewAccount": { "viewAccount": {
"message": "Visa konto" "message": "Visa konto"
}, },

View File

@ -1313,9 +1313,6 @@
"userName": { "userName": {
"message": "Jina la mtumiaji" "message": "Jina la mtumiaji"
}, },
"validFileImport": {
"message": "Ni lazima uchague faili halali ili uhamishe."
},
"viewAccount": { "viewAccount": {
"message": "Angalia Akaunti" "message": "Angalia Akaunti"
}, },

View File

@ -539,9 +539,6 @@
"usedByClients": { "usedByClients": {
"message": "பல்வேறு வாடிக்கையாளர்கள் பல்வேறு பயன்படுத்திய" "message": "பல்வேறு வாடிக்கையாளர்கள் பல்வேறு பயன்படுத்திய"
}, },
"validFileImport": {
"message": "இறக்குமதி செய்ய சரியான கோப்பு தேர்ந்தெடுக்க வேண்டும்."
},
"viewAccount": { "viewAccount": {
"message": "கணக்கைப் பார்" "message": "கணக்கைப் பார்"
}, },

View File

@ -641,9 +641,6 @@
"usedByClients": { "usedByClients": {
"message": "ถูกใช้งานโดยหลายไคลเอนท์" "message": "ถูกใช้งานโดยหลายไคลเอนท์"
}, },
"validFileImport": {
"message": "คุณต้องเลือกไฟล์ที่ถูกต้องเพื่อนำเข้า"
},
"viewAccount": { "viewAccount": {
"message": "ดูบัญชี" "message": "ดูบัญชี"
}, },

View File

@ -536,9 +536,6 @@
"usedByClients": { "usedByClients": {
"message": "Farklı istemciler tarafından kullanılmakta" "message": "Farklı istemciler tarafından kullanılmakta"
}, },
"validFileImport": {
"message": "Almak için geçerli bir dosya seçmelisiniz"
},
"viewAccount": { "viewAccount": {
"message": "Hesabı İncele" "message": "Hesabı İncele"
}, },

View File

@ -1335,9 +1335,6 @@
"userName": { "userName": {
"message": "Ім’я користувача" "message": "Ім’я користувача"
}, },
"validFileImport": {
"message": "Потрібно вибрати дійсний файл для імпорту."
},
"viewAccount": { "viewAccount": {
"message": "Переглянути обліковий запис" "message": "Переглянути обліковий запис"
}, },

View File

@ -1314,9 +1314,6 @@
"userName": { "userName": {
"message": "用户名" "message": "用户名"
}, },
"validFileImport": {
"message": "您必须选择一个有效的文件进行导入."
},
"viewAccount": { "viewAccount": {
"message": "查看账户" "message": "查看账户"
}, },

View File

@ -1308,9 +1308,6 @@
"userName": { "userName": {
"message": "使用者名稱" "message": "使用者名稱"
}, },
"validFileImport": {
"message": "您必須選擇一個合法的檔案來匯入."
},
"viewAccount": { "viewAccount": {
"message": "查看帳戶" "message": "查看帳戶"
}, },

View File

@ -39,7 +39,6 @@ export default class TransactionListItemDetails extends PureComponent {
state = { state = {
justCopied: false, justCopied: false,
cancelDisabled: false,
} }
handleEtherscanClick = () => { handleEtherscanClick = () => {

View File

@ -39,7 +39,6 @@ export default class SenderToRecipient extends PureComponent {
state = { state = {
senderAddressCopied: false, senderAddressCopied: false,
recipientAddressCopied: false,
} }
renderSenderIdenticon () { renderSenderIdenticon () {
@ -112,7 +111,6 @@ export default class SenderToRecipient extends PureComponent {
<div <div
className="sender-to-recipient__party sender-to-recipient__party--recipient sender-to-recipient__party--recipient-with-address" className="sender-to-recipient__party sender-to-recipient__party--recipient sender-to-recipient__party--recipient-with-address"
onClick={() => { onClick={() => {
this.setState({ recipientAddressCopied: true })
copyToClipboard(checksummedRecipientAddress) copyToClipboard(checksummedRecipientAddress)
if (onRecipientClick) { if (onRecipientClick) {
onRecipientClick() onRecipientClick()
@ -136,7 +134,6 @@ export default class SenderToRecipient extends PureComponent {
} }
wrapperClassName="sender-to-recipient__tooltip-wrapper" wrapperClassName="sender-to-recipient__tooltip-wrapper"
containerClassName="sender-to-recipient__tooltip-container" containerClassName="sender-to-recipient__tooltip-container"
onHidden={() => this.setState({ recipientAddressCopied: false })}
> >
<div className="sender-to-recipient__name"> <div className="sender-to-recipient__name">
<span>{ addressOnly ? `${t('to')}: ` : '' }</span> <span>{ addressOnly ? `${t('to')}: ` : '' }</span>

View File

@ -11,8 +11,6 @@ import PageContainer from '../../components/ui/page-container'
import { Tabs, Tab } from '../../components/ui/tabs' import { Tabs, Tab } from '../../components/ui/tabs'
const emptyAddr = '0x0000000000000000000000000000000000000000' const emptyAddr = '0x0000000000000000000000000000000000000000'
const SEARCH_TAB = 'SEARCH'
const CUSTOM_TOKEN_TAB = 'CUSTOM_TOKEN'
class AddToken extends Component { class AddToken extends Component {
static contextTypes = { static contextTypes = {
@ -42,7 +40,6 @@ class AddToken extends Component {
customSymbolError: null, customSymbolError: null,
customDecimalsError: null, customDecimalsError: null,
autoFilled: false, autoFilled: false,
displayedTab: SEARCH_TAB,
forceEditSymbol: false, forceEditSymbol: false,
} }
} }
@ -73,8 +70,7 @@ class AddToken extends Component {
decimals: customDecimals = 0, decimals: customDecimals = 0,
} = customToken } = customToken
const displayedTab = Object.keys(selectedTokens).length > 0 ? SEARCH_TAB : CUSTOM_TOKEN_TAB this.setState({ selectedTokens, customAddress, customSymbol, customDecimals })
this.setState({ selectedTokens, customAddress, customSymbol, customDecimals, displayedTab })
} }
} }

View File

@ -12,14 +12,9 @@ import Button from '../../../components/ui/button'
const HELP_LINK = 'https://metamask.zendesk.com/hc/en-us/articles/360015489351-Importing-Accounts' const HELP_LINK = 'https://metamask.zendesk.com/hc/en-us/articles/360015489351-Importing-Accounts'
class JsonImportSubview extends Component { class JsonImportSubview extends Component {
constructor (props) { state = {
super(props)
this.state = {
file: null,
fileContents: '', fileContents: '',
} }
}
render () { render () {
const { error } = this.props const { error } = this.props
@ -73,8 +68,10 @@ class JsonImportSubview extends Component {
) )
} }
onLoad (event, file) { onLoad (event) {
this.setState({file: file, fileContents: event.target.result}) this.setState({
fileContents: event.target.result,
})
} }
createKeyringOnEnter (event) { createKeyringOnEnter (event) {
@ -86,14 +83,7 @@ class JsonImportSubview extends Component {
createNewKeychain () { createNewKeychain () {
const { firstAddress, displayWarning, importNewJsonAccount, setSelectedAddress, history } = this.props const { firstAddress, displayWarning, importNewJsonAccount, setSelectedAddress, history } = this.props
const state = this.state const { fileContents } = this.state
if (!state) {
const message = this.context.t('validFileImport')
return displayWarning(message)
}
const { fileContents } = state
if (!fileContents) { if (!fileContents) {
const message = this.context.t('needImportFile') const message = this.context.t('needImportFile')

View File

@ -64,7 +64,6 @@ export default class AddRecipient extends Component {
state = { state = {
isShowingTransfer: false, isShowingTransfer: false,
isShowingAllRecent: false,
} }
selectRecipient = (to, nickname = '') => { selectRecipient = (to, nickname = '') => {

View File

@ -37,10 +37,9 @@ export default class EnsInput extends Component {
} }
state = { state = {
recipient: null,
input: '', input: '',
toError: null, toError: null,
toWarning: null, ensResolution: undefined,
} }
componentDidMount () { componentDidMount () {
@ -234,7 +233,7 @@ export default class EnsInput extends Component {
} }
ensIconContents () { ensIconContents () {
const { loadingEns, ensFailure, ensResolution, toError } = this.state || { ensResolution: ZERO_ADDRESS } const { loadingEns, ensFailure, ensResolution, toError } = this.state
if (toError) { if (toError) {
return return

View File

@ -23,7 +23,7 @@ export default class AddContact extends PureComponent {
} }
state = { state = {
nickname: '', newName: '',
ethAddress: '', ethAddress: '',
ensAddress: '', ensAddress: '',
error: '', error: '',