fix(frontend): make ticker logos exchange-aware (#623)#734
Open
AtomicTrxn wants to merge 2 commits intoafadil:mainfrom
Open
fix(frontend): make ticker logos exchange-aware (#623)#734AtomicTrxn wants to merge 2 commits intoafadil:mainfrom
AtomicTrxn wants to merge 2 commits intoafadil:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Root cause:
fullSymbol -> baseSymbollookup against/ticker-logos/*.png.DTE, that means a German/Xetra asset with symbolDTEfalls back toDTE.png, which is the US listing logo.exchangeMic), but the logo lookup path was ignoring it.Lookup method in this PR:
exchangeMic, derive the Yahoo-style suffix from that MIC (for exampleXETR -> .DE,XFRA -> .F,XLON -> .L) and try the exchange-qualified logo first.Fix summary:
TickerAvatarexchange-aware in both frontend/shared components.exchangeMicthrough asset, activity, holdings, dashboard, and allocation avatar call sites.exchangeMicto holdingsInstrumentand allocationHoldingSummarypayloads and populated them in core services.User-visible tradeoff:
Validation:
pnpm --filter frontend test -- ticker-avatarpnpm --filter frontend test -- top-holdingscargo test -p wealthfolio-core exchange_miccargo test -p wealthfolio-core portfolio::holdingscargo test -p wealthfolio-core allocation_servicepnpm --filter frontend lint(passes with existing repo warning baseline)cargo fmt --all -- --checkpnpm exec prettier --check ...on all touched frontend/package filespnpm --filter frontend type-checkstill fails on pre-existing unrelated issues inapps/frontend/src/addons/type-bridge.tsandapps/frontend/src/pages/holdings/components/alternative-holdings-table.tsxFixes #623
Checklist
Contributor License Agreement.
By submitting this PR, I agree to the
CLA.