Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buy with lighting #147

Open
andredevjs opened this issue Apr 24, 2023 · 4 comments
Open

Buy with lighting #147

andredevjs opened this issue Apr 24, 2023 · 4 comments

Comments

@andredevjs
Copy link
Contributor

andredevjs commented Apr 24, 2023

Please a new option next to "Buy" that says "Buy with lighting ". 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.

@dannydeezy
Copy link
Collaborator

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

@uthpalax
Copy link

Okay I am picking this task up.

@andredevjs
Copy link
Contributor Author

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

@uthpalax uthpalax linked a pull request Apr 27, 2023 that will close this issue
@dannydeezy
Copy link
Collaborator

either way, we can always edit the flow later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants