specify from field

This commit is contained in:
Iuri Matias 2019-10-03 18:42:59 -04:00
parent 45d13547c4
commit ea6d1bda98
1 changed files with 4 additions and 2 deletions

View File

@ -38,11 +38,13 @@ class App extends React.Component {
}
rateProduct = async () => {
await Product.methods.rateProduct(0, this.state.userRating).send();
let accounts = await web3.eth.getAccounts();
await Product.methods.rateProduct(0, this.state.userRating).send({from: accounts[0]});
};
updateTitle = async () => {
await Product.methods.editProduct(0, this.state.userTitle).send();
let accounts = await web3.eth.getAccounts();
await Product.methods.editProduct(0, this.state.userTitle).send({from: accounts[0]});
};
sendFunds = async () => {