fixes
This commit is contained in:
@@ -144,17 +144,6 @@ export class WebsocketClient extends EventEmitter {
|
|||||||
this.connectPublic();
|
this.connectPublic();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'spotv3': {
|
|
||||||
this.restClient = new SpotClientV3(
|
|
||||||
undefined,
|
|
||||||
undefined,
|
|
||||||
!this.isTestnet(),
|
|
||||||
this.options.restOptions,
|
|
||||||
this.options.requestOptions
|
|
||||||
);
|
|
||||||
this.connectPublic();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'usdcOption': {
|
case 'usdcOption': {
|
||||||
this.restClient = new USDCOptionClient(
|
this.restClient = new USDCOptionClient(
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ export function waitForSocketEvent(
|
|||||||
);
|
);
|
||||||
}, timeoutMs);
|
}, timeoutMs);
|
||||||
|
|
||||||
|
let resolvedOnce = false;
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
resolvedOnce = true;
|
resolvedOnce = true;
|
||||||
@@ -44,8 +46,6 @@ export function waitForSocketEvent(
|
|||||||
wsClient.removeListener('error', (e) => rejector(e));
|
wsClient.removeListener('error', (e) => rejector(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
let resolvedOnce = false;
|
|
||||||
|
|
||||||
function resolver(event) {
|
function resolver(event) {
|
||||||
resolve(event);
|
resolve(event);
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user