We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f04eee commit e71d98fCopy full SHA for e71d98f
src/utils/provider.ts
@@ -7,8 +7,9 @@ import networks from '../networks.json';
7
const providers = {};
8
9
export default function getProvider(network: string) {
10
- const url: string = networks[network].rpc[0];
11
- if (!providers[network]) providers[network] = new StaticJsonRpcProvider(url);
+ const url: any = networks[network].rpc[0];
+ const connectionInfo = typeof url === 'object' ? {...url, timeout: 30000} : {url, timeout: 30000};
12
+ if (!providers[network]) providers[network] = new StaticJsonRpcProvider(connectionInfo);
13
return providers[network];
14
}
15
0 commit comments