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

feat(core): implement the tip logic to pay a bolt 12 #181

Merged
merged 7 commits into from
Feb 6, 2024

Conversation

vincenzopalazzo
Copy link
Contributor

See commits for more details

Fixes #137

@vincenzopalazzo vincenzopalazzo added enhancement New feature or request 💭 - brainstorming feature idea and related discussion labels Jul 29, 2023
@netlify
Copy link

netlify bot commented Jul 29, 2023

Deploy Preview for coffee-docs canceled.

Name Link
🔨 Latest commit e2e6fc0
🔍 Latest deploy log https://app.netlify.com/sites/coffee-docs/deploys/65c25cdcba3709000881e2ce

@vincenzopalazzo vincenzopalazzo force-pushed the macros/tipping branch 2 times, most recently from f6e7195 to 551e222 Compare July 29, 2023 10:07
@vincenzopalazzo vincenzopalazzo added the ❤️ - RFC Request for Comments, it is under consideration label Jul 29, 2023
Copy link
Collaborator

@tareknaser tareknaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. Thanks for putting this together.

coffee_cmd/src/coffee_term/command_show.rs Outdated Show resolved Hide resolved
coffee_plugin/src/plugin/plugin_mod.rs Show resolved Hide resolved
coffee_plugin/src/plugin/plugin_mod.rs Show resolved Hide resolved
coffee_cmd/src/cmd.rs Show resolved Hide resolved
coffee_cmd/src/coffee_term/command_show.rs Outdated Show resolved Hide resolved
coffee_cmd/src/coffee_term/command_show.rs Outdated Show resolved Hide resolved
@tareknaser
Copy link
Collaborator

This command needs to be documented as well

@vincenzopalazzo vincenzopalazzo force-pushed the macros/tipping branch 3 times, most recently from 9b84561 to e235480 Compare July 30, 2023 06:51
@vincenzopalazzo vincenzopalazzo marked this pull request as ready for review July 30, 2023 06:52
@vincenzopalazzo
Copy link
Contributor Author

I want to think how to test this

@vincenzopalazzo
Copy link
Contributor Author

Based on top of the current master, and we are not ready to implement some tests inside our integration testing, sorry

Copy link
Collaborator

@tareknaser tareknaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments

Also, when I run coffee tip locally but the tip doesn't actually go through, I get an empty table in the output
It might be helpful to provide users with a message for better feedback

coffee_core/src/coffee.rs Outdated Show resolved Hide resolved
docs/docs-book/src/support-coffee.md Outdated Show resolved Hide resolved
coffee_lib/src/types/mod.rs Outdated Show resolved Hide resolved
coffee_core/src/lib.rs Show resolved Hide resolved
coffee_core/src/coffee.rs Outdated Show resolved Hide resolved
coffee_cmd/src/cmd.rs Show resolved Hide resolved
@vincenzopalazzo
Copy link
Contributor Author

Also, when I run coffee tip locally but the tip doesn't actually go through, I get an empty table in the output

How you are testing the coffee tip? What do you mean doesn't actually go through? What error you are getting?

@vincenzopalazzo vincenzopalazzo force-pushed the macros/tipping branch 3 times, most recently from 2ed30ba to 5c14086 Compare February 6, 2024 12:55
@tareknaser
Copy link
Collaborator

How you are testing the coffee tip? What do you mean doesn't actually go through? What error you are getting?

That's the point I was making
There is no error message if the payment doesn't go through
but 7e11999 added better error handling

Copy link
Collaborator

@tareknaser tareknaser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

coffee_core/src/coffee.rs Outdated Show resolved Hide resolved
@vincenzopalazzo
Copy link
Contributor Author

but 7e11999 added better error handling

Yes I realize from your review that my implementation was a little bit monkey :)

This commit is implementing the tip logic to pay and bolt12
specified inside the coffee conf and to use the command line to
pay it.

Signed-off-by: Vincenzo Palazzo <[email protected]>
…inside the coffee conf

This commit assume that the developer of the plugins is running
a lightning node and is allow to receive payments with lightning.

So this is a helper method that help you to generate an BOLT 12
invoice without understand how to do it :)

Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo vincenzopalazzo merged commit 1b0a9bf into master Feb 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 - brainstorming feature idea and related discussion 💀 - missing tests ❤️ - RFC Request for Comments, it is under consideration enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request for a donation/tipping section in plugin manifest
2 participants