Skip to content

fix: replace broken remote logo refs with local assets#41

Merged
BitHighlander merged 2 commits intodevelopfrom
fix/broken-logos
Apr 21, 2026
Merged

fix: replace broken remote logo refs with local assets#41
BitHighlander merged 2 commits intodevelopfrom
fix/broken-logos

Conversation

@BitHighlander
Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: client hardcoded api.keepkey.info/coins/{keepkey,pioneerMan,ethereum}.png shortnames that never existed on the CDN (all 403). CDN only serves CAIP-base64-encoded filenames, which the dynamic asset-icon code already builds correctly.
  • KeepKey brand marks across popup + side-panel now use a bundled kk-logo.png (40KB), added to web_accessible_resources so dapps can load it for EIP-6963 announce.
  • Third-party image hosts replaced with bundled assets. The 5.6MB kk.gif from i.ibb.co was converted to a 286KB animated WebP — 95% smaller, same animation.

What was broken

Pre-fix, every one of these returned 403:

  • api.keepkey.info/coins/keepkey.png — KeepKey brand avatar in 7 components
  • api.keepkey.info/coins/pioneerMan.png — 2 components
  • api.keepkey.info/coins/ethereum.png — default dapp icon
  • api.keepkey.info/coins/<btoa(chainSymbol)>.pngheaderUtils.ts fallback (always broken; encoded symbol, not CAIP)

Third-party hosts with ongoing fragility:

  • upload.wikimedia.org/...MetaMask_Fox.svg... — 429 at audit time
  • i.ibb.co/jR8WcJM/kk.gif, cdn.iconscout.com/..., cdn.dealspotr.com/... — remote deps for decorative UI

Dynamic CAIP-based icons (caipToIcon, networkIdToIcon) already work for every chain + ERC-20 the client touches — live audit returned 200 for all of them. No changes to that path.

Changes

Code

  • popup/*/ProjectInfoCard.tsx + popup/evm/ContractDetailsCard.tsx/kk-logo.png with name fallback
  • side-panel/NetworkAccountHeader.tsx/kk-logo.png
  • side-panel/Settings.tsxchrome.runtime.getURL('kk-logo.png') for EIP-6963 announce; local /brand/metamask-fox.svg + /brand/keplr.png; Xfi src dropped (Coming Soon overlay + letter fallback)
  • side-panel/AddDappModal.tsxcaipToIcon('eip155:1/slip44:60') for default dapp icon; /kk-logo.png for KeepKey mark
  • side-panel/SidePanel.tsx/kk.webp
  • side-panel/header/NetworkDropdown.tsx → hide Avatar entirely when no network is selected
  • side-panel/header/headerUtils.ts → drop broken btoa(chainSymbol) fallback, return '' so Avatar renders initial letter
  • chrome-extension/src/background/wallet.tsserviceImageUrl points at pioneers.dev/coins/keepkey.png (chrome-extension:// URLs can't load in the vault desktop UI)
  • chrome-extension/manifest.js → add kk-logo.png to web_accessible_resources

New bundled assets (+302KB total)

  • chrome-extension/public/kk-logo.png (40KB, 512×512)
  • pages/side-panel/public/kk.webp (286KB, animated, 240×135, 15fps — was 5.6MB GIF)
  • pages/side-panel/public/brand/metamask-fox.svg (3KB, from MetaMask official repo)
  • pages/side-panel/public/brand/keplr.png (13KB, from Keplr official repo)

Test plan

  • Load the extension and open the side panel before any KeepKey pairing — verify the network dropdown renders as "Network ▾" with no empty profile avatar (previous broken silhouette).
  • Trigger an EVM personal_sign/eth_sendTransaction approval popup on any dapp — KeepKey sub-avatar renders the local logo instead of a broken-image icon.
  • Open Settings in the side panel — animated kk.webp plays, MetaMask fox + Keplr avatars render locally, Xfi shows "X" initial under "Coming Soon" overlay.
  • Network dropdown: select a network — avatar appears with the correct CAIP-CDN icon.
  • Confirm no Failed to load resource: 403 (keepkey.png) or similar errors in devtools console on any flow.
  • Verify chrome.runtime.getURL('kk-logo.png') is reachable from a dapp origin (EIP-6963 announce flow) — manifest web_accessible_resources includes it.

🤖 Generated with Claude Code

BitHighlander and others added 2 commits April 20, 2026 20:17
The client referenced api.keepkey.info/coins/{keepkey,pioneerMan,ethereum}.png
shortnames that never existed on the CDN (all 403). The CDN only serves
CAIP-base64-encoded filenames, which the dynamic asset-icon code already
generates correctly. This change fixes every hardcoded shortname usage:

- KeepKey brand marks across popup + side-panel switch to bundled /kk-logo.png
  (and chrome.runtime.getURL for the EIP-6963 announce icon and manifest
  web_accessible_resources so dapps can load it).
- AddDappModal default icon now uses caipToIcon('eip155:1/slip44:60'), which
  the CDN does serve.
- NetworkDropdown hides the avatar entirely when no network is selected
  instead of rendering Chakra's default silhouette from a 403 fallback.
- headerUtils.getIconUrl last-resort fallback no longer builds
  btoa(chainSymbol) URLs (always 403); returns '' so Chakra Avatar falls
  back to an initial letter.
- wallet.ts serviceImageUrl points at pioneers.dev (chrome-extension:// URLs
  can't load in the vault desktop UI).

Third-party image hosts also replaced with bundled assets:
- Animated kk.gif (5.6MB from i.ibb.co) converted to kk.webp (286KB, 240px,
  15fps) — 95% smaller, same animation.
- MetaMask fox and Keplr logos downloaded from their official repos.
- Xfi src dropped (Coming Soon overlay covers the avatar; letter fallback).

Net: zero remote image hosts remain outside the working CAIP CDN pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Absolute src="/kk.webp" and /brand/... paths resolve to the extension
origin root (chrome-extension://<id>/kk.webp). Vite's base:'' does not
rewrite these, so emitting them under pages/side-panel/public/ (→
dist/side-panel/) was a 404. Moving to chrome-extension/public/ lands
them at the dist root and matches the already-working /kk-logo.png
convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@BitHighlander BitHighlander merged commit 53a4bdc into develop Apr 21, 2026
3 of 4 checks passed
@BitHighlander BitHighlander deleted the fix/broken-logos branch April 21, 2026 01:26
BitHighlander added a commit that referenced this pull request Apr 21, 2026
SidePanel.tsx default-state welcome screen uses <img src="/logo_vertical.svg">
as an opacity-0.25 watermark. The file was in pages/side-panel/public/, so
Vite emitted it to dist/side-panel/logo_vertical.svg while the absolute
path requested chrome-extension://<id>/logo_vertical.svg — 404. Same class
of bug that #41 fixed for kk.webp and brand icons.

Moving both vertical logos to chrome-extension/public/ lands them at the
dist root and matches the working /kk-logo.png / /kk.webp convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@BitHighlander BitHighlander mentioned this pull request Apr 21, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant