@vechain/vechain-kit 1.2.3 → 1.2.4

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
@@ -31,11 +31,11 @@ var lu = require('react-icons/lu');
31
31
  var md = require('react-icons/md');
32
32
  var bi = require('react-icons/bi');
33
33
  var ri = require('react-icons/ri');
34
- var pi = require('react-icons/pi');
35
34
  var vsc = require('react-icons/vsc');
36
35
  var fa = require('react-icons/fa');
37
36
  var fi = require('react-icons/fi');
38
37
  var gi = require('react-icons/gi');
38
+ var pi = require('react-icons/pi');
39
39
  var reactQrcodeLogo = require('react-qrcode-logo');
40
40
  var go = require('react-icons/go');
41
41
  var fa6 = require('react-icons/fa6');
@@ -4713,7 +4713,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
4713
4713
  // package.json
4714
4714
  var package_default = {
4715
4715
  name: "@vechain/vechain-kit",
4716
- version: "1.2.3",
4716
+ version: "1.2.4",
4717
4717
  private: false,
4718
4718
  homepage: "https://github.com/vechain/vechain-kit",
4719
4719
  repository: "github:vechain/vechain-kit",
@@ -6330,6 +6330,256 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
6330
6330
  )
6331
6331
  ] });
6332
6332
  };
