8000 Merge branch 'develop' of https://github.com/EverexIO/ethplorer into … · etherscan-io/Ethplorer@6f37f3f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f37f3f

Browse files
committed
Merge branch 'develop' of https://github.com/EverexIO/ethplorer into develop
2 parents c45ad4c + 00ba4e1 commit 6f37f3f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

js/ethplorer.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,12 @@ Ethplorer = {
381381
var pf = parseFloat(totalSupply.replace(/\,/g,'').split(' ')[0]);
382382
if(pf){
383383
pf = Ethplorer.Utils.round(pf * oToken.price.rate, 2);
384-
totalSupply = totalSupply + '<br><span class="total-supply-usd">$&nbsp;' + Ethplorer.Utils.formatNum(pf, true, 2, true) + '</span>';
384+
if(pf < 1e+12){
385+
pf = Ethplorer.Utils.formatNum(pf, true, 2, true);
386+
}else{
387+
pf = "--";
388+
}
389+
totalSupply = totalSupply + '<br><span class="total-supply-usd">$&nbsp;' + pf + '</span>';
385390
$('#transaction-token-totalSupply').html(totalSupply);
386391
}
387392
}
@@ -576,7 +581,12 @@ Ethplorer = {
576581
var pf = parseFloat(totalSupply.replace(/\,/g,'').split(' ')[0]);
577582
if(pf){
578583
pf = Ethplorer.Utils.round(pf * oToken.price.rate, 2);
579-
totalSupply = totalSupply + '<br><span class="total-supply-usd">$&nbsp;' + Ethplorer.Utils.formatNum(pf, true, 2, true) + '</span>';
584+
if(pf < 1e+12){
585+
pf = Ethplorer.Utils.formatNum(pf, true, 2, true);
586+
}else{
587+
pf = "--";
588+
}
589+
totalSupply = totalSupply + '<br><span class="total-supply-usd">$&nbsp;' + pf + '</span>';
580590
$('#transaction-token-totalSupply').html(totalSupply);
581591
}
582592
}

0 commit comments

Comments
 (0)
0