Skip to content

Commit ae52fc7

Browse files
committed
fix: ethereum extension
1 parent e012534 commit ae52fc7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ExtensionTools/ethereum.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,15 @@ export const getAccounts = async (): Promise<IEthereumRequestAccountsResult> =>
7878
const ethereum = (window as any).ethereum
7979

8080
const accounts: string[] = await ethereum.request({method: 'eth_accounts'})
81+
const chainIdNumber = parseInt(ethereum.chainId, 16)
8182
return {
8283
accounts,
8384
selectedAddress: ethereum.selectedAddress,
8485
info: {
8586
extensionFound: true,
8687
chainId: ethereum.chainId,
87-
chainIdNumber: parseInt(ethereum.chainId, 16),
88+
chainIdNumber,
89+
uniqueChainName: chainNameByChainId[chainIdNumber],
8890
},
8991
}
9092
}

0 commit comments

Comments
 (0)