From 220da24f9ab4a57a10bc1fc3e249c511a98ecb46 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 26 Oct 2017 13:36:34 -0230 Subject: Change min gas price to 0.1 GWEI --- ui/app/conversion-util.js | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'ui/app/conversion-util.js') 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 -- cgit v1.2.3