diff options
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/bn-as-decimal-input.js | 14 | ||||
-rw-r--r-- | ui/app/components/pending-tx.js | 10 |
2 files changed, 13 insertions, 11 deletions
diff --git a/ui/app/components/bn-as-decimal-input.js b/ui/app/components/bn-as-decimal-input.js index d84834d06..db5af1f46 100644 --- a/ui/app/components/bn-as-decimal-input.js +++ b/ui/app/components/bn-as-decimal-input.js @@ -31,6 +31,8 @@ BnAsDecimalInput.prototype.render = function () { const suffix = props.suffix const style = props.style const valueString = value.toString(10) + const newMin = min && this.downsize(min.toString(10), scale) + const newMax = max && this.downsize(max.toString(10), scale) const newValue = this.downsize(valueString, scale) return ( @@ -47,8 +49,8 @@ BnAsDecimalInput.prototype.render = function () { type: 'number', step: 'any', required: true, - min, - max, + min: newMin, + max: newMax, style: extend({ display: 'block', textAlign: 'right', @@ -128,15 +130,15 @@ BnAsDecimalInput.prototype.updateValidity = function (event) { } BnAsDecimalInput.prototype.constructWarning = function () { - const { name, min, max } = this.props + const { name, min, max, scale } = this.props let message = name ? name + ' ' : '' if (min && max) { - message += `must be greater than or equal to ${min} and less than or equal to ${max}.` + message += `must be greater than or equal to ${this.downsize(min.toString(10), scale)} and less than or equal to ${this.downsize(max.toString(10), scale)}.` } else if (min) { - message += `must be greater than or equal to ${min}.` + message += `must be greater than or equal to ${this.downsize(min.toString(10), scale)}.` } else if (max) { - message += `must be less than or equal to ${max}.` + message += `must be less than or equal to ${this.downsize(max.toString(10), scale)}.` } else { message += 'Invalid input.' } diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 6a657d81e..79323d6eb 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -57,7 +57,7 @@ PendingTx.prototype.render = function () { const safeGasLimit = safeGasLimitBN.toString(10) // Gas Price - const gasPrice = txParams.gasPrice || MIN_GAS_PRICE_BN.toString(16) + const gasPrice = txParams.gasPrice || MIN_GAS_PRICE_BN.toString(10) const gasPriceBn = hexToBn(gasPrice) const txFeeBn = gasBn.mul(gasPriceBn) @@ -197,10 +197,10 @@ PendingTx.prototype.render = function () { h(BNInput, { name: 'Gas Price', value: gasPriceBn, - precision: 6, - scale: 6, - suffix: 'MWEI', - min: MIN_GAS_PRICE_MWEI_BN.toString(10), + precision: 9, + scale: 9, + suffix: 'GWEI', + min: MIN_GAS_PRICE_BN.toString(10), style: { position: 'relative', top: '5px', |