Closed dpad85 closed 4 months ago
I also considered having a "Fix me" button (in the channels management screen) that would just change the configuration to whatever works, but it would take time to design properly to not footgun users. So if we do it, it should be done in a later PR.
See https://github.com/ACINQ/phoenix/issues/507 for context
The message warning users that the payment they intend to receive may fail was not visible enough. It was also quite long, while not providing enough information nor obvious solutions. This PR attempts to fix that.
Warning is now a one-liner just below the QR code
Clicking on the warning opens a dialog with more information/solutions
Note: for obvious cases, this dialog is opened immediately, even if the user has not clicked on it.
also show a "Fee expected" message
This lets the user know that they should expect a fee, even if it is within the configured bounds. They may prefer add liquidity instead.
@robbiehanson I added a helper method in
LocalChannelInfo
to get the real receive balance from the channels state flow, to only take into account the relevant channels - e.g., ignore channels which are booting. This method returns null when the liquidity is unknown at the moment, so you know when warning should be displayed, or not.See https://github.com/ACINQ/phoenix/blob/e1ed3fd538402a164ed19d7983513fe061ef4ef0/phoenix-android/src/main/kotlin/fr/acinq/phoenix/android/payments/receive/ReceiveLightningView.kt#L332-L455 for the warning logic I have been using.