@unifold/connect-react 0.1.18 → 0.1.20

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.mjs CHANGED
@@ -1318,6 +1318,12 @@ var Clock = createLucideIcon("Clock", [
1318
1318
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
1319
1319
  ]);
1320
1320
 
1321
+ // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
1322
+ var Copy = createLucideIcon("Copy", [
1323
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1324
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1325
+ ]);
1326
+
1321
1327
  // ../../node_modules/.pnpm/lucide-react@0.454.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
1322
1328
  var CreditCard = createLucideIcon("CreditCard", [
1323
1329
  ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
@@ -10603,10 +10609,7 @@ var DialogTitle2 = React210.forwardRef(({ className, ...props }, ref) => /* @__P
10603
10609
  Title,
10604
10610
  {
10605
10611
  ref,
10606
- className: cn(
10607
- "uf-leading-none uf-tracking-tight",
10608
- className
10609
- ),
10612
+ className: cn("uf-leading-none uf-tracking-tight", className),
10610
10613
  ...props
10611
10614
  }
10612
10615
  ));
@@ -10810,16 +10813,26 @@ function DepositExecutionItem({
10810
10813
  }
10811
10814
  )
10812
10815
  }
10813
- ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx52(
10814
- "path",
10816
+ ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52(
10817
+ "svg",
10815
10818
  {
10816
- d: "M10 3L4.5 8.5L2 6",
10817
- stroke: "white",
10818
- strokeWidth: "2",
10819
- strokeLinecap: "round",
10820
- strokeLinejoin: "round"
10819
+ width: "10",
10820
+ height: "10",
10821
+ viewBox: "0 0 12 12",
10822
+ fill: "none",
10823
+ className: "uf-block",
10824
+ children: /* @__PURE__ */ jsx52(
10825
+ "path",
10826
+ {
10827
+ d: "M10 3L4.5 8.5L2 6",
10828
+ stroke: "white",
10829
+ strokeWidth: "2",
10830
+ strokeLinecap: "round",
10831
+ strokeLinejoin: "round"
10832
+ }
10833
+ )
10821
10834
  }
10822
- ) }) })
10835
+ ) })
10823
10836
  ] }),
10824
10837
  /* @__PURE__ */ jsxs32("div", { className: "uf-flex-1 uf-min-w-0", children: [
10825
10838
  /* @__PURE__ */ jsx52("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit processing" : "Deposit completed" }),
@@ -10991,7 +11004,10 @@ function DepositDetailContent({ execution }) {
10991
11004
  /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10992
11005
  /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
10993
11006
  /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10994
- formatAmount(execution.source_amount_base_unit, execution.source_token_metadata?.decimals),
11007
+ formatAmount(
11008
+ execution.source_amount_base_unit,
11009
+ execution.source_token_metadata?.decimals
11010
+ ),
10995
11011
  " ",
10996
11012
  formatCurrency(execution.source_currency)
10997
11013
  ] })
@@ -10999,22 +11015,34 @@ function DepositDetailContent({ execution }) {
10999
11015
  /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
11000
11016
  /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
11001
11017
  /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
11002
- formatAmount(execution.destination_amount_base_unit, execution.destination_token_metadata?.decimals),
11018
+ formatAmount(
11019
+ execution.destination_amount_base_unit,
11020
+ execution.destination_token_metadata?.decimals
11021
+ ),
11003
11022
  " ",
11004
11023
  formatCurrency(execution.destination_currency)
11005
11024
  ] })
11006
11025
  ] }),
11007
11026
  /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
11008
11027
  /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
11009
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
11028
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(
11029
+ execution.source_amount_usd,
11030
+ execution.source_amount_base_unit
11031
+ ) })
11010
11032
  ] }),
11011
11033
  /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
11012
11034
  /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
11013
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
11035
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(
11036
+ execution.source_chain_type,
11037
+ execution.source_chain_id
11038
+ ) })
11014
11039
  ] }),
11015
11040
  /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
