make sure to check only pending withdrawals
This commit is contained in:
parent
a3842a9af3
commit
a5d7867a13
@ -200,7 +200,7 @@ async function subscribeToWithdrawals (args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function checkWithdrawal ({ data: { hash }, boss, models, lnd }) {
|
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) {
|
if (!dbWdrwl) {
|
||||||
// [WARNING] LND paid an invoice that wasn't created via the SN GraphQL API.
|
// [WARNING] LND paid an invoice that wasn't created via the SN GraphQL API.
|
||||||
// >>> an adversary might be draining our funds right now <<<
|
// >>> an adversary might be draining our funds right now <<<
|
||||||
|
Loading…
x
Reference in New Issue
Block a user