Skip to content

Commit

Permalink
fix(XLM): remove Aidrop Banner
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Jun 3, 2019
1 parent 1d96a94 commit 9a375ed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 154 deletions.

This file was deleted.

Expand Up @@ -3,7 +3,6 @@ import styled from 'styled-components'
import { connect } from 'react-redux'

import { getData } from './selectors'
import AirdropClaim from './AirdropClaim'
import KycResubmit from './KycResubmit'
import Swap from './Swap'

Expand All @@ -23,12 +22,6 @@ class Banners extends React.PureComponent {
<KycResubmit />
</BannerWrapper>
)
case 'airdropClaim':
return (
<BannerWrapper>
<AirdropClaim campaign='sunriver' />
</BannerWrapper>
)
case 'swap':
return (
<BannerWrapper>
Expand Down
@@ -1,8 +1,8 @@
import { anyPass, equals, filter, propEq } from 'ramda'
import { anyPass, equals } from 'ramda'

import { selectors, model } from 'data'

const { KYC_STATES, TIERS_STATES } = model.profile
const { KYC_STATES } = model.profile
const { GENERAL, EXPIRED } = model.profile.DOC_RESUBMISSION_REASONS

export const getData = state => {
Expand All @@ -14,24 +14,13 @@ export const getData = state => {
.getKycDocResubmissionStatus(state)
.map(anyPass([equals(GENERAL), equals(EXPIRED)]))
.getOrElse(false)
const isTier2Verified = selectors.modules.profile
.getTiers(state)
.map(filter(propEq('index', 2)))
.map(propEq('state', TIERS_STATES.VERIFIED))
.getOrElse(false)
const isSunRiverTagged = selectors.modules.profile
.getSunRiverTag(state)
.getOrElse(false)
const showKycGetStarted = selectors.preferences.getShowKycGetStarted(state)
const showSwapBannerPrefs = selectors.preferences.getShowSwapBanner(state)
const showSwapBanner = !showKycGetStarted && showSwapBannerPrefs
const showAirdropClaimBanner = !isSunRiverTagged && isTier2Verified

let bannerToShow
if (showDocResubmitBanner) {
bannerToShow = 'resubmit'
} else if (showAirdropClaimBanner) {
bannerToShow = 'airdropClaim'
} else if (showSwapBanner) {
bannerToShow = 'swap'
} else {
Expand Down

0 comments on commit 9a375ed

Please sign in to comment.