Skip to content

Commit 0c1b64b

Browse files
committed
resolve merge conflicts
1 parent 195aaec commit 0c1b64b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

api/resolvers/notifications.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -256,24 +256,6 @@ export default {
256256
LIMIT ${LIMIT})`
257257
)
258258
}
259-
260-
if (meFull.noteWithdrawals) {
261-
queries.push(
262-
`(SELECT "Withdrawl".id::text, MAX(COALESCE("Invoice"."confirmedAt", "Withdrawl".created_at)) AS "sortTime",
263-
FLOOR(MAX("Withdrawl"."msatsPaid" / 1000)) as "earnedSats",
264-
'WithdrawlPaid' AS type
265-
FROM "Withdrawl"
266-
LEFT JOIN "InvoiceForward" ON "InvoiceForward"."withdrawlId" = "Withdrawl".id
267-
LEFT JOIN "Invoice" ON "InvoiceForward"."invoiceId" = "Invoice".id
268-
WHERE "Withdrawl"."userId" = $1
269-
AND "Withdrawl".status = 'CONFIRMED'
270-
AND "Withdrawl".created_at < $2
271-
AND ("InvoiceForward"."id" IS NULL OR "Invoice"."actionType" = 'ZAP')
272-
GROUP BY "Withdrawl".id
273-
ORDER BY "sortTime" DESC
274-
LIMIT ${LIMIT})`
275-
)
276-
}
277259
}
278260

279261
if (!include.size || include.has('referral')) {
@@ -339,6 +321,24 @@ export default {
339321
}
340322
}
341323

324+
if (meFull.noteWithdrawals) {
325+
queries.push(
326+
`(SELECT "Withdrawl".id::text, MAX(COALESCE("Invoice"."confirmedAt", "Withdrawl".created_at)) AS "sortTime",
327+
FLOOR(MAX("Withdrawl"."msatsPaid" / 1000)) as "earnedSats",
328+
'WithdrawlPaid' AS type
329+
FROM "Withdrawl"
330+
LEFT JOIN "InvoiceForward" ON "InvoiceForward"."withdrawlId" = "Withdrawl".id
331+
LEFT JOIN "Invoice" ON "InvoiceForward"."invoiceId" = "Invoice".id
332+
WHERE "Withdrawl"."userId" = $1
333+
AND "Withdrawl".status = 'CONFIRMED'
334+
AND "Withdrawl".created_at < $2
335+
AND "InvoiceForward"."id" IS NULL
336+
GROUP BY "Withdrawl".id
337+
ORDER BY "sortTime" DESC
338+
LIMIT ${LIMIT})`
339+
)
340+
}
341+
342342
if (!include.size || include.has('streak')) {
343343
if (meFull.noteCowboyHat) {
344344
queries.push(

0 commit comments

Comments
 (0)