Compare commits

..

No commits in common. "7aa0d8f43058276b3bf61a22ec394e134c967fb2" and "59a24192c152ed59a727e5b250e7d81ebc9d170c" have entirely different histories.

2 changed files with 6 additions and 6 deletions

View File

@ -482,12 +482,12 @@ const resolvers = {
FROM "Withdrawl"
WHERE "userId" = ${me.id}
AND id = ${Number(id)}
AND now() > created_at + ${retention}::INTERVAL
AND now() > created_at + interval '${retention}'
AND hash IS NOT NULL
AND status IS NOT NULL
), updated_rows AS (
UPDATE "Withdrawl"
SET hash = NULL, bolt11 = NULL, preimage = NULL
SET hash = NULL, bolt11 = NULL
FROM to_be_updated
WHERE "Withdrawl".id = to_be_updated.id)
SELECT * FROM to_be_updated;`
@ -499,7 +499,7 @@ const resolvers = {
console.error(error)
await models.withdrawl.update({
where: { id: invoice.id },
data: { hash: invoice.hash, bolt11: invoice.bolt11, preimage: invoice.preimage }
data: { hash: invoice.hash, bolt11: invoice.bolt11 }
})
throw new GqlInputError('failed to drop bolt11 from lnd')
}

View File

@ -346,12 +346,12 @@ export async function autoDropBolt11s ({ models, lnd }) {
SELECT id, hash, bolt11
FROM "Withdrawl"
WHERE "userId" IN (SELECT id FROM users WHERE "autoDropBolt11s")
AND now() > created_at + ${retention}::INTERVAL
AND now() > created_at + interval '${retention}'
AND hash IS NOT NULL
AND status IS NOT NULL
), updated_rows AS (
UPDATE "Withdrawl"
SET hash = NULL, bolt11 = NULL, preimage = NULL
SET hash = NULL, bolt11 = NULL
FROM to_be_updated
WHERE "Withdrawl".id = to_be_updated.id)
SELECT * FROM to_be_updated;`
@ -364,7 +364,7 @@ export async function autoDropBolt11s ({ models, lnd }) {
console.error(`Error removing invoice with hash ${invoice.hash}:`, error)
await models.withdrawl.update({
where: { id: invoice.id },
data: { hash: invoice.hash, bolt11: invoice.bolt11, preimage: invoice.preimage }
data: { hash: invoice.hash, bolt11: invoice.bolt11 }
})
}
}