Skip to content

Commit caaf5ea

Browse files
committed
dry code
1 parent 794396e commit caaf5ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/node-binance-api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,14 +1462,14 @@ export default class Binance {
14621462
host: this.parseProxy(socksproxy)[1],
14631463
port: this.parseProxy(socksproxy)[2]
14641464
});
1465-
ws = new WebSocket((this.Options.test ? this.fstreamSingleTest : this.fstreamSingle) + endpoint, { agent });
1465+
ws = new WebSocket((this.getFStreamUrl()) + endpoint, { agent });
14661466
} else if (httpsproxy) {
14671467
const config = url.parse(httpsproxy);
14681468
const agent = new HttpsProxyAgent(config);
14691469
if (this.Options.verbose) this.Options.log(`futuresSubscribeSingle: using proxy server: ${agent}`);
1470-
ws = new WebSocket((this.Options.test ? this.fstreamSingleTest : this.fstreamSingle) + endpoint, { agent });
1470+
ws = new WebSocket((this.getFStreamUrl()) + endpoint, { agent });
14711471
} else {
1472-
ws = new WebSocket((this.Options.test ? this.fstreamSingleTest : this.fstreamSingle) + endpoint);
1472+
ws = new WebSocket((this.getFStreamUrl()) + endpoint);
14731473
}
14741474

14751475
if (this.Options.verbose) this.Options.log('futuresSubscribeSingle: Subscribed to ' + endpoint);

0 commit comments

Comments
 (0)