electrum icon indicating copy to clipboard operation
electrum copied to clipboard

qt: improve send_change_to_lightning feedback

Open f321x opened this issue 3 months ago • 3 comments

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

f321x avatar Sep 30 '25 15:09 f321x

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.

ecdsa avatar Nov 26 '25 13:11 ecdsa

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 https://github.com/spesmilo/electrum/pull/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 https://github.com/spesmilo/electrum/pull/10303.

f321x avatar Nov 26 '25 16:11 f321x

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

ecdsa avatar Nov 27 '25 09:11 ecdsa