title: Metamask Error: Internal JSON-RPC error. while confirming on metamask mobile
body: <p>We have developed the front end to buy and sell Binance chain tokens. It's working fine on Web Metamask extension when interacting with smart contract. We are using infura API to get connectwallet interface for other wallets on mobile. It's connecting successfully but the transaction is not getting confirmed. Showing this error when I press confirm button, getting Internal JSON-RPC error</p>
  <p><a href="https://i.stack.imgur.com/sZIHU.png" rel="nofollow noreferrer">We are getting this issue</a></p>
  <p>This is the function we are running on confirm:</p>
  <pre><code>async function change_transfer() {
    if (globalObj.typeTxn == &quot;a&quot;) {
      var receiver = payableAmountObjectt.address_to;
    } else {
      var receiver = receiverCoin;
    }
  
    console.log(&quot;receiver&quot;, receiver);
  
    // check address is valid or if not then catch
    await web3Global.utils.toChecksumAddress(receiver);
  
    if (selectedAccount.toLowerCase() == receiver.toLowerCase()) {
      swal(&quot;You cannot transfer to same address&quot;).then((value) =&gt; {});
      toastr.error(&quot;You cannot transfer to same address&quot;);
      return false;
    }
  
    // const balanceOf_ = await web3Global.eth.getBalance(selectedAccount);
    const balanceOf_ = await getBnbBalance(selectedAccount);
    console.log(&quot;balanceOf_&quot;, balanceOf_);
    var balance_ = 0;
    if (balanceOf_ &gt; 0) {
      balance_ = balanceOf_ / 1e18;
    }
    // console.log(balance_);
  
    var minBal = 0.001;
    console.log(&quot;balance : &quot;, balance_);
    console.log(&quot;min balance : &quot;, minBal);
  
    if (balance_ &lt; minBal) {
      swal(
        &quot;Balance Low&quot;,
        &quot;You must have BNB &quot; + minBal + &quot; for transaction.&quot;
      ).then((value) =&gt; {});
      return false;
    }
  
    // Get connected chain id from Ethereum node
    const chainId = await web3Global.eth.getChainId();
    // Load chain information over an HTTP API
    const chainData = evmChains.getChain(chainId);
    console.log(&quot;chainData = &quot;, chainData.name);
    console.log(&quot;chainData = &quot;, chainData);
  
    var network = chainData.networkId;
    console.log(network);
    payableAmountObjectt.network = network;
    if (checkNetwork(network) == false) {
      return false;
    }
  
    const contract = new web3Global.eth.Contract(abi, contractAddress);
  
    // var weiAmount = payableAmountObjectt.coin_amount * 1e9;
    var weiAmount = payableAmountObjectt.coin_amount * decimalVal;  var weiAmount2 = weiAmount;
    var value = weiAmount2;
    value = toFixed(value);
  
    payableAmountObjectt.coin_amount_raw = value;
    var from_account = selectedAccount;
  
    const balanceOf = await contract.methods.balanceOf(from_account).call();
    console.log(&quot;value&quot;, value);
    console.log(&quot;balanceOf&quot;, balanceOf);
    if (value &gt; balanceOf) {
      swal(&quot;Balance Low&quot;, &quot;Your Token balance is low.&quot;).then((value) =&gt; {});
      toastr.error(&quot;Your Token balance is low.&quot;);
      return false;
    }
  
    payableAmountObjectt.from_address = from_account;
    payableAmountObjectt.to_address = receiver;
  
    console.log(&quot;from_account&quot;, from_account);
    console.log(&quot;receiver&quot;, receiver);
    console.log(&quot;value&quot;, value);
    $(&quot;.payBtn&quot;).hide();
    $(&quot;.payBtn&quot;).attr(&quot;disabled&quot;, true);
    $(&quot;#showLoaderAjaxWeb3Modal&quot;).show();
  
    var gasPrice_gwei = &quot;10&quot;;
  
    var estimateGasRaw = await contract.methods
      .transfer(receiver, value.toString())
      .estimateGas({
        from: from_account,
        gasPrice: await web3Global.utils.toHex(
          web3Global.utils.toWei(gasPrice_gwei, &quot;gwei&quot;)
        ),
      });
  
    var estimateGas = estimateGasRaw;
    console.log(&quot;estimateGas&quot;, estimateGas);
  
    const transfer = await contract.methods
      .transfer(receiver, value.toString())
      .send({
        from: from_account,
        gas: await web3Global.utils.toHex(estimateGas), // Raise the gas limit to a much higher amount
        gasLimit: await web3Global.utils.toHex(800000), // Raise the gas limit to a much higher amount
        gasPrice: await web3Global.utils.toHex(
          web3Global.utils.toWei(gasPrice_gwei, &quot;gwei&quot;)
        ),
  
        value: &quot;0x0&quot;,
      })
      .on(&quot;transactionHash&quot;, function (hash) {
        console.log(&quot;transactionHash&quot;, hash);
        $(&quot;#showLoaderAjaxWeb3Modal&quot;).hide();
        toastr.success(hash);
        payableAmountObjectt.hash = hash;
        if (payableAmountObjectt.type == &quot;admin&quot;) {
          transferTokenUpdate(hash);
        } else {
          transferTokenUpdate_purchase(hash);
        }
      })
      .on(&quot;receipt&quot;, function (receipt) {
        console.log(&quot;receipt&quot;, receipt);
      })
      .on(&quot;confirmation&quot;, function (confirmationNumber, receipt) {
        console.log(&quot;confirmation&quot;, confirmationNumber, receipt);
      })
      .on(&quot;error&quot;, function (error, receipt) {
        console.log(&quot;error&quot;, error, receipt);
        console.log(&quot;error.message&quot;, error.message);
        console_(error.message, &quot;status&quot;);
        toastr.info(error.message);
  
        if (
          error.message == &quot;User rejected the transaction&quot; ||
          error.message ==
            &quot;MetaMask Tx Signature: User denied transaction signature.&quot;
        ) {
          $(&quot;.payBtn&quot;).show();
          $(&quot;.payBtn&quot;).attr(&quot;disabled&quot;, false);
          $(&quot;#showLoaderAjaxWeb3Modal&quot;).hide();
        }
      });
  }
  </code></pre>