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

Encode secondary login URL #6479

Merged
merged 5 commits into from
Nov 25, 2021
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
2 changes: 1 addition & 1 deletion src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const CONST = {
PRIVACY_URL: 'https://use.expensify.com/privacy',
LICENSES_URL: 'https://use.expensify.com/licenses',
PLAY_STORE_URL: 'https://play.google.com/store/apps/details?id=com.expensify.chat&hl=en',
ADD_SECONDARY_LOGIN_URL: 'settings?param={%22section%22:%22account%22}',
ADD_SECONDARY_LOGIN_URL: encodeURI('settings?param={"section":"account","openModal":"secondaryLogin"}'),
MANAGE_CARDS_URL: 'domain_companycards',
FEES_URL: 'https://use.expensify.com/fees',
CFPB_PREPAID_URL: 'https://cfpb.gov/prepaid',
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ReimbursementAccount/EnableStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import * as Illustrations from '../../components/Icon/Illustrations';
import * as BankAccounts from '../../libs/actions/BankAccounts';
import * as Link from '../../libs/actions/Link';
import * as User from '../../libs/actions/User';
import CONST from '../../CONST';

const propTypes = {
/** Are we loading payment methods? */
Expand Down Expand Up @@ -76,7 +77,7 @@ class EnableStep extends React.Component {
title: this.props.translate('workspace.bankAccount.addWorkEmail'),
icon: Expensicons.Mail,
onPress: () => {
Link.openOldDotLink('settings?param={"section":"account","openModal":"secondaryLogin"}');
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
User.subscribeToExpensifyCardUpdates();
},
shouldShowRightIcon: true,
Expand Down
3 changes: 2 additions & 1 deletion src/pages/workspace/card/WorkspaceCardVBANoECardView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as Link from '../../../libs/actions/Link';
import * as User from '../../../libs/actions/User';
import ONYXKEYS from '../../../ONYXKEYS';
import compose from '../../../libs/compose';
import CONST from '../../../CONST';

const propTypes = {
...withLocalizePropTypes,
Expand All @@ -27,7 +28,7 @@ const WorkspaceCardVBANoECardView = props => (
title: props.translate('workspace.card.addWorkEmail'),
onPress: () => {
Navigation.dismissModal();
Link.openOldDotLink('settings?param={"section":"account","openModal":"secondaryLogin"}');
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
User.subscribeToExpensifyCardUpdates();
},
icon: Expensicons.Mail,
Expand Down