You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
@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 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)