@unifold/connect-react 0.1.33 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +408 -324
- package/dist/index.mjs +410 -325
- package/dist/styles-base.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1147,7 +1147,8 @@ ${new this._window.XMLSerializer().serializeToString(e3)}`;
|
|
|
1147
1147
|
import React38, {
|
|
1148
1148
|
useState as useState29,
|
|
1149
1149
|
useCallback as useCallback12,
|
|
1150
|
-
useMemo as useMemo15
|
|
1150
|
+
useMemo as useMemo15,
|
|
1151
|
+
useEffect as useEffect29
|
|
1151
1152
|
} from "react";
|
|
1152
1153
|
|
|
1153
1154
|
// ../react-provider/dist/index.mjs
|
|
@@ -6046,7 +6047,7 @@ var API_BASE_URL = (() => {
|
|
|
6046
6047
|
return "https://api.unifold.io";
|
|
6047
6048
|
}
|
|
6048
6049
|
})();
|
|
6049
|
-
var DEFAULT_PUBLISHABLE_KEY = "
|
|
6050
|
+
var DEFAULT_PUBLISHABLE_KEY = "";
|
|
6050
6051
|
var DEFAULT_CONFIG = {};
|
|
6051
6052
|
function setApiConfig(config) {
|
|
6052
6053
|
if (config.publishableKey !== void 0) {
|
|
@@ -6078,11 +6079,6 @@ function validatePublishableKey(key) {
|
|
|
6078
6079
|
"Unifold SDK: No publishable key configured. Please provide a valid publishable key via setApiConfig() or pass it directly to the API function."
|
|
6079
6080
|
);
|
|
6080
6081
|
}
|
|
6081
|
-
if (key === "pk_test_123") {
|
|
6082
|
-
console.warn(
|
|
6083
|
-
'Unifold SDK: Using default test key "pk_test_123". This should only be used for local development. Please use a real publishable key in production.'
|
|
6084
|
-
);
|
|
6085
|
-
}
|
|
6086
6082
|
}
|
|
6087
6083
|
function getIconUrl(iconPath) {
|
|
6088
6084
|
const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
|
|
@@ -11908,24 +11904,34 @@ function CurrencyModal({
|
|
|
11908
11904
|
onClose: handleClose
|
|
11909
11905
|
}
|
|
11910
11906
|
),
|
|
11911
|
-
/* @__PURE__ */
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
className: "uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
|
|
11919
|
-
style: {
|
|
11920
|
-
backgroundColor: components.search.backgroundColor,
|
|
11921
|
-
color: components.search.inputColor,
|
|
11922
|
-
fontFamily: fonts.regular,
|
|
11923
|
-
borderRadius: components.input.borderRadius,
|
|
11924
|
-
border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
|
|
11907
|
+
/* @__PURE__ */ jsxs5("div", { className: "uf-pb-2", children: [
|
|
11908
|
+
/* @__PURE__ */ jsx62(
|
|
11909
|
+
"style",
|
|
11910
|
+
{
|
|
11911
|
+
dangerouslySetInnerHTML: {
|
|
11912
|
+
__html: `.uf-currency-modal-search::placeholder { color: ${components.search.placeholderColor}; }`
|
|
11913
|
+
}
|
|
11925
11914
|
}
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11915
|
+
),
|
|
11916
|
+
/* @__PURE__ */ jsx62("div", { className: "uf-relative", children: /* @__PURE__ */ jsx62(
|
|
11917
|
+
"input",
|
|
11918
|
+
{
|
|
11919
|
+
type: "text",
|
|
11920
|
+
value: searchQuery,
|
|
11921
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
11922
|
+
placeholder: "Search",
|
|
11923
|
+
className: "uf-currency-modal-search uf-w-full uf-p-4 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
|
|
11924
|
+
style: {
|
|
11925
|
+
backgroundColor: components.search.backgroundColor,
|
|
11926
|
+
color: components.search.inputColor,
|
|
11927
|
+
fontFamily: fonts.regular,
|
|
11928
|
+
borderRadius: components.input.borderRadius,
|
|
11929
|
+
border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
|
|
11930
|
+
}
|
|
11931
|
+
}
|
|
11932
|
+
) })
|
|
11933
|
+
] }),
|
|
11934
|
+
/* @__PURE__ */ jsx62("div", { className: "uf-flex-1 sm:uf-flex-none uf-overflow-y-auto uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden sm:uf-min-h-[200px] sm:uf-max-h-[400px]", children: /* @__PURE__ */ jsxs5("div", { className: "uf-space-y-2", children: [
|
|
11929
11935
|
/* @__PURE__ */ jsx62(
|
|
11930
11936
|
CurrencyListSection,
|
|
11931
11937
|
{
|
|
@@ -12447,188 +12453,153 @@ function DepositDetailContent({ execution }) {
|
|
|
12447
12453
|
className: "uf-overflow-hidden uf-mb-3",
|
|
12448
12454
|
style: { backgroundColor: components.card.backgroundColor, borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` },
|
|
12449
12455
|
children: [
|
|
12450
|
-
/* @__PURE__ */ jsxs6(
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
"
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
"
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
className: "uf-text-sm",
|
|
12536
|
-
style: {
|
|
12537
|
-
color: components.card.labelColor,
|
|
12538
|
-
fontFamily: fonts.regular
|
|
12539
|
-
},
|
|
12540
|
-
children: "USD Value"
|
|
12541
|
-
}
|
|
12542
|
-
),
|
|
12543
|
-
/* @__PURE__ */ jsx72(
|
|
12544
|
-
"span",
|
|
12545
|
-
{
|
|
12546
|
-
style: {
|
|
12547
|
-
color: components.card.titleColor,
|
|
12548
|
-
fontFamily: fonts.regular,
|
|
12549
|
-
fontSize: "14px"
|
|
12550
|
-
},
|
|
12551
|
-
children: formatUsdAmount2(
|
|
12552
|
-
execution.source_amount_usd,
|
|
12553
|
-
execution.source_amount_base_unit
|
|
12554
|
-
)
|
|
12555
|
-
}
|
|
12556
|
-
)
|
|
12557
|
-
]
|
|
12558
|
-
}
|
|
12559
|
-
),
|
|
12560
|
-
isPending && /* @__PURE__ */ jsxs6(
|
|
12561
|
-
"div",
|
|
12562
|
-
{
|
|
12563
|
-
className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b",
|
|
12564
|
-
style: { borderColor: colors2.border },
|
|
12565
|
-
children: [
|
|
12566
|
-
/* @__PURE__ */ jsx72(
|
|
12567
|
-
"span",
|
|
12568
|
-
{
|
|
12569
|
-
className: "uf-text-sm",
|
|
12570
|
-
style: {
|
|
12571
|
-
color: components.card.labelColor,
|
|
12572
|
-
fontFamily: fonts.regular
|
|
12573
|
-
},
|
|
12574
|
-
children: "Estimated delivery time"
|
|
12575
|
-
}
|
|
12576
|
-
),
|
|
12577
|
-
/* @__PURE__ */ jsx72(
|
|
12578
|
-
"span",
|
|
12579
|
-
{
|
|
12580
|
-
style: {
|
|
12581
|
-
color: components.card.titleColor,
|
|
12582
|
-
fontFamily: fonts.regular,
|
|
12583
|
-
fontSize: "14px"
|
|
12584
|
-
},
|
|
12585
|
-
children: formatEstimatedTime(execution?.estimated_processing_time)
|
|
12586
|
-
}
|
|
12456
|
+
/* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12457
|
+
/* @__PURE__ */ jsx72(
|
|
12458
|
+
"span",
|
|
12459
|
+
{
|
|
12460
|
+
className: "uf-text-sm",
|
|
12461
|
+
style: {
|
|
12462
|
+
color: components.card.rowLeftLabel,
|
|
12463
|
+
fontFamily: fonts.regular
|
|
12464
|
+
},
|
|
12465
|
+
children: "Amount Sent"
|
|
12466
|
+
}
|
|
12467
|
+
),
|
|
12468
|
+
/* @__PURE__ */ jsxs6(
|
|
12469
|
+
"span",
|
|
12470
|
+
{
|
|
12471
|
+
style: {
|
|
12472
|
+
color: components.card.rowRightLabel,
|
|
12473
|
+
fontFamily: fonts.regular,
|
|
12474
|
+
fontSize: "14px"
|
|
12475
|
+
},
|
|
12476
|
+
children: [
|
|
12477
|
+
formatAmount(
|
|
12478
|
+
execution.source_amount_base_unit,
|
|
12479
|
+
execution.source_token_metadata?.decimals
|
|
12480
|
+
),
|
|
12481
|
+
" ",
|
|
12482
|
+
formatCurrency(execution.source_currency)
|
|
12483
|
+
]
|
|
12484
|
+
}
|
|
12485
|
+
)
|
|
12486
|
+
] }),
|
|
12487
|
+
/* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12488
|
+
/* @__PURE__ */ jsx72(
|
|
12489
|
+
"span",
|
|
12490
|
+
{
|
|
12491
|
+
className: "uf-text-sm",
|
|
12492
|
+
style: {
|
|
12493
|
+
color: components.card.rowLeftLabel,
|
|
12494
|
+
fontFamily: fonts.regular
|
|
12495
|
+
},
|
|
12496
|
+
children: "Amount Received"
|
|
12497
|
+
}
|
|
12498
|
+
),
|
|
12499
|
+
/* @__PURE__ */ jsxs6(
|
|
12500
|
+
"span",
|
|
12501
|
+
{
|
|
12502
|
+
style: {
|
|
12503
|
+
color: components.card.rowRightLabel,
|
|
12504
|
+
fontFamily: fonts.regular,
|
|
12505
|
+
fontSize: "14px"
|
|
12506
|
+
},
|
|
12507
|
+
children: [
|
|
12508
|
+
formatAmount(
|
|
12509
|
+
execution.destination_amount_base_unit,
|
|
12510
|
+
execution.destination_token_metadata?.decimals
|
|
12511
|
+
),
|
|
12512
|
+
" ",
|
|
12513
|
+
formatCurrency(execution.destination_currency)
|
|
12514
|
+
]
|
|
12515
|
+
}
|
|
12516
|
+
)
|
|
12517
|
+
] }),
|
|
12518
|
+
/* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12519
|
+
/* @__PURE__ */ jsx72(
|
|
12520
|
+
"span",
|
|
12521
|
+
{
|
|
12522
|
+
className: "uf-text-sm",
|
|
12523
|
+
style: {
|
|
12524
|
+
color: components.card.rowLeftLabel,
|
|
12525
|
+
fontFamily: fonts.regular
|
|
12526
|
+
},
|
|
12527
|
+
children: "USD Value"
|
|
12528
|
+
}
|
|
12529
|
+
),
|
|
12530
|
+
/* @__PURE__ */ jsx72(
|
|
12531
|
+
"span",
|
|
12532
|
+
{
|
|
12533
|
+
style: {
|
|
12534
|
+
color: components.card.rowRightLabel,
|
|
12535
|
+
fontFamily: fonts.regular,
|
|
12536
|
+
fontSize: "14px"
|
|
12537
|
+
},
|
|
12538
|
+
children: formatUsdAmount2(
|
|
12539
|
+
execution.source_amount_usd,
|
|
12540
|
+
execution.source_amount_base_unit
|
|
12587
12541
|
)
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
),
|
|
12591
|
-
/* @__PURE__ */ jsxs6(
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
"
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12542
|
+
}
|
|
12543
|
+
)
|
|
12544
|
+
] }),
|
|
12545
|
+
isPending && /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12546
|
+
/* @__PURE__ */ jsx72(
|
|
12547
|
+
"span",
|
|
12548
|
+
{
|
|
12549
|
+
className: "uf-text-sm",
|
|
12550
|
+
style: {
|
|
12551
|
+
color: components.card.rowLeftLabel,
|
|
12552
|
+
fontFamily: fonts.regular
|
|
12553
|
+
},
|
|
12554
|
+
children: "Estimated delivery time"
|
|
12555
|
+
}
|
|
12556
|
+
),
|
|
12557
|
+
/* @__PURE__ */ jsx72(
|
|
12558
|
+
"span",
|
|
12559
|
+
{
|
|
12560
|
+
style: {
|
|
12561
|
+
color: components.card.rowRightLabel,
|
|
12562
|
+
fontFamily: fonts.regular,
|
|
12563
|
+
fontSize: "14px"
|
|
12564
|
+
},
|
|
12565
|
+
children: formatEstimatedTime(execution?.estimated_processing_time)
|
|
12566
|
+
}
|
|
12567
|
+
)
|
|
12568
|
+
] }),
|
|
12569
|
+
/* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12570
|
+
/* @__PURE__ */ jsx72(
|
|
12571
|
+
"span",
|
|
12572
|
+
{
|
|
12573
|
+
className: "uf-text-sm",
|
|
12574
|
+
style: {
|
|
12575
|
+
color: components.card.rowLeftLabel,
|
|
12576
|
+
fontFamily: fonts.regular
|
|
12577
|
+
},
|
|
12578
|
+
children: "Source Network"
|
|
12579
|
+
}
|
|
12580
|
+
),
|
|
12581
|
+
/* @__PURE__ */ jsx72(
|
|
12582
|
+
"span",
|
|
12583
|
+
{
|
|
12584
|
+
style: {
|
|
12585
|
+
color: components.card.rowRightLabel,
|
|
12586
|
+
fontFamily: fonts.regular,
|
|
12587
|
+
fontSize: "14px"
|
|
12588
|
+
},
|
|
12589
|
+
children: getNetworkName(
|
|
12590
|
+
execution.source_chain_type,
|
|
12591
|
+
execution.source_chain_id
|
|
12621
12592
|
)
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
),
|
|
12593
|
+
}
|
|
12594
|
+
)
|
|
12595
|
+
] }),
|
|
12625
12596
|
/* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
12626
12597
|
/* @__PURE__ */ jsx72(
|
|
12627
12598
|
"span",
|
|
12628
12599
|
{
|
|
12629
12600
|
className: "uf-text-sm",
|
|
12630
12601
|
style: {
|
|
12631
|
-
color: components.card.
|
|
12602
|
+
color: components.card.rowLeftLabel,
|
|
12632
12603
|
fontFamily: fonts.regular
|
|
12633
12604
|
},
|
|
12634
12605
|
children: "Destination Network"
|
|
@@ -12638,7 +12609,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12638
12609
|
"span",
|
|
12639
12610
|
{
|
|
12640
12611
|
style: {
|
|
12641
|
-
color: components.card.
|
|
12612
|
+
color: components.card.rowRightLabel,
|
|
12642
12613
|
fontFamily: fonts.regular,
|
|
12643
12614
|
fontSize: "14px"
|
|
12644
12615
|
},
|
|
@@ -12680,15 +12651,14 @@ function DepositDetailContent({ execution }) {
|
|
|
12680
12651
|
href: execution.explorer_url,
|
|
12681
12652
|
target: "_blank",
|
|
12682
12653
|
rel: "noopener noreferrer",
|
|
12683
|
-
className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3
|
|
12684
|
-
style: { borderColor: colors2.border },
|
|
12654
|
+
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",
|
|
12685
12655
|
children: [
|
|
12686
12656
|
/* @__PURE__ */ jsx72(
|
|
12687
12657
|
"div",
|
|
12688
12658
|
{
|
|
12689
12659
|
className: "uf-text-sm",
|
|
12690
12660
|
style: {
|
|
12691
|
-
color: components.card.
|
|
12661
|
+
color: components.card.rowLeftLabel,
|
|
12692
12662
|
fontFamily: fonts.regular
|
|
12693
12663
|
},
|
|
12694
12664
|
children: "Deposit Tx"
|
|
@@ -12699,7 +12669,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12699
12669
|
{
|
|
12700
12670
|
className: "uf-text-sm uf-text-right",
|
|
12701
12671
|
style: {
|
|
12702
|
-
color: components.card.
|
|
12672
|
+
color: components.card.rowRightLabel,
|
|
12703
12673
|
fontFamily: fonts.regular
|
|
12704
12674
|
},
|
|
12705
12675
|
children: formatTransactionHash(execution.transaction_hash)
|
|
@@ -12709,7 +12679,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12709
12679
|
ExternalLink,
|
|
12710
12680
|
{
|
|
12711
12681
|
className: "uf-w-3.5 uf-h-3.5 uf-block",
|
|
12712
|
-
style: { color: components.card.
|
|
12682
|
+
style: { color: components.card.actionIcon }
|
|
12713
12683
|
}
|
|
12714
12684
|
)
|
|
12715
12685
|
]
|
|
@@ -12728,7 +12698,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12728
12698
|
{
|
|
12729
12699
|
className: "uf-text-sm",
|
|
12730
12700
|
style: {
|
|
12731
|
-
color: components.card.
|
|
12701
|
+
color: components.card.rowLeftLabel,
|
|
12732
12702
|
fontFamily: fonts.regular
|
|
12733
12703
|
},
|
|
12734
12704
|
children: "Completion Tx"
|
|
@@ -12739,7 +12709,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12739
12709
|
{
|
|
12740
12710
|
className: "uf-text-sm uf-text-right",
|
|
12741
12711
|
style: {
|
|
12742
|
-
color: components.card.
|
|
12712
|
+
color: components.card.rowRightLabel,
|
|
12743
12713
|
fontFamily: fonts.regular
|
|
12744
12714
|
},
|
|
12745
12715
|
children: formatTransactionHash(
|
|
@@ -12751,7 +12721,7 @@ function DepositDetailContent({ execution }) {
|
|
|
12751
12721
|
ExternalLink,
|
|
12752
12722
|
{
|
|
12753
12723
|
className: "uf-w-3.5 uf-h-3.5 uf-block",
|
|
12754
|
-
style: { color: components.card.
|
|
12724
|
+
style: { color: components.card.actionIcon }
|
|
12755
12725
|
}
|
|
12756
12726
|
)
|
|
12757
12727
|
]
|
|
@@ -13510,25 +13480,28 @@ function BuyWithCard({
|
|
|
13510
13480
|
}
|
|
13511
13481
|
}
|
|
13512
13482
|
) }) }),
|
|
13513
|
-
selectedCurrencyData?.suggested_amounts && selectedCurrencyData.suggested_amounts.length > 0 && /* @__PURE__ */ jsx102("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: selectedCurrencyData.suggested_amounts.map((quickAmount) =>
|
|
13514
|
-
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13483
|
+
selectedCurrencyData?.suggested_amounts && selectedCurrencyData.suggested_amounts.length > 0 && /* @__PURE__ */ jsx102("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: selectedCurrencyData.suggested_amounts.map((quickAmount) => {
|
|
13484
|
+
const isSelected = parseFloat(amount) === quickAmount;
|
|
13485
|
+
return /* @__PURE__ */ jsxs8(
|
|
13486
|
+
"button",
|
|
13487
|
+
{
|
|
13488
|
+
onClick: () => handleQuickAmount(quickAmount),
|
|
13489
|
+
className: "uf-w-24 uf-py-2 hover:uf-bg-accent uf-transition-colors uf-text-sm uf-font-medium",
|
|
13490
|
+
style: {
|
|
13491
|
+
backgroundColor: components.card.backgroundColor,
|
|
13492
|
+
color: components.card.titleColor,
|
|
13493
|
+
fontFamily: fonts.medium,
|
|
13494
|
+
borderRadius: components.card.borderRadius,
|
|
13495
|
+
border: `${components.card.borderWidth}px solid ${isSelected ? colors2.primary : components.card.borderColor}`
|
|
13496
|
+
},
|
|
13497
|
+
children: [
|
|
13498
|
+
getCurrencySymbol(currency),
|
|
13499
|
+
quickAmount.toLocaleString()
|
|
13500
|
+
]
|
|
13524
13501
|
},
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
]
|
|
13529
|
-
},
|
|
13530
|
-
quickAmount
|
|
13531
|
-
)) }),
|
|
13502
|
+
quickAmount
|
|
13503
|
+
);
|
|
13504
|
+
}) }),
|
|
13532
13505
|
amountValidationError && /* @__PURE__ */ jsx102(
|
|
13533
13506
|
"div",
|
|
13534
13507
|
{
|
|
@@ -13547,7 +13520,7 @@ function BuyWithCard({
|
|
|
13547
13520
|
"span",
|
|
13548
13521
|
{
|
|
13549
13522
|
style: {
|
|
13550
|
-
color: components.card.
|
|
13523
|
+
color: components.card.labelColor,
|
|
13551
13524
|
fontFamily: fonts.medium
|
|
13552
13525
|
},
|
|
13553
13526
|
children: "Provider"
|
|
@@ -13606,7 +13579,7 @@ function BuyWithCard({
|
|
|
13606
13579
|
{
|
|
13607
13580
|
className: "uf-text-xs uf-font-normal uf-mb-2",
|
|
13608
13581
|
style: {
|
|
13609
|
-
color: components.card.
|
|
13582
|
+
color: components.card.headerColor,
|
|
13610
13583
|
fontFamily: fonts.regular
|
|
13611
13584
|
},
|
|
13612
13585
|
children: "Auto-picked for you"
|
|
@@ -13721,8 +13694,8 @@ function BuyWithCard({
|
|
|
13721
13694
|
/* @__PURE__ */ jsx102(
|
|
13722
13695
|
"div",
|
|
13723
13696
|
{
|
|
13724
|
-
className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
13725
|
-
children: /* @__PURE__ */ jsx102("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
|
|
13697
|
+
className: `uf-transition-all uf-duration-300 uf-min-h-[420px] uf-flex uf-flex-col ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
13698
|
+
children: /* @__PURE__ */ jsx102("div", { className: "uf-space-y-2 uf-pt-2 uf-pb-8 uf-overflow-y-auto uf-flex-1 uf-min-h-0", children: sortedQuotes.map((quote, index2) => {
|
|
13726
13699
|
const badges = getProviderBadges(quote, sortedQuotes);
|
|
13727
13700
|
const displayName = quote.service_provider_display_name;
|
|
13728
13701
|
const isSelected = selectedProvider?.service_provider === quote.service_provider;
|
|
@@ -13739,11 +13712,11 @@ function BuyWithCard({
|
|
|
13739
13712
|
},
|
|
13740
13713
|
onMouseEnter: () => setHoveredProviderIndex(index2),
|
|
13741
13714
|
onMouseLeave: () => setHoveredProviderIndex(null),
|
|
13742
|
-
className:
|
|
13715
|
+
className: "uf-w-full uf-transition-colors uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
|
|
13743
13716
|
style: {
|
|
13744
13717
|
backgroundColor: hoveredProviderIndex === index2 ? colors2.cardHover : components.card.backgroundColor,
|
|
13745
13718
|
borderRadius: components.card.borderRadius,
|
|
13746
|
-
border: `${components.card.borderWidth}px solid ${components.card.borderColor}`
|
|
13719
|
+
border: isSelected ? `2px solid ${colors2.primary}` : `${components.card.borderWidth}px solid ${components.card.borderColor}`
|
|
13747
13720
|
},
|
|
13748
13721
|
children: [
|
|
13749
13722
|
/* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
@@ -13770,7 +13743,8 @@ function BuyWithCard({
|
|
|
13770
13743
|
badges.map((badge, i) => /* @__PURE__ */ jsxs8(
|
|
13771
13744
|
"span",
|
|
13772
13745
|
{
|
|
13773
|
-
className: "uf-text-[10px] uf-
|
|
13746
|
+
className: "uf-text-[10px] uf-font-normal",
|
|
13747
|
+
style: { color: colors2.success },
|
|
13774
13748
|
children: [
|
|
13775
13749
|
badge,
|
|
13776
13750
|
i < badges.length - 1 && ","
|
|
@@ -13778,8 +13752,25 @@ function BuyWithCard({
|
|
|
13778
13752
|
},
|
|
13779
13753
|
i
|
|
13780
13754
|
)),
|
|
13781
|
-
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx102(
|
|
13782
|
-
|
|
13755
|
+
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx102(
|
|
13756
|
+
"span",
|
|
13757
|
+
{
|
|
13758
|
+
className: "uf-text-[10px]",
|
|
13759
|
+
style: { color: components.card.subtextRightColor },
|
|
13760
|
+
children: "\u2022"
|
|
13761
|
+
}
|
|
13762
|
+
),
|
|
13763
|
+
quote.low_kyc === false && /* @__PURE__ */ jsx102(
|
|
13764
|
+
"span",
|
|
13765
|
+
{
|
|
13766
|
+
className: "uf-text-[10px] uf-font-normal",
|
|
13767
|
+
style: {
|
|
13768
|
+
color: components.card.subtextRightColor,
|
|
13769
|
+
fontFamily: fonts.regular
|
|
13770
|
+
},
|
|
13771
|
+
children: "No document upload"
|
|
13772
|
+
}
|
|
13773
|
+
)
|
|
13783
13774
|
] })
|
|
13784
13775
|
] })
|
|
13785
13776
|
] }),
|
|
@@ -13880,7 +13871,7 @@ function BuyWithCard({
|
|
|
13880
13871
|
}
|
|
13881
13872
|
)
|
|
13882
13873
|
] }),
|
|
13883
|
-
/* @__PURE__ */ jsx102("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx102(ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.
|
|
13874
|
+
/* @__PURE__ */ jsx102("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx102(ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.iconColor } }) }),
|
|
13884
13875
|
/* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
13885
13876
|
/* @__PURE__ */ jsx102("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs8("div", { className: "uf-relative", children: [
|
|
13886
13877
|
/* @__PURE__ */ jsx102(
|
|
@@ -13923,7 +13914,7 @@ function BuyWithCard({
|
|
|
13923
13914
|
}
|
|
13924
13915
|
)
|
|
13925
13916
|
] }),
|
|
13926
|
-
/* @__PURE__ */ jsx102("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx102(ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.
|
|
13917
|
+
/* @__PURE__ */ jsx102("div", { className: "uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx102(ChevronRight, { className: "uf-w-4 uf-h-4", style: { color: components.card.iconColor } }) }),
|
|
13927
13918
|
/* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
13928
13919
|
/* @__PURE__ */ jsx102("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs8("div", { className: "uf-relative", children: [
|
|
13929
13920
|
/* @__PURE__ */ jsx102(
|
|
@@ -14405,7 +14396,7 @@ function DepositExecutionItem({
|
|
|
14405
14396
|
{
|
|
14406
14397
|
className: "uf-font-medium uf-text-sm uf-flex-shrink-0",
|
|
14407
14398
|
style: {
|
|
14408
|
-
color: components.card.
|
|
14399
|
+
color: components.card.textRightColor,
|
|
14409
14400
|
fontFamily: fonts.medium
|
|
14410
14401
|
},
|
|
14411
14402
|
children: formatUsdAmount2(execution.source_amount_usd || "0")
|
|
@@ -14454,7 +14445,7 @@ function TransferCryptoButton({
|
|
|
14454
14445
|
Zap,
|
|
14455
14446
|
{
|
|
14456
14447
|
className: "uf-w-5 uf-h-5",
|
|
14457
|
-
style: { color:
|
|
14448
|
+
style: { color: components.card.iconColor }
|
|
14458
14449
|
}
|
|
14459
14450
|
) }),
|
|
14460
14451
|
/* @__PURE__ */ jsxs11("div", { className: "uf-text-left", children: [
|
|
@@ -14541,7 +14532,7 @@ function DepositWithCardButton({
|
|
|
14541
14532
|
CreditCard,
|
|
14542
14533
|
{
|
|
14543
14534
|
className: "uf-w-5 uf-h-5",
|
|
14544
|
-
style: { color:
|
|
14535
|
+
style: { color: components.card.iconColor }
|
|
14545
14536
|
}
|
|
14546
14537
|
) }),
|
|
14547
14538
|
/* @__PURE__ */ jsxs12("div", { className: "uf-text-left", children: [
|
|
@@ -14634,7 +14625,7 @@ function PayWithExchangeButton({
|
|
|
14634
14625
|
ArrowLeftRight,
|
|
14635
14626
|
{
|
|
14636
14627
|
className: "uf-w-5 uf-h-5",
|
|
14637
|
-
style: { color:
|
|
14628
|
+
style: { color: components.card.iconColor }
|
|
14638
14629
|
}
|
|
14639
14630
|
) }),
|
|
14640
14631
|
/* @__PURE__ */ jsxs13("div", { className: "uf-text-left", children: [
|
|
@@ -14721,7 +14712,7 @@ function DepositTrackerButton({
|
|
|
14721
14712
|
Clock,
|
|
14722
14713
|
{
|
|
14723
14714
|
className: "uf-w-5 uf-h-5",
|
|
14724
|
-
style: { color:
|
|
14715
|
+
style: { color: components.card.iconColor }
|
|
14725
14716
|
}
|
|
14726
14717
|
),
|
|
14727
14718
|
badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx162(
|
|
@@ -17551,7 +17542,7 @@ function DepositsModal({
|
|
|
17551
17542
|
onClose: handleClose
|
|
17552
17543
|
}
|
|
17553
17544
|
),
|
|
17554
|
-
/* @__PURE__ */ jsx33("div", { className: "uf-flex-1 uf-min-h-0 uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx33("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx33("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx33(
|
|
17545
|
+
/* @__PURE__ */ jsx33("div", { className: "uf-flex-1 uf-min-h-0 uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx33("div", { className: "uf-space-y-2 uf-pb-8", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx33("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx33(
|
|
17555
17546
|
"div",
|
|
17556
17547
|
{
|
|
17557
17548
|
className: "uf-text-sm",
|
|
@@ -17745,23 +17736,33 @@ function TokenSelectorSheet({
|
|
|
17745
17736
|
),
|
|
17746
17737
|
/* @__PURE__ */ jsx34("div", { className: "uf-w-7 uf-h-5 uf-invisible" })
|
|
17747
17738
|
] }),
|
|
17748
|
-
/* @__PURE__ */
|
|
17749
|
-
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
17753
|
-
|
|
17754
|
-
|
|
17755
|
-
className: "uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
|
|
17756
|
-
style: {
|
|
17757
|
-
backgroundColor: components.search.backgroundColor,
|
|
17758
|
-
color: components.search.inputColor,
|
|
17759
|
-
fontFamily: fonts.regular,
|
|
17760
|
-
borderRadius: components.input.borderRadius,
|
|
17761
|
-
border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
|
|
17739
|
+
/* @__PURE__ */ jsxs30("div", { className: "uf-pb-3", children: [
|
|
17740
|
+
/* @__PURE__ */ jsx34(
|
|
17741
|
+
"style",
|
|
17742
|
+
{
|
|
17743
|
+
dangerouslySetInnerHTML: {
|
|
17744
|
+
__html: `.uf-token-sheet-search::placeholder { color: ${components.search.placeholderColor}; }`
|
|
17745
|
+
}
|
|
17762
17746
|
}
|
|
17763
|
-
|
|
17764
|
-
|
|
17747
|
+
),
|
|
17748
|
+
/* @__PURE__ */ jsx34("div", { style: { position: "relative" }, children: /* @__PURE__ */ jsx34(
|
|
17749
|
+
"input",
|
|
17750
|
+
{
|
|
17751
|
+
type: "text",
|
|
17752
|
+
placeholder: "Search",
|
|
17753
|
+
value: searchQuery,
|
|
17754
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
17755
|
+
className: "uf-token-sheet-search uf-w-full uf-px-4 uf-py-2.5 uf-text-sm uf-outline-none focus:uf-ring-2 focus:uf-ring-ring/30",
|
|
17756
|
+
style: {
|
|
17757
|
+
backgroundColor: components.search.backgroundColor,
|
|
17758
|
+
color: components.search.inputColor,
|
|
17759
|
+
fontFamily: fonts.regular,
|
|
17760
|
+
borderRadius: components.input.borderRadius,
|
|
17761
|
+
border: `${components.input.borderWidth}px solid ${components.input.borderColor}`
|
|
17762
|
+
}
|
|
17763
|
+
}
|
|
17764
|
+
) })
|
|
17765
|
+
] }),
|
|
17765
17766
|
quickSelectOptions.length > 0 && !searchQuery && /* @__PURE__ */ jsxs30("div", { className: "uf-pb-3 uf--mx-6", children: [
|
|
17766
17767
|
/* @__PURE__ */ jsx34(
|
|
17767
17768
|
"div",
|
|
@@ -18013,12 +18014,13 @@ function TokenSelectorSheet({
|
|
|
18013
18014
|
style: {
|
|
18014
18015
|
fontSize: 12,
|
|
18015
18016
|
flexShrink: 0,
|
|
18016
|
-
color: components.card.labelColor,
|
|
18017
18017
|
fontFamily: fonts.regular
|
|
18018
18018
|
},
|
|
18019
18019
|
children: [
|
|
18020
|
-
"
|
|
18021
|
-
|
|
18020
|
+
/* @__PURE__ */ jsxs30("span", { style: { color: components.card.textRightColor }, children: [
|
|
18021
|
+
"Minimum:",
|
|
18022
|
+
" "
|
|
18023
|
+
] }),
|
|
18022
18024
|
/* @__PURE__ */ jsxs30("span", { style: { color: components.card.labelHighlightRightColor }, children: [
|
|
18023
18025
|
"$",
|
|
18024
18026
|
chain.minimum_deposit_amount_usd
|
|
@@ -18094,13 +18096,15 @@ function DepositPollingUi({
|
|
|
18094
18096
|
function DepositFooterLinks({
|
|
18095
18097
|
onGlossaryClick
|
|
18096
18098
|
}) {
|
|
18099
|
+
const { colors: colors2 } = useTheme();
|
|
18097
18100
|
return /* @__PURE__ */ jsxs322("div", { className: "uf-flex uf-justify-end uf-items-center uf-gap-2 uf-text-xs uf-text-muted-foreground", children: [
|
|
18098
18101
|
/* @__PURE__ */ jsx36(
|
|
18099
18102
|
"a",
|
|
18100
18103
|
{
|
|
18101
18104
|
href: "https://unifold.io/terms",
|
|
18102
18105
|
target: "_blank",
|
|
18103
|
-
className: "uf-cursor-pointer hover:uf-
|
|
18106
|
+
className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
|
|
18107
|
+
style: { color: colors2.primary },
|
|
18104
18108
|
children: "Terms"
|
|
18105
18109
|
}
|
|
18106
18110
|
),
|
|
@@ -18110,7 +18114,8 @@ function DepositFooterLinks({
|
|
|
18110
18114
|
{
|
|
18111
18115
|
href: "https://unifold.io/support",
|
|
18112
18116
|
target: "_blank",
|
|
18113
|
-
className: "uf-cursor-pointer hover:uf-
|
|
18117
|
+
className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
|
|
18118
|
+
style: { color: colors2.primary },
|
|
18114
18119
|
children: "Help"
|
|
18115
18120
|
}
|
|
18116
18121
|
),
|
|
@@ -18118,8 +18123,9 @@ function DepositFooterLinks({
|
|
|
18118
18123
|
/* @__PURE__ */ jsx36(
|
|
18119
18124
|
"div",
|
|
18120
18125
|
{
|
|
18121
|
-
className: "uf-cursor-pointer hover:uf-
|
|
18126
|
+
className: "uf-cursor-pointer hover:uf-opacity-90 uf-transition-colors",
|
|
18122
18127
|
onClick: onGlossaryClick,
|
|
18128
|
+
style: { color: colors2.primary },
|
|
18123
18129
|
children: "Glossary"
|
|
18124
18130
|
}
|
|
18125
18131
|
)
|
|
@@ -18129,61 +18135,117 @@ var t3 = i18n2.transferCrypto;
|
|
|
18129
18135
|
function GlossaryModal({
|
|
18130
18136
|
open,
|
|
18131
18137
|
onOpenChange,
|
|
18132
|
-
|
|
18133
|
-
|
|
18138
|
+
backgroundColor: backgroundColorProp,
|
|
18139
|
+
themeClass: themeClassProp,
|
|
18140
|
+
colors: colorsProp
|
|
18134
18141
|
}) {
|
|
18142
|
+
const { themeClass, colors: colors2, components } = useTheme();
|
|
18143
|
+
const resolvedThemeClass = themeClassProp ?? themeClass;
|
|
18144
|
+
const modalBackground = backgroundColorProp ?? colors2.background;
|
|
18135
18145
|
return /* @__PURE__ */ jsx37(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs33(
|
|
18136
18146
|
DialogContent2,
|
|
18137
18147
|
{
|
|
18138
|
-
className: `sm:uf-max-w-[400px] !uf-top-auto !uf-h-auto sm:!uf-top-[50%] uf-border-secondary uf-
|
|
18139
|
-
style: { backgroundColor:
|
|
18148
|
+
className: `sm:uf-max-w-[400px] !uf-top-auto !uf-h-auto sm:!uf-top-[50%] uf-border-secondary uf-p-0 uf-gap-0 [&>button]:uf-hidden ${resolvedThemeClass}`,
|
|
18149
|
+
style: { backgroundColor: modalBackground },
|
|
18140
18150
|
children: [
|
|
18141
|
-
/* @__PURE__ */ jsxs33("div", { className: "uf-flex uf-items-center uf-justify-between
|
|
18142
|
-
/* @__PURE__ */ jsx37(
|
|
18151
|
+
/* @__PURE__ */ jsxs33("div", { className: "uf-relative uf-flex uf-items-center uf-justify-between", children: [
|
|
18152
|
+
/* @__PURE__ */ jsx37("span", { className: "uf-invisible uf-w-9 uf-h-9 uf-flex uf-shrink-0 uf-items-center uf-justify-center", "aria-hidden": true, children: /* @__PURE__ */ jsx37(X, { className: "uf-w-4 uf-h-4" }) }),
|
|
18153
|
+
/* @__PURE__ */ jsx37(
|
|
18154
|
+
DialogTitle2,
|
|
18155
|
+
{
|
|
18156
|
+
className: "uf-text-base uf-font-medium uf-absolute uf-left-0 uf-right-0 uf-text-center uf-pointer-events-none",
|
|
18157
|
+
style: { color: components.header.titleColor },
|
|
18158
|
+
children: "Glossary"
|
|
18159
|
+
}
|
|
18160
|
+
),
|
|
18143
18161
|
/* @__PURE__ */ jsx37(
|
|
18144
18162
|
"button",
|
|
18145
18163
|
{
|
|
18146
18164
|
onClick: () => onOpenChange(false),
|
|
18147
|
-
className: "uf-p-1 uf-rounded-lg hover:uf-bg-secondary uf-transition-colors uf-
|
|
18165
|
+
className: "uf-p-1 uf-rounded-lg hover:uf-bg-secondary uf-transition-colors uf-flex-shrink-0 uf-z-[1]",
|
|
18166
|
+
style: { color: components.header.buttonColor },
|
|
18148
18167
|
children: /* @__PURE__ */ jsx37(X, { className: "uf-w-4 uf-h-4" })
|
|
18149
18168
|
}
|
|
18150
18169
|
)
|
|
18151
18170
|
] }),
|
|
18152
|
-
/* @__PURE__ */ jsx37("div", { className: "uf-max-h-[60vh] sm:uf-max-h-[400px] uf-overflow-y-auto uf-
|
|
18153
|
-
/* @__PURE__ */ jsxs33(
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
|
|
18165
|
-
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18170
|
-
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18180
|
-
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
18171
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-max-h-[60vh] sm:uf-max-h-[400px] uf-overflow-y-auto uf-pb-4 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs33("div", { className: "uf-space-y-3", children: [
|
|
18172
|
+
/* @__PURE__ */ jsxs33(
|
|
18173
|
+
"div",
|
|
18174
|
+
{
|
|
18175
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18176
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18177
|
+
children: [
|
|
18178
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Your Deposit Token" }),
|
|
18179
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.selectTokenDepositTooltip })
|
|
18180
|
+
]
|
|
18181
|
+
}
|
|
18182
|
+
),
|
|
18183
|
+
/* @__PURE__ */ jsxs33(
|
|
18184
|
+
"div",
|
|
18185
|
+
{
|
|
18186
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18187
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18188
|
+
children: [
|
|
18189
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Deposit Address" }),
|
|
18190
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "A unique wallet address generated for you. Send supported tokens to this address and they will be automatically converted and deposited into your account." })
|
|
18191
|
+
]
|
|
18192
|
+
}
|
|
18193
|
+
),
|
|
18194
|
+
/* @__PURE__ */ jsxs33(
|
|
18195
|
+
"div",
|
|
18196
|
+
{
|
|
18197
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18198
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18199
|
+
children: [
|
|
18200
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Price Impact" }),
|
|
18201
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.priceImpact.tooltip })
|
|
18202
|
+
]
|
|
18203
|
+
}
|
|
18204
|
+
),
|
|
18205
|
+
/* @__PURE__ */ jsxs33(
|
|
18206
|
+
"div",
|
|
18207
|
+
{
|
|
18208
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18209
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18210
|
+
children: [
|
|
18211
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Slippage" }),
|
|
18212
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.slippage.tooltip })
|
|
18213
|
+
]
|
|
18214
|
+
}
|
|
18215
|
+
),
|
|
18216
|
+
/* @__PURE__ */ jsxs33(
|
|
18217
|
+
"div",
|
|
18218
|
+
{
|
|
18219
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18220
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18221
|
+
children: [
|
|
18222
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Processing Time" }),
|
|
18223
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "The estimated time for your deposit to be confirmed and credited. This depends on the source network's block confirmation time and current congestion." })
|
|
18224
|
+
]
|
|
18225
|
+
}
|
|
18226
|
+
),
|
|
18227
|
+
/* @__PURE__ */ jsxs33(
|
|
18228
|
+
"div",
|
|
18229
|
+
{
|
|
18230
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18231
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18232
|
+
children: [
|
|
18233
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Minimum Deposit" }),
|
|
18234
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: t3.minDeposit.tooltip })
|
|
18235
|
+
]
|
|
18236
|
+
}
|
|
18237
|
+
),
|
|
18238
|
+
/* @__PURE__ */ jsxs33(
|
|
18239
|
+
"div",
|
|
18240
|
+
{
|
|
18241
|
+
className: "uf-rounded-xl uf-p-3",
|
|
18242
|
+
style: { backgroundColor: components.card.backgroundColor },
|
|
18243
|
+
children: [
|
|
18244
|
+
/* @__PURE__ */ jsx37("div", { className: "uf-text-sm uf-font-medium uf-mb-1", style: { color: components.card.titleColor }, children: "Recipient Address" }),
|
|
18245
|
+
/* @__PURE__ */ jsx37("p", { className: "uf-text-xs uf-leading-relaxed", style: { color: components.card.descriptionColor }, children: "The destination address on the target blockchain where your converted deposit will be sent. This is typically your wallet address on the application's native chain." })
|
|
18246
|
+
]
|
|
18247
|
+
}
|
|
18248
|
+
)
|
|
18187
18249
|
] }) })
|
|
18188
18250
|
]
|
|
18189
18251
|
}
|
|
@@ -18424,7 +18486,7 @@ function TransferCryptoSingleInput({
|
|
|
18424
18486
|
className: "uf-space-y-3 [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden",
|
|
18425
18487
|
style: { backgroundColor: colors2.background },
|
|
18426
18488
|
children: [
|
|
18427
|
-
/* @__PURE__ */ jsx39("div", { className: "uf-text-xs uf-
|
|
18489
|
+
/* @__PURE__ */ jsx39("div", { className: "uf-text-xs uf-mb-1 uf-flex uf-items-center uf-justify-between", style: { color: components.card.labelColor }, children: /* @__PURE__ */ jsx39("div", { className: "uf-flex uf-items-center uf-gap-1", children: t4.selectTokenDeposit }) }),
|
|
18428
18490
|
/* @__PURE__ */ jsx39(
|
|
18429
18491
|
"button",
|
|
18430
18492
|
{
|
|
@@ -18528,7 +18590,7 @@ function TransferCryptoSingleInput({
|
|
|
18528
18590
|
] })
|
|
18529
18591
|
] }),
|
|
18530
18592
|
/* @__PURE__ */ jsxs34("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
|
|
18531
|
-
/* @__PURE__ */ jsx39("div", { className: "uf-text-xs uf-
|
|
18593
|
+
/* @__PURE__ */ jsx39("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: "Intent address" }),
|
|
18532
18594
|
/* @__PURE__ */ jsx39("div", { className: "uf-shadow-lg", style: { borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: loading || tokensLoading || !initialSelectionDone ? (
|
|
18533
18595
|
// QR Skeleton - matches QR code appearance
|
|
18534
18596
|
/* @__PURE__ */ jsx39(
|
|
@@ -18573,7 +18635,7 @@ function TransferCryptoSingleInput({
|
|
|
18573
18635
|
}
|
|
18574
18636
|
) })
|
|
18575
18637
|
] }),
|
|
18576
|
-
/* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsxs34("div", { className: "uf-text-sm uf-
|
|
18638
|
+
/* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsxs34("div", { className: "uf-text-sm uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
|
|
18577
18639
|
loading || tokensLoading || !initialSelectionDone ? (
|
|
18578
18640
|
// Address skeleton
|
|
18579
18641
|
/* @__PURE__ */ jsx39(
|
|
@@ -18585,12 +18647,13 @@ function TransferCryptoSingleInput({
|
|
|
18585
18647
|
}
|
|
18586
18648
|
}
|
|
18587
18649
|
)
|
|
18588
|
-
) : /* @__PURE__ */ jsx39("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t4.noAddressAvailable }),
|
|
18650
|
+
) : /* @__PURE__ */ jsx39("span", { className: "uf-text-sm uf-truncate uf-min-w-0", style: { color: components.card.titleColor }, children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t4.noAddressAvailable }),
|
|
18589
18651
|
depositAddress && initialSelectionDone && /* @__PURE__ */ jsx39(
|
|
18590
18652
|
"span",
|
|
18591
18653
|
{
|
|
18592
18654
|
onClick: handleCopyAddress,
|
|
18593
|
-
className:
|
|
18655
|
+
className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
|
|
18656
|
+
style: { color: copied ? colors2.success : components.card.actionColor },
|
|
18594
18657
|
children: copied ? /* @__PURE__ */ jsx39(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx39(Copy, { className: "uf-w-3.5 uf-h-3.5" })
|
|
18595
18658
|
}
|
|
18596
18659
|
)
|
|
@@ -18652,7 +18715,8 @@ function TransferCryptoSingleInput({
|
|
|
18652
18715
|
"span",
|
|
18653
18716
|
{
|
|
18654
18717
|
onClick: () => handleCopyRecipientAddress(recipientAddress),
|
|
18655
|
-
className:
|
|
18718
|
+
className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
|
|
18719
|
+
style: { color: copiedRecipient ? colors2.success : components.card.actionColor },
|
|
18656
18720
|
children: copiedRecipient ? /* @__PURE__ */ jsx39(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx39(Copy, { className: "uf-w-3.5 uf-h-3.5" })
|
|
18657
18721
|
}
|
|
18658
18722
|
)
|
|
@@ -19043,7 +19107,7 @@ function TransferCryptoDoubleInput({
|
|
|
19043
19107
|
children: [
|
|
19044
19108
|
/* @__PURE__ */ jsxs36("div", { className: "uf-grid uf-grid-cols-2 uf-gap-2.5", children: [
|
|
19045
19109
|
/* @__PURE__ */ jsxs36("div", { children: [
|
|
19046
|
-
/* @__PURE__ */ jsx41("div", { className: "uf-text-xs uf-
|
|
19110
|
+
/* @__PURE__ */ jsx41("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: t5.selectedToken }),
|
|
19047
19111
|
/* @__PURE__ */ jsxs36(
|
|
19048
19112
|
Select2,
|
|
19049
19113
|
{
|
|
@@ -19051,7 +19115,7 @@ function TransferCryptoDoubleInput({
|
|
|
19051
19115
|
onValueChange: setToken,
|
|
19052
19116
|
disabled: tokensLoading || supportedTokens.length === 0,
|
|
19053
19117
|
children: [
|
|
19054
|
-
/* @__PURE__ */ jsx41(SelectTrigger2, { className: "uf-
|
|
19118
|
+
/* @__PURE__ */ jsx41(SelectTrigger2, { className: "uf-h-10 hover:uf-opacity-90 uf-text-foreground disabled:uf-opacity-50", style: { backgroundColor: components.card.backgroundColor, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: /* @__PURE__ */ jsx41(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx41("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx41("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx41("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx41("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
|
|
19055
19119
|
/* @__PURE__ */ jsx41(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", style: { border: `1px solid ${isDarkMode ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.15)"}`, ...fonts.regular ? { "--uf-font-family": fonts.regular } : {} }, children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx41(
|
|
19056
19120
|
SelectItem2,
|
|
19057
19121
|
{
|
|
@@ -19066,7 +19130,7 @@ function TransferCryptoDoubleInput({
|
|
|
19066
19130
|
)
|
|
19067
19131
|
] }),
|
|
19068
19132
|
/* @__PURE__ */ jsxs36("div", { children: [
|
|
19069
|
-
/* @__PURE__ */ jsxs36("div", { className: "uf-text-xs uf-
|
|
19133
|
+
/* @__PURE__ */ jsxs36("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: [
|
|
19070
19134
|
t5.selectedChain,
|
|
19071
19135
|
/* @__PURE__ */ jsxs36("span", { className: "uf-font-medium", style: { color: components.card.labelHighlightRightColor }, children: [
|
|
19072
19136
|
"$",
|
|
@@ -19082,7 +19146,7 @@ function TransferCryptoDoubleInput({
|
|
|
19082
19146
|
onValueChange: setChain,
|
|
19083
19147
|
disabled: tokensLoading || availableChainsForToken.length === 0,
|
|
19084
19148
|
children: [
|
|
19085
|
-
/* @__PURE__ */ jsx41(SelectTrigger2, { className: "uf-
|
|
19149
|
+
/* @__PURE__ */ jsx41(SelectTrigger2, { className: "uf-h-10 hover:uf-opacity-90 uf-text-foreground disabled:uf-opacity-50", style: { backgroundColor: components.card.backgroundColor, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: /* @__PURE__ */ jsx41(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx41("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx41("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t5.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx41("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx41("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
|
|
19086
19150
|
/* @__PURE__ */ jsx41(
|
|
19087
19151
|
SelectContent2,
|
|
19088
19152
|
{
|
|
@@ -19125,7 +19189,7 @@ function TransferCryptoDoubleInput({
|
|
|
19125
19189
|
] })
|
|
19126
19190
|
] }),
|
|
19127
19191
|
/* @__PURE__ */ jsxs36("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-2", children: [
|
|
19128
|
-
/* @__PURE__ */ jsx41("div", { className: "uf-text-xs uf-
|
|
19192
|
+
/* @__PURE__ */ jsx41("div", { className: "uf-text-xs uf-mb-2 uf-flex uf-items-center uf-gap-1", style: { color: components.card.labelColor }, children: "Intent address" }),
|
|
19129
19193
|
/* @__PURE__ */ jsx41("div", { className: "uf-shadow-lg", style: { borderRadius: components.card.borderRadius, border: `${components.card.borderWidth}px solid ${components.card.borderColor}` }, children: loading || tokensLoading || !initialSelectionDone ? (
|
|
19130
19194
|
// QR Skeleton - matches QR code appearance
|
|
19131
19195
|
/* @__PURE__ */ jsx41(
|
|
@@ -19170,7 +19234,7 @@ function TransferCryptoDoubleInput({
|
|
|
19170
19234
|
}
|
|
19171
19235
|
) })
|
|
19172
19236
|
] }),
|
|
19173
|
-
/* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsxs36("div", { className: "uf-text-sm uf-
|
|
19237
|
+
/* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsxs36("div", { className: "uf-text-sm uf-mb-2 uf-flex uf-justify-center uf-items-center uf-gap-1", children: [
|
|
19174
19238
|
loading || tokensLoading || !initialSelectionDone ? (
|
|
19175
19239
|
// Address skeleton
|
|
19176
19240
|
/* @__PURE__ */ jsx41(
|
|
@@ -19182,12 +19246,13 @@ function TransferCryptoDoubleInput({
|
|
|
19182
19246
|
}
|
|
19183
19247
|
}
|
|
19184
19248
|
)
|
|
19185
|
-
) : /* @__PURE__ */ jsx41("span", { className: "uf-text-sm uf-truncate uf-min-w-0", children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t5.noAddressAvailable }),
|
|
19249
|
+
) : /* @__PURE__ */ jsx41("span", { className: "uf-text-sm uf-truncate uf-min-w-0", style: { color: components.card.titleColor }, children: depositAddress ? truncateAddress(depositAddress, 8, 6) : t5.noAddressAvailable }),
|
|
19186
19250
|
depositAddress && initialSelectionDone && /* @__PURE__ */ jsx41(
|
|
19187
19251
|
"span",
|
|
19188
19252
|
{
|
|
19189
19253
|
onClick: handleCopyAddress,
|
|
19190
|
-
className:
|
|
19254
|
+
className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
|
|
19255
|
+
style: { color: copied ? colors2.success : components.card.actionColor },
|
|
19191
19256
|
children: copied ? /* @__PURE__ */ jsx41(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx41(Copy, { className: "uf-w-3.5 uf-h-3.5" })
|
|
19192
19257
|
}
|
|
19193
19258
|
)
|
|
@@ -19249,7 +19314,8 @@ function TransferCryptoDoubleInput({
|
|
|
19249
19314
|
"span",
|
|
19250
19315
|
{
|
|
19251
19316
|
onClick: () => handleCopyRecipientAddress(recipientAddress),
|
|
19252
|
-
className:
|
|
19317
|
+
className: "uf-flex-shrink-0 uf-transition-colors uf-cursor-pointer",
|
|
19318
|
+
style: { color: copiedRecipient ? colors2.success : components.card.actionColor },
|
|
19253
19319
|
children: copiedRecipient ? /* @__PURE__ */ jsx41(Check, { className: "uf-w-3.5 uf-h-3.5" }) : /* @__PURE__ */ jsx41(Copy, { className: "uf-w-3.5 uf-h-3.5" })
|
|
19254
19320
|
}
|
|
19255
19321
|
)
|
|
@@ -21643,7 +21709,7 @@ function DepositModal({
|
|
|
21643
21709
|
onClose: handleClose
|
|
21644
21710
|
}
|
|
21645
21711
|
),
|
|
21646
|
-
/* @__PURE__ */ jsx48("div", { className: "uf-h-[460px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: selectedExecution ? /* @__PURE__ */ jsx48(DepositDetailContent, { execution: selectedExecution }) : /* @__PURE__ */ jsx48("div", { className: "uf-space-y-2 uf-pb-
|
|
21712
|
+
/* @__PURE__ */ jsx48("div", { className: "uf-h-[460px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: selectedExecution ? /* @__PURE__ */ jsx48(DepositDetailContent, { execution: selectedExecution }) : /* @__PURE__ */ jsx48("div", { className: "uf-space-y-2 uf-pb-8", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx48("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx48(
|
|
21647
21713
|
"div",
|
|
21648
21714
|
{
|
|
21649
21715
|
className: "uf-text-sm",
|
|
@@ -21839,6 +21905,11 @@ function UnifoldProvider2({
|
|
|
21839
21905
|
null
|
|
21840
21906
|
);
|
|
21841
21907
|
const [resolvedTheme, setResolvedTheme] = React38.useState("dark");
|
|
21908
|
+
useEffect29(() => {
|
|
21909
|
+
if (publishableKey) {
|
|
21910
|
+
setApiConfig({ publishableKey });
|
|
21911
|
+
}
|
|
21912
|
+
}, [publishableKey]);
|
|
21842
21913
|
React38.useEffect(() => {
|
|
21843
21914
|
const appearance = config?.appearance || "dark";
|
|
21844
21915
|
if (appearance === "auto") {
|
|
@@ -21855,12 +21926,16 @@ function UnifoldProvider2({
|
|
|
21855
21926
|
}
|
|
21856
21927
|
}, [config?.appearance]);
|
|
21857
21928
|
const depositPromiseRef = React38.useRef(null);
|
|
21929
|
+
const depositConfigRef = React38.useRef(null);
|
|
21930
|
+
depositConfigRef.current = depositConfig;
|
|
21858
21931
|
const closeTimeoutRef = React38.useRef(null);
|
|
21932
|
+
const closeGuardRef = React38.useRef(false);
|
|
21859
21933
|
const beginDeposit = useCallback12((config2) => {
|
|
21860
21934
|
if (closeTimeoutRef.current) {
|
|
21861
21935
|
clearTimeout(closeTimeoutRef.current);
|
|
21862
21936
|
closeTimeoutRef.current = null;
|
|
21863
21937
|
}
|
|
21938
|
+
closeGuardRef.current = false;
|
|
21864
21939
|
if (depositPromiseRef.current) {
|
|
21865
21940
|
console.warn("[UnifoldProvider] A deposit is already in progress. Cancelling previous deposit.");
|
|
21866
21941
|
depositPromiseRef.current.reject({
|
|
@@ -21872,17 +21947,27 @@ function UnifoldProvider2({
|
|
|
21872
21947
|
const promise = new Promise((resolve, reject) => {
|
|
21873
21948
|
depositPromiseRef.current = { resolve, reject };
|
|
21874
21949
|
});
|
|
21950
|
+
promise.catch(() => {
|
|
21951
|
+
});
|
|
21875
21952
|
setDepositConfig(config2);
|
|
21876
21953
|
setIsOpen(true);
|
|
21877
21954
|
return promise;
|
|
21878
21955
|
}, []);
|
|
21879
21956
|
const closeDeposit = useCallback12(() => {
|
|
21880
|
-
if (
|
|
21881
|
-
|
|
21957
|
+
if (closeGuardRef.current) {
|
|
21958
|
+
return;
|
|
21959
|
+
}
|
|
21960
|
+
closeGuardRef.current = true;
|
|
21961
|
+
const promiseToReject = depositPromiseRef.current;
|
|
21962
|
+
depositPromiseRef.current = null;
|
|
21963
|
+
if (depositConfigRef.current?.onClose) {
|
|
21964
|
+
depositConfigRef.current.onClose();
|
|
21965
|
+
}
|
|
21966
|
+
if (promiseToReject) {
|
|
21967
|
+
promiseToReject.reject({
|
|
21882
21968
|
message: "Deposit cancelled by user",
|
|
21883
21969
|
code: "DEPOSIT_CANCELLED"
|
|
21884
21970
|
});
|
|
21885
|
-
depositPromiseRef.current = null;
|
|
21886
21971
|
}
|
|
21887
21972
|
setIsOpen(false);
|
|
21888
21973
|
closeTimeoutRef.current = setTimeout(() => {
|