diff options
Change min gas price to 0.1 GWEI
Diffstat (limited to 'ui/app/conversion-util.js')
-rw-r--r-- | ui/app/conversion-util.js | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/ui/app/conversion-util.js b/ui/app/conversion-util.js index 2f3fb1678..39215cf1b 100644 --- a/ui/app/conversion-util.js +++ b/ui/app/conversion-util.js @@ -51,7 +51,7 @@ const toNormalizedDenomination = { } const toSpecifiedDenomination = { WEI: bigNumber => bigNumber.times(BIG_NUMBER_WEI_MULTIPLIER).round(), - GWEI: bigNumber => bigNumber.times(BIG_NUMBER_GWEI_MULTIPLIER).round(), + GWEI: bigNumber => bigNumber.times(BIG_NUMBER_GWEI_MULTIPLIER).round(1), } const baseChange = { hex: n => n.toString(16), @@ -169,9 +169,34 @@ const conversionGreaterThan = ( return firstValue.gt(secondValue) } +const conversionGTE = ( + { ...firstProps }, + { ...secondProps }, +) => { + const firstValue = converter({ ...firstProps }) + const secondValue = converter({ ...secondProps }) + return firstValue.greaterThanOrEqualTo(secondValue) +} + +const conversionLTE = ( + { ...firstProps }, + { ...secondProps }, +) => { + const firstValue = converter({ ...firstProps }) + const secondValue = converter({ ...secondProps }) + return firstValue.lessThanOrEqualTo(secondValue) +} + +const toNegative = (n, options = {}) => { + return multiplyCurrencies(n, -1, options) +} + module.exports = { conversionUtil, addCurrencies, multiplyCurrencies, conversionGreaterThan, + conversionGTE, + conversionLTE, + toNegative, }
\ No newline at end of file |