Skip to content

Order swap tokens as 1Click lists them, QTC first and USDC second - #693

Merged
n13 merged 3 commits into
n13/qtc-price-under-balancefrom
n13/swap-token-order
Oct 9, 2026
Merged

n13 merged 3 commits into
n13/qtc-price-under-balancefrom
n13/swap-token-order

Conversation

@n13

@n13 n13 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #692 (base will fall back to main once that merges).

What

  • No more CoinGecko. The market-cap ranking request, the per-symbol icon lookup and the hard-coded CoinGecko asset URLs for token and network logos are gone, along with the iconUrl / networkIconUrl fields and copyWith on SwapToken.
  • 1Click's order. getFromTokens returns 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.
  • QTC in the picker. The token picker now shows QTC at the top. Picking QTC for the other side moves QTC there (the previous foreign token swaps to the opposite side); picking a foreign token for QTC's side does the same as before. Picking the token that is already there is a no-op. The picker highlights the token of the side that was tapped.
  • Icons. With CoinGecko gone there is no logo source, so TokenIcon shows 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.

@n13 n13 added the bot-review Request automated review from review-bot label Oct 9, 2026

@n13 n13 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --check and 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-pub for 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-test sets 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.

@n13 n13 removed the bot-review Request automated review from review-bot label Oct 9, 2026
n13 added 2 commits October 9, 2026 11:41
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.
@n13
n13 force-pushed the n13/swap-token-order branch from 71d7c3b to d14f956 Compare October 9, 2026 03:41
@n13
n13 merged commit df3a68b into n13/qtc-price-under-balance Oct 9, 2026
1 check 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.

1 participant