{
Commission: {calcCommission ? `${calcCommission}%` : 'N/A'}
- Uptime: {calcUptime ? `${calcUptime}%` : 'Unavailable'}
+
+ {' '}
+ Uptime:{' '}
+
+
)}
diff --git a/src/v2/stores/nodes.js b/src/v2/stores/nodes.js
index 4a80d5ce..b98a5721 100644
--- a/src/v2/stores/nodes.js
+++ b/src/v2/stores/nodes.js
@@ -1,12 +1,6 @@
-import {filter, reject, map} from 'lodash/fp';
+import {filter, reject} from 'lodash/fp';
import {action, computed, decorate, observable, flow} from 'mobx';
import * as API from 'v2/api/stats';
-import getUptime from 'v2/utils/getUptime';
-
-const addNetworkSolInfo = () => node => ({
- ...node,
- calcUptime: getUptime(node.uptime),
-});
class Store {
network = [];
@@ -15,9 +9,7 @@ class Store {
if (typeof data === 'string') {
data = JSON.parse(data);
}
- this.network = data.network
- ? map(addNetworkSolInfo(data.totalStaked))(data.network)
- : [];
+ this.network = data.network || [];
this.totalStaked = data.totalStaked;
this.totalStakedSol = data.totalStakedSol;
this.supply = data.supply;
diff --git a/src/v2/utils/getUptime.js b/src/v2/utils/getUptime.js
deleted file mode 100644
index 502c61f0..00000000
--- a/src/v2/utils/getUptime.js
+++ /dev/null
@@ -1,13 +0,0 @@
-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'),
-);