@vechain/vechain-kit 2.0.0-rc.1 → 2.0.0-rc.3

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
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5GZ7N47F_cjs = require('./chunk-5GZ7N47F.cjs');
4
- var chunkPTWGTINW_cjs = require('./chunk-PTWGTINW.cjs');
4
+ var chunkLMX37RCG_cjs = require('./chunk-LMX37RCG.cjs');
5
5
  var chunkEESC6JDT_cjs = require('./chunk-EESC6JDT.cjs');
6
6
  require('./chunk-Q7SFCCGT.cjs');
7
7
  var i18n = require('i18next');
@@ -11,6 +11,7 @@ var reactQueryDevtools = require('@tanstack/react-query-devtools');
11
11
  var dappKitReact = require('@vechain/dapp-kit-react');
12
12
  var React10 = require('react');
13
13
  var reactQuery = require('@tanstack/react-query');
14
+ var query = require('wagmi/query');
14
15
  var jsxRuntime = require('react/jsx-runtime');
15
16
  var framerMotion = require('framer-motion');
16
17
  var react = require('@chakra-ui/react');
@@ -48,6 +49,8 @@ var si = require('react-icons/si');
48
49
  var bi = require('react-icons/bi');
49
50
  var go = require('react-icons/go');
50
51
  var sdkNetwork = require('@vechain/sdk-network');
52
+ var react$1 = require('@emotion/react');
53
+ var createCache = require('@emotion/cache');
51
54
  var anatomy = require('@chakra-ui/anatomy');
52
55
 
53
56
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -57,6 +60,7 @@ var React10__default = /*#__PURE__*/_interopDefault(React10);
57
60
  var VeChainKitMixpanel__default = /*#__PURE__*/_interopDefault(VeChainKitMixpanel);
58
61
  var BigNumber__default = /*#__PURE__*/_interopDefault(BigNumber);
59
62
  var imageCompression__default = /*#__PURE__*/_interopDefault(imageCompression);
63
+ var createCache__default = /*#__PURE__*/_interopDefault(createCache);
60
64
 
61
65
  // src/languages/en.json
