Skip to content

Commit

Permalink
Include last transaction ID as asset metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Venzi <[email protected]>
  • Loading branch information
samuelvenzi committed Aug 28, 2024
1 parent a32bd38 commit ac45220
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func (a *Asset) injectMetadata(stub *sw.StubWrapper) errors.ICCError {
}
(*a)["@lastUpdated"] = lastUpdated.AsTime().Format(time.RFC3339)

lastTxID := stub.Stub.GetTxID()
(*a)["@lastTxID"] = lastTxID

return nil
}

Expand Down

0 comments on commit ac45220

Please sign in to comment.