Skip to content

Commit

Permalink
fix(Swap): swap banner shown when kyc state is none
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-blockchain committed Nov 19, 2018
1 parent 125ed40 commit 2170ebc
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { selectors } from 'data'
import { equals } from 'ramda'

import { selectors, model } from 'data'

const { NONE } = model.profile.KYC_STATES

export const getData = state => {
const showKycGetStarted = selectors.preferences.getShowKycGetStarted(state)
const userVerified = selectors.modules.profile
.isUserVerified(state)
.getOrElse(true)
const kycNotFinished = selectors.modules.profile
.getUserKYCState(state)
.map(equals(NONE))
.getOrElse(false)

return {
showBanner: !showKycGetStarted && !userVerified
showBanner: !showKycGetStarted && kycNotFinished
}
}

0 comments on commit 2170ebc

Please sign in to comment.