Skip to content

Commit

Permalink
remove the if judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
skyargos committed Sep 11, 2023
1 parent 9cc59f3 commit 0a1c077
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/upgrade_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,7 @@ func transDescriptionForBank(ctx sdk.Context, app ShentuApp) (err error) {
metaData := baseKeeper.GetAllDenomMetaData(ctx)

for _, meta := range metaData {
if meta.Description == "The native staking token of the CertiK Chain." {
meta.Description = "The native staking token of the Shentu Chain."
}
meta.Description = "The native staking token of the Shentu Chain."
baseKeeper.SetDenomMetaData(ctx, meta)
}
return nil
Expand Down
4 changes: 2 additions & 2 deletions app/upgrade_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ func checkBank(ctx sdk.Context, app *ShentuApp, old bool) error {
for _, meta := range metaData {
if old {
if meta.Description != oldDescription {
return errors.New("asd")
return errors.New("bank migration error")
}
} else {
if meta.Description != newDescription {
return errors.New("asd")
return errors.New("bank migration error")
}
}
}
Expand Down

0 comments on commit 0a1c077

Please sign in to comment.