Skip to content

Commit

Permalink
Fix: average estimate gas price unit (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Mar 27, 2020
1 parent 2395b33 commit 3a0733e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ui/app/ducks/gas/gas.duck.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ async function fetchExternalBasicGasEstimates (
}),
])

let { result: estimateGasTimes10 } = await estimateGasResult.json()
estimateGasTimes10 = parseInt(estimateGasTimes10, 16) || 100 // this unit is gdrip * 10
const { result: estimateGasDrip } = await estimateGasResult.json()
const estimateGasGdripTimes10 = parseInt(estimateGasDrip * 10 / 1e8, 16) || 100 // this unit is gdrip * 10

const {
safeLow: safeLowTimes10,
Expand All @@ -249,7 +249,7 @@ async function fetchExternalBasicGasEstimates (

const [average, fast, fastest, safeLow] = [
// averageTimes10,
estimateGasTimes10,
estimateGasGdripTimes10,
fastTimes10,
fastestTimes10,
safeLowTimes10,
Expand Down Expand Up @@ -333,8 +333,8 @@ async function fetchExternalBasicGasAndTimeEstimates (
}),
])

let { result: estimateGasTimes10 } = await estimateGasResult.json()
estimateGasTimes10 = parseInt(estimateGasTimes10, 16) || 100 // the unit is gdrip * 10
const { result: estimateGasDrip } = await estimateGasResult.json()
const estimateGasGdripTimes10 = parseInt(estimateGasDrip * 10 / 1e8, 16) || 100 // this unit is gdrip * 10

const {
// average: averageTimes10,
Expand All @@ -351,7 +351,7 @@ async function fetchExternalBasicGasAndTimeEstimates (
} = await response.json()
const [average, fast, fastest, safeLow] = [
// averageTimes10,
estimateGasTimes10,
estimateGasGdripTimes10,
fastTimes10,
fastestTimes10,
safeLowTimes10,
Expand Down

0 comments on commit 3a0733e

Please sign in to comment.