diff --git a/app/app_upgrades.go b/app/app_upgrades.go index 737ec915..5e4b014c 100644 --- a/app/app_upgrades.go +++ b/app/app_upgrades.go @@ -23,6 +23,7 @@ func (app *App) SetUpgradeHandlers() { setHandlerForVersion_1_2(app) setHandlerForVersion_1_2_2(app) setHandlerForVersion_1_2_3(app) + setHandlerForVersion_1_2_4(app) } func setHandlerForVersion_1_0(app *App) { @@ -161,3 +162,29 @@ func setHandlerForVersion_1_2_3(app *App) { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } } +func setHandlerForVersion_1_2_4(app *App) { + const upgradeVersion string = "v1.2.4" + + app.UpgradeKeeper.SetUpgradeHandler(upgradeVersion, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + + upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() + if err != nil { + panic(err) + } + + if upgradeInfo.Name == upgradeVersion && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + storeUpgrades := storetypes.StoreUpgrades{ + Added: []string{}, + Deleted: []string{ + AddressBookModuleName, + MarketplaceModuleName, + NftModuleName, + GroupModuleName, + }, + } + + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) + } +}