breez / breezmobile

Lightning Network mobile client
https://breez.technology
GNU General Public License v3.0
573 stars 131 forks source link

LUD-09 success message is trimmed when multiline #1316

Open yanascz opened 1 week ago

yanascz commented 1 week ago

Expected Behaviour

Multiline success messages shall be visible untrimmed in the app without the need to leave the app.

Other LN wallets use either of these solutions:

  1. Unmodified success message is shown. (preferred)
    • Some wallets wrap it in a scrollable view with a border.
  2. Line breaks are replaced with " ". (sufficient)
    • This one should be an easy fix. However, would be great for the copy button to copy the original message.

How To Reproduce?

  1. Scan an LNURL-pay QR code of a service that uses LUD-09 success message. You can use the one below.
  2. Confirm the payment and wait for the success dialog to appear. Notice there are only two lines present, the rest is trimmed.
  3. Close the dialog and open payment details, expand the Message field. Notice there are only four lines present, the rest is still trimmed.
  4. Use the copy button and paste the message somewhere else. Notice there are actually eight lines in the message.

Screenshots

Screenshot 2024-10-26 at 18 52 16 Screenshot 2024-10-26 at 18 53 01 Screenshot 2024-10-26 at 19 16 21

QR Code for Testing

QR code

Operating System

iOS 18.0.1

Breez Version

1.1.19 from App Store

yanascz commented 1 week ago

Looking at lnurl_success_action_dialog.dart, what is the motivation to limit message success action to 2 lines? 🤔 The URL success action has 4 lines configured. And if there’s an error, 10+ lines is not an issue: image