commit 17485e3b88415a2b9f339f424d73fa8427307667
parent 000e56d67e07c884384d954f0c933eb7d0a85914
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 25 May 2020 20:19:24 +0200
follow-up prev commit
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py
@@ -129,7 +129,7 @@ class SwapManager(Logger):
async def normal_swap(self, lightning_amount, expected_onchain_amount, password):
privkey = os.urandom(32)
pubkey = ECPrivkey(privkey).get_public_key_bytes(compressed=True)
- key = await self.lnworker._add_request_coro(amount_sat, 'swap', expiry=3600*24)
+ key = await self.lnworker._add_request_coro(lightning_amount, 'swap', expiry=3600*24)
request = self.wallet.get_request(key)
invoice = request['invoice']
lnaddr = self.lnworker._check_invoice(invoice, lightning_amount)
@@ -233,9 +233,6 @@ class SwapManager(Logger):
self.add_lnwatcher_callback(lockup_address, onchain_amount, redeem_script, preimage, privkey, locktime)
# initiate payment.
success, log = await self.lnworker._pay(invoice, attempts=5)
- # discard data; this should be done by lnwatcher
- if success:
- swaps.pop(response_id)
return {
'id':response_id,
'success':success,