-
Notifications
You must be signed in to change notification settings - Fork 13
Add token logo URI support #2373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds logoUri support across the token information pipeline. Introduces optional logo_uri field to TokenCfg, Token, and TokenInfo structures. Propagates logo_uri from remote token definitions and YAML configuration through GUI token assembly. Updates UI component to render logos with fallback to symbol initials on load failure. Changes
Sequence DiagramsequenceDiagram
participant YAML as YAML<br/>Config
participant TokenCfg as TokenCfg
participant Remote as Remote<br/>Token Source
participant GUI as GUI Token<br/>Assembly
participant TokenInfo as TokenInfo
participant UI as UI Component
rect rgb(240, 248, 255)
note over YAML,TokenCfg: Token Config Path
YAML->>TokenCfg: Parse logo-uri field<br/>(Url::parse)
TokenCfg->>TokenCfg: Validate URL or error
end
rect rgb(240, 248, 255)
note over Remote,TokenCfg: Remote Token Path
Remote->>TokenCfg: Fetch remote token<br/>with logoURI
TokenCfg->>TokenCfg: Set logo_uri field
end
rect rgb(240, 248, 255)
note over TokenCfg,TokenInfo: GUI Assembly
TokenCfg->>GUI: Provide token config
GUI->>TokenInfo: Assemble token info<br/>with logo_uri
end
rect rgb(240, 248, 255)
note over TokenInfo,UI: UI Rendering
TokenInfo->>UI: Return token with logoUri
alt logoUri present and valid
UI->>UI: Render logo image
UI->>UI: on:error → Add to failedImages
else logoUri missing or load failed
UI->>UI: Render fallback<br/>(symbol initials)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (13)
🧰 Additional context used📓 Path-based instructions (11)crates/**/*.rs📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/crates/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/ui-components/**/*.{svelte,ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
packages/{webapp,ui-components}/**/*.{svelte,ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
packages/**/*.{js,ts,svelte}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,svelte}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.svelte📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/ui-components/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{test,spec}.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/orderbook/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (32)📚 Learning: 2025-07-11T06:40:49.511ZApplied to files:
📚 Learning: 2025-07-10T12:52:47.468ZApplied to files:
📚 Learning: 2025-07-29T12:30:44.350ZApplied to files:
📚 Learning: 2025-06-18T16:44:14.948ZApplied to files:
📚 Learning: 2025-05-19T13:40:56.080ZApplied to files:
📚 Learning: 2025-08-01T09:07:20.383ZApplied to files:
📚 Learning: 2025-05-14T05:51:50.277ZApplied to files:
📚 Learning: 2025-08-01T07:35:13.418ZApplied to files:
📚 Learning: 2025-04-07T09:51:52.614ZApplied to files:
📚 Learning: 2025-06-18T19:23:33.747ZApplied to files:
📚 Learning: 2025-10-27T09:17:38.145ZApplied to files:
📚 Learning: 2025-07-09T14:00:12.206ZApplied to files:
📚 Learning: 2025-09-24T10:59:25.666ZApplied to files:
📚 Learning: 2025-07-31T19:34:11.716ZApplied to files:
📚 Learning: 2025-08-02T03:55:25.215ZApplied to files:
📚 Learning: 2025-04-30T09:28:36.960ZApplied to files:
📚 Learning: 2025-07-09T12:35:45.699ZApplied to files:
📚 Learning: 2025-09-02T08:04:44.814ZApplied to files:
📚 Learning: 2025-03-28T10:09:10.696ZApplied to files:
📚 Learning: 2025-05-14T05:13:59.713ZApplied to files:
📚 Learning: 2025-06-04T10:21:01.388ZApplied to files:
📚 Learning: 2025-04-08T12:53:12.526ZApplied to files:
📚 Learning: 2025-08-15T20:56:15.592ZApplied to files:
📚 Learning: 2025-06-18T16:42:40.608ZApplied to files:
📚 Learning: 2025-06-10T12:04:54.107ZApplied to files:
📚 Learning: 2025-07-17T10:35:09.329ZApplied to files:
📚 Learning: 2025-07-11T08:46:07.606ZApplied to files:
📚 Learning: 2025-06-16T10:49:47.770ZApplied to files:
📚 Learning: 2025-03-31T10:16:53.544ZApplied to files:
📚 Learning: 2025-08-14T18:29:32.933ZApplied to files:
📚 Learning: 2025-07-17T10:35:53.182ZApplied to files:
📚 Learning: 2025-04-29T11:17:46.178ZApplied to files:
⏰ 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). (18)
🔇 Additional comments (18)
Comment |
Dependent PRs
Motivation
See issues:
Token selection in the UI currently shows only text-based information. Adding logo support improves the visual experience and makes it easier for users to identify tokens at a glance.
Solution
Added optional
logo_urifield throughout the token configuration pipeline:SDK:
logo_uri: Option<Url>toTokenCfgstruct with YAML parsing support (logo-urifield)logo_urito remoteTokenstruct, parsinglogoURIfrom Uniswap-format token listslogoUri(camelCase) inTokenInfofor JavaScript/TypeScript consumptionUI:
TokenSelectionModalto display token logos when availableTesting:
Checks
By submitting this for review, I'm confirming I've done the following:
fix #2107
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.