Skip to content

Commit

Permalink
Use StaticJsonRpcProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
mveytsman committed Sep 2, 2021
1 parent 7774eb9 commit e062cac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default {
},
async setReadOnlyNetwork(network) {
const web3Fallback = deployConfig[network].web3Fallback || "http://localhost:8545/";
this.provider = new ethers.providers.JsonRpcProvider(web3Fallback);
this.provider = new ethers.providers.StaticJsonRpcProvider(web3Fallback);
this.activeNetwork = (await this.provider.getNetwork()).name;
this.networkConfig = deployConfig[this.activeNetwork];
const contract = new ethers.Contract(this.networkConfig.contractAddr, contractJSON.abi, this.provider);
Expand Down
2 changes: 1 addition & 1 deletion store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const actions = {
if (route.name !== 'index') return; // We only want to preload ads for the index route

const web3Fallback = deployConfig[defaultNetwork].web3Fallback || "http://localhost:8545/";
const provider = new ethers.providers.JsonRpcProvider(web3Fallback);
const provider = new ethers.providers.StaticJsonRpcProvider(web3Fallback);
const activeNetwork = (await provider.getNetwork()).name;
const networkConfig = deployConfig[activeNetwork];
const contract = new ethers.Contract(networkConfig.contractAddr, contractJSON.abi, provider);
Expand Down

0 comments on commit e062cac

Please sign in to comment.