Merge branch '000-snt-voting-dapp' of https://github.com/status-im/contracts into 000-snt-voting-dapp

This commit is contained in:
Richard Ramos 2018-06-28 11:14:35 -04:00
commit e2f9d8c59c
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import AppBar from './standard/AppBar';
import AddPoll from './simple-voting/AddPoll';
import PollsList from './simple-voting/PollsList';
import StatusLogo from '../ui/components/StatusLogo';
import Collapse from '@material-ui/core/Collapse';
class Voting extends PureComponent {
state = { addPoll: false };
@ -20,7 +21,9 @@ class Voting extends PureComponent {
<div style={{ margin: '30px', textAlign: 'center' }}>
<img src="images/logo.png" width="200" />
</div>
{addPoll && <AddPoll togglePoll={togglePoll} />}
<Collapse in={addPoll}>
<AddPoll togglePoll={togglePoll} />
</Collapse>
{rawPolls && <PollsList rawPolls={rawPolls} />}
</Fragment>
)

View File

@ -89,7 +89,7 @@ const AddPoll = withFormik({
},
async handleSubmit(values, { setSubmitting, setErrors, props }) {
const { description } = values;
const { eth: { getBlockNumber }, utils: { asciiToHex } } = window.web3;
const { eth: { getBlockNumber } } = window.web3;
const { addPoll } = PollManager.methods;
const currentBlock = await getBlockNumber();
const endTime = currentBlock + (oneDayinBlocks * 90);