Skip to content

fix(router-core): map RouteExpired to distinct ResolveError variant in batch_resolve - #856

Merged
Maki-Zeninn merged 3 commits into
Maki-Zeninn:mainfrom
Devcyprian:fix/issue-708-batch-resolve-route-expired
Jul 25, 2026
Merged

fix(router-core): map RouteExpired to distinct ResolveError variant in batch_resolve#856
Maki-Zeninn merged 3 commits into
Maki-Zeninn:mainfrom
Devcyprian:fix/issue-708-batch-resolve-route-expired

Conversation

@Devcyprian

Copy link
Copy Markdown
Contributor

Summary

  • Add RouteExpired variant to the ResolveError enum so callers can distinguish an expired route from a missing route
  • Add explicit Err(RouterError::RouteExpired) => BatchResolveResult::Err(ResolveError::RouteExpired) arm in batch_resolve before the generic catch-all
  • Previously RouteExpired silently fell into Err(_) => BatchResolveResult::Err(ResolveError::RouteNotFound), losing error identity

Closes #708

coredevdave-cmd and others added 2 commits July 25, 2026 08:39
set_route_fee_tiers accepted FeeTier structs with negative min_amount
values, producing nonsensical tiered fee logic (negative thresholds can
never match a valid amount_in). Add an early validation that returns
QuoteError::InvalidFeeTier (new variant = 9) if any tier's min_amount
is less than zero.

Closes Maki-Zeninn#801
…n batch_resolve

Add RouteExpired to the ResolveError enum and add an explicit match arm
in batch_resolve so expired-route errors are no longer silently folded
into the generic RouteNotFound catch-all, giving callers a distinct
signal to distinguish expiry from absence.

Closes Maki-Zeninn#708
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Devcyprian 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 1c9adab into Maki-Zeninn:main Jul 25, 2026
2 of 7 checks passed
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.

bug(router-core): batch_resolve does not map RouteExpired to a distinct error variant

3 participants