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) setSubmitPrice(address, allowed, stakeValue)
.send() .send()
.then(res => { .then(res => {
this.setState({ ...state, canSubmit: true }); this.setState({ ...this.state, canSubmit: true });
console.log(res); console.log(res);
}) })
.catch(err => { console.log(err) }) .catch(err => { console.log(err) })

View File

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

View File

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

View File

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