mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-06 10:48:11 +01:00
Add support for mercy transactions for refund-refund path
This commit is contained in:
@@ -3871,6 +3871,14 @@ class BasicSwap(BaseApp):
|
||||
)
|
||||
self.saveBidInSession(bid_id, bid, session, xmr_swap)
|
||||
session.commit()
|
||||
|
||||
if self.isBchXmrSwap(offer):
|
||||
for_ed25519: bool = True if ci_to.curve_type() == Curves.ed25519 else False
|
||||
kbsf = self.getPathKey(offer.coin_from, offer.coin_to, bid.created_at, xmr_swap.contract_count, KeyTypes.KBSF, for_ed25519)
|
||||
|
||||
mercy_tx = ci_from.createMercyTx(xmr_swap.a_lock_refund_swipe_tx, h2b(txid), xmr_swap.a_lock_refund_tx_script, kbsf)
|
||||
txid = ci_from.publishTx(mercy_tx)
|
||||
self.log.info('Submitted mercy tx for bid %s, txid %s', bid_id.hex(), txid)
|
||||
except Exception as ex:
|
||||
self.log.debug('Trying to publish coin a lock refund swipe tx: %s', str(ex))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user