mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
command line restore: strip text
This commit is contained in:
parent
2bb2c2bcee
commit
e0ba4a967c
1 changed files with 2 additions and 2 deletions
4
electrum
4
electrum
|
@ -116,7 +116,7 @@ def run_non_RPC(config):
|
||||||
return prompt_password("Password (hit return if you do not wish to encrypt your wallet):")
|
return prompt_password("Password (hit return if you do not wish to encrypt your wallet):")
|
||||||
|
|
||||||
if cmdname == 'restore':
|
if cmdname == 'restore':
|
||||||
text = config.get('text')
|
text = config.get('text').strip()
|
||||||
passphrase = config.get('passphrase', '')
|
passphrase = config.get('passphrase', '')
|
||||||
password = password_dialog() if keystore.is_private(text) else None
|
password = password_dialog() if keystore.is_private(text) else None
|
||||||
if keystore.is_seed(text):
|
if keystore.is_seed(text):
|
||||||
|
@ -124,7 +124,7 @@ def run_non_RPC(config):
|
||||||
elif keystore.is_any_key(text):
|
elif keystore.is_any_key(text):
|
||||||
k = keystore.from_keys(text)
|
k = keystore.from_keys(text)
|
||||||
else:
|
else:
|
||||||
sys.exit(str(e))
|
sys.exit("Error: Seed or key not recognized")
|
||||||
k.update_password(None, password)
|
k.update_password(None, password)
|
||||||
storage.put('keystore', k.dump())
|
storage.put('keystore', k.dump())
|
||||||
storage.put('wallet_type', 'standard')
|
storage.put('wallet_type', 'standard')
|
||||||
|
|
Loading…
Add table
Reference in a new issue