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

Dont default gas limit in gas popover when non is available on transaction params #11872

Merged
merged 2 commits into from
Aug 18, 2021

Conversation

danjm
Copy link
Contributor

@danjm danjm commented Aug 18, 2021

This PR removes the default value for gas limit in our gas editing popover. This case will only occur if no gas limit was suggested by a dapp, and calls to eth_estimateGas have failed not due to a simulation error, but a network failure. This would happen if the user is disconnected from the internet, or there is a failure connecting to the provider. In such a case, defaulting to 0 is safe because it requires the user to be intentional about the gas limit.

@danjm danjm requested a review from a team as a code owner August 18, 2021 08:09
@danjm danjm requested a review from ryanml August 18, 2021 08:09
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [a4a091d]
Page Load Metrics (703 ± 38 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint56886994
domContentLoaded6138707027838
load6148717037838
domInteractive6138697017837

Copy link
Contributor

@tmashuang tmashuang left a comment

Choose a reason for hiding this comment

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

LGTM as it stands. There are cases where the gas limit will be provided by a dapp, and if the gas api/eth_gasPrice is sluggish or down altogether, there will not be an error on the confirm tx screen which users might question as to why they won't be able to confirm the proposed tx.

@ryanml ryanml merged commit 05fa796 into develop Aug 18, 2021
@ryanml ryanml deleted the gas-popover-limit-default branch August 18, 2021 09:54
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants