diff --git a/bundled-addons/aegis/addon.json b/bundled-addons/aegis/addon.json index faeb0158..edd46f96 100644 --- a/bundled-addons/aegis/addon.json +++ b/bundled-addons/aegis/addon.json @@ -1,7 +1,7 @@ { "id": "aegis", "name": "Aegis Wallet", - "version": "0.9.6", + "version": "0.9.7", "category": "plugin", "description": "Multi-chain wallet (BCH, BTC, TRX, ETH, SOL, SC, DGB) derived from your Theseus vault. Dapps get window.bitcoincash on .x sites; window.tronWeb / window.tronLink / window.ethereum / window.solana on any https page.", "author": "Silent Mode", diff --git a/bundled-addons/aegis/index.js b/bundled-addons/aegis/index.js index c27f5d48..0ee3c993 100644 --- a/bundled-addons/aegis/index.js +++ b/bundled-addons/aegis/index.js @@ -535,7 +535,9 @@ async function mountWallet(entry) { const root = new Uint8Array(seedHex.match(/../g).map((x) => parseInt(x, 16))); return c.wc.startForWallet({ walletId: entry.id, label: entry.label, - root32: root, accountPath: entry.accountPath || "m/44'/145'/0'", + // Same network-aware default as the vault-derived branch — + // an imported chipnet wallet had the identical mismatch. + root32: root, accountPath: entry.accountPath || adapter.snapshot?.()?.accountPath || "m/44'/145'/0'", }).finally(() => { try { root.fill(0); } catch {} }); }).catch((e) => { c.api.log(`[${entry.id}] wc start (imported):`, e?.message || e); @@ -696,7 +698,14 @@ async function mountWallet(entry) { if (entry.chain === "bch" && c.wc) { c.wc.startForWallet({ walletId: entry.id, label: entry.label, - root32: root, accountPath: entry.accountPath || "m/44'/145'/0'", + // Resolve the default from the wallet's OWN network. This used to + // fall back to a hardcoded m/44'/145'/0' (mainnet), so a chipnet + // wallet — which derives from m/44'/1'/0' — advertised xpubs for a + // completely different key tree. Pairing succeeded and then the + // dapp saw an unrelated, empty wallet; anything it built spent + // from addresses this wallet does not own, so signing failed with + // "no path for input". Silent, and only visible on testnet. + root32: root, accountPath: entry.accountPath || adapter.snapshot?.()?.accountPath || "m/44'/145'/0'", }).catch((e) => c.api.log(`[${entry.id}] wc start:`, e?.message || e)); } emitStateForWallet(entry.id);