feat: preloaded token list with icons, private tokens, show/hide toggle, and remote mainnet fetch#129
feat: preloaded token list with icons, private tokens, show/hide toggle, and remote mainnet fetch#129plucena-coti wants to merge 3 commits into
Conversation
30b306b to
8123598
Compare
|
@gmesika-coti please approve |
…le, and remote mainnet fetch
8123598 to
1c7c74d
Compare
- Add Vite plugin to conditionally inject GTM scripts at build time - GTM is only included when VITE_ENABLE_GTM=true (set in main branch CI) - Update CSP in index.html to allow googletagmanager.com - Add site build step to publish workflow with GTM enabled - GTM ID: GTM-NVHGTMPD
|
@gmesika-coti please approve |
|
not good.
|
|
@gmesika-coti as history shows the previous PR already included the fetching of tokens from token-list. There was a fallback option to use the static list in case the token-list was unavailable. This fallback static list was now removed. Also improved the token icon loading and included the private/public filters based on token-list PR. Please approve. I can dismantle this into two separate PRs, but code wisely, it would be simpler if we could move those 2 items together. Thanks |
3cf5c0d to
14a2c08
Compare
|
@gmesika-coti please review |
|
you should change in the token-list the flag to private on the token and then change it here from isPrivate to private? becuase it is optional |
| ) : ( | ||
| token.symbol[0] | ||
| )} | ||
| {token.isPrivate && ( |
There was a problem hiding this comment.
yes, token list is now updated to isPrivate
- Remove static PRELOADED_TOKENS constant and file - Fetch tokens from coti-io/coti-token-list GitHub repo (mainnet/testnet) - Use logoURI from remote list for all token icons - Use isPublic attribute from remote list to determine private tokens - Remove local SVG icon mapping from TokenRow (use remote icons) - Fix resolveSnapId fallback to only match COTI snaps - Fix Cross-Origin-Embedder-Policy to allow external images (credentialless)
14a2c08 to
5602cb6
Compare
Changes
Token List (Remote Fetch)
coti-mainnetbranch, Testnet: fetches fromcoti-testnetbranchlogoURIfrom the remote list for all token icons (removed local SVG icon mapping and assets)privateattribute from the remote list to determine private tokens (defaults to public if missing)resolveSnapIdfallback to only match COTI snaps (prevents resolving to unrelated snaps like institutional-wallet-snap)Cross-Origin-Embedder-Policyfromrequire-corptocredentiallessto allow external token icon imagesGoogle Tag Manager (GTM)