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 onchain amount arg #58

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Mar 23, 2024

This PR re-uses a previously calculated onchain_amount_sat instead of calculating it again.

@ok300 ok300 requested a review from hydra-yse March 23, 2024 11:05
Copy link
Collaborator

@hydra-yse hydra-yse left a comment

Choose a reason for hiding this comment

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

Since we always need to store both onchain and invoice amount, it is necessary to grab this information either from response, user input or re-calculation. In this configuration, if the onchain-amount variable is not set in the ReceivePaymentRequest, the insertion will fail due to missing field.

This is meant for a side-branch whose onchain_amount_sat calculation has been changed.

@ok300
Copy link
Contributor Author

ok300 commented Mar 24, 2024

You mean #55? That's where this PR's onchain_amount_sat logic comes from.

Base automatically changed from ok300-fix-network-flag to main March 26, 2024 05:10
@ok300 ok300 force-pushed the ok300-consolidate-rev-swap-onchain-amt branch from 1324935 to 7e5772e Compare March 26, 2024 05:11
@ok300 ok300 merged commit 8c95c42 into main Mar 26, 2024
2 checks passed
@ok300 ok300 deleted the ok300-consolidate-rev-swap-onchain-amt branch March 26, 2024 05:39
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