Skip to content
Open
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
12 changes: 11 additions & 1 deletion chrome-extension/src/background/chains/ethereumHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1321,12 +1321,22 @@ const sendTransaction = async (params: any, KEEPKEY_WALLET: any, ADDRESS: string
response.txid = txHash;
await requestStorage.updateEventById(id, response);

// Defensive explorer-link resolution: if the stored provider was built
// through a code path that didn't carry explorerTxLink (e.g., older
// saved state), look it up from the static EIP155_CHAINS table by
// networkId. Otherwise the TxidPage gets no link and the user sees a
// bare hex hash with no way to navigate to etherscan.
let explorerTxLink = currentProvider.explorerTxLink;
if (!explorerTxLink && currentProvider.networkId) {
explorerTxLink = EIP155_CHAINS[currentProvider.networkId]?.explorerTxLink;
}

//push event
chrome.runtime.sendMessage({
action: 'transaction_complete',
eventId: id,
txHash: txHash,
explorerTxLink: currentProvider.explorerTxLink,
explorerTxLink,
networkId: currentProvider.networkId,
});

Expand Down
6 changes: 6 additions & 0 deletions chrome-extension/src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ chrome.runtime.onMessage.addListener((message: any, sender: any, sendResponse: a
name: chainInfo.name,
providerUrl: chainInfo.rpc,
fallbacks: [],
// Carry the static chain's explorer URL forward so
// transaction_complete events fired from sendTransaction
// have somewhere to deep-link the txid. Without this
// the TxidPage shows just the hex hash with no link.
explorerTxLink: chainInfo.explorerTxLink,
networkId: asset.networkId,
};
} else {
console.error(tag, 'Network not found in custom or static chains:', asset.networkId);
Expand Down
Loading