diff --git a/projects/keepkey-vault/src/bun/index.ts b/projects/keepkey-vault/src/bun/index.ts index 3256503..6d3d564 100644 --- a/projects/keepkey-vault/src/bun/index.ts +++ b/projects/keepkey-vault/src/bun/index.ts @@ -742,8 +742,9 @@ const rpc = BrowserView.defineRPC({ pubkeys.push({ caip: entry.caip, pubkey: entry.pubkey, chainId: entry.chainId, symbol: entry.symbol, networkId: entry.networkId }) } - // Non-EVM, non-UTXO chains (cosmos, xrp, etc.) + // Non-EVM, non-UTXO chains (cosmos, xrp, etc.) — skip hidden chains (e.g. zcash-shielded has dedicated RPC) for (const chain of nonEvmChains) { + if (chain.hidden) continue try { const addrParams: any = { addressNList: chain.defaultPath, showDisplay: false, coin: chain.coin } if (chain.scriptType) addrParams.scriptType = chain.scriptType @@ -791,7 +792,10 @@ const rpc = BrowserView.defineRPC({ // Build networkId → chainId lookup for token grouping (lowercase keys — Pioneer may return different casing) const networkToChain = new Map() for (const chain of allChains) { - if (chain.networkId) networkToChain.set(chain.networkId.toLowerCase(), chain.id) + if (!chain.networkId) continue + // Non-hidden chains take priority (zcash vs zcash-shielded share the same networkId) + if (chain.hidden && networkToChain.has(chain.networkId.toLowerCase())) continue + networkToChain.set(chain.networkId.toLowerCase(), chain.id) } // 3. Single API call — GetPortfolioBalances returns natives + tokens in one flat array diff --git a/projects/keepkey-vault/src/shared/chains.ts b/projects/keepkey-vault/src/shared/chains.ts index c3dfdcb..e1d68ce 100644 --- a/projects/keepkey-vault/src/shared/chains.ts +++ b/projects/keepkey-vault/src/shared/chains.ts @@ -110,6 +110,14 @@ const CONFIGS: ChainConfig[] = [ explorerTxUrl: 'https://basescan.org/tx/{{txid}}', explorerAddressUrl: 'https://basescan.org/address/{{address}}', }, + { + id: 'gnosis', chain: 'GNO' as any, coin: 'Gnosis', symbol: 'xDAI', + chainFamily: 'evm', color: '#04795B', + rpcMethod: 'ethGetAddress', signMethod: 'ethSignTx', + defaultPath: [0x8000002C, 0x8000003C, 0x80000000, 0, 0], chainId: '100', + explorerTxUrl: 'https://gnosisscan.io/tx/{{txid}}', + explorerAddressUrl: 'https://gnosisscan.io/address/{{address}}', + }, { id: 'monad', chain: Chain.Monad, coin: 'Monad', symbol: 'MON', chainFamily: 'evm', color: '#1F70FF', @@ -252,14 +260,17 @@ const CONFIGS: ChainConfig[] = [ // Fallbacks for chains not fully covered by pioneer-caip const CAIP_FALLBACKS: Record = { + GNO: 'eip155:100/slip44:60', TRX: 'tron:27Lqcw/slip44:195', TON: 'ton:-239/slip44:607', } const NETWORKID_FALLBACKS: Record = { + GNO: 'eip155:100', TRX: 'tron:27Lqcw', TON: 'ton:-239', } const DECIMAL_FALLBACKS: Record = { + GNO: 18, TRX: 6, TON: 9, }