fix: generating sha in signed_structured_data

This commit is contained in:
Hank Stoever
2024-02-02 09:53:24 -08:00
parent 30decf8645
commit db11669d4a

View File

@@ -29,7 +29,7 @@ pub const STRUCTURED_DATA_PREFIX: [u8; 6] = [0x53, 0x49, 0x50, 0x30, 0x31, 0x38]
pub fn structured_data_hash(value: Value) -> Sha256Sum {
let bytes = value.serialize_to_vec();
Sha256Sum::from_data(&bytes)
Sha256Sum::from_data(&bytes.as_slice())
}
/// Generate a message hash for signing structured Clarity data.