Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
reverting register basename input schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Gerber authored and stat committed Dec 3, 2024
1 parent d661818 commit bb6de6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cdp-agentkit-core/src/actions/cdp/register_basename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const REGISTRAR_ABI = [
export const RegisterBasenameInput = z
.object({
basename: z.string().describe("The Basename to assign to the agent"),
amount: z.custom<Amount>().default(0.002).describe("The amount of the from asset to trade"),
amount: z.string().default("0.002").describe("The amount of the from asset to trade"),
})
.strip()
.describe("Instructions for registering a Basename");
Expand Down Expand Up @@ -175,7 +175,7 @@ export async function registerBasename(
method: "register",
args: registerArgs,
abi: REGISTRAR_ABI,
amount: args.amount,
amount: new Decimal(args.amount),
assetId: "eth",
});

Expand Down
2 changes: 1 addition & 1 deletion cdp-agentkit-core/src/tests/register_basename_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Coinbase, Wallet } from "@coinbase/coinbase-sdk";

import { registerBasename, RegisterBasenameInput } from "../actions/cdp/register_basename";

const MOCK_AMMOUNT = 0.123;
const MOCK_AMMOUNT = "0.123";
const MOCK_BASENAME = "test-basename";

describe("Register Basename Input", () => {
Expand Down

0 comments on commit bb6de6d

Please sign in to comment.