Skip to content

Commit

Permalink
updated attr key to string
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaCat committed Jan 4, 2024
1 parent 926187d commit dd91c52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion database/postgresql/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func Builder(ctx *database.Context) (database.Database, error) {
postgresDb.SetMaxIdleConns(ctx.Cfg.MaxIdleConnections)

return &Database{
Cdc: ctx.EncodingConfig.Codec,
Cdc: ctx.EncodingConfig.Marshaler,
Amino: ctx.EncodingConfig.Amino,

SQL: postgresDb,
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 attr.Key == attrKey {
if string(attr.Key) == attrKey {
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 attr.Key == attrKey {
if string(attr.Key) == attrKey {
return attr, nil
}
}
Expand Down

0 comments on commit dd91c52

Please sign in to comment.