Skip to content

Improve fee math coverage and clean up clippy warnings#15

Open
Ayushjhax wants to merge 1 commit intojup-ag:mainfrom
Ayushjhax:main
Open

Improve fee math coverage and clean up clippy warnings#15
Ayushjhax wants to merge 1 commit intojup-ag:mainfrom
Ayushjhax:main

Conversation

@Ayushjhax
Copy link
Copy Markdown

Summary

  • Remove unused imports from jupiter-aggregator-common/src/lib.rs
  • Fix clippy::needless_update warning in jupiter-core/src/math/swap_curve_info.rs
  • Add unit tests for fee calculations in jupiter-core/src/math/fees.rs

Changes

Cleanup:

  • Removed 7 unused imports causing clippy warnings
  • Simplified SwapResult construction by removing redundant ..Default::default()

Tests:

  • Added 3 unit tests covering fee percentage calculations:
    • Fee percentage summation (trade + owner fees)
    • Zero denominator handling
    • Fee delegation to underlying implementation

Testing

cargo test # All tests pass ✅
cargo clippy --all-targets # No new warnings ✅## Impact

  • ✅ No breaking changes
  • ✅ Improved test coverage
  • ✅ Reduced clippy warnings

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.

1 participant