Skip to content

Commit

Permalink
fix(sdk): add attachment type check (#809)
Browse files Browse the repository at this point in the history
Signed-off-by: Rolson Quadras <[email protected]>
  • Loading branch information
rolsonquadras committed Sep 3, 2024
1 parent a3917bc commit af6fd7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/wallet-sdk-gomobile/display/displaydata.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ func (c *Attachment) ID() string {
// For RemoteAttachment, the uri will be a remote HTTP URL. Hash and HashAlg will provide the hash value of the data along with Hash algorithm used to generate the hash. Consumer of this API need to validate the hash value against the hash of the data object retrieved from the remote url
// For AttachmentEvidence, the uri will be empty. But the hash and hashAlg will provide the hash value of the data along with Hash algorithm used to generate the hash. Consumer of this API need to validate the hash value against the hash of the data object retrieved from the out of band.
func (c *Attachment) Type() string {
if len(c.attachment.Type) == 0 {
return ""
}

return c.attachment.Type[0]
}

Expand Down

0 comments on commit af6fd7b

Please sign in to comment.