Hi!
I have a function:
const fee = process.env.FEE_LIMIT || 30000000;
async function payTRC20(toAddress, amount, fromAddress, tronWeb, contract) {
const options = {
feeLimit: fee,
callValue: 0,
};
const tx = await tronWeb.transactionBuilder.triggerSmartContract(
contract,
"transfer(address,uint256)",
options,
[
{
type: "address",
value: toAddress,
},
{
type: "uint256",
value: amount * 1000000,
},
],
tronWeb.address.toHex(fromAddress),
);
const signedTx = await tronWeb.trx.sign(tx.transaction);
return tronWeb.trx.sendRawTransaction(signedTx);
}
module.exports = payTRC20;
This function works fine, but for some wallets it throws an error with the text:
Version:
"tronweb": "5.3.0"
Please tell me what the problem might be and how to fix it.
An important clarification: if you repeat on such an "incorrect" wallet, the error will be the same. If you transfer money to such a wallet through a mobile application, everything goes without errors.
Hi!
I have a function:
This function works fine, but for some wallets it throws an error with the text:
Version:
"tronweb": "5.3.0"
Please tell me what the problem might be and how to fix it.