--- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -1440,7 +1440,7 @@ // check token limit and account token limit let total_items: u32 = ItemListIndex::get(collection_id); - let account_items: u32 = >::get(collection_id, sender.clone()).len() as u32; + let account_items: u32 = >::get(collection_id, owner.clone()).len() as u32; ensure!(collection.limits.token_limit > total_items, Error::::CollectionTokenLimitExceeded); ensure!(collection.limits.account_token_ownership_limit > account_items, Error::::AccountTokenLimitExceeded); ensure!(collection.mint_mode == true, Error::::PublicMintingNotAllowed);