mirror of https://github.com/dap-ps/discover.git
Fix Endless 'Waiting confirmation of the network' at attempt to upvote app with empty balance or if you cancel transaction #4
This commit is contained in:
parent
f9b0f3b94d
commit
c2e8266b57
|
@ -1,10 +1,12 @@
|
|||
import { connect } from 'react-redux'
|
||||
import Alert from './Alert'
|
||||
import { hideAlertAction } from './Alert.reducer'
|
||||
import { hideAction } from '../TransactionStatus/TransactionStatus.recuder'
|
||||
|
||||
const mapStateToProps = state => state.alert
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
hideAlert: () => dispatch(hideAlertAction()),
|
||||
hideTransaction: () => dispatch(hideAction()),
|
||||
})
|
||||
|
||||
export default connect(
|
||||
|
|
|
@ -9,13 +9,15 @@ class Alert extends React.Component {
|
|||
this.onClickNegative = this.onClickNegative.bind(this)
|
||||
}
|
||||
onClickPositive() {
|
||||
const { hideAlert, positiveListener } = this.props
|
||||
const { hideAlert, positiveListener, hideTransaction } = this.props
|
||||
hideAlert()
|
||||
hideTransaction()
|
||||
if (positiveListener !== null) positiveListener()
|
||||
}
|
||||
onClickNegative() {
|
||||
const { hideAlert, negativeListener } = this.props
|
||||
const { hideAlert, negativeListener, hideTransaction } = this.props
|
||||
hideAlert()
|
||||
hideTransaction()
|
||||
if (negativeListener !== null) negativeListener()
|
||||
}
|
||||
render() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
import { onUpdateDappDataAction } from '../Dapps/Dapps.reducer'
|
||||
import { showAlertAction } from '../Alert/Alert.reducer'
|
||||
import BlockchainSDK from '../../common/blockchain'
|
||||
import DappModel from '../../common/data/dapp';
|
||||
import DappModel from '../../common/data/dapp'
|
||||
|
||||
const HIDE = 'TXS_HIDE'
|
||||
const ON_START_PROGRESS = 'TXS_ON_START_PROGRESS'
|
||||
|
|
Loading…
Reference in New Issue