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

Consolidate reverse swap amounts calculation #55

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Mar 22, 2024

This rewrites the amount and fee calculation logic for the reverse swap (receive-payment) such that it's clearer how the amounts are calculated from the user input.

Some PRs were opened in the Boltz client repo, which are needed for correct reverse fee calculation, i.e. if the user specifies the desired onchain amount. When they are merged, we can integrate them and update the places marked with TODOs in this PR.

Until then, the PR uses an approximation in the fee calculation for that case.

Base automatically changed from ok300-simplify-get-chain to main March 26, 2024 05:02
@ok300 ok300 force-pushed the ok300-simplify-rev-swap-amounts-calculations branch from 6add85a to 2b65fc9 Compare March 26, 2024 05:04
@ok300 ok300 merged commit e5a650e into main Mar 26, 2024
2 checks passed
@ok300 ok300 deleted the ok300-simplify-rev-swap-amounts-calculations branch March 26, 2024 05:05
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