Fixed AbstractProvider lookupAddress bug (#4086).

This commit is contained in:
Richard Moore 2023-06-01 17:51:21 -04:00
parent d8e9586044
commit 15ed2f5b32

@ -15,7 +15,7 @@
// of Signer/ENS name to address so we can sync respond to listenerCount. // of Signer/ENS name to address so we can sync respond to listenerCount.
import { getAddress, resolveAddress } from "../address/index.js"; import { getAddress, resolveAddress } from "../address/index.js";
import { ZeroHash } from "../constants/index.js"; import { ZeroAddress } from "../constants/index.js";
import { Contract } from "../contract/index.js"; import { Contract } from "../contract/index.js";
import { namehash } from "../hash/index.js"; import { namehash } from "../hash/index.js";
import { Transaction } from "../transaction/index.js"; import { Transaction } from "../transaction/index.js";
@ -1140,7 +1140,7 @@ export class AbstractProvider implements Provider {
], this); ], this);
const resolver = await ensContract.resolver(node); const resolver = await ensContract.resolver(node);
if (resolver == null || resolver === ZeroHash) { return null; } if (resolver == null || resolver === ZeroAddress) { return null; }
const resolverContract = new Contract(resolver, [ const resolverContract = new Contract(resolver, [
"function name(bytes32) view returns (string)" "function name(bytes32) view returns (string)"