Skip to content

Commit e115797

Browse files
committed
chore(refactor): merge dev
1 parent 8625167 commit e115797

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

packages/blockchain-wallet-v4-frontend/src/scenes/Login/Sofi/ContinueOnMobile/index.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React from 'react'
22
import { FormattedMessage } from 'react-intl'
3+
import { useDispatch } from 'react-redux'
4+
import { push } from 'connected-react-router'
35
import styled from 'styled-components'
46

57
import { Badge, Button, Image, Text } from 'blockchain-info-components'
68
import { Wrapper } from 'components/Public'
79
import { isMobile, media } from 'services/styles'
810

911
import { CircleBackground } from '../../model'
10-
import { useDispatch } from 'react-redux'
11-
import { push } from 'connected-react-router'
1212

1313
const ContentWrapper = styled.div`
1414
display: flex;
@@ -36,13 +36,6 @@ const AppButtons = styled.footer`
3636
`
3737

3838
const ContinueOnMobile = () => {
39-
const dispatch = useDispatch()
40-
// Add check here to make sure that there is wallet data
41-
// route should navigate to login if there's no wallet data
42-
const sofiWalletRedirect = () => {
43-
dispatch(push('/home'))
44-
}
45-
4639
const APP_URL = 'https://blockchainwallet.page.link/dashboard'
4740

4841
const downloadMobileApp = () => {

packages/blockchain-wallet-v4-frontend/src/scenes/Login/Sofi/VerifySSN/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { useEffect } from 'react'
22
import { FormattedMessage } from 'react-intl'
33
import { useDispatch } from 'react-redux'
44
import { Field } from 'redux-form'

packages/blockchain-wallet-v4-frontend/src/scenes/Login/Wallet/CheckEmail/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Button, Icon, Text } from 'blockchain-info-components'
77
import { Wrapper } from 'components/Public'
88
import { selectAlerts } from 'data/alerts/selectors'
99
import { trackEvent } from 'data/analytics/slice'
10+
import { getIsSofi } from 'data/auth/selectors'
1011
import { Analytics, LoginSteps } from 'data/types'
1112
import { VERIFY_EMAIL_SENT_ERROR } from 'services/alerts'
1213
import { media } from 'services/styles'
@@ -42,6 +43,7 @@ const CheckEmail = (props: Props) => {
4243

4344
const dispatch = useDispatch()
4445

46+
const isSofi = useSelector(getIsSofi)
4547
const alerts = useSelector(selectAlerts)
4648

4749
const onResendEmail = (e: SyntheticEvent) => {
@@ -75,7 +77,7 @@ const CheckEmail = (props: Props) => {
7577
const hasErrorAlert = alerts.find((alert) => alert.message === VERIFY_EMAIL_SENT_ERROR)
7678

7779
const handleBackClick = () => {
78-
if (props.isSofi) {
80+
if (isSofi) {
7981
props.setStep(LoginSteps.SOFI_EMAIL)
8082
} else {
8183
props.handleBackArrowClickWallet()
@@ -154,6 +156,7 @@ const CheckEmail = (props: Props) => {
154156

155157
type Props = OwnProps & {
156158
handleSubmit: (e) => void
159+
setStep: (step: LoginSteps) => void
157160
}
158161

159162
export default CheckEmail

packages/blockchain-wallet-v4-frontend/src/scenes/Login/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect } from 'react'
22
import { useDispatch, useSelector } from 'react-redux'
3-
import { FormProps, getFormValues, reduxForm } from 'redux-form'
3+
import { getFormValues, reduxForm } from 'redux-form'
44

55
import { RemoteDataType } from '@core/types'
66
import Form from 'components/Form/Form'
@@ -129,7 +129,7 @@ const Login = (props) => {
129129
trackEvent({
130130
key: Analytics.LOGIN_VIEWED,
131131
properties: {
132-
device_origin: productAuthMetadata?.platform || 'WEB',
132+
device_origin: productAuthMetadata?.platform ?? 'WEB',
133133
originalTimestamp: new Date().toISOString()
134134
}
135135
})
@@ -182,7 +182,7 @@ const Login = (props) => {
182182
return <SofiSuccess />
183183

184184
case LoginSteps.ENTER_EMAIL_GUID:
185-
default:
185+
default: {
186186
const LoginComponent =
187187
productAuthMetadata.product === ProductAuthOptions.EXCHANGE
188188
? ExchangeEnterEmail
@@ -194,6 +194,7 @@ const Login = (props) => {
194194
<LoginComponent {...loginProps} />
195195
</>
196196
)
197+
}
197198
}
198199
})()}
199200
</Form>

0 commit comments

Comments
 (0)