Skip to content

Commit

Permalink
Set default gas limit to minimum allowed
Browse files Browse the repository at this point in the history
A transaction initiated from a dapp might not set a gas limit, which
would result in a default of zero being used in the advanced tab. The
default gas limit in that case has been changed to 21,000, the minimum
allowed gas limit, so that users aren't forced to manually update it.
  • Loading branch information
Gudahtt committed Nov 10, 2019
1 parent 6208882 commit 459c211
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const mapStateToProps = (state, ownProps) => {

const { gasPrice: currentGasPrice, gas: currentGasLimit, value } = getTxParams(state, selectedTransaction)
const customModalGasPriceInHex = getCustomGasPrice(state) || currentGasPrice
const customModalGasLimitInHex = getCustomGasLimit(state) || currentGasLimit
const customModalGasLimitInHex = getCustomGasLimit(state) || currentGasLimit || '0x5208'
const customGasTotal = calcGasTotal(customModalGasLimitInHex, customModalGasPriceInHex)

const gasButtonInfo = getRenderableBasicEstimateData(state, customModalGasLimitInHex)
Expand Down

0 comments on commit 459c211

Please sign in to comment.