@volr/react 0.1.65 → 0.1.66
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 +28 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -9487,7 +9487,6 @@ function useSessionSync({
|
|
|
9487
9487
|
|
|
9488
9488
|
// src/config/webauthn.ts
|
|
9489
9489
|
var AUTHENTICATOR_SELECTION = {
|
|
9490
|
-
authenticatorAttachment: "platform",
|
|
9491
9490
|
userVerification: "required",
|
|
9492
9491
|
residentKey: "required"
|
|
9493
9492
|
};
|
|
@@ -18894,6 +18893,30 @@ function useDepositListener(input) {
|
|
|
18894
18893
|
}, [getRpcUrl, input.chainId, input.address, JSON.stringify(input.asset)]);
|
|
18895
18894
|
return status;
|
|
18896
18895
|
}
|
|
18896
|
+
function detectPlatform() {
|
|
18897
|
+
if (typeof navigator === "undefined") return "Unknown";
|
|
18898
|
+
const ua = navigator.userAgent;
|
|
18899
|
+
const platform = navigator.platform || "";
|
|
18900
|
+
if (/iPhone|iPad|iPod/.test(ua) || platform === "MacIntel" && navigator.maxTouchPoints > 1) {
|
|
18901
|
+
return "iOS";
|
|
18902
|
+
}
|
|
18903
|
+
if (/Android/.test(ua)) {
|
|
18904
|
+
return "Android";
|
|
18905
|
+
}
|
|
18906
|
+
if (/Mac/.test(platform)) {
|
|
18907
|
+
return "macOS";
|
|
18908
|
+
}
|
|
18909
|
+
if (/Win/.test(platform)) {
|
|
18910
|
+
return "Windows";
|
|
18911
|
+
}
|
|
18912
|
+
if (/CrOS/.test(ua)) {
|
|
18913
|
+
return "ChromeOS";
|
|
18914
|
+
}
|
|
18915
|
+
if (/Linux/.test(platform)) {
|
|
18916
|
+
return "Linux";
|
|
18917
|
+
}
|
|
18918
|
+
return "Unknown";
|
|
18919
|
+
}
|
|
18897
18920
|
async function enrollPasskey(params) {
|
|
18898
18921
|
const {
|
|
18899
18922
|
client,
|
|
@@ -19013,6 +19036,7 @@ async function enrollPasskey(params) {
|
|
|
19013
19036
|
}
|
|
19014
19037
|
const keypair = sdkCore.deriveEvmKey({ masterSeed: masterSeedHandle.bytes });
|
|
19015
19038
|
const address = keypair.address;
|
|
19039
|
+
const platform = detectPlatform();
|
|
19016
19040
|
const registerResponse = await client.post("/wallet/provider/register", {
|
|
19017
19041
|
keyStorageType: "passkey",
|
|
19018
19042
|
credentialId,
|
|
@@ -19022,7 +19046,9 @@ async function enrollPasskey(params) {
|
|
|
19022
19046
|
projectId,
|
|
19023
19047
|
credentialId
|
|
19024
19048
|
},
|
|
19025
|
-
address
|
|
19049
|
+
address,
|
|
19050
|
+
platform
|
|
19051
|
+
// For UX hints when authenticating on different devices
|
|
19026
19052
|
});
|
|
19027
19053
|
return {
|
|
19028
19054
|
credentialId,
|