qt: improve send_change_to_lightning feedback
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
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.
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.
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