diff --git a/app/upgrades/v20/convert.go b/app/upgrades/v20/convert.go index 8591a4c04f..192e89c597 100644 --- a/app/upgrades/v20/convert.go +++ b/app/upgrades/v20/convert.go @@ -26,8 +26,10 @@ import ( ) // storeKey contains the slot in which the balance is stored in the evm. -var storeKey []byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2} -var storeKeyWevmos []byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3} +var ( + storeKey []byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2} + storeKeyWevmos []byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3} +) type parseTokenPairs = []common.Address @@ -123,7 +125,7 @@ func ConvertERC20Coins( } modifiedBalancesAccounts := erc20Keeper.GetAllSTRV2Address(ctx) - var modifiedBalancesWallets = make([]string, len(modifiedBalancesAccounts)) + modifiedBalancesWallets := make([]string, len(modifiedBalancesAccounts)) for i, addr := range modifiedBalancesAccounts { modifiedBalancesWallets[i] = addr.String() } diff --git a/app/upgrades/v20/fixes/missingWallets.go b/app/upgrades/v20/fixes/missingWallets.go index e6ea0032ea..a0b2825ef4 100644 --- a/app/upgrades/v20/fixes/missingWallets.go +++ b/app/upgrades/v20/fixes/missingWallets.go @@ -119,7 +119,8 @@ func GetAllMissingWallets() []string { } func GetMissingWalletsFromAuthModule(ctx sdk.Context, - accountKeeper authkeeper.AccountKeeper) (Addresses []string) { + accountKeeper authkeeper.AccountKeeper, +) (Addresses []string) { missingWallets := GetAllMissingWallets() for _, wallet := range missingWallets { ethAddr := common.HexToAddress(wallet) diff --git a/app/upgrades/v20/upgrades.go b/app/upgrades/v20/upgrades.go index b9aed050c4..c9f7c59976 100644 --- a/app/upgrades/v20/upgrades.go +++ b/app/upgrades/v20/upgrades.go @@ -32,6 +32,11 @@ func CreateUpgradeHandler( logger.Debug("deleting revenue module from version map...") delete(vm, "revenue") + uvm, err := mm.RunMigrations(ctx, configurator, vm) + if err != nil { + return uvm, err + } + // Leave modules as-is to avoid running InitGenesis. // Get EVM denomination evmDenom := ek.GetParams(ctx).EvmDenom @@ -72,6 +77,6 @@ func CreateUpgradeHandler( // Leave modules are as-is to avoid running InitGenesis. logger.Debug("running module migrations ...") - return mm.RunMigrations(ctx, configurator, vm) + return uvm, err } }