File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package app
22
33import (
44 "context"
5+ "errors"
56 "fmt"
67 "strings"
78
@@ -66,6 +67,18 @@ func (app *ElysApp) setUpgradeHandler() {
6667
6768 app .OracleKeeper .EndBlock (ctx )
6869
70+ allPerpetualPools := app .PerpetualKeeper .GetAllPools (ctx )
71+ for _ , pool := range allPerpetualPools {
72+ ammPool , found := app .AmmKeeper .GetPool (ctx , pool .AmmPoolId )
73+ if ! found {
74+ return vm , errors .New ("amm pool not found during migration" )
75+ }
76+ err := app .AccountedPoolKeeper .PerpetualUpdates (ctx , ammPool , pool )
77+ if err != nil {
78+ return vm , err
79+ }
80+ }
81+
6982 //oracleParams := app.OracleKeeper.GetParams(ctx)
7083 //if len(oracleParams.MandatoryList) == 0 {
7184 // err := app.ojoOracleMigration(ctx, plan.Height+1)
You can’t perform that action at this time.
0 commit comments