I'm using walletconnect v2's web3wallet in my react-native wallet app. I connected my wallet with pancakeswap,selected chain on pancake swap is binance mainnet. When i try to swap from bnb to usdt, in my walletapp modal is opened of "eth_SendTransaction" method. When i click on accept transaction error is coming. In JsonRpcProvider i'm passing binanace mainnet url. Following is my code for eth_sendTransaction method:
const { params, id } = requestEvent;
const { chainId, request } = params;
const wallet =
eip155Wallets[getWalletAddressFromParams([currentETHAddress], params)];
case EIP155_SIGNING_METHODS.ETH_SEND_TRANSACTION:
const provider = new ethers.providers.JsonRpcProvider("https://bsc-dataseed.binance.org/");
const privateKey = wallet.getPrivateKey();
const walt = new ethers.Wallet(privateKey, provider);
const sendTransaction = request.params[0];
const {txResponse} = await walt.sendTransaction(sendTransaction);
return formatJsonRpcResult(id, txResponse);
I tried to pass transaction arguments manually but getting transaction underpriced, invalid transaction key gas like errors even though i've enough bnb balance. i tried to swap from pancakeswap, uniswap, poocoin. but getting this error and transaction is failing every time.