diff --git a/basicswap/bin/prepare.py b/basicswap/bin/prepare.py index 65c88c6..b663eb0 100755 --- a/basicswap/bin/prepare.py +++ b/basicswap/bin/prepare.py @@ -1027,7 +1027,7 @@ def prepareCore(coin, version_data, settings, data_dir, extra_opts={}): if not os.path.exists(assert_sig_path): downloadFile(assert_sig_url, assert_sig_path) - release_hash = getFileHash(release_path) + release_hash: str = getFileHash(release_path) logger.info(f"{release_filename} hash: {release_hash}") with ( open(assert_path, "rb", 0) as fp, @@ -1125,7 +1125,7 @@ def prepareCore(coin, version_data, settings, data_dir, extra_opts={}): logger.warning("Double checking Navcoin release hash.") with open(assert_sig_path, "rb") as fp: decrypted = gpg.decrypt_file(fp) - assert release_hash.hex() in str(decrypted) + assert release_hash in str(decrypted) else: with open(assert_sig_path, "rb") as fp: verified = gpg.verify_file(fp, assert_path) diff --git a/doc/install.md b/doc/install.md index 002968d..082b66f 100644 --- a/doc/install.md +++ b/doc/install.md @@ -82,6 +82,16 @@ To instead use Monero public nodes and not run a local Monero daemon<br>(it can **Mnemonics should be stored encrypted and/or air-gapped.** And the output of `echo $CURRENT_XMR_HEIGHT` for use if you need to later restore your wallet. + +##### Restore + +To restore an existing install use --particl_mnemonic to input the existing mnemonic: + + docker-compose run --rm swapclient basicswap-prepare --datadir=/coindata --htmlhost="0.0.0.0" --wshost="0.0.0.0" \ + --withcoins=monero --xmrrestoreheight=$ORIGINAL_XMR_HEIGHT \ + --particl_mnemonic="existing mnemonic here" + + #### Set the timezone (optional) Edit the `.env` file in the docker directory, set TZ to your local timezone. @@ -209,7 +219,7 @@ Add a coin (Stop basicswap first): Start after installed: - + export SWAP_DATADIR=$HOME/coinswaps . $SWAP_DATADIR/venv/bin/activate && python -V basicswap-run --datadir=$SWAP_DATADIR diff --git a/doc/upgrade.md b/doc/upgrade.md index 05425ac..8bb4435 100644 --- a/doc/upgrade.md +++ b/doc/upgrade.md @@ -27,11 +27,11 @@ If the dependencies have changed the container must be built with `--no-cache`: After updating the code and rebuilding the container run: + basicswap/docker]$ docker-compose run --rm swapclient \ - basicswap-prepare --datadir=/coindata --preparebinonly --withcoins=monero,bitcoin + basicswap-prepare --datadir=/coindata --upgradecores -Specify all required coins after `--withcoins=`, separated by commas. If updating from versions below 0.21, you may need to add `wallet=wallet.dat` to the core config files. @@ -46,4 +46,4 @@ If updating from versions below 0.21, you may need to add `wallet=wallet.dat` to #### Update core versions - basicswap-prepare --datadir=$SWAP_DATADIR -preparebinonly --withcoins=monero,bitcoin + basicswap-prepare --datadir=$SWAP_DATADIR --upgradecores