From 0aea60330afff02ad8bb525c5fddd7c367abf03a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Apr 2023 00:05:23 -0700 Subject: skip processed payments --- lib/rates.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/rates.js') diff --git a/lib/rates.js b/lib/rates.js index 0b2daab2..362aaa98 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); }; -- cgit v1.2.3