diff options
author | Dan <danjm.com@gmail.com> | 2017-10-27 00:06:34 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-27 03:25:33 +0800 |
commit | 220da24f9ab4a57a10bc1fc3e249c511a98ecb46 (patch) | |
tree | fbfc5162c1ebd3a57df604dff47375d081b7930c /ui/app/components/send/send-constants.js | |
parent | 0d8f21ad58cc50c635974ee9ce487ce98993ea38 (diff) | |
download | tangerine-wallet-browser-220da24f9ab4a57a10bc1fc3e249c511a98ecb46.tar.gz tangerine-wallet-browser-220da24f9ab4a57a10bc1fc3e249c511a98ecb46.tar.zst tangerine-wallet-browser-220da24f9ab4a57a10bc1fc3e249c511a98ecb46.zip |
Change min gas price to 0.1 GWEI
Diffstat (limited to 'ui/app/components/send/send-constants.js')
-rw-r--r-- | ui/app/components/send/send-constants.js | 25 |
1 files changed, 12 insertions, 13 deletions
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, |