Skip to content

Commit

Permalink
tokenURI math improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Splidge committed Aug 25, 2021
1 parent f5fa3b3 commit 3990f28
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions contracts/RCFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,8 @@ contract RCFactory is NativeMetaTransaction, IRCFactory {
/// @dev we want different tokenURIs for originals and copies
/// @dev ..the copies are appended to the end of the array
/// @dev ..so half the array length if the number of tokens.
require(
(_tokenURIs.length / 2) <= cardLimit,
"Too many tokens to mint"
);
require(_tokenURIs.length <= cardLimit * 2, "Too many tokens to mint");
require(_tokenURIs.length % 2 == 0, "TokenURI Length Error");

// check stakeholder addresses
// artist
Expand All @@ -714,7 +712,7 @@ contract RCFactory is NativeMetaTransaction, IRCFactory {
// affiliate
require(
_cardAffiliateAddresses.length == 0 ||
_cardAffiliateAddresses.length == (_tokenURIs.length / 2),
_cardAffiliateAddresses.length * 2 == _tokenURIs.length,
"Card Affiliate Length Error"
);
if (approvedAffiliatesOnly) {
Expand Down

0 comments on commit 3990f28

Please sign in to comment.