11016
11041
  /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
11017
- /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
11042
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(
11043
+ execution.destination_chain_type,
11044
+ execution.destination_chain_id
11045
+ ) })
11018
11046
  ] })
11019
11047
  ] }),
11020
11048
  /* @__PURE__ */ jsxs42(
@@ -11053,7 +11081,9 @@ function DepositDetailContent({ execution }) {
11053
11081
  className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 hover:uf-bg-card/50 uf-transition-colors",
11054
11082
  children: [
11055
11083
  /* @__PURE__ */ jsx62("div", { className: "uf-text-muted-foreground uf-text-sm", children: "Completion Tx" }),
11056
- /* @__PURE__ */ jsx62("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(execution.destination_transaction_hashes[0]) }),
11084
+ /* @__PURE__ */ jsx62("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(
11085
+ execution.destination_transaction_hashes[0]
11086
+ ) }),
11057
11087
  /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground uf-block" })
11058
11088
  ]
11059
11089
  }
@@ -11113,36 +11143,42 @@ function DepositsModal({
11113
11143
  const handleExecutionClick = (execution) => {
11114
11144
  setSelectedExecution(execution);
11115
11145
  };
11116
- return /* @__PURE__ */ jsx72(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsx72(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: selectedExecution ? /* @__PURE__ */ jsxs5(Fragment8, { children: [
11117
- /* @__PURE__ */ jsx72(
11118
- DepositHeader,
11119
- {
11120
- title: "Deposit Details",
11121
- showBack: true,
11122
- onBack: () => setSelectedExecution(null),
11123
- onClose: handleClose
11124
- }
11125
- ),
11126
- /* @__PURE__ */ jsx72(DepositDetailContent, { execution: selectedExecution })
11127
- ] }) : /* @__PURE__ */ jsxs5(Fragment8, { children: [
11128
- /* @__PURE__ */ jsx72(
11129
- DepositHeader,
11130
- {
11131
- title: "Deposit Tracker",
11132
- showBack: true,
11133
- onBack: handleBack,
11134
- onClose: handleClose
11135
- }
11136
- ),
11137
- /* @__PURE__ */ jsx72("div", { className: "uf-max-h-[400px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx72("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx72("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx72("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx72(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx72(
11138
- DepositExecutionItem,
11139
- {
11140
- execution,
11141
- onClick: () => handleExecutionClick(execution)
11142
- },
11143
- execution.id
11144
- )) }) }) })
11145
- ] }) }) });
11146
+ return /* @__PURE__ */ jsx72(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsx72(
11147
+ DialogContent2,
11148
+ {
11149
+ className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
11150
+ children: selectedExecution ? /* @__PURE__ */ jsxs5(Fragment8, { children: [
11151
+ /* @__PURE__ */ jsx72(
11152
+ DepositHeader,
11153
+ {
11154
+ title: "Deposit Details",
11155
+ showBack: true,
11156
+ onBack: () => setSelectedExecution(null),
11157
+ onClose: handleClose
11158
+ }
11159
+ ),
11160
+ /* @__PURE__ */ jsx72(DepositDetailContent, { execution: selectedExecution })
11161
+ ] }) : /* @__PURE__ */ jsxs5(Fragment8, { children: [
11162
+ /* @__PURE__ */ jsx72(
11163
+ DepositHeader,
11164
+ {
11165
+ title: "Deposit Tracker",
11166
+ showBack: true,
11167
+ onBack: handleBack,
11168
+ onClose: handleClose
11169
+ }
11170
+ ),
11171
+ /* @__PURE__ */ jsx72("div", { className: "uf-max-h-[400px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx72("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx72("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx72("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx72(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx72(
11172
+ DepositExecutionItem,
11173
+ {
11174
+ execution,
11175
+ onClick: () => handleExecutionClick(execution)
11176
+ },
11177
+ execution.id
11178
+ )) }) }) })
11179
+ ] })
11180
+ }
11181
+ ) });
11146
11182
  }
