All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Bump
@metamask/controller-utilsfrom^12.2.0to^12.3.0(#9218) - Bump
@metamask/network-controllerfrom^32.0.0to^33.0.0(#9218)
- Fetch on-chain Money account balances at the
pendingblock tag instead oflatest, so a balance refetch triggered byTransactionController:transactionConfirmedreturns the post-transaction balance immediately rather than stale data for up to ~20 seconds. (#9163)- Applies to
getMoneyAccountBalance,getMusdBalance,getVmusdBalance, andgetMusdEquivalentValue. As a result these reads now reflect pending (mempool-inclusive) state.getExchangeRateand the on-chainAccountant.base()token-address lookup intentionally remain onlatest.
- Applies to
- Add
getMoneyAccountBalancemethod that fetches the account's mUSD wallet balance and vault shares valued in mUSD in a single Multicall3aggregate3request. (#9100) - Add optional
underlyingTokenfield toVaultConfig(validated byVaultConfigStruct). When present,getMusdBalancereads the underlying mUSD token address from config and skips the on-chainAccountant.base()call; when absent it falls back to readingbase()on-chain. (#9100) - Add support for configuring the balance
staleTimeat runtime via themoneyAccountBalanceStaletimeremote feature flag. The flag is read duringinit()and updated onRemoteFeatureFlagController:stateChange; absent or malformed values fall back to the default of 60 seconds. (#9100)
- BREAKING: Rename
musdSHFvdtovmusdacross the public API to align with the vmUSD token name: (#9100)getMusdSHFvdBalancemethod →getVmusdBalanceMoneyAccountBalanceServiceGetMusdSHFvdBalanceActiontype →MoneyAccountBalanceServiceGetVmusdBalanceActionMoneyAccountBalanceService:getMusdSHFvdBalancemessenger action string →MoneyAccountBalanceService:getVmusdBalanceMoneyAccountBalanceResponse.musdSHFvdValueInMusdproperty →vmusdValueInMusd
- Increase the default
staleTimefor on-chain balance reads (getMusdBalance,getVmusdBalance,getMusdEquivalentValue, and the default forgetExchangeRate) from 30 seconds to 60 seconds. This default is now overridable via themoneyAccountBalanceStaletimeremote feature flag. (#9100) - Bump
@metamask/utilsfrom^11.9.0to^11.11.0(#9074) - Bump
@metamask/controller-utilsfrom^12.1.0to^12.2.0(#9058, #9083) - Bump
@metamask/base-data-servicefrom^0.1.2to^0.1.3(#8799) - Bump
@metamask/remote-feature-flag-controllerfrom^4.2.1to^4.2.2(#8986)
- Bump
@metamask/network-controllerfrom^31.0.0to^32.0.0(#8765, #8774) - Bump
@metamask/controller-utilsfrom^12.0.0to^12.1.0(#8774)
- Bump
@metamask/base-data-servicefrom^0.1.1to^0.1.2(#8755) - Bump
@metamask/controller-utilsfrom^11.20.0to^12.0.0(#8755) - Bump
@metamask/network-controllerfrom^30.1.0to^31.0.0(#8755) - Bump
@metamask/remote-feature-flag-controllerfrom^4.2.0to^4.2.1(#8755)
- Add
VaultConfigNotAvailableErrorandVaultConfigValidationErrorerror classes for typed consumer error handling (#8742) - Add
LENS_ABIconstant for the Arctic Architecture Lens contract (#8742)
- BREAKING:
MoneyAccountBalanceServiceno longer accepts vault config via constructor. Vault config is now read fromRemoteFeatureFlagControllerstate. Add@metamask/remote-feature-flag-controlleras a dependency and permitRemoteFeatureFlagController:getStateaction andRemoteFeatureFlagController:stateChangeevent on the service's messenger. Service methods throwVaultConfigNotAvailableErroruntil a valid config is available. (#8742) - BREAKING:
VaultConfigfields have changed —vaultAddress→boringVault,vaultChainId→chainId;underlyingTokenAddressandunderlyingTokenDecimalsremoved;lensAddressandtellerAddressadded (#8742) - BREAKING:
MusdEquivalentValueResponseshape has changed —musdSHFvdBalance,exchangeRate, andmusdEquivalentValuereplaced by a singlebalanceOfInAssetsfield (#8742) - Monad (
0x8f) added toVEDA_API_NETWORK_NAMES(#8742) - Bump
@metamask/messengerfrom^1.1.1to^1.2.0(#8632) - Bump
@metamask/network-controllerfrom^30.0.1to^30.1.0(#8636)
- Add
money-account-balance-serviceto the roottsconfig.jsonandtsconfig.build.jsonfiles so that it is usable (#8477)
0.1.0 [DEPRECATED]
- Add
MoneyAccountBalanceServicedata service (#8428)- Fetch mUSD ERC-20 balance via RPC (
getMusdBalance) - Fetch musdSHFvd vault share balance via RPC (
getMusdSHFvdBalance) - Fetch Veda Accountant exchange rate via RPC (
getExchangeRate) - Compute mUSD-equivalent value of vault share holdings (
getMusdEquivalentValue) - Fetch vault APY from the Veda performance REST API (
getVaultApy)
- Fetch mUSD ERC-20 balance via RPC (