title: Metamask: This transaction is expected to fail
body: <p>I have an ERC721 contract and i'm getting an error ('This transaction is expected to fail.) in Metamask with the following code:</p>
  <pre><code>event PropertyNftBought(address _owner, address _buyer, uint256 _price);
  
  function buy(uint256 _id) external payable {
          price = price;
          require(price &gt;= 2, 'This token is not for sale');
          require(msg.value &gt;= price, 'Incorrect value');
          buildings[_id - 1].owner = ownerOf(_id);
          _transfer(owner, msg.sender, _id);
          payable(owner).transfer(msg.value); 
  
          emit PropertyNftBought(owner, msg.sender, msg.value);
      }
  </code></pre>
  <p>App.js</p>
  <pre><code>await landContract.methods.buy(_id).send(account[0], {from: account, value: '2000000000000000000'}) 
  </code></pre>
  <p>How would I fix this so that the transaction goes through?</p>