diff options
| author | Adam Soltys <[email protected]> | 2023-12-01 11:36:35 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-01 11:36:35 -0800 |
| commit | 7709c1efde9a1f3078171ee56985cd25511d6f7b (patch) | |
| tree | cd996eaaa860cdb3d7da688e0ad4c5ec7bae1a0c /lib/rates.js | |
| parent | 826c7b361c93905c4725755038d398221530051d (diff) | |
| download | coinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.tar.gz coinos-server-7709c1efde9a1f3078171ee56985cd25511d6f7b.zip | |
biome formatter
Diffstat (limited to 'lib/rates.js')
| -rw-r--r-- | lib/rates.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rates.js b/lib/rates.js index bbb5418f..2fce4f42 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); }; |
