Skip to content

Commit

Permalink
Remove redundant kernel check in AragonApp.getRecoveryVault() (#433)
Browse files Browse the repository at this point in the history
* Remove redundant checks before making calls

When using the native call syntax `target.method(...)` solc introduces
a check for the code size of the target (and reverts if it is 0), therefore
we don't need to manually ensure that the target address is not 0 before making
a call, as the size of the address 0 will be 0, and therefore already revert

* Revert removing ACL existence check in kernel.hasPermission
  • Loading branch information
izqui authored Oct 8, 2018
1 parent 7d70ffe commit 683d4f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions contracts/apps/AragonApp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ contract AragonApp is AppStorage, Autopetrified, VaultRecoverable, EVMScriptRunn
*/
function getRecoveryVault() public view returns (address) {
// Funds recovery via a vault is only available when used with a kernel
require(address(kernel()) != address(0));
return kernel().getRecoveryVault();
return kernel().getRecoveryVault(); // if kernel is not set, it will revert
}
}

0 comments on commit 683d4f8

Please sign in to comment.