diff --git a/protocol/app/upgrades/v8.0/migrate_accountplus_test.go b/protocol/app/upgrades/v8.0/migrate_accountplus_test.go index ce46cbf01ea..c8c70ab0057 100644 --- a/protocol/app/upgrades/v8.0/migrate_accountplus_test.go +++ b/protocol/app/upgrades/v8.0/migrate_accountplus_test.go @@ -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" @@ -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() } diff --git a/protocol/x/accountplus/types/genesis.go b/protocol/x/accountplus/types/genesis.go index 315d5df0ae2..877a02b489f 100644 --- a/protocol/x/accountplus/types/genesis.go +++ b/protocol/x/accountplus/types/genesis.go @@ -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