feat: regenerate asset data 09/20/2025#10613
Conversation
📝 WalkthroughWalkthroughData-only regeneration: updated token color mappings in the color-map, replaced large portions of the related-asset index JSON, and added migration entry 190 -> clearAssets. No API, types, or exported signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor App as App Startup
participant MM as MigrationManager
participant Store as LocalStore
participant AS as AssetService
App->>MM: initialize()
MM->>Store: getMigrationVersion()
alt version < 190
MM->>Store: clearAssets() %% new migration 190 triggers clear
Note right of Store: assets cleared and refreshed
Store-->>MM: ok
MM->>Store: setMigrationVersion(190)
else version ≥ 190
MM-->>App: no-op
end
App->>AS: loadAssets()
AS-->>App: assets (from regenerated data)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
⛔ Files ignored due to path filters (12)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (1)**/*📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
Files:
🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-17T21:53:03.806ZApplied to files:
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (12)
packages/caip/src/adapters/coincap/generated/eip155_1/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/eip155_10/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/eip155_137/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/eip155_42161/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/eip155_43114/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/eip155_56/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coincap/generated/solana_5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coingecko/generated/eip155_1/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coingecko/generated/eip155_137/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coingecko/generated/eip155_56/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coingecko/generated/eip155_8453/adapter.jsonis excluded by!**/generated/**packages/caip/src/adapters/coingecko/generated/solana_5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/adapter.jsonis excluded by!**/generated/**
📒 Files selected for processing (3)
scripts/generateAssetData/color-map.json(22 hunks)src/lib/asset-service/service/encodedRelatedAssetIndex.json(1 hunks)src/state/migrations/index.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
**/*.{ts,tsx}: ALWAYS use Result<T, E> pattern for error handling in swappers and APIs
ALWAYS use Ok() and Err() from @sniptt/monads for monadic error handling
ALWAYS use custom error classes from @shapeshiftoss/errors
ALWAYS provide meaningful error codes for internationalization
ALWAYS include relevant details in error objects
ALWAYS wrap async operations in try-catch blocks
ALWAYS use AsyncResultOf utility for converting promises to Results
ALWAYS provide fallback error handling
ALWAYS use timeoutMonadic for API calls
ALWAYS provide appropriate timeout values for API calls
ALWAYS handle timeout errors gracefully
ALWAYS validate inputs before processing
ALWAYS provide clear validation error messages
ALWAYS use early returns for validation failures
ALWAYS log errors for debugging
ALWAYS use structured logging for errors
ALWAYS include relevant context in error logs
Throwing errors instead of using monadic patterns is an anti-pattern
Missing try-catch blocks for async operations is an anti-pattern
Generic error messages without context are an anti-pattern
Not handling specific error types is an anti-pattern
Missing timeout handling is an anti-pattern
No input validation is an anti-pattern
Poor error logging is an anti-pattern
Using any for error types is an anti-pattern
Missing error codes for internationalization is an anti-pattern
No fallback error handling is an anti-pattern
Console.error without structured logging is an anti-pattern
**/*.{ts,tsx}: ALWAYS use camelCase for variables, functions, and methods
ALWAYS use descriptive names that explain the purpose for variables and functions
ALWAYS use verb prefixes for functions that perform actions
ALWAYS use PascalCase for types, interfaces, and enums
ALWAYS use descriptive names that indicate the structure for types, interfaces, and enums
ALWAYS use suffixes like Props, State, Config, Type when appropriate for types and interfaces
ALWAYS use UPPER_SNAKE_CASE for constants and configuration values
ALWAYS use d...
Files:
src/state/migrations/index.ts
**/*
📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
**/*: ALWAYS use appropriate file extensions
Flag files without kebab-case
Files:
src/state/migrations/index.tsscripts/generateAssetData/color-map.jsonsrc/lib/asset-service/service/encodedRelatedAssetIndex.json
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)
USE Redux only for global state shared across multiple places
Files:
src/state/migrations/index.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: NeOMakinG
PR: shapeshift/web#10136
File: src/lib/asset-service/service/encodedRelatedAssetIndex.json:1-1
Timestamp: 2025-07-29T10:22:27.037Z
Learning: PRs with titles starting with "feat: regenerate asset data" are routine daily asset updates that don't need detailed code analysis. Users prefer to skip automated reviews for these maintenance PRs using coderabbitai ignore.
Learnt from: NeOMakinG
PR: shapeshift/web#10375
File: src/state/migrations/index.ts:214-215
Timestamp: 2025-08-27T13:49:48.668Z
Learning: The clearAssetsMigrations system in the ShapeShift web app works independently of the root persistConfig version. Migration numbers (like 171) don't need to match the root persistConfig version field, and the system has been functioning correctly for months/years without manual version bumps.
📚 Learning: 2025-08-27T13:49:48.668Z
Learnt from: NeOMakinG
PR: shapeshift/web#10375
File: src/state/migrations/index.ts:214-215
Timestamp: 2025-08-27T13:49:48.668Z
Learning: The clearAssetsMigrations system in the ShapeShift web app works independently of the root persistConfig version. Migration numbers (like 171) don't need to match the root persistConfig version field, and the system has been functioning correctly for months/years without manual version bumps.
Applied to files:
src/state/migrations/index.ts
🧬 Code graph analysis (1)
src/state/migrations/index.ts (1)
src/state/migrations/clearAssets.ts (1)
clearAssets(6-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Install and Cache
🔇 Additional comments (25)
src/state/migrations/index.ts (1)
233-233: Migration 190 added to clearAssetsMigrations — LGTMMatches the established pattern; no persistConfig bump needed per the clearAssetsMigrations system.
src/lib/asset-service/service/encodedRelatedAssetIndex.json (1)
1-1: Asset relation index regenerated — LGTMData-only update; structure unchanged.
scripts/generateAssetData/color-map.json (23)
1798-1798: LGTM.Consistent address casing and hex color format.
2307-2307: LGTM.New ERC-20 mapping follows existing conventions.
2702-2702: LGTM.Key format and color are valid.
2949-2949: LGTM.No structural or formatting issues.
3137-3137: LGTM.Addition matches chain:1 ERC-20 schema.
3988-3988: LGTM.Color value is valid 6‑digit hex.
4639-4639: LGTM.Arbitrum/ETH consistency unaffected.
4839-4839: LGTM.No duplication nearby; value format OK.
5953-5953: LGTM.Valid hex color; retains JSON ordering.
5959-5959: LGTM.New entry aligns with neighboring entries.
7710-7710: LGTM.Arbitrum address + color look correct.
8536-8536: LGTM.No issues spotted for chain 42161 mapping.
8856-8856: LGTM.Avalanche C‑Chain mapping conforms.
9609-9609: LGTM.BEP‑20 entry and color format valid.
9851-9851: LGTM.No conflicts; value within palette norms.
11052-11052: LGTM.Lowercase address and 6‑digit color checked.
13244-13244: LGTM.Base chain key format and color OK.
13521-13521: LGTM.Addition follows existing Base entries.
13631-13631: LGTM.No schema or style issues.
13636-13636: LGTM.Color code valid; no adjacent duplicates.
13725-13725: LGTM.Entry consistent with chain 8453 conventions.
13980-13980: LGTM.Key/value formatting looks correct.
14352-14352: LGTM.No concerns; safe to merge with data regen.
e3039ca to
48d8385
Compare
Generated from CI.
Summary by CodeRabbit