Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

factory.methods.createCampaign(...).send(...) __this line of codes works fine new campaign is created but next line does not executes. #25

Open
muhammadraza77 opened this issue Jul 27, 2019 · 1 comment

Comments

@muhammadraza77
Copy link

No description provided.

@muhammadraza77 muhammadraza77 changed the title factory.methods.createCampaign(...).send(...) factory.methods.createCampaign(...).send(...) __this line of codes works fine new campaign is created but next line does not executes. Jul 27, 2019
@muhammadraza77
Copy link
Author

muhammadraza77 commented Jul 27, 2019

onSubmit = async event => {
event.preventDefault();

this.setState({ loading: true, errorMessage: '' });

try {
  const accounts = await web3.eth.getAccounts();
  await factory.methods
    .createCampaign(this.state.minimumContribution)
    .send({
      from: accounts[0]
    });
    **console.log("check execution of next line");**
//   Router.pushRoute('/');
} catch (err) {
  this.setState({ errorMessage: err.message });
}

this.setState({ loading: false });

};

after .send function nothing happens it does not get back to code but new campaign is created.....no line code runs after .send function even after try block also....even after looking on some post to attach callback function in .send(),that callback function also didnot ran. dont know why.....plz any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant