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

fix: invalid unit comparison in lnurl tests #77

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

claddyy
Copy link
Contributor

@claddyy claddyy commented Oct 6, 2024

Ok(invoice) => invoice.amount_milli_satoshis().unwrap() / 1000,

Here we were converting the amount from milli_satoshi to satoshi, but max_withdrawable returns us amount in satoshi. So it was fundamentally a wrong comparison.

invoice_amount <= withdraw_response.max_withdrawable,

nit: Also includes minor change in error message.

@i5hi i5hi merged commit 8d01611 into SatoshiPortal:trunk Oct 6, 2024
4 checks passed
@claddyy claddyy deleted the lnurl-fix branch October 6, 2024 08:53
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