Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jul 20, 2022
1 parent 97dcf3e commit 9a48570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions x/bank/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,11 @@ func (m Migrator) Migrate2to3(ctx sdk.Context) error {

// Migrate3to4 migrates x/bank storage from version 3 to 4.
func (m Migrator) Migrate3to4(ctx sdk.Context) error {
if err := v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc); err != nil {
return err
}

oldParams := m.keeper.GetParams(ctx)
m.keeper.SetAllSendEnabled(ctx, oldParams.GetSendEnabled())
if err := m.keeper.SetParams(ctx, banktypes.NewParams(oldParams.DefaultSendEnabled)); err != nil {
return fmt.Errorf("failed to set params: %w", err)
}

return nil
return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc)
}
4 changes: 2 additions & 2 deletions x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank/client/cli"
"github.com/cosmos/cosmos-sdk/x/bank/exported"
"github.com/cosmos/cosmos-sdk/x/bank/keeper"
bankv1 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v1"
"github.com/cosmos/cosmos-sdk/x/bank/simulation"
"github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
)

// ConsensusVersion defines the current x/bank module consensus version.
Expand Down Expand Up @@ -95,7 +95,7 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
types.RegisterInterfaces(registry)

// Register legacy interfaces for migration scripts.
v1.RegisterInterfaces(registry)
bankv1.RegisterInterfaces(registry)
}

// AppModule implements an application module for the bank module.
Expand Down

0 comments on commit 9a48570

Please sign in to comment.