ui: Allow selecting automation strategy when creating offer.

Add alternate pgp key urls.
This commit is contained in:
tecnovert
2022-06-01 00:38:50 +02:00
parent 08c10bc69e
commit 6153b76ec0
10 changed files with 525 additions and 445 deletions

View File

@@ -367,10 +367,18 @@ def prepareCore(coin, version_data, settings, data_dir):
if verified.username is None:
logger.warning('Signature not verified.')
pubkeyurl = 'https://raw.githubusercontent.com/tecnovert/basicswap/master/gitianpubkeys/{}_{}.pgp'.format(coin, signing_key_name)
logger.info('Importing public key from url: ' + pubkeyurl)
rv = gpg.import_keys(downloadBytes(pubkeyurl))
filename = '{}_{}.pgp'.format(coin, signing_key_name)
pubkeyurls = (
'https://raw.githubusercontent.com/tecnovert/basicswap/master/gitianpubkeys/' + filename,
'https://gitlab.com/particl/basicswap/-/raw/master/gitianpubkeys/' + filename,
)
for url in pubkeyurls:
try:
logger.info('Importing public key from url: ' + url)
rv = gpg.import_keys(downloadBytes(url))
break
except Exception as e:
print('Import from url failed', e)
for key in rv.fingerprints:
gpg.trust_keys(key, 'TRUST_FULLY')