Skip to content

Commit f60912f

Browse files
committed
Fix switching chain
Fixes NomicFoundation#100
1 parent 638fd58 commit f60912f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/components/Dapp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export class Dapp extends React.Component {
345345
}
346346

347347
async _switchChain() {
348-
const chainIdHex = `0x${HARDHAT_NETWORK_ID.toString(16)}`
348+
const chainIdHex = `0x${parseInt(HARDHAT_NETWORK_ID, 10).toString(16)}`
349349
await window.ethereum.request({
350350
method: "wallet_switchEthereumChain",
351351
params: [{ chainId: chainIdHex }],

0 commit comments

Comments
 (0)