HomePhabricator
Diffusion Comm 3f6d762948d8

[lib] Add timeout to ENSCache

Description

[lib] Add timeout to ENSCache

Summary:
I noticed that when the Alchemy key is missing, ethers.js won't resolve any promises.

Introducing this timeout makes sure that async functions won't stall indefinitely, and can fall back to using the ETH address if the ENS name fails to resolve.

Depends on D6551

Test Plan: Confirmed timeout works and that async functions resolve within 5s

Reviewers: atul

Reviewed By: atul

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D6552

Details

Provenance
ashoatAuthored on Feb 2 2023, 2:12 PM
Reviewer
atul
Differential Revision
D6552: [lib] Add timeout to ENSCache
Parents
rCOMM787f0a3b4a6b: [lib] Catch exceptions thrown by ethers.js in ENSCache
Branches
Unknown
Tags
Unknown