diff --git a/contracts/logic/NftDistributor.sol b/contracts/logic/NftDistributor.sol index 7c20d92..dd4ae05 100644 --- a/contracts/logic/NftDistributor.sol +++ b/contracts/logic/NftDistributor.sol @@ -99,12 +99,12 @@ contract NftDistributor is AccessControlEnumerable { if (!nftMinted[nftSId]) { // If the NFT is mintable, add it to the list to be minted uint256 nftId = _nftIds[index]; - index++; + // Add the NFT's source ID to the list of sources + nftSource[index] = nftSId; nftMinted[nftSId] = true; // Mint the NFT to the user's address nft.mint(_user, nftId); - // Add the NFT's source ID to the list of sources - nftSource[index] = (nftSId); + index++; } } // Emit event with details of the minting operation