This commit is contained in:
Tim
2024-01-23 01:32:44 -04:00
parent 0e5a4bac6d
commit ee021c9590
6 changed files with 63 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
import {io} from "socket.io-client";
import {useStore} from "@/store/store.js";
import {flushOrders, onChainChanged} from "@/blockchain/wallet.js";
import {ethers} from "ethers";
import {flushOrders} from "@/blockchain/wallet.js";
import {parseOrderStatus} from "@/blockchain/orderlib.js";
export const socket = io(import.meta.env.VITE_WS_URL || undefined, {transports: ["websocket"]})
@@ -22,6 +21,10 @@ socket.on('p', async (chainId, pool, price) => {
s.poolPrices[[chainId,pool]] = price
})
socket.on('ohlcs', async (chainId, pool, ohlcs) => {
console.log('pool bars', pool, ohlcs)
})
socket.on('vb', async (chainId, vault, balances) => {
const s = useStore()
if( s.chainId.value !== chainId )