I am facing an issue when calling the withdraw API or using it through the SDK. The problem is that when I try to withdraw funds, it withdraws a smaller amount than expected and leaves the remaining balance in the wallet. For example, when withdrawing 6 DOGE, instead of sending 6 to the address, it sends 2, and 4 remains in my wallet. What could be the issue? Has anyone else faced this? I’ve been stuck on this for a while, so please let me know the solution. Thanks!
Code:
const withdrawToken = async (symbol, address, amount, network) => {
try {
const response = await client.withdraw(symbol, address, amount, network);
console.log(`Withdrawal successful for ${symbol}:`, response.data);
} catch (error) {
console.log(
`Error withdrawing ${symbol}:`,
error.response.data || error.message
);
}
};
const symbol = "DOGE";
const address = "6";
const amount = "DOGE";
const network = "Bsc";
withdrawToken(symbol, address, amount, network);