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

Disallow invoices below allowed_underpay_amount #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kristapsk
Copy link
Member

Such invoices are otherwise autoconfirmed, without user making a payment at all. Fixes #92.

End user will have the same "Amount below dust limit" message, as I don't think they should know details about configuration. But what came into my mind - should we maybe also output this amount, which would be allowed_underpay_amount for LN, max(allowed_underpay_amount,onchain_dust_limit) for onchain?

Also, likely these log messages should not be warnings, but info, as it's user generated action, not something wrong on server side.

Such invoices are otherwise autoconfirmed, without user making a payment
at all.
@nickfarrow
Copy link
Member

nickfarrow commented Sep 13, 2022

Agree, I don't have any preference as to whether users see the value. But the value isn't exactly private since you could binary search and find it quickly. Yep that max is good if we do want to display the value.

It's a shame 1 sat does not work. I'll see if i can try fix the amounts rounding

@kristapsk
Copy link
Member Author

But the value isn't exactly private since you could binary search and find it quickly.

Don't think it even needs to be private. For example, in case of donation page, it's good for user to know minimum amount he can pay.

@kristapsk
Copy link
Member Author

I'll see if i can try fix the amounts rounding

When rounding issue is solved, allowed_underpay_amount can be changed to work for onchain payments only as with LN invoices exact amount will be always paid.

@nickfarrow nickfarrow mentioned this pull request Dec 5, 2022
@kristapsk
Copy link
Member Author

I'll see if i can try fix the amounts rounding

#164 should do it.

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.

Should not allow amounts that are not above configured allowed_underpay_amount
2 participants