fix(web): create_sub_task reward_amount object access
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
This commit is contained in:
@@ -712,7 +712,7 @@ export async function POST(request: NextRequest, props: { params: Promise<{ tool
|
||||
if (!claim || claim.task_id !== parsed.parent_task_id || claim.status !== TaskStatus.EXECUTING) {
|
||||
throw new Error("Invalid claim token or parent task is not EXECUTING");
|
||||
}
|
||||
if (parsed.reward_amount >= claim.held_amount) {
|
||||
if (parsed.reward_amount.amount >= claim.held_amount) {
|
||||
throw new Error("Sub-task reward cannot exceed parent task reward");
|
||||
}
|
||||
|
||||
@@ -722,7 +722,7 @@ export async function POST(request: NextRequest, props: { params: Promise<{ tool
|
||||
description: parsed.description,
|
||||
status: TaskStatus.OPEN,
|
||||
difficulty: "HELLO_WORLD",
|
||||
reward_amount: parsed.reward_amount,
|
||||
reward_amount: parsed.reward_amount.amount,
|
||||
reward_currency: claim.held_currency,
|
||||
required_stack: ["A2A", "Agent Sub-Task"],
|
||||
scope_clarity_score: 1.0,
|
||||
|
||||
Reference in New Issue
Block a user