Skip to content

Commit 34e39f8

Browse files
committed
resolve merge conflicts
1 parent ef8cf23 commit 34e39f8

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,6 +256,24 @@ 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
272+
GROUP BY "Withdrawl".id
273+
ORDER BY "sortTime" DESC
274+
LIMIT ${LIMIT})`
275+
)
276+
}
259277
}
260278

261279
if (!include.size || include.has('referral')) {
@@ -321,24 +339,6 @@ export default {
321339
}
322340
}
323341

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)