-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Problem
The payment request modal currently offers users two options:
- Connect a wallet using one of the provided connectors
- Pay the invoice externally using a QR code or by copying the encoded invoice
I am integrating bitcoin-connect into a service based on the L402 protocol. For the protocol to function correctly, it is essential that the client has access to the invoice preimage. Allowing the user to pay the invoice with an external wallet that is not connected introduces complications and makes it difficult to properly implement the L402 protocol.
Proposed solution
I propose making the "or + QR + copy invoice" HTML components optional in the payment request modal UI.
By providing a way to disable or hide these elements when needed, we make it really hard for the user to "accidentally" pay the invoice in a way that the client does not have access to the preimage.
Alternative Solution/Workarounds
- Let the user manually introduce the preiamge: it's own can of worms (some wallets do not give it to the user) + bad UX
- Polling the server to check if the payment has been received: introduces additional complexity and potential problems that I would like to avoid.
I am more than happy to create a PR adding the prop + logic to hide this section of the html but I want to hear professional advice first :)