From 9c85d8117128a7eed4040129f8fd175f4899fcf8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 27 Oct 2019 20:32:46 -0700 Subject: record rate properly --- bitcoinPayments.js | 2 +- lightningPayments.js | 2 +- sendCoins.js | 2 +- sendPayment.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitcoinPayments.js b/bitcoinPayments.js index b3d54a21..c32d11c5 100644 --- a/bitcoinPayments.js +++ b/bitcoinPayments.js @@ -81,7 +81,7 @@ module.exports = (app, bc, db, addresses, payments, emit) => { hash, amount: o.value, currency: "CAD", - rate: app.get("rates").ask, + rate: app.get("ask"), received: true, tip, confirmed diff --git a/lightningPayments.js b/lightningPayments.js index ed1d3647..c12b8fcf 100644 --- a/lightningPayments.js +++ b/lightningPayments.js @@ -13,7 +13,7 @@ module.exports = (app, db, lna, lnb, emit, payments) => { payment.received = true; payment.user.balance += parseInt(msg.value); - payment.rate = app.get("rates").ask; + payment.rate = app.get("ask"); await payment.save(); await payment.user.save(); diff --git a/sendCoins.js b/sendCoins.js index b1456798..63f50355 100644 --- a/sendCoins.js +++ b/sendCoins.js @@ -63,7 +63,7 @@ module.exports = (app, bc, db, emit) => async (req, res) => { amount: -total, user_id: req.user.id, hash: txid, - rate: app.get("rates").ask, + rate: app.get("ask"), currency: "CAD" }, { transaction } diff --git a/sendPayment.js b/sendPayment.js index d4391087..ee2f2c90 100644 --- a/sendPayment.js +++ b/sendPayment.js @@ -55,7 +55,7 @@ module.exports = (app, db, emit, seen, lna, lnb) => async (req, res) => { amount: -total, user_id: req.user.id, hash, - rate: app.get("rates").ask, + rate: app.get("ask"), currency: "CAD" }, { transaction } -- cgit v1.2.3