Check BCH mercy tx value.

This commit is contained in:
tecnovert
2024-11-07 10:10:21 +02:00
parent fc17fa41ff
commit b400669919
2 changed files with 25 additions and 9 deletions

View File

@@ -799,6 +799,10 @@ class BCHInterface(BTCInterface):
def isTxExistsError(self, err_str: str) -> bool:
return 'transaction already in block chain' in err_str
def getRefundOutputScript(self, xmr_swap) -> bytes:
_, out_1, _, _, _ = self.extractScriptLockScriptValues(xmr_swap.a_lock_refund_tx_script)
return out_1
def createMercyTx(self, refund_swipe_tx_bytes: bytes, refund_swipe_tx_id: bytes, lock_refund_tx_script: bytes, keyshare: bytes) -> str:
refund_swipe_tx = self.loadTx(refund_swipe_tx_bytes)
refund_output_value = refund_swipe_tx.vout[0].nValue