Use required chain ID and network name

Use the chain ID when loading the web3 wallet/provider, and use the
network name for the localstorage namespace.
This commit is contained in:
Râu Cao
2022-10-24 16:45:02 +02:00
parent 0c5aebf7b4
commit ad015f1cee
3 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ export default Service.extend({
ethProvider = new ethers.providers.Web3Provider(web3Provider);
const network = await ethProvider.getNetwork();
if (isPresent(config.web3RequiredNetwork) &&
if (isPresent(config.web3RequiredChainId) &&
network.chainId !== config.web3RequiredChainId) {
return instantiateWithoutAccount();
}