feat: (PRO-343) Improve estimate fee efficiency for different Price T… #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ype (Free -> instant, Fixed -> just calculate price), Margin -> the full calculation
Important
Improves fee estimation efficiency by handling different price models (Free, Fixed, Margin) with new methods in
fee.rsandprice.rs.estimate_kora_fee()infee.rsnow handlesPriceModel::Free,PriceModel::Fixed, andPriceModel::Marginmore efficiently by using new methodsget_required_lamports_with_fixed()andget_required_lamports_with_margin().TotalFeeCalculationstruct infee.rsnow has anew_fixed()constructor for fixed fee scenarios.PriceConfiginprice.rsnow includesget_required_lamports_with_fixed()andget_required_lamports_with_margin()for calculating fees based onPriceModel.price.rsandfee.rsto cover new fee calculation methods and scenarios.transfer_transaction.rsto fix a test case by renamingsourcetoinvalid.This description was created by
for 0c437c6. You can customize this summary. It will automatically update as commits are pushed.
📊 Unit Test Coverage
Unit Test Coverage: 84.6%
View Detailed Coverage Report