Merge pull request #9911 from f321x/fix_swap_exception_send_change_to_lightning
fix: exceptions when sending change to lightning
This commit is contained in:
@@ -338,7 +338,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
|
|||||||
return
|
return
|
||||||
coro = sm.request_swap_for_amount(transport, swap_dummy_output.value)
|
coro = sm.request_swap_for_amount(transport, swap_dummy_output.value)
|
||||||
try:
|
try:
|
||||||
swap, invoice = self.window.run_coroutine_dialog(coro, _('Requesting swap invoice...'))
|
swap, swap_invoice = self.window.run_coroutine_dialog(coro, _('Requesting swap invoice...'))
|
||||||
except SwapServerError as e:
|
except SwapServerError as e:
|
||||||
self.show_error(str(e))
|
self.show_error(str(e))
|
||||||
return
|
return
|
||||||
@@ -346,7 +346,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
|
|||||||
return
|
return
|
||||||
tx.replace_output_address(DummyAddress.SWAP, swap.lockup_address)
|
tx.replace_output_address(DummyAddress.SWAP, swap.lockup_address)
|
||||||
assert tx.get_dummy_output(DummyAddress.SWAP) is None
|
assert tx.get_dummy_output(DummyAddress.SWAP) is None
|
||||||
tx.swap_invoice = invoice
|
tx.swap_invoice = swap_invoice
|
||||||
tx.swap_payment_hash = swap.payment_hash
|
tx.swap_payment_hash = swap.payment_hash
|
||||||
|
|
||||||
if is_preview:
|
if is_preview:
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ class SwapManager(Logger):
|
|||||||
if lightning_amount_sat is None:
|
if lightning_amount_sat is None:
|
||||||
raise SwapServerError(_("Swap amount outside of providers limits") + ":\n"
|
raise SwapServerError(_("Swap amount outside of providers limits") + ":\n"
|
||||||
+ _("min") + f": {self.get_min_amount()}\n"
|
+ _("min") + f": {self.get_min_amount()}\n"
|
||||||
+ _("max") + f": {self.get_max_amount()}")
|
+ _("max") + f": {self.get_provider_max_reverse_amount()}")
|
||||||
swap, invoice = await self.request_normal_swap(
|
swap, invoice = await self.request_normal_swap(
|
||||||
transport,
|
transport,
|
||||||
lightning_amount_sat=lightning_amount_sat,
|
lightning_amount_sat=lightning_amount_sat,
|
||||||
|
|||||||
Reference in New Issue
Block a user