Set default advanced tab gas limit #7379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set default advanced tab gas limit
The advanced tab of the transaction confirmation screen would enter into an infinite loop and crash if the given gas price was falsy and some interaction was made with the gas limit field.
To prevent this infinite loop, a default value of 0 has been set. The user will still need to update the gas limit in order to confirm the transaction, as zero is too low a gas limit (the lowest is 21000). 21000 cannot be the default gas limit at this layer, because the limit used is from a layer above this, which wouldn't have that same 21000 set.
Set default gas limit to minimum allowed
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.