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

[No QA] Revert "Revert "Fix miss-matched SMS email suffix on sign in page"" #15606

Merged
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
4 changes: 1 addition & 3 deletions src/pages/signin/ChangeExpensifyLoginLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const ChangeExpensifyLoginLink = props => (
<Text>
{props.translate('common.not')}
&nbsp;
{Str.isSMSLogin(props.credentials.login || '')
? props.toLocalPhone(Str.removeSMSDomain(props.credentials.login || ''))
: Str.removeSMSDomain(props.credentials.login || '')}
{Str.removeSMSDomain(props.credentials.login)}
{'? '}
</Text>
)}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import Str from 'expensify-common/lib/str';
import ONYXKEYS from '../../ONYXKEYS';
import styles from '../../styles/styles';
import compose from '../../libs/compose';
Expand Down Expand Up @@ -91,9 +92,10 @@ class SignInPage extends Component {
// We will only know this after a user signs in successfully, without their 2FA code
welcomeText = this.props.translate('validateCodeForm.enterAuthenticatorCode');
} else {
const userLogin = Str.removeSMSDomain(this.props.credentials.login);
welcomeText = this.props.account.validated
? this.props.translate('welcomeText.welcomeBackEnterMagicCode', {login: this.props.credentials.login})
: this.props.translate('welcomeText.welcomeEnterMagicCode', {login: this.props.credentials.login});
? this.props.translate('welcomeText.welcomeBackEnterMagicCode', {login: userLogin})
: this.props.translate('welcomeText.welcomeEnterMagicCode', {login: userLogin});
}
} else if (showPasswordForm) {
welcomeText = this.props.translate('welcomeText.welcomeBack');
Expand Down