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/components/send/send-constants.js | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'ui/app/components/send/send-constants.js') diff --git a/ui/app/components/send/send-constants.js b/ui/app/components/send/send-constants.js index 8b56607cc..471e01e2a 100644 --- a/ui/app/components/send/send-constants.js +++ b/ui/app/components/send/send-constants.js @@ -1,20 +1,19 @@ +const ethUtil = require('ethereumjs-util') const Identicon = require('../identicon') -const { multiplyCurrencies } = require('../../conversion-util') +const { conversionUtil, multiplyCurrencies } = require('../../conversion-util') -const MIN_GAS_PRICE_GWEI = '1' -const GWEI_FACTOR = '1e9' -const MIN_GAS_PRICE_HEX = multiplyCurrencies(GWEI_FACTOR, MIN_GAS_PRICE_GWEI, { - multiplicandBase: 16, - multiplierBase: 16, - toNumericBase: 'hex', -}) -const MIN_GAS_PRICE_DEC = multiplyCurrencies(GWEI_FACTOR, MIN_GAS_PRICE_GWEI, { - multiplicandBase: 16, - multiplierBase: 16, - toNumericBase: 'dec', -}) +const MIN_GAS_PRICE_HEX = (100000000).toString(16) +const MIN_GAS_PRICE_DEC = '100000000' const MIN_GAS_LIMIT_HEX = (21000).toString(16) const MIN_GAS_LIMIT_DEC = 21000 + +const MIN_GAS_PRICE_GWEI = ethUtil.addHexPrefix(conversionUtil(MIN_GAS_PRICE_HEX, { + fromDenomination: 'WEI', + toDenomination: 'GWEI', + fromNumericBase: 'hex', + toNumericBase: 'hex', +})) + const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT_HEX, MIN_GAS_PRICE_HEX, { toNumericBase: 'hex', multiplicandBase: 16, -- cgit