From 5b7d7866624f07b79a4c6b9c3fcb446af40657ff Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 1 Mar 2024 01:31:22 -0500 Subject: [PATCH] fix: sigType and mhashType are int8 --- metadata/media_metadata.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metadata/media_metadata.go b/metadata/media_metadata.go index 143ea94..f5e210f 100644 --- a/metadata/media_metadata.go +++ b/metadata/media_metadata.go @@ -104,18 +104,18 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error { } for j := 0; j < len(proofData); j++ { - var mhashType int + var mhashType int8 var pubkey []byte var signature []byte switch j { case 0: - sigType := proofData[j].(int) + sigType := proofData[j].(int8) if types.MetadataProofType(sigType) != types.MetadataProofTypeSignature { return errors.New("Invalid proof type") } case 1: - mhashType = proofData[j].(int) + mhashType = proofData[j].(int8) if types.HashType(mhashType) != types.HashTypeBlake3 { return errors.New("Invalid hash type") }