Repository navigation
show only approved asset icons - #416
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can generate walkthrough in a markdown collapsible section to save space.Enable the |
Deploying wallet-bitcoin with
|
| Latest commit: |
52677ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c0fb359d.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://asset-icon.wallet-bitcoin.pages.dev |
Deploying wallet-mutinynet with
|
| Latest commit: |
52677ad
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7255cf88.arkade-wallet.pages.dev |
| Branch Preview URL: | https://asset-icon.arkade-wallet.pages.dev |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/test/screens/mocks.ts (1)
146-146: Mock returns incompleteCachedAssetDetailsstructure.The mock returns only
{ cachedAt: 0 }, but callers expect the fullCachedAssetDetailswhich extendsAssetDetails(includingmetadata,supply, etc.). Code accessingmeta?.metadata?.nameor similar fields will receiveundefinedfrom this mock.Consider returning a more complete mock object to improve test fidelity:
Proposed improvement
- setCacheEntry: () => ({ cachedAt: 0 }) as any, + setCacheEntry: (_assetId: string, details: any) => ({ ...details, cachedAt: Date.now(), hasIcon: false }),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/test/screens/mocks.ts` at line 146, The setCacheEntry mock currently returns only { cachedAt: 0 } which doesn't satisfy callers expecting a full CachedAssetDetails (which extends AssetDetails); update the mock in src/test/screens/mocks.ts (the setCacheEntry function/object) to return a complete CachedAssetDetails-shaped object including metadata (with metadata.name, metadata.image, etc.), supply, id and any other required AssetDetails fields so tests that access meta?.metadata?.name or supply will get realistic values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/test/screens/mocks.ts`:
- Line 146: The setCacheEntry mock currently returns only { cachedAt: 0 } which
doesn't satisfy callers expecting a full CachedAssetDetails (which extends
AssetDetails); update the mock in src/test/screens/mocks.ts (the setCacheEntry
function/object) to return a complete CachedAssetDetails-shaped object including
metadata (with metadata.name, metadata.image, etc.), supply, id and any other
required AssetDetails fields so tests that access meta?.metadata?.name or supply
will get realistic values.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 67fe7c28-b59c-4854-a920-1daa00d41602
📒 Files selected for processing (7)
src/providers/wallet.tsxsrc/screens/Apps/Assets/Detail.tsxsrc/screens/Apps/Assets/Import.tsxsrc/screens/Apps/Assets/Mint.tsxsrc/screens/Wallet/Receive/Success.tsxsrc/screens/Wallet/Send/Form.tsxsrc/test/screens/mocks.ts
@bordalix @pietro909 please review
Summary by CodeRabbit
Release Notes