@tap-payments/auth-jsconnect 2.6.16-test → 2.6.17-test
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.
|
@@ -1277,6 +1277,10 @@ export var connectSlice = createSlice({
|
|
|
1277
1277
|
state.error = null;
|
|
1278
1278
|
state.loading = false;
|
|
1279
1279
|
var _a = action.payload, brandList = _a.brandList, entityList = _a.entityList;
|
|
1280
|
+
if (brandList === null || brandList === void 0 ? void 0 : brandList.length)
|
|
1281
|
+
state.data.authenticationData.brandInfo = brandList[0];
|
|
1282
|
+
if (entityList === null || entityList === void 0 ? void 0 : entityList.length)
|
|
1283
|
+
state.data.authenticationData.entityInfo = entityList[0];
|
|
1280
1284
|
state.data.responseData = __assign(__assign({}, state.data.responseData), { authenticationData: { brandList: brandList, entityList: entityList } });
|
|
1281
1285
|
})
|
|
1282
1286
|
.addCase(retrieveAuthenticationListAsync.pending, function (state) {
|
|
@@ -1366,6 +1370,9 @@ export var connectSlice = createSlice({
|
|
|
1366
1370
|
state.error = null;
|
|
1367
1371
|
var data = state.data.responseData;
|
|
1368
1372
|
var merchantList = action.payload;
|
|
1373
|
+
if (merchantList === null || merchantList === void 0 ? void 0 : merchantList.length) {
|
|
1374
|
+
state.data.authenticationData.merchantInfo = merchantList[0];
|
|
1375
|
+
}
|
|
1369
1376
|
state.data.responseData = __assign(__assign({}, data), { authenticationData: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.authenticationData), { merchantList: merchantList }) });
|
|
1370
1377
|
})
|
|
1371
1378
|
.addCase(getMerchantListAsync.rejected, function (state, action) {
|
|
@@ -1381,6 +1388,9 @@ export var connectSlice = createSlice({
|
|
|
1381
1388
|
state.error = null;
|
|
1382
1389
|
var data = state.data.responseData;
|
|
1383
1390
|
var terminalList = action.payload;
|
|
1391
|
+
if (terminalList === null || terminalList === void 0 ? void 0 : terminalList.length) {
|
|
1392
|
+
state.data.authenticationData.terminalInfo = terminalList[0];
|
|
1393
|
+
}
|
|
1384
1394
|
state.data.responseData = __assign(__assign({}, data), { authenticationData: __assign(__assign({}, data === null || data === void 0 ? void 0 : data.authenticationData), { terminalList: terminalList }) });
|
|
1385
1395
|
})
|
|
1386
1396
|
.addCase(getTerminalListAsync.rejected, function (state, action) {
|
|
@@ -74,6 +74,14 @@ var AuthenticationList = function (_a) {
|
|
|
74
74
|
var screen = startWithNID ? (isKW(code) ? 'CONNECT_EXPRESS_CIVIL_ID_STEP' : 'CONNECT_EXPRESS_NID_STEP') : 'CONNECT_EXPRESS_MOBILE_STEP';
|
|
75
75
|
dispatch(handlePrevScreenStep(screen));
|
|
76
76
|
};
|
|
77
|
+
React.useEffect(function () {
|
|
78
|
+
if (merchantInfo && !methods.getValues('merchantInfo'))
|
|
79
|
+
methods.setValue('merchantInfo', merchantInfo, { shouldValidate: true });
|
|
80
|
+
}, [merchantInfo]);
|
|
81
|
+
React.useEffect(function () {
|
|
82
|
+
if (terminalInfo && !methods.getValues('terminalInfo'))
|
|
83
|
+
methods.setValue('terminalInfo', terminalInfo, { shouldValidate: true });
|
|
84
|
+
}, [terminalInfo]);
|
|
77
85
|
React.useEffect(function () {
|
|
78
86
|
if (error)
|
|
79
87
|
dispatch(clearError());
|