I’m using the @web3auth/modal
sdk to add login to my web app. I develop locally using a Hardhat network. I create Web3
using these params:
const web3auth = new Web3Auth({
clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID || "",
web3AuthNetwork: "testnet",
chainConfig: {
chainNamespace: "eip155",
chainId: "0x7A69", // 31337
rpcTarget: "http://127.0.0.1:8545",
},
});
await web3auth.initModal();
When authenticating with a social account (Google) and using the resulting provider/signer to send a txn, I get the following 500 error from within the web3auth sdk in the console:
httpHelpers.esm.js:61 GET https://gas-api.metaswap.codefi.network/networks/31337/suggestedGasFees 500
Makes sense that it can’t get a 3rd party gas estimate for a local Hardhat node, but it’s unfortunate this might block anyone from using Hardhat.
I checked some other networks I need to use by plugging their chain ids into that URL, and many of them aren’t supported either, for example both of the Arbitrum testnets:
https://gas-api.metaswap.codefi.network/networks/421611/suggestedGasFees
https://gas-api.metaswap.codefi.network/networks/421613/suggestedGasFees
Does this mean I can’t use web3auth on those chains as well?
Thanks.