@vechain/vechain-kit 1.2.0 → 1.2.1

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
@@ -3,8 +3,8 @@ import * as React$1 from 'react';
3
3
  import React__default, { ReactElement, ReactNode, ElementType } from 'react';
4
4
  import { WalletListEntry, SignTypedDataParams, User } from '@privy-io/react-auth';
5
5
  export { usePrivy } from '@privy-io/react-auth';
6
- import { P as PrivyAppInfo, T as TransactionProgress, a as TransactionStatusErrorType, W as Wallet, b as PrivyLoginMethod, N as NETWORK_TYPE, c as Network, d as NFTMediaType, e as TogglePassportCheck, V as VePassportUserStatus, E as EnhancedClause, S as SmartAccount, C as ConnectionSource, f as TransactionStatus, g as CrossAppConnectionCache } from './Constants-s7z3u9h5.cjs';
7
- export { h as ExecuteWithAuthorizationSignData } from './Constants-s7z3u9h5.cjs';
6
+ import { P as PrivyAppInfo, T as TransactionProgress, a as TransactionStatusErrorType, W as Wallet, b as PrivyLoginMethod, N as NETWORK_TYPE, c as Network, d as NFTMediaType, e as TogglePassportCheck, V as VePassportUserStatus, E as EnhancedClause, S as SmartAccount, C as ConnectionSource, f as TransactionStatus, g as CrossAppConnectionCache } from './Constants-Q8PYUyoh.cjs';
7
+ export { h as ExecuteWithAuthorizationSignData } from './Constants-Q8PYUyoh.cjs';
8
8
  import { WalletSource, LogLevel } from '@vechain/dapp-kit';
9
9
  import { WalletConnectOptions } from '@vechain/dapp-kit-react';
10
10
  export { useConnex } from '@vechain/dapp-kit-react';
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import * as React$1 from 'react';
3
3
  import React__default, { ReactElement, ReactNode, ElementType } from 'react';
4
4
  import { WalletListEntry, SignTypedDataParams, User } from '@privy-io/react-auth';
5
5
  export { usePrivy } from '@privy-io/react-auth';
6
- import { P as PrivyAppInfo, T as TransactionProgress, a as TransactionStatusErrorType, W as Wallet, b as PrivyLoginMethod, N as NETWORK_TYPE, c as Network, d as NFTMediaType, e as TogglePassportCheck, V as VePassportUserStatus, E as EnhancedClause, S as SmartAccount, C as ConnectionSource, f as TransactionStatus, g as CrossAppConnectionCache } from './Constants-s7z3u9h5.js';
7
- export { h as ExecuteWithAuthorizationSignData } from './Constants-s7z3u9h5.js';
6
+ import { P as PrivyAppInfo, T as TransactionProgress, a as TransactionStatusErrorType, W as Wallet, b as PrivyLoginMethod, N as NETWORK_TYPE, c as Network, d as NFTMediaType, e as TogglePassportCheck, V as VePassportUserStatus, E as EnhancedClause, S as SmartAccount, C as ConnectionSource, f as TransactionStatus, g as CrossAppConnectionCache } from './Constants-Q8PYUyoh.js';
7
+ export { h as ExecuteWithAuthorizationSignData } from './Constants-Q8PYUyoh.js';
8
8
  import { WalletSource, LogLevel } from '@vechain/dapp-kit';
9
9
  import { WalletConnectOptions } from '@vechain/dapp-kit-react';
10
10
  export { useConnex } from '@vechain/dapp-kit-react';
package/dist/index.js CHANGED
@@ -4564,7 +4564,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
4564
4564
  // package.json
