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

@@ -115,9 +115,15 @@ def ws_message_received(client, server, message):
def runClient(fp, data_dir, chain):
global swap_client
daemons = []
pids = []
threads = []
settings_path = os.path.join(data_dir, cfg.CONFIG_FILENAME)
pids_path = os.path.join(data_dir, '.pids')
if os.getenv('WALLET_ENCRYPTION_PWD', '') != '':
raise ValueError('Please unset the WALLET_ENCRYPTION_PWD environment variable.')
if not os.path.exists(settings_path):
raise ValueError('Settings file not found: ' + str(settings_path))
@@ -126,10 +132,6 @@ def runClient(fp, data_dir, chain):
swap_client = BasicSwap(fp, data_dir, settings, chain)
daemons = []
pids = []
threads = []
if os.path.exists(pids_path):
with open(pids_path) as fd:
for ln in fd: