deezy-place icon indicating copy to clipboard operation
deezy-place copied to clipboard

Buy with lighting

Open andredevjs opened this issue 2 years ago • 4 comments

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:

  1. If is buying with lighting, it should NOT, validate the dummy utxos. (look for the update payer function)
  2. Of course, instead of using our psbt and signing function, just call the API with the signed seller psbt.
  3. 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.

andredevjs avatar Apr 24 '23 13:04 andredevjs

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

dannydeezy avatar Apr 24 '23 15:04 dannydeezy

Okay I am picking this task up.

uthpalax avatar Apr 24 '23 16:04 uthpalax

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 " and "buy with lighting " instead? Adding a modal to open up another modal doesn't feels right either.

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

andredevjs avatar Apr 26 '23 20:04 andredevjs

either way, we can always edit the flow later

dannydeezy avatar Apr 27 '23 17:04 dannydeezy