4565
4565
  var package_default = {
4566
4566
  name: "@vechain/vechain-kit",
4567
- version: "1.1.1",
4567
+ version: "1.2.1",
4568
4568
  private: false,
4569
4569
  homepage: "https://github.com/vechain/vechain-kit",
4570
4570
  repository: "github:vechain/vechain-kit",
@@ -5927,7 +5927,7 @@ var AccountSelector = ({
5927
5927
  rounded: "full"
5928
5928
  }
5929
5929
  ),
5930
- /* @__PURE__ */ jsx(Text, { fontSize: size, fontWeight: "500", children: humanDomain(wallet?.domain ?? "", 10, 4) || humanAddress(wallet?.address ?? "", 6, 4) }),
5930
+ /* @__PURE__ */ jsx(Text, { fontSize: size, fontWeight: "500", children: humanDomain(wallet?.domain ?? "", 11, 4) || humanAddress(wallet?.address ?? "", 6, 4) }),
5931
5931
  /* @__PURE__ */ jsx(
5932
5932
  Icon,
5933
5933
  {
@@ -6230,12 +6230,17 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
6230
6230
  ),
6231
6231
  /* @__PURE__ */ jsx(AddressDisplay, { wallet: connectedWallet })
6232
6232
  ] }),
6233
- connection.isConnectedWithCrossApp && /* @__PURE__ */ jsx(Text, { fontSize: "sm", opacity: 0.5, children: t(
6234
- "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.",
6235
- {
6236
- element: connectionCache?.ecosystemApp?.name
6237
- }
6238
- ) }),
6233
+ connection.isConnectedWithCrossApp && /* @__PURE__ */ jsxs(Fragment, { children: [
6234
+ /* @__PURE__ */ jsx(Text, { fontSize: "sm", opacity: 0.5, children: t(
6235
+ "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} website to manage your login methods and security settings.",
6236
+ {
6237
+ element: connectionCache?.ecosystemApp?.name
6238
+ }
6239
+ ) }),
6240
+ /* @__PURE__ */ jsx(Text, { fontSize: "sm", opacity: 0.5, mt: 5, children: t(
6241
+ "A smart account is being used as a gateway for blockchain interactions."
6242
+ ) })
6243
+ ] }),
6239
6244
  connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [
6240
6245
  /* @__PURE__ */ jsx(Text, { fontSize: "sm", opacity: 0.5, children: t(
6241
6246
  "You are using an Embedded Wallet secured by your social login method, ensuring a seamless VeChain experience."
@@ -7470,7 +7475,7 @@ var ConfirmationModalContent = ({
7470
7475
  }, 9e3);
7471
7476
  return () => clearTimeout(timer);
7472
7477
  }, [progress?.currentStep]);
7473
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7478
+ return /* @__PURE__ */ jsxs(Box, { children: [
7474
7479
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
7475
7480
  /* @__PURE__ */ jsx(
7476
7481
  ModalHeader,
@@ -7562,7 +7567,7 @@ var ErrorModalContent = ({
7562
7567
  const { network } = useVeChainKitConfig();
7563
7568
  const { darkMode: isDark } = useVeChainKitConfig();
7564
7569
  const explorerUrl = getConfig(network.type).explorerUrl;
7565
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7570
+ return /* @__PURE__ */ jsxs(Box, { children: [
7566
7571
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
7567
7572
  /* @__PURE__ */ jsx(
7568
7573
  ModalHeader,
@@ -7657,7 +7662,7 @@ var LoadingModalContent = ({
7657
7662
  }, 12e3);
7658
7663
  return () => clearTimeout(timer);
7659
7664
  }, []);
7660
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7665
+ return /* @__PURE__ */ jsxs(Box, { children: [
7661
7666
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
7662
7667
  /* @__PURE__ */ jsx(
7663
7668
  ModalHeader,
@@ -7778,7 +7783,7 @@ var SuccessModalContent = ({
7778
7783
  const { network } = useVeChainKitConfig();
7779
7784
  const explorerUrl = getConfig(network.type).explorerUrl;
7780
7785
  const socialDescription = socialDescriptionEncoded ?? `${explorerUrl}/${txId}`;
7781
- return /* @__PURE__ */ jsxs(Fragment, { children: [
7786
+ return /* @__PURE__ */ jsxs(Box, { children: [
7782
7787
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
7783
7788
  /* @__PURE__ */ jsx(
7784
7789
  ModalHeader,
@@ -9930,7 +9935,15 @@ var FAQContent = ({ onGoBack }) => {
9930
9935
  var NetworkInfo = () => {
9931
9936
  const { t } = useTranslation();
9932
9937
  const { darkMode: isDark, network } = useVeChainKitConfig();
9938
+ const { connection } = useWallet();
9933
9939
  return /* @__PURE__ */ jsxs(Fragment, { children: [
9940
+ /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
9941
+ /* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9942
+ t("Connection Type"),
9943
+ ":"
9944
+ ] }),
9945
+ /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
9946
+ ] }),
9934
9947
  /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
9935
9948
  /* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9936
9949
  t("Network"),
@@ -9944,6 +9957,13 @@ var NetworkInfo = () => {
9944
9957
  ":"
9945
9958
  ] }),
9946
9959
  /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || getConfig(network.type).nodeUrl })
9960
+ ] }),
9961
+ /* @__PURE__ */ jsxs(HStack, { w: "full", justifyContent: "space-between", children: [
9962
+ /* @__PURE__ */ jsxs(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
9963
+ t("Active Smart Account"),
9964
+ ":"
9965
+ ] }),
9966
+ /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.isConnectedWithPrivy ? "Yes" : "No" })
9947
9967
  ] })
9948
9968
  ] });
9949
9969
  };
@@ -10834,7 +10854,7 @@ var NotificationsContent = ({ setCurrentContent }) => {
10834
10854
  ),
10835
10855
  /* @__PURE__ */ jsx(ModalCloseButton, {})
10836
10856
  ] }),
10837
- /* @__PURE__ */ jsxs(Container, { maxW: "container.lg", h: "350px", overflowY: "auto", children: [
10857
+ /* @__PURE__ */ jsxs(Container, { maxW: "container.lg", h: "350px", children: [
10838
10858
  /* @__PURE__ */ jsx(ModalBody, { w: "full", children: /* @__PURE__ */ jsxs(VStack, { spacing: 4, align: "stretch", w: "full", children: [
10839
10859
  /* @__PURE__ */ jsxs(HStack, { justify: "space-between", children: [
10840
10860
  /* @__PURE__ */ jsx(
@@ -11160,7 +11180,7 @@ var AppOverviewContent = ({
11160
11180
  }) => {
11161
11181
  const { t } = useTranslation();
11162
11182
  const { darkMode: isDark } = useVeChainKitConfig();
11163
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11183
+ return /* @__PURE__ */ jsxs(Box, { children: [
11164
11184
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
11165
11185
  /* @__PURE__ */ jsx(
11166
11186
  ModalHeader,
@@ -11341,7 +11361,12 @@ var AccountModal = ({ isOpen, onClose }) => {
11341
11361
  case "choose-name":
11342
11362
  return /* @__PURE__ */ jsx(ChooseNameContent, { setCurrentContent });
11343
11363
  case "faq":
11344
- return /* @__PURE__ */ jsx(FAQContent, { onGoBack: () => setCurrentContent("main") });
11364
+ return /* @__PURE__ */ jsx(
11365
+ FAQContent,
11366
+ {
11367
+ onGoBack: () => setCurrentContent("settings")
11368
+ }
11369
+ );
11345
11370
  case "connection-details":
11346
11371
  return /* @__PURE__ */ jsx(
11347
11372
  ConnectionDetailsContent,
@@ -11966,7 +11991,7 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
11966
11991
  }
11967
11992
  }
11968
11993
  };
11969
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11994
+ return /* @__PURE__ */ jsxs(Box, { children: [
11970
11995
  /* @__PURE__ */ jsxs(Fragment, { children: [
11971
11996
  /* @__PURE__ */ jsxs(StickyHeaderContainer, { children: [
11972
11997
  /* @__PURE__ */ jsxs(