Skip to content

Commit

Permalink
Use require instead of assert
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes committed Dec 9, 2022
1 parent 6b4dbcf commit be2c3b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions multisig-ism/src/main.sw
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ impl MultisigIsm for Contract {
let calculated_root = StorageMerkleTree::branch_root(message.id(), metadata.proof, metadata.index);
require(metadata.root == calculated_root, "!merkle");

<<<<<<< HEAD
let origin = message.origin();
require(metadata.commitment() == storage.commitment.get(origin), "!commitment");
=======
let commitment = metadata.commitment();
require(commitment == storage.commitment.get(message.origin_domain), "!commitment");
>>>>>>> 5bcff5c (Use require instead of assert)

require(metadata.threshold <= metadata.signatures.len(), "!threshold");

Expand Down

0 comments on commit be2c3b4

Please sign in to comment.