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.
Files changed (42) hide show
  1. package/README.md +5 -3
  2. package/dist/{client-DUHC-68_.d.ts → client-4oLoc31v.d.ts} +1 -1
  3. package/dist/{client-5q4whhGu.d.mts → client-CJI8VO1i.d.mts} +1 -1
  4. package/dist/compliance/index.d.mts +2 -2
  5. package/dist/compliance/index.d.ts +2 -2
  6. package/dist/compliance/index.js +19 -3
  7. package/dist/compliance/index.js.map +1 -1
  8. package/dist/compliance/index.mjs +19 -3
  9. package/dist/compliance/index.mjs.map +1 -1
  10. package/dist/index.d.mts +3 -3
  11. package/dist/index.d.ts +3 -3
  12. package/dist/index.js +72 -14
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +71 -15
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/kyc/core.d.mts +2 -2
  17. package/dist/kyc/core.d.ts +2 -2
  18. package/dist/kyc/core.js +52 -11
  19. package/dist/kyc/core.js.map +1 -1
  20. package/dist/kyc/core.mjs +52 -12
  21. package/dist/kyc/core.mjs.map +1 -1
  22. package/dist/kyc/index.d.mts +156 -12
  23. package/dist/kyc/index.d.ts +156 -12
  24. package/dist/kyc/index.js +52 -11
  25. package/dist/kyc/index.js.map +1 -1
  26. package/dist/kyc/index.mjs +52 -12
  27. package/dist/kyc/index.mjs.map +1 -1
  28. package/dist/react.d.mts +21 -3
  29. package/dist/react.d.ts +21 -3
  30. package/dist/react.js +8 -1
  31. package/dist/react.js.map +1 -1
  32. package/dist/react.mjs +8 -1
  33. package/dist/react.mjs.map +1 -1
  34. package/dist/risk-profile/index.d.mts +16 -6
  35. package/dist/risk-profile/index.d.ts +16 -6
  36. package/dist/risk-profile/index.js +18 -2
  37. package/dist/risk-profile/index.js.map +1 -1
  38. package/dist/risk-profile/index.mjs +18 -3
  39. package/dist/risk-profile/index.mjs.map +1 -1
  40. package/dist/{types-UGyDl1fd.d.ts → types-1kI4SsKB.d.ts} +44 -1
  41. package/dist/{types-BOFaMQxI.d.mts → types-DfbnIaW_.d.mts} +44 -1
  42. 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");