aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/sync.js22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/sync.js b/lib/sync.js
index 57f0c507..62d13b24 100644
--- a/lib/sync.js
+++ b/lib/sync.js
@@ -100,28 +100,6 @@ const sync = async () => {
})
).map(p => p.preimage);
- for (let i = 0; i < cancelled.length; i++) {
- let c = cancelled[i];
- if (settled.includes(c.secret)) {
- await db.transaction(async transaction => {
- let p = await db.Payment.findOne({
- where: {
- preimage: c.secret
- },
- include: {
- model: db.Account,
- as: "account"
- },
- transaction
- });
-
- console.log("destroying", p.id);
- await p.account.decrement({ balance: p.amount }, { transaction });
- await p.destroy({ transaction });
- });
- }
- }
-
let missed = recent.filter(i => !settled.includes(i.preimage));
for (let i = 0; i < missed.length; i++) {
let { amount, preimage, pr: text, createdAt } = missed[i];