Skip to content

Commit

Permalink
Merge pull request #19 from ensdomains/remove-nodependency-importgene…
Browse files Browse the repository at this point in the history
…rator

remove no dep import generator
  • Loading branch information
LeonmanRolls authored Jul 8, 2022
2 parents d826d14 + 0263140 commit 736b428
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/ensjs/src/functions/getDNSOwner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('getDNSOwner', () => {
'726c2b1d3bab6b74-TPE',
],
)
expect(await getDNSOwner(dnsName)).toEqual(
expect(await getDNSOwner({}, dnsName)).toEqual(
'0x983110309620D911731Ac0932219af06091b6744',
)
})
Expand Down Expand Up @@ -114,7 +114,7 @@ describe('getDNSOwner', () => {
],
)
try {
await getDNSOwner(dnsName)
await getDNSOwner({}, dnsName)
} catch (error) {
expect(error.message).toEqual('DNS query failed: NXDOMAIN')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ensjs/src/functions/getDNSOwner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const dnsQuery = async (
return response
}

export default async function (dnsName: string) {
export default async function (_: any, dnsName: string) {
const result = await dnsQuery('TXT', `_ens.${dnsName}`)
const address = result?.answers?.[0]?.data?.[0]?.toString()?.split('=')?.[1]
return address
Expand Down
3 changes: 0 additions & 3 deletions packages/ensjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ export class ENS {
if (subFunc !== 'combine') {
// get the function to call
const func = subFunc ? mod[exportName][subFunc] : mod[exportName]
if(dependencies.length === 0) {
return func(...args)
}
// get the dependencies to forward to the function as the first arg
const dependenciesToForward =
thisRef.forwardDependenciesFromArray<F>(dependencies)
Expand Down

0 comments on commit 736b428

Please sign in to comment.