Update monetary limits for numeric precision in BaseWorker and UserCharacterWorker: Changed maximum absolute values from numeric(10,2) to numeric(14,2) to accommodate larger monetary amounts. Adjusted related comments and clamping logic to reflect the new limits, ensuring accurate handling of monetary values.
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 2m19s

This commit is contained in:
Torsten Schulz (local)
2026-05-06 11:04:45 +02:00
parent 43eb6ed0ab
commit 8509a7e171
6 changed files with 103 additions and 13 deletions

View File

@@ -706,7 +706,7 @@ impl UserCharacterWorker {
let clamped = if !new_amount.is_finite() {
1000.0
} else {
const MAX_ABS: f64 = 99_999_999.99;
const MAX_ABS: f64 = 999_999_999_999.99;
new_amount.clamp(-MAX_ABS, MAX_ABS)
};
let money_str = format!("{:.2}", clamped);