--- a/primitives/nft/src/lib.rs +++ b/primitives/nft/src/lib.rs @@ -248,6 +248,7 @@ pub variable_data: Vec, } +/// All fields are wrapped in `Option`s, where None means chain default #[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo)] #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))] pub struct CollectionLimits { @@ -256,7 +257,7 @@ /// None - setVariableMetadata is not sponsored /// Some(v) - setVariableMetadata is sponsored /// if there is v block between txs - pub sponsored_data_rate_limit: Option, + pub sponsored_data_rate_limit: Option<(Option,)>, pub token_limit: Option, // Timeouts for item types in passed blocks @@ -304,6 +305,8 @@ } pub fn sponsored_data_rate_limit(&self) -> Option { self.sponsored_data_rate_limit + .unwrap_or((None,)) + .0 .map(|v| v.min(MAX_SPONSOR_TIMEOUT)) } }