Skip to content

15.0.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 10:01
30d95e6

@metamask/bitcoin-wallet-snap 3.2.0

Added

  • Populate the transaction_type and transaction_status properties on the transaction lifecycle tracking events, with transaction_status set to confirmed on Transaction Finalized. (#393, #404)
  • Classify transaction_type for the unified swap/bridge flow with the shared resolveFlowTransactionType utility and the new optional sourceAssetId/destAssetId request options on signAndSendTransaction, reporting swap for a same-chain trade and bridgeSend for a cross-chain trade on Transaction Submitted (#440)

Fixed

  • Stop building zero-fee Bitcoin transactions when the fee estimator returns a zero or fractional sub-1 sat/vB rate. (#417)

@metamask/snap-networks-utils 2.0.0

Added

  • Add a shared ActionHeader Snaps JSX component for the centered header at the top of transaction confirmations, rendering a large title, an optional muted subtitle, and an optional extra-large asset icon (iconUrl) (#431)
  • Add resolveFlowTransactionType for classifying unified swap and bridge transactions from source and destination (#434)
  • Add the more descriptive resolveUnifiedSwapTransactionType alias for unified swap and bridge classification (#441)
  • Support importing .svg files as strings in the package source, like in a Snap (#423)
    • The files are copied to dist/ as-is, so consumers must bundle the package with mm-snap (or another bundler that loads .svg files as source)
  • Add shared Asset and AssetIcon Snaps JSX components for displaying an asset inline in transaction confirmations (#418)
    • Asset renders an optional display-ready fiat value (or a loading skeleton), the asset icon, then the amount and symbol, optionally as an explorer link
    • The icon can be an image URL, a Snaps icon (iconName), or hidden (hideIcon); AssetIcon falls back to a question-mark icon when the URL is missing or blank
  • Add a shared TransactionAlert Snaps JSX component for transaction confirmations, rendering a single scan banner for the in-progress, scan-failed, scan-error, and malicious/warning security validation states (#408)
    • Takes translated labels (TransactionAlertLabels), isFetching and isFetchError flags, a resolved error (TransactionAlertError), and a validation (TransactionAlertValidation)
  • Populate the optional transaction_type property on the Transaction Added, Transaction Approved, Transaction Rejected, and Transaction Submitted events tracked by AnalyticsService. (#393)
  • Add a shared EstimatedChanges Snaps JSX component for transaction confirmations, rendering send/receive asset rows with loading, not-available, and no-changes states (#369)
  • Add SynchronizationError, formatAccountSyncFailures, and the AccountSyncFailure type, for reporting account synchronization failures with per-account failure details embedded in the error message (details must live in the message because snap_trackError only serializes name, message, stack, and cause). (#374)
  • Add wrapSnapHandlers to wrap any Snap entrypoint handlers with withCatchAndThrowSnapError, with optional per-handler logError overrides (#341)
  • Add noopAssetHandlers, the no-op asset entrypoints network Snaps must export to keep the endowment:assets permission (#341)
  • Add a shared AnalyticsService and typed event properties for network Snap telemetry. (#327)
  • Add shared configuration utilities for network snaps (#309)
    • BaseConfigProvider, a base class owning the configuration lifecycle (parse the explicitly passed environment once against a Superstruct, frozen config, fail-fast on invalid environments)
    • parseEnv for fail-fast parsing of raw environment records against a struct
    • emptyToUndefined, commaSeparatedListOf, parseIntegerStruct, and parseFloatStruct structs for parsing environment variables
    • LogLevelStruct for parsing a LogLevel from an environment variable
  • Add defaultedUrlStruct for validating URL environment variables that fall back to a default when unset or empty. (#312)
  • Add ExtendedKeyringAccount, KeyringAccountExtension, and asStrictKeyringAccount for snap keyring accounts that persist entropySource, derivationPath, and index. (#300)
  • Add shared snap state helpers IStateManager, State, and InMemoryState (Tron-style write mutex plus blob/path locking). (#288)
  • Add shared caching utilities for network snaps (#287)
    • ICache, CacheEntry, and TimestampMilliseconds for describing a generic cache
    • InMemoryCache, a TTL-backed in-memory cache
    • StateCache, a cache backed by a snap state manager
    • useCache and useCacheUntil for wrapping functions with fixed-TTL and dynamic-expiry caching
  • Add shared proof-of-ownership message parsing utilities, batch request/response structs, and batch request/response types. (#268)
  • Add a UuidStruct Superstruct for validating UUID v4 strings. (#243)
  • Add helpers serialize, deserialize, and Serializable for round-tripping BigNumber, bigint, Uint8Array, and undefined through snap state (#197)
  • Add shared snap error utilities to the main package entry point (#241)
    • createWithCatchAndThrowSnapError for handler-boundary error catching, logging, and Snap RPC normalization
    • normalizeError for converting caught values into Snap RPC errors, with optional custom normalizers via createWithCatchAndThrowSnapError's normalizeErrorFn option
    • isSnapRpcError type guard and SnapRpcError union type
  • Add shared Sentry error tracking utilities for network snaps (#246)
    • createTrackError for reporting errors to MetaMask via snap_trackError
    • createSnapErrorHandling to wire createTrackError and createWithCatchAndThrowSnapError
  • Add InFlightCoalescer, exported from a new ./dedupe entry point, which coalesces concurrent async operations by key so callers share one in-flight run (#149)
  • Add shared async batching utilities. (#211)
  • Add origin permission helpers (#193)
    • createOriginPermissions for building origin-to-method maps
    • validateOrigin for checking an origin against a permission map
  • Add a buildUrl utility for safely constructing URLs from paths and parameters. (#195)
  • Add sanitizeControlCharacters and sanitizeUri utilities for validating and sanitizing user-provided strings and URIs. (#191)
  • Add a safeMerge utility for shallowly merging objects. (#166)
  • Add a UrlStruct utility for validating safe HTTP, HTTPS, and WebSocket URLs. (#174)
  • Add getAssetMetadata to AssetsProvider, mapping to the AssetsController:getAssetMetadata state lookup so Snaps can read controller metadata for a CAIP-19 asset (#419)
  • Add getAssets to AssetsProvider, mapping to the AssetsController:getAssets one-time fetch so Snaps can fetch uncached combined assets (balance, metadata, price, and fiatValue) and update controller state, with forceUpdate and bypassServerCache support for post-transaction freshness

Changed

  • BREAKING Replace the logger utilities with a configurable Logger class that requires a log level and supports level filtering, per-instance prefixes, and method decorators. (#136)
  • Bump @metamask/utils from ^11.9.0 to ^11.11.9 (#161)
  • BREAKING Bump @metamask/snaps-sdk from ^11.2.0 to ^12.0.1 (#214)

@metamask/solana-wallet-snap 7.1.0

Added

  • Emit transaction_type on the transaction lifecycle events. (#401)

Changed

  • getAccountAssets and getAccountBalances now fetch live assets and balances from the chain through the Snap's Solana RPC clients instead of returning persisted state. (#432)
  • Classify transaction_type for the unified swap/bridge flow with the shared resolveFlowTransactionType utility and the new optional sourceAssetId/destAssetId request options, carried through to Transaction Finalized. (#439)
  • Render the confirmation "Estimated changes" section with the shared EstimatedChanges component from @metamask/snap-networks-utils (#384)
    • Estimated changes from the previous scan now stay visible while a confirmation re-scans, instead of showing a loading skeleton
  • Render the confirmation security alert banner with the shared TransactionAlert component from @metamask/snap-networks-utils (#409)
    • A "Checking for security issues" banner is now shown while the transaction scan is in progress, instead of no banner
  • Render the confirmation network fee with the shared Asset component from @metamask/snap-networks-utils (#427)
  • Render the confirmation title with the shared ActionHeader component from @metamask/snap-networks-utils (#436)
    • The sign message and sign-in screens now have the same spacing below the title as the transaction request screen

@metamask/tron-wallet-snap 4.1.0

Added

  • Emit transaction_type and transaction_status on the transaction lifecycle events, with transaction_type derived from the contract type (so a flow can be attributed by combining origin and transaction_type) and transaction_status reporting the on-chain outcome on Transaction Finalized. (#399, #405)

Changed

  • Classify transaction_type for the unified swap/bridge flow with the new optional sourceAssetId/destAssetId request options. Classify TRC20 smart-contract calls by function selector (so a transfer reports send and an approve reports tokenApprove instead of unknown) (#434)
  • Change the last behaviours missing for the AssetsController migration to happen (#424)
    • When the assets migration feature flag is active, the snap no longer fetches, persists, or publishes assets: the periodic sync cronjob and the synchronization triggered by selected account changes no longer touch assets or emit AccountAssetListUpdated and AccountBalancesUpdated events, leaving asset syncing to the AssetsController
    • When the live assets and balances are fetched by getAccountAssets and getAccountBalances, they are persisted to local state without emitting AccountAssetListUpdated and AccountBalancesUpdated events
  • Validate network and CAIP asset type values coming from untrusted boundaries (RPC request params, the Keyring API, the AssetsController) instead of force-casting them, so unsupported values fail fast with an Invalid params error (#403)
  • Render the confirmation "Estimated changes" section with the shared EstimatedChanges component from @metamask/snap-networks-utils (#396)
    • Estimated changes from the previous scan now stay visible while a confirmation re-scans, instead of showing a loading skeleton
  • Render the confirmation security alert banner with the shared TransactionAlert component from @metamask/snap-networks-utils (#414)
    • A "Checking for security issues" banner is now shown while the transaction scan is in progress, instead of a loading skeleton
  • Render the confirmation fee asset rows with the shared Asset component from @metamask/snap-networks-utils (#429)
  • Render the confirmation title with the shared ActionHeader component from @metamask/snap-networks-utils (#438)
  • listAccountAssets and getAccountBalances now fetch live assets and balances from the chain through the Snap's TronGrid clients instead of returning persisted state. (#388)

Fixed

  • Show "Estimated changes are not available" instead of "No estimated changes" when the transaction scan returns an error result, such as for a malformed transaction (#396)
  • Report the MetaMask origin as lowercase metamask instead of MetaMask for MetaMask-initiated operations, so the origin matches the value used by the other non-EVM snaps and granted to the keyring methods, and so transaction scan requests are attributed to https://metamask.io. The confirmation UI keeps displaying MetaMask. (#392)