@mxenabled/connect-widget 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +12 -9
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9167,7 +9167,10 @@ const ACTIONABLE_ERROR_CODES = {
|
|
|
9167
9167
|
NO_ELIGIBLE_ACCOUNTS: 1e3
|
|
9168
9168
|
};
|
|
9169
9169
|
const ACTIVE_ACTIONABLE_ERROR_CODES = Object.values(ACTIONABLE_ERROR_CODES);
|
|
9170
|
-
const canHandleActionableError = (errorCode) => {
|
|
9170
|
+
const canHandleActionableError = (errorCode, mode) => {
|
|
9171
|
+
if (errorCode === ACTIONABLE_ERROR_CODES.NO_ELIGIBLE_ACCOUNTS && mode !== VERIFY_MODE) {
|
|
9172
|
+
return false;
|
|
9173
|
+
}
|
|
9171
9174
|
return ACTIVE_ACTIONABLE_ERROR_CODES.includes(errorCode);
|
|
9172
9175
|
};
|
|
9173
9176
|
|
|
@@ -9460,7 +9463,7 @@ const stepToMicrodeposits = (state) => ({
|
|
|
9460
9463
|
location: pushLocation(state.location, STEPS.MICRODEPOSITS)
|
|
9461
9464
|
});
|
|
9462
9465
|
const jobComplete = (state, action) => {
|
|
9463
|
-
const { member, job } = action.payload;
|
|
9466
|
+
const { member, job, mode = AGG_MODE } = action.payload;
|
|
9464
9467
|
const members = upsertMember(state, { payload: member });
|
|
9465
9468
|
if (member.connection_status === ReadableStatuses$1.CONNECTED) {
|
|
9466
9469
|
const scheduledJobs = onJobFinished(state.jobSchedule, job);
|
|
@@ -9469,7 +9472,7 @@ const jobComplete = (state, action) => {
|
|
|
9469
9472
|
return {
|
|
9470
9473
|
...state,
|
|
9471
9474
|
currentMemberGuid: member.guid,
|
|
9472
|
-
location: pushLocation(state.location, getStepFromMember(member)),
|
|
9475
|
+
location: pushLocation(state.location, getStepFromMember(member, mode)),
|
|
9473
9476
|
members,
|
|
9474
9477
|
updateCredentials: member.connection_status === ReadableStatuses$1.DENIED || state.updateCredentials
|
|
9475
9478
|
};
|
|
@@ -9597,7 +9600,7 @@ function getStartingStep(members, member, microdeposit, config, institution, wid
|
|
|
9597
9600
|
else if (shouldUpdateCredentials)
|
|
9598
9601
|
return STEPS.ENTER_CREDENTIALS;
|
|
9599
9602
|
else if (member && config.current_member_guid)
|
|
9600
|
-
return shouldStepToConnecting ? STEPS.CONNECTING : getStepFromMember(member);
|
|
9603
|
+
return shouldStepToConnecting ? STEPS.CONNECTING : getStepFromMember(member, config.mode);
|
|
9601
9604
|
else if (shouldStepToMicrodeposits)
|
|
9602
9605
|
return STEPS.MICRODEPOSITS;
|
|
9603
9606
|
else if (widgetProfile.display_disclosure_in_connect)
|
|
@@ -9608,11 +9611,11 @@ function getStartingStep(members, member, microdeposit, config, institution, wid
|
|
|
9608
9611
|
return getIavMembers(members).length > 0 ? STEPS.VERIFY_EXISTING_MEMBER : STEPS.SEARCH;
|
|
9609
9612
|
else return STEPS.SEARCH;
|
|
9610
9613
|
}
|
|
9611
|
-
function getStepFromMember(member) {
|
|
9614
|
+
function getStepFromMember(member, mode = AGG_MODE) {
|
|
9612
9615
|
const connection_status = member.connection_status;
|
|
9613
9616
|
if (member && memberIsBlockedForCostReasons(member)) {
|
|
9614
9617
|
return STEPS.INSTITUTION_DISABLED;
|
|
9615
|
-
} else if (member?.error?.error_code && canHandleActionableError(member?.error?.error_code) || hasNoSingleAccountSelectOptions(member))
|
|
9618
|
+
} else if (member?.error?.error_code && canHandleActionableError(member?.error?.error_code, mode) || hasNoSingleAccountSelectOptions(member))
|
|
9616
9619
|
return STEPS.ACTIONABLE_ERROR;
|
|
9617
9620
|
else if (connection_status === ReadableStatuses$1.CHALLENGED)
|
|
9618
9621
|
return STEPS.MFA;
|
|
@@ -76517,10 +76520,10 @@ const Connecting = (props) => {
|
|
|
76517
76520
|
}
|
|
76518
76521
|
if (ErrorStatuses$1.includes(member.connection_status)) {
|
|
76519
76522
|
return fadeOut(connectingRef.current, "down").then(() => {
|
|
76520
|
-
dispatch(jobComplete$1(member, job));
|
|
76523
|
+
dispatch(jobComplete$1(member, job, connectConfig.mode));
|
|
76521
76524
|
});
|
|
76522
76525
|
} else {
|
|
76523
|
-
return dispatch(jobComplete$1(member, job));
|
|
76526
|
+
return dispatch(jobComplete$1(member, job, connectConfig.mode));
|
|
76524
76527
|
}
|
|
76525
76528
|
});
|
|
76526
76529
|
return () => connectMember$.unsubscribe();
|
|
@@ -82605,7 +82608,7 @@ const RenderConnectStep = (props) => {
|
|
|
82605
82608
|
);
|
|
82606
82609
|
} else if (step === STEPS.ACTIONABLE_ERROR) {
|
|
82607
82610
|
const errorCode = currentMember?.error?.error_code ?? null;
|
|
82608
|
-
connectStepView = canHandleActionableError(errorCode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82611
|
+
connectStepView = canHandleActionableError(errorCode, connectConfig.mode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82609
82612
|
LoginError,
|
|
82610
82613
|
{
|
|
82611
82614
|
institution: selectedInstitution,
|