Set dapp back to working state

This commit is contained in:
Richard Ramos 2018-06-25 09:43:08 -04:00
parent da4306b5e1
commit 723b5a2cac
4 changed files with 7 additions and 11 deletions

View File

@ -49,7 +49,7 @@ class InnerForm extends PureComponent {
setSubmitPrice(address, allowed, stakeValue)
.send()
.then(res => {
this.setState({ ...state, canSubmit: true });
this.setState({ ...this.state, canSubmit: true });
console.log(res);
})
.catch(err => { console.log(err) })

View File

@ -11,7 +11,6 @@ class Voting extends Component {
super(props);
this.state = {
decision: 0,
proposal: null,
finalResult: null
};
}
@ -19,12 +18,11 @@ class Voting extends Component {
componentDidMount(){
__embarkContext.execWhenReady(async () => {
ProposalManager.options.address = await ProposalCuration.methods.proposalManager().call();
let _proposal = await ProposalManager.methods.getProposal(this.props.proposalId).call();
let _proposal = await ProposalManager.methods.getVoteInfo(this.props.proposalId, web3.eth.defaultAccount).call();
let blockNum = await web3.eth.getBlockNumber();
let _data = await ProposalManager.methods.getProposalData(this.props.proposalId).call();
let _data = await ProposalManager.methods.proposals(this.props.proposalId).call();
this.setState({
proposal: _proposal,
data: _data,
decision: _proposal.vote,
block: blockNum,
@ -46,7 +44,6 @@ class Voting extends Component {
finalResult: receipt.events.ProposalResult.finalResult
});
}
console.log(receipt);
}
async handleClick(e, vote){
@ -70,8 +67,6 @@ class Voting extends Component {
block: blockNum
});
}
console.log(receipt);
// TODO: handle error
}

View File

@ -78,7 +78,8 @@
"$DelegationProxyFactory"
],
"gasLimit": 5000000
}
},
"PollManager": { "deploy": false }
}
}
}

View File

@ -3,7 +3,7 @@
"versions": {
"ipfs-api": "17.2.4"
},
"enabled": false,
"enabled": true,
"ipfs_bin": "ipfs",
"provider": "ipfs",
"available_providers": ["ipfs"],
@ -11,7 +11,7 @@
"port": 5001
},
"development": {
"enabled": false,
"enabled": true,
"provider": "ipfs",
"host": "localhost",
"port": 5001,