|
@@ -342,6 +342,11 @@ function findTokenPriceItem(token_address, tokenPrices) {
|
|
// function calculate_total_usdprice(amount, decimals, usdprice) {
|
|
// function calculate_total_usdprice(amount, decimals, usdprice) {
|
|
// return parseInt(amount) / (10**parseInt(decimals)) * parseInt(usdprice) ;
|
|
// return parseInt(amount) / (10**parseInt(decimals)) * parseInt(usdprice) ;
|
|
function calculate_total_usdprice(amount, decimals, usdprice) {
|
|
function calculate_total_usdprice(amount, decimals, usdprice) {
|
|
|
|
+ // if(usdprice.toString().indexOf("e") != -1 ){
|
|
|
|
+ // return parseInt(amount) / (10 ** parseInt(decimals)) * parseFloat(usdprice);
|
|
|
|
+ // }else {
|
|
|
|
+ // return parseInt(amount) / (10 ** parseInt(decimals)) * parseFloat(usdprice);
|
|
|
|
+ // }
|
|
return parseInt(amount) / (10 ** parseInt(decimals)) * parseFloat(usdprice);
|
|
return parseInt(amount) / (10 ** parseInt(decimals)) * parseFloat(usdprice);
|
|
}
|
|
}
|
|
|
|
|