Browse Source

move wallet upgrade docs and improve wallet opening error handling

master
undeath 7 years ago
parent
commit
3a89ee4542
  1. 29
      docs/release-notes/release-notes-future.md
  2. 14
      docs/wallet-upgrade.md
  3. 11
      jmclient/jmclient/wallet_utils.py

29
docs/release-notes/release-notes-future.md

@ -1,29 +0,0 @@
Joinmarket-clientserver future:
===============================
Upgrading
=========
To upgrade: run the `install.sh` script as mentioned in the README. When prompted to overwrite the directory `jmvenv`, accept.
A new wallet format has been introduced. Old wallets require conversion. In order to convert your existing wallet to the new format you can use the included conversion tool at `scripts/convert_old_wallet.py`.
usage:
python convert_old_wallet.py full/path/to/wallets/wallet.json
This will place the newly converted `wallet.jmdat` file in the existing joinmarket `wallets/` directory. The wallet name will be adopted accordingly if it differs from `wallet`.
Notable changes
===============
Credits
=======
Thanks to everyone who directly contributed to this release -
And thanks also to those who submitted bug reports, tested and otherwise helped out.

14
docs/wallet-upgrade.md

@ -0,0 +1,14 @@
A new wallet format has been introduced. Old wallets require conversion.
In order to convert your existing wallet to the new format you can use the
included conversion tool at `scripts/convert_old_wallet.py`.
usage:
python convert_old_wallet.py full/path/to/wallets/wallet.json
This will place the newly converted `wallet.jmdat` file in the existing
joinmarket `wallets/` directory. The wallet name will be adopted accordingly
if it differs from `wallet`.
There is no need to move funds to the new wallet. All your funds, addresses,
private keys, history and also your seed will be retained.

11
jmclient/jmclient/wallet_utils.py

@ -907,7 +907,16 @@ def open_wallet(path, ask_for_password=True, password=None, read_only=False,
returns:
wallet object
"""
if ask_for_password:
if not os.path.isfile(path):
raise Exception("Failed to open wallet at '{}': not a file".format(path))
if not Storage.is_storage_file(path):
raise Exception("Failed to open wallet at '{}': not a valid joinmarket"
" wallet.\n\nIf this wallet is in the old json format "
"you need to convert it using the conversion script"
"at `scripts/convert_old_wallet.py`".format(path))
if ask_for_password and Storage.is_encrypted_storage_file(path):
while True:
try:
# do not try empty password, assume unencrypted on empty password

Loading…
Cancel
Save