Skip to content

Commit

Permalink
Merge pull request #27298 from abdel-h66/27148-fix-bank-account-redir…
Browse files Browse the repository at this point in the history
…ects-to-invalid-page

Fix:Bank account clickable link redirect to invalid page
  • Loading branch information
pecanoro authored Sep 25, 2023
2 parents 94ba36e + 51b93b2 commit bcc2ddb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/ReimbursementAccount/BankAccountStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const propTypes = {

/* The workspace name */
policyName: PropTypes.string,

/* The workspace ID */
policyID: PropTypes.string,
};

const defaultProps = {
Expand All @@ -57,6 +60,7 @@ const defaultProps = {
user: {},
isPlaidDisabled: false,
policyName: '',
policyID: '',
};

function BankAccountStep(props) {
Expand All @@ -66,7 +70,7 @@ function BankAccountStep(props) {
subStep = CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID;
}
const plaidDesktopMessage = getPlaidDesktopMessage();
const bankAccountRoute = `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.BANK_ACCOUNT}`;
const bankAccountRoute = `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.getBankAccountRoute('new', props.policyID, ROUTES.getWorkspaceInitialRoute(props.policyID))}`;

if (subStep === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL) {
return (
Expand Down
1 change: 1 addition & 0 deletions src/pages/ReimbursementAccount/ReimbursementAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ class ReimbursementAccountPage extends React.Component {
plaidLinkOAuthToken={this.props.plaidLinkToken}
getDefaultStateForField={this.getDefaultStateForField}
policyName={policyName}
policyID={policyID}
/>
);
}
Expand Down

0 comments on commit bcc2ddb

Please sign in to comment.