Skip to content

Commit

Permalink
fix: fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoM authored and MonikaCat committed Jan 5, 2024
1 parent 57be4c2 commit 2f3e285
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/messages/account_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func GovMessagesParser(cdc codec.Codec, cosmosMsg sdk.Msg) ([]string, error) {

// Get addresses from contents
switch content := content.(type) {
//nolint:staticcheck // Let's keep this for the time being
case *distrtypes.CommunityPoolSpendProposal:
addresses = append(addresses, content.Recipient)
}
Expand Down
2 changes: 1 addition & 1 deletion types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func FindEventsByType(events []abci.Event, eventType string) []abci.Event {

func FindAttributeByKey(event abci.Event, attrKey string) (abci.EventAttribute, error) {
for _, attr := range event.Attributes {
if string(attr.Key) == attrKey {
if attr.Key == attrKey {

Check failure on line 47 in types/utils.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid operation: attr.Key == attrKey (mismatched types []byte and string) (typecheck)

Check failure on line 47 in types/utils.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid operation: attr.Key == attrKey (mismatched types []byte and string)) (typecheck)

Check failure on line 47 in types/utils.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid operation: attr.Key == attrKey (mismatched types []byte and string)) (typecheck)

Check failure on line 47 in types/utils.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid operation: attr.Key == attrKey (mismatched types []byte and string)) (typecheck)

Check failure on line 47 in types/utils.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid operation: attr.Key == attrKey (mismatched types []byte and string)) (typecheck)
return attr, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion types/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func FindEventsByType(events []abci.Event, eventType string) []abci.Event {

func FindAttributeByKey(event abci.Event, attrKey string) (abci.EventAttribute, error) {
for _, attr := range event.Attributes {
if string(attr.Key) == attrKey {
if attr.Key == attrKey {
return attr, nil
}
}
Expand Down

0 comments on commit 2f3e285

Please sign in to comment.