Skip to content

Commit

Permalink
fix _beforeTokenTransfer issue on MasaSBTDynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Nov 7, 2023
1 parent 40796f5 commit b01f445
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions contracts/tokens/MasaSBTDynamic.sol
Expand Up @@ -96,8 +96,7 @@ abstract contract MasaSBTDynamic is MasaSBT {

for (uint256 i = 0; i < _afterMintStates.length; i++) {
if (
keccak256(bytes(_afterMintStates[i])) ==
keccak256(bytes(state))
keccak256(bytes(_afterMintStates[i])) == keccak256(bytes(state))
) {
_afterMintStates[i] = _afterMintStates[
_afterMintStates.length - 1
Expand Down Expand Up @@ -178,10 +177,12 @@ abstract contract MasaSBTDynamic is MasaSBT {
/// @notice Checks if a token can be minted
/// @dev Checks if all beforeMintStates are set for the account
function _beforeTokenTransfer(
address,
address from,
address to,
uint256
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);

if (to != address(0)) {
if (!allBeforeMintStatesSet(to)) revert NotAllBeforeMintStatesSet();
}
Expand Down

0 comments on commit b01f445

Please sign in to comment.