Skip to content

Commit

Permalink
Updates queries for ANS to ignore expired names
Browse files Browse the repository at this point in the history
  • Loading branch information
kaw2k committed Mar 26, 2024
1 parent 19506cf commit b39d440
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T
- Add function to create token object address locally
- Add signers to entry function ABI for future signature count checking
- [`Breaking`] Add type-safe view functions with ABI support
- [`Fix`] ANS `getName` and `getDomainSubdomains` now appropriately ignores invalid and expired names

# 1.10.0 (2024-03-11)

Expand Down
2 changes: 2 additions & 0 deletions src/internal/ans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ export async function getName(args: {
const where: CurrentAptosNamesBoolExp = {
domain: { _eq: domainName },
subdomain: { _eq: subdomainName },
is_active: { _eq: true },
};

const data = await queryIndexer<GetNamesQuery>({
Expand Down Expand Up @@ -487,6 +488,7 @@ export async function getDomainSubdomains(
...(args.options?.where ?? {}),
domain: { _eq: domain },
subdomain: { _neq: "" },
is_active: { _eq: true },
},
},
},
Expand Down

0 comments on commit b39d440

Please sign in to comment.