detect pong for unified ws

This commit is contained in:
tiagosiebler
2022-09-17 11:13:48 +01:00
parent 08674ab2fa
commit 34884b236f
4 changed files with 20 additions and 7 deletions

View File

@@ -73,6 +73,10 @@ export function isWsPong(msg: any): boolean {
return true;
}
if (msg['ret_msg'] === 'pong') {
return true;
}
return (
msg.request &&
msg.request.op === 'ping' &&

View File

@@ -153,6 +153,9 @@ export const PUBLIC_WS_KEYS = [
WS_KEY_MAP.spotV3Public,
WS_KEY_MAP.usdcOptionPublic,
WS_KEY_MAP.usdcPerpPublic,
WS_KEY_MAP.unifiedOptionPublic,
WS_KEY_MAP.unifiedPerpUSDTPublic,
WS_KEY_MAP.unifiedPerpUSDCPublic,
] as string[];
/** Used to automatically determine if a sub request should be to the public or private ws (when there's two) */