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 }), )