Id npm i, after truffle compile, truffle migrate --reset and npm start and when create product I've got erorr ๐
Main.createProduct
src/components/MainComponent.js:52
49 | createProduct(name, price) {
50 | this.setState({ loading: true });
51 |
> 52 | this.state.marketplace.methods.createProduct(name, price)
| ^ 53 | .send({ from: this.state.account })
54 | .once('receipt', (receipt) => {
55 | this.setState({ loading: false });
View compiled
onSubmit
src/components/CreateComponent.js:12
9 | <Form onSubmit={(event) => {
10 | event.preventDefault();
11 | const data = new FormData(event.target);
> 12 | props.createProduct(data.get('productName'), window.web3.utils.toWei(data.get('productPrice')).toString(), 'Ether');
| ^ 13 | }}>
14 | <Form.Group as={Row} controlId="formProductName">
15 | <Form.Label column sm="1">Name</Form.Label>