@dhedge/trading-widget 7.0.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/const.cjs +1 -1
- package/const.js +1 -1
- package/{contract-error-log-CaRlTnoL.js → contract-error-log-CACKgbSD.js} +1 -1
- package/{contract-error-log-C66ELh8m.cjs → contract-error-log-DX0w240P.cjs} +1 -1
- package/{gmx-Dc6vyoji.js → gmx-C4CoHlpY.js} +49 -48
- package/gmx-wSTKl_Pc.cjs +1 -0
- package/index.cjs +1 -1
- package/index.js +714 -710
- package/package.json +2 -2
- package/trading-widget/hooks/use-crypto-icon.d.ts +6 -0
- package/utils.cjs +1 -1
- package/utils.js +1 -1
- package/gmx-BTdr6Yvr.cjs +0 -1
package/index.js
CHANGED
|
@@ -9,19 +9,19 @@ import { usePopperTooltip as Oc } from "react-popper-tooltip";
|
|
|
9
9
|
import { createContext as ge, useMemo as P, useContext as fe, useReducer as Rn, useCallback as b, useState as U, useEffect as E, useRef as ue, Children as _c, isValidElement as Pc, Fragment as Dc } from "react";
|
|
10
10
|
import { ChevronDownIcon as ts, ArrowDownIcon as kc, ArrowPathIcon as Lc, CheckIcon as nn } from "@heroicons/react/24/solid";
|
|
11
11
|
import { XMarkIcon as ns, ChevronLeftIcon as Rc } from "@heroicons/react/16/solid";
|
|
12
|
-
import { k as xt, al as $n, am as $c, a4 as Bc, A as Mc, B as Q, a3 as rs, an as F, q as Fc, ao as os, $ as Bn, L as Wc, ap as G, ab as Uc, aa as tt, O as ko, aq as ae, D as bt, N as ft, w as vn, ar as zc, as as Xt, W as Gc, P as Hr, ac as Hc, Q as Vc, S as jc, o as qc, at as Lo, a2 as Kc, f as Yc, g as Qc, ae as Ro, l as Xc, e as Zc, a5 as Jc, b as ed, h as td, au as nd, n as rd, z as as, y as Vr, m as hr, aj as od, s as ad, ai as sd, p as id, a8 as ss, E as $o, a7 as ld, v as gr, j as Bo, a6 as cd, a0 as jt, ag as dd, av as is, ad as ls, V as cs, G as ds, H as pd, x as ps, a1 as us, i as ud, aw as Ve, ax as md, R as ms, a9 as ws, ay as jr, az as wd, U as Mo, J as hd, I as gd, X as fd, Y as vd, K as bd, u as yd } from "./contract-error-log-
|
|
13
|
-
import { aA as
|
|
14
|
-
import { i as Td, a4 as Ad, a as O, q as V, H as Sd, p as Mn, S as Fo, T as xd, a0 as bn, t as Wo, k as Cd, r as Ed, ac as Id, ab as Le, m as Nd, u as hs, n as Od, j as _d, x as gs, ai as at, b as qt, aC as qe, aD as je, aE as rt, aF as vt, v as Pd, B as fs, $ as Ne, aG as fr, O as vs, J as Dd, at as Zt, a8 as kd, aH as bs, aI as Uo, g as ys, ah as yt, a1 as Ce, aJ as Ld, K as Tt, ax as Je, aK as Rd, a7 as Ts, aL as As, o as $d, F as Ss, I as xs, l as Bd, G as Md, am as Fd, al as Wd, D as Ud, aM as zd, a2 as _e, z as ze, L as Gd, ag as qr, s as Cs, ad as Hd, y as Es, aw as Gt, w as Is, E as Vd, an as Ns, c as Os, af as jd, Y as qd, ak as _s, aN as Ps, a9 as Kd, a6 as Yd, aO as Qd } from "./gmx-
|
|
15
|
-
import { A as
|
|
12
|
+
import { k as xt, al as $n, am as $c, a4 as Bc, A as Mc, B as Q, a3 as rs, an as F, q as Fc, ao as os, $ as Bn, L as Wc, ap as G, ab as Uc, aa as tt, O as ko, aq as ae, D as bt, N as ft, w as vn, ar as zc, as as Xt, W as Gc, P as Hr, ac as Hc, Q as Vc, S as jc, o as qc, at as Lo, a2 as Kc, f as Yc, g as Qc, ae as Ro, l as Xc, e as Zc, a5 as Jc, b as ed, h as td, au as nd, n as rd, z as as, y as Vr, m as hr, aj as od, s as ad, ai as sd, p as id, a8 as ss, E as $o, a7 as ld, v as gr, j as Bo, a6 as cd, a0 as jt, ag as dd, av as is, ad as ls, V as cs, G as ds, H as pd, x as ps, a1 as us, i as ud, aw as Ve, ax as md, R as ms, a9 as ws, ay as jr, az as wd, U as Mo, J as hd, I as gd, X as fd, Y as vd, K as bd, u as yd } from "./contract-error-log-CACKgbSD.js";
|
|
13
|
+
import { aA as GO, aB as HO, ak as VO } from "./contract-error-log-CACKgbSD.js";
|
|
14
|
+
import { i as Td, a4 as Ad, a as O, q as V, H as Sd, p as Mn, S as Fo, T as xd, a0 as bn, t as Wo, k as Cd, r as Ed, ac as Id, ab as Le, m as Nd, u as hs, n as Od, j as _d, x as gs, ai as at, b as qt, aC as qe, aD as je, aE as rt, aF as vt, v as Pd, B as fs, $ as Ne, aG as fr, O as vs, J as Dd, at as Zt, a8 as kd, aH as bs, aI as Uo, g as ys, ah as yt, a1 as Ce, aJ as Ld, K as Tt, ax as Je, aK as Rd, a7 as Ts, aL as As, o as $d, F as Ss, I as xs, l as Bd, G as Md, am as Fd, al as Wd, D as Ud, aM as zd, a2 as _e, z as ze, L as Gd, ag as qr, s as Cs, ad as Hd, y as Es, aw as Gt, w as Is, E as Vd, an as Ns, c as Os, af as jd, Y as qd, ak as _s, aN as Ps, a9 as Kd, a6 as Yd, aO as Qd } from "./gmx-C4CoHlpY.js";
|
|
15
|
+
import { A as qO, aP as KO, aQ as YO, aR as QO, aS as XO, aT as ZO, aU as JO, C as e_, e as t_, aV as n_, aW as r_, f as o_, h as a_, U as s_, V as i_, aX as l_, aY as c_, a3 as d_, aZ as p_, aa as u_, a_ as m_, a$ as w_, b0 as h_, b1 as g_, b2 as f_, b3 as v_, b4 as b_, b5 as y_, b6 as T_, aB as A_, aA as S_, az as x_, ay as C_, b7 as E_, b8 as I_, b9 as N_, ba as O_, bb as __, bc as P_, bd as D_, be as k_, bf as L_, bg as R_, bh as $_, bi as B_, bj as M_, bk as F_, bl as W_, bm as U_, bn as z_, bo as G_, bp as H_, ao as V_, ap as j_ } from "./gmx-C4CoHlpY.js";
|
|
16
16
|
import { CustomError as Ds } from "ts-custom-error";
|
|
17
17
|
import { injected as Xd } from "wagmi/connectors";
|
|
18
18
|
import { useAccount as ks, useConfig as Kr, useSwitchChain as Zd, useReadContract as Pe, useBalance as Jd, useWalletClient as Yr, usePublicClient as Ct, useWriteContract as ep, useEstimateFeesPerGas as tp, useBlockNumber as np, useConnect as Ls, useReadContracts as le, useWaitForTransactionReceipt as ot, useSimulateContract as rp } from "wagmi";
|
|
19
|
-
import { useBlockNumber as
|
|
19
|
+
import { useBlockNumber as K_, useConnect as Y_, useDisconnect as Q_, usePublicClient as X_, useReadContract as Z_, useReadContracts as J_, useSendTransaction as eP, useWaitForTransactionReceipt as tP, useWalletClient as nP, useWriteContract as rP } from "wagmi";
|
|
20
20
|
import { erc20Abi as Ee, encodeFunctionData as op, formatUnits as we, formatEther as ap, parseUnits as sp, isAddress as ip, encodeAbiParameters as lp, encodePacked as cp, keccak256 as dp } from "viem";
|
|
21
|
-
import { decodeErrorResult as
|
|
21
|
+
import { decodeErrorResult as aP, encodeFunctionData as sP, erc20Abi as iP, formatEther as lP, formatUnits as cP, hexToString as dP, trim as pP } from "viem";
|
|
22
22
|
import D, { BigNumber as He } from "bignumber.js";
|
|
23
23
|
import { hyperEvm as Fn, base as Rs, polygon as pp, optimism as $s, arbitrum as Wn, mainnet as Et } from "wagmi/chains";
|
|
24
|
-
import { arbitrum as
|
|
24
|
+
import { arbitrum as mP, base as wP, optimism as hP, polygon as gP } from "wagmi/chains";
|
|
25
25
|
import { useQuery as It, useQueryClient as rn } from "@tanstack/react-query";
|
|
26
26
|
import { format as up, formatDuration as Bs, intervalToDuration as mp } from "date-fns";
|
|
27
27
|
import { readContractQueryOptions as Ms } from "wagmi/query";
|
|
@@ -888,7 +888,7 @@ const Ho = {
|
|
|
888
888
|
default:
|
|
889
889
|
return t;
|
|
890
890
|
}
|
|
891
|
-
},
|
|
891
|
+
}, TO = ({
|
|
892
892
|
children: e,
|
|
893
893
|
initialState: t,
|
|
894
894
|
actions: {
|
|
@@ -1032,7 +1032,7 @@ const Ho = {
|
|
|
1032
1032
|
}, on = () => {
|
|
1033
1033
|
const { poolConfigMap: e } = se();
|
|
1034
1034
|
return P(() => Object.values(e), [e]);
|
|
1035
|
-
},
|
|
1035
|
+
}, AO = (e) => {
|
|
1036
1036
|
const t = on();
|
|
1037
1037
|
return P(
|
|
1038
1038
|
() => t.some((n) => n.address === e),
|
|
@@ -1071,7 +1071,7 @@ const Ho = {
|
|
|
1071
1071
|
t,
|
|
1072
1072
|
n
|
|
1073
1073
|
]);
|
|
1074
|
-
},
|
|
1074
|
+
}, SO = () => q().setPoolAddress, xO = () => q().updateSendTokenInput, CO = () => q().updateReceiveTokenInput, EO = () => q().updateTradingSettings, IO = () => q().setTradingType, NO = () => q().updateTradingModal, Fp = () => q().updatePoolFallbackData, Wp = () => q().onTransactionError, Up = () => q().onTradingSettleError, zp = () => q().onTransactionSuccess, to = () => q().onTransactionEstimationError, Gp = () => q().onTokenSelector, Ot = () => q().onLog, Hp = () => q().onSimulateTransaction, no = () => {
|
|
1075
1075
|
const e = q().getSwapQuotes, { effectiveSelectedAggregators: t } = zn();
|
|
1076
1076
|
return b(
|
|
1077
1077
|
({
|
|
@@ -1088,7 +1088,7 @@ const Ho = {
|
|
|
1088
1088
|
}),
|
|
1089
1089
|
[e, t]
|
|
1090
1090
|
);
|
|
1091
|
-
},
|
|
1091
|
+
}, OO = () => q().updatePoolConfig, _O = () => q().addPoolConfig, PO = () => q().updateCustomDepositTokensPerChain, ro = () => q().setSwapQuoteRefreshTriggered, Vp = () => q().getReferrerAddress, Js = () => se().input, $ = () => [
|
|
1092
1092
|
Js().sendToken,
|
|
1093
1093
|
q().updateSendTokenInput
|
|
1094
1094
|
], z = () => [
|
|
@@ -1133,7 +1133,7 @@ const Ho = {
|
|
|
1133
1133
|
enabled: !o,
|
|
1134
1134
|
refetchInterval: Mn
|
|
1135
1135
|
}
|
|
1136
|
-
}),
|
|
1136
|
+
}), DO = () => {
|
|
1137
1137
|
const { account: e } = B(), [t, n] = U(!1);
|
|
1138
1138
|
return E(() => {
|
|
1139
1139
|
n(!!e);
|
|
@@ -2146,7 +2146,7 @@ const Oy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2146
2146
|
abi: n,
|
|
2147
2147
|
functionName: e,
|
|
2148
2148
|
args: r
|
|
2149
|
-
}))?.result,
|
|
2149
|
+
}))?.result, kO = ({
|
|
2150
2150
|
disabled: e,
|
|
2151
2151
|
functionName: t,
|
|
2152
2152
|
address: n,
|
|
@@ -3433,7 +3433,7 @@ const Ui = (e, t) => zc(e) ? {
|
|
|
3433
3433
|
remainingSupplyCapNumber: d,
|
|
3434
3434
|
remainingSupplyCapInUsd: p
|
|
3435
3435
|
};
|
|
3436
|
-
},
|
|
3436
|
+
}, LO = ({
|
|
3437
3437
|
address: e,
|
|
3438
3438
|
chainId: t
|
|
3439
3439
|
}) => {
|
|
@@ -3444,7 +3444,7 @@ const Ui = (e, t) => zc(e) ? {
|
|
|
3444
3444
|
(i) => G(e, i.address) && i.chainId === t
|
|
3445
3445
|
), a = !!(o?.maintenance || o?.maintenanceDeposits);
|
|
3446
3446
|
return n || a;
|
|
3447
|
-
},
|
|
3447
|
+
}, RO = (e) => ve(e), zi = ({
|
|
3448
3448
|
asset: e,
|
|
3449
3449
|
chainId: t
|
|
3450
3450
|
}) => {
|
|
@@ -3619,7 +3619,7 @@ const Ui = (e, t) => zc(e) ? {
|
|
|
3619
3619
|
// is treated as still loading.
|
|
3620
3620
|
isReady: t !== Et.id || n.length > 0
|
|
3621
3621
|
};
|
|
3622
|
-
},
|
|
3622
|
+
}, $O = () => {
|
|
3623
3623
|
const {
|
|
3624
3624
|
address: e,
|
|
3625
3625
|
symbol: t,
|
|
@@ -3673,19 +3673,23 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3673
3673
|
}) => {
|
|
3674
3674
|
const r = To();
|
|
3675
3675
|
return t !== "auto" ? t.toString() : xA(n) ? n.toString() : e === "deposit" ? ys.toString() : r.toString();
|
|
3676
|
-
}, CA =
|
|
3676
|
+
}, CA = (e) => {
|
|
3677
|
+
const t = e?.default;
|
|
3678
|
+
return typeof t == "string" ? t : t?.src;
|
|
3679
|
+
}, EA = async (e, t = vo) => {
|
|
3677
3680
|
try {
|
|
3678
|
-
|
|
3681
|
+
const n = await import(`@dhedge/crypto-assets/icons/${e.toLowerCase()}.png`);
|
|
3682
|
+
return CA(n) ?? t(e);
|
|
3679
3683
|
} catch {
|
|
3680
3684
|
return t(e);
|
|
3681
3685
|
}
|
|
3682
|
-
},
|
|
3686
|
+
}, IA = (e = []) => {
|
|
3683
3687
|
const { getFallbackIconPath: t } = Z(), [n, r] = U([]), [o, a] = U([]);
|
|
3684
3688
|
return E(() => {
|
|
3685
3689
|
if (e.every((l) => o.includes(l))) return;
|
|
3686
3690
|
(async () => {
|
|
3687
3691
|
const l = await Promise.all(
|
|
3688
|
-
e.map((c) =>
|
|
3692
|
+
e.map((c) => EA(c, t))
|
|
3689
3693
|
);
|
|
3690
3694
|
r(l), a(e);
|
|
3691
3695
|
})();
|
|
@@ -3693,7 +3697,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3693
3697
|
}, Hi = () => {
|
|
3694
3698
|
const { pricingAsset: e, symbol: t, chainId: n, address: r } = A(), { minLimitOrderValue: o } = Z(), a = Be({ symbol: t, address: r }), i = Te({ address: r, chainId: n });
|
|
3695
3699
|
return Number(a) * Number(i) >= o && !!e;
|
|
3696
|
-
},
|
|
3700
|
+
}, NA = (e, t) => {
|
|
3697
3701
|
switch (t.type) {
|
|
3698
3702
|
case "MERGE_OVERLAY":
|
|
3699
3703
|
return {
|
|
@@ -3715,7 +3719,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3715
3719
|
[t]: { isOpen: !1, isPending: !1 }
|
|
3716
3720
|
}),
|
|
3717
3721
|
{}
|
|
3718
|
-
),
|
|
3722
|
+
), OA = () => Rn(NA, Vi), ji = ge(Vi), qi = ge(() => {
|
|
3719
3723
|
}), Ki = () => {
|
|
3720
3724
|
const e = fe(ji);
|
|
3721
3725
|
if (!e)
|
|
@@ -3780,8 +3784,8 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3780
3784
|
});
|
|
3781
3785
|
});
|
|
3782
3786
|
};
|
|
3783
|
-
},
|
|
3784
|
-
const [t, n] =
|
|
3787
|
+
}, _A = ({ children: e }) => {
|
|
3788
|
+
const [t, n] = OA(), [{ isOpen: r }] = te();
|
|
3785
3789
|
return E(() => {
|
|
3786
3790
|
r && !t.TRADING.isOpen && n({
|
|
3787
3791
|
type: "MERGE_OVERLAY",
|
|
@@ -3793,7 +3797,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3793
3797
|
payload: { type: j.TRADING, isOpen: r }
|
|
3794
3798
|
});
|
|
3795
3799
|
}, [r, t.TRADING.isOpen, n]), /* @__PURE__ */ s(qi.Provider, { value: n, children: /* @__PURE__ */ s(ji.Provider, { value: t, children: e }) });
|
|
3796
|
-
},
|
|
3800
|
+
}, PA = () => {
|
|
3797
3801
|
const e = Ot(), t = Ae(), n = Hi(), r = b(() => {
|
|
3798
3802
|
n && (t({
|
|
3799
3803
|
type: "MERGE_OVERLAY",
|
|
@@ -3806,9 +3810,9 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3806
3810
|
}));
|
|
3807
3811
|
}, [t, n, e]);
|
|
3808
3812
|
return { displayLimitSellOverlay: n, openLimitSellOverlay: r };
|
|
3809
|
-
}, Eo = "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
3813
|
+
}, Eo = "0x000000000022D473030F116dDEE9F6B43aC78BA3", DA = 100, kA = 28, LA = 1, RA = 500, Qi = 2, $A = 1, BA = 5, MA = 2, Xi = {
|
|
3810
3814
|
[Wn.id]: "0x40F2978D87348250F085ACEbd680B387842a69eF"
|
|
3811
|
-
},
|
|
3815
|
+
}, FA = {
|
|
3812
3816
|
PermitWitnessTransferFrom: [
|
|
3813
3817
|
{ name: "permitted", type: "TokenPermissions" },
|
|
3814
3818
|
{ name: "spender", type: "address" },
|
|
@@ -3828,11 +3832,11 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3828
3832
|
{ name: "maxTriggerPriceD18", type: "uint256" },
|
|
3829
3833
|
{ name: "slippageToleranceBps", type: "uint16" }
|
|
3830
3834
|
]
|
|
3831
|
-
},
|
|
3835
|
+
}, WA = () => {
|
|
3832
3836
|
const { pricingAsset: e, chainId: t, maintenance: n, maintenanceDeposits: r } = A(), { limitBuyConfig: o } = Z(), a = !!(n || r);
|
|
3833
3837
|
return !!e && !!o && !!Xi[t] && !a;
|
|
3834
|
-
},
|
|
3835
|
-
const e = Ot(), t = Ae(), n =
|
|
3838
|
+
}, UA = () => {
|
|
3839
|
+
const e = Ot(), t = Ae(), n = WA(), r = b(() => {
|
|
3836
3840
|
n && (t({
|
|
3837
3841
|
type: "MERGE_OVERLAY",
|
|
3838
3842
|
payload: {
|
|
@@ -3862,10 +3866,10 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3862
3866
|
const t = x(), { status: n } = Zi();
|
|
3863
3867
|
if (!(!e || n === "Success"))
|
|
3864
3868
|
return n === "Mining" ? t.miningTx : t.sendingOrderToWallet;
|
|
3865
|
-
},
|
|
3869
|
+
}, zA = () => {
|
|
3866
3870
|
const { chainId: e } = A(), { disableHyperEvmWarning: t } = Z();
|
|
3867
3871
|
return e === Fn.id && !t;
|
|
3868
|
-
},
|
|
3872
|
+
}, GA = (e, t) => e === 0 ? `dtw-z-${(t - 1) * 10}` : `dtw--ml-2 dtw-z-${(t - e - 1) * 10}`, HA = (e) => {
|
|
3869
3873
|
switch (e) {
|
|
3870
3874
|
case "xs":
|
|
3871
3875
|
return {
|
|
@@ -3911,7 +3915,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3911
3915
|
}) => {
|
|
3912
3916
|
const { Image: r = Ri, customIcons: o } = W(), a = e.join(""), [i, l] = U({
|
|
3913
3917
|
[a]: !1
|
|
3914
|
-
}), { height: c, width: d, diameter: p } =
|
|
3918
|
+
}), { height: c, width: d, diameter: p } = HA(t), m = e.length === 1 ? o?.[e[0]] : void 0, u = IA(m ? [] : e);
|
|
3915
3919
|
if (m)
|
|
3916
3920
|
return /* @__PURE__ */ s(m, { className: I(c, d, n) });
|
|
3917
3921
|
if (!u?.length || !u[0] || i[a]) return null;
|
|
@@ -3939,7 +3943,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
3939
3943
|
"dtw-inline-block dtw-overflow-visible dtw-rounded-full",
|
|
3940
3944
|
d,
|
|
3941
3945
|
c,
|
|
3942
|
-
|
|
3946
|
+
GA(f, e.length)
|
|
3943
3947
|
),
|
|
3944
3948
|
width: p,
|
|
3945
3949
|
height: p,
|
|
@@ -4005,7 +4009,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
4005
4009
|
e
|
|
4006
4010
|
)
|
|
4007
4011
|
}
|
|
4008
|
-
),
|
|
4012
|
+
), VA = () => {
|
|
4009
4013
|
const [e] = De(), [t, n] = ne(), [r, o] = U(!1), a = t.slippage !== "auto";
|
|
4010
4014
|
return {
|
|
4011
4015
|
settings: t,
|
|
@@ -4041,7 +4045,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
4041
4045
|
onClick: r,
|
|
4042
4046
|
children: t
|
|
4043
4047
|
}
|
|
4044
|
-
),
|
|
4048
|
+
), jA = 0, qA = 100, Ji = () => {
|
|
4045
4049
|
const e = x(), {
|
|
4046
4050
|
settings: t,
|
|
4047
4051
|
tradingType: n,
|
|
@@ -4049,7 +4053,7 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
4049
4053
|
invalidSlippage: o,
|
|
4050
4054
|
onDefaultSlippageSelect: a,
|
|
4051
4055
|
onCustomSlippageSelect: i
|
|
4052
|
-
} =
|
|
4056
|
+
} = VA(), l = Gi({
|
|
4053
4057
|
tradingType: n,
|
|
4054
4058
|
slippage: t.slippage,
|
|
4055
4059
|
minSlippage: t.minSlippage
|
|
@@ -4075,8 +4079,8 @@ const xA = /* @__PURE__ */ Hn(SA), Gi = ({
|
|
|
4075
4079
|
}
|
|
4076
4080
|
),
|
|
4077
4081
|
type: "number",
|
|
4078
|
-
min:
|
|
4079
|
-
max:
|
|
4082
|
+
min: jA,
|
|
4083
|
+
max: qA,
|
|
4080
4084
|
onChange: i,
|
|
4081
4085
|
placeholder: l,
|
|
4082
4086
|
defaultValue: r ? t.slippage.toString() : ""
|
|
@@ -4096,7 +4100,7 @@ function ir(e, t, n) {
|
|
|
4096
4100
|
return `${r}/address/${e}`;
|
|
4097
4101
|
}
|
|
4098
4102
|
}
|
|
4099
|
-
const
|
|
4103
|
+
const KA = () => {
|
|
4100
4104
|
const [e, t] = ie(), n = te()[1], r = Wp(), o = zp(), [a] = e, i = a?.txHash, l = a?.action, c = l === "approve", d = a?.chainId, p = oo(), { invalidateTradingQueries: m, invalidateAllowanceQueries: u } = ln(), { data: h, error: g, refetch: f } = ot({
|
|
4101
4105
|
hash: i,
|
|
4102
4106
|
chainId: d,
|
|
@@ -4228,7 +4232,7 @@ const qA = () => {
|
|
|
4228
4232
|
disabled: r
|
|
4229
4233
|
});
|
|
4230
4234
|
return we(o ?? BigInt(0), V);
|
|
4231
|
-
},
|
|
4235
|
+
}, YA = () => {
|
|
4232
4236
|
const [e] = $(), [t] = z(), n = So({
|
|
4233
4237
|
address: e.address,
|
|
4234
4238
|
symbol: e.symbol
|
|
@@ -4237,7 +4241,7 @@ const qA = () => {
|
|
|
4237
4241
|
);
|
|
4238
4242
|
return (r.gt(0) || o.gt(0)) && r.lte(n ?? 0);
|
|
4239
4243
|
};
|
|
4240
|
-
function
|
|
4244
|
+
function QA(e, t, n, r) {
|
|
4241
4245
|
try {
|
|
4242
4246
|
if (t === Ce.symbol)
|
|
4243
4247
|
return "";
|
|
@@ -4249,10 +4253,10 @@ function YA(e, t, n, r) {
|
|
|
4249
4253
|
return "";
|
|
4250
4254
|
}
|
|
4251
4255
|
}
|
|
4252
|
-
const
|
|
4256
|
+
const XA = () => {
|
|
4253
4257
|
const [e] = $(), [t] = z();
|
|
4254
4258
|
return {
|
|
4255
|
-
value:
|
|
4259
|
+
value: QA(
|
|
4256
4260
|
e.symbol,
|
|
4257
4261
|
t.symbol,
|
|
4258
4262
|
e.value,
|
|
@@ -4280,7 +4284,7 @@ const QA = () => {
|
|
|
4280
4284
|
onErrorCallback: e
|
|
4281
4285
|
});
|
|
4282
4286
|
return { canSpend: l, approve: d, isCanSpendFetching: c };
|
|
4283
|
-
},
|
|
4287
|
+
}, ZA = ({
|
|
4284
4288
|
address: e,
|
|
4285
4289
|
chainId: t
|
|
4286
4290
|
}) => {
|
|
@@ -4308,15 +4312,15 @@ const QA = () => {
|
|
|
4308
4312
|
}, Me = () => {
|
|
4309
4313
|
const e = To(), [{ slippage: t }] = ne();
|
|
4310
4314
|
return t === "auto" ? e : t;
|
|
4311
|
-
},
|
|
4315
|
+
}, JA = {
|
|
4312
4316
|
[Et.id]: {
|
|
4313
4317
|
ondoGMSwap: Rd,
|
|
4314
4318
|
usdc: Je.address
|
|
4315
4319
|
}
|
|
4316
|
-
},
|
|
4320
|
+
}, eS = 200n, tS = 5n, Ca = 10000n, Sn = (e) => e.assetType === Fs, nS = (e) => e.amount * (Ca - tS) / Ca, xn = (e) => e.reduce((t, n) => t + n, 0n), rS = (e, t) => e.reduce((n, r) => {
|
|
4317
4321
|
const o = t(r);
|
|
4318
4322
|
return n.set(o, [...n.get(o) ?? [], r]);
|
|
4319
|
-
}, /* @__PURE__ */ new Map()),
|
|
4323
|
+
}, /* @__PURE__ */ new Map()), oS = async (e, t, n, r) => {
|
|
4320
4324
|
const [o, a] = await Promise.all([
|
|
4321
4325
|
e?.readContract({
|
|
4322
4326
|
address: t,
|
|
@@ -4332,7 +4336,7 @@ const QA = () => {
|
|
|
4332
4336
|
})
|
|
4333
4337
|
]);
|
|
4334
4338
|
return { processor: o, assetData: a };
|
|
4335
|
-
},
|
|
4339
|
+
}, aS = async (e, t, n, r) => {
|
|
4336
4340
|
const o = Q("ondoPriceOracle", n);
|
|
4337
4341
|
if (F(o)) return /* @__PURE__ */ new Map();
|
|
4338
4342
|
const a = (i) => t.fetchQuery({
|
|
@@ -4352,14 +4356,14 @@ const QA = () => {
|
|
|
4352
4356
|
)
|
|
4353
4357
|
)
|
|
4354
4358
|
);
|
|
4355
|
-
},
|
|
4359
|
+
}, sS = async (e, t) => {
|
|
4356
4360
|
const { attestations: n } = await Ys({
|
|
4357
4361
|
chainId: e,
|
|
4358
4362
|
items: t.map((o) => ({
|
|
4359
4363
|
address: o.asset,
|
|
4360
4364
|
tokenAmount: we(o.amount, Zt)
|
|
4361
4365
|
}))
|
|
4362
|
-
}), r =
|
|
4366
|
+
}), r = rS(
|
|
4363
4367
|
n,
|
|
4364
4368
|
(o) => o.assetAddress.toLowerCase()
|
|
4365
4369
|
);
|
|
@@ -4371,7 +4375,7 @@ const QA = () => {
|
|
|
4371
4375
|
);
|
|
4372
4376
|
return { collateral: o, attestation: c };
|
|
4373
4377
|
});
|
|
4374
|
-
},
|
|
4378
|
+
}, iS = ({
|
|
4375
4379
|
collateral: e,
|
|
4376
4380
|
attestation: t,
|
|
4377
4381
|
target: n,
|
|
@@ -4406,7 +4410,7 @@ const QA = () => {
|
|
|
4406
4410
|
}),
|
|
4407
4411
|
amountOutMinimum: c
|
|
4408
4412
|
};
|
|
4409
|
-
},
|
|
4413
|
+
}, lS = async ({
|
|
4410
4414
|
plans: e,
|
|
4411
4415
|
target: t,
|
|
4412
4416
|
dytmOffice: n,
|
|
@@ -4414,8 +4418,8 @@ const QA = () => {
|
|
|
4414
4418
|
chainId: o,
|
|
4415
4419
|
slippagePercent: a
|
|
4416
4420
|
}) => {
|
|
4417
|
-
const i = e.flatMap((u) => u.gmCollaterals), c = (i.length ? await
|
|
4418
|
-
({ collateral: u, attestation: h }) =>
|
|
4421
|
+
const i = e.flatMap((u) => u.gmCollaterals), c = (i.length ? await sS(o, i) : []).map(
|
|
4422
|
+
({ collateral: u, attestation: h }) => iS({
|
|
4419
4423
|
collateral: u,
|
|
4420
4424
|
attestation: h,
|
|
4421
4425
|
target: t,
|
|
@@ -4435,7 +4439,7 @@ const QA = () => {
|
|
|
4435
4439
|
processor: r
|
|
4436
4440
|
})
|
|
4437
4441
|
), v = xn(
|
|
4438
|
-
h.map(
|
|
4442
|
+
h.map(nS)
|
|
4439
4443
|
), y = u.debt ? Qc({
|
|
4440
4444
|
accountId: u.accountId,
|
|
4441
4445
|
debtKey: u.debt.debtKey,
|
|
@@ -4471,13 +4475,13 @@ const QA = () => {
|
|
|
4471
4475
|
} = cn({ address: e, chainId: t }), a = mA(t), i = Ct({ chainId: t }), l = Kr(), c = rn(), d = Jn(), p = Me();
|
|
4472
4476
|
return b(
|
|
4473
4477
|
async (m) => {
|
|
4474
|
-
const u = /* @__PURE__ */ new Map(), h =
|
|
4478
|
+
const u = /* @__PURE__ */ new Map(), h = JA[t];
|
|
4475
4479
|
if (!i || !o || !n || !h)
|
|
4476
4480
|
return u;
|
|
4477
4481
|
const g = F(r) ? await a(n) : r;
|
|
4478
4482
|
if (!g || F(g))
|
|
4479
4483
|
return u;
|
|
4480
|
-
const { processor: f, assetData: v } = await
|
|
4484
|
+
const { processor: f, assetData: v } = await oS(
|
|
4481
4485
|
i,
|
|
4482
4486
|
g,
|
|
4483
4487
|
e,
|
|
@@ -4485,7 +4489,7 @@ const QA = () => {
|
|
|
4485
4489
|
);
|
|
4486
4490
|
if (!f || F(f) || !v?.length)
|
|
4487
4491
|
return u;
|
|
4488
|
-
const y = (N) => !Sn(N) && G(N.asset, h.usdc), T = v.filter((N) => Sn(N) && !N.isDebt && N.amount > 0n).map((N) => N.asset), S = await
|
|
4492
|
+
const y = (N) => !Sn(N) && G(N.asset, h.usdc), T = v.filter((N) => Sn(N) && !N.isDebt && N.amount > 0n).map((N) => N.asset), S = await aS(
|
|
4489
4493
|
l,
|
|
4490
4494
|
c,
|
|
4491
4495
|
t,
|
|
@@ -4516,7 +4520,7 @@ const QA = () => {
|
|
|
4516
4520
|
throw new Error(
|
|
4517
4521
|
"Chamber Lending Market withdrawal: Ondo integration is not configured for the collateral unwind"
|
|
4518
4522
|
);
|
|
4519
|
-
const M = await
|
|
4523
|
+
const M = await lS({
|
|
4520
4524
|
plans: _,
|
|
4521
4525
|
target: h,
|
|
4522
4526
|
dytmOffice: n,
|
|
@@ -4526,7 +4530,7 @@ const QA = () => {
|
|
|
4526
4530
|
});
|
|
4527
4531
|
return u.set(n.toLowerCase(), {
|
|
4528
4532
|
withdrawData: qc(M),
|
|
4529
|
-
slippageTolerance:
|
|
4533
|
+
slippageTolerance: eS
|
|
4530
4534
|
}), u;
|
|
4531
4535
|
},
|
|
4532
4536
|
[
|
|
@@ -4564,7 +4568,7 @@ const QA = () => {
|
|
|
4564
4568
|
const c = r(i);
|
|
4565
4569
|
return a[c] = o[l] ?? null, a;
|
|
4566
4570
|
}, {});
|
|
4567
|
-
},
|
|
4571
|
+
}, cS = (e) => e.length > 1 ? 1 : 0, dS = async ({
|
|
4568
4572
|
assets: e,
|
|
4569
4573
|
getSwapQuotes: t,
|
|
4570
4574
|
signal: n
|
|
@@ -4573,7 +4577,7 @@ const QA = () => {
|
|
|
4573
4577
|
getSwapQuotes: t,
|
|
4574
4578
|
signal: n,
|
|
4575
4579
|
buildKey: td
|
|
4576
|
-
}),
|
|
4580
|
+
}), pS = (e, t) => {
|
|
4577
4581
|
const n = no(), { effectiveSelectedAggregators: r } = zn();
|
|
4578
4582
|
return It({
|
|
4579
4583
|
queryKey: ["getSwapsQuotes", e, r],
|
|
@@ -4585,7 +4589,7 @@ const QA = () => {
|
|
|
4585
4589
|
}),
|
|
4586
4590
|
...t
|
|
4587
4591
|
});
|
|
4588
|
-
},
|
|
4592
|
+
}, uS = new AbortController(), mS = uS.signal, wS = ({
|
|
4589
4593
|
chainId: e
|
|
4590
4594
|
}) => {
|
|
4591
4595
|
const { account: t = O } = B(), n = no();
|
|
@@ -4602,10 +4606,10 @@ const QA = () => {
|
|
|
4602
4606
|
amount: l.toString(),
|
|
4603
4607
|
slippage: o.toString()
|
|
4604
4608
|
}));
|
|
4605
|
-
return
|
|
4609
|
+
return dS({
|
|
4606
4610
|
assets: a,
|
|
4607
4611
|
getSwapQuotes: n,
|
|
4608
|
-
signal:
|
|
4612
|
+
signal: mS
|
|
4609
4613
|
});
|
|
4610
4614
|
},
|
|
4611
4615
|
[e, n, t]
|
|
@@ -4675,7 +4679,7 @@ const QA = () => {
|
|
|
4675
4679
|
l
|
|
4676
4680
|
]
|
|
4677
4681
|
);
|
|
4678
|
-
},
|
|
4682
|
+
}, hS = ({
|
|
4679
4683
|
address: e,
|
|
4680
4684
|
chainId: t
|
|
4681
4685
|
}) => {
|
|
@@ -4685,7 +4689,7 @@ const QA = () => {
|
|
|
4685
4689
|
), { data: { getSupportedAssets: r } = {} } = ar({
|
|
4686
4690
|
address: e,
|
|
4687
4691
|
chainId: t
|
|
4688
|
-
}), o =
|
|
4692
|
+
}), o = ZA({ address: e, chainId: t }), a = wS({ chainId: t }), i = rl({
|
|
4689
4693
|
address: e,
|
|
4690
4694
|
chainId: t
|
|
4691
4695
|
}), l = tl({
|
|
@@ -4797,8 +4801,8 @@ const ol = (e, t) => {
|
|
|
4797
4801
|
clearTimeout(o);
|
|
4798
4802
|
};
|
|
4799
4803
|
}, [e, t]), n;
|
|
4800
|
-
},
|
|
4801
|
-
const e = A(), [t] = $(), n = pt(), r = Me(), [{ slippage: o }] = ne(), a = o === "auto", i =
|
|
4804
|
+
}, gS = () => {
|
|
4805
|
+
const e = A(), [t] = $(), n = pt(), r = Me(), [{ slippage: o }] = ne(), a = o === "auto", i = hS(e);
|
|
4802
4806
|
return b(
|
|
4803
4807
|
async (l) => {
|
|
4804
4808
|
const c = ss(t.value), d = n ? [c] : [e.address, c], p = await i({
|
|
@@ -4819,7 +4823,7 @@ const ol = (e, t) => {
|
|
|
4819
4823
|
r
|
|
4820
4824
|
]
|
|
4821
4825
|
);
|
|
4822
|
-
},
|
|
4826
|
+
}, fS = ({
|
|
4823
4827
|
debounceTime: e
|
|
4824
4828
|
} = {}) => {
|
|
4825
4829
|
const t = A(), n = pt(), [r] = $(), o = Me(), { data: { getSupportedAssets: a } = {} } = ar(t), i = ol(
|
|
@@ -4844,7 +4848,7 @@ const ol = (e, t) => {
|
|
|
4844
4848
|
t.address,
|
|
4845
4849
|
t.chainId
|
|
4846
4850
|
]);
|
|
4847
|
-
},
|
|
4851
|
+
}, vS = (e, { enabled: t }) => {
|
|
4848
4852
|
const { address: n, chainId: r } = A(), [o] = z(), { hasAssets: a, isReady: i } = Ye({
|
|
4849
4853
|
address: n,
|
|
4850
4854
|
chainId: r
|
|
@@ -4884,7 +4888,7 @@ const ol = (e, t) => {
|
|
|
4884
4888
|
overrides: v ? $o : f,
|
|
4885
4889
|
isFetching: y
|
|
4886
4890
|
} : { overrides: void 0, isFetching: !1 } : { overrides: $o, isFetching: !1 } : { overrides: void 0, isFetching: !0 };
|
|
4887
|
-
},
|
|
4891
|
+
}, bS = ({
|
|
4888
4892
|
assets: e,
|
|
4889
4893
|
chainId: t
|
|
4890
4894
|
}) => e.flatMap(({ token: n }) => [
|
|
@@ -4909,13 +4913,13 @@ const ol = (e, t) => {
|
|
|
4909
4913
|
chainId: t,
|
|
4910
4914
|
args: [n]
|
|
4911
4915
|
}
|
|
4912
|
-
]),
|
|
4916
|
+
]), yS = 3, al = ({
|
|
4913
4917
|
assets: e,
|
|
4914
4918
|
chainId: t
|
|
4915
4919
|
}) => {
|
|
4916
4920
|
const n = b(
|
|
4917
4921
|
(r) => e.map(({ token: o, balance: a }, i) => {
|
|
4918
|
-
const l = i *
|
|
4922
|
+
const l = i * yS, c = l + 1, d = c + 1, p = Number(
|
|
4919
4923
|
r[c]?.result ?? V
|
|
4920
4924
|
), m = fs[o.toLowerCase()] ?? r[l]?.result?.toString() ?? "", u = new D(a.toString()).shiftedBy(-p).toNumber(), h = new D(r[d]?.result?.toString() ?? 0).shiftedBy(-V).toNumber(), g = u * h;
|
|
4921
4925
|
return {
|
|
@@ -4931,16 +4935,16 @@ const ol = (e, t) => {
|
|
|
4931
4935
|
[e]
|
|
4932
4936
|
);
|
|
4933
4937
|
return le({
|
|
4934
|
-
contracts:
|
|
4938
|
+
contracts: bS({ assets: e, chainId: t }),
|
|
4935
4939
|
query: {
|
|
4936
4940
|
enabled: e.length > 0,
|
|
4937
4941
|
select: n
|
|
4938
4942
|
}
|
|
4939
4943
|
});
|
|
4940
|
-
}, Ia = (e) => typeof e[0] == "string" && typeof e[1] == "bigint" && Array.isArray(e[2]),
|
|
4941
|
-
const e = A(), t = tr(), { canSpend: n } = lr(), r =
|
|
4944
|
+
}, Ia = (e) => typeof e[0] == "string" && typeof e[1] == "bigint" && Array.isArray(e[2]), TS = () => {
|
|
4945
|
+
const e = A(), t = tr(), { canSpend: n } = lr(), r = fS({
|
|
4942
4946
|
debounceTime: xs
|
|
4943
|
-
}), o = Ia(r) ? r[1] : BigInt(0), a = o !== BigInt(0) && !t && n, { overrides: i, isFetching: l } =
|
|
4947
|
+
}), o = Ia(r) ? r[1] : BigInt(0), a = o !== BigInt(0) && !t && n, { overrides: i, isFetching: l } = vS(o, {
|
|
4944
4948
|
enabled: a
|
|
4945
4949
|
}), c = P(
|
|
4946
4950
|
() => Ia(r) && i ? [r[0], r[1], ld(r[2], i)] : void 0,
|
|
@@ -4971,17 +4975,17 @@ const ol = (e, t) => {
|
|
|
4971
4975
|
data: t = [],
|
|
4972
4976
|
isFetching: n,
|
|
4973
4977
|
isFetched: r
|
|
4974
|
-
} =
|
|
4978
|
+
} = TS(), o = nr();
|
|
4975
4979
|
return {
|
|
4976
4980
|
// EasySwapperV2::unrollAndClaim is not supported from within dHEDGE vaults. Managers should be able to use regular initWithdrawal & completeWithdrawal flow instead.
|
|
4977
4981
|
isUnrollAndClaimTransaction: t?.length === 1 && G(t[0]?.address, e.address) && !o,
|
|
4978
4982
|
isFetching: n,
|
|
4979
4983
|
isFetched: r
|
|
4980
4984
|
};
|
|
4981
|
-
},
|
|
4985
|
+
}, AS = ({
|
|
4982
4986
|
onErrorCallback: e
|
|
4983
4987
|
} = {}) => {
|
|
4984
|
-
const t = A(), n = pt(), { isUnrollAndClaimTransaction: r } = Io(), o =
|
|
4988
|
+
const t = A(), n = pt(), { isUnrollAndClaimTransaction: r } = Io(), o = gS(), a = ie()[1], i = n ? "multi_withdraw" : r ? "single_withdraw_and_claim" : "single_withdraw", l = Qe({ action: i, onErrorCallback: e }), c = n ? Bd : r ? Md : Ss, { send: d, estimate: p } = ye({
|
|
4985
4989
|
contractId: n ? "poolLogic" : "easySwapperV2",
|
|
4986
4990
|
dynamicContractAddress: n ? t.address : void 0,
|
|
4987
4991
|
functionName: c,
|
|
@@ -5015,7 +5019,7 @@ const ol = (e, t) => {
|
|
|
5015
5019
|
const n = x(), { showError: r, closeError: o } = dt(), { account: a } = B(), i = A(), [l] = $(), [c] = z(), [d] = De(), p = te()[1], m = ie()[1], u = to(), h = pt(), { isUnrollAndClaimTransaction: g } = Io(), f = Be({
|
|
5016
5020
|
symbol: l.symbol,
|
|
5017
5021
|
address: l.address
|
|
5018
|
-
}), v = d === "deposit", y =
|
|
5022
|
+
}), v = d === "deposit", y = YA(), T = v ? "deposit" : h ? "multi_withdraw" : g ? "single_withdraw_and_claim" : "single_withdraw", S = async () => {
|
|
5019
5023
|
const k = i.chainId;
|
|
5020
5024
|
o(), p({
|
|
5021
5025
|
isOpen: !0,
|
|
@@ -5051,7 +5055,7 @@ const ol = (e, t) => {
|
|
|
5051
5055
|
label: v ? n.depositAction : h ? n.withdrawAction : g ? n.unrollAndClaimAction : n.unrollAction,
|
|
5052
5056
|
handleTrade: S
|
|
5053
5057
|
};
|
|
5054
|
-
},
|
|
5058
|
+
}, SS = 1, xS = "USD", CS = ({
|
|
5055
5059
|
depositValueInUsd: e,
|
|
5056
5060
|
apy: t,
|
|
5057
5061
|
apyCurrencyPrice: n,
|
|
@@ -5069,7 +5073,7 @@ const ol = (e, t) => {
|
|
|
5069
5073
|
dailyEarnings: gr({ value: o / 365, currency: r }),
|
|
5070
5074
|
monthlyEarnings: gr({ value: o / 12, currency: r })
|
|
5071
5075
|
};
|
|
5072
|
-
},
|
|
5076
|
+
}, ES = ({
|
|
5073
5077
|
currency: e,
|
|
5074
5078
|
depositValueInUsd: t,
|
|
5075
5079
|
chainId: n,
|
|
@@ -5080,22 +5084,22 @@ const ol = (e, t) => {
|
|
|
5080
5084
|
address: a ?? O,
|
|
5081
5085
|
chainId: n,
|
|
5082
5086
|
disabled: o || !r || !a
|
|
5083
|
-
}), l = a ? Number(i) :
|
|
5087
|
+
}), l = a ? Number(i) : SS;
|
|
5084
5088
|
return P(
|
|
5085
|
-
() =>
|
|
5089
|
+
() => CS({
|
|
5086
5090
|
depositValueInUsd: t,
|
|
5087
5091
|
apy: r,
|
|
5088
5092
|
apyCurrencyPrice: l,
|
|
5089
|
-
currency: a ? e :
|
|
5093
|
+
currency: a ? e : xS
|
|
5090
5094
|
}),
|
|
5091
5095
|
[t, r, l, e, a]
|
|
5092
5096
|
);
|
|
5093
|
-
},
|
|
5097
|
+
}, IS = () => {
|
|
5094
5098
|
const e = De()[0] === "deposit", { chainId: t } = A(), [n] = Nt(), [r] = $(), o = he({
|
|
5095
5099
|
address: r.address,
|
|
5096
5100
|
chainId: t,
|
|
5097
5101
|
disabled: !e || !n.apy
|
|
5098
|
-
}), a =
|
|
5102
|
+
}), a = ES({
|
|
5099
5103
|
chainId: t,
|
|
5100
5104
|
apy: n.apy?.value,
|
|
5101
5105
|
currency: n.apy?.currency,
|
|
@@ -5111,8 +5115,8 @@ const ol = (e, t) => {
|
|
|
5111
5115
|
monthlyEarnings: null,
|
|
5112
5116
|
showEarnings: !1
|
|
5113
5117
|
};
|
|
5114
|
-
},
|
|
5115
|
-
const { effectiveSelectedAggregators: n } = zn(), r = no(), { isValid: o } =
|
|
5118
|
+
}, NS = (e) => e.chainId ? e.sourceAddress ? e.destinationAddress ? !e.amount || e.amount === "0" || e.amount === "NaN" ? { isValid: !1, error: "Missing required parameter: amount or amount must be greater than 0" } : e.slippage ? { isValid: !0 } : { isValid: !1, error: "Missing required parameter: slippage" } : { isValid: !1, error: "Missing required parameter: destinationAddress" } : { isValid: !1, error: "Missing required parameter: sourceAddress" } : { isValid: !1, error: "Missing required parameter: chainId" }, OS = (e, t) => {
|
|
5119
|
+
const { effectiveSelectedAggregators: n } = zn(), r = no(), { isValid: o } = NS({
|
|
5116
5120
|
chainId: String(e.chainId),
|
|
5117
5121
|
sourceAddress: e.sourceAddress,
|
|
5118
5122
|
destinationAddress: e.destinationAddress,
|
|
@@ -5140,7 +5144,7 @@ const ol = (e, t) => {
|
|
|
5140
5144
|
debouncedSendTokenValue: r,
|
|
5141
5145
|
isDebouncing: n.value !== r
|
|
5142
5146
|
};
|
|
5143
|
-
},
|
|
5147
|
+
}, _S = ({
|
|
5144
5148
|
account: e,
|
|
5145
5149
|
chainId: t
|
|
5146
5150
|
}) => Pe({
|
|
@@ -5150,11 +5154,11 @@ const ol = (e, t) => {
|
|
|
5150
5154
|
chainId: t,
|
|
5151
5155
|
args: [e],
|
|
5152
5156
|
query: { enabled: !F(e) }
|
|
5153
|
-
}),
|
|
5157
|
+
}), PS = (e, t) => G(e, zd.address) && t === Et.id, DS = ({
|
|
5154
5158
|
tokenAddress: e,
|
|
5155
5159
|
spenderAddress: t
|
|
5156
5160
|
}) => {
|
|
5157
|
-
const { chainId: n } = A(), { account: r = O } = B(), o =
|
|
5161
|
+
const { chainId: n } = A(), { account: r = O } = B(), o = PS(e, n), { data: a } = an({
|
|
5158
5162
|
tokenAddress: e,
|
|
5159
5163
|
ownerAddress: r,
|
|
5160
5164
|
spenderAddress: t,
|
|
@@ -5188,7 +5192,7 @@ const ol = (e, t) => {
|
|
|
5188
5192
|
spenderAddress: n,
|
|
5189
5193
|
onErrorCallback: r
|
|
5190
5194
|
}) => {
|
|
5191
|
-
const o = A(), [{ isInfiniteAllowance: a }] = ne(), i = ie()[1], l = te()[1], { resetAllowance: c } =
|
|
5195
|
+
const o = A(), [{ isInfiniteAllowance: a }] = ne(), i = ie()[1], l = te()[1], { resetAllowance: c } = DS({
|
|
5192
5196
|
tokenAddress: e.address,
|
|
5193
5197
|
spenderAddress: n
|
|
5194
5198
|
}), d = Qe({ action: Cn, onErrorCallback: r }), { send: p } = ye({
|
|
@@ -5254,7 +5258,7 @@ const ol = (e, t) => {
|
|
|
5254
5258
|
),
|
|
5255
5259
|
isFetching: l
|
|
5256
5260
|
}, [l, e, i, a]);
|
|
5257
|
-
},
|
|
5261
|
+
}, kS = () => {
|
|
5258
5262
|
const [{ isInfiniteAllowance: e }, t] = ne(), n = Ot(), r = b(
|
|
5259
5263
|
(o) => {
|
|
5260
5264
|
t({ isInfiniteAllowance: o }), n?.(at.INFINITE_ALLOWANCE_CHANGE, {
|
|
@@ -5268,7 +5272,7 @@ const ol = (e, t) => {
|
|
|
5268
5272
|
[e, r]
|
|
5269
5273
|
);
|
|
5270
5274
|
}, ll = () => {
|
|
5271
|
-
const e = x(), [t, n] =
|
|
5275
|
+
const e = x(), [t, n] = kS();
|
|
5272
5276
|
return /* @__PURE__ */ s(
|
|
5273
5277
|
er,
|
|
5274
5278
|
{
|
|
@@ -5277,7 +5281,7 @@ const ol = (e, t) => {
|
|
|
5277
5281
|
label: e.infinite
|
|
5278
5282
|
}
|
|
5279
5283
|
);
|
|
5280
|
-
},
|
|
5284
|
+
}, LS = () => {
|
|
5281
5285
|
const [{ selectedAggregators: e }, t] = ne(), { effectiveAvailableAggregators: n, effectiveSelectedAggregators: r } = zn(), o = b(
|
|
5282
5286
|
(a) => {
|
|
5283
5287
|
const i = e.includes(a) ? e.filter((l) => l !== a) : [...e, a];
|
|
@@ -5291,7 +5295,7 @@ const ol = (e, t) => {
|
|
|
5291
5295
|
onAggregatorToggle: o
|
|
5292
5296
|
};
|
|
5293
5297
|
}, cl = () => {
|
|
5294
|
-
const e = x(), { availableAggregators: t, selectedAggregators: n, onAggregatorToggle: r } =
|
|
5298
|
+
const e = x(), { availableAggregators: t, selectedAggregators: n, onAggregatorToggle: r } = LS();
|
|
5295
5299
|
return t.length <= 1 ? null : /* @__PURE__ */ s(
|
|
5296
5300
|
Jt,
|
|
5297
5301
|
{
|
|
@@ -5317,7 +5321,7 @@ const ol = (e, t) => {
|
|
|
5317
5321
|
)) })
|
|
5318
5322
|
}
|
|
5319
5323
|
);
|
|
5320
|
-
},
|
|
5324
|
+
}, RS = () => {
|
|
5321
5325
|
const e = x();
|
|
5322
5326
|
return /* @__PURE__ */ w(R, { children: [
|
|
5323
5327
|
/* @__PURE__ */ s(
|
|
@@ -5338,7 +5342,7 @@ const ol = (e, t) => {
|
|
|
5338
5342
|
),
|
|
5339
5343
|
/* @__PURE__ */ s(cl, {})
|
|
5340
5344
|
] });
|
|
5341
|
-
},
|
|
5345
|
+
}, $S = "ref", BO = ({
|
|
5342
5346
|
vaultAddress: e,
|
|
5343
5347
|
userAddress: t,
|
|
5344
5348
|
query: n,
|
|
@@ -5353,7 +5357,7 @@ const ol = (e, t) => {
|
|
|
5353
5357
|
"localStorage",
|
|
5354
5358
|
Kt.REF_POOL,
|
|
5355
5359
|
""
|
|
5356
|
-
), d = n[
|
|
5360
|
+
), d = n[$S];
|
|
5357
5361
|
E(() => {
|
|
5358
5362
|
!d || typeof d != "string" || F(e) || localStorage.getItem(Kt.REFERRER) || (i(d), c(e), r?.());
|
|
5359
5363
|
}, [e, d, c, i, r]), E(() => {
|
|
@@ -5377,25 +5381,25 @@ const ol = (e, t) => {
|
|
|
5377
5381
|
}, Dn = {
|
|
5378
5382
|
referrerAddress: void 0,
|
|
5379
5383
|
referralData: void 0
|
|
5380
|
-
},
|
|
5384
|
+
}, BS = (e, t) => {
|
|
5381
5385
|
if (!e || !ip(e) || t && G(e, t))
|
|
5382
5386
|
return Dn;
|
|
5383
5387
|
const n = lp([{ type: "address" }], [e]);
|
|
5384
5388
|
return { referrerAddress: e, referralData: n };
|
|
5385
|
-
},
|
|
5389
|
+
}, MS = () => {
|
|
5386
5390
|
const e = Vp(), { account: t } = B(), { data: n = Dn } = It({
|
|
5387
5391
|
queryKey: ["entryReferrer", t],
|
|
5388
5392
|
queryFn: async ({ queryKey: [, r] }) => {
|
|
5389
5393
|
if (!e || !r) return Dn;
|
|
5390
5394
|
const o = await e(r);
|
|
5391
|
-
return
|
|
5395
|
+
return BS(o, r);
|
|
5392
5396
|
},
|
|
5393
5397
|
enabled: !!e && !!t,
|
|
5394
5398
|
staleTime: 1 / 0,
|
|
5395
5399
|
gcTime: 1 / 0
|
|
5396
5400
|
});
|
|
5397
5401
|
return n;
|
|
5398
|
-
},
|
|
5402
|
+
}, FS = () => {
|
|
5399
5403
|
const { chainId: e, address: t } = A(), { data: { isCustomCooldownDepositAllowed: n } = {} } = rr({
|
|
5400
5404
|
address: t,
|
|
5401
5405
|
chainId: e
|
|
@@ -5409,7 +5413,7 @@ const ol = (e, t) => {
|
|
|
5409
5413
|
const [e] = $(), { chainId: t, address: n } = A(), r = ct({
|
|
5410
5414
|
address: n,
|
|
5411
5415
|
chainId: t
|
|
5412
|
-
}), o =
|
|
5416
|
+
}), o = FS();
|
|
5413
5417
|
return P(() => {
|
|
5414
5418
|
const a = r.filter(
|
|
5415
5419
|
({ isDeposit: c }) => c
|
|
@@ -5451,7 +5455,7 @@ const ol = (e, t) => {
|
|
|
5451
5455
|
return t === "auto" ? n ? e : ys : t;
|
|
5452
5456
|
}, mn = () => {
|
|
5453
5457
|
const { account: e = O } = B(), { chainId: t } = A(), [n] = $(), { debouncedSendTokenValue: r } = cr(), { vaultDepositTokenAddress: o } = Mt(), a = un(), i = dr();
|
|
5454
|
-
return
|
|
5458
|
+
return OS(
|
|
5455
5459
|
{
|
|
5456
5460
|
sourceAddress: n.address,
|
|
5457
5461
|
destinationAddress: o,
|
|
@@ -5479,7 +5483,7 @@ const ol = (e, t) => {
|
|
|
5479
5483
|
}
|
|
5480
5484
|
const h = c ? e : d;
|
|
5481
5485
|
return new D(o.value || "0").shiftedBy(o.decimals).times(1 - h / 100).toFixed(0);
|
|
5482
|
-
},
|
|
5486
|
+
}, WS = ({
|
|
5483
5487
|
isDepositWithSwapTransaction: e,
|
|
5484
5488
|
sendTokenAddress: t,
|
|
5485
5489
|
sendTokenValue: n
|
|
@@ -5500,7 +5504,7 @@ const ol = (e, t) => {
|
|
|
5500
5504
|
}), c = Number(n || "0") * o;
|
|
5501
5505
|
return i && l !== 0 && Number.isFinite(c) ? new D(c / l).shiftedBy(i).times(1 - Cs / 100).toFixed(0) : "0";
|
|
5502
5506
|
}, pl = () => {
|
|
5503
|
-
const [e] = $(), { debouncedSendTokenValue: t } = cr(), n = un(), r =
|
|
5507
|
+
const [e] = $(), { debouncedSendTokenValue: t } = cr(), n = un(), r = WS({
|
|
5504
5508
|
isDepositWithSwapTransaction: n,
|
|
5505
5509
|
sendTokenAddress: e.address,
|
|
5506
5510
|
sendTokenValue: t
|
|
@@ -5511,14 +5515,14 @@ const ol = (e, t) => {
|
|
|
5511
5515
|
t || "0"
|
|
5512
5516
|
).shiftedBy(e.decimals);
|
|
5513
5517
|
return o.isFinite() ? o.toFixed(0) : "0";
|
|
5514
|
-
},
|
|
5518
|
+
}, US = "0x", Fr = (e, t, n = [], r) => {
|
|
5515
5519
|
const {
|
|
5516
5520
|
vaultAddress: o,
|
|
5517
5521
|
vaultDepositTokenAddress: a,
|
|
5518
5522
|
vaultDepositTokenAmount: i,
|
|
5519
5523
|
minVaultTokensReceivedAmount: l,
|
|
5520
5524
|
sendTokenAmount: c
|
|
5521
|
-
} = t, d = r ??
|
|
5525
|
+
} = t, d = r ?? US;
|
|
5522
5526
|
switch (e) {
|
|
5523
5527
|
case "nativeDeposit":
|
|
5524
5528
|
case "nativeDepositWithCustomCooldown":
|
|
@@ -5544,7 +5548,7 @@ const ol = (e, t) => {
|
|
|
5544
5548
|
case "zapDepositWithCustomCooldown":
|
|
5545
5549
|
return [...n, d];
|
|
5546
5550
|
}
|
|
5547
|
-
},
|
|
5551
|
+
}, zS = async ({
|
|
5548
5552
|
baseArgs: e,
|
|
5549
5553
|
swapQuotes: t,
|
|
5550
5554
|
estimate: n,
|
|
@@ -5619,11 +5623,11 @@ const ol = (e, t) => {
|
|
|
5619
5623
|
return g;
|
|
5620
5624
|
}
|
|
5621
5625
|
return console.warn("[Deposit] No valid routers found for swap"), g;
|
|
5622
|
-
},
|
|
5626
|
+
}, GS = (e) => e === "zapNativeDeposit" || e === "zapNativeDepositWithCustomCooldown" || e === "zapDeposit" || e === "zapDepositWithCustomCooldown", HS = ({
|
|
5623
5627
|
depositMethod: e,
|
|
5624
5628
|
vaultDepositTokenAddress: t
|
|
5625
5629
|
}) => {
|
|
5626
|
-
const { address: n } = A(), [r] = $(), [{ slippage: o }] = ne(), a = r.value || "0", i = new D(a).shiftedBy(r.decimals).toFixed(0), l = pl(), { data: c } = mn(), d = dl(), p = dr(), { referralData: m } =
|
|
5630
|
+
const { address: n } = A(), [r] = $(), [{ slippage: o }] = ne(), a = r.value || "0", i = new D(a).shiftedBy(r.decimals).toFixed(0), l = pl(), { data: c } = mn(), d = dl(), p = dr(), { referralData: m } = MS(), u = o === "auto", h = u ? Vr({ maxSlippage: p }) : void 0;
|
|
5627
5631
|
return b(
|
|
5628
5632
|
async (g) => {
|
|
5629
5633
|
const f = {
|
|
@@ -5632,9 +5636,9 @@ const ol = (e, t) => {
|
|
|
5632
5636
|
vaultDepositTokenAmount: l,
|
|
5633
5637
|
minVaultTokensReceivedAmount: d,
|
|
5634
5638
|
sendTokenAmount: i
|
|
5635
|
-
}, v =
|
|
5639
|
+
}, v = GS(e);
|
|
5636
5640
|
try {
|
|
5637
|
-
return v ? await
|
|
5641
|
+
return v ? await zS({
|
|
5638
5642
|
baseArgs: f,
|
|
5639
5643
|
swapQuotes: c,
|
|
5640
5644
|
estimate: g,
|
|
@@ -5669,8 +5673,8 @@ const ol = (e, t) => {
|
|
|
5669
5673
|
l
|
|
5670
5674
|
]
|
|
5671
5675
|
);
|
|
5672
|
-
},
|
|
5673
|
-
const { chainId: e } = A(), [t] = z(), n = ie()[1], { depositMethod: r, vaultDepositTokenAddress: o } = Mt(), a =
|
|
5676
|
+
}, VS = () => {
|
|
5677
|
+
const { chainId: e } = A(), [t] = z(), n = ie()[1], { depositMethod: r, vaultDepositTokenAddress: o } = Mt(), a = HS({
|
|
5674
5678
|
depositMethod: r,
|
|
5675
5679
|
vaultDepositTokenAddress: o
|
|
5676
5680
|
}), i = b(() => {
|
|
@@ -5687,11 +5691,11 @@ const ol = (e, t) => {
|
|
|
5687
5691
|
buildDepositTransactionArgs: a,
|
|
5688
5692
|
addPendingTransaction: i
|
|
5689
5693
|
};
|
|
5690
|
-
},
|
|
5694
|
+
}, jS = "deposit", qS = ({
|
|
5691
5695
|
onDepositSettled: e
|
|
5692
5696
|
}) => {
|
|
5693
|
-
const { depositMethod: t, buildDepositTransactionArgs: n, addPendingTransaction: r } =
|
|
5694
|
-
action:
|
|
5697
|
+
const { depositMethod: t, buildDepositTransactionArgs: n, addPendingTransaction: r } = VS(), o = Qe({
|
|
5698
|
+
action: jS,
|
|
5695
5699
|
onErrorCallback: e,
|
|
5696
5700
|
onSuccessCallback: e
|
|
5697
5701
|
}), { send: a, estimate: i } = ye({
|
|
@@ -5713,7 +5717,7 @@ const ol = (e, t) => {
|
|
|
5713
5717
|
} catch (e) {
|
|
5714
5718
|
return console.error(e), Cr;
|
|
5715
5719
|
}
|
|
5716
|
-
},
|
|
5720
|
+
}, KS = (e) => {
|
|
5717
5721
|
if (xt)
|
|
5718
5722
|
try {
|
|
5719
5723
|
localStorage.setItem(
|
|
@@ -5723,7 +5727,7 @@ const ol = (e, t) => {
|
|
|
5723
5727
|
} catch (t) {
|
|
5724
5728
|
console.error(t);
|
|
5725
5729
|
}
|
|
5726
|
-
}, ul = (e, t) => t - e.updatedAt < Ts,
|
|
5730
|
+
}, ul = (e, t) => t - e.updatedAt < Ts, YS = (e, t) => Object.fromEntries(
|
|
5727
5731
|
Object.entries(e).filter(([, n]) => ul(n, t))
|
|
5728
5732
|
), ml = () => {
|
|
5729
5733
|
const { address: e, chainId: t } = A(), n = b(() => {
|
|
@@ -5736,8 +5740,8 @@ const ol = (e, t) => {
|
|
|
5736
5740
|
if (!e)
|
|
5737
5741
|
return;
|
|
5738
5742
|
const a = Date.now();
|
|
5739
|
-
|
|
5740
|
-
...
|
|
5743
|
+
KS({
|
|
5744
|
+
...YS(_a(), a),
|
|
5741
5745
|
[Oa(t, e)]: { updatedAt: a, txHash: o }
|
|
5742
5746
|
});
|
|
5743
5747
|
},
|
|
@@ -5789,7 +5793,7 @@ const ol = (e, t) => {
|
|
|
5789
5793
|
l,
|
|
5790
5794
|
c
|
|
5791
5795
|
]);
|
|
5792
|
-
},
|
|
5796
|
+
}, QS = () => {
|
|
5793
5797
|
const { account: e = O } = B(), { chainId: t } = A(), [n] = $(), r = Q("easySwapperV2", t), o = new D(n.value || "0").shiftedBy(n.decimals).toFixed(0, D.ROUND_UP), { canSpend: a } = il({
|
|
5794
5798
|
tokenAddress: n.address,
|
|
5795
5799
|
ownerAddress: e,
|
|
@@ -5803,15 +5807,15 @@ const ol = (e, t) => {
|
|
|
5803
5807
|
rawTokenAmount: o,
|
|
5804
5808
|
spenderAddress: r
|
|
5805
5809
|
}), canSpend: a };
|
|
5806
|
-
},
|
|
5810
|
+
}, XS = () => {
|
|
5807
5811
|
const [e, t] = U("idle"), n = ue(!1), r = ue(!1), o = b(() => {
|
|
5808
5812
|
t("idle"), n.current = !1, r.current = !1;
|
|
5809
5813
|
}, []), a = b(() => {
|
|
5810
5814
|
o();
|
|
5811
|
-
}, [o]), i =
|
|
5815
|
+
}, [o]), i = qS({ onDepositSettled: a }), { handleTrade: l } = No({
|
|
5812
5816
|
trade: i,
|
|
5813
5817
|
onErrorCallback: a
|
|
5814
|
-
}), { approve: c, canSpend: d } =
|
|
5818
|
+
}), { approve: c, canSpend: d } = QS(), { address: p, chainId: m } = A(), [{ action: u, status: h }] = te(), [g] = ie(), { showError: f, closeError: v } = dt(), y = oo(), T = b(
|
|
5815
5819
|
async (de) => {
|
|
5816
5820
|
const L = Hr({
|
|
5817
5821
|
chainId: m,
|
|
@@ -5925,7 +5929,7 @@ const ol = (e, t) => {
|
|
|
5925
5929
|
isLoading: e !== "idle",
|
|
5926
5930
|
flowState: e
|
|
5927
5931
|
};
|
|
5928
|
-
},
|
|
5932
|
+
}, ZS = ({
|
|
5929
5933
|
address: e,
|
|
5930
5934
|
chainId: t
|
|
5931
5935
|
}) => {
|
|
@@ -5941,8 +5945,8 @@ const ol = (e, t) => {
|
|
|
5941
5945
|
}
|
|
5942
5946
|
});
|
|
5943
5947
|
return Ei(l), l;
|
|
5944
|
-
},
|
|
5945
|
-
const { address: e, chainId: t } = A(), n = st(), [r] = $(), [o, a] = z(), [, i] = ne(), { isDebouncing: l, debouncedSendTokenValue: c } = cr(), { isFetching: d } = mn(), { data: p, isFetching: m } =
|
|
5948
|
+
}, JS = () => {
|
|
5949
|
+
const { address: e, chainId: t } = A(), n = st(), [r] = $(), [o, a] = z(), [, i] = ne(), { isDebouncing: l, debouncedSendTokenValue: c } = cr(), { isFetching: d } = mn(), { data: p, isFetching: m } = ZS({
|
|
5946
5950
|
address: e,
|
|
5947
5951
|
chainId: t
|
|
5948
5952
|
}), u = d || m || l;
|
|
@@ -5989,7 +5993,7 @@ const ol = (e, t) => {
|
|
|
5989
5993
|
i,
|
|
5990
5994
|
l
|
|
5991
5995
|
]);
|
|
5992
|
-
},
|
|
5996
|
+
}, ex = () => {
|
|
5993
5997
|
const e = st(), [t] = z(), [, n] = ne(), { isDebouncing: r } = cr({
|
|
5994
5998
|
extendedDebounceTime: !0
|
|
5995
5999
|
}), o = dr(), a = hl({ includesEntryFee: !0 });
|
|
@@ -6007,54 +6011,54 @@ const ol = (e, t) => {
|
|
|
6007
6011
|
r
|
|
6008
6012
|
]);
|
|
6009
6013
|
};
|
|
6010
|
-
function
|
|
6014
|
+
function tx(e, t, n, r) {
|
|
6011
6015
|
for (var o = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < o; )
|
|
6012
6016
|
if (t(e[a], a, e))
|
|
6013
6017
|
return a;
|
|
6014
6018
|
return -1;
|
|
6015
6019
|
}
|
|
6016
|
-
var
|
|
6017
|
-
function
|
|
6020
|
+
var nx = tx;
|
|
6021
|
+
function rx(e) {
|
|
6018
6022
|
return e !== e;
|
|
6019
6023
|
}
|
|
6020
|
-
var
|
|
6021
|
-
function
|
|
6024
|
+
var ox = rx;
|
|
6025
|
+
function ax(e, t, n) {
|
|
6022
6026
|
for (var r = n - 1, o = e.length; ++r < o; )
|
|
6023
6027
|
if (e[r] === t)
|
|
6024
6028
|
return r;
|
|
6025
6029
|
return -1;
|
|
6026
6030
|
}
|
|
6027
|
-
var
|
|
6028
|
-
function
|
|
6029
|
-
return t === t ?
|
|
6031
|
+
var sx = ax, ix = nx, lx = ox, cx = sx;
|
|
6032
|
+
function dx(e, t, n) {
|
|
6033
|
+
return t === t ? cx(e, t, n) : ix(e, lx, n);
|
|
6030
6034
|
}
|
|
6031
|
-
var
|
|
6032
|
-
function
|
|
6035
|
+
var px = dx, ux = px;
|
|
6036
|
+
function mx(e, t) {
|
|
6033
6037
|
var n = e == null ? 0 : e.length;
|
|
6034
|
-
return !!n &&
|
|
6038
|
+
return !!n && ux(e, t, 0) > -1;
|
|
6035
6039
|
}
|
|
6036
|
-
var
|
|
6037
|
-
function
|
|
6040
|
+
var wx = mx;
|
|
6041
|
+
function hx(e, t, n) {
|
|
6038
6042
|
for (var r = -1, o = e == null ? 0 : e.length; ++r < o; )
|
|
6039
6043
|
if (n(t, e[r]))
|
|
6040
6044
|
return !0;
|
|
6041
6045
|
return !1;
|
|
6042
6046
|
}
|
|
6043
|
-
var
|
|
6044
|
-
function
|
|
6047
|
+
var gx = hx;
|
|
6048
|
+
function fx() {
|
|
6045
6049
|
}
|
|
6046
|
-
var
|
|
6050
|
+
var vx = fx, Ir = wi, bx = vx, yx = lo, Tx = 1 / 0, Ax = Ir && 1 / yx(new Ir([, -0]))[1] == Tx ? function(e) {
|
|
6047
6051
|
return new Ir(e);
|
|
6048
|
-
} :
|
|
6049
|
-
function
|
|
6050
|
-
var r = -1, o =
|
|
6052
|
+
} : bx, Sx = Ax, xx = si, Cx = wx, Ex = gx, Ix = ii, Nx = Sx, Ox = lo, _x = 200;
|
|
6053
|
+
function Px(e, t, n) {
|
|
6054
|
+
var r = -1, o = Cx, a = e.length, i = !0, l = [], c = l;
|
|
6051
6055
|
if (n)
|
|
6052
|
-
i = !1, o =
|
|
6053
|
-
else if (a >=
|
|
6054
|
-
var d = t ? null :
|
|
6056
|
+
i = !1, o = Ex;
|
|
6057
|
+
else if (a >= _x) {
|
|
6058
|
+
var d = t ? null : Nx(e);
|
|
6055
6059
|
if (d)
|
|
6056
|
-
return
|
|
6057
|
-
i = !1, o =
|
|
6060
|
+
return Ox(d);
|
|
6061
|
+
i = !1, o = Ix, c = new xx();
|
|
6058
6062
|
} else
|
|
6059
6063
|
c = t ? [] : l;
|
|
6060
6064
|
e:
|
|
@@ -6069,16 +6073,16 @@ function _x(e, t, n) {
|
|
|
6069
6073
|
}
|
|
6070
6074
|
return l;
|
|
6071
6075
|
}
|
|
6072
|
-
var
|
|
6073
|
-
function
|
|
6074
|
-
return e && e.length ?
|
|
6076
|
+
var Dx = Px, kx = xi, Lx = Dx;
|
|
6077
|
+
function Rx(e, t) {
|
|
6078
|
+
return e && e.length ? Lx(e, kx(t)) : [];
|
|
6075
6079
|
}
|
|
6076
|
-
var
|
|
6077
|
-
const
|
|
6080
|
+
var $x = Rx;
|
|
6081
|
+
const Bx = /* @__PURE__ */ Hn($x), wn = ({
|
|
6078
6082
|
excludeNativeToken: e = !1
|
|
6079
6083
|
} = {}) => {
|
|
6080
6084
|
const { address: t, chainId: n, depositParams: r } = A(), { account: o } = B(), a = ct({ address: t, chainId: n }), i = nr(), [{ isCustomDepositOptionsDisabled: l }] = ne(), [c] = jp(), d = P(
|
|
6081
|
-
() =>
|
|
6085
|
+
() => Bx(
|
|
6082
6086
|
[
|
|
6083
6087
|
...a.filter(({ isDeposit: h }) => h).map(({ tokenAddress: h, tokenName: g, precision: f }) => ({
|
|
6084
6088
|
address: h.toLowerCase(),
|
|
@@ -6159,7 +6163,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6159
6163
|
u,
|
|
6160
6164
|
r.defaultDepositTokenSymbol
|
|
6161
6165
|
]);
|
|
6162
|
-
},
|
|
6166
|
+
}, Mx = () => {
|
|
6163
6167
|
const e = A(), [t] = wn(), n = $()[1], [r] = De();
|
|
6164
6168
|
E(() => {
|
|
6165
6169
|
r === "deposit" && t?.symbol && n({
|
|
@@ -6177,7 +6181,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6177
6181
|
t?.address,
|
|
6178
6182
|
t?.decimals
|
|
6179
6183
|
]);
|
|
6180
|
-
},
|
|
6184
|
+
}, Fx = () => {
|
|
6181
6185
|
const { chainId: e, address: t, deprecated: n } = A(), { data: { isPrivateVault: r } = { isPrivateVault: !1 } } = ve({
|
|
6182
6186
|
address: t,
|
|
6183
6187
|
chainId: e
|
|
@@ -6186,7 +6190,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6186
6190
|
chainId: e
|
|
6187
6191
|
});
|
|
6188
6192
|
return { isVaultDepositLocked: o, isAccountWhitelisted: a };
|
|
6189
|
-
},
|
|
6193
|
+
}, Wx = () => {
|
|
6190
6194
|
const { defaultLockTime: e } = Z(), { chainId: t, address: n } = A(), { data: { customCooldown: r } = {} } = rr({
|
|
6191
6195
|
address: n,
|
|
6192
6196
|
chainId: t
|
|
@@ -6200,12 +6204,12 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6200
6204
|
default:
|
|
6201
6205
|
return e;
|
|
6202
6206
|
}
|
|
6203
|
-
},
|
|
6207
|
+
}, Ux = "1", zx = () => {
|
|
6204
6208
|
const { account: e = O } = B(), { address: t, chainId: n } = A(), [r] = z(), o = Te({ address: t, chainId: n }), { minDepositUSD: a } = Fi(t, n), { data: i } = cA({
|
|
6205
6209
|
address: t,
|
|
6206
6210
|
chainId: n,
|
|
6207
6211
|
account: e
|
|
6208
|
-
}), l = i?.balanceInUsdNumber ?? 0, c = o === "0" ?
|
|
6212
|
+
}), l = i?.balanceInUsdNumber ?? 0, c = o === "0" ? Ux : o, d = Math.max(0, a - l), p = new D(
|
|
6209
6213
|
r.value || "0"
|
|
6210
6214
|
).multipliedBy(c);
|
|
6211
6215
|
return {
|
|
@@ -6215,7 +6219,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6215
6219
|
}, Oo = (e) => {
|
|
6216
6220
|
const [{ action: t, status: n }] = te();
|
|
6217
6221
|
return t === e && (n === "Wallet" || n === "Mining");
|
|
6218
|
-
},
|
|
6222
|
+
}, Gx = (e) => {
|
|
6219
6223
|
const t = Ae(), { showError: n } = dt(), { onAcceptTermsOfUse: r } = yo(), { termsOfUseAccepted: o } = Z(), { swapQuoteRefreshTriggered: a } = se(), i = ro(), l = ue(!1), c = a === "deposit", {
|
|
6220
6224
|
disabled: d,
|
|
6221
6225
|
label: p,
|
|
@@ -6234,7 +6238,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6234
6238
|
m,
|
|
6235
6239
|
i
|
|
6236
6240
|
]);
|
|
6237
|
-
const y =
|
|
6241
|
+
const y = zA(), T = () => {
|
|
6238
6242
|
y ? t({
|
|
6239
6243
|
type: "MERGE_OVERLAY",
|
|
6240
6244
|
payload: {
|
|
@@ -6273,8 +6277,8 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6273
6277
|
label: p,
|
|
6274
6278
|
isLoading: f
|
|
6275
6279
|
};
|
|
6276
|
-
},
|
|
6277
|
-
const e = x(), { approveAndDeposit: t, isLoading: n, flowState: r } =
|
|
6280
|
+
}, Hx = () => {
|
|
6281
|
+
const e = x(), { approveAndDeposit: t, isLoading: n, flowState: r } = XS(), { handleClick: o, disabled: a } = Gx(t);
|
|
6278
6282
|
return {
|
|
6279
6283
|
handleClick: o,
|
|
6280
6284
|
disabled: a,
|
|
@@ -6294,10 +6298,10 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6294
6298
|
}
|
|
6295
6299
|
})()
|
|
6296
6300
|
};
|
|
6297
|
-
}, Hx = () => {
|
|
6298
|
-
const { ActionButton: e = K } = W(), { handleClick: t, disabled: n, isLoading: r, buttonText: o } = Gx();
|
|
6299
|
-
return /* @__PURE__ */ s(e, { onClick: t, disabled: n, loading: r, children: o });
|
|
6300
6301
|
}, Vx = () => {
|
|
6302
|
+
const { ActionButton: e = K } = W(), { handleClick: t, disabled: n, isLoading: r, buttonText: o } = Hx();
|
|
6303
|
+
return /* @__PURE__ */ s(e, { onClick: t, disabled: n, loading: r, children: o });
|
|
6304
|
+
}, jx = () => {
|
|
6301
6305
|
const {
|
|
6302
6306
|
deprecated: e,
|
|
6303
6307
|
symbol: t,
|
|
@@ -6308,7 +6312,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6308
6312
|
} = A(), [i] = $(), l = tr(), c = he({
|
|
6309
6313
|
address: i.address,
|
|
6310
6314
|
chainId: n
|
|
6311
|
-
}), { isVaultDepositLocked: d, isAccountWhitelisted: p } =
|
|
6315
|
+
}), { isVaultDepositLocked: d, isAccountWhitelisted: p } = Fx(), { requiresHighSlippageConfirm: m, confirmHighSlippage: u, slippageToBeUsed: h } = Co(), { requiresMinDeposit: g, requiredMinDepositAmount: f } = zx(), y = Number(i.value || "0") * Number(c), T = a !== void 0 && y > a;
|
|
6312
6316
|
return {
|
|
6313
6317
|
requiresMinDeposit: g,
|
|
6314
6318
|
requiresWhitelist: d && !p,
|
|
@@ -6322,7 +6326,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6322
6326
|
exceedsDepositCapacity: T,
|
|
6323
6327
|
insufficientBalance: l
|
|
6324
6328
|
};
|
|
6325
|
-
},
|
|
6329
|
+
}, qx = () => {
|
|
6326
6330
|
const { ActionButton: e = K } = W(), t = x(), {
|
|
6327
6331
|
requiresMinDeposit: n,
|
|
6328
6332
|
requiredMinDepositAmount: r,
|
|
@@ -6335,7 +6339,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6335
6339
|
maintenance: p,
|
|
6336
6340
|
insufficientBalance: m,
|
|
6337
6341
|
exceedsDepositCapacity: u
|
|
6338
|
-
} =
|
|
6342
|
+
} = jx();
|
|
6339
6343
|
return n ? /* @__PURE__ */ s(e, { disabled: !0, children: t.minimumPurchase.replace("{value}", r) }) : o || p ? /* @__PURE__ */ s(
|
|
6340
6344
|
Pn,
|
|
6341
6345
|
{
|
|
@@ -6354,8 +6358,8 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6354
6358
|
) : m ? /* @__PURE__ */ s(e, { disabled: !0, children: t.insufficientBalance }) : a ? /* @__PURE__ */ s(e, { onClick: d, children: t.confirmMaxSlippage.replace(
|
|
6355
6359
|
"{slippagePercentage}",
|
|
6356
6360
|
`${Math.abs(c)}`
|
|
6357
|
-
) }) : /* @__PURE__ */ s(
|
|
6358
|
-
},
|
|
6361
|
+
) }) : /* @__PURE__ */ s(Vx, {});
|
|
6362
|
+
}, Kx = () => {
|
|
6359
6363
|
const [e, t] = $(), { chainId: n } = A(), r = he({ address: e.address, chainId: n }), o = So({
|
|
6360
6364
|
symbol: e.symbol,
|
|
6361
6365
|
address: e.address
|
|
@@ -6366,14 +6370,14 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6366
6370
|
balance: o,
|
|
6367
6371
|
updater: t
|
|
6368
6372
|
};
|
|
6369
|
-
},
|
|
6373
|
+
}, Yx = () => {
|
|
6370
6374
|
const { address: e, chainId: t } = A(), [n] = z(), r = Te({ address: e, chainId: t });
|
|
6371
6375
|
return {
|
|
6372
6376
|
...n,
|
|
6373
6377
|
price: r
|
|
6374
6378
|
};
|
|
6375
|
-
},
|
|
6376
|
-
const e =
|
|
6379
|
+
}, Qx = () => {
|
|
6380
|
+
const e = Kx(), t = Yx(), n = Ot(), r = hl(), [{ minSlippage: o }] = ne();
|
|
6377
6381
|
return {
|
|
6378
6382
|
autoFocus: !1,
|
|
6379
6383
|
sendToken: e,
|
|
@@ -6416,11 +6420,11 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6416
6420
|
] }),
|
|
6417
6421
|
/* @__PURE__ */ s(ja, { show: n, children: /* @__PURE__ */ s(qa, { className: "dtw-mt-1 dtw-transition dtw-transform dtw-duration-100 dtw-ease-out data-[closed]:opacity-0 data-[closed]:-dtw-translate-y-2.5 dtw-static dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] dtw-flex dtw-flex-col dtw-gap-1", children: e }) })
|
|
6418
6422
|
] }) });
|
|
6419
|
-
},
|
|
6423
|
+
}, Xx = [
|
|
6420
6424
|
is,
|
|
6421
6425
|
Gt.address
|
|
6422
|
-
], Pa = ({ tokenAddress: e }) =>
|
|
6423
|
-
if (t !== Fn.id || !e.some(
|
|
6426
|
+
], Pa = ({ tokenAddress: e }) => Xx.some((t) => G(e, t)), Zx = ({ tokenAddress: e }) => G(e, is), Da = ({ tokenAddress: e }) => G(e, Je.address), Jx = (e, t) => {
|
|
6427
|
+
if (t !== Fn.id || !e.some(Zx))
|
|
6424
6428
|
return e;
|
|
6425
6429
|
const n = e.filter((c) => !Pa(c)), r = e.filter(Pa), [o] = r;
|
|
6426
6430
|
if (!o)
|
|
@@ -6444,7 +6448,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6444
6448
|
return [...n, l].sort(
|
|
6445
6449
|
(c, d) => d.fractionUsdNumber - c.fractionUsdNumber
|
|
6446
6450
|
);
|
|
6447
|
-
},
|
|
6451
|
+
}, eC = (e, t) => {
|
|
6448
6452
|
if (t.length === 0)
|
|
6449
6453
|
return e;
|
|
6450
6454
|
const n = ({ tokenAddress: c }) => t.some((d) => G(c, d)), r = e.filter((c) => n(c) || Da(c));
|
|
@@ -6473,14 +6477,14 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6473
6477
|
), i].sort(
|
|
6474
6478
|
(c, d) => d.fractionUsdNumber - c.fractionUsdNumber
|
|
6475
6479
|
);
|
|
6476
|
-
},
|
|
6480
|
+
}, tC = (e) => {
|
|
6477
6481
|
const { address: t, chainId: n } = A(), [{ value: r }] = $(), o = JT({
|
|
6478
6482
|
vaultTokensAmount: r,
|
|
6479
6483
|
address: t,
|
|
6480
6484
|
chainId: n
|
|
6481
6485
|
}), { assets: a } = Ye({ address: t, chainId: n }), i = P(
|
|
6482
|
-
() =>
|
|
6483
|
-
|
|
6486
|
+
() => eC(
|
|
6487
|
+
Jx(o, n),
|
|
6484
6488
|
a.map(({ address: g }) => g)
|
|
6485
6489
|
),
|
|
6486
6490
|
[o, n, a]
|
|
@@ -6503,7 +6507,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6503
6507
|
showMapolloWithdrawalTip: m,
|
|
6504
6508
|
mapolloSymbol: p?.tokenName
|
|
6505
6509
|
};
|
|
6506
|
-
},
|
|
6510
|
+
}, nC = ({ symbol: e }) => {
|
|
6507
6511
|
const t = x();
|
|
6508
6512
|
return /* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-1 dtw-items-center dtw-text-xs dtw-text-[color:var(--panel-secondary-content-color)]", children: [
|
|
6509
6513
|
t.as,
|
|
@@ -6526,7 +6530,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6526
6530
|
unitAddress: c,
|
|
6527
6531
|
showMapolloWithdrawalTip: d,
|
|
6528
6532
|
mapolloSymbol: p
|
|
6529
|
-
} =
|
|
6533
|
+
} = tC(r), m = b(
|
|
6530
6534
|
({
|
|
6531
6535
|
fraction: u,
|
|
6532
6536
|
fractionUsd: h,
|
|
@@ -6554,7 +6558,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6554
6558
|
}
|
|
6555
6559
|
),
|
|
6556
6560
|
y && /* @__PURE__ */ s(
|
|
6557
|
-
|
|
6561
|
+
nC,
|
|
6558
6562
|
{
|
|
6559
6563
|
symbol: ds(v).symbol
|
|
6560
6564
|
}
|
|
@@ -6619,7 +6623,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6619
6623
|
)
|
|
6620
6624
|
] })
|
|
6621
6625
|
] }) : /* @__PURE__ */ s(Li, {}) });
|
|
6622
|
-
},
|
|
6626
|
+
}, rC = ({ symbol: e }) => {
|
|
6623
6627
|
const t = on(), n = Ae(), { standalone: r } = Z(), o = t.some((p) => p.symbol === e), a = e === Ce.symbol, i = Gp(), l = o && t.length === 1;
|
|
6624
6628
|
return {
|
|
6625
6629
|
isAllSymbol: a,
|
|
@@ -6635,8 +6639,8 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6635
6639
|
disabled: l,
|
|
6636
6640
|
hideTokenIcon: r && o
|
|
6637
6641
|
};
|
|
6638
|
-
},
|
|
6639
|
-
const { isAllSymbol: t, onClick: n, disabled: r, hideTokenIcon: o } =
|
|
6642
|
+
}, oC = ({ symbol: e }) => {
|
|
6643
|
+
const { isAllSymbol: t, onClick: n, disabled: r, hideTokenIcon: o } = rC({
|
|
6640
6644
|
symbol: e
|
|
6641
6645
|
}), a = x();
|
|
6642
6646
|
return /* @__PURE__ */ w(
|
|
@@ -6670,7 +6674,7 @@ const $x = /* @__PURE__ */ Hn(Rx), wn = ({
|
|
|
6670
6674
|
}
|
|
6671
6675
|
);
|
|
6672
6676
|
};
|
|
6673
|
-
function
|
|
6677
|
+
function aC(e, t) {
|
|
6674
6678
|
const n = new D(e);
|
|
6675
6679
|
return t && n.gt(0) ? n.toFixed(6) : e;
|
|
6676
6680
|
}
|
|
@@ -6679,12 +6683,12 @@ function ka(e) {
|
|
|
6679
6683
|
const [t, n] = e.split("."), r = (t || "").replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
6680
6684
|
return n !== void 0 ? `${r}.${n}` : r;
|
|
6681
6685
|
}
|
|
6682
|
-
function
|
|
6686
|
+
function sC(e) {
|
|
6683
6687
|
return e.replace(/,/g, "");
|
|
6684
6688
|
}
|
|
6685
|
-
const
|
|
6689
|
+
const iC = (e) => {
|
|
6686
6690
|
e.currentTarget.blur();
|
|
6687
|
-
},
|
|
6691
|
+
}, lC = ({
|
|
6688
6692
|
displayCalculatedValue: e,
|
|
6689
6693
|
assetInput: t = "",
|
|
6690
6694
|
assetPrice: n,
|
|
@@ -6718,7 +6722,7 @@ const sC = (e) => {
|
|
|
6718
6722
|
d.current?.focus();
|
|
6719
6723
|
}, h = (f) => {
|
|
6720
6724
|
if (!a) return;
|
|
6721
|
-
const v = f.target.selectionStart ?? 0, y = f.target.value, T =
|
|
6725
|
+
const v = f.target.selectionStart ?? 0, y = f.target.value, T = sC(y);
|
|
6722
6726
|
if (T !== "" && !/^\d*\.?\d*$/.test(T)) return;
|
|
6723
6727
|
const S = T === "." ? "0." : T, k = (y.slice(0, v).match(/,/g) || []).length, _ = v - k + S.length - T.length;
|
|
6724
6728
|
a(S), requestAnimationFrame(() => {
|
|
@@ -6741,7 +6745,7 @@ const sC = (e) => {
|
|
|
6741
6745
|
inputRef: d,
|
|
6742
6746
|
usdAmount: p,
|
|
6743
6747
|
isEstimated: m,
|
|
6744
|
-
value: ka(
|
|
6748
|
+
value: ka(aC(t, c)),
|
|
6745
6749
|
autoFocus: l,
|
|
6746
6750
|
onContainerClick: u,
|
|
6747
6751
|
onMaxBalanceClick: g,
|
|
@@ -6757,7 +6761,7 @@ const sC = (e) => {
|
|
|
6757
6761
|
onContainerClick: i,
|
|
6758
6762
|
onMaxBalanceClick: l,
|
|
6759
6763
|
onInputChange: c
|
|
6760
|
-
} =
|
|
6764
|
+
} = lC(e), {
|
|
6761
6765
|
assetSymbol: d,
|
|
6762
6766
|
onInputFocus: p,
|
|
6763
6767
|
disabled: m = !1,
|
|
@@ -6807,10 +6811,10 @@ const sC = (e) => {
|
|
|
6807
6811
|
onFocus: p,
|
|
6808
6812
|
placeholder: "0",
|
|
6809
6813
|
disabled: m,
|
|
6810
|
-
onWheelCapture:
|
|
6814
|
+
onWheelCapture: iC
|
|
6811
6815
|
}
|
|
6812
6816
|
) }),
|
|
6813
|
-
/* @__PURE__ */ s(
|
|
6817
|
+
/* @__PURE__ */ s(oC, { symbol: d })
|
|
6814
6818
|
]
|
|
6815
6819
|
}
|
|
6816
6820
|
),
|
|
@@ -6838,7 +6842,7 @@ const sC = (e) => {
|
|
|
6838
6842
|
]
|
|
6839
6843
|
}
|
|
6840
6844
|
);
|
|
6841
|
-
},
|
|
6845
|
+
}, cC = () => {
|
|
6842
6846
|
const { stablePrecision: e, defaultPrecision: t } = Z(), [{ symbol: n, address: r }] = $(), o = Be({ symbol: n, address: r, watch: !0 });
|
|
6843
6847
|
return {
|
|
6844
6848
|
formattedBalance: ps({
|
|
@@ -6850,9 +6854,9 @@ const sC = (e) => {
|
|
|
6850
6854
|
symbol: n
|
|
6851
6855
|
};
|
|
6852
6856
|
}, vl = () => {
|
|
6853
|
-
const { formattedBalance: e, symbol: t } =
|
|
6857
|
+
const { formattedBalance: e, symbol: t } = cC();
|
|
6854
6858
|
return /* @__PURE__ */ s(ki, { balance: e, symbol: t });
|
|
6855
|
-
},
|
|
6859
|
+
}, dC = () => {
|
|
6856
6860
|
const { stablePrecision: e, defaultPrecision: t } = Z(), [{ symbol: n, address: r }] = z(), o = Be({ symbol: n, address: r, watch: !0 });
|
|
6857
6861
|
return {
|
|
6858
6862
|
formattedBalance: ps({
|
|
@@ -6864,9 +6868,9 @@ const sC = (e) => {
|
|
|
6864
6868
|
symbol: n
|
|
6865
6869
|
};
|
|
6866
6870
|
}, bl = () => {
|
|
6867
|
-
const { formattedBalance: e, symbol: t } =
|
|
6871
|
+
const { formattedBalance: e, symbol: t } = dC();
|
|
6868
6872
|
return /* @__PURE__ */ s(ki, { balance: e, symbol: t });
|
|
6869
|
-
},
|
|
6873
|
+
}, pC = () => {
|
|
6870
6874
|
const e = Ao(), t = To(), n = !st(), { isCompleteWithdrawStep: r, isFetching: o } = Ft(), [a] = z(), [, i] = ne(), l = Al();
|
|
6871
6875
|
E(() => {
|
|
6872
6876
|
if (!(!n || a.isLoading || o)) {
|
|
@@ -6889,7 +6893,7 @@ const sC = (e) => {
|
|
|
6889
6893
|
e,
|
|
6890
6894
|
o
|
|
6891
6895
|
]);
|
|
6892
|
-
},
|
|
6896
|
+
}, uC = () => {
|
|
6893
6897
|
const { account: e = O } = B(), { chainId: t } = A();
|
|
6894
6898
|
return Pe({
|
|
6895
6899
|
address: Q("easySwapperV2", t),
|
|
@@ -6984,11 +6988,11 @@ const sC = (e) => {
|
|
|
6984
6988
|
v,
|
|
6985
6989
|
p
|
|
6986
6990
|
]);
|
|
6987
|
-
},
|
|
6991
|
+
}, mC = () => {
|
|
6988
6992
|
const { data: e = [] } = me();
|
|
6989
6993
|
return e.reduce((t, { balance: n, price: r }) => t + n * r, 0);
|
|
6990
6994
|
}, me = () => {
|
|
6991
|
-
const { account: e = O } = B(), { chainId: t } = A(), { data: n = [] } =
|
|
6995
|
+
const { account: e = O } = B(), { chainId: t } = A(), { data: n = [] } = _S({
|
|
6992
6996
|
account: e,
|
|
6993
6997
|
chainId: t
|
|
6994
6998
|
});
|
|
@@ -7015,11 +7019,11 @@ const sC = (e) => {
|
|
|
7015
7019
|
n
|
|
7016
7020
|
]
|
|
7017
7021
|
);
|
|
7018
|
-
return
|
|
7022
|
+
return pS(l, {
|
|
7019
7023
|
enabled: i,
|
|
7020
7024
|
refetchInterval: qr
|
|
7021
7025
|
});
|
|
7022
|
-
},
|
|
7026
|
+
}, wC = () => {
|
|
7023
7027
|
const [e, t] = z(), { data: n = [] } = me(), {
|
|
7024
7028
|
data: r,
|
|
7025
7029
|
isFetching: o,
|
|
@@ -7033,7 +7037,7 @@ const sC = (e) => {
|
|
|
7033
7037
|
const i = n.reduce((l, c) => {
|
|
7034
7038
|
if (G(c.address, e.address))
|
|
7035
7039
|
return l.plus(c.rawBalance.toString());
|
|
7036
|
-
const d = r?.[c.address] ?? [], m = d[
|
|
7040
|
+
const d = r?.[c.address] ?? [], m = d[cS(d)]?.destinationAmount ?? "0";
|
|
7037
7041
|
return l.plus(m);
|
|
7038
7042
|
}, new D(0));
|
|
7039
7043
|
t({
|
|
@@ -7118,7 +7122,7 @@ const sC = (e) => {
|
|
|
7118
7122
|
}, Sl = () => {
|
|
7119
7123
|
const [e] = z(), { data: t = [] } = me();
|
|
7120
7124
|
return t.length > 0 && t.some(({ address: n }) => !G(n, e.address));
|
|
7121
|
-
},
|
|
7125
|
+
}, hC = ({
|
|
7122
7126
|
handleTrade: e,
|
|
7123
7127
|
onError: t
|
|
7124
7128
|
}) => {
|
|
@@ -7177,9 +7181,9 @@ const sC = (e) => {
|
|
|
7177
7181
|
return u();
|
|
7178
7182
|
}
|
|
7179
7183
|
};
|
|
7180
|
-
},
|
|
7181
|
-
|
|
7182
|
-
}, St = ["deposit", "withdraw"],
|
|
7184
|
+
}, gC = () => {
|
|
7185
|
+
KA(), Mx(), eA(), me();
|
|
7186
|
+
}, St = ["deposit", "withdraw"], fC = () => {
|
|
7183
7187
|
const [e] = De(), t = xl();
|
|
7184
7188
|
return {
|
|
7185
7189
|
handleClick: () => {
|
|
@@ -7188,7 +7192,7 @@ const sC = (e) => {
|
|
|
7188
7192
|
}
|
|
7189
7193
|
};
|
|
7190
7194
|
}, Cl = () => {
|
|
7191
|
-
const { handleClick: e } =
|
|
7195
|
+
const { handleClick: e } = fC();
|
|
7192
7196
|
return /* @__PURE__ */ s(
|
|
7193
7197
|
"div",
|
|
7194
7198
|
{
|
|
@@ -7197,7 +7201,7 @@ const sC = (e) => {
|
|
|
7197
7201
|
children: /* @__PURE__ */ s("button", { className: "!dtw-bg-[var(--panel-inputs-arrow-bg)] dtw-rounded-[var(--panel-inputs-arrow-radius)] dtw-px-[var(--panel-inputs-group-px-arrow)] dtw-py-[var(--panel-inputs-group-py-arrow)]", children: /* @__PURE__ */ s(kc, { className: "dtw-h-[var(--panel-inputs-group-arrow-size)] dtw-w-[var(--panel-inputs-group-arrow-size)] dtw-text-[color:var(--panel-inputs-arrow-color)] group-hover:dtw-opacity-[var(--panel-action-hover-opacity)] group-hover:dtw-rotate-180 dtw-transition-transform" }) })
|
|
7198
7202
|
}
|
|
7199
7203
|
);
|
|
7200
|
-
},
|
|
7204
|
+
}, vC = () => {
|
|
7201
7205
|
const {
|
|
7202
7206
|
sendToken: e,
|
|
7203
7207
|
receiveToken: t,
|
|
@@ -7206,7 +7210,7 @@ const sC = (e) => {
|
|
|
7206
7210
|
minSlippage: o,
|
|
7207
7211
|
onInputFocus: a,
|
|
7208
7212
|
onInputChange: i
|
|
7209
|
-
} =
|
|
7213
|
+
} = Qx(), l = dn(o ?? 0);
|
|
7210
7214
|
return /* @__PURE__ */ w(R, { children: [
|
|
7211
7215
|
/* @__PURE__ */ s(
|
|
7212
7216
|
en,
|
|
@@ -7242,7 +7246,7 @@ const sC = (e) => {
|
|
|
7242
7246
|
}
|
|
7243
7247
|
)
|
|
7244
7248
|
] });
|
|
7245
|
-
},
|
|
7249
|
+
}, bC = () => {
|
|
7246
7250
|
const { address: e, chainId: t } = A(), n = uA({ address: e, chainId: t }), [r] = z();
|
|
7247
7251
|
if (!n)
|
|
7248
7252
|
return { isMaxSupplyCapReached: !1, supplyCapInUsd: "" };
|
|
@@ -7255,8 +7259,8 @@ const sC = (e) => {
|
|
|
7255
7259
|
isMaxSupplyCapReached: c,
|
|
7256
7260
|
supplyCapInUsd: d
|
|
7257
7261
|
};
|
|
7258
|
-
},
|
|
7259
|
-
const { yearlyEarnings: e, dailyEarnings: t, showEarnings: n } =
|
|
7262
|
+
}, yC = () => {
|
|
7263
|
+
const { yearlyEarnings: e, dailyEarnings: t, showEarnings: n } = IS(), r = x();
|
|
7260
7264
|
return n ? /* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-2", children: [
|
|
7261
7265
|
/* @__PURE__ */ w(
|
|
7262
7266
|
"div",
|
|
@@ -7301,8 +7305,8 @@ const sC = (e) => {
|
|
|
7301
7305
|
}
|
|
7302
7306
|
)
|
|
7303
7307
|
] }) : null;
|
|
7304
|
-
},
|
|
7305
|
-
const e = x(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = ne(), o = t === "auto", a = dl(), [i] = z(), { address: l, chainId: c } = A(), { entryFee: d } = xo({ address: l, chainId: c }), { minDepositUSD: p } = Fi(l, c), m =
|
|
7308
|
+
}, TC = () => {
|
|
7309
|
+
const e = x(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = ne(), o = t === "auto", a = dl(), [i] = z(), { address: l, chainId: c } = A(), { entryFee: d } = xo({ address: l, chainId: c }), { minDepositUSD: p } = Fi(l, c), m = Wx(), u = un(), h = p ? ae({ value: p, minimumFractionDigits: 0 }) : "", g = dn(
|
|
7306
7310
|
o ? n ?? 0 : t
|
|
7307
7311
|
), f = Gi({
|
|
7308
7312
|
tradingType: "deposit",
|
|
@@ -7325,7 +7329,7 @@ const sC = (e) => {
|
|
|
7325
7329
|
showMinimumReceivedAmount: u
|
|
7326
7330
|
};
|
|
7327
7331
|
}, Po = ({ className: e }) => {
|
|
7328
|
-
const { value: t, isLoading: n } =
|
|
7332
|
+
const { value: t, isLoading: n } = XA();
|
|
7329
7333
|
return /* @__PURE__ */ w(
|
|
7330
7334
|
"div",
|
|
7331
7335
|
{
|
|
@@ -7350,7 +7354,7 @@ const sC = (e) => {
|
|
|
7350
7354
|
]
|
|
7351
7355
|
}
|
|
7352
7356
|
);
|
|
7353
|
-
},
|
|
7357
|
+
}, AC = () => {
|
|
7354
7358
|
const e = x(), {
|
|
7355
7359
|
slippageTooltipText: t,
|
|
7356
7360
|
slippagePlaceholder: n,
|
|
@@ -7362,7 +7366,7 @@ const sC = (e) => {
|
|
|
7362
7366
|
minDeposit: c,
|
|
7363
7367
|
lockTime: d,
|
|
7364
7368
|
showMinimumReceivedAmount: p
|
|
7365
|
-
} =
|
|
7369
|
+
} = TC(), m = P(() => {
|
|
7366
7370
|
const u = [
|
|
7367
7371
|
{
|
|
7368
7372
|
tooltipText: e.exchangeRate,
|
|
@@ -7434,21 +7438,21 @@ const sC = (e) => {
|
|
|
7434
7438
|
themeType: a
|
|
7435
7439
|
}
|
|
7436
7440
|
);
|
|
7437
|
-
},
|
|
7438
|
-
const { DepositMetaInfo: t, MaxSupplyReachedAlert: n } = W(), { isMaxSupplyCapReached: r, supplyCapInUsd: o } =
|
|
7441
|
+
}, SC = ({ children: e }) => {
|
|
7442
|
+
const { DepositMetaInfo: t, MaxSupplyReachedAlert: n } = W(), { isMaxSupplyCapReached: r, supplyCapInUsd: o } = bC();
|
|
7439
7443
|
return /* @__PURE__ */ w(X.Meta, { children: [
|
|
7440
7444
|
r && !!n && /* @__PURE__ */ s(n, { supplyCapInUsd: o }),
|
|
7441
7445
|
/* @__PURE__ */ s("div", { className: "dtw-bg-[var(--panel-meta-action-panel-bg)]", children: e }),
|
|
7442
|
-
/* @__PURE__ */ s(
|
|
7443
|
-
/* @__PURE__ */ s(
|
|
7446
|
+
/* @__PURE__ */ s(yC, {}),
|
|
7447
|
+
/* @__PURE__ */ s(AC, {}),
|
|
7444
7448
|
t && /* @__PURE__ */ s(t, {})
|
|
7445
7449
|
] });
|
|
7446
|
-
}, SC = () => {
|
|
7447
|
-
ZS(), JS();
|
|
7448
7450
|
}, xC = () => {
|
|
7451
|
+
JS(), ex();
|
|
7452
|
+
}, CC = () => {
|
|
7449
7453
|
const { countryCode: e } = Z(), { address: t, chainId: n } = A(), { hasAssets: r } = Ye({ address: t, chainId: n }), o = e ? gp[e] : void 0, a = e ? fp[e] : void 0;
|
|
7450
7454
|
return { isGeoBlocked: !!o || r && !!a, blockedCountryName: o ?? a ?? "" };
|
|
7451
|
-
},
|
|
7455
|
+
}, EC = () => {
|
|
7452
7456
|
const { ActionButton: e = K } = W(), t = x(), { status: n } = Ls(), { onConnect: r } = yo();
|
|
7453
7457
|
return /* @__PURE__ */ s(
|
|
7454
7458
|
e,
|
|
@@ -7459,7 +7463,7 @@ const sC = (e) => {
|
|
|
7459
7463
|
children: t.connectWallet
|
|
7460
7464
|
}
|
|
7461
7465
|
);
|
|
7462
|
-
},
|
|
7466
|
+
}, IC = () => {
|
|
7463
7467
|
const { ActionButton: e = K } = W(), { switchNetwork: t } = it(), { chainId: n } = A(), r = x();
|
|
7464
7468
|
return /* @__PURE__ */ s(e, { onClick: () => {
|
|
7465
7469
|
t?.({ chainId: n });
|
|
@@ -7472,8 +7476,8 @@ const sC = (e) => {
|
|
|
7472
7476
|
};
|
|
7473
7477
|
}, Do = ({ children: e }) => {
|
|
7474
7478
|
const { isDisconnected: t, isWrongNetwork: n } = El();
|
|
7475
|
-
return t ? /* @__PURE__ */ s(
|
|
7476
|
-
},
|
|
7479
|
+
return t ? /* @__PURE__ */ s(EC, {}) : n ? /* @__PURE__ */ s(IC, {}) : e;
|
|
7480
|
+
}, NC = ({
|
|
7477
7481
|
onClick: e,
|
|
7478
7482
|
tooltipText: t,
|
|
7479
7483
|
disabled: n
|
|
@@ -7489,7 +7493,7 @@ const sC = (e) => {
|
|
|
7489
7493
|
return () => clearTimeout(i);
|
|
7490
7494
|
}, [r]), { disabled: n || r, tooltipText: t, handleClick: a };
|
|
7491
7495
|
}, Il = (e) => {
|
|
7492
|
-
const { disabled: t, tooltipText: n, handleClick: r } =
|
|
7496
|
+
const { disabled: t, tooltipText: n, handleClick: r } = NC(e);
|
|
7493
7497
|
return /* @__PURE__ */ s(Qr, { text: n, children: /* @__PURE__ */ s(
|
|
7494
7498
|
In,
|
|
7495
7499
|
{
|
|
@@ -7503,13 +7507,13 @@ const sC = (e) => {
|
|
|
7503
7507
|
)
|
|
7504
7508
|
}
|
|
7505
7509
|
) });
|
|
7506
|
-
},
|
|
7510
|
+
}, OC = () => {
|
|
7507
7511
|
const { refetch: e, isFetched: t } = mn(), { invalidateTradingQueries: n } = ln();
|
|
7508
7512
|
return { handleSwapQuoteReload: () => {
|
|
7509
7513
|
n(), e();
|
|
7510
7514
|
}, disabled: !t };
|
|
7511
|
-
},
|
|
7512
|
-
const e = x(), { handleSwapQuoteReload: t, disabled: n } =
|
|
7515
|
+
}, _C = () => {
|
|
7516
|
+
const e = x(), { handleSwapQuoteReload: t, disabled: n } = OC();
|
|
7513
7517
|
return /* @__PURE__ */ s(
|
|
7514
7518
|
Il,
|
|
7515
7519
|
{
|
|
@@ -7518,13 +7522,13 @@ const sC = (e) => {
|
|
|
7518
7522
|
disabled: n
|
|
7519
7523
|
}
|
|
7520
7524
|
);
|
|
7521
|
-
},
|
|
7525
|
+
}, PC = () => {
|
|
7522
7526
|
const { refetch: e, isFetched: t } = ut(), { invalidateTradingQueries: n } = ln();
|
|
7523
7527
|
return { handleSwapQuoteReload: () => {
|
|
7524
7528
|
n(), e();
|
|
7525
7529
|
}, disabled: !t };
|
|
7526
|
-
},
|
|
7527
|
-
const e = x(), { handleSwapQuoteReload: t, disabled: n } =
|
|
7530
|
+
}, DC = () => {
|
|
7531
|
+
const e = x(), { handleSwapQuoteReload: t, disabled: n } = PC();
|
|
7528
7532
|
return /* @__PURE__ */ s(
|
|
7529
7533
|
Il,
|
|
7530
7534
|
{
|
|
@@ -7533,22 +7537,22 @@ const sC = (e) => {
|
|
|
7533
7537
|
disabled: n
|
|
7534
7538
|
}
|
|
7535
7539
|
);
|
|
7536
|
-
},
|
|
7540
|
+
}, kC = () => st() ? /* @__PURE__ */ s(_C, {}) : /* @__PURE__ */ s(DC, {}), Nl = ({
|
|
7537
7541
|
children: e,
|
|
7538
7542
|
...t
|
|
7539
7543
|
}) => {
|
|
7540
|
-
const { ActionButton: n = K } = W(), { openLimitSellOverlay: r, displayLimitSellOverlay: o } =
|
|
7544
|
+
const { ActionButton: n = K } = W(), { openLimitSellOverlay: r, displayLimitSellOverlay: o } = PA();
|
|
7541
7545
|
return o ? /* @__PURE__ */ s(n, { ...t, onClick: r, children: e }) : null;
|
|
7542
|
-
},
|
|
7546
|
+
}, LC = ({
|
|
7543
7547
|
children: e,
|
|
7544
7548
|
...t
|
|
7545
7549
|
}) => {
|
|
7546
|
-
const { ActionButton: n = K } = W(), { openLimitBuyOverlay: r, displayLimitBuyOverlay: o } =
|
|
7550
|
+
const { ActionButton: n = K } = W(), { openLimitBuyOverlay: r, displayLimitBuyOverlay: o } = UA();
|
|
7547
7551
|
return o ? /* @__PURE__ */ s(n, { ...t, onClick: r, children: e }) : null;
|
|
7548
7552
|
}, Ol = ({ children: e, ...t }) => {
|
|
7549
7553
|
const { ActionButton: n = K } = W(), { onOpenNotificationsSettings: r } = yo();
|
|
7550
7554
|
return r ? /* @__PURE__ */ s(n, { ...t, onClick: r, children: e }) : null;
|
|
7551
|
-
},
|
|
7555
|
+
}, RC = () => {
|
|
7552
7556
|
const { address: e, symbol: t } = A();
|
|
7553
7557
|
return {
|
|
7554
7558
|
handleAddToWallet: b(() => {
|
|
@@ -7560,8 +7564,8 @@ const sC = (e) => {
|
|
|
7560
7564
|
});
|
|
7561
7565
|
}, [e, t])
|
|
7562
7566
|
};
|
|
7563
|
-
},
|
|
7564
|
-
const e = x(), { handleAddToWallet: t } =
|
|
7567
|
+
}, $C = () => {
|
|
7568
|
+
const e = x(), { handleAddToWallet: t } = RC();
|
|
7565
7569
|
return /* @__PURE__ */ s(
|
|
7566
7570
|
"button",
|
|
7567
7571
|
{
|
|
@@ -7571,7 +7575,7 @@ const sC = (e) => {
|
|
|
7571
7575
|
children: e.addToWallet
|
|
7572
7576
|
}
|
|
7573
7577
|
);
|
|
7574
|
-
},
|
|
7578
|
+
}, BC = () => {
|
|
7575
7579
|
const e = x(), t = Ae();
|
|
7576
7580
|
lr();
|
|
7577
7581
|
const { symbol: n } = A(), [r] = $(), [o] = z(), a = Gn()[1], { isCompleteWithdrawStep: i } = Ft(), { swapQuoteRefreshTriggered: l } = se(), c = ro(), { isFetching: d, isError: p } = ut(), m = ue(!1), u = b(() => {
|
|
@@ -7624,11 +7628,11 @@ const sC = (e) => {
|
|
|
7624
7628
|
label: i ? e.swapAction : e.sellNow
|
|
7625
7629
|
};
|
|
7626
7630
|
}, _l = () => {
|
|
7627
|
-
const { ActionButton: e = K } = W(), { handleClick: t, label: n, disabled: r } =
|
|
7631
|
+
const { ActionButton: e = K } = W(), { handleClick: t, label: n, disabled: r } = BC();
|
|
7628
7632
|
return /* @__PURE__ */ s(e, { onClick: t, disabled: r, children: n });
|
|
7629
|
-
},
|
|
7630
|
-
|
|
7631
|
-
const e = x(), { isSanctioned: t } = Z(), { GeoBlockAlert: n, SanctionedAlert: r, CustomDepositMeta: o } = W(), { isGeoBlocked: a, blockedCountryName: i } =
|
|
7633
|
+
}, MC = () => {
|
|
7634
|
+
xC();
|
|
7635
|
+
const e = x(), { isSanctioned: t } = Z(), { GeoBlockAlert: n, SanctionedAlert: r, CustomDepositMeta: o } = W(), { isGeoBlocked: a, blockedCountryName: i } = CC(), l = a || t, c = [
|
|
7632
7636
|
{
|
|
7633
7637
|
Component: n ? () => /* @__PURE__ */ s(n, { countryName: i }) : void 0,
|
|
7634
7638
|
value: a,
|
|
@@ -7641,25 +7645,25 @@ const sC = (e) => {
|
|
|
7641
7645
|
}
|
|
7642
7646
|
].filter(({ value: d }) => d);
|
|
7643
7647
|
return /* @__PURE__ */ w(R, { children: [
|
|
7644
|
-
/* @__PURE__ */ s(X.InputGroup, { children: /* @__PURE__ */ s(
|
|
7645
|
-
/* @__PURE__ */ s(
|
|
7648
|
+
/* @__PURE__ */ s(X.InputGroup, { children: /* @__PURE__ */ s(vC, {}) }),
|
|
7649
|
+
/* @__PURE__ */ s(SC, { children: l ? c.map(
|
|
7646
7650
|
({ Component: d, key: p }) => d && /* @__PURE__ */ s(d, {}, p)
|
|
7647
7651
|
) : /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(Do, { children: /* @__PURE__ */ w("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
|
|
7648
|
-
/* @__PURE__ */ s(
|
|
7649
|
-
/* @__PURE__ */ s(
|
|
7652
|
+
/* @__PURE__ */ s(qx, {}),
|
|
7653
|
+
/* @__PURE__ */ s(LC, { highlighted: !1, children: e.limitBuy })
|
|
7650
7654
|
] }) }) }) }),
|
|
7651
7655
|
o && /* @__PURE__ */ s(o, {})
|
|
7652
7656
|
] });
|
|
7653
|
-
},
|
|
7657
|
+
}, FC = () => /* @__PURE__ */ s(X.Panel, { children: /* @__PURE__ */ s(MC, {}) }), WC = (e) => Object.keys(j).some((t) => t === e), UC = ({ children: e }) => {
|
|
7654
7658
|
const t = Ki();
|
|
7655
7659
|
let n = null;
|
|
7656
7660
|
return _c.forEach(e, (r) => {
|
|
7657
7661
|
if (Pc(r)) {
|
|
7658
7662
|
const o = r.props.type;
|
|
7659
|
-
|
|
7663
|
+
WC(o) && t[o] && t[o].isOpen && (n = r);
|
|
7660
7664
|
}
|
|
7661
7665
|
}), n;
|
|
7662
|
-
},
|
|
7666
|
+
}, zC = ({ type: e }) => {
|
|
7663
7667
|
const t = x(), { DepositTermsOfUse: n, ActionButton: r = K } = W(), { handleReject: o, handleConfirm: a, isPending: i } = pe({
|
|
7664
7668
|
type: e
|
|
7665
7669
|
});
|
|
@@ -7694,7 +7698,7 @@ const sC = (e) => {
|
|
|
7694
7698
|
)
|
|
7695
7699
|
] })
|
|
7696
7700
|
] });
|
|
7697
|
-
},
|
|
7701
|
+
}, GC = ({ type: e }) => {
|
|
7698
7702
|
const t = x(), { ActionButton: n = K } = W(), { handleReject: r, handleConfirm: o } = pe({ type: e });
|
|
7699
7703
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-1", children: [
|
|
7700
7704
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-1 dtw-items-center dtw-text-warning", children: [
|
|
@@ -7717,7 +7721,7 @@ const sC = (e) => {
|
|
|
7717
7721
|
/* @__PURE__ */ s(n, { onClick: o, children: t.confirm })
|
|
7718
7722
|
] })
|
|
7719
7723
|
] });
|
|
7720
|
-
},
|
|
7724
|
+
}, HC = ({ type: e }) => {
|
|
7721
7725
|
const t = x(), { ActionButton: n = K } = W(), { handleReject: r, handleConfirm: o } = pe({ type: e });
|
|
7722
7726
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-3", children: [
|
|
7723
7727
|
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-gap-1 dtw-items-center", children: /* @__PURE__ */ s("p", { children: t.hyperEvmWarningTitle }) }),
|
|
@@ -7731,18 +7735,18 @@ const sC = (e) => {
|
|
|
7731
7735
|
/* @__PURE__ */ s(n, { onClick: o, children: t.hyperEvmUnderstandRisks })
|
|
7732
7736
|
] })
|
|
7733
7737
|
] });
|
|
7734
|
-
},
|
|
7738
|
+
}, VC = ({
|
|
7735
7739
|
token: e,
|
|
7736
7740
|
onSelect: t
|
|
7737
7741
|
}) => ({
|
|
7738
7742
|
onClick: () => {
|
|
7739
7743
|
t(e);
|
|
7740
7744
|
}
|
|
7741
|
-
}),
|
|
7745
|
+
}), jC = ({
|
|
7742
7746
|
token: e,
|
|
7743
7747
|
onSelect: t
|
|
7744
7748
|
}) => {
|
|
7745
|
-
const { onClick: n } =
|
|
7749
|
+
const { onClick: n } = VC({ token: e, onSelect: t });
|
|
7746
7750
|
return /* @__PURE__ */ w(
|
|
7747
7751
|
"div",
|
|
7748
7752
|
{
|
|
@@ -7770,7 +7774,7 @@ const sC = (e) => {
|
|
|
7770
7774
|
]
|
|
7771
7775
|
}
|
|
7772
7776
|
);
|
|
7773
|
-
},
|
|
7777
|
+
}, qC = ({
|
|
7774
7778
|
token: e,
|
|
7775
7779
|
onSelect: t,
|
|
7776
7780
|
isActive: n,
|
|
@@ -7799,7 +7803,7 @@ const sC = (e) => {
|
|
|
7799
7803
|
onClose: n,
|
|
7800
7804
|
isActive: r = !1
|
|
7801
7805
|
}) => {
|
|
7802
|
-
const { onClick: o, formattedBalance: a } =
|
|
7806
|
+
const { onClick: o, formattedBalance: a } = qC({
|
|
7803
7807
|
token: e,
|
|
7804
7808
|
onSelect: t,
|
|
7805
7809
|
onClose: n,
|
|
@@ -7840,8 +7844,8 @@ const sC = (e) => {
|
|
|
7840
7844
|
]
|
|
7841
7845
|
}
|
|
7842
7846
|
);
|
|
7843
|
-
},
|
|
7844
|
-
const e = A(), [t] = De(), [n, r] = $(), [o, a] = z(), { data: i } = Wi(e), l = wn(), c = i ?
|
|
7847
|
+
}, KC = [], YC = () => {
|
|
7848
|
+
const e = A(), [t] = De(), [n, r] = $(), [o, a] = z(), { data: i } = Wi(e), l = wn(), c = i ? KC : e.withdrawParams.customTokens;
|
|
7845
7849
|
return P(
|
|
7846
7850
|
() => ({
|
|
7847
7851
|
tokens: t === "deposit" ? l : c,
|
|
@@ -7858,11 +7862,11 @@ const sC = (e) => {
|
|
|
7858
7862
|
o
|
|
7859
7863
|
]
|
|
7860
7864
|
);
|
|
7861
|
-
},
|
|
7865
|
+
}, QC = ({
|
|
7862
7866
|
searchQuery: e,
|
|
7863
7867
|
type: t
|
|
7864
7868
|
}) => {
|
|
7865
|
-
const [{ isMultiAssetWithdrawalEnabled: n }] = ne(), { isCompleteWithdrawStep: r } = Ft(), o = nr(), [a] = De(), { handleReject: i } = pe({ type: t }), { address: l, chainId: c } = A(), { hasAssets: d, isReady: p } = cn({ address: l, chainId: c }), { tokens: m, updater: u, activeTokens: h } =
|
|
7869
|
+
const [{ isMultiAssetWithdrawalEnabled: n }] = ne(), { isCompleteWithdrawStep: r } = Ft(), o = nr(), [a] = De(), { handleReject: i } = pe({ type: t }), { address: l, chainId: c } = A(), { hasAssets: d, isReady: p } = cn({ address: l, chainId: c }), { tokens: m, updater: u, activeTokens: h } = YC(), g = P(
|
|
7866
7870
|
() => e ? m.filter(
|
|
7867
7871
|
({ symbol: v }) => v.toLowerCase().includes(e)
|
|
7868
7872
|
) : m,
|
|
@@ -7880,7 +7884,7 @@ const sC = (e) => {
|
|
|
7880
7884
|
onClose: i,
|
|
7881
7885
|
showMultiAssetWithdrawalOption: n && a === "withdraw" && !o && !r && p && !d
|
|
7882
7886
|
};
|
|
7883
|
-
},
|
|
7887
|
+
}, XC = ({
|
|
7884
7888
|
type: e,
|
|
7885
7889
|
searchQuery: t
|
|
7886
7890
|
}) => {
|
|
@@ -7890,7 +7894,7 @@ const sC = (e) => {
|
|
|
7890
7894
|
onSelect: a,
|
|
7891
7895
|
showMultiAssetWithdrawalOption: i,
|
|
7892
7896
|
onClose: l
|
|
7893
|
-
} =
|
|
7897
|
+
} = QC({ type: e, searchQuery: t });
|
|
7894
7898
|
return /* @__PURE__ */ w(
|
|
7895
7899
|
X.Overlay,
|
|
7896
7900
|
{
|
|
@@ -7922,7 +7926,7 @@ const sC = (e) => {
|
|
|
7922
7926
|
);
|
|
7923
7927
|
}),
|
|
7924
7928
|
i && /* @__PURE__ */ s("li", { className: "dtw-cursor-pointer dtw-rounded-xl dtw-p-0.5 even:dtw-bg-[color:var(--panel-popup-list-item-bg-even)] odd:dtw-bg-[color:var(--panel-popup-list-item-bg-odd)] dtw-group", children: /* @__PURE__ */ s(
|
|
7925
|
-
|
|
7929
|
+
jC,
|
|
7926
7930
|
{
|
|
7927
7931
|
token: Ce,
|
|
7928
7932
|
onSelect: a
|
|
@@ -7932,7 +7936,7 @@ const sC = (e) => {
|
|
|
7932
7936
|
]
|
|
7933
7937
|
}
|
|
7934
7938
|
);
|
|
7935
|
-
},
|
|
7939
|
+
}, ZC = ({
|
|
7936
7940
|
children: e,
|
|
7937
7941
|
chainId: t
|
|
7938
7942
|
}) => {
|
|
@@ -7956,7 +7960,7 @@ const sC = (e) => {
|
|
|
7956
7960
|
}, Wr = (e, t) => e.address in t ? {
|
|
7957
7961
|
balanceInUsd: t[e.address]?.balanceInUsd ?? ae({ value: 0 }),
|
|
7958
7962
|
balanceInUsdNumber: t[e.address]?.balanceInUsdNumber ?? 0
|
|
7959
|
-
} : { balanceInUsd: ae({ value: 0 }), balanceInUsdNumber: 0 },
|
|
7963
|
+
} : { balanceInUsd: ae({ value: 0 }), balanceInUsdNumber: 0 }, JC = (e) => (t, n) => Wr(n, e).balanceInUsdNumber - Wr(t, e).balanceInUsdNumber, eE = ({
|
|
7960
7964
|
searchQuery: e,
|
|
7961
7965
|
type: t
|
|
7962
7966
|
}) => {
|
|
@@ -7986,7 +7990,7 @@ const sC = (e) => {
|
|
|
7986
7990
|
isActive: o.address === h.address
|
|
7987
7991
|
})).filter(
|
|
7988
7992
|
({ symbol: h }) => e ? h.toLowerCase().includes(e) : !0
|
|
7989
|
-
).slice().sort(
|
|
7993
|
+
).slice().sort(JC(n))
|
|
7990
7994
|
]
|
|
7991
7995
|
})
|
|
7992
7996
|
),
|
|
@@ -7995,11 +7999,11 @@ const sC = (e) => {
|
|
|
7995
7999
|
onClose: a,
|
|
7996
8000
|
onSelect: p
|
|
7997
8001
|
};
|
|
7998
|
-
},
|
|
8002
|
+
}, tE = ({
|
|
7999
8003
|
type: e,
|
|
8000
8004
|
searchQuery: t
|
|
8001
8005
|
}) => {
|
|
8002
|
-
const n = x(), { poolList: r, onClose: o, onSelect: a } =
|
|
8006
|
+
const n = x(), { poolList: r, onClose: o, onSelect: a } = eE({
|
|
8003
8007
|
type: e,
|
|
8004
8008
|
searchQuery: t
|
|
8005
8009
|
});
|
|
@@ -8011,7 +8015,7 @@ const sC = (e) => {
|
|
|
8011
8015
|
className: "dtw-gap-[var(--panel-gap)]",
|
|
8012
8016
|
children: [
|
|
8013
8017
|
/* @__PURE__ */ s("span", { className: "dtw-text-center dtw-text-[length:var(--panel-font-size-sm)] dtw-font-[var(--panel-font-weight-medium)]", children: n.selectToken }),
|
|
8014
|
-
/* @__PURE__ */ s("div", { className: "dtw-grid dtw-gap-[calc(var(--panel-gap) * 0.5)] dtw-overflow-y-auto theme-scrollbar", children: r.map(({ chainId: i, configs: l }) => /* @__PURE__ */ s(
|
|
8018
|
+
/* @__PURE__ */ s("div", { className: "dtw-grid dtw-gap-[calc(var(--panel-gap) * 0.5)] dtw-overflow-y-auto theme-scrollbar", children: r.map(({ chainId: i, configs: l }) => /* @__PURE__ */ s(ZC, { chainId: i, children: l.map(({ isActive: c, symbol: d, address: p }) => /* @__PURE__ */ s(
|
|
8015
8019
|
"div",
|
|
8016
8020
|
{
|
|
8017
8021
|
className: I(
|
|
@@ -8040,7 +8044,7 @@ const sC = (e) => {
|
|
|
8040
8044
|
]
|
|
8041
8045
|
}
|
|
8042
8046
|
);
|
|
8043
|
-
},
|
|
8047
|
+
}, nE = ({ type: e }) => {
|
|
8044
8048
|
const { address: t, symbol: n, chainId: r } = A(), [{ link: o, sendTokens: a }, i] = te(), { handleReject: l } = pe({ type: e }), c = a?.[0], d = ms(o), p = Te({
|
|
8045
8049
|
address: t,
|
|
8046
8050
|
chainId: r
|
|
@@ -8059,7 +8063,7 @@ const sC = (e) => {
|
|
|
8059
8063
|
vaultTokenPrice: ae({ value: p }),
|
|
8060
8064
|
showDeriveBanner: u
|
|
8061
8065
|
};
|
|
8062
|
-
},
|
|
8066
|
+
}, rE = (e) => {
|
|
8063
8067
|
const t = x(), {
|
|
8064
8068
|
link: n,
|
|
8065
8069
|
onClose: r,
|
|
@@ -8068,7 +8072,7 @@ const sC = (e) => {
|
|
|
8068
8072
|
paidToken: i,
|
|
8069
8073
|
txHash: l,
|
|
8070
8074
|
vaultTokenPrice: c
|
|
8071
|
-
} =
|
|
8075
|
+
} = nE(e), { ActionButton: d = K, DeriveSuccessBanner: p } = W(), m = Hi();
|
|
8072
8076
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", noPadding: !0, children: [
|
|
8073
8077
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-3 dtw-pt-1 dtw-px-2 dtw-w-full", children: [
|
|
8074
8078
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-text-[color:var(--panel-success-content-color)] dtw-mb-2", children: [
|
|
@@ -8080,7 +8084,7 @@ const sC = (e) => {
|
|
|
8080
8084
|
/* @__PURE__ */ s("p", { children: t.orderingLabel }),
|
|
8081
8085
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-2 dtw-text-[color:var(--panel-secondary-content-color)]", children: [
|
|
8082
8086
|
/* @__PURE__ */ s("span", { children: a }),
|
|
8083
|
-
/* @__PURE__ */ s(
|
|
8087
|
+
/* @__PURE__ */ s($C, {})
|
|
8084
8088
|
] })
|
|
8085
8089
|
] }),
|
|
8086
8090
|
/* @__PURE__ */ s(et, {}),
|
|
@@ -8116,7 +8120,7 @@ const sC = (e) => {
|
|
|
8116
8120
|
/* @__PURE__ */ s(d, { highlighted: !1, onClick: r, children: t.done })
|
|
8117
8121
|
] })
|
|
8118
8122
|
] });
|
|
8119
|
-
},
|
|
8123
|
+
}, oE = () => {
|
|
8120
8124
|
const e = x(), { LogoSpinner: t = Re } = W(), [{ link: n }] = te();
|
|
8121
8125
|
return /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-2 dtw-pt-1 dtw-px-4 dtw-w-full dtw-h-full md:dtw-w-1/2 md:dtw-h-1/2", children: [
|
|
8122
8126
|
/* @__PURE__ */ s(t, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
@@ -8131,7 +8135,7 @@ const sC = (e) => {
|
|
|
8131
8135
|
}
|
|
8132
8136
|
)
|
|
8133
8137
|
] });
|
|
8134
|
-
},
|
|
8138
|
+
}, aE = ({
|
|
8135
8139
|
onClose: e
|
|
8136
8140
|
}) => {
|
|
8137
8141
|
const t = x(), { ActionButton: n = K } = W(), [{ link: r }] = te();
|
|
@@ -8156,23 +8160,23 @@ const sC = (e) => {
|
|
|
8156
8160
|
/* @__PURE__ */ s(n, { highlighted: !1, onClick: e, children: t.done })
|
|
8157
8161
|
] })
|
|
8158
8162
|
] });
|
|
8159
|
-
},
|
|
8163
|
+
}, sE = ({ type: e }) => {
|
|
8160
8164
|
const [{ status: t }, n] = te(), { handleReject: r } = pe({ type: e }), o = t === "Mining";
|
|
8161
8165
|
return { onClose: b(() => {
|
|
8162
8166
|
n({ isOpen: !1 }), r();
|
|
8163
8167
|
}, [r, n]), isProcessing: o };
|
|
8164
|
-
},
|
|
8165
|
-
const { onClose: t, isProcessing: n } =
|
|
8168
|
+
}, iE = (e) => {
|
|
8169
|
+
const { onClose: t, isProcessing: n } = sE(e);
|
|
8166
8170
|
return /* @__PURE__ */ s(
|
|
8167
8171
|
X.Overlay,
|
|
8168
8172
|
{
|
|
8169
8173
|
className: "dtw-justify-between dtw-gap-y-4",
|
|
8170
8174
|
onClose: t,
|
|
8171
8175
|
noPadding: !0,
|
|
8172
|
-
children: n ? /* @__PURE__ */ s(
|
|
8176
|
+
children: n ? /* @__PURE__ */ s(oE, {}) : /* @__PURE__ */ s(aE, { onClose: t })
|
|
8173
8177
|
}
|
|
8174
8178
|
);
|
|
8175
|
-
},
|
|
8179
|
+
}, lE = ({ type: e }) => {
|
|
8176
8180
|
const { statusLabel: t, status: n } = Zi(), [{ link: r, action: o }, a] = te(), i = n == "Success", { handleReject: l } = pe({ type: e }), c = o === "single_withdraw" && i, d = i && o === "deposit", p = i && o && Os.includes(o);
|
|
8177
8181
|
return {
|
|
8178
8182
|
title: t ?? n,
|
|
@@ -8187,14 +8191,14 @@ const sC = (e) => {
|
|
|
8187
8191
|
displayLimitOrderTransactionOverlay: o === "create_limit_sell_order",
|
|
8188
8192
|
displayWithdrawLimitOrderOverlay: o === "limit_order_withdraw"
|
|
8189
8193
|
};
|
|
8190
|
-
},
|
|
8194
|
+
}, cE = ({ sendTokens: e }) => {
|
|
8191
8195
|
const t = x(), [n] = e ?? [];
|
|
8192
8196
|
return n ? /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1 dtw-flex-wrap dtw-overflow-hidden", children: [
|
|
8193
8197
|
/* @__PURE__ */ s("span", { children: t.approveSpending }),
|
|
8194
8198
|
/* @__PURE__ */ s(ke, { size: "sm", symbols: [n.symbol] }),
|
|
8195
8199
|
/* @__PURE__ */ s("span", { children: n.symbol })
|
|
8196
8200
|
] }) : null;
|
|
8197
|
-
},
|
|
8201
|
+
}, dE = ({ receiveTokens: e }) => {
|
|
8198
8202
|
const t = x(), [n] = e ?? [];
|
|
8199
8203
|
return n ? /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-wrap dtw-items-center dtw-gap-1", children: [
|
|
8200
8204
|
t.swapAndClaimTo,
|
|
@@ -8205,7 +8209,7 @@ const sC = (e) => {
|
|
|
8205
8209
|
n.symbol
|
|
8206
8210
|
] })
|
|
8207
8211
|
] }) : null;
|
|
8208
|
-
},
|
|
8212
|
+
}, pE = ({ sendTokens: e, receiveTokens: t, action: n }) => {
|
|
8209
8213
|
const r = x(), [o] = e ?? [], [a] = t ?? [];
|
|
8210
8214
|
return o ? /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-wrap dtw-items-center dtw-gap-x-1", children: [
|
|
8211
8215
|
n === "deposit" ? r.pay : n === "multi_withdraw" ? r.sell : r.unrollAction,
|
|
@@ -8222,26 +8226,26 @@ const sC = (e) => {
|
|
|
8222
8226
|
a.symbol
|
|
8223
8227
|
] }) : /* @__PURE__ */ s(R, { children: n === "multi_withdraw" ? r.multiAssetFractions : r.swappableAssets }) })
|
|
8224
8228
|
] }) : null;
|
|
8225
|
-
},
|
|
8229
|
+
}, uE = () => {
|
|
8226
8230
|
const e = x(), [{ action: t, receiveTokens: n, sendTokens: r }] = te();
|
|
8227
|
-
return t === "approve" ? /* @__PURE__ */ s(
|
|
8231
|
+
return t === "approve" ? /* @__PURE__ */ s(cE, { sendTokens: r }) : t === "swap" ? /* @__PURE__ */ s(dE, { receiveTokens: n }) : t === "claim" ? /* @__PURE__ */ s(R, { children: e.claimLabel }) : t === "create_limit_sell_order" ? /* @__PURE__ */ s(R, { children: e.createLimitSellOrder }) : t === "delete_limit_order_withdraw" ? /* @__PURE__ */ s(R, { children: e.deleteWithdrawalRequest }) : t === "update_ondo_prices" ? /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-1", children: [
|
|
8228
8232
|
/* @__PURE__ */ s("span", { children: e.updateOndoPricesStep }),
|
|
8229
8233
|
/* @__PURE__ */ s("span", { className: "dtw-text-xs dtw-text-[color:var(--panel-secondary-content-color)]", children: e.updateOndoPricesHint })
|
|
8230
8234
|
] }) : /* @__PURE__ */ s(
|
|
8231
|
-
|
|
8235
|
+
pE,
|
|
8232
8236
|
{
|
|
8233
8237
|
action: t,
|
|
8234
8238
|
sendTokens: r,
|
|
8235
8239
|
receiveTokens: n
|
|
8236
8240
|
}
|
|
8237
8241
|
);
|
|
8238
|
-
},
|
|
8242
|
+
}, mE = ({ type: e }) => {
|
|
8239
8243
|
const [, t] = te(), { handleReject: n } = pe({ type: e }), [{ link: r, status: o }] = te(), a = o == "Success";
|
|
8240
8244
|
return { onClose: b(() => {
|
|
8241
8245
|
t({ isOpen: !1 }), n();
|
|
8242
8246
|
}, [n, t]), link: r, isSuccessTx: a };
|
|
8243
|
-
},
|
|
8244
|
-
const t = x(), { ActionButton: n = K } = W(), { onClose: r, link: o, isSuccessTx: a } =
|
|
8247
|
+
}, wE = (e) => {
|
|
8248
|
+
const t = x(), { ActionButton: n = K } = W(), { onClose: r, link: o, isSuccessTx: a } = mE(e);
|
|
8245
8249
|
return a ? /* @__PURE__ */ w(
|
|
8246
8250
|
X.Overlay,
|
|
8247
8251
|
{
|
|
@@ -8267,7 +8271,7 @@ const sC = (e) => {
|
|
|
8267
8271
|
]
|
|
8268
8272
|
}
|
|
8269
8273
|
) : null;
|
|
8270
|
-
},
|
|
8274
|
+
}, hE = ({ type: e }) => {
|
|
8271
8275
|
const { address: t, symbol: n } = A(), [{ link: r }, o] = te(), { handleReject: a } = pe({ type: e }), [i] = Gn(), l = ms(r);
|
|
8272
8276
|
return {
|
|
8273
8277
|
onClose: b(() => {
|
|
@@ -8280,8 +8284,8 @@ const sC = (e) => {
|
|
|
8280
8284
|
vaultSymbol: i?.sendToken?.symbol || n,
|
|
8281
8285
|
txHash: l
|
|
8282
8286
|
};
|
|
8283
|
-
},
|
|
8284
|
-
const t = x(), { link: n, onClose: r, vaultSymbol: o, vaultAmount: a, receiveTokens: i, txHash: l } =
|
|
8287
|
+
}, gE = (e) => {
|
|
8288
|
+
const t = x(), { link: n, onClose: r, vaultSymbol: o, vaultAmount: a, receiveTokens: i, txHash: l } = hE(e), { ActionButton: c = K } = W();
|
|
8285
8289
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", noPadding: !0, children: [
|
|
8286
8290
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-3 dtw-pt-1 dtw-px-2 dtw-w-full", children: [
|
|
8287
8291
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-text-[color:var(--panel-success-content-color)] dtw-mb-2", children: [
|
|
@@ -8317,7 +8321,7 @@ const sC = (e) => {
|
|
|
8317
8321
|
] }),
|
|
8318
8322
|
/* @__PURE__ */ s(c, { highlighted: !1, onClick: r, children: t.done })
|
|
8319
8323
|
] });
|
|
8320
|
-
},
|
|
8324
|
+
}, fE = ({ type: e }) => {
|
|
8321
8325
|
const {
|
|
8322
8326
|
link: t,
|
|
8323
8327
|
title: n,
|
|
@@ -8328,13 +8332,13 @@ const sC = (e) => {
|
|
|
8328
8332
|
displaySuccessWithdrawalOverlay: l,
|
|
8329
8333
|
displayLimitOrderTransactionOverlay: c,
|
|
8330
8334
|
displayWithdrawLimitOrderOverlay: d
|
|
8331
|
-
} =
|
|
8332
|
-
return c ? /* @__PURE__ */ s(
|
|
8335
|
+
} = lE({ type: e }), { LogoSpinner: p = Re } = W(), m = x();
|
|
8336
|
+
return c ? /* @__PURE__ */ s(iE, { type: e }) : i ? /* @__PURE__ */ s(rE, { type: e }) : l ? /* @__PURE__ */ s(gE, { type: e }) : d ? /* @__PURE__ */ s(wE, { type: e }) : /* @__PURE__ */ w(X.Notification, { onClose: r, children: [
|
|
8333
8337
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1.5", children: [
|
|
8334
8338
|
/* @__PURE__ */ s("span", { className: "dtw-font-semibold dtw-drop-shadow-md", children: n }),
|
|
8335
8339
|
o ? /* @__PURE__ */ s(es, { className: "dtw-h-6 dtw-w-6 dtw-text-[color:var(--panel-success-content-color)]" }) : /* @__PURE__ */ s(p, { className: "dtw-h-5 dtw-w-5 " })
|
|
8336
8340
|
] }),
|
|
8337
|
-
/* @__PURE__ */ s("div", { className: "dtw-font-light dtw-text-sm dtw-max-h-16 dtw-overflow-y-auto theme-scrollbar dtw-break-all", children: /* @__PURE__ */ s(
|
|
8341
|
+
/* @__PURE__ */ s("div", { className: "dtw-font-light dtw-text-sm dtw-max-h-16 dtw-overflow-y-auto theme-scrollbar dtw-break-all", children: /* @__PURE__ */ s(uE, {}) }),
|
|
8338
8342
|
t && /* @__PURE__ */ s(
|
|
8339
8343
|
lt,
|
|
8340
8344
|
{
|
|
@@ -8424,7 +8428,7 @@ const sC = (e) => {
|
|
|
8424
8428
|
return { handleClick: () => {
|
|
8425
8429
|
o(e), a(), t(), r?.();
|
|
8426
8430
|
}, disabled: !n };
|
|
8427
|
-
},
|
|
8431
|
+
}, vE = (e) => {
|
|
8428
8432
|
const { refetch: t, isFetched: n } = mn();
|
|
8429
8433
|
return kl({
|
|
8430
8434
|
triggerType: "deposit",
|
|
@@ -8435,8 +8439,8 @@ const sC = (e) => {
|
|
|
8435
8439
|
}, Ll = ({ handleClick: e, disabled: t }) => {
|
|
8436
8440
|
const n = x(), { ActionButton: r = K } = W();
|
|
8437
8441
|
return /* @__PURE__ */ s(r, { onClick: e, disabled: t, highlighted: !0, children: n.tryAgain });
|
|
8438
|
-
},
|
|
8439
|
-
const { handleClick: t, disabled: n } =
|
|
8442
|
+
}, bE = ({ onClose: e }) => {
|
|
8443
|
+
const { handleClick: t, disabled: n } = vE(e);
|
|
8440
8444
|
return /* @__PURE__ */ s(
|
|
8441
8445
|
Ll,
|
|
8442
8446
|
{
|
|
@@ -8444,7 +8448,7 @@ const sC = (e) => {
|
|
|
8444
8448
|
disabled: n
|
|
8445
8449
|
}
|
|
8446
8450
|
);
|
|
8447
|
-
},
|
|
8451
|
+
}, yE = ({
|
|
8448
8452
|
error: e,
|
|
8449
8453
|
onCancel: t
|
|
8450
8454
|
}) => {
|
|
@@ -8466,14 +8470,14 @@ const sC = (e) => {
|
|
|
8466
8470
|
e.hint && /* @__PURE__ */ s("p", { className: "dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)]", children: e.hint })
|
|
8467
8471
|
] })
|
|
8468
8472
|
] }),
|
|
8469
|
-
/* @__PURE__ */ s(
|
|
8473
|
+
/* @__PURE__ */ s(bE, { onClose: t })
|
|
8470
8474
|
] });
|
|
8471
|
-
},
|
|
8475
|
+
}, TE = rt.filter(
|
|
8472
8476
|
({ type: e }) => e === "error"
|
|
8473
|
-
).map(({ name: e }) => e),
|
|
8477
|
+
).map(({ name: e }) => e), AE = ({ type: e }) => {
|
|
8474
8478
|
const { handleReject: t, meta: n } = pe({ type: e }), { isCompleteWithdrawStep: r } = Ft(), o = st(), a = r && !o, i = n?.error ?? "", l = i === Es || i === Ns || i.includes(jd), c = ws({
|
|
8475
8479
|
errorMessage: n?.error,
|
|
8476
|
-
abiErrors:
|
|
8480
|
+
abiErrors: TE
|
|
8477
8481
|
});
|
|
8478
8482
|
return {
|
|
8479
8483
|
handleReject: t,
|
|
@@ -8482,7 +8486,7 @@ const sC = (e) => {
|
|
|
8482
8486
|
isDepositSwapError: o && l,
|
|
8483
8487
|
isWithdrawSwapError: a && l
|
|
8484
8488
|
};
|
|
8485
|
-
},
|
|
8489
|
+
}, SE = (e) => {
|
|
8486
8490
|
const { refetch: t, isFetched: n } = ut();
|
|
8487
8491
|
return kl({
|
|
8488
8492
|
triggerType: "withdraw",
|
|
@@ -8490,8 +8494,8 @@ const sC = (e) => {
|
|
|
8490
8494
|
isFetched: n,
|
|
8491
8495
|
onClose: e
|
|
8492
8496
|
});
|
|
8493
|
-
},
|
|
8494
|
-
const { handleClick: t, disabled: n } =
|
|
8497
|
+
}, xE = ({ onClose: e }) => {
|
|
8498
|
+
const { handleClick: t, disabled: n } = SE(e);
|
|
8495
8499
|
return /* @__PURE__ */ s(
|
|
8496
8500
|
Ll,
|
|
8497
8501
|
{
|
|
@@ -8499,7 +8503,7 @@ const sC = (e) => {
|
|
|
8499
8503
|
disabled: n
|
|
8500
8504
|
}
|
|
8501
8505
|
);
|
|
8502
|
-
}, La = !0,
|
|
8506
|
+
}, La = !0, CE = (e) => {
|
|
8503
8507
|
const { isWrongNetwork: t } = El(), n = Gn()[1], { data: r = [] } = me(), o = yl({ isClaim: La }), {
|
|
8504
8508
|
disabled: a,
|
|
8505
8509
|
label: i,
|
|
@@ -8521,7 +8525,7 @@ const sC = (e) => {
|
|
|
8521
8525
|
className: t,
|
|
8522
8526
|
onClick: n
|
|
8523
8527
|
}) => {
|
|
8524
|
-
const { ActionButton: r = K } = W(), { handleTrade: o, disabled: a, label: i, isWrongNetwork: l, isLoading: c } =
|
|
8528
|
+
const { ActionButton: r = K } = W(), { handleTrade: o, disabled: a, label: i, isWrongNetwork: l, isLoading: c } = CE(n);
|
|
8525
8529
|
return l ? null : /* @__PURE__ */ s(
|
|
8526
8530
|
r,
|
|
8527
8531
|
{
|
|
@@ -8533,11 +8537,11 @@ const sC = (e) => {
|
|
|
8533
8537
|
children: i
|
|
8534
8538
|
}
|
|
8535
8539
|
);
|
|
8536
|
-
},
|
|
8540
|
+
}, EE = (e) => e.length <= 1 ? e[0] ?? "" : [...e.slice(0, -1), `and ${e[e.length - 1]}`].join(
|
|
8537
8541
|
e.length === 2 ? " " : ", "
|
|
8538
|
-
),
|
|
8542
|
+
), IE = ({ error: e, onCancel: t, isSwapError: n = !1 }) => {
|
|
8539
8543
|
const r = x(), { ActionButton: o = K } = W(), [a, i] = U(!1), { data: l = [] } = me(), c = P(() => {
|
|
8540
|
-
const d = l.map(({ symbol: m }) => m), p =
|
|
8544
|
+
const d = l.map(({ symbol: m }) => m), p = EE(d);
|
|
8541
8545
|
return r.skipSwapAndClaimSymbols.replace("{symbols}", p);
|
|
8542
8546
|
}, [l, r.skipSwapAndClaimSymbols]);
|
|
8543
8547
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", children: [
|
|
@@ -8567,34 +8571,34 @@ const sC = (e) => {
|
|
|
8567
8571
|
}
|
|
8568
8572
|
) })
|
|
8569
8573
|
] }),
|
|
8570
|
-
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-w-full", children: n && !a ? /* @__PURE__ */ s(
|
|
8574
|
+
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-w-full", children: n && !a ? /* @__PURE__ */ s(xE, { onClose: t }) : /* @__PURE__ */ s(Rl, { onClick: t, highlighted: !0 }) })
|
|
8571
8575
|
] });
|
|
8572
|
-
},
|
|
8576
|
+
}, NE = (e) => {
|
|
8573
8577
|
const {
|
|
8574
8578
|
handleReject: t,
|
|
8575
8579
|
error: n,
|
|
8576
8580
|
showCompleteWithdrawErrorOverlay: r,
|
|
8577
8581
|
isDepositSwapError: o,
|
|
8578
8582
|
isWithdrawSwapError: a
|
|
8579
|
-
} =
|
|
8583
|
+
} = AE(e);
|
|
8580
8584
|
return n ? r ? /* @__PURE__ */ s(
|
|
8581
|
-
|
|
8585
|
+
IE,
|
|
8582
8586
|
{
|
|
8583
8587
|
error: n,
|
|
8584
8588
|
onCancel: t,
|
|
8585
8589
|
isSwapError: a
|
|
8586
8590
|
}
|
|
8587
|
-
) : o ? /* @__PURE__ */ s(
|
|
8591
|
+
) : o ? /* @__PURE__ */ s(yE, { error: n, onCancel: t }) : /* @__PURE__ */ w(X.Notification, { onClose: t, children: [
|
|
8588
8592
|
/* @__PURE__ */ s("p", { className: "dtw-text-sm", children: n.title }),
|
|
8589
8593
|
n.hint && /* @__PURE__ */ s("p", { className: "dtw-text-xs", children: n.hint })
|
|
8590
8594
|
] }) : null;
|
|
8591
|
-
},
|
|
8595
|
+
}, OE = [
|
|
8592
8596
|
"dtw-bg-transparent",
|
|
8593
8597
|
"dtw-border-[var(--limit-order-action-outline-button-border-color,var(--limit-order-border-color))]",
|
|
8594
8598
|
"!dtw-text-[color:var(--limit-order-action-outline-button-color,var(--limit-order-content-color))]",
|
|
8595
8599
|
"active:dtw-border-opacity-100",
|
|
8596
8600
|
"hover:enabled:dtw-border-[var(--limit-order-action-outline-button-border-hover-color)]"
|
|
8597
|
-
],
|
|
8601
|
+
], _E = [
|
|
8598
8602
|
"!dtw-text-[color:var(--limit-order-action-accent-button-color,var(--limit-order-accent-content-color))]",
|
|
8599
8603
|
"dtw-bg-gradient-to-r",
|
|
8600
8604
|
"dtw-from-[var(--limit-order-action-accent-button-bg-from,var(--limit-order-accent-from-color))]",
|
|
@@ -8626,8 +8630,8 @@ const sC = (e) => {
|
|
|
8626
8630
|
"dtw-px-5",
|
|
8627
8631
|
"dtw-w-full",
|
|
8628
8632
|
{
|
|
8629
|
-
[
|
|
8630
|
-
[
|
|
8633
|
+
[_E.join(" ")]: n,
|
|
8634
|
+
[OE.join(" ")]: !n,
|
|
8631
8635
|
"dtw-flex dtw-items-center dtw-justify-center dtw-gap-1": i
|
|
8632
8636
|
},
|
|
8633
8637
|
o
|
|
@@ -8640,7 +8644,7 @@ const sC = (e) => {
|
|
|
8640
8644
|
e
|
|
8641
8645
|
]
|
|
8642
8646
|
}
|
|
8643
|
-
),
|
|
8647
|
+
), PE = (e) => {
|
|
8644
8648
|
const { chainId: t, switchNetwork: n } = it(), r = b(() => {
|
|
8645
8649
|
n?.({ chainId: e });
|
|
8646
8650
|
}, [n, e]);
|
|
@@ -8649,7 +8653,7 @@ const sC = (e) => {
|
|
|
8649
8653
|
handleNetworkSwitch: r
|
|
8650
8654
|
};
|
|
8651
8655
|
}, $l = ({ vaultChainId: e, switchNetworkLabel: t, children: n }) => {
|
|
8652
|
-
const { isWrongNetwork: r, handleNetworkSwitch: o } =
|
|
8656
|
+
const { isWrongNetwork: r, handleNetworkSwitch: o } = PE(e);
|
|
8653
8657
|
return r ? /* @__PURE__ */ s(Oe, { onClick: o, children: t }) : n;
|
|
8654
8658
|
}, Bl = {
|
|
8655
8659
|
switchNetwork: "Switch Network",
|
|
@@ -8702,7 +8706,7 @@ const sC = (e) => {
|
|
|
8702
8706
|
/* @__PURE__ */ s("span", { className: "dtw-text-[length:var(--limit-order-font-size)]", children: n.currentPrice.replace("{symbol}", e) }),
|
|
8703
8707
|
/* @__PURE__ */ s("span", { className: "dtw-font-[var(--limit-order-font-weight-bold)] dtw-text-[length:var(--limit-order-font-size)]", children: t })
|
|
8704
8708
|
] });
|
|
8705
|
-
},
|
|
8709
|
+
}, DE = 100, kE = 3, LE = ({
|
|
8706
8710
|
inputValue: e = "",
|
|
8707
8711
|
onInputChange: t,
|
|
8708
8712
|
autoFocus: n = !1
|
|
@@ -8717,13 +8721,13 @@ const sC = (e) => {
|
|
|
8717
8721
|
},
|
|
8718
8722
|
onInputChange: (c) => {
|
|
8719
8723
|
const d = c.target.value.replace(/[^0-9]/g, "");
|
|
8720
|
-
if (d.length >
|
|
8724
|
+
if (d.length > kE) return;
|
|
8721
8725
|
const p = Number(d);
|
|
8722
|
-
!isNaN(p) && p <=
|
|
8726
|
+
!isNaN(p) && p <= DE && (o(d), t?.(d));
|
|
8723
8727
|
}
|
|
8724
8728
|
};
|
|
8725
|
-
},
|
|
8726
|
-
const { disabled: t, placeholder: n, suffix: r = "%", postfix: o } = e, { inputRef: a, autoFocus: i, value: l, onContainerClick: c, onInputChange: d } =
|
|
8729
|
+
}, RE = (e) => {
|
|
8730
|
+
const { disabled: t, placeholder: n, suffix: r = "%", postfix: o } = e, { inputRef: a, autoFocus: i, value: l, onContainerClick: c, onInputChange: d } = LE(e);
|
|
8727
8731
|
return /* @__PURE__ */ s(
|
|
8728
8732
|
"div",
|
|
8729
8733
|
{
|
|
@@ -8749,12 +8753,12 @@ const sC = (e) => {
|
|
|
8749
8753
|
] })
|
|
8750
8754
|
}
|
|
8751
8755
|
);
|
|
8752
|
-
},
|
|
8756
|
+
}, $E = 7, Ur = 4, Ra = (e) => {
|
|
8753
8757
|
if (!e)
|
|
8754
8758
|
return "";
|
|
8755
8759
|
const [t = "", n] = e.replace(/,/g, "").split("."), r = n && n.length > Ur ? n.slice(0, Ur) : n, o = t.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
8756
8760
|
return r !== void 0 ? `${o}.${r}` : o;
|
|
8757
|
-
},
|
|
8761
|
+
}, BE = ({
|
|
8758
8762
|
inputValue: e = "",
|
|
8759
8763
|
onInputChange: t,
|
|
8760
8764
|
autoFocus: n = !1
|
|
@@ -8769,11 +8773,11 @@ const sC = (e) => {
|
|
|
8769
8773
|
},
|
|
8770
8774
|
onInputChange: (c) => {
|
|
8771
8775
|
const d = c.target.value.replace(/[^\d.]/g, "").replace(/(\..*)\./g, "$1"), [p = "", m = ""] = d.split(".");
|
|
8772
|
-
t && p.length <=
|
|
8776
|
+
t && p.length <= $E && m.length <= Ur && /^\d*(\.\d*)?$/.test(d) && (o(Ra(d)), t(d));
|
|
8773
8777
|
}
|
|
8774
8778
|
};
|
|
8775
8779
|
}, Ln = (e) => {
|
|
8776
|
-
const { disabled: t, placeholder: n, percentage: r, suffix: o } = e, { inputRef: a, autoFocus: i, value: l, onContainerClick: c, onInputChange: d } =
|
|
8780
|
+
const { disabled: t, placeholder: n, percentage: r, suffix: o } = e, { inputRef: a, autoFocus: i, value: l, onContainerClick: c, onInputChange: d } = BE(e);
|
|
8777
8781
|
return /* @__PURE__ */ s(
|
|
8778
8782
|
"div",
|
|
8779
8783
|
{
|
|
@@ -8825,7 +8829,7 @@ const sC = (e) => {
|
|
|
8825
8829
|
lowerLimitPrice: "",
|
|
8826
8830
|
sellPercentage: "",
|
|
8827
8831
|
termsAccepted: !1
|
|
8828
|
-
},
|
|
8832
|
+
}, ME = (e, t) => {
|
|
8829
8833
|
switch (t.type) {
|
|
8830
8834
|
case "SET_UPPER_LIMIT_PRICE":
|
|
8831
8835
|
return {
|
|
@@ -8904,7 +8908,7 @@ const zl = (e) => ({
|
|
|
8904
8908
|
onLog: Ge
|
|
8905
8909
|
}), Vl = ({ children: e, initialState: t, actions: n }) => {
|
|
8906
8910
|
const [r, o] = Rn(
|
|
8907
|
-
|
|
8911
|
+
ME,
|
|
8908
8912
|
zl(t)
|
|
8909
8913
|
), a = b((h) => {
|
|
8910
8914
|
o({ type: "SET_UPPER_LIMIT_PRICE", payload: h });
|
|
@@ -8980,7 +8984,7 @@ const zl = (e) => ({
|
|
|
8980
8984
|
symbol: o.symbol
|
|
8981
8985
|
};
|
|
8982
8986
|
}, [o, r]);
|
|
8983
|
-
},
|
|
8987
|
+
}, FE = ({
|
|
8984
8988
|
userAddress: e,
|
|
8985
8989
|
vaultAddress: t
|
|
8986
8990
|
}) => {
|
|
@@ -8989,19 +8993,19 @@ const zl = (e) => ({
|
|
|
8989
8993
|
[e, t]
|
|
8990
8994
|
);
|
|
8991
8995
|
return dp(n);
|
|
8992
|
-
},
|
|
8996
|
+
}, WE = ({
|
|
8993
8997
|
price: e,
|
|
8994
8998
|
markPrice: t
|
|
8995
|
-
}) => new D(e).gt(t) ? `+${jr((+e / +t - 1) * 100, 2)}` : "",
|
|
8999
|
+
}) => new D(e).gt(t) ? `+${jr((+e / +t - 1) * 100, 2)}` : "", UE = ({
|
|
8996
9000
|
price: e,
|
|
8997
9001
|
markPrice: t
|
|
8998
|
-
}) => new D(e).lt(t) ? `-${jr((1 - +e / +t) * 100, 2)}` : "",
|
|
9002
|
+
}) => new D(e).lt(t) ? `-${jr((1 - +e / +t) * 100, 2)}` : "", zE = ({
|
|
8999
9003
|
error: e,
|
|
9000
9004
|
translationMap: t
|
|
9001
9005
|
}) => e ? e.title === qd ? {
|
|
9002
9006
|
...e,
|
|
9003
9007
|
hint: t.invalidLimitOrderPriceError
|
|
9004
|
-
} : e : null,
|
|
9008
|
+
} : e : null, GE = () => {
|
|
9005
9009
|
const e = Fe(), {
|
|
9006
9010
|
form: { upperLimitPrice: t, lowerLimitPrice: n, sellPercentage: r },
|
|
9007
9011
|
pricingAsset: o,
|
|
@@ -9010,10 +9014,10 @@ const zl = (e) => ({
|
|
|
9010
9014
|
address: o.address,
|
|
9011
9015
|
chainId: a,
|
|
9012
9016
|
refetchInterval: Le
|
|
9013
|
-
}), p = Number(d) < Ly ? Ry : $y, { formatted: m, symbol: u } = pr(), h =
|
|
9017
|
+
}), p = Number(d) < Ly ? Ry : $y, { formatted: m, symbol: u } = pr(), h = WE({
|
|
9014
9018
|
price: t,
|
|
9015
9019
|
markPrice: d
|
|
9016
|
-
}), g =
|
|
9020
|
+
}), g = UE({
|
|
9017
9021
|
price: n,
|
|
9018
9022
|
markPrice: d
|
|
9019
9023
|
}), f = b(() => {
|
|
@@ -9044,7 +9048,7 @@ const zl = (e) => ({
|
|
|
9044
9048
|
coveredVaultAmount: m,
|
|
9045
9049
|
vaultSymbol: u
|
|
9046
9050
|
};
|
|
9047
|
-
},
|
|
9051
|
+
}, HE = () => {
|
|
9048
9052
|
const e = Fe(), {
|
|
9049
9053
|
upperLimitPrice: t,
|
|
9050
9054
|
lowerLimitPrice: n,
|
|
@@ -9062,7 +9066,7 @@ const zl = (e) => ({
|
|
|
9062
9066
|
onDisableSellPercentage: g,
|
|
9063
9067
|
coveredVaultAmount: f,
|
|
9064
9068
|
vaultSymbol: v
|
|
9065
|
-
} =
|
|
9069
|
+
} = GE();
|
|
9066
9070
|
return /* @__PURE__ */ s(R, { children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--limit-order-input-group-gap,var(--limit-order-gap))] dtw-px-[var(--limit-order-group-px)]", children: [
|
|
9067
9071
|
/* @__PURE__ */ s(
|
|
9068
9072
|
Wl,
|
|
@@ -9117,7 +9121,7 @@ const zl = (e) => ({
|
|
|
9117
9121
|
defaultEnabled: !!u,
|
|
9118
9122
|
onDisable: g,
|
|
9119
9123
|
children: /* @__PURE__ */ s(
|
|
9120
|
-
|
|
9124
|
+
RE,
|
|
9121
9125
|
{
|
|
9122
9126
|
inputValue: u,
|
|
9123
9127
|
onInputChange: h,
|
|
@@ -9132,7 +9136,7 @@ const zl = (e) => ({
|
|
|
9132
9136
|
}
|
|
9133
9137
|
)
|
|
9134
9138
|
] }) });
|
|
9135
|
-
},
|
|
9139
|
+
}, VE = () => {
|
|
9136
9140
|
const { account: e = O } = B(), { vaultAddress: t, vaultChainId: n } = Se(), r = Q("limitOrder", n), o = pr(), { data: a } = an({
|
|
9137
9141
|
tokenAddress: t,
|
|
9138
9142
|
ownerAddress: e,
|
|
@@ -9141,7 +9145,7 @@ const zl = (e) => ({
|
|
|
9141
9145
|
skip: F(r)
|
|
9142
9146
|
});
|
|
9143
9147
|
return a ? new D(o.raw).lte(a.toString()) : !1;
|
|
9144
|
-
},
|
|
9148
|
+
}, jE = () => {
|
|
9145
9149
|
const { vaultAddress: e, vaultChainId: t } = Se(), { setPendingTransaction: n } = Wt(), [r, o] = U(!1), a = Q("limitOrder", t), { send: i } = ye({
|
|
9146
9150
|
contractId: "erc20",
|
|
9147
9151
|
dynamicContractAddress: e,
|
|
@@ -9159,7 +9163,7 @@ const zl = (e) => ({
|
|
|
9159
9163
|
}, jl = ({
|
|
9160
9164
|
createLimitOrder: e
|
|
9161
9165
|
}) => {
|
|
9162
|
-
const [t, n] = U("idle"), [r, o] = U(void 0), a = ue(!1), i =
|
|
9166
|
+
const [t, n] = U("idle"), [r, o] = U(void 0), a = ue(!1), i = VE(), { approveLimitOrder: l, isApproving: c } = jE(), { vaultChainId: d, pendingTransaction: p } = Se(), { data: m } = ot({
|
|
9163
9167
|
hash: r,
|
|
9164
9168
|
pollingInterval: Tt,
|
|
9165
9169
|
query: {
|
|
@@ -9230,7 +9234,7 @@ const zl = (e) => ({
|
|
|
9230
9234
|
n
|
|
9231
9235
|
]
|
|
9232
9236
|
);
|
|
9233
|
-
},
|
|
9237
|
+
}, qE = ([
|
|
9234
9238
|
e,
|
|
9235
9239
|
t,
|
|
9236
9240
|
n,
|
|
@@ -9246,7 +9250,7 @@ const zl = (e) => ({
|
|
|
9246
9250
|
user: r,
|
|
9247
9251
|
vault: o,
|
|
9248
9252
|
pricingAsset: a
|
|
9249
|
-
},
|
|
9253
|
+
}, KE = (e) => {
|
|
9250
9254
|
const t = e.state.data;
|
|
9251
9255
|
if (!t)
|
|
9252
9256
|
return !1;
|
|
@@ -9263,16 +9267,16 @@ const zl = (e) => ({
|
|
|
9263
9267
|
abi: Ps,
|
|
9264
9268
|
chainId: e,
|
|
9265
9269
|
functionName: go,
|
|
9266
|
-
args: [
|
|
9270
|
+
args: [FE({ userAddress: t, vaultAddress: n })],
|
|
9267
9271
|
query: {
|
|
9268
9272
|
enabled: !F(r) && !F(t) && !F(n),
|
|
9269
|
-
select:
|
|
9270
|
-
refetchInterval:
|
|
9273
|
+
select: qE,
|
|
9274
|
+
refetchInterval: KE
|
|
9271
9275
|
}
|
|
9272
9276
|
});
|
|
9273
|
-
},
|
|
9277
|
+
}, YE = Ps.filter(
|
|
9274
9278
|
({ type: e }) => e === "error"
|
|
9275
|
-
).map(({ name: e }) => e),
|
|
9279
|
+
).map(({ name: e }) => e), QE = "create", Kl = () => {
|
|
9276
9280
|
const { account: e = O } = B(), {
|
|
9277
9281
|
vaultAddress: t,
|
|
9278
9282
|
vaultChainId: n,
|
|
@@ -9282,7 +9286,7 @@ const zl = (e) => ({
|
|
|
9282
9286
|
userAddress: e,
|
|
9283
9287
|
vaultAddress: t,
|
|
9284
9288
|
chainId: n
|
|
9285
|
-
}), [c, d] = U(null), p = ql(
|
|
9289
|
+
}), [c, d] = U(null), p = ql(QE), m = !!l, { send: u } = ye({
|
|
9286
9290
|
onSettled: p,
|
|
9287
9291
|
contractId: "limitOrder",
|
|
9288
9292
|
functionName: m ? "modifyLimitOrder" : "createLimitOrder"
|
|
@@ -9310,14 +9314,14 @@ const zl = (e) => ({
|
|
|
9310
9314
|
u
|
|
9311
9315
|
]), g = ws({
|
|
9312
9316
|
errorMessage: c,
|
|
9313
|
-
abiErrors:
|
|
9317
|
+
abiErrors: YE
|
|
9314
9318
|
});
|
|
9315
9319
|
return {
|
|
9316
9320
|
createLimitOrder: h,
|
|
9317
9321
|
isModifyTransaction: m,
|
|
9318
9322
|
error: g ?? null
|
|
9319
9323
|
};
|
|
9320
|
-
},
|
|
9324
|
+
}, XE = () => {
|
|
9321
9325
|
const e = Fe(), { vaultAddress: t, vaultChainId: n, minAmountInUsd: r } = Se(), o = pr(), a = Te({
|
|
9322
9326
|
address: t,
|
|
9323
9327
|
chainId: n
|
|
@@ -9339,7 +9343,7 @@ const zl = (e) => ({
|
|
|
9339
9343
|
return {
|
|
9340
9344
|
handleClick: u,
|
|
9341
9345
|
disabled: m,
|
|
9342
|
-
error:
|
|
9346
|
+
error: zE({
|
|
9343
9347
|
error: c,
|
|
9344
9348
|
translationMap: e
|
|
9345
9349
|
}),
|
|
@@ -9352,7 +9356,7 @@ const zl = (e) => ({
|
|
|
9352
9356
|
}),
|
|
9353
9357
|
buttonText: v()
|
|
9354
9358
|
};
|
|
9355
|
-
},
|
|
9359
|
+
}, ZE = ({ disabled: e, onClick: t }) => {
|
|
9356
9360
|
const n = Fe(), {
|
|
9357
9361
|
handleClick: r,
|
|
9358
9362
|
disabled: o,
|
|
@@ -9361,7 +9365,7 @@ const zl = (e) => ({
|
|
|
9361
9365
|
minAmount: l,
|
|
9362
9366
|
isAmountSufficient: c,
|
|
9363
9367
|
buttonText: d
|
|
9364
|
-
} =
|
|
9368
|
+
} = XE();
|
|
9365
9369
|
return /* @__PURE__ */ w("div", { children: [
|
|
9366
9370
|
a && /* @__PURE__ */ w("div", { className: "dtw-mb-2 dtw-flex dtw-flex-col dtw-gap-1 dtw-text-error", children: [
|
|
9367
9371
|
/* @__PURE__ */ s("span", { className: "dtw-text-sm", children: a.title }),
|
|
@@ -9378,19 +9382,19 @@ const zl = (e) => ({
|
|
|
9378
9382
|
}
|
|
9379
9383
|
)
|
|
9380
9384
|
] });
|
|
9381
|
-
},
|
|
9385
|
+
}, JE = "remove", eI = () => {
|
|
9382
9386
|
const { account: e = O } = B(), { vaultAddress: t, vaultChainId: n, pendingTransaction: r } = Se(), { data: o } = hn({
|
|
9383
9387
|
userAddress: e,
|
|
9384
9388
|
vaultAddress: t,
|
|
9385
9389
|
chainId: n
|
|
9386
|
-
}), a = ql(
|
|
9390
|
+
}), a = ql(JE), { send: i } = ye({
|
|
9387
9391
|
onSettled: a,
|
|
9388
9392
|
contractId: "limitOrder",
|
|
9389
9393
|
functionName: "deleteLimitOrder"
|
|
9390
9394
|
}), l = async () => i(t), c = !!r, d = !!o?.amountD18 && !new D(o.amountD18.toString()).isZero();
|
|
9391
9395
|
return { deleteLimitOrder: l, isPending: c, displayButton: d };
|
|
9392
|
-
},
|
|
9393
|
-
const e = Fe(), { deleteLimitOrder: t, isPending: n, displayButton: r } =
|
|
9396
|
+
}, tI = () => {
|
|
9397
|
+
const e = Fe(), { deleteLimitOrder: t, isPending: n, displayButton: r } = eI();
|
|
9394
9398
|
return r ? /* @__PURE__ */ s(
|
|
9395
9399
|
Oe,
|
|
9396
9400
|
{
|
|
@@ -9404,25 +9408,25 @@ const zl = (e) => ({
|
|
|
9404
9408
|
}, $a = (e) => {
|
|
9405
9409
|
const t = e?.trim();
|
|
9406
9410
|
return t ? !isNaN(Number(t)) : !1;
|
|
9407
|
-
},
|
|
9411
|
+
}, nI = () => {
|
|
9408
9412
|
const {
|
|
9409
9413
|
form: { lowerLimitPrice: e, upperLimitPrice: t }
|
|
9410
9414
|
} = Se(), n = $a(e) && Number(e) !== 0, r = $a(t);
|
|
9411
9415
|
return { limitOrderButtonDisabled: !n && !r };
|
|
9412
|
-
},
|
|
9416
|
+
}, rI = [
|
|
9413
9417
|
"termsPoint1",
|
|
9414
9418
|
"termsPoint2",
|
|
9415
9419
|
"termsPoint3",
|
|
9416
9420
|
"termsPoint4",
|
|
9417
9421
|
"termsPoint5"
|
|
9418
|
-
],
|
|
9422
|
+
], oI = ({
|
|
9419
9423
|
onAccept: e,
|
|
9420
9424
|
onCancel: t,
|
|
9421
9425
|
isLoading: n = !1
|
|
9422
9426
|
}) => {
|
|
9423
9427
|
const r = Fe();
|
|
9424
9428
|
return /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-6 dtw-py-2", children: [
|
|
9425
|
-
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-4 dtw-px-2", children:
|
|
9429
|
+
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-4 dtw-px-2", children: rI.map((o) => /* @__PURE__ */ s(
|
|
9426
9430
|
"p",
|
|
9427
9431
|
{
|
|
9428
9432
|
className: "dtw-text-[length:var(--limit-order-font-size)] dtw-text-[color:var(--limit-order-secondary-content-color)] dtw-leading-relaxed",
|
|
@@ -9447,21 +9451,21 @@ const zl = (e) => ({
|
|
|
9447
9451
|
onClose: e,
|
|
9448
9452
|
hideDeleteButton: t
|
|
9449
9453
|
}) => {
|
|
9450
|
-
const n = Fe(), { limitOrderButtonDisabled: r } =
|
|
9454
|
+
const n = Fe(), { limitOrderButtonDisabled: r } = nI(), {
|
|
9451
9455
|
vaultChainId: o,
|
|
9452
9456
|
form: { termsAccepted: a }
|
|
9453
9457
|
} = Se(), { setTermsAccepted: i } = Wt(), [l, c] = U(!1), { createLimitOrder: d } = Kl(), { approveAndCreate: p, isLoading: m } = jl({ createLimitOrder: d }), u = () => {
|
|
9454
9458
|
i(!0), c(!1), p();
|
|
9455
9459
|
};
|
|
9456
9460
|
return l ? /* @__PURE__ */ s(
|
|
9457
|
-
|
|
9461
|
+
oI,
|
|
9458
9462
|
{
|
|
9459
9463
|
onAccept: u,
|
|
9460
9464
|
onCancel: () => c(!1),
|
|
9461
9465
|
isLoading: m
|
|
9462
9466
|
}
|
|
9463
9467
|
) : /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
9464
|
-
/* @__PURE__ */ s(
|
|
9468
|
+
/* @__PURE__ */ s(HE, {}),
|
|
9465
9469
|
/* @__PURE__ */ w(
|
|
9466
9470
|
$l,
|
|
9467
9471
|
{
|
|
@@ -9469,13 +9473,13 @@ const zl = (e) => ({
|
|
|
9469
9473
|
switchNetworkLabel: n.switchNetwork,
|
|
9470
9474
|
children: [
|
|
9471
9475
|
/* @__PURE__ */ s(
|
|
9472
|
-
|
|
9476
|
+
ZE,
|
|
9473
9477
|
{
|
|
9474
9478
|
disabled: r,
|
|
9475
9479
|
onClick: a ? void 0 : () => c(!0)
|
|
9476
9480
|
}
|
|
9477
9481
|
),
|
|
9478
|
-
!t && /* @__PURE__ */ s(
|
|
9482
|
+
!t && /* @__PURE__ */ s(tI, {})
|
|
9479
9483
|
]
|
|
9480
9484
|
}
|
|
9481
9485
|
),
|
|
@@ -9491,17 +9495,17 @@ const zl = (e) => ({
|
|
|
9491
9495
|
userAddress: n
|
|
9492
9496
|
}), a = o && o.takeProfitPriceD18 !== _e ? o.takeProfitPrice : "", i = o && o.stopLossPriceD18 !== BigInt(0) ? o.stopLossPrice : "";
|
|
9493
9497
|
return { isFetched: r, upperLimitPrice: a, lowerLimitPrice: i };
|
|
9494
|
-
},
|
|
9498
|
+
}, aI = [
|
|
9495
9499
|
go,
|
|
9496
9500
|
Ii,
|
|
9497
9501
|
"allowance"
|
|
9498
|
-
],
|
|
9502
|
+
], sI = () => {
|
|
9499
9503
|
const e = rn();
|
|
9500
9504
|
return b(() => {
|
|
9501
9505
|
e.invalidateQueries({
|
|
9502
9506
|
predicate: ({ queryKey: t }) => {
|
|
9503
9507
|
const n = t[1]?.functionName;
|
|
9504
|
-
return t[0] === "readContract" &&
|
|
9508
|
+
return t[0] === "readContract" && aI.some((r) => r === n);
|
|
9505
9509
|
}
|
|
9506
9510
|
});
|
|
9507
9511
|
}, [e]);
|
|
@@ -9511,7 +9515,7 @@ const zl = (e) => ({
|
|
|
9511
9515
|
onTransactionSuccess: o,
|
|
9512
9516
|
onTransactionError: a,
|
|
9513
9517
|
onLog: i
|
|
9514
|
-
} = Wt(), l =
|
|
9518
|
+
} = Wt(), l = sI(), { data: c, error: d } = ot({
|
|
9515
9519
|
hash: e?.hash ?? void 0,
|
|
9516
9520
|
chainId: t,
|
|
9517
9521
|
pollingInterval: Le
|
|
@@ -9724,7 +9728,7 @@ const zl = (e) => ({
|
|
|
9724
9728
|
},
|
|
9725
9729
|
children: e
|
|
9726
9730
|
}
|
|
9727
|
-
),
|
|
9731
|
+
), iI = ({ themeConfig: e }) => (Xl(), /* @__PURE__ */ s(ur, { config: e, children: /* @__PURE__ */ s(Yl, { hideDeleteButton: !0 }) })), lI = ({
|
|
9728
9732
|
vaultChainId: e,
|
|
9729
9733
|
vaultAddress: t,
|
|
9730
9734
|
pricingAsset: n,
|
|
@@ -9753,8 +9757,8 @@ const zl = (e) => ({
|
|
|
9753
9757
|
d
|
|
9754
9758
|
]
|
|
9755
9759
|
);
|
|
9756
|
-
return l ? /* @__PURE__ */ s(Fl, { config: r, children: /* @__PURE__ */ s(Vl, { initialState: p, actions: a, children: /* @__PURE__ */ s(
|
|
9757
|
-
},
|
|
9760
|
+
return l ? /* @__PURE__ */ s(Fl, { config: r, children: /* @__PURE__ */ s(Vl, { initialState: p, actions: a, children: /* @__PURE__ */ s(iI, { themeConfig: i }) }) }) : null;
|
|
9761
|
+
}, cI = ({ type: e }) => {
|
|
9758
9762
|
const { minLimitOrderValue: t } = Z(), { address: n, chainId: r, pricingAsset: o, symbol: a } = A(), { handleReject: i } = pe({ type: e }), l = te()[1], c = ie()[1], d = Yi(), p = P(
|
|
9759
9763
|
() => ({
|
|
9760
9764
|
onTransactionSettled: (u) => {
|
|
@@ -9793,7 +9797,7 @@ const zl = (e) => ({
|
|
|
9793
9797
|
actions: p,
|
|
9794
9798
|
closeAllOverlays: m
|
|
9795
9799
|
};
|
|
9796
|
-
},
|
|
9800
|
+
}, dI = (e) => {
|
|
9797
9801
|
const { limitOrderThemeConfig: t } = Z(), {
|
|
9798
9802
|
handleReject: n,
|
|
9799
9803
|
chainId: r,
|
|
@@ -9802,7 +9806,7 @@ const zl = (e) => ({
|
|
|
9802
9806
|
minLimitOrderValue: i,
|
|
9803
9807
|
actions: l,
|
|
9804
9808
|
closeAllOverlays: c
|
|
9805
|
-
} =
|
|
9809
|
+
} = cI(e);
|
|
9806
9810
|
return a ? /* @__PURE__ */ s(
|
|
9807
9811
|
X.Overlay,
|
|
9808
9812
|
{
|
|
@@ -9811,7 +9815,7 @@ const zl = (e) => ({
|
|
|
9811
9815
|
className: "!dtw-px-2",
|
|
9812
9816
|
noPadding: !0,
|
|
9813
9817
|
children: /* @__PURE__ */ s("div", { className: "dtw-mt-10 dtw-px-2 dtw-w-full dtw-overflow-y-auto theme-scrollbar", children: /* @__PURE__ */ s(
|
|
9814
|
-
|
|
9818
|
+
lI,
|
|
9815
9819
|
{
|
|
9816
9820
|
vaultAddress: o,
|
|
9817
9821
|
vaultChainId: r,
|
|
@@ -9827,10 +9831,10 @@ const zl = (e) => ({
|
|
|
9827
9831
|
upperLimitPrice: "",
|
|
9828
9832
|
lowerLimitPrice: "",
|
|
9829
9833
|
inputAmount: "",
|
|
9830
|
-
slippageBps:
|
|
9831
|
-
deadlineDays:
|
|
9834
|
+
slippageBps: DA.toString(),
|
|
9835
|
+
deadlineDays: kA.toString(),
|
|
9832
9836
|
termsAccepted: !1
|
|
9833
|
-
},
|
|
9837
|
+
}, pI = (e, t) => {
|
|
9834
9838
|
switch (t.type) {
|
|
9835
9839
|
case "SET_UPPER_LIMIT_PRICE":
|
|
9836
9840
|
return {
|
|
@@ -9911,7 +9915,7 @@ const Jl = (e) => {
|
|
|
9911
9915
|
},
|
|
9912
9916
|
depositTokens: []
|
|
9913
9917
|
})
|
|
9914
|
-
),
|
|
9918
|
+
), uI = () => Promise.resolve(), tc = ge({
|
|
9915
9919
|
setUpperLimitPrice: Ie,
|
|
9916
9920
|
setLowerLimitPrice: Ie,
|
|
9917
9921
|
setInputAmount: Ie,
|
|
@@ -9921,11 +9925,11 @@ const Jl = (e) => {
|
|
|
9921
9925
|
setInputToken: Ie,
|
|
9922
9926
|
setIsSubmitting: Ie,
|
|
9923
9927
|
reset: Ie,
|
|
9924
|
-
onSubmitOrder:
|
|
9928
|
+
onSubmitOrder: uI,
|
|
9925
9929
|
onLog: Ie
|
|
9926
9930
|
}), nc = ({ children: e, initialState: t, actions: n }) => {
|
|
9927
9931
|
const [r, o] = Rn(
|
|
9928
|
-
|
|
9932
|
+
pI,
|
|
9929
9933
|
Jl(t)
|
|
9930
9934
|
), a = b((f) => {
|
|
9931
9935
|
o({ type: "SET_UPPER_LIMIT_PRICE", payload: f });
|
|
@@ -10014,7 +10018,7 @@ const Jl = (e) => {
|
|
|
10014
10018
|
if (!e)
|
|
10015
10019
|
throw new Error("LimitBuyTranslationContext is used out of Provider");
|
|
10016
10020
|
return e;
|
|
10017
|
-
},
|
|
10021
|
+
}, mI = () => {
|
|
10018
10022
|
const e = mt(), {
|
|
10019
10023
|
form: { upperLimitPrice: t, lowerLimitPrice: n },
|
|
10020
10024
|
pricingAsset: r,
|
|
@@ -10023,7 +10027,7 @@ const Jl = (e) => {
|
|
|
10023
10027
|
address: r.address,
|
|
10024
10028
|
chainId: o,
|
|
10025
10029
|
refetchInterval: Le
|
|
10026
|
-
}), c = Number(l) <
|
|
10030
|
+
}), c = Number(l) < $A ? BA : MA, d = b(() => {
|
|
10027
10031
|
a("");
|
|
10028
10032
|
}, [a]), p = b(() => {
|
|
10029
10033
|
i("");
|
|
@@ -10046,7 +10050,7 @@ const Jl = (e) => {
|
|
|
10046
10050
|
lowerLimitLabel: e.lowerLimitLabel,
|
|
10047
10051
|
lowerLimitSubtitle: e.lowerLimitSubtitle
|
|
10048
10052
|
};
|
|
10049
|
-
},
|
|
10053
|
+
}, wI = () => {
|
|
10050
10054
|
const e = mt(), {
|
|
10051
10055
|
form: { inputAmount: t },
|
|
10052
10056
|
inputToken: n,
|
|
@@ -10076,7 +10080,7 @@ const Jl = (e) => {
|
|
|
10076
10080
|
inputAmountLabel: e.inputAmountLabel,
|
|
10077
10081
|
balanceLabel: e.balanceLabel
|
|
10078
10082
|
};
|
|
10079
|
-
},
|
|
10083
|
+
}, hI = ({
|
|
10080
10084
|
depositTokens: e,
|
|
10081
10085
|
activeAddress: t,
|
|
10082
10086
|
onSelect: n,
|
|
@@ -10117,7 +10121,7 @@ const Jl = (e) => {
|
|
|
10117
10121
|
}
|
|
10118
10122
|
) }, o.address);
|
|
10119
10123
|
}) })
|
|
10120
|
-
] }),
|
|
10124
|
+
] }), gI = () => {
|
|
10121
10125
|
const [e, t] = U(!1), {
|
|
10122
10126
|
inputAmount: n,
|
|
10123
10127
|
handleInputAmountChange: r,
|
|
@@ -10127,7 +10131,7 @@ const Jl = (e) => {
|
|
|
10127
10131
|
tokenBalance: l,
|
|
10128
10132
|
inputAmountLabel: c,
|
|
10129
10133
|
balanceLabel: d
|
|
10130
|
-
} =
|
|
10134
|
+
} = wI();
|
|
10131
10135
|
return /* @__PURE__ */ w(R, { children: [
|
|
10132
10136
|
/* @__PURE__ */ w("div", { className: "dtw-px-3 dtw-py-2 dtw-flex dtw-flex-col dtw-gap-2 dtw-border dtw-border-[var(--limit-order-switch-panel-border-color)] dtw-rounded-[var(--limit-order-switch-panel-radius,var(--limit-order-radius))] dtw-bg-[color:var(--limit-order-secondary-color)]", children: [
|
|
10133
10137
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-justify-between", children: [
|
|
@@ -10182,7 +10186,7 @@ const Jl = (e) => {
|
|
|
10182
10186
|
] }) })
|
|
10183
10187
|
] }),
|
|
10184
10188
|
e && /* @__PURE__ */ s(
|
|
10185
|
-
|
|
10189
|
+
hI,
|
|
10186
10190
|
{
|
|
10187
10191
|
depositTokens: a,
|
|
10188
10192
|
activeAddress: o.address,
|
|
@@ -10193,9 +10197,9 @@ const Jl = (e) => {
|
|
|
10193
10197
|
}
|
|
10194
10198
|
)
|
|
10195
10199
|
] });
|
|
10196
|
-
}, sc = 10 ** Qi,
|
|
10200
|
+
}, sc = 10 ** Qi, fI = new RegExp(
|
|
10197
10201
|
`^\\d*\\.?\\d{0,${Qi}}$`
|
|
10198
|
-
), Ba = (e) => e ? (Number(e) / sc).toString() : "",
|
|
10202
|
+
), Ba = (e) => e ? (Number(e) / sc).toString() : "", vI = () => {
|
|
10199
10203
|
const e = mt(), {
|
|
10200
10204
|
form: { slippageBps: t }
|
|
10201
10205
|
} = We(), { setSlippageBps: n } = gn(), [r, o] = U(() => Ba(t));
|
|
@@ -10212,7 +10216,7 @@ const Jl = (e) => {
|
|
|
10212
10216
|
return;
|
|
10213
10217
|
}
|
|
10214
10218
|
const l = Number(i);
|
|
10215
|
-
!Number.isNaN(l) && l >= 0 && l <= 100 &&
|
|
10219
|
+
!Number.isNaN(l) && l >= 0 && l <= 100 && fI.test(i) && (o(i), n(Math.round(l * sc).toString()));
|
|
10216
10220
|
},
|
|
10217
10221
|
[n]
|
|
10218
10222
|
);
|
|
@@ -10221,8 +10225,8 @@ const Jl = (e) => {
|
|
|
10221
10225
|
handleSlippagePercentChange: a,
|
|
10222
10226
|
slippageLabel: e.slippageLabel
|
|
10223
10227
|
};
|
|
10224
|
-
},
|
|
10225
|
-
const { slippagePercent: e, handleSlippagePercentChange: t, slippageLabel: n } =
|
|
10228
|
+
}, bI = () => {
|
|
10229
|
+
const { slippagePercent: e, handleSlippagePercentChange: t, slippageLabel: n } = vI();
|
|
10226
10230
|
return /* @__PURE__ */ w("div", { className: "dtw-px-3 dtw-py-2 dtw-flex dtw-flex-col dtw-gap-2 dtw-border dtw-border-[var(--limit-order-switch-panel-border-color)] dtw-rounded-[var(--limit-order-switch-panel-radius,var(--limit-order-radius))] dtw-bg-[color:var(--limit-order-secondary-color)]", children: [
|
|
10227
10231
|
/* @__PURE__ */ s("span", { className: "dtw-text-[color:var(--limit-order-primary-content-color)] dtw-text-[length:var(--limit-order-font-size)]", children: n }),
|
|
10228
10232
|
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--limit-order-input-group-gap,var(--limit-order-gap))] dtw-border-[var(--limit-order-input-border-color)] dtw-rounded-[var(--limit-order-input-radius,var(--limit-order-radius))] dtw-border dtw-bg-[var(--limit-order-input-bg,var(--limit-order-neutral-color))] dtw-py-[var(--limit-order-input-py)] dtw-px-[var(--limit-order-input-px)] focus-within:dtw-border-[var(--limit-order-input-focus-border-color)] focus-within:dtw-bg-[var(--limit-order-input-focus-bg)] dtw-shadow-md", children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1 dtw-text-[color:var(--limit-order-input-content-color,var(--limit-order-secondary-content-color))]", children: [
|
|
@@ -10239,7 +10243,7 @@ const Jl = (e) => {
|
|
|
10239
10243
|
/* @__PURE__ */ s("span", { className: "dtw-font-light dtw-whitespace-nowrap dtw-text-[length:var(--limit-order-input-suffix-font-size,var(--limit-order-font-size-sm))] dtw-text-[color:var(--limit-order-secondary-content-color)]", children: "Percent" })
|
|
10240
10244
|
] }) })
|
|
10241
10245
|
] });
|
|
10242
|
-
},
|
|
10246
|
+
}, yI = () => {
|
|
10243
10247
|
const {
|
|
10244
10248
|
upperLimitPrice: e,
|
|
10245
10249
|
lowerLimitPrice: t,
|
|
@@ -10254,7 +10258,7 @@ const Jl = (e) => {
|
|
|
10254
10258
|
upperLimitSubtitle: p,
|
|
10255
10259
|
lowerLimitLabel: m,
|
|
10256
10260
|
lowerLimitSubtitle: u
|
|
10257
|
-
} =
|
|
10261
|
+
} = mI();
|
|
10258
10262
|
return /* @__PURE__ */ s(R, { children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--limit-order-input-group-gap,var(--limit-order-gap))] dtw-px-[var(--limit-order-group-px)]", children: [
|
|
10259
10263
|
/* @__PURE__ */ s(
|
|
10260
10264
|
Wl,
|
|
@@ -10299,10 +10303,10 @@ const Jl = (e) => {
|
|
|
10299
10303
|
)
|
|
10300
10304
|
}
|
|
10301
10305
|
),
|
|
10302
|
-
/* @__PURE__ */ s(
|
|
10303
|
-
/* @__PURE__ */ s(
|
|
10306
|
+
/* @__PURE__ */ s(gI, {}),
|
|
10307
|
+
/* @__PURE__ */ s(bI, {})
|
|
10304
10308
|
] }) });
|
|
10305
|
-
},
|
|
10309
|
+
}, TI = () => {
|
|
10306
10310
|
const { account: e = O } = B(), {
|
|
10307
10311
|
inputToken: t,
|
|
10308
10312
|
vaultChainId: n,
|
|
@@ -10315,7 +10319,7 @@ const Jl = (e) => {
|
|
|
10315
10319
|
skip: F(t.address)
|
|
10316
10320
|
}), a = r ? tt(r, t.decimals) : "0";
|
|
10317
10321
|
return o ? new D(a).lte(o.toString()) : !1;
|
|
10318
|
-
},
|
|
10322
|
+
}, AI = () => {
|
|
10319
10323
|
const { inputToken: e } = We(), [t, n] = U(!1), [r, o] = U(), { send: a } = ye({
|
|
10320
10324
|
contractId: "erc20",
|
|
10321
10325
|
dynamicContractAddress: e.address,
|
|
@@ -10331,12 +10335,12 @@ const Jl = (e) => {
|
|
|
10331
10335
|
isApproving: t,
|
|
10332
10336
|
txHash: r
|
|
10333
10337
|
};
|
|
10334
|
-
},
|
|
10338
|
+
}, SI = () => {
|
|
10335
10339
|
const e = crypto.getRandomValues(new Uint8Array(6));
|
|
10336
10340
|
return BigInt(
|
|
10337
10341
|
"0x" + Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("")
|
|
10338
10342
|
);
|
|
10339
|
-
},
|
|
10343
|
+
}, xI = (e) => Math.floor(Date.now() / 1e3 + Number(e) * 24 * 60 * 60), CI = () => {
|
|
10340
10344
|
const { data: e } = Yr(), { account: t } = B(), n = We(), { onSubmitOrder: r, onOrderCreated: o, onOrderError: a, setIsSubmitting: i } = gn();
|
|
10341
10345
|
return { signAndSubmit: b(async () => {
|
|
10342
10346
|
if (!e || !t) return;
|
|
@@ -10353,7 +10357,7 @@ const Jl = (e) => {
|
|
|
10353
10357
|
slippageBps: v,
|
|
10354
10358
|
deadlineDays: y
|
|
10355
10359
|
}
|
|
10356
|
-
} = n, T = BigInt(tt(f, u.decimals)), S = !!g, _ = BigInt(!!h ? tt(h, Zt) : 0), M = S ? BigInt(tt(g, Zt)) : _e, N =
|
|
10360
|
+
} = n, T = BigInt(tt(f, u.decimals)), S = !!g, _ = BigInt(!!h ? tt(h, Zt) : 0), M = S ? BigInt(tt(g, Zt)) : _e, N = SI(), H = xI(y), re = {
|
|
10357
10361
|
owner: t,
|
|
10358
10362
|
targetVault: c,
|
|
10359
10363
|
pricingAsset: m.address,
|
|
@@ -10379,7 +10383,7 @@ const Jl = (e) => {
|
|
|
10379
10383
|
}, xe = await e.signTypedData({
|
|
10380
10384
|
account: t,
|
|
10381
10385
|
domain: ce,
|
|
10382
|
-
types:
|
|
10386
|
+
types: FA,
|
|
10383
10387
|
primaryType: "PermitWitnessTransferFrom",
|
|
10384
10388
|
message: J
|
|
10385
10389
|
}), Xe = {
|
|
@@ -10410,7 +10414,7 @@ const Jl = (e) => {
|
|
|
10410
10414
|
i
|
|
10411
10415
|
]) };
|
|
10412
10416
|
}, ic = () => {
|
|
10413
|
-
const [e, t] = U("idle"), n = ue(!1), r =
|
|
10417
|
+
const [e, t] = U("idle"), n = ue(!1), r = TI(), { approvePermit2: o, isApproving: a, txHash: i } = AI(), { signAndSubmit: l } = CI(), { vaultChainId: c } = We(), { data: d } = ot({
|
|
10414
10418
|
hash: i,
|
|
10415
10419
|
pollingInterval: Tt,
|
|
10416
10420
|
query: {
|
|
@@ -10458,10 +10462,10 @@ const Jl = (e) => {
|
|
|
10458
10462
|
flowState: e,
|
|
10459
10463
|
needsApproval: !r
|
|
10460
10464
|
};
|
|
10461
|
-
},
|
|
10465
|
+
}, EI = () => {
|
|
10462
10466
|
const e = mt(), {
|
|
10463
10467
|
form: { upperLimitPrice: t, lowerLimitPrice: n, inputAmount: r, slippageBps: o }
|
|
10464
|
-
} = We(), { approveAndSign: a, isLoading: i, flowState: l, needsApproval: c } = ic(), d = jt(t) || jt(n), p = jt(r), m = Number(o), u = !isNaN(m) && m >=
|
|
10468
|
+
} = We(), { approveAndSign: a, isLoading: i, flowState: l, needsApproval: c } = ic(), d = jt(t) || jt(n), p = jt(r), m = Number(o), u = !isNaN(m) && m >= LA && m <= RA;
|
|
10465
10469
|
return {
|
|
10466
10470
|
handleClick: a,
|
|
10467
10471
|
disabled: !d || !p || !u,
|
|
@@ -10478,10 +10482,10 @@ const Jl = (e) => {
|
|
|
10478
10482
|
}
|
|
10479
10483
|
})()
|
|
10480
10484
|
};
|
|
10481
|
-
},
|
|
10485
|
+
}, II = ({
|
|
10482
10486
|
onClick: e
|
|
10483
10487
|
}) => {
|
|
10484
|
-
const { handleClick: t, disabled: n, isLoading: r, buttonText: o } =
|
|
10488
|
+
const { handleClick: t, disabled: n, isLoading: r, buttonText: o } = EI();
|
|
10485
10489
|
return /* @__PURE__ */ s(
|
|
10486
10490
|
Oe,
|
|
10487
10491
|
{
|
|
@@ -10491,18 +10495,18 @@ const Jl = (e) => {
|
|
|
10491
10495
|
children: o
|
|
10492
10496
|
}
|
|
10493
10497
|
);
|
|
10494
|
-
},
|
|
10498
|
+
}, NI = [
|
|
10495
10499
|
"termsPoint1",
|
|
10496
10500
|
"termsPoint2",
|
|
10497
10501
|
"termsPoint3"
|
|
10498
|
-
],
|
|
10502
|
+
], OI = ({
|
|
10499
10503
|
onAccept: e,
|
|
10500
10504
|
onCancel: t,
|
|
10501
10505
|
isLoading: n = !1
|
|
10502
10506
|
}) => {
|
|
10503
10507
|
const r = mt();
|
|
10504
10508
|
return /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-6 dtw-py-2", children: [
|
|
10505
|
-
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-4 dtw-px-2", children:
|
|
10509
|
+
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-4 dtw-px-2", children: NI.map((o) => /* @__PURE__ */ s(
|
|
10506
10510
|
"p",
|
|
10507
10511
|
{
|
|
10508
10512
|
className: "dtw-text-[length:var(--limit-order-font-size)] dtw-text-[color:var(--limit-order-secondary-content-color)] dtw-leading-relaxed",
|
|
@@ -10531,21 +10535,21 @@ const Jl = (e) => {
|
|
|
10531
10535
|
o(!0), i(!1), l();
|
|
10532
10536
|
};
|
|
10533
10537
|
return a ? /* @__PURE__ */ s(
|
|
10534
|
-
|
|
10538
|
+
OI,
|
|
10535
10539
|
{
|
|
10536
10540
|
onAccept: d,
|
|
10537
10541
|
onCancel: () => i(!1),
|
|
10538
10542
|
isLoading: c
|
|
10539
10543
|
}
|
|
10540
10544
|
) : /* @__PURE__ */ w("div", { className: "dtw-relative dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
10541
|
-
/* @__PURE__ */ s(
|
|
10545
|
+
/* @__PURE__ */ s(yI, {}),
|
|
10542
10546
|
/* @__PURE__ */ s(
|
|
10543
10547
|
$l,
|
|
10544
10548
|
{
|
|
10545
10549
|
vaultChainId: n,
|
|
10546
10550
|
switchNetworkLabel: t.switchNetwork,
|
|
10547
10551
|
children: /* @__PURE__ */ s(
|
|
10548
|
-
|
|
10552
|
+
II,
|
|
10549
10553
|
{
|
|
10550
10554
|
onClick: r ? void 0 : () => i(!0)
|
|
10551
10555
|
}
|
|
@@ -10554,9 +10558,9 @@ const Jl = (e) => {
|
|
|
10554
10558
|
),
|
|
10555
10559
|
!!e && /* @__PURE__ */ s(Oe, { highlighted: !1, onClick: e, children: t.cancel })
|
|
10556
10560
|
] });
|
|
10557
|
-
},
|
|
10561
|
+
}, _I = ({
|
|
10558
10562
|
themeConfig: e
|
|
10559
|
-
}) => /* @__PURE__ */ s(ur, { config: e, children: /* @__PURE__ */ s(lc, {}) }),
|
|
10563
|
+
}) => /* @__PURE__ */ s(ur, { config: e, children: /* @__PURE__ */ s(lc, {}) }), PI = ({
|
|
10560
10564
|
vaultChainId: e,
|
|
10561
10565
|
vaultAddress: t,
|
|
10562
10566
|
limitBuyManagerAddress: n,
|
|
@@ -10582,8 +10586,8 @@ const Jl = (e) => {
|
|
|
10582
10586
|
o
|
|
10583
10587
|
]
|
|
10584
10588
|
);
|
|
10585
|
-
return /* @__PURE__ */ s(ac, { config: a, children: /* @__PURE__ */ s(nc, { initialState: c, actions: i, children: /* @__PURE__ */ s(
|
|
10586
|
-
},
|
|
10589
|
+
return /* @__PURE__ */ s(ac, { config: a, children: /* @__PURE__ */ s(nc, { initialState: c, actions: i, children: /* @__PURE__ */ s(_I, { themeConfig: l }) }) });
|
|
10590
|
+
}, DI = ({ type: e }) => {
|
|
10587
10591
|
const { limitBuyConfig: t, limitOrderThemeConfig: n } = Z(), { address: r, chainId: o, pricingAsset: a } = A(), { handleReject: i } = pe({ type: e }), l = te()[1], c = Yi(), d = Xi[o], p = wn({ excludeNativeToken: !0 }), m = P(
|
|
10588
10592
|
() => t ? {
|
|
10589
10593
|
...t,
|
|
@@ -10606,7 +10610,7 @@ const Jl = (e) => {
|
|
|
10606
10610
|
actions: m,
|
|
10607
10611
|
closeAllOverlays: u
|
|
10608
10612
|
};
|
|
10609
|
-
},
|
|
10613
|
+
}, kI = (e) => {
|
|
10610
10614
|
const {
|
|
10611
10615
|
handleReject: t,
|
|
10612
10616
|
chainId: n,
|
|
@@ -10617,7 +10621,7 @@ const Jl = (e) => {
|
|
|
10617
10621
|
limitOrderThemeConfig: l,
|
|
10618
10622
|
actions: c,
|
|
10619
10623
|
closeAllOverlays: d
|
|
10620
|
-
} =
|
|
10624
|
+
} = DI(e);
|
|
10621
10625
|
return !o || !a || !i.length || !c ? null : /* @__PURE__ */ s(
|
|
10622
10626
|
X.Overlay,
|
|
10623
10627
|
{
|
|
@@ -10626,7 +10630,7 @@ const Jl = (e) => {
|
|
|
10626
10630
|
className: "!dtw-px-2",
|
|
10627
10631
|
noPadding: !0,
|
|
10628
10632
|
children: /* @__PURE__ */ s("div", { className: "dtw-mt-10 dtw-px-2 dtw-overflow-y-auto theme-scrollbar", children: /* @__PURE__ */ s(
|
|
10629
|
-
|
|
10633
|
+
PI,
|
|
10630
10634
|
{
|
|
10631
10635
|
vaultAddress: r,
|
|
10632
10636
|
vaultChainId: n,
|
|
@@ -10639,7 +10643,7 @@ const Jl = (e) => {
|
|
|
10639
10643
|
) })
|
|
10640
10644
|
}
|
|
10641
10645
|
);
|
|
10642
|
-
},
|
|
10646
|
+
}, LI = ({
|
|
10643
10647
|
className: e,
|
|
10644
10648
|
checked: t,
|
|
10645
10649
|
label: n,
|
|
@@ -10666,7 +10670,7 @@ const Jl = (e) => {
|
|
|
10666
10670
|
] }), cc = () => {
|
|
10667
10671
|
const [e] = $();
|
|
10668
10672
|
return new D(e.value || "0").shiftedBy(e.decimals);
|
|
10669
|
-
},
|
|
10673
|
+
}, RI = () => {
|
|
10670
10674
|
const { account: e = O } = B(), { address: t, chainId: n } = A(), r = Q("limitOrder", n), o = cc(), { data: a } = an({
|
|
10671
10675
|
tokenAddress: t,
|
|
10672
10676
|
ownerAddress: e,
|
|
@@ -10675,7 +10679,7 @@ const Jl = (e) => {
|
|
|
10675
10679
|
skip: F(r)
|
|
10676
10680
|
});
|
|
10677
10681
|
return a ? o.lte(a.toString()) : !1;
|
|
10678
|
-
}, Ma = "approve",
|
|
10682
|
+
}, Ma = "approve", $I = () => {
|
|
10679
10683
|
const { address: e, chainId: t, symbol: n } = A(), [r, o] = U(!1), a = Q("limitOrder", t), i = ie()[1], l = Qe({ action: Ma }), { send: c } = ye({
|
|
10680
10684
|
contractId: "erc20",
|
|
10681
10685
|
dynamicContractAddress: e,
|
|
@@ -10695,22 +10699,22 @@ const Jl = (e) => {
|
|
|
10695
10699
|
},
|
|
10696
10700
|
isApprovePending: r
|
|
10697
10701
|
};
|
|
10698
|
-
},
|
|
10699
|
-
const e =
|
|
10702
|
+
}, BI = () => {
|
|
10703
|
+
const e = RI(), { approveLimitOrder: t, isApprovePending: n } = $I();
|
|
10700
10704
|
return {
|
|
10701
10705
|
isApproved: e,
|
|
10702
10706
|
approveLimitOrder: t,
|
|
10703
10707
|
isApprovePending: n
|
|
10704
10708
|
};
|
|
10705
|
-
},
|
|
10709
|
+
}, MI = ({
|
|
10706
10710
|
children: e
|
|
10707
10711
|
}) => {
|
|
10708
|
-
const t = x(), { ActionButton: n = K } = W(), { isApproved: r, approveLimitOrder: o, isApprovePending: a } =
|
|
10712
|
+
const t = x(), { ActionButton: n = K } = W(), { isApproved: r, approveLimitOrder: o, isApprovePending: a } = BI();
|
|
10709
10713
|
return r ? e : /* @__PURE__ */ s(n, { onClick: o, loading: a, children: t.approve });
|
|
10710
10714
|
}, dc = () => {
|
|
10711
10715
|
const { chainId: e, pricingAsset: t } = A();
|
|
10712
10716
|
return t ?? Kd[e];
|
|
10713
|
-
}, Fa = "limit_order_withdraw",
|
|
10717
|
+
}, Fa = "limit_order_withdraw", FI = (e) => {
|
|
10714
10718
|
const { account: t = O } = B(), { address: n, chainId: r, symbol: o } = A(), a = dc(), i = ie()[1], l = Qe({ action: Fa }), c = b(
|
|
10715
10719
|
(...h) => {
|
|
10716
10720
|
l(...h), e();
|
|
@@ -10751,7 +10755,7 @@ const Jl = (e) => {
|
|
|
10751
10755
|
a?.address,
|
|
10752
10756
|
u
|
|
10753
10757
|
]);
|
|
10754
|
-
},
|
|
10758
|
+
}, WI = ({
|
|
10755
10759
|
limitOrderHandler: e,
|
|
10756
10760
|
action: t
|
|
10757
10761
|
}) => {
|
|
@@ -10788,24 +10792,24 @@ const Jl = (e) => {
|
|
|
10788
10792
|
label: p ? n.delete : n.withdrawAction,
|
|
10789
10793
|
handleLimitOrderWithdraw: m
|
|
10790
10794
|
};
|
|
10791
|
-
},
|
|
10795
|
+
}, UI = "limit_order_withdraw", zI = () => {
|
|
10792
10796
|
const e = Ae(), t = Oo("limit_order_withdraw"), n = b(
|
|
10793
10797
|
() => e({
|
|
10794
10798
|
type: "MERGE_OVERLAY",
|
|
10795
10799
|
payload: { type: j.LIMIT_ORDER_WITHDRAW, isOpen: !1 }
|
|
10796
10800
|
}),
|
|
10797
10801
|
[e]
|
|
10798
|
-
), r =
|
|
10802
|
+
), r = FI(n), { handleLimitOrderWithdraw: o, label: a } = WI({
|
|
10799
10803
|
limitOrderHandler: r,
|
|
10800
|
-
action:
|
|
10804
|
+
action: UI
|
|
10801
10805
|
});
|
|
10802
10806
|
return {
|
|
10803
10807
|
label: a,
|
|
10804
10808
|
handleLimitOrderWithdraw: o,
|
|
10805
10809
|
isLoading: t
|
|
10806
10810
|
};
|
|
10807
|
-
},
|
|
10808
|
-
const { ActionButton: t = K } = W(), { label: n, handleLimitOrderWithdraw: r, isLoading: o } =
|
|
10811
|
+
}, GI = ({ disabled: e }) => {
|
|
10812
|
+
const { ActionButton: t = K } = W(), { label: n, handleLimitOrderWithdraw: r, isLoading: o } = zI();
|
|
10809
10813
|
return /* @__PURE__ */ s(
|
|
10810
10814
|
t,
|
|
10811
10815
|
{
|
|
@@ -10815,10 +10819,10 @@ const Jl = (e) => {
|
|
|
10815
10819
|
children: n
|
|
10816
10820
|
}
|
|
10817
10821
|
);
|
|
10818
|
-
},
|
|
10822
|
+
}, HI = [
|
|
10819
10823
|
"termOfUseWithdrawPoint1",
|
|
10820
10824
|
"termOfUseWithdrawPoint2"
|
|
10821
|
-
],
|
|
10825
|
+
], VI = ({
|
|
10822
10826
|
className: e
|
|
10823
10827
|
}) => {
|
|
10824
10828
|
const t = x();
|
|
@@ -10831,7 +10835,7 @@ const Jl = (e) => {
|
|
|
10831
10835
|
"dtw-w-full dtw-text-sm dtw-overflow-y-auto theme-scrollbar dtw-text-[color:var(--panel-secondary-content-color)]",
|
|
10832
10836
|
e
|
|
10833
10837
|
),
|
|
10834
|
-
children: /* @__PURE__ */ s("ol", { className: "dtw-list-decimal dtw-list-inside dtw-space-y-2", children:
|
|
10838
|
+
children: /* @__PURE__ */ s("ol", { className: "dtw-list-decimal dtw-list-inside dtw-space-y-2", children: HI.map((n, r) => /* @__PURE__ */ w("li", { className: "dtw-text-pretty", children: [
|
|
10835
10839
|
r + 1,
|
|
10836
10840
|
". ",
|
|
10837
10841
|
t[n]
|
|
@@ -10839,13 +10843,13 @@ const Jl = (e) => {
|
|
|
10839
10843
|
}
|
|
10840
10844
|
)
|
|
10841
10845
|
] });
|
|
10842
|
-
},
|
|
10846
|
+
}, jI = ({ type: e }) => {
|
|
10843
10847
|
const t = x(), { ActionButton: n = K } = W(), { handleReject: r } = pe({ type: e }), [o, a] = U(!1);
|
|
10844
10848
|
return /* @__PURE__ */ s(X.Overlay, { onClose: r, children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-w-full", children: [
|
|
10845
10849
|
/* @__PURE__ */ w("div", { className: "dtw-px-2 dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
10846
|
-
/* @__PURE__ */ s(
|
|
10850
|
+
/* @__PURE__ */ s(VI, {}),
|
|
10847
10851
|
/* @__PURE__ */ s("div", { className: "dtw-mt-1 dtw-flex dtw-items-center dtw-gap-1.5", children: /* @__PURE__ */ s(
|
|
10848
|
-
|
|
10852
|
+
LI,
|
|
10849
10853
|
{
|
|
10850
10854
|
checked: o,
|
|
10851
10855
|
onChange: (i) => a(i),
|
|
@@ -10855,9 +10859,9 @@ const Jl = (e) => {
|
|
|
10855
10859
|
) })
|
|
10856
10860
|
] }),
|
|
10857
10861
|
/* @__PURE__ */ s(n, { highlighted: !1, onClick: r, children: t.back }),
|
|
10858
|
-
/* @__PURE__ */ s(
|
|
10862
|
+
/* @__PURE__ */ s(MI, { children: /* @__PURE__ */ s(GI, { disabled: !o }) })
|
|
10859
10863
|
] }) });
|
|
10860
|
-
},
|
|
10864
|
+
}, qI = ({
|
|
10861
10865
|
isActive: e,
|
|
10862
10866
|
onError: t
|
|
10863
10867
|
}) => {
|
|
@@ -10933,13 +10937,13 @@ const Jl = (e) => {
|
|
|
10933
10937
|
] })
|
|
10934
10938
|
]
|
|
10935
10939
|
}
|
|
10936
|
-
),
|
|
10940
|
+
), KI = ({
|
|
10937
10941
|
isActive: e,
|
|
10938
10942
|
onError: t,
|
|
10939
10943
|
stepNumber: n,
|
|
10940
10944
|
isFinished: r
|
|
10941
10945
|
}) => {
|
|
10942
|
-
const { label: o, description: a } =
|
|
10946
|
+
const { label: o, description: a } = qI({ isActive: e, onError: t });
|
|
10943
10947
|
return /* @__PURE__ */ s(
|
|
10944
10948
|
nt,
|
|
10945
10949
|
{
|
|
@@ -10950,11 +10954,11 @@ const Jl = (e) => {
|
|
|
10950
10954
|
description: a
|
|
10951
10955
|
}
|
|
10952
10956
|
);
|
|
10953
|
-
}, Nr = 0,
|
|
10957
|
+
}, Nr = 0, YI = 1e3, QI = (e) => e ? { approve: 0, oracleUpdate: 1, initWithdraw: 2, completeWithdraw: 3 } : { approve: 0, oracleUpdate: -1, initWithdraw: 1, completeWithdraw: 2 }, XI = (e, t, n) => {
|
|
10954
10958
|
E(() => {
|
|
10955
10959
|
t === "Success" && n && Os.includes(n) && e();
|
|
10956
10960
|
}, [t, n, e]);
|
|
10957
|
-
},
|
|
10961
|
+
}, ZI = (e) => {
|
|
10958
10962
|
const [t, n] = U(!1);
|
|
10959
10963
|
return E(() => {
|
|
10960
10964
|
if (!e) {
|
|
@@ -10963,10 +10967,10 @@ const Jl = (e) => {
|
|
|
10963
10967
|
}
|
|
10964
10968
|
const r = setTimeout(() => {
|
|
10965
10969
|
n(!0);
|
|
10966
|
-
},
|
|
10970
|
+
}, YI);
|
|
10967
10971
|
return () => clearTimeout(r);
|
|
10968
10972
|
}, [e]), t;
|
|
10969
|
-
},
|
|
10973
|
+
}, JI = () => {
|
|
10970
10974
|
const { address: e, chainId: t } = A(), { hasAssets: n, isReady: r } = cn({ address: e, chainId: t }), { hasAssets: o, isReady: a } = Ye({ address: e, chainId: t }), i = Jn(), l = oo(), [c] = ie(), { isOndoPriceFresh: d, recordOndoPriceUpdate: p } = ml(), m = r && a, u = n && o && i, h = u, [g, f] = U(null), { needsPriceUpdate: v } = vA({
|
|
10971
10975
|
address: e,
|
|
10972
10976
|
chainId: t,
|
|
@@ -11028,7 +11032,7 @@ const Jl = (e) => {
|
|
|
11028
11032
|
oracleUpdateDone: !h || g === !1 || y && N,
|
|
11029
11033
|
isVaultDataReady: m
|
|
11030
11034
|
};
|
|
11031
|
-
},
|
|
11035
|
+
}, eN = ({ type: e }) => {
|
|
11032
11036
|
const { handleReject: t } = pe({ type: e }), [n] = Gn(), [{ status: r, action: o }] = te(), { isCompleteWithdrawStep: a } = Ft(), {
|
|
11033
11037
|
isUnrollAndClaimTransaction: i,
|
|
11034
11038
|
isFetching: l,
|
|
@@ -11040,8 +11044,8 @@ const Jl = (e) => {
|
|
|
11040
11044
|
needsOracleUpdate: m,
|
|
11041
11045
|
oracleUpdateDone: u,
|
|
11042
11046
|
isVaultDataReady: h
|
|
11043
|
-
} =
|
|
11044
|
-
|
|
11047
|
+
} = JI(), g = QI(p), f = ZI(d);
|
|
11048
|
+
XI(t, r, o);
|
|
11045
11049
|
const v = a && !i, y = v ? g.completeWithdraw : d ? p && !u ? g.oracleUpdate : g.initWithdraw : g.approve, T = n?.receiveTokens?.[0], S = n?.receiveTokens?.length === 1 && T?.symbol, k = T?.symbol !== Ce.symbol ? T?.amount : "";
|
|
11046
11050
|
return {
|
|
11047
11051
|
isUnrollAndClaimTransaction: i,
|
|
@@ -11059,7 +11063,7 @@ const Jl = (e) => {
|
|
|
11059
11063
|
receiveToken: T,
|
|
11060
11064
|
receiveTokenAmount: k
|
|
11061
11065
|
};
|
|
11062
|
-
},
|
|
11066
|
+
}, tN = ({
|
|
11063
11067
|
isActive: e,
|
|
11064
11068
|
onError: t
|
|
11065
11069
|
}) => {
|
|
@@ -11069,20 +11073,20 @@ const Jl = (e) => {
|
|
|
11069
11073
|
withdraw: o,
|
|
11070
11074
|
onErrorCallback: t
|
|
11071
11075
|
});
|
|
11072
|
-
return
|
|
11076
|
+
return hC({
|
|
11073
11077
|
handleTrade: a,
|
|
11074
11078
|
onError: t
|
|
11075
11079
|
}), {
|
|
11076
11080
|
label: n.swapToCompleteSell,
|
|
11077
11081
|
description: r
|
|
11078
11082
|
};
|
|
11079
|
-
},
|
|
11083
|
+
}, nN = ({
|
|
11080
11084
|
stepNumber: e,
|
|
11081
11085
|
isActive: t,
|
|
11082
11086
|
isFinished: n,
|
|
11083
11087
|
onError: r
|
|
11084
11088
|
}) => {
|
|
11085
|
-
const { label: o, description: a } =
|
|
11089
|
+
const { label: o, description: a } = tN({ isActive: t, onError: r });
|
|
11086
11090
|
return /* @__PURE__ */ s(
|
|
11087
11091
|
nt,
|
|
11088
11092
|
{
|
|
@@ -11093,13 +11097,13 @@ const Jl = (e) => {
|
|
|
11093
11097
|
description: a
|
|
11094
11098
|
}
|
|
11095
11099
|
);
|
|
11096
|
-
},
|
|
11100
|
+
}, rN = ({
|
|
11097
11101
|
isActive: e,
|
|
11098
11102
|
isCompleteWithdrawStep: t,
|
|
11099
11103
|
isPending: n,
|
|
11100
11104
|
onError: r
|
|
11101
11105
|
}) => {
|
|
11102
|
-
const o = sr(e), { withdraw: a } =
|
|
11106
|
+
const o = sr(e), { withdraw: a } = AS({
|
|
11103
11107
|
onErrorCallback: r
|
|
11104
11108
|
}), { handleTrade: i } = No({
|
|
11105
11109
|
trade: a,
|
|
@@ -11110,7 +11114,7 @@ const Jl = (e) => {
|
|
|
11110
11114
|
}, [n, e, t, i]), {
|
|
11111
11115
|
description: o
|
|
11112
11116
|
};
|
|
11113
|
-
},
|
|
11117
|
+
}, oN = ({
|
|
11114
11118
|
stepNumber: e,
|
|
11115
11119
|
isActive: t,
|
|
11116
11120
|
isFinished: n,
|
|
@@ -11120,7 +11124,7 @@ const Jl = (e) => {
|
|
|
11120
11124
|
canSpend: i,
|
|
11121
11125
|
label: l
|
|
11122
11126
|
}) => {
|
|
11123
|
-
const { description: c } =
|
|
11127
|
+
const { description: c } = rN({
|
|
11124
11128
|
isActive: t,
|
|
11125
11129
|
isCompleteWithdrawStep: a,
|
|
11126
11130
|
isPending: r,
|
|
@@ -11136,7 +11140,7 @@ const Jl = (e) => {
|
|
|
11136
11140
|
description: c
|
|
11137
11141
|
}
|
|
11138
11142
|
);
|
|
11139
|
-
},
|
|
11143
|
+
}, aN = ({
|
|
11140
11144
|
isActive: e,
|
|
11141
11145
|
isUpdateRequired: t,
|
|
11142
11146
|
onError: n
|
|
@@ -11156,14 +11160,14 @@ const Jl = (e) => {
|
|
|
11156
11160
|
label: r.updateOndoPricesStep,
|
|
11157
11161
|
description: o
|
|
11158
11162
|
};
|
|
11159
|
-
},
|
|
11163
|
+
}, sN = ({
|
|
11160
11164
|
stepNumber: e,
|
|
11161
11165
|
isActive: t,
|
|
11162
11166
|
isFinished: n,
|
|
11163
11167
|
isUpdateRequired: r,
|
|
11164
11168
|
onError: o
|
|
11165
11169
|
}) => {
|
|
11166
|
-
const { label: a, description: i } =
|
|
11170
|
+
const { label: a, description: i } = aN({
|
|
11167
11171
|
isActive: t,
|
|
11168
11172
|
isUpdateRequired: r,
|
|
11169
11173
|
onError: o
|
|
@@ -11178,7 +11182,7 @@ const Jl = (e) => {
|
|
|
11178
11182
|
description: i
|
|
11179
11183
|
}
|
|
11180
11184
|
);
|
|
11181
|
-
},
|
|
11185
|
+
}, iN = ({
|
|
11182
11186
|
canSpend: e,
|
|
11183
11187
|
isTransactionTypeReady: t,
|
|
11184
11188
|
isUnrollAndClaimTransaction: n,
|
|
@@ -11199,7 +11203,7 @@ const Jl = (e) => {
|
|
|
11199
11203
|
showCompleteWithdrawStep: !n && !l,
|
|
11200
11204
|
initWithdrawLabel: n || l ? i.unrollAndClaimAssets : i.unrollAssetsToPrepare
|
|
11201
11205
|
};
|
|
11202
|
-
},
|
|
11206
|
+
}, lN = (e) => {
|
|
11203
11207
|
const t = x(), {
|
|
11204
11208
|
showLoadingPlaceholder: n,
|
|
11205
11209
|
oracleUpdateStep: r,
|
|
@@ -11207,7 +11211,7 @@ const Jl = (e) => {
|
|
|
11207
11211
|
completeWithdrawStep: a,
|
|
11208
11212
|
showCompleteWithdrawStep: i,
|
|
11209
11213
|
initWithdrawLabel: l
|
|
11210
|
-
} =
|
|
11214
|
+
} = iN(e);
|
|
11211
11215
|
return n ? /* @__PURE__ */ w(R, { children: [
|
|
11212
11216
|
r && /* @__PURE__ */ s(
|
|
11213
11217
|
nt,
|
|
@@ -11238,7 +11242,7 @@ const Jl = (e) => {
|
|
|
11238
11242
|
)
|
|
11239
11243
|
] }) : /* @__PURE__ */ w(R, { children: [
|
|
11240
11244
|
r && /* @__PURE__ */ s(
|
|
11241
|
-
|
|
11245
|
+
sN,
|
|
11242
11246
|
{
|
|
11243
11247
|
...r,
|
|
11244
11248
|
isUpdateRequired: e.needsOracleUpdate,
|
|
@@ -11246,7 +11250,7 @@ const Jl = (e) => {
|
|
|
11246
11250
|
}
|
|
11247
11251
|
),
|
|
11248
11252
|
/* @__PURE__ */ s(
|
|
11249
|
-
|
|
11253
|
+
oN,
|
|
11250
11254
|
{
|
|
11251
11255
|
...o,
|
|
11252
11256
|
canSpend: e.canSpend,
|
|
@@ -11257,14 +11261,14 @@ const Jl = (e) => {
|
|
|
11257
11261
|
}
|
|
11258
11262
|
),
|
|
11259
11263
|
i && /* @__PURE__ */ s(
|
|
11260
|
-
|
|
11264
|
+
nN,
|
|
11261
11265
|
{
|
|
11262
11266
|
...a,
|
|
11263
11267
|
onError: e.onError
|
|
11264
11268
|
}
|
|
11265
11269
|
)
|
|
11266
11270
|
] });
|
|
11267
|
-
},
|
|
11271
|
+
}, cN = (e) => {
|
|
11268
11272
|
const t = x(), { ActionButton: n = K } = W(), {
|
|
11269
11273
|
isUnrollAndClaimTransaction: r,
|
|
11270
11274
|
activeStepIndex: o,
|
|
@@ -11280,7 +11284,7 @@ const Jl = (e) => {
|
|
|
11280
11284
|
receiveToken: g,
|
|
11281
11285
|
displayReceiveTokenInfo: f,
|
|
11282
11286
|
receiveTokenAmount: v
|
|
11283
|
-
} =
|
|
11287
|
+
} = eN(e);
|
|
11284
11288
|
return /* @__PURE__ */ w(X.Overlay, { centered: !1, className: "dtw-gap-4", children: [
|
|
11285
11289
|
/* @__PURE__ */ s(
|
|
11286
11290
|
n,
|
|
@@ -11317,7 +11321,7 @@ const Jl = (e) => {
|
|
|
11317
11321
|
] }),
|
|
11318
11322
|
/* @__PURE__ */ w("div", { className: "dtw-mt-4 dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
11319
11323
|
/* @__PURE__ */ s(
|
|
11320
|
-
|
|
11324
|
+
KI,
|
|
11321
11325
|
{
|
|
11322
11326
|
isFinished: o > Nr,
|
|
11323
11327
|
isActive: o === Nr,
|
|
@@ -11326,7 +11330,7 @@ const Jl = (e) => {
|
|
|
11326
11330
|
}
|
|
11327
11331
|
),
|
|
11328
11332
|
/* @__PURE__ */ s(
|
|
11329
|
-
|
|
11333
|
+
lN,
|
|
11330
11334
|
{
|
|
11331
11335
|
canSpend: c,
|
|
11332
11336
|
isTransactionTypeReady: u,
|
|
@@ -11342,7 +11346,7 @@ const Jl = (e) => {
|
|
|
11342
11346
|
)
|
|
11343
11347
|
] })
|
|
11344
11348
|
] });
|
|
11345
|
-
},
|
|
11349
|
+
}, dN = () => {
|
|
11346
11350
|
const e = x();
|
|
11347
11351
|
return /* @__PURE__ */ w(R, { children: [
|
|
11348
11352
|
/* @__PURE__ */ s(
|
|
@@ -11363,7 +11367,7 @@ const Jl = (e) => {
|
|
|
11363
11367
|
),
|
|
11364
11368
|
/* @__PURE__ */ s(cl, {})
|
|
11365
11369
|
] });
|
|
11366
|
-
},
|
|
11370
|
+
}, pN = ({ assets: e = [] }) => {
|
|
11367
11371
|
const { stablePrecision: t } = Z(), { firstPart: n, secondPart: r } = ls(
|
|
11368
11372
|
e,
|
|
11369
11373
|
Is
|
|
@@ -11394,8 +11398,8 @@ const Jl = (e) => {
|
|
|
11394
11398
|
/* @__PURE__ */ s(kn, { children: n.map(o) }),
|
|
11395
11399
|
r.length > 0 && /* @__PURE__ */ s(gl, { children: /* @__PURE__ */ s(kn, { children: r.map(o) }) })
|
|
11396
11400
|
] });
|
|
11397
|
-
},
|
|
11398
|
-
const { chainId: e } = A(), { stablePrecision: t } = Z(), { data: n = [] } = me(), r =
|
|
11401
|
+
}, uN = () => {
|
|
11402
|
+
const { chainId: e } = A(), { stablePrecision: t } = Z(), { data: n = [] } = me(), r = mC(), { data: o = O } = uC();
|
|
11399
11403
|
return {
|
|
11400
11404
|
assets: n,
|
|
11401
11405
|
usdAmount: ae({
|
|
@@ -11408,8 +11412,8 @@ const Jl = (e) => {
|
|
|
11408
11412
|
e
|
|
11409
11413
|
)
|
|
11410
11414
|
};
|
|
11411
|
-
},
|
|
11412
|
-
const e = x(), { assets: t, usdAmount: n, withdrawalVaultLink: r } =
|
|
11415
|
+
}, mN = () => {
|
|
11416
|
+
const e = x(), { assets: t, usdAmount: n, withdrawalVaultLink: r } = uN();
|
|
11413
11417
|
return /* @__PURE__ */ w(R, { children: [
|
|
11414
11418
|
/* @__PURE__ */ w("div", { className: "dtw-text-sm dtw-flex dtw-items-center dtw-gap-1", children: [
|
|
11415
11419
|
/* @__PURE__ */ s("span", { className: "dtw-text-[color:var(--panel-secondary-content-color)]", children: e.total }),
|
|
@@ -11422,9 +11426,9 @@ const Jl = (e) => {
|
|
|
11422
11426
|
}
|
|
11423
11427
|
)
|
|
11424
11428
|
] }),
|
|
11425
|
-
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-input-group-gap,var(--panel-gap))] dtw-rounded-[var(--panel-input-radius,var(--panel-radius))] dtw-border dtw-bg-[var(--panel-input-bg,var(--panel-neutral-color))] dtw-py-[var(--panel-input-py)] dtw-px-[var(--panel-input-px)] dtw-shadow-md dtw-border-[var(--panel-input-border-color)]", children: /* @__PURE__ */ s(
|
|
11429
|
+
/* @__PURE__ */ s("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-input-group-gap,var(--panel-gap))] dtw-rounded-[var(--panel-input-radius,var(--panel-radius))] dtw-border dtw-bg-[var(--panel-input-bg,var(--panel-neutral-color))] dtw-py-[var(--panel-input-py)] dtw-px-[var(--panel-input-px)] dtw-shadow-md dtw-border-[var(--panel-input-border-color)]", children: /* @__PURE__ */ s(pN, { assets: t }) })
|
|
11426
11430
|
] });
|
|
11427
|
-
},
|
|
11431
|
+
}, wN = () => {
|
|
11428
11432
|
const e = Ae(), { requiresHighSlippageConfirm: t, confirmHighSlippage: n, slippageToBeUsed: r } = Co();
|
|
11429
11433
|
return {
|
|
11430
11434
|
requiresHighSlippageConfirm: t,
|
|
@@ -11440,17 +11444,17 @@ const Jl = (e) => {
|
|
|
11440
11444
|
});
|
|
11441
11445
|
}
|
|
11442
11446
|
};
|
|
11443
|
-
},
|
|
11447
|
+
}, hN = ({ children: e }) => {
|
|
11444
11448
|
const { ActionButton: t = K } = W(), n = x(), {
|
|
11445
11449
|
requiresHighSlippageConfirm: r,
|
|
11446
11450
|
slippageToBeUsed: o,
|
|
11447
11451
|
handleHighSlippageClick: a
|
|
11448
|
-
} =
|
|
11452
|
+
} = wN();
|
|
11449
11453
|
return r ? /* @__PURE__ */ s(t, { onClick: a, children: n.confirmMaxSlippage.replace(
|
|
11450
11454
|
"{slippagePercentage}",
|
|
11451
11455
|
`${Math.abs(o)}`
|
|
11452
11456
|
) }) : e;
|
|
11453
|
-
},
|
|
11457
|
+
}, gN = () => {
|
|
11454
11458
|
const { chainId: e } = A(), [t] = z(), n = he({ address: t.address, chainId: e }), r = Al(), o = dn(Math.min(0, r));
|
|
11455
11459
|
return {
|
|
11456
11460
|
receiveToken: {
|
|
@@ -11460,8 +11464,8 @@ const Jl = (e) => {
|
|
|
11460
11464
|
swapDiff: r,
|
|
11461
11465
|
themeType: o
|
|
11462
11466
|
};
|
|
11463
|
-
},
|
|
11464
|
-
const { receiveToken: e, swapDiff: t, themeType: n } =
|
|
11467
|
+
}, fN = () => {
|
|
11468
|
+
const { receiveToken: e, swapDiff: t, themeType: n } = gN();
|
|
11465
11469
|
return /* @__PURE__ */ s(
|
|
11466
11470
|
en,
|
|
11467
11471
|
{
|
|
@@ -11476,7 +11480,7 @@ const Jl = (e) => {
|
|
|
11476
11480
|
type: n
|
|
11477
11481
|
}
|
|
11478
11482
|
);
|
|
11479
|
-
},
|
|
11483
|
+
}, vN = () => {
|
|
11480
11484
|
const e = x(), { stablePrecision: t } = Z(), [n] = z(), r = Me(), { minExpectedReceiveAmount: o } = _o(), a = dn(r), i = a === Y.DEFAULT ? e.withdrawSlippageWarning : e.highSlippageWarning;
|
|
11481
11485
|
return {
|
|
11482
11486
|
themeType: a,
|
|
@@ -11490,8 +11494,8 @@ const Jl = (e) => {
|
|
|
11490
11494
|
decimals: t
|
|
11491
11495
|
})} ${n.symbol}`
|
|
11492
11496
|
};
|
|
11493
|
-
},
|
|
11494
|
-
const e = x(), { slippageTooltipText: t, slippagePlaceholder: n, minReceive: r } =
|
|
11497
|
+
}, bN = () => {
|
|
11498
|
+
const e = x(), { slippageTooltipText: t, slippagePlaceholder: n, minReceive: r } = vN(), o = P(() => [
|
|
11495
11499
|
{
|
|
11496
11500
|
tooltipText: e.exchangeRate,
|
|
11497
11501
|
label: e.rate,
|
|
@@ -11521,19 +11525,19 @@ const Jl = (e) => {
|
|
|
11521
11525
|
e.rate
|
|
11522
11526
|
]);
|
|
11523
11527
|
return /* @__PURE__ */ s(Xr, { collapseItems: o });
|
|
11524
|
-
},
|
|
11528
|
+
}, yN = ({ children: e }) => /* @__PURE__ */ w(X.Meta, { children: [
|
|
11525
11529
|
/* @__PURE__ */ s("div", { className: "dtw-bg-[var(--panel-meta-action-panel-bg)]", children: e }),
|
|
11526
|
-
/* @__PURE__ */ s(
|
|
11527
|
-
] }),
|
|
11530
|
+
/* @__PURE__ */ s(bN, {})
|
|
11531
|
+
] }), TN = () => (wC(), /* @__PURE__ */ w(R, { children: [
|
|
11528
11532
|
/* @__PURE__ */ w(X.InputGroup, { children: [
|
|
11529
|
-
/* @__PURE__ */ s(
|
|
11530
|
-
/* @__PURE__ */ s(
|
|
11533
|
+
/* @__PURE__ */ s(mN, {}),
|
|
11534
|
+
/* @__PURE__ */ s(fN, {})
|
|
11531
11535
|
] }),
|
|
11532
|
-
/* @__PURE__ */ s(
|
|
11533
|
-
/* @__PURE__ */ s(
|
|
11536
|
+
/* @__PURE__ */ s(yN, { children: /* @__PURE__ */ s(Do, { children: /* @__PURE__ */ w("div", { className: "tw-flex tw-flex-col tw-gap-2", children: [
|
|
11537
|
+
/* @__PURE__ */ s(hN, { children: /* @__PURE__ */ s(_l, {}) }),
|
|
11534
11538
|
/* @__PURE__ */ s(Rl, { highlighted: !1 })
|
|
11535
11539
|
] }) }) })
|
|
11536
|
-
] })),
|
|
11540
|
+
] })), AN = () => {
|
|
11537
11541
|
const { chainId: e, address: t } = A(), { exitFeeNumber: n } = xo({
|
|
11538
11542
|
address: t,
|
|
11539
11543
|
chainId: e
|
|
@@ -11562,7 +11566,7 @@ const Jl = (e) => {
|
|
|
11562
11566
|
i,
|
|
11563
11567
|
a
|
|
11564
11568
|
]);
|
|
11565
|
-
},
|
|
11569
|
+
}, SN = () => {
|
|
11566
11570
|
const e = x(), t = Ae(), n = () => t({
|
|
11567
11571
|
type: "MERGE_OVERLAY",
|
|
11568
11572
|
payload: { type: j.LIMIT_ORDER_WITHDRAW, isOpen: !0 }
|
|
@@ -11571,8 +11575,8 @@ const Jl = (e) => {
|
|
|
11571
11575
|
label: e.withdrawAction,
|
|
11572
11576
|
openLimitOrderWithdrawOverlay: n
|
|
11573
11577
|
};
|
|
11574
|
-
},
|
|
11575
|
-
const { ActionButton: e = K } = W(), { label: t, openLimitOrderWithdrawOverlay: n } =
|
|
11578
|
+
}, xN = () => {
|
|
11579
|
+
const { ActionButton: e = K } = W(), { label: t, openLimitOrderWithdrawOverlay: n } = SN();
|
|
11576
11580
|
return /* @__PURE__ */ s(e, { onClick: n, children: t });
|
|
11577
11581
|
}, Or = [
|
|
11578
11582
|
{
|
|
@@ -11596,7 +11600,7 @@ const Jl = (e) => {
|
|
|
11596
11600
|
leveragedCollateralValueFormatted: ae({
|
|
11597
11601
|
value: e
|
|
11598
11602
|
})
|
|
11599
|
-
}), Wa = ({ tokenAddress: e }) => vd(e), Ua = ({ tokenAddress: e }) => G(bd().address, e),
|
|
11603
|
+
}), Wa = ({ tokenAddress: e }) => vd(e), Ua = ({ tokenAddress: e }) => G(bd().address, e), CN = ({
|
|
11600
11604
|
config: e,
|
|
11601
11605
|
composition: t,
|
|
11602
11606
|
sendTokenValue: n
|
|
@@ -11629,7 +11633,7 @@ const Jl = (e) => {
|
|
|
11629
11633
|
const d = t.find(Ua), p = d ? tn(d) : 0, m = zr(t) * p / (p + c);
|
|
11630
11634
|
return Gr(m, n);
|
|
11631
11635
|
}, uc = () => {
|
|
11632
|
-
const e = A(), t = ct(e), [n] = $(), r = Te(e), o = Number(n.value || "0") * Number(r), a =
|
|
11636
|
+
const e = A(), t = ct(e), [n] = $(), r = Te(e), o = Number(n.value || "0") * Number(r), a = CN({
|
|
11633
11637
|
config: e,
|
|
11634
11638
|
composition: t,
|
|
11635
11639
|
sendTokenValue: o
|
|
@@ -11671,7 +11675,7 @@ const Jl = (e) => {
|
|
|
11671
11675
|
}, mc = () => {
|
|
11672
11676
|
const { chainId: e, onDemandWithdrawalEnabled: t } = A(), { requiresLeveragedCollateralLiquidity: n } = uc(), r = nr(), o = dc();
|
|
11673
11677
|
return n && !!o && !!t && (e === Wn.id || !r);
|
|
11674
|
-
},
|
|
11678
|
+
}, EN = () => {
|
|
11675
11679
|
const { address: e, chainId: t, maintenance: n, maintenanceWithdrawals: r, symbol: o } = A(), [a] = $(), i = Ae(), l = mc(), c = tr(), { data: d = 0 } = sA({
|
|
11676
11680
|
address: e,
|
|
11677
11681
|
chainId: t
|
|
@@ -11700,7 +11704,7 @@ const Jl = (e) => {
|
|
|
11700
11704
|
isLimitOrderWithdraw: l,
|
|
11701
11705
|
insufficientBalance: c
|
|
11702
11706
|
};
|
|
11703
|
-
},
|
|
11707
|
+
}, IN = ({
|
|
11704
11708
|
children: e
|
|
11705
11709
|
}) => {
|
|
11706
11710
|
const { ActionButton: t = K } = W(), n = x(), {
|
|
@@ -11715,7 +11719,7 @@ const Jl = (e) => {
|
|
|
11715
11719
|
poolSymbol: m,
|
|
11716
11720
|
isLimitOrderWithdraw: u,
|
|
11717
11721
|
insufficientBalance: h
|
|
11718
|
-
} =
|
|
11722
|
+
} = EN();
|
|
11719
11723
|
return r ? /* @__PURE__ */ s(t, { disabled: !0, children: n.sellNow }) : p ? /* @__PURE__ */ s(
|
|
11720
11724
|
Pn,
|
|
11721
11725
|
{
|
|
@@ -11731,11 +11735,11 @@ const Jl = (e) => {
|
|
|
11731
11735
|
promptText: n.withdrawCooldown.replace("{tokenSymbol}", i).replace("{cooldownEndTime}", c),
|
|
11732
11736
|
children: n.sellNow
|
|
11733
11737
|
}
|
|
11734
|
-
) : h ? /* @__PURE__ */ s(t, { disabled: !0, children: n.insufficientBalance }) : u ? /* @__PURE__ */ s(
|
|
11738
|
+
) : h ? /* @__PURE__ */ s(t, { disabled: !0, children: n.insufficientBalance }) : u ? /* @__PURE__ */ s(xN, {}) : a ? /* @__PURE__ */ s(t, { onClick: d, children: n.confirmMaxSlippage.replace(
|
|
11735
11739
|
"{slippagePercentage}",
|
|
11736
11740
|
`${Math.abs(l)}`
|
|
11737
11741
|
) }) : e;
|
|
11738
|
-
},
|
|
11742
|
+
}, NN = () => {
|
|
11739
11743
|
const { address: e, chainId: t } = A(), [n, r] = $(), o = Be({
|
|
11740
11744
|
symbol: n.symbol,
|
|
11741
11745
|
address: n.address
|
|
@@ -11746,7 +11750,7 @@ const Jl = (e) => {
|
|
|
11746
11750
|
balance: o,
|
|
11747
11751
|
price: a
|
|
11748
11752
|
};
|
|
11749
|
-
},
|
|
11753
|
+
}, ON = () => {
|
|
11750
11754
|
const { chainId: e } = A(), [t, n] = z(), r = he({ address: t.address, chainId: e });
|
|
11751
11755
|
return {
|
|
11752
11756
|
...t,
|
|
@@ -11754,8 +11758,8 @@ const Jl = (e) => {
|
|
|
11754
11758
|
price: r,
|
|
11755
11759
|
displayCalculatedValue: t.symbol !== Ce.symbol
|
|
11756
11760
|
};
|
|
11757
|
-
},
|
|
11758
|
-
const e =
|
|
11761
|
+
}, _N = () => {
|
|
11762
|
+
const e = NN(), t = ON();
|
|
11759
11763
|
return {
|
|
11760
11764
|
sendToken: e,
|
|
11761
11765
|
onInputChange: (r) => {
|
|
@@ -11763,8 +11767,8 @@ const Jl = (e) => {
|
|
|
11763
11767
|
},
|
|
11764
11768
|
receiveToken: t
|
|
11765
11769
|
};
|
|
11766
|
-
},
|
|
11767
|
-
const { sendToken: e, onInputChange: t, receiveToken: n } =
|
|
11770
|
+
}, PN = () => {
|
|
11771
|
+
const { sendToken: e, onInputChange: t, receiveToken: n } = _N();
|
|
11768
11772
|
return /* @__PURE__ */ w(R, { children: [
|
|
11769
11773
|
/* @__PURE__ */ s(
|
|
11770
11774
|
en,
|
|
@@ -11796,7 +11800,7 @@ const Jl = (e) => {
|
|
|
11796
11800
|
}
|
|
11797
11801
|
)
|
|
11798
11802
|
] });
|
|
11799
|
-
}, za = "delete_limit_order_withdraw",
|
|
11803
|
+
}, za = "delete_limit_order_withdraw", DN = () => {
|
|
11800
11804
|
const { address: e, symbol: t, chainId: n } = A(), r = ie()[1], o = Qe({ action: za }), { send: a } = ye({
|
|
11801
11805
|
onSettled: o,
|
|
11802
11806
|
contractId: "limitOrder",
|
|
@@ -11808,7 +11812,7 @@ const Jl = (e) => {
|
|
|
11808
11812
|
symbol: t,
|
|
11809
11813
|
chainId: n
|
|
11810
11814
|
}), a(e)), [n, a, t, r, e]);
|
|
11811
|
-
},
|
|
11815
|
+
}, kN = () => {
|
|
11812
11816
|
const { account: e = O } = B(), { address: t, chainId: n } = A(), { data: r } = hn({
|
|
11813
11817
|
userAddress: e,
|
|
11814
11818
|
vaultAddress: t,
|
|
@@ -11821,8 +11825,8 @@ const Jl = (e) => {
|
|
|
11821
11825
|
pendingLimitOrderWithdrawAmount: a
|
|
11822
11826
|
};
|
|
11823
11827
|
}, [r]);
|
|
11824
|
-
},
|
|
11825
|
-
const { address: e, chainId: t, symbol: n } = A(), { hasPendingLimitOrderWithdraw: r, pendingLimitOrderWithdrawAmount: o } =
|
|
11828
|
+
}, LN = () => {
|
|
11829
|
+
const { address: e, chainId: t, symbol: n } = A(), { hasPendingLimitOrderWithdraw: r, pendingLimitOrderWithdrawAmount: o } = kN(), a = Te({ address: e, chainId: t }), i = DN(), c = ie()[0].some(
|
|
11826
11830
|
(u) => u.action === "delete_limit_order_withdraw"
|
|
11827
11831
|
), d = yd(
|
|
11828
11832
|
o,
|
|
@@ -11836,7 +11840,7 @@ const Jl = (e) => {
|
|
|
11836
11840
|
cancel: i,
|
|
11837
11841
|
isCancelling: c
|
|
11838
11842
|
};
|
|
11839
|
-
},
|
|
11843
|
+
}, RN = () => {
|
|
11840
11844
|
const e = x(), {
|
|
11841
11845
|
hasPendingLimitOrderWithdraw: t,
|
|
11842
11846
|
symbol: n,
|
|
@@ -11844,7 +11848,7 @@ const Jl = (e) => {
|
|
|
11844
11848
|
formattedUsdValue: o,
|
|
11845
11849
|
cancel: a,
|
|
11846
11850
|
isCancelling: i
|
|
11847
|
-
} =
|
|
11851
|
+
} = LN();
|
|
11848
11852
|
return t ? /* @__PURE__ */ s(gt, { type: "info", className: "dtw-mb-2", children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-justify-between dtw-gap-3", children: [
|
|
11849
11853
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-min-w-0", children: [
|
|
11850
11854
|
/* @__PURE__ */ w("span", { className: "dtw-text-sm dtw-font-medium dtw-flex dtw-items-center dtw-gap-1.5", children: [
|
|
@@ -11869,7 +11873,7 @@ const Jl = (e) => {
|
|
|
11869
11873
|
}
|
|
11870
11874
|
)
|
|
11871
11875
|
] }) }) : null;
|
|
11872
|
-
},
|
|
11876
|
+
}, $N = () => {
|
|
11873
11877
|
const e = x(), { address: t, chainId: n } = A(), [{ isMaxSlippageLoading: r }] = ne(), { exitFeeNumber: o } = xo({
|
|
11874
11878
|
address: t,
|
|
11875
11879
|
chainId: n
|
|
@@ -11882,7 +11886,7 @@ const Jl = (e) => {
|
|
|
11882
11886
|
minReceivedText: e.estimatedMultiAssetFractions,
|
|
11883
11887
|
showMinReceivedText: i
|
|
11884
11888
|
};
|
|
11885
|
-
},
|
|
11889
|
+
}, BN = () => {
|
|
11886
11890
|
const e = x(), {
|
|
11887
11891
|
slippageTooltipText: t,
|
|
11888
11892
|
slippagePlaceholder: n,
|
|
@@ -11890,7 +11894,7 @@ const Jl = (e) => {
|
|
|
11890
11894
|
exitFee: o,
|
|
11891
11895
|
minReceivedText: a,
|
|
11892
11896
|
showMinReceivedText: i
|
|
11893
|
-
} =
|
|
11897
|
+
} = $N(), l = P(() => {
|
|
11894
11898
|
const c = [
|
|
11895
11899
|
{
|
|
11896
11900
|
tooltipText: e.exchangeRate,
|
|
@@ -11940,13 +11944,13 @@ const Jl = (e) => {
|
|
|
11940
11944
|
a
|
|
11941
11945
|
]);
|
|
11942
11946
|
return /* @__PURE__ */ s(Xr, { collapseItems: l });
|
|
11943
|
-
},
|
|
11947
|
+
}, MN = ({ children: e }) => {
|
|
11944
11948
|
const { WithdrawMetaInfo: t, AvailableLiquidityAlert: n, OnDemandWithdrawAlert: r } = W(), {
|
|
11945
11949
|
requiresLeveragedCollateralLiquidity: o,
|
|
11946
11950
|
leveragedCollateralValueFormatted: a
|
|
11947
11951
|
} = uc(), i = mc();
|
|
11948
11952
|
return /* @__PURE__ */ w(X.Meta, { children: [
|
|
11949
|
-
/* @__PURE__ */ s(
|
|
11953
|
+
/* @__PURE__ */ s(RN, {}),
|
|
11950
11954
|
/* @__PURE__ */ s("div", { children: o ? i ? /* @__PURE__ */ s(R, { children: !!r && /* @__PURE__ */ s(r, {}) }) : /* @__PURE__ */ s(R, { children: !!n && /* @__PURE__ */ s(
|
|
11951
11955
|
n,
|
|
11952
11956
|
{
|
|
@@ -11954,44 +11958,44 @@ const Jl = (e) => {
|
|
|
11954
11958
|
}
|
|
11955
11959
|
) }) : null }),
|
|
11956
11960
|
/* @__PURE__ */ s("div", { className: "dtw-bg-[var(--panel-meta-action-panel-bg)]", children: e }),
|
|
11957
|
-
/* @__PURE__ */ s(
|
|
11961
|
+
/* @__PURE__ */ s(BN, {}),
|
|
11958
11962
|
t && /* @__PURE__ */ s(t, {})
|
|
11959
11963
|
] });
|
|
11960
|
-
},
|
|
11964
|
+
}, FN = () => {
|
|
11961
11965
|
const e = x();
|
|
11962
|
-
return
|
|
11963
|
-
/* @__PURE__ */ s(X.InputGroup, { children: /* @__PURE__ */ s(
|
|
11964
|
-
/* @__PURE__ */ s(
|
|
11965
|
-
/* @__PURE__ */ s(
|
|
11966
|
+
return AN(), /* @__PURE__ */ w(R, { children: [
|
|
11967
|
+
/* @__PURE__ */ s(X.InputGroup, { children: /* @__PURE__ */ s(PN, {}) }),
|
|
11968
|
+
/* @__PURE__ */ s(MN, { children: /* @__PURE__ */ s(Do, { children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-w-full", children: [
|
|
11969
|
+
/* @__PURE__ */ s(IN, { children: /* @__PURE__ */ s(_l, {}) }),
|
|
11966
11970
|
/* @__PURE__ */ s(Nl, { highlighted: !1, children: e.stopOrder })
|
|
11967
11971
|
] }) }) })
|
|
11968
11972
|
] });
|
|
11969
|
-
},
|
|
11970
|
-
|
|
11973
|
+
}, WN = () => {
|
|
11974
|
+
pC();
|
|
11971
11975
|
const { isCompleteWithdrawStep: e } = Ft();
|
|
11972
11976
|
return {
|
|
11973
11977
|
isCompleteWithdrawStep: e
|
|
11974
11978
|
};
|
|
11975
|
-
},
|
|
11976
|
-
const { isCompleteWithdrawStep: e } =
|
|
11977
|
-
return e ? /* @__PURE__ */ s(
|
|
11978
|
-
},
|
|
11979
|
+
}, UN = () => {
|
|
11980
|
+
const { isCompleteWithdrawStep: e } = WN();
|
|
11981
|
+
return e ? /* @__PURE__ */ s(TN, {}) : /* @__PURE__ */ s(FN, {});
|
|
11982
|
+
}, zN = () => /* @__PURE__ */ s(X.Panel, { children: /* @__PURE__ */ s(UN, {}) }), GN = ({ tradingType: e }) => /* @__PURE__ */ w(Xa, { selectedIndex: St.indexOf(e), children: [
|
|
11979
11983
|
/* @__PURE__ */ s(Za, { className: "dtw-flex", children: St.map((t) => /* @__PURE__ */ s(Ga, { className: "dtw-hidden" }, t)) }),
|
|
11980
11984
|
/* @__PURE__ */ w(Ja, { children: [
|
|
11981
|
-
/* @__PURE__ */ s(X.Settings, { children: /* @__PURE__ */ s(
|
|
11982
|
-
/* @__PURE__ */ s(X.Settings, { children: /* @__PURE__ */ s(
|
|
11985
|
+
/* @__PURE__ */ s(X.Settings, { children: /* @__PURE__ */ s(RS, {}) }),
|
|
11986
|
+
/* @__PURE__ */ s(X.Settings, { children: /* @__PURE__ */ s(dN, {}) })
|
|
11983
11987
|
] })
|
|
11984
|
-
] }),
|
|
11988
|
+
] }), HN = ({ children: e }) => /* @__PURE__ */ w(Za, { className: "dtw-flex dtw-px-[var(--panel-tab-group-px)] dtw-justify-between dtw-items-center", children: [
|
|
11985
11989
|
/* @__PURE__ */ s("div", { className: "dtw-bg-[var(--panel-tab-list-bg)] dtw-rounded-[var(--panel-tab-list-radius)] dtw-px-[var(--panel-tab-list-px)] dtw-py-[var(--panel-tab-list-py)]", children: St.map((t) => /* @__PURE__ */ s(Ap, { tradingType: t }, t)) }),
|
|
11986
11990
|
e
|
|
11987
|
-
] }),
|
|
11991
|
+
] }), VN = St.reduce(
|
|
11988
11992
|
(e, t, n) => (e[n] = t, e),
|
|
11989
11993
|
{}
|
|
11990
|
-
),
|
|
11994
|
+
), jN = () => {
|
|
11991
11995
|
const [e] = De(), t = A(), { standalone: n } = Z();
|
|
11992
|
-
|
|
11996
|
+
gC();
|
|
11993
11997
|
const r = xl(), o = (a) => {
|
|
11994
|
-
const i =
|
|
11998
|
+
const i = VN[a];
|
|
11995
11999
|
i && r(i);
|
|
11996
12000
|
};
|
|
11997
12001
|
return E(() => {
|
|
@@ -12002,8 +12006,8 @@ const Jl = (e) => {
|
|
|
12002
12006
|
type: e,
|
|
12003
12007
|
onTabChange: o
|
|
12004
12008
|
};
|
|
12005
|
-
},
|
|
12006
|
-
const { type: e, onTabChange: t } =
|
|
12009
|
+
}, qN = () => {
|
|
12010
|
+
const { type: e, onTabChange: t } = jN();
|
|
12007
12011
|
return /* @__PURE__ */ w("div", { className: "trading-widget dtw-relative dtw-pt-3 dtw-bg-[var(--panel-background-color)] dtw-text-[color:var(--panel-content-color)] dtw-rounded-[var(--widget-radius)] md:dtw-rounded-[var(--widget-radius-md)] dtw-overflow-hidden dtw-h-full", children: [
|
|
12008
12012
|
/* @__PURE__ */ w(
|
|
12009
12013
|
Xa,
|
|
@@ -12012,32 +12016,32 @@ const Jl = (e) => {
|
|
|
12012
12016
|
onChange: t,
|
|
12013
12017
|
className: "dtw-flex dtw-flex-col dtw-h-full",
|
|
12014
12018
|
children: [
|
|
12015
|
-
/* @__PURE__ */ s(
|
|
12016
|
-
/* @__PURE__ */ s(
|
|
12017
|
-
/* @__PURE__ */ s(
|
|
12019
|
+
/* @__PURE__ */ s(HN, { children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-2 dtw-items-center dtw-justify-end", children: [
|
|
12020
|
+
/* @__PURE__ */ s(kC, {}),
|
|
12021
|
+
/* @__PURE__ */ s(GN, { tradingType: e })
|
|
12018
12022
|
] }) }),
|
|
12019
12023
|
/* @__PURE__ */ w(Ja, { className: "dtw-flex-1 dtw-overflow-y-auto", children: [
|
|
12020
|
-
/* @__PURE__ */ s(
|
|
12021
|
-
/* @__PURE__ */ s(
|
|
12024
|
+
/* @__PURE__ */ s(FC, {}),
|
|
12025
|
+
/* @__PURE__ */ s(zN, {})
|
|
12022
12026
|
] })
|
|
12023
12027
|
]
|
|
12024
12028
|
}
|
|
12025
12029
|
),
|
|
12026
|
-
/* @__PURE__ */ w(
|
|
12027
|
-
/* @__PURE__ */ s(
|
|
12028
|
-
/* @__PURE__ */ s(
|
|
12029
|
-
/* @__PURE__ */ s(
|
|
12030
|
-
/* @__PURE__ */ s(
|
|
12031
|
-
/* @__PURE__ */ s(
|
|
12032
|
-
/* @__PURE__ */ s(
|
|
12033
|
-
/* @__PURE__ */ s(
|
|
12034
|
-
/* @__PURE__ */ s(
|
|
12035
|
-
/* @__PURE__ */ s(
|
|
12036
|
-
/* @__PURE__ */ s(
|
|
12037
|
-
/* @__PURE__ */ s(
|
|
12030
|
+
/* @__PURE__ */ w(UC, { children: [
|
|
12031
|
+
/* @__PURE__ */ s(zC, { type: j.TERMS_OF_USE }),
|
|
12032
|
+
/* @__PURE__ */ s(GC, { type: j.HIGH_SLIPPAGE }),
|
|
12033
|
+
/* @__PURE__ */ s(HC, { type: j.HYPEREVM_WARNING }),
|
|
12034
|
+
/* @__PURE__ */ s(XC, { type: j.TOKEN_SELECT, searchQuery: "" }),
|
|
12035
|
+
/* @__PURE__ */ s(tE, { type: j.POOL_SELECT, searchQuery: "" }),
|
|
12036
|
+
/* @__PURE__ */ s(fE, { type: j.TRADING }),
|
|
12037
|
+
/* @__PURE__ */ s(dI, { type: j.LIMIT_SELLS }),
|
|
12038
|
+
/* @__PURE__ */ s(kI, { type: j.LIMIT_BUYS }),
|
|
12039
|
+
/* @__PURE__ */ s(jI, { type: j.LIMIT_ORDER_WITHDRAW }),
|
|
12040
|
+
/* @__PURE__ */ s(cN, { type: j.WITHDRAW_STEPPER }),
|
|
12041
|
+
/* @__PURE__ */ s(NE, { type: j.ERROR_NOTIFICATION })
|
|
12038
12042
|
] })
|
|
12039
12043
|
] });
|
|
12040
|
-
},
|
|
12044
|
+
}, KN = ({
|
|
12041
12045
|
children: e,
|
|
12042
12046
|
config: t,
|
|
12043
12047
|
className: n
|
|
@@ -12290,14 +12294,14 @@ const Jl = (e) => {
|
|
|
12290
12294
|
},
|
|
12291
12295
|
children: e
|
|
12292
12296
|
}
|
|
12293
|
-
),
|
|
12297
|
+
), YN = ({
|
|
12294
12298
|
children: e,
|
|
12295
12299
|
config: t,
|
|
12296
12300
|
theme: n,
|
|
12297
12301
|
components: r,
|
|
12298
12302
|
translation: o,
|
|
12299
12303
|
className: a
|
|
12300
|
-
}) => /* @__PURE__ */ s(yp, { config: o, children: /* @__PURE__ */ s(
|
|
12304
|
+
}) => /* @__PURE__ */ s(yp, { config: o, children: /* @__PURE__ */ s(KN, { config: n, className: a, children: /* @__PURE__ */ s(Gy, { config: t, children: /* @__PURE__ */ s(Xy, { config: r, children: /* @__PURE__ */ s(_A, { children: e }) }) }) }) }), MO = (e) => /* @__PURE__ */ s(YN, { ...e, children: /* @__PURE__ */ s(qN, {}) }), wc = ({
|
|
12301
12305
|
title: e,
|
|
12302
12306
|
children: t,
|
|
12303
12307
|
className: n,
|
|
@@ -12362,7 +12366,7 @@ const Jl = (e) => {
|
|
|
12362
12366
|
] }) })
|
|
12363
12367
|
}
|
|
12364
12368
|
);
|
|
12365
|
-
},
|
|
12369
|
+
}, QN = () => {
|
|
12366
12370
|
const e = Ot(), { isModalOpen: t, pendingTransaction: n } = Se(), { setIsModalOpen: r } = Wt(), o = b(() => {
|
|
12367
12371
|
r(!0), e?.(at.OPEN_LIMIT_SELL_VIEW, {
|
|
12368
12372
|
[yt.SOURCE.NAME]: "modal"
|
|
@@ -12374,8 +12378,8 @@ const Jl = (e) => {
|
|
|
12374
12378
|
onClose: a,
|
|
12375
12379
|
isTransactionPending: !!n
|
|
12376
12380
|
};
|
|
12377
|
-
},
|
|
12378
|
-
const { onOpen: n, isModalOpen: r, onClose: o, isTransactionPending: a } =
|
|
12381
|
+
}, XN = ({ children: e, themeConfig: t }) => {
|
|
12382
|
+
const { onOpen: n, isModalOpen: r, onClose: o, isTransactionPending: a } = QN(), i = Fe();
|
|
12379
12383
|
Xl();
|
|
12380
12384
|
const l = b(
|
|
12381
12385
|
({ children: c }) => /* @__PURE__ */ s(ur, { config: t, children: c }),
|
|
@@ -12401,7 +12405,7 @@ const Jl = (e) => {
|
|
|
12401
12405
|
}
|
|
12402
12406
|
)
|
|
12403
12407
|
] });
|
|
12404
|
-
},
|
|
12408
|
+
}, FO = ({
|
|
12405
12409
|
children: e,
|
|
12406
12410
|
vaultChainId: t,
|
|
12407
12411
|
vaultAddress: n,
|
|
@@ -12434,8 +12438,8 @@ const Jl = (e) => {
|
|
|
12434
12438
|
m
|
|
12435
12439
|
]
|
|
12436
12440
|
);
|
|
12437
|
-
return d ? /* @__PURE__ */ s(Fl, { config: o, children: /* @__PURE__ */ s(Vl, { initialState: u, actions: i, children: /* @__PURE__ */ s(
|
|
12438
|
-
},
|
|
12441
|
+
return d ? /* @__PURE__ */ s(Fl, { config: o, children: /* @__PURE__ */ s(Vl, { initialState: u, actions: i, children: /* @__PURE__ */ s(XN, { themeConfig: l, children: e }) }) }) : null;
|
|
12442
|
+
}, ZN = ({ children: e, themeConfig: t, isOpen: n, onOpen: r, onClose: o }) => {
|
|
12439
12443
|
const a = mt(), i = b(
|
|
12440
12444
|
({ children: l }) => /* @__PURE__ */ s(ur, { config: t, children: l }),
|
|
12441
12445
|
[t]
|
|
@@ -12460,7 +12464,7 @@ const Jl = (e) => {
|
|
|
12460
12464
|
}
|
|
12461
12465
|
)
|
|
12462
12466
|
] });
|
|
12463
|
-
},
|
|
12467
|
+
}, WO = ({
|
|
12464
12468
|
children: e,
|
|
12465
12469
|
vaultChainId: t,
|
|
12466
12470
|
vaultAddress: n,
|
|
@@ -12500,7 +12504,7 @@ const Jl = (e) => {
|
|
|
12500
12504
|
initialState: h,
|
|
12501
12505
|
actions: g,
|
|
12502
12506
|
children: /* @__PURE__ */ s(
|
|
12503
|
-
|
|
12507
|
+
ZN,
|
|
12504
12508
|
{
|
|
12505
12509
|
isOpen: c,
|
|
12506
12510
|
onOpen: m,
|
|
@@ -12513,25 +12517,25 @@ const Jl = (e) => {
|
|
|
12513
12517
|
) });
|
|
12514
12518
|
};
|
|
12515
12519
|
export {
|
|
12516
|
-
|
|
12517
|
-
|
|
12520
|
+
qO as ALCHEMY_RPC_URL_MAP,
|
|
12521
|
+
KO as AaveLendingPoolAbi,
|
|
12518
12522
|
O as AddressZero,
|
|
12519
12523
|
fs as BRIDGED_TOKENS_SYMBOLS,
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12524
|
+
YO as BRIDGED_USDC_ARBITRUM,
|
|
12525
|
+
QO as BRIDGED_USDC_OPTIMISM,
|
|
12526
|
+
XO as BRIDGED_USDC_POLYGON,
|
|
12527
|
+
ZO as CBBTC_BASE,
|
|
12528
|
+
JO as CBETH_BASE,
|
|
12529
|
+
e_ as CHAIN_MAP,
|
|
12526
12530
|
qt as CHAIN_NATIVE_TOKENS,
|
|
12527
12531
|
Os as COMPLETE_WITHDRAW_ACTIONS,
|
|
12528
|
-
|
|
12532
|
+
t_ as CURRENCY_SYMBOL_MAP,
|
|
12529
12533
|
Gy as ConfigProvider,
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12534
|
+
n_ as DAI_OPTIMISM,
|
|
12535
|
+
r_ as DAI_POLYGON,
|
|
12536
|
+
o_ as DEFAULT_DEPOSIT_METHOD,
|
|
12533
12537
|
ys as DEFAULT_DEPOSIT_SLIPPAGE,
|
|
12534
|
-
|
|
12538
|
+
a_ as DEFAULT_DEPOSIT_SLIPPAGE_SCALE,
|
|
12535
12539
|
Td as DEFAULT_ERROR_MESSAGE,
|
|
12536
12540
|
_d as DEFAULT_LOCK_TIME,
|
|
12537
12541
|
Cd as DEFAULT_MAX_GAS_LIMIT,
|
|
@@ -12541,7 +12545,7 @@ export {
|
|
|
12541
12545
|
Ed as DEFAULT_PROMISE_TIMEOUT_MS,
|
|
12542
12546
|
Wo as DEFAULT_SIMULATION_ERROR,
|
|
12543
12547
|
gs as DEFAULT_WITHDRAW_SLIPPAGE,
|
|
12544
|
-
|
|
12548
|
+
FA as EIP712_TYPES,
|
|
12545
12549
|
Sd as EMPTY_POOL_CONFIG,
|
|
12546
12550
|
Dd as EXTENDED_POLLING_INTERVAL,
|
|
12547
12551
|
rt as EasySwapperV2Abi,
|
|
@@ -12549,97 +12553,97 @@ export {
|
|
|
12549
12553
|
Fo as GAS_ESTIMATION_ERROR,
|
|
12550
12554
|
xd as GAS_LIMIT_BUFFER_COEFF,
|
|
12551
12555
|
Ii as GET_ALL_LIMIT_SELL_ORDER_IDS_FUNCTION_NAME,
|
|
12552
|
-
|
|
12553
|
-
|
|
12556
|
+
s_ as GMX_MARKET_ASSETS,
|
|
12557
|
+
i_ as GMX_MARKET_ASSETS_MAP,
|
|
12554
12558
|
Xi as LIMIT_BUY_MANAGER_ADDRESS_MAP,
|
|
12555
12559
|
Qi as LIMIT_BUY_SLIPPAGE_PERCENT_DECIMALS,
|
|
12556
12560
|
go as LIMIT_SELL_ORDER_READ_FUNCTION_NAME,
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
+
l_ as LINK_ARBITRUM,
|
|
12562
|
+
c_ as LINK_OPTIMISM,
|
|
12563
|
+
WO as LimitBuyOrderModal,
|
|
12564
|
+
PI as LimitBuyOverlay,
|
|
12561
12565
|
Ps as LimitOrderAbi,
|
|
12562
|
-
|
|
12566
|
+
FO as LimitSellOrderModal,
|
|
12563
12567
|
Ne as MANAGER_FEE_DENOMINATOR,
|
|
12564
12568
|
bn as MAX_GAS_LIMIT_MAP,
|
|
12565
12569
|
Ce as MULTI_ASSET_TOKEN,
|
|
12566
12570
|
_e as MaxUint256,
|
|
12567
|
-
|
|
12571
|
+
d_ as NATIVE_TOKEN_GAS_RESERVE_UNITS,
|
|
12568
12572
|
Un as OndoApiError,
|
|
12569
|
-
|
|
12573
|
+
p_ as PAXG_POLYGON,
|
|
12570
12574
|
Eo as PERMIT2_ADDRESS,
|
|
12571
|
-
|
|
12575
|
+
u_ as PYTH_API_LINK,
|
|
12572
12576
|
qe as PoolFactoryAbi,
|
|
12573
12577
|
je as PoolLogicAbi,
|
|
12574
12578
|
vt as PoolManagerLogicAbi,
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12579
|
+
m_ as RETH_BASE,
|
|
12580
|
+
w_ as RewardDistributionAbi,
|
|
12581
|
+
h_ as SETH_OPTIMISM,
|
|
12578
12582
|
Le as SHORTEN_POLLING_INTERVAL,
|
|
12579
12583
|
Id as SIMULATION_TIMEOUT_ERROR,
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12584
|
+
g_ as SUSD_OPTIMISM,
|
|
12585
|
+
f_ as TBTC_ARBITRUM,
|
|
12586
|
+
v_ as TBTC_BASE,
|
|
12587
|
+
b_ as TBTC_OPTIMISM,
|
|
12588
|
+
y_ as TBTC_POLYGON,
|
|
12585
12589
|
yt as TRADING_LOG_EVENT_PARAM,
|
|
12586
12590
|
at as TRADING_PANEL_LOG_EVENT,
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12591
|
+
TO as TradingPanelProvider,
|
|
12592
|
+
MO as TradingWidget,
|
|
12593
|
+
T_ as USDCBC_BASE,
|
|
12594
|
+
A_ as USDC_ARBITRUM,
|
|
12595
|
+
S_ as USDC_BASE,
|
|
12592
12596
|
Gt as USDC_HYPEREVM,
|
|
12593
12597
|
Je as USDC_MAINNET,
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12598
|
+
x_ as USDC_OPTIMISM,
|
|
12599
|
+
C_ as USDC_POLYGON,
|
|
12600
|
+
E_ as USDT_ARBITRUM,
|
|
12597
12601
|
zd as USDT_MAINNET,
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
+
I_ as USDT_OPTIMISM,
|
|
12603
|
+
N_ as USDT_POLYGON,
|
|
12604
|
+
O_ as WBNB_ARBITRUM,
|
|
12605
|
+
__ as WBTC_ARBITRUM,
|
|
12602
12606
|
Wd as WBTC_BY_CHAIN_ID,
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12607
|
+
P_ as WBTC_MAINNET,
|
|
12608
|
+
D_ as WBTC_OPTIMISM,
|
|
12609
|
+
k_ as WBTC_POLYGON,
|
|
12610
|
+
L_ as WETH_ARBITRUM,
|
|
12611
|
+
R_ as WETH_BASE,
|
|
12608
12612
|
Fd as WETH_BY_CHAIN_ID,
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12613
|
+
$_ as WETH_MAINNET,
|
|
12614
|
+
B_ as WETH_OPTIMISM,
|
|
12615
|
+
M_ as WETH_POLYGON,
|
|
12616
|
+
F_ as WPOL_POLYGON,
|
|
12617
|
+
W_ as WSOL_ARBITRUM,
|
|
12618
|
+
U_ as WSTETH_ARBITRUM,
|
|
12619
|
+
z_ as WSTETH_BASE,
|
|
12620
|
+
G_ as WSTETH_OPTIMISM,
|
|
12621
|
+
H_ as XAUT_MAINNET,
|
|
12622
|
+
mP as arbitrum,
|
|
12623
|
+
wP as base,
|
|
12620
12624
|
xt as clientSide,
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12625
|
+
GO as commify,
|
|
12626
|
+
V_ as contractsAbisMap,
|
|
12627
|
+
j_ as contractsAddressesMap,
|
|
12628
|
+
aP as decodeErrorResult,
|
|
12629
|
+
sP as encodeFunctionData,
|
|
12630
|
+
iP as erc20Abi,
|
|
12627
12631
|
gr as formatByCurrency,
|
|
12628
|
-
|
|
12632
|
+
lP as formatEther,
|
|
12629
12633
|
Ve as formatNumberToLimitedDecimals,
|
|
12630
12634
|
vn as formatNumeratorToPercentage,
|
|
12631
12635
|
jr as formatPercentage,
|
|
12632
12636
|
ae as formatToUsd,
|
|
12633
|
-
|
|
12637
|
+
cP as formatUnits,
|
|
12634
12638
|
Mc as getContractAbiById,
|
|
12635
12639
|
Q as getContractAddressById,
|
|
12636
12640
|
bt as getConventionalTokenPriceDecimals,
|
|
12637
12641
|
Py as getErrorMessage,
|
|
12638
|
-
|
|
12642
|
+
FE as getLimitSellOrderId,
|
|
12639
12643
|
Wc as getNativeTokenInvestableBalance,
|
|
12640
12644
|
ft as getPercent,
|
|
12641
12645
|
ko as getPoolFraction,
|
|
12642
|
-
|
|
12646
|
+
dP as hexToString,
|
|
12643
12647
|
Mo as isAaveLendAndBorrowAsset,
|
|
12644
12648
|
G as isEqualAddress,
|
|
12645
12649
|
Oy as isErrorWithMessage,
|
|
@@ -12647,56 +12651,56 @@ export {
|
|
|
12647
12651
|
Bn as isNativeToken,
|
|
12648
12652
|
F as isZeroAddress,
|
|
12649
12653
|
Xt as normalizeNumber,
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12654
|
+
hP as optimism,
|
|
12655
|
+
gP as polygon,
|
|
12656
|
+
HO as removeInsignificantTrailingZeros,
|
|
12653
12657
|
tt as shiftBy,
|
|
12654
12658
|
Uc as shortenAddress,
|
|
12655
12659
|
Zr as throwOndoApiError,
|
|
12656
12660
|
_y as toErrorWithMessage,
|
|
12657
12661
|
dd as transformAddressForAnalytics,
|
|
12658
|
-
|
|
12662
|
+
pP as trim,
|
|
12659
12663
|
B as useAccount,
|
|
12660
|
-
|
|
12664
|
+
_O as useAddPoolConfig,
|
|
12661
12665
|
he as useAssetPrice,
|
|
12662
12666
|
pA as useAvailableManagerFee,
|
|
12663
12667
|
ei as useBalance,
|
|
12664
|
-
|
|
12668
|
+
K_ as useBlockNumber,
|
|
12665
12669
|
Ea as useBrowserStorage,
|
|
12666
12670
|
YT as useCheckWhitelist,
|
|
12667
12671
|
ut as useCompleteWithdrawSwapQuotes,
|
|
12668
12672
|
me as useCompleteWithdrawTrackedAssets,
|
|
12669
|
-
|
|
12673
|
+
Y_ as useConnect,
|
|
12670
12674
|
ye as useContractFunction,
|
|
12671
12675
|
QT as useContractPoolComposition,
|
|
12672
12676
|
Ei as useContractReadErrorLogging,
|
|
12673
12677
|
ho as useContractReadsErrorLogging,
|
|
12674
12678
|
jp as useCustomDepositTokensPerChain,
|
|
12675
12679
|
ol as useDebounce,
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12680
|
+
Wx as useDepositLockTime,
|
|
12681
|
+
IS as useDepositProjectedEarnings,
|
|
12682
|
+
Q_ as useDisconnect,
|
|
12679
12683
|
cn as useDytmVaultData,
|
|
12680
|
-
|
|
12684
|
+
_S as useEasySwapperTrackedAssets,
|
|
12681
12685
|
zn as useEffectiveAggregators,
|
|
12682
|
-
|
|
12683
|
-
|
|
12686
|
+
XA as useExchangeRate,
|
|
12687
|
+
$O as useFlatmoneyPointsUserBalances,
|
|
12684
12688
|
ky as useGasPrice,
|
|
12685
12689
|
Vp as useGetReferrerAddress,
|
|
12686
12690
|
Wi as useHasSingleAssetWithdrawBlockers,
|
|
12687
|
-
|
|
12691
|
+
sI as useInvalidateLimitSellOrderQuery,
|
|
12688
12692
|
Mr as useInvalidateOnBlock,
|
|
12689
12693
|
eA as useInvalidatePoolContractData,
|
|
12690
12694
|
ln as useInvalidateTradingQueries,
|
|
12691
12695
|
Ft as useIsCompleteWithdrawStep,
|
|
12692
|
-
|
|
12696
|
+
LO as useIsDepositBlocked,
|
|
12693
12697
|
st as useIsDepositTradingPanelType,
|
|
12694
12698
|
nr as useIsDhedgeVaultConnected,
|
|
12695
12699
|
tr as useIsInsufficientBalance,
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
+
AO as useIsPoolAddress,
|
|
12701
|
+
YA as useIsTradingEnabled,
|
|
12702
|
+
DO as useIsWalletConnected,
|
|
12703
|
+
BO as useLegacyReferralProgram,
|
|
12700
12704
|
$i as useManagerLogicAddress,
|
|
12701
12705
|
it as useNetwork,
|
|
12702
12706
|
Hp as useOnSimulateTransaction,
|
|
@@ -12714,18 +12718,18 @@ export {
|
|
|
12714
12718
|
or as usePoolManagerStatic,
|
|
12715
12719
|
rr as usePoolStatic,
|
|
12716
12720
|
Te as usePoolTokenPrice,
|
|
12717
|
-
|
|
12718
|
-
|
|
12721
|
+
ES as useProjectedEarningsCore,
|
|
12722
|
+
X_ as usePublicClient,
|
|
12719
12723
|
el as useRawAssetPrice,
|
|
12720
|
-
|
|
12721
|
-
|
|
12724
|
+
Z_ as useReadContract,
|
|
12725
|
+
J_ as useReadContracts,
|
|
12722
12726
|
z as useReceiveTokenInput,
|
|
12723
|
-
|
|
12727
|
+
MS as useReferralAddress,
|
|
12724
12728
|
$ as useSendTokenInput,
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
+
eP as useSendTransaction,
|
|
12730
|
+
SO as useSetPoolAddress,
|
|
12731
|
+
IO as useSetTradingType,
|
|
12732
|
+
kO as useStaticCallQuery,
|
|
12729
12733
|
an as useTokenAllowance,
|
|
12730
12734
|
q as useTradingPanelActions,
|
|
12731
12735
|
Ot as useTradingPanelLogger,
|
|
@@ -12738,28 +12742,28 @@ export {
|
|
|
12738
12742
|
se as useTradingPanelState,
|
|
12739
12743
|
ie as useTradingPanelTransactions,
|
|
12740
12744
|
De as useTradingPanelType,
|
|
12741
|
-
|
|
12745
|
+
KA as useTradingResultHandling,
|
|
12742
12746
|
Qe as useTradingSettleHandler,
|
|
12743
|
-
|
|
12744
|
-
|
|
12747
|
+
PO as useUpdateCustomDepositTokensPerChain,
|
|
12748
|
+
OO as useUpdatePoolConfig,
|
|
12745
12749
|
Fp as useUpdatePoolFallbackData,
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
+
CO as useUpdateReceiveTokenInput,
|
|
12751
|
+
xO as useUpdateSendTokenInput,
|
|
12752
|
+
NO as useUpdateTradingModal,
|
|
12753
|
+
EO as useUpdateTradingSettings,
|
|
12750
12754
|
jT as useUserBalancesDynamic,
|
|
12751
12755
|
hn as useUserLimitSellOrder,
|
|
12752
12756
|
Be as useUserTokenBalance,
|
|
12753
12757
|
So as useUserTokenSpendableBalance,
|
|
12754
12758
|
cA as useUserVaultBalance,
|
|
12755
12759
|
lA as useUserVaultsBalances,
|
|
12756
|
-
|
|
12760
|
+
RO as useVaultContractData,
|
|
12757
12761
|
wn as useVaultDepositTokens,
|
|
12758
12762
|
uA as useVaultSupplyCap,
|
|
12759
12763
|
nA as useVaultVestedPoints,
|
|
12760
|
-
|
|
12761
|
-
|
|
12764
|
+
tP as useWaitForTransactionReceipt,
|
|
12765
|
+
nP as useWalletClient,
|
|
12762
12766
|
Gn as useWithdrawAction,
|
|
12763
|
-
|
|
12764
|
-
|
|
12767
|
+
rP as useWriteContract,
|
|
12768
|
+
VO as validateLoggerEventParams
|
|
12765
12769
|
};
|