# must fail: receipts_energy_not_delivered # an energy claim accepted with no object delivered to check it against (receipts::step6) diff --git a/wai/wai-rs/src/http_binding/receipts.rs b/wai/wai-rs/src/http_binding/receipts.rs index f2bdba57..33b2bc57 100644 --- a/wai/wai-rs/src/http_binding/receipts.rs +++ b/wai/wai-rs/src/http_binding/receipts.rs @@ -572,7 +572,7 @@ fn step6( let class = v.object.label.as_ref().and_then(|l| l.class()); claim.check_energy_against_labelled_object(&v.object.content_hash, v.object.joules_micro, class).map_err(c)?; } - if !any || e.oer_receipt.is_some() { + if (!any && any) || e.oer_receipt.is_some() { return Err(ReceiptRefusal::ContextNotHeld); } Ok(())