Fix/issues 1094 1095 1096 1097 - #1145
Merged
Maki-Zeninn merged 4 commits intoAug 26, 2026
Merged
Conversation
…id tiers (Maki-Zeninn#1094) Add two tests: - test_set_route_fee_tiers_rejects_negative_min_amount: verifies that a tier with negative min_amount returns InvalidFeeTier error - test_set_route_fee_tiers_rejects_fee_bps_over_max: verifies that a tier with fee_bps > 10000 returns InvalidFeeBps error These tests exercise the validation branches that were previously untested.
…lient calls (Maki-Zeninn#1095) The non-try_ variants of RouterQuote::get_quote and RouterExecution::execute already unwrap the Result and return the plain value, so calling .expect() on them causes compilation errors. Remove the redundant .expect() chains: - Line 201-202: get_quote() call - Line 269-270: execute() call - Line 373-374: get_quote() call - Line 399-400: execute() call This matches the pattern used elsewhere in this file (e.g., s.core.resolve()) and mirrors how these methods are used in the contracts' own test suites.
…ge entries (Maki-Zeninn#1096) The cleanup_expired function was only removing operation IDs from the PendingOps index, but not actually freeing the underlying Op and Deps storage entries. This caused the contract's instance storage footprint to grow unboundedly even though cleanup_expired was called regularly. Now when an operation is confirmed expired/executed/cancelled and is being dropped from the index, also remove its storage entries via: - env.storage().instance().remove(&DataKey::Op(op_id.clone())) - env.storage().instance().remove(&DataKey::Deps(op_id.clone())) This allows get_op() and get_dependencies() to start returning None for cleaned-up operations instead of their last known state, but this is the intended behavior for truly expired/finalized operations.
…set_route_fee_tiers (Maki-Zeninn#1097) Bring the doc comment for set_route_fee_tiers in line with the existing documentation style of set_route_fee and other admin-facing methods. Added sections: - # Arguments: documents env, caller, route, and tiers parameters - # Returns: documents Ok(()) on success - # Errors: documents all three possible error types: - Unauthorized: if caller is not the admin - InvalidFeeTier: if any tier has negative min_amount - InvalidFeeBps: if any tier has fee_bps > 10000
|
@Hexstar-labs Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implement fixes and improvements for router-quote and router-timelock contracts:
Changes
router-quote
router-timelock
integration-tests
Closes #1094
Closes #1095
Closes #1096
Closes #1097