diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index 36746ce5d..cd62f98d8 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -124,14 +124,8 @@ def create_claim_tx( """Create tx to either claim successful reverse-swap, or to get refunded for timed-out forward-swap. """ - assert txin.address is not None - if is_segwit_address(txin.address): - txin.script_type = 'p2wsh' - txin.script_sig = b'' - else: - txin.script_type = 'p2wsh-p2sh' # TODO rm?? - txin.redeem_script = bytes.fromhex(p2wsh_nested_script(witness_script.hex())) - txin.script_sig = bytes.fromhex(push_script(txin.redeem_script.hex())) + txin.script_type = 'p2wsh' + txin.script_sig = b'' txin.witness_script = witness_script txout = PartialTxOutput.from_address_and_value(address, amount_sat) tx = PartialTransaction.from_io([txin], [txout], version=2, locktime=locktime) diff --git a/electrum/tests/test_sswaps.py b/electrum/tests/test_sswaps.py index 377fa31ec..3011b2eca 100644 --- a/electrum/tests/test_sswaps.py +++ b/electrum/tests/test_sswaps.py @@ -34,7 +34,6 @@ class TestSwapTxs(TestCaseForTestnet): prevout=TxOutpoint(txid=bfh(swap_data.funding_txid), out_idx=0), ) txin._trusted_value_sats = swap_data.onchain_amount - txin._trusted_address = swap_data.lockup_address tx = SwapManager._create_and_sign_claim_tx( txin=txin, swap=swap_data, @@ -65,7 +64,6 @@ class TestSwapTxs(TestCaseForTestnet): prevout=TxOutpoint(txid=bfh(swap_data.funding_txid), out_idx=0), ) txin._trusted_value_sats = swap_data.onchain_amount - txin._trusted_address = swap_data.lockup_address tx = SwapManager._create_and_sign_claim_tx( txin=txin, swap=swap_data,