diff --git a/x/bank/keeper/migrations.go b/x/bank/keeper/migrations.go index 9ab026250c97e..80afd55fdbfdd 100644 --- a/x/bank/keeper/migrations.go +++ b/x/bank/keeper/migrations.go @@ -32,13 +32,14 @@ func (m Migrator) Migrate2to3(ctx sdk.Context) error { // Migrate3to4 migrates x/bank storage from version 3 to 4. func (m Migrator) Migrate3to4(ctx sdk.Context) error { + m.MigrateSendEnabledParams(ctx) return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } -// Migrate3to4WithSendEnabledParams migrates x/bank storage from version 3 to 4 with +// MigrateSendEnabledParams migrates x/bank storage from version 3 to 4 with // the send enabled params get from x/params and update the bank params. -func (m Migrator) Migrate3to4WithSendEnabledParams(ctx sdk.Context) error { +// This function is only needed for chains having migrated from <= v0.47 to v0.47.0-5 +func (m Migrator) MigrateSendEnabledParams(ctx sdk.Context) { sendEnabled := types.GetSendEnabledParams(ctx, m.legacySubspace) m.keeper.SetAllSendEnabled(ctx, sendEnabled) - return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) } diff --git a/x/bank/module.go b/x/bank/module.go index e8c7cdbf2932b..07b4f3824b7bd 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -197,12 +197,6 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp ) } -// MigrateSubspaceParams get send enabled params from x/params and update the bank params. -func (am AppModule) MigrateSubspaceParams(ctx sdk.Context) { - sendEnabled := types.GetSendEnabledParams(ctx, am.legacySubspace) - am.keeper.SetAllSendEnabled(ctx, sendEnabled) -} - // App Wiring Setup func init() {