Skip to content

Commit

Permalink
fix: read events directly from resp and not logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bcsainju committed Aug 2, 2024
1 parent 246017f commit 001cf6d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions relayer/chains/wasm/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1309,17 +1309,15 @@ func parseEventsFromTxResponse(resp *sdk.TxResponse) []provider.RelayerEvent {
return events
}

for _, logs := range resp.Logs {
for _, event := range logs.Events {
attributes := make(map[string]string)
for _, attribute := range event.Attributes {
attributes[attribute.Key] = attribute.Value
}
events = append(events, provider.RelayerEvent{
EventType: event.Type,
Attributes: attributes,
})
for _, event := range resp.Events {
attributes := make(map[string]string)
for _, attribute := range event.Attributes {
attributes[attribute.Key] = attribute.Value
}
events = append(events, provider.RelayerEvent{
EventType: event.Type,
Attributes: attributes,
})
}
return events
}
Expand Down

0 comments on commit 001cf6d

Please sign in to comment.