fix: patch transaction controller in mobile to add fallback gas estimation#8707
Merged
Conversation
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. |
dbrans
commented
Feb 23, 2024
dbrans
commented
Feb 23, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8707 +/- ##
==========================================
- Coverage 41.47% 41.47% -0.01%
==========================================
Files 1263 1263
Lines 30605 30610 +5
Branches 3008 3008
==========================================
Hits 12694 12694
- Misses 17157 17162 +5
Partials 754 754 ☔ View full report in Codecov by Sentry. |
2a1497e to
9129af9
Compare
Contributor
|
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b78aac18-4200-43ae-8910-1df7228a47bc |
|
matthewwalsh0
approved these changes
Feb 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Description
Diff in core repo corresponding to this patch: MetaMask/core@0c09517
This patches transaction-controller 6.1.0, introducing a fallback for gas estimations. In cases of failed gas estimation, the transaction will default to using 95% of the latest block gas limit. This ensures that transactions have viable gas.
Previously, if gas estimation for a transaction failed (for example, due to the transaction being reverted), the gasHex value would remain undefined. This issue led to the transaction being assigned zero gas, causing it to be submitted to the mempool where it would get "stuck".
This change is specific to version 6.1.0 of the transaction-controller. Later versions of the TransactionController include this fix.
Related issues
Fixes: #8533
Manual testing steps
Transaction should submit and fail... but not get stuck in "submitted" state as in #8533.
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist