@vechain/vechain-kit 1.4.0 → 1.4.2

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
@@ -4,7 +4,7 @@ var chunkNKGOARGM_cjs = require('./chunk-NKGOARGM.cjs');
4
4
  var chunkEO3CLT4E_cjs = require('./chunk-EO3CLT4E.cjs');
5
5
  var chunkX4PAU76A_cjs = require('./chunk-X4PAU76A.cjs');
6
6
  require('./chunk-Q7SFCCGT.cjs');
7
- var React9 = require('react');
7
+ var React8 = require('react');
8
8
  var reactAuth = require('@privy-io/react-auth');
9
9
  var dappKitReact = require('@vechain/dapp-kit-react');
10
10
  var viem = require('viem');
@@ -31,13 +31,15 @@ var hi2 = require('react-icons/hi2');
31
31
  var ci = require('react-icons/ci');
32
32
  var lu = require('react-icons/lu');
33
33
  var md = require('react-icons/md');
34
- var bi = require('react-icons/bi');
35
- var ri = require('react-icons/ri');
36
34
  var vsc = require('react-icons/vsc');
37
35
  var fa = require('react-icons/fa');
38
36
  var fi = require('react-icons/fi');
39
- var gi = require('react-icons/gi');
37
+ var picasso = require('@vechain/picasso');
38
+ var gr = require('react-icons/gr');
39
+ var ri = require('react-icons/ri');
40
+ var bi = require('react-icons/bi');
40
41
  var pi = require('react-icons/pi');
42
+ var gi = require('react-icons/gi');
41
43
  var reactQrcodeLogo = require('react-qrcode-logo');
42
44
  var go = require('react-icons/go');
43
45
  var fa6 = require('react-icons/fa6');
@@ -48,7 +50,7 @@ var anatomy = require('@chakra-ui/anatomy');
48
50
 
49
51
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
50
52
 
51
- var React9__default = /*#__PURE__*/_interopDefault(React9);
53
+ var React8__default = /*#__PURE__*/_interopDefault(React8);
52
54
  var imageCompression__default = /*#__PURE__*/_interopDefault(imageCompression);
53
55
  var i18n__default = /*#__PURE__*/_interopDefault(i18n);
54
56
 
@@ -520,10 +522,10 @@ var pollForReceipt = async (thor, id, blocksTimeout = 5) => {
520
522
  };
521
523
  var useTxReceipt = (txId, blockTimeout) => {
522
524
  const { thor } = dappKitReact.useConnex();
523
- const [receipt, setReceipt] = React9.useState();
524
- const [error, setError] = React9.useState(null);
525
- const [isLoading, setIsLoading] = React9.useState(false);
526
- React9.useEffect(() => {
525
+ const [receipt, setReceipt] = React8.useState();
526
+ const [error, setError] = React8.useState(null);
527
+ const [isLoading, setIsLoading] = React8.useState(false);
528
+ React8.useEffect(() => {
527
529
  const fetchReceipt = async () => {
528
530
  if (!txId) {
529
531
  setReceipt(null);
@@ -719,7 +721,7 @@ var useXApps = () => {
719
721
  // src/hooks/api/vebetterdao/xApps/hooks/useXApp.ts
720
722
  var useXApp = (appId) => {
721
723
  const { data: xApps, ...props } = useXApps();
722
- const allApps = React9.useMemo(() => [...xApps?.active ?? [], ...xApps?.unendorsed ?? []], [xApps]);
724
+ const allApps = React8.useMemo(() => [...xApps?.active ?? [], ...xApps?.unendorsed ?? []], [xApps]);
723
725
  const app = allApps.find((xa) => xa.id === appId);
724
726
  return {
725
727
  data: app,
@@ -865,7 +867,7 @@ var useUserVotesInAllRounds = (address) => {
865
867
  var useUserTopVotedApps = (user) => {
866
868
  const userRoundVotes = useUserVotesInAllRounds(user);
867
869
  const { data: xApps } = useXApps();
868
- const topVotedAppIds = React9.useMemo(() => {
870
+ const topVotedAppIds = React8.useMemo(() => {
869
871
  const appIdToVotes = {};
870
872
  userRoundVotes.data?.forEach((voteEvent) => {
871
873
  const appIds = voteEvent.appsIds;
@@ -881,7 +883,7 @@ var useUserTopVotedApps = (user) => {
881
883
  });
882
884
  return Object.entries(appIdToVotes).sort(([, aVotes], [, bVotes]) => Number(bVotes) - Number(aVotes)).map(([appId, votes]) => ({ appId, votes }));
883
885
  }, [userRoundVotes]);
884
- const topVotedApps = React9.useMemo(() => {
886
+ const topVotedApps = React8.useMemo(() => {
885
887
  return topVotedAppIds.map((app) => {
886
888
  const appFound = xApps?.allApps.find(
887
889
  (xApp) => xApp.id === app.appId
@@ -941,7 +943,7 @@ var useMostVotedAppsInRound = (roundId) => {
941
943
  apps?.map((app) => app.id) ?? [],
942
944
  roundId
943
945
  );
944
- const mostVotedApps = React9.useMemo(
946
+ const mostVotedApps = React8.useMemo(
945
947
  () => xAppsShares.data?.map((appShares) => ({
946
948
  percentage: appShares.share + appShares.unallocatedShare,
947
949
  id: apps?.find((xa) => xa.id === appShares.app)?.id ?? "",
@@ -1160,20 +1162,20 @@ var compressImages = async (images) => {
1160
1162
  }
1161
1163
  };
1162
1164
  var useUploadImages = ({ compressImages: compressImages2, defaultImages }) => {
1163
- const [uploadedImages, setUploadedImages] = React9.useState(
1165
+ const [uploadedImages, setUploadedImages] = React8.useState(
1164
1166
  defaultImages ?? []
1165
1167
  );
1166
- React9.useEffect(() => {
1168
+ React8.useEffect(() => {
1167
1169
  if (defaultImages) {
1168
1170
  setUploadedImages(defaultImages);
1169
1171
  }
1170
1172
  }, [defaultImages]);
1171
- const [invalidDateError, setInvalidDateError] = React9.useState([]);
1172
- const onRemove = React9.useCallback(
1173
+ const [invalidDateError, setInvalidDateError] = React8.useState([]);
1174
+ const onRemove = React8.useCallback(
1173
1175
  (index) => setUploadedImages((s) => s.filter((_, i) => i !== index)),
1174
1176
  []
1175
1177
  );
1176
- const onUpload = React9.useCallback(
1178
+ const onUpload = React8.useCallback(
1177
1179
  async (acceptedFiles, keepCurrent = true) => {
1178
1180
  setInvalidDateError([]);
1179
1181
  const parsedUploads = [];
@@ -1214,14 +1216,14 @@ var useSingleImageUpload = ({
1214
1216
  compressImage,
1215
1217
  defaultImage
1216
1218
  }) => {
1217
- const [uploadedImage, setUploadedImage] = React9.useState(defaultImage);
1218
- React9.useEffect(() => {
1219
+ const [uploadedImage, setUploadedImage] = React8.useState(defaultImage);
1220
+ React8.useEffect(() => {
1219
1221
  if (defaultImage) {
1220
1222
  setUploadedImage(defaultImage);
1221
1223
  }
1222
1224
  }, [defaultImage]);
1223
- const onRemove = React9.useCallback(() => setUploadedImage(void 0), []);
1224
- const onUpload = React9.useCallback(
1225
+ const onRemove = React8.useCallback(() => setUploadedImage(void 0), []);
1226
+ const onUpload = React8.useCallback(
1225
1227
  async (acceptedFile) => {
1226
1228
  let parsedFile = acceptedFile;
1227
1229
  if (compressImage) {
@@ -1696,7 +1698,7 @@ var useAllocationsRound = (roundId) => {
1696
1698
  const currentAllocationState = useAllocationsRoundState(roundId);
1697
1699
  const allocationRoundsEvents = useAllocationsRoundsEvents();
1698
1700
  const { network } = useVeChainKitConfig();
1699
- const currentAllocationRound = React9.useMemo(() => {
1701
+ const currentAllocationRound = React8.useMemo(() => {
1700
1702
  if (!currentAllocationId.data || !allocationRoundsEvents.data)
1701
1703
  return;
1702
1704
  const roundInfo = allocationRoundsEvents.data.created.find(
@@ -1718,7 +1720,7 @@ var useAllocationsRound = (roundId) => {
1718
1720
  const isError = currentAllocationId.isError || allocationRoundsEvents.isError || currentAllocationState.isError;
1719
1721
  const error = currentAllocationId.error || allocationRoundsEvents.error || currentAllocationState.error;
1720
1722
  const blockTime = chunkEO3CLT4E_cjs.getConfig(network.type).network.blockTime;
1721
- const estimatedEndTime = React9.useMemo(() => {
1723
+ const estimatedEndTime = React8.useMemo(() => {
1722
1724
  if (!currentAllocationRound) return null;
1723
1725
  const endBlock = Number(currentAllocationRound.voteEnd);
1724
1726
  if (!endBlock || !currentBlock) return null;
@@ -1726,7 +1728,7 @@ var useAllocationsRound = (roundId) => {
1726
1728
  const durationLeftTimestamp = endBlockFromNow * blockTime;
1727
1729
  return Date.now() + durationLeftTimestamp;
1728
1730
  }, [currentBlock, currentAllocationRound, blockTime]);
1729
- const estimatedStartTime = React9.useMemo(() => {
1731
+ const estimatedStartTime = React8.useMemo(() => {
1730
1732
  if (!currentAllocationRound) return null;
1731
1733
  const startBlock = Number(currentAllocationRound.voteStart);
1732
1734
  if (!startBlock || !currentBlock) return null;
@@ -1783,7 +1785,7 @@ function getOrCreateQueryClient() {
1783
1785
  }
1784
1786
  var EnsureQueryClient = ({ children }) => {
1785
1787
  try {
1786
- const existingQueryClient = React9__default.default.useContext(reactQuery.QueryClientContext);
1788
+ const existingQueryClient = React8__default.default.useContext(reactQuery.QueryClientContext);
1787
1789
  if (existingQueryClient) {
1788
1790
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1789
1791
  }
@@ -2165,7 +2167,7 @@ var useIsWhitelisted = (address) => {
2165
2167
  var useUserStatus = (address) => {
2166
2168
  const { data: isBlacklisted } = useIsBlacklisted(address);
2167
2169
  const { data: isWhitelisted } = useIsWhitelisted(address);
2168
- const userStatus = React9.useMemo(() => {
2170
+ const userStatus = React8.useMemo(() => {
2169
2171
  if (!isBlacklisted && !isWhitelisted) {
2170
2172
  return "NONE" /* NONE */;
2171
2173
  }
@@ -2439,7 +2441,7 @@ var useAccountLinking = (user) => {
2439
2441
  const isPassport = !isEntity && userLinkedEntities?.length > 0;
2440
2442
  const { data: entityPassport, isLoading: isEntityPassportLoading } = useGetPassportForEntity(!!isEntity ? user : void 0);
2441
2443
  const isLinked = !!isPassport || !!isEntity;
2442
- const passport = React9.useMemo(() => {
2444
+ const passport = React8.useMemo(() => {
2443
2445
  if (isEntity) return entityPassport ?? void 0;
2444
2446
  if (isPassport) return user;
2445
2447
  return void 0;
@@ -2576,7 +2578,7 @@ var useVotingRewards = (currentRoundId, voter) => {
2576
2578
  const queryClient = reactQuery.useQueryClient();
2577
2579
  const { network } = useVeChainKitConfig();
2578
2580
  const contractAddress = chunkEO3CLT4E_cjs.getConfig(network.type).voterRewardsContractAddress;
2579
- const rounds = React9.useMemo(() => {
2581
+ const rounds = React8.useMemo(() => {
2580
2582
  return Array.from(
2581
2583
  { length: parseInt(currentRoundId ?? "0") - 1 },
2582
2584
  (_, i) => (i + 1).toString()
@@ -2846,7 +2848,7 @@ var useClaimVeWorldSubdomain = ({
2846
2848
  const queryClient = reactQuery.useQueryClient();
2847
2849
  const { account } = useWallet();
2848
2850
  const { network } = useVeChainKitConfig();
2849
- const buildClauses = React9.useCallback(async () => {
2851
+ const buildClauses = React8.useCallback(async () => {
2850
2852
  if (!subdomain) throw new Error("Invalid subdomain");
2851
2853
  const clausesArray = [];
2852
2854
  clausesArray.push({
@@ -2887,7 +2889,7 @@ var useClaimVeWorldSubdomain = ({
2887
2889
  });
2888
2890
  return clausesArray;
2889
2891
  }, [subdomain, domain, account?.address, alreadyOwned]);
2890
- const handleOnSuccess = React9.useCallback(async () => {
2892
+ const handleOnSuccess = React8.useCallback(async () => {
2891
2893
  queryClient.cancelQueries({
2892
2894
  queryKey: getVechainDomainQueryKey(account?.address ?? ""),
2893
2895
  refetchType: "none"
@@ -3141,7 +3143,7 @@ var useSendTransaction = ({
3141
3143
  }
3142
3144
  return parsedClauses;
3143
3145
  }
3144
- const sendTransaction = React9.useCallback(
3146
+ const sendTransaction = React8.useCallback(
3145
3147
  async (clauses2, options) => {
3146
3148
  if (connection.isConnectedWithSocialLogin || connection.isConnectedWithCrossApp) {
3147
3149
  return await privyWalletProvider.sendTransaction({
@@ -3185,13 +3187,13 @@ var useSendTransaction = ({
3185
3187
  privyUIOptions
3186
3188
  ]
3187
3189
  );
3188
- const [sendTransactionTx, setSendTransactionTx] = React9.useState(
3190
+ const [sendTransactionTx, setSendTransactionTx] = React8.useState(
3189
3191
  null
3190
3192
  );
3191
- const [sendTransactionPending, setSendTransactionPending] = React9.useState(false);
3192
- const [sendTransactionError, setSendTransactionError] = React9.useState(null);
3193
- const [progress, setProgress] = React9.useState();
3194
- const sendTransactionAdapter = React9.useCallback(
3193
+ const [sendTransactionPending, setSendTransactionPending] = React8.useState(false);
3194
+ const [sendTransactionError, setSendTransactionError] = React8.useState(null);
3195
+ const [progress, setProgress] = React8.useState();
3196
+ const sendTransactionAdapter = React8.useCallback(
3195
3197
  async (_clauses) => {
3196
3198
  if (!_clauses && !clauses) throw new Error("clauses are required");
3197
3199
  try {
@@ -3228,7 +3230,7 @@ var useSendTransaction = ({
3228
3230
  isLoading: isTxReceiptLoading,
3229
3231
  error: txReceiptError
3230
3232
  } = useTxReceipt(sendTransactionTx ?? "");
3231
- const explainTxRevertReason = React9.useCallback(
3233
+ const explainTxRevertReason = React8.useCallback(
3232
3234
  async (txReceipt2) => {
3233
3235
  if (!txReceipt2.reverted) return;
3234
3236
  const transactionData = await thor.transaction(txReceipt2.meta.txID).get();
@@ -3237,8 +3239,8 @@ var useSendTransaction = ({
3237
3239
  },
3238
3240
  [thor]
3239
3241
  );
3240
- const [error, setError] = React9.useState();
3241
- const status = React9.useMemo(() => {
3242
+ const [error, setError] = React8.useState();
3243
+ const status = React8.useMemo(() => {
3242
3244
  if (sendTransactionPending) return "pending";
3243
3245
  if (sendTransactionError) {
3244
3246
  return "error";
@@ -3264,7 +3266,7 @@ var useSendTransaction = ({
3264
3266
  txReceipt,
3265
3267
  txReceiptError
3266
3268
  ]);
3267
- React9.useEffect(() => {
3269
+ React8.useEffect(() => {
3268
3270
  if (status === "success" || status === "error") {
3269
3271
  if (sendTransactionError && !error) {
3270
3272
  setError({
@@ -3294,13 +3296,13 @@ var useSendTransaction = ({
3294
3296
  explainTxRevertReason,
3295
3297
  sendTransactionError
3296
3298
  ]);
3297
- const resetStatus = React9.useCallback(() => {
3299
+ const resetStatus = React8.useCallback(() => {
3298
3300
  setSendTransactionTx(null);
3299
3301
  setSendTransactionPending(false);
3300
3302
  setSendTransactionError(null);
3301
3303
  setError(void 0);
3302
3304
  }, []);
3303
- const isTransactionPending = React9.useMemo(() => {
3305
+ const isTransactionPending = React8.useMemo(() => {
3304
3306
  return sendTransactionPending || isTxReceiptLoading || status === "pending" || status === "waitingConfirmation";
3305
3307
  }, [sendTransactionPending, isTxReceiptLoading, status]);
3306
3308
  return {
@@ -3329,7 +3331,7 @@ var useUpdateAvatarRecord = ({
3329
3331
  onTxConfirmed: onSuccess,
3330
3332
  onTxFailedOrCancelled: onError
3331
3333
  });
3332
- const updateAvatar = React9.useCallback(
3334
+ const updateAvatar = React8.useCallback(
3333
3335
  async (domain, ipfsUri) => {
3334
3336
  if (!domain) throw new Error("Domain is required");
3335
3337
  const node = ethers.namehash(domain);
@@ -3489,7 +3491,7 @@ var PrivyCrossAppProvider = ({
3489
3491
  privyEcosystemAppIDS,
3490
3492
  children
3491
3493
  }) => {
3492
- const wagmiConfigRef = React9.useRef(
3494
+ const wagmiConfigRef = React8.useRef(
3493
3495
  wagmi.createConfig({
3494
3496
  chains: [vechain],
3495
3497
  ssr: true,
@@ -3515,9 +3517,9 @@ var usePrivyCrossAppSdk = () => {
3515
3517
  const { signMessageAsync } = wagmi.useSignMessage();
3516
3518
  const { disconnectAsync } = wagmi.useDisconnect();
3517
3519
  const { isConnected } = wagmi.useAccount();
3518
- const [isConnecting, setIsConnecting] = React9.useState(false);
3519
- const [connectionError, setConnectionError] = React9.useState(null);
3520
- const logout = React9.useCallback(async () => {
3520
+ const [isConnecting, setIsConnecting] = React8.useState(false);
3521
+ const [connectionError, setConnectionError] = React8.useState(null);
3522
+ const logout = React8.useCallback(async () => {
3521
3523
  try {
3522
3524
  if (isConnected) {
3523
3525
  await disconnectAsync();
@@ -3528,7 +3530,7 @@ var usePrivyCrossAppSdk = () => {
3528
3530
  throw error;
3529
3531
  }
3530
3532
  }, [disconnectAsync, isConnected]);
3531
- const login = React9.useCallback(
3533
+ const login = React8.useCallback(
3532
3534
  async (appID) => {
3533
3535
  try {
3534
3536
  setIsConnecting(true);
@@ -3550,7 +3552,7 @@ var usePrivyCrossAppSdk = () => {
3550
3552
  },
3551
3553
  [connectAsync, connectors]
3552
3554
  );
3553
- const signMessage = React9.useCallback(
3555
+ const signMessage = React8.useCallback(
3554
3556
  async (message) => {
3555
3557
  try {
3556
3558
  return await signMessageAsync({ message });
@@ -3565,7 +3567,7 @@ var usePrivyCrossAppSdk = () => {
3565
3567
  },
3566
3568
  [signMessageAsync]
3567
3569
  );
3568
- const signTypedData = React9.useCallback(
3570
+ const signTypedData = React8.useCallback(
3569
3571
  async (data) => {
3570
3572
  try {
3571
3573
  return await signTypedDataAsync(data);
@@ -3626,7 +3628,7 @@ var useWallet = () => {
3626
3628
  const isConnectedWithPrivy = isConnectedWithSocialLogin || isConnectedWithCrossApp;
3627
3629
  const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID || isConnectedWithCrossApp && connectionCache?.ecosystemApp?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID;
3628
3630
  const isLoading = isConnectingWithCrossApp || isReconnectingWithCrossApp || isLoadingLoginOAuth || !ready;
3629
- const [isConnected, setIsConnected] = React9.useState(false);
3631
+ const [isConnected, setIsConnected] = React8.useState(false);
3630
3632
  const connectionSource = isConnectedWithCrossApp ? {
3631
3633
  type: "privy-cross-app",
3632
3634
  displayName: "Ecosystem"
@@ -3637,7 +3639,7 @@ var useWallet = () => {
3637
3639
  type: "privy",
3638
3640
  displayName: "Social Login"
3639
3641
  };
3640
- React9.useEffect(() => {
3642
+ React8.useEffect(() => {
3641
3643
  const isNowConnected = isConnectedWithDappKit || isConnectedWithSocialLogin || isConnectedWithCrossApp;
3642
3644
  if (isConnected !== isNowConnected) {
3643
3645
  setIsConnected(isNowConnected);
@@ -3682,7 +3684,7 @@ var useWallet = () => {
3682
3684
  smartAccount?.address ?? ""
3683
3685
  );
3684
3686
  const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address && chunkEO3CLT4E_cjs.compareAddresses(smartAccount?.address, account?.address);
3685
- const disconnect = React9.useCallback(async () => {
3687
+ const disconnect = React8.useCallback(async () => {
3686
3688
  try {
3687
3689
  setIsConnected(false);
3688
3690
  if (isConnectedWithDappKit) {
@@ -4028,7 +4030,7 @@ var useSendTokenModal = () => {
4028
4030
  var SendTokenModalProvider = ({
4029
4031
  children
4030
4032
  }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
4031
- var useEmbeddedWalletSettingsModal = () => {
4033
+ var useAccessAndSecurityModal = () => {
4032
4034
  const {
4033
4035
  openAccountModal,
4034
4036
  closeAccountModal,
@@ -4036,7 +4038,7 @@ var useEmbeddedWalletSettingsModal = () => {
4036
4038
  setAccountModalContent
4037
4039
  } = useVeChainKitConfig();
4038
4040
  const open = () => {
4039
- setAccountModalContent("embedded-wallet");
4041
+ setAccountModalContent("access-and-security");
4040
4042
  openAccountModal();
4041
4043
  };
4042
4044
  const close = () => {
@@ -4048,7 +4050,7 @@ var useEmbeddedWalletSettingsModal = () => {
4048
4050
  isOpen: isAccountModalOpen
4049
4051
  };
4050
4052
  };
4051
- var EmbeddedWalletSettingsModalProvider = ({
4053
+ var AccessAndSecurityModalProvider = ({
4052
4054
  children
4053
4055
  }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
4054
4056
  var useExploreEcosystemModal = () => {
@@ -4165,7 +4167,7 @@ var ReceiveModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxR
4165
4167
  var useLoginModalContent = () => {
4166
4168
  const { privy, loginMethods } = useVeChainKitConfig();
4167
4169
  const isVeChainApp = privy?.appId === chunkEO3CLT4E_cjs.VECHAIN_PRIVY_APP_ID;
4168
- const showEcosystemLogin = React9.useMemo(() => {
4170
+ const showEcosystemLogin = React8.useMemo(() => {
4169
4171
  if (!loginMethods) return true;
4170
4172
  if (loginMethods.length > 0 && !loginMethods?.find((method35) => method35.method === "ecosystem")) {
4171
4173
  return false;
@@ -4194,7 +4196,7 @@ var useLoginModalContent = () => {
4194
4196
  isOfficialVeChainApp: true
4195
4197
  };
4196
4198
  }
4197
- const showMoreLogin = React9.useMemo(() => {
4199
+ const showMoreLogin = React8.useMemo(() => {
4198
4200
  if (!loginMethods) return true;
4199
4201
  return loginMethods.some((method35) => method35.method === "more");
4200
4202
  }, [loginMethods]);
@@ -4219,7 +4221,7 @@ var useTransferERC20 = ({
4219
4221
  }) => {
4220
4222
  const queryClient = reactQuery.useQueryClient();
4221
4223
  const { refresh } = useRefreshBalances();
4222
- const buildClauses = React9.useCallback(async () => {
4224
+ const buildClauses = React8.useCallback(async () => {
4223
4225
  if (!receiverAddress || !amount || !chunkEO3CLT4E_cjs.isValidAddress(receiverAddress))
4224
4226
  throw new Error("Invalid receiver address or amount");
4225
4227
  const clausesArray = [];
@@ -4235,7 +4237,7 @@ var useTransferERC20 = ({
4235
4237
  });
4236
4238
  return clausesArray;
4237
4239
  }, [receiverAddress, amount]);
4238
- const handleOnSuccess = React9.useCallback(async () => {
4240
+ const handleOnSuccess = React8.useCallback(async () => {
4239
4241
  await refresh();
4240
4242
  onSuccess?.();
4241
4243
  }, [onSuccess, fromAddress, queryClient]);
@@ -4262,7 +4264,7 @@ var useTransferVET = ({
4262
4264
  onSuccess
4263
4265
  }) => {
4264
4266
  const { refresh } = useRefreshBalances();
4265
- const buildClauses = React9.useCallback(async () => {
4267
+ const buildClauses = React8.useCallback(async () => {
4266
4268
  if (!receiverAddress || !amount || !chunkEO3CLT4E_cjs.isValidAddress(receiverAddress))
4267
4269
  throw new Error("Invalid receiver address or amount");
4268
4270
  if (isNaN(Number(amount))) {
@@ -4314,7 +4316,7 @@ var DEFAULT_NOTIFICATIONS = [
4314
4316
  ];
4315
4317
  var useNotifications = () => {
4316
4318
  const { account } = useWallet();
4317
- const getStorageKeys = React9.useCallback((address) => {
4319
+ const getStorageKeys = React8.useCallback((address) => {
4318
4320
  const normalizedAddress = address?.toLowerCase();
4319
4321
  return {
4320
4322
  notifications: `vechain_kit_notifications_${normalizedAddress}`,
@@ -4322,7 +4324,7 @@ var useNotifications = () => {
4322
4324
  initialized: `vechain_kit_notifications_initialized_${normalizedAddress}`
4323
4325
  };
4324
4326
  }, []);
4325
- const initializeNotifications = React9.useCallback(() => {
4327
+ const initializeNotifications = React8.useCallback(() => {
4326
4328
  if (!account?.address) return;
4327
4329
  const keys = getStorageKeys(account.address);
4328
4330
  const isInitialized = localStorage.getItem(keys.initialized);
@@ -4334,24 +4336,24 @@ var useNotifications = () => {
4334
4336
  localStorage.setItem(keys.initialized, "true");
4335
4337
  }
4336
4338
  }, [account?.address, getStorageKeys]);
4337
- React9.useEffect(() => {
4339
+ React8.useEffect(() => {
4338
4340
  initializeNotifications();
4339
4341
  }, [initializeNotifications]);
4340
- const getNotifications = React9.useCallback(() => {
4342
+ const getNotifications = React8.useCallback(() => {
4341
4343
  if (!account?.address) return [];
4342
4344
  const keys = getStorageKeys(account.address);
4343
4345
  const cached = localStorage.getItem(keys.notifications);
4344
4346
  if (!cached) return [];
4345
4347
  return JSON.parse(cached);
4346
4348
  }, [account?.address, getStorageKeys]);
4347
- const getArchivedNotifications = React9.useCallback(() => {
4349
+ const getArchivedNotifications = React8.useCallback(() => {
4348
4350
  if (!account?.address) return [];
4349
4351
  const keys = getStorageKeys(account.address);
4350
4352
  const cached = localStorage.getItem(keys.archived);
4351
4353
  if (!cached) return [];
4352
4354
  return JSON.parse(cached);
4353
4355
  }, [account?.address, getStorageKeys]);
4354
- const addNotification = React9.useCallback(
4356
+ const addNotification = React8.useCallback(
4355
4357
  (notification) => {
4356
4358
  if (!account?.address) return;
4357
4359
  const keys = getStorageKeys(account.address);
@@ -4377,7 +4379,7 @@ var useNotifications = () => {
4377
4379
  },
4378
4380
  [account?.address, getNotifications, getStorageKeys]
4379
4381
  );
4380
- const clearAllNotifications = React9.useCallback(() => {
4382
+ const clearAllNotifications = React8.useCallback(() => {
4381
4383
  if (!account?.address) return;
4382
4384
  const keys = getStorageKeys(account.address);
4383
4385
  const notifications = getNotifications();
@@ -4392,7 +4394,7 @@ var useNotifications = () => {
4392
4394
  getArchivedNotifications,
4393
4395
  getStorageKeys
4394
4396
  ]);
4395
- const markAsRead = React9.useCallback(
4397
+ const markAsRead = React8.useCallback(
4396
4398
  (notificationId) => {
4397
4399
  if (!account?.address) return;
4398
4400
  const keys = getStorageKeys(account.address);
@@ -4438,7 +4440,7 @@ var useNotificationAlerts = () => {
4438
4440
  const { t } = reactI18next.useTranslation();
4439
4441
  const { account, connection } = useWallet();
4440
4442
  const { addNotification, getNotifications } = useNotifications();
4441
- React9.useEffect(() => {
4443
+ React8.useEffect(() => {
4442
4444
  if (!connection.isConnectedWithPrivy || !account?.address) return;
4443
4445
  const notifications = getNotifications();
4444
4446
  const hasSmartAccountNotification = notifications.some(
@@ -4455,7 +4457,7 @@ var useNotificationAlerts = () => {
4455
4457
  });
4456
4458
  }
4457
4459
  }, [connection.isConnectedWithPrivy, account?.address]);
4458
- React9.useEffect(() => {
4460
+ React8.useEffect(() => {
4459
4461
  if (!connection.isConnectedWithPrivy || !account?.address) return;
4460
4462
  const notifications = getNotifications();
4461
4463
  const hasMulticlauseWarning = notifications.some(
@@ -4474,13 +4476,13 @@ var useNotificationAlerts = () => {
4474
4476
  }, [connection.isConnectedWithPrivy, account?.address]);
4475
4477
  };
4476
4478
  var useSignMessage2 = () => {
4477
- const [isSigningPending, setIsSigningPending] = React9.useState(false);
4478
- const [signature, setSignature] = React9.useState(null);
4479
- const [error, setError] = React9.useState(null);
4479
+ const [isSigningPending, setIsSigningPending] = React8.useState(false);
4480
+ const [signature, setSignature] = React8.useState(null);
4481
+ const [error, setError] = React8.useState(null);
4480
4482
  const { connection } = useWallet();
4481
4483
  const { vendor } = dappKitReact.useConnex();
4482
4484
  const privyWalletProvider = usePrivyWalletProvider();
4483
- const signMessage = React9.useCallback(
4485
+ const signMessage = React8.useCallback(
4484
4486
  async (message) => {
4485
4487
  setIsSigningPending(true);
4486
4488
  setError(null);
@@ -4510,7 +4512,7 @@ var useSignMessage2 = () => {
4510
4512
  },
4511
4513
  [connection, privyWalletProvider]
4512
4514
  );
4513
- const reset = React9.useCallback(() => {
4515
+ const reset = React8.useCallback(() => {
4514
4516
  setIsSigningPending(false);
4515
4517
  setSignature(null);
4516
4518
  setError(null);
@@ -4524,13 +4526,13 @@ var useSignMessage2 = () => {
4524
4526
  };
4525
4527
  };
4526
4528
  var useSignTypedData2 = () => {
4527
- const [isSigningPending, setIsSigningPending] = React9.useState(false);
4528
- const [signature, setSignature] = React9.useState(null);
4529
- const [error, setError] = React9.useState(null);
4529
+ const [isSigningPending, setIsSigningPending] = React8.useState(false);
4530
+ const [signature, setSignature] = React8.useState(null);
4531
+ const [error, setError] = React8.useState(null);
4530
4532
  const { connection } = useWallet();
4531
4533
  const privyWalletProvider = usePrivyWalletProvider();
4532
4534
  const { signTypedData: signTypedDataDappKit } = dappKitReact.useWallet();
4533
- const signTypedData = React9.useCallback(
4535
+ const signTypedData = React8.useCallback(
4534
4536
  async (data) => {
4535
4537
  setIsSigningPending(true);
4536
4538
  setError(null);
@@ -4562,7 +4564,7 @@ var useSignTypedData2 = () => {
4562
4564
  },
4563
4565
  [connection, privyWalletProvider]
4564
4566
  );
4565
- const reset = React9.useCallback(() => {
4567
+ const reset = React8.useCallback(() => {
4566
4568
  setIsSigningPending(false);
4567
4569
  setSignature(null);
4568
4570
  setError(null);
@@ -4601,7 +4603,7 @@ var useLoginWithOAuth2 = () => {
4601
4603
  };
4602
4604
  var useCrossAppConnectionCache = () => {
4603
4605
  const CACHE_KEY = "vechain_kit_cross_app_connection";
4604
- const setConnectionCache = React9.useCallback(
4606
+ const setConnectionCache = React8.useCallback(
4605
4607
  (ecosystemApp) => {
4606
4608
  const cacheData = {
4607
4609
  timestamp: Date.now(),
@@ -4611,12 +4613,12 @@ var useCrossAppConnectionCache = () => {
4611
4613
  },
4612
4614
  []
4613
4615
  );
4614
- const getConnectionCache = React9.useCallback(() => {
4616
+ const getConnectionCache = React8.useCallback(() => {
4615
4617
  const cached = localStorage.getItem(CACHE_KEY);
4616
4618
  if (!cached) return null;
4617
4619
  return JSON.parse(cached);
4618
4620
  }, []);
4619
- const clearConnectionCache = React9.useCallback(() => {
4621
+ const clearConnectionCache = React8.useCallback(() => {
4620
4622
  localStorage.removeItem(CACHE_KEY);
4621
4623
  }, []);
4622
4624
  return {
@@ -4651,7 +4653,7 @@ var useLoginWithVeChain = () => {
4651
4653
  return { login };
4652
4654
  };
4653
4655
  var useScrollToTop = () => {
4654
- React9.useEffect(() => {
4656
+ React8.useEffect(() => {
4655
4657
  const modalContent = document.querySelector(".chakra-modal__content");
4656
4658
  if (modalContent) {
4657
4659
  modalContent.scrollTop = 0;
@@ -4659,8 +4661,8 @@ var useScrollToTop = () => {
4659
4661
  }, []);
4660
4662
  };
4661
4663
  var useIsPWA = () => {
4662
- const [isPWA, setIsPWA] = React9.useState(true);
4663
- React9.useEffect(() => {
4664
+ const [isPWA, setIsPWA] = React8.useState(true);
4665
+ React8.useEffect(() => {
4664
4666
  const checkIsPWA = () => {
4665
4667
  const isStandalone = window.matchMedia("(display-mode: standalone)").matches || window.standalone || document.referrer.includes("android-app://");
4666
4668
  setIsPWA(isStandalone);
@@ -4674,9 +4676,9 @@ var useIsPWA = () => {
4674
4676
  return isPWA;
4675
4677
  };
4676
4678
  var useFeatureAnnouncement = () => {
4677
- const [isVisible, setIsVisible] = React9.useState(true);
4679
+ const [isVisible, setIsVisible] = React8.useState(true);
4678
4680
  const CACHE_KEY = "vechain_kit_feature_announcement_closed";
4679
- React9.useEffect(() => {
4681
+ React8.useEffect(() => {
4680
4682
  const isClosed = localStorage.getItem(CACHE_KEY);
4681
4683
  if (isClosed) {
4682
4684
  setIsVisible(false);
@@ -4701,7 +4703,7 @@ var useCall = ({
4701
4703
  mapResponse
4702
4704
  }) => {
4703
4705
  const { thor } = dappKitReact.useConnex();
4704
- const queryFn = React9.useCallback(async () => {
4706
+ const queryFn = React8.useCallback(async () => {
4705
4707
  try {
4706
4708
  const functionFragment2 = contractInterface21?.getFunction(method35)?.format("json");
4707
4709
  if (!functionFragment2)
@@ -4721,11 +4723,11 @@ var useCall = ({
4721
4723
  throw error;
4722
4724
  }
4723
4725
  }, [args, contractAddress, contractInterface21, mapResponse, method35, thor]);
4724
- const queryKey = React9.useMemo(
4726
+ const queryKey = React8.useMemo(
4725
4727
  () => getCallKey({ method: method35, keyArgs: keyArgs || args }),
4726
4728
  [method35, keyArgs, args]
4727
4729
  );
4728
- const enableQuery = React9.useMemo(() => enabled, [enabled]);
4730
+ const enableQuery = React8.useMemo(() => enabled, [enabled]);
4729
4731
  return reactQuery.useQuery({
4730
4732
  queryFn,
4731
4733
  queryKey,
@@ -4736,7 +4738,7 @@ var getCallKey = ({ method: method35, keyArgs = [] }) => {
4736
4738
  return ["VECHAIN_KIT_", method35, ...keyArgs];
4737
4739
  };
4738
4740
  var useLocalStorage = (key, initialValue) => {
4739
- const [storedValue, setStoredValue] = React9.useState(() => {
4741
+ const [storedValue, setStoredValue] = React8.useState(() => {
4740
4742
  try {
4741
4743
  const item = window.localStorage.getItem(key);
4742
4744
  return item ? JSON.parse(item) : initialValue;
@@ -4745,7 +4747,7 @@ var useLocalStorage = (key, initialValue) => {
4745
4747
  return initialValue;
4746
4748
  }
4747
4749
  });
4748
- React9.useEffect(() => {
4750
+ React8.useEffect(() => {
4749
4751
  window.localStorage.setItem(key, JSON.stringify(storedValue));
4750
4752
  }, [key, storedValue]);
4751
4753
  return [storedValue, setStoredValue];
@@ -4775,7 +4777,7 @@ var useEcosystemShortcuts = () => {
4775
4777
  isShortcut
4776
4778
  };
4777
4779
  };
4778
- var PrivyWalletProviderContext = React9.createContext(null);
4780
+ var PrivyWalletProviderContext = React8.createContext(null);
4779
4781
  var PrivyWalletProvider = ({
4780
4782
  children,
4781
4783
  nodeUrl,
@@ -5122,7 +5124,7 @@ var PrivyWalletProvider = ({
5122
5124
  );
5123
5125
  };
5124
5126
  var usePrivyWalletProvider = () => {
5125
- const context = React9.useContext(PrivyWalletProviderContext);
5127
+ const context = React8.useContext(PrivyWalletProviderContext);
5126
5128
  if (!context) {
5127
5129
  throw new Error(
5128
5130
  "usePrivyWalletProvider must be used within a PrivyWalletProvider"
@@ -5142,7 +5144,7 @@ var FadeInView = ({ children }) => {
5142
5144
  );
5143
5145
  };
5144
5146
  var FadeInViewFromBottom = ({ children }) => {
5145
- React9.useEffect(() => {
5147
+ React8.useEffect(() => {
5146
5148
  const modalContent = document.querySelector(".chakra-modal__content");
5147
5149
  if (modalContent) {
5148
5150
  modalContent.scrollTop = 0;
@@ -5200,9 +5202,14 @@ var ModalBackButton = ({ onClick, ...props }) => {
5200
5202
  }
5201
5203
  );
5202
5204
  };
5203
- var AddressDisplay = ({ wallet, label, size = "lg" }) => {
5204
- const [copied, setCopied] = React9.useState(false);
5205
- const [copiedDomain, setCopiedDomain] = React9.useState(false);
5205
+ var AddressDisplay = ({
5206
+ wallet,
5207
+ label,
5208
+ size = "lg",
5209
+ style
5210
+ }) => {
5211
+ const [copied, setCopied] = React8.useState(false);
5212
+ const [copiedDomain, setCopiedDomain] = React8.useState(false);
5206
5213
  const copyToClipboard = async (textToCopy, setCopied2) => {
5207
5214
  await navigator.clipboard.writeText(textToCopy);
5208
5215
  setCopied2(true);
@@ -5210,7 +5217,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
5210
5217
  setCopied2(false);
5211
5218
  }, 2e3);
5212
5219
  };
5213
- return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
5220
+ return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", justifyContent: "center", ...style, children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
5214
5221
  label && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.7, children: label }),
5215
5222
  wallet?.domain ? /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { children: [
5216
5223
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5286,7 +5293,7 @@ var AddressDisplay = ({ wallet, label, size = "lg" }) => {
5286
5293
  // package.json
5287
5294
  var package_default = {
5288
5295
  name: "@vechain/vechain-kit",
5289
- version: "1.4.0",
5296
+ version: "1.4.2",
5290
5297
  private: false,
5291
5298
  homepage: "https://github.com/vechain/vechain-kit",
5292
5299
  repository: "github:vechain/vechain-kit",
@@ -5433,10 +5440,10 @@ var VersionFooter = ({ ...props }) => {
5433
5440
  );
5434
5441
  };
5435
5442
  var StickyHeaderContainer = ({ children }) => {
5436
- const [hasContentBelow, setHasContentBelow] = React9.useState(false);
5437
- const observerRef = React9.useRef(null);
5443
+ const [hasContentBelow, setHasContentBelow] = React8.useState(false);
5444
+ const observerRef = React8.useRef(null);
5438
5445
  const { darkMode: isDark } = useVeChainKitConfig();
5439
- React9.useEffect(() => {
5446
+ React8.useEffect(() => {
5440
5447
  const observer = new IntersectionObserver(
5441
5448
  ([entry]) => {
5442
5449
  setHasContentBelow(!entry.isIntersecting);
@@ -5718,7 +5725,7 @@ var AccountAvatar = ({ wallet, props }) => {
5718
5725
  var VeChainLoginButton = ({ isDark, gridColumn }) => {
5719
5726
  const { t } = reactI18next.useTranslation();
5720
5727
  const { login: loginWithVeChain } = useLoginWithVeChain();
5721
- const [loginError, setLoginError] = React9.useState();
5728
+ const [loginError, setLoginError] = React8.useState();
5722
5729
  const loginLoadingModal = react.useDisclosure();
5723
5730
  const handleLoginWithVeChain = async () => {
5724
5731
  loginLoadingModal.onOpen();
@@ -5770,7 +5777,7 @@ var SocialLoginButtons = ({
5770
5777
  const selfHostedPrivyLoginMethods = loginMethods?.filter(
5771
5778
  (method35) => method35.method === "email" || method35.method === "google"
5772
5779
  );
5773
- return /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn, w: "full", children: selfHostedPrivyLoginMethods?.map((loginMethod, index) => /* @__PURE__ */ jsxRuntime.jsxs(React9__default.default.Fragment, { children: [
5780
+ return /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: gridColumn, w: "full", children: selfHostedPrivyLoginMethods?.map((loginMethod, index) => /* @__PURE__ */ jsxRuntime.jsxs(React8__default.default.Fragment, { children: [
5774
5781
  loginMethod.method === "email" && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(EmailLoginButton, {}) }),
5775
5782
  loginMethod.method === "google" && /* @__PURE__ */ jsxRuntime.jsx(react.GridItem, { colSpan: 4, w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
5776
5783
  ConnectionButton,
@@ -5793,7 +5800,7 @@ var SocialLoginButtons = ({
5793
5800
  var PasskeyLoginButton = ({ isDark, gridColumn }) => {
5794
5801
  const { t } = reactI18next.useTranslation();
5795
5802
  const { loginWithPasskey } = useLoginWithPasskey();
5796
- const [loginError, setLoginError] = React9.useState();
5803
+ const [loginError, setLoginError] = React8.useState();
5797
5804
  const loginLoadingModal = react.useDisclosure();
5798
5805
  const handleLoginWithPasskey = async () => {
5799
5806
  loginLoadingModal.onOpen();
@@ -5860,8 +5867,8 @@ var EcosystemButton = ({
5860
5867
  {
5861
5868
  isDark,
5862
5869
  onClick: ecosystemModal.onOpen,
5863
- icon: io5.IoPlanet,
5864
- text: gridColumn && gridColumn >= 2 ? t("Ecosystem") : void 0
5870
+ icon: io.IoMdApps,
5871
+ text: gridColumn && gridColumn >= 2 ? t("Other") : void 0
5865
5872
  }
5866
5873
  ) }),
5867
5874
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5940,10 +5947,10 @@ var EmailCodeVerificationModal = ({
5940
5947
  }) => {
5941
5948
  const { t } = reactI18next.useTranslation();
5942
5949
  const { darkMode: isDark } = useVeChainKitConfig();
5943
- const [code, setCode] = React9.useState("");
5944
- const [error, setError] = React9.useState(null);
5950
+ const [code, setCode] = React8.useState("");
5951
+ const [error, setError] = React8.useState(null);
5945
5952
  const { loginWithCode } = reactAuth.useLoginWithEmail({});
5946
- React9.useEffect(() => {
5953
+ React8.useEffect(() => {
5947
5954
  if (code.length === 6) {
5948
5955
  loginWithCode({ code }).then(() => {
5949
5956
  onClose();
@@ -6130,7 +6137,7 @@ var EmailCodeVerificationModal = ({
6130
6137
  var EmailLoginButton = () => {
6131
6138
  const { t } = reactI18next.useTranslation();
6132
6139
  const { darkMode: isDark } = useVeChainKitConfig();
6133
- const [email, setEmail] = React9.useState("");
6140
+ const [email, setEmail] = React8.useState("");
6134
6141
  const { sendCode, state: emailState } = reactAuth.useLoginWithEmail({});
6135
6142
  const emailCodeVerificationModal = react.useDisclosure();
6136
6143
  const handleSendCode = async () => {
@@ -6225,12 +6232,12 @@ var MainContent = ({ setCurrentContent, onClose }) => {
6225
6232
  isOfficialVeChainApp
6226
6233
  } = useLoginModalContent();
6227
6234
  const { data: appsInfo, isLoading: isEcosystemAppsLoading } = useFetchAppInfo(privyEcosystemAppIDS);
6228
- React9.useEffect(() => {
6235
+ React8.useEffect(() => {
6229
6236
  if (connection.isConnected) {
6230
6237
  onClose();
6231
6238
  }
6232
6239
  }, [connection.isConnected, onClose]);
6233
- const gridLayout = React9.useMemo(() => {
6240
+ const gridLayout = React8.useMemo(() => {
6234
6241
  if (loginMethods?.length) {
6235
6242
  const layout = {};
6236
6243
  loginMethods.forEach(({ method: method35, gridColumn }) => {
@@ -6369,7 +6376,7 @@ var MainContent = ({ setCurrentContent, onClose }) => {
6369
6376
  gridColumn: gridLayout.veChainColumn
6370
6377
  }
6371
6378
  )),
6372
- showPasskey && /* @__PURE__ */ jsxRuntime.jsx(
6379
+ gridLayout.passkeyColumn && /* @__PURE__ */ jsxRuntime.jsx(
6373
6380
  PasskeyLoginButton,
6374
6381
  {
6375
6382
  isDark,
@@ -6464,7 +6471,7 @@ var FeatureAnnouncementCard = ({
6464
6471
  };
6465
6472
  var ExchangeWarningAlert = () => {
6466
6473
  const { t } = reactI18next.useTranslation();
6467
- const [showFullText, setShowFullText] = React9.useState(false);
6474
+ const [showFullText, setShowFullText] = React8.useState(false);
6468
6475
  return /* @__PURE__ */ jsxRuntime.jsx(react.Alert, { status: "warning", fontSize: "xs", borderRadius: "xl", p: 2, children: /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { spacing: 1, align: "stretch", w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 2, align: "flex-start", children: [
6469
6476
  /* @__PURE__ */ jsxRuntime.jsx(react.AlertIcon, { boxSize: 4 }),
6470
6477
  /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { w: "full", children: [
@@ -6487,21 +6494,10 @@ var ExchangeWarningAlert = () => {
6487
6494
  ] })
6488
6495
  ] }) }) });
6489
6496
  };
6490
- var AccountMainContent = ({
6491
- setCurrentContent,
6492
- wallet,
6493
- onClose
6494
- }) => {
6497
+ var AccountMainContent = ({ setCurrentContent, wallet }) => {
6495
6498
  const { t } = reactI18next.useTranslation();
6496
6499
  const { darkMode: isDark } = useVeChainKitConfig();
6497
- const { disconnect, connection, account } = useWallet();
6498
- const { getNotifications } = useNotifications();
6499
- const notifications = getNotifications();
6500
- const hasUnreadNotifications = notifications.some((n) => !n.isRead);
6501
- const handleDisconnect = () => {
6502
- disconnect();
6503
- onClose();
6504
- };
6500
+ const { connection, account } = useWallet();
6505
6501
  return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
6506
6502
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
6507
6503
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -6524,60 +6520,16 @@ var AccountMainContent = ({
6524
6520
  setCurrentContent
6525
6521
  }
6526
6522
  ),
6527
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", children: [
6528
- /* @__PURE__ */ jsxRuntime.jsx(
6529
- react.IconButton,
6530
- {
6531
- p: 2,
6532
- h: 9,
6533
- icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { boxSize: 5, as: ri.RiLogoutBoxLine }),
6534
- "aria-label": "Disconnect",
6535
- variant: "vechainKitSelector",
6536
- onClick: () => setCurrentContent({
6537
- type: "disconnect-confirm",
6538
- props: {
6539
- onDisconnect: handleDisconnect,
6540
- onBack: () => setCurrentContent("main")
6541
- }
6542
- })
6543
- }
6544
- ),
6545
- /* @__PURE__ */ jsxRuntime.jsx(
6546
- AccountSelector,
6547
- {
6548
- mt: 0,
6549
- onClick: () => {
6550
- setCurrentContent("settings");
6551
- },
6552
- wallet
6553
- }
6554
- ),
6555
- /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", children: [
6556
- /* @__PURE__ */ jsxRuntime.jsx(
6557
- react.IconButton,
6558
- {
6559
- p: 2,
6560
- h: 9,
6561
- variant: "vechainKitSelector",
6562
- "aria-label": "notifications",
6563
- icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { boxSize: 5, as: bi.BiBell }),
6564
- onClick: () => setCurrentContent("notifications")
6565
- }
6566
- ),
6567
- hasUnreadNotifications && /* @__PURE__ */ jsxRuntime.jsx(
6568
- react.Box,
6569
- {
6570
- position: "absolute",
6571
- top: 1,
6572
- right: 1,
6573
- width: "8px",
6574
- height: "8px",
6575
- bg: "red.500",
6576
- borderRadius: "full"
6577
- }
6578
- )
6579
- ] })
6580
- ] }),
6523
+ /* @__PURE__ */ jsxRuntime.jsx(
6524
+ AccountSelector,
6525
+ {
6526
+ mt: 0,
6527
+ onClick: () => {
6528
+ setCurrentContent("settings");
6529
+ },
6530
+ wallet
6531
+ }
6532
+ ),
6581
6533
  /* @__PURE__ */ jsxRuntime.jsx(BalanceSection, { mt: 14 }),
6582
6534
  /* @__PURE__ */ jsxRuntime.jsx(
6583
6535
  QuickActionsSection,
@@ -6664,7 +6616,6 @@ var ActionButton = ({
6664
6616
  leftIcon,
6665
6617
  rightIcon,
6666
6618
  title,
6667
- description,
6668
6619
  onClick,
6669
6620
  leftImage,
6670
6621
  hide = false,
@@ -6675,7 +6626,8 @@ var ActionButton = ({
6675
6626
  stacked = false,
6676
6627
  isLoading,
6677
6628
  loadingText,
6678
- style
6629
+ style,
6630
+ extraContent
6679
6631
  }) => {
6680
6632
  const { t } = reactI18next.useTranslation();
6681
6633
  const { colorMode } = react.useColorMode();
@@ -6708,7 +6660,7 @@ var ActionButton = ({
6708
6660
  objectFit: "cover"
6709
6661
  }
6710
6662
  ) : /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: leftIcon, fontSize: "25px" }) }),
6711
- /* @__PURE__ */ jsxRuntime.jsxs(
6663
+ /* @__PURE__ */ jsxRuntime.jsx(
6712
6664
  react.VStack,
6713
6665
  {
6714
6666
  textAlign: "left",
@@ -6716,26 +6668,11 @@ var ActionButton = ({
6716
6668
  flex: 1,
6717
6669
  justifyContent: "flex-start",
6718
6670
  alignItems: "flex-start",
6719
- children: [
6720
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "flex-start", children: [
6721
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "400", children: title }),
6722
- showComingSoon && /* @__PURE__ */ jsxRuntime.jsx(react.Tag, { size: "sm", colorScheme: "red", children: t("Coming Soon!") })
6723
- ] }),
6724
- /* @__PURE__ */ jsxRuntime.jsx(
6725
- react.Text,
6726
- {
6727
- fontSize: "xs",
6728
- fontWeight: "400",
6729
- opacity: 0.5,
6730
- overflowWrap: "break-word",
6731
- wordBreak: "break-word",
6732
- whiteSpace: "normal",
6733
- w: "full",
6734
- pr: rightIcon ? "0px" : "10px",
6735
- children: description
6736
- }
6737
- )
6738
- ]
6671
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "flex-start", children: [
6672
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "400", children: title }),
6673
+ showComingSoon && /* @__PURE__ */ jsxRuntime.jsx(react.Tag, { size: "sm", colorScheme: "red", children: t("Coming Soon!") }),
6674
+ extraContent
6675
+ ] })
6739
6676
  }
6740
6677
  ),
6741
6678
  rightIcon && /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { minW: "40px", justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: rightIcon, fontSize: "20px", opacity: 0.5 }) })
@@ -6749,13 +6686,13 @@ var AccountSelector = ({
6749
6686
  onClick,
6750
6687
  mt
6751
6688
  }) => {
6752
- return /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { mt, children: /* @__PURE__ */ jsxRuntime.jsx(
6689
+ return /* @__PURE__ */ jsxRuntime.jsx(react.HStack, { mt, w: "full", justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
6753
6690
  react.Button,
6754
6691
  {
6755
6692
  w: "fit-content",
6756
6693
  p: 2,
6757
6694
  pl: 4,
6758
- h: 9,
6695
+ h: 14,
6759
6696
  "aria-label": "Wallet",
6760
6697
  onClick,
6761
6698
  variant: "vechainKitSelector",
@@ -6764,10 +6701,10 @@ var AccountSelector = ({
6764
6701
  AccountAvatar,
6765
6702
  {
6766
6703
  wallet,
6767
- props: { width: 5, height: 5 }
6704
+ props: { width: 10, height: 10 }
6768
6705
  }
6769
6706
  ),
6770
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkEO3CLT4E_cjs.humanDomain(wallet?.domain ?? "", 6, 4) || chunkEO3CLT4E_cjs.humanAddress(wallet?.address ?? "", 6, 4) }),
6707
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkEO3CLT4E_cjs.humanDomain(wallet?.domain ?? "", 20, 0) || chunkEO3CLT4E_cjs.humanAddress(wallet?.address ?? "", 6, 4) }),
6771
6708
  /* @__PURE__ */ jsxRuntime.jsx(
6772
6709
  react.Icon,
6773
6710
  {
@@ -6793,7 +6730,7 @@ var BalanceSection = ({ mb, mt }) => {
6793
6730
  address: account?.address ?? ""
6794
6731
  });
6795
6732
  const { refresh } = useRefreshBalances();
6796
- const [isRefreshing, setIsRefreshing] = React9.useState(false);
6733
+ const [isRefreshing, setIsRefreshing] = React8.useState(false);
6797
6734
  const handleRefresh = async () => {
6798
6735
  setIsRefreshing(true);
6799
6736
  await refresh();
@@ -6912,7 +6849,7 @@ var AssetsSection = ({ mt, setCurrentContent }) => {
6912
6849
  const tabBgColor = react.useColorModeValue("white", "#1f1f1e");
6913
6850
  const tabBorderColor = react.useColorModeValue("#ebebeb", "#2d2d2d");
6914
6851
  const tabTextColor = react.useColorModeValue("#4d4d4d", "#dfdfdd");
6915
- const tabPanelsRef = React9.useRef(null);
6852
+ const tabPanelsRef = React8.useRef(null);
6916
6853
  const scrollToContent = () => {
6917
6854
  setTimeout(() => {
6918
6855
  if (tabPanelsRef.current) {
@@ -6967,8 +6904,8 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
6967
6904
  py: 3,
6968
6905
  fontSize: "xs",
6969
6906
  verticalAlign: "middle",
6970
- "aria-label": "Ecosystem",
6971
- icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io5.IoPlanet, boxSize: 5, opacity: 0.9 }),
6907
+ "aria-label": "Apps",
6908
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io.IoMdApps, boxSize: 5, opacity: 0.9 }),
6972
6909
  onClick: () => setCurrentContent("ecosystem")
6973
6910
  }
6974
6911
  ),
@@ -7021,267 +6958,174 @@ var QuickActionsSection = ({ mt, setCurrentContent }) => {
7021
6958
  )
7022
6959
  ] });
7023
6960
  };
7024
- var NetworkInfo = () => {
6961
+ var Profile = ({ onEditClick }) => {
6962
+ const { darkMode: isDark } = useVeChainKitConfig();
6963
+ const { account } = useWallet();
6964
+ const baseBackgroundColor = isDark ? "whiteAlpha.100" : "#00000005";
6965
+ const headerImageSvg = picasso.picasso(account?.address ?? "");
6966
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6967
+ react.Card,
6968
+ {
6969
+ bg: baseBackgroundColor,
6970
+ borderRadius: "xl",
6971
+ width: "full",
6972
+ position: "relative",
6973
+ overflow: "visible",
6974
+ children: [
6975
+ /* @__PURE__ */ jsxRuntime.jsx(
6976
+ react.Box,
6977
+ {
6978
+ p: 0,
6979
+ backgroundSize: "100% !important",
6980
+ backgroundPosition: "center",
6981
+ position: "relative",
6982
+ h: "80px",
6983
+ background: `no-repeat url('data:image/svg+xml;utf8,${headerImageSvg}')`,
6984
+ w: "100%",
6985
+ borderRadius: "14px 14px 0 0"
6986
+ }
6987
+ ),
6988
+ /* @__PURE__ */ jsxRuntime.jsx(
6989
+ react.Box,
6990
+ {
6991
+ position: "absolute",
6992
+ top: "30px",
6993
+ left: "50%",
6994
+ transform: "translateX(-50%)",
6995
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6996
+ AccountAvatar,
6997
+ {
6998
+ wallet: account,
6999
+ props: {
7000
+ width: "100px",
7001
+ height: "100px",
7002
+ boxShadow: "0px 0px 3px 2px #00000024"
7003
+ }
7004
+ }
7005
+ )
7006
+ }
7007
+ ),
7008
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { pt: "14", pb: "6", backgroundColor: "none", border: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account }) }),
7009
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { pt: 0, justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
7010
+ react.Button,
7011
+ {
7012
+ size: "sm",
7013
+ variant: "ghost",
7014
+ leftIcon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: fa.FaEdit }),
7015
+ onClick: onEditClick,
7016
+ children: "Edit"
7017
+ }
7018
+ ) })
7019
+ ]
7020
+ }
7021
+ );
7022
+ };
7023
+ var AccessAndSecurityContent = ({ setCurrentContent }) => {
7025
7024
  const { t } = reactI18next.useTranslation();
7026
- const { darkMode: isDark, network } = useVeChainKitConfig();
7027
- const { connection, smartAccount } = useWallet();
7028
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7029
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7030
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7031
- t("Connection Type"),
7032
- ":"
7033
- ] }),
7034
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
7035
- ] }),
7036
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7037
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7038
- t("Network"),
7039
- ":"
7040
- ] }),
7041
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
7042
- ] }),
7043
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7044
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7045
- t("Node URL"),
7046
- ":"
7047
- ] }),
7048
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkEO3CLT4E_cjs.getConfig(network.type).nodeUrl })
7049
- ] }),
7050
- connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7051
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7052
- t("Smart Account"),
7053
- ":"
7054
- ] }),
7055
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
7056
- ] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7057
- /* @__PURE__ */ jsxRuntime.jsxs(
7058
- react.Text,
7025
+ const { linkPasskey } = reactAuth.usePrivy();
7026
+ const { darkMode: isDark, privy } = useVeChainKitConfig();
7027
+ const { connection } = useWallet();
7028
+ return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
7029
+ /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
7030
+ /* @__PURE__ */ jsxRuntime.jsx(
7031
+ react.ModalHeader,
7059
7032
  {
7060
- fontSize: "sm",
7033
+ fontSize: "md",
7034
+ fontWeight: "500",
7035
+ textAlign: "center",
7061
7036
  color: isDark ? "#dfdfdd" : "#4d4d4d",
7062
- children: [
7063
- t("Smart Account"),
7064
- ":"
7065
- ]
7037
+ children: t("Access and security")
7066
7038
  }
7067
7039
  ),
7068
7040
  /* @__PURE__ */ jsxRuntime.jsx(
7069
- react.Text,
7041
+ ModalBackButton,
7070
7042
  {
7071
- fontSize: "sm",
7072
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7073
- children: smartAccount.version ? `v${smartAccount.version}` : "v1"
7043
+ onClick: () => setCurrentContent("settings")
7074
7044
  }
7075
- )
7045
+ ),
7046
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7076
7047
  ] }),
7077
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7078
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7079
- t("VeChain Kit"),
7080
- ":"
7081
- ] }),
7082
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
7083
- ] })
7084
- ] });
7085
- };
7086
- var CrossAppConnectionCard = ({ connectionCache }) => {
7087
- const { t } = reactI18next.useTranslation();
7088
- const { darkMode: isDark } = useVeChainKitConfig();
7089
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
7090
- react.VStack,
7091
- {
7092
- p: 4,
7093
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
7094
- borderRadius: "xl",
7095
- spacing: 4,
7096
- w: "full",
7097
- children: [
7098
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7099
- /* @__PURE__ */ jsxRuntime.jsxs(
7100
- react.Text,
7048
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
7049
+ react.VStack,
7050
+ {
7051
+ justify: "center",
7052
+ spacing: 3,
7053
+ align: "flex-start",
7054
+ w: "full",
7055
+ children: [
7056
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7057
+ "Manage your embedded wallet security settings or back it up to a new device."
7058
+ ) }),
7059
+ /* @__PURE__ */ jsxRuntime.jsx(
7060
+ ActionButton,
7101
7061
  {
7102
- fontSize: "sm",
7103
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7104
- children: [
7105
- t("Logged in with"),
7106
- ":"
7107
- ]
7062
+ title: t("Passkey"),
7063
+ description: t(
7064
+ "Enable one click login by adding a passkey to your account."
7065
+ ),
7066
+ onClick: () => {
7067
+ linkPasskey();
7068
+ },
7069
+ leftIcon: io.IoIosFingerPrint,
7070
+ rightIcon: void 0,
7071
+ isDisabled: !privy?.allowPasskeyLinking
7108
7072
  }
7109
7073
  ),
7110
7074
  /* @__PURE__ */ jsxRuntime.jsx(
7111
- react.Text,
7112
- {
7113
- fontSize: "sm",
7114
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7115
- children: connectionCache.ecosystemApp.name
7116
- }
7117
- )
7118
- ] }),
7119
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7120
- /* @__PURE__ */ jsxRuntime.jsxs(
7121
- react.Text,
7075
+ ActionButton,
7122
7076
  {
7123
- fontSize: "sm",
7124
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7125
- children: [
7126
- t("Connected at"),
7127
- ":"
7128
- ]
7077
+ title: t("Login methods"),
7078
+ description: t(
7079
+ connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
7080
+ ),
7081
+ onClick: () => {
7082
+ setCurrentContent("privy-linked-accounts");
7083
+ },
7084
+ isDisabled: !connection.isConnectedWithSocialLogin,
7085
+ leftIcon: gr.GrUserAdmin,
7086
+ rightIcon: md.MdOutlineNavigateNext
7129
7087
  }
7130
7088
  ),
7131
7089
  /* @__PURE__ */ jsxRuntime.jsx(
7132
- react.Text,
7090
+ ActionButton,
7133
7091
  {
7134
- fontSize: "sm",
7135
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7136
- children: new Date(
7137
- connectionCache.timestamp
7138
- ).toLocaleString()
7092
+ title: t("Embedded wallet"),
7093
+ description: t(
7094
+ 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."
7095
+ ),
7096
+ onClick: () => {
7097
+ setCurrentContent("embedded-wallet");
7098
+ },
7099
+ leftIcon: hi2.HiOutlineWallet,
7100
+ rightIcon: md.MdOutlineNavigateNext
7139
7101
  }
7140
7102
  )
7141
- ] }),
7142
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7143
- ]
7144
- }
7145
- ) });
7103
+ ]
7104
+ }
7105
+ ) }),
7106
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full" })
7107
+ ] });
7146
7108
  };
7147
- var DappKitConnectionCard = () => {
7148
- const { t } = reactI18next.useTranslation();
7149
- const { source } = dappKitReact.useWallet();
7150
- const { darkMode: isDark } = useVeChainKitConfig();
7151
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
7152
- react.VStack,
7153
- {
7154
- p: 4,
7155
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
7156
- borderRadius: "xl",
7157
- spacing: 4,
7158
- w: "full",
7159
- justifyContent: "space-between",
7160
- children: [
7161
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7162
- /* @__PURE__ */ jsxRuntime.jsxs(
7163
- react.Text,
7164
- {
7165
- fontSize: "sm",
7166
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7167
- children: [
7168
- t("Logged in with"),
7169
- ":"
7170
- ]
7171
- }
7172
- ),
7173
- /* @__PURE__ */ jsxRuntime.jsx(
7174
- react.Text,
7175
- {
7176
- fontSize: "sm",
7177
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7178
- children: source
7179
- }
7180
- )
7181
- ] }),
7182
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7183
- ]
7184
- }
7185
- ) });
7186
- };
7187
- var PrivyConnectionCard = () => {
7109
+ var SettingsContent = ({
7110
+ setCurrentContent,
7111
+ onLogoutSuccess
7112
+ }) => {
7113
+ const contentRef = React8.useRef(null);
7188
7114
  const { t } = reactI18next.useTranslation();
7189
7115
  const { privy, darkMode: isDark } = useVeChainKitConfig();
7190
- const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
7191
- if (isLoading)
7192
- return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
7193
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
7194
- react.VStack,
7195
- {
7196
- p: 4,
7197
- bg: isDark ? "#1a1a1a" : "#f5f5f5",
7198
- borderRadius: "xl",
7199
- spacing: 4,
7200
- w: "full",
7201
- justifyContent: "space-between",
7202
- children: [
7203
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7204
- /* @__PURE__ */ jsxRuntime.jsxs(
7205
- react.Text,
7206
- {
7207
- fontSize: "sm",
7208
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7209
- children: [
7210
- t("Logged in with"),
7211
- ":"
7212
- ]
7213
- }
7214
- ),
7215
- /* @__PURE__ */ jsxRuntime.jsx(
7216
- react.Text,
7217
- {
7218
- fontSize: "sm",
7219
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7220
- children: Object.values(appInfo)[0].name
7221
- }
7222
- )
7223
- ] }),
7224
- /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7225
- ]
7226
- }
7227
- ) });
7228
- };
7229
- var WalletSecuredBy = () => {
7230
- const { connection } = useWallet();
7231
- const { t } = reactI18next.useTranslation();
7232
- const { darkMode: isDark, privy } = useVeChainKitConfig();
7116
+ const { connection, disconnect } = useWallet();
7233
7117
  const { getConnectionCache } = useCrossAppConnectionCache();
7234
7118
  const connectionCache = getConnectionCache();
7235
- return /* @__PURE__ */ jsxRuntime.jsxs(
7236
- react.VStack,
7237
- {
7238
- w: "full",
7239
- align: "stretch",
7240
- textAlign: "center",
7241
- mt: 5,
7242
- p: 3,
7243
- borderRadius: "lg",
7244
- bg: isDark ? "whiteAlpha.100" : "blackAlpha.50",
7245
- shadow: "sm",
7246
- children: [
7247
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") }),
7248
- /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
7249
- /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
7250
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
7251
- connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.VechainLogoHorizontal, { isDark, w: "69px" }) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
7252
- react.Image,
7253
- {
7254
- src: connectionCache.ecosystemApp.logoUrl,
7255
- alt: connectionCache.ecosystemApp.name,
7256
- maxW: "40px",
7257
- borderRadius: "md"
7258
- }
7259
- ),
7260
- connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
7261
- react.Image,
7262
- {
7263
- src: privy?.appearance.logo,
7264
- alt: privy?.appearance.logo,
7265
- maxW: "40px",
7266
- borderRadius: "md"
7267
- }
7268
- )
7269
- ] })
7270
- ]
7119
+ const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
7120
+ const { getNotifications } = useNotifications();
7121
+ const notifications = getNotifications();
7122
+ const hasUnreadNotifications = notifications.some((n) => !n.isRead);
7123
+ React8.useEffect(() => {
7124
+ if (contentRef.current) {
7125
+ contentRef.current.scrollTop = 0;
7271
7126
  }
7272
- );
7273
- };
7274
- var EmbeddedWalletContent = ({ setCurrentContent }) => {
7275
- const { t } = reactI18next.useTranslation();
7276
- const [showFullText, setShowFullText] = React9.useState(false);
7277
- const { connectedWallet } = useWallet();
7278
- const { exportWallet } = reactAuth.usePrivy();
7279
- const walletImage = chunkEO3CLT4E_cjs.getPicassoImage(connectedWallet?.address ?? "");
7280
- const { getConnectionCache } = useCrossAppConnectionCache();
7281
- const { darkMode: isDark } = useVeChainKitConfig();
7282
- const { connection } = useWallet();
7283
- const connectionCache = getConnectionCache();
7284
- return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
7127
+ }, []);
7128
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
7285
7129
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
7286
7130
  /* @__PURE__ */ jsxRuntime.jsx(
7287
7131
  react.ModalHeader,
@@ -7290,268 +7134,103 @@ var EmbeddedWalletContent = ({ setCurrentContent }) => {
7290
7134
  fontWeight: "500",
7291
7135
  textAlign: "center",
7292
7136
  color: isDark ? "#dfdfdd" : "#4d4d4d",
7293
- children: t("Embedded Wallet")
7137
+ children: t("Settings")
7294
7138
  }
7295
7139
  ),
7140
+ /* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
7141
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7142
+ ] }),
7143
+ /* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
7296
7144
  /* @__PURE__ */ jsxRuntime.jsx(
7297
- ModalBackButton,
7145
+ Profile,
7298
7146
  {
7299
- onClick: () => setCurrentContent("settings")
7147
+ onEditClick: () => setCurrentContent("account-customization")
7300
7148
  }
7301
7149
  ),
7302
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7303
- ] }),
7304
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
7305
- react.VStack,
7306
- {
7307
- justify: "center",
7308
- spacing: 3,
7309
- align: "flex-start",
7310
- w: "full",
7311
- children: [
7312
- /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", align: "center", w: "full", children: [
7313
- /* @__PURE__ */ jsxRuntime.jsx(
7314
- react.Image,
7315
- {
7316
- src: walletImage,
7317
- maxW: "100px",
7318
- borderRadius: "50%"
7319
- }
7150
+ /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", spacing: 0, children: [
7151
+ /* @__PURE__ */ jsxRuntime.jsx(
7152
+ ActionButton,
7153
+ {
7154
+ style: {
7155
+ marginTop: "10px",
7156
+ borderBottomRadius: connection.isConnectedWithPrivy ? "0px" : "12px"
7157
+ },
7158
+ title: t("Connection details"),
7159
+ description: t(
7160
+ "View the details of your connection to this app."
7320
7161
  ),
7321
- /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: connectedWallet })
7322
- ] }),
7323
- connection.isConnectedWithCrossApp && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7324
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7325
- "This is your main wallet, created by {{element}} and secured by Privy.",
7162
+ onClick: () => {
7163
+ setCurrentContent("connection-details");
7164
+ },
7165
+ leftIcon: vsc.VscDebugDisconnect,
7166
+ rightIcon: md.MdOutlineNavigateNext
7167
+ }
7168
+ ),
7169
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
7170
+ ActionButton,
7171
+ {
7172
+ style: {
7173
+ borderTopRadius: "0px"
7174
+ },
7175
+ title: t("Access and security"),
7176
+ description: t(
7177
+ "Manage your embedded wallet security settings or back it up to a new device."
7178
+ ),
7179
+ onClick: () => {
7180
+ setCurrentContent("access-and-security");
7181
+ },
7182
+ leftIcon: io5.IoShieldOutline,
7183
+ rightIcon: md.MdOutlineNavigateNext
7184
+ }
7185
+ ),
7186
+ /* @__PURE__ */ jsxRuntime.jsx(
7187
+ ActionButton,
7188
+ {
7189
+ style: {
7190
+ marginTop: "10px",
7191
+ borderBottomRadius: "0px"
7192
+ },
7193
+ title: t("Notifications"),
7194
+ description: t("View your notifications and updates."),
7195
+ onClick: () => {
7196
+ setCurrentContent("notifications");
7197
+ },
7198
+ leftIcon: bi.BiBell,
7199
+ rightIcon: md.MdOutlineNavigateNext,
7200
+ extraContent: hasUnreadNotifications && /* @__PURE__ */ jsxRuntime.jsx(
7201
+ react.Box,
7326
7202
  {
7327
- element: connectionCache?.ecosystemApp?.name
7203
+ minWidth: "16px",
7204
+ height: "16px",
7205
+ bg: "red.500",
7206
+ borderRadius: "full",
7207
+ display: "flex",
7208
+ alignItems: "center",
7209
+ justifyContent: "center",
7210
+ ml: 2,
7211
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", color: "white", children: notifications.filter(
7212
+ (n) => !n.isRead
7213
+ ).length })
7328
7214
  }
7329
- ) }),
7330
- showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7331
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7332
- "This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions."
7333
- ) }),
7334
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7335
- "Please be sure to keep this wallet safe and backed up."
7336
- ) })
7337
- ] }),
7338
- /* @__PURE__ */ jsxRuntime.jsx(
7339
- react.Button,
7215
+ )
7216
+ }
7217
+ ),
7218
+ /* @__PURE__ */ jsxRuntime.jsx(
7219
+ ActionButton,
7220
+ {
7221
+ title: t("Help"),
7222
+ description: t(
7223
+ "Still have some doubts? Check out our FAQs and learn more.",
7340
7224
  {
7341
- mt: 0,
7342
- variant: "link",
7343
- size: "sm",
7344
- onClick: () => setShowFullText(!showFullText),
7345
- color: "blue.500",
7346
- textAlign: "left",
7347
- children: t(showFullText ? "Show Less" : "Read More")
7348
- }
7349
- )
7350
- ] }),
7351
- connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7352
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7353
- "You are using an Embedded Wallet secured by your social login method, ensuring a seamless VeChain experience."
7354
- ) }),
7355
- showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7356
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7357
- "This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions."
7358
- ) }),
7359
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
7360
- t(
7361
- "We highly recommend exporting your private key to back up your wallet. This ensures you can restore it if needed or transfer it to self-custody using"
7362
- ),
7363
- /* @__PURE__ */ jsxRuntime.jsxs(
7364
- react.Link,
7365
- {
7366
- href: "https://www.veworld.net/",
7367
- isExternal: true,
7368
- color: "gray.500",
7369
- fontSize: "14px",
7370
- textDecoration: "underline",
7371
- children: [
7372
- " ",
7373
- t("VeWorld Wallet"),
7374
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { ml: 1, as: io5.IoOpenOutline })
7375
- ]
7376
- }
7377
- ),
7378
- "."
7379
- ] }),
7380
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
7381
- t("Click"),
7382
- " ",
7383
- /* @__PURE__ */ jsxRuntime.jsx(
7384
- react.Link,
7385
- {
7386
- href: "https://docs.vechain-kit.vechain.org/vechain-kit/embedded-wallets",
7387
- isExternal: true,
7388
- color: "gray.500",
7389
- fontSize: "14px",
7390
- textDecoration: "underline",
7391
- children: t("here")
7392
- }
7393
- ),
7394
- " ",
7395
- t(
7396
- "to learn more about embedded wallets."
7397
- )
7398
- ] })
7399
- ] }),
7400
- /* @__PURE__ */ jsxRuntime.jsx(
7401
- react.Button,
7402
- {
7403
- mt: 0,
7404
- variant: "link",
7405
- size: "sm",
7406
- onClick: () => setShowFullText(!showFullText),
7407
- color: "blue.500",
7408
- textAlign: "left",
7409
- children: t(showFullText ? "Show Less" : "Read More")
7410
- }
7411
- )
7412
- ] }),
7413
- /* @__PURE__ */ jsxRuntime.jsx(
7414
- ActionButton,
7415
- {
7416
- title: t("Backup your wallet"),
7417
- description: t(
7418
- 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."
7419
- ),
7420
- onClick: () => {
7421
- exportWallet();
7422
- },
7423
- isDisabled: !connection.isConnectedWithSocialLogin,
7424
- leftIcon: gi.GiHouseKeys,
7425
- rightIcon: md.MdOutlineNavigateNext
7426
- }
7427
- ),
7428
- /* @__PURE__ */ jsxRuntime.jsx(
7429
- ActionButton,
7430
- {
7431
- title: t("Login methods"),
7432
- description: t(
7433
- connection.isConnectedWithSocialLogin ? "View and manage the login methods linked to your wallet." : "Login methods can be managed only in the app securing your wallet."
7434
- ),
7435
- onClick: () => {
7436
- setCurrentContent("privy-linked-accounts");
7437
- },
7438
- isDisabled: !connection.isConnectedWithSocialLogin,
7439
- leftIcon: md.MdManageAccounts,
7440
- rightIcon: md.MdOutlineNavigateNext
7441
- }
7442
- )
7443
- ]
7444
- }
7445
- ) }),
7446
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
7447
- /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
7448
- connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
7449
- ] }) })
7450
- ] });
7451
- };
7452
- var WalletSettingsContent = ({
7453
- setCurrentContent,
7454
- onLogoutSuccess
7455
- }) => {
7456
- const contentRef = React9.useRef(null);
7457
- const { t } = reactI18next.useTranslation();
7458
- const { privy, darkMode: isDark, network } = useVeChainKitConfig();
7459
- const { connection, disconnect, account } = useWallet();
7460
- const { getConnectionCache } = useCrossAppConnectionCache();
7461
- const connectionCache = getConnectionCache();
7462
- const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
7463
- React9.useEffect(() => {
7464
- if (contentRef.current) {
7465
- contentRef.current.scrollTop = 0;
7466
- }
7467
- }, []);
7468
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
7469
- /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
7470
- /* @__PURE__ */ jsxRuntime.jsx(
7471
- react.ModalHeader,
7472
- {
7473
- fontSize: "md",
7474
- fontWeight: "500",
7475
- textAlign: "center",
7476
- color: isDark ? "#dfdfdd" : "#4d4d4d",
7477
- children: t("Settings")
7478
- }
7479
- ),
7480
- /* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
7481
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7482
- ] }),
7483
- /* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
7484
- /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", children: [
7485
- /* @__PURE__ */ jsxRuntime.jsx(AccountAvatar, { wallet: account, props: { maxW: "100px" } }),
7486
- /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: account }),
7487
- network.type !== "main" && /* @__PURE__ */ jsxRuntime.jsx(
7488
- react.Tag,
7489
- {
7490
- size: "sm",
7491
- colorScheme: "blue",
7492
- width: "fit-content",
7493
- justifyContent: "center",
7494
- padding: "10px",
7495
- children: network.type === "test" ? t("Testnet") : t("Unknown")
7496
- }
7497
- )
7498
- ] }),
7499
- /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { mt: 10, w: "full", spacing: 3, children: [
7500
- /* @__PURE__ */ jsxRuntime.jsx(
7501
- ActionButton,
7502
- {
7503
- title: t("Connection Details"),
7504
- description: t(
7505
- "View the details of your connection to this app."
7506
- ),
7507
- onClick: () => {
7508
- setCurrentContent("connection-details");
7509
- },
7510
- leftIcon: vsc.VscDebugDisconnect,
7511
- rightIcon: md.MdOutlineNavigateNext
7512
- }
7513
- ),
7514
- /* @__PURE__ */ jsxRuntime.jsx(
7515
- ActionButton,
7516
- {
7517
- title: t("Customize account"),
7518
- description: t(
7519
- "Customize your account with a nickname and a picture to easily identify it."
7520
- ),
7521
- onClick: () => {
7522
- setCurrentContent("account-customization");
7523
- },
7524
- leftIcon: gi.GiPaintBrush,
7525
- rightIcon: md.MdOutlineNavigateNext
7526
- }
7527
- ),
7528
- connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(
7529
- ActionButton,
7530
- {
7531
- title: t("Embedded Wallet"),
7532
- description: t(
7533
- "Manage your embedded wallet security settings or back it up to a new device."
7534
- ),
7535
- onClick: () => {
7536
- setCurrentContent("embedded-wallet");
7537
- },
7538
- leftIcon: hi2.HiOutlineWallet,
7539
- rightIcon: md.MdOutlineNavigateNext
7540
- }
7541
- ),
7542
- /* @__PURE__ */ jsxRuntime.jsx(
7543
- ActionButton,
7544
- {
7545
- title: t("FAQs"),
7546
- description: t(
7547
- "Still have some doubts? Check out our FAQs and learn more.",
7548
- {
7549
- appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
7225
+ appName: connection.isConnectedWithCrossApp ? connectionCache?.ecosystemApp?.name : Object.values(appInfo ?? {})[0]?.name ?? ""
7550
7226
  }
7551
7227
  ),
7552
7228
  onClick: () => setCurrentContent("faq"),
7553
7229
  leftIcon: bs.BsQuestionCircle,
7554
- rightIcon: md.MdOutlineNavigateNext
7230
+ rightIcon: md.MdOutlineNavigateNext,
7231
+ style: {
7232
+ borderTopRadius: "0px"
7233
+ }
7555
7234
  }
7556
7235
  )
7557
7236
  ] })
@@ -7559,10 +7238,16 @@ var WalletSettingsContent = ({
7559
7238
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsx(
7560
7239
  react.Button,
7561
7240
  {
7562
- onClick: () => {
7563
- disconnect();
7564
- onLogoutSuccess();
7565
- },
7241
+ onClick: () => setCurrentContent({
7242
+ type: "disconnect-confirm",
7243
+ props: {
7244
+ onDisconnect: () => {
7245
+ disconnect();
7246
+ onLogoutSuccess();
7247
+ },
7248
+ onBack: () => setCurrentContent("settings")
7249
+ }
7250
+ }),
7566
7251
  variant: "vechainKitSecondary",
7567
7252
  leftIcon: /* @__PURE__ */ jsxRuntime.jsx(ri.RiLogoutBoxLine, { color: "#888888" }),
7568
7253
  children: t("Logout")
@@ -7574,10 +7259,10 @@ var AccountCustomizationContent = ({ setCurrentContent }) => {
7574
7259
  const { t } = reactI18next.useTranslation();
7575
7260
  const { network, darkMode: isDark } = useVeChainKitConfig();
7576
7261
  const { account } = useWallet();
7577
- const fileInputRef = React9.useRef(null);
7578
- const [isUploading, setIsUploading] = React9.useState(false);
7579
- const [isProcessing, setIsProcessing] = React9.useState(false);
7580
- const [showFullText, setShowFullText] = React9.useState(false);
7262
+ const fileInputRef = React8.useRef(null);
7263
+ const [isUploading, setIsUploading] = React8.useState(false);
7264
+ const [isProcessing, setIsProcessing] = React8.useState(false);
7265
+ const [showFullText, setShowFullText] = React8.useState(false);
7581
7266
  const queryClient = reactQuery.useQueryClient();
7582
7267
  const { onUpload } = useSingleImageUpload({
7583
7268
  compressImage: true
@@ -7616,8 +7301,379 @@ var AccountCustomizationContent = ({ setCurrentContent }) => {
7616
7301
  } finally {
7617
7302
  setIsUploading(false);
7618
7303
  }
7619
- };
7620
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7304
+ };
7305
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7306
+ /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
7307
+ /* @__PURE__ */ jsxRuntime.jsx(
7308
+ react.ModalHeader,
7309
+ {
7310
+ fontSize: "md",
7311
+ fontWeight: "500",
7312
+ textAlign: "center",
7313
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7314
+ children: t("Customize Account")
7315
+ }
7316
+ ),
7317
+ /* @__PURE__ */ jsxRuntime.jsx(
7318
+ ModalBackButton,
7319
+ {
7320
+ onClick: () => setCurrentContent("settings")
7321
+ }
7322
+ ),
7323
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7324
+ ] }),
7325
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "center", children: [
7326
+ /* @__PURE__ */ jsxRuntime.jsxs(
7327
+ react.VStack,
7328
+ {
7329
+ spacing: 3,
7330
+ w: "full",
7331
+ justifyContent: "flex-start",
7332
+ alignItems: "flex-start",
7333
+ children: [
7334
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7335
+ "Customize your account with a unique .vet domain name and profile image to enhance your identity across VeChain applications."
7336
+ ) }),
7337
+ showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7338
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7339
+ "Your customizations are linked to your .vet domain name, making them portable across different applications."
7340
+ ) }),
7341
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7342
+ "To get started with customization, first secure your .vet domain name. Once you have a domain, you can add a profile image that will be visible wherever you use your account."
7343
+ ) }),
7344
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7345
+ "Changing your domain name will update also your profile image."
7346
+ ) })
7347
+ ] }),
7348
+ /* @__PURE__ */ jsxRuntime.jsx(
7349
+ react.Button,
7350
+ {
7351
+ mt: 0,
7352
+ variant: "link",
7353
+ size: "sm",
7354
+ onClick: () => setShowFullText(!showFullText),
7355
+ color: "blue.500",
7356
+ textAlign: "left",
7357
+ children: t(showFullText ? "Show Less" : "Read More")
7358
+ }
7359
+ )
7360
+ ]
7361
+ }
7362
+ ),
7363
+ /* @__PURE__ */ jsxRuntime.jsx(
7364
+ ActionButton,
7365
+ {
7366
+ style: {
7367
+ mt: 3
7368
+ },
7369
+ title: account?.domain ? account?.domain : t("Choose account name"),
7370
+ description: t(
7371
+ "Choose a unique .vet domain name for your account."
7372
+ ),
7373
+ onClick: () => {
7374
+ if (account?.domain) {
7375
+ setCurrentContent({
7376
+ type: "choose-name-search",
7377
+ props: {
7378
+ name: "",
7379
+ setCurrentContent
7380
+ }
7381
+ });
7382
+ } else {
7383
+ setCurrentContent("choose-name");
7384
+ }
7385
+ },
7386
+ leftIcon: fa.FaRegAddressCard,
7387
+ rightIcon: md.MdOutlineNavigateNext
7388
+ }
7389
+ ),
7390
+ /* @__PURE__ */ jsxRuntime.jsx(
7391
+ ActionButton,
7392
+ {
7393
+ title: t("Update profile image"),
7394
+ description: t(
7395
+ !account?.domain ? "You can change your profile image only after you setup your domain name." : "Customize your account by adding a profile image, which will be displayed on the apps you use."
7396
+ ),
7397
+ onClick: () => fileInputRef.current?.click(),
7398
+ leftImage: account?.image,
7399
+ isLoading: isUploading || isProcessing,
7400
+ isDisabled: !account?.domain,
7401
+ loadingText: isUploading ? t("Uploading image") : t("Setting image")
7402
+ }
7403
+ ),
7404
+ /* @__PURE__ */ jsxRuntime.jsx(
7405
+ "input",
7406
+ {
7407
+ type: "file",
7408
+ ref: fileInputRef,
7409
+ hidden: true,
7410
+ accept: "image/*",
7411
+ onChange: async (event) => await handleImageUpload(event)
7412
+ }
7413
+ )
7414
+ ] }) })
7415
+ ] });
7416
+ };
7417
+ var NetworkInfo = () => {
7418
+ const { t } = reactI18next.useTranslation();
7419
+ const { darkMode: isDark, network } = useVeChainKitConfig();
7420
+ const { connection, smartAccount } = useWallet();
7421
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7422
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7423
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7424
+ t("Connection Type"),
7425
+ ":"
7426
+ ] }),
7427
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: connection.source.type })
7428
+ ] }),
7429
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7430
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7431
+ t("Network"),
7432
+ ":"
7433
+ ] }),
7434
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.type })
7435
+ ] }),
7436
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7437
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7438
+ t("Node URL"),
7439
+ ":"
7440
+ ] }),
7441
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: network.nodeUrl || chunkEO3CLT4E_cjs.getConfig(network.type).nodeUrl })
7442
+ ] }),
7443
+ connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7444
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7445
+ t("Smart Account"),
7446
+ ":"
7447
+ ] }),
7448
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: smartAccount.version ? `v${smartAccount.version}` : "v1" })
7449
+ ] }) : smartAccount.isDeployed && /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7450
+ /* @__PURE__ */ jsxRuntime.jsxs(
7451
+ react.Text,
7452
+ {
7453
+ fontSize: "sm",
7454
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7455
+ children: [
7456
+ t("Smart Account"),
7457
+ ":"
7458
+ ]
7459
+ }
7460
+ ),
7461
+ /* @__PURE__ */ jsxRuntime.jsx(
7462
+ react.Text,
7463
+ {
7464
+ fontSize: "sm",
7465
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7466
+ children: smartAccount.version ? `v${smartAccount.version}` : "v1"
7467
+ }
7468
+ )
7469
+ ] }),
7470
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7471
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: [
7472
+ t("VeChain Kit"),
7473
+ ":"
7474
+ ] }),
7475
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: isDark ? "#dfdfdd" : "#4d4d4d", children: package_default.version })
7476
+ ] })
7477
+ ] });
7478
+ };
7479
+ var CrossAppConnectionCard = ({ connectionCache }) => {
7480
+ const { t } = reactI18next.useTranslation();
7481
+ const { darkMode: isDark } = useVeChainKitConfig();
7482
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: connectionCache.ecosystemApp && /* @__PURE__ */ jsxRuntime.jsxs(
7483
+ react.VStack,
7484
+ {
7485
+ p: 4,
7486
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
7487
+ borderRadius: "xl",
7488
+ spacing: 4,
7489
+ w: "full",
7490
+ children: [
7491
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7492
+ /* @__PURE__ */ jsxRuntime.jsxs(
7493
+ react.Text,
7494
+ {
7495
+ fontSize: "sm",
7496
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7497
+ children: [
7498
+ t("Logged in with"),
7499
+ ":"
7500
+ ]
7501
+ }
7502
+ ),
7503
+ /* @__PURE__ */ jsxRuntime.jsx(
7504
+ react.Text,
7505
+ {
7506
+ fontSize: "sm",
7507
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7508
+ children: connectionCache.ecosystemApp.name
7509
+ }
7510
+ )
7511
+ ] }),
7512
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7513
+ /* @__PURE__ */ jsxRuntime.jsxs(
7514
+ react.Text,
7515
+ {
7516
+ fontSize: "sm",
7517
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7518
+ children: [
7519
+ t("Connected at"),
7520
+ ":"
7521
+ ]
7522
+ }
7523
+ ),
7524
+ /* @__PURE__ */ jsxRuntime.jsx(
7525
+ react.Text,
7526
+ {
7527
+ fontSize: "sm",
7528
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7529
+ children: new Date(
7530
+ connectionCache.timestamp
7531
+ ).toLocaleString()
7532
+ }
7533
+ )
7534
+ ] }),
7535
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7536
+ ]
7537
+ }
7538
+ ) });
7539
+ };
7540
+ var DappKitConnectionCard = () => {
7541
+ const { t } = reactI18next.useTranslation();
7542
+ const { source } = dappKitReact.useWallet();
7543
+ const { darkMode: isDark } = useVeChainKitConfig();
7544
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: source && /* @__PURE__ */ jsxRuntime.jsxs(
7545
+ react.VStack,
7546
+ {
7547
+ p: 4,
7548
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
7549
+ borderRadius: "xl",
7550
+ spacing: 4,
7551
+ w: "full",
7552
+ justifyContent: "space-between",
7553
+ children: [
7554
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7555
+ /* @__PURE__ */ jsxRuntime.jsxs(
7556
+ react.Text,
7557
+ {
7558
+ fontSize: "sm",
7559
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7560
+ children: [
7561
+ t("Logged in with"),
7562
+ ":"
7563
+ ]
7564
+ }
7565
+ ),
7566
+ /* @__PURE__ */ jsxRuntime.jsx(
7567
+ react.Text,
7568
+ {
7569
+ fontSize: "sm",
7570
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7571
+ children: source
7572
+ }
7573
+ )
7574
+ ] }),
7575
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7576
+ ]
7577
+ }
7578
+ ) });
7579
+ };
7580
+ var PrivyConnectionCard = () => {
7581
+ const { t } = reactI18next.useTranslation();
7582
+ const { privy, darkMode: isDark } = useVeChainKitConfig();
7583
+ const { data: appInfo, isLoading } = useFetchAppInfo(privy?.appId ?? "");
7584
+ if (isLoading)
7585
+ return /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { w: "full", h: "full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, {}) });
7586
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: appInfo && /* @__PURE__ */ jsxRuntime.jsxs(
7587
+ react.VStack,
7588
+ {
7589
+ p: 4,
7590
+ bg: isDark ? "#1a1a1a" : "#f5f5f5",
7591
+ borderRadius: "xl",
7592
+ spacing: 4,
7593
+ w: "full",
7594
+ justifyContent: "space-between",
7595
+ children: [
7596
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { w: "full", justifyContent: "space-between", children: [
7597
+ /* @__PURE__ */ jsxRuntime.jsxs(
7598
+ react.Text,
7599
+ {
7600
+ fontSize: "sm",
7601
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7602
+ children: [
7603
+ t("Logged in with"),
7604
+ ":"
7605
+ ]
7606
+ }
7607
+ ),
7608
+ /* @__PURE__ */ jsxRuntime.jsx(
7609
+ react.Text,
7610
+ {
7611
+ fontSize: "sm",
7612
+ color: isDark ? "#dfdfdd" : "#4d4d4d",
7613
+ children: Object.values(appInfo)[0].name
7614
+ }
7615
+ )
7616
+ ] }),
7617
+ /* @__PURE__ */ jsxRuntime.jsx(NetworkInfo, {})
7618
+ ]
7619
+ }
7620
+ ) });
7621
+ };
7622
+ var WalletSecuredBy = () => {
7623
+ const { connection } = useWallet();
7624
+ const { t } = reactI18next.useTranslation();
7625
+ const { darkMode: isDark, privy } = useVeChainKitConfig();
7626
+ const { getConnectionCache } = useCrossAppConnectionCache();
7627
+ const connectionCache = getConnectionCache();
7628
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7629
+ react.VStack,
7630
+ {
7631
+ w: "full",
7632
+ align: "stretch",
7633
+ textAlign: "center",
7634
+ mt: 5,
7635
+ p: 3,
7636
+ borderRadius: "lg",
7637
+ bg: isDark ? "whiteAlpha.100" : "blackAlpha.50",
7638
+ shadow: "sm",
7639
+ children: [
7640
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xs", fontWeight: "800", children: t("Wallet secured by") }),
7641
+ /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "center", children: [
7642
+ /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.PrivyLogo, { isDark, w: "50px" }),
7643
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: pi.PiLineVertical, ml: 2 }),
7644
+ connection.isConnectedWithVeChain ? /* @__PURE__ */ jsxRuntime.jsx(chunkX4PAU76A_cjs.VechainLogoHorizontal, { isDark, w: "69px" }) : connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(
7645
+ react.Image,
7646
+ {
7647
+ src: connectionCache.ecosystemApp.logoUrl,
7648
+ alt: connectionCache.ecosystemApp.name,
7649
+ maxW: "40px",
7650
+ borderRadius: "md"
7651
+ }
7652
+ ),
7653
+ connection.isConnectedWithSocialLogin && !connection.isConnectedWithVeChain && /* @__PURE__ */ jsxRuntime.jsx(
7654
+ react.Image,
7655
+ {
7656
+ src: privy?.appearance.logo,
7657
+ alt: privy?.appearance.logo,
7658
+ maxW: "40px",
7659
+ borderRadius: "md"
7660
+ }
7661
+ )
7662
+ ] })
7663
+ ]
7664
+ }
7665
+ );
7666
+ };
7667
+ var EmbeddedWalletContent = ({ setCurrentContent }) => {
7668
+ const { t } = reactI18next.useTranslation();
7669
+ const { connectedWallet, connection } = useWallet();
7670
+ const [showFullText, setShowFullText] = React8.useState(false);
7671
+ const walletImage = chunkEO3CLT4E_cjs.getPicassoImage(connectedWallet?.address ?? "");
7672
+ const { getConnectionCache } = useCrossAppConnectionCache();
7673
+ const connectionCache = getConnectionCache();
7674
+ const { darkMode: isDark } = useVeChainKitConfig();
7675
+ const { exportWallet } = reactAuth.usePrivy();
7676
+ return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
7621
7677
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
7622
7678
  /* @__PURE__ */ jsxRuntime.jsx(
7623
7679
  react.ModalHeader,
@@ -7626,38 +7682,49 @@ var AccountCustomizationContent = ({ setCurrentContent }) => {
7626
7682
  fontWeight: "500",
7627
7683
  textAlign: "center",
7628
7684
  color: isDark ? "#dfdfdd" : "#4d4d4d",
7629
- children: t("Customize Account")
7685
+ children: t("Embedded wallet")
7630
7686
  }
7631
7687
  ),
7632
7688
  /* @__PURE__ */ jsxRuntime.jsx(
7633
7689
  ModalBackButton,
7634
7690
  {
7635
- onClick: () => setCurrentContent("settings")
7691
+ onClick: () => setCurrentContent("access-and-security")
7636
7692
  }
7637
7693
  ),
7638
7694
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
7639
7695
  ] }),
7640
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "center", children: [
7641
- /* @__PURE__ */ jsxRuntime.jsxs(
7642
- react.VStack,
7643
- {
7644
- spacing: 3,
7645
- w: "full",
7646
- justifyContent: "flex-start",
7647
- alignItems: "flex-start",
7648
- children: [
7696
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(
7697
+ react.VStack,
7698
+ {
7699
+ justify: "center",
7700
+ spacing: 3,
7701
+ align: "flex-start",
7702
+ w: "full",
7703
+ children: [
7704
+ /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { justify: "center", align: "center", w: "full", children: [
7705
+ /* @__PURE__ */ jsxRuntime.jsx(
7706
+ react.Image,
7707
+ {
7708
+ src: walletImage,
7709
+ maxW: "100px",
7710
+ borderRadius: "50%"
7711
+ }
7712
+ ),
7713
+ /* @__PURE__ */ jsxRuntime.jsx(AddressDisplay, { wallet: connectedWallet })
7714
+ ] }),
7715
+ connection.isConnectedWithCrossApp && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7649
7716
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7650
- "Customize your account with a unique .vet domain name and profile image to enhance your identity across VeChain applications."
7717
+ "This is your main wallet, created by {{element}} and secured by Privy.",
7718
+ {
7719
+ element: connectionCache?.ecosystemApp?.name
7720
+ }
7651
7721
  ) }),
7652
7722
  showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7653
7723
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7654
- "Your customizations are linked to your .vet domain name, making them portable across different applications."
7655
- ) }),
7656
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7657
- "To get started with customization, first secure your .vet domain name. Once you have a domain, you can add a profile image that will be visible wherever you use your account."
7724
+ "This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions."
7658
7725
  ) }),
7659
7726
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7660
- "Changing your domain name will update also your profile image."
7727
+ "Please be sure to keep this wallet safe and backed up."
7661
7728
  ) })
7662
7729
  ] }),
7663
7730
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7672,60 +7739,89 @@ var AccountCustomizationContent = ({ setCurrentContent }) => {
7672
7739
  children: t(showFullText ? "Show Less" : "Read More")
7673
7740
  }
7674
7741
  )
7675
- ]
7676
- }
7677
- ),
7678
- /* @__PURE__ */ jsxRuntime.jsx(
7679
- ActionButton,
7680
- {
7681
- style: {
7682
- mt: 3
7683
- },
7684
- title: account?.domain ? account?.domain : t("Choose account name"),
7685
- description: t(
7686
- "Choose a unique .vet domain name for your account."
7687
- ),
7688
- onClick: () => {
7689
- if (account?.domain) {
7690
- setCurrentContent({
7691
- type: "choose-name-search",
7692
- props: {
7693
- name: "",
7694
- setCurrentContent
7695
- }
7696
- });
7697
- } else {
7698
- setCurrentContent("choose-name");
7742
+ ] }),
7743
+ connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7744
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7745
+ "You are using an Embedded Wallet secured by your social login method, ensuring a seamless VeChain experience."
7746
+ ) }),
7747
+ showFullText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7748
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", opacity: 0.5, children: t(
7749
+ "This wallet is the owner of your smart account, which is used as your identity and as a gateway for your blockchain interactions."
7750
+ ) }),
7751
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
7752
+ t(
7753
+ "We highly recommend exporting your private key to back up your wallet. This ensures you can restore it if needed or transfer it to self-custody using"
7754
+ ),
7755
+ /* @__PURE__ */ jsxRuntime.jsxs(
7756
+ react.Link,
7757
+ {
7758
+ href: "https://www.veworld.net/",
7759
+ isExternal: true,
7760
+ color: "gray.500",
7761
+ fontSize: "14px",
7762
+ textDecoration: "underline",
7763
+ children: [
7764
+ " ",
7765
+ t("VeWorld Wallet"),
7766
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { ml: 1, as: io5.IoOpenOutline })
7767
+ ]
7768
+ }
7769
+ ),
7770
+ "."
7771
+ ] }),
7772
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "sm", opacity: 0.5, children: [
7773
+ t("Click"),
7774
+ " ",
7775
+ /* @__PURE__ */ jsxRuntime.jsx(
7776
+ react.Link,
7777
+ {
7778
+ href: "https://docs.vechain-kit.vechain.org/vechain-kit/embedded-wallets",
7779
+ isExternal: true,
7780
+ color: "gray.500",
7781
+ fontSize: "14px",
7782
+ textDecoration: "underline",
7783
+ children: t("here")
7784
+ }
7785
+ ),
7786
+ " ",
7787
+ t(
7788
+ "to learn more about embedded wallets."
7789
+ )
7790
+ ] })
7791
+ ] }),
7792
+ /* @__PURE__ */ jsxRuntime.jsx(
7793
+ react.Button,
7794
+ {
7795
+ mt: 0,
7796
+ variant: "link",
7797
+ size: "sm",
7798
+ onClick: () => setShowFullText(!showFullText),
7799
+ color: "blue.500",
7800
+ textAlign: "left",
7801
+ children: t(showFullText ? "Show Less" : "Read More")
7802
+ }
7803
+ )
7804
+ ] }),
7805
+ /* @__PURE__ */ jsxRuntime.jsx(
7806
+ ActionButton,
7807
+ {
7808
+ title: t("Backup your wallet"),
7809
+ description: t(
7810
+ 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."
7811
+ ),
7812
+ onClick: () => {
7813
+ exportWallet();
7814
+ },
7815
+ isDisabled: !connection.isConnectedWithSocialLogin,
7816
+ leftIcon: gi.GiHouseKeys
7699
7817
  }
7700
- },
7701
- leftIcon: fa.FaRegAddressCard,
7702
- rightIcon: md.MdOutlineNavigateNext
7703
- }
7704
- ),
7705
- /* @__PURE__ */ jsxRuntime.jsx(
7706
- ActionButton,
7707
- {
7708
- title: t("Update profile image"),
7709
- description: t(
7710
- !account?.domain ? "You can change your profile image only after you setup your domain name." : "Customize your account by adding a profile image, which will be displayed on the apps you use."
7711
- ),
7712
- onClick: () => fileInputRef.current?.click(),
7713
- leftImage: account?.image,
7714
- isLoading: isUploading || isProcessing,
7715
- isDisabled: !account?.domain,
7716
- loadingText: isUploading ? t("Uploading image") : t("Setting image")
7717
- }
7718
- ),
7719
- /* @__PURE__ */ jsxRuntime.jsx(
7720
- "input",
7721
- {
7722
- type: "file",
7723
- ref: fileInputRef,
7724
- hidden: true,
7725
- accept: "image/*",
7726
- onChange: async (event) => await handleImageUpload(event)
7727
- }
7728
- )
7818
+ )
7819
+ ]
7820
+ }
7821
+ ) }),
7822
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalFooter, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { w: "full", children: [
7823
+ /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
7824
+ connection.isConnectedWithPrivy && /* @__PURE__ */ jsxRuntime.jsx(WalletSecuredBy, {})
7729
7825
  ] }) })
7730
7826
  ] });
7731
7827
  };
@@ -7736,7 +7832,7 @@ var SelectTokenContent = ({ onSelectToken, onBack }) => {
7736
7832
  const { balances, prices } = useBalances({
7737
7833
  address: account?.address ?? ""
7738
7834
  });
7739
- const [searchQuery, setSearchQuery] = React9.useState("");
7835
+ const [searchQuery, setSearchQuery] = React8.useState("");
7740
7836
  const { network } = useVeChainKitConfig();
7741
7837
  const tokens = [
7742
7838
  {
@@ -7872,23 +7968,23 @@ var SendTokenContent = ({
7872
7968
  }) => {
7873
7969
  const { t } = reactI18next.useTranslation();
7874
7970
  const { darkMode: isDark } = useVeChainKitConfig();
7875
- const [toAddressOrDomain, setToAddress] = React9.useState("");
7876
- const [amount, setAmount] = React9.useState("");
7877
- const [error, setError] = React9.useState(null);
7878
- const [isSelectingToken, setIsSelectingToken] = React9.useState(
7971
+ const [toAddressOrDomain, setToAddress] = React8.useState("");
7972
+ const [amount, setAmount] = React8.useState("");
7973
+ const [error, setError] = React8.useState(null);
7974
+ const [isSelectingToken, setIsSelectingToken] = React8.useState(
7879
7975
  isNavigatingFromMain && !preselectedToken
7880
7976
  );
7881
- const [selectedToken, setSelectedToken] = React9.useState(
7977
+ const [selectedToken, setSelectedToken] = React8.useState(
7882
7978
  preselectedToken ?? null
7883
7979
  );
7884
- const [addressError, setAddressError] = React9.useState(null);
7885
- const [isInitialTokenSelection, setIsInitialTokenSelection] = React9.useState(isNavigatingFromMain);
7980
+ const [addressError, setAddressError] = React8.useState(null);
7981
+ const [isInitialTokenSelection, setIsInitialTokenSelection] = React8.useState(isNavigatingFromMain);
7886
7982
  const {
7887
7983
  domain: resolvedDomain,
7888
7984
  address: resolvedAddress,
7889
7985
  isLoading: isLoadingDomain
7890
7986
  } = dappKitReact.useVechainDomain({ addressOrDomain: toAddressOrDomain });
7891
- const validateAddress = React9.useCallback(
7987
+ const validateAddress = React8.useCallback(
7892
7988
  (value) => {
7893
7989
  if (!value) {
7894
7990
  setAddressError(t("Address is required"));
@@ -8202,7 +8298,7 @@ var SendTokenSummaryContent = ({
8202
8298
  const transactionModal = react.useDisclosure();
8203
8299
  const { data: avatar } = useGetAvatar(resolvedDomain);
8204
8300
  const { network } = useVeChainKitConfig();
8205
- const toImageSrc = React9.useMemo(() => {
8301
+ const toImageSrc = React8.useMemo(() => {
8206
8302
  if (avatar) {
8207
8303
  return chunkEO3CLT4E_cjs.convertUriToUrl(avatar, network.type);
8208
8304
  }
@@ -8647,11 +8743,11 @@ var ChooseNameSearchContent = ({
8647
8743
  const { t } = reactI18next.useTranslation();
8648
8744
  const { account } = useWallet();
8649
8745
  const { darkMode: isDark } = useVeChainKitConfig();
8650
- const [name, setName] = React9.useState(initialName);
8651
- const [error, setError] = React9.useState(null);
8652
- const [isOwnDomain, setIsOwnDomain] = React9.useState(false);
8653
- const [isAvailable, setIsAvailable] = React9.useState(false);
8654
- const [hasInteracted, setHasInteracted] = React9.useState(false);
8746
+ const [name, setName] = React8.useState(initialName);
8747
+ const [error, setError] = React8.useState(null);
8748
+ const [isOwnDomain, setIsOwnDomain] = React8.useState(false);
8749
+ const [isAvailable, setIsAvailable] = React8.useState(false);
8750
+ const [hasInteracted, setHasInteracted] = React8.useState(false);
8655
8751
  const { data: ensRecordExists, isLoading: isEnsCheckLoading } = useEnsRecordExists(name);
8656
8752
  const { data: domainInfo, isLoading: isDomainInfoLoading } = useVechainDomain(`${name}.veworld.vet`);
8657
8753
  const { data: isProtected, isLoading: isProtectedLoading } = useIsDomainProtected(name);
@@ -8669,7 +8765,7 @@ var ChooseNameSearchContent = ({
8669
8765
  ...veworldDomainsOfAddress?.domains || [],
8670
8766
  ...vetDomainsOfAddress?.domains || []
8671
8767
  ];
8672
- React9.useEffect(() => {
8768
+ React8.useEffect(() => {
8673
8769
  if (!hasInteracted) return;
8674
8770
  if (name.length < 3) {
8675
8771
  setError(t("Name must be at least 3 characters long"));
@@ -8836,8 +8932,8 @@ var ConfirmationModalContent = ({
8836
8932
  const { t } = reactI18next.useTranslation();
8837
8933
  const { connection } = useWallet();
8838
8934
  const { darkMode: isDark } = useVeChainKitConfig();
8839
- const [showTimeout, setShowTimeout] = React9.useState(false);
8840
- React9.useEffect(() => {
8935
+ const [showTimeout, setShowTimeout] = React8.useState(false);
8936
+ React8.useEffect(() => {
8841
8937
  setShowTimeout(false);
8842
8938
  const timer = setTimeout(() => {
8843
8939
  setShowTimeout(true);
@@ -9024,8 +9120,8 @@ var LoadingModalContent = ({
9024
9120
  const { network } = useVeChainKitConfig();
9025
9121
  const { darkMode: isDark } = useVeChainKitConfig();
9026
9122
  const explorerUrl = chunkEO3CLT4E_cjs.getConfig(network.type).explorerUrl;
9027
- const [showTimeout, setShowTimeout] = React9.useState(false);
9028
- React9.useEffect(() => {
9123
+ const [showTimeout, setShowTimeout] = React8.useState(false);
9124
+ React8.useEffect(() => {
9029
9125
  const timer = setTimeout(() => {
9030
9126
  setShowTimeout(true);
9031
9127
  }, 12e3);
@@ -9236,7 +9332,7 @@ var TransactionModal = ({
9236
9332
  txId,
9237
9333
  progress
9238
9334
  }) => {
9239
- const modalContent = React9.useMemo(() => {
9335
+ const modalContent = React8.useMemo(() => {
9240
9336
  if (status === "pending")
9241
9337
  return /* @__PURE__ */ jsxRuntime.jsx(
9242
9338
  ConfirmationModalContent,
@@ -9417,7 +9513,7 @@ var ChooseNameSummaryContent = ({
9417
9513
  var FAQAccordion = () => {
9418
9514
  const { t } = reactI18next.useTranslation();
9419
9515
  const { darkMode: isDark } = useVeChainKitConfig();
9420
- const [searchQuery, setSearchQuery] = React9.useState("");
9516
+ const [searchQuery, setSearchQuery] = React8.useState("");
9421
9517
  const faqItems = [
9422
9518
  {
9423
9519
  question: t("What is VeChain?"),
@@ -9908,7 +10004,18 @@ var en_default = {
9908
10004
  "{{element}} website": "{{element}} website",
9909
10005
  "{{name}}": "{{name}}",
9910
10006
  "Sending to OceanX or other exchanges may result in loss of funds.": "Sending to OceanX or other exchanges may result in loss of funds.",
9911
- "Send the tokens to your VeWorld wallet first.": "Send the tokens to your VeWorld wallet first."
10007
+ "Send the tokens to your VeWorld wallet first.": "Send the tokens to your VeWorld wallet first.",
10008
+ "Sign in with a wallet from other x2earn apps.": "Sign in with a wallet from other x2earn apps.",
10009
+ "Select an app": "Select an app",
10010
+ Other: "Other",
10011
+ Apps: "Apps",
10012
+ "View your notifications and updates.": "View your notifications and updates.",
10013
+ "Access and security": "Access and security",
10014
+ "Connection details": "Connection details",
10015
+ "Customize profile": "Customize profile",
10016
+ Help: "Help",
10017
+ "Add Passkey": "Add Passkey",
10018
+ "Embedded wallet": "Embedded wallet"
9912
10019
  };
9913
10020
 
9914
10021
  // src/languages/de.json
@@ -12021,7 +12128,7 @@ var FAQContent = ({ onGoBack }) => {
12021
12128
  fontWeight: "500",
12022
12129
  textAlign: "center",
12023
12130
  color: isDark ? "#dfdfdd" : "#4d4d4d",
12024
- children: t("Info")
12131
+ children: t("Help")
12025
12132
  }
12026
12133
  ),
12027
12134
  /* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: onGoBack }),
@@ -12107,7 +12214,6 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
12107
12214
  const { getConnectionCache } = useCrossAppConnectionCache();
12108
12215
  const { privy, darkMode: isDark } = useVeChainKitConfig();
12109
12216
  const { connection } = useWallet();
12110
- const { source } = dappKitReact.useWallet();
12111
12217
  const { data: appInfo } = useFetchAppInfo(privy?.appId ?? "");
12112
12218
  const connectionCache = getConnectionCache();
12113
12219
  return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
@@ -12135,23 +12241,7 @@ var ConnectionDetailsContent = ({ onGoBack }) => {
12135
12241
  /* @__PURE__ */ jsxRuntime.jsxs(react.ModalBody, { w: "full", children: [
12136
12242
  connection.isConnectedWithCrossApp && connectionCache && /* @__PURE__ */ jsxRuntime.jsx(CrossAppConnectionCard, { connectionCache }),
12137
12243
  connection.isConnectedWithSocialLogin && /* @__PURE__ */ jsxRuntime.jsx(PrivyConnectionCard, {}),
12138
- connection.isConnectedWithDappKit && /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { align: "stretch", textAlign: "center", mt: 5, children: [
12139
- /* @__PURE__ */ jsxRuntime.jsx(DappKitConnectionCard, {}),
12140
- /* @__PURE__ */ jsxRuntime.jsx(
12141
- react.Text,
12142
- {
12143
- fontSize: "sm",
12144
- opacity: 0.5,
12145
- textAlign: "center",
12146
- children: t(
12147
- "This is your main wallet and identity. Please be sure to keep it safe and backed up. Go to {{element}} app or extension to manage your security settings.",
12148
- {
12149
- element: source
12150
- }
12151
- )
12152
- }
12153
- )
12154
- ] }),
12244
+ connection.isConnectedWithDappKit && /* @__PURE__ */ jsxRuntime.jsx(react.VStack, { align: "stretch", textAlign: "center", mt: 5, children: /* @__PURE__ */ jsxRuntime.jsx(DappKitConnectionCard, {}) }),
12155
12245
  (connection.isConnectedWithSocialLogin || connection.isConnectedWithCrossApp) && /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, mt: 5, children: [
12156
12246
  /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
12157
12247
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -12252,10 +12342,10 @@ var ConfirmUnlink = ({
12252
12342
  var PrivyLinkedAccounts = ({ onBack }) => {
12253
12343
  const { t } = reactI18next.useTranslation();
12254
12344
  const { darkMode: isDark } = useVeChainKitConfig();
12255
- const [unlinkingAccount, setUnlinkingAccount] = React9.useState(null);
12256
- const [showLinkOptions, setShowLinkOptions] = React9.useState(false);
12257
- const [showFullText, setShowFullText] = React9.useState(false);
12258
- const [isLoadingUnlink, setIsLoadingUnlink] = React9.useState(false);
12345
+ const [unlinkingAccount, setUnlinkingAccount] = React8.useState(null);
12346
+ const [showLinkOptions, setShowLinkOptions] = React8.useState(false);
12347
+ const [showFullText, setShowFullText] = React8.useState(false);
12348
+ const [isLoadingUnlink, setIsLoadingUnlink] = React8.useState(false);
12259
12349
  const {
12260
12350
  user,
12261
12351
  linkEmail,
@@ -12423,22 +12513,7 @@ var PrivyLinkedAccounts = ({ onBack }) => {
12423
12513
  ),
12424
12514
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
12425
12515
  ] }),
12426
- /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "stretch", children: [
12427
- /* @__PURE__ */ jsxRuntime.jsx(
12428
- ActionButton,
12429
- {
12430
- title: t("Handle Passkey Login"),
12431
- description: t(
12432
- "Enable one click login by adding a passkey to your account."
12433
- ),
12434
- onClick: () => {
12435
- linkPasskey();
12436
- },
12437
- leftIcon: io.IoIosFingerPrint,
12438
- rightIcon: void 0,
12439
- isDisabled: !privy?.allowPasskeyLinking
12440
- }
12441
- ),
12516
+ /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 3, align: "stretch", w: "full", children: [
12442
12517
  canLinkGoogle && /* @__PURE__ */ jsxRuntime.jsx(
12443
12518
  ActionButton,
12444
12519
  {
@@ -12815,9 +12890,9 @@ var NotificationsContent = ({ setCurrentContent }) => {
12815
12890
  clearAllNotifications,
12816
12891
  markAsRead
12817
12892
  } = useNotifications();
12818
- const [isArchiveView, setIsArchiveView] = React9.useState(false);
12819
- const [notifications, setNotifications] = React9.useState(getNotifications());
12820
- const [archivedNotifications, setArchivedNotifications] = React9.useState(
12893
+ const [isArchiveView, setIsArchiveView] = React8.useState(false);
12894
+ const [notifications, setNotifications] = React8.useState(getNotifications());
12895
+ const [archivedNotifications, setArchivedNotifications] = React8.useState(
12821
12896
  getArchivedNotifications()
12822
12897
  );
12823
12898
  const handleClearAll = () => {
@@ -12846,9 +12921,14 @@ var NotificationsContent = ({ setCurrentContent }) => {
12846
12921
  if (b.id === "multiclause") return 1;
12847
12922
  return b.timestamp - a.timestamp;
12848
12923
  });
12849
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
12924
+ return /* @__PURE__ */ jsxRuntime.jsxs(ScrollToTopWrapper, { children: [
12850
12925
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
12851
- /* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
12926
+ /* @__PURE__ */ jsxRuntime.jsx(
12927
+ ModalBackButton,
12928
+ {
12929
+ onClick: () => setCurrentContent("settings")
12930
+ }
12931
+ ),
12852
12932
  /* @__PURE__ */ jsxRuntime.jsx(
12853
12933
  react.ModalHeader,
12854
12934
  {
@@ -12861,7 +12941,7 @@ var NotificationsContent = ({ setCurrentContent }) => {
12861
12941
  ),
12862
12942
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalCloseButton, {})
12863
12943
  ] }),
12864
- /* @__PURE__ */ jsxRuntime.jsxs(react.Container, { maxW: "container.lg", h: "350px", children: [
12944
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Container, { maxW: "container.lg", h: ["auto", "540px"], children: [
12865
12945
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalBody, { w: "full", children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, align: "stretch", w: "full", children: [
12866
12946
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { justify: "space-between", children: [
12867
12947
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13066,7 +13146,7 @@ var DEFAULT_APPS = [
13066
13146
  var ExploreEcosystemContent = ({ setCurrentContent }) => {
13067
13147
  const { t } = reactI18next.useTranslation();
13068
13148
  const { darkMode: isDark, network } = useVeChainKitConfig();
13069
- const [searchQuery, setSearchQuery] = React9.useState("");
13149
+ const [searchQuery, setSearchQuery] = React8.useState("");
13070
13150
  const { data: currentRoundId } = useCurrentAllocationsRoundId();
13071
13151
  const { data: vbdApps } = useMostVotedAppsInRound(
13072
13152
  currentRoundId ? (parseInt(currentRoundId) - 1).toString() : "1"
@@ -13088,7 +13168,7 @@ var ExploreEcosystemContent = ({ setCurrentContent }) => {
13088
13168
  fontWeight: "500",
13089
13169
  textAlign: "center",
13090
13170
  color: isDark ? "#dfdfdd" : "#4d4d4d",
13091
- children: t("VeChain Ecosystem")
13171
+ children: t("Apps")
13092
13172
  }
13093
13173
  ),
13094
13174
  /* @__PURE__ */ jsxRuntime.jsx(ModalBackButton, { onClick: () => setCurrentContent("main") }),
@@ -13294,8 +13374,8 @@ var AccountModal = ({
13294
13374
  }) => {
13295
13375
  useNotificationAlerts();
13296
13376
  const { account } = useWallet();
13297
- const [currentContent, setCurrentContent] = React9.useState(initialContent);
13298
- React9.useEffect(() => {
13377
+ const [currentContent, setCurrentContent] = React8.useState(initialContent);
13378
+ React8.useEffect(() => {
13299
13379
  if (isOpen && initialContent) {
13300
13380
  setCurrentContent(initialContent);
13301
13381
  }
@@ -13335,7 +13415,7 @@ var AccountModal = ({
13335
13415
  );
13336
13416
  case "settings":
13337
13417
  return /* @__PURE__ */ jsxRuntime.jsx(
13338
- WalletSettingsContent,
13418
+ SettingsContent,
13339
13419
  {
13340
13420
  setCurrentContent,
13341
13421
  onLogoutSuccess: onClose
@@ -13348,9 +13428,9 @@ var AccountModal = ({
13348
13428
  setCurrentContent
13349
13429
  }
13350
13430
  );
13351
- case "embedded-wallet":
13431
+ case "access-and-security":
13352
13432
  return /* @__PURE__ */ jsxRuntime.jsx(
13353
- EmbeddedWalletContent,
13433
+ AccessAndSecurityContent,
13354
13434
  {
13355
13435
  setCurrentContent
13356
13436
  }
@@ -13384,7 +13464,7 @@ var AccountModal = ({
13384
13464
  return /* @__PURE__ */ jsxRuntime.jsx(
13385
13465
  PrivyLinkedAccounts,
13386
13466
  {
13387
- onBack: () => setCurrentContent("embedded-wallet")
13467
+ onBack: () => setCurrentContent("access-and-security")
13388
13468
  }
13389
13469
  );
13390
13470
  case "ecosystem":
@@ -13401,6 +13481,13 @@ var AccountModal = ({
13401
13481
  setCurrentContent
13402
13482
  }
13403
13483
  );
13484
+ case "embedded-wallet":
13485
+ return /* @__PURE__ */ jsxRuntime.jsx(
13486
+ EmbeddedWalletContent,
13487
+ {
13488
+ setCurrentContent
13489
+ }
13490
+ );
13404
13491
  }
13405
13492
  };
13406
13493
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -13415,8 +13502,8 @@ var AccountModal = ({
13415
13502
  );
13416
13503
  };
13417
13504
  var ConnectModal = ({ isOpen, onClose }) => {
13418
- const [currentContent, setCurrentContent] = React9.useState("main");
13419
- React9.useEffect(() => {
13505
+ const [currentContent, setCurrentContent] = React8.useState("main");
13506
+ React8.useEffect(() => {
13420
13507
  if (isOpen) {
13421
13508
  setCurrentContent("main");
13422
13509
  }
@@ -13616,7 +13703,7 @@ var WalletButton = ({
13616
13703
  connectModal.onOpen();
13617
13704
  }
13618
13705
  };
13619
- React9.useEffect(() => {
13706
+ React8.useEffect(() => {
13620
13707
  const embeddedWallet = user?.wallet?.address;
13621
13708
  const asyncCreateWallet = async () => {
13622
13709
  try {
@@ -13710,7 +13797,7 @@ var TransactionToast = ({
13710
13797
  onClose();
13711
13798
  resetStatus();
13712
13799
  };
13713
- const toastContent = React9.useMemo(() => {
13800
+ const toastContent = React8.useMemo(() => {
13714
13801
  const config = statusConfig[status];
13715
13802
  if (!config) return null;
13716
13803
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -13835,9 +13922,9 @@ var LoadingContent = ({
13835
13922
  }) => {
13836
13923
  const { t } = reactI18next.useTranslation();
13837
13924
  const { darkMode: isDark } = useVeChainKitConfig();
13838
- const [showTimeout, setShowTimeout] = React9__default.default.useState(false);
13839
- const [showSafariMessage, setShowSafariMessage] = React9__default.default.useState(false);
13840
- React9__default.default.useEffect(() => {
13925
+ const [showTimeout, setShowTimeout] = React8__default.default.useState(false);
13926
+ const [showSafariMessage, setShowSafariMessage] = React8__default.default.useState(false);
13927
+ React8__default.default.useEffect(() => {
13841
13928
  if (reactDeviceDetect.isSafari) {
13842
13929
  setShowSafariMessage(true);
13843
13930
  }
@@ -13963,8 +14050,8 @@ var ErrorContent = ({
13963
14050
  var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
13964
14051
  const { t } = reactI18next.useTranslation();
13965
14052
  const { darkMode: isDark } = useVeChainKitConfig();
13966
- const [loginError, setLoginError] = React9.useState();
13967
- const [selectedApp, setSelectedApp] = React9.useState();
14053
+ const [loginError, setLoginError] = React8.useState();
14054
+ const [selectedApp, setSelectedApp] = React8.useState();
13968
14055
  const loginLoadingModal = react.useDisclosure();
13969
14056
  const { setConnectionCache } = useCrossAppConnectionCache();
13970
14057
  const { login: loginWithCrossApp } = usePrivyCrossAppSdk();
@@ -14023,8 +14110,8 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
14023
14110
  display: "flex",
14024
14111
  gap: 2,
14025
14112
  children: [
14026
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io5.IoPlanet, size: "20px" }),
14027
- t("Ecosystem Login")
14113
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: io.IoMdApps, size: "20px" }),
14114
+ t("Select an app")
14028
14115
  ]
14029
14116
  }
14030
14117
  ),
@@ -14039,9 +14126,7 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
14039
14126
  opacity: 0.5,
14040
14127
  mb: 4,
14041
14128
  textAlign: "center",
14042
- children: t(
14043
- "Use your existing VeChain wallet from other ecosystem apps to sign in seamlessly."
14044
- )
14129
+ children: t("Sign in with a wallet from other x2earn apps.")
14045
14130
  }
14046
14131
  ),
14047
14132
  isLoading && /* @__PURE__ */ jsxRuntime.jsx(
@@ -14158,16 +14243,14 @@ var initializeI18n = (i18nInstance) => {
14158
14243
  });
14159
14244
  };
14160
14245
  var DEFAULT_PRIVY_ECOSYSTEM_APP_IDS = [
14161
- "cm4wxxujb022fyujl7g0thb21",
14162
- //vechain
14163
14246
  "clz41gcg00e4ay75dmq3uzzgr",
14164
14247
  //cleanify
14165
14248
  "cm153hrup0817axti38avlfyg"
14166
14249
  //greencart
14167
14250
  ];
14168
- var VeChainKitContext = React9.createContext(null);
14251
+ var VeChainKitContext = React8.createContext(null);
14169
14252
  var useVeChainKitConfig = () => {
14170
- const context = React9.useContext(VeChainKitContext);
14253
+ const context = React8.useContext(VeChainKitContext);
14171
14254
  if (!context) {
14172
14255
  throw new Error("useVeChainKitConfig must be used within VeChainKit");
14173
14256
  }
@@ -14187,47 +14270,43 @@ var VeChainKitProvider = ({
14187
14270
  language = "en",
14188
14271
  network
14189
14272
  }) => {
14190
- const [isConnectModalOpen, setIsConnectModalOpen] = React9.useState(false);
14191
- const openConnectModal = React9.useCallback(() => setIsConnectModalOpen(true), []);
14192
- const closeConnectModal = React9.useCallback(
14273
+ const [isConnectModalOpen, setIsConnectModalOpen] = React8.useState(false);
14274
+ const openConnectModal = React8.useCallback(() => setIsConnectModalOpen(true), []);
14275
+ const closeConnectModal = React8.useCallback(
14193
14276
  () => setIsConnectModalOpen(false),
14194
14277
  []
14195
14278
  );
14196
- const [isAccountModalOpen, setIsAccountModalOpen] = React9.useState(false);
14197
- const openAccountModal = React9.useCallback(() => setIsAccountModalOpen(true), []);
14198
- const closeAccountModal = React9.useCallback(
14279
+ const [isAccountModalOpen, setIsAccountModalOpen] = React8.useState(false);
14280
+ const openAccountModal = React8.useCallback(() => setIsAccountModalOpen(true), []);
14281
+ const closeAccountModal = React8.useCallback(
14199
14282
  () => setIsAccountModalOpen(false),
14200
14283
  []
14201
14284
  );
14202
- const [isTransactionModalOpen, setIsTransactionModalOpen] = React9.useState(false);
14203
- const openTransactionModal = React9.useCallback(
14285
+ const [isTransactionModalOpen, setIsTransactionModalOpen] = React8.useState(false);
14286
+ const openTransactionModal = React8.useCallback(
14204
14287
  () => setIsTransactionModalOpen(true),
14205
14288
  []
14206
14289
  );
14207
- const closeTransactionModal = React9.useCallback(
14290
+ const closeTransactionModal = React8.useCallback(
14208
14291
  () => setIsTransactionModalOpen(false),
14209
14292
  []
14210
14293
  );
14211
- const [isTransactionToastOpen, setIsTransactionToastOpen] = React9.useState(false);
14212
- const openTransactionToast = React9.useCallback(
14294
+ const [isTransactionToastOpen, setIsTransactionToastOpen] = React8.useState(false);
14295
+ const openTransactionToast = React8.useCallback(
14213
14296
  () => setIsTransactionToastOpen(true),
14214
14297
  []
14215
14298
  );
14216
- const closeTransactionToast = React9.useCallback(
14299
+ const closeTransactionToast = React8.useCallback(
14217
14300
  () => setIsTransactionToastOpen(false),
14218
14301
  []
14219
14302
  );
14220
- const [accountModalContent, setAccountModalContent] = React9.useState("main");
14221
- const allowedEcosystemApps = React9.useMemo(() => {
14303
+ const [accountModalContent, setAccountModalContent] = React8.useState("main");
14304
+ const allowedEcosystemApps = React8.useMemo(() => {
14222
14305
  const userEcosystemMethods = loginMethods?.find(
14223
14306
  (method35) => method35.method === "ecosystem"
14224
14307
  );
14225
14308
  return userEcosystemMethods?.allowedApps ?? DEFAULT_PRIVY_ECOSYSTEM_APP_IDS;
14226
14309
  }, [loginMethods]);
14227
- const privyLoginMethods = [
14228
- ...privy?.loginMethods ?? [],
14229
- ...allowedEcosystemApps.map((appID) => `privy:${appID}`)
14230
- ];
14231
14310
  let privyAppId, privyClientId;
14232
14311
  if (!privy) {
14233
14312
  privyAppId = "clzdb5k0b02b9qvzjm6jpknsc";
@@ -14236,7 +14315,7 @@ var VeChainKitProvider = ({
14236
14315
  privyAppId = privy.appId;
14237
14316
  privyClientId = privy.clientId;
14238
14317
  }
14239
- React9.useEffect(() => {
14318
+ React8.useEffect(() => {
14240
14319
  initializeI18n(i18n_default);
14241
14320
  if (language) {
14242
14321
  i18n_default.changeLanguage(language);
@@ -14291,7 +14370,7 @@ var VeChainKitProvider = ({
14291
14370
  config: {
14292
14371
  loginMethodsAndOrder: {
14293
14372
  // @ts-ignore
14294
- primary: privyLoginMethods
14373
+ primary: privy?.loginMethods ?? []
14295
14374
  },
14296
14375
  appearance: {
14297
14376
  theme: darkMode ? "dark" : "light",
@@ -14580,7 +14659,7 @@ var VechainKitThemeProvider = ({
14580
14659
  children,
14581
14660
  darkMode = false
14582
14661
  }) => {
14583
- const theme = React9.useMemo(
14662
+ const theme = React8.useMemo(
14584
14663
  () => ({
14585
14664
  ...VechainKitTheme,
14586
14665
  config: {
@@ -14608,7 +14687,13 @@ Object.defineProperty(exports, "useConnex", {
14608
14687
  enumerable: true,
14609
14688
  get: function () { return dappKitReact.useConnex; }
14610
14689
  });
14690
+ Object.defineProperty(exports, "useDappKitWallet", {
14691
+ enumerable: true,
14692
+ get: function () { return dappKitReact.useWallet; }
14693
+ });
14611
14694
  exports.APP_SECURITY_LEVELS = APP_SECURITY_LEVELS;
14695
+ exports.AccessAndSecurityContent = AccessAndSecurityContent;
14696
+ exports.AccessAndSecurityModalProvider = AccessAndSecurityModalProvider;
14612
14697
  exports.AccountAvatar = AccountAvatar;
14613
14698
  exports.AccountCustomizationContent = AccountCustomizationContent;
14614
14699
  exports.AccountCustomizationModalProvider = AccountCustomizationModalProvider;
@@ -14636,7 +14721,6 @@ exports.EcosystemButton = EcosystemButton;
14636
14721
  exports.EcosystemModal = EcosystemModal;
14637
14722
  exports.EmailLoginButton = EmailLoginButton;
14638
14723
  exports.EmbeddedWalletContent = EmbeddedWalletContent;
14639
- exports.EmbeddedWalletSettingsModalProvider = EmbeddedWalletSettingsModalProvider;
14640
14724
  exports.ExchangeWarningAlert = ExchangeWarningAlert;
14641
14725
  exports.ExploreEcosystemModalProvider = ExploreEcosystemModalProvider;
14642
14726
  exports.FAQContent = FAQContent;
@@ -14657,6 +14741,7 @@ exports.PRICE_FEED_IDS = PRICE_FEED_IDS;
14657
14741
  exports.PasskeyLoginButton = PasskeyLoginButton;
14658
14742
  exports.PrivyButton = PrivyButton;
14659
14743
  exports.PrivyWalletProvider = PrivyWalletProvider;
14744
+ exports.Profile = Profile;
14660
14745
  exports.QuickActionsSection = QuickActionsSection;
14661
14746
  exports.ReceiveModalProvider = ReceiveModalProvider;
14662
14747
  exports.ReceiveTokenContent = ReceiveTokenContent;
@@ -14667,6 +14752,7 @@ exports.SelectTokenContent = SelectTokenContent;
14667
14752
  exports.SendTokenContent = SendTokenContent;
14668
14753
  exports.SendTokenModalProvider = SendTokenModalProvider;
14669
14754
  exports.SendTokenSummaryContent = SendTokenSummaryContent;
14755
+ exports.SettingsContent = SettingsContent;
14670
14756
  exports.SocialLoginButtons = SocialLoginButtons;
14671
14757
  exports.StickyFooterContainer = StickyFooterContainer;
14672
14758
  exports.StickyHeaderContainer = StickyHeaderContainer;
@@ -14684,7 +14770,6 @@ exports.VechainKitThemeProvider = VechainKitThemeProvider;
14684
14770
  exports.VersionFooter = VersionFooter;
14685
14771
  exports.WalletButton = WalletButton;
14686
14772
  exports.WalletModalProvider = WalletModalProvider;
14687
- exports.WalletSettingsContent = WalletSettingsContent;
14688
14773
  exports.buildClaimRewardsTx = buildClaimRewardsTx;
14689
14774
  exports.buildClaimRoundReward = buildClaimRoundReward;
14690
14775
  exports.compressImages = compressImages;
@@ -14809,6 +14894,7 @@ exports.getXAppsQueryKey = getXAppsQueryKey;
14809
14894
  exports.getXAppsSharesQueryKey = getXAppsSharesQueryKey;
14810
14895
  exports.imageCompressionOptions = imageCompressionOptions;
14811
14896
  exports.pollForReceipt = pollForReceipt;
14897
+ exports.useAccessAndSecurityModal = useAccessAndSecurityModal;
14812
14898
  exports.useAccountBalance = useAccountBalance;
14813
14899
  exports.useAccountCustomizationModal = useAccountCustomizationModal;
14814
14900
  exports.useAccountLinking = useAccountLinking;
@@ -14835,7 +14921,6 @@ exports.useCurrentAllocationsRound = useCurrentAllocationsRound;
14835
14921
  exports.useCurrentAllocationsRoundId = useCurrentAllocationsRoundId;
14836
14922
  exports.useCurrentBlock = useCurrentBlock;
14837
14923
  exports.useEcosystemShortcuts = useEcosystemShortcuts;
14838
- exports.useEmbeddedWalletSettingsModal = useEmbeddedWalletSettingsModal;
14839
14924
  exports.useEnsRecordExists = useEnsRecordExists;
14840
14925
  exports.useExploreEcosystemModal = useExploreEcosystemModal;
14841
14926
  exports.useFAQModal = useFAQModal;