Fix code quality issues in dynamic token implementation#1046
Merged
Conversation
✅ Deploy Preview for vortex-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…eedback Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
ebma
approved these changes
Jan 28, 2026
Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for dynamic on-chain tokens
Fix code quality issues in dynamic token implementation
Jan 28, 2026
Member
|
@copilot please bring this pull request up-to-date with the latest changes from |
- Resolved conflicts in dynamicEvmTokens.ts by integrating deduplication logic with staging's refactored structure - Kept staging's separation of concerns (groupTokensByNetwork, mergeWithStaticConfig, buildPriceLookup) - Added smart token deduplication in groupTokensByNetwork with priority: native > higher USD price > lower address - Resolved conflict in index.ts by keeping staging's export order with prettier-ignore-end directive - All other changes from staging branch merged successfully Co-authored-by: ebma <6690623+ebma@users.noreply.github.com>
Contributor
Author
Merged staging branch successfully in commit f1d728c. Resolved conflicts in:
The PR now includes all latest changes from staging while preserving the code quality improvements from the review feedback. |
✅ Deploy Preview for vortexfi ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ebma
approved these changes
Jan 30, 2026
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.
Addresses code quality feedback from PR #1014: import ordering violations, unused dependencies, type inconsistencies, and non-deterministic token deduplication. This PR has been rebased on the latest staging branch.
Import & Dependency Cleanup
useOnchainTokenBalances.ts(ESM requirement)useReadContracts,erc20ABI,Abi,EvmTokenreact-windowdependency (replaced by@tanstack/react-virtual)Type Consistency
balanceUsdrequired inEvmTokenDetailsWithBalanceto matchOnChainTokenDetailsWithBalanceToken Deduplication Logic
When multiple tokens share the same symbol on a network, the previous implementation silently overwrote entries. Now uses deterministic prioritization integrated with staging's refactored token management structure:
The deduplication logic has been integrated into staging's refactored
groupTokensByNetworkfunction, which now works alongside the newmergeWithStaticConfigandbuildPriceLookupfunctions introduced in the staging branch.Sort Comparator Fix
Fixed
useOnchainTokenBalancesSortedto return0for equal elements instead of1, preventing unstable/incorrect ordering:Logging & Configuration
console.logwithlogger.debuginsquidrouter.tsprettier-ignore-enddirectiveMerge with Staging
This PR includes all changes from the staging branch (96 files changed, 4071 insertions, 779 deletions), including:
All code quality fixes have been preserved and integrated with the staging branch's refactored codebase.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.