mirror of
https://github.com/status-im/snt-voting.git
synced 2025-02-23 15:48:10 +00:00
Set dapp back to working state
This commit is contained in:
parent
da4306b5e1
commit
723b5a2cac
@ -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) })
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,8 @@
|
||||
"$DelegationProxyFactory"
|
||||
],
|
||||
"gasLimit": 5000000
|
||||
}
|
||||
},
|
||||
"PollManager": { "deploy": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user