Skip to content

Commit

Permalink
fix: updating mock roles registry implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
EDUARDO MELO DE SIQUEIRA authored and EDUARDO MELO DE SIQUEIRA committed Jul 8, 2024
1 parent 62a3610 commit e9699d2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions contracts/mocks/SftRolesRegistrySingleRole.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,9 @@ contract SftRolesRegistrySingleRole is IERC7589, ERC1155Holder, IERC7589LockToke
uint256 _tokenId = tokenLocks[_lockId].tokenId;
uint256 _tokenAmount = tokenLocks[_lockId].tokenAmount;
delete tokenLocks[_lockId];
emit TokensUnlocked(_lockId);

_transferFrom(address(this), _owner, _tokenAddress, _tokenId, _tokenAmount);

}
emit TokensUnlocked(_lockId);
}

function setRoleApprovalForAll(address _tokenAddress, address _operator, bool _approved) external {
roleApprovals[msg.sender][_tokenAddress][_operator] = _approved;
Expand Down Expand Up @@ -254,9 +252,9 @@ contract SftRolesRegistrySingleRole is IERC7589, ERC1155Holder, IERC7589LockToke
require(_tokenAmount > 0, 'ERC7589RolesRegistry: tokenAmount must be greater than zero');
lockId_ = ++lockIdCount;
tokenLocks[lockId_] = TokenLock(_owner, _tokenAddress, _tokenId, _tokenAmount);
emit TokensLocked(_owner, lockId_, _tokenAddress, _tokenId, _tokenAmount);
_transferFrom(_owner, address(this), _tokenAddress, _tokenId, _tokenAmount);
}
emit TokensLocked(_owner, lockId_, _tokenAddress, _tokenId, _tokenAmount);
}

function _grantERC7589Role(
uint256 _lockId,
Expand Down

0 comments on commit e9699d2

Please sign in to comment.