symbol switching fix; max amount
This commit is contained in:
@@ -22,9 +22,14 @@ socket.on('p', async (chainId, pool, price) => {
|
||||
s.poolPrices[[chainId,pool]] = price
|
||||
})
|
||||
|
||||
socket.on('ohlc', async (chainId, pool, ohlcs) => {
|
||||
// console.log('pool bars', pool, ohlcs)
|
||||
DataFeed.poolCallback(chainId, pool, ohlcs)
|
||||
socket.on('ohlc', async (chainId, poolPeriod, ohlcs) => {
|
||||
// console.log('pool bars', poolPeriod, ohlcs)
|
||||
if (ohlcs && ohlcs.length) {
|
||||
const split = poolPeriod.indexOf('|')
|
||||
const pool = poolPeriod.slice(0,split)
|
||||
useStore().poolPrices[[chainId, pool]] = ohlcs[ohlcs.length - 1][4] // closing price
|
||||
}
|
||||
DataFeed.poolCallback(chainId, poolPeriod, ohlcs)
|
||||
})
|
||||
|
||||
socket.on('vb', async (chainId, vault, balances) => {
|
||||
|
||||
Reference in New Issue
Block a user