Skip to content

1294.0.0

Choose a tag to compare

@github-actions github-actions released this 28 Sep 11:07
8027ea6

@metamask/base-data-service 2.1.0

Added

  • Add executeMutation protected method to BaseDataService to allow for making server-state-mutating requests (#9324)
    • These kinds of requests are never retried, unlike queries.
    • To use this, create a method in your data service class which takes whatever arguments you need, plus a optional final argument called globalId; then call executeMutation with a mutationKey, globalId, and mutationFn. See ExampleDataService in this package for an example.
    • A MutationKey type is also available.
  • Add protected cancelQueries so subclasses can abort in-flight reads before a forced refresh (#10454)

Changed

  • The payload for :cacheUpdated and :cacheUpdated:${hash} events now includes an objectType property, which is either "query" or "mutation" (#9324)
  • Bump @metamask/utils from ^11.12.0 to ^12.0.0 (#10192)
  • Add uuid ^11.1.1 as a dependency (#9324)
  • Bump @tanstack/query-core from ^5.62.16 to ^5.89.0 (#9324)
  • Bump cockatiel from ^3.1.2 to ^3.2.1 (#10436)
  • Bump lodash-es from ^4.17.21 to ^4.18.1 (#10447)

@metamask/money-account-api-data-service 2.0.0

Added

  • Add optional fresh option to fetchPositions that cancels in-flight reads, fetches with a zero stale time, invalidates the result for subsequent reads, and sends Cache-Control: no-cache so the Money API skips its Nest response cache when supported (#10455)
  • Accept optional additive musd_balance_updated_at on the positions balance summary (#10455)
  • Accept vault metadata on each position returned by fetchPositions: chain_id, vault_key, name, asset_symbol, and asset_decimals (#10500)
  • Accept multi-asset balance fields by_asset and total_balance_usd on the positions balance summary, and export AssetBalance (#10500)

Changed

  • BREAKING: effective_apy on a vault position is now string | null. null means the position has been invested for fewer than 28 days, and is distinct from a rate of zero (#10500)
  • Bump @metamask/utils from ^11.12.0 to ^12.0.0 (#10192)
  • Bump @tanstack/query-core from ^5.62.16 to ^5.89.0 (#9324)
  • Bump @metamask/base-data-service from ^2.0.0 to ^2.1.0 (#10502)

@metamask/money-account-balance-service 3.1.0

Added

  • Surface Money API freshness on fetchBalanceWithFallback results (asOfBlock, asOfTimestamp, dataFreshness, indexerLagSeconds, musdBalanceUpdatedAt) when source is api (#10455)
  • Add optional FetchBalanceWithFallbackOptions (minBlock, fresh): when the API as_of_block is behind minBlock, throw MoneyAccountBalanceStaleError and fall back to RPC without reporting a defect; minBlock implies a fresh positions read, and explicit fresh is also forwarded to fetchPositions (#10455)
  • Export MoneyAccountBalanceStaleError (#10455)

Changed

  • Bump @metamask/utils from ^11.12.0 to ^12.0.0 (#10192)
  • Bump @ethersproject/providers from ^5.7.0 to ^5.8.0 (#10482)
  • Bump @metamask/base-data-service from ^2.0.0 to ^2.1.0 (#10502)
  • Bump @metamask/money-account-api-data-service from ^1.0.0 to ^2.0.0 (#10502)