This commit is contained in:
Tim
2024-01-23 01:32:44 -04:00
parent 29834bc11e
commit 0fc6fa2c8b
2 changed files with 21 additions and 1 deletions

18
pool.js
View File

@@ -14,3 +14,21 @@ export function unsubPools( socket, chainId, addresses ) {
console.log('left room', room)
}
}
export function subOHLCs( socket, chainId, poolPeriods) {
for(const key of poolPeriods) {
const room = `${chainId}|${key}`;
socket.join(room)
console.log('joined room', room)
}
}
export function unsubOHLCs( socket, chainId, poolPeriods ) {
for(const key of poolPeriods) {
const room = `${chainId}|${key}`;
socket.leave(room)
console.log('left room', room)
}
}