Skip to content

Commit

Permalink
fix: fix the store upgrade for metoken on v6.1.0 (#2278)
Browse files Browse the repository at this point in the history
* fix the storeupgrade for metoken on v6.1.0

* retrigger checks

---------

Co-authored-by: Egor Kostetskiy <[email protected]>
  • Loading branch information
gsk967 and kosegor authored Oct 10, 2023
1 parent c0ed683 commit b165e04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/umee-network/umee/v6/x/incentive"
leveragekeeper "github.com/umee-network/umee/v6/x/leverage/keeper"
leveragetypes "github.com/umee-network/umee/v6/x/leverage/types"
"github.com/umee-network/umee/v6/x/metoken"

oraclemigrator "github.com/umee-network/umee/v6/x/oracle/migrations"
oracletypes "github.com/umee-network/umee/v6/x/oracle/types"
Expand Down Expand Up @@ -60,7 +61,7 @@ func (app UmeeApp) RegisterUpgradeHandlers() {
app.registerUpgrade6_1("v6.1", upgradeInfo)
}

func (app *UmeeApp) registerUpgrade6_1(planName string, _ upgradetypes.Plan) {
func (app *UmeeApp) registerUpgrade6_1(planName string, upgradeInfo upgradetypes.Plan) {
app.UpgradeKeeper.SetUpgradeHandler(planName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("-----------------------------\n-----------------------------")
Expand All @@ -77,6 +78,10 @@ func (app *UmeeApp) registerUpgrade6_1(planName string, _ upgradetypes.Plan) {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
)

app.storeUpgrade(planName, upgradeInfo, storetypes.StoreUpgrades{
Added: []string{metoken.ModuleName},
})
}

func (app *UmeeApp) registerUpgrade6(upgradeInfo upgradetypes.Plan) {
Expand Down

0 comments on commit b165e04

Please sign in to comment.