Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
smsunarto committed Feb 10, 2022
1 parent ea1fcb1 commit b0a7659
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/Persona.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ contract Persona is ERC721 {
owner = newContractOwner;
}

function getOwner(uint256 personaId) public view returns (address) {
return ownerOf[personaId];
}

/*///////////////////////////////////////////////////////////////
VIEW
//////////////////////////////////////////////////////////////*/
Expand Down Expand Up @@ -126,7 +122,7 @@ contract Persona is ERC721 {
return getAuthorization(personaId, user, consumer).isAuthorized;
} else if (getPermission(personaId, user) == PersonaPermission.FUNCTION_SPECIFIC) {
// TODO: Fix this hacky solution
if(fnSignature == bytes4(0)) {
if (fnSignature == bytes4(0)) {
return true;
}
bytes4[] memory fns = getAuthorization(personaId, user, consumer).authorizedFns;
Expand Down
4 changes: 2 additions & 2 deletions src/test/Persona.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ contract PersonaTest is BaseTest {
vm.stopPrank();
}

/// Transfer \\\
/// Transfer \\\
function testTransferOwnership() public {
uint256 id = _mintTo(personaOwner);

vm.startPrank(personaOwner);
persona.transferFrom(address(personaOwner), address(alice), id);
vm.stopPrank();

assertTrue(persona.getOwner(id) == address(alice));
assertTrue(persona.ownerOf(id) == address(alice));
}

function testTransferRemovesAuthorization() public {
Expand Down

0 comments on commit b0a7659

Please sign in to comment.