initikghuiu
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user