|
@@ -2784,8 +2784,7 @@ func RoundNumber(num string, decimalPlaces int, hasPercent bool) string {
|
|
|
if hasPercent {
|
|
|
numDecimal = numDecimal.Mul(decimal.NewFromInt(100))
|
|
|
}
|
|
|
- numFloat, _ := numDecimal.Round(int32(decimalPlaces)).Float64()
|
|
|
- numStr := strconv.FormatFloat(numFloat, 'f', decimalPlaces, 64)
|
|
|
+ numStr := numDecimal.Round(int32(decimalPlaces)).StringFixed(int32(decimalPlaces))
|
|
|
if hasPercent {
|
|
|
numStr += "%"
|
|
|
}
|