aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rates.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-03-11 10:20:46 -0800
committerAdam Soltys <[email protected]>2023-03-11 10:20:46 -0800
commit5955ff6969a5301c4413631b76cf2300d193f8ed (patch)
tree92d1269a098cb7c764ca92f7a40af9ee236ae5b1 /lib/rates.js
parent7fec7cc3e7c51a9892869732b5bfe65922ee7818 (diff)
downloadcoinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.tar.gz
coinos-server-5955ff6969a5301c4413631b76cf2300d193f8ed.zip
separate tips from amounts
Diffstat (limited to 'lib/rates.js')
-rw-r--r--lib/rates.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rates.js b/lib/rates.js
index 362aaa98..0b2daab2 100644
--- a/lib/rates.js
+++ b/lib/rates.js
@@ -15,11 +15,11 @@ let connect = async () => {
ws = new WebSocket("wss://stream.binance.com:9443/ws/btcusdt@ticker");
- ws.onmessage = async function(event) {
+ ws.onmessage = async function (event) {
try {
let msg = JSON.parse(event.data);
- Object.keys(store.fx).map(symbol => {
+ Object.keys(store.fx).map((symbol) => {
store.rates[symbol] = msg.c * store.fx[symbol];
});
@@ -31,7 +31,7 @@ let connect = async () => {
}
};
- ws.onerror = async function(error) {
+ ws.onerror = async function (error) {
err("binance socket error", error.message);
};