preparescript: Add WALLET_ENCRYPTION_PWD env var.

Removed unnecessary START_DAEMONS env var.
Remove all cached addresses from the basicswap db for a wallet after reseeding.
Check that addresses retreived from the db are owned by teh wallet before they're used/displayed
This commit is contained in:
tecnovert
2022-11-17 00:36:13 +02:00
parent aabf865873
commit 0f7df9e5f1
12 changed files with 189 additions and 57 deletions

View File

@@ -32,6 +32,7 @@ from .ui.util import (
have_data_entry,
tickerToCoinId,
listOldBidStates,
checkAddressesOwned,
)
from .ui.page_offers import postNewOffer
from .protocols.xmr_swap_1 import recoverNoScriptTxnWithKey, getChainBSplitKey
@@ -117,8 +118,10 @@ def js_wallets(self, url_split, post_string, is_json):
rv = swap_client.getWalletInfo(coin_type)
rv.update(swap_client.getBlockchainInfo(coin_type))
ci = swap_client.ci(coin_type)
checkAddressesOwned(ci, rv)
return bytes(json.dumps(rv), 'UTF-8')
return bytes(json.dumps(self.server.swap_client.getWalletsInfo({'ticker_key': True})), 'UTF-8')
return bytes(json.dumps(swap_client.getWalletsInfo({'ticker_key': True})), 'UTF-8')
def js_offers(self, url_split, post_string, is_json, sent=False):