-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* perf: refactor `Trade` methods Refactored `input_amount` and `output_amount` methods to use `Fraction` for cleaner and more efficient code. Improved heuristic algorithm in functions handling pool exclusions during trade computations. Added `#[repr(u32)]` and `#[allow(non_camel_case_types)]` attributes to `FeeAmount` enum and updated crate version to `2.4.1`. * Update Cargo.toml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Refactor trade pool iteration logic Updated loops in trade.rs to use `enumerate()` for better clarity. Changed pool exclusion to utilize `take` and `skip` for more concise and readable code. These adjustments improve code readability and maintainability. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
29d2da6
commit c20b930
Showing
3 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters