title: Transaction hash Returned error: invalid sender
body: <p>I try to create interaction with smart-contract through back-end. <br/>
  I wrote this script from the tutorial: <a href="https://www.youtube.com/watch?v=n9QLsSagUzE&amp;list=PL91iF38TuGWLJ4IyNhP7jLaKatbWVNm9c&amp;index=7&amp;t=756s" rel="nofollow noreferrer">click me.</a> <br/>
  Tell me please, why I get an error from sending my signed transaction? And how can I fix it?</p>
  <pre><code>const Web3 = require('web3');
  require('dotenv').config();
  const MyContract = require('./build/contracts/HelloWorld.json');
  const address = '0xD7cE788A5bA84b53932780DfCf98F7430ce5d3e1';
  const private_key = process.env.PRIVATE_KEY;
  const infuraUrl = process.env.INFURA_URL;
  
  const init = async () =&gt; {
      var web3 = new Web3(new Web3.providers.HttpProvider(infuraUrl));
  
      const networkId = await web3.eth.net.getId();
      const myContract = new web3.eth.Contract(
          MyContract.abi,
          MyContract.networks[networkId].address
      );
  
      const tx = myContract.methods.update(&quot;LoremIpsum&quot;);
      const gas = await tx.estimateGas({from: address});
      const gasPrice = await web3.eth.getGasPrice();
      const data = tx.encodeABI();
      const nonce = await web3.eth.getTransactionCount(address);
  
      const signedTx = await web3.eth.accounts.signTransaction(
          {
              to: myContract.options.address,
              data,
              gas,
              gasPrice,
              nonce,
              chain: networkId,
              hardfork: 'newRule'
          },
          private_key
      ).catch(e =&gt; e.message);
      console.log(`Old data value ${await myContract.methods.message().call()}`);
      const receipt = await web3.eth.sendSignedTransaction(signedTx.rawTransaction).catch(e =&gt; e.message); //error
      console.log(`Transaction hash ${receipt}`);
      console.log(`New data value ${await myContract.methods.message().call()}`);
  };
  
  init();
  </code></pre>