Skip to content

Commit

Permalink
Update app/upgrades.go
Browse files Browse the repository at this point in the history
Signed-off-by: mmsqe <[email protected]>
  • Loading branch information
mmsqe authored Oct 12, 2024
1 parent c837f93 commit 5db4448
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ func (app *ChainApp) RegisterUpgradeHandlers(cdc codec.BinaryCodec) {
var params types.Params

Check failure on line 25 in app/upgrades.go

View workflow job for this annotation

GitHub Actions / golangci-lint

S1021: should merge variable declaration with assignment on next line (gosimple)
params = app.ICAHostKeeper.GetParams(sdkCtx)
msg := "/ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe"
if (len(params.AllowMessages) > 1 || params.AllowMessages[0] != "*") &&
!slices.Contains(params.AllowMessages, msg) {
if !slices.ContainsFunc(params.AllowMessages, func(allowMsg string) bool {
return allowMsg == "*" || allowMsg == msg
}) {
params.AllowMessages = append(params.AllowMessages, msg)
app.ICAHostKeeper.SetParams(sdkCtx, params)

Check warning on line 32 in app/upgrades.go

View check run for this annotation

Codecov / codecov/patch

app/upgrades.go#L25-L32

Added lines #L25 - L32 were not covered by tests
}
Expand Down

0 comments on commit 5db4448

Please sign in to comment.