From 592f04d6f7dff2d646b1c6608aa0c8de12f371f1 Mon Sep 17 00:00:00 2001 From: shunmugam Date: Mon, 16 Sep 2019 17:38:33 +0530 Subject: [PATCH] New API for reward --- server.ts | 2 ++ server/i18n/de.json | 3 ++- server/i18n/en.json | 3 ++- src/app/view/api-view/api-view.component.html | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 7756f49..0e98753 100644 --- a/server.ts +++ b/server.ts @@ -130,6 +130,8 @@ try { let result; //500 if(option == "circulating") result= blockDetails.coin_existence * 100000000; + if(option == "reward") + result= blockDetails.currentReward * 100000000; else if(option == "getblockcount") result= blockDetails.block_height; else if(option == "getdifficulty-randomx") diff --git a/server/i18n/de.json b/server/i18n/de.json index 114db23..cc9bc2c 100644 --- a/server/i18n/de.json +++ b/server/i18n/de.json @@ -102,7 +102,8 @@ "getblockheight" : "Nimmt einen Hash-Parameter und gibt die entsprechende Blockhöhe zurück.", "getblocktime" : "Nimmt einen Höhenparameter und gibt die unixtime des Blocks zurück.", "takes":"nimmt ein", - "Note" : "Hinweis" + "Note" : "Hinweis", + "reward" : "Gibt die aktuelle Blockbelohnung zurück" }, "commit-id-view": { "output-commit":"Output Commit", diff --git a/server/i18n/en.json b/server/i18n/en.json index 701ee4b..4c100ad 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -102,7 +102,8 @@ "getblockheight" : " parameter and returns corresponding block height.", "getblocktime" : " parameter and returns unixtime of the block.", "takes" : "takes a", - "Note" : "Note" + "Note" : "Note", + "reward" : "returns current block reward" }, "commit-id-view": { "output-commit":"Output Commit", diff --git a/src/app/view/api-view/api-view.component.html b/src/app/view/api-view/api-view.component.html index 12be3b2..f6c6a86 100644 --- a/src/app/view/api-view/api-view.component.html +++ b/src/app/view/api-view/api-view.component.html @@ -14,6 +14,7 @@
  • getdifficulty-progpow: {{'api-view.getdifficulty-progpow' | translate}}
  • getdifficulty-cuckoo: {{'api-view.getdifficulty-cuckoo' | translate}}
  • totalcoins: {{'api-view.totalcoins' | translate}}
  • +
  • reward: {{'api-view.reward' | translate}}
  • {{'api-view.Block-Queries' | translate}}