Skip to content

fix/refactor: resolve issues #1086, #1087, #1088, #1089 - #1147

Merged
Maki-Zeninn merged 5 commits into
Maki-Zeninn:mainfrom
Grace-CODE-D:feat/tasks-resolution
Aug 26, 2026
Merged

fix/refactor: resolve issues #1086, #1087, #1088, #1089#1147
Maki-Zeninn merged 5 commits into
Maki-Zeninn:mainfrom
Grace-CODE-D:feat/tasks-resolution

Conversation

@Grace-CODE-D

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four tasks across router-timelock, router-execution, router-access, and router-quote:

  • router-timelock: Added test coverage for all four cancel() error paths.
  • router-execution: Fixed ExecutionRequest struct literals in tests missing args and amount fields.
  • router-access: Refactored grant_role_internal to compute expiry_timestamp once rather than twice.
  • router-quote: Extracted duplicated sorted vector insertion logic into a generic helper find_insertion_index.

Detailed Changes

router-timelock

  • Added test_cancel_nonexistent_op_fails covering TimelockError::NotFound.
  • Added test_cancel_unauthorized_fails covering TimelockError::Unauthorized.
  • Added test_cancel_already_cancelled_fails covering TimelockError::Cancelled.
  • Added test_cancel_already_executed_fails covering TimelockError::AlreadyExecuted.

router-execution

  • Added missing args: Vec::new(&env) and amount: 1_000_000 fields to ExecutionRequest struct literals in test_execute_success_path and test_execute_retry_then_succeeds.

router-access

  • Extracted repeated expiry timestamp computation in grant_role_internal to compute expiry_timestamp once before if currently_active and reuse the binding for the duplicate check and storage write.

router-quote

  • Extracted find_insertion_index helper function with comparator closure.
  • Refactored set_route_fee_tiers and get_quotes_sorted to use find_insertion_index.

Closes #1086
Closes #1087
Closes #1088
Closes #1089

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@Grace-CODE-D 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! 🚀

Learn more about application limits

@Maki-Zeninn
Maki-Zeninn merged commit b941f4b into Maki-Zeninn:main Aug 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment