Skip to content

Conversation

@f321x
Copy link
Member

@f321x f321x commented Sep 30, 2025

Improves the GUI feedback given to the user when sending change to lightning by showing different failure messages and the additional fee charged for the swap.
Also considers the min/max swap amount announced by the provider when deciding to add the swap dummy output in make_tx for improved reliability.
Partly improves github.com/spesmilo/electrum/issues/10163

image image

Improves the GUI feedback given to the user when sending change to
lightning by showing different failure messages and the additional fee
charged for the swap.
Also considers the min/max swap amount announced
by the provider when deciding to add the swap dummy output in make tx
for improved reliability.
@f321x f321x force-pushed the improve_send_change_to_ln branch from 253bf84 to 46eb6e1 Compare October 7, 2025 15:35
@ecdsa
Copy link
Member

ecdsa commented Nov 26, 2025

I do not like that we are doing a nostr get_pairs request ahead of transaction finalization.
This can be very slow, and the user may want to disable the option before any request is made.

Also, this logic leads to closing the dialog if we toggle the option, which is quite unfriendly.

@f321x
Copy link
Member Author

f321x commented Nov 26, 2025

If we want to show the user how many fees they are going to pay (Additional fees:) and make the flow reliable we need to fetch the pairs before the user initiates the transaction by clicking OK.

But i can use the code from #10303 to fetch the pairs concurrently while already showing the Dialog.
The Additional fees: label could show a loading... value and the OK button stays disabled until we got the pairs and know either the fees or can show an according warning label.

Then we could also show the swap provider selection button similar to #10303.

@ecdsa
Copy link
Member

ecdsa commented Nov 27, 2025

yes, that sounds much better.
if the option is enabled, we should display the swap provider selection button in the left bottom corner.
if no pair has been fetched yet, this button should just show "fetching swap offers", and the fee labels should also show a similar message.

I think this logic could be extended to the SwapDialog as well

@f321x f321x marked this pull request as draft November 27, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants