chore(): run linter fixes

This commit is contained in:
Tiago Siebler
2024-12-10 17:29:47 +00:00
parent 13255d467f
commit e92c083961
35 changed files with 817 additions and 825 deletions

View File

@@ -20,9 +20,9 @@ describe('Private Broker REST API GET Endpoints', () => {
const coin = 'BTC';
const subUid = '123456';
const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
const from = timestampOneHourAgo.toFixed(0);
const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
// const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
// const from = timestampOneHourAgo.toFixed(0);
// const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
it('getBrokerInfo()', async () => {
try {

View File

@@ -18,11 +18,11 @@ describe('Private Broker REST API POST Endpoints', () => {
apiPass: API_PASS,
});
const coin = 'BTC';
// const coin = 'BTC';
const subUid = '123456';
const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
const from = timestampOneHourAgo.toFixed(0);
const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
// const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
// const from = timestampOneHourAgo.toFixed(0);
// const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
it('createSubAccount()', async () => {
try {

View File

@@ -22,9 +22,9 @@ describe('Private Futures REST API POST Endpoints', () => {
const symbol = 'BTCUSDT_UMCBL';
const marginCoin = 'USDT';
const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
const from = timestampOneHourAgo.toFixed(0);
const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
// const timestampOneHourAgo = new Date().getTime() - 1000 * 60 * 60;
// const from = timestampOneHourAgo.toFixed(0);
// const to = String(Number(from) + 1000 * 60 * 30); // 30 minutes
it('setLeverage()', async () => {
try {

View File

@@ -1,9 +1,5 @@
import { API_ERROR_CODE, FuturesClient } from '../../src';
import {
notAuthenticatedError,
successResponseString,
sucessEmptyResponseObject,
} from '../response.util';
import { FuturesClient } from '../../src';
import { sucessEmptyResponseObject } from '../response.util';
describe('Public Spot REST API Endpoints', () => {
const api = new FuturesClient();

View File

@@ -1,4 +1,4 @@
import { API_ERROR_CODE, SpotClient } from '../../src';
import { SpotClient } from '../../src';
import { sucessEmptyResponseObject } from '../response.util';
describe('Private Spot REST API GET Endpoints', () => {

View File

@@ -1,6 +1,5 @@
import { API_ERROR_CODE, SpotClient } from '../../src';
import { SpotClient } from '../../src';
import {
notAuthenticatedError,
successResponseString,
sucessEmptyResponseObject,
} from '../response.util';
@@ -9,8 +8,6 @@ describe('Public Spot REST API Endpoints', () => {
const api = new SpotClient();
const symbol = 'BTCUSDT_SPBL';
const timestampOneHourAgo = new Date().getTime() / 1000 - 1000 * 60 * 60;
const from = Number(timestampOneHourAgo.toFixed(0));
// it('should throw for unauthenticated private calls', async () => {
// expect(() => api.getOpenOrders()).rejects.toMatchObject(

View File

@@ -1,15 +1,10 @@
import {
WebsocketClient,
WSClientConfigurableOptions,
WS_ERROR_ENUM,
WS_KEY_MAP,
WSClientConfigurableOptions,
} from '../src';
import {
getSilentLogger,
listenToSocketEvents,
logAllEvents,
waitForSocketEvent,
} from './ws.util';
import { getSilentLogger, logAllEvents, waitForSocketEvent } from './ws.util';
describe.skip('Private Spot Websocket Client', () => {
const API_KEY = process.env.API_KEY_COM;
@@ -50,7 +45,7 @@ describe.skip('Private Spot Websocket Client', () => {
try {
await Promise.all([wsResponsePromise]);
} catch (e) {
// console.error()
console.error(e);
}
badClient.closeAll();
});

View File

@@ -1,9 +1,9 @@
import {
WebsocketClient,
WSClientConfigurableOptions,
WS_KEY_MAP,
WSClientConfigurableOptions,
} from '../src';
import { logAllEvents, getSilentLogger, waitForSocketEvent } from './ws.util';
import { getSilentLogger, logAllEvents, waitForSocketEvent } from './ws.util';
describe('Public Spot Websocket Client', () => {
let wsClient: WebsocketClient;

View File

@@ -1,5 +1,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { WebsocketClient } from '../src';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function getSilentLogger(logHint?: string) {
return {
silly: () => {},