@tap-payments/auth-jsconnect 2.6.95-test → 2.6.96-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.
|
@@ -859,10 +859,10 @@ export var checkBrandNameAvailabilityAsync = createAsyncThunk('connectExpress/ch
|
|
|
859
859
|
});
|
|
860
860
|
});
|
|
861
861
|
export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAsync', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
862
|
-
var _a, connectExpress, settings, _b, responseData, showBoard, _c, postURL, scope, body, data, _d, boardInfo, boardData;
|
|
863
|
-
var _e, _f, _g, _h, _j, _k;
|
|
864
|
-
return __generator(this, function (
|
|
865
|
-
switch (
|
|
862
|
+
var _a, connectExpress, settings, _b, responseData, showBoard, _c, postURL, scope, body, data, leadData, board_id, board_info_id, _d, boardInfo, boardData;
|
|
863
|
+
var _e, _f, _g, _h, _j, _k, _l, _m;
|
|
864
|
+
return __generator(this, function (_o) {
|
|
865
|
+
switch (_o.label) {
|
|
866
866
|
case 0:
|
|
867
867
|
_a = thunkApi.getState(), connectExpress = _a.connectExpress, settings = _a.settings;
|
|
868
868
|
_b = connectExpress.data, responseData = _b.responseData, showBoard = _b.showBoard;
|
|
@@ -874,21 +874,25 @@ export var createAccountAsync = createAsyncThunk('connectExpress/createAccountAs
|
|
|
874
874
|
};
|
|
875
875
|
return [4, API.accountService.expressCreateAccount(body)];
|
|
876
876
|
case 1:
|
|
877
|
-
data =
|
|
877
|
+
data = _o.sent();
|
|
878
878
|
(_f = (_e = settings.data.appConfig).onCreated) === null || _f === void 0 ? void 0 : _f.call(_e, data);
|
|
879
879
|
(_h = (_g = settings.data.appConfig).onFlowCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, data);
|
|
880
880
|
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, data);
|
|
881
|
-
if (!showBoard) return [3,
|
|
881
|
+
if (!showBoard) return [3, 4];
|
|
882
|
+
return [4, thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()];
|
|
883
|
+
case 2:
|
|
884
|
+
leadData = (_o.sent()).data;
|
|
885
|
+
board_id = (_l = data.board_id) !== null && _l !== void 0 ? _l : leadData.board_id;
|
|
886
|
+
board_info_id = (_m = data.board_info_id) !== null && _m !== void 0 ? _m : leadData.board_info_id;
|
|
882
887
|
return [4, Promise.all([
|
|
883
|
-
API.boardService.retrieveBoardInfo({ id:
|
|
884
|
-
API.boardService.retrieveBoardDetails(
|
|
885
|
-
thunkApi.dispatch(getLeadByIdAsync(data.lead.id)).unwrap()
|
|
888
|
+
API.boardService.retrieveBoardInfo({ id: board_id, infoId: board_info_id }),
|
|
889
|
+
API.boardService.retrieveBoardDetails(board_id)
|
|
886
890
|
])];
|
|
887
|
-
case
|
|
888
|
-
_d =
|
|
891
|
+
case 3:
|
|
892
|
+
_d = _o.sent(), boardInfo = _d[0], boardData = _d[1];
|
|
889
893
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
890
894
|
return [2, { boardInfo: boardInfo, boardData: boardData, account: data }];
|
|
891
|
-
case
|
|
895
|
+
case 4:
|
|
892
896
|
thunkApi.dispatch(handleOpen(false));
|
|
893
897
|
return [2];
|
|
894
898
|
}
|