@stokr/components-library 3.0.57 → 3.0.58
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.
|
@@ -6,7 +6,7 @@ import { walletTypes } from "../../constants/globalVariables.js";
|
|
|
6
6
|
const StepsProgressSignup = (props) => {
|
|
7
7
|
let navigate = useNavigate();
|
|
8
8
|
const { user = {} } = props;
|
|
9
|
-
const { country, kyc_status, self_declaration, wallets = [] } = user;
|
|
9
|
+
const { country, kyc_status, self_declaration, taxId, wallets = [] } = user;
|
|
10
10
|
const KYCNotDone = !kyc_status || kyc_status === "Reaply" || kyc_status === "Cancelled" || kyc_status === "Draft";
|
|
11
11
|
const hasLiquidWallet = wallets?.filter((wallet) => wallet.type === walletTypes.LIQUID).length > 0;
|
|
12
12
|
const isActiveStep = (path) => typeof window !== "undefined" ? window.location.pathname.includes(path) : false;
|
|
@@ -26,7 +26,7 @@ const StepsProgressSignup = (props) => {
|
|
|
26
26
|
{
|
|
27
27
|
id: "self-certification",
|
|
28
28
|
handleClick: () => navigate("/self-certification"),
|
|
29
|
-
isDone:
|
|
29
|
+
isDone: self_declaration?.data?.confirmed === true,
|
|
30
30
|
isActive: isActiveStep("/self-certification")
|
|
31
31
|
},
|
|
32
32
|
{
|
|
@@ -125,7 +125,7 @@ function generateCoreChecklistTasks(user) {
|
|
|
125
125
|
remainingCount: 0
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
const { country, user_type, wallets = [], self_declaration, countryObj } = user;
|
|
128
|
+
const { country, user_type, wallets = [], self_declaration, countryObj, taxId } = user;
|
|
129
129
|
const isFromAllowedCountry = countryObj?.isAllowed;
|
|
130
130
|
const liquidWallets = wallets.filter((wallet2) => wallet2.type === walletTypes.LIQUID) || [];
|
|
131
131
|
const hasWallet = liquidWallets.length > 0;
|
|
@@ -162,7 +162,8 @@ function generateCoreChecklistTasks(user) {
|
|
|
162
162
|
link: signupBase ? `${signupBase}/register-liquid-securities` : "",
|
|
163
163
|
isClickable: isFromAllowedCountry && walletStatus !== "done"
|
|
164
164
|
};
|
|
165
|
-
const
|
|
165
|
+
const isSelfCertConfirmed = self_declaration?.data?.confirmed === true;
|
|
166
|
+
const selfCertStatus = isSelfCertConfirmed ? "done" : "missing";
|
|
166
167
|
const selfCertification = {
|
|
167
168
|
key: "selfCertification",
|
|
168
169
|
title: TASK_COPY.selfCertification.title,
|
|
@@ -170,7 +171,8 @@ function generateCoreChecklistTasks(user) {
|
|
|
170
171
|
iconState: selfCertStatus,
|
|
171
172
|
iconCopy: TASK_COPY.selfCertification.iconCopy[selfCertStatus],
|
|
172
173
|
link: selfCertStatus !== "done" && signupBase ? `${signupBase}/self-certification` : "",
|
|
173
|
-
isClickable: selfCertStatus !== "done"
|
|
174
|
+
isClickable: selfCertStatus !== "done",
|
|
175
|
+
meetsEligibility: isSelfCertConfirmed || !!taxId
|
|
174
176
|
};
|
|
175
177
|
const allTasks = [countryTask, identity, wallet, selfCertification].filter(Boolean);
|
|
176
178
|
const remainingCount = allTasks.filter(
|