Skip to content

chore: merge main into nexus#1096

Draft
hyper-gonk[bot] wants to merge 2 commits into
nexusfrom
main-to-nexus
Draft

chore: merge main into nexus#1096
hyper-gonk[bot] wants to merge 2 commits into
nexusfrom
main-to-nexus

Conversation

@hyper-gonk
Copy link
Copy Markdown
Contributor

@hyper-gonk hyper-gonk Bot commented May 12, 2026

This PR was automatically created to merge changes from main into nexus.

paulbalaji and others added 2 commits May 12, 2026 22:16
## Summary

Fixes route availability labeling in the token picker.

When selecting an origin token, the picker now treats a token as
available if it can route to any listed destination, because origin
selection can auto-switch the destination. Destination selection remains
strict against the current origin.

## Root Cause

The picker reused strict current-pair route checking for both selection
modes. That made routable tokens like Fluent BLEND/USDnr appear as
"Route unavailable" when the current default destination was Base USDC,
even though selecting those origin tokens can move the user onto a valid
route.

## Validation

- `pnpm vitest src/features/tokens/utils.test.ts --run`
- `pnpm typecheck`
- `pnpm lint` (passes with existing no-console warnings outside this
change)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the token picker's route-availability computation and React
effect dependencies, which can affect which tokens appear
selectable/disabled and how lists are sorted; main risk is UI logic
regressions or stale route state.
> 
> **Overview**
> Fixes token picker route availability so **origin selection** marks a
token routable if it can reach *any* listed destination (since the
destination may auto-switch), while **destination selection** remains
strict to the current origin.
> 
> This introduces `checkTokenPickerHasRoute`, `checkTokenPairHasRoute`,
and `getDefaultTokens` in `utils.ts`, updates `TokenList` to maintain
separate strict-vs-picker route maps (with a masked dependency to avoid
unnecessary recomputation in origin mode), and adjusts the
route-unavailable tooltip copy/layout. Adds targeted unit tests covering
the new routability semantics and default-token gating.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c01e2a8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperlane-warp-template Ready Ready Preview, Comment May 12, 2026 9:19pm
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
injective-bridge Ignored Ignored May 12, 2026 9:19pm
nexus-bridge Ignored Ignored May 12, 2026 9:19pm
ousdt-bridge Ignored Ignored May 12, 2026 9:19pm
trump-bridge Ignored Ignored May 12, 2026 9:19pm

Request Review

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