Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed Dec 11, 2024
1 parent 39d5ce7 commit d8048f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 11 additions & 1 deletion protocol/app/upgrades/v8.0/migrate_accountplus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v_8_0_test
import (
"testing"

"github.com/cometbft/cometbft/types"
v_8_0 "github.com/dydxprotocol/v4-chain/protocol/app/upgrades/v8.0"

"cosmossdk.io/store/prefix"
Expand All @@ -24,7 +25,16 @@ func TestMigrateAccountplusAccountState(t *testing.T) {
}

func (s *UpgradeTestSuite) SetupTest() {
s.tApp = testapp.NewTestAppBuilder(s.T()).Build()
s.tApp = testapp.NewTestAppBuilder(s.T()).WithGenesisDocFn(func() (genesis types.GenesisDoc) {
genesis = testapp.DefaultGenesis()
testapp.UpdateGenesisDocWithAppStateForModule(
&genesis,
func(genesisState *accountplustypes.GenesisState) {
genesisState.Params.IsSmartAccountActive = false
},
)
return genesis
}).Build()
s.Ctx = s.tApp.InitChain()
}

Expand Down
6 changes: 5 additions & 1 deletion protocol/x/accountplus/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ package types

// DefaultGenesis returns the default genesis state
func DefaultGenesis() *GenesisState {
return &GenesisState{}
return &GenesisState{
Params: Params{
IsSmartAccountActive: true,
},
}
}

// Validate performs basic genesis state validation returning an error upon any
Expand Down

0 comments on commit d8048f4

Please sign in to comment.