@swype-org/react-sdk 0.1.15 → 0.1.17

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.d.cts CHANGED
@@ -308,6 +308,18 @@ declare function createPasskeyCredential(userIdentifier: string): Promise<{
308
308
  credentialId: string;
309
309
  publicKey: string;
310
310
  }>;
311
+ /**
312
+ * Checks whether the current device's platform authenticator holds a passkey
313
+ * matching the given credential ID.
314
+ *
315
+ * Uses `navigator.credentials.get()` with a throwaway challenge and a short
316
+ * timeout. If the authenticator responds, the device has the key. If it
317
+ * throws (NotAllowedError, timeout, etc.), the device does not.
318
+ *
319
+ * @param credentialId - Base64-encoded WebAuthn credential ID from the server.
320
+ * @returns `true` if the device can authenticate with this credential.
321
+ */
322
+ declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
311
323
  interface UseTransferPollingResult {
312
324
  transfer: Transfer | null;
313
325
  error: string | null;
@@ -449,4 +461,4 @@ declare namespace api {
449
461
  export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
450
462
  }
451
463
 
452
- export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
464
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
package/dist/index.d.ts CHANGED
@@ -308,6 +308,18 @@ declare function createPasskeyCredential(userIdentifier: string): Promise<{
308
308
  credentialId: string;
309
309
  publicKey: string;
310
310
  }>;
311
+ /**
312
+ * Checks whether the current device's platform authenticator holds a passkey
313
+ * matching the given credential ID.
314
+ *
315
+ * Uses `navigator.credentials.get()` with a throwaway challenge and a short
316
+ * timeout. If the authenticator responds, the device has the key. If it
317
+ * throws (NotAllowedError, timeout, etc.), the device does not.
318
+ *
319
+ * @param credentialId - Base64-encoded WebAuthn credential ID from the server.
320
+ * @returns `true` if the device can authenticate with this credential.
321
+ */
322
+ declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
311
323
  interface UseTransferPollingResult {
312
324
  transfer: Transfer | null;
313
325
  error: string | null;
@@ -449,4 +461,4 @@ declare namespace api {
449
461
  export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
450
462
  }
451
463
 
452
- export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
464
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
package/dist/index.js CHANGED
@@ -15,52 +15,52 @@ var __export = (target, all) => {
15
15
 
16
16
  // src/theme.ts
17
17
  var darkTheme = {
18
- bg: "#0a0a0a",
19
- bgCard: "#141414",
20
- bgInput: "#1e1e1e",
21
- bgHover: "#252525",
22
- bgOverlay: "rgba(0, 0, 0, 0.6)",
23
- text: "#f5f5f5",
24
- textSecondary: "#a1a1aa",
25
- textMuted: "#71717a",
26
- textInverse: "#09090b",
27
- border: "#27272a",
28
- borderFocus: "#3b82f6",
29
- accent: "#3b82f6",
30
- accentHover: "#2563eb",
18
+ bg: "#071216",
19
+ bgCard: "#101c22",
20
+ bgInput: "#17272f",
21
+ bgHover: "#20343d",
22
+ bgOverlay: "rgba(3, 10, 13, 0.7)",
23
+ text: "#ecfeff",
24
+ textSecondary: "#b7d3dd",
25
+ textMuted: "#7fa4b0",
26
+ textInverse: "#052027",
27
+ border: "#2b4551",
28
+ borderFocus: "#2ec4cf",
29
+ accent: "#2eb6c2",
30
+ accentHover: "#239ba6",
31
31
  accentText: "#ffffff",
32
- success: "#22c55e",
33
- successBg: "#052e16",
34
- error: "#ef4444",
35
- errorBg: "#450a0a",
36
- shadow: "0 1px 3px rgba(0,0,0,0.4)",
37
- shadowLg: "0 8px 32px rgba(0,0,0,0.5)",
38
- radius: "10px",
39
- radiusLg: "16px"
32
+ success: "#0f9d73",
33
+ successBg: "#0f2f2a",
34
+ error: "#d46a72",
35
+ errorBg: "#301d21",
36
+ shadow: "0 1px 4px rgba(0,0,0,0.35)",
37
+ shadowLg: "0 18px 44px rgba(0,0,0,0.42)",
38
+ radius: "14px",
39
+ radiusLg: "24px"
40
40
  };
41
41
  var lightTheme = {
42
- bg: "#f8fafc",
43
- bgCard: "#ffffff",
44
- bgInput: "#f1f5f9",
45
- bgHover: "#e2e8f0",
46
- bgOverlay: "rgba(0, 0, 0, 0.3)",
47
- text: "#0f172a",
48
- textSecondary: "#475569",
49
- textMuted: "#94a3b8",
42
+ bg: "#ebf9fb",
43
+ bgCard: "#f9fdff",
44
+ bgInput: "#f1f8fb",
45
+ bgHover: "#e7f4f7",
46
+ bgOverlay: "rgba(7, 18, 22, 0.18)",
47
+ text: "#12222b",
48
+ textSecondary: "#4b6772",
49
+ textMuted: "#7d97a1",
50
50
  textInverse: "#ffffff",
51
- border: "#e2e8f0",
52
- borderFocus: "#3b82f6",
53
- accent: "#3b82f6",
54
- accentHover: "#2563eb",
51
+ border: "#d2e4ea",
52
+ borderFocus: "#2eb6c2",
53
+ accent: "#2eb6c2",
54
+ accentHover: "#259da7",
55
55
  accentText: "#ffffff",
56
- success: "#16a34a",
57
- successBg: "#f0fdf4",
58
- error: "#dc2626",
59
- errorBg: "#fef2f2",
60
- shadow: "0 1px 3px rgba(0,0,0,0.08)",
61
- shadowLg: "0 8px 32px rgba(0,0,0,0.12)",
62
- radius: "10px",
63
- radiusLg: "16px"
56
+ success: "#0f9d73",
57
+ successBg: "#e6f7f1",
58
+ error: "#ce6670",
59
+ errorBg: "#fdf1f2",
60
+ shadow: "0 1px 3px rgba(12, 31, 39, 0.08)",
61
+ shadowLg: "0 20px 48px rgba(19, 61, 75, 0.14)",
62
+ radius: "14px",
63
+ radiusLg: "24px"
64
64
  };
65
65
  function getTheme(mode) {
66
66
  return mode === "dark" ? darkTheme : lightTheme;
@@ -735,6 +735,28 @@ async function createPasskeyCredential(userIdentifier) {
735
735
  publicKey: publicKeyBytes ? toBase64(publicKeyBytes) : ""
736
736
  };
737
737
  }
738
+ async function deviceHasPasskey(credentialId) {
739
+ try {
740
+ const challenge = new Uint8Array(32);
741
+ crypto.getRandomValues(challenge);
742
+ await waitForDocumentFocus();
743
+ const assertion = await navigator.credentials.get({
744
+ publicKey: {
745
+ challenge,
746
+ rpId: resolvePasskeyRpId(),
747
+ allowCredentials: [{
748
+ type: "public-key",
749
+ id: base64ToBytes(credentialId)
750
+ }],
751
+ userVerification: "required",
752
+ timeout: 3e4
753
+ }
754
+ });
755
+ return assertion != null;
756
+ } catch {
757
+ return false;
758
+ }
759
+ }
738
760
  function useTransferPolling(intervalMs = 3e3) {
739
761
  const { apiBaseUrl } = useSwypeConfig();
740
762
  const { getAccessToken } = usePrivy();
@@ -1265,10 +1287,12 @@ function Spinner({ size = 40, label }) {
1265
1287
  style: {
1266
1288
  width: size,
1267
1289
  height: size,
1268
- border: `3px solid ${tokens.border}`,
1290
+ border: `4px solid ${tokens.bgInput}`,
1269
1291
  borderTopColor: tokens.accent,
1292
+ borderRightColor: tokens.accent + "66",
1270
1293
  borderRadius: "50%",
1271
- animation: "swype-spin 0.8s linear infinite"
1294
+ boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.1)",
1295
+ animation: "swype-spin 0.9s linear infinite"
1272
1296
  }
1273
1297
  }
1274
1298
  ),
@@ -1299,7 +1323,7 @@ function ProviderCard({ provider, selected, onClick }) {
1299
1323
  padding: "14px 16px",
1300
1324
  background: selected ? tokens.accent + "18" : hovered ? tokens.bgHover : tokens.bgInput,
1301
1325
  border: `1.5px solid ${selected ? tokens.accent : tokens.border}`,
1302
- borderRadius: tokens.radius,
1326
+ borderRadius: tokens.radiusLg,
1303
1327
  cursor: "pointer",
1304
1328
  transition: "all 0.15s ease",
1305
1329
  color: tokens.text,
@@ -1318,7 +1342,7 @@ function ProviderCard({ provider, selected, onClick }) {
1318
1342
  style: {
1319
1343
  width: 32,
1320
1344
  height: 32,
1321
- borderRadius: "8px",
1345
+ borderRadius: "50%",
1322
1346
  objectFit: "contain"
1323
1347
  }
1324
1348
  }
@@ -1328,7 +1352,7 @@ function ProviderCard({ provider, selected, onClick }) {
1328
1352
  style: {
1329
1353
  width: 32,
1330
1354
  height: 32,
1331
- borderRadius: "8px",
1355
+ borderRadius: "50%",
1332
1356
  background: tokens.accent + "30",
1333
1357
  display: "flex",
1334
1358
  alignItems: "center",
@@ -1434,10 +1458,11 @@ function AccountDropdown({
1434
1458
  display: "flex",
1435
1459
  alignItems: "center",
1436
1460
  gap: "6px",
1437
- background: "transparent",
1438
- border: "none",
1461
+ background: tokens.bgCard,
1462
+ border: `1px solid ${tokens.border}`,
1439
1463
  cursor: "pointer",
1440
- padding: "4px 0",
1464
+ padding: "7px 10px",
1465
+ borderRadius: "999px",
1441
1466
  color: tokens.textSecondary,
1442
1467
  fontFamily: "inherit",
1443
1468
  fontSize: "0.85rem",
@@ -1494,7 +1519,7 @@ function AccountDropdown({
1494
1519
  marginTop: "4px",
1495
1520
  background: tokens.bgCard,
1496
1521
  border: `1px solid ${tokens.border}`,
1497
- borderRadius: tokens.radius,
1522
+ borderRadius: tokens.radiusLg,
1498
1523
  boxShadow: tokens.shadowLg,
1499
1524
  zIndex: 50,
1500
1525
  overflow: "hidden",
@@ -1553,8 +1578,8 @@ function AccountDropdown({
1553
1578
  fontWeight: 600,
1554
1579
  color: tokens.success,
1555
1580
  background: tokens.successBg,
1556
- padding: "1px 5px",
1557
- borderRadius: "3px",
1581
+ padding: "2px 7px",
1582
+ borderRadius: "999px",
1558
1583
  textTransform: "uppercase",
1559
1584
  letterSpacing: "0.03em"
1560
1585
  },
@@ -1769,7 +1794,7 @@ function AdvancedSettings({
1769
1794
  marginTop: "10px",
1770
1795
  padding: "14px",
1771
1796
  background: tokens.bgInput,
1772
- borderRadius: tokens.radius,
1797
+ borderRadius: tokens.radiusLg,
1773
1798
  border: `1px solid ${tokens.border}`
1774
1799
  },
1775
1800
  children: [
@@ -1799,13 +1824,13 @@ function AdvancedSettings({
1799
1824
  asset: isSelected ? null : asset
1800
1825
  }),
1801
1826
  style: {
1802
- padding: "6px 14px",
1827
+ padding: "7px 14px",
1803
1828
  fontSize: "0.8rem",
1804
1829
  fontWeight: 600,
1805
1830
  fontFamily: "inherit",
1806
- borderRadius: "6px",
1831
+ borderRadius: "999px",
1807
1832
  border: `1.5px solid ${isSelected ? tokens.accent : tokens.border}`,
1808
- background: isSelected ? tokens.accent + "18" : "transparent",
1833
+ background: isSelected ? tokens.accent + "18" : tokens.bgCard,
1809
1834
  color: isSelected ? tokens.accent : tokens.text,
1810
1835
  cursor: "pointer",
1811
1836
  outline: "none",
@@ -1843,13 +1868,13 @@ function AdvancedSettings({
1843
1868
  chain: isSelected ? null : chain.name
1844
1869
  }),
1845
1870
  style: {
1846
- padding: "6px 14px",
1871
+ padding: "7px 14px",
1847
1872
  fontSize: "0.8rem",
1848
1873
  fontWeight: 600,
1849
1874
  fontFamily: "inherit",
1850
- borderRadius: "6px",
1875
+ borderRadius: "999px",
1851
1876
  border: `1.5px solid ${isSelected ? tokens.accent : tokens.border}`,
1852
- background: isSelected ? tokens.accent + "18" : "transparent",
1877
+ background: isSelected ? tokens.accent + "18" : tokens.bgCard,
1853
1878
  color: isSelected ? tokens.accent : tokens.text,
1854
1879
  cursor: "pointer",
1855
1880
  outline: "none",
@@ -1870,9 +1895,9 @@ function AdvancedSettings({
1870
1895
  display: "flex",
1871
1896
  alignItems: "center",
1872
1897
  gap: "6px",
1873
- background: "transparent",
1898
+ background: tokens.bgCard,
1874
1899
  border: `1px dashed ${tokens.border}`,
1875
- borderRadius: tokens.radius,
1900
+ borderRadius: "999px",
1876
1901
  padding: "10px 14px",
1877
1902
  width: "100%",
1878
1903
  cursor: connectingNewAccount ? "not-allowed" : "pointer",
@@ -2138,12 +2163,27 @@ function SwypePayment({
2138
2163
  if (!token || cancelled) return;
2139
2164
  const { config } = await fetchUserConfig(apiBaseUrl, token);
2140
2165
  if (cancelled) return;
2141
- if (!config.passkey || !activeCredentialId) {
2142
- setStep("register-passkey");
2143
- } else if (depositAmount != null && depositAmount > 0) {
2144
- setStep("ready");
2166
+ if (config.passkey?.credentialId) {
2167
+ const hasKey = activeCredentialId ? activeCredentialId === config.passkey.credentialId : await deviceHasPasskey(config.passkey.credentialId);
2168
+ if (cancelled) return;
2169
+ if (hasKey) {
2170
+ if (!activeCredentialId) {
2171
+ setActiveCredentialId(config.passkey.credentialId);
2172
+ window.localStorage.setItem(
2173
+ ACTIVE_CREDENTIAL_STORAGE_KEY,
2174
+ config.passkey.credentialId
2175
+ );
2176
+ }
2177
+ if (depositAmount != null && depositAmount > 0) {
2178
+ setStep("ready");
2179
+ } else {
2180
+ setStep("enter-amount");
2181
+ }
2182
+ } else {
2183
+ setStep("register-passkey");
2184
+ }
2145
2185
  } else {
2146
- setStep("enter-amount");
2186
+ setStep("register-passkey");
2147
2187
  }
2148
2188
  } catch {
2149
2189
  if (!cancelled) {
@@ -2479,7 +2519,7 @@ function SwypePayment({
2479
2519
  background: tokens.bgCard,
2480
2520
  borderRadius: tokens.radiusLg,
2481
2521
  border: `1px solid ${tokens.border}`,
2482
- padding: "28px 24px",
2522
+ padding: "30px 24px 24px",
2483
2523
  maxWidth: 420,
2484
2524
  width: "100%",
2485
2525
  boxShadow: tokens.shadowLg,
@@ -2487,24 +2527,26 @@ function SwypePayment({
2487
2527
  color: tokens.text
2488
2528
  };
2489
2529
  const headingStyle = {
2490
- fontSize: "1.2rem",
2491
- fontWeight: 600,
2492
- margin: "0 0 20px 0",
2530
+ fontSize: "2rem",
2531
+ fontWeight: 700,
2532
+ margin: "0 0 18px 0",
2533
+ letterSpacing: "-0.02em",
2493
2534
  color: tokens.text,
2494
2535
  textAlign: "center"
2495
2536
  };
2496
2537
  const btnPrimary = {
2497
2538
  width: "100%",
2498
- padding: "14px",
2499
- background: tokens.accent,
2539
+ padding: "15px 18px",
2540
+ background: `linear-gradient(180deg, ${tokens.accent}, ${tokens.accentHover})`,
2500
2541
  color: tokens.accentText,
2501
2542
  border: "none",
2502
- borderRadius: tokens.radius,
2503
- fontSize: "1rem",
2504
- fontWeight: 600,
2543
+ borderRadius: "999px",
2544
+ fontSize: "1.03rem",
2545
+ fontWeight: 700,
2505
2546
  cursor: "pointer",
2506
- transition: "background 0.15s ease",
2507
- fontFamily: "inherit"
2547
+ transition: "filter 0.15s ease, transform 0.15s ease",
2548
+ fontFamily: "inherit",
2549
+ boxShadow: "0 8px 18px rgba(46, 182, 194, 0.28)"
2508
2550
  };
2509
2551
  const btnDisabled = {
2510
2552
  ...btnPrimary,
@@ -2513,15 +2555,16 @@ function SwypePayment({
2513
2555
  };
2514
2556
  ({
2515
2557
  ...btnPrimary,
2558
+ background: tokens.bgCard,
2516
2559
  color: tokens.textSecondary,
2517
2560
  border: `1px solid ${tokens.border}`});
2518
2561
  const errorStyle = {
2519
2562
  background: tokens.errorBg,
2520
- border: `1px solid ${tokens.error}`,
2521
- borderRadius: tokens.radius,
2522
- padding: "10px 14px",
2563
+ border: `1px solid ${tokens.error}66`,
2564
+ borderRadius: tokens.radiusLg,
2565
+ padding: "11px 14px",
2523
2566
  color: tokens.error,
2524
- fontSize: "0.825rem",
2567
+ fontSize: "0.86rem",
2525
2568
  marginBottom: "14px",
2526
2569
  lineHeight: 1.5
2527
2570
  };
@@ -2531,7 +2574,8 @@ function SwypePayment({
2531
2574
  style: {
2532
2575
  display: "flex",
2533
2576
  alignItems: "center",
2534
- gap: "8px",
2577
+ justifyContent: "center",
2578
+ gap: "10px",
2535
2579
  marginBottom: "20px"
2536
2580
  },
2537
2581
  children: [
@@ -2539,10 +2583,22 @@ function SwypePayment({
2539
2583
  "div",
2540
2584
  {
2541
2585
  style: {
2542
- width: 6,
2543
- height: 6,
2544
- borderRadius: "50%",
2545
- background: tokens.accent
2586
+ width: 28,
2587
+ height: 7,
2588
+ borderRadius: 999,
2589
+ background: tokens.accent,
2590
+ opacity: 0.95
2591
+ }
2592
+ }
2593
+ ),
2594
+ /* @__PURE__ */ jsx(
2595
+ "div",
2596
+ {
2597
+ style: {
2598
+ width: 8,
2599
+ height: 8,
2600
+ borderRadius: 999,
2601
+ background: tokens.border
2546
2602
  }
2547
2603
  }
2548
2604
  ),
@@ -2732,8 +2788,8 @@ function SwypePayment({
2732
2788
  gap: "8px",
2733
2789
  background: tokens.bgInput,
2734
2790
  border: `1px solid ${tokens.border}`,
2735
- borderRadius: tokens.radius,
2736
- padding: "4px 14px 4px 4px",
2791
+ borderRadius: tokens.radiusLg,
2792
+ padding: "6px 14px 6px 8px",
2737
2793
  marginBottom: "8px"
2738
2794
  },
2739
2795
  children: [
@@ -2780,9 +2836,10 @@ function SwypePayment({
2780
2836
  fontSize: "0.825rem",
2781
2837
  fontWeight: 600,
2782
2838
  color: tokens.textMuted,
2783
- background: tokens.bgHover,
2784
- padding: "4px 10px",
2785
- borderRadius: "6px"
2839
+ background: tokens.bgCard,
2840
+ padding: "6px 12px",
2841
+ border: `1px solid ${tokens.border}`,
2842
+ borderRadius: "999px"
2786
2843
  },
2787
2844
  children: "USD"
2788
2845
  }
@@ -2908,7 +2965,8 @@ function SwypePayment({
2908
2965
  marginBottom: "16px",
2909
2966
  padding: "12px 14px",
2910
2967
  background: tokens.bgInput,
2911
- borderRadius: tokens.radius,
2968
+ borderRadius: tokens.radiusLg,
2969
+ border: `1px solid ${tokens.border}`,
2912
2970
  lineHeight: 1.7
2913
2971
  },
2914
2972
  children: [
@@ -3107,9 +3165,9 @@ function SwypePayment({
3107
3165
  width: "100%",
3108
3166
  marginBottom: "12px",
3109
3167
  padding: "10px 12px",
3110
- borderRadius: tokens.radius,
3168
+ borderRadius: tokens.radiusLg,
3111
3169
  border: `1px solid ${tokens.border}`,
3112
- background: tokens.bgCard,
3170
+ background: tokens.bgInput,
3113
3171
  color: tokens.text,
3114
3172
  fontFamily: "inherit",
3115
3173
  fontSize: "0.875rem",
@@ -3148,9 +3206,9 @@ function SwypePayment({
3148
3206
  style: {
3149
3207
  width: "100%",
3150
3208
  padding: "10px 12px",
3151
- borderRadius: tokens.radius,
3209
+ borderRadius: tokens.radiusLg,
3152
3210
  border: `1px solid ${tokens.border}`,
3153
- background: tokens.bgCard,
3211
+ background: tokens.bgInput,
3154
3212
  color: tokens.text,
3155
3213
  fontFamily: "inherit",
3156
3214
  fontSize: "0.875rem",
@@ -3193,7 +3251,7 @@ function SwypePayment({
3193
3251
  ] }),
3194
3252
  /* @__PURE__ */ jsx("h2", { style: { ...headingStyle, marginBottom: "8px" }, children: "Authorize Transfer" }),
3195
3253
  /* @__PURE__ */ jsx("p", { style: { fontSize: "0.85rem", color: tokens.textSecondary, margin: "0 0 16px 0", lineHeight: 1.5 }, children: "Use your passkey to confirm this payment." }),
3196
- /* @__PURE__ */ jsxs("div", { style: { fontSize: "0.825rem", color: tokens.textSecondary, padding: "12px 14px", background: tokens.bgInput, borderRadius: tokens.radius, textAlign: "left", lineHeight: 1.7, marginBottom: "16px" }, children: [
3254
+ /* @__PURE__ */ jsxs("div", { style: { fontSize: "0.825rem", color: tokens.textSecondary, padding: "12px 14px", background: tokens.bgInput, borderRadius: tokens.radiusLg, border: `1px solid ${tokens.border}`, textAlign: "left", lineHeight: 1.7, marginBottom: "16px" }, children: [
3197
3255
  payload.amount && payload.tokenSymbol && /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
3198
3256
  /* @__PURE__ */ jsx("span", { children: "Amount" }),
3199
3257
  /* @__PURE__ */ jsxs("span", { style: { fontWeight: 600, color: tokens.text }, children: [
@@ -3384,7 +3442,8 @@ function SwypePayment({
3384
3442
  margin: "0 0 24px 0",
3385
3443
  padding: "14px",
3386
3444
  background: tokens.bgInput,
3387
- borderRadius: tokens.radius,
3445
+ borderRadius: tokens.radiusLg,
3446
+ border: `1px solid ${tokens.border}`,
3388
3447
  textAlign: "left",
3389
3448
  lineHeight: 1.8
3390
3449
  },
@@ -3455,6 +3514,6 @@ function SwypePayment({
3455
3514
  return null;
3456
3515
  }
3457
3516
 
3458
- export { SwypePayment, SwypeProvider, createPasskeyCredential, darkTheme, getTheme, lightTheme, api_exports as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
3517
+ export { SwypePayment, SwypeProvider, createPasskeyCredential, darkTheme, deviceHasPasskey, getTheme, lightTheme, api_exports as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
3459
3518
  //# sourceMappingURL=index.js.map
3460
3519
  //# sourceMappingURL=index.js.map