Skip to content

Commit

Permalink
Remove passwordless references
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed May 8, 2023
1 parent bbe4197 commit 6d15fdf
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ import * as ErrorUtils from '../../../../libs/ErrorUtils';
import themeColors from '../../../../styles/themes/default';
import NotFoundPage from '../../../ErrorPage/NotFoundPage';
import * as ValidationUtils from '../../../../libs/ValidationUtils';
import Permissions from '../../../../libs/Permissions';

const propTypes = {
/* Onyx Props */

/** List of betas available to current user */
betas: PropTypes.arrayOf(PropTypes.string),

/** Login list for the user that is signed in */
loginList: PropTypes.shape({
/** Value of partner name */
Expand Down Expand Up @@ -80,7 +76,6 @@ const propTypes = {
};

const defaultProps = {
betas: [],
loginList: {},
session: {
email: null,
Expand Down Expand Up @@ -233,11 +228,9 @@ class ContactMethodDetailsPage extends Component {
// 1. This contact method is not already their default
// 2. This contact method is validated
// 3. Default contact method switching is allowed by their domain security group (if this exists)
// 4. The user is on the passwordless beta
const canChangeDefaultContactMethod = !isDefaultContactMethod
&& loginData.validatedDate
&& this.getCanChangeDefaultContactMethod()
&& Permissions.canUsePasswordlessLogins(this.props.betas);
&& this.getCanChangeDefaultContactMethod();

return (
<ScreenWrapper>
Expand Down Expand Up @@ -366,9 +359,6 @@ ContactMethodDetailsPage.defaultProps = defaultProps;
export default compose(
withLocalize,
withOnyx({
betas: {
key: ONYXKEYS.BETAS,
},
loginList: {
key: ONYXKEYS.LOGIN_LIST,
},
Expand Down

0 comments on commit 6d15fdf

Please sign in to comment.