@metamask-previews/earn-controller 0.14.0-preview-e9f8bc88 → 0.15.0-preview-39fa8d37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -7
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -9,11 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
9
9
|
|
10
10
|
### Added
|
11
11
|
|
12
|
-
- Added
|
12
|
+
- **BREAKING:** Added `addTransactionFn` option to the controller contructor which accepts the `TransactionController` `addTransaction` method ([#5828](https://github.com/MetaMask/core/pull/5828))
|
13
|
+
- Added `@ethersproject/bignumber` as a dependency ([#5828](https://github.com/MetaMask/core/pull/5828))
|
14
|
+
- Added `reselect` as a dependency ([#5828](https://github.com/MetaMask/core/pull/5828))
|
15
|
+
- Added new lending-related types: ([#5828](https://github.com/MetaMask/core/pull/5828))
|
13
16
|
- `LendingMarketWithPosition`
|
14
17
|
- `LendingPositionWithMarket`
|
15
18
|
- `LendingPositionWithMarketReference`
|
16
|
-
- Added new lending-related selectors:
|
19
|
+
- Added new lending-related selectors: ([#5828](https://github.com/MetaMask/core/pull/5828))
|
17
20
|
- `selectLendingMarkets`
|
18
21
|
- `selectLendingPositions`
|
19
22
|
- `selectLendingMarketsWithPosition`
|
@@ -31,15 +34,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
31
34
|
- `selectLendingMarketsByTokenAddress`
|
32
35
|
- `selectLendingMarketsByChainIdAndOutputTokenAddress`
|
33
36
|
- `selectLendingMarketsByChainIdAndTokenAddress`
|
37
|
+
- Added exports from `@metamask/stake-sdk`: ([#5828](https://github.com/MetaMask/core/pull/5828))
|
38
|
+
- `isSupportedLendingChain`
|
39
|
+
- `isSupportedPooledStakingChain`
|
40
|
+
- `CHAIN_ID_TO_AAVE_POOL_CONTRACT`
|
41
|
+
- Added new lending-related methods to `EarnController`: ([#5828](https://github.com/MetaMask/core/pull/5828))
|
42
|
+
- `refreshLendingMarkets`
|
43
|
+
- `refreshLendingPositions`
|
44
|
+
- `refreshLendingEligibility`
|
45
|
+
- `refreshLendingData`
|
46
|
+
- `getLendingPositionHistory`
|
47
|
+
- `getLendingMarketDailyApysAndAverages`
|
48
|
+
- `executeLendingDeposit`
|
49
|
+
- `executeLendingWithdraw`
|
50
|
+
- `executeLendingTokenApprove`
|
51
|
+
- `getLendingTokenAllowance`
|
52
|
+
- `getLendingTokenMaxWithdraw`
|
53
|
+
- `getLendingTokenMaxDeposit`
|
54
|
+
- **BREAKING:** Added `lending` key to the controller state to replace `stablecoin_lending` ([#5828](https://github.com/MetaMask/core/pull/5828))
|
55
|
+
- Added optional `env` option which accepts an `EarnEnvironments` enum ([#5828](https://github.com/MetaMask/core/pull/5828))
|
56
|
+
- Added async lending state data update on constructor initialization ([#5828](https://github.com/MetaMask/core/pull/5828))
|
57
|
+
- Added refresh of lending positions and market data when the network state is updated ([#5828](https://github.com/MetaMask/core/pull/5828))
|
58
|
+
- Added refresh of lending positions when the user account address is updated ([#5828](https://github.com/MetaMask/core/pull/5828))
|
59
|
+
- Added refresh of lending positions when a transaction matching lending type is confirmed ([#5828](https://github.com/MetaMask/core/pull/5828))
|
34
60
|
|
35
61
|
### Changed
|
36
62
|
|
63
|
+
- **BREAKING:** Updated `refreshPooledStakingVaultDailyApys` method to take chain id as its first param ([#5828](https://github.com/MetaMask/core/pull/5828))
|
64
|
+
- **BREAKING:** bump `@metamask/accounts-controller` peer dependency to `^30.0.0` ([#5888](https://github.com/MetaMask/core/pull/5888))
|
65
|
+
- **BREAKING:** updates controller state to allow pooled staking data to be stored per supported chain id ([#5828](https://github.com/MetaMask/core/pull/5828))
|
66
|
+
- Updated `refreshPooledStakingData` to refresh pooled staking data for all supported chains ([#5828](https://github.com/MetaMask/core/pull/5828))
|
67
|
+
- Updated these methods to take an optional chain id to control which chain data is fetched for ([#5828](https://github.com/MetaMask/core/pull/5828))
|
68
|
+
- `refreshPooledStakingVaultMetadata`
|
69
|
+
- `refreshPooledStakes`
|
70
|
+
- `refreshPooledStakingVaultDailyApys`
|
71
|
+
- `refreshPooledStakingVaultApyAverages`
|
72
|
+
- Updated `refreshStakingEligibility` to update the eligibility in the lending state scope as well pooled staking ([#5828](https://github.com/MetaMask/core/pull/5828))
|
73
|
+
- Updated `refreshPooledStakes` method to take an optional chain id to control which chain data is fetched for ([#5828](https://github.com/MetaMask/core/pull/5828))
|
74
|
+
- Updated to refresh pooled staking data for all chains when the network state is updated ([#5828](https://github.com/MetaMask/core/pull/5828))
|
37
75
|
- Bump `@metamask/controller-utils` to `^11.9.0` ([#5812](https://github.com/MetaMask/core/pull/5812))
|
38
76
|
- Bump `@metamask/stake-sdk` dependency to `^3.2.0` ([#5828](https://github.com/MetaMask/core/pull/5828))
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
-
|
77
|
+
|
78
|
+
### Removed
|
79
|
+
|
80
|
+
- **BREAKING:** Removed lending-related types: ([#5828](https://github.com/MetaMask/core/pull/5828))
|
81
|
+
- `StablecoinLendingState`
|
82
|
+
- `StablecoinVault`
|
83
|
+
- **BREAKING:** Removed `stablecoin_lending` key from the controller state to replace with `lending` ([#5828](https://github.com/MetaMask/core/pull/5828))
|
84
|
+
|
85
|
+
## [0.15.0]
|
86
|
+
|
87
|
+
### Changed
|
88
|
+
|
89
|
+
- **BREAKING:** bump `@metamask/accounts-controller` peer dependency to `^30.0.0` ([#5888](https://github.com/MetaMask/core/pull/5888))
|
90
|
+
- Bump `@metamask/controller-utils` to `^11.9.0` ([#5812](https://github.com/MetaMask/core/pull/5812))
|
43
91
|
|
44
92
|
## [0.14.0]
|
45
93
|
|
@@ -139,7 +187,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
139
187
|
|
140
188
|
- Initial release ([#5271](https://github.com/MetaMask/core/pull/5271))
|
141
189
|
|
142
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.
|
190
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.15.0...HEAD
|
191
|
+
[0.15.0]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.14.0...@metamask/earn-controller@0.15.0
|
143
192
|
[0.14.0]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.13.0...@metamask/earn-controller@0.14.0
|
144
193
|
[0.13.0]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.12.0...@metamask/earn-controller@0.13.0
|
145
194
|
[0.12.0]: https://github.com/MetaMask/core/compare/@metamask/earn-controller@0.11.0...@metamask/earn-controller@0.12.0
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@metamask-previews/earn-controller",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.15.0-preview-39fa8d37",
|
4
4
|
"description": "Manages state for earning features and coordinates interactions between staking services, SDK integrations, and other controllers to enable users to participate in various earning opportunities",
|
5
5
|
"keywords": [
|
6
6
|
"MetaMask",
|
@@ -51,14 +51,14 @@
|
|
51
51
|
"@ethersproject/providers": "^5.7.0",
|
52
52
|
"@metamask/base-controller": "^8.0.1",
|
53
53
|
"@metamask/controller-utils": "^11.9.0",
|
54
|
-
"@metamask/stake-sdk": "3.2.0",
|
54
|
+
"@metamask/stake-sdk": "^3.2.0",
|
55
55
|
"reselect": "^5.1.1"
|
56
56
|
},
|
57
57
|
"devDependencies": {
|
58
|
-
"@metamask/accounts-controller": "^
|
58
|
+
"@metamask/accounts-controller": "^30.0.0",
|
59
59
|
"@metamask/auto-changelog": "^3.4.4",
|
60
60
|
"@metamask/network-controller": "^23.5.1",
|
61
|
-
"@metamask/transaction-controller": "^
|
61
|
+
"@metamask/transaction-controller": "^57.0.0",
|
62
62
|
"@types/jest": "^27.4.1",
|
63
63
|
"deepmerge": "^4.2.2",
|
64
64
|
"jest": "^27.5.1",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"typescript": "~5.2.2"
|
69
69
|
},
|
70
70
|
"peerDependencies": {
|
71
|
-
"@metamask/accounts-controller": "^
|
71
|
+
"@metamask/accounts-controller": "^30.0.0",
|
72
72
|
"@metamask/network-controller": "^23.0.0"
|
73
73
|
},
|
74
74
|
"engines": {
|