EatTheBlocks Forum

Approve and SwapTokens - Error: transaction underpriced

I am facing issue after following the video tutorial on youtube, to trading on pancakeswap.

This is my wallet: I have BNB and WBNB

I am trying to approve WBNB to buy any other token

  const tx = await wbnb.approve(
        router.address, // pancake router
        amount, // max approve
            gasPrice: gasPrice

I am getting this error
ode:16300) UnhandledPromiseRejectionWarning: **Error: transaction underpriced**

What I am missing here? The gas and amounts bellow

 let _gasPrice = Web3.utils.toWei('0.00000000010');
 let _gasLimit = Web3.utils.toWei('0.00000000010');
 let amount = ethers.utils.parseUnits('0.1, 'ether').toHexString();
 gasPrice = ethers.BigNumber.from(_gasPrice).toHexString();
 gasLimit = ethers.BigNumber.from(_gasLimit).toHexString();

And the pancakeswap router address: 0x10ED43C718714eb63d5aA57B78B54704E256024E
and wbnb address 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c