From 2a662396b7a9891b7e4ab5b05e8060ff757f9d72 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Wed, 3 Sep 2025 13:20:15 +0800 Subject: [PATCH] fix floating number issue in withdraw amount --- src/routes/webhook/tradingview/+server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/webhook/tradingview/+server.ts b/src/routes/webhook/tradingview/+server.ts index 0df1ab8..3a3023e 100644 --- a/src/routes/webhook/tradingview/+server.ts +++ b/src/routes/webhook/tradingview/+server.ts @@ -372,7 +372,7 @@ export const POST = async ({ locals, request }) => { const response = await client.createInternalTransfer( crypto.randomUUID(), 'USDT', - withdrawAmount.toString(), + withdrawAmount.toFixed(balance.split('.')[1].length), 'UNIFIED', 'FUND', )