62
66
  var en_default = {
@@ -4061,6 +4065,15 @@ var languageNames = {
4061
4065
  zh: "\u4E2D\u6587",
4062
4066
  ja: "\u65E5\u672C\u8A9E"
4063
4067
  };
4068
+ var bcp47LanguageCodes = {
4069
+ en: "en-US",
4070
+ de: "de-DE",
4071
+ it: "it-IT",
4072
+ fr: "fr-FR",
4073
+ es: "es-ES",
4074
+ zh: "zh-CN",
4075
+ ja: "ja-JP"
4076
+ };
4064
4077
  var customLanguageDetector = {
4065
4078
  lookup: (options) => {
4066
4079
  const propLanguage = options?.languages?.[0];
@@ -4130,6 +4143,7 @@ function getOrCreateQueryClient() {
4130
4143
  internalQueryClient = new reactQuery.QueryClient({
4131
4144
  defaultOptions: {
4132
4145
  queries: {
4146
+ queryKeyHashFn: query.hashFn,
4133
4147
  retry: 0,
4134
4148
  staleTime: 3e4,
4135
4149
  refetchOnWindowFocus: true,
@@ -4230,11 +4244,11 @@ var ModalBackButton = ({ onClick, ...props }) => {
4230
4244
  var APP_SOURCE = document.title || "";
4231
4245
  var PAGE_SOURCE = window?.location?.origin || "";
4232
4246
  var hasTrackingConsent = false;
4233
- if (typeof window !== "undefined" && chunkPTWGTINW_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN) {
4234
- VeChainKitMixpanel__default.default.init(chunkPTWGTINW_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN, {
4235
- debug: !chunkPTWGTINW_cjs.ENV.isProduction
4247
+ if (typeof window !== "undefined" && chunkLMX37RCG_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN) {
4248
+ VeChainKitMixpanel__default.default.init(chunkLMX37RCG_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN, {
4249
+ debug: !chunkLMX37RCG_cjs.ENV.isProduction
4236
4250
  });
4237
- if (chunkPTWGTINW_cjs.ENV.isDevelopment) {
4251
+ if (chunkLMX37RCG_cjs.ENV.isDevelopment) {
4238
4252
  console.info("Analytics initialized in DEVELOPMENT mode");
4239
4253
  }
4240
4254
  }
@@ -4276,7 +4290,7 @@ var storeUserData = (userId, properties) => {
4276
4290
  };
4277
4291
  var trackEvent = (event, properties = {}) => {
4278
4292
  try {
4279
- if (!chunkPTWGTINW_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN) {
4293
+ if (!chunkLMX37RCG_cjs.VECHAIN_KIT_MIXPANEL_PROJECT_TOKEN) {
4280
4294
  console.warn("No project token found");
4281
4295
  return;
4282
4296
  }
@@ -4749,7 +4763,7 @@ var AddressDisplay = ({
4749
4763
  react.Input,
4750
4764
  {
4751
4765
  cursor: "pointer",
4752
- value: showHumanAddress ? chunkPTWGTINW_cjs.humanAddress(
4766
+ value: showHumanAddress ? chunkLMX37RCG_cjs.humanAddress(
4753
4767
  wallet.address ?? "",
4754
4768
  8,
4755
4769
  7
@@ -4782,7 +4796,7 @@ var AddressDisplay = ({
4782
4796
  react.Input,
4783
4797
  {
4784
4798
  cursor: "pointer",
4785
- value: showHumanAddress ? chunkPTWGTINW_cjs.humanAddress(wallet?.address ?? "", 6, 4) : wallet?.address,
4799
+ value: showHumanAddress ? chunkLMX37RCG_cjs.humanAddress(wallet?.address ?? "", 6, 4) : wallet?.address,
4786
4800
  readOnly: true,
4787
4801
  fontSize: "sm",
4788
4802
  fontWeight: "700",
@@ -4810,7 +4824,7 @@ var AddressDisplay = ({
4810
4824
 
4811
4825
  // package.json
4812
4826
  var package_default = {
4813
- version: "2.0.0-rc.1"};
4827
+ version: "2.0.0-rc.3"};
4814
4828
  var VersionFooter = ({ ...props }) => {
4815
4829
  const { darkMode: isDark } = useVeChainKitConfig();
4816
4830
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -4981,32 +4995,28 @@ var convertToSelectedCurrency = (amountUsd, currency, exchangeRates) => {
4981
4995
  return amountUsd;
4982
4996
  }
4983
4997
  };
4984
- var formatCurrencyValue = (value, currency, options, locale = "en-US") => {
4998
+ var formatCurrencyValue = (value, lng = "en", options) => {
4985
4999
  const defaultOptions = {
4986
5000
  style: "currency",
4987
- currency,
4988
5001
  minimumFractionDigits: 2,
4989
5002
  maximumFractionDigits: 2,
5003
+ currency: options?.currency ?? "usd",
4990
5004
  ...options
4991
5005
  };
4992
- return new Intl.NumberFormat(locale, defaultOptions).format(value);
5006
+ return new Intl.NumberFormat(bcp47LanguageCodes[lng], defaultOptions).format(value);
4993
5007
  };
4994
- var formatCompactCurrency = (value, currency, locale) => {
5008
+ var formatCompactCurrency = (value, options) => {
4995
5009
  return formatCurrencyValue(
4996
5010
  value,
4997
- currency,
5011
+ i18n_default.resolvedLanguage,
4998
5012
  {
4999
5013
  notation: "compact",
5000
- compactDisplay: "short"
5001
- },
5002
- locale
5014
+ compactDisplay: "short",
5015
+ currency: options?.currency ?? "usd",
5016
+ ...options
5017
+ }
5003
5018
  );
5004
5019
  };
5005
- var amountFormatter = new Intl.NumberFormat("de-DE", {
5006
- notation: "compact",
5007
- compactDisplay: "short",
5008
- maximumFractionDigits: 2
5009
- });
5010
5020
  var AssetButton = ({
5011
5021
  symbol,
5012
5022
  amount,
@@ -5035,13 +5045,13 @@ var AssetButton = ({
5035
5045
  ...buttonProps,
5036
5046
  children: [
5037
5047
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
5038
- chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[symbol] ? React10__default.default.cloneElement(chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[symbol], {
5048
+ chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[symbol] ? React10__default.default.cloneElement(chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[symbol], {
5039
5049
  boxSize: "24px",
5040
5050
  borderRadius: "full"
5041
5051
  }) : /* @__PURE__ */ jsxRuntime.jsx(
5042
5052
  react.Image,
5043
5053
  {
5044
- src: chunkPTWGTINW_cjs.TOKEN_LOGOS[symbol],
5054
+ src: chunkLMX37RCG_cjs.TOKEN_LOGOS[symbol],
5045
5055
  alt: `${symbol} logo`,
5046
5056
  boxSize: "24px",
5047
5057
  borderRadius: "full",
@@ -5062,7 +5072,12 @@ var AssetButton = ({
5062
5072
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: symbol })
5063
5073
  ] }),
5064
5074
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { align: "flex-end", spacing: 0, children: [
5065
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: amountFormatter.format(amount) }),
5075
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { children: [
5076
+ amount.toLocaleString(void 0, {
5077
+ maximumFractionDigits: 2
5078
+ }),
5079
+ " "
5080
+ ] }),
5066
5081
  /* @__PURE__ */ jsxRuntime.jsx(
5067
5082
  react.Text,
5068
5083
  {
@@ -5071,8 +5086,7 @@ var AssetButton = ({
5071
5086
  "data-testid": `${symbol}-balance`,
5072
5087
  children: formatCompactCurrency(
5073
5088
  currencyValue,
5074
- currentCurrency,
5075
- "de-DE"
5089
+ { currency: currentCurrency }
5076
5090
  )
5077
5091
  }
5078
5092
  )
@@ -5107,7 +5121,7 @@ var useFetchAppInfo = (appIds) => {
5107
5121
  return Object.fromEntries(
5108
5122
  results.map((result, index) => {
5109
5123
  const id = normalizedIds[index];
5110
- const defaultApp = chunkPTWGTINW_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.find(
5124
+ const defaultApp = chunkLMX37RCG_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.find(
5111
5125
  (app) => app.id === id
5112
5126
  );
5113
5127
  return [
@@ -5177,9 +5191,9 @@ var fetchVechainDomain = async (thor, networkType, addressOrDomain) => {
5177
5191
  }
5178
5192
  if (ethers.isAddress(addressOrDomain)) {
5179
5193
  try {
5180
- const res = await chunkPTWGTINW_cjs.executeCallClause({
5194
+ const res = await chunkLMX37RCG_cjs.executeCallClause({
5181
5195
  thor,
5182
- contractAddress: chunkPTWGTINW_cjs.getConfig(networkType).vnsResolverAddress,
5196
+ contractAddress: chunkLMX37RCG_cjs.getConfig(networkType).vnsResolverAddress,
5183
5197
  abi: resolverABI,
5184
5198
  method: "getNames",
5185
5199
  args: [[addressOrDomain]]
@@ -5202,9 +5216,9 @@ var fetchVechainDomain = async (thor, networkType, addressOrDomain) => {
5202
5216
  }
5203
5217
  }
5204
5218
  try {
5205
- const res = await chunkPTWGTINW_cjs.executeCallClause({
5219
+ const res = await chunkLMX37RCG_cjs.executeCallClause({
5206
5220
  thor,
5207
- contractAddress: chunkPTWGTINW_cjs.getConfig(networkType).vnsResolverAddress,
5221
+ contractAddress: chunkLMX37RCG_cjs.getConfig(networkType).vnsResolverAddress,
5208
5222
  abi: getAddressesABI,
5209
5223
  method: "getAddresses",
5210
5224
  args: [[addressOrDomain]]
@@ -5218,9 +5232,9 @@ var fetchVechainDomain = async (thor, networkType, addressOrDomain) => {
5218
5232
  isPrimaryDomain: false
5219
5233
  };
5220
5234
  }
5221
- const primaryDomainRes = await chunkPTWGTINW_cjs.executeCallClause({
5235
+ const primaryDomainRes = await chunkLMX37RCG_cjs.executeCallClause({
5222
5236
  thor,
5223
- contractAddress: chunkPTWGTINW_cjs.getConfig(networkType).vnsResolverAddress,
5237
+ contractAddress: chunkLMX37RCG_cjs.getConfig(networkType).vnsResolverAddress,
5224
5238
  abi: resolverABI,
5225
5239
  method: "getNames",
5226
5240
  args: [[domainAddress]]
@@ -5260,7 +5274,7 @@ var getEnsRecordExists = async (thor, network, name) => {
5260
5274
  const labelHash = viem.keccak256(viem.toBytes(name));
5261
5275
  const subnode = viem.keccak256(viem.concat([hashedNode, labelHash]));
5262
5276
  const res = await thor.contracts.load(
5263
- chunkPTWGTINW_cjs.getConfig(network).vetDomainsContractAddress,
5277
+ chunkLMX37RCG_cjs.getConfig(network).vetDomainsContractAddress,
5264
5278
  chunk5GZ7N47F_cjs.MockENS__factory.abi
5265
5279
  ).read.recordExists(subnode);
5266
5280
  if (!res) throw new Error(`Failed to get ENS record exists for ${name}`);
@@ -5370,10 +5384,10 @@ var useClaimVeWorldSubdomain = ({
5370
5384
  if (!subdomain) throw new Error("Invalid subdomain");
5371
5385
  const fullDomain = `${subdomain}.${domain}`;
5372
5386
  clausesArray.push({
5373
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5387
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5374
5388
  value: "0x0",
5375
5389
  data: ReverseRegistrarInterface.encodeFunctionData("setName", [""]),
5376
- comment: `Unsetting your current VeChain nickname of the account ${chunkPTWGTINW_cjs.humanAddress(
5390
+ comment: `Unsetting your current VeChain nickname of the account ${chunkLMX37RCG_cjs.humanAddress(
5377
5391
  account?.address ?? "",
5378
5392
  4,
5379
5393
  4
@@ -5382,7 +5396,7 @@ var useClaimVeWorldSubdomain = ({
5382
5396
  });
5383
5397
  if (alreadyOwned) {
5384
5398
  clausesArray.push({
5385
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5399
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5386
5400
  value: "0x0",
5387
5401
  data: ReverseRegistrarInterface.encodeFunctionData("setName", [
5388
5402
  fullDomain
@@ -5395,13 +5409,13 @@ var useClaimVeWorldSubdomain = ({
5395
5409
  ]);
5396
5410
  const domainNode = ethers.ethers.namehash(fullDomain);
5397
5411
  clausesArray.push({
5398
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsPublicResolverAddress,
5412
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsPublicResolverAddress,
5399
5413
  value: "0x0",
5400
5414
  data: PublicResolverInterface.encodeFunctionData("setAddr", [
5401
5415
  domainNode,
5402
5416
  account?.address || ""
5403
5417
  ]),
5404
- comment: `Setting the address for ${fullDomain} to ${chunkPTWGTINW_cjs.humanAddress(
5418
+ comment: `Setting the address for ${fullDomain} to ${chunkLMX37RCG_cjs.humanAddress(
5405
5419
  account?.address ?? "",
5406
5420
  4,
5407
5421
  4
@@ -5411,26 +5425,26 @@ var useClaimVeWorldSubdomain = ({
5411
5425
  } else {
5412
5426
  if (isVeWorldDomain(domain)) {
5413
5427
  clausesArray.push({
5414
- to: chunkPTWGTINW_cjs.getConfig(network.type).veWorldSubdomainClaimerContractAddress,
5428
+ to: chunkLMX37RCG_cjs.getConfig(network.type).veWorldSubdomainClaimerContractAddress,
5415
5429
  value: "0x0",
5416
5430
  data: SubdomainClaimerInterface.encodeFunctionData(
5417
5431
  "claim",
5418
5432
  [
5419
5433
  subdomain,
5420
- chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsPublicResolverAddress
5434
+ chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsPublicResolverAddress
5421
5435
  ]
5422
5436
  ),
5423
5437
  comment: `Claim VeChain subdomain: ${subdomain}.${domain}`,
5424
5438
  abi: SubdomainClaimerInterface.getFunction("claim")
5425
5439
  });
5426
5440
  clausesArray.push({
5427
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5441
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5428
5442
  value: "0x0",
5429
5443
  data: ReverseRegistrarInterface.encodeFunctionData(
5430
5444
  "setName",
5431
5445
  [subdomain + "." + domain]
5432
5446
  ),
5433
- comment: `Set ${subdomain}.${domain} as the VeChain nickname of the account ${chunkPTWGTINW_cjs.humanAddress(
5447
+ comment: `Set ${subdomain}.${domain} as the VeChain nickname of the account ${chunkLMX37RCG_cjs.humanAddress(
5434
5448
  account?.address ?? "",
5435
5449
  4,
5436
5450
  4
@@ -5509,7 +5523,7 @@ var useClaimVetDomain = ({
5509
5523
  if (!domain) throw new Error("Invalid domain");
5510
5524
  if (alreadyOwned) {
5511
5525
  clausesArray.push({
5512
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5526
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
5513
5527
  value: "0x0",
5514
5528
  data: ReverseRegistrarInterface2.encodeFunctionData("setName", [
5515
5529
  domain
@@ -5522,13 +5536,13 @@ var useClaimVetDomain = ({
5522
5536
  ]);
5523
5537
  const domainNode = ethers.ethers.namehash(domain);
5524
5538
  clausesArray.push({
5525
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsPublicResolverAddress,
5539
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsPublicResolverAddress,
5526
5540
  value: "0x0",
5527
5541
  data: PublicResolverInterface.encodeFunctionData("setAddr", [
5528
5542
  domainNode,
5529
5543
  account?.address || ""
5530
5544
  ]),
5531
- comment: `Setting the address for ${domain} to ${chunkPTWGTINW_cjs.humanAddress(
5545
+ comment: `Setting the address for ${domain} to ${chunkLMX37RCG_cjs.humanAddress(
5532
5546
  account?.address ?? "",
5533
5547
  4,
5534
5548
  4
@@ -5584,7 +5598,7 @@ var getIsDomainProtectedQueryKey = (domain) => [
5584
5598
  "IS_DOMAIN_PROTECTED"
5585
5599
  ];
5586
5600
  var getIsDomainProtected = async (thor, network, domain) => {
5587
- const contractAddress = chunkPTWGTINW_cjs.getConfig(network).veWorldSubdomainClaimerContractAddress;
5601
+ const contractAddress = chunkLMX37RCG_cjs.getConfig(network).veWorldSubdomainClaimerContractAddress;
5588
5602
  const res = await thor.contracts.load(contractAddress, chunk5GZ7N47F_cjs.SubdomainClaimer__factory.abi).read.isDomainProtected(domain);
5589
5603
  return res[0];
5590
5604
  };
@@ -5605,7 +5619,7 @@ var DomainsResponseSchema = zod.z.object({
5605
5619
  });
5606
5620
  var getDomainsOfAddress = async (networkType, address, parentDomain) => {
5607
5621
  if (!address) throw new Error("Address is required");
5608
- const graphQlIndexerUrl = chunkPTWGTINW_cjs.getConfig(networkType).graphQlIndexerUrl;
5622
+ const graphQlIndexerUrl = chunkLMX37RCG_cjs.getConfig(networkType).graphQlIndexerUrl;
5609
5623
  const whereCondition = parentDomain ? `{owner: "${address.toLowerCase()}", parent_: {name: "${parentDomain}"}}` : `{owner: "${address.toLowerCase()}"}`;
5610
5624
  const query = `query Registrations {
5611
5625
  domains(
@@ -5666,7 +5680,7 @@ var getAvatarLegacy = async (networkType, nodeUrl, name) => {
5666
5680
  body: JSON.stringify({
5667
5681
  clauses: [
5668
5682
  {
5669
- to: chunkPTWGTINW_cjs.getConfig(networkType).vetDomainsContractAddress,
5683
+ to: chunkLMX37RCG_cjs.getConfig(networkType).vetDomainsContractAddress,
5670
5684
  data: nameInterface.encodeFunctionData("resolver", [
5671
5685
  node
5672
5686
  ])
@@ -5724,7 +5738,7 @@ var getAvatarLegacyQueryKey = (name, networkType) => ["VECHAIN_KIT", "VET_DOMAIN
5724
5738
  async function parseAvatarRecord(record, networkType, nodeUrl) {
5725
5739
  try {
5726
5740
  if (record.startsWith("http") || record.startsWith("ipfs://") || record.startsWith("ar://")) {
5727
- return chunkPTWGTINW_cjs.convertUriToUrl(record, networkType) || null;
5741
+ return chunkLMX37RCG_cjs.convertUriToUrl(record, networkType) || null;
5728
5742
  }
5729
5743
  const match = record.match(
5730
5744
  /eip155:(\d+)\/(?:erc721|erc1155):([^/]+)\/(\d+)/
@@ -5765,7 +5779,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
5765
5779
  console.error("Failed to decode avatar data:", e);
5766
5780
  tokenUri = ethers.toUtf8String(data);
5767
5781
  }
5768
- tokenUri = chunkPTWGTINW_cjs.convertUriToUrl(tokenUri, networkType) || tokenUri;
5782
+ tokenUri = chunkLMX37RCG_cjs.convertUriToUrl(tokenUri, networkType) || tokenUri;
5769
5783
  if (isErc1155) {
5770
5784
  tokenUri = tokenUri.replace(
5771
5785
  "{id}",
@@ -5783,7 +5797,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
5783
5797
  console.error("No image URL in metadata");
5784
5798
  return null;
5785
5799
  }
5786
- return chunkPTWGTINW_cjs.convertUriToUrl(imageUrl, networkType) || imageUrl;
5800
+ return chunkLMX37RCG_cjs.convertUriToUrl(imageUrl, networkType) || imageUrl;
5787
5801
  }
5788
5802
  return null;
5789
5803
  } catch (error) {
@@ -5793,7 +5807,7 @@ async function parseAvatarRecord(record, networkType, nodeUrl) {
5793
5807
  }
5794
5808
  var useGetAvatarLegacy = (name) => {
5795
5809
  const { network } = useVeChainKitConfig();
5796
- const nodeUrl = network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl;
5810
+ const nodeUrl = network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl;
5797
5811
  const avatarQuery = reactQuery.useQuery({
5798
5812
  queryKey: getAvatarLegacyQueryKey(name ?? "", network.type),
5799
5813
  queryFn: async () => {
@@ -5824,7 +5838,7 @@ var getAvatar = async (name, network) => {
5824
5838
  var fetchAvatar = async (name, network) => {
5825
5839
  try {
5826
5840
  const response = await fetch(
5827
- `${chunkPTWGTINW_cjs.getConfig(network.type).vetDomainAvatarUrl}/${name}`
5841
+ `${chunkLMX37RCG_cjs.getConfig(network.type).vetDomainAvatarUrl}/${name}`
5828
5842
  );
5829
5843
  if (response.ok) {
5830
5844
  return response.blob();
@@ -5835,7 +5849,7 @@ var fetchAvatar = async (name, network) => {
5835
5849
  return null;
5836
5850
  };
5837
5851
  var fetchAvatarDirectly = async (name, network) => {
5838
- const nodeUrl = network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl;
5852
+ const nodeUrl = network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl;
5839
5853
  if (!nodeUrl) return null;
5840
5854
  const avatar = await getAvatarLegacy(network.type, nodeUrl, name);
5841
5855
  if (!avatar) return null;
@@ -5876,7 +5890,7 @@ var getTextRecords = async (nodeUrl, network, domain) => {
5876
5890
  body: JSON.stringify({
5877
5891
  clauses: [
5878
5892
  {
5879
- to: chunkPTWGTINW_cjs.getConfig(network).vetDomainsContractAddress,
5893
+ to: chunkLMX37RCG_cjs.getConfig(network).vetDomainsContractAddress,
5880
5894
  data: nameInterface2.encodeFunctionData("resolver", [
5881
5895
  node
5882
5896
  ])
@@ -5898,7 +5912,7 @@ var getTextRecords = async (nodeUrl, network, domain) => {
5898
5912
  "content-type": "application/json"
5899
5913
  },
5900
5914
  body: JSON.stringify({
5901
- clauses: chunkPTWGTINW_cjs.ENS_TEXT_RECORDS.map((key) => ({
5915
+ clauses: chunkLMX37RCG_cjs.ENS_TEXT_RECORDS.map((key) => ({
5902
5916
  to: resolverAddress,
5903
5917
  data: nameInterface2.encodeFunctionData("text", [node, key])
5904
5918
  }))
@@ -5914,11 +5928,11 @@ var getTextRecords = async (nodeUrl, network, domain) => {
5914
5928
  data
5915
5929
  )[0];
5916
5930
  if (value) {
5917
- acc[chunkPTWGTINW_cjs.ENS_TEXT_RECORDS[index]] = value;
5931
+ acc[chunkLMX37RCG_cjs.ENS_TEXT_RECORDS[index]] = value;
5918
5932
  }
5919
5933
  } catch (error) {
5920
5934
  console.error(
5921
- `Failed to decode text record for ${chunkPTWGTINW_cjs.ENS_TEXT_RECORDS[index]}:`,
5935
+ `Failed to decode text record for ${chunkLMX37RCG_cjs.ENS_TEXT_RECORDS[index]}:`,
5922
5936
  error
5923
5937
  );
5924
5938
  }
@@ -5935,7 +5949,7 @@ var getTextRecords = async (nodeUrl, network, domain) => {
5935
5949
  var getTextRecordsQueryKey = (domain, network) => ["VECHAIN_KIT_TEXT_RECORDS", domain, network];
5936
5950
  var useGetTextRecords = (domain) => {
5937
5951
  const { network } = useVeChainKitConfig();
5938
- const nodeUrl = network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl;
5952
+ const nodeUrl = network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl;
5939
5953
  return reactQuery.useQuery({
5940
5954
  queryKey: getTextRecordsQueryKey(domain, network.type),
5941
5955
  queryFn: () => getTextRecords(nodeUrl, network.type, domain),
@@ -6025,7 +6039,7 @@ var getResolverAddressQueryKey = (domain) => [
6025
6039
  var useGetResolverAddress = (domain) => {
6026
6040
  const { network } = useVeChainKitConfig();
6027
6041
  return useCallClause({
6028
- address: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsContractAddress,
6042
+ address: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsContractAddress,
6029
6043
  abi: nameInterfaceAbi,
6030
6044
  method: "resolver",
6031
6045
  args: [domain ? viem.namehash(domain) : "0x"],
@@ -6048,12 +6062,12 @@ var useGetAvatarOfAddress = (address) => {
6048
6062
  return reactQuery.useQuery({
6049
6063
  queryKey: getAvatarOfAddressQueryKey(address),
6050
6064
  queryFn: async () => {
6051
- if (!address) return chunkPTWGTINW_cjs.getPicassoImage(address ?? "");
6065
+ if (!address) return chunkLMX37RCG_cjs.getPicassoImage(address ?? "");
6052
6066
  const domains = await domainsQuery.refetch();
6053
- if (!domains.data?.domain) return chunkPTWGTINW_cjs.getPicassoImage(address);
6067
+ if (!domains.data?.domain) return chunkLMX37RCG_cjs.getPicassoImage(address);
6054
6068
  if (domains.data.domain && avatarQuery.data)
6055
6069
  return avatarQuery.data;
6056
- return chunkPTWGTINW_cjs.getPicassoImage(address);
6070
+ return chunkLMX37RCG_cjs.getPicassoImage(address);
6057
6071
  },
6058
6072
  enabled: !!address && domainsQuery.isSuccess && (primaryDomain ? avatarQuery.isSuccess : true)
6059
6073
  });
@@ -6069,10 +6083,10 @@ var useUnsetDomain = ({
6069
6083
  const buildClauses = React10.useCallback(async () => {
6070
6084
  const clausesArray = [];
6071
6085
  clausesArray.push({
6072
- to: chunkPTWGTINW_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
6086
+ to: chunkLMX37RCG_cjs.getConfig(network.type).vetDomainsReverseRegistrarAddress,
6073
6087
  value: "0x0",
6074
6088
  data: ReverseRegistrarInterface3.encodeFunctionData("setName", [""]),
6075
- comment: `Unsetting your current VeChain nickname of the account ${chunkPTWGTINW_cjs.humanAddress(
6089
+ comment: `Unsetting your current VeChain nickname of the account ${chunkLMX37RCG_cjs.humanAddress(
6076
6090
  account?.address ?? "",
6077
6091
  4,
6078
6092
  4
@@ -6115,7 +6129,7 @@ var useUnsetDomain = ({
6115
6129
  };
6116
6130
  var useTokenBalances = ({ address = "" }) => {
6117
6131
  const { network } = useVeChainKitConfig();
6118
- const config = chunkPTWGTINW_cjs.getConfig(network.type);
6132
+ const config = chunkLMX37RCG_cjs.getConfig(network.type);
6119
6133
  const { data: vetData, isLoading: vetLoading } = useAccountBalance(address);
6120
6134
  const { data: b3trBalance, isLoading: b3trLoading } = useGetB3trBalance(address);
6121
6135
  const { data: vot3Balance, isLoading: vot3Loading } = useGetVot3Balance(address);
@@ -6194,7 +6208,7 @@ var useTokenBalances = ({ address = "" }) => {
6194
6208
  };
6195
6209
  var useTokenPrices = () => {
6196
6210
  const { network } = useVeChainKitConfig();
6197
- const config = chunkPTWGTINW_cjs.getConfig(network.type);
6211
+ const config = chunkLMX37RCG_cjs.getConfig(network.type);
6198
6212
  const { data: vetUsdPrice, isLoading: vetUsdPriceLoading } = useGetTokenUsdPrice("VET");
6199
6213
  const { data: vthoUsdPrice, isLoading: vthoUsdPriceLoading } = useGetTokenUsdPrice("VTHO");
6200
6214
  const { data: b3trUsdPrice, isLoading: b3trUsdPriceLoading } = useGetTokenUsdPrice("B3TR");
@@ -6341,7 +6355,7 @@ var useTotalBalance = ({ address = "" }) => {
6341
6355
  const formattedBalance = React10.useMemo(() => {
6342
6356
  return formatCompactCurrency(
6343
6357
  totalBalanceInCurrency,
6344
- currentCurrency
6358
+ { currency: currentCurrency }
6345
6359
  );
6346
6360
  }, [totalBalanceInCurrency, currentCurrency]);
6347
6361
  return {
@@ -6376,17 +6390,17 @@ var useCustomTokens = () => {
6376
6390
  };
6377
6391
  const isTokenIncluded = (address) => {
6378
6392
  return customTokens.some(
6379
- (t) => chunkPTWGTINW_cjs.compareAddresses(t.address, address)
6393
+ (t) => chunkLMX37RCG_cjs.compareAddresses(t.address, address)
6380
6394
  );
6381
6395
  };
6382
6396
  const isDefaultToken = (address) => {
6383
6397
  const contractAddresses = {
6384
6398
  vet: "0x",
6385
6399
  // VET has no contract address since it's the native token
6386
- vtho: chunkPTWGTINW_cjs.getConfig(network.type).vthoContractAddress,
6387
- b3tr: chunkPTWGTINW_cjs.getConfig(network.type).b3trContractAddress,
6388
- vot3: chunkPTWGTINW_cjs.getConfig(network.type).vot3ContractAddress,
6389
- veDelegate: chunkPTWGTINW_cjs.getConfig(network.type).veDelegate
6400
+ vtho: chunkLMX37RCG_cjs.getConfig(network.type).vthoContractAddress,
6401
+ b3tr: chunkLMX37RCG_cjs.getConfig(network.type).b3trContractAddress,
6402
+ vot3: chunkLMX37RCG_cjs.getConfig(network.type).vot3ContractAddress,
6403
+ veDelegate: chunkLMX37RCG_cjs.getConfig(network.type).veDelegate
6390
6404
  };
6391
6405
  return Object.values(contractAddresses).includes(address);
6392
6406
  };
@@ -6405,10 +6419,10 @@ var handlePopupError = ({
6405
6419
  defaultMessage = "Operation failed"
6406
6420
  }) => {
6407
6421
  const errorMsg = error?.message;
6408
- if (reactDeviceDetect.isMobile && errorMsg && !chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
6422
+ if (reactDeviceDetect.isMobile && errorMsg && !chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
6409
6423
  return new Error(mobileBrowserPopupMessage);
6410
6424
  }
6411
- if (errorMsg && chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
6425
+ if (errorMsg && chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
6412
6426
  return new Error(rejectedMessage);
6413
6427
  }
6414
6428
  return error instanceof Error ? error : new Error(defaultMessage);
@@ -6435,7 +6449,7 @@ var vechain = viem.defineChain({
6435
6449
  });
6436
6450
  var vechainConnector = () => {
6437
6451
  return rainbowKit.toPrivyWalletConnector({
6438
- id: chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID,
6452
+ id: chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID,
6439
6453
  name: "VeChain",
6440
6454
  iconUrl: "https://imagedelivery.net/oHBRUd2clqykxgDWmeAyLg/661dd77c-2f9d-40e7-baa1-f4e24fd7bf00/icon",
6441
6455
  smartWalletMode: false
@@ -6490,7 +6504,7 @@ var usePrivyCrossAppSdk = () => {
6490
6504
  setIsConnecting(true);
6491
6505
  setConnectionError(null);
6492
6506
  const connector = connectors.find(
6493
- (c) => c.id === (appID || chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID)
6507
+ (c) => c.id === (appID || chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID)
6494
6508
  );
6495
6509
  if (!connector) {
6496
6510
  throw new Error("Connector not found");
@@ -6552,7 +6566,7 @@ var useWalletMetadata = (address, networkType) => {
6552
6566
  const { data: domain, isLoading: isLoadingVechainDomain } = useVechainDomain(address ?? "");
6553
6567
  const { data: avatar, isLoading: isLoadingMetadata } = useGetAvatarOfAddress(address ?? "");
6554
6568
  const { data: textRecords, isLoading: isLoadingRecords } = useGetTextRecords(domain?.domain ?? "");
6555
- const headerUrl = textRecords?.header ? chunkPTWGTINW_cjs.convertUriToUrl(textRecords.header, networkType) : null;
6569
+ const headerUrl = textRecords?.header ? chunkLMX37RCG_cjs.convertUriToUrl(textRecords.header, networkType) : null;
6556
6570
  return {
6557
6571
  domain: domain?.domain,
6558
6572
  image: avatar,
@@ -6584,7 +6598,7 @@ var useWallet = () => {
6584
6598
  const isConnectedWithDappKit = !!dappKitAccount;
6585
6599
  const isConnectedWithSocialLogin = authenticated && !!user;
6586
6600
  const isConnectedWithPrivy = isConnectedWithSocialLogin || isConnectedWithCrossApp;
6587
- const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId === chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID || isConnectedWithCrossApp && connectionCache?.ecosystemApp?.appId === chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID;
6601
+ const isConnectedWithVeChain = isConnectedWithSocialLogin && privy?.appId === chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID || isConnectedWithCrossApp && connectionCache?.ecosystemApp?.appId === chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID;
6588
6602
  const isLoading = isConnectingWithCrossApp || isReconnectingWithCrossApp || isLoadingLoginOAuth || !ready;
6589
6603
  const [isConnected, setIsConnected] = React10.useState(false);
6590
6604
  const connectionSource = isConnectedWithCrossApp ? {
@@ -6649,7 +6663,7 @@ var useWallet = () => {
6649
6663
  const { data: smartAccountVersion } = useSmartAccountVersion(
6650
6664
  smartAccount?.address ?? ""
6651
6665
  );
6652
- const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address && chunkPTWGTINW_cjs.compareAddresses(smartAccount?.address, account?.address);
6666
+ const hasActiveSmartAccount = !!smartAccount?.address && !!account?.address && chunkLMX37RCG_cjs.compareAddresses(smartAccount?.address, account?.address);
6653
6667
  const disconnect = React10.useCallback(async () => {
6654
6668
  try {
6655
6669
  setIsConnected(false);
@@ -6754,8 +6768,8 @@ var getCustomTokenBalances = async (thor, address, customTokens) => {
6754
6768
  });
6755
6769
  };
6756
6770
  var getTokenBalances = async (thor, address, network) => {
6757
- const config = chunkPTWGTINW_cjs.getConfig(network);
6758
- const [b3trBalance, vot3Balance, veDelegateBalance, gloDollarBalance] = await chunkPTWGTINW_cjs.executeMultipleClausesCall({
6771
+ const config = chunkLMX37RCG_cjs.getConfig(network);
6772
+ const [b3trBalance, vot3Balance, veDelegateBalance, gloDollarBalance] = await chunkLMX37RCG_cjs.executeMultipleClausesCall({
6759
6773
  thor,
6760
6774
  calls: [
6761
6775
  {
@@ -6843,7 +6857,7 @@ var useTokenBalances2 = ({ address }) => {
6843
6857
  });
6844
6858
  };
6845
6859
  var getTokenPrices = async (thor, tokens2, network) => {
6846
- const config = chunkPTWGTINW_cjs.getConfig(network);
6860
+ const config = chunkLMX37RCG_cjs.getConfig(network);
6847
6861
  const oracleContract = thor.contracts.load(
6848
6862
  config.oracleContractAddress,
6849
6863
  chunk5GZ7N47F_cjs.IVechainEnergyOracleV1__factory.abi
@@ -6865,7 +6879,7 @@ var tokens = ["VET", "VTHO", "B3TR", "EUR", "GBP"];
6865
6879
  var useTokenPrices2 = () => {
6866
6880
  const thor = dappKitReact.useThor();
6867
6881
  const { network } = useVeChainKitConfig();
6868
- const config = chunkPTWGTINW_cjs.getConfig(network.type);
6882
+ const config = chunkLMX37RCG_cjs.getConfig(network.type);
6869
6883
  return reactQuery.useQuery({
6870
6884
  queryKey: ["token-prices", network.type],
6871
6885
  queryFn: () => getTokenPrices(thor, tokens, network.type),
@@ -6899,7 +6913,7 @@ var useTokenPrices2 = () => {
6899
6913
  };
6900
6914
  var getIpfsMetadata = async (networkType, uri, parseJson = false) => {
6901
6915
  if (!uri) throw new Error("No URI provided");
6902
- const newUri = chunkPTWGTINW_cjs.convertUriToUrl(uri, networkType);
6916
+ const newUri = chunkLMX37RCG_cjs.convertUriToUrl(uri, networkType);
6903
6917
  if (!newUri) throw new Error("Invalid URI");
6904
6918
  const response = await fetch(newUri, {
6905
6919
  headers: {
@@ -6923,7 +6937,7 @@ var useIpfsMetadata = (ipfsUri, parseJson = false) => {
6923
6937
  var MAX_IMAGE_SIZE = 1024 * 1024 * 10;
6924
6938
  var getIpfsImage = async (networkType, uri) => {
6925
6939
  if (!uri) throw new Error("IPFS URI is required");
6926
- const response = await fetch(chunkPTWGTINW_cjs.convertUriToUrl(uri, networkType) ?? "", {
6940
+ const response = await fetch(chunkLMX37RCG_cjs.convertUriToUrl(uri, networkType) ?? "", {
6927
6941
  headers: {
6928
6942
  "X-Project-Id": "vechain-kit"
6929
6943
  }
@@ -6955,7 +6969,7 @@ var getIpfsImage = async (networkType, uri) => {
6955
6969
  resolve({
6956
6970
  image: reader.result,
6957
6971
  mime: blob.type,
6958
- mediaType: chunkPTWGTINW_cjs.resolveMediaTypeFromMimeType(blob.type)
6972
+ mediaType: chunkLMX37RCG_cjs.resolveMediaTypeFromMimeType(blob.type)
6959
6973
  });
6960
6974
  };
6961
6975
  reader.onerror = () => {
@@ -7546,7 +7560,7 @@ var DappKitButton = ({ isDark, gridColumn = 2 }) => {
7546
7560
  }
7547
7561
  );
7548
7562
  }
7549
- if (errorMsg && chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
7563
+ if (errorMsg && chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
7550
7564
  return Analytics.auth.dropOff("dappkit-view", {
7551
7565
  ...source && { source }
7552
7566
  });
@@ -7911,7 +7925,7 @@ var AccountDetailsButton = ({
7911
7925
  wordBreak: "break-word",
7912
7926
  whiteSpace: "normal",
7913
7927
  w: "full",
7914
- children: wallet?.domain ? chunkPTWGTINW_cjs.humanDomain(wallet?.domain ?? "", 18, 0) : chunkPTWGTINW_cjs.humanAddress(wallet?.address ?? "", 6, 4)
7928
+ children: wallet?.domain ? chunkLMX37RCG_cjs.humanDomain(wallet?.domain ?? "", 18, 0) : chunkLMX37RCG_cjs.humanAddress(wallet?.address ?? "", 6, 4)
7915
7929
  }
7916
7930
  )
7917
7931
  ] }),
@@ -8049,7 +8063,7 @@ var AccountSelector = ({
8049
8063
  props: { width: 7, height: 7 }
8050
8064
  }
8051
8065
  ),
8052
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkPTWGTINW_cjs.humanDomain(wallet?.domain ?? "", 22, 0) || chunkPTWGTINW_cjs.humanAddress(wallet?.address ?? "", 6, 4) })
8066
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: size, fontWeight: "500", children: chunkLMX37RCG_cjs.humanDomain(wallet?.domain ?? "", 22, 0) || chunkLMX37RCG_cjs.humanAddress(wallet?.address ?? "", 6, 4) })
8053
8067
  ] }),
8054
8068
  /* @__PURE__ */ jsxRuntime.jsx(
8055
8069
  react.Icon,
@@ -8113,17 +8127,17 @@ var AssetIcons = ({
8113
8127
  border: "2px solid #00000024",
8114
8128
  alignItems: "center",
8115
8129
  justifyContent: "center",
8116
- children: chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[token.symbol] ? React10__default.default.cloneElement(
8117
- chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[token.symbol],
8130
+ children: chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[token.symbol] ? React10__default.default.cloneElement(
8131
+ chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[token.symbol],
8118
8132
  {
8119
8133
  width: `${iconSize * 0.8}px`,
8120
8134
  height: `${iconSize * 0.8}px`,
8121
8135
  rounded: "full"
8122
8136
  }
8123
- ) : chunkPTWGTINW_cjs.TOKEN_LOGOS[token.symbol] ? /* @__PURE__ */ jsxRuntime.jsx(
8137
+ ) : chunkLMX37RCG_cjs.TOKEN_LOGOS[token.symbol] ? /* @__PURE__ */ jsxRuntime.jsx(
8124
8138
  react.Image,
8125
8139
  {
8126
- src: chunkPTWGTINW_cjs.TOKEN_LOGOS[token.symbol],
8140
+ src: chunkLMX37RCG_cjs.TOKEN_LOGOS[token.symbol],
8127
8141
  alt: `${token.symbol} logo`,
8128
8142
  width: `${iconSize * 0.8}px`,
8129
8143
  height: `${iconSize * 0.8}px`,
@@ -9052,7 +9066,7 @@ var NetworkInfo = () => {
9052
9066
  InfoRow,
9053
9067
  {
9054
9068
  label: t("Node URL"),
9055
- value: network.nodeUrl || chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl
9069
+ value: network.nodeUrl || chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl
9056
9070
  }
9057
9071
  ),
9058
9072
  connection.isConnectedWithPrivy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9289,7 +9303,7 @@ var WalletSecuredBy = () => {
9289
9303
  var EmbeddedWalletContent = ({ setCurrentContent }) => {
9290
9304
  const { t } = reactI18next.useTranslation();
9291
9305
  const { connectedWallet, connection } = useWallet();
9292
- const walletImage = chunkPTWGTINW_cjs.getPicassoImage(connectedWallet?.address ?? "");
9306
+ const walletImage = chunkLMX37RCG_cjs.getPicassoImage(connectedWallet?.address ?? "");
9293
9307
  const { getConnectionCache } = useCrossAppConnectionCache();
9294
9308
  const connectionCache = getConnectionCache();
9295
9309
  const { darkMode: isDark } = useVeChainKitConfig();
@@ -9531,6 +9545,7 @@ var SendTokenContent = ({
9531
9545
  const { t } = reactI18next.useTranslation();
9532
9546
  const { darkMode: isDark } = useVeChainKitConfig();
9533
9547
  const { currentCurrency } = useCurrency();
9548
+ const { exchangeRates } = useTokenPrices();
9534
9549
  const [selectedToken, setSelectedToken] = React10.useState(
9535
9550
  preselectedToken ?? null
9536
9551
  );
@@ -9553,6 +9568,19 @@ var SendTokenContent = ({
9553
9568
  mode: "onChange"
9554
9569
  });
9555
9570
  const { toAddressOrDomain, amount } = watch();
9571
+ const formattedValue = React10.useMemo(() => {
9572
+ if (selectedToken) {
9573
+ return formatCompactCurrency(
9574
+ convertToSelectedCurrency(
9575
+ Number(amount) * selectedToken.priceUsd,
9576
+ currentCurrency,
9577
+ exchangeRates
9578
+ ),
9579
+ { currency: currentCurrency }
9580
+ );
9581
+ }
9582
+ return "";
9583
+ }, [amount, selectedToken, currentCurrency, exchangeRates]);
9556
9584
  React10.useEffect(() => {
9557
9585
  if (selectedToken && amount) {
9558
9586
  Analytics.send.flow("amount", {
@@ -9647,6 +9675,7 @@ var SendTokenContent = ({
9647
9675
  resolvedAddress: resolvedDomainData?.address,
9648
9676
  amount: data.amount,
9649
9677
  selectedToken,
9678
+ formattedTotalAmount: formattedValue,
9650
9679
  setCurrentContent
9651
9680
  }
9652
9681
  });
@@ -9747,8 +9776,8 @@ var SendTokenContent = ({
9747
9776
  bg: isDark ? "whiteAlpha.300" : "blackAlpha.300"
9748
9777
  },
9749
9778
  onClick: () => setIsSelectingToken(true),
9750
- leftIcon: chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol] ? React10__default.default.cloneElement(
9751
- chunkPTWGTINW_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol],
9779
+ leftIcon: chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol] ? React10__default.default.cloneElement(
9780
+ chunkLMX37RCG_cjs.TOKEN_LOGO_COMPONENTS[selectedToken.symbol],
9752
9781
  {
9753
9782
  boxSize: "20px",
9754
9783
  borderRadius: "full"
@@ -9756,7 +9785,7 @@ var SendTokenContent = ({
9756
9785
  ) : /* @__PURE__ */ jsxRuntime.jsx(
9757
9786
  react.Image,
9758
9787
  {
9759
- src: chunkPTWGTINW_cjs.TOKEN_LOGOS[selectedToken.symbol],
9788
+ src: chunkLMX37RCG_cjs.TOKEN_LOGOS[selectedToken.symbol],
9760
9789
  alt: `${selectedToken.symbol} logo`,
9761
9790
  boxSize: "20px",
9762
9791
  borderRadius: "full",
@@ -9815,10 +9844,7 @@ var SendTokenContent = ({
9815
9844
  /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { opacity: 0.5, children: [
9816
9845
  "\u2248",
9817
9846
  " ",
9818
- formatCompactCurrency(
9819
- Number(amount) * selectedToken.priceUsd,
9820
- currentCurrency
9821
- )
9847
+ formattedValue
9822
9848
  ] }),
9823
9849
  /* @__PURE__ */ jsxRuntime.jsx(
9824
9850
  react.Text,
@@ -9937,18 +9963,14 @@ var SendTokenContent = ({
9937
9963
  ) })
9938
9964
  ] });
9939
9965
  };
9940
- var summaryFormatter = new Intl.NumberFormat("de-DE", {
9941
- notation: "standard",
9942
- minimumFractionDigits: 2,
9943
- maximumFractionDigits: 2
9944
- });
9945
9966
  var SendTokenSummaryContent = ({
9946
9967
  setCurrentContent,
9947
9968
  toAddressOrDomain,
9948
9969
  resolvedDomain,
9949
9970
  resolvedAddress,
9950
9971
  amount,
9951
- selectedToken
9972
+ selectedToken,
9973
+ formattedTotalAmount
9952
9974
  }) => {
9953
9975
  const { t } = reactI18next.useTranslation();
9954
9976
  const { account, connection, connectedWallet } = useWallet();
@@ -9960,12 +9982,11 @@ var SendTokenSummaryContent = ({
9960
9982
  3
9961
9983
  );
9962
9984
  const { open: openUpgradeSmartAccountModal } = useUpgradeSmartAccountModal();
9963
- const { currentCurrency } = useCurrency();
9964
9985
  const toImageSrc = React10.useMemo(() => {
9965
9986
  if (avatar) {
9966
9987
  return avatar;
9967
9988
  }
9968
- return chunkPTWGTINW_cjs.getPicassoImage(resolvedAddress || toAddressOrDomain);
9989
+ return chunkLMX37RCG_cjs.getPicassoImage(resolvedAddress || toAddressOrDomain);
9969
9990
  }, [avatar, network.type, resolvedAddress, toAddressOrDomain]);
9970
9991
  const handleSend = async () => {
9971
9992
  if (upgradeRequired) {
@@ -10087,7 +10108,7 @@ var SendTokenSummaryContent = ({
10087
10108
  });
10088
10109
  };
10089
10110
  const handleError = (error) => {
10090
- if (error && chunkPTWGTINW_cjs.isRejectionError(error)) {
10111
+ if (error && chunkLMX37RCG_cjs.isRejectionError(error)) {
10091
10112
  Analytics.send.flow("review", {
10092
10113
  tokenSymbol: selectedToken.symbol,
10093
10114
  amount,
@@ -10179,7 +10200,10 @@ var SendTokenSummaryContent = ({
10179
10200
  textAlign: "left",
10180
10201
  "data-testid": "send-summary-amount",
10181
10202
  children: [
10182
- summaryFormatter.format(Number(amount)),
10203
+ Number(amount).toLocaleString(void 0, {
10204
+ minimumFractionDigits: 2,
10205
+ maximumFractionDigits: 2
10206
+ }),
10183
10207
  " ",
10184
10208
  selectedToken.symbol
10185
10209
  ]
@@ -10188,10 +10212,7 @@ var SendTokenSummaryContent = ({
10188
10212
  /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { opacity: 0.5, children: [
10189
10213
  "\u2248",
10190
10214
  " ",
10191
- formatCompactCurrency(
10192
- Number(amount) * selectedToken.priceUsd,
10193
- currentCurrency
10194
- )
10215
+ formattedTotalAmount
10195
10216
  ] })
10196
10217
  ] })
10197
10218
  ]
@@ -10396,7 +10417,7 @@ var DomainListItem = ({
10396
10417
  props: {
10397
10418
  width: "40px",
10398
10419
  height: "40px",
10399
- src: metadata.image ?? chunkPTWGTINW_cjs.getPicassoImage(domain.name),
10420
+ src: metadata.image ?? chunkLMX37RCG_cjs.getPicassoImage(domain.name),
10400
10421
  alt: domain.name
10401
10422
  }
10402
10423
  }
@@ -10408,7 +10429,7 @@ var DomainListItem = ({
10408
10429
  color: isDark ? "whiteAlpha.900" : "gray.700",
10409
10430
  fontSize: "md",
10410
10431
  fontWeight: "500",
10411
- children: chunkPTWGTINW_cjs.humanDomain(domain.name, 24, 0)
10432
+ children: chunkLMX37RCG_cjs.humanDomain(domain.name, 24, 0)
10412
10433
  }
10413
10434
  ),
10414
10435
  isCurrentDomain && /* @__PURE__ */ jsxRuntime.jsx(
@@ -10789,7 +10810,7 @@ var ChooseNameSummaryContent = ({
10789
10810
  );
10790
10811
  const { open: openUpgradeSmartAccountModal } = useUpgradeSmartAccountModal();
10791
10812
  const handleError = (error) => {
10792
- if (chunkPTWGTINW_cjs.isRejectionError(error)) {
10813
+ if (chunkLMX37RCG_cjs.isRejectionError(error)) {
10793
10814
  Analytics.nameSelection.dropOff("confirmation", {
10794
10815
  isError: true,
10795
10816
  name: fullDomain,
@@ -11202,7 +11223,7 @@ var CustomizationContent = ({
11202
11223
  setPreviewImageUrl(newPreviewUrl);
11203
11224
  const uploadedImage = await onUpload(file);
11204
11225
  if (!uploadedImage) throw new Error("Failed to compress image");
11205
- const ipfsHash = await chunkPTWGTINW_cjs.uploadBlobToIPFS(
11226
+ const ipfsHash = await chunkLMX37RCG_cjs.uploadBlobToIPFS(
11206
11227
  uploadedImage.file,
11207
11228
  file.name,
11208
11229
  network.type
@@ -11305,7 +11326,7 @@ var CustomizationContent = ({
11305
11326
  backgroundPosition: "center",
11306
11327
  position: "relative",
11307
11328
  h: "80px",
11308
- background: `no-repeat url('${chunkPTWGTINW_cjs.getPicassoImage(
11329
+ background: `no-repeat url('${chunkLMX37RCG_cjs.getPicassoImage(
11309
11330
  account?.address ?? ""
11310
11331
  )}')`,
11311
11332
  w: "100%",
@@ -11701,7 +11722,7 @@ var CustomizationSummaryContent = ({
11701
11722
  }
11702
11723
  },
11703
11724
  onError: (error) => {
11704
- if (error && chunkPTWGTINW_cjs.isRejectionError(error?.message ?? "")) {
11725
+ if (error && chunkLMX37RCG_cjs.isRejectionError(error?.message ?? "")) {
11705
11726
  Analytics.customization.dropOff({
11706
11727
  stage: "confirmation",
11707
11728
  reason: "wallet_rejected",
@@ -11792,14 +11813,14 @@ var CustomizationSummaryContent = ({
11792
11813
  if (changes.avatarIpfsHash) {
11793
11814
  queryClient.setQueryData(
11794
11815
  getAvatarQueryKey(domain, network.type),
11795
- chunkPTWGTINW_cjs.convertUriToUrl(
11816
+ chunkLMX37RCG_cjs.convertUriToUrl(
11796
11817
  "ipfs://" + changes.avatarIpfsHash,
11797
11818
  network.type
11798
11819
  )
11799
11820
  );
11800
11821
  queryClient.setQueryData(
11801
11822
  getAvatarOfAddressQueryKey(account?.address ?? ""),
11802
- chunkPTWGTINW_cjs.convertUriToUrl(
11823
+ chunkLMX37RCG_cjs.convertUriToUrl(
11803
11824
  "ipfs://" + changes.avatarIpfsHash,
11804
11825
  network.type
11805
11826
  )
@@ -12303,7 +12324,7 @@ var ManageCustomTokenContent = ({
12303
12324
  /* @__PURE__ */ jsxRuntime.jsx(
12304
12325
  react.Image,
12305
12326
  {
12306
- src: chunkPTWGTINW_cjs.TOKEN_LOGOS[token?.symbol],
12327
+ src: chunkLMX37RCG_cjs.TOKEN_LOGOS[token?.symbol],
12307
12328
  alt: `${token.symbol} logo`,
12308
12329
  boxSize: "20px",
12309
12330
  borderRadius: "full",
@@ -12333,7 +12354,7 @@ var ManageCustomTokenContent = ({
12333
12354
  ),
12334
12355
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "medium", children: token.symbol ?? "Unknown" })
12335
12356
  ] }),
12336
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { opacity: 0.7, children: chunkPTWGTINW_cjs.humanAddress(
12357
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { opacity: 0.7, children: chunkLMX37RCG_cjs.humanAddress(
12337
12358
  token.address ?? "",
12338
12359
  4,
12339
12360
  4
@@ -12421,7 +12442,7 @@ var ChangeCurrencyContent = ({
12421
12442
  _hover: { bg: "whiteAlpha.100" },
12422
12443
  children: [
12423
12444
  /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 3, children: [
12424
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xl", children: chunkPTWGTINW_cjs.CURRENCY_SYMBOLS[currency] }),
12445
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "xl", children: chunkLMX37RCG_cjs.CURRENCY_SYMBOLS[currency] }),
12425
12446
  /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: currency.toUpperCase() })
12426
12447
  ] }),
12427
12448
  currentCurrency === currency && /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: bs.BsCheck, boxSize: 5, color: "blue.500" })
@@ -12788,11 +12809,11 @@ var TermsAndPrivacyAccordion = () => {
12788
12809
  const { agreements, documents } = useLegalDocuments();
12789
12810
  const agreementsByDocumentType = React10.useMemo(() => {
12790
12811
  const userAgreements = agreements?.filter(
12791
- (agreement) => chunkPTWGTINW_cjs.compareAddresses(agreement.walletAddress, account?.address)
12812
+ (agreement) => chunkLMX37RCG_cjs.compareAddresses(agreement.walletAddress, account?.address)
12792
12813
  );
12793
12814
  const vechainKitDefaultTerms = {
12794
12815
  id: "vechain-kit-terms",
12795
- ...chunkPTWGTINW_cjs.VECHAIN_KIT_TERMS_CONFIG,
12816
+ ...chunkLMX37RCG_cjs.VECHAIN_KIT_TERMS_CONFIG,
12796
12817
  documentType: "terms" /* TERMS */,
12797
12818
  documentSource: "vechain-kit" /* VECHAIN_KIT */,
12798
12819
  walletAddress: account?.address ?? "",
@@ -13119,7 +13140,7 @@ var PrivyLinkedAccounts = ({ onBack }) => {
13119
13140
  case "phone":
13120
13141
  return account.number;
13121
13142
  case "wallet":
13122
- return `${chunkPTWGTINW_cjs.humanAddress(account.address)} - ${account.walletClientType}`;
13143
+ return `${chunkLMX37RCG_cjs.humanAddress(account.address)} - ${account.walletClientType}`;
13123
13144
  default:
13124
13145
  return "";
13125
13146
  }
@@ -13894,7 +13915,7 @@ var SharedAppCard = ({
13894
13915
  react.Image,
13895
13916
  {
13896
13917
  src: imageUrl,
13897
- fallbackSrc: chunkPTWGTINW_cjs.notFoundImage,
13918
+ fallbackSrc: chunkLMX37RCG_cjs.notFoundImage,
13898
13919
  alt: name,
13899
13920
  height: "90px",
13900
13921
  objectFit: "contain",
@@ -14016,7 +14037,7 @@ var ShortcutsSection = ({}) => {
14016
14037
  react.Image,
14017
14038
  {
14018
14039
  src: shortcut.image,
14019
- fallbackSrc: chunkPTWGTINW_cjs.notFoundImage,
14040
+ fallbackSrc: chunkLMX37RCG_cjs.notFoundImage,
14020
14041
  alt: shortcut.name,
14021
14042
  objectFit: "contain",
14022
14043
  rounded: "full"
@@ -14074,7 +14095,8 @@ var DEFAULT_APPS = [
14074
14095
  tweets: [],
14075
14096
  ve_world: {
14076
14097
  banner: "https://i.ibb.co/cgJBj83/vbd.png"
14077
- }
14098
+ },
14099
+ categories: []
14078
14100
  },
14079
14101
  {
14080
14102
  name: "vet.domains",
@@ -14088,7 +14110,8 @@ var DEFAULT_APPS = [
14088
14110
  tweets: [],
14089
14111
  ve_world: {
14090
14112
  banner: "https://vet.domains/assets/walletconnect.png"
14091
- }
14113
+ },
14114
+ categories: []
14092
14115
  }
14093
14116
  // {
14094
14117
  // name: 'VeChain Kit',
@@ -14514,7 +14537,7 @@ var TransactionModalContent = ({
14514
14537
  }
14515
14538
  };
14516
14539
  const statusConfig = getStatusConfig();
14517
- const socialDescription = `${chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`;
14540
+ const socialDescription = `${chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`;
14518
14541
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
14519
14542
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
14520
14543
  /* @__PURE__ */ jsxRuntime.jsx(react.ModalHeader, { children: statusConfig.title }),
@@ -14592,7 +14615,7 @@ var TransactionModalContent = ({
14592
14615
  uiConfig?.showExplorerButton && txReceipt?.meta.txID && /* @__PURE__ */ jsxRuntime.jsx(
14593
14616
  react.Link,
14594
14617
  {
14595
- href: `${chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
14618
+ href: `${chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
14596
14619
  isExternal: true,
14597
14620
  opacity: 0.5,
14598
14621
  fontSize: "14px",
@@ -14655,7 +14678,7 @@ var SuccessfulOperationContent = ({
14655
14678
  }) => {
14656
14679
  const { t } = reactI18next.useTranslation();
14657
14680
  const { network, darkMode } = useVeChainKitConfig();
14658
- const explorerUrl = chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl;
14681
+ const explorerUrl = chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl;
14659
14682
  const socialDescription = `${explorerUrl}/${txId}`;
14660
14683
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
14661
14684
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
@@ -15051,19 +15074,19 @@ var WalletDisplay = ({ variant }) => {
15051
15074
  return null;
15052
15075
  }
15053
15076
  if (variant === "iconAndDomain") {
15054
- return account.domain ? /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: chunkPTWGTINW_cjs.humanDomain(account?.domain ?? "", 16, 0) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: chunkPTWGTINW_cjs.humanAddress(account.address ?? "", 6, 4) });
15077
+ return account.domain ? /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: chunkLMX37RCG_cjs.humanDomain(account?.domain ?? "", 16, 0) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: chunkLMX37RCG_cjs.humanAddress(account.address ?? "", 6, 4) });
15055
15078
  }
15056
15079
  if (variant === "iconDomainAndAssets") {
15057
15080
  return /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { spacing: 4, children: [
15058
15081
  /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 0, alignItems: "flex-start", children: [
15059
- account.domain && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "bold", children: chunkPTWGTINW_cjs.humanDomain(account?.domain ?? "", 16, 0) }),
15082
+ account.domain && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "bold", children: chunkLMX37RCG_cjs.humanDomain(account?.domain ?? "", 16, 0) }),
15060
15083
  /* @__PURE__ */ jsxRuntime.jsx(
15061
15084
  react.Text,
15062
15085
  {
15063
15086
  fontSize: account.domain ? "xs" : "sm",
15064
15087
  opacity: account.domain ? 0.5 : 1,
15065
15088
  "data-testid": "trimmed-address",
15066
- children: chunkPTWGTINW_cjs.humanAddress(account.address ?? "", 4, 4)
15089
+ children: chunkLMX37RCG_cjs.humanAddress(account.address ?? "", 4, 4)
15067
15090
  }
15068
15091
  )
15069
15092
  ] }),
@@ -15071,13 +15094,13 @@ var WalletDisplay = ({ variant }) => {
15071
15094
  ] });
15072
15095
  }
15073
15096
  return /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 0, alignItems: "flex-start", children: [
15074
- account.domain && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "bold", children: chunkPTWGTINW_cjs.humanDomain(account?.domain ?? "", 16, 0) }),
15097
+ account.domain && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", fontWeight: "bold", children: chunkLMX37RCG_cjs.humanDomain(account?.domain ?? "", 16, 0) }),
15075
15098
  /* @__PURE__ */ jsxRuntime.jsx(
15076
15099
  react.Text,
15077
15100
  {
15078
15101
  fontSize: account.domain ? "xs" : "sm",
15079
15102
  opacity: account.domain ? 0.5 : 1,
15080
- children: chunkPTWGTINW_cjs.humanAddress(account.address ?? "", 4, 4)
15103
+ children: chunkLMX37RCG_cjs.humanAddress(account.address ?? "", 4, 4)
15081
15104
  }
15082
15105
  )
15083
15106
  ] });
@@ -15256,7 +15279,7 @@ var TransactionToastContent = ({
15256
15279
  }) => {
15257
15280
  const { t } = reactI18next.useTranslation();
15258
15281
  const { network } = useVeChainKitConfig();
15259
- const explorerUrl = chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl;
15282
+ const explorerUrl = chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl;
15260
15283
  const errorMessage = React10.useMemo(() => {
15261
15284
  if (!txError) return null;
15262
15285
  return txError.reason || t("Something went wrong. Please try again.");
@@ -15585,7 +15608,7 @@ var EcosystemContent = ({ onClose, appsInfo, isLoading }) => {
15585
15608
  onClose();
15586
15609
  } catch (error) {
15587
15610
  const errorMsg = error?.message;
15588
- if (errorMsg && chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
15611
+ if (errorMsg && chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
15589
15612
  Analytics.auth.dropOff("ecosystem-app-connect", {
15590
15613
  ...appName && { appName }
15591
15614
  });
@@ -15726,7 +15749,7 @@ var ProfileCard = ({
15726
15749
  const { account } = useWallet();
15727
15750
  const { network } = useVeChainKitConfig();
15728
15751
  const metadata = useWalletMetadata(address, network.type);
15729
- const headerImageSvg = chunkPTWGTINW_cjs.getPicassoImage(address);
15752
+ const headerImageSvg = chunkLMX37RCG_cjs.getPicassoImage(address);
15730
15753
  const isConnectedAccount = address === account?.address;
15731
15754
  const hasLinks = metadata?.records?.url || metadata?.records?.["com.x"] || metadata?.records?.email;
15732
15755
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { variant: "vechainKitBase", ...style?.card, children: [
@@ -15899,7 +15922,7 @@ var SuccessfulOperationContent2 = ({
15899
15922
  }) => {
15900
15923
  const { t } = reactI18next.useTranslation();
15901
15924
  const { network, darkMode } = useVeChainKitConfig();
15902
- const explorerUrl = chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl;
15925
+ const explorerUrl = chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl;
15903
15926
  const socialDescription = `${explorerUrl}/${txId}`;
15904
15927
  return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
15905
15928
  /* @__PURE__ */ jsxRuntime.jsxs(StickyHeaderContainer, { children: [
@@ -16540,7 +16563,7 @@ var useReceiveModal = () => {
16540
16563
  var ReceiveModalProvider = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
16541
16564
  var useLoginModalContent = () => {
16542
16565
  const { privy, loginMethods } = useVeChainKitConfig();
16543
- const isVeChainApp = privy?.appId === chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID;
16566
+ const isVeChainApp = privy?.appId === chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID;
16544
16567
  const isLoginMethodEnabled = (method13) => {
16545
16568
  if (!loginMethods) return true;
16546
16569
  if (Array.isArray(method13)) {
@@ -16806,7 +16829,7 @@ var useLoginWithOAuth2 = () => {
16806
16829
  });
16807
16830
  } catch (error) {
16808
16831
  const errorMsg = error instanceof Error ? error.message : "Unknown error";
16809
- if (chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
16832
+ if (chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
16810
16833
  Analytics.auth.dropOff("oauth", {
16811
16834
  ...provider && { provider }
16812
16835
  });
@@ -16849,16 +16872,16 @@ var useCrossAppConnectionCache = () => {
16849
16872
  var useLoginWithVeChain = () => {
16850
16873
  const { login: loginWithVeChain } = usePrivyCrossAppSdk();
16851
16874
  const { setConnectionCache } = useCrossAppConnectionCache();
16852
- const { data: appsInfo } = useFetchAppInfo([chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID]);
16875
+ const { data: appsInfo } = useFetchAppInfo([chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID]);
16853
16876
  const { user } = reactAuth.usePrivy();
16854
16877
  const login = async () => {
16855
16878
  try {
16856
16879
  Analytics.auth.methodSelected("vechain" /* VECHAIN */);
16857
- await loginWithVeChain(chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID);
16880
+ await loginWithVeChain(chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID);
16858
16881
  setConnectionCache({
16859
16882
  name: "VeChain",
16860
- logoUrl: appsInfo?.[chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID]?.logo_url,
16861
- appId: chunkPTWGTINW_cjs.VECHAIN_PRIVY_APP_ID,
16883
+ logoUrl: appsInfo?.[chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID]?.logo_url,
16884
+ appId: chunkLMX37RCG_cjs.VECHAIN_PRIVY_APP_ID,
16862
16885
  website: "https://governance.vebetterdao.org"
16863
16886
  });
16864
16887
  Analytics.auth.completed({
@@ -16867,7 +16890,7 @@ var useLoginWithVeChain = () => {
16867
16890
  });
16868
16891
  } catch (error) {
16869
16892
  const errorMsg = error instanceof Error ? error.message : "Unknown error";
16870
- if (chunkPTWGTINW_cjs.isRejectionError(errorMsg)) {
16893
+ if (chunkLMX37RCG_cjs.isRejectionError(errorMsg)) {
16871
16894
  Analytics.auth.dropOff("vechain-approval");
16872
16895
  } else {
16873
16896
  Analytics.auth.failed("vechain" /* VECHAIN */, errorMsg);
@@ -16969,6 +16992,14 @@ var useAppHubApps = () => {
16969
16992
  });
16970
16993
  };
16971
16994
  var getCallClauseQueryKey = ({
16995
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16996
+ abi: abi9,
16997
+ address,
16998
+ method: method13
16999
+ }) => ["callClause", address, method13];
17000
+ var getCallClauseQueryKeyWithArgs = ({
17001
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17002
+ abi: abi9,
16972
17003
  address,
16973
17004
  method: method13,
16974
17005
  args
@@ -16976,7 +17007,7 @@ var getCallClauseQueryKey = ({
16976
17007
  "callClause",
16977
17008
  address,
16978
17009
  method13,
16979
- ...args ? [args] : []
17010
+ ...args?.length ? [args] : []
16980
17011
  ];
16981
17012
  var useCallClause = ({
16982
17013
  address,
@@ -16987,12 +17018,13 @@ var useCallClause = ({
16987
17018
  }) => {
16988
17019
  const thor = dappKitReact.useThor();
16989
17020
  return reactQuery.useQuery({
16990
- queryKey: getCallClauseQueryKey({
17021
+ queryKey: getCallClauseQueryKeyWithArgs({
17022
+ abi: abi9,
16991
17023
  address,
16992
17024
  method: method13,
16993
17025
  args
16994
17026
  }),
16995
- queryFn: async () => chunkPTWGTINW_cjs.executeCallClause({
17027
+ queryFn: async () => chunkLMX37RCG_cjs.executeCallClause({
16996
17028
  thor,
16997
17029
  contractAddress: address,
16998
17030
  abi: abi9,
@@ -17006,7 +17038,7 @@ var useCallClause = ({
17006
17038
  // src/hooks/utils/useGetNodeUrl.ts
17007
17039
  var useGetNodeUrl = () => {
17008
17040
  const { network } = useVeChainKitConfig();
17009
- return network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl;
17041
+ return network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl;
17010
17042
  };
17011
17043
  var useIsPWA = () => {
17012
17044
  const [isPWA, setIsPWA] = React10.useState(true);
@@ -17139,7 +17171,7 @@ var getAccountImplementationAddress = async (thor, version, networkType) => {
17139
17171
  if (!networkType) throw new Error("Network type is required");
17140
17172
  if (!version) throw new Error("Version is required");
17141
17173
  const contract = thor.contracts.load(
17142
- chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17174
+ chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17143
17175
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17144
17176
  );
17145
17177
  let implementationAddressPromise;
@@ -17181,7 +17213,7 @@ var useAccountImplementationAddress = (version) => {
17181
17213
  var getCurrentAccountImplementationVersion = async (thor, networkType) => {
17182
17214
  if (!networkType) throw new Error("Network type is required");
17183
17215
  const res = await thor.contracts.load(
17184
- chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17216
+ chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17185
17217
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17186
17218
  ).read.currentAccountImplementationVersion();
17187
17219
  if (!res)
@@ -17208,7 +17240,7 @@ var getAccountAddress = async (thor, ownerAddress, networkType) => {
17208
17240
  if (!ownerAddress) throw new Error("Owner address is required");
17209
17241
  if (!networkType) throw new Error("Network type is required");
17210
17242
  const res = await thor.contracts.load(
17211
- chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17243
+ chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17212
17244
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17213
17245
  ).read.getAccountAddress(ownerAddress);
17214
17246
  if (!res)
@@ -17235,15 +17267,16 @@ var useGetAccountAddress = (ownerAddress) => {
17235
17267
 
17236
17268
  // src/hooks/thor/smartAccounts/useGetAccountVersion.ts
17237
17269
  var abi = chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi;
17238
- var getAccountVersionQueryKey = (accountAddress, ownerAddress, networkType) => getCallClauseQueryKey({
17239
- address: chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17270
+ var getAccountVersionQueryKey = (accountAddress, ownerAddress, networkType) => getCallClauseQueryKeyWithArgs({
17271
+ abi,
17272
+ address: chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17240
17273
  method: "getAccountVersion",
17241
17274
  args: [accountAddress, ownerAddress]
17242
17275
  });
17243
17276
  var useGetAccountVersion = (accountAddress, ownerAddress) => {
17244
17277
  const { network } = useVeChainKitConfig();
17245
17278
  return useCallClause({
17246
- address: chunkPTWGTINW_cjs.getConfig(network.type).accountFactoryAddress,
17279
+ address: chunkLMX37RCG_cjs.getConfig(network.type).accountFactoryAddress,
17247
17280
  abi,
17248
17281
  method: "getAccountVersion",
17249
17282
  args: [accountAddress, ownerAddress],
@@ -17262,10 +17295,10 @@ var method = "hasLegacyAccount";
17262
17295
  var getHasV1SmartAccount = async (thor, ownerAddress, networkType) => {
17263
17296
  if (!ownerAddress) throw new Error("Owner address is required");
17264
17297
  if (!networkType) throw new Error("Network type is required");
17265
- const [hasLegacyAccount] = await chunkPTWGTINW_cjs.executeCallClause({
17298
+ const [hasLegacyAccount] = await chunkLMX37RCG_cjs.executeCallClause({
17266
17299
  thor,
17267
17300
  abi: abi2,
17268
- contractAddress: chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17301
+ contractAddress: chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17269
17302
  method,
17270
17303
  args: [ownerAddress]
17271
17304
  });
@@ -17449,7 +17482,7 @@ var getSmartAccount = async (thor, network, ownerAddress) => {
17449
17482
  return { address: void 0 };
17450
17483
  }
17451
17484
  const res = await thor.contracts.load(
17452
- chunkPTWGTINW_cjs.getConfig(network).accountFactoryAddress,
17485
+ chunkLMX37RCG_cjs.getConfig(network).accountFactoryAddress,
17453
17486
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17454
17487
  ).read.getAccountAddress(ownerAddress);
17455
17488
  if (!res) {
@@ -17481,7 +17514,7 @@ var abi3 = chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi;
17481
17514
  var method2 = "version";
17482
17515
  var getVersion = async (thor, contractAddress) => {
17483
17516
  if (!contractAddress) throw new Error("Contract address is required");
17484
- const [version] = await chunkPTWGTINW_cjs.executeCallClause({
17517
+ const [version] = await chunkLMX37RCG_cjs.executeCallClause({
17485
17518
  thor,
17486
17519
  contractAddress,
17487
17520
  abi: abi3,
@@ -17506,12 +17539,12 @@ var useSmartAccountVersion = (contractAddress) => {
17506
17539
  };
17507
17540
  var getUpgradeRequired = async (thor, accountAddress, ownerAddress, targetVersion, networkType) => {
17508
17541
  const res = await thor.contracts.load(
17509
- chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17542
+ chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17510
17543
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17511
17544
  ).read.upgradeRequired(accountAddress, ownerAddress, targetVersion);
17512
17545
  if (!res)
17513
17546
  throw new Error(
17514
- `Failed to get upgrade required of contract address ${chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress}`
17547
+ `Failed to get upgrade required of contract address ${chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress}`
17515
17548
  );
17516
17549
  return res[0];
17517
17550
  };
@@ -17547,7 +17580,7 @@ var useUpgradeRequired = (accountAddress, ownerAddress, targetVersion) => {
17547
17580
  };
17548
17581
  var getUpgradeRequiredForAccount = async (thor, contractAddress, targetVersion, networkType) => {
17549
17582
  const res = await thor.contracts.load(
17550
- chunkPTWGTINW_cjs.getConfig(networkType).accountFactoryAddress,
17583
+ chunkLMX37RCG_cjs.getConfig(networkType).accountFactoryAddress,
17551
17584
  chunk5GZ7N47F_cjs.SimpleAccountFactory__factory.abi
17552
17585
  ).read.upgradeRequiredForAccount(contractAddress, targetVersion);
17553
17586
  if (!res)
@@ -17594,7 +17627,7 @@ var useUpgradeSmartAccount = ({
17594
17627
  const { refresh: refreshSmartAccountQueries } = useRefreshSmartAccountQueries();
17595
17628
  const { data: newImplementationAddress } = useAccountImplementationAddress(targetVersion);
17596
17629
  const buildClauses = React10.useCallback(async () => {
17597
- if (!smartAccountAddress || !chunkPTWGTINW_cjs.isValidAddress(smartAccountAddress)) {
17630
+ if (!smartAccountAddress || !chunkLMX37RCG_cjs.isValidAddress(smartAccountAddress)) {
17598
17631
  throw new Error("Invalid smart account address");
17599
17632
  }
17600
17633
  if (!newImplementationAddress) {
@@ -17625,7 +17658,7 @@ var useUpgradeSmartAccount = ({
17625
17658
  const result = useSendTransaction({
17626
17659
  privyUIOptions: {
17627
17660
  title: "Upgrade Smart Account",
17628
- description: `Upgrading your account at ${chunkPTWGTINW_cjs.humanAddress(
17661
+ description: `Upgrading your account at ${chunkLMX37RCG_cjs.humanAddress(
17629
17662
  smartAccountAddress
17630
17663
  )} to version ${targetVersion}`,
17631
17664
  buttonText: "Sign to continue"
@@ -17643,7 +17676,7 @@ var useUpgradeSmartAccount = ({
17643
17676
  };
17644
17677
  };
17645
17678
  var currentBlockQueryKey = () => ["VECHAIN_KIT", "CURRENT_BLOCK"];
17646
- var REFETCH_INTERVAL = 10 * chunkPTWGTINW_cjs.TIME.SECOND;
17679
+ var REFETCH_INTERVAL = 10 * chunkLMX37RCG_cjs.TIME.SECOND;
17647
17680
  var useCurrentBlock = () => {
17648
17681
  const thor = dappKitReact.useThor();
17649
17682
  return reactQuery.useQuery({
@@ -17674,11 +17707,11 @@ var useGetChainId = () => {
17674
17707
  });
17675
17708
  };
17676
17709
  var getB3trBalance = async (thor, network, address) => {
17677
- const res = await thor.contracts.load(chunkPTWGTINW_cjs.getConfig(network).b3trContractAddress, chunk5GZ7N47F_cjs.B3TR__factory.abi).read.balanceOf(address);
17710
+ const res = await thor.contracts.load(chunkLMX37RCG_cjs.getConfig(network).b3trContractAddress, chunk5GZ7N47F_cjs.B3TR__factory.abi).read.balanceOf(address);
17678
17711
  if (!res) throw new Error("Failed to get b3tr balance");
17679
17712
  const original = res[0].toString();
17680
17713
  const scaled = ethers.formatEther(original);
17681
- const formatted = scaled === "0" ? "0" : chunkPTWGTINW_cjs.humanNumber(scaled);
17714
+ const formatted = scaled === "0" ? "0" : chunkLMX37RCG_cjs.humanNumber(scaled);
17682
17715
  return {
17683
17716
  original,
17684
17717
  scaled,
@@ -17704,7 +17737,7 @@ var getCustomTokenBalance = async (thor, token, address) => {
17704
17737
  if (!res) throw new Error(`Failed to get balance of ${token.address}`);
17705
17738
  const original = res[0];
17706
17739
  const scaled = viem.formatEther(BigInt(original));
17707
- const formatted = scaled === "0" ? "0" : chunkPTWGTINW_cjs.humanNumber(scaled);
17740
+ const formatted = scaled === "0" ? "0" : chunkLMX37RCG_cjs.humanNumber(scaled);
17708
17741
  return {
17709
17742
  ...token,
17710
17743
  original: original.toString(),
@@ -17767,7 +17800,7 @@ var getErc20Balance = async (thor, tokenAddress, address) => {
17767
17800
  if (!res) throw new Error(`Failed to get balance of ${tokenAddress}`);
17768
17801
  const original = res[0].toString();
17769
17802
  const scaled = ethers.formatEther(original);
17770
- const formatted = scaled === "0" ? "0" : chunkPTWGTINW_cjs.humanNumber(scaled);
17803
+ const formatted = scaled === "0" ? "0" : chunkLMX37RCG_cjs.humanNumber(scaled);
17771
17804
  return {
17772
17805
  original,
17773
17806
  scaled,
@@ -17785,14 +17818,14 @@ var useGetErc20Balance = (tokenAddress, address) => {
17785
17818
  };
17786
17819
  var getVeDelegateBalance = async (thor, network, address) => {
17787
17820
  const res = await thor.contracts.load(
17788
- chunkPTWGTINW_cjs.getConfig(network).veDelegateTokenContractAddress,
17821
+ chunkLMX37RCG_cjs.getConfig(network).veDelegateTokenContractAddress,
17789
17822
  chunk5GZ7N47F_cjs.IERC20__factory.abi
17790
17823
  ).read.balanceOf(address);
17791
17824
  if (!res)
17792
17825
  throw new Error(`Failed to get veDelegate balance for ${address}`);
17793
17826
  const original = res[0].toString();
17794
17827
  const scaled = ethers.formatEther(original);
17795
- const formatted = scaled === "0" ? "0" : chunkPTWGTINW_cjs.humanNumber(scaled);
17828
+ const formatted = scaled === "0" ? "0" : chunkLMX37RCG_cjs.humanNumber(scaled);
17796
17829
  return {
17797
17830
  original,
17798
17831
  scaled,
@@ -17819,7 +17852,7 @@ var getTokensInfoByOwnerQueryKey = (owner) => [
17819
17852
  ];
17820
17853
  var useGalaxyMemberTokensInfo = (owner, size = 10) => {
17821
17854
  const { network } = useVeChainKitConfig();
17822
- const contractAddress = chunkPTWGTINW_cjs.getConfig(network.type).galaxyMemberContractAddress;
17855
+ const contractAddress = chunkLMX37RCG_cjs.getConfig(network.type).galaxyMemberContractAddress;
17823
17856
  const thor = dappKitReact.useThor();
17824
17857
  const fetchTokens = async ({ pageParam = 0 }) => {
17825
17858
  const data = await thor.contracts.load(contractAddress, chunk5GZ7N47F_cjs.GalaxyMember__factory.abi).read.getTokensInfoByOwner(owner, pageParam, size);
@@ -17841,14 +17874,15 @@ var useGalaxyMemberTokensInfo = (owner, size = 10) => {
17841
17874
  // src/hooks/thor/contracts/NodeManagement/useGetUserNodes.ts
17842
17875
  var contractAbi = chunk5GZ7N47F_cjs.NodeManagement__factory.abi;
17843
17876
  var method3 = "getUserNodes";
17844
- var getUserNodesQueryKey = (networkType, user) => getCallClauseQueryKey({
17845
- address: chunkPTWGTINW_cjs.getConfig(networkType).nodeManagementContractAddress,
17877
+ var getUserNodesQueryKey = (networkType, user) => getCallClauseQueryKeyWithArgs({
17878
+ abi: contractAbi,
17879
+ address: chunkLMX37RCG_cjs.getConfig(networkType).nodeManagementContractAddress,
17846
17880
  method: method3,
17847
17881
  args: [user]
17848
17882
  });
17849
17883
  var useGetUserNodes = (userInput) => {
17850
17884
  const { network } = useVeChainKitConfig();
17851
- const contractAddress = chunkPTWGTINW_cjs.getConfig(
17885
+ const contractAddress = chunkLMX37RCG_cjs.getConfig(
17852
17886
  network.type
17853
17887
  ).nodeManagementContractAddress;
17854
17888
  return useCallClause({
@@ -17883,7 +17917,7 @@ var PRICE_FEED_IDS = {
17883
17917
  };
17884
17918
  var getTokenUsdPrice = async (thor, token, network) => {
17885
17919
  const res = await thor.contracts.load(
17886
- chunkPTWGTINW_cjs.getConfig(network).oracleContractAddress,
17920
+ chunkLMX37RCG_cjs.getConfig(network).oracleContractAddress,
17887
17921
  chunk5GZ7N47F_cjs.IVechainEnergyOracleV1__factory.abi
17888
17922
  ).read.getLatestValue(PRICE_FEED_IDS[token]);
17889
17923
  if (!res) throw new Error(`Failed to get price of ${token}`);
@@ -17903,11 +17937,11 @@ var useGetTokenUsdPrice = (token) => {
17903
17937
  });
17904
17938
  };
17905
17939
  var getVot3Balance = async (thor, network, address) => {
17906
- const res = await thor.contracts.load(chunkPTWGTINW_cjs.getConfig(network).vot3ContractAddress, chunk5GZ7N47F_cjs.IVOT3__factory.abi).read.balanceOf(address);
17940
+ const res = await thor.contracts.load(chunkLMX37RCG_cjs.getConfig(network).vot3ContractAddress, chunk5GZ7N47F_cjs.VOT3__factory.abi).read.balanceOf(address);
17907
17941
  if (!res) throw new Error("Reverted");
17908
17942
  const original = res[0].toString();
17909
17943
  const scaled = ethers.formatEther(original);
17910
- const formatted = scaled === "0" ? "0" : chunkPTWGTINW_cjs.humanNumber(scaled);
17944
+ const formatted = scaled === "0" ? "0" : chunkLMX37RCG_cjs.humanNumber(scaled);
17911
17945
  return {
17912
17946
  original,
17913
17947
  scaled,
@@ -17923,7 +17957,7 @@ var useGetVot3Balance = (address) => {
17923
17957
  const thor = dappKitReact.useThor();
17924
17958
  const { network } = useVeChainKitConfig();
17925
17959
  return reactQuery.useQuery({
17926
- queryKey: getVot3BalanceQueryKey(address),
17960
+ queryKey: getVot3BalanceQueryKey(address || ""),
17927
17961
  queryFn: async () => getVot3Balance(thor, network.type, address),
17928
17962
  enabled: !!thor && !!address && !!network.type
17929
17963
  });
@@ -17931,8 +17965,9 @@ var useGetVot3Balance = (address) => {
17931
17965
  var contractAbi2 = chunk5GZ7N47F_cjs.VeBetterPassport__factory.abi;
17932
17966
  var method4 = "isPerson";
17933
17967
  var getIsPersonQueryKey = (networkType, user) => {
17934
- const veBetterPassportContractAddress = chunkPTWGTINW_cjs.getConfig(networkType).veBetterPassportContractAddress;
17935
- return getCallClauseQueryKey({
17968
+ const veBetterPassportContractAddress = chunkLMX37RCG_cjs.getConfig(networkType).veBetterPassportContractAddress;
17969
+ return getCallClauseQueryKeyWithArgs({
17970
+ abi: contractAbi2,
17936
17971
  address: veBetterPassportContractAddress,
17937
17972
  method: method4,
17938
17973
  args: [user]
@@ -17940,7 +17975,7 @@ var getIsPersonQueryKey = (networkType, user) => {
17940
17975
  };
17941
17976
  var useIsPerson = (user, customEnabled = true) => {
17942
17977
  const { network } = useVeChainKitConfig();
17943
- const veBetterPassportContractAddress = chunkPTWGTINW_cjs.getConfig(
17978
+ const veBetterPassportContractAddress = chunkLMX37RCG_cjs.getConfig(
17944
17979
  network.type
17945
17980
  ).veBetterPassportContractAddress;
17946
17981
  return useCallClause({
@@ -17960,8 +17995,9 @@ var useIsUserPerson = (address) => {
17960
17995
  var contractAbi3 = chunk5GZ7N47F_cjs.VeBetterPassport__factory.abi;
17961
17996
  var method5 = "isPersonAtTimepoint";
17962
17997
  var getIsPersonAtTimepointQueryKey = (networkType, user, timepoint) => {
17963
- const veBetterPassportContractAddress = chunkPTWGTINW_cjs.getConfig(networkType).veBetterPassportContractAddress;
17964
- return getCallClauseQueryKey({
17998
+ const veBetterPassportContractAddress = chunkLMX37RCG_cjs.getConfig(networkType).veBetterPassportContractAddress;
17999
+ return getCallClauseQueryKeyWithArgs({
18000
+ abi: contractAbi3,
17965
18001
  address: veBetterPassportContractAddress,
17966
18002
  method: method5,
17967
18003
  args: [user, Number(timepoint)]
@@ -17969,7 +18005,7 @@ var getIsPersonAtTimepointQueryKey = (networkType, user, timepoint) => {
17969
18005
  };
17970
18006
  var useIsPersonAtTimepoint = (user, timepoint, customEnabled = true) => {
17971
18007
  const { network } = useVeChainKitConfig();
17972
- const veBetterPassportContractAddress = chunkPTWGTINW_cjs.getConfig(
18008
+ const veBetterPassportContractAddress = chunkLMX37RCG_cjs.getConfig(
17973
18009
  network.type
17974
18010
  ).veBetterPassportContractAddress;
17975
18011
  return useCallClause({
@@ -17991,15 +18027,16 @@ var useIsPersonAtTimepoint = (user, timepoint, customEnabled = true) => {
17991
18027
  var contractAbi4 = chunk5GZ7N47F_cjs.VeBetterPassport__factory.abi;
17992
18028
  var method6 = "signaledCounter";
17993
18029
  var getUserBotSignalsQueryKey = (networkType, userAddress) => {
17994
- return getCallClauseQueryKey({
17995
- address: chunkPTWGTINW_cjs.getConfig(networkType).veBetterPassportContractAddress,
18030
+ return getCallClauseQueryKeyWithArgs({
18031
+ abi: contractAbi4,
18032
+ address: chunkLMX37RCG_cjs.getConfig(networkType).veBetterPassportContractAddress,
17996
18033
  method: method6,
17997
18034
  args: [userAddress]
17998
18035
  });
17999
18036
  };
18000
18037
  var useUserBotSignals = (userAddressInput) => {
18001
18038
  const { network } = useVeChainKitConfig();
18002
- const veBetterPassportContractAddress = chunkPTWGTINW_cjs.getConfig(
18039
+ const veBetterPassportContractAddress = chunkLMX37RCG_cjs.getConfig(
18003
18040
  network.type
18004
18041
  ).veBetterPassportContractAddress;
18005
18042
  return useCallClause({
@@ -18017,7 +18054,7 @@ var useVotingRewards = (currentRoundId, voter) => {
18017
18054
  const thor = dappKitReact.useThor();
18018
18055
  const queryClient = reactQuery.useQueryClient();
18019
18056
  const { network } = useVeChainKitConfig();
18020
- const contractAddress = chunkPTWGTINW_cjs.getConfig(network.type).voterRewardsContractAddress;
18057
+ const contractAddress = chunkLMX37RCG_cjs.getConfig(network.type).voterRewardsContractAddress;
18021
18058
  const rounds = React10.useMemo(() => {
18022
18059
  return Array.from(
18023
18060
  { length: parseInt(currentRoundId ?? "0") - 1 },
@@ -18081,7 +18118,7 @@ var getRoundRewardQueryKey = (roundId, address) => [
18081
18118
  var useRoundReward = (address, roundId) => {
18082
18119
  const { network } = useVeChainKitConfig();
18083
18120
  return useCallClause({
18084
- address: chunkPTWGTINW_cjs.getConfig(network.type).voterRewardsContractAddress,
18121
+ address: chunkLMX37RCG_cjs.getConfig(network.type).voterRewardsContractAddress,
18085
18122
  abi: chunk5GZ7N47F_cjs.VoterRewards__factory.abi,
18086
18123
  method: "getReward",
18087
18124
  args: [BigInt(roundId || 0), address],
@@ -18089,7 +18126,7 @@ var useRoundReward = (address, roundId) => {
18089
18126
  enabled: !!address && !!roundId && !!network.type,
18090
18127
  select: (data) => ({
18091
18128
  roundId,
18092
- rewards: viem.formatEther(data[0])
18129
+ rewards: viem.formatEther(BigInt(data[0]))
18093
18130
  })
18094
18131
  }
18095
18132
  });
@@ -18097,7 +18134,7 @@ var useRoundReward = (address, roundId) => {
18097
18134
 
18098
18135
  // src/hooks/thor/contracts/X2EarnApps/utils/getXAppMetadata.ts
18099
18136
  var getXAppMetadata = async (uri, networkType) => {
18100
- const url = chunkPTWGTINW_cjs.convertUriToUrl(uri, networkType);
18137
+ const url = chunkLMX37RCG_cjs.convertUriToUrl(uri, networkType);
18101
18138
  if (!url) return void 0;
18102
18139
  const response = await fetch(url);
18103
18140
  if (!response.ok) {
@@ -18109,7 +18146,7 @@ var getXAppMetadata = async (uri, networkType) => {
18109
18146
  // src/hooks/thor/contracts/X2EarnApps/utils/getXApps.ts
18110
18147
  var getXApps = async (thor, networkType) => {
18111
18148
  const contract = thor.contracts.load(
18112
- chunkPTWGTINW_cjs.getConfig(networkType).x2EarnAppsContractAddress,
18149
+ chunkLMX37RCG_cjs.getConfig(networkType).x2EarnAppsContractAddress,
18113
18150
  chunk5GZ7N47F_cjs.X2EarnApps__factory.abi
18114
18151
  );
18115
18152
  const clauses = [contract.clause.unendorsedApps(), contract.clause.apps()];
@@ -18158,9 +18195,9 @@ var abi4 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi;
18158
18195
  var method7 = "getAppsOfRound";
18159
18196
  var getRoundXApps = async (thor, networkType, roundId) => {
18160
18197
  if (!roundId) return [];
18161
- const [xApps] = await chunkPTWGTINW_cjs.executeCallClause({
18198
+ const [xApps] = await chunkLMX37RCG_cjs.executeCallClause({
18162
18199
  thor,
18163
- contractAddress: chunkPTWGTINW_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18200
+ contractAddress: chunkLMX37RCG_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18164
18201
  abi: abi4,
18165
18202
  method: method7,
18166
18203
  args: [BigInt(roundId)]
@@ -18190,7 +18227,7 @@ var useRoundXApps = (roundId) => {
18190
18227
  });
18191
18228
  };
18192
18229
  var getUserVotesInRound = async (thor, network, roundId, address) => {
18193
- const xAllocationVotingContract = chunkPTWGTINW_cjs.getConfig(network).xAllocationVotingContractAddress;
18230
+ const xAllocationVotingContract = chunkLMX37RCG_cjs.getConfig(network).xAllocationVotingContractAddress;
18194
18231
  const eventAbi = thor.contracts.load(xAllocationVotingContract, chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi).getEventAbi("AllocationVoteCast");
18195
18232
  const topics = eventAbi.encodeFilterTopicsNoNull({
18196
18233
  ...address ? { voter: address } : {},
@@ -18212,14 +18249,14 @@ var getUserVotesInRound = async (thor, network, roundId, address) => {
18212
18249
  const events = await getAllEventLogs({
18213
18250
  thor,
18214
18251
  filterCriteria,
18215
- nodeUrl: chunkPTWGTINW_cjs.getConfig(network).nodeUrl
18252
+ nodeUrl: chunkLMX37RCG_cjs.getConfig(network).nodeUrl
18216
18253
  });
18217
18254
  const decodedAllocatedVoteEvents = [];
18218
18255
  events.forEach((event) => {
18219
18256
  if (!event.decodedData) {
18220
18257
  throw new Error("Event data not decoded");
18221
18258
  }
18222
- if (!chunkPTWGTINW_cjs.compareAddresses(event.address, xAllocationVotingContract)) {
18259
+ if (!chunkLMX37RCG_cjs.compareAddresses(event.address, xAllocationVotingContract)) {
18223
18260
  throw new Error("Event address not valid");
18224
18261
  }
18225
18262
  const [voter, roundId2, appsIds, voteWeights] = event.decodedData;
@@ -18326,7 +18363,7 @@ var useXAppsShares = (apps, roundId) => {
18326
18363
  queryKey: getXAppsSharesQueryKey(roundId),
18327
18364
  queryFn: async () => {
18328
18365
  const contract = thor.contracts.load(
18329
- chunkPTWGTINW_cjs.getConfig(network.type).xAllocationPoolContractAddress,
18366
+ chunkLMX37RCG_cjs.getConfig(network.type).xAllocationPoolContractAddress,
18330
18367
  chunk5GZ7N47F_cjs.XAllocationPool__factory.abi
18331
18368
  );
18332
18369
  const clauses = apps.map(
@@ -18378,16 +18415,17 @@ var useMostVotedAppsInRound = (roundId) => {
18378
18415
  // src/hooks/thor/contracts/X2EarnApps/useXAppsMetadataBaseUri.ts
18379
18416
  var abi5 = chunk5GZ7N47F_cjs.X2EarnApps__factory.abi;
18380
18417
  var method8 = "baseURI";
18381
- var getXAppsMetadataBaseUriQueryKey = (network) => getCallClauseQueryKey({
18418
+ var getXAppsMetadataBaseUriQueryKey = (network) => getCallClauseQueryKeyWithArgs({
18419
+ abi: abi5,
18382
18420
  method: method8,
18383
- address: chunkPTWGTINW_cjs.getConfig(network).x2EarnAppsContractAddress,
18421
+ address: chunkLMX37RCG_cjs.getConfig(network).x2EarnAppsContractAddress,
18384
18422
  args: []
18385
18423
  });
18386
18424
  var useXAppsMetadataBaseUri = () => {
18387
18425
  const { network } = useVeChainKitConfig();
18388
18426
  return useCallClause({
18389
18427
  abi: abi5,
18390
- address: chunkPTWGTINW_cjs.getConfig(network.type).x2EarnAppsContractAddress,
18428
+ address: chunkLMX37RCG_cjs.getConfig(network.type).x2EarnAppsContractAddress,
18391
18429
  method: method8,
18392
18430
  args: [],
18393
18431
  queryOptions: {
@@ -18399,7 +18437,7 @@ var useXAppsMetadataBaseUri = () => {
18399
18437
  };
18400
18438
  var getXAppRoundEarnings = async (thor, roundId, xAppId, networkType) => {
18401
18439
  const res = await thor.contracts.load(
18402
- chunkPTWGTINW_cjs.getConfig(networkType).xAllocationPoolContractAddress,
18440
+ chunkLMX37RCG_cjs.getConfig(networkType).xAllocationPoolContractAddress,
18403
18441
  chunk5GZ7N47F_cjs.XAllocationPool__factory.abi
18404
18442
  ).read.roundEarnings(roundId, xAppId);
18405
18443
  if (!res)
@@ -18450,7 +18488,7 @@ var useMultipleXAppRoundEarnings = (roundId, xAppIds) => {
18450
18488
  queryFn: () => getRoundXApps(thor, network.type, roundId),
18451
18489
  queryKey: getRoundXAppsQueryKey(roundId)
18452
18490
  });
18453
- const xAllocationPoolContract = chunkPTWGTINW_cjs.getConfig(
18491
+ const xAllocationPoolContract = chunkLMX37RCG_cjs.getConfig(
18454
18492
  network.type
18455
18493
  ).xAllocationPoolContractAddress;
18456
18494
  const xAppsInRound = data.filter((app) => xAppIds.includes(app.id));
@@ -18502,7 +18540,7 @@ var useXAppTotalEarnings = (roundIds, appId) => {
18502
18540
  queryKey: getXAppTotalEarningsQueryKey(lastRound, appId),
18503
18541
  queryFn: async () => {
18504
18542
  const contract = thor.contracts.load(
18505
- chunkPTWGTINW_cjs.getConfig(network.type).xAllocationPoolContractAddress,
18543
+ chunkLMX37RCG_cjs.getConfig(network.type).xAllocationPoolContractAddress,
18506
18544
  chunk5GZ7N47F_cjs.XAllocationPool__factory.abi
18507
18545
  );
18508
18546
  const clauses = roundIds.map(
@@ -18546,16 +18584,17 @@ var RoundState = {
18546
18584
  };
18547
18585
  var abi6 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi;
18548
18586
  var method9 = "state";
18549
- var getAllocationsRoundStateQueryKey = (roundId, network) => getCallClauseQueryKey({
18587
+ var getAllocationsRoundStateQueryKey = (roundId, network) => getCallClauseQueryKeyWithArgs({
18588
+ abi: abi6,
18550
18589
  method: method9,
18551
- address: chunkPTWGTINW_cjs.getConfig(network).xAllocationVotingContractAddress,
18590
+ address: chunkLMX37RCG_cjs.getConfig(network).xAllocationVotingContractAddress,
18552
18591
  args: [BigInt(roundId || 0)]
18553
18592
  });
18554
18593
  var useAllocationsRoundState = (roundId) => {
18555
18594
  const { network } = useVeChainKitConfig();
18556
18595
  return useCallClause({
18557
18596
  abi: abi6,
18558
- address: chunkPTWGTINW_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18597
+ address: chunkLMX37RCG_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18559
18598
  method: method9,
18560
18599
  args: [BigInt(roundId || 0)],
18561
18600
  queryOptions: {
@@ -18568,16 +18607,17 @@ var useAllocationsRoundState = (roundId) => {
18568
18607
  // src/hooks/thor/contracts/XAllocationVoting/useCurrentAllocationsRoundId.ts
18569
18608
  var abi7 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi;
18570
18609
  var method10 = "currentRoundId";
18571
- var getCurrentAllocationsRoundIdQueryKey = (network) => getCallClauseQueryKey({
18610
+ var getCurrentAllocationsRoundIdQueryKey = (network) => getCallClauseQueryKeyWithArgs({
18611
+ abi: abi7,
18572
18612
  method: method10,
18573
- address: chunkPTWGTINW_cjs.getConfig(network).xAllocationVotingContractAddress,
18613
+ address: chunkLMX37RCG_cjs.getConfig(network).xAllocationVotingContractAddress,
18574
18614
  args: []
18575
18615
  });
18576
18616
  var useCurrentAllocationsRoundId = () => {
18577
18617
  const { network } = useVeChainKitConfig();
18578
18618
  return useCallClause({
18579
18619
  abi: abi7,
18580
- address: chunkPTWGTINW_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18620
+ address: chunkLMX37RCG_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18581
18621
  method: method10,
18582
18622
  args: [],
18583
18623
  queryOptions: {
@@ -18590,8 +18630,9 @@ var useCurrentAllocationsRoundId = () => {
18590
18630
  // src/hooks/thor/contracts/XAllocationVoting/useHasVotedInRound.ts
18591
18631
  var method11 = "hasVoted";
18592
18632
  var abi8 = chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi;
18593
- var getHasVotedInRoundQueryKey = (roundId, address, networkType) => getCallClauseQueryKey({
18594
- address: chunkPTWGTINW_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18633
+ var getHasVotedInRoundQueryKey = (roundId, address, networkType) => getCallClauseQueryKeyWithArgs({
18634
+ abi: abi8,
18635
+ address: chunkLMX37RCG_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18595
18636
  method: method11,
18596
18637
  args: [BigInt(roundId || 0), address]
18597
18638
  });
@@ -18599,7 +18640,7 @@ var useHasVotedInRound = (roundId, address) => {
18599
18640
  const { network } = useVeChainKitConfig();
18600
18641
  return useCallClause({
18601
18642
  abi: abi8,
18602
- address: chunkPTWGTINW_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18643
+ address: chunkLMX37RCG_cjs.getConfig(network.type).xAllocationVotingContractAddress,
18603
18644
  method: method11,
18604
18645
  args: [BigInt(roundId || 0), address],
18605
18646
  queryOptions: {
@@ -18609,7 +18650,7 @@ var useHasVotedInRound = (roundId, address) => {
18609
18650
  });
18610
18651
  };
18611
18652
  var getAllocationsRoundsEvents = async (thor, networkType) => {
18612
- const xAllocationVotingContract = chunkPTWGTINW_cjs.getConfig(networkType).xAllocationVotingContractAddress;
18653
+ const xAllocationVotingContract = chunkLMX37RCG_cjs.getConfig(networkType).xAllocationVotingContractAddress;
18613
18654
  const eventAbi = thor.contracts.load(xAllocationVotingContract, chunk5GZ7N47F_cjs.XAllocationVoting__factory.abi).getEventAbi("RoundCreated");
18614
18655
  const events = await getAllEventLogs({
18615
18656
  thor,
@@ -18622,14 +18663,14 @@ var getAllocationsRoundsEvents = async (thor, networkType) => {
18622
18663
  eventAbi
18623
18664
  }
18624
18665
  ],
18625
- nodeUrl: chunkPTWGTINW_cjs.getConfig(networkType).nodeUrl
18666
+ nodeUrl: chunkLMX37RCG_cjs.getConfig(networkType).nodeUrl
18626
18667
  });
18627
18668
  const decodedCreatedAllocationEvents = [];
18628
18669
  events.forEach((event) => {
18629
18670
  if (!event.decodedData) {
18630
18671
  throw new Error("Event data not decoded");
18631
18672
  }
18632
- if (!chunkPTWGTINW_cjs.compareAddresses(event.address, xAllocationVotingContract)) {
18673
+ if (!chunkLMX37RCG_cjs.compareAddresses(event.address, xAllocationVotingContract)) {
18633
18674
  throw new Error("Event address not valid");
18634
18675
  }
18635
18676
  const [roundId, proposer, voteStart, voteEnd, appsIds] = event.decodedData;
@@ -18697,7 +18738,7 @@ var useAllocationsRound = (roundId) => {
18697
18738
  const isLoading = currentAllocationId.isLoading || allocationRoundsEvents.isLoading || currentAllocationState.isLoading;
18698
18739
  const isError = currentAllocationId.isError || allocationRoundsEvents.isError || currentAllocationState.isError;
18699
18740
  const error = currentAllocationId.error || allocationRoundsEvents.error || currentAllocationState.error;
18700
- const blockTime = chunkPTWGTINW_cjs.getConfig(network.type).network.blockTime;
18741
+ const blockTime = chunkLMX37RCG_cjs.getConfig(network.type).network.blockTime;
18701
18742
  const estimatedEndTime = React10.useMemo(() => {
18702
18743
  if (!currentAllocationRound) return null;
18703
18744
  const endBlock = Number(currentAllocationRound.voteEnd);
@@ -18732,14 +18773,15 @@ var useAllocationsRound = (roundId) => {
18732
18773
  };
18733
18774
  var contractAbi5 = chunk5GZ7N47F_cjs.XAllocationVotingGovernor__factory.abi;
18734
18775
  var method12 = "getAppVotes";
18735
- var getXAppVotesQueryKey = (networkType, roundId, appId) => getCallClauseQueryKey({
18736
- address: chunkPTWGTINW_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18776
+ var getXAppVotesQueryKey = (networkType, roundId, appId) => getCallClauseQueryKeyWithArgs({
18777
+ abi: contractAbi5,
18778
+ address: chunkLMX37RCG_cjs.getConfig(networkType).xAllocationVotingContractAddress,
18737
18779
  method: method12,
18738
18780
  args: [BigInt(roundId || 0), appId]
18739
18781
  });
18740
18782
  var useXAppVotes = (roundId, appId) => {
18741
18783
  const { network } = useVeChainKitConfig();
18742
- const contractAddress = chunkPTWGTINW_cjs.getConfig(
18784
+ const contractAddress = chunkLMX37RCG_cjs.getConfig(
18743
18785
  network.type
18744
18786
  ).xAllocationVotingContractAddress;
18745
18787
  return useCallClause({
@@ -18749,7 +18791,7 @@ var useXAppVotes = (roundId, appId) => {
18749
18791
  args: [BigInt(roundId || 0), appId],
18750
18792
  queryOptions: {
18751
18793
  enabled: !!roundId && !!appId && !!network.type,
18752
- select: (res) => viem.formatEther(res[0])
18794
+ select: (res) => viem.formatEther(BigInt(res[0]))
18753
18795
  }
18754
18796
  });
18755
18797
  };
@@ -19012,7 +19054,7 @@ var useTransferERC20 = ({
19012
19054
  const queryClient = reactQuery.useQueryClient();
19013
19055
  const { refresh } = useRefreshBalances();
19014
19056
  const buildClauses = React10.useCallback(async () => {
19015
- if (!receiverAddress || !amount || !chunkPTWGTINW_cjs.isValidAddress(receiverAddress))
19057
+ if (!receiverAddress || !amount || !chunkLMX37RCG_cjs.isValidAddress(receiverAddress))
19016
19058
  throw new Error("Invalid receiver address or amount");
19017
19059
  const clausesArray = [];
19018
19060
  clausesArray.push({
@@ -19035,7 +19077,7 @@ var useTransferERC20 = ({
19035
19077
  signerAccountAddress: fromAddress,
19036
19078
  privyUIOptions: {
19037
19079
  title: "Confirm Transfer",
19038
- description: `Transfer ${amount} ${tokenName} to ${chunkPTWGTINW_cjs.humanAddress(
19080
+ description: `Transfer ${amount} ${tokenName} to ${chunkLMX37RCG_cjs.humanAddress(
19039
19081
  receiverAddress
19040
19082
  )}`,
19041
19083
  buttonText: "Sign to continue"
@@ -19061,7 +19103,7 @@ var useTransferVET = ({
19061
19103
  }) => {
19062
19104
  const { refresh } = useRefreshBalances();
19063
19105
  const buildClauses = React10.useCallback(async () => {
19064
- if (!receiverAddress || !amount || !chunkPTWGTINW_cjs.isValidAddress(receiverAddress))
19106
+ if (!receiverAddress || !amount || !chunkLMX37RCG_cjs.isValidAddress(receiverAddress))
19065
19107
  throw new Error("Invalid receiver address or amount");
19066
19108
  if (isNaN(Number(amount))) {
19067
19109
  throw new Error("Invalid amount");
@@ -19085,7 +19127,7 @@ var useTransferVET = ({
19085
19127
  signerAccountAddress: fromAddress,
19086
19128
  privyUIOptions: {
19087
19129
  title: "Confirm Transfer",
19088
- description: `Transfer ${amount} VET to ${chunkPTWGTINW_cjs.humanAddress(
19130
+ description: `Transfer ${amount} VET to ${chunkLMX37RCG_cjs.humanAddress(
19089
19131
  receiverAddress
19090
19132
  )}`,
19091
19133
  buttonText: "Sign to continue"
@@ -19142,7 +19184,7 @@ var useBuildTransaction = ({
19142
19184
  );
19143
19185
  return { ...result, sendTransaction };
19144
19186
  };
19145
- var BLOCK_GENERATION_INTERVAL = 10 * chunkPTWGTINW_cjs.TIME.SECOND;
19187
+ var BLOCK_GENERATION_INTERVAL = 10 * chunkLMX37RCG_cjs.TIME.SECOND;
19146
19188
  var txReceiptQueryKey = (txId) => [
19147
19189
  "VECHAIN_KIT",
19148
19190
  "TX_RECEIPT",
@@ -19231,7 +19273,7 @@ var AddressDisplayCard = ({
19231
19273
  fontSize: "xs",
19232
19274
  opacity: 0.5,
19233
19275
  "data-testid": `${label.toLowerCase()}-address`,
19234
- children: chunkPTWGTINW_cjs.humanAddress(address, 6, 4)
19276
+ children: chunkLMX37RCG_cjs.humanAddress(address, 6, 4)
19235
19277
  }
19236
19278
  )
19237
19279
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(
@@ -19240,7 +19282,7 @@ var AddressDisplayCard = ({
19240
19282
  fontWeight: "medium",
19241
19283
  fontSize: "sm",
19242
19284
  "data-testid": `${label.toLowerCase()}-address`,
19243
- children: chunkPTWGTINW_cjs.humanAddress(address, 6, 4)
19285
+ children: chunkLMX37RCG_cjs.humanAddress(address, 6, 4)
19244
19286
  }
19245
19287
  ) })
19246
19288
  ] }),
@@ -19382,7 +19424,7 @@ var TransactionButtonAndStatus = ({
19382
19424
  color: isDark ? "whiteAlpha.600" : "blackAlpha.600",
19383
19425
  textAlign: "center",
19384
19426
  width: "full",
19385
- href: `${chunkPTWGTINW_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
19427
+ href: `${chunkLMX37RCG_cjs.getConfig(network.type).explorerUrl}/${txReceipt?.meta.txID}`,
19386
19428
  target: "_blank",
19387
19429
  rel: "noopener noreferrer",
19388
19430
  children: t("View transaction on the explorer")
@@ -19895,7 +19937,7 @@ var LegalDocumentsProvider = ({ children }) => {
19895
19937
  const isDocumentRejectedByUser = React10.useCallback(
19896
19938
  (doc, walletAddress) => {
19897
19939
  return optionalRejected.some(
19898
- (rejected) => chunkPTWGTINW_cjs.compareAddresses(rejected.walletAddress, walletAddress) && rejected.id === doc.id
19940
+ (rejected) => chunkLMX37RCG_cjs.compareAddresses(rejected.walletAddress, walletAddress) && rejected.id === doc.id
19899
19941
  );
19900
19942
  },
19901
19943
  [optionalRejected]
@@ -19930,7 +19972,7 @@ var LegalDocumentsProvider = ({ children }) => {
19930
19972
  );
19931
19973
  if (isAnalyticsAllowed) {
19932
19974
  allDocs.push({
19933
- ...chunkPTWGTINW_cjs.VECHAIN_KIT_COOKIES_CONFIG,
19975
+ ...chunkLMX37RCG_cjs.VECHAIN_KIT_COOKIES_CONFIG,
19934
19976
  documentType: "cookies" /* COOKIES */,
19935
19977
  documentSource: "vechain-kit" /* VECHAIN_KIT */
19936
19978
  });
@@ -19943,14 +19985,14 @@ var LegalDocumentsProvider = ({ children }) => {
19943
19985
  if (!account?.address) return [];
19944
19986
  return documents.filter((document2) => {
19945
19987
  const isAgreed = storedAgreements.some(
19946
- (agreement) => chunkPTWGTINW_cjs.compareAddresses(
19988
+ (agreement) => chunkLMX37RCG_cjs.compareAddresses(
19947
19989
  agreement.walletAddress,
19948
19990
  account.address
19949
19991
  ) && agreement.id === document2.id
19950
19992
  );
19951
19993
  if (isAgreed) return false;
19952
19994
  const isRejected = optionalRejected.some(
19953
- (rejection) => chunkPTWGTINW_cjs.compareAddresses(
19995
+ (rejection) => chunkLMX37RCG_cjs.compareAddresses(
19954
19996
  rejection.walletAddress,
19955
19997
  account.address
19956
19998
  ) && rejection.id === document2.id
@@ -19962,7 +20004,7 @@ var LegalDocumentsProvider = ({ children }) => {
19962
20004
  if (!requiredDocuments.length || !account?.address) return true;
19963
20005
  return requiredDocuments.every(
19964
20006
  (document2) => storedAgreements.some(
19965
- (saved) => chunkPTWGTINW_cjs.compareAddresses(saved.walletAddress, account.address) && saved.id === document2.id
20007
+ (saved) => chunkLMX37RCG_cjs.compareAddresses(saved.walletAddress, account.address) && saved.id === document2.id
19966
20008
  )
19967
20009
  );
19968
20010
  }, [requiredDocuments, storedAgreements, account?.address]);
@@ -20015,7 +20057,7 @@ var LegalDocumentsProvider = ({ children }) => {
20015
20057
  walletAddress
20016
20058
  );
20017
20059
  const filteredAgreements = storedAgreements.filter(
20018
- (saved) => !chunkPTWGTINW_cjs.compareAddresses(saved.walletAddress, walletAddress) || !documentsArray.some((term) => term.id === saved.id)
20060
+ (saved) => !chunkLMX37RCG_cjs.compareAddresses(saved.walletAddress, walletAddress) || !documentsArray.some((term) => term.id === saved.id)
20019
20061
  );
20020
20062
  const updated = [...filteredAgreements, ...newAgreements];
20021
20063
  setStoredAgreements(updated);
@@ -20241,7 +20283,7 @@ var PrivyWalletProvider = ({
20241
20283
  clauses.push(
20242
20284
  sdkCore.Clause.callFunction(
20243
20285
  sdkCore.Address.of(
20244
- chunkPTWGTINW_cjs.getConfig(network.type).accountFactoryAddress
20286
+ chunkLMX37RCG_cjs.getConfig(network.type).accountFactoryAddress
20245
20287
  ),
20246
20288
  sdkCore.ABIContract.ofAbi(chunkEESC6JDT_cjs.SimpleAccountFactoryABI).getFunction(
20247
20289
  "createAccount"
@@ -20316,7 +20358,7 @@ var PrivyWalletProvider = ({
20316
20358
  clauses.push(
20317
20359
  sdkCore.Clause.callFunction(
20318
20360
  sdkCore.Address.of(
20319
- chunkPTWGTINW_cjs.getConfig(network.type).accountFactoryAddress
20361
+ chunkLMX37RCG_cjs.getConfig(network.type).accountFactoryAddress
20320
20362
  ),
20321
20363
  sdkCore.ABIContract.ofAbi(chunkEESC6JDT_cjs.SimpleAccountFactoryABI).getFunction(
20322
20364
  "createAccount"
@@ -20365,10 +20407,10 @@ var PrivyWalletProvider = ({
20365
20407
  [
20366
20408
  {
20367
20409
  privateKey: Buffer.from(
20368
- chunkPTWGTINW_cjs.randomTransactionUser.privateKey.slice(2),
20410
+ chunkLMX37RCG_cjs.randomTransactionUser.privateKey.slice(2),
20369
20411
  "hex"
20370
20412
  ),
20371
- address: chunkPTWGTINW_cjs.randomTransactionUser.address
20413
+ address: chunkLMX37RCG_cjs.randomTransactionUser.address
20372
20414
  }
20373
20415
  ],
20374
20416
  { gasPayer: { gasPayerServiceUrl: delegatorUrl } }
@@ -20379,11 +20421,11 @@ var PrivyWalletProvider = ({
20379
20421
  true
20380
20422
  );
20381
20423
  const signer = await providerWithDelegationEnabled.getSigner(
20382
- chunkPTWGTINW_cjs.randomTransactionUser.address
20424
+ chunkLMX37RCG_cjs.randomTransactionUser.address
20383
20425
  );
20384
20426
  const txInput = sdkNetwork.signerUtils.transactionBodyToTransactionRequestInput(
20385
20427
  txBody,
20386
- chunkPTWGTINW_cjs.randomTransactionUser.address
20428
+ chunkLMX37RCG_cjs.randomTransactionUser.address
20387
20429
  );
20388
20430
  const rawDelegateSigned = await signer.signTransaction(txInput);
20389
20431
  const { id } = await fetch(`${nodeUrl}/transactions`, {
@@ -20422,7 +20464,7 @@ var PrivyWalletProvider = ({
20422
20464
  PrivyWalletProviderContext.Provider,
20423
20465
  {
20424
20466
  value: {
20425
- accountFactory: chunkPTWGTINW_cjs.getConfig(network.type).accountFactoryAddress,
20467
+ accountFactory: chunkLMX37RCG_cjs.getConfig(network.type).accountFactoryAddress,
20426
20468
  sendTransaction,
20427
20469
  signMessage,
20428
20470
  signTypedData,
@@ -20493,7 +20535,7 @@ var validateConfig = (props) => {
20493
20535
  if (props?.legalDocuments) {
20494
20536
  if (props.legalDocuments.termsAndConditions) {
20495
20537
  props.legalDocuments.termsAndConditions.forEach((term) => {
20496
- if (!chunkPTWGTINW_cjs.isValidUrl(term.url)) {
20538
+ if (!chunkLMX37RCG_cjs.isValidUrl(term.url)) {
20497
20539
  errors.push(
20498
20540
  `legalDocuments.termsAndConditions.url is invalid: ${term.url}`
20499
20541
  );
@@ -20502,7 +20544,7 @@ var validateConfig = (props) => {
20502
20544
  }
20503
20545
  if (props.legalDocuments.privacyPolicy) {
20504
20546
  props.legalDocuments.privacyPolicy.forEach((term) => {
20505
- if (!chunkPTWGTINW_cjs.isValidUrl(term.url)) {
20547
+ if (!chunkLMX37RCG_cjs.isValidUrl(term.url)) {
20506
20548
  errors.push(
20507
20549
  `legalDocuments.privacyPolicy.url is invalid: ${term.url}`
20508
20550
  );
@@ -20511,7 +20553,7 @@ var validateConfig = (props) => {
20511
20553
  }
20512
20554
  if (props.legalDocuments.cookiePolicy) {
20513
20555
  props.legalDocuments.cookiePolicy.forEach((term) => {
20514
- if (!chunkPTWGTINW_cjs.isValidUrl(term.url)) {
20556
+ if (!chunkLMX37RCG_cjs.isValidUrl(term.url)) {
20515
20557
  errors.push(
20516
20558
  `legalDocuments.cookiePolicy.url is invalid: ${term.url}`
20517
20559
  );
@@ -20548,7 +20590,7 @@ var VeChainKitProvider = (props) => {
20548
20590
  const userEcosystemMethods = validatedLoginMethods?.find(
20549
20591
  (method13) => method13.method === "ecosystem"
20550
20592
  );
20551
- return userEcosystemMethods?.allowedApps ?? chunkPTWGTINW_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.map((app) => app.id);
20593
+ return userEcosystemMethods?.allowedApps ?? chunkLMX37RCG_cjs.DEFAULT_PRIVY_ECOSYSTEM_APPS.map((app) => app.id);
20552
20594
  }, [validatedLoginMethods]);
20553
20595
  let privyAppId, privyClientId;
20554
20596
  if (!privy) {
@@ -20576,7 +20618,7 @@ var VeChainKitProvider = (props) => {
20576
20618
  }
20577
20619
  }, [language, i18nConfig]);
20578
20620
  React10.useEffect(() => {
20579
- localStorage.setItem(chunkPTWGTINW_cjs.VECHAIN_KIT_STORAGE_KEYS.NETWORK, network.type);
20621
+ localStorage.setItem(chunkLMX37RCG_cjs.VECHAIN_KIT_STORAGE_KEYS.NETWORK, network.type);
20580
20622
  }, [network]);
20581
20623
  return /* @__PURE__ */ jsxRuntime.jsxs(EnsureQueryClient, { children: [
20582
20624
  /* @__PURE__ */ jsxRuntime.jsx(reactQueryDevtools.ReactQueryDevtools, { initialIsOpen: false }),
@@ -20630,7 +20672,7 @@ var VeChainKitProvider = (props) => {
20630
20672
  children: /* @__PURE__ */ jsxRuntime.jsx(
20631
20673
  dappKitReact.DAppKitProvider,
20632
20674
  {
20633
- node: network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl,
20675
+ node: network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl,
20634
20676
  i18n: i18nConfig,
20635
20677
  language,
20636
20678
  logLevel: dappKit.logLevel,
@@ -20656,8 +20698,8 @@ var VeChainKitProvider = (props) => {
20656
20698
  "--vdk-color-light-primary-hover": "#f8f8f8",
20657
20699
  "--vdk-color-light-primary-active": "#f0f0f0",
20658
20700
  "--vdk-color-light-secondary": "white",
20659
- // Font settings
20660
- "--vdk-font-family": "var(--chakra-fonts-body)",
20701
+ // Font settings - using system fonts instead of Chakra variables
20702
+ "--vdk-font-family": 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
20661
20703
  "--vdk-font-size-medium": "14px",
20662
20704
  "--vdk-font-size-large": "16px",
20663
20705
  "--vdk-font-weight-medium": "500"
@@ -20665,7 +20707,7 @@ var VeChainKitProvider = (props) => {
20665
20707
  children: /* @__PURE__ */ jsxRuntime.jsx(
20666
20708
  PrivyWalletProvider,
20667
20709
  {
20668
- nodeUrl: network.nodeUrl ?? chunkPTWGTINW_cjs.getConfig(network.type).nodeUrl,
20710
+ nodeUrl: network.nodeUrl ?? chunkLMX37RCG_cjs.getConfig(network.type).nodeUrl,
20669
20711
  delegatorUrl: feeDelegation?.delegatorUrl ?? "",
20670
20712
  delegateAllTransactions: feeDelegation?.delegateAllTransactions ?? false,
20671
20713
  children: /* @__PURE__ */ jsxRuntime.jsx(ModalProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LegalDocumentsProvider, { children }) })
@@ -20962,25 +21004,89 @@ var themeConfig = {
20962
21004
  Button: buttonTheme,
20963
21005
  Popover: popoverTheme
20964
21006
  },
20965
- cssVarPrefix: "vechainKit"
21007
+ cssVarPrefix: "vechain-kit",
21008
+ // consistent naming across all components
21009
+ // COMPLETELY disable global styles to prevent any conflicts
21010
+ styles: {
21011
+ global: () => ({})
21012
+ // empty object = no global styles injected
21013
+ },
21014
+ // only defining the semantic tokens we need, scoped to our components
21015
+ semanticTokens: {
21016
+ colors: {
21017
+ "chakra-body-text": {
21018
+ _light: "#1A202C",
21019
+ _dark: "#F7FAFC"
21020
+ },
21021
+ "chakra-body-bg": {
21022
+ _light: "#FFFFFF",
21023
+ _dark: "#1A202C"
21024
+ },
21025
+ "chakra-border-color": {
21026
+ _light: "#E2E8F0",
21027
+ _dark: "#2D3748"
21028
+ },
21029
+ "chakra-placeholder-color": {
21030
+ _light: "#A0AEC0",
21031
+ _dark: "#718096"
21032
+ }
21033
+ }
21034
+ },
21035
+ // minimal foundations to prevent global style injection
21036
+ fonts: react.theme.fonts,
21037
+ colors: react.theme.colors,
21038
+ space: react.theme.space
20966
21039
  };
20967
21040
  var VechainKitTheme = react.extendTheme(themeConfig);
21041
+ VechainKitTheme.styles.global = () => ({});
21042
+ if (VechainKitTheme.__cssVars) {
21043
+ VechainKitTheme.__cssVars.global = () => ({});
21044
+ }
20968
21045
  var { ToastContainer } = react.createStandaloneToast();
21046
+ var createVeChainKitCache = () => {
21047
+ return createCache__default.default({
21048
+ key: "vechain-kit",
21049
+ // consistent with our layer and class names
21050
+ prepend: true
21051
+ // CSS layers will be handled via Global component injection
21052
+ });
21053
+ };
21054
+ var LayerSetup = () => {
21055
+ return /* @__PURE__ */ jsxRuntime.jsx(
21056
+ react$1.Global,
21057
+ {
21058
+ styles: react$1.css`
21059
+ /* define CSS layers with proper priority order */
21060
+ @layer vechain-kit, host-app;
21061
+
21062
+ /* All vechain-kit styles go in the vechain-kit layer */
21063
+ @layer vechain-kit {
21064
+ /* scope all Chakra styles to vechain-kit-root */
21065
+ .vechain-kit-root {
21066
+ /* vechain-kit styles are contained here */
21067
+ }
21068
+ }
21069
+ `
21070
+ }
21071
+ );
21072
+ };
20969
21073
  var EnsureChakraProvider = ({
20970
21074
  children,
20971
21075
  theme
20972
21076
  }) => {
20973
- try {
20974
- const chakraVars = document.documentElement.style.getPropertyValue(
20975
- "--chakra-colors-transparent"
20976
- );
20977
- if (chakraVars) {
20978
- return /* @__PURE__ */ jsxRuntime.jsx(react.ChakraProvider, { theme, resetCSS: false, children });
20979
- }
20980
- } catch (e) {
20981
- console.error(e);
20982
- }
20983
- return /* @__PURE__ */ jsxRuntime.jsx(react.ChakraProvider, { theme, resetCSS: true, children });
21077
+ const cache = React10.useMemo(() => createVeChainKitCache(), []);
21078
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.CacheProvider, { value: cache, children: [
21079
+ /* @__PURE__ */ jsxRuntime.jsx(LayerSetup, {}),
21080
+ /* @__PURE__ */ jsxRuntime.jsx(
21081
+ react.ChakraProvider,
21082
+ {
21083
+ theme,
21084
+ resetCSS: false,
21085
+ portalZIndex: void 0,
21086
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "vechain-kit-root", children })
21087
+ }
21088
+ )
21089
+ ] });
20984
21090
  };
20985
21091
  var EnsureColorModeScript = ({ darkMode }) => {
20986
21092
  try {
@@ -21016,50 +21122,45 @@ var VechainKitThemeProvider = ({
21016
21122
  ] });
21017
21123
  };
21018
21124
 
21019
- // src/index.ts
21020
- BigInt.prototype.toJSON = function() {
21021
- return { $bigint: this.toString() };
21022
- };
21023
-
21024
21125
  Object.defineProperty(exports, "CURRENCY_SYMBOLS", {
21025
21126
  enumerable: true,
21026
- get: function () { return chunkPTWGTINW_cjs.CURRENCY_SYMBOLS; }
21127
+ get: function () { return chunkLMX37RCG_cjs.CURRENCY_SYMBOLS; }
21027
21128
  });
21028
21129
  Object.defineProperty(exports, "ENS_TEXT_RECORDS", {
21029
21130
  enumerable: true,
21030
- get: function () { return chunkPTWGTINW_cjs.ENS_TEXT_RECORDS; }
21131
+ get: function () { return chunkLMX37RCG_cjs.ENS_TEXT_RECORDS; }
21031
21132
  });
21032
21133
  Object.defineProperty(exports, "LegalDocumentSource", {
21033
21134
  enumerable: true,
21034
- get: function () { return chunkPTWGTINW_cjs.LegalDocumentSource; }
21135
+ get: function () { return chunkLMX37RCG_cjs.LegalDocumentSource; }
21035
21136
  });
21036
21137
  Object.defineProperty(exports, "LegalDocumentType", {
21037
21138
  enumerable: true,
21038
- get: function () { return chunkPTWGTINW_cjs.LegalDocumentType; }
21139
+ get: function () { return chunkLMX37RCG_cjs.LegalDocumentType; }
21039
21140
  });
21040
21141
  Object.defineProperty(exports, "NFTMediaType", {
21041
21142
  enumerable: true,
21042
- get: function () { return chunkPTWGTINW_cjs.NFTMediaType; }
21143
+ get: function () { return chunkLMX37RCG_cjs.NFTMediaType; }
21043
21144
  });
21044
21145
  Object.defineProperty(exports, "VePassportUserStatus", {
21045
21146
  enumerable: true,
21046
- get: function () { return chunkPTWGTINW_cjs.VePassportUserStatus; }
21147
+ get: function () { return chunkLMX37RCG_cjs.VePassportUserStatus; }
21047
21148
  });
21048
21149
  Object.defineProperty(exports, "buildCallClauses", {
21049
21150
  enumerable: true,
21050
- get: function () { return chunkPTWGTINW_cjs.buildCallClauses; }
21151
+ get: function () { return chunkLMX37RCG_cjs.buildCallClauses; }
21051
21152
  });
21052
21153
  Object.defineProperty(exports, "executeCallClause", {
21053
21154
  enumerable: true,
21054
- get: function () { return chunkPTWGTINW_cjs.executeCallClause; }
21155
+ get: function () { return chunkLMX37RCG_cjs.executeCallClause; }
21055
21156
  });
21056
21157
  Object.defineProperty(exports, "executeMultipleClausesCall", {
21057
21158
  enumerable: true,
21058
- get: function () { return chunkPTWGTINW_cjs.executeMultipleClausesCall; }
21159
+ get: function () { return chunkLMX37RCG_cjs.executeMultipleClausesCall; }
21059
21160
  });
21060
21161
  Object.defineProperty(exports, "getConfig", {
21061
21162
  enumerable: true,
21062
- get: function () { return chunkPTWGTINW_cjs.getConfig; }
21163
+ get: function () { return chunkLMX37RCG_cjs.getConfig; }
21063
21164
  });
21064
21165
  Object.defineProperty(exports, "useMfaEnrollment", {
21065
21166
  enumerable: true,
@@ -21220,6 +21321,7 @@ exports.getAvatarQueryKey = getAvatarQueryKey;
21220
21321
  exports.getB3trBalance = getB3trBalance;
21221
21322
  exports.getB3trBalanceQueryKey = getB3trBalanceQueryKey;
21222
21323
  exports.getCallClauseQueryKey = getCallClauseQueryKey;
21324
+ exports.getCallClauseQueryKeyWithArgs = getCallClauseQueryKeyWithArgs;
21223
21325
  exports.getChainId = getChainId;
21224
21326
  exports.getChainIdQueryKey = getChainIdQueryKey;
21225
21327
  exports.getCurrentAccountImplementationVersion = getCurrentAccountImplementationVersion;