Skip to content

Commit

Permalink
(fix):fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sugh01 committed Oct 7, 2023
1 parent fadc4ca commit 0a5dd88
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { Accounts, User } from 'playwright/fixtures/accounts'
import { Contracts } from 'playwright/fixtures/contracts'

import { hexEncodeName } from '@ensdomains/ensjs/utils/hexEncodedName'
import { labelhash } from '@ensdomains/ensjs/utils/labels'
import { namehash } from '@ensdomains/ensjs/utils/normalise'
import { RecordOptions } from '@ensdomains/ensjs/utils/recordHelpers'
Expand Down Expand Up @@ -82,14 +83,18 @@ export const generateLegacySubname =

console.log(`wrapping legacy subname:`, subname)
const _resolver = resolver || emptyAddress
await nameWrapper.wrap(namehash(`${label}.${name}`), accounts.getAddress(owner), _resolver)
await nameWrapper.wrap(
hexEncodeName(`${label}.${name}`),
accounts.getAddress(owner),
_resolver,
)
}

// Create subnames
const _subnames = (subnames || []).map((_subname) => ({
..._subname,
name: `${label}.${name}`,
nameOwner,
nameOwner: owner,
resolver: _subname.resolver ?? DEFAULT_RESOLVER,
}))
for (const eachSubname of _subnames) {
Expand Down

0 comments on commit 0a5dd88

Please sign in to comment.