6333
+ var NetworkInfo = () => {
6334
+ const { t } = reactI18next.useTranslation();
6335
+ const { darkMode: isDark, network } = useVeChainKitConfig();
6336
+ const { connection, smartAccount } = useWallet();
6337
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6338
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6339
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6340
+ t("Connection Type"),
6341
+ ":"
6342
+ ] }),
6343
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
6344
+ ] }),
6345
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6346
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6347
+ t("Network"),
6348
+ ":"
6349
+ ] }),
6350
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
6351
+ ] }),
6352
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6353
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6354
+ t("Node URL"),
6355
+ ":"
6356
+ ] }),
6357
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkVUMG5BY2_cjs.getConfig(network.type).nodeUrl })
6358
+ ] }),
6359
+ connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6360
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6361
+ t("Smart Account"),
6362
+ ":"
6363
+ ] }),
6364
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
6365
+ ] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6366
+ /* @__PURE__ */ jsxRuntime.jsxs(
6367
+ react.Text,
6368
+ {
6369
+ fontSize: "sm",
6370
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6371
+ children: [
6372
+ t("Smart Account"),
6373
+ ":"
6374
+ ]
6375
+ }
6376
+ ),
6377
+ /* @__PURE__ */ jsxRuntime.jsx(
6378
+ react.Text,
6379
+ {
6380
+ fontSize: "sm",
6381
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6382
+ children: smartAccount.version ? `v${smartAccount.version}` : "v1"
6383
+ }
6384
+ )
6385
+ ] }),
6386
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6387
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
6388
+ t("VeChain Kit"),
6389
+ ":"
6390
+ ] }),
6391
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
6392
+ ] })
6393
+ ] });
6394
+ };
6395
+ var CrossAppConnectionCard = ({ connectionCache }) => {
6396
+ const { t } = reactI18next.useTranslation();
6397
+ const { darkMode: isDark } = useVeChainKitConfig();
6398
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
6399
+ react.VStack,
6400
+ {
6401
+ p: 4,
6402
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6403
+ borderRadius: "xl",
6404
+ spacing: 4,
6405
+ w: "full",
6406
+ children: [
6407
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6408
+ /* @__PURE__ */ jsxRuntime.jsxs(
6409
+ react.Text,
6410
+ {
6411
+ fontSize: "sm",
6412
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6413
+ children: [
6414
+ t("Logged in with"),
6415
+ ":"
6416
+ ]
6417
+ }
6418
+ ),
6419
+ /* @__PURE__ */ jsxRuntime.jsx(
6420
+ react.Text,
6421
+ {
6422
+ fontSize: "sm",
6423
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6424
+ children: connectionCache.ecosystemApp.name
6425
+ }
6426
+ )
6427
+ ] }),
6428
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6429
+ /* @__PURE__ */ jsxRuntime.jsxs(
6430
+ react.Text,
6431
+ {
6432
+ fontSize: "sm",
6433
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6434
+ children: [
6435
+ t("Connected at"),
6436
+ ":"
6437
+ ]
6438
+ }
6439
+ ),
6440
+ /* @__PURE__ */ jsxRuntime.jsx(
6441
+ react.Text,
6442
+ {
6443
+ fontSize: "sm",
6444
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6445
+ children: new Date(
6446
+ connectionCache.timestamp
6447
+ ).toLocaleString()
6448
+ }
6449
+ )
6450
+ ] }),
6451
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6452
+ ]
6453
+ }
6454
+ ) });
6455
+ };
6456
+ var DappKitConnectionCard = () => {
6457
+ const { t } = reactI18next.useTranslation();
6458
+ const { source } = dappKitReact.useWallet();
6459
+ const { darkMode: isDark } = useVeChainKitConfig();
6460
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
6461
+ react.VStack,
6462
+ {
6463
+ p: 4,
6464
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6465
+ borderRadius: "xl",
6466
+ spacing: 4,
6467
+ w: "full",
6468
+ justifyContent: "space-between",
6469
+ children: [
6470
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6471
+ /* @__PURE__ */ jsxRuntime.jsxs(
6472
+ react.Text,
6473
+ {
6474
+ fontSize: "sm",
6475
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6476
+ children: [
6477
+ t("Logged in with"),
6478
+ ":"
6479
+ ]
6480
+ }
6481
+ ),
6482
+ /* @__PURE__ */ jsxRuntime.jsx(
6483
+ react.Text,
6484
+ {
6485
+ fontSize: "sm",
6486
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6487
+ children: source
6488
+ }
6489
+ )
6490
+ ] }),
6491
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6492
+ ]
6493
+ }
6494
+ ) });
6495
+ };
6496
+ var PrivyConnectionCard = () => {
6497
+ const { t } = reactI18next.useTranslation();
6498
+ const { privy, darkMode: isDark } = useVeChainKitConfig();
6499
+ const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
6500
+ if (isLoading)
6501
+ return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
6502
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
6503
+ react.VStack,
6504
+ {
6505
+ p: 4,
6506
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
6507
+ borderRadius: "xl",
6508
+ spacing: 4,
6509
+ w: "full",
6510
+ justifyContent: "space-between",
6511
+ children: [
6512
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
6513
+ /* @__PURE__ */ jsxRuntime.jsxs(
6514
+ react.Text,
6515
+ {
6516
+ fontSize: "sm",
6517
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6518
+ children: [
6519
+ t("Logged in with"),
6520
+ ":"
6521
+ ]
6522
+ }
6523
+ ),
6524
+ /* @__PURE__ */ jsxRuntime.jsx(
6525
+ react.Text,
6526
+ {
6527
+ fontSize: "sm",
6528
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
6529
+ children: Object.values(appInfo)[0].name
6530
+ }
6531
+ )
6532
+ ] }),
6533
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
6534
+ ]
6535
+ }
6536
+ ) });
6537
+ };
6538
+ var WalletSecuredBy = () => {
6539
+ const { connection } = useWallet();
6540
+ const { t } = reactI18next.useTranslation();
6541
+ const { darkMode: isDark, privy } = useVeChainKitConfig();
6542
+ const { getConnectionCache } = useCrossAppConnectionCache();
6543
+ const connectionCache = getConnectionCache();
6544
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6545
+ react.VStack,
6546
+ {
6547
+ w: "full",
6548
+ align: "stretch",
6549
+ textAlign: "center",
6550
+ mt: 5,
6551
+ p: 3,
6552
+ borderRadius: "lg",
6553
+ bg: isDark ? "whiteAlpha.100" : "blackAlpha.50",
6554
+ shadow: "sm",
6555
+ children: [
6556
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") }),
6557
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
6558
+ /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
6559
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
6560
+ connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.VechainLogoHorizontal, { isDark, w: "69px" }) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
6561
+ react.Image,
6562
+ {
6563
+ src: connectionCache.ecosystemApp.logoUrl,
6564
+ alt: connectionCache.ecosystemApp.name,
6565
+ maxW: "40px",
6566
+ borderRadius: "md"
6567
+ }
6568
+ ),
6569
+ connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
6570
+ react.Image,
6571
+ {
6572
+ src: privy?.appearance.logo,
6573
+ alt: privy?.appearance.logo,
6574
+ maxW: "40px",
6575
+ borderRadius: "md"
6576
+ }
6577
+ )
6578
+ ] })
6579
+ ]
6580
+ }
6581
+ );
6582
+ };
6333
6583
  var EmbeddedWalletContent = ({ setCurrentContent }) => {
6334
6584
  const { t } = reactI18next.useTranslation();
6335
6585
  const [showFullText, setShowFullText] = React9.useState(false);
@@ -6337,7 +6587,7 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6337
6587
  const { exportWallet } = reactAuth.usePrivy();
6338
6588
  const walletImage = chunkVUMG5BY2_cjs.getPicassoImage(connectedWallet?.address ?? "");
6339
6589
  const { getConnectionCache } = useCrossAppConnectionCache();
6340
- const { privy, darkMode: isDark } = useVeChainKitConfig();
6590
+ const { darkMode: isDark } = useVeChainKitConfig();
6341
6591
  const { connection } = useWallet();
6342
6592
  const connectionCache = getConnectionCache();
6343
6593
  return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
@@ -6416,7 +6666,26 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6416
6666
  ),
