diff options
author | Dan <danjm.com@gmail.com> | 2017-10-19 03:23:35 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-20 03:34:34 +0800 |
commit | c2880c4b8fe56f3b175d75b6ae8a84271dde3e28 (patch) | |
tree | 9054d389467d47a3ecaadd6662ab19a38bc027a3 /ui/app/components/send/send-constants.js | |
parent | 7362fb8dfc5b8d9f3ae9a3399f9448ea5720cd43 (diff) | |
download | tangerine-wallet-browser-c2880c4b8fe56f3b175d75b6ae8a84271dde3e28.tar.gz tangerine-wallet-browser-c2880c4b8fe56f3b175d75b6ae8a84271dde3e28.tar.zst tangerine-wallet-browser-c2880c4b8fe56f3b175d75b6ae8a84271dde3e28.zip |
Min and default gas price, limit, total; comments out code for gas slider.
Diffstat (limited to 'ui/app/components/send/send-constants.js')
-rw-r--r-- | ui/app/components/send/send-constants.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/app/components/send/send-constants.js b/ui/app/components/send/send-constants.js new file mode 100644 index 000000000..a819a8c28 --- /dev/null +++ b/ui/app/components/send/send-constants.js @@ -0,0 +1,23 @@ +const Identicon = require('../identicon') +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, { + multiplicandBase: 16, + multiplierBase: 16, +}) +const MIN_GAS_LIMIT = (21000).toString(16) +const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT, MIN_GAS_PRICE, { + toNumericBase: 'hex', + multiplicandBase: 16, + multiplierBase: 16, +}) + +module.exports = { + MIN_GAS_PRICE_GWEI, + GWEI_FACTOR, + MIN_GAS_PRICE, + MIN_GAS_LIMIT, + MIN_GAS_TOTAL, +} |