Skip to content

Commit

Permalink
Merge pull request oasisprotocol#2104 from oasisprotocol/ptrus/featur…
Browse files Browse the repository at this point in the history
…e/gettxwithres-event-txhash

client-sdk/go: GetTransactionWithResults include txhash in events
  • Loading branch information
ptrus authored Dec 10, 2024
2 parents 7f9efcf + d0af663 commit 2da6d80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client-sdk/go/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ func (rc *runtimeClient) GetTransactionsWithResults(ctx context.Context, round u
_ = cbor.Unmarshal(raw.Tx, &tx.Tx) // Ignore errors as there can be invalid transactions.
_ = cbor.Unmarshal(raw.Result, &tx.Result)

txHash := tx.Tx.Hash()
for _, rawEv := range raw.Events {
var ev types.Event
if err := ev.UnmarshalRaw(rawEv.Key, rawEv.Value, nil); err != nil {
if err := ev.UnmarshalRaw(rawEv.Key, rawEv.Value, &txHash); err != nil {
continue
}

Expand Down

0 comments on commit 2da6d80

Please sign in to comment.