1
0
This commit is contained in:
ThomasV
2023-02-28 09:34:03 +01:00
parent cb8cc76e1f
commit da402973cd
2 changed files with 3 additions and 3 deletions

View File

@@ -202,7 +202,7 @@ class QESwapHelper(AuthMixin, QObject):
max_onchain_spend = 0
reverse = int(min(lnworker.num_sats_can_send(),
swap_manager.get_max_amount()))
max_recv_amt_ln = int(swap_manager.num_sats_can_receive())
max_recv_amt_ln = int(lnworker.num_sats_can_receive())
max_recv_amt_oc = swap_manager.get_send_amount(max_recv_amt_ln, is_reverse=False) or 0
forward = int(min(max_recv_amt_oc,
# maximally supported swap amount by provider

View File

@@ -168,7 +168,7 @@ class SwapDialog(WindowModalDialog):
if self.is_reverse and send_amount and send_amount > self.lnworker.num_sats_can_send():
# cannot send this much on lightning
recv_amount = None
if (not self.is_reverse) and recv_amount and recv_amount > self.swap_manager.num_sats_can_receive():
if (not self.is_reverse) and recv_amount and recv_amount > self.lnworker.num_sats_can_receive():
# cannot receive this much on lightning
recv_amount = None
self.recv_amount_e.follows = True
@@ -244,7 +244,7 @@ class SwapDialog(WindowModalDialog):
onchain_amount = self.send_amount_e.get_amount()
if lightning_amount is None or onchain_amount is None:
return
if lightning_amount > self.swap_manager.num_sats_can_receive():
if lightning_amount > self.lnworker.num_sats_can_receive():
if not self.window.question(CANNOT_RECEIVE_WARNING):
return
self.window.protect(self.do_normal_swap, (lightning_amount, onchain_amount))