[pull] main from MetaMask:main#584
Merged
Merged
Conversation
## What changed - Renamed the Relay execute feature flag in `transaction-pay-controller` from `gaslessEnabled` to `isGaslessEnabled`. - Updated feature flag tests to use the new key for both enabled and disabled cases. - Added an Unreleased changelog entry referencing this PR. ## Why This separates the new gasless toggle from the prior release flag so rollout can use one flag up to a given release and another flag starting with this release. ## Validation - `yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/utils/feature-flags.test.ts` - `yarn workspace @metamask/transaction-pay-controller run test` - `yarn workspace @metamask/transaction-pay-controller run changelog:validate` - `yarn build` - `yarn lint` Note: `yarn validate:changelog` is not defined at the repo root in this checkout, so I used the package changelog validation script. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: this is a straightforward rename of a remote feature-flag key used to gate Relay `/execute` gasless behavior, with tests updated accordingly. Main risk is rollout/config mismatch if any clients or flag payloads still send `gaslessEnabled`. > > **Overview** > Renames the Relay gasless execution remote feature flag key from `gaslessEnabled` to `isGaslessEnabled` and updates `isRelayExecuteEnabled` (and its `PayStrategiesConfigRaw` typing) to read the new key. > > Updates unit tests to assert the new flag name and adds an Unreleased changelog entry documenting the rename. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f79da17. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Summary This is PR 3 of 4 in the core stack for Predict withdraws over Across. - Prepends the original Predict withdraw transaction when submitting post-quote Across flows. - Uses `TransactionType.predictAcrossWithdraw` for the Across deposit leg. - Forces 7702 batch submission when the parent withdraw transaction already has an authorization list. - Estimates final 7702 submit gas when the submit-time batch shape differs from the quote-time batch shape. - Moves original transaction gas parsing into a shared Across helper used by quote and submit paths. ## Stack 1. #8759: plumbing to identify Predict Across withdraws 2. #8760: quote support 3. This PR: submit support 4. #8762: gas payment edge cases ## Validation - `yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/strategy/across/across-submit.test.ts src/strategy/across/across-quotes.test.ts src/strategy/across/AcrossStrategy.test.ts` - Full stack validation was run on the final stacked branch: - `yarn changelog:validate` - `yarn workspace @metamask/transaction-pay-controller run test` - `yarn workspace @metamask/transaction-controller run test` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Modifies Across submission logic for post-quote flows, including 7702 batch handling and gas estimation, which can impact how transactions are constructed and sent on-chain. > > **Overview** > Adds Across *submit-time* support for post-quote Predict withdraws by optionally prepending the original user transaction to the submitted payload and mapping the bridge leg to `TransactionType.predictAcrossWithdraw`. > > Updates 7702 handling to force batch submission when needed (quoted combined gas limit, parent `authorizationList`, or gas-fee-token post-quote Predict withdraw), and can estimate a final `gasLimit7702` via `TransactionController:estimateGasBatch` with feature-flag gas buffer when the quoted batch shape doesn’t match the actual submit shape. > > Passes `gasFeeToken` plus `excludeNativeTokenForFee` through to single and batch submits, expands tests around these scenarios, and moves original-transaction gas parsing into a shared helper (`getOriginalTransactionGas`) reused by both quote and submit paths. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit df05cc8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Explanation This PR updates notification setup so clients can separate enabling MetaMask notifications from registering for push notifications. Previously, `createOnChainTriggers` and `enableMetamaskNotifications` always attempted FCM/device push registration as part of enabling notifications. Mobile clients need to be able to enable notification preferences without immediately triggering push registration, since OS push permission and FCM registration may happen through a separate native flow. This PR adds a `registerPushNotifications` option to the notification enablement options. It defaults to `true` to preserve existing behavior, but clients can pass `false` to skip push registration while still enabling MetaMask notifications and initializing notification preferences. This PR also adds optional `os` and `appVersion` metadata to push token registration requests. These values are forwarded to the backend when registering push tokens so Firebase errors can be attributed more precisely by mobile OS and app version. Other updates: - Added and updated tests for the new push registration opt-out behavior. - Updated JSDoc and generated messenger action types. - Updated the package changelog. ## References https://consensyssoftware.atlassian.net/browse/GE-217 https://consensyssoftware.atlassian.net/browse/GE-211 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> New minor release for core-backend. Preview with changes here: MetaMask/metamask-mobile#29739 ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk release bookkeeping: updates package versions/changelogs and bumps `@metamask/core-backend` dependency ranges without changing runtime code in this PR. > > **Overview** > Bumps the monorepo version to `984.0.0` and publishes `@metamask/core-backend@6.3.0` (updating its changelog and compare links). > > Updates `@metamask/assets-controller`, `@metamask/assets-controllers`, and `@metamask/transaction-controller` to depend on `@metamask/core-backend@^6.3.0`, with corresponding changelog entries and `yarn.lock` refresh. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1b7bb1a. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## What changed - Moved the Relay execute toggle to `confirmations_pay_extended.payStrategies.relay.gaslessEnabled`. - Renamed the flag back to `gaslessEnabled` and removed transaction-pay-controller source/test references to `isGaslessEnabled`. - Updated feature flag tests for the new remote flag namespace. - Updated the transaction-pay-controller changelog entry to reference this PR. ## Why This keeps `confirmations_pay` available for the existing release-scoped flag while allowing the new release behavior to be controlled from `confirmations_pay_extended`. ## Validation - `yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/utils/feature-flags.test.ts` - `yarn workspace @metamask/transaction-pay-controller run test` - `yarn workspace @metamask/transaction-pay-controller run changelog:validate` - `yarn build` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Medium risk because it changes the remote feature-flag lookup path/name that gates the Relay `/execute` gasless flow; misconfiguration could unintentionally enable/disable gasless execution. > > **Overview** > Updates the Relay gasless execute toggle to read from `remoteFeatureFlags.confirmations_pay_extended.payStrategies.relay.gaslessEnabled` (renaming from `isGaslessEnabled` and removing the old `confirmations_pay` location). > > Adjusts `isRelayExecuteEnabled` unit tests to match the new namespace/key, and updates the changelog to document the flag move. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9b57908. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Explanation <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> Currently, all non-evm tokens are being stored as 'erc20', which is wrong. It is not causing any issues in the client, but needs to be corrected. This fixes it. <img width="735" height="427" alt="image" src="https://github.com/user-attachments/assets/bfb7b917-fec4-4689-81cb-29315de2be5e" /> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Adjusts asset-type classification logic used to populate `assetsInfo`, which could affect downstream rendering/formatting for non-EVM assets if CAIP-19 parsing assumptions are wrong, but scope is limited and covered by updated unit tests. > > **Overview** > Fixes incorrect `assetsInfo.type` classification for non-EVM assets by treating any CAIP-19 `*/slip44:*` identifier as `native` (not `erc20`), and by recognizing Solana SPL tokens as `spl` when the chain namespace is Solana and the asset namespace is `token`. > > Updates both the token-metadata transform (`TokenDataSource`) and the `addCustomAsset` pending-metadata path (`AssetsController`) to use the same namespace-aware rules, exports the shared `CaipAssetNamespace` enum, and refreshes docs/tests (including switching examples/fixtures from `solana:.../spl:` to `solana:.../token:`). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fe92f4b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Minor release of `@metamask/transaction-pay-controller`. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > This is a version/changelog-only release bump with no functional code changes in the diff. > > **Overview** > Updates release metadata by bumping the root `package.json` version to `985.0.0` and `@metamask/transaction-pay-controller` to `22.5.0`. > > Adds a `22.5.0` section to `transaction-pay-controller`’s `CHANGELOG.md` and updates the compare links for the new release. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9c69734. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )