From 3bc9ead67b5cd1383af1848912c4a5130b645630 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 15 Sep 2023 16:01:13 +0200 Subject: [PATCH] submarine swaps: use password stored in memory. fixes #8612 --- electrum/submarine_swaps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index 1af054203..a622ef05d 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -389,12 +389,13 @@ class SwapManager(Logger): self.lnwatcher.add_callback(swap.lockup_address, callback) async def hold_invoice_callback(self, payment_hash: bytes) -> None: - # note: this assumes the keystore is not encrypted + # note: this assumes the wallet has been unlocked key = payment_hash.hex() if key in self.swaps: swap = self.swaps[key] if swap.funding_txid is None: - tx = self.create_funding_tx(swap, None, None) + password = self.wallet.get_unlocked_password() + tx = self.create_funding_tx(swap, None, password) await self.broadcast_funding_tx(swap, tx) def create_normal_swap(self, *, lightning_amount_sat=None, payment_hash: bytes=None, their_pubkey=None):