Skip to content

Commit 6b9306c

Browse files
committed
less bool flips
1 parent 095d1c5 commit 6b9306c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

noir-projects/aztec-nr/aztec/src/event/event_interface.nr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ where
135135
assert_constant(delivery_mode);
136136

137137
// The following maps out the 3 dimensions across which we configure message delivery.
138-
let unconstrained_encryption = delivery_mode != MessageDelivery.CONSTRAINED_ONCHAIN;
138+
let constrained_encryption = delivery_mode == MessageDelivery.CONSTRAINED_ONCHAIN;
139139
let emit_as_offchain_message = delivery_mode == MessageDelivery.UNCONSTRAINED_OFFCHAIN;
140140
// TODO(#14565): Add constrained tagging
141141
let _constrained_tagging = delivery_mode == MessageDelivery.CONSTRAINED_ONCHAIN;
142142

143143
let (ciphertext, randomness) = remove_constraints_if(
144-
unconstrained_encryption,
144+
!constrained_encryption,
145145
|| to_encrypted_private_event_message(event, recipient),
146146
);
147147

0 commit comments

Comments
 (0)