Skip to content

Commit

Permalink
Merge pull request #3011 from AIFlowML/fix-plugin-hyperliquid
Browse files Browse the repository at this point in the history
fix(lint): plugin-hyperliquid
  • Loading branch information
tcm390 authored Jan 30, 2025
2 parents 13e1cd5 + 382627a commit 718f9e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/plugin-hyperliquid/src/actions/cancelOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export const cancelOrders: Action = {
},
handler: async (
runtime: IAgentRuntime,
message: Memory,
state: State,
options: Record<string, unknown>,
_message: Memory,
_state: State,
_options: Record<string, unknown>,
callback?: HandlerCallback
) => {
try {
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-hyperliquid/src/actions/priceCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export const priceCheck: Action = {
runtime: IAgentRuntime,
message: Memory,
state: State,
options: Record<string, unknown>,
_options: Record<string, unknown>,
callback?: HandlerCallback
) => {
try {
// Initialize or update state
state = !state
const currentState = !state
? await runtime.composeState(message)
: await runtime.updateRecentMessageState(state);

const context = composeContext({
state,
state: currentState,
template: priceCheckTemplate,
});

Expand Down
10 changes: 5 additions & 5 deletions packages/plugin-hyperliquid/src/actions/spotTrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
HyperliquidError,
PRICE_VALIDATION,
} from "../types.js";
import { spotTradeTemplate } from "../templates.js";
import { priceCheckTemplate, spotTradeTemplate } from "../templates.js";

export const spotTrade: Action = {
name: "SPOT_TRADE",
Expand All @@ -29,18 +29,18 @@ export const spotTrade: Action = {
runtime: IAgentRuntime,
message: Memory,
state: State,
options: Record<string, unknown>,
_options: Record<string, unknown>,
callback?: HandlerCallback
) => {
try {
// Initialize or update state
state = !state
const currentState = !state
? await runtime.composeState(message)
: await runtime.updateRecentMessageState(state);

const context = composeContext({
state,
template: spotTradeTemplate,
state: currentState,
template: priceCheckTemplate,
});

const content = await generateObjectDeprecated({
Expand Down

0 comments on commit 718f9e9

Please sign in to comment.