diff --git a/lib/utils/ens-cache.js b/lib/utils/ens-cache.js --- a/lib/utils/ens-cache.js +++ b/lib/utils/ens-cache.js @@ -8,9 +8,9 @@ const failedQueryCacheTimeout = 5 * 60 * 1000; // five minutes const queryTimeout = 10 * 1000; // ten seconds -async function throwOnTimeout(ethAddressOrName: string) { +async function throwOnTimeout(identifier: string) { await sleep(queryTimeout); - throw new Error(`ENS fetch for ${ethAddressOrName} timed out`); + throw new Error(`ENS fetch for ${identifier} timed out`); } export type EthersProvider = { @@ -83,7 +83,7 @@ try { ensName = await Promise.race([ this.provider.lookupAddress(normalizedETHAddress), - throwOnTimeout(normalizedETHAddress), + throwOnTimeout(`${normalizedETHAddress}'s name`), ]); } catch (e) { console.log(e); @@ -167,7 +167,7 @@ try { ethAddress = await Promise.race([ this.provider.resolveName(normalizedENSName), - throwOnTimeout(normalizedENSName), + throwOnTimeout(`${normalizedENSName}'s address`), ]); } catch (e) { console.log(e);