diff options
| author | Adam Soltys <[email protected]> | 2019-10-27 20:32:46 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2019-10-27 20:32:46 -0700 |
| commit | 9c85d8117128a7eed4040129f8fd175f4899fcf8 (patch) | |
| tree | 95e49979c03512f422ef92385a1bdf1fd8129747 | |
| parent | babd01948f5e01d326feece425654cb17b6c7d9f (diff) | |
| download | coinos-server-9c85d8117128a7eed4040129f8fd175f4899fcf8.tar.gz coinos-server-9c85d8117128a7eed4040129f8fd175f4899fcf8.zip | |
record rate properly
| -rw-r--r-- | bitcoinPayments.js | 2 | ||||
| -rw-r--r-- | lightningPayments.js | 2 | ||||
| -rw-r--r-- | sendCoins.js | 2 | ||||
| -rw-r--r-- | 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 } |
