From 750bfa2943a3b2b080c4ca515fa071f15897cb30 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 16 Oct 2023 08:55:36 -0700 Subject: fix pot withdrawals --- routes/payments.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/payments.js b/routes/payments.js index c6676930..a6120caf 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -296,11 +296,12 @@ export default { }); } - let payment = await credit(hash, amount, name, name, types.pot); - await db.lPush(`pot:${name}:payments`, hash); + let payment = await credit(id, amount, name, name, types.pot); + await db.lPush(`pot:${name}:payments`, payment.id); res.send({ payment }); } catch (e) { + warn("problem withdrawing from pot", e.message); bail(res, e.message); } }, -- cgit v1.2.3