Skip to content

Commit

Permalink
fix(authz): check string is not empty (#18209)
Browse files Browse the repository at this point in the history
(cherry picked from commit 19eaac3)

# Conflicts:
#	x/authz/generic_authorization.go
  • Loading branch information
tac0turtle authored and mergify[bot] committed Oct 23, 2023
1 parent 535567e commit c62ebb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x/authz/generic_authorization.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package authz

import (
<<<<<<< HEAD

Check failure on line 4 in x/authz/generic_authorization.go

View workflow job for this annotation

GitHub Actions / split-test-files

missing import path
context "context"
=======
"context"
"errors"
>>>>>>> 19eaac3ba (fix(authz): check string is not empty (#18209))

sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -27,5 +32,8 @@ func (a GenericAuthorization) Accept(ctx context.Context, msg sdk.Msg) (AcceptRe

// ValidateBasic implements Authorization.ValidateBasic.
func (a GenericAuthorization) ValidateBasic() error {
if a.Msg == "" {
return errors.New("msg type cannot be empty")
}
return nil
}

0 comments on commit c62ebb8

Please sign in to comment.