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

check previousScreen and change loading message #1740

Merged
merged 4 commits into from
Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion app/components/Views/ChoosePassword/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ class ChoosePassword extends PureComponent {
const { isSelected, password, confirmPassword, secureTextEntry, error, loading } = this.state;
const passwordsMatch = password !== '' && password === confirmPassword;
const canSubmit = passwordsMatch && isSelected;
const previousScreen = this.props.navigation.getParam(AppConstants.PREVIOUS_SCREEN);

return (
<SafeAreaView style={styles.mainWrapper}>
Expand All @@ -492,7 +493,13 @@ class ChoosePassword extends PureComponent {
)}
</View>
<ActivityIndicator size="large" color={Device.isAndroid() ? colors.blue : colors.grey} />
<Text style={styles.title}>{strings('create_wallet.title')}</Text>
<Text style={styles.title}>
{strings(
previousScreen === 'onboarding'
? 'create_wallet.title'
: 'secure_your_wallet.creating_password'
)}
</Text>
<Text style={styles.subtitle}>{strings('create_wallet.subtitle')}</Text>
</View>
) : (
Expand Down
1 change: 1 addition & 0 deletions app/components/Views/ChoosePassword/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('ChoosePassword', () => {
const wrapper = shallow(
<ChoosePassword
navigation={{
getParam: () => ['onboarding', 'protect'],
state: { params: {} }
}}
/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ exports[`ProtectYourAccount should render correctly 1`] = `
testID="submit-button"
type="confirm"
>
CREATE PASSWORD
Create Password
</StyledButton>
</View>
</ScrollViewMock>
Expand Down
3 changes: 2 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,8 @@
"step_2_description": "Save wallet seed phrase",
"info_text_1": "Take a few moments to finish setting up your MetaMask wallet.",
"info_text_2": "This will ensure only you can access your funds and will let you recover your wallet if you lose your device",
"cta_text": "CREATE PASSWORD"
"cta_text": "Create Password",
"creating_password": "Creating password..."
},
"account_backup_step_1": {
"remind_me_later": "Remind me later",
Expand Down