Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions projects/keepkey-vault/src/bun/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,9 @@ const rpc = BrowserView.defineRPC<VaultRPCSchema>({
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
Expand Down Expand Up @@ -791,7 +792,10 @@ const rpc = BrowserView.defineRPC<VaultRPCSchema>({
// Build networkId → chainId lookup for token grouping (lowercase keys — Pioneer may return different casing)
const networkToChain = new Map<string, string>()
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
Expand Down
11 changes: 11 additions & 0 deletions projects/keepkey-vault/src/shared/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -252,14 +260,17 @@ const CONFIGS: ChainConfig[] = [

// Fallbacks for chains not fully covered by pioneer-caip
const CAIP_FALLBACKS: Record<string, string> = {
GNO: 'eip155:100/slip44:60',
TRX: 'tron:27Lqcw/slip44:195',
TON: 'ton:-239/slip44:607',
}
const NETWORKID_FALLBACKS: Record<string, string> = {
GNO: 'eip155:100',
TRX: 'tron:27Lqcw',
TON: 'ton:-239',
}
const DECIMAL_FALLBACKS: Record<string, number> = {
GNO: 18,
TRX: 6,
TON: 9,
}
Expand Down
Loading