Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: patch transaction controller in mobile to add fallback gas estim…
…ation (#8707) ## **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. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Related issues** Fixes: #8533 ## **Manual testing steps** 1. Go to https://mmsdk-polygon-swap.vercel.app/ 2. Add Polygon chain and switch to network 3. Click "Send Transaction" 4. Try again if you get a JSON-RPC error (unrelated issue) Transaction should submit and fail... but not get stuck in "submitted" state as in #8533. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've clearly explained what problem this PR is solving and how it is solved. - [ ] I've linked related issues - [ ] I've included manual testing steps - [ ] I've included screenshots/recordings if applicable - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- Loading branch information