HomePhabricator
Diffusion Comm 6b8c198fcd12

[lib] Don't fetch the same ENS names simultaneously

Description

[lib] Don't fetch the same ENS names simultaneously

Summary:
Sometimes when some interfaces load, there will be multiple places where the same ENS name needs to be fetched. Currently, that results in multiple queries for the same ENS name.

This diff makes sure we don't query for the same ENS name simultaneously.

Depends on D6430

Test Plan: cd lib && ALCHEMY_API_KEY=... yarn test utils/ens-cache.test.js

Reviewers: atul

Reviewed By: atul

Subscribers: tomek

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

Details

Provenance
ashoatAuthored on Jan 28 2023, 7:45 AM
Reviewer
atul
Differential Revision
D6431: [lib] Don't fetch the same ENS names simultaneously
Parents
rCOMM3845eeeb6a39: [lib] Make it possible for ENSCache to store Promises
Branches
Unknown
Tags
Unknown