Skip to content

Releases: MetaMask/core

1196.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Aug 09:47
2dc9a68

@metamask/subscription-controller 8.0.0

Added

  • Add multi-product and delegation-based crypto subscription types and pricing fields. (#9866)
    • PRODUCT_TYPES.MONEY_ACCOUNT_PLUS
    • CRYPTO_AUTH_METHODS (erc20_approval, delegation) and CryptoAuthMethod
    • StartErc20CryptoSubscriptionRequest and StartDelegationCryptoSubscriptionRequest
    • PricingCardPaymentMethod and PricingCryptoPaymentMethod variants, with optional products and (crypto only) cryptoAuthMethod
    • Optional ChainPaymentInfo.delegateAddress
    • SpotTokenPaymentInfo and VaultTokenPaymentInfo variants, with optional sources; vault shares require accountantAddress

Changed

  • BREAKING: Model PricingPaymentMethod as a discriminated union of card vs crypto. chains and cryptoAuthMethod exist only on the crypto variant; narrow with type === 'crypto' before reading them. (#9866)
  • BREAKING: Model TokenPaymentInfo as a discriminated union of vault vs spot. accountantAddress is required when isVaultShare is true and is not present on spot tokens; narrow with isVaultShare === true before reading accountantAddress. (#9866)
  • BREAKING: Rename startShieldSubscriptionWithCard to startSubscriptionWithCard. (#9866)
    • Rename SubscriptionController.startShieldSubscriptionWithCard to startSubscriptionWithCard.
    • Rename the messenger action SubscriptionController:startShieldSubscriptionWithCard to SubscriptionController:startSubscriptionWithCard.
    • Rename the exported action type SubscriptionControllerStartShieldSubscriptionWithCardAction to SubscriptionControllerStartSubscriptionWithCardAction.
  • BREAKING: Rename submitShieldSubscriptionCryptoApproval to submitSubscriptionCryptoApproval and take a request object instead of positional arguments. (#9866)
    • Rename SubscriptionController.submitShieldSubscriptionCryptoApproval to submitSubscriptionCryptoApproval.
    • Rename the messenger action SubscriptionController:submitShieldSubscriptionCryptoApproval to SubscriptionController:submitSubscriptionCryptoApproval.
    • Rename the exported action type SubscriptionControllerSubmitShieldSubscriptionCryptoApprovalAction to SubscriptionControllerSubmitSubscriptionCryptoApprovalAction.
    • Callers pass { productType, txMeta, isSponsored?, rewardAccountId? } (SubmitSubscriptionCryptoApprovalRequest).
    • This handler is Shield ERC-20 approve only. productType is typed as typeof PRODUCT_TYPES.SHIELD (not ProductType); txMeta.type must be TransactionType.shieldSubscriptionApprove. Other products should use startSubscriptionWithCrypto.
  • BREAKING: Make TokenPaymentInfo.conversionRate optional. Consumers that access .conversionRate.usd without optional chaining will fail typecheck. (#9866)
  • BREAKING: Change SubscriptionControllerState.lastSelectedPaymentMethod from Record<ProductType, CachedLastSelectedPaymentMethod> to Partial<Record<ProductType, CachedLastSelectedPaymentMethod>>. Product keys may be absent; consumers must handle missing entries. (#9866)
  • BREAKING: SubscriptionController.cacheLastSelectedPaymentMethod now takes a request object instead of positional arguments. (#9866)
    • Callers pass { product, paymentMethod } (CacheLastSelectedPaymentMethodRequest).
  • BREAKING: Model StartCryptoSubscriptionRequest as a discriminated union of ERC-20 approval vs delegation. (#9866)
    • ERC-20: required rawTransaction; optional cryptoAuthMethod: 'erc20_approval' (the default when omitted).
    • Delegation: required cryptoAuthMethod: 'delegation' and delegationHash.
    • Combining or omitting both auth fields is a type error. Runtime validation in startSubscriptionWithCrypto remains for unsound callers.
    • New exports: StartErc20CryptoSubscriptionRequest, StartDelegationCryptoSubscriptionRequest.
  • Generalize subscription controller flows for multiple products: product-scoped crypto payment-method lookup, and trial requests derived from trialPeriodDays plus trialedProducts. (#9866)
  • Bump @metamask/transaction-controller from ^69.5.1 to ^69.5.2 (#9823)

@metamask/wallet 11.0.0

Changed

  • BREAKING: Bump @metamask/subscription-controller from ^7.0.0 to ^8.0.0 (#9903)
    • Exported DefaultActions and root-messenger SubscriptionController:* actions pick up the 8.0.0 renames: SubscriptionController:startShieldSubscriptionWithCard is now SubscriptionController:startSubscriptionWithCard, and SubscriptionController:submitShieldSubscriptionCryptoApproval is now SubscriptionController:submitSubscriptionCryptoApproval.
    • submitSubscriptionCryptoApproval and cacheLastSelectedPaymentMethod now take a single request object instead of positional arguments.
    • Exported DefaultState['SubscriptionController'] changes: lastSelectedPaymentMethod is Partial, PricingPaymentMethod and TokenPaymentInfo are discriminated unions, and TokenPaymentInfo.conversionRate is optional. Narrow with type === 'crypto' / isVaultShare === true before reading crypto- or vault-only fields.
  • Bump @metamask/transaction-controller from ^69.5.1 to ^69.5.2 (#9823)

1195.0.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 10:31
ecf4e9d

@metamask/network-connection-banner-controller 0.2.0

Changed

  • BREAKING: NetworkConnectionBannerControllerMessenger now requires ClientController:stateChange to be delegated instead of ClientController:stateChanged (#9893)
  • Bump @metamask/network-controller from ^35.0.0 to ^35.0.1 (#9758)
  • Bump @metamask/network-enablement-controller from ^6.0.1 to ^6.0.3 (#9740, #9791)
  • Bump @metamask/keyring-controller from ^27.1.0 to ^27.1.1 (#9791)

1194.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 16:50
f4ff5f5

@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 password is required whenever secrets are requested.
    • The payload is versionned and hard-coded to version 1 for now.
  • Add AccountTreeController:initialized event, emitted at the end of init() when the account tree is fully built and ready to consume (#9880)
  • Add AccountTreeController:uninitialized event, emitted at the end of clearState() when the account tree has been torn down (#9880)

Changed

  • Bump @metamask/accounts-controller from ^39.0.7 to ^39.1.0 (#9807)
  • Bump @metamask/multichain-account-service from ^13.0.1 to ^13.0.2 (#9886)

Fixed

  • clearState now 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).

@metamask/assets-controller 13.1.4

Changed

  • Bump @metamask/account-tree-controller from ^7.6.1 to ^8.0.0 (#9886)
  • Bump @metamask/assets-controllers from ^111.1.0 to ^111.1.1 (#9886)
  • Bump @metamask/core-backend from ^8.1.1 to ^8.1.2 (#9886)

Fixed

  • Revert AccountsApiDataSource forceUpdate balance fetch cache window from staleTime/gcTime of 100ms back to 0/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 the 0x3600... ERC20 identity so assetsInfo metadata is seeded up front (#9869)

@metamask/assets-controllers 111.1.1

Changed

  • Bump @metamask/transaction-controller from ^69.5.0 to ^69.5.2 (#9798, #9823)
  • Bump @metamask/accounts-controller from ^39.0.7 to ^39.1.0 (#9807)
  • Bump @metamask/account-tree-controller from ^7.6.1 to ^8.0.0 (#9886)
  • Bump @metamask/core-backend from ^8.1.1 to ^8.1.2 (#9886)
  • Bump @metamask/multichain-account-service from ^13.0.1 to ^13.0.2 (#9886)

Fixed

  • Correct Somnia (5031/0x13a7)'s SPOT_PRICES_SUPPORT_INFO entry in codefi-v2.ts from the invented slip44:111115031 placeholder to slip44:5031, now that Somnia has a real SLIP-44 registry entry (#9811)

@metamask/core-backend 8.1.2

Changed

  • Bump @metamask/account-tree-controller from ^7.6.0 to ^8.0.0 (#9791, #9886)
  • Bump @metamask/keyring-controller from ^27.1.0 to ^27.1.1 (#9791)

@metamask/earn-controller 12.2.5

Changed

  • Bump @metamask/account-tree-controller from ^7.6.1 to ^8.0.0 (#9886)

Fixed

  • Avoid duplicate refreshEarnEligibility/refreshPooledStakes/refreshLendingPositions calls when AccountTreeController:selectedAccountGroupChange fires with an address that was already just refreshed (e.g. immediately after init() 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 chainId calls (#9804)

@metamask/multichain-account-service 13.0.2

Changed

  • Bump @metamask/accounts-controller from ^39.0.7 to ^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

Choose a tag to compare

@github-actions github-actions released this 14 Aug 08:17
87930a3

@metamask/perps-controller 12.0.0

Added

  • BREAKING: Add ordersSideFilter, ordersSortField, and ordersSortDirection to the flat ProLayoutPreferences object (defaults 'all', 'time', 'desc') so Pro Orders panel side-filter and sort preferences persist independently of Positions across markets and app restarts via the existing getProLayoutPreferences() / setProLayoutPreferences(patch) API; export ProOrdersSideFilter, ProOrdersSortField, and ProOrdersSortDirection (#9862)
    • Consumers that construct a full ProLayoutPreferences object (instead of using DEFAULT_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 of positionsSideFilter. Orders sort fields are orderValue | size | price | time.
  • Add PERPS_EVENT_PROPERTY.PERPS_MODE (perps_mode) for Lite/Pro interface mode analytics ('lite' | 'pro'), distinct from existing PERPS_EVENT_PROPERTY.MODE (mode) which is search intent (discovery / intent / browse) (#9819)
  • BREAKING: Add positionsSideFilter, positionsSortField, and positionsSortDirection to the flat ProLayoutPreferences object (defaults 'all', 'positionValue', 'desc') so Pro Positions/Orders panel sort and side-filter preferences persist across markets and app restarts via the existing getProLayoutPreferences() / setProLayoutPreferences(patch) API; export ProPositionsSideFilter, ProPositionsSortField, and ProPositionsSortDirection (#9838)
    • Consumers that construct a full ProLayoutPreferences object (instead of using DEFAULT_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.
  • BREAKING: Add strategy placement order types to OrderType: twap, scale, and chase, placeable through placeOrder alongside the existing market, limit, and trigger types (#9832)
    • OrderType is 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 typed OrderType. Such signatures must widen to OrderType or narrow explicitly at the call site.
    • A strategy placement expands one request into an execution schedule rather than a single resting order, so OrderResult.orderId carries 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 in childOrderIds.
    • twap slices the size over OrderParams.twapDuration whole minutes, optionally randomizing slice timing with OrderParams.twapRandomize. On HyperLiquid it is submitted through the venue's own TWAP action, not the order book, and HYPERLIQUID_TWAP_LIMITS bounds the window to 5–1440 minutes.
    • scale fans out OrderParams.scaleNumOrders limit orders on an inclusive price ladder between OrderParams.scaleMinPrice and OrderParams.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 — so OrderResult.submittedSize reports only the rungs that actually rested.
    • The venue applies its minimum order value to what it receives, not to the strategy total: a scale ladder's notional must leave every submitted rung above the per-order minimum, and a twap'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 in validateOrder, which cannot see the grid and could only guess.
    • A chase verifies 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 chase interrupted by disconnect resolves as a failure with ORDER_CHASE_ABANDONED rather 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 in OrderResult.childOrderIds, where the ordinary single-order cancel can still reach it for as long as the provider signs as the account that placed it.
    • chase prices 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.MaxActiveSessions chases run at once, matching the venue's documented cap; a further placement is refused with ORDER_CHASE_LIMIT_REACHED before 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.
    • chase re-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.
    • chase rests 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 by OrderParams.chaseIntervalMs, OrderParams.chaseMaxDurationMs, and OrderParams.chaseMaxRepricings (see the newly exported CHASE_ORDER_CONFIG for the defaults). No supported venue exposes a native chase action, so it is emulated client-side; the re-pricing loop is stopped by cancelOrder and by disconnect.
    • 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.orderType and BuildOrdersArrayParams.orderType to the new OrdinaryOrderType (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 chase as a limit order it carries no price for, and serialize a twap or scale as an ordinary market order.
  • BREAKING: Narrow ClosePositionParams.orderType to Exclude<OrderType, StrategyOrderType> (#9832)
    • closePosition has no path that executes a strategy placement and ClosePositionParams carries 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 typed OrderType into this field must narrow it at the call site.
  • BREAKING: Add nineteen PERPS_ERROR_CODES entries 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, and ORDER_CHASE_TOUCH_UNAVAILABLE (#9832)
    • Like EXCHANGE_ACCOUNT_NOT_FOUND and the multi-sig codes in 11.0.0, this widens the exported PerpsErrorCode union, so consumers that key an exhaustive Record<PerpsErrorCode, …> stop compiling until they add an entry for every new code. Both first-party clients do: Mobile's app/components/UI/Perps/utils/translatePerpsError.ts and Extension's ui/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_SMALL and ORDER_SCALE_NOTIONAL_TOO_SMALL, which need the asset's size precision and so follow one read of its metadata, and ORDER_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_INCOMPLETE and ORDER_CHASE_ABANDONED describe what happened after...
Read more

1192.0.0

Choose a tag to compare

@github-actions github-actions released this 13 Aug 21:28
46e4d72

@metamask/assets-controller 13.1.3

Changed

  • Bump @metamask/transaction-controller from ^69.5.1 to ^69.5.2 (#9823)

Fixed

  • 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 the 0x3600... ERC20 identity so assetsInfo metadata is seeded up front (#9869)
  • Properly filter empty ('') selected account group event (#9825)

1191.0.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 21:44
b3fada3

@metamask/client-utils 2.0.2

Changed

  • Fall back to a zero-address ERC-20 CAIP-19 asset id (eip155:<chainId>/erc20:0x000…000) in resolveNativeAssetId and getNativeAsset when an EVM native has no SLIP-44 coin type (previously undefined) (#9833)
    • resolveNativeAssetId consults chainlist via getNativeAsset before that fallback so symbol-less calls stay aligned with getNativeAsset
    • Non-EVM chains still return undefined when no slip44 entry is found
  • Bump @metamask/transaction-controller from ^69.5.0 to ^69.5.2 (#9798, #9823)

1190.0.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 17:40
5659821

@metamask/bridge-controller 79.2.0

Added

  • Export assetIdsMatch util to compare assetIds. EVM assetIds are case insensitive (#9831)

Fixed

  • Filter fees by assetId when coercing V1 quotes to V2 (#9831)

@metamask/bridge-status-controller 75.1.0

Changed

  • Bump @metamask/transaction-controller from ^69.5.0 to ^69.5.2 (#9798, #9823)
  • Bump @metamask/bridge-controller from ^79.0.0 to ^79.2.0 (#9788, #9827, #9845)
  • Bump @metamask/accounts-controller from ^39.0.6 to ^39.1.0 (#9791, #9807)
  • Bump @metamask/keyring-controller from ^27.1.0 to ^27.1.1 (#9791)

Fixed

  • Include usd_amount_source value in QuotesReceived MixPanel event properties (#9828)
  • Include quote's slippage value in post-submission MixPanel event properties (#9786)

1189.0.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 15:30
161649a

@metamask/logging-controller 9.0.0

Added

  • BREAKING: Add optional expiryTime constructor argument, by default logs are pruned after 7 days (#9839)

Changed

  • Bump @metamask/controller-utils from ^12.0.0 to ^12.3.0 (#8774, #9058, #9083, #9218)
  • Bump @metamask/messenger from ^1.2.0 to ^2.0.0 (#9392)

1188.0.0

Choose a tag to compare

@github-actions github-actions released this 12 Aug 08:24
bdc15c7

@metamask/bridge-controller 79.1.0

Added

  • Point Arc's native USDC to the registered slip44:5042 asset ID instead of the erc20:0x0000... placeholder (#9796)

Changed

  • Bump @metamask/transaction-controller from ^69.5.0 to ^69.5.2 (#9798, #9823)
  • Bump @metamask/accounts-controller from ^39.0.6 to ^39.1.0 (#9791, #9807)
  • Bump @metamask/multichain-network-controller from ^3.2.2 to ^3.2.3 (#9791)
  • Bump @metamask/assets-controllers from ^111.0.0 to ^111.1.0 (#9793)
  • Bump @metamask/assets-controller from ^13.1.1 to ^13.1.2 (#9813)

1187.0.0

Choose a tag to compare

@github-actions github-actions released this 11 Aug 14:51
3dc6004

@metamask/transaction-controller 69.5.2

Changed

  • Bump @metamask/accounts-controller from ^39.0.7 to ^39.1.0 (#9807)

Fixed

  • Skip resimulation check when failing incomplete transactions at startup, preventing a crash when isSimulationEnabled depends on controllers not yet registered (#9821)