Skip to content

Commit

Permalink
chore: update v6 upgrade handler for v6.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoM committed Dec 19, 2024
1 parent 6a043f3 commit e5e618e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 115 deletions.
31 changes: 0 additions & 31 deletions app/upgrades/v6/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ package v6

import (
"context"
"maps"
"slices"
"strings"

upgradetypes "cosmossdk.io/x/upgrade/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/milkyway-labs/milkyway/v6/app/keepers"
Expand All @@ -25,33 +21,6 @@ func CreateUpgradeHandler(
return nil, err
}

// Unwrap the context
sdkCtx := sdk.UnwrapSDKContext(ctx)

// Remove all the markets except from the TIA/USD market
markets, err := keepers.MarketMapKeeper.GetAllMarkets(sdkCtx)
if err != nil {
return nil, err
}

for _, ticker := range slices.Sorted(maps.Keys(markets)) {
market := markets[ticker]

if strings.Contains(ticker, "TIA") {
continue
}

err = keepers.MarketMapKeeper.DeleteMarket(sdkCtx, ticker)
if err != nil {
return nil, err
}

err = keepers.OracleKeeper.RemoveCurrencyPair(sdkCtx, market.Ticker.CurrencyPair)
if err != nil {
return nil, err
}
}

keepers.AccountKeeper.GetModuleAccount(ctx, liquidvestingtypes.ModuleName)

return vm, nil
Expand Down
84 changes: 0 additions & 84 deletions app/upgrades/v6/upgrades_test.go

This file was deleted.

0 comments on commit e5e618e

Please sign in to comment.