Skip to content

Commit

Permalink
fix(protocol): make sure new instance is not zero address in SgxVerif…
Browse files Browse the repository at this point in the history
…ier (#17918)
  • Loading branch information
dantaik authored Aug 15, 2024
1 parent 64ed666 commit d559ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/verifiers/SgxVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ contract SgxVerifier is EssentialContract, IVerifier {

if (!_isInstanceValid(id, oldInstance)) revert SGX_INVALID_INSTANCE();

if (oldInstance != newInstance) {
if (newInstance != oldInstance && newInstance != address(0)) {
_replaceInstance(id, oldInstance, newInstance);
}
}
Expand Down

0 comments on commit d559ce8

Please sign in to comment.