mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
fix(reef): omit absent receipt categories from audit state (#110177)
This commit is contained in:
@@ -140,6 +140,8 @@ describe("receipts", () => {
|
||||
"accepted",
|
||||
"rejected",
|
||||
]);
|
||||
expect(entries[0]!.event.payload).not.toHaveProperty("category");
|
||||
expect(entries[1]!.event.payload).toHaveProperty("category", "guard_deny");
|
||||
await expect(
|
||||
confirmDelivery({ ...accepted, bodyHash: "e".repeat(64) }, identity.signing.publicKey, audit),
|
||||
).rejects.toThrow("invalid delivery receipt");
|
||||
|
||||
@@ -61,7 +61,7 @@ export async function confirmDelivery(
|
||||
return appendAudit(audit, "confirm_delivery", {
|
||||
receipt,
|
||||
status: receipt.status,
|
||||
category: receipt.category,
|
||||
...(receipt.category ? { category: receipt.category } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user