Skip to content

Commit 683d4f8

Browse files
authored
Remove redundant kernel check in AragonApp.getRecoveryVault() (#433)
* 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
1 parent 7d70ffe commit 683d4f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contracts/apps/AragonApp.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ contract AragonApp is AppStorage, Autopetrified, VaultRecoverable, EVMScriptRunn
6262
*/
6363
function getRecoveryVault() public view returns (address) {
6464
// Funds recovery via a vault is only available when used with a kernel
65-
require(address(kernel()) != address(0));
66-
return kernel().getRecoveryVault();
65+
return kernel().getRecoveryVault(); // if kernel is not set, it will revert
6766
}
6867
}

0 commit comments

Comments
 (0)