Merge pull request #307 from PR0M3TH3AN/codex/fix-amount-not-defined-error-on-zap

Fix channel zap share amount tracking
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-10-05 14:07:40 -04:00
commit 01a9b2f0bd
1 file changed
+4 -4
+4 -4
View File
@@ -556,7 +556,7 @@ function createZapDependencies({ creatorEntry, platformEntry, shares, shareTrack
},
sendPayment: async (bolt11, params) => {
const shareType = activeShare || "unknown";
const amount =
const shareAmount =
shareType === "platform"
? shares.platformShare
: shares.creatorShare;
@@ -570,7 +570,7 @@ function createZapDependencies({ creatorEntry, platformEntry, shares, shareTrack
shareTracker.push({
type: shareType,
status: "success",
amount,
amount: shareAmount,
address,
payment,
});
@@ -581,7 +581,7 @@ function createZapDependencies({ creatorEntry, platformEntry, shares, shareTrack
shareTracker.push({
type: shareType,
status: "error",
amount,
amount: shareAmount,
address,
error,
});
@@ -590,7 +590,7 @@ function createZapDependencies({ creatorEntry, platformEntry, shares, shareTrack
"wallet.sendPayment",
{
shareType,
amount,
amount: shareAmount,
address,
tracker: shareTracker,
context: { shares },