git.delta.rocks / unique-network / refs/commits / a3a3322da1f8

difftreelog

addres token limit fix

str-mv2020-12-11parent: #c36ef78.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
14401440
1441 // check token limit and account token limit1441 // check token limit and account token limit
1442 let total_items: u32 = ItemListIndex::get(collection_id);1442 let total_items: u32 = ItemListIndex::get(collection_id);
1443 let account_items: u32 = <AddressTokens<T>>::get(collection_id, sender.clone()).len() as u32;1443 let account_items: u32 = <AddressTokens<T>>::get(collection_id, owner.clone()).len() as u32;
1444 ensure!(collection.limits.token_limit > total_items, Error::<T>::CollectionTokenLimitExceeded);1444 ensure!(collection.limits.token_limit > total_items, Error::<T>::CollectionTokenLimitExceeded);
1445 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);1445 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);
1446 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);1446 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);