1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Add max gas limit to UI

This commit is contained in:
Kevin Serrano 2017-05-24 16:18:37 -07:00
parent 26fd016b63
commit 51b5e2f6e7
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -47,6 +47,7 @@ PendingTx.prototype.render = function () {
// Gas
const gas = txParams.gas
const gasBn = hexToBn(gas)
const safeGasLimit = parseInt(txMeta.blockGasLimit)
// Gas Price
const gasPrice = txParams.gasPrice || MIN_GAS_PRICE_BN.toString(16)
@ -159,6 +160,7 @@ PendingTx.prototype.render = function () {
scale: 0,
// The hard lower limit for gas.
min: MIN_GAS_LIMIT_BN.toString(10),
max: safeGasLimit,
suffix: 'UNITS',
style: {
position: 'relative',