From c2138f20c3fff4fb9eb578db174ef1ba86a18790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Sun, 14 Nov 2021 10:57:48 -0500 Subject: [PATCH] Update import.js --- screen/wallets/import.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screen/wallets/import.js b/screen/wallets/import.js index 397252e0f..5980a381b 100644 --- a/screen/wallets/import.js +++ b/screen/wallets/import.js @@ -55,6 +55,7 @@ const WalletsImport = () => { const onBlur = () => { const valueWithSingleWhitespace = importText.replace(/^\s+|\s+$|\s+(?=\s)/g, ''); setImportText(valueWithSingleWhitespace); + return valueWithSingleWhitespace; }; useEffect(() => { @@ -75,10 +76,11 @@ const WalletsImport = () => { }, []); const importButtonPressed = () => { - if (importText.trim().length === 0) { + const textToImport = onBlur(); + if (textToImport.trim().length === 0) { return; } - importMnemonic(importText); + importMnemonic(textToImport); }; const importMnemonic = importText => {