--- a/pallets/nft/src/tests.rs +++ b/pallets/nft/src/tests.rs @@ -1831,7 +1831,11 @@ )); } assert_noop!( - TemplateModule::add_collection_admin(origin1, collection_id, account(3 + COLLECTION_ADMINS_LIMIT)), + TemplateModule::add_collection_admin( + origin1, + collection_id, + account(3 + COLLECTION_ADMINS_LIMIT) + ), Error::::CollectionAdminsLimitExceeded ); }); --- a/primitives/nft/src/lib.rs +++ b/primitives/nft/src/lib.rs @@ -28,10 +28,22 @@ pub const MAX_SPONSOR_TIMEOUT: u32 = 10_368_000; pub const MAX_TOKEN_OWNERSHIP: u32 = 10_000_000; -pub const COLLECTION_NUMBER_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { 100000 } else { 10 }; -pub const CUSTOM_DATA_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { 2048 } else { 10 }; +pub const COLLECTION_NUMBER_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { + 100000 +} else { + 10 +}; +pub const CUSTOM_DATA_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { + 2048 +} else { + 10 +}; pub const COLLECTION_ADMINS_LIMIT: u64 = 5; -pub const ACCOUNT_TOKEN_OWNERSHIP_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { 1000000 } else { 10 }; +pub const ACCOUNT_TOKEN_OWNERSHIP_LIMIT: u32 = if cfg!(not(feature = "limit-testing")) { + 1000000 +} else { + 10 +}; // Timeouts for item types in passed blocks pub const NFT_SPONSOR_TRANSFER_TIMEOUT: u32 = 5;