diff --git a/worker/wallet.js b/worker/wallet.js index a91c8edf..9d870f71 100644 --- a/worker/wallet.js +++ b/worker/wallet.js @@ -200,7 +200,7 @@ async function subscribeToWithdrawals (args) { } async function checkWithdrawal ({ data: { hash }, boss, models, lnd }) { - const dbWdrwl = await models.withdrawl.findFirst({ where: { hash } }) + const dbWdrwl = await models.withdrawl.findFirst({ where: { hash, status: null } }) if (!dbWdrwl) { // [WARNING] LND paid an invoice that wasn't created via the SN GraphQL API. // >>> an adversary might be draining our funds right now <<<