Buy with lighting
Please a new option next to "Buy" that says "Buy with lighting <Lighting icon>". And integrate there, that's the most consistent way of adding this feature. You should modify the buy modal to add the following:
- If is buying with lighting, it should NOT, validate the dummy utxos. (look for the update payer function)
- Of course, instead of using our psbt and signing function, just call the API with the signed seller psbt.
- Deezy api will give you back an bolt11_invoice, pay that invoice using Alby first, (then we can add the logic for metamask)
For the lighting icon please use "feather-zap", that is the most similar and it is consistent with the rest of the icons.
Create a new file under utils call lighting.js, and place all your logic there.
It is pretty much the same we have, but much much better, no need for users to be sending some dummy utxo's, something that for most people is hard to understand.
Instead of having two Buy buttons, I'd suggest having one Buy button, then when you click it, a modal pops up where you can pick lightning or on-chain
Okay I am picking this task up.
Instead of having two Buy buttons, I'd suggest having one Buy button, then when you click it, a modal pops up where you can pick lightning or on-chain
I don't feel like this will provide the best user experience. Now we are adding an extra click so that the user can figure it what are the possible buying options. The list of actions was designed so that the user can see at first glance what can they do with the ordinal, sell, send, buy, buy with lighting..
What about if we have "Buy with bitcoin
We can even have PAY with lighting at the end of the process, or have some underlying logic behind to try to figure it out if should go with lighting or not, always giving the user the opportunity to switch to the other one
either way, we can always edit the flow later