From 336053c6bf2afbd3b765dd8179571b7152fc6b6e Mon Sep 17 00:00:00 2001 From: shunmugam Date: Tue, 14 Jan 2020 10:36:01 +0530 Subject: [PATCH] Change format of API Response --- server.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server.ts b/server.ts index 75de7e1..76dc49d 100644 --- a/server.ts +++ b/server.ts @@ -129,11 +129,11 @@ try { { let result; //500 if(option == "circulating") - result= blockDetails.coin_existence - blockDetails.totalFoundationReward; + result= Number(blockDetails.coin_existence - blockDetails.totalFoundationReward); else if(option == "reward") - result= blockDetails.currentReward; + result= Number(blockDetails.currentReward); else if(option == "getblockcount") - result= blockDetails.block_height; + result= Number(blockDetails.block_height); else if(option == "getdifficulty-randomx") result = Number(blockDetails.TotalDifficultyRandomx); else if(option == "getdifficulty-cuckoo") @@ -141,9 +141,9 @@ try { else if(option == "getdifficulty-progpow") result = Number(blockDetails.TotalDifficultyProgpow); else if(option == "totalcoins") - result = blockDetails.coin_existence; + result = Number(blockDetails.coin_existence); else if(option == "maxcoins") - result = 21000000; + result = Number(21000000); else if(option == "average-blocktime") { let data = await averageblockdifficulty();