Skip to content

Commit 4a17ab8

Browse files
committed
fix(five-hour-blocks): preserve precision in costPerHour calculations
Remove rounding of costPerHour in calculateBurnRate() to maintain precision for downstream calculations in projectBlockUsage(). The costPerHour value is used for calculating projectedAdditionalCost, where premature rounding can introduce cumulative errors. Display formatting is already handled by formatCurrency() at the presentation layer. This change ensures accurate cost projections for active blocks while keeping the user-facing display properly formatted.
1 parent 6205adb commit 4a17ab8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/utils/five-hour-blocks.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function calculateBurnRate(block: FiveHourBlock): BurnRate | null {
198198

199199
return {
200200
tokensPerMinute: Math.round(tokensPerMinute),
201-
costPerHour: Math.round(costPerHour * 100) / 100,
201+
costPerHour,
202202
};
203203
}
204204

0 commit comments

Comments
 (0)