mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-21 12:49:11 +00:00
Merge pull request #45 from status-im/bug_fix/gas-average
Fix average in gas station
This commit is contained in:
commit
0f9331532e
@ -34,7 +34,7 @@ class GasStation extends Component {
|
||||
}).map(gasPrice => {
|
||||
totalWait += this.props.gasOracleStats[gasPrice].totalWait;
|
||||
totalTxs += this.props.gasOracleStats[gasPrice].nbTxs;
|
||||
totalGasPrice = gasPrice * this.props.gasOracleStats[gasPrice].nbTxs;
|
||||
totalGasPrice += gasPrice * this.props.gasOracleStats[gasPrice].nbTxs;
|
||||
return {
|
||||
gasPrice,
|
||||
wait: this.props.gasOracleStats[gasPrice].averageWait >= 0.1 ? this.props.gasOracleStats[gasPrice].averageWait : 0.1
|
||||
|
@ -28,7 +28,12 @@ class TransactionTracker {
|
||||
}
|
||||
block.transactions.forEach(transaction => {
|
||||
if (this.transactions[transaction.hash]) {
|
||||
Object.assign(this.transactions[transaction.hash], transaction, {endTimestamp: block.timestamp, wait: block.timestamp - this.transactions[transaction.hash].startTimestamp});
|
||||
let wait = block.timestamp - this.transactions[transaction.hash].startTimestamp;
|
||||
if (wait < 0.1) {
|
||||
wait = 0.1;
|
||||
}
|
||||
Object.assign(this.transactions[transaction.hash],
|
||||
{endTimestamp: block.timestamp, wait, gasPrice: transaction.gasPrice});
|
||||
}
|
||||
});
|
||||
this.events.emit('blockchain:gas:oracle:new');
|
||||
|
Loading…
x
Reference in New Issue
Block a user