diff --git a/contracts/contracts/coordination/Coordinator.sol b/contracts/contracts/coordination/Coordinator.sol index 6294398e..ee3e6598 100644 --- a/contracts/contracts/coordination/Coordinator.sol +++ b/contracts/contracts/coordination/Coordinator.sol @@ -457,7 +457,9 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable address provider ) internal view returns (Participant storage) { (bool found, , Participant storage participant) = findParticipant(ritual, provider); - require(found, "Participant not found"); + if (!found) { + revert("Participant not part of ritual"); + } return participant; } @@ -467,11 +469,10 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable bool transcript ) public view returns (Participant memory, uint256) { Ritual storage ritual = rituals[ritualId]; - (bool found, uint256 index, Participant memory participant) = findParticipant( - ritual, - provider - ); - require(found, "Participant not found"); + (bool found, uint256 index, Participant memory participant) = findParticipant(ritual, provider); + if (!found) { + revert("Participant not part of ritual"); + } if (!transcript) { participant.transcript = ""; }