Skip to content

Commit

Permalink
get resoler address properly
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNi245 committed Sep 3, 2024
1 parent b1948aa commit f7094e7
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,15 @@ export async function getPublishProfileOnchainTransaction(

const ens = getEnsUtils(mainnetProvider);

// Fetch owner of ENS name
const owner = await ens.name(ensName).getAddress();

// Fetch resolver of account
const ethersResolver = await ens.resolver(owner);
const ensResolverAddress = await ens.name(ensName).getResolver();

if (!ethersResolver) {
if (!ensResolverAddress) {
throw Error('No resolver found');
}

const resolver = ethersHelper.getConractInstance(
ethersResolver.address,
ensResolverAddress,
[
'function setText(bytes32 node, string calldata key, string calldata value) external',
],
Expand Down

0 comments on commit f7094e7

Please sign in to comment.