Make it a fallback instead of a quorum (#1119)

* Make it a fallback instead of a quorum

* Retry again

* Update typescript/infra/src/config/chain.ts
pull/1142/head
Nam Chu Hoai 2 years ago committed by GitHub
parent 68c394a2a8
commit b1a2762433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      typescript/infra/src/config/chain.ts

@ -41,7 +41,8 @@ export async function fetchProvider(
const rpc = await getSecretRpcEndpoint(environment, chainName, quorum); const rpc = await getSecretRpcEndpoint(environment, chainName, quorum);
if (quorum) { if (quorum) {
return new ethers.providers.FallbackProvider( return new ethers.providers.FallbackProvider(
(rpc as string[]).map((url) => providerBuilder(url, chainName, false)), // disable retry for quorum (rpc as string[]).map((url) => providerBuilder(url, chainName)),
1, // a single provider is "quorum", but failure will cause failover to the next provider
); );
} else { } else {
return providerBuilder(rpc, chainName); return providerBuilder(rpc, chainName);

Loading…
Cancel
Save