chore: merge main into nexus#1096
Draft
hyper-gonk[bot] wants to merge 2 commits into
Draft
Conversation
## 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
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.
This PR was automatically created to merge changes from
mainintonexus.