Skip to content

Commit

Permalink
split assertion checks in two statements
Browse files Browse the repository at this point in the history
  • Loading branch information
achab committed Aug 9, 2022
1 parent d87945b commit 1e71146
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/openzeppelin/access/ownable/library.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ namespace Ownable:
}():
let (owner) = Ownable.owner()
let (caller) = get_caller_address()
with_attr error_message("Ownable: caller is not the owner"):
with_attr error_message("Ownable: caller is the zero address"):
assert_not_zero(caller)
end
with_attr error_message("Ownable: caller is not the owner"):
assert owner = caller
end
return ()
Expand Down

0 comments on commit 1e71146

Please sign in to comment.