|
|
@ -3,12 +3,11 @@ import React, { |
|
|
|
} from 'react'; |
|
|
|
import { Button, Popup } from 'semantic-ui-react'; |
|
|
|
import PropTypes from 'prop-types'; |
|
|
|
|
|
|
|
import './styles.css'; |
|
|
|
import { useSelector } from 'react-redux'; |
|
|
|
import { POST_VOTING_CONTRACT } from '../../../constants/contracts/ContractNames'; |
|
|
|
import { POST_VOTING_CONTRACT } from 'concordia-shared/src/constants/contracts/ContractNames'; |
|
|
|
import { drizzle } from '../../../redux/store'; |
|
|
|
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus'; |
|
|
|
import './styles.css'; |
|
|
|
|
|
|
|
const CHOICE_DEFAULT = '0'; |
|
|
|
const CHOICE_UP = '1'; |
|
|
@ -93,7 +92,8 @@ const PostVoting = (props) => { |
|
|
|
useEffect(() => { |
|
|
|
if (voting && transactionStack && transactionStack[createVoteCacheSendStackId] |
|
|
|
&& transactions[transactionStack[createVoteCacheSendStackId]]) { |
|
|
|
if (transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_SUCCESS || transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_ERROR) { |
|
|
|
if (transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_SUCCESS |
|
|
|
|| transactions[transactionStack[createVoteCacheSendStackId]].status === TRANSACTION_ERROR) { |
|
|
|
setVoting(false); |
|
|
|
} |
|
|
|
} |
|
|
|