Skip to content

Commit

Permalink
fix(dispatch hideKycCompleted on kyc unmount)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed Jun 7, 2018
1 parent 8a32aab commit 148a826
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -8,8 +8,9 @@ import { getData } from './selectors'
import Success from './template'

class KYCNotificationContainer extends React.Component {
componentDidMount () {
componentWillUnmount () {
const { kyc, showKycCompleted } = this.props

if (showKycCompleted && equals(prop('state', kyc), 'completed')) {
this.props.preferencesActions.hideKycCompleted()
}
Expand All @@ -18,7 +19,7 @@ class KYCNotificationContainer extends React.Component {
render () {
const { canTrade, kyc, limits, onTrigger, showKycCompleted, symbol, type } = this.props

return showKycCompleted || !equals(prop('state', kyc), 'completed')
return (showKycCompleted || !equals(prop('state', kyc), 'completed'))
? <Success kyc={kyc} canTrade={canTrade} limits={limits} onTrigger={onTrigger}
showKycCompleted={showKycCompleted} symbol={symbol} type={type} />
: null
Expand Down

0 comments on commit 148a826

Please sign in to comment.