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

Have pay just pay a bolt12 offer #7632

Open
Sjors opened this issue Sep 2, 2024 · 6 comments
Open

Have pay just pay a bolt12 offer #7632

Sjors opened this issue Sep 2, 2024 · 6 comments
Assignees
Labels
Feature Request UX ✨ Polish and shine for users!
Milestone

Comments

@Sjors
Copy link
Contributor

Sjors commented Sep 2, 2024

I ran into the same confusion that led to #5473.

lightning-cli pay lno1zrxq... 100sat
{
   "code": -32602,
   "message": "Invalid bolt12: unexpected prefix lno"
}

You have to call fetchinvoice and then pay that.

Why not just do that automatically?

@vincenzopalazzo
Copy link
Collaborator

You have to call fetchinvoice and then pay that.

This is true for any bolt12. It is also true that it is trivial to add a pay <bolt12> helper

@vincenzopalazzo vincenzopalazzo added this to the v24.11 milestone Sep 2, 2024
@vincenzopalazzo vincenzopalazzo self-assigned this Sep 2, 2024
@vincenzopalazzo vincenzopalazzo added Feature Request UX ✨ Polish and shine for users! labels Sep 2, 2024
@Sjors
Copy link
Contributor Author

Sjors commented Sep 2, 2024

I can imagine needing a different flow for bolt12 offers that give away money. And repeating payments also aren't very suitable for the pay call.

@vincenzopalazzo
Copy link
Collaborator

I can imagine needing a different flow for bolt12 offers that give away money. And repeating payments also aren't very suitable for the pay call.

You are right, in fact I have a plugin that wrap the bolt12, so it is time to upstream the changes. Thanks for reporting

@rustyrussell
Copy link
Contributor

Currency conversions and repeated payments both need a different flow, so it's generalized. But if the amount is known and it's not repeated (which, TBF, is very common), it's totally possible to have pay Just Work,

@Sjors
Copy link
Contributor Author

Sjors commented Sep 7, 2024

Could currency conversion be handled through a plugin? So you'd simply use pay bolt12_fiat_amount and if the plugin is there, it just works, and otherwise it complains "sorry, no plugin".

@vincenzopalazzo
Copy link
Collaborator

Could currency conversion be handled through a plugin? So you'd simply use pay bolt12_fiat_amount and if the plugin is there, it just works, and otherwise it complains "sorry, no plugin".

Yes, but this is another story, the pay plugin should handle bolt12 IMHO, I will try to see what kind of code is required to implement it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request UX ✨ Polish and shine for users!
Projects
None yet
Development

No branches or pull requests

3 participants