From e770b81df9606d6df2c5a213beff057cefd1708a Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 7 Jul 2025 16:36:09 -0700 Subject: [PATCH] [fix] handle missing length widget in API node pricing Updates pricing logic to show 5s pricing when length widget is removed, while maintaining future-proof support for when the widget is added back. --- src/composables/node/useNodePricing.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/composables/node/useNodePricing.ts b/src/composables/node/useNodePricing.ts index 4b76d65e9..16ae7ef96 100644 --- a/src/composables/node/useNodePricing.ts +++ b/src/composables/node/useNodePricing.ts @@ -954,7 +954,8 @@ const apiNodeCosts: Record = (w) => w.name === 'length' ) as IComboWidget - if (!lengthWidget) return '$1.50-3.00/Run (varies with length)' + // If no length widget exists, default to 5s pricing + if (!lengthWidget) return '$1.50/Run' const length = String(lengthWidget.value) if (length === '5s') { @@ -972,7 +973,8 @@ const apiNodeCosts: Record = (w) => w.name === 'length' ) as IComboWidget - if (!lengthWidget) return '$1.50-3.00/Run (varies with length)' + // If no length widget exists, default to 5s pricing + if (!lengthWidget) return '$1.50/Run' const length = String(lengthWidget.value) if (length === '5s') { @@ -990,7 +992,8 @@ const apiNodeCosts: Record = (w) => w.name === 'length' ) as IComboWidget - if (!lengthWidget) return '$2.00-4.00/Run (varies with length)' + // If no length widget exists, default to 5s pricing + if (!lengthWidget) return '$2.00/Run' const length = String(lengthWidget.value) if (length === '5s') {