@mxenabled/connect-widget 2.5.3 → 2.5.5
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 +15 -10
- 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;
|
|
@@ -74956,7 +74959,9 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
74956
74959
|
if (!isStartingOauth) return () => {
|
|
74957
74960
|
};
|
|
74958
74961
|
let member$;
|
|
74959
|
-
if (
|
|
74962
|
+
if (member && member.is_oauth) {
|
|
74963
|
+
member$ = of(member);
|
|
74964
|
+
} else if (pendingOauthMember) {
|
|
74960
74965
|
member$ = of(pendingOauthMember);
|
|
74961
74966
|
} else {
|
|
74962
74967
|
const newMemberStream$ = defer(
|
|
@@ -76517,10 +76522,10 @@ const Connecting = (props) => {
|
|
|
76517
76522
|
}
|
|
76518
76523
|
if (ErrorStatuses$1.includes(member.connection_status)) {
|
|
76519
76524
|
return fadeOut(connectingRef.current, "down").then(() => {
|
|
76520
|
-
dispatch(jobComplete$1(member, job));
|
|
76525
|
+
dispatch(jobComplete$1(member, job, connectConfig.mode));
|
|
76521
76526
|
});
|
|
76522
76527
|
} else {
|
|
76523
|
-
return dispatch(jobComplete$1(member, job));
|
|
76528
|
+
return dispatch(jobComplete$1(member, job, connectConfig.mode));
|
|
76524
76529
|
}
|
|
76525
76530
|
});
|
|
76526
76531
|
return () => connectMember$.unsubscribe();
|
|
@@ -82605,7 +82610,7 @@ const RenderConnectStep = (props) => {
|
|
|
82605
82610
|
);
|
|
82606
82611
|
} else if (step === STEPS.ACTIONABLE_ERROR) {
|
|
82607
82612
|
const errorCode = currentMember?.error?.error_code ?? null;
|
|
82608
|
-
connectStepView = canHandleActionableError(errorCode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82613
|
+
connectStepView = canHandleActionableError(errorCode, connectConfig.mode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
82609
82614
|
LoginError,
|
|
82610
82615
|
{
|
|
82611
82616
|
institution: selectedInstitution,
|