From 486c839cd316a2c3336063da6b09d12c596f5622 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 31 Aug 2018 15:29:26 -0400 Subject: [PATCH] filter values --- embark-ui/src/components/GasStation.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/embark-ui/src/components/GasStation.js b/embark-ui/src/components/GasStation.js index eed3cb26e..c50a19de7 100644 --- a/embark-ui/src/components/GasStation.js +++ b/embark-ui/src/components/GasStation.js @@ -35,10 +35,12 @@ class GasStation extends Component { if (!gasPrices.length) { return []; } - return gasPrices.map(gasPrice => { + return gasPrices.filter((gasPrice) => { + return this.props.gasOracleStats[gasPrice].nbTxs >= 10; // Only keep prices with enough transactions + }).map(gasPrice => { return { gasPrice, - wait: this.props.gasOracleStats[gasPrice].averageWait + wait: this.props.gasOracleStats[gasPrice].averageWait >= 0.1 ? this.props.gasOracleStats[gasPrice].averageWait : 0.1 }; }).sort((a, b) => { return a.gasPrice - b.gasPrice; @@ -96,7 +98,7 @@ class GasStation extends Component { - {currentGasStep.gasPrice / 1000000000} Wei + {currentGasStep.gasPrice / 1000000000} GWei @@ -119,7 +121,7 @@ class GasStation extends Component { {/* - Average Price: {this.formattedGasStats.average.price} Wei + Average Price: {this.formattedGasStats.average.price} GWei