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`