mirror of
https://github.com/status-im/visual-identity.git
synced 2025-02-08 10:44:33 +00:00
Merge branch '000-snt-voting-dapp' of https://github.com/status-im/contracts into 000-snt-voting-dapp
This commit is contained in:
commit
e2f9d8c59c
@ -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>
|
||||
)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user