From 206c73b7b0ac69583ea3b5e45ad3bb07bb9251d6 Mon Sep 17 00:00:00 2001 From: andreaanez Date: Wed, 25 Mar 2026 12:57:53 -0700 Subject: [PATCH] fix: round max price to integer cents in nodes create Fixes floating point precision error when converting dollar price to cents (e.g. 17.60 * 100 = 1760.0000000000002), which caused the API to reject the request. Aligns with the rounding already used in `nodes set` and `nodes extend`. Co-Authored-By: Claude Opus 4.6 --- src/lib/nodes/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/nodes/create.ts b/src/lib/nodes/create.ts index 5f2ef45..73e2b55 100644 --- a/src/lib/nodes/create.ts +++ b/src/lib/nodes/create.ts @@ -267,7 +267,7 @@ async function createNodesAction( // Convert CLI options to SDK parameters const createParams: SFCNodes.NodeCreateParams = { desired_count: count, - max_price_per_node_hour: options.maxPrice * 100, + max_price_per_node_hour: Math.round(options.maxPrice * 100), names: names.length > 0 ? names : undefined, any_zone: options.anyZone ?? false, zone: options.zone,