Uh oh!
There was an error while loading. Please reload this page.
Releases: MetaMask/core
Releases · MetaMask/core
Release list
1202.0.0
@metamask/client-utils 2.1.0
Added
- Add
stake/unstakeactivity kinds and aPerpsOrderKindtype covering every perps order kind (#9916) - Add
ActivityItemvariants for staking, prediction, and perps activity kinds that previously had no matching data shape (#9916)
Changed
- Bump
@metamask/core-backendfrom^8.1.1to^8.1.2(#9886)
1201.0.0
1200.0.0
@metamask/assets-controller 14.0.0
Changed
- BREAKING: Subscribe to
AccountTreeController:initialized/:uninitialized(typed asAccountTreeControllerInitializedEvent/AccountTreeControllerUninitializedEvent) so asset tracking starts only after the account tree is fully built, instead of on intermediateAccountTreeController:stateChangeevents duringinit()or on unlock before the tree is ready (#9892)- Hosts that restrict which events flow through the
AssetsControllermessenger must now also delegateAccountTreeController:initializedandAccountTreeController:uninitialized
- Hosts that restrict which events flow through the
- Reduce Accounts API calls on startup and refresh:
- Skip
AccountsApiDataSourcesubscribe-time initial poll after a forcedgetAssetsbalance fetch - Ignore init-time
AccountTreeController:selectedAccountGroupChange(including same-group re-emits and events before tracking starts) so:initializedowns first start; only refresh on real group switches while tracking - Skip Accounts API middleware when
dataTypesdoes not includebalance(e.g. price-only refreshes)
- Skip
- Bump
@metamask/config-registry-controllerfrom^2.0.1to^3.0.0(#9923) - Bump
@metamask/network-enablement-controllerfrom^6.0.3to^6.0.4(#9923)
@metamask/bridge-controller 79.3.0
Added
- Add Sentry quote-fetch and provider first-result performance traces (#9899)
Changed
- Bump
@metamask/assets-controllerfrom^13.1.2to^14.0.0(#9873, #9886, #9923) - Bump
@metamask/assets-controllersfrom^111.1.0to^111.1.1(#9886)
@metamask/config-registry-controller 3.0.0
Added
- Add
ConfigRegistryApiEnvenum to select the API environment for the service (#9918)
Changed
- BREAKING: The
envoptional constructor option type is nowConfigRegistryApiEnv(#9918)- Previously, constructor options were reusing the
SDK.Envenum from@metamask/profile-sync-controller.
- Previously, constructor options were reusing the
- Bump
@metamask/superstructfrom^3.1.0to^3.4.1(#9754) - Bump
@metamask/keyring-controllerfrom^27.1.0to^27.1.1(#9791)
@metamask/network-enablement-controller 6.0.4
Changed
- Bump
@metamask/transaction-controllerfrom^69.5.0to^69.5.2(#9798, #9823) - Bump
@metamask/config-registry-controllerfrom^2.0.1to^3.0.0(#9923)
@metamask/transaction-pay-controller 26.4.1
Changed
- Bump
@metamask/assets-controllerfrom^13.1.4to^14.0.0(#9923)
1199.0.0
@metamask/transaction-pay-controller 26.4.0
Changed
- The
payStrategies.relay.validationEnabledfeature flag (inconfirmations_pay_extended) is now an object{ default?: boolean; transactionTypes?: { [type in TransactionType]?: boolean } }instead of a boolean, adding per-TransactionTypeoverrides that match nested transactions (#9888)
Fixed
- Fix quote simulation for Polymarket Predict withdrawals (#9891)
1198.0.0
@metamask/perps-controller 12.1.0
Added
- Add the optional
PerpsPerformance.onControllerConstructedpost-hydration timestamp hook (#9906) - Add an explicit trace ID overload to
PerpsTracer.setMeasurement, allowing clients to target preload measurements to their named trace (#9906) - Add
PERPS_EVENT_PROPERTY.PREVIOUS_LEVERAGE(previous_leverage) for Perp UI Interactionleverage_changedevents so clients can import the Segment property key from@metamask/perps-controllerinstead of a local interim constant (#9881)
Changed
- Target market and user preload measurements to their named traces, and omit wallet addresses from user-preload trace data (#9906)
1197.0.0
@metamask/transaction-pay-controller 26.3.1
Changed
- Bump
@metamask/assets-controllerfrom^13.1.2to^13.1.4(#9873, #9886) - Bump
@metamask/transaction-controllerfrom^69.5.1to^69.5.2(#9823) - Bump
@metamask/assets-controllersfrom^111.1.0to^111.1.1(#9886)
Fixed
- Read the
stableTokensremote feature flag ingetStablecoinsinstead ofstable-tokens(#9885)
1196.0.0
@metamask/subscription-controller 8.0.0
Added
- Add multi-product and delegation-based crypto subscription types and pricing fields. (#9866)
PRODUCT_TYPES.MONEY_ACCOUNT_PLUSCRYPTO_AUTH_METHODS(erc20_approval,delegation) andCryptoAuthMethodStartErc20CryptoSubscriptionRequestandStartDelegationCryptoSubscriptionRequestPricingCardPaymentMethodandPricingCryptoPaymentMethodvariants, with optionalproductsand (crypto only)cryptoAuthMethod- Optional
ChainPaymentInfo.delegateAddress SpotTokenPaymentInfoandVaultTokenPaymentInfovariants, with optionalsources; vault shares requireaccountantAddress
Changed
- BREAKING: Model
PricingPaymentMethodas a discriminated union of card vs crypto.chainsandcryptoAuthMethodexist only on the crypto variant; narrow withtype === 'crypto'before reading them. (#9866) - BREAKING: Model
TokenPaymentInfoas a discriminated union of vault vs spot.accountantAddressis required whenisVaultShareis true and is not present on spot tokens; narrow withisVaultShare === truebefore readingaccountantAddress. (#9866) - BREAKING: Rename
startShieldSubscriptionWithCardtostartSubscriptionWithCard. (#9866)- Rename
SubscriptionController.startShieldSubscriptionWithCardtostartSubscriptionWithCard. - Rename the messenger action
SubscriptionController:startShieldSubscriptionWithCardtoSubscriptionController:startSubscriptionWithCard. - Rename the exported action type
SubscriptionControllerStartShieldSubscriptionWithCardActiontoSubscriptionControllerStartSubscriptionWithCardAction.
- Rename
- BREAKING: Rename
submitShieldSubscriptionCryptoApprovaltosubmitSubscriptionCryptoApprovaland take a request object instead of positional arguments. (#9866)- Rename
SubscriptionController.submitShieldSubscriptionCryptoApprovaltosubmitSubscriptionCryptoApproval. - Rename the messenger action
SubscriptionController:submitShieldSubscriptionCryptoApprovaltoSubscriptionController:submitSubscriptionCryptoApproval. - Rename the exported action type
SubscriptionControllerSubmitShieldSubscriptionCryptoApprovalActiontoSubscriptionControllerSubmitSubscriptionCryptoApprovalAction. - Callers pass
{ productType, txMeta, isSponsored?, rewardAccountId? }(SubmitSubscriptionCryptoApprovalRequest). - This handler is Shield ERC-20 approve only.
productTypeis typed astypeof PRODUCT_TYPES.SHIELD(notProductType);txMeta.typemust beTransactionType.shieldSubscriptionApprove. Other products should usestartSubscriptionWithCrypto.
- Rename
- BREAKING: Make
TokenPaymentInfo.conversionRateoptional. Consumers that access.conversionRate.usdwithout optional chaining will fail typecheck. (#9866) - BREAKING: Change
SubscriptionControllerState.lastSelectedPaymentMethodfromRecord<ProductType, CachedLastSelectedPaymentMethod>toPartial<Record<ProductType, CachedLastSelectedPaymentMethod>>. Product keys may be absent; consumers must handle missing entries. (#9866) - BREAKING:
SubscriptionController.cacheLastSelectedPaymentMethodnow takes a request object instead of positional arguments. (#9866)- Callers pass
{ product, paymentMethod }(CacheLastSelectedPaymentMethodRequest).
- Callers pass
- BREAKING: Model
StartCryptoSubscriptionRequestas a discriminated union of ERC-20 approval vs delegation. (#9866)- ERC-20: required
rawTransaction; optionalcryptoAuthMethod: 'erc20_approval'(the default when omitted). - Delegation: required
cryptoAuthMethod: 'delegation'anddelegationHash. - Combining or omitting both auth fields is a type error. Runtime validation in
startSubscriptionWithCryptoremains for unsound callers. - New exports:
StartErc20CryptoSubscriptionRequest,StartDelegationCryptoSubscriptionRequest.
- ERC-20: required
- Generalize subscription controller flows for multiple products: product-scoped crypto payment-method lookup, and trial requests derived from
trialPeriodDaysplustrialedProducts. (#9866) - Bump
@metamask/transaction-controllerfrom^69.5.1to^69.5.2(#9823)
@metamask/wallet 11.0.0
Changed
- BREAKING: Bump
@metamask/subscription-controllerfrom^7.0.0to^8.0.0(#9903)- Exported
DefaultActionsand root-messengerSubscriptionController:*actions pick up the 8.0.0 renames:SubscriptionController:startShieldSubscriptionWithCardis nowSubscriptionController:startSubscriptionWithCard, andSubscriptionController:submitShieldSubscriptionCryptoApprovalis nowSubscriptionController:submitSubscriptionCryptoApproval. submitSubscriptionCryptoApprovalandcacheLastSelectedPaymentMethodnow take a single request object instead of positional arguments.- Exported
DefaultState['SubscriptionController']changes:lastSelectedPaymentMethodisPartial,PricingPaymentMethodandTokenPaymentInfoare discriminated unions, andTokenPaymentInfo.conversionRateis optional. Narrow withtype === 'crypto'/isVaultShare === truebefore reading crypto- or vault-only fields.
- Exported
- Bump
@metamask/transaction-controllerfrom^69.5.1to^69.5.2(#9823)
1195.0.0
@metamask/network-connection-banner-controller 0.2.0
Changed
- BREAKING:
NetworkConnectionBannerControllerMessengernow requiresClientController:stateChangeto be delegated instead ofClientController:stateChanged(#9893) - Bump
@metamask/network-controllerfrom^35.0.0to^35.0.1(#9758) - Bump
@metamask/network-enablement-controllerfrom^6.0.1to^6.0.3(#9740, #9791) - Bump
@metamask/keyring-controllerfrom^27.1.0to^27.1.1(#9791)
1194.0.0
@metamask/account-tree-controller 8.0.0
Added
- BREAKING: Add
:{import,export}State(#9663, #9826, #9863, #9864, #9883)- The following actions must be registered on the controller's messenger:
MultichainAccountService:createMultichainAccountWallet,KeyringController:with{Controller,KeyringV2,KeyringV2Unsafe}. - This can be used to serialize/deserialize the entire account-tree state (metadata + secrets if needed).
- The
passwordis required whenever secrets are requested. - The payload is versionned and hard-coded to version 1 for now.
- The following actions must be registered on the controller's messenger:
- Add
AccountTreeController:initializedevent, emitted at the end ofinit()when the account tree is fully built and ready to consume (#9880) - Add
AccountTreeController:uninitializedevent, emitted at the end ofclearState()when the account tree has been torn down (#9880)
Changed
- Bump
@metamask/accounts-controllerfrom^39.0.7to^39.1.0(#9807) - Bump
@metamask/multichain-account-servicefrom^13.0.1to^13.0.2(#9886)
Fixed
clearStatenow resets internal mappings and resets selected account group through:selectedAccountGroupChange(#9825)- Consumers are (and were already) expected to handle
''for:selectedAccountGroupChange(which can happens during onboarding, and now, during wallet resets).
- Consumers are (and were already) expected to handle
@metamask/assets-controller 13.1.4
Changed
- Bump
@metamask/account-tree-controllerfrom^7.6.1to^8.0.0(#9886) - Bump
@metamask/assets-controllersfrom^111.1.0to^111.1.1(#9886) - Bump
@metamask/core-backendfrom^8.1.1to^8.1.2(#9886)
Fixed
- Revert
AccountsApiDataSourceforceUpdatebalance fetch cache window fromstaleTime/gcTimeof100ms back to0/0(undoes #9591) so forced refreshes truly bypass the TanStack cache instead of reusing a short-lived entry (#9870) - Fix Arc native USDC never appearing until the account receives its first deposit, by default-tracking the native asset id (
eip155:5042/slip44:5042) instead of the0x3600...ERC20 identity soassetsInfometadata is seeded up front (#9869)
@metamask/assets-controllers 111.1.1
Changed
- Bump
@metamask/transaction-controllerfrom^69.5.0to^69.5.2(#9798, #9823) - Bump
@metamask/accounts-controllerfrom^39.0.7to^39.1.0(#9807) - Bump
@metamask/account-tree-controllerfrom^7.6.1to^8.0.0(#9886) - Bump
@metamask/core-backendfrom^8.1.1to^8.1.2(#9886) - Bump
@metamask/multichain-account-servicefrom^13.0.1to^13.0.2(#9886)
Fixed
- Correct Somnia (
5031/0x13a7)'sSPOT_PRICES_SUPPORT_INFOentry incodefi-v2.tsfrom the inventedslip44:111115031placeholder toslip44:5031, now that Somnia has a real SLIP-44 registry entry (#9811)
@metamask/core-backend 8.1.2
Changed
- Bump
@metamask/account-tree-controllerfrom^7.6.0to^8.0.0(#9791, #9886) - Bump
@metamask/keyring-controllerfrom^27.1.0to^27.1.1(#9791)
@metamask/earn-controller 12.2.5
Changed
- Bump
@metamask/account-tree-controllerfrom^7.6.1to^8.0.0(#9886)
Fixed
- Avoid duplicate
refreshEarnEligibility/refreshPooledStakes/refreshLendingPositionscalls whenAccountTreeController:selectedAccountGroupChangefires with an address that was already just refreshed (e.g. immediately afterinit()during startup hydration) (#9804) - Only eagerly prefetch pooled staking data for Ethereum Mainnet on startup/network change, no longer also prefetching the Hoodi testnet by default; Hoodi remains fully supported via explicit
chainIdcalls (#9804)
@metamask/multichain-account-service 13.0.2
Changed
- Bump
@metamask/accounts-controllerfrom^39.0.7to^39.1.0(#9807)
Fixed
- Ensure providers are ready before running post-alignment (#9812)
- This prevents to lock a multichain account wallet if one of its provider is not ready yet to proceed.
- By checking this before locking the multichain account wallet, we prevent potential deadlocks.
1193.0.0
@metamask/perps-controller 12.0.0
Added
- BREAKING: Add
ordersSideFilter,ordersSortField, andordersSortDirectionto the flatProLayoutPreferencesobject (defaults'all','time','desc') so Pro Orders panel side-filter and sort preferences persist independently of Positions across markets and app restarts via the existinggetProLayoutPreferences()/setProLayoutPreferences(patch)API; exportProOrdersSideFilter,ProOrdersSortField, andProOrdersSortDirection(#9862)- Consumers that construct a full
ProLayoutPreferencesobject (instead of usingDEFAULT_PRO_LAYOUT_PREFERENCES, the getter, or the patch setter) must include the new fields. Persisted state that predates them remains valid at runtime because the getter/selector merge over defaults. - Orders side filter (
all|long|short) is independent ofpositionsSideFilter. Orders sort fields areorderValue|size|price|time.
- Consumers that construct a full
- Add
PERPS_EVENT_PROPERTY.PERPS_MODE(perps_mode) for Lite/Pro interface mode analytics ('lite' | 'pro'), distinct from existingPERPS_EVENT_PROPERTY.MODE(mode) which is search intent (discovery/intent/browse) (#9819) - BREAKING: Add
positionsSideFilter,positionsSortField, andpositionsSortDirectionto the flatProLayoutPreferencesobject (defaults'all','positionValue','desc') so Pro Positions/Orders panel sort and side-filter preferences persist across markets and app restarts via the existinggetProLayoutPreferences()/setProLayoutPreferences(patch)API; exportProPositionsSideFilter,ProPositionsSortField, andProPositionsSortDirection(#9838)- Consumers that construct a full
ProLayoutPreferencesobject (instead of usingDEFAULT_PRO_LAYOUT_PREFERENCES, the getter, or the patch setter) must include the new fields. Persisted state that predates them remains valid at runtime because the getter/selector merge over defaults.
- Consumers that construct a full
- BREAKING: Add strategy placement order types to
OrderType:twap,scale, andchase, placeable throughplaceOrderalongside the existingmarket,limit, and trigger types (#9832)OrderTypeis a wider union again, so — exactly as for the trigger types added in 11.0.0 — any consumer signature that narrows it back to a smaller set no longer accepts a value typedOrderType. Such signatures must widen toOrderTypeor narrow explicitly at the call site.- A strategy placement expands one request into an execution schedule rather than a single resting order, so
OrderResult.orderIdcarries a handle — a venue TWAP id, or a client-generated group/session id — rather than an exchange order id. Its documentation says so; the individual exchange ids are inchildOrderIds. twapslices the size overOrderParams.twapDurationwhole minutes, optionally randomizing slice timing withOrderParams.twapRandomize. On HyperLiquid it is submitted through the venue's own TWAP action, not the order book, andHYPERLIQUID_TWAP_LIMITSbounds the window to 5–1440 minutes.scalefans outOrderParams.scaleNumOrderslimit orders on an inclusive price ladder betweenOrderParams.scaleMinPriceandOrderParams.scaleMaxPrice, submitted as a single batch. Sizes are split in whole units of the asset's size grid, so the rungs sum to exactly the submitted size. The batch is not atomic — the venue can rest some rungs and reject others — soOrderResult.submittedSizereports only the rungs that actually rested.- The venue applies its minimum order value to what it receives, not to the strategy total: a
scaleladder's notional must leave every submitted rung above the per-order minimum, and atwap's total must clear the venue's own minimum TWAP size (HYPERLIQUID_TWAP_LIMITS.MinNotionalUsd). Both are rejected locally rather than by the exchange. The ladder check needs the asset's size grid, so it runs during placement — before anything is signed — rather than invalidateOrder, which cannot see the grid and could only guess. - A
chaseverifies its order is still live whenever its own price stops showing on the book, so an order that fills without the loop noticing ends the session and releases its concurrency slot instead of holding both until the window closes. - A
chaseinterrupted bydisconnectresolves as a failure withORDER_CHASE_ABANDONEDrather than a success, because no strategy is running behind it. Interrupted anywhere before its submission it signs nothing at all. Interrupted while that submission is in flight — the one window it cannot check ahead of — it tries to take the order back before returning, through the client it signed with rather than one asked for after the teardown, so an account switch cannot strand it. That attempt is best-effort: the venue can refuse the cancel, and the transport underneath the client may already be closing. When it does not take, the order is reported inOrderResult.childOrderIds, where the ordinary single-order cancel can still reach it for as long as the provider signs as the account that placed it. chaseprices against a book with every chase this provider is running on that side netted out, not only its own order. Two chases each netting only themselves would read the other as the external touch and improve on it in turn, walking each other across an unchanged market. Resting inside the spread makes the chase its own best bid or ask, so reading the raw book would show its own quote as the touch and stop it re-pricing.- At most
CHASE_ORDER_CONFIG.MaxActiveSessionschases run at once, matching the venue's documented cap; a further placement is refused withORDER_CHASE_LIMIT_REACHEDbefore any signing setup or leverage change, and a placement reserves its slot for the round trips before its session registers so concurrent placements cannot overshoot. chasere-prices by cancelling and re-placing, and sizes each replacement from what the cancelled order left unfilled — read after the cancel has landed, when no further fill can reach it — so a child that partially filled is not re-placed at the original size.chaserests a post-only order one tick inside the spread — above the best bid for a buy, below the best ask for a sell, joining the touch when the spread is a single tick — and re-prices it as the touch moves, bounded byOrderParams.chaseIntervalMs,OrderParams.chaseMaxDurationMs, andOrderParams.chaseMaxRepricings(see the newly exportedCHASE_ORDER_CONFIGfor the defaults). No supported venue exposes a native chase action, so it is emulated client-side; the re-pricing loop is stopped bycancelOrderand bydisconnect.- The params model stays provider-agnostic: no protocol vocabulary appears in
OrderParams, so a second provider can map the same fields onto its own execution primitives.
- BREAKING: Narrow
CalculateOrderPriceAndSizeParams.orderTypeandBuildOrdersArrayParams.orderTypeto the newOrdinaryOrderType(Exclude<OrderType, StrategyOrderType>) (#9832)- These helpers resolve a single order the exchange can be handed directly. A strategy placement derives its own prices and sizes and never reaches them; passing one would price a
chaseas a limit order it carries no price for, and serialize atwaporscaleas an ordinary market order.
- These helpers resolve a single order the exchange can be handed directly. A strategy placement derives its own prices and sizes and never reaches them; passing one would price a
- BREAKING: Narrow
ClosePositionParams.orderTypetoExclude<OrderType, StrategyOrderType>(#9832)closePositionhas no path that executes a strategy placement andClosePositionParamscarries none of the fields one needs, so the strategy types are refused at the type level rather than at runtime. A consumer passing a value typedOrderTypeinto this field must narrow it at the call site.
- BREAKING: Add nineteen
PERPS_ERROR_CODESentries covering strategy placement, editing and cancellation:ORDER_STRATEGY_PARAMS_NOT_SUPPORTED,ORDER_STRATEGY_FIELD_UNSUPPORTED,ORDER_STRATEGY_MARKET_UNSUPPORTED,ORDER_STRATEGY_HANDLE_UNKNOWN,ORDER_STRATEGY_CANCEL_INCOMPLETE,ORDER_EDIT_STRATEGY_UNSUPPORTED,ORDER_TWAP_DURATION_REQUIRED,ORDER_TWAP_DURATION_INVALID,ORDER_TWAP_NOTIONAL_TOO_SMALL,ORDER_SCALE_RANGE_REQUIRED,ORDER_SCALE_RANGE_INVALID,ORDER_SCALE_COUNT_INVALID,ORDER_SCALE_SIZE_TOO_SMALL,ORDER_SCALE_NOTIONAL_TOO_SMALL,ORDER_CHASE_INTERVAL_INVALID,ORDER_CHASE_DURATION_INVALID,ORDER_CHASE_LIMIT_REACHED,ORDER_CHASE_ABANDONED, andORDER_CHASE_TOUCH_UNAVAILABLE(#9832)- Like
EXCHANGE_ACCOUNT_NOT_FOUNDand the multi-sig codes in 11.0.0, this widens the exportedPerpsErrorCodeunion, so consumers that key an exhaustiveRecord<PerpsErrorCode, …>stop compiling until they add an entry for every new code. Both first-party clients do: Mobile'sapp/components/UI/Perps/utils/translatePerpsError.tsand Extension'sui/components/app/perps/utils/translate-perps-error.ts. - These cover the rejections this package decides for itself: each is a typed code rather than an opaque exchange error, and none of them reaches the venue as a signed request. Most are decided before any request at all. The exceptions are the ladder's
ORDER_SCALE_SIZE_TOO_SMALLandORDER_SCALE_NOTIONAL_TOO_SMALL, which need the asset's size precision and so follow one read of its metadata, andORDER_CHASE_TOUCH_UNAVAILABLE, which follows the order-book read — all still before anything is signed. A submission the venue itself rejects is not among them: as for an ordinary order, that surfaces through the provider's existing error mapping carrying the venue's own message.ORDER_STRATEGY_CANCEL_INCOMPLETEandORDER_CHASE_ABANDONEDdescribe what happened after...
- Like