Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

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

@AnthonyRonning AnthonyRonning merged commit f8fea0d into master Jan 23, 2024
9 checks passed
@AnthonyRonning AnthonyRonning deleted the hodl-inv branch January 23, 2024 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants