From f60912feaa5dcefeb663b67e2932db79ab502b3f Mon Sep 17 00:00:00 2001 From: Luka Jeran Date: Mon, 18 Nov 2024 07:04:37 +0000 Subject: [PATCH] Fix switching chain Fixes #100 --- frontend/src/components/Dapp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Dapp.js b/frontend/src/components/Dapp.js index 32d3f605..cf78fc9d 100644 --- a/frontend/src/components/Dapp.js +++ b/frontend/src/components/Dapp.js @@ -345,7 +345,7 @@ export class Dapp extends React.Component { } async _switchChain() { - const chainIdHex = `0x${HARDHAT_NETWORK_ID.toString(16)}` + const chainIdHex = `0x${parseInt(HARDHAT_NETWORK_ID, 10).toString(16)}` await window.ethereum.request({ method: "wallet_switchEthereumChain", params: [{ chainId: chainIdHex }],