mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 23:27:26 +01:00
Update import.js
This commit is contained in:
parent
3b182774be
commit
c2138f20c3
1 changed files with 4 additions and 2 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Reference in a new issue