aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-09 14:27:28 -0400
committerAdam Soltys <[email protected]>2022-09-09 14:27:28 -0400
commitb83e7189e66c4d4f04a029268e87af185bf7aee7 (patch)
tree358e45f13e253efa59edc29dc06efd534ecb42d2 /lib
parent86c59fc85cba222abc6dbe82d862ca45892a27c8 (diff)
downloadcoinos-server-b83e7189e66c4d4f04a029268e87af185bf7aee7.tar.gz
coinos-server-b83e7189e66c4d4f04a029268e87af185bf7aee7.zip
remove cancelled fix
Diffstat (limited to 'lib')
-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];