From 442d14a2f734e716b07202762d1edc9afe96f114 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Fri, 13 Oct 2023 11:16:04 +0000 Subject: [PATCH] fix: mint_with_props_weight --- --- a/pallets/nonfungible/src/common.rs +++ b/pallets/nonfungible/src/common.rs @@ -110,12 +110,16 @@ } } +/// Weight of minting tokens with properties +/// * `create_no_data_weight` -- the weight of minting without properties +/// * `token_properties_nums` -- number of properties of each token +#[inline] pub(crate) fn mint_with_props_weight( create_no_data_weight: Weight, - tokens: impl Iterator + Clone, + token_properties_nums: impl Iterator + Clone, ) -> Weight { create_no_data_weight.saturating_add(write_token_properties_total_weight::( - tokens, + token_properties_nums, >::write_token_properties, )) } --- a/pallets/refungible/src/common.rs +++ b/pallets/refungible/src/common.rs @@ -130,12 +130,16 @@ } } +/// Weight of minting tokens with properties +/// * `create_no_data_weight` -- the weight of minting without properties +/// * `token_properties_nums` -- number of properties of each token +#[inline] pub(crate) fn mint_with_props_weight( create_no_data_weight: Weight, - tokens: impl Iterator + Clone, + token_properties_nums: impl Iterator + Clone, ) -> Weight { create_no_data_weight.saturating_add(write_token_properties_total_weight::( - tokens, + token_properties_nums, >::write_token_properties, )) } -- gitstuff