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
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 2m19s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user