This commit is contained in:
tiagosiebler
2022-09-16 13:26:29 +01:00
parent 9b673f08d5
commit f5232605a1
2 changed files with 2 additions and 13 deletions

View File

@@ -144,17 +144,6 @@ export class WebsocketClient extends EventEmitter {
this.connectPublic();
break;
}
case 'spotv3': {
this.restClient = new SpotClientV3(
undefined,
undefined,
!this.isTestnet(),
this.options.restOptions,
this.options.requestOptions
);
this.connectPublic();
break;
}
case 'usdcOption': {
this.restClient = new USDCOptionClient(
undefined,

View File

@@ -37,6 +37,8 @@ export function waitForSocketEvent(
);
}, timeoutMs);
let resolvedOnce = false;
function cleanup() {
clearTimeout(timeout);
resolvedOnce = true;
@@ -44,8 +46,6 @@ export function waitForSocketEvent(
wsClient.removeListener('error', (e) => rejector(e));
}
let resolvedOnce = false;
function resolver(event) {
resolve(event);
cleanup();