initikghuiu

This commit is contained in:
ZOMBIIIIIII
2026-05-29 13:34:29 +03:00
parent 1b3fc444fc
commit 399322973e
6 changed files with 192 additions and 33 deletions

View File

@@ -1599,9 +1599,9 @@ export const WalletController = {
async appFeeTransfer(req: Request, res: Response) {
const userId = req.auth!.userId;
const chainParam = String(req.params.chain || '').toUpperCase();
const ALLOWED_FEE_CHAINS = new Set(['ETH', 'BSC', 'SOL', 'TRX']);
const ALLOWED_FEE_CHAINS = new Set(['ETH', 'BSC', 'SOL', 'TRX', 'BTC']);
if (!ALLOWED_FEE_CHAINS.has(chainParam)) {
res.status(400).json({ success: false, error: `Chain ${chainParam} doesn't support app fee (allowed: ETH, BSC, SOL, TRX)` });
res.status(400).json({ success: false, error: `Chain ${chainParam} doesn't support app fee (allowed: ETH, BSC, SOL, TRX, BTC)` });
return;
}
const chain = chainParam as ChainCode;
@@ -1694,6 +1694,7 @@ export const WalletController = {
to: feeWallet,
amount: feeAmountBig.toString(),
token: tokenSymbol,
feeTier: chain === 'BTC' ? 'slow' : undefined,
});
txid = sendRes.txid;
} catch (sendErr: any) {