11147
11183
  function DepositSuccessToast({
11148
11184
  depositTx,
@@ -11288,22 +11324,28 @@ function DepositSuccessToast({
11288
11324
  }
11289
11325
  )
11290
11326
  ] }) }),
11291
- execution && /* @__PURE__ */ jsx82(Dialog2, { open: detailModalOpen, onOpenChange: setDetailModalOpen, children: /* @__PURE__ */ jsxs6(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-mt-8 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11292
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-justify-between uf-px-4", children: [
11293
- /* @__PURE__ */ jsx82("div", { className: "uf-w-8" }),
11294
- " ",
11295
- /* @__PURE__ */ jsx82("h2", { className: "uf-text-lg uf-font-semibold uf-text-foreground", children: "Deposit Details" }),
11296
- /* @__PURE__ */ jsx82(
11297
- "button",
11298
- {
11299
- onClick: () => setDetailModalOpen(false),
11300
- className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-w-8 uf-flex uf-justify-end",
11301
- children: /* @__PURE__ */ jsx82(X, { className: "uf-w-5 uf-h-5" })
11302
- }
11303
- )
11304
- ] }),
11305
- /* @__PURE__ */ jsx82(DepositDetailContent, { execution })
11306
- ] }) })
11327
+ execution && /* @__PURE__ */ jsx82(Dialog2, { open: detailModalOpen, onOpenChange: setDetailModalOpen, children: /* @__PURE__ */ jsxs6(
11328
+ DialogContent2,
11329
+ {
11330
+ className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-mt-8 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
11331
+ children: [
11332
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-justify-between uf-px-4", children: [
11333
+ /* @__PURE__ */ jsx82("div", { className: "uf-w-8" }),
11334
+ " ",
11335
+ /* @__PURE__ */ jsx82("h2", { className: "uf-text-lg uf-font-semibold uf-text-foreground", children: "Deposit Details" }),
11336
+ /* @__PURE__ */ jsx82(
11337
+ "button",
11338
+ {
11339
+ onClick: () => setDetailModalOpen(false),
11340
+ className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-w-8 uf-flex uf-justify-end",
11341
+ children: /* @__PURE__ */ jsx82(X, { className: "uf-w-5 uf-h-5" })
11342
+ }
11343
+ )
11344
+ ] }),
11345
+ /* @__PURE__ */ jsx82(DepositDetailContent, { execution })
11346
+ ]
11347
+ }
11348
+ ) })
11307
11349
  ] });
11308
11350
  }
11309
11351
  var Select2 = Root23;
@@ -11386,7 +11428,10 @@ var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PU
11386
11428
  Label,
11387
11429
  {
11388
11430
  ref,
11389
- className: cn("uf-py-1.5 uf-pl-8 uf-pr-2 uf-text-sm uf-font-semibold", className),
11431
+ className: cn(
11432
+ "uf-py-1.5 uf-pl-8 uf-pr-2 uf-text-sm uf-font-semibold",
11433
+ className
11434
+ ),
11390
11435
  ...props
11391
11436
  }
11392
11437
  ));
@@ -11626,7 +11671,9 @@ function TransferCryptoBase({
11626
11671
  } catch (err) {
11627
11672
  console.error("Error fetching wallets, retrying in 5s:", err);
11628
11673
  if (!isCancelled) {
11629
- setError(err instanceof Error ? err.message : "Failed to load wallets");
11674
+ setError(
11675
+ err instanceof Error ? err.message : "Failed to load wallets"
11676
+ );
11630
11677
  setLoading(false);
11631
11678
  retryTimeout = setTimeout(fetchWallets, 5e3);
11632
11679
  }
@@ -11871,21 +11918,28 @@ function TransferCryptoBase({
11871
11918
  disabled: tokensLoading || availableChainsForToken.length === 0,
11872
11919
  children: [
11873
11920
  /* @__PURE__ */ jsx112(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx112(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
11874
- /* @__PURE__ */ jsx112(SelectContent2, { align: "end", className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px] uf-min-w-[200px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx112("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11875
- const chainKey = getChainKey(
11876
- chainData.chain_id,
11877
- chainData.chain_type
11878
- );
11879
- return /* @__PURE__ */ jsx112(
11880
- SelectItem2,
11881
- {
11882
- value: chainKey,
11883
- className: "focus:uf-bg-accent focus:uf-text-foreground",
11884
- children: renderChainItem(chainData, true)
11885
- },
11886
- `${chainData.chain_id}-${chainData.chain_type}`
11887
- );
11888
- }) })
11921
+ /* @__PURE__ */ jsx112(
11922
+ SelectContent2,
11923
+ {
11924
+ align: "end",
11925
+ className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px] uf-min-w-[200px]",
11926
+ children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx112("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11927
+ const chainKey = getChainKey(
11928
+ chainData.chain_id,
11929
+ chainData.chain_type
11930
+ );
11931
+ return /* @__PURE__ */ jsx112(
11932
+ SelectItem2,
11933
+ {
11934
+ value: chainKey,
11935
+ className: "focus:uf-bg-accent focus:uf-text-foreground",
11936
+ children: renderChainItem(chainData, true)
11937
+ },
11938
+ `${chainData.chain_id}-${chainData.chain_type}`
11939
+ );
11940
+ })
11941
+ }
11942
+ )
11889
11943
  ]
11890
11944
  }
11891
11945
  )
@@ -11942,22 +11996,31 @@ function TransferCryptoBase({
11942
11996
  )
11943
11997
  ] })
11944
11998
  ] }),
11945
- /* @__PURE__ */ jsxs8("span", { className: `uf-flex uf-items-center uf-gap-1 uf-text-green-500 uf-transition-opacity uf-duration-200 ${copied ? "uf-opacity-100" : "uf-opacity-0"}`, children: [
11946
- /* @__PURE__ */ jsx112(Check, { className: "uf-w-3 uf-h-3" }),
11947
- t.copied
11948
- ] })
11999
+ /* @__PURE__ */ jsxs8(
12000
+ "span",
12001
+ {
12002
+ className: `uf-flex uf-items-center uf-gap-1 uf-text-green-500 uf-transition-opacity uf-duration-200 ${copied ? "uf-opacity-100" : "uf-opacity-0"}`,
12003
+ children: [
12004
+ /* @__PURE__ */ jsx112(Check, { className: "uf-w-3 uf-h-3" }),
12005
+ t.copied
12006
+ ]
12007
+ }
12008
+ )
11949
12009
  ] }),
11950
- loading ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx112(
11951
- "button",
11952
- {
11953
- onClick: handleCopyAddress,
11954
- disabled: !depositAddress,
11955
- className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all uf-text-left uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11956
- children: depositAddress || t.noAddressAvailable
11957
- }
11958
- )
12010
+ loading ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsxs8("div", { className: "uf-relative", children: [
12011
+ /* @__PURE__ */ jsx112(
12012
+ "button",
12013
+ {
12014
+ onClick: handleCopyAddress,
12015
+ disabled: !depositAddress,
12016
+ className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-2.5 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all uf-text-left uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
12017
+ children: depositAddress || t.noAddressAvailable
12018
+ }
12019
+ ),
12020
+ depositAddress && /* @__PURE__ */ jsx112("span", { className: "uf-absolute uf-inset-y-0 uf-right-3 uf-flex uf-items-center uf-text-muted-foreground uf-pointer-events-none", children: /* @__PURE__ */ jsx112(Copy, { className: "uf-w-3 uf-h-3" }) })
12021
+ ] })
11959
12022
  ] }),
