From 6f2e865a0462d3a06e6c913a76e825c2dc64bf7b Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 29 Oct 2025 09:05:13 -0400 Subject: [PATCH] Align zap receipt success status --- js/payments/zapSplit.js | 2 +- tests/zap-split.test.mjs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/payments/zapSplit.js b/js/payments/zapSplit.js index eaf41f73..a31ba158 100644 --- a/js/payments/zapSplit.js +++ b/js/payments/zapSplit.js @@ -383,7 +383,7 @@ async function processShare({ invoice, payment, zapRequest, - status: "ok", + status: "success", }; } catch (error) { userLogger.warn( diff --git a/tests/zap-split.test.mjs b/tests/zap-split.test.mjs index 412e78ac..bb389ce9 100644 --- a/tests/zap-split.test.mjs +++ b/tests/zap-split.test.mjs @@ -196,11 +196,16 @@ async function testSplitMath() { const creatorReceipt = result.receipts[0]; assert.equal(creatorReceipt.recipientType, "creator"); + assert.equal(creatorReceipt.status, "success"); assert(creatorReceipt.zapRequest, "creator zap request should be present"); const parsedZap = JSON.parse(creatorReceipt.zapRequest); assert.equal(parsedZap.kind, 9734); assert(parsedZap.tags.some((tag) => tag[0] === "amount" && tag[1] === "900000")); + const platformReceipt = result.receipts[1]; + assert.equal(platformReceipt.recipientType, "platform"); + assert.equal(platformReceipt.status, "success"); + delete globalThis.__BITVID_PLATFORM_FEE_OVERRIDE__; } @@ -365,7 +370,7 @@ async function testPlatformShareFailure() { const [creatorReceipt, platformReceipt] = result.receipts; assert.equal(creatorReceipt.recipientType, "creator"); - assert.equal(creatorReceipt.status, "ok"); + assert.equal(creatorReceipt.status, "success"); assert(creatorReceipt.payment, "creator share should still have a payment record"); assert.equal(platformReceipt.recipientType, "platform");