Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default advanced tab gas limit #7379

Merged
merged 2 commits into from
Nov 11, 2019
Merged

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Nov 10, 2019

  • 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.

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.
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.
@metamaskbot
Copy link
Collaborator

Builds ready [459c211]

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another good fix, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants