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:
Onuwa Nnachi Isaac 2019-07-03 13:08:12 +01:00
parent f9b0f3b94d
commit c2e8266b57
No known key found for this signature in database
GPG Key ID: 831A4177E1A2CEBB
3 changed files with 7 additions and 3 deletions

View File

@ -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(

View File

@ -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() {

View File

@ -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'