Skip to content

Commit

Permalink
feat(segement conflicts): fied issue with segment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-bc committed Apr 12, 2022
1 parent c21bc12 commit ca6461d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
Expand Up @@ -14,7 +14,7 @@ export enum Events {
ONBOARDING_GET_MORE_ACCESS_WHEN_YOU_VERIFY = 'Get More Access When You Verify Clicked',
ONBOARDING_GET_MORE_ACCESS_WHEN_YOU_VERIFY_DISMISSED = 'Get More Access When You Verify Dismissed',
ONBOARDING_MANUAL_VERIFICATION_REQUIRED = 'Manual Verification Required',
ONBOARDING_PERSONAL_INFORMATION_CLICKED = 'Personal Information Entered',
ONBOARDING_PERSONAL_INFORMATION_ENTERED = 'Personal Information Entered',
ONBOARDING_PRE_VERIFICATION_CTA_CLICKED = 'Pre Verification CTA Clicked',
ONBOARDING_PRE_VERIFICATION_DISMISSED = 'Pre Verification Dismissed',
ONBOARDING_PRE_VERIFICATION_VIEWED = 'Pre Verification Viewed',
Expand Down Expand Up @@ -81,6 +81,8 @@ type FailureReason =

type LunchByPromo = 'NUX_LAUNCH_PROMO_BUY_CRYPTO' // this is defined as single enum

type EnteredInformation = 'SETTINGS'

type Provider = 'BLOCKCHAIN' | 'VERIFF'

type AddressEnteredAction = {
Expand Down Expand Up @@ -158,9 +160,11 @@ type CompleteProfileBannerClickedAction = {
}
}

type PersonalInformationClickedAction = {
key: Events.ONBOARDING_PERSONAL_INFORMATION_CLICKED
properties: {}
type PersonalInformationEnteredAction = {
key: Events.ONBOARDING_PERSONAL_INFORMATION_ENTERED
properties: {
origin: EnteredInformation
}
}

type SignUpClickedAction = {
Expand Down Expand Up @@ -323,7 +327,7 @@ export type TrackEventAction =
| CompleteProfileModalViewedAction
| CompleteProfileModalButtonClickedAction
| CompleteProfileBannerClickedAction
| PersonalInformationClickedAction
| PersonalInformationEnteredAction
| SignUpClickedAction
| CountrySelectedAction
| CountryStateSelectedAction
Expand Down
Expand Up @@ -7,7 +7,7 @@ import DataError from 'components/DataError'
import { actions, model, selectors } from 'data'
import { CountryType } from 'data/components/identityVerification/types'
import { RootState } from 'data/rootReducer'
import { InfoAndResidentialFormValuesType } from 'data/types'
import { Analytics, InfoAndResidentialFormValuesType } from 'data/types'

import Loading from '../template.loading'
import { getData } from './selectors'
Expand All @@ -26,12 +26,23 @@ class InfoAndResidential extends PureComponent<Props> {
}

handleSubmit = () => {
const { checkSddEligibility, identityVerificationActions, onCompletionCallback } = this.props
const {
analyticsActions,
checkSddEligibility,
identityVerificationActions,
onCompletionCallback
} = this.props
identityVerificationActions.saveInfoAndResidentialData(
checkSddEligibility,
onCompletionCallback,
false
)
analyticsActions.trackEvent({
key: Analytics.ONBOARDING_PERSONAL_INFORMATION_ENTERED,
properties: {
origin: 'SETTINGS'
}
})
}

onCountryChange = (e, value) => {
Expand Down Expand Up @@ -73,6 +84,7 @@ const mapStateToProps = (state: RootState) => ({
})

const mapDispatchToProps = (dispatch) => ({
analyticsActions: bindActionCreators(actions.analytics, dispatch),
formActions: bindActionCreators(actions.form, dispatch),
identityVerificationActions: bindActionCreators(actions.components.identityVerification, dispatch)
})
Expand Down
Expand Up @@ -32,8 +32,8 @@ class SignupContainer extends React.PureComponent<
super(props)
this.state = {
captchaToken: undefined,
showForm: props.search.includes('showWallet'),
isLatam: props.search.includes('latam'),
showForm: props.search.includes('showWallet'),
showState: false
}
}
Expand Down Expand Up @@ -122,15 +122,15 @@ class SignupContainer extends React.PureComponent<

const subviewProps = {
isFormSubmitting,
isLatam: this.state.isLatam,
isLinkAccountGoal,
onCountrySelect: this.onCountryChange,
onSignupSubmit: this.onSubmit,
setDefaultCountry: this.setCountryOnLoad,
showForm: this.state.showForm,
isLatam: this.state.isLatam,
showState: this.state.showState,
toggleSignupFormVisibility: this.toggleSignupFormVisibility,
toggleLatamVisibility: this.toggleLatamVisibility,
toggleSignupFormVisibility: this.toggleSignupFormVisibility,
...this.props, // order here matters as we may need to override initial form values!
initialValues: signupInitialValues
}
Expand Down Expand Up @@ -179,8 +179,8 @@ type LinkStatePropsType = {
}
type StateProps = {
captchaToken?: string
showForm: boolean
isLatam: boolean
showForm: boolean
showState: boolean
}

Expand Down

0 comments on commit ca6461d

Please sign in to comment.