Skip to content

Commit 0ad6b67

Browse files
feat: implement bridged asset canonical detection
Implements robust Ethereum canonical detection for bridged assets (WBTC, WETH, WSTETH, USDC, USDT, DAI). - Add BRIDGED_CATEGORY_MAPPINGS for 6 Ethereum canonicals - Implement three-way canonical detection via CoinGecko - Prioritize CoinGecko over Zerion when Ethereum canonical detected - Fix length <= 1 edge case to return canonical instead of undefined - Merge USDT0 into USDT group via bridged-usdt category - Deduplicate chain icons in grouped asset rows Results: - ETH WBTC/WETH/WSTETH/USDC/USDT are primaries (clean titles) - All L2 bridged variants point to Ethereum canonicals - USDT0 merged into USDT group - No duplicate chain icons 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
1 parent bc5b2e5 commit 0ad6b67

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

scripts/generateAssetData/generateRelatedAssetIndex/generateRelatedAssetIndex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ const processRelatedAssetIds = async (
346346
(coingeckoDetectedCanonical
347347
? coingeckoRelatedAssetsResult?.relatedAssetKey
348348
: zerionRelatedAssetsResult?.relatedAssetKey ||
349-
coingeckoRelatedAssetsResult?.relatedAssetKey) ||
349+
coingeckoRelatedAssetsResult?.relatedAssetKey) ||
350350
assetId
351351

352352
// If the relatedAssetKey itself points to another key, follow the chain to find the actual key

src/lib/asset-service/service/encodedAssetData.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/lib/asset-service/service/encodedRelatedAssetIndex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/state/migrations/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ export const clearAssetsMigrations = {
300300
253: clearAssets,
301301
254: clearAssets,
302302
255: clearAssets,
303-
256: clearAssets,
304303
} as unknown as Omit<MigrationManifest, '_persist'>
305304

306305
export const clearMarketDataMigrations = {

0 commit comments

Comments
 (0)