Change string response to number in API CALL

This commit is contained in:
root 2019-09-09 09:46:32 +02:00
parent 6101730fbc
commit 2b22cd4ede

View File

@ -133,11 +133,11 @@ try {
else if(option == "getblockcount") else if(option == "getblockcount")
result= blockDetails.block_height; result= blockDetails.block_height;
else if(option == "getdifficulty-randomx") else if(option == "getdifficulty-randomx")
result = blockDetails.TotalDifficultyRandomx; result = Number(blockDetails.TotalDifficultyRandomx);
else if(option == "getdifficulty-cuckoo") else if(option == "getdifficulty-cuckoo")
result = blockDetails.TotalCuckoo; result = Number(blockDetails.TotalCuckoo);
else if(option == "getdifficulty-progpow") else if(option == "getdifficulty-progpow")
result = blockDetails.TotalDifficultyProgpow; result = Number(blockDetails.TotalDifficultyProgpow);
else if(option == "totalcoins") else if(option == "totalcoins")
result = 21000000; result = 21000000;
else if(option == "getblockhash") else if(option == "getblockhash")