11960
- /* @__PURE__ */ jsxs8("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-3", children: [
12023
+ /* @__PURE__ */ jsxs8("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-2.5", children: [
11961
12024
  /* @__PURE__ */ jsxs8(
11962
12025
  "button",
11963
12026
  {
@@ -12219,52 +12282,58 @@ function CurrencyModal({
12219
12282
  onOpenChange(false);
12220
12283
  setSearchQuery("");
12221
12284
  };
12222
- return /* @__PURE__ */ jsx152(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
12223
- /* @__PURE__ */ jsx152(
12224
- DepositHeader,
12225
- {
12226
- title: "Currency",
12227
- showBack: true,
12228
- onBack: handleClose,
12229
- onClose: handleClose
12230
- }
12231
- ),
12232
- /* @__PURE__ */ jsx152("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
12233
- /* @__PURE__ */ jsx152(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
12234
- /* @__PURE__ */ jsx152(
12235
- "input",
12236
- {
12237
- type: "text",
12238
- value: searchQuery,
12239
- onChange: (e) => setSearchQuery(e.target.value),
12240
- placeholder: "Search",
12241
- className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-pl-11 uf-pr-4 uf-py-2.5 uf-text-sm uf-text-foreground uf-placeholder-muted-foreground uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30"
12242
- }
12243
- )
12244
- ] }) }),
12245
- /* @__PURE__ */ jsx152("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
12246
- /* @__PURE__ */ jsx152(
12247
- CurrencyListSection,
12248
- {
12249
- title: "Popular currencies",
12250
- currencies: filteredPreferred,
12251
- selectedCurrency,
12252
- onSelect: handleSelect
12253
- }
12254
- ),
12255
- filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx152("div", { className: "uf-h-2" }),
12256
- /* @__PURE__ */ jsx152(
12257
- CurrencyListSection,
12258
- {
12259
- title: "All currencies",
12260
- currencies: filteredOther,
12261
- selectedCurrency,
12262
- onSelect: handleSelect
12263
- }
12264
- ),
12265
- filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx152("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
12266
- ] }) })
12267
- ] }) });
12285
+ return /* @__PURE__ */ jsx152(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(
12286
+ DialogContent2,
12287
+ {
12288
+ className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
12289
+ children: [
12290
+ /* @__PURE__ */ jsx152(
12291
+ DepositHeader,
12292
+ {
12293
+ title: "Currency",
12294
+ showBack: true,
12295
+ onBack: handleClose,
12296
+ onClose: handleClose
12297
+ }
12298
+ ),
12299
+ /* @__PURE__ */ jsx152("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
12300
+ /* @__PURE__ */ jsx152(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
12301
+ /* @__PURE__ */ jsx152(
12302
+ "input",
12303
+ {
12304
+ type: "text",
12305
+ value: searchQuery,
12306
+ onChange: (e) => setSearchQuery(e.target.value),
12307
+ placeholder: "Search",
12308
+ className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-pl-11 uf-pr-4 uf-py-2.5 uf-text-sm uf-text-foreground uf-placeholder-muted-foreground uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30"
12309
+ }
12310
+ )
12311
+ ] }) }),
12312
+ /* @__PURE__ */ jsx152("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
12313
+ /* @__PURE__ */ jsx152(
12314
+ CurrencyListSection,
12315
+ {
12316
+ title: "Popular currencies",
12317
+ currencies: filteredPreferred,
12318
+ selectedCurrency,
12319
+ onSelect: handleSelect
12320
+ }
12321
+ ),
12322
+ filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx152("div", { className: "uf-h-2" }),
12323
+ /* @__PURE__ */ jsx152(
12324
+ CurrencyListSection,
12325
+ {
12326
+ title: "All currencies",
12327
+ currencies: filteredOther,
12328
+ selectedCurrency,
12329
+ onSelect: handleSelect
12330
+ }
12331
+ ),
12332
+ filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx152("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
12333
+ ] }) })
12334
+ ]
12335
+ }
12336
+ ) });
12268
12337
  }
