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

Warn about hodl invoice #852

Closed
wants to merge 1 commit into from
Closed

Warn about hodl invoice #852

wants to merge 1 commit into from

Conversation

benthecarman
Copy link
Collaborator

Before we only warned for zeuspay lightning addresses, now we warn for the actual invoices as well

if (invoice.expire <= Date.now() / 1000) {
navigate("/search");
throw new Error(i18n.t("send.error_expired"));
}
const isHodl = await MutinyWallet.is_potential_hodl_invoice(
source.invoice!
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is source here and not not invoice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

invoice isn't a string, it is a MutinyInvoice

if (invoice.expire <= Date.now() / 1000) {
navigate("/search");
throw new Error(i18n.t("send.error_expired"));
}
const isHodl = await MutinyWallet.is_potential_hodl_invoice(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should just happen below in a single spot where it is being set. Now you have it here twice. I think this method can just replace the previous.

@benthecarman benthecarman deleted the hodl-invoice branch January 26, 2024 11:05
@benthecarman
Copy link
Collaborator Author

Not needed

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.

2 participants