fix(multichain-account-service): add missing name class field - #6173
Merged
Merged
Conversation
ccharly
force-pushed
the
fix/missing-service-name
branch
from
July 23, 2025 12:02
78a3437 to
35cd5a9
Compare
ccharly
force-pushed
the
fix/missing-service-name
branch
from
July 23, 2025 12:02
35cd5a9 to
902c2b8
Compare
name class field
ccharly
marked this pull request as ready for review
July 23, 2025 12:02
gantunesr
approved these changes
Jul 23, 2025
PatrykLucka
approved these changes
Jul 23, 2025
ccharly
enabled auto-merge (squash)
July 23, 2025 12:05
matthewwalsh0
added a commit
that referenced
this pull request
Nov 13, 2025
## Explanation Support providing `gasFeeToken` when adding a transaction or transaction batch. ## References Related to [#6173](MetaMask/MetaMask-planning#6173) ## 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/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds optional gas fee token support to transaction APIs and validates/removes it before publish based on native balance, with supporting balance utilities and tests. > > - **API/Types**: > - Add optional `gasFeeToken` to `addTransaction` and `addTransactionBatch`. > - Extend `TransactionMeta` with `isGasFeeTokenIgnoredIfBalance`; initialize `selectedGasFeeToken` and flag on add. > - **Publish Flow**: > - New `checkGasFeeTokenBeforePublish` ensures native balance sufficiency; unsets `selectedGasFeeToken` and clears `isExternalSign` if native balance covers gas; fetches tokens if missing; throws if invalid selection. > - Refactor `TransactionController` to call this check and add `#getGasFeeTokens` helper. > - **Utils**: > - Add `balance` module (`getNativeBalance`, `isNativeBalanceSufficientForGas`) using `bignumber.js`; use it in `balance-changes`. > - Enhance `gas-fee-tokens` to build auth lists and parse sponsorship; add tests. > - **Batch**: > - Pass `gasFeeToken` through `addTransactionBatch` path. > - **Misc**: > - Update tests; lower Jest function coverage threshold; add `bignumber.js` dependency; update changelog. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2ffc7e8568047a11bb61a39257c77363b9ed382f. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
This
.nameis required by the controller-init pattern on our clients, see:References
N/A
Changelog
N/A
Checklist