12269
12338
  function useUserIp2() {
12270
12339
  const {
@@ -12362,7 +12431,9 @@ function BuyWithCard({
12362
12431
  const [autoSelectedProvider, setAutoSelectedProvider] = useState62(null);
12363
12432
  const [hasManualSelection, setHasManualSelection] = useState62(false);
12364
12433
  const [internalWallets, setInternalWallets] = useState62([]);
12365
- const [walletsLoading, setWalletsLoading] = useState62(!externalWallets?.length);
12434
+ const [walletsLoading, setWalletsLoading] = useState62(
12435
+ !externalWallets?.length
12436
+ );
12366
12437
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
12367
12438
  const [countdown, setCountdown] = useState62(60);
12368
12439
  const [fiatCurrencies, setFiatCurrencies] = useState62([]);
@@ -12435,7 +12506,15 @@ function BuyWithCard({
12435
12506
  clearTimeout(retryTimeout);
12436
12507
  }
12437
12508
  };
12438
- }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, externalWallets]);
12509
+ }, [
12510
+ userId,
12511
+ recipientAddress,
12512
+ destinationChainType,
12513
+ destinationChainId,
12514
+ destinationTokenAddress,
12515
+ publishableKey,
12516
+ externalWallets
12517
+ ]);
12439
12518
  useEffect52(() => {
12440
12519
  async function fetchSupportedTokens() {
12441
12520
  try {
@@ -12619,7 +12698,10 @@ function BuyWithCard({
12619
12698
  selectedCurrencyData && /* @__PURE__ */ jsx162(
12620
12699
  "img",
12621
12700
  {
12622
- src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
12701
+ src: getPreferredIconUrl(
12702
+ selectedCurrencyData.icon_urls,
12703
+ "png"
12704
+ ) || selectedCurrencyData.icon_url,
12623
12705
  alt: selectedCurrencyData.name,
12624
12706
  className: "uf-w-4 uf-h-4"
12625
12707
  }
@@ -12852,7 +12934,10 @@ function BuyWithCard({
12852
12934
  /* @__PURE__ */ jsx162(
12853
12935
  "img",
12854
12936
  {
12855
- src: getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
12937
+ src: getIconUrlWithCdn(
12938
+ "/icons/tokens/png/usdc.png",
12939
+ assetCdnUrl
12940
+ ),
12856
12941
  alt: "USDC",
12857
12942
  className: "uf-w-7 uf-h-7 uf-rounded-full"
12858
12943
  }
@@ -12860,7 +12945,10 @@ function BuyWithCard({
12860
12945
  /* @__PURE__ */ jsx162(
12861
12946
  "img",
12862
12947
  {
12863
- src: getIconUrlWithCdn("/icons/networks/png/polygon.png", assetCdnUrl),
12948
+ src: getIconUrlWithCdn(
12949
+ "/icons/networks/png/polygon.png",
12950
+ assetCdnUrl
12951
+ ),
12864
12952
  alt: "Polygon",
12865
12953
  className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
12866
12954
  }
@@ -12875,7 +12963,10 @@ function BuyWithCard({
12875
12963
  /* @__PURE__ */ jsx162(
12876
12964
  "img",
12877
12965
  {
12878
- src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
12966
+ src: destinationToken?.icon_url || getIconUrlWithCdn(
12967
+ "/icons/tokens/png/usdc.png",
12968
+ assetCdnUrl
12969
+ ),
12879
12970
  alt: displayTokenSymbol,
12880
12971
  className: "uf-w-7 uf-h-7 uf-rounded-full"
12881
12972
  }
@@ -13058,7 +13149,9 @@ function useAllowedCountry(publishableKey) {
13058
13149
  if (ipData && configData) {
13059
13150
  const blockedCodes = configData.blocked_country_codes || [];
13060
13151
  const userCountryUpper = ipData.alpha2.toUpperCase();
13061
- isAllowed = !blockedCodes.some((code) => code.toUpperCase() === userCountryUpper);
13152
+ isAllowed = !blockedCodes.some(
13153
+ (code) => code.toUpperCase() === userCountryUpper
13154
+ );
13062
13155
  }
13063
13156
  return {
13064
13157
  isAllowed,
@@ -13069,7 +13162,9 @@ function useAllowedCountry(publishableKey) {
13069
13162
  error
13070
13163
  };
13071
13164
  }
13072
- function SkeletonButton({ variant = "default" }) {
13165
+ function SkeletonButton({
13166
+ variant = "default"
13167
+ }) {
13073
13168
  return /* @__PURE__ */ jsxs16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
13074
13169
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
13075
13170
  /* @__PURE__ */ jsx20("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
@@ -13079,7 +13174,13 @@ function SkeletonButton({ variant = "default" }) {
13079
13174
  ] })
13080
13175
  ] }),
13081
13176
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
13082
- variant === "with-icons" && /* @__PURE__ */ jsx20("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx20("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
13177
+ variant === "with-icons" && /* @__PURE__ */ jsx20("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx20(
13178
+ "div",
13179
+ {
13180
+ className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary"
13181
+ },
13182
+ i
13183
+ )) }),
13083
13184
  /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
13084
13185
  ] })
13085
13186
  ] });
@@ -13116,8 +13217,17 @@ function DepositModal({
13116
13217
  }, [publishableKey]);
13117
13218
  useEffect62(() => {
13118
13219
  setWallets([]);
13119
- }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
13120
- const [resolvedTheme, setResolvedTheme] = useState72(theme === "auto" ? "dark" : theme);
13220
+ }, [
13221
+ userId,
13222
+ recipientAddress,
13223
+ destinationChainType,
13224
+ destinationChainId,
13225
+ destinationTokenAddress,
13226
+ publishableKey
13227
+ ]);
13228
+ const [resolvedTheme, setResolvedTheme] = useState72(
13229
+ theme === "auto" ? "dark" : theme
13230
+ );
13121
13231
  useEffect62(() => {
13122
13232
  if (theme === "auto") {
13123
13233
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
@@ -13136,7 +13246,11 @@ function DepositModal({
13136
13246
  getProjectConfig(publishableKey).then(setProjectConfig).catch(console.error);
13137
13247
  }
13138
13248
  }, [open, publishableKey, projectConfig]);
13139
- const { isAllowed, isLoading: isCountryLoading, error: countryError } = useAllowedCountry(publishableKey);
13249
+ const {
13250
+ isAllowed,
13251
+ isLoading: isCountryLoading,
13252
+ error: countryError
13253
+ } = useAllowedCountry(publishableKey);
13140
13254
  useEffect62(() => {
13141
13255
  if (!open || wallets.length > 0) return;
13142
13256
  let retryTimeout = null;
@@ -13174,7 +13288,16 @@ function DepositModal({
13174
13288
  clearTimeout(retryTimeout);
13175
13289
  }
13176
13290
  };
13177
- }, [open, userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, wallets.length]);
13291
+ }, [
13292
+ open,
13293
+ userId,
13294
+ recipientAddress,
13295
+ destinationChainType,
13296
+ destinationChainId,
13297
+ destinationTokenAddress,
13298
+ publishableKey,
13299
+ wallets.length
13300
+ ]);
13178
13301
  const themeClass = resolvedTheme === "dark" ? "uf-dark" : "";
13179
13302
  const handleClose = () => {
13180
13303
  onOpenChange(false);
@@ -13549,6 +13672,7 @@ lucide-react/dist/esm/icons/chevron-down.js:
13549
13672
  lucide-react/dist/esm/icons/chevron-right.js:
13550
13673
  lucide-react/dist/esm/icons/chevron-up.js:
13551
13674
  lucide-react/dist/esm/icons/clock.js:
13675
+ lucide-react/dist/esm/icons/copy.js:
13552
13676
  lucide-react/dist/esm/icons/credit-card.js:
13553
13677
  lucide-react/dist/esm/icons/dollar-sign.js:
13554
13678
  lucide-react/dist/esm/icons/external-link.js: