order pending bugfix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {io} from "socket.io-client";
|
||||
import {useStore} from "@/store/store.js";
|
||||
import {onChainChanged} from "@/blockchain/wallet.js";
|
||||
import {flushOrders, onChainChanged} from "@/blockchain/wallet.js";
|
||||
import {ethers} from "ethers";
|
||||
|
||||
export const socket = io(import.meta.env.VITE_WS_URL || undefined, {transports: ["websocket"]})
|
||||
@@ -39,3 +39,13 @@ socket.on('vb', async (vault, balances) => {
|
||||
s.$patch({vaultBalances:vb})
|
||||
console.log('vault balances', vault, vb)
|
||||
})
|
||||
|
||||
socket.on('vaults', (vaults)=>{
|
||||
const s = useStore()
|
||||
console.log('vaults', vaults)
|
||||
s.vaults = vaults
|
||||
if( vaults.length ) {
|
||||
const vault = vaults[0]
|
||||
flushOrders(vault)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user