From 2e84f8621fbf6383a103ac03b0386331ae1ae6d8 Mon Sep 17 00:00:00 2001 From: Sunny Gleason Date: Thu, 3 Oct 2019 09:32:35 -0400 Subject: [PATCH] feat: uptime truncation (cosmetic, pending real fix) --- src/v2/utils/getUptime.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/v2/utils/getUptime.js b/src/v2/utils/getUptime.js index 7501f832..502c61f0 100644 --- a/src/v2/utils/getUptime.js +++ b/src/v2/utils/getUptime.js @@ -1,6 +1,12 @@ import {compose, getOr, multiply} from 'lodash/fp'; export default compose( + // + // FIXME: this masks possible calculation errors, see: + // + // https://github.com/solana-labs/networkexplorer/issues/456 + // https://github.com/solana-labs/networkexplorer/issues/425 + // time => (time > 100 ? 100 : parseFloat(time.toFixed(time ? 4 : 2))), multiply(100), getOr(0, 'uptime.uptime.[0].percentage'),