diff --git a/CHANGELOG.md b/CHANGELOG.md index 911c9406e..e1c282987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T ## Unreleased +- Fix ANS api functions overwriting user provided `where` clauses + # 1.39.0 (2025-04-02) - Add a `transferFungibleAssetBetweenStores` function to transfer Fungible Assets between any (primary or secondary) fungible stores. diff --git a/src/internal/ans.ts b/src/internal/ans.ts index e99b439ed..7182a875e 100644 --- a/src/internal/ans.ts +++ b/src/internal/ans.ts @@ -573,9 +573,9 @@ export async function getAccountNames( offset: options?.offset, order_by: options?.orderBy, where_condition: { - ...(args.options?.where ?? {}), owner_address: { _eq: accountAddress.toString() }, expiration_timestamp: { _gte: expirationDate }, + ...(args.options?.where ?? {}), }, }, }, @@ -628,10 +628,10 @@ export async function getAccountDomains( offset: options?.offset, order_by: options?.orderBy, where_condition: { - ...(args.options?.where ?? {}), owner_address: { _eq: accountAddress.toString() }, expiration_timestamp: { _gte: expirationDate }, subdomain: { _eq: "" }, + ...(args.options?.where ?? {}), }, }, }, @@ -684,10 +684,10 @@ export async function getAccountSubdomains( offset: options?.offset, order_by: options?.orderBy, where_condition: { - ...(args.options?.where ?? {}), owner_address: { _eq: accountAddress.toString() }, expiration_timestamp: { _gte: expirationDate }, subdomain: { _neq: "" }, + ...(args.options?.where ?? {}), }, }, }, @@ -736,9 +736,9 @@ export async function getDomainSubdomains( offset: options?.offset, order_by: options?.orderBy, where_condition: { - ...(args.options?.where ?? {}), domain: { _eq: domain }, subdomain: { _neq: "" }, + ...(args.options?.where ?? {}), }, }, },