aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rates.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rates.js')
-rw-r--r--lib/rates.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rates.js b/lib/rates.js
index e896c8cc..8970ca64 100644
--- a/lib/rates.js
+++ b/lib/rates.js
@@ -2,19 +2,18 @@ import app from "$app";
import axios from "axios";
import config from "$config";
import fs from "fs";
-import binance from "./binance";
+// import binance from "./binance";
import { broadcast } from "./sockets";
import store from "./store";
import { err, warn } from "$lib/logging";
-let b = binance();
-setInterval(() => {
- b.terminate();
- b = binance();
-}, 360000);
+// let b = binance();
+// setInterval(() => {
+// b.terminate();
+// b = binance();
+// }, 360000);
-let fetchRates;
-(fetchRates = async () => {
+let fetchRates = async () => {
let date, fx;
try {
@@ -58,7 +57,8 @@ let fetchRates;
store.fx = fx;
setTimeout(fetchRates, 7200000);
-})();
+};
+// fetchRates();
app.get("/rate", async (req, res, next) => {
res.send(store.last);