Skip to content

Commit

Permalink
Remove redundant check when owner is set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
auryn-macmillan committed Sep 10, 2021
1 parent 1bef9c1 commit ad2579a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion contracts/ScopeGuard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ contract ScopeGuard is FactoryFriendly, BaseGuard {
function setUp(bytes memory initializeParams) public override {
__Ownable_init();
address _owner = abi.decode(initializeParams, (address));
require(_owner != address(0), "Owner can not be zero address");

transferOwnership(_owner);

Expand Down
2 changes: 1 addition & 1 deletion test/ScopeGuard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("ScopeGuard", async () => {
it("throws if owner is zero address", async () => {
const Guard = await hre.ethers.getContractFactory("ScopeGuard");
await expect(Guard.deploy(AddressZero)).to.be.revertedWith(
"Owner can not be zero address"
"Ownable: new owner is the zero address"
);
});

Expand Down

0 comments on commit ad2579a

Please sign in to comment.