diff --git a/packages/sdk/src/DistributorClient.ts b/packages/sdk/src/DistributorClient.ts index 6842fb9..e800d87 100644 --- a/packages/sdk/src/DistributorClient.ts +++ b/packages/sdk/src/DistributorClient.ts @@ -100,14 +100,12 @@ export class DistributorClient { /** * Get stats for a specific user. - * @param user The address of the user, or an object containing the user address. + * @param user The address of the user. * @throws {FundableStellarError} If fetch fails with a human-readable error message */ public async getUserStats( user: AddressParam ): Promise> { - const actualUser = typeof user === "object" ? user.user : user; - return executeWithErrorHandling( () => this.client.get_user_stats({ user: addressToString(user) }) as Promise< @@ -119,14 +117,12 @@ export class DistributorClient { /** * Get stats for a specific token. - * @param token The address of the token (contract ID), or an object containing the token address. + * @param token The address of the token contract. * @throws {FundableStellarError} If fetch fails with a human-readable error message */ public async getTokenStats( token: AddressParam ): Promise> { - const actualToken = typeof token === "object" ? token.token : token; - return executeWithErrorHandling( () => this.client.get_token_stats({ token: addressToString(token) }) as Promise< diff --git a/packages/sdk/src/__tests__/overloads.test.ts b/packages/sdk/src/__tests__/overloads.test.ts index e1b1324..7388151 100644 --- a/packages/sdk/src/__tests__/overloads.test.ts +++ b/packages/sdk/src/__tests__/overloads.test.ts @@ -207,16 +207,6 @@ describe("Client Method Overloads", () => { expect(result).toBe(mockResult); }); - it("getUserStats accepts object parameter", async () => { - const mockResult = { signAndSend: vi.fn() }; - mockDistributorClient.get_user_stats.mockResolvedValue(mockResult); - - const result = await distributorClient.getUserStats({ user }); - - expect(mockDistributorClient.get_user_stats).toHaveBeenCalledWith({ user }); - expect(result).toBe(mockResult); - }); - it("getTokenStats accepts individual parameters", async () => { const mockResult = { signAndSend: vi.fn() }; mockDistributorClient.get_token_stats.mockResolvedValue(mockResult); @@ -226,16 +216,6 @@ describe("Client Method Overloads", () => { expect(mockDistributorClient.get_token_stats).toHaveBeenCalledWith({ token }); expect(result).toBe(mockResult); }); - - it("getTokenStats accepts object parameter", async () => { - const mockResult = { signAndSend: vi.fn() }; - mockDistributorClient.get_token_stats.mockResolvedValue(mockResult); - - const result = await distributorClient.getTokenStats({ token }); - - expect(mockDistributorClient.get_token_stats).toHaveBeenCalledWith({ token }); - expect(result).toBe(mockResult); - }); }); describe("DistributorClient - Two Parameter Methods", () => { @@ -296,4 +276,4 @@ describe("Client Method Overloads", () => { expect(result).toBe(mockResult); }); }); -}); \ No newline at end of file +});