vesant-sdk 1.8.0-dev.31d63f0 → 1.8.0-dev.9f7204d
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/README.md +5 -3
- package/dist/{client-DUHC-68_.d.ts → client-4oLoc31v.d.ts} +1 -1
- package/dist/{client-5q4whhGu.d.mts → client-CJI8VO1i.d.mts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +19 -3
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +19 -3
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +72 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -15
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +2 -2
- package/dist/kyc/core.d.ts +2 -2
- package/dist/kyc/core.js +52 -11
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +52 -12
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +156 -12
- package/dist/kyc/index.d.ts +156 -12
- package/dist/kyc/index.js +52 -11
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +52 -12
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +21 -3
- package/dist/react.d.ts +21 -3
- package/dist/react.js +8 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +8 -1
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +16 -6
- package/dist/risk-profile/index.d.ts +16 -6
- package/dist/risk-profile/index.js +18 -2
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +18 -3
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/{types-UGyDl1fd.d.ts → types-1kI4SsKB.d.ts} +44 -1
- package/dist/{types-BOFaMQxI.d.mts → types-DfbnIaW_.d.mts} +44 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -865,6 +865,13 @@ function useTransactionVerification(client, options = {}) {
|
|
|
865
865
|
verifyTransaction
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
|
+
|
|
869
|
+
// src/risk-profile/types.ts
|
|
870
|
+
function isProfileUpdateHeld(result) {
|
|
871
|
+
return typeof result === "object" && result !== null && result.status === "kyc_required" && result.kyc_required === true;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// src/risk-profile/hooks.ts
|
|
868
875
|
function useCustomerProfile(client, customerId, options = {}) {
|
|
869
876
|
const [profile, setProfile] = useState(null);
|
|
870
877
|
const [loading, setLoading] = useState(false);
|
|
@@ -893,7 +900,7 @@ function useCustomerProfile(client, customerId, options = {}) {
|
|
|
893
900
|
setError(null);
|
|
894
901
|
try {
|
|
895
902
|
const updated = await client.updateProfile(profileRef.current.id, updates);
|
|
896
|
-
setProfile(updated);
|
|
903
|
+
setProfile(isProfileUpdateHeld(updated) ? updated.profile : updated);
|
|
897
904
|
return updated;
|
|
898
905
|
} catch (err) {
|
|
899
906
|
const error2 = err instanceof Error ? err : new Error("Failed to update profile");
|