From 8f092cdc66e80ba1e98caab3fb297d09c5dab4a1 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 11 Dec 2024 20:08:53 +0100 Subject: [PATCH] Use consistent view about failed forwards --- wallets/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallets/server.js b/wallets/server.js index b0da2aa7..9edd3bd4 100644 --- a/wallets/server.js +++ b/wallets/server.js @@ -148,7 +148,8 @@ export async function getInvoiceableWallets (userId, { predecessorId, models }) "InvoiceForward"."walletId" FROM "Retries" JOIN "InvoiceForward" ON "InvoiceForward"."invoiceId" = "Retries"."id" - WHERE "InvoiceForward"."withdrawlId" IS NOT NULL + JOIN "Withdrawl" ON "Withdrawl".id = "InvoiceForward"."withdrawlId" + WHERE "Withdrawl"."status" IS DISTINCT FROM 'CONFIRMED' ) ORDER BY "Wallet"."priority" ASC, "Wallet"."id" ASC`