Repository navigation
Order swap tokens as 1Click lists them, QTC first and USDC second - #693
Conversation
n13
left a comment
There was a problem hiding this comment.
Reviewer model: GPT-6.1 Sol
Verdict (advisory): Approve
Reviewed head 71d7c3bdedc91eadf4b0260ba6f53040cf5a3f80 against base ed168eddfa1b56c98d537f7d02209446cc29321e, including the merge from main. No blocking findings.
The listing preserves symbol order and network preference while placing QTC and USDC first. Removed logo fields have no remaining consumers. Picker selection highlights the tapped side, preserves current-token selections, and moves QTC between sides without losing the foreign token.
Validation:
git diff --checkand root Melos formatting checks passed, with no source changes.- SDK:
flutter test --no-pub test/services/swap_service_test.dart test/services/one_click_service_test.dart— 45 passed. - App:
flutter test --no-pubfor swap flow, swap math, balance fiat line, remote config notifier, and home intent gating — 56 passed. - Separate temporary widget probes — 12 passed across both directions, both tapped sides, and QTC/current/new foreign selections, including highlighting and amount clearing.
- Root Melos analysis with
--fatal-infos: SDK passed at the reviewed head; cold wallet and miner passed before the merge, which leaves their code unchanged. Mobile analysis was killed at the required 10-second limit, so its result is incomplete. - Shell syntax and build-define parsing passed: default builds omit the override,
--swap-testsets it, and unknown/extra options fail with an error.
GitHub currently reports only the dependency-cooldown check passing; this stacked base does not trigger the main/master Analyze workflow. Validation used mocks and widget tests, without device or live-swap testing.
Non-blocking follow-up: retain picker-transition widget coverage in the repository; the existing swap-flow tests cover arrow-based direction changes but not the new picker behavior.
The swap list no longer asks CoinGecko for a market-cap ranking or for token logos. It is 1Click's own listing, one asset per symbol, with QTC moved to the top and USDC right after it; every other token keeps its place. QTC now appears in the token picker, and picking it for the other side moves QTC there. Token icons are the monograms the picker already fell back to.
71d7c3b to
d14f956
Compare
Stacked on #692 (base will fall back to
mainonce that merges).What
iconUrl/networkIconUrlfields andcopyWithonSwapToken.getFromTokensreturns the listing one asset per symbol (still preferring the main network for a symbol listed on several chains), in the order 1Click sends it, with QTC moved to position 1 and USDC to position 2. Nothing else is reordered, nothing is duplicated.TokenIconshows the monogram it already fell back to (first letter of the symbol, network initial as badge). QTC keeps its own asset. If logos should come back they need a different source.Tests
SDK: QTC first, USDC second, rest in 1Click's order; the order holds without USDC and the listing is cached; a preflight stand-in heads the list the same way; the ETag revalidation test no longer stubs CoinGecko. App: swap flow and balance tests pass.