@volr/react 0.1.63 → 0.1.65

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/dist/index.cjs CHANGED
@@ -18901,6 +18901,7 @@ async function enrollPasskey(params) {
18901
18901
  apiKey,
18902
18902
  userId,
18903
18903
  userEmail,
18904
+ userEvmAddress,
18904
18905
  projectId,
18905
18906
  rpId = typeof window !== "undefined" ? window.location.hostname : "localhost",
18906
18907
  rpName = "Volr"
@@ -18908,9 +18909,6 @@ async function enrollPasskey(params) {
18908
18909
  if (!userId) {
18909
18910
  throw new Error("userId is required");
18910
18911
  }
18911
- if (!userEmail) {
18912
- throw new Error("userEmail is required");
18913
- }
18914
18912
  if (!projectId) {
18915
18913
  throw new Error("projectId is required");
18916
18914
  }
@@ -18934,6 +18932,7 @@ async function enrollPasskey(params) {
18934
18932
  credentialId: tempCredentialId
18935
18933
  };
18936
18934
  const prfSalt = sdkCore.deriveWrapKey(tempPrfInput);
18935
+ const displayName = userEmail || userEvmAddress || userId;
18937
18936
  const publicKeyCredentialCreationOptions = {
18938
18937
  challenge: challenge2,
18939
18938
  rp: {
@@ -18942,8 +18941,8 @@ async function enrollPasskey(params) {
18942
18941
  },
18943
18942
  user: {
18944
18943
  id: userHandle,
18945
- name: userEmail,
18946
- displayName: userEmail
18944
+ name: displayName,
18945
+ displayName
18947
18946
  },
18948
18947
  pubKeyCredParams: PUBKEY_CRED_PARAMS,
18949
18948
  authenticatorSelection: AUTHENTICATOR_SELECTION,
@@ -19059,9 +19058,6 @@ function usePasskeyEnrollment() {
19059
19058
  if (!user?.id) {
19060
19059
  throw new Error("User ID is required for passkey enrollment");
19061
19060
  }
19062
- if (!user?.email) {
19063
- throw new Error("User email is required for passkey enrollment");
19064
- }
19065
19061
  const accessToken = client.getAccessToken();
19066
19062
  if (!accessToken) {
19067
19063
  throw new Error(
@@ -19075,7 +19071,8 @@ function usePasskeyEnrollment() {
19075
19071
  baseUrl: apiBaseUrl,
19076
19072
  apiKey: config.projectApiKey,
19077
19073
  userId: user.id,
19078
- userEmail: user.email,
19074
+ userEmail: user.email ?? null,
19075
+ userEvmAddress: user.evmAddress ?? null,
19079
19076
  projectId
19080
19077
  });
19081
19078
  setStep("registering");