From 3aeae133ba3030a679367356a290bbf7c52968b3 Mon Sep 17 00:00:00 2001 From: 0xyoki Date: Tue, 17 Mar 2026 16:09:05 +0100 Subject: [PATCH 1/2] chore: skip any action type without a corresponding label --- recipes/perps.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/perps.ts b/recipes/perps.ts index 4356bab..f6d161b 100644 --- a/recipes/perps.ts +++ b/recipes/perps.ts @@ -1104,6 +1104,10 @@ async function executeTrade( return false; } + if (!ACTION_LABELS[actionType]) { + return false; + } + return !POSITION_ONLY_ACTIONS.includes(actionType) || !!existingPosition; }) as PerpActionTypes[]; From 8fa848a28e349eff58ba8540ff38b17863d41891 Mon Sep 17 00:00:00 2001 From: 0xyoki Date: Wed, 25 Mar 2026 14:14:49 +0100 Subject: [PATCH 2/2] chore: fix optional args --- recipes/borrow.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/borrow.ts b/recipes/borrow.ts index d109344..6f28f68 100644 --- a/recipes/borrow.ts +++ b/recipes/borrow.ts @@ -451,7 +451,9 @@ async function promptFromSchema( type: "input", name: "value", message, - initial: (prop.placeholder || prop.default) as string, + ...(isRequired && (prop.placeholder || prop.default) + ? { initial: (prop.placeholder || prop.default) as string } + : {}), validate: (input: string) => { if (!isRequired && input === "") return true; if (isRequired && input === "") return `${prop.label || name} is required`;