From 76a1e85283f9e92b758cb0829548bcfbd60250ec Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 12 Dec 2024 12:27:23 +0100 Subject: [PATCH] fix: token_id (#346) --- src/utils.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 0f22b8f..8bbab3a 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -55,7 +55,9 @@ pub async fn get_nft( ) -> Result<(u64, Signature), Box> { let token_id = match nft_level < 100 { true => nft_level as u64 + 100 * (rand::random::() % (2u64.pow(32))), - false => (rand::random::() + nft_level as u64 * 0x2000000) * 100 + 99, + false => { + (rand::random::() / 100 / 0x2000000 * 0x2000000 + nft_level as u64) * 100 + 99 + } }; let hashed = pedersen_hash( &pedersen_hash(