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

Add util function for hodl invoice detection #980

Merged
merged 1 commit into from Jan 23, 2024
Merged

Conversation

benthecarman
Copy link
Collaborator

@benthecarman benthecarman commented Jan 22, 2024

No reason to keep the disction between test and non test for the list, just keeping the ONE_KEY in there because no one will ever have it anyways


/// If the invoice is from a node that gives hodl invoices
#[wasm_bindgen]
pub async fn is_potential_hodl_invoice(invoice: String) -> Result<bool, MutinyJsError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? Don't we already warn users when paying zeus that it is a hodl invoice? Something is already doing that logic somewhere based on the list of pubkeys.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the front end we only warn for lightning address by checking for @zuespay.com

@TonyGiorgio TonyGiorgio merged commit f8fea0d into master Jan 23, 2024
9 checks passed
@TonyGiorgio TonyGiorgio deleted the hodl-inv branch January 23, 2024 20:18
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 this pull request may close these issues.

None yet

2 participants