HomePhabricator
Diffusion Comm 613e1160da39

[lib] Refactor ENSCache lambdas a little bit

Description

[lib] Refactor ENSCache lambdas a little bit

Summary:
This code had some many-to-many branching behavior, so I had previously defined a lambda to avoid code duplication.

In this diff I swap the lambda vs. main function body parts, as this will be beneficial for the following diffs. Arguably it reads cleaner this way anyways if you're familiar with the async IIFE pattern.

Depends on D6428

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/D6429

Details

Provenance
ashoatAuthored on Jan 28 2023, 7:14 AM
Reviewer
atul
Differential Revision
D6429: [lib] Refactor ENSCache lambdas a little bit
Parents
rCOMMaa4d57b3bdc7: [lib] Modify ENSCache test so ETH address normalization is checked
Branches
Unknown
Tags
Unknown