Skip to content

Commit 8a25efc

Browse files
authored
Merge pull request #836 from jpmorgan-payments/release/v0.16.9
chore(release): v0.16.9
2 parents 54f5919 + 1788071 commit 8a25efc

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

embedded-components/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to the `embedded-components` package are documented in this file.
44

5+
## [0.16.9] - 2026-07-16
6+
7+
### Changes
8+
9+
#### Bug Fixes
10+
11+
- **onboarding:** fix an issue where ptc gateway navigation was being triggered despite non-NEW status
12+
513
## [0.16.8] - 2026-07-15
614

715
### Changes

embedded-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jpmorgan-payments/embedded-finance-components",
3-
"version": "0.16.8",
3+
"version": "0.16.9",
44
"publishConfig": {
55
"access": "public",
66
"registry": "https://registry.npmjs.org/"

embedded-components/src/core/OnboardingFlow/OnboardingFlow.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,17 @@ export const OnboardingFlow: React.FC<OnboardingFlowProps> = ({
8989
// confirm publicly-traded status before proceeding to overview.
9090
// Only applies to existing clients (loaded via providerClientId), not
9191
// freshly-created ones that just went through gateway in this session.
92+
// The gateway is only for org-type/PTC selection during initial creation,
93+
// so it must only be reached while the client is still in the 'NEW'
94+
// (pre-submission) state. Once the client has been submitted — any of
95+
// INFORMATION_REQUESTED, REVIEW_IN_PROGRESS, APPROVED, DECLINED, SUSPENDED
96+
// or TERMINATED — routing there makes no sense.
9297
const ptcAnswered = !!existingOrgParty?.organizationDetails?.publiclyTraded;
9398
const needsPTCGateway =
9499
!!props.enablePubliclyTradedCompanies &&
95100
!!providerClientId &&
96101
!!organizationType &&
102+
clientData?.status === 'NEW' &&
97103
!ptcAnswered;
98104

99105
const flowProviderInitialScreenId = props.docUploadOnlyMode
@@ -214,12 +220,17 @@ const FlowRenderer: React.FC = React.memo(() => {
214220
currentScreenId === 'document-upload-form';
215221

216222
// PTC unanswered: lock sidebar sections so user must answer PTC first.
223+
// The gateway/PTC question is only relevant during initial creation, so the
224+
// lock only applies while the client is still in the 'NEW' (pre-submission)
225+
// state. Once submitted — INFORMATION_REQUESTED, REVIEW_IN_PROGRESS,
226+
// APPROVED, DECLINED, SUSPENDED or TERMINATED — the lock is skipped.
217227
const orgParty = getOrganizationParty(clientData);
218228
const ptcAnsweredInSession = !!sessionData.isPTCQuestionAnswered;
219229
const needsPTCGateway =
220230
!!enablePubliclyTradedCompanies &&
221231
!!clientData?.id &&
222232
!!organizationType &&
233+
clientData?.status === 'NEW' &&
223234
!orgParty?.organizationDetails?.publiclyTraded &&
224235
!ptcAnsweredInSession;
225236

0 commit comments

Comments
 (0)