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

Use recommended fees when calculating claim tx feerates for send chain swap fee estimates #66

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

erdemyerebasmaz
Copy link
Collaborator

Closes #65

Integrate recommendedFees & display economy, regular, priority fee options.

…n swap fee estimates

Integrate recommendedFees & display economy, regular, priority fee options
@erdemyerebasmaz erdemyerebasmaz merged commit d796540 into main Jul 19, 2024
1 check passed
bool isAffordable({int? balanceSat, int? walletBalanceSat, required int amountSat}) {
assert(balanceSat != null);

return balanceSat! >= pairInfo.receiverAmountSat.toInt();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should check receiver_amount_sat + total_fees_sat

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should check receiver_amount_sat + total_fees_sat

Good catch!

It now uses the fee calculation on pair info's extension 22ca11f

extension PreparePayOnchainResponseAffordable on PreparePayOnchainResponse {
  bool isAffordable({required int balance}) {
    return balance >= (receiverAmountSat + totalFeesSat).toInt();
  }
}

@dangeross
Copy link
Contributor

Is it clear in the UI that the fee selection only applies to the Bitcoin claim (claim_fee_sat)and not the total fee (total_fee_sat)?

@erdemyerebasmaz erdemyerebasmaz deleted the recommended_fees branch July 22, 2024 08:36
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.

Integrate recommendedFees
3 participants