Skip to content
Draft
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
10 changes: 10 additions & 0 deletions packages/assets-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add Stellar classic trustline enrichment to `AssetsController` via explicit `refreshAccountAssetInfo` and `invalidateAccountAssetExtras` messenger actions ([#TODO](https://github.com/MetaMask/core/pull/TODO))
- Store trustline fields on `FungibleAssetBalance.extra` (`limit`, `authorized`, `sponsored`)
- Apply Stellar classic trustline enrichment incrementally per snap batch so successful batches are not blocked by later hung requests ([#TODO](https://github.com/MetaMask/core/pull/TODO))
- Batch Stellar classic `getAccountAssetInfo` snap requests and serialize per snap id to avoid mobile snap termination on bulk enrichment ([#TODO](https://github.com/MetaMask/core/pull/TODO))
- Refresh Stellar classic trustline enrichment on keyring unlock and after balance sync for tracked classic assets in `assetsBalance` and `customAssets`
- `addCustomAsset` triggers async enrichment for Stellar classic assets; `removeCustomAsset` sets `extra.limit` to `'0'`
- Export `isStellarClassicTrustlineInactiveForDisplay` for client trustline UX

### Changed

- Bump `@metamask/assets-controllers` from `^109.0.0` to `^109.1.0` ([#9110](https://github.com/MetaMask/core/pull/9110))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,32 @@ export type AssetsControllerGetCustomAssetsAction = {
handler: AssetsController['getCustomAssets'];
};

/**
* Fetches and merges snap account-asset enrichment for eligible assets.
* Only Stellar classic `asset:` tokens on enrichment-enabled chains are processed.
* No-ops when the keyring is locked or the snap request fails.
*
* @param accountId - Internal account UUID.
* @param assetIds - CAIP-19 asset ids to enrich.
*/
export type AssetsControllerRefreshAccountAssetInfoAction = {
type: `AssetsController:refreshAccountAssetInfo`;
handler: AssetsController['refreshAccountAssetInfo'];
};

/**
* Marks Stellar classic trustline enrichment as inactive for the given assets.
* Sets `extra.limit` to `'0'` rather than deleting `extra`, so UI can distinguish
* inactive trustlines from not-yet-enriched state.
*
* @param accountId - Internal account UUID.
* @param assetIds - CAIP-19 asset ids to invalidate.
*/
export type AssetsControllerInvalidateAccountAssetExtrasAction = {
type: `AssetsController:invalidateAccountAssetExtras`;
handler: AssetsController['invalidateAccountAssetExtras'];
};

/**
* Hide an asset globally.
* Hidden assets are excluded from the asset list returned by getAssets.
Expand Down Expand Up @@ -138,6 +164,8 @@ export type AssetsControllerMethodActions =
| AssetsControllerAddCustomAssetAction
| AssetsControllerRemoveCustomAssetAction
| AssetsControllerGetCustomAssetsAction
| AssetsControllerRefreshAccountAssetInfoAction
| AssetsControllerInvalidateAccountAssetExtrasAction
| AssetsControllerHideAssetAction
| AssetsControllerUnhideAssetAction
| AssetsControllerSetSelectedCurrencyAction;
Loading
Loading