Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 7.72 KB

File metadata and controls

102 lines (70 loc) · 7.72 KB

Changelog

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.

Changed

  • Bump @metamask/controller-utils from ^12.2.0 to ^12.3.0 (#9218)
  • Bump @metamask/network-controller from ^32.0.0 to ^33.0.0 (#9218)

Changed

  • Fetch on-chain Money account balances at the pending block tag instead of latest, so a balance refetch triggered by TransactionController:transactionConfirmed returns the post-transaction balance immediately rather than stale data for up to ~20 seconds. (#9163)
    • Applies to getMoneyAccountBalance, getMusdBalance, getVmusdBalance, and getMusdEquivalentValue. As a result these reads now reflect pending (mempool-inclusive) state. getExchangeRate and the on-chain Accountant.base() token-address lookup intentionally remain on latest.

Added

  • Add getMoneyAccountBalance method that fetches the account's mUSD wallet balance and vault shares valued in mUSD in a single Multicall3 aggregate3 request. (#9100)
  • Add optional underlyingToken field to VaultConfig (validated by VaultConfigStruct). When present, getMusdBalance reads the underlying mUSD token address from config and skips the on-chain Accountant.base() call; when absent it falls back to reading base() on-chain. (#9100)
  • Add support for configuring the balance staleTime at runtime via the moneyAccountBalanceStaletime remote feature flag. The flag is read during init() and updated on RemoteFeatureFlagController:stateChange; absent or malformed values fall back to the default of 60 seconds. (#9100)

Changed

  • BREAKING: Rename musdSHFvd to vmusd across the public API to align with the vmUSD token name: (#9100)
    • getMusdSHFvdBalance method → getVmusdBalance
    • MoneyAccountBalanceServiceGetMusdSHFvdBalanceAction type → MoneyAccountBalanceServiceGetVmusdBalanceAction
    • MoneyAccountBalanceService:getMusdSHFvdBalance messenger action string → MoneyAccountBalanceService:getVmusdBalance
    • MoneyAccountBalanceResponse.musdSHFvdValueInMusd property → vmusdValueInMusd
  • Increase the default staleTime for on-chain balance reads (getMusdBalance, getVmusdBalance, getMusdEquivalentValue, and the default for getExchangeRate) from 30 seconds to 60 seconds. This default is now overridable via the moneyAccountBalanceStaletime remote feature flag. (#9100)
  • Bump @metamask/utils from ^11.9.0 to ^11.11.0 (#9074)
  • Bump @metamask/controller-utils from ^12.1.0 to ^12.2.0 (#9058, #9083)
  • Bump @metamask/base-data-service from ^0.1.2 to ^0.1.3 (#8799)
  • Bump @metamask/remote-feature-flag-controller from ^4.2.1 to ^4.2.2 (#8986)

Changed

  • Bump @metamask/network-controller from ^31.0.0 to ^32.0.0 (#8765, #8774)
  • Bump @metamask/controller-utils from ^12.0.0 to ^12.1.0 (#8774)

Changed

  • Bump @metamask/base-data-service from ^0.1.1 to ^0.1.2 (#8755)
  • Bump @metamask/controller-utils from ^11.20.0 to ^12.0.0 (#8755)
  • Bump @metamask/network-controller from ^30.1.0 to ^31.0.0 (#8755)
  • Bump @metamask/remote-feature-flag-controller from ^4.2.0 to ^4.2.1 (#8755)

Added

  • Add VaultConfigNotAvailableError and VaultConfigValidationError error classes for typed consumer error handling (#8742)
  • Add LENS_ABI constant for the Arctic Architecture Lens contract (#8742)

Changed

  • BREAKING: MoneyAccountBalanceService no longer accepts vault config via constructor. Vault config is now read from RemoteFeatureFlagController state. Add @metamask/remote-feature-flag-controller as a dependency and permit RemoteFeatureFlagController:getStateaction and RemoteFeatureFlagController:stateChange event on the service's messenger. Service methods throw VaultConfigNotAvailableError until a valid config is available. (#8742)
  • BREAKING: VaultConfig fields have changed — vaultAddressboringVault, vaultChainIdchainId; underlyingTokenAddress and underlyingTokenDecimals removed; lensAddress and tellerAddress added (#8742)
  • BREAKING: MusdEquivalentValueResponse shape has changed — musdSHFvdBalance, exchangeRate, and musdEquivalentValue replaced by a single balanceOfInAssets field (#8742)
  • Monad (0x8f) added to VEDA_API_NETWORK_NAMES (#8742)
  • Bump @metamask/messenger from ^1.1.1 to ^1.2.0 (#8632)
  • Bump @metamask/network-controller from ^30.0.1 to ^30.1.0 (#8636)

Added

  • Add money-account-balance-service to the root tsconfig.json and tsconfig.build.json files so that it is usable (#8477)

0.1.0 [DEPRECATED]

Added

  • Add MoneyAccountBalanceService data 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)