-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(runway): cherry-pick feat: gas station support for metamask pay deposits #23078
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
Conversation
## **Description** Support EIP-7702 gas station when depositing with MetaMask Pay. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: [#6150](MetaMask/MetaMask-planning#6150) ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds gas fee token awareness to insufficient balance alerts, simplifies available token selection logic, delegates getGasFeeTokens, and upgrades transaction-pay-controller to v10. > > - **Confirmations / Alerts**: > - Consider `fees.isSourceGasFeeToken` in fee/amount calculations and source network checks within `useInsufficientPayTokenBalanceAlert`. > - Add tests covering gas fee token scenarios and adjust mocks accordingly. > - **Utils (`transaction-pay`)**: > - Simplify `getAvailableTokens`: remove "no native gas" disablement and related i18n; return tokens based on balance/selection/required status only. > - Update tests to drop disabled-message case. > - **Engine / Messenger**: > - Delegate `TransactionController:getGasFeeTokens` to the Transaction Pay controller messenger. > - **Dependencies**: > - Bump `@metamask/transaction-pay-controller` to `^10.0.0` (lockfile updated). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5a0d198. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsFallback: AI analysis did not complete successfully. Running all tests. |
|
|
No release label on PR. Adding release label release-7.60.0 on PR, as PR was cherry-picked in branch 7.60.0. |



Description
Support EIP-7702 gas station when depositing with MetaMask Pay.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
#6150
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Adds gas-fee token support to pay balance/fee checks, delegates getGasFeeTokens, updates transaction-pay-controller to v10, and removes "no gas" token disabling logic.
fees.isSourceGasFeeTokeninuseInsufficientPayTokenBalanceAlertto include source network fees in totals when using a gas-fee token, and skip native-fee insufficiency in that case.getAvailableTokensby removing native-gas dependency and disabling logic; no longer setsdisabled/disabledMessage.TransactionController:getGasFeeTokensto Transaction Pay controller messenger.@metamask/transaction-pay-controllerto^10.0.0.Written by Cursor Bugbot for commit eac80ae. This will update automatically on new commits. Configure here.
b5472e1