From b6fda00ce90cec8317093f10fa2b8cdeabbf7ffd Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Sun, 22 Nov 2020 18:28:44 -0700 Subject: [PATCH] New RPC Call Fix: Getnetworkhashps --- lib/explorer.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/explorer.js b/lib/explorer.js index e9267d8..87ea021 100644 --- a/lib/explorer.js +++ b/lib/explorer.js @@ -66,15 +66,15 @@ module.exports = { if (response == 'There was an error. Check your console.') { return cb(response);} if (response) { if (settings.nethash_units == 'K') { - return cb((response * 1000).toFixed(4)); - } else if (settings.nethash_units == 'G') { return cb((response / 1000).toFixed(4)); - } else if (settings.nethash_units == 'H') { - return cb((response * 1000000).toFixed(4)); - } else if (settings.nethash_units == 'T') { + } else if (settings.nethash_units == 'M'){ return cb((response / 1000000).toFixed(4)); - } else if (settings.nethash_units == 'P') { + } else if (settings.nethash_units == 'G') { return cb((response / 1000000000).toFixed(4)); + } else if (settings.nethash_units == 'T') { + return cb((response / 1000000000000).toFixed(4)); + } else if (settings.nethash_units == 'P') { + return cb((response / 1000000000000000).toFixed(4)); } else { return cb(response.toFixed(4)); }