diff options
author | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-10-24 19:32:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 19:32:19 +0800 |
commit | 09445ef692f5a63b1a4bd418962dca2892e4cda9 (patch) | |
tree | 155484d2dfade59955f888f729b631581527475e /ui/app/components/send/send-constants.js | |
parent | 0a436dcf9a1283a8452966fea2508801de589ab7 (diff) | |
parent | de3a48ec66f044d4116f8dbd25c358ab30d073a9 (diff) | |
download | tangerine-wallet-browser-09445ef692f5a63b1a4bd418962dca2892e4cda9.tar.gz tangerine-wallet-browser-09445ef692f5a63b1a4bd418962dca2892e4cda9.tar.zst tangerine-wallet-browser-09445ef692f5a63b1a4bd418962dca2892e4cda9.zip |
Merge branch 'NewUI-flat' into NewUI-flat-disable-send-next-in-error
Diffstat (limited to 'ui/app/components/send/send-constants.js')
-rw-r--r-- | ui/app/components/send/send-constants.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ui/app/components/send/send-constants.js b/ui/app/components/send/send-constants.js index a819a8c28..8b56607cc 100644 --- a/ui/app/components/send/send-constants.js +++ b/ui/app/components/send/send-constants.js @@ -3,12 +3,19 @@ const { multiplyCurrencies } = require('../../conversion-util') const MIN_GAS_PRICE_GWEI = '1' const GWEI_FACTOR = '1e9' -const MIN_GAS_PRICE = multiplyCurrencies(GWEI_FACTOR, MIN_GAS_PRICE_GWEI, { +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_LIMIT = (21000).toString(16) -const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT, MIN_GAS_PRICE, { +const MIN_GAS_LIMIT_HEX = (21000).toString(16) +const MIN_GAS_LIMIT_DEC = 21000 +const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT_HEX, MIN_GAS_PRICE_HEX, { toNumericBase: 'hex', multiplicandBase: 16, multiplierBase: 16, @@ -16,8 +23,9 @@ const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT, MIN_GAS_PRICE, { module.exports = { MIN_GAS_PRICE_GWEI, - GWEI_FACTOR, - MIN_GAS_PRICE, - MIN_GAS_LIMIT, + MIN_GAS_PRICE_HEX, + MIN_GAS_PRICE_DEC, + MIN_GAS_LIMIT_HEX, + MIN_GAS_LIMIT_DEC, MIN_GAS_TOTAL, } |