Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
897c5be
feat: added init method to EarnController and broke out async async d…
Matt561 Apr 9, 2026
afecce2
feat: refactored EarnController to not store derived selectedNetworkC…
Matt561 Apr 9, 2026
d55284c
feat: wip added deferAccountDependentRefreshes method to EarnControll…
Matt561 Apr 9, 2026
c91e596
feat: cleaned up duplicate eligiblity requests in EarnController
Matt561 Apr 9, 2026
cfb91f5
feat: updated tests
Matt561 Apr 9, 2026
f99e625
feat: updated earn controller changelog
Matt561 Apr 10, 2026
a9b6bb7
feat: updated earn-controller method action types
Matt561 Apr 10, 2026
4df3a9c
feat: updated changelog
Matt561 Apr 10, 2026
2965d22
feat: resolving cursor bugbot comment regarding premature removal of …
Matt561 Apr 10, 2026
adaa37e
feat: removed unused RefreshLendingEligibilityOptions type from EarnC…
Matt561 Apr 10, 2026
5a7daca
chore: disabled single eslint error in EarnController for AccountTree…
Matt561 Apr 10, 2026
b7a51a9
feat: resolve eslint errors in EarnController tests
Matt561 Apr 10, 2026
733cdaf
feat: removed jest/unbound-method suppressions for EarnController.tes…
Matt561 Apr 10, 2026
2f3eaf3
feat: updated eslint-suppresions
Matt561 Apr 10, 2026
a4af36a
feat: responding to PR comments
Matt561 Apr 10, 2026
57bd8a4
chore: updated eslint-suppressions
Matt561 Apr 10, 2026
92accaf
chore: updated eslint-suppressions
Matt561 Apr 10, 2026
258dd87
chore: updated eslint-suppressions
Matt561 Apr 10, 2026
2020234
Merge branch 'main' into feat/musd-626-update-earn-controller-to-foll…
Matt561 Apr 13, 2026
d9d1316
feat: resolved concurrent init calls bypassing guard
Matt561 Apr 13, 2026
b3fcdef
feat: allow retry if init throws
Matt561 Apr 13, 2026
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
13 changes: 5 additions & 8 deletions eslint-suppressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -929,22 +929,19 @@
}
},
"packages/earn-controller/src/EarnController.test.ts": {
"@typescript-eslint/explicit-function-return-type": {
"no-restricted-syntax": {
"count": 1
},
"jest/unbound-method": {
"count": 36
}
},
"packages/earn-controller/src/EarnController.ts": {
"@typescript-eslint/explicit-function-return-type": {
"count": 9
},
"id-length": {
"count": 2
"count": 4
},
"no-negated-condition": {
"count": 3
},
"no-restricted-syntax": {
"count": 1
}
},
"packages/earn-controller/src/selectors.ts": {
Expand Down
6 changes: 6 additions & 0 deletions packages/earn-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING:** `EarnController` constructor no longer accepts `selectedNetworkClientId` and no longer performs async work during construction. Consumers must call `init()` after construction. The messenger must now allow `AccountTreeController:stateChange` and `NetworkController:getState` ([#8421](https://github.com/MetaMask/core/pull/8421))
- **BREAKING:** `refreshPooledStakingData` and `refreshLendingData` no longer call eligibility checks internally. Eligibility is fetched once during `init()`. Consumers that relied on these methods to keep eligibility state current must call `refreshEarnEligibility` separately ([#8421](https://github.com/MetaMask/core/pull/8421))
- Bump `@metamask/controller-utils` from `^11.19.0` to `^11.20.0` ([#8344](https://github.com/MetaMask/core/pull/8344))
- Bump `@metamask/messenger` from `^1.0.0` to `^1.1.1` ([#8364](https://github.com/MetaMask/core/pull/8364), [#8373](https://github.com/MetaMask/core/pull/8373))
- Bump `@metamask/transaction-controller` from `^64.0.0` to `^64.1.0` ([#8432](https://github.com/MetaMask/core/pull/8432))

### Removed

- **BREAKING:** Removed `EarnController:refreshLendingEligibility` messenger action and `EarnControllerRefreshLendingEligibilityAction` type. Use `EarnController:refreshEarnEligibility` instead ([#8421](https://github.com/MetaMask/core/pull/8421))

## [11.2.1]

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,6 @@ export type EarnControllerRefreshLendingPositionsAction = {
handler: EarnController['refreshLendingPositions'];
};

/**
* Refreshes the lending eligibility status for the current account.
* Updates the eligibility status in the controller state based on the location and address blocklist for compliance.
*
* @param options - Optional arguments
* @param [options.address] - The address to refresh lending eligibility for (optional).
* @returns A promise that resolves when the eligibility status has been updated
*/
export type EarnControllerRefreshLendingEligibilityAction = {
type: `EarnController:refreshLendingEligibility`;
handler: EarnController['refreshLendingEligibility'];
};

/**
* Refreshes all lending related data including markets, positions, and eligibility.
* This method allows partial success, meaning some data may update while other requests fail.
Expand Down Expand Up @@ -302,7 +289,6 @@ export type EarnControllerMethodActions =
| EarnControllerRefreshPooledStakingDataAction
| EarnControllerRefreshLendingMarketsAction
| EarnControllerRefreshLendingPositionsAction
| EarnControllerRefreshLendingEligibilityAction
| EarnControllerRefreshLendingDataAction
| EarnControllerRefreshTronStakingApyAction
| EarnControllerGetTronStakingApyAction
Expand Down
Loading
Loading