-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: patch transaction controller in mobile to add fallback gas estimation #8707
Conversation
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. |
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
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b78aac18-4200-43ae-8910-1df7228a47bc |
|
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