mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 02:38:11 +01:00
tests: Manual recovery of xmrswap chain B lock tx
This commit is contained in:
@@ -28,6 +28,7 @@ from .ui import (
|
||||
have_data_entry,
|
||||
tickerToCoinId,
|
||||
)
|
||||
from .protocols.xmr_swap_1 import recoverNoScriptTxnWithKey, getChainBSplitKey
|
||||
|
||||
|
||||
def js_error(self, error_str):
|
||||
@@ -220,6 +221,13 @@ def js_bids(self, url_split, post_string, is_json):
|
||||
bid, xmr_swap, offer, xmr_offer, events = swap_client.getXmrBidAndOffer(bid_id)
|
||||
assert(bid), 'Unknown bid ID'
|
||||
|
||||
if post_string != '':
|
||||
if have_data_entry(post_data, 'chainbkeysplit'):
|
||||
return bytes(json.dumps({'splitkey': getChainBSplitKey(swap_client, bid, xmr_swap, offer)}), 'UTF-8')
|
||||
elif have_data_entry(post_data, 'spendchainblocktx'):
|
||||
remote_key = get_data_entry(post_data, 'remote_key')
|
||||
return bytes(json.dumps({'txid': recoverNoScriptTxnWithKey(swap_client, bid_id, remote_key).hex()}), 'UTF-8')
|
||||
|
||||
edit_bid = False
|
||||
show_txns = False
|
||||
data = describeBid(swap_client, bid, xmr_swap, offer, xmr_offer, events, edit_bid, show_txns, for_api=True)
|
||||
|
||||
Reference in New Issue
Block a user