From 7c502336de206bcb4d164b7b8c61e415604720bc Mon Sep 17 00:00:00 2001 From: Silas Boyd-Wickizer Date: Mon, 19 Dec 2022 10:13:46 -0800 Subject: [PATCH] Tweak --- src/resolve-celo.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/resolve-celo.ts b/src/resolve-celo.ts index ce4506a3..1e228569 100644 --- a/src/resolve-celo.ts +++ b/src/resolve-celo.ts @@ -7,6 +7,8 @@ import { AuthSigner, ServiceContext } from '@celo/identity/lib/odis/query' import { NameResolver, NameResolutionResults, ResolutionKind } from './types' +const DEFAULT_NETWORK_TIMEOUT = 5_000 + export class ResolveCelo implements NameResolver { private federatedAttestationsContract: Contract private authSigner: AuthSigner @@ -37,7 +39,7 @@ export class ResolveCelo implements NameResolver { serviceContext: ServiceContext networkTimeout?: number }) { - networkTimeout = networkTimeout ?? 10000 + networkTimeout = networkTimeout ?? DEFAULT_NETWORK_TIMEOUT const web3 = new Web3( new Web3.providers.HttpProvider(providerUrl, { timeout: networkTimeout }), )