Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add `DeFiPositionsControllerV2`, which fetches DeFi positions from the Accounts API v6 multiaccount balances endpoint and stores them in a client-ready shape under `allDeFiPositionsV2` ([#9503](https://github.com/MetaMask/core/pull/9503))
- Export `DeFiPositionsControllerV2` and `getDefaultDeFiPositionsControllerV2State`
- Export types including `DeFiPositionsControllerV2State`, messenger/action/event types, `DeFiPositionsByAccount`, and related position group types
- Export `DeFiPositionType`, `DEFI_POSITION_TYPES`, and `DEFI_POSITION_LIABILITY_TYPES` (`lending` is subtracted from protocol `marketValue`)
- Export `DeFiPositionsControllerV2FetchDeFiPositionsAction` and `buildDeFiBalancesQuery` helpers
- Add Robinhood Chain (`4663`/`0x1237`) BalanceFetcher support for legacy single-call token detection ([#9473](https://github.com/MetaMask/core/pull/9473))
- Add `Robinhood` in `SupportedTokenDetectionNetworks`
- Add Robinhood BalanceFetcher address in `SINGLE_CALL_BALANCES_ADDRESS_BY_CHAINID`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* This file is auto generated.
* Do not edit manually.
*/

import type { DeFiPositionsControllerV2 } from './DeFiPositionsControllerV2';

/**
* Fetches DeFi positions for the selected account group and stores them,
* shaped for direct client consumption. Everything happens behind this
* method: resolving the accounts, calling the Accounts API, transforming the
* response, and updating state.
*
* Throttled per set of accounts by an in-memory minimum interval, so repeated
* calls within the window are no-ops (no HTTP, no regroup, no state write).
* Disabled controllers and empty account groups return without fetching.
*/
export type DeFiPositionsControllerV2FetchDeFiPositionsAction = {
type: `DeFiPositionsControllerV2:fetchDeFiPositions`;
handler: DeFiPositionsControllerV2['fetchDeFiPositions'];
};

/**
* Union of all DeFiPositionsControllerV2 action types.
*/
export type DeFiPositionsControllerV2MethodActions =
DeFiPositionsControllerV2FetchDeFiPositionsAction;
Loading