From 0c1b64b89a51d6e17032fd5486a63ec1a4065ed9 Mon Sep 17 00:00:00 2001 From: Soxasora Date: Wed, 8 Jan 2025 09:59:24 +0100 Subject: [PATCH] resolve merge conflicts --- api/resolvers/notifications.js | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/api/resolvers/notifications.js b/api/resolvers/notifications.js index 59045fc8e..9ab5c5980 100644 --- a/api/resolvers/notifications.js +++ b/api/resolvers/notifications.js @@ -256,24 +256,6 @@ export default { LIMIT ${LIMIT})` ) } - - if (meFull.noteWithdrawals) { - queries.push( - `(SELECT "Withdrawl".id::text, MAX(COALESCE("Invoice"."confirmedAt", "Withdrawl".created_at)) AS "sortTime", - FLOOR(MAX("Withdrawl"."msatsPaid" / 1000)) as "earnedSats", - 'WithdrawlPaid' AS type - FROM "Withdrawl" - LEFT JOIN "InvoiceForward" ON "InvoiceForward"."withdrawlId" = "Withdrawl".id - LEFT JOIN "Invoice" ON "InvoiceForward"."invoiceId" = "Invoice".id - WHERE "Withdrawl"."userId" = $1 - AND "Withdrawl".status = 'CONFIRMED' - AND "Withdrawl".created_at < $2 - AND ("InvoiceForward"."id" IS NULL OR "Invoice"."actionType" = 'ZAP') - GROUP BY "Withdrawl".id - ORDER BY "sortTime" DESC - LIMIT ${LIMIT})` - ) - } } if (!include.size || include.has('referral')) { @@ -339,6 +321,24 @@ export default { } } + if (meFull.noteWithdrawals) { + queries.push( + `(SELECT "Withdrawl".id::text, MAX(COALESCE("Invoice"."confirmedAt", "Withdrawl".created_at)) AS "sortTime", + FLOOR(MAX("Withdrawl"."msatsPaid" / 1000)) as "earnedSats", + 'WithdrawlPaid' AS type + FROM "Withdrawl" + LEFT JOIN "InvoiceForward" ON "InvoiceForward"."withdrawlId" = "Withdrawl".id + LEFT JOIN "Invoice" ON "InvoiceForward"."invoiceId" = "Invoice".id + WHERE "Withdrawl"."userId" = $1 + AND "Withdrawl".status = 'CONFIRMED' + AND "Withdrawl".created_at < $2 + AND "InvoiceForward"."id" IS NULL + GROUP BY "Withdrawl".id + ORDER BY "sortTime" DESC + LIMIT ${LIMIT})` + ) + } + if (!include.size || include.has('streak')) { if (meFull.noteCowboyHat) { queries.push(