Skip to content

Commit

Permalink
avoid deterministic iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
Duong Minh Ngoc committed Feb 27, 2024
1 parent f2431f1 commit 28c08ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/upgrades/account_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"

"github.com/quicksilver-zone/quicksilver/app/keepers"
"github.com/quicksilver-zone/quicksilver/utils"
"github.com/quicksilver-zone/quicksilver/utils/addressutils"
)

Expand All @@ -25,7 +26,9 @@ func migrateIngenuityMultisigToNotional(ctx sdk.Context, appKeepers *keepers.App

// Migrate a map of address pairs and migrate from key -> value
func migrateVestingAccounts(ctx sdk.Context, appKeepers *keepers.AppKeepers, migrations map[string]string, strategy ProcessMigrateAccountStrategy) error {
for fromBech32, toBech32 := range migrations {
for _, fromBech32 := range utils.Keys(migrations) {
toBech32 := migrations[fromBech32]

from, err := addressutils.AccAddressFromBech32(fromBech32, "quick")
if err != nil {
return err
Expand Down

0 comments on commit 28c08ad

Please sign in to comment.