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)); }