Browse Source

fix wallet-tool script for Wallet refactor

master
Adam Gibson 9 years ago
parent
commit
a115426f79
No known key found for this signature in database
GPG Key ID: B3AE09F1E9A3197A
  1. 35
      scripts/wallet-tool.py

35
scripts/wallet-tool.py

@ -105,21 +105,26 @@ if args[0] in noseed_methods:
else: else:
seed = args[0] seed = args[0]
method = ('display' if len(args) == 1 else args[1].lower()) method = ('display' if len(args) == 1 else args[1].lower())
while True: if not os.path.exists(os.path.join('wallets', seed)):
try: wallet = Wallet(seed, None, options.maxmixdepth,
pwd = get_password("Enter wallet decryption passphrase: ") options.gaplimit, extend_mixdepth= not maxmixdepth_configured,
wallet = Wallet(seed, pwd, storepassword=(method == 'importprivkey'))
options.maxmixdepth, else:
options.gaplimit, while True:
extend_mixdepth=not maxmixdepth_configured, try:
storepassword=(method == 'importprivkey')) pwd = get_password("Enter wallet decryption passphrase: ")
except WalletError: wallet = Wallet(seed, pwd,
print("Wrong password, try again.") options.maxmixdepth,
continue options.gaplimit,
except Exception as e: extend_mixdepth=not maxmixdepth_configured,
print("Failed to load wallet, error message: " + repr(e)) storepassword=(method == 'importprivkey'))
sys.exit(0) except WalletError:
break print("Wrong password, try again.")
continue
except Exception as e:
print("Failed to load wallet, error message: " + repr(e))
sys.exit(0)
break
if method == 'history' and not isinstance(jm_single().bc_interface, if method == 'history' and not isinstance(jm_single().bc_interface,
BitcoinCoreInterface): BitcoinCoreInterface):
print('showing history only available when using the Bitcoin Core ' + print('showing history only available when using the Bitcoin Core ' +

Loading…
Cancel
Save