Skip to content

loopout: fix negative reported fees #751

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

Merged
merged 1 commit into from
May 23, 2024

Conversation

bhandras
Copy link
Member

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

@bhandras bhandras force-pushed the negative-fees-fixup branch from cf90e11 to a48944a Compare May 22, 2024 19:01
@bhandras bhandras requested a review from starius May 22, 2024 19:01
@levmi levmi requested a review from hieblmi May 22, 2024 22:35
Copy link
Collaborator

@starius starius left a comment

Choose a reason for hiding this comment

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

LGTM 🏆

Added a comment

loopout.go Outdated
s.cost.Server += result.status.Value.ToSatoshis() -
s.AmountRequested
s.cost.Offchain += result.status.Fee.ToSatoshis()
if result.status.Preimage == s.SwapContract.Preimage {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a comment about this check (about the scenarios).

Copy link
Member Author

Choose a reason for hiding this comment

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

Instead I added a flag to indicate this is a swap payment and some comments explaining what we're doing when calculating the costs.

@bhandras bhandras force-pushed the negative-fees-fixup branch from a48944a to 5690235 Compare May 23, 2024 14:48
@bhandras bhandras merged commit f26a00d into lightninglabs:master May 23, 2024
4 checks passed
@bhandras bhandras deleted the negative-fees-fixup branch May 23, 2024 14:50
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.

3 participants