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

@@ -28,6 +28,7 @@ from .ui.util import (
have_data_entry,
tickerToCoinId,
)
from .ui.page_offers import postNewOffer
from .protocols.xmr_swap_1 import recoverNoScriptTxnWithKey, getChainBSplitKey
@@ -74,6 +75,7 @@ def js_wallets(self, url_split, post_string, is_json):
def js_offers(self, url_split, post_string, is_json, sent=False):
swap_client = self.server.swap_client
offer_id = None
if len(url_split) > 3:
if url_split[3] == 'new':
@@ -84,7 +86,7 @@ def js_offers(self, url_split, post_string, is_json, sent=False):
form_data['is_json'] = True
else:
form_data = urllib.parse.parse_qs(post_string)
offer_id = self.postNewOffer(form_data)
offer_id = postNewOffer(swap_client, form_data)
rv = {'offer_id': offer_id.hex()}
return bytes(json.dumps(rv), 'UTF-8')
offer_id = bytes.fromhex(url_split[3])