From b8285b3925cb28155dc59c4b72f5d43ed34e9c55 Mon Sep 17 00:00:00 2001 From: Ranadeep Biswas Date: Fri, 26 Jul 2024 23:37:05 +0200 Subject: [PATCH] refactor --- contracts/src/utils.cairo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/src/utils.cairo b/contracts/src/utils.cairo index 2d5c440a..721af5d6 100644 --- a/contracts/src/utils.cairo +++ b/contracts/src/utils.cairo @@ -42,9 +42,9 @@ pub fn felt252_to_bytes(felt: felt252) -> ByteArray { break; } - let byte_value: u8 = (remaining % 0x100).try_into().unwrap(); // 256 + let byte_value = remaining % 0x100; // 256 - result.append_byte(byte_value); + result.append_byte(byte_value.try_into().unwrap()); remaining /= 0x100; // 256 };