1
0

submarine swaps: use password stored in memory. fixes #8612

This commit is contained in:
ThomasV
2023-09-15 16:01:13 +02:00
parent 9eb448ffe0
commit 3bc9ead67b

View File

@@ -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):