Skip to content

Commit 53a4bdc

Browse files
fix: replace broken remote logo refs with local assets (#41)
* fix: replace broken remote logo refs with local assets 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> * fix: move new branded assets to chrome-extension/public root 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> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c2019ea commit 53a4bdc

17 files changed

Lines changed: 43 additions & 31 deletions

File tree

chrome-extension/manifest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const manifest = deepmerge(
4646
devtools_page: 'devtools/index.html',
4747
web_accessible_resources: [
4848
{
49-
resources: ['*.js', '*.css', '*.svg', 'icon-128.png', 'icon-34.png'],
49+
resources: ['*.js', '*.css', '*.svg', 'icon-128.png', 'icon-34.png', 'kk-logo.png'],
5050
matches: ['*://*/*'],
5151
},
5252
],
12.6 KB
Loading
Lines changed: 24 additions & 0 deletions
Loading
39 KB
Loading

chrome-extension/public/kk.webp

279 KB
Loading

chrome-extension/src/background/wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export async function init(): Promise<WalletState> {
7171
apiKey: savedApiKey,
7272
baseUrl: 'http://localhost:1646',
7373
serviceName: 'KeepKey Browser Extension',
74-
serviceImageUrl: 'https://api.keepkey.info/coins/keepkey.png',
74+
serviceImageUrl: 'https://pioneers.dev/coins/keepkey.png',
7575
});
7676

7777
state.sdk = sdk;

pages/popup/src/components/evm/ContractDetailsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default function ContractDetailsCard({ transaction }: ContractDetailsCard
100100
<Card mt={4} shadow="md" borderWidth="1px">
101101
<CardHeader>
102102
<Flex alignItems="center">
103-
<Avatar src={'https://api.keepkey.info/coins/pioneerMan.png'} size="md" mr={4} />
103+
<Avatar src="/kk-logo.png" name="KeepKey" size="md" mr={4} />
104104
<Heading as="h5" size="lg">
105105
Pioneer Summary:
106106
</Heading>

pages/popup/src/components/evm/ProjectInfoCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { useMemo, useEffect, useState } from 'react';
22
import { Avatar, Box, Text, VStack, Stack, Badge, Image } from '@chakra-ui/react';
33

4-
// KeepKey logo URL with fallback
5-
const KEEPKEY_LOGO = 'https://api.keepkey.info/coins/keepkey.png';
4+
const KEEPKEY_LOGO = '/kk-logo.png';
65
const KEEPKEY_LOGO_FALLBACK = '/icon-128.png';
76

87
interface IProps {

pages/popup/src/components/other/ProjectInfoCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function ProjectInfoCard({ transaction }: any) {
2828
return (
2929
<Box textAlign="center">
3030
<Stack align="center">
31-
<Avatar src={'https://api.keepkey.info/coins/keepkey.png'} size="xl" bg="gray.700" />
31+
<Avatar src="/kk-logo.png" name="KeepKey" size="xl" bg="gray.700" />
3232
</Stack>
3333
<Stack align="center">
3434
<Text fontSize="2xl" data-testid="session-info-card-text">

pages/popup/src/components/tendermint/ProjectInfoCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function ProjectInfoCard({ transaction }: any) {
2828
return (
2929
<Box textAlign="center">
3030
<Stack align="center">
31-
<Avatar src={'https://api.keepkey.info/coins/keepkey.png'} size="xl" bg="gray.700" />
31+
<Avatar src="/kk-logo.png" name="KeepKey" size="xl" bg="gray.700" />
3232
</Stack>
3333
<Stack align="center">
3434
<Text fontSize="2xl" data-testid="session-info-card-text">

0 commit comments

Comments
 (0)