Skip to content

Commit 856e5a5

Browse files
authored
Pillin/paid transaction (#326)
1 parent 2942d81 commit 856e5a5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/schema/money/queries.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ builder.queryFields((t) => ({
8989

9090
paymentLogs.forEach((p) => {
9191
const key = `${p.platform}-${p.currencyId}`;
92+
const isPaid = p.originalResponseBlob.payment_status === "paid" || p.originalResponseBlob.status === "approved";
9293

93-
if (!consolidatedPayments[key]) {
94+
if (!consolidatedPayments[key] || !isPaid) {
9495
consolidatedPayments[key] = {
9596
id: key,
9697
totalTransactionAmount: 0,

0 commit comments

Comments
 (0)