Skip to content

Commit 0e18dc9

Browse files
author
Daniel
committed
fix: fix format
1 parent 3f42b0e commit 0e18dc9

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/domains/account/account.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import WebSocket from "ws";
22
import { WS_MESSAGE, ERROR, endpoints, DxtradeError } from "@/constants";
3-
import { Cookies, parseWsData, shouldLog, debugLog, retryRequest, baseHeaders, authHeaders, checkWsRateLimit } from "@/utils";
3+
import {
4+
Cookies,
5+
parseWsData,
6+
shouldLog,
7+
debugLog,
8+
retryRequest,
9+
baseHeaders,
10+
authHeaders,
11+
checkWsRateLimit,
12+
} from "@/utils";
413
import type { ClientContext } from "@/client.types";
514
import type { Account } from ".";
615

src/utils/retry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DxtradeError, ERROR } from "@/constants";
44
export async function retryRequest(config: AxiosRequestConfig, retries = 3): Promise<AxiosResponse> {
55
for (let attempt = 1; attempt <= retries; attempt++) {
66
try {
7-
return await axios({ ...config, maxRedirects: 0 });
7+
return await axios(config);
88
} catch (error: unknown) {
99
const message = error instanceof Error ? error.message : "Unknown error";
1010
console.warn(`[dxtrade-api] Attempt ${attempt} failed: ${message}`, config.url);

0 commit comments

Comments
 (0)