From b445e207fbc42cd42df89a6a7822c9d5db1eb7b6 Mon Sep 17 00:00:00 2001 From: Christopher Gerber Date: Fri, 17 Jan 2025 11:25:50 -0800 Subject: [PATCH] fixes --- .../typescript/src/actions/cdp/address_reputation.ts | 6 ++---- .../typescript/src/tests/address_reputation_test.ts | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cdp-agentkit-core/typescript/src/actions/cdp/address_reputation.ts b/cdp-agentkit-core/typescript/src/actions/cdp/address_reputation.ts index 3f7b7961..48a3955b 100644 --- a/cdp-agentkit-core/typescript/src/actions/cdp/address_reputation.ts +++ b/cdp-agentkit-core/typescript/src/actions/cdp/address_reputation.ts @@ -15,13 +15,11 @@ This tool checks the reputation of an address on a given network. It takes: */ export const AddressReputationInput = z .object({ - network: z - .string() - .describe("The network to check the address on"), address: z .string() .regex(/^0x[a-fA-F0-9]{40}$/, "Invalid Ethereum address format") .describe("The Ethereum address to check"), + network: z.string().describe("The network to check the address on"), }) .strip() .describe("Input schema for address reputation check"); @@ -37,7 +35,7 @@ export async function checkAddressReputation( args: z.infer, ): Promise { try { - const address = new Address(args.address, args.network); + const address = new Address(args.network, args.address); const reputation = await address.reputation(); return reputation.toString(); } catch (error) { diff --git a/cdp-agentkit-core/typescript/src/tests/address_reputation_test.ts b/cdp-agentkit-core/typescript/src/tests/address_reputation_test.ts index cdae0620..b47a85db 100644 --- a/cdp-agentkit-core/typescript/src/tests/address_reputation_test.ts +++ b/cdp-agentkit-core/typescript/src/tests/address_reputation_test.ts @@ -53,7 +53,6 @@ describe("Address Reputation Action", () => { }); it("should successfully check address reputation", async () => { - // TODO: ask John if there is a better way... const mockReputation = { score: 85, metadata: { @@ -68,6 +67,7 @@ describe("Address Reputation Action", () => { ens_contract_interactions: 2, smart_contract_deployments: 1, }, + // TODO: ask John if there is a better way... // eslint-disable-next-line @typescript-eslint/no-explicit-any } as unknown as jest.Mocked; @@ -81,7 +81,6 @@ describe("Address Reputation Action", () => { const action = new AddressReputationAction(); const response = await action.func(args); - console.log(mockReputation.toString()); expect(response).toBe(mockReputation.toString()); });