aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lnurl.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-02 22:12:24 -0700
committerAdam Soltys <[email protected]>2022-09-02 22:12:24 -0700
commit13352f9b30eed52d2e7d0970d3cbd76f401d6de0 (patch)
treee745685b2d7373ad391431323b0bdf5ff373b55a /routes/lnurl.js
parentd1cc66d1a02b75f90fbf0c05910777c76228259a (diff)
downloadcoinos-server-13352f9b30eed52d2e7d0970d3cbd76f401d6de0.tar.gz
coinos-server-13352f9b30eed52d2e7d0970d3cbd76f401d6de0.zip
es6 migration
Diffstat (limited to 'routes/lnurl.js')
-rw-r--r--routes/lnurl.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/lnurl.js b/routes/lnurl.js
index 82420734..3e5b0fd8 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -1,4 +1,4 @@
-import { rates } from "../lib/store.js";
+import store from "../lib/store.js";
import app from "../app.js";
import config from "../config/index.js";
import axios from "axios";
@@ -87,7 +87,7 @@ app.post("/withdraw", auth, async (req, res, next) => {
await db.Invoice.create({
user_id: user.id,
text: pr,
- rate: rates[user.currency],
+ rate: store.rates[user.currency],
currency: user.currency,
amount: value,
tip: 0,
@@ -271,7 +271,7 @@ lnurlServer.on("payRequest:action:processed", async function(event) {
let i = await db.Invoice.create({
user_id: recipient.id,
text: invoice,
- rate: rates[recipient.currency],
+ rate: store.rates[recipient.currency],
currency: recipient.currency,
amount: payreq.satoshis,
tip: 0,
@@ -422,7 +422,7 @@ lnurlServer.bindToHook(
memo: "Bitcoin conversion fee",
account_id: receiverAccount.id,
user_id: receiverAccount.user_id,
- rate: rates[receiverAccount.user.currency],
+ rate: store.rates[receiverAccount.user.currency],
currency: receiverAccount.user.currency,
confirmed: true,
received: true,
@@ -439,7 +439,7 @@ lnurlServer.bindToHook(
account_id: account.id,
user_id: user.id,
hash: pr,
- rate: rates[user.currency],
+ rate: store.rates[user.currency],
currency: user.currency,
confirmed: true,
network: "lightning",