6417
6667
  "."
6418
6668
  ] }),
6419
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, mt: 5, children: t(
6669
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
6670
+ t("Click"),
6671
+ " ",
6672
+ /* @__PURE__ */ jsxRuntime.jsx(
6673
+ react.Link,
6674
+ {
6675
+ href: "https://docs.vechain-kit.vechain.org/vechain-kit/embedded-wallets",
6676
+ isExternal: true,
6677
+ color: "gray.500",
6678
+ fontSize: "14px",
6679
+ textDecoration: "underline",
6680
+ children: t("here")
6681
+ }
6682
+ ),
6683
+ " ",
6684
+ t(
6685
+ "to learn more about embedded wallets."
6686
+ )
6687
+ ] }),
6688
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
6420
6689
  "A smart account is being used as a gateway for blockchain interactions."
6421
6690
  ) })
6422
6691
  ] }),
@@ -6433,30 +6702,32 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6433
6702
  }
6434
6703
  )
6435
6704
  ] }),
6436
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
6705
+ /* @__PURE__ */ jsxRuntime.jsx(
6437
6706
  ActionButton,
6438
6707
  {
6439
6708
  title: t("Backup your wallet"),
6440
6709
  description: t(
6441
- "Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets."
6710
+ connection.isConnectedWithSocialLogin ? "Store your Recovery Phrase or Private Key in a secure location, avoid losing access to your assets." : "Backup can be done only in the app securing your wallet."
6442
6711
  ),
6443
6712
  onClick: () => {
6444
6713
  exportWallet();
6445
6714
  },
6715
+ isDisabled: !connection.isConnectedWithSocialLogin,
6446
6716
  leftIcon: gi.GiHouseKeys,
6447
6717
  rightIcon: md.MdOutlineNavigateNext
6448
6718
  }
6449
6719
  ),
6450
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(
6720
+ /* @__PURE__ */ jsxRuntime.jsx(
6451
6721
  ActionButton,
6452
6722
  {
6453
6723
  title: t("Login methods"),
6454
6724
  description: t(
6455
- "View and manage the login methods linked to your wallet."
6725
+ connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
6456
6726
  ),
6457
6727
  onClick: () => {
6458
6728
  setCurrentContent("privy-linked-accounts");
6459
6729
  },
6730
+ isDisabled: !connection.isConnectedWithSocialLogin,
6460
6731
  leftIcon: md.MdManageAccounts,
6461
6732
  rightIcon: md.MdOutlineNavigateNext
6462
6733
  }
@@ -6464,46 +6735,10 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6464
6735
  ]
6465
6736
  }
