8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0df7035 commit 3201968Copy full SHA for 3201968
js/ethplorer.js
@@ -2132,11 +2132,14 @@ Ethplorer = {
2132
}
2133
return res;
2134
2135
-
+ var parts = num.toString().split('.');
2136
if(withDecimals){
2137
- num = math('round', num, decimals);
+ if(parts.length > 1){
2138
+ if(parts[1].length > decimals){
2139
+ num = math('round', num, decimals);
2140
+ }
2141
2142
- var parts = num.toString().split('.');
2143
var res = parts[0].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
2144
var zeroCount = cutZeroes ? 2 : decimals;
2145
if(withDecimals && decimals){
0 commit comments