diff --git a/packages/ensjs/deploy/00_register_wrapped.cjs b/packages/ensjs/deploy/00_register_wrapped.cjs index 6de1a753..68559f0a 100644 --- a/packages/ensjs/deploy/00_register_wrapped.cjs +++ b/packages/ensjs/deploy/00_register_wrapped.cjs @@ -134,13 +134,9 @@ const names = [ * @type {import('hardhat-deploy/types').DeployFunction} */ const func = async function (hre) { - const { getNamedAccounts, network } = hre - const allNamedAccts = await getNamedAccounts() - + const { network } = hre const nameGenerator = await makeNameGenerator(hre) - const publicResolver = await ethers.getContract('PublicResolver') - await network.provider.send('anvil_setBlockTimestampInterval', [60]) for (const { diff --git a/packages/ensjs/src/functions/subgraph/getNamesForAddress.test.ts b/packages/ensjs/src/functions/subgraph/getNamesForAddress.test.ts index bef78b99..43698101 100644 --- a/packages/ensjs/src/functions/subgraph/getNamesForAddress.test.ts +++ b/packages/ensjs/src/functions/subgraph/getNamesForAddress.test.ts @@ -34,7 +34,7 @@ describe('check that concurrent names all have the same expiry date', () => { const owner = ownerData?.registrant ?? ownerData?.owner expect(owner).toEqual(user4) const expiryData = await getExpiry(publicClient, { name }) - const expiryValue = expiryData?.expiry?.value || 0n + const expiryValue = expiryData?.expiry?.value ?? 0n if (!expiry) expiry = expiryValue const wrapperData = await getWrapperData(publicClient, { name }) diff --git a/packages/ensjs/src/functions/subgraph/getNamesForAddress.ts b/packages/ensjs/src/functions/subgraph/getNamesForAddress.ts index d66adaf9..444eea3d 100644 --- a/packages/ensjs/src/functions/subgraph/getNamesForAddress.ts +++ b/packages/ensjs/src/functions/subgraph/getNamesForAddress.ts @@ -115,9 +115,6 @@ const getOrderByFilter = ({ } case 'createdAt': { return getCreatedAtOrderFilter({ lastDomain, orderDirection }) - return { - [`createdAt_${operator}`]: `${lastDomain.createdAt.value / 1000}`, - } } default: throw new InvalidOrderByError({ diff --git a/packages/ensjs/utils/legacyNameGenerator.cjs b/packages/ensjs/utils/legacyNameGenerator.cjs index c7d8fb21..d10eb355 100644 --- a/packages/ensjs/utils/legacyNameGenerator.cjs +++ b/packages/ensjs/utils/legacyNameGenerator.cjs @@ -1,13 +1,13 @@ /* eslint-disable import/no-extraneous-dependencies */ const { namehash, labelhash } = require('viem') -const makeNameGenerator = async (hre, optionalNonceManager ) => { - const { getNamedAccounts, network } = hre +const makeNameGenerator = async (hre, optionalNonceManager) => { + const { getNamedAccounts } = hre const allNamedAccts = await getNamedAccounts() const controller = await ethers.getContract('LegacyETHRegistrarController') const publicResolver = await ethers.getContract('LegacyPublicResolver') const registry = await ethers.getContract('ENSRegistry') - const nonceManager = optionalNonceManager ? optionalNonceManager : { getNonce: () => undefined} + const nonceManager = optionalNonceManager ?? { getNonce: () => undefined} return { commit: async ({ label, namedOwner, namedAddr }) => { diff --git a/packages/ensjs/utils/nonceManager.cjs b/packages/ensjs/utils/nonceManager.cjs index 302d838d..a022bb62 100644 --- a/packages/ensjs/utils/nonceManager.cjs +++ b/packages/ensjs/utils/nonceManager.cjs @@ -12,10 +12,9 @@ return { getNonce: (name) => { - const test = nonceMap[name] + const nonce = nonceMap[name] nonceMap[name]++ - return test - return numberToHex(nonceMap[name]) + return nonce } } diff --git a/packages/ensjs/utils/wrappedNameGenerator.cjs b/packages/ensjs/utils/wrappedNameGenerator.cjs index a9e08667..35f229ea 100644 --- a/packages/ensjs/utils/wrappedNameGenerator.cjs +++ b/packages/ensjs/utils/wrappedNameGenerator.cjs @@ -1,18 +1,15 @@ /* eslint-disable import/no-extraneous-dependencies */ const { BigNumber } = require('ethers') -const { parseUnits } = require('ethers/lib/utils') const { namehash } = require('viem/ens') const makeNameGenerator = async (hre, optionalNonceManager) => { - const { getNamedAccounts, network } = hre + const { getNamedAccounts } = hre const allNamedAccts = await getNamedAccounts() const controller = await ethers.getContract('ETHRegistrarController') const publicResolver = await ethers.getContract('PublicResolver') const nameWrapper = await ethers.getContract('NameWrapper') - const nonceManager = optionalNonceManager - ? optionalNonceManager - : { getNonce: () => undefined } + const nonceManager = optionalNonceManager ?? { getNonce: () => undefined } return { commit: async ({