Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wallet] Update link styles and Implement VerificationEducationScreen #1565

Merged
merged 24 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a183511
Add navigation fix for hot reloading
jmrossy Oct 31, 2019
d542a45
[Wallet] Add new carousel component
jmrossy Oct 31, 2019
0ccbbf7
Update geth hash
jmrossy Oct 31, 2019
587bf86
Merge branch 'master' into rossy/wa-hot-reloading
jmrossy Oct 31, 2019
1faf354
Merge branch 'rossy/wa-hot-reloading' into rossy/wa-carousel
jmrossy Oct 31, 2019
ca440c1
Set up new screens for verification
jmrossy Oct 31, 2019
5b568eb
Update yarn lock
jmrossy Oct 31, 2019
41d0817
Merge branch 'master' into rossy/wa-hot-reloading
jmrossy Oct 31, 2019
c53d33b
Merge branch 'rossy/wa-hot-reloading' into rossy/wa-carousel
jmrossy Oct 31, 2019
06a3f06
Merge branch 'rossy/wa-carousel' into rossy/wa-new-verification-screens
jmrossy Oct 31, 2019
412df2f
Add test files
jmrossy Oct 31, 2019
48a3c3c
Merge branch 'master' into rossy/wa-carousel
jmrossy Nov 1, 2019
3b77890
Fix tests
jmrossy Nov 1, 2019
727e26b
Merge branch 'rossy/wa-carousel' into rossy/wa-new-verification-screens
jmrossy Nov 1, 2019
175d39f
Add snapshots
jmrossy Nov 1, 2019
dd72001
Implement new Link styles and break out text buttons into a separate …
jmrossy Nov 1, 2019
ce5c774
Undo change to nav wrapper
jmrossy Nov 1, 2019
592a5de
Fix tests and leftover bit in Account
jmrossy Nov 1, 2019
d6851bb
Merge branch 'master' into rossy/wa-new-verification-screens
jmrossy Nov 4, 2019
e07e15b
Merge branch 'rossy/wa-new-verification-screens' into rossy/wa-ver-ed…
jmrossy Nov 4, 2019
96f50c3
Merge branch 'master' into rossy/wa-ver-education
jmrossy Nov 4, 2019
5028411
Add missing spanish strings
jmrossy Nov 4, 2019
62dee7a
Merge branch 'master' into rossy/wa-ver-education
jmrossy Nov 5, 2019
ce73eab
Fix transient test failure
jmrossy Nov 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/mobile/locales/en-US/accountScreen10.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"enableCeloLite": "Enable Celo Lite",
"celoLiteDetail":
"Celo Lite mode allows you to communicate with the Celo Network through a trusted node. You can always change this mode in app settings.",
"testFaqHere": "<0>Celo Wallet FAQ is </0><1>here</1>",
"termsOfServiceHere": "<0>Terms of service are </0><1>here</1>",
"testFaqLink": "Celo Wallet FAQ",
"termsOfServiceLink": "Terms of service",
"editProfile": "Edit Profile",
"cancel": "Cancel",
"changeProfilePhoto": "Change Profile Photo",
Expand Down
5 changes: 2 additions & 3 deletions packages/mobile/locales/en-US/nuxNamePin1.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@
"validating": "Great! Validating copied invite code",
"inviteAccepted": "🎉 Invite Accepted!",
"askForInvite": {
"0":
"Request an invite from someone with Celo Wallet or sign up for the {{testnet}} network at ",
"1": "celo.org/build/wallet"
"0": "Request an invite from a friend on Celo or sign up for the {{testnet}} network at ",
"1": "celo.org/app"
}
},
"enterFullName": "Please enter your first and last name",
Expand Down
11 changes: 10 additions & 1 deletion packages/mobile/locales/en-US/nuxVerification2.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,14 @@
"errorRedeemingCode": "Failed to redeem code.",
"pleaseRetry": "Please retry verification.",
"retryVerification": "Retry Verification",
"codeAccepted": "Accepted"
"codeAccepted": "Accepted",
"education": {
"header": "Verify Your Phone",
"body1": "Next, please verify your phone number.",
"body2":
"Verifying makes it easier to send and receive with friends. You can also skip this step and return to it later.",
"learnMore": "Learn more about phone verification",
"start": "Start Verification",
"skip": "Skip For Now"
}
}
2 changes: 1 addition & 1 deletion packages/mobile/locales/en-US/walletFlow5.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"testnetAlert": {
"0": "{{testnet}}",
"1":
"A friendly reminder you're using the {{testnet}} network build - the balances here are not real."
"A friendly reminder you're using the {{testnet}} network build - the balances are not real"
},
"dismiss": "Dismiss",
"localCurrencyEqual": "Equal to <2>{{localValue}} {{localCurrencyCode}}</2>",
Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/locales/es-419/accountScreen10.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"enableCeloLite": "Habilitar Celo Lite",
"celoLiteDetail":
"El modo Celo Lite te permite comunicarte con la Red Celo a través de un nodo confiable. Puedes cambiar este modo en la configuración de la aplicación.",
"testFaqHere": "<1>Aquí</1><0> están las preguntas frecuentes del Monedero Celo. </0>",
"termsOfServiceHere": "<1>Aquí</1><0> están las Condiciones de servicio.</0>",
"testFaqLink": "Las Preguntas Frecuentes del Monedero Celo",
"termsOfServiceLink": "Las Condiciones de Servicio",
"editProfile": "Editar perfil",
"cancel": "Cancelar",
"changeProfilePhoto": "Cambiar la foto de perfil",
Expand Down
5 changes: 2 additions & 3 deletions packages/mobile/locales/es-419/nuxNamePin1.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@
"validating": "Genial! Validando el código de invitación copiado",
"inviteAccepted": "🎉 Invitación aceptada!",
"askForInvite": {
"0":
"Solicite una invitación de alguien con Celo Monedero o regístrese en red {{testnet}} en ",
"1": "celo.org/build/wallet"
"0": "Solicite una invitación de un amigo en Celo o regístrese en la red {{testnet}} en ",
"1": "celo.org/app"
}
},
"enterFullName": "Ingresa tu nombre y apellido",
Expand Down
11 changes: 10 additions & 1 deletion packages/mobile/locales/es-419/nuxVerification2.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,14 @@
"errorRedeemingCode": "Error al canjear el código.",
"pleaseRetry": "Por favor reinicie la verificación.",
"retryVerification": "Reintentar la verificación",
"codeAccepted": "Aceptado"
"codeAccepted": "Aceptado",
"education": {
"header": "~~Verify Your Phone",
"body1": "~~Next, please verify your phone number.",
"body2":
"~~Verifying makes it easier to send and receive with friends. You can also skip this step and return to it later.",
"learnMore": "~~Learn more about phone verification",
"start": "~~Start Verification",
"skip": "~~Skip For Now"
}
}
19 changes: 3 additions & 16 deletions packages/mobile/src/account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fontStyles } from '@celo/react-components/styles/fonts'
import { anonymizedPhone, isE164Number } from '@celo/utils/src/phoneNumbers'
import * as Sentry from '@sentry/react-native'
import * as React from 'react'
import { Trans, WithNamespaces, withNamespaces } from 'react-i18next'
import { WithNamespaces, withNamespaces } from 'react-i18next'
import { Clipboard, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
import DeviceInfo from 'react-native-device-info'
import SafeAreaView from 'react-native-safe-area-view'
Expand Down Expand Up @@ -257,23 +257,10 @@ export class Account extends React.Component<Props, State> {
<Text style={fontStyles.bodySmall}>{t('version') + ' ' + this.state.version}</Text>
</View>
<View style={style.accountFooterText}>
<Trans i18nKey="testFaqHere">
<Text style={fontStyles.bodySmall}>Test FAQ is </Text>
<Link style={[fontStyles.bodySmall, fontStyles.linkInline]} onPress={this.goToFAQ}>
here
</Link>
</Trans>
<Link onPress={this.goToFAQ}>{t('testFaqLink')}</Link>
</View>
<View style={style.accountFooterText}>
<Trans i18nKey="termsOfServiceHere">
<Text style={fontStyles.bodySmall}>Terms of service are </Text>
<Link
style={[fontStyles.bodySmall, fontStyles.linkInline]}
onPress={this.goToTerms}
>
here
</Link>
</Trans>
<Link onPress={this.goToTerms}>{t('termsOfServiceLink')}</Link>
</View>
</View>
</SafeAreaView>
Expand Down
144 changes: 16 additions & 128 deletions packages/mobile/src/account/__snapshots__/Account.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -899,18 +899,6 @@ exports[`Account renders correctly 1`] = `
}
}
>
<Text
style={
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
}
}
>
Test FAQ is
</Text>
<View
accessible={true}
focusable={true}
Expand All @@ -935,31 +923,15 @@ exports[`Account renders correctly 1`] = `
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-Medium",
"fontSize": 14,
"fontSize": 13,
"lineHeight": 18,
"textDecorationLine": "underline",
},
Array [
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-SemiBold",
},
],
undefined,
]
}
>
here
testFaqLink
</Text>
</View>
</View>
Expand All @@ -971,18 +943,6 @@ exports[`Account renders correctly 1`] = `
}
}
>
<Text
style={
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
}
}
>
Terms of service are
</Text>
<View
accessible={true}
focusable={true}
Expand All @@ -1007,31 +967,15 @@ exports[`Account renders correctly 1`] = `
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-Medium",
"fontSize": 14,
"fontSize": 13,
"lineHeight": 18,
"textDecorationLine": "underline",
},
Array [
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-SemiBold",
},
],
undefined,
]
}
>
here
termsOfServiceLink
</Text>
</View>
</View>
Expand Down Expand Up @@ -2117,18 +2061,6 @@ exports[`Account renders correctly when dev mode active 1`] = `
}
}
>
<Text
style={
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
}
}
>
Test FAQ is
</Text>
<View
accessible={true}
focusable={true}
Expand All @@ -2153,31 +2085,15 @@ exports[`Account renders correctly when dev mode active 1`] = `
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-Medium",
"fontSize": 14,
"fontSize": 13,
"lineHeight": 18,
"textDecorationLine": "underline",
},
Array [
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-SemiBold",
},
],
undefined,
]
}
>
here
testFaqLink
</Text>
</View>
</View>
Expand All @@ -2189,18 +2105,6 @@ exports[`Account renders correctly when dev mode active 1`] = `
}
}
>
<Text
style={
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
}
}
>
Terms of service are
</Text>
<View
accessible={true}
focusable={true}
Expand All @@ -2225,31 +2129,15 @@ exports[`Account renders correctly when dev mode active 1`] = `
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-Medium",
"fontSize": 14,
"fontSize": 13,
"lineHeight": 18,
"textDecorationLine": "underline",
},
Array [
Object {
"color": "#2E3338",
"fontFamily": "Hind-Regular",
"fontSize": 14,
"lineHeight": 18,
},
Object {
"color": "#42D689",
"fontFamily": "Hind-SemiBold",
},
],
undefined,
]
}
>
here
termsOfServiceLink
</Text>
</View>
</View>
Expand Down
27 changes: 0 additions & 27 deletions packages/mobile/src/app/saga.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { REHYDRATE } from 'redux-persist/es/constants'
import { expectSaga } from 'redux-saga-test-plan'
import { call, select } from 'redux-saga/effects'
import { PincodeType } from 'src/account/reducer'
import { getPincode } from 'src/account/saga'
import CeloAnalytics from 'src/analytics/CeloAnalytics'
import { finishPinVerification, startPinVerification } from 'src/app/actions'
Expand Down Expand Up @@ -42,30 +41,6 @@ const initialState = {
identity: {},
}

const numberVerified = {
app: {
language: 'EN',
numberVerified: false,
},
verify: {
e164PhoneNumber: '+1234',
},
web3: {
syncProgress: 101,
},
account: {
pincodeType: PincodeType.PhoneAuth,
e164PhoneNumber: '+1234',
},
invite: {
redeemComplete: true,
},
identity: {
startedVerification: false,
askedContactsPermission: true,
},
}

const navigationSagaTest = (testName: string, state: any, expectedScreen: any) => {
test(testName, async () => {
await expectSaga(navigateToProperScreen)
Expand Down Expand Up @@ -134,5 +109,3 @@ describe('Upload Comment Key Saga', () => {

navigationSagaTest('Navigates to the nux stack with no state', null, Stacks.NuxStack)
navigationSagaTest('Navigates to the nux stack with no language', initialState, Stacks.NuxStack)

navigationSagaTest('Navigates to the verify screen', numberVerified, Screens.VerifyEducation)
Loading