File tree Expand file tree Collapse file tree 2 files changed +30
-8
lines changed
packages/earn-controller/src Expand file tree Collapse file tree 2 files changed +30
-8
lines changed Original file line number Diff line number Diff line change @@ -2587,13 +2587,35 @@ describe('EarnController', () => {
2587
2587
it ( 'includes expected state in state logs' , async ( ) => {
2588
2588
const { controller } = await setupController ( ) ;
2589
2589
2590
- expect (
2591
- deriveStateFromMetadata (
2592
- controller . state ,
2593
- controller . metadata ,
2594
- 'includeInStateLogs' ,
2595
- ) ,
2596
- ) . toMatchInlineSnapshot ( `
2590
+ const derivedState = deriveStateFromMetadata (
2591
+ controller . state ,
2592
+ controller . metadata ,
2593
+ 'includeInStateLogs' ,
2594
+ ) ;
2595
+
2596
+ // Compare `pooled_staking` separately to minimize size of snapshot
2597
+ const {
2598
+ pooled_staking : derivedPooledStaking ,
2599
+ ...derivedStateWithoutPooledStaking
2600
+ } = derivedState ;
2601
+ expect ( derivedPooledStaking ) . toStrictEqual ( {
2602
+ '1' : {
2603
+ pooledStakes : mockPooledStakes ,
2604
+ exchangeRate : '1.5' ,
2605
+ vaultMetadata : mockVaultMetadata ,
2606
+ vaultDailyApys : mockPooledStakingVaultDailyApys ,
2607
+ vaultApyAverages : mockPooledStakingVaultApyAverages ,
2608
+ } ,
2609
+ '560048' : {
2610
+ pooledStakes : mockPooledStakes ,
2611
+ exchangeRate : '1.5' ,
2612
+ vaultMetadata : mockVaultMetadata ,
2613
+ vaultDailyApys : mockPooledStakingVaultDailyApys ,
2614
+ vaultApyAverages : mockPooledStakingVaultApyAverages ,
2615
+ } ,
2616
+ isEligible : true ,
2617
+ } ) ;
2618
+ expect ( derivedStateWithoutPooledStaking ) . toMatchInlineSnapshot ( `
2597
2619
Object {
2598
2620
"lastUpdated": 0,
2599
2621
"lending": Object {
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ const lendingTransactionTypes = new Set<LendingTransactionTypes>([
115
115
*/
116
116
const earnControllerMetadata : StateMetadata < EarnControllerState > = {
117
117
pooled_staking : {
118
- includeInStateLogs : false ,
118
+ includeInStateLogs : true ,
119
119
persist : true ,
120
120
anonymous : false ,
121
121
usedInUi : true ,
You can’t perform that action at this time.
0 commit comments