aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/customize-gas-modal/index.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-10-19 03:23:35 +0800
committerDan <danjm.com@gmail.com>2017-10-20 02:56:46 +0800
commit59015cccef72210f828b344aaedde9b8dd31be3b (patch)
tree2443b2b73639e8555cc1aca4cd757030080883e1 /ui/app/components/customize-gas-modal/index.js
parentbd11e60b8c128dd69ba1bcf58d25fa9323d91a33 (diff)
downloadtangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar.gz
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar.bz2
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar.lz
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar.xz
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.tar.zst
tangerine-wallet-browser-59015cccef72210f828b344aaedde9b8dd31be3b.zip
Min and default gas price, limit, total; comments out code for gas slider.
Diffstat (limited to 'ui/app/components/customize-gas-modal/index.js')
-rw-r--r--ui/app/components/customize-gas-modal/index.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/ui/app/components/customize-gas-modal/index.js b/ui/app/components/customize-gas-modal/index.js
index 0ba768893..744891c47 100644
--- a/ui/app/components/customize-gas-modal/index.js
+++ b/ui/app/components/customize-gas-modal/index.js
@@ -5,6 +5,11 @@ const connect = require('react-redux').connect
const actions = require('../../actions')
const GasModalCard = require('./gas-modal-card')
+const {
+ MIN_GAS_PRICE,
+ MIN_GAS_LIMIT,
+} = require('../send/send-constants')
+
const { conversionUtil, multiplyCurrencies } = require('../../conversion-util')
const {
@@ -35,8 +40,8 @@ function CustomizeGasModal (props) {
Component.call(this)
this.state = {
- gasPrice: props.gasPrice,
- gasLimit: props.gasLimit,
+ gasPrice: props.gasPrice || MIN_GAS_PRICE,
+ gasLimit: props.gasLimit || MIN_GAS_LIMIT,
}
}
@@ -115,8 +120,8 @@ CustomizeGasModal.prototype.render = function () {
h(GasModalCard, {
value: convertedGasPrice,
- min: 0,
- max: 1000,
+ min: MIN_GAS_PRICE,
+ // max: 1000,
step: 1,
onChange: value => this.convertAndSetGasPrice(value),
title: 'Gas Price',
@@ -125,8 +130,8 @@ CustomizeGasModal.prototype.render = function () {
h(GasModalCard, {
value: convertedGasLimit,
- min: 20000,
- max: 100000,
+ min: MIN_GAS_LIMIT,
+ // max: 100000,
step: 1,
onChange: value => this.convertAndSetGasLimit(value),
title: 'Gas Limit',