6466
6737
  ) }),
6467
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", align: "stretch", textAlign: "center", mt: 5, children: connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 2, opacity: 0.6, children: [
6468
- /* @__PURE__ */ jsxRuntime.jsx(
6469
- react.HStack,
6470
- {
6471
- textAlign: "center",
6472
- alignItems: "center",
6473
- justify: "center",
6474
- w: "full",
6475
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") })
6476
- }
6477
- ),
6478
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
6479
- /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
6480
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
6481
- connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(
6482
- chunkX4PAU76A_cjs.VechainLogoHorizontal,
6483
- {
6484
- isDark,
6485
- w: "69px"
6486
- }
6487
- ) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
6488
- react.Image,
6489
- {
6490
- src: connectionCache.ecosystemApp.logoUrl,
6491
- alt: connectionCache.ecosystemApp.name,
6492
- maxW: "40px",
6493
- borderRadius: "md"
6494
- }
6495
- ),
6496
- connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
6497
- react.Image,
6498
- {
6499
- src: privy?.appearance.logo,
6500
- alt: privy?.appearance.logo,
6501
- maxW: "40px",
6502
- borderRadius: "md"
6503
- }
6504
- )
6505
- ] })
6506
- ] }) }) })
6738
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
6739
+ /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
6740
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
6741
+ ] }) })
6507
6742
  ] });
6508
6743
  };
6509
6744
  var WalletSettingsContent = ({
@@ -6594,10 +6829,7 @@ var WalletSettingsContent = ({
6594
6829
  {
6595
6830
  title: t("Embedded Wallet"),
6596
6831
  description: t(
6597
- "View details of your embedded wallet created and secured by {{appName}}.",
6598
- {
6599
- appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
6600
- }
6832
+ "Manage your embedded wallet security settings or back it up to a new device."
6601
6833
  ),
6602
6834
  onClick: () => {
6603
6835
  setCurrentContent("embedded-wallet");
@@ -10067,197 +10299,6 @@ var FAQContent = ({ onGoBack }) => {
10067
10299
  ] }) })
10068
10300
  ] });
10069
10301
  };
10070
- var NetworkInfo = () => {
10071
- const { t } = reactI18next.useTranslation();
10072
- const { darkMode: isDark, network } = useVeChainKitConfig();
10073
- const { connection, smartAccount } = useWallet();
10074
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10075
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10076
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10077
- t("Connection Type"),
10078
- ":"
10079
- ] }),
10080
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
10081
- ] }),
10082
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10083
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10084
- t("Network"),
10085
- ":"
10086
- ] }),
10087
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
10088
- ] }),
10089
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10090
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10091
- t("Node"),
10092
- ":"
10093
- ] }),
10094
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkVUMG5BY2_cjs.getConfig(network.type).nodeUrl })
10095
- ] }),
10096
- connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10097
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10098
- t("Smart Account"),
10099
- ":"
10100
- ] }),
10101
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
10102
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10103
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10104
- t("Smart Account"),
10105
- ":"
10106
- ] }),
10107
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
10108
- ] }),
10109
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10110
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
10111
- t("VeChain Kit"),
10112
- ":"
10113
- ] }),
10114
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
10115
- ] })
10116
- ] });
10117
- };
10118
- var CrossAppConnectionCard = ({ connectionCache }) => {
10119
- const { t } = reactI18next.useTranslation();
10120
- const { darkMode: isDark } = useVeChainKitConfig();
10121
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
10122
- react.VStack,
10123
- {
10124
- p: 4,
10125
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
10126
- borderRadius: "xl",
10127
- spacing: 4,
10128
- w: "full",
10129
- children: [
10130
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10131
- /* @__PURE__ */ jsxRuntime.jsxs(
10132
- react.Text,
10133
- {
10134
- fontSize: "sm",
10135
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10136
- children: [
10137
- t("Connected through"),
10138
- ":"
10139
- ]
10140
- }
10141
- ),
10142
- /* @__PURE__ */ jsxRuntime.jsx(
10143
- react.Text,
10144
- {
10145
- fontSize: "sm",
10146
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10147
- children: connectionCache.ecosystemApp.name
10148
- }
10149
- )
10150
- ] }),
10151
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10152
- /* @__PURE__ */ jsxRuntime.jsxs(
10153
- react.Text,
10154
- {
10155
- fontSize: "sm",
10156
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10157
- children: [
10158
- t("Connected at"),
10159
- ":"
10160
- ]
10161
- }
10162
- ),
10163
- /* @__PURE__ */ jsxRuntime.jsx(
10164
- react.Text,
10165
- {
10166
- fontSize: "sm",
10167
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10168
- children: new Date(
10169
- connectionCache.timestamp
10170
- ).toLocaleString()
10171
- }
10172
- )
10173
- ] }),
10174
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10175
- ]
10176
- }
10177
- ) });
10178
- };
10179
- var DappKitConnectionCard = () => {
10180
- const { t } = reactI18next.useTranslation();
10181
- const { source } = dappKitReact.useWallet();
10182
- const { darkMode: isDark } = useVeChainKitConfig();
10183
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
10184
- react.VStack,
10185
- {
10186
- p: 4,
10187
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
10188
- borderRadius: "xl",
10189
- spacing: 4,
10190
- w: "full",
10191
- justifyContent: "space-between",
10192
- children: [
10193
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10194
- /* @__PURE__ */ jsxRuntime.jsxs(
10195
- react.Text,
10196
- {
10197
- fontSize: "sm",
10198
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10199
- children: [
10200
- t("Connected through"),
10201
- ":"
10202
- ]
10203
- }
10204
- ),
10205
- /* @__PURE__ */ jsxRuntime.jsx(
10206
- react.Text,
10207
- {
10208
- fontSize: "sm",
10209
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10210
- children: source
10211
- }
10212
- )
10213
- ] }),
10214
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10215
- ]
10216
- }
10217
- ) });
10218
- };
10219
- var PrivyConnectionCard = () => {
10220
- const { t } = reactI18next.useTranslation();
10221
- const { privy, darkMode: isDark } = useVeChainKitConfig();
10222
- const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
10223
- if (isLoading)
10224
- return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
10225
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
10226
- react.VStack,
10227
- {
10228
- p: 4,
10229
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
10230
- borderRadius: "xl",
10231
- spacing: 4,
10232
- w: "full",
10233
- justifyContent: "space-between",
10234
- children: [
10235
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
10236
- /* @__PURE__ */ jsxRuntime.jsxs(
10237
- react.Text,
10238
- {
10239
- fontSize: "sm",
10240
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10241
- children: [
10242
- t("Connected through"),
10243
- ":"
10244
- ]
10245
- }
10246
- ),
10247
- /* @__PURE__ */ jsxRuntime.jsx(
10248
- react.Text,
10249
- {
10250
- fontSize: "sm",
10251
- color: isDark ? "#dfdfdd" : "#4d4d4d",
10252
- children: Object.values(appInfo)[0].name
10253
- }
10254
- )
10255
- ] }),
10256
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
10257
- ]
10258
- }
10259
- ) });
10260
- };
10261
10302
  var ConnectionDetailsContent = ({ onGoBack }) => {
10262
10303
  const { t } = reactI18next.useTranslation();
10263
10304
  const { getConnectionCache } = useCrossAppConnectionCache();
@@ -10358,7 +10399,8 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
10358
10399
  ]
10359
10400
  }
10360
10401
  )
10361
- ] })
10402
+ ] }),
10403
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
10362
10404
  ] }),
10363
10405
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, {})
10364
10406
  ] });