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

set fee reserve to 0 if destination is us #235

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

kiwiidb
Copy link
Contributor

@kiwiidb kiwiidb commented Oct 3, 2022

Closes #233
In case of an internal payment, the fee reserve should be 0.
This change allow clients to create a "Drain account" UX by combining different calls:

  • make a payment (or more than 1) leaving just the fee reserve in the account, using a Lightning Address or 0 amount invoice.
  • send the rest of the funds to some internal wallet (eg. hello@getalby.com or someone else).

@kiwiidb kiwiidb requested a review from bumi October 3, 2022 14:31
Copy link
Contributor

@bumi bumi left a comment

Choose a reason for hiding this comment

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

can we add a test for this?

@kiwiidb
Copy link
Contributor Author

kiwiidb commented Oct 4, 2022

Yes, done.

@kiwiidb kiwiidb requested a review from bumi October 4, 2022 14:47
@kiwiidb kiwiidb merged commit de592ff into main Oct 4, 2022
@kiwiidb kiwiidb deleted the chore/fee-reserve-improvement branch October 4, 2022 16:11
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.

improve fee reserve check
2 participants