@dhedge/trading-widget 6.3.5 → 6.3.6
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/{contract-error-log-B5cBnMzk.js → contract-error-log-C72hcInG.js} +133 -128
- package/contract-error-log-xoZ1OAil.cjs +1 -0
- package/core-kit/utils/number.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.js +755 -753
- package/limit-orders/common/utils.d.ts +0 -1
- package/package.json +1 -1
- package/utils.cjs +1 -1
- package/utils.js +38 -37
- package/contract-error-log-BK2h_izP.cjs +0 -1
package/index.js
CHANGED
|
@@ -3,29 +3,29 @@ var bc = (e, t, n) => t in e ? vc(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ue = (e, t, n) => bc(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsxs as w, Fragment as R, jsx as i } from "react/jsx-runtime";
|
|
5
5
|
import { Tab as Va, Disclosure as ja, DisclosureButton as qa, Transition as Ka, DisclosurePanel as Ya, TabPanel as Qa, Popover as yc, PopoverButton as Tc, PopoverBackdrop as Ac, PopoverPanel as Sc, Field as Xa, Label as Za, Switch as xc, Checkbox as Cc, TabGroup as Ja, TabList as es, TabPanels as ts, Dialog as Ec, DialogBackdrop as Ic, DialogPanel as Nc } from "@headlessui/react";
|
|
6
|
-
import { QuestionMarkCircleIcon as kr, ExclamationCircleIcon as
|
|
6
|
+
import { QuestionMarkCircleIcon as kr, ExclamationCircleIcon as Qt, CheckCircleIcon as ns, Cog6ToothIcon as Oc, LockClosedIcon as _c, ArrowTopRightOnSquareIcon as Lr } from "@heroicons/react/24/outline";
|
|
7
7
|
import I from "classnames";
|
|
8
8
|
import { usePopperTooltip as Pc } from "react-popper-tooltip";
|
|
9
|
-
import { createContext as ge, useMemo as P, useContext as fe, useReducer as
|
|
10
|
-
import { ChevronDownIcon as rs, ArrowDownIcon as $c, ArrowPathIcon as Bc, CheckIcon as
|
|
9
|
+
import { createContext as ge, useMemo as P, useContext as fe, useReducer as Rn, useCallback as b, useState as U, useEffect as E, forwardRef as Dc, useRef as ue, Children as kc, isValidElement as Lc, Fragment as Rc } from "react";
|
|
10
|
+
import { ChevronDownIcon as rs, ArrowDownIcon as $c, ArrowPathIcon as Bc, CheckIcon as nn } from "@heroicons/react/24/solid";
|
|
11
11
|
import { XMarkIcon as os, ChevronLeftIcon as Mc } from "@heroicons/react/16/solid";
|
|
12
|
-
import { k as xt,
|
|
13
|
-
import {
|
|
14
|
-
import { i as xd, a4 as Cd, a as
|
|
12
|
+
import { k as xt, al as $n, am as Fc, a4 as Wc, A as Uc, B as Q, a3 as as, an as F, q as zc, ao as ss, $ as Bn, L as Gc, ap as G, ab as Hc, aa as tt, O as Ro, aq as ae, D as bt, N as ft, w as vn, ar as Vc, as as Xt, W as jc, P as jr, ac as qc, Q as Kc, S as Yc, o as Qc, at as $o, a2 as Xc, f as Zc, g as Jc, ae as Bo, l as ed, e as td, a5 as nd, b as rd, h as od, au as ad, n as sd, z as is, y as qr, m as hr, aj as id, s as ld, ai as cd, p as dd, a8 as ls, E as Mo, a7 as pd, v as gr, j as Fo, a6 as ud, a0 as jt, ag as md, av as cs, ad as ds, V as ps, G as us, H as wd, x as ms, a1 as ws, i as hd, aw as Ve, ax as gd, R as hs, a9 as gs, ay as Kr, az as fd, U as Wo, J as vd, I as bd, X as yd, Y as Td, K as Ad, u as Sd } from "./contract-error-log-C72hcInG.js";
|
|
13
|
+
import { aA as jO, aB as qO, ak as KO } from "./contract-error-log-C72hcInG.js";
|
|
14
|
+
import { i as xd, a4 as Cd, a as O, q as V, H as Ed, p as Mn, S as Uo, T as Id, a0 as bn, t as zo, k as Nd, r as Od, ac as _d, ab as Le, m as Pd, u as fs, n as Dd, j as kd, x as vs, ai as at, b as qt, aC as qe, aD as je, aE as rt, aF as vt, v as Ld, B as bs, $ as Ne, aG as fr, O as ys, J as Rd, at as Zt, a8 as $d, aH as Ts, aI as Go, g as As, ah as yt, a1 as Ce, aJ as Bd, K as Tt, ax as Je, aK as Md, a7 as Ss, aL as xs, o as Fd, F as Cs, I as Es, l as Wd, G as Ud, am as zd, al as Gd, D as Hd, aM as Vd, a2 as _e, z as ze, L as jd, ag as Yr, s as Is, ad as qd, y as Ns, aw as Gt, w as Os, E as Kd, an as _s, c as Ps, af as Yd, Y as Qd, ak as Ds, aN as ks, a9 as Xd, a6 as Zd, aO as Jd } from "./gmx-Cyz_GmV5.js";
|
|
15
15
|
import { A as QO, aP as XO, aQ as ZO, aR as JO, aS as e_, aT as t_, aU as n_, C as r_, e as o_, aV as a_, aW as s_, f as i_, h as l_, U as c_, V as d_, aX as p_, aY as u_, a3 as m_, aZ as w_, aa as h_, a_ as g_, a$ as f_, b0 as v_, b1 as b_, b2 as y_, b3 as T_, b4 as A_, b5 as S_, b6 as x_, aB as C_, aA as E_, az as I_, ay as N_, b7 as O_, b8 as __, b9 as P_, ba as D_, bb as k_, bc as L_, bd as R_, be as $_, bf as B_, bg as M_, bh as F_, bi as W_, bj as U_, bk as z_, bl as G_, bm as H_, bn as V_, bo as j_, bp as q_, ao as K_, ap as Y_ } from "./gmx-Cyz_GmV5.js";
|
|
16
16
|
import { CustomError as Ls } from "ts-custom-error";
|
|
17
17
|
import { injected as ep } from "wagmi/connectors";
|
|
18
|
-
import { useAccount as Rs, useConfig as Qr, useSwitchChain as tp, useReadContract as Pe, useBalance as np, useWalletClient as Xr, usePublicClient as Ct, useWriteContract as rp, useEstimateFeesPerGas as op, useBlockNumber as ap, useConnect as $s, useReadContracts as
|
|
18
|
+
import { useAccount as Rs, useConfig as Qr, useSwitchChain as tp, useReadContract as Pe, useBalance as np, useWalletClient as Xr, usePublicClient as Ct, useWriteContract as rp, useEstimateFeesPerGas as op, useBlockNumber as ap, useConnect as $s, useReadContracts as le, useWaitForTransactionReceipt as ot, useSimulateContract as sp } from "wagmi";
|
|
19
19
|
import { useBlockNumber as X_, useConnect as Z_, useDisconnect as J_, usePublicClient as eP, useReadContract as tP, useReadContracts as nP, useSendTransaction as rP, useWaitForTransactionReceipt as oP, useWalletClient as aP, useWriteContract as sP } from "wagmi";
|
|
20
20
|
import { erc20Abi as Ee, encodeFunctionData as ip, formatUnits as we, formatEther as lp, parseUnits as cp, isAddress as dp, encodeAbiParameters as pp, encodePacked as up, keccak256 as mp } from "viem";
|
|
21
21
|
import { decodeErrorResult as lP, encodeFunctionData as cP, erc20Abi as dP, formatEther as pP, formatUnits as uP, hexToString as mP, trim as wP } from "viem";
|
|
22
22
|
import D, { BigNumber as He } from "bignumber.js";
|
|
23
|
-
import { hyperEvm as
|
|
23
|
+
import { hyperEvm as Fn, base as Bs, polygon as wp, optimism as Ms, arbitrum as Wn, mainnet as Et } from "wagmi/chains";
|
|
24
24
|
import { arbitrum as gP, base as fP, optimism as vP, polygon as bP } from "wagmi/chains";
|
|
25
|
-
import { useQuery as It, useQueryClient as
|
|
25
|
+
import { useQuery as It, useQueryClient as rn } from "@tanstack/react-query";
|
|
26
26
|
import { format as hp, formatDuration as Fs, intervalToDuration as gp } from "date-fns";
|
|
27
27
|
import { readContractQueryOptions as Ws } from "wagmi/query";
|
|
28
|
-
import { O as Us, L as
|
|
28
|
+
import { O as Us, L as Kt, M as fp, a as vp, B as bp, b as yp, C as Tp } from "./geoblocking-DtB4yr5l.js";
|
|
29
29
|
import { CircleStackIcon as zs, ChevronDownIcon as Gs, CheckIcon as Hs } from "@heroicons/react/20/solid";
|
|
30
30
|
const Ap = ({
|
|
31
31
|
tooltipContent: e,
|
|
@@ -61,7 +61,7 @@ const Ap = ({
|
|
|
61
61
|
...t,
|
|
62
62
|
tooltipContent: /* @__PURE__ */ i("span", { className: "dtw-inline-block dtw-max-w-xs", children: e })
|
|
63
63
|
}
|
|
64
|
-
),
|
|
64
|
+
), En = ({
|
|
65
65
|
text: e,
|
|
66
66
|
placement: t,
|
|
67
67
|
iconClassName: n = "dtw-text-[color:var(--panel-secondary-content-color)]",
|
|
@@ -74,14 +74,14 @@ const Ap = ({
|
|
|
74
74
|
n
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
|
-
) }),
|
|
77
|
+
) }), Jt = ({
|
|
78
78
|
label: e,
|
|
79
79
|
tooltipText: t,
|
|
80
80
|
children: n
|
|
81
81
|
}) => /* @__PURE__ */ w("div", { children: [
|
|
82
82
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-x-1 dtw-text-[length:var(--panel-popup-font-size)] dtw-text-[color:var(--panel-popup-content-color,var(--panel-secondary-content-color))]", children: [
|
|
83
83
|
/* @__PURE__ */ i("span", { children: e }),
|
|
84
|
-
/* @__PURE__ */ i(
|
|
84
|
+
/* @__PURE__ */ i(En, { text: t, placement: "top" })
|
|
85
85
|
] }),
|
|
86
86
|
/* @__PURE__ */ i("div", { className: "dtw-mt-1.5", children: n })
|
|
87
87
|
] }), Vs = {
|
|
@@ -272,11 +272,11 @@ const Ap = ({
|
|
|
272
272
|
HYPEREVM_WARNING: "HYPEREVM_WARNING"
|
|
273
273
|
}, Ep = {
|
|
274
274
|
[Y.DEFAULT]: kr,
|
|
275
|
-
[Y.ERROR]:
|
|
275
|
+
[Y.ERROR]: Qt,
|
|
276
276
|
[Y.SUCCESS]: ns,
|
|
277
|
-
[Y.WARNING]:
|
|
277
|
+
[Y.WARNING]: Qt,
|
|
278
278
|
[Y.CUSTOM]: kr
|
|
279
|
-
},
|
|
279
|
+
}, vr = ({
|
|
280
280
|
tooltipText: e,
|
|
281
281
|
value: t,
|
|
282
282
|
label: n,
|
|
@@ -299,7 +299,7 @@ const Ap = ({
|
|
|
299
299
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-grow dtw-items-start dtw-justify-between", children: [
|
|
300
300
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-x-1", children: [
|
|
301
301
|
/* @__PURE__ */ i(
|
|
302
|
-
|
|
302
|
+
En,
|
|
303
303
|
{
|
|
304
304
|
text: e,
|
|
305
305
|
placement: "top",
|
|
@@ -344,9 +344,9 @@ const Ap = ({
|
|
|
344
344
|
}) => {
|
|
345
345
|
const a = x();
|
|
346
346
|
return /* @__PURE__ */ i("div", { className: "dtw-w-full dtw-flex dtw-flex-col dtw-gap-1", children: /* @__PURE__ */ i(ja, { children: ({ open: s }) => /* @__PURE__ */ w(R, { children: [
|
|
347
|
-
t?.map((l) => /* @__PURE__ */ i(
|
|
347
|
+
t?.map((l) => /* @__PURE__ */ i(vr, { ...l }, l.label)),
|
|
348
348
|
/* @__PURE__ */ i(qa, { className: "dtw-p-0 dtw-flex dtw-w-full dtw-justify-between dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] hover:dtw-bg-[var(--panel-meta-hover-bg,var(--panel-neutral-color))] focus:dtw-outline-none", children: /* @__PURE__ */ w(
|
|
349
|
-
|
|
349
|
+
vr,
|
|
350
350
|
{
|
|
351
351
|
tooltipText: a.fullReceiveDetails,
|
|
352
352
|
label: a.tradeDetails,
|
|
@@ -368,7 +368,7 @@ const Ap = ({
|
|
|
368
368
|
}
|
|
369
369
|
) }),
|
|
370
370
|
/* @__PURE__ */ i(Ka, { show: s, children: /* @__PURE__ */ w(Ya, { className: "dtw-transition dtw-transform dtw-duration-100 dtw-ease-out data-[closed]:opacity-0 data-[closed]:-dtw-translate-y-2.5 dtw-static dtw-text-[length:var(--panel-label-font-size,var(--panel-font-size-xs))] dtw-leading-[var(--panel-label-line-height,var(--panel-line-height-xs))] dtw-text-[color:var(--panel-secondary-content-color)] dtw-font-[var(--panel-meta-font-weight,var(--panel-font-weight-light))] dtw-rounded-[var(--panel-radius-secondary,var(--panel-radius))] dtw-flex dtw-flex-col dtw-gap-1", children: [
|
|
371
|
-
n?.map((l) => /* @__PURE__ */ i(
|
|
371
|
+
n?.map((l) => /* @__PURE__ */ i(vr, { ...l }, l.label)),
|
|
372
372
|
e
|
|
373
373
|
] }) })
|
|
374
374
|
] }) }) });
|
|
@@ -392,7 +392,7 @@ const Ap = ({
|
|
|
392
392
|
}
|
|
393
393
|
)
|
|
394
394
|
}
|
|
395
|
-
), Ip = ({ children: e }) => /* @__PURE__ */ i("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-inputs-group-gap,var(--panel-gap))] dtw-px-[var(--panel-inputs-group-px)]", children: e }), Np = ({ children: e }) => /* @__PURE__ */ i("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-meta-group-gap,var(--panel-gap))] dtw-px-[var(--panel-meta-group-px)] dtw-h-full dtw-relative", children: e }),
|
|
395
|
+
), Ip = ({ children: e }) => /* @__PURE__ */ i("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-inputs-group-gap,var(--panel-gap))] dtw-px-[var(--panel-inputs-group-px)]", children: e }), Np = ({ children: e }) => /* @__PURE__ */ i("div", { className: "dtw-flex dtw-flex-col dtw-gap-[var(--panel-meta-group-gap,var(--panel-gap))] dtw-px-[var(--panel-meta-group-px)] dtw-h-full dtw-relative", children: e }), In = ({
|
|
396
396
|
Icon: e,
|
|
397
397
|
onClick: t,
|
|
398
398
|
className: n = "dtw-h-7 dtw-w-7",
|
|
@@ -456,7 +456,7 @@ const Pp = (e) => {
|
|
|
456
456
|
const { firebase: e, recaptcha: t } = be, n = t.debugToken;
|
|
457
457
|
if (!e.apiKey || !e.projectId || !e.appId || !n)
|
|
458
458
|
return "";
|
|
459
|
-
const r = `${Op}/projects/${e.projectId}/apps/${e.appId}:exchangeDebugToken?key=${e.apiKey}`, { token: o, ttl: a } = await
|
|
459
|
+
const r = `${Op}/projects/${e.projectId}/apps/${e.appId}:exchangeDebugToken?key=${e.apiKey}`, { token: o, ttl: a } = await $n({
|
|
460
460
|
url: r,
|
|
461
461
|
method: "POST",
|
|
462
462
|
body: { debug_token: n },
|
|
@@ -565,7 +565,7 @@ class At extends Ls {
|
|
|
565
565
|
this.link = r, this.txArgs = a, this.account = s, this.slippage = o, this.functionName = c, this.onBypass = l;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
class
|
|
568
|
+
class Un extends Ls {
|
|
569
569
|
constructor({ message: n, code: r }) {
|
|
570
570
|
super(n);
|
|
571
571
|
Ue(this, "code");
|
|
@@ -577,7 +577,7 @@ const Bp = async (e) => {
|
|
|
577
577
|
return typeof n == "string" && n.trim().length > 0 ? n : void 0;
|
|
578
578
|
}, eo = async (e, t) => {
|
|
579
579
|
const n = await Bp(e) ?? t;
|
|
580
|
-
throw new
|
|
580
|
+
throw new Un({ message: n });
|
|
581
581
|
}, to = async () => {
|
|
582
582
|
const e = await Rp();
|
|
583
583
|
return e ? { "x-firebase-appcheck": e } : {};
|
|
@@ -592,7 +592,7 @@ const Bp = async (e) => {
|
|
|
592
592
|
}) => {
|
|
593
593
|
const { api: n } = no(), r = await to();
|
|
594
594
|
try {
|
|
595
|
-
return await
|
|
595
|
+
return await $n({
|
|
596
596
|
url: n.priceUpdateUrl,
|
|
597
597
|
method: "POST",
|
|
598
598
|
headers: r,
|
|
@@ -613,7 +613,7 @@ const Bp = async (e) => {
|
|
|
613
613
|
throw new Error("Ondo getPrices endpoint is not configured");
|
|
614
614
|
const r = await to();
|
|
615
615
|
try {
|
|
616
|
-
return await
|
|
616
|
+
return await $n({
|
|
617
617
|
url: n.getPricesUrl,
|
|
618
618
|
method: "POST",
|
|
619
619
|
headers: r,
|
|
@@ -637,7 +637,7 @@ const Bp = async (e) => {
|
|
|
637
637
|
tokenAmount: s
|
|
638
638
|
}));
|
|
639
639
|
try {
|
|
640
|
-
return await
|
|
640
|
+
return await $n({
|
|
641
641
|
url: n.createAttestationsUrl,
|
|
642
642
|
method: "POST",
|
|
643
643
|
headers: r,
|
|
@@ -656,15 +656,15 @@ const Bp = async (e) => {
|
|
|
656
656
|
isConnected: r
|
|
657
657
|
};
|
|
658
658
|
};
|
|
659
|
-
function
|
|
659
|
+
function oe() {
|
|
660
660
|
}
|
|
661
661
|
const jo = {
|
|
662
|
-
address:
|
|
662
|
+
address: O,
|
|
663
663
|
symbol: "",
|
|
664
664
|
decimals: V,
|
|
665
665
|
value: ""
|
|
666
666
|
}, Zs = (e) => {
|
|
667
|
-
const t = e?.poolAddress ??
|
|
667
|
+
const t = e?.poolAddress ?? O, n = {
|
|
668
668
|
address: t,
|
|
669
669
|
symbol: e?.poolConfigMap?.[t]?.symbol ?? "",
|
|
670
670
|
decimals: V,
|
|
@@ -704,38 +704,38 @@ const jo = {
|
|
|
704
704
|
},
|
|
705
705
|
withdrawAction: null,
|
|
706
706
|
transactions: e?.transactions ?? [],
|
|
707
|
-
poolFallbackData: { address:
|
|
707
|
+
poolFallbackData: { address: O, ...e?.poolFallbackData },
|
|
708
708
|
customDepositTokensPerChain: e?.customDepositTokensPerChain,
|
|
709
709
|
defaultChainId: e?.defaultChainId,
|
|
710
710
|
swapQuoteRefreshTriggered: null
|
|
711
711
|
};
|
|
712
712
|
}, Js = ge({
|
|
713
713
|
...Zs({
|
|
714
|
-
poolAddress:
|
|
714
|
+
poolAddress: O,
|
|
715
715
|
poolConfigMap: {}
|
|
716
716
|
})
|
|
717
717
|
}), ei = ge({
|
|
718
|
-
setPoolAddress:
|
|
719
|
-
setTradingType:
|
|
720
|
-
updateSendTokenInput:
|
|
721
|
-
updateReceiveTokenInput:
|
|
722
|
-
updateTradingSettings:
|
|
723
|
-
updateTradingModal:
|
|
724
|
-
updateWithdrawAction:
|
|
725
|
-
updateTransactions:
|
|
726
|
-
updatePoolFallbackData:
|
|
727
|
-
updateCustomDepositTokensPerChain:
|
|
728
|
-
onTradingSettleError:
|
|
729
|
-
onTransactionError:
|
|
730
|
-
onTransactionSuccess:
|
|
731
|
-
onTransactionEstimationError:
|
|
732
|
-
onTokenSelector:
|
|
733
|
-
onLog:
|
|
718
|
+
setPoolAddress: oe,
|
|
719
|
+
setTradingType: oe,
|
|
720
|
+
updateSendTokenInput: oe,
|
|
721
|
+
updateReceiveTokenInput: oe,
|
|
722
|
+
updateTradingSettings: oe,
|
|
723
|
+
updateTradingModal: oe,
|
|
724
|
+
updateWithdrawAction: oe,
|
|
725
|
+
updateTransactions: oe,
|
|
726
|
+
updatePoolFallbackData: oe,
|
|
727
|
+
updateCustomDepositTokensPerChain: oe,
|
|
728
|
+
onTradingSettleError: oe,
|
|
729
|
+
onTransactionError: oe,
|
|
730
|
+
onTransactionSuccess: oe,
|
|
731
|
+
onTransactionEstimationError: oe,
|
|
732
|
+
onTokenSelector: oe,
|
|
733
|
+
onLog: oe,
|
|
734
734
|
onSimulateTransaction: () => Promise.resolve(null),
|
|
735
735
|
getSwapQuotes: () => Promise.resolve(null),
|
|
736
|
-
updatePoolConfig:
|
|
737
|
-
addPoolConfig:
|
|
738
|
-
setSwapQuoteRefreshTriggered:
|
|
736
|
+
updatePoolConfig: oe,
|
|
737
|
+
addPoolConfig: oe,
|
|
738
|
+
setSwapQuoteRefreshTriggered: oe,
|
|
739
739
|
getReferrerAddress: void 0
|
|
740
740
|
}), Wp = (e) => (t, n) => {
|
|
741
741
|
switch (n.type) {
|
|
@@ -910,7 +910,7 @@ const jo = {
|
|
|
910
910
|
getReferrerAddress: y
|
|
911
911
|
}
|
|
912
912
|
}) => {
|
|
913
|
-
const [T, S] =
|
|
913
|
+
const [T, S] = Rn(
|
|
914
914
|
Wp(h),
|
|
915
915
|
Zs(t)
|
|
916
916
|
), k = b(
|
|
@@ -918,12 +918,12 @@ const jo = {
|
|
|
918
918
|
S({ type: "SET_POOL_ADDRESS", payload: L }), n?.(L);
|
|
919
919
|
},
|
|
920
920
|
[n]
|
|
921
|
-
),
|
|
921
|
+
), _ = b(
|
|
922
922
|
(L) => {
|
|
923
923
|
S({ type: "UPDATE_SEND_TOKEN_INPUT", payload: L }), r?.(L);
|
|
924
924
|
},
|
|
925
925
|
[r]
|
|
926
|
-
),
|
|
926
|
+
), M = b(
|
|
927
927
|
(L) => {
|
|
928
928
|
S({ type: "UPDATE_RECEIVE_TOKEN_INPUT", payload: L }), o?.(L);
|
|
929
929
|
},
|
|
@@ -933,12 +933,12 @@ const jo = {
|
|
|
933
933
|
S({ type: "UPDATE_TRADING_SETTINGS", payload: L }), a?.(L);
|
|
934
934
|
},
|
|
935
935
|
[a]
|
|
936
|
-
),
|
|
936
|
+
), H = b(
|
|
937
937
|
(L) => {
|
|
938
938
|
S({ type: "SET_TRADING_TYPE", payload: L }), s?.(L);
|
|
939
939
|
},
|
|
940
940
|
[s]
|
|
941
|
-
),
|
|
941
|
+
), re = b(
|
|
942
942
|
(L) => {
|
|
943
943
|
S({ type: "UPDATE_TRADING_MODAL", payload: L }), l?.(L);
|
|
944
944
|
},
|
|
@@ -948,7 +948,7 @@ const jo = {
|
|
|
948
948
|
S({ type: "UPDATE_WITHDRAW_ACTION", payload: L });
|
|
949
949
|
},
|
|
950
950
|
[]
|
|
951
|
-
),
|
|
951
|
+
), ce = b(
|
|
952
952
|
(L) => {
|
|
953
953
|
S({ type: "UPDATE_TRADING_TRANSACTIONS", payload: L }), c?.(L);
|
|
954
954
|
},
|
|
@@ -965,23 +965,23 @@ const jo = {
|
|
|
965
965
|
S({ type: "UPDATE_POOL_CONFIG", payload: L });
|
|
966
966
|
},
|
|
967
967
|
[]
|
|
968
|
-
),
|
|
968
|
+
), mr = b((L) => {
|
|
969
969
|
S({ type: "ADD_POOL_CONFIG", payload: L });
|
|
970
|
-
}, []),
|
|
970
|
+
}, []), wr = b(
|
|
971
971
|
(L) => {
|
|
972
972
|
S({ type: "SET_SWAP_QUOTE_REFRESH_TRIGGERED", payload: L });
|
|
973
973
|
},
|
|
974
974
|
[]
|
|
975
|
-
),
|
|
975
|
+
), de = P(
|
|
976
976
|
() => ({
|
|
977
977
|
setPoolAddress: k,
|
|
978
|
-
setTradingType:
|
|
978
|
+
setTradingType: H,
|
|
979
979
|
updateTradingSettings: N,
|
|
980
|
-
updateSendTokenInput:
|
|
981
|
-
updateReceiveTokenInput:
|
|
982
|
-
updateTradingModal:
|
|
980
|
+
updateSendTokenInput: _,
|
|
981
|
+
updateReceiveTokenInput: M,
|
|
982
|
+
updateTradingModal: re,
|
|
983
983
|
updateWithdrawAction: J,
|
|
984
|
-
updateTransactions:
|
|
984
|
+
updateTransactions: ce,
|
|
985
985
|
updatePoolFallbackData: xe,
|
|
986
986
|
updateCustomDepositTokensPerChain: Xe,
|
|
987
987
|
onTransactionError: d,
|
|
@@ -993,19 +993,19 @@ const jo = {
|
|
|
993
993
|
onTradingSettleError: f,
|
|
994
994
|
getSwapQuotes: v,
|
|
995
995
|
updatePoolConfig: Ut,
|
|
996
|
-
addPoolConfig:
|
|
997
|
-
setSwapQuoteRefreshTriggered:
|
|
996
|
+
addPoolConfig: mr,
|
|
997
|
+
setSwapQuoteRefreshTriggered: wr,
|
|
998
998
|
getReferrerAddress: y
|
|
999
999
|
}),
|
|
1000
1000
|
[
|
|
1001
1001
|
k,
|
|
1002
|
-
|
|
1002
|
+
H,
|
|
1003
1003
|
N,
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1004
|
+
_,
|
|
1005
|
+
M,
|
|
1006
|
+
re,
|
|
1007
1007
|
J,
|
|
1008
|
-
|
|
1008
|
+
ce,
|
|
1009
1009
|
xe,
|
|
1010
1010
|
Xe,
|
|
1011
1011
|
d,
|
|
@@ -1017,41 +1017,41 @@ const jo = {
|
|
|
1017
1017
|
f,
|
|
1018
1018
|
v,
|
|
1019
1019
|
Ut,
|
|
1020
|
-
ur,
|
|
1021
1020
|
mr,
|
|
1021
|
+
wr,
|
|
1022
1022
|
y
|
|
1023
1023
|
]
|
|
1024
1024
|
);
|
|
1025
|
-
return /* @__PURE__ */ i(ei.Provider, { value:
|
|
1026
|
-
},
|
|
1027
|
-
|
|
1025
|
+
return /* @__PURE__ */ i(ei.Provider, { value: de, children: /* @__PURE__ */ i(Js.Provider, { value: T, children: e }) });
|
|
1026
|
+
}, se = () => fe(Js), q = () => fe(ei), Up = () => [
|
|
1027
|
+
se().poolAddress,
|
|
1028
1028
|
q().setPoolAddress
|
|
1029
1029
|
], A = () => {
|
|
1030
|
-
const { poolAddress: e, poolConfigMap: t } =
|
|
1030
|
+
const { poolAddress: e, poolConfigMap: t } = se();
|
|
1031
1031
|
return t[e] ?? Ed;
|
|
1032
|
-
},
|
|
1033
|
-
const { poolConfigMap: e } =
|
|
1032
|
+
}, on = () => {
|
|
1033
|
+
const { poolConfigMap: e } = se();
|
|
1034
1034
|
return P(() => Object.values(e), [e]);
|
|
1035
1035
|
}, CO = (e) => {
|
|
1036
|
-
const t =
|
|
1036
|
+
const t = on();
|
|
1037
1037
|
return P(
|
|
1038
1038
|
() => t.some((n) => n.address === e),
|
|
1039
1039
|
[t, e]
|
|
1040
1040
|
);
|
|
1041
1041
|
}, Nt = () => {
|
|
1042
|
-
const { poolFallbackData: e, poolAddress: t } =
|
|
1042
|
+
const { poolFallbackData: e, poolAddress: t } = se(), n = zp();
|
|
1043
1043
|
return [
|
|
1044
1044
|
e.address === t ? e : { address: t },
|
|
1045
1045
|
n
|
|
1046
1046
|
];
|
|
1047
|
-
},
|
|
1047
|
+
}, zn = () => {
|
|
1048
1048
|
const {
|
|
1049
1049
|
settings: {
|
|
1050
1050
|
availableAggregators: e,
|
|
1051
1051
|
selectedAggregators: t,
|
|
1052
1052
|
aggregatorLimitPerChain: n
|
|
1053
1053
|
}
|
|
1054
|
-
} =
|
|
1054
|
+
} = se(), { chainId: r } = A();
|
|
1055
1055
|
return P(() => {
|
|
1056
1056
|
const o = n?.[r];
|
|
1057
1057
|
return o?.length ? {
|
|
@@ -1072,7 +1072,7 @@ const jo = {
|
|
|
1072
1072
|
n
|
|
1073
1073
|
]);
|
|
1074
1074
|
}, EO = () => q().setPoolAddress, IO = () => q().updateSendTokenInput, NO = () => q().updateReceiveTokenInput, OO = () => q().updateTradingSettings, _O = () => q().setTradingType, PO = () => q().updateTradingModal, zp = () => q().updatePoolFallbackData, Gp = () => q().onTransactionError, Hp = () => q().onTradingSettleError, Vp = () => q().onTransactionSuccess, ro = () => q().onTransactionEstimationError, jp = () => q().onTokenSelector, Ot = () => q().onLog, qp = () => q().onSimulateTransaction, oo = () => {
|
|
1075
|
-
const e = q().getSwapQuotes, { effectiveSelectedAggregators: t } =
|
|
1075
|
+
const e = q().getSwapQuotes, { effectiveSelectedAggregators: t } = zn();
|
|
1076
1076
|
return b(
|
|
1077
1077
|
({
|
|
1078
1078
|
signal: n,
|
|
@@ -1088,36 +1088,36 @@ const jo = {
|
|
|
1088
1088
|
}),
|
|
1089
1089
|
[e, t]
|
|
1090
1090
|
);
|
|
1091
|
-
}, DO = () => q().updatePoolConfig, kO = () => q().addPoolConfig, LO = () => q().updateCustomDepositTokensPerChain, ao = () => q().setSwapQuoteRefreshTriggered, Kp = () => q().getReferrerAddress, ti = () =>
|
|
1091
|
+
}, DO = () => q().updatePoolConfig, kO = () => q().addPoolConfig, LO = () => q().updateCustomDepositTokensPerChain, ao = () => q().setSwapQuoteRefreshTriggered, Kp = () => q().getReferrerAddress, ti = () => se().input, $ = () => [
|
|
1092
1092
|
ti().sendToken,
|
|
1093
1093
|
q().updateSendTokenInput
|
|
1094
1094
|
], z = () => [
|
|
1095
1095
|
ti().receiveToken,
|
|
1096
1096
|
q().updateReceiveTokenInput
|
|
1097
1097
|
], ne = () => [
|
|
1098
|
-
|
|
1098
|
+
se().settings,
|
|
1099
1099
|
q().updateTradingSettings
|
|
1100
1100
|
], Yp = () => [
|
|
1101
|
-
|
|
1101
|
+
se().customDepositTokensPerChain,
|
|
1102
1102
|
q().updateCustomDepositTokensPerChain
|
|
1103
|
-
], te = () => [
|
|
1104
|
-
|
|
1103
|
+
], te = () => [se().modal, q().updateTradingModal], Gn = () => [
|
|
1104
|
+
se().withdrawAction,
|
|
1105
1105
|
q().updateWithdrawAction
|
|
1106
|
-
], De = () => [
|
|
1107
|
-
|
|
1106
|
+
], De = () => [se().type, q().setTradingType], st = () => se().type === "deposit", ie = () => [
|
|
1107
|
+
se().transactions,
|
|
1108
1108
|
q().updateTransactions
|
|
1109
|
-
], Qp = () =>
|
|
1110
|
-
const { chain: e } = Rs(), { chains: t } = Qr(), { switchChain: n, switchChainAsync: r } = tp(), o = Qp(), a = e?.id, s =
|
|
1109
|
+
], Qp = () => se().defaultChainId, br = (e, t) => t.some(({ id: n }) => n === e), it = () => {
|
|
1110
|
+
const { chain: e } = Rs(), { chains: t } = Qr(), { switchChain: n, switchChainAsync: r } = tp(), o = Qp(), a = e?.id, s = br(a, t), l = o && br(o, t) ? o : t[0].id;
|
|
1111
1111
|
return {
|
|
1112
1112
|
chain: e,
|
|
1113
1113
|
isSupported: s,
|
|
1114
1114
|
switchNetwork: n,
|
|
1115
1115
|
switchNetworkAsync: r,
|
|
1116
1116
|
chainId: s ? a : void 0,
|
|
1117
|
-
supportedChainId:
|
|
1117
|
+
supportedChainId: br(a, t) ? a : l,
|
|
1118
1118
|
chains: t
|
|
1119
1119
|
};
|
|
1120
|
-
},
|
|
1120
|
+
}, an = ({
|
|
1121
1121
|
tokenAddress: e,
|
|
1122
1122
|
ownerAddress: t,
|
|
1123
1123
|
spenderAddress: n,
|
|
@@ -1131,7 +1131,7 @@ const jo = {
|
|
|
1131
1131
|
chainId: r,
|
|
1132
1132
|
query: {
|
|
1133
1133
|
enabled: !o,
|
|
1134
|
-
refetchInterval:
|
|
1134
|
+
refetchInterval: Mn
|
|
1135
1135
|
}
|
|
1136
1136
|
}), RO = () => {
|
|
1137
1137
|
const { account: e } = B(), [t, n] = U(!1);
|
|
@@ -1143,10 +1143,10 @@ const jo = {
|
|
|
1143
1143
|
return e?.id === "rabby" || e?.name === "Rabby Wallet";
|
|
1144
1144
|
}, ni = (e) => np({
|
|
1145
1145
|
...e,
|
|
1146
|
-
query: { ...e?.query, staleTime:
|
|
1146
|
+
query: { ...e?.query, staleTime: Mn }
|
|
1147
1147
|
});
|
|
1148
|
-
var
|
|
1149
|
-
function
|
|
1148
|
+
var yn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1149
|
+
function Hn(e) {
|
|
1150
1150
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1151
1151
|
}
|
|
1152
1152
|
function Xp() {
|
|
@@ -1163,7 +1163,7 @@ function tu(e, t) {
|
|
|
1163
1163
|
return n;
|
|
1164
1164
|
return -1;
|
|
1165
1165
|
}
|
|
1166
|
-
var
|
|
1166
|
+
var Vn = tu, nu = Vn, ru = Array.prototype, ou = ru.splice;
|
|
1167
1167
|
function au(e) {
|
|
1168
1168
|
var t = this.__data__, n = nu(t, e);
|
|
1169
1169
|
if (n < 0)
|
|
@@ -1171,16 +1171,16 @@ function au(e) {
|
|
|
1171
1171
|
var r = t.length - 1;
|
|
1172
1172
|
return n == r ? t.pop() : ou.call(t, n, 1), --this.size, !0;
|
|
1173
1173
|
}
|
|
1174
|
-
var su = au, iu =
|
|
1174
|
+
var su = au, iu = Vn;
|
|
1175
1175
|
function lu(e) {
|
|
1176
1176
|
var t = this.__data__, n = iu(t, e);
|
|
1177
1177
|
return n < 0 ? void 0 : t[n][1];
|
|
1178
1178
|
}
|
|
1179
|
-
var cu = lu, du =
|
|
1179
|
+
var cu = lu, du = Vn;
|
|
1180
1180
|
function pu(e) {
|
|
1181
1181
|
return du(this.__data__, e) > -1;
|
|
1182
1182
|
}
|
|
1183
|
-
var uu = pu, mu =
|
|
1183
|
+
var uu = pu, mu = Vn;
|
|
1184
1184
|
function wu(e, t) {
|
|
1185
1185
|
var n = this.__data__, r = mu(n, e);
|
|
1186
1186
|
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
|
@@ -1198,7 +1198,7 @@ _t.prototype.delete = fu;
|
|
|
1198
1198
|
_t.prototype.get = vu;
|
|
1199
1199
|
_t.prototype.has = bu;
|
|
1200
1200
|
_t.prototype.set = yu;
|
|
1201
|
-
var
|
|
1201
|
+
var jn = _t, Tu = jn;
|
|
1202
1202
|
function Au() {
|
|
1203
1203
|
this.__data__ = new Tu(), this.size = 0;
|
|
1204
1204
|
}
|
|
@@ -1215,7 +1215,7 @@ var Iu = Eu;
|
|
|
1215
1215
|
function Nu(e) {
|
|
1216
1216
|
return this.__data__.has(e);
|
|
1217
1217
|
}
|
|
1218
|
-
var Ou = Nu, _u = typeof
|
|
1218
|
+
var Ou = Nu, _u = typeof yn == "object" && yn && yn.Object === Object && yn, ri = _u, Pu = ri, Du = typeof self == "object" && self && self.Object === Object && self, ku = Pu || Du || Function("return this")(), $e = ku, Lu = $e, Ru = Lu.Symbol, qn = Ru, qo = qn, oi = Object.prototype, $u = oi.hasOwnProperty, Bu = oi.toString, zt = qo ? qo.toStringTag : void 0;
|
|
1219
1219
|
function Mu(e) {
|
|
1220
1220
|
var t = $u.call(e, zt), n = e[zt];
|
|
1221
1221
|
try {
|
|
@@ -1230,7 +1230,7 @@ var Fu = Mu, Wu = Object.prototype, Uu = Wu.toString;
|
|
|
1230
1230
|
function zu(e) {
|
|
1231
1231
|
return Uu.call(e);
|
|
1232
1232
|
}
|
|
1233
|
-
var Gu = zu, Ko =
|
|
1233
|
+
var Gu = zu, Ko = qn, Hu = Fu, Vu = Gu, ju = "[object Null]", qu = "[object Undefined]", Yo = Ko ? Ko.toStringTag : void 0;
|
|
1234
1234
|
function Ku(e) {
|
|
1235
1235
|
return e == null ? e === void 0 ? qu : ju : Yo && Yo in Object(e) ? Hu(e) : Vu(e);
|
|
1236
1236
|
}
|
|
@@ -1239,15 +1239,15 @@ function Yu(e) {
|
|
|
1239
1239
|
var t = typeof e;
|
|
1240
1240
|
return e != null && (t == "object" || t == "function");
|
|
1241
1241
|
}
|
|
1242
|
-
var
|
|
1242
|
+
var sn = Yu, Qu = Pt, Xu = sn, Zu = "[object AsyncFunction]", Ju = "[object Function]", em = "[object GeneratorFunction]", tm = "[object Proxy]";
|
|
1243
1243
|
function nm(e) {
|
|
1244
1244
|
if (!Xu(e))
|
|
1245
1245
|
return !1;
|
|
1246
1246
|
var t = Qu(e);
|
|
1247
1247
|
return t == Ju || t == em || t == Zu || t == tm;
|
|
1248
1248
|
}
|
|
1249
|
-
var ai = nm, rm = $e, om = rm["__core-js_shared__"], am = om,
|
|
1250
|
-
var e = /[^.]+$/.exec(
|
|
1249
|
+
var ai = nm, rm = $e, om = rm["__core-js_shared__"], am = om, yr = am, Qo = function() {
|
|
1250
|
+
var e = /[^.]+$/.exec(yr && yr.keys && yr.keys.IE_PROTO || "");
|
|
1251
1251
|
return e ? "Symbol(src)_1." + e : "";
|
|
1252
1252
|
}();
|
|
1253
1253
|
function sm(e) {
|
|
@@ -1267,7 +1267,7 @@ function dm(e) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
return "";
|
|
1269
1269
|
}
|
|
1270
|
-
var si = dm, pm = ai, um = im, mm =
|
|
1270
|
+
var si = dm, pm = ai, um = im, mm = sn, wm = si, hm = /[\\^$.*+?()[\]{}|]/g, gm = /^\[object .+?Constructor\]$/, fm = Function.prototype, vm = Object.prototype, bm = fm.toString, ym = vm.hasOwnProperty, Tm = RegExp(
|
|
1271
1271
|
"^" + bm.call(ym).replace(hm, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1272
1272
|
);
|
|
1273
1273
|
function Am(e) {
|
|
@@ -1285,7 +1285,7 @@ function Nm(e, t) {
|
|
|
1285
1285
|
var n = Im(e, t);
|
|
1286
1286
|
return Em(n) ? n : void 0;
|
|
1287
1287
|
}
|
|
1288
|
-
var Dt = Nm, Om = Dt, _m = $e, Pm = Om(_m, "Map"), lo = Pm, Dm = Dt, km = Dm(Object, "create"),
|
|
1288
|
+
var Dt = Nm, Om = Dt, _m = $e, Pm = Om(_m, "Map"), lo = Pm, Dm = Dt, km = Dm(Object, "create"), Kn = km, Xo = Kn;
|
|
1289
1289
|
function Lm() {
|
|
1290
1290
|
this.__data__ = Xo ? Xo(null) : {}, this.size = 0;
|
|
1291
1291
|
}
|
|
@@ -1294,7 +1294,7 @@ function $m(e) {
|
|
|
1294
1294
|
var t = this.has(e) && delete this.__data__[e];
|
|
1295
1295
|
return this.size -= t ? 1 : 0, t;
|
|
1296
1296
|
}
|
|
1297
|
-
var Bm = $m, Mm =
|
|
1297
|
+
var Bm = $m, Mm = Kn, Fm = "__lodash_hash_undefined__", Wm = Object.prototype, Um = Wm.hasOwnProperty;
|
|
1298
1298
|
function zm(e) {
|
|
1299
1299
|
var t = this.__data__;
|
|
1300
1300
|
if (Mm) {
|
|
@@ -1303,12 +1303,12 @@ function zm(e) {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
return Um.call(t, e) ? t[e] : void 0;
|
|
1305
1305
|
}
|
|
1306
|
-
var Gm = zm, Hm =
|
|
1306
|
+
var Gm = zm, Hm = Kn, Vm = Object.prototype, jm = Vm.hasOwnProperty;
|
|
1307
1307
|
function qm(e) {
|
|
1308
1308
|
var t = this.__data__;
|
|
1309
1309
|
return Hm ? t[e] !== void 0 : jm.call(t, e);
|
|
1310
1310
|
}
|
|
1311
|
-
var Km = qm, Ym =
|
|
1311
|
+
var Km = qm, Ym = Kn, Qm = "__lodash_hash_undefined__";
|
|
1312
1312
|
function Xm(e, t) {
|
|
1313
1313
|
var n = this.__data__;
|
|
1314
1314
|
return this.size += this.has(e) ? 0 : 1, n[e] = Ym && t === void 0 ? Qm : t, this;
|
|
@@ -1326,7 +1326,7 @@ kt.prototype.delete = ew;
|
|
|
1326
1326
|
kt.prototype.get = tw;
|
|
1327
1327
|
kt.prototype.has = nw;
|
|
1328
1328
|
kt.prototype.set = rw;
|
|
1329
|
-
var ow = kt, Zo = ow, aw =
|
|
1329
|
+
var ow = kt, Zo = ow, aw = jn, sw = lo;
|
|
1330
1330
|
function iw() {
|
|
1331
1331
|
this.size = 0, this.__data__ = {
|
|
1332
1332
|
hash: new Zo(),
|
|
@@ -1344,20 +1344,20 @@ function uw(e, t) {
|
|
|
1344
1344
|
var n = e.__data__;
|
|
1345
1345
|
return pw(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
1346
1346
|
}
|
|
1347
|
-
var
|
|
1347
|
+
var Yn = uw, mw = Yn;
|
|
1348
1348
|
function ww(e) {
|
|
1349
1349
|
var t = mw(this, e).delete(e);
|
|
1350
1350
|
return this.size -= t ? 1 : 0, t;
|
|
1351
1351
|
}
|
|
1352
|
-
var hw = ww, gw =
|
|
1352
|
+
var hw = ww, gw = Yn;
|
|
1353
1353
|
function fw(e) {
|
|
1354
1354
|
return gw(this, e).get(e);
|
|
1355
1355
|
}
|
|
1356
|
-
var vw = fw, bw =
|
|
1356
|
+
var vw = fw, bw = Yn;
|
|
1357
1357
|
function yw(e) {
|
|
1358
1358
|
return bw(this, e).has(e);
|
|
1359
1359
|
}
|
|
1360
|
-
var Tw = yw, Aw =
|
|
1360
|
+
var Tw = yw, Aw = Yn;
|
|
1361
1361
|
function Sw(e, t) {
|
|
1362
1362
|
var n = Aw(this, e), r = n.size;
|
|
1363
1363
|
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
|
@@ -1375,7 +1375,7 @@ Lt.prototype.delete = Ew;
|
|
|
1375
1375
|
Lt.prototype.get = Iw;
|
|
1376
1376
|
Lt.prototype.has = Nw;
|
|
1377
1377
|
Lt.prototype.set = Ow;
|
|
1378
|
-
var co = Lt, _w =
|
|
1378
|
+
var co = Lt, _w = jn, Pw = lo, Dw = co, kw = 200;
|
|
1379
1379
|
function Lw(e, t) {
|
|
1380
1380
|
var n = this.__data__;
|
|
1381
1381
|
if (n instanceof _w) {
|
|
@@ -1386,7 +1386,7 @@ function Lw(e, t) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
return n.set(e, t), this.size = n.size, this;
|
|
1388
1388
|
}
|
|
1389
|
-
var Rw = Lw, $w =
|
|
1389
|
+
var Rw = Lw, $w = jn, Bw = Su, Mw = Cu, Fw = Iu, Ww = Ou, Uw = Rw;
|
|
1390
1390
|
function Rt(e) {
|
|
1391
1391
|
var t = this.__data__ = new $w(e);
|
|
1392
1392
|
this.size = t.size;
|
|
@@ -1405,14 +1405,14 @@ function Vw(e) {
|
|
|
1405
1405
|
return this.__data__.has(e);
|
|
1406
1406
|
}
|
|
1407
1407
|
var jw = Vw, qw = co, Kw = Hw, Yw = jw;
|
|
1408
|
-
function
|
|
1408
|
+
function Nn(e) {
|
|
1409
1409
|
var t = -1, n = e == null ? 0 : e.length;
|
|
1410
1410
|
for (this.__data__ = new qw(); ++t < n; )
|
|
1411
1411
|
this.add(e[t]);
|
|
1412
1412
|
}
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
var li =
|
|
1413
|
+
Nn.prototype.add = Nn.prototype.push = Kw;
|
|
1414
|
+
Nn.prototype.has = Yw;
|
|
1415
|
+
var li = Nn;
|
|
1416
1416
|
function Qw(e, t) {
|
|
1417
1417
|
for (var n = -1, r = e == null ? 0 : e.length; ++n < r; )
|
|
1418
1418
|
if (t(e[n], n, e))
|
|
@@ -1471,7 +1471,7 @@ function dh(e) {
|
|
|
1471
1471
|
n[++t] = r;
|
|
1472
1472
|
}), n;
|
|
1473
1473
|
}
|
|
1474
|
-
var po = dh, Jo =
|
|
1474
|
+
var po = dh, Jo = qn, ea = ih, ph = io, uh = di, mh = ch, wh = po, hh = 1, gh = 2, fh = "[object Boolean]", vh = "[object Date]", bh = "[object Error]", yh = "[object Map]", Th = "[object Number]", Ah = "[object RegExp]", Sh = "[object Set]", xh = "[object String]", Ch = "[object Symbol]", Eh = "[object ArrayBuffer]", Ih = "[object DataView]", ta = Jo ? Jo.prototype : void 0, Tr = ta ? ta.valueOf : void 0;
|
|
1475
1475
|
function Nh(e, t, n, r, o, a, s) {
|
|
1476
1476
|
switch (n) {
|
|
1477
1477
|
case Ih:
|
|
@@ -1502,8 +1502,8 @@ function Nh(e, t, n, r, o, a, s) {
|
|
|
1502
1502
|
var p = uh(l(e), l(t), r, o, a, s);
|
|
1503
1503
|
return s.delete(e), p;
|
|
1504
1504
|
case Ch:
|
|
1505
|
-
if (
|
|
1506
|
-
return
|
|
1505
|
+
if (Tr)
|
|
1506
|
+
return Tr.call(e) == Tr.call(t);
|
|
1507
1507
|
}
|
|
1508
1508
|
return !1;
|
|
1509
1509
|
}
|
|
@@ -1552,17 +1552,17 @@ var eg = Jh, ra = eg, tg = $t, pi = Object.prototype, ng = pi.hasOwnProperty, rg
|
|
|
1552
1552
|
return arguments;
|
|
1553
1553
|
}()) ? ra : function(e) {
|
|
1554
1554
|
return tg(e) && ng.call(e, "callee") && !rg.call(e, "callee");
|
|
1555
|
-
}, ui = og,
|
|
1555
|
+
}, ui = og, On = { exports: {} };
|
|
1556
1556
|
function ag() {
|
|
1557
1557
|
return !1;
|
|
1558
1558
|
}
|
|
1559
1559
|
var sg = ag;
|
|
1560
|
-
|
|
1560
|
+
On.exports;
|
|
1561
1561
|
(function(e, t) {
|
|
1562
1562
|
var n = $e, r = sg, o = t && !t.nodeType && t, a = o && !0 && e && !e.nodeType && e, s = a && a.exports === o, l = s ? n.Buffer : void 0, c = l ? l.isBuffer : void 0, d = c || r;
|
|
1563
1563
|
e.exports = d;
|
|
1564
|
-
})(
|
|
1565
|
-
var mi =
|
|
1564
|
+
})(On, On.exports);
|
|
1565
|
+
var mi = On.exports, ig = 9007199254740991, lg = /^(?:0|[1-9]\d*)$/;
|
|
1566
1566
|
function cg(e, t) {
|
|
1567
1567
|
var n = typeof e;
|
|
1568
1568
|
return t = t ?? ig, !!t && (n == "number" || n != "symbol" && lg.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
@@ -1583,8 +1583,8 @@ function Ug(e) {
|
|
|
1583
1583
|
return e(t);
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
|
-
var zg = Ug,
|
|
1587
|
-
|
|
1586
|
+
var zg = Ug, _n = { exports: {} };
|
|
1587
|
+
_n.exports;
|
|
1588
1588
|
(function(e, t) {
|
|
1589
1589
|
var n = ri, r = t && !t.nodeType && t, o = r && !0 && e && !e.nodeType && e, a = o && o.exports === r, s = a && n.process, l = function() {
|
|
1590
1590
|
try {
|
|
@@ -1594,8 +1594,8 @@ On.exports;
|
|
|
1594
1594
|
}
|
|
1595
1595
|
}();
|
|
1596
1596
|
e.exports = l;
|
|
1597
|
-
})(
|
|
1598
|
-
var Gg =
|
|
1597
|
+
})(_n, _n.exports);
|
|
1598
|
+
var Gg = _n.exports, Hg = Wg, Vg = zg, oa = Gg, aa = oa && oa.isTypedArray, jg = aa ? Vg(aa) : Hg, wi = jg, qg = Kh, Kg = ui, Yg = Ke, Qg = mi, Xg = uo, Zg = wi, Jg = Object.prototype, ef = Jg.hasOwnProperty;
|
|
1599
1599
|
function tf(e, t) {
|
|
1600
1600
|
var n = Yg(e), r = !n && Kg(e), o = !n && !r && Qg(e), a = !n && !r && !o && Zg(e), s = n || r || o || a, l = s ? qg(e.length, String) : [], c = l.length;
|
|
1601
1601
|
for (var d in e)
|
|
@@ -1665,8 +1665,8 @@ function kf(e, t, n, r, o, a) {
|
|
|
1665
1665
|
v || (v = u == "constructor");
|
|
1666
1666
|
}
|
|
1667
1667
|
if (f && !v) {
|
|
1668
|
-
var k = e.constructor,
|
|
1669
|
-
k !=
|
|
1668
|
+
var k = e.constructor, _ = t.constructor;
|
|
1669
|
+
k != _ && "constructor" in e && "constructor" in t && !(typeof k == "function" && k instanceof k && typeof _ == "function" && _ instanceof _) && (f = !1);
|
|
1670
1670
|
}
|
|
1671
1671
|
return a.delete(e), a.delete(t), f;
|
|
1672
1672
|
}
|
|
@@ -1688,26 +1688,26 @@ var Lf = kf, Rf = Dt, $f = $e, Bf = Rf($f, "DataView"), Mf = Bf, Ff = Dt, Wf = $
|
|
|
1688
1688
|
}
|
|
1689
1689
|
return t;
|
|
1690
1690
|
});
|
|
1691
|
-
var nv = Ze,
|
|
1691
|
+
var nv = Ze, Ar = ii, rv = di, ov = Oh, av = Lf, ua = nv, ma = Ke, wa = mi, sv = wi, iv = 1, ha = "[object Arguments]", ga = "[object Array]", Tn = "[object Object]", lv = Object.prototype, fa = lv.hasOwnProperty;
|
|
1692
1692
|
function cv(e, t, n, r, o, a) {
|
|
1693
1693
|
var s = ma(e), l = ma(t), c = s ? ga : ua(e), d = l ? ga : ua(t);
|
|
1694
|
-
c = c == ha ?
|
|
1695
|
-
var p = c ==
|
|
1694
|
+
c = c == ha ? Tn : c, d = d == ha ? Tn : d;
|
|
1695
|
+
var p = c == Tn, m = d == Tn, u = c == d;
|
|
1696
1696
|
if (u && wa(e)) {
|
|
1697
1697
|
if (!wa(t))
|
|
1698
1698
|
return !1;
|
|
1699
1699
|
s = !0, p = !1;
|
|
1700
1700
|
}
|
|
1701
1701
|
if (u && !p)
|
|
1702
|
-
return a || (a = new
|
|
1702
|
+
return a || (a = new Ar()), s || sv(e) ? rv(e, t, n, r, o, a) : ov(e, t, c, n, r, o, a);
|
|
1703
1703
|
if (!(n & iv)) {
|
|
1704
1704
|
var h = p && fa.call(e, "__wrapped__"), g = m && fa.call(t, "__wrapped__");
|
|
1705
1705
|
if (h || g) {
|
|
1706
1706
|
var f = h ? e.value() : e, v = g ? t.value() : t;
|
|
1707
|
-
return a || (a = new
|
|
1707
|
+
return a || (a = new Ar()), o(f, v, n, r, a);
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
|
-
return u ? (a || (a = new
|
|
1710
|
+
return u ? (a || (a = new Ar()), av(e, t, n, r, o, a)) : !1;
|
|
1711
1711
|
}
|
|
1712
1712
|
var dv = cv, pv = dv, va = $t;
|
|
1713
1713
|
function vi(e, t, n, r, o) {
|
|
@@ -1739,7 +1739,7 @@ function gv(e, t, n, r) {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
return !0;
|
|
1741
1741
|
}
|
|
1742
|
-
var fv = gv, vv =
|
|
1742
|
+
var fv = gv, vv = sn;
|
|
1743
1743
|
function bv(e) {
|
|
1744
1744
|
return e === e && !vv(e);
|
|
1745
1745
|
}
|
|
@@ -1768,7 +1768,7 @@ var Ov = Nv, _v = Pt, Pv = $t, Dv = "[object Symbol]";
|
|
|
1768
1768
|
function kv(e) {
|
|
1769
1769
|
return typeof e == "symbol" || Pv(e) && _v(e) == Dv;
|
|
1770
1770
|
}
|
|
1771
|
-
var
|
|
1771
|
+
var Qn = kv, Lv = Ke, Rv = Qn, $v = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Bv = /^\w*$/;
|
|
1772
1772
|
function Mv(e, t) {
|
|
1773
1773
|
if (Lv(e))
|
|
1774
1774
|
return !1;
|
|
@@ -1807,7 +1807,7 @@ function Qv(e, t) {
|
|
|
1807
1807
|
o[n] = t(e[n], n, e);
|
|
1808
1808
|
return o;
|
|
1809
1809
|
}
|
|
1810
|
-
var Xv = Qv, ba =
|
|
1810
|
+
var Xv = Qv, ba = qn, Zv = Xv, Jv = Ke, eb = Qn, ya = ba ? ba.prototype : void 0, Ta = ya ? ya.toString : void 0;
|
|
1811
1811
|
function Si(e) {
|
|
1812
1812
|
if (typeof e == "string")
|
|
1813
1813
|
return e;
|
|
@@ -1826,14 +1826,14 @@ var ob = rb, ab = Ke, sb = ho, ib = Yv, lb = ob;
|
|
|
1826
1826
|
function cb(e, t) {
|
|
1827
1827
|
return ab(e) ? e : sb(e, t) ? [e] : ib(lb(e));
|
|
1828
1828
|
}
|
|
1829
|
-
var xi = cb, db =
|
|
1829
|
+
var xi = cb, db = Qn;
|
|
1830
1830
|
function pb(e) {
|
|
1831
1831
|
if (typeof e == "string" || db(e))
|
|
1832
1832
|
return e;
|
|
1833
1833
|
var t = e + "";
|
|
1834
1834
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
1835
1835
|
}
|
|
1836
|
-
var
|
|
1836
|
+
var Xn = pb, ub = xi, mb = Xn;
|
|
1837
1837
|
function wb(e, t) {
|
|
1838
1838
|
t = ub(t, e);
|
|
1839
1839
|
for (var n = 0, r = t.length; e != null && n < r; )
|
|
@@ -1849,7 +1849,7 @@ var fb = gb;
|
|
|
1849
1849
|
function vb(e, t) {
|
|
1850
1850
|
return e != null && t in Object(e);
|
|
1851
1851
|
}
|
|
1852
|
-
var bb = vb, yb = xi, Tb = ui, Ab = Ke, Sb = uo, xb = mo, Cb =
|
|
1852
|
+
var bb = vb, yb = xi, Tb = ui, Ab = Ke, Sb = uo, xb = mo, Cb = Xn;
|
|
1853
1853
|
function Eb(e, t, n) {
|
|
1854
1854
|
t = yb(t, e);
|
|
1855
1855
|
for (var r = -1, o = t.length, a = !1; ++r < o; ) {
|
|
@@ -1864,7 +1864,7 @@ var Ib = Eb, Nb = bb, Ob = Ib;
|
|
|
1864
1864
|
function _b(e, t) {
|
|
1865
1865
|
return e != null && Ob(e, t, Nb);
|
|
1866
1866
|
}
|
|
1867
|
-
var Pb = _b, Db = bi, kb = fb, Lb = Pb, Rb = ho, $b = yi, Bb = Ti, Mb =
|
|
1867
|
+
var Pb = _b, Db = bi, kb = fb, Lb = Pb, Rb = ho, $b = yi, Bb = Ti, Mb = Xn, Fb = 1, Wb = 2;
|
|
1868
1868
|
function Ub(e, t) {
|
|
1869
1869
|
return Rb(e) && $b(t) ? Bb(Mb(e), t) : function(n) {
|
|
1870
1870
|
var r = kb(n, e);
|
|
@@ -1887,7 +1887,7 @@ function Kb(e) {
|
|
|
1887
1887
|
return qb(t, e);
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
|
-
var Yb = Kb, Qb = jb, Xb = Yb, Zb = ho, Jb =
|
|
1890
|
+
var Yb = Kb, Qb = jb, Xb = Yb, Zb = ho, Jb = Xn;
|
|
1891
1891
|
function ey(e) {
|
|
1892
1892
|
return Zb(e) ? Qb(Jb(e)) : Xb(e);
|
|
1893
1893
|
}
|
|
@@ -1925,7 +1925,7 @@ function Ty(e, t) {
|
|
|
1925
1925
|
var Ay = Ty, Sy = Ei, xy = Ay, Ii = Object.prototype, Cy = Ii.hasOwnProperty, Ey = Ii.toString, Iy = xy(function(e, t, n) {
|
|
1926
1926
|
t != null && typeof t.toString != "function" && (t = Ey.call(t)), Cy.call(e, t) ? e[t].push(n) : e[t] = [n];
|
|
1927
1927
|
}, Sy), Ny = Iy;
|
|
1928
|
-
const Oy = /* @__PURE__ */
|
|
1928
|
+
const Oy = /* @__PURE__ */ Hn(Ny), ht = "Canceled by user", _y = {
|
|
1929
1929
|
"exceeds the configured cap": "Please try using a different RPC for your wallet.",
|
|
1930
1930
|
"denied transaction": ht,
|
|
1931
1931
|
"user rejected the transaction": ht,
|
|
@@ -1944,7 +1944,7 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
1944
1944
|
return new Error(String(e));
|
|
1945
1945
|
}
|
|
1946
1946
|
}, Ly = (e) => ky(e).message, Ry = async () => {
|
|
1947
|
-
},
|
|
1947
|
+
}, Sr = (e) => {
|
|
1948
1948
|
const t = e[e.length - 1], n = typeof t == "object" && t !== null && ("value" in t || "gas" in t), r = n ? t : {}, o = n ? e.slice(0, -1) : e;
|
|
1949
1949
|
return { transactionOverrides: r, argumentsWithoutOverrides: o };
|
|
1950
1950
|
}, ye = ({
|
|
@@ -1960,23 +1960,23 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
1960
1960
|
}), f = b(
|
|
1961
1961
|
async (...T) => {
|
|
1962
1962
|
try {
|
|
1963
|
-
const { argumentsWithoutOverrides: S, transactionOverrides: k } =
|
|
1963
|
+
const { argumentsWithoutOverrides: S, transactionOverrides: k } = Sr(T), _ = await c?.estimateContractGas({
|
|
1964
1964
|
address: p,
|
|
1965
1965
|
abi: d,
|
|
1966
1966
|
functionName: e,
|
|
1967
1967
|
args: S,
|
|
1968
|
-
account: o ??
|
|
1968
|
+
account: o ?? O,
|
|
1969
1969
|
gas: k.gas,
|
|
1970
1970
|
value: k.value
|
|
1971
1971
|
});
|
|
1972
|
-
if (!
|
|
1972
|
+
if (!_ || !a || _ === BigInt(0))
|
|
1973
1973
|
return { error: Uo, value: BigInt(0) };
|
|
1974
|
-
const
|
|
1975
|
-
Number(
|
|
1976
|
-
), N =
|
|
1974
|
+
const M = Math.round(
|
|
1975
|
+
Number(_) * Id
|
|
1976
|
+
), N = bn[a] ?? M, H = BigInt(Math.min(N, M));
|
|
1977
1977
|
return console.debug(
|
|
1978
|
-
`[core-ui-kit]: estimated gas limit: ${Number(
|
|
1979
|
-
), { error: "", value:
|
|
1978
|
+
`[core-ui-kit]: estimated gas limit: ${Number(_)}`
|
|
1979
|
+
), { error: "", value: H };
|
|
1980
1980
|
} catch (S) {
|
|
1981
1981
|
return console.error(`Gas estimate error on ${e}`, S), {
|
|
1982
1982
|
error: S?.message ?? S?.shortMessage ?? S.error?.data?.message ?? S.data?.message ?? Uo,
|
|
@@ -1999,21 +1999,21 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
1999
1999
|
return { data: null, error: zo };
|
|
2000
2000
|
if (!c)
|
|
2001
2001
|
return { data: null, error: "Client is not defined" };
|
|
2002
|
-
const { argumentsWithoutOverrides: S, transactionOverrides: k } =
|
|
2002
|
+
const { argumentsWithoutOverrides: S, transactionOverrides: k } = Sr(T), _ = ip({
|
|
2003
2003
|
abi: d,
|
|
2004
2004
|
functionName: e,
|
|
2005
2005
|
args: S
|
|
2006
2006
|
});
|
|
2007
|
-
if (o &&
|
|
2008
|
-
const
|
|
2007
|
+
if (o && _) {
|
|
2008
|
+
const M = await m({
|
|
2009
2009
|
chainId: a ?? s,
|
|
2010
2010
|
from: o,
|
|
2011
2011
|
to: p,
|
|
2012
|
-
input:
|
|
2013
|
-
gas:
|
|
2012
|
+
input: _,
|
|
2013
|
+
gas: bn[a ?? s] ?? 0,
|
|
2014
2014
|
value: k.value?.toString()
|
|
2015
2015
|
});
|
|
2016
|
-
return { data:
|
|
2016
|
+
return { data: M, error: M?.simulation.error_message };
|
|
2017
2017
|
}
|
|
2018
2018
|
return { data: null, error: zo };
|
|
2019
2019
|
} catch (S) {
|
|
@@ -2032,7 +2032,7 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2032
2032
|
]
|
|
2033
2033
|
), y = b(
|
|
2034
2034
|
async (...T) => {
|
|
2035
|
-
const { argumentsWithoutOverrides: S, transactionOverrides: k } =
|
|
2035
|
+
const { argumentsWithoutOverrides: S, transactionOverrides: k } = Sr(T);
|
|
2036
2036
|
if (k.gas)
|
|
2037
2037
|
return g({
|
|
2038
2038
|
address: p,
|
|
@@ -2042,14 +2042,14 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2042
2042
|
args: S,
|
|
2043
2043
|
...k
|
|
2044
2044
|
});
|
|
2045
|
-
const { value:
|
|
2046
|
-
if (
|
|
2045
|
+
const { value: _, error: M } = await f(...T);
|
|
2046
|
+
if (M) {
|
|
2047
2047
|
if (u) {
|
|
2048
|
-
const
|
|
2049
|
-
h ??
|
|
2048
|
+
const H = BigInt(
|
|
2049
|
+
h ?? bn[a ?? s] ?? Nd
|
|
2050
2050
|
);
|
|
2051
2051
|
return console.debug(
|
|
2052
|
-
`[core-ui-kit]: force sending tx with gas: ${
|
|
2052
|
+
`[core-ui-kit]: force sending tx with gas: ${H}`
|
|
2053
2053
|
), g({
|
|
2054
2054
|
address: p,
|
|
2055
2055
|
abi: d,
|
|
@@ -2057,20 +2057,20 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2057
2057
|
chainId: a,
|
|
2058
2058
|
args: S,
|
|
2059
2059
|
...k,
|
|
2060
|
-
gas:
|
|
2060
|
+
gas: H
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
2063
|
const { data: N } = await Promise.race([
|
|
2064
2064
|
v(...T),
|
|
2065
2065
|
new Promise(
|
|
2066
|
-
(
|
|
2066
|
+
(H) => setTimeout(H, Od, {
|
|
2067
2067
|
data: null,
|
|
2068
2068
|
error: _d
|
|
2069
2069
|
})
|
|
2070
2070
|
)
|
|
2071
2071
|
]);
|
|
2072
2072
|
throw new At({
|
|
2073
|
-
message:
|
|
2073
|
+
message: M,
|
|
2074
2074
|
link: N?.link,
|
|
2075
2075
|
txArgs: T,
|
|
2076
2076
|
account: o,
|
|
@@ -2083,18 +2083,18 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2083
2083
|
chainId: a,
|
|
2084
2084
|
args: S,
|
|
2085
2085
|
...k,
|
|
2086
|
-
gas: BigInt(
|
|
2086
|
+
gas: BigInt(bn[a ?? s] ?? 0)
|
|
2087
2087
|
})
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
2090
|
-
return console.debug(`[core-ui-kit]: gas limit to use: ${
|
|
2090
|
+
return console.debug(`[core-ui-kit]: gas limit to use: ${_}`), g({
|
|
2091
2091
|
address: p,
|
|
2092
2092
|
abi: d,
|
|
2093
2093
|
functionName: e,
|
|
2094
2094
|
chainId: a,
|
|
2095
2095
|
args: S,
|
|
2096
2096
|
...k,
|
|
2097
|
-
gas:
|
|
2097
|
+
gas: _
|
|
2098
2098
|
});
|
|
2099
2099
|
},
|
|
2100
2100
|
[
|
|
@@ -2135,7 +2135,7 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2135
2135
|
E(() => {
|
|
2136
2136
|
t === "failure" && as(e);
|
|
2137
2137
|
}, [e, t]);
|
|
2138
|
-
},
|
|
2138
|
+
}, Zn = async ({
|
|
2139
2139
|
functionName: e,
|
|
2140
2140
|
address: t,
|
|
2141
2141
|
abi: n,
|
|
@@ -2160,7 +2160,7 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2160
2160
|
queryKey: [{ functionName: t, address: n, args: o, chainId: a }],
|
|
2161
2161
|
queryFn: async ({ queryKey: [c] }) => {
|
|
2162
2162
|
if (c)
|
|
2163
|
-
return await
|
|
2163
|
+
return await Zn({
|
|
2164
2164
|
address: n,
|
|
2165
2165
|
abi: r,
|
|
2166
2166
|
functionName: c.functionName,
|
|
@@ -2168,14 +2168,14 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2168
2168
|
publicClient: l
|
|
2169
2169
|
});
|
|
2170
2170
|
},
|
|
2171
|
-
enabled: !e && !!a && !
|
|
2171
|
+
enabled: !e && !!a && !F(n) && !!t,
|
|
2172
2172
|
refetchInterval: s
|
|
2173
2173
|
});
|
|
2174
2174
|
}, Wr = ({
|
|
2175
2175
|
queryKey: e,
|
|
2176
2176
|
watch: t = !0
|
|
2177
2177
|
}) => {
|
|
2178
|
-
const n =
|
|
2178
|
+
const n = rn(), { data: r } = ap({
|
|
2179
2179
|
query: {
|
|
2180
2180
|
refetchInterval: Le
|
|
2181
2181
|
}
|
|
@@ -2201,8 +2201,8 @@ const Dy = (e) => typeof e == "object" && e !== null && "message" in e && typeof
|
|
|
2201
2201
|
e?.[1]?.functionName ?? ""
|
|
2202
2202
|
) : e[0] === "readContracts" ? !!e[1]?.contracts?.some(
|
|
2203
2203
|
({ functionName: r }) => t.includes(r ?? "")
|
|
2204
|
-
) : !1,
|
|
2205
|
-
const e =
|
|
2204
|
+
) : !1, ln = () => {
|
|
2205
|
+
const e = rn(), t = b(() => {
|
|
2206
2206
|
e.invalidateQueries({
|
|
2207
2207
|
predicate: ({ queryKey: r }) => Aa(r, Uy)
|
|
2208
2208
|
});
|
|
@@ -2247,7 +2247,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2247
2247
|
name: "Ethereum",
|
|
2248
2248
|
iconPath: ""
|
|
2249
2249
|
},
|
|
2250
|
-
[
|
|
2250
|
+
[Wn.id]: {
|
|
2251
2251
|
name: "Arbitrum",
|
|
2252
2252
|
iconPath: ""
|
|
2253
2253
|
},
|
|
@@ -2263,7 +2263,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2263
2263
|
name: "Base",
|
|
2264
2264
|
iconPath: ""
|
|
2265
2265
|
},
|
|
2266
|
-
[
|
|
2266
|
+
[Fn.id]: {
|
|
2267
2267
|
name: "HyperEVM",
|
|
2268
2268
|
iconPath: ""
|
|
2269
2269
|
}
|
|
@@ -2320,7 +2320,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2320
2320
|
if (!e)
|
|
2321
2321
|
throw new Error("ConfigContext is used out of Provider");
|
|
2322
2322
|
return e;
|
|
2323
|
-
}, Z = () => To().params, Ao = () => To().actions,
|
|
2323
|
+
}, Z = () => To().params, Ao = () => To().actions, Jn = () => !!To().ondo, So = () => {
|
|
2324
2324
|
const { defaultWithdrawSlippage: e } = Z(), { chainId: t } = A();
|
|
2325
2325
|
return ss(e) ? e : e[t] ?? vs;
|
|
2326
2326
|
}, xo = () => {
|
|
@@ -2348,7 +2348,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2348
2348
|
}, [n, t]), /* @__PURE__ */ i("div", { className: "dtw-p-4 dtw-absolute dtw-top-0 dtw-inset-x-0 dtw-rounded-xl dtw-bg-[var(--panel-notification-bg,var(--panel-secondary-color))]", children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-justify-between dtw-items-center", children: [
|
|
2349
2349
|
/* @__PURE__ */ i("div", { children: e }),
|
|
2350
2350
|
!!t && /* @__PURE__ */ i(
|
|
2351
|
-
|
|
2351
|
+
In,
|
|
2352
2352
|
{
|
|
2353
2353
|
Icon: os,
|
|
2354
2354
|
onClick: t,
|
|
@@ -2394,8 +2394,8 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2394
2394
|
),
|
|
2395
2395
|
children: [
|
|
2396
2396
|
e,
|
|
2397
|
-
!!s && /* @__PURE__ */ i("div", { className: "dtw-absolute dtw-top-5 dtw-left-5", children: /* @__PURE__ */ i(
|
|
2398
|
-
!!o && /* @__PURE__ */ i("div", { className: "dtw-absolute dtw-top-5 dtw-right-5", children: /* @__PURE__ */ i(
|
|
2397
|
+
!!s && /* @__PURE__ */ i("div", { className: "dtw-absolute dtw-top-5 dtw-left-5", children: /* @__PURE__ */ i(In, { Icon: Mc, onClick: s }) }),
|
|
2398
|
+
!!o && /* @__PURE__ */ i("div", { className: "dtw-absolute dtw-top-5 dtw-right-5", children: /* @__PURE__ */ i(In, { Icon: os, onClick: o }) })
|
|
2399
2399
|
]
|
|
2400
2400
|
}
|
|
2401
2401
|
)
|
|
@@ -2525,16 +2525,16 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2525
2525
|
[t]
|
|
2526
2526
|
);
|
|
2527
2527
|
return /* @__PURE__ */ i(Li.Provider, { value: n, children: e });
|
|
2528
|
-
},
|
|
2528
|
+
}, W = () => {
|
|
2529
2529
|
const e = fe(Li);
|
|
2530
2530
|
if (!e)
|
|
2531
2531
|
throw new Error("ComponentContext is used out of Provider");
|
|
2532
2532
|
return e;
|
|
2533
|
-
},
|
|
2534
|
-
const { ActionButton: n = K } =
|
|
2533
|
+
}, Pn = ({ children: e, promptText: t }) => {
|
|
2534
|
+
const { ActionButton: n = K } = W();
|
|
2535
2535
|
return /* @__PURE__ */ w("div", { children: [
|
|
2536
2536
|
/* @__PURE__ */ w("div", { className: "md:dtw-hidden dtw-mb-4 dtw-flex dtw-items-center dtw-justify-center dtw-space-x-1 dtw-text-[var(--panel-warning-content-color)]", children: [
|
|
2537
|
-
/* @__PURE__ */ i(
|
|
2537
|
+
/* @__PURE__ */ i(Qt, { className: "dtw-h-5 dtw-w-5" }),
|
|
2538
2538
|
/* @__PURE__ */ i("div", { className: "dtw-py-1 dtw-text-xs", children: t })
|
|
2539
2539
|
] }),
|
|
2540
2540
|
/* @__PURE__ */ i(Zr, { text: t, children: /* @__PURE__ */ i(n, { disabled: !0, children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-justify-center dtw-gap-2", children: [
|
|
@@ -2563,7 +2563,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2563
2563
|
o && /* @__PURE__ */ i(Lr, { className: r })
|
|
2564
2564
|
]
|
|
2565
2565
|
}
|
|
2566
|
-
),
|
|
2566
|
+
), er = ({
|
|
2567
2567
|
defaultEnabled: e = !1,
|
|
2568
2568
|
onChange: t,
|
|
2569
2569
|
disabled: n = !1,
|
|
@@ -2658,20 +2658,20 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2658
2658
|
address: t,
|
|
2659
2659
|
watch: n = !1
|
|
2660
2660
|
}) => {
|
|
2661
|
-
const { account: r } = B(), o = A(), a =
|
|
2661
|
+
const { account: r } = B(), o = A(), a = Bn(e, o.chainId), { data: s, queryKey: l } = ni({
|
|
2662
2662
|
chainId: o.chainId,
|
|
2663
2663
|
address: r,
|
|
2664
2664
|
query: {
|
|
2665
2665
|
enabled: a && !!r
|
|
2666
2666
|
}
|
|
2667
|
-
}), { data: c, queryKey: d } =
|
|
2667
|
+
}), { data: c, queryKey: d } = le({
|
|
2668
2668
|
contracts: [
|
|
2669
2669
|
{
|
|
2670
2670
|
address: t,
|
|
2671
2671
|
abi: Ee,
|
|
2672
2672
|
functionName: "balanceOf",
|
|
2673
2673
|
chainId: o.chainId,
|
|
2674
|
-
args: [r ??
|
|
2674
|
+
args: [r ?? O]
|
|
2675
2675
|
},
|
|
2676
2676
|
{
|
|
2677
2677
|
address: t,
|
|
@@ -2702,7 +2702,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2702
2702
|
address: t,
|
|
2703
2703
|
watch: n = !1
|
|
2704
2704
|
}) => {
|
|
2705
|
-
const r = A(), o =
|
|
2705
|
+
const r = A(), o = Bn(e, r.chainId), a = Be({ symbol: e, address: t, watch: n }), { data: s } = $y({
|
|
2706
2706
|
chainId: r.chainId,
|
|
2707
2707
|
query: {
|
|
2708
2708
|
enabled: o
|
|
@@ -2711,9 +2711,9 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2711
2711
|
return o ? Gc({
|
|
2712
2712
|
nativeTokenBalance: a,
|
|
2713
2713
|
gasPrice: Number(s?.maxFeePerGas ?? 0),
|
|
2714
|
-
tokenDecimals:
|
|
2714
|
+
tokenDecimals: qt[r.chainId]?.decimals ?? V
|
|
2715
2715
|
}).toString() : a;
|
|
2716
|
-
},
|
|
2716
|
+
}, tr = () => {
|
|
2717
2717
|
const [{ value: e, symbol: t, address: n }] = $(), r = Co({ symbol: t, address: n });
|
|
2718
2718
|
return new D(e || 0).gt(r ?? 0);
|
|
2719
2719
|
}, nT = ({ address: e, chainId: t }) => [
|
|
@@ -2726,18 +2726,18 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2726
2726
|
}
|
|
2727
2727
|
], rT = (e) => ({
|
|
2728
2728
|
isUserDhedgePool: e[0].result
|
|
2729
|
-
}),
|
|
2730
|
-
const { account: e =
|
|
2729
|
+
}), nr = () => {
|
|
2730
|
+
const { account: e = O } = B(), { chainId: t, supportedChainId: n } = it(), r = t ?? n, { data: o } = le({
|
|
2731
2731
|
contracts: nT({ address: e, chainId: r }),
|
|
2732
2732
|
query: {
|
|
2733
|
-
enabled: !
|
|
2733
|
+
enabled: !F(e),
|
|
2734
2734
|
select: rT
|
|
2735
2735
|
}
|
|
2736
2736
|
});
|
|
2737
2737
|
return !!o?.isUserDhedgePool;
|
|
2738
2738
|
}, oT = ({ address: e, chainId: t }) => [
|
|
2739
2739
|
{
|
|
2740
|
-
address: e ??
|
|
2740
|
+
address: e ?? O,
|
|
2741
2741
|
abi: je,
|
|
2742
2742
|
functionName: "poolManagerLogic",
|
|
2743
2743
|
chainId: t
|
|
@@ -2768,10 +2768,10 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2768
2768
|
isCustomCooldownDepositAllowed: e[1].result,
|
|
2769
2769
|
customCooldown: e[2].result,
|
|
2770
2770
|
aaveAssetGuardAddress: e[3].result
|
|
2771
|
-
}),
|
|
2771
|
+
}), rr = ({ address: e, chainId: t }) => le({
|
|
2772
2772
|
contracts: oT({ address: e, chainId: t }),
|
|
2773
2773
|
query: {
|
|
2774
|
-
enabled: !!e && !
|
|
2774
|
+
enabled: !!e && !F(e),
|
|
2775
2775
|
staleTime: 1 / 0,
|
|
2776
2776
|
select: aT
|
|
2777
2777
|
}
|
|
@@ -2779,7 +2779,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2779
2779
|
address: e,
|
|
2780
2780
|
chainId: t
|
|
2781
2781
|
}) => {
|
|
2782
|
-
const [n] = Nt(), { data: { poolManagerLogic: r } = {} } =
|
|
2782
|
+
const [n] = Nt(), { data: { poolManagerLogic: r } = {} } = rr({
|
|
2783
2783
|
address: e,
|
|
2784
2784
|
chainId: t
|
|
2785
2785
|
});
|
|
@@ -2805,7 +2805,7 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2805
2805
|
address: e,
|
|
2806
2806
|
abi: vt,
|
|
2807
2807
|
functionName: "isMemberAllowed",
|
|
2808
|
-
args: [n ??
|
|
2808
|
+
args: [n ?? O],
|
|
2809
2809
|
chainId: t
|
|
2810
2810
|
},
|
|
2811
2811
|
{
|
|
@@ -2820,18 +2820,18 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2820
2820
|
minDepositUSD: e[1].result,
|
|
2821
2821
|
isMemberAllowed: e[2].result,
|
|
2822
2822
|
maxSupplyCapD18: e[3].result
|
|
2823
|
-
}),
|
|
2823
|
+
}), or = ({
|
|
2824
2824
|
address: e,
|
|
2825
2825
|
chainId: t
|
|
2826
2826
|
}) => {
|
|
2827
|
-
const n = Mi({ address: e, chainId: t }), { account: r =
|
|
2827
|
+
const n = Mi({ address: e, chainId: t }), { account: r = O } = B(), o = le({
|
|
2828
2828
|
contracts: sT({
|
|
2829
|
-
address: n ??
|
|
2829
|
+
address: n ?? O,
|
|
2830
2830
|
chainId: t,
|
|
2831
2831
|
account: r
|
|
2832
2832
|
}),
|
|
2833
2833
|
query: {
|
|
2834
|
-
enabled: !!n && !
|
|
2834
|
+
enabled: !!n && !F(n),
|
|
2835
2835
|
staleTime: 1 / 0,
|
|
2836
2836
|
select: iT
|
|
2837
2837
|
}
|
|
@@ -2856,20 +2856,20 @@ const yo = (e) => e ? `https://raw.githubusercontent.com/dhedge/crypto-icons/mai
|
|
|
2856
2856
|
], cT = (e) => ({
|
|
2857
2857
|
getFundComposition: e[0].result,
|
|
2858
2858
|
getSupportedAssets: e[1].result?.map(({ asset: t }) => t)
|
|
2859
|
-
}),
|
|
2859
|
+
}), ar = ({
|
|
2860
2860
|
address: e,
|
|
2861
2861
|
chainId: t
|
|
2862
2862
|
}) => {
|
|
2863
2863
|
const n = Mi({ address: e, chainId: t });
|
|
2864
|
-
return
|
|
2864
|
+
return le({
|
|
2865
2865
|
contracts: lT({
|
|
2866
|
-
address: n ??
|
|
2866
|
+
address: n ?? O,
|
|
2867
2867
|
chainId: t
|
|
2868
2868
|
}),
|
|
2869
2869
|
query: {
|
|
2870
|
-
enabled: !!n && !
|
|
2870
|
+
enabled: !!n && !F(n),
|
|
2871
2871
|
select: cT,
|
|
2872
|
-
refetchInterval:
|
|
2872
|
+
refetchInterval: Mn
|
|
2873
2873
|
}
|
|
2874
2874
|
});
|
|
2875
2875
|
};
|
|
@@ -2880,7 +2880,7 @@ function dT(e, t, n) {
|
|
|
2880
2880
|
a[r] = e[r + t];
|
|
2881
2881
|
return a;
|
|
2882
2882
|
}
|
|
2883
|
-
var pT = dT, uT = io, mT = hi, wT = uo, hT =
|
|
2883
|
+
var pT = dT, uT = io, mT = hi, wT = uo, hT = sn;
|
|
2884
2884
|
function gT(e, t, n) {
|
|
2885
2885
|
if (!hT(n))
|
|
2886
2886
|
return !1;
|
|
@@ -2897,7 +2897,7 @@ var yT = bT, TT = yT, AT = /^\s+/;
|
|
|
2897
2897
|
function ST(e) {
|
|
2898
2898
|
return e && e.slice(0, TT(e) + 1).replace(AT, "");
|
|
2899
2899
|
}
|
|
2900
|
-
var xT = ST, CT = xT, Sa =
|
|
2900
|
+
var xT = ST, CT = xT, Sa = sn, ET = Qn, xa = NaN, IT = /^[-+]0x[0-9a-f]+$/i, NT = /^0b[01]+$/i, OT = /^0o[0-7]+$/i, _T = parseInt;
|
|
2901
2901
|
function PT(e) {
|
|
2902
2902
|
if (typeof e == "number")
|
|
2903
2903
|
return e;
|
|
@@ -2939,7 +2939,7 @@ function VT(e, t, n) {
|
|
|
2939
2939
|
return s;
|
|
2940
2940
|
}
|
|
2941
2941
|
var jT = VT;
|
|
2942
|
-
const Fi = /* @__PURE__ */
|
|
2942
|
+
const Fi = /* @__PURE__ */ Hn(jT), Wi = ({
|
|
2943
2943
|
account: e,
|
|
2944
2944
|
chainId: t,
|
|
2945
2945
|
address: n
|
|
@@ -2959,19 +2959,19 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
2959
2959
|
args: []
|
|
2960
2960
|
}
|
|
2961
2961
|
], qT = (e) => e.flatMap(Wi), KT = Wi({
|
|
2962
|
-
account:
|
|
2962
|
+
account: O,
|
|
2963
2963
|
chainId: Ms.id,
|
|
2964
|
-
address:
|
|
2964
|
+
address: O
|
|
2965
2965
|
}).length, YT = ({
|
|
2966
2966
|
account: e
|
|
2967
2967
|
}) => {
|
|
2968
|
-
const { chainId: t } = it(), n =
|
|
2969
|
-
return
|
|
2968
|
+
const { chainId: t } = it(), n = on();
|
|
2969
|
+
return le({
|
|
2970
2970
|
contracts: qT(n.map((r) => ({ ...r, account: e }))),
|
|
2971
2971
|
query: {
|
|
2972
2972
|
select: (r) => Fi(r, KT).reduce(
|
|
2973
2973
|
(o, [a, s], l) => {
|
|
2974
|
-
const c = n?.[l]?.address ??
|
|
2974
|
+
const c = n?.[l]?.address ?? O;
|
|
2975
2975
|
return {
|
|
2976
2976
|
...o,
|
|
2977
2977
|
[c]: {
|
|
@@ -2986,8 +2986,8 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
2986
2986
|
if (o?.queryKey?.[1].chainId !== t)
|
|
2987
2987
|
return r;
|
|
2988
2988
|
},
|
|
2989
|
-
refetchInterval:
|
|
2990
|
-
enabled: !
|
|
2989
|
+
refetchInterval: Mn,
|
|
2990
|
+
enabled: !F(e)
|
|
2991
2991
|
}
|
|
2992
2992
|
});
|
|
2993
2993
|
}, QT = ({ chainId: e, address: t }) => [
|
|
@@ -3022,10 +3022,10 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3022
3022
|
chainId: t,
|
|
3023
3023
|
refetchInterval: n = Le,
|
|
3024
3024
|
enabled: r = !0
|
|
3025
|
-
}) =>
|
|
3025
|
+
}) => le({
|
|
3026
3026
|
contracts: QT({ address: e, chainId: t }),
|
|
3027
3027
|
query: {
|
|
3028
|
-
enabled: r && !!e && !
|
|
3028
|
+
enabled: r && !!e && !F(e),
|
|
3029
3029
|
refetchInterval: n,
|
|
3030
3030
|
select: XT
|
|
3031
3031
|
}
|
|
@@ -3033,11 +3033,11 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3033
3033
|
address: e,
|
|
3034
3034
|
chainId: t
|
|
3035
3035
|
}) => {
|
|
3036
|
-
const { account: n } = B(), { data: { managerAddress: r } = { managerAddress:
|
|
3036
|
+
const { account: n } = B(), { data: { managerAddress: r } = { managerAddress: O } } = ve({ address: e, chainId: t }), { data: { isMemberAllowed: o = !1 } = {} } = or({
|
|
3037
3037
|
address: e,
|
|
3038
3038
|
chainId: t
|
|
3039
3039
|
});
|
|
3040
|
-
return n ? o ||
|
|
3040
|
+
return n ? o || G(n, r) : !1;
|
|
3041
3041
|
}, JT = ({
|
|
3042
3042
|
address: e,
|
|
3043
3043
|
chainId: t
|
|
@@ -3056,10 +3056,10 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3056
3056
|
getFundComposition: [o, a, s] = []
|
|
3057
3057
|
} = {},
|
|
3058
3058
|
isFetched: l
|
|
3059
|
-
} =
|
|
3059
|
+
} = ar({ address: e, chainId: t }), c = P(
|
|
3060
3060
|
() => o?.map(({ asset: p }) => p) ?? [],
|
|
3061
3061
|
[o]
|
|
3062
|
-
), { data: d } =
|
|
3062
|
+
), { data: d } = le({
|
|
3063
3063
|
contracts: c.flatMap((p) => [
|
|
3064
3064
|
{
|
|
3065
3065
|
address: p,
|
|
@@ -3118,7 +3118,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3118
3118
|
announcedTimestamp: a
|
|
3119
3119
|
};
|
|
3120
3120
|
}, Ui = (e, t) => {
|
|
3121
|
-
const { data: { getFeeIncreaseInfo: n, minDepositUSD: r } = {} } =
|
|
3121
|
+
const { data: { getFeeIncreaseInfo: n, minDepositUSD: r } = {} } = or({ address: e, chainId: t });
|
|
3122
3122
|
return {
|
|
3123
3123
|
...eA(n),
|
|
3124
3124
|
minDepositUSD: +we(r ?? BigInt(0), V)
|
|
@@ -3154,7 +3154,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3154
3154
|
return {
|
|
3155
3155
|
...r,
|
|
3156
3156
|
fraction: o.toFixed(bt(o)),
|
|
3157
|
-
fractionUsd:
|
|
3157
|
+
fractionUsd: ae({ value: a }),
|
|
3158
3158
|
fractionUsdNumber: a
|
|
3159
3159
|
};
|
|
3160
3160
|
}).filter(({ amount: r }) => r !== "0").sort((r, o) => o.fractionUsdNumber - r.fractionUsdNumber), nA = ({
|
|
@@ -3181,7 +3181,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3181
3181
|
BigInt(o?.tokenPrice ?? r?.tokenPrice ?? "0")
|
|
3182
3182
|
);
|
|
3183
3183
|
}, Eo = ({ address: e, chainId: t }) => {
|
|
3184
|
-
const [n] = Nt(), r =
|
|
3184
|
+
const [n] = Nt(), r = G(n.address, e) ? n : null, {
|
|
3185
3185
|
data: {
|
|
3186
3186
|
performanceFee: o,
|
|
3187
3187
|
streamingFee: a,
|
|
@@ -3192,7 +3192,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3192
3192
|
return P(() => {
|
|
3193
3193
|
const p = o ?? r?.performanceFeeNumerator ?? "0", m = a ?? r?.streamingFeeNumerator ?? "0";
|
|
3194
3194
|
return {
|
|
3195
|
-
performanceFee:
|
|
3195
|
+
performanceFee: vn(
|
|
3196
3196
|
p,
|
|
3197
3197
|
Ne
|
|
3198
3198
|
),
|
|
@@ -3200,7 +3200,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3200
3200
|
+p,
|
|
3201
3201
|
Ne
|
|
3202
3202
|
),
|
|
3203
|
-
streamingFee:
|
|
3203
|
+
streamingFee: vn(
|
|
3204
3204
|
m,
|
|
3205
3205
|
Ne,
|
|
3206
3206
|
2
|
|
@@ -3209,13 +3209,13 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3209
3209
|
+m,
|
|
3210
3210
|
Ne
|
|
3211
3211
|
),
|
|
3212
|
-
entryFee:
|
|
3212
|
+
entryFee: vn(
|
|
3213
3213
|
c,
|
|
3214
3214
|
Ne,
|
|
3215
3215
|
2
|
|
3216
3216
|
),
|
|
3217
3217
|
entryFeeNumber: ft(+c, Ne),
|
|
3218
|
-
exitFee:
|
|
3218
|
+
exitFee: vn(d, Ne, 2),
|
|
3219
3219
|
exitFeeNumber: ft(+d, Ne)
|
|
3220
3220
|
};
|
|
3221
3221
|
}, [
|
|
@@ -3227,35 +3227,35 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3227
3227
|
d
|
|
3228
3228
|
]);
|
|
3229
3229
|
}, rA = () => {
|
|
3230
|
-
const { address: e, chainId: t } = A(), { queryKey: n } =
|
|
3230
|
+
const { address: e, chainId: t } = A(), { queryKey: n } = ar({
|
|
3231
3231
|
address: e,
|
|
3232
3232
|
chainId: t
|
|
3233
3233
|
});
|
|
3234
3234
|
Wr({ queryKey: n });
|
|
3235
|
-
},
|
|
3235
|
+
}, An = Bs.id, oA = (e) => {
|
|
3236
3236
|
const t = Q(
|
|
3237
3237
|
"flatcoinPointsModule",
|
|
3238
|
-
|
|
3238
|
+
An
|
|
3239
3239
|
);
|
|
3240
3240
|
return [
|
|
3241
3241
|
{
|
|
3242
3242
|
address: t,
|
|
3243
|
-
chainId:
|
|
3244
|
-
abi:
|
|
3243
|
+
chainId: An,
|
|
3244
|
+
abi: fr,
|
|
3245
3245
|
functionName: "lockedBalance",
|
|
3246
3246
|
args: [e]
|
|
3247
3247
|
},
|
|
3248
3248
|
{
|
|
3249
3249
|
address: t,
|
|
3250
|
-
chainId:
|
|
3251
|
-
abi:
|
|
3250
|
+
chainId: An,
|
|
3251
|
+
abi: fr,
|
|
3252
3252
|
functionName: "getUnlockTax",
|
|
3253
3253
|
args: [e]
|
|
3254
3254
|
},
|
|
3255
3255
|
{
|
|
3256
3256
|
address: t,
|
|
3257
|
-
chainId:
|
|
3258
|
-
abi:
|
|
3257
|
+
chainId: An,
|
|
3258
|
+
abi: fr,
|
|
3259
3259
|
functionName: "unlockTime",
|
|
3260
3260
|
args: [e]
|
|
3261
3261
|
}
|
|
@@ -3263,7 +3263,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3263
3263
|
}, aA = ({
|
|
3264
3264
|
enabled: e,
|
|
3265
3265
|
address: t
|
|
3266
|
-
}) =>
|
|
3266
|
+
}) => le({
|
|
3267
3267
|
contracts: oA(t),
|
|
3268
3268
|
query: {
|
|
3269
3269
|
enabled: e,
|
|
@@ -3284,7 +3284,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3284
3284
|
address: e,
|
|
3285
3285
|
chainId: t
|
|
3286
3286
|
}), r = Q("factory", t);
|
|
3287
|
-
return
|
|
3287
|
+
return le({
|
|
3288
3288
|
contracts: n.map(({ tokenAddress: o }) => ({
|
|
3289
3289
|
address: r,
|
|
3290
3290
|
abi: qe,
|
|
@@ -3294,7 +3294,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3294
3294
|
})),
|
|
3295
3295
|
query: {
|
|
3296
3296
|
select: (o) => n.some(({ amount: a, tokenAddress: s }, l) => (!!o[l]?.result || sA.some(
|
|
3297
|
-
(p) =>
|
|
3297
|
+
(p) => G(p, s)
|
|
3298
3298
|
)) && a !== "0"),
|
|
3299
3299
|
staleTime: 1 / 0
|
|
3300
3300
|
}
|
|
@@ -3310,7 +3310,7 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3310
3310
|
if (e <= t)
|
|
3311
3311
|
return n;
|
|
3312
3312
|
return Rd;
|
|
3313
|
-
},
|
|
3313
|
+
}, xr = (e) => Number(e?.toString() ?? "0") * 1e3, cA = ({
|
|
3314
3314
|
address: e,
|
|
3315
3315
|
chainId: t
|
|
3316
3316
|
}) => {
|
|
@@ -3320,12 +3320,12 @@ const Fi = /* @__PURE__ */ Gn(jT), Wi = ({
|
|
|
3320
3320
|
abi: je,
|
|
3321
3321
|
functionName: "getExitRemainingCooldown",
|
|
3322
3322
|
chainId: t,
|
|
3323
|
-
args: [n ??
|
|
3323
|
+
args: [n ?? O],
|
|
3324
3324
|
query: {
|
|
3325
3325
|
enabled: !!n,
|
|
3326
|
-
select:
|
|
3327
|
-
refetchInterval: (r) => lA(
|
|
3328
|
-
refetchOnWindowFocus: (r) =>
|
|
3326
|
+
select: xr,
|
|
3327
|
+
refetchInterval: (r) => lA(xr(r.state?.data)),
|
|
3328
|
+
refetchOnWindowFocus: (r) => xr(r.state?.data) > 0
|
|
3329
3329
|
}
|
|
3330
3330
|
});
|
|
3331
3331
|
};
|
|
@@ -3335,9 +3335,9 @@ function dA(e, t, n) {
|
|
|
3335
3335
|
balanceInUsd: "",
|
|
3336
3336
|
balanceInUsdNumber: 0
|
|
3337
3337
|
};
|
|
3338
|
-
const r = +e *
|
|
3338
|
+
const r = +e * Xt(t);
|
|
3339
3339
|
return {
|
|
3340
|
-
balanceInUsd:
|
|
3340
|
+
balanceInUsd: ae({
|
|
3341
3341
|
value: r,
|
|
3342
3342
|
maximumFractionDigits: n
|
|
3343
3343
|
}),
|
|
@@ -3346,7 +3346,7 @@ function dA(e, t, n) {
|
|
|
3346
3346
|
}
|
|
3347
3347
|
const Gi = (e, t) => Vc(e) ? {
|
|
3348
3348
|
rawBalance: e?.toString() ?? "",
|
|
3349
|
-
...dA(we(e,
|
|
3349
|
+
...dA(we(e, Zt), t?.toString())
|
|
3350
3350
|
} : {
|
|
3351
3351
|
rawBalance: "",
|
|
3352
3352
|
balanceInUsd: "",
|
|
@@ -3354,10 +3354,10 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3354
3354
|
}, pA = ({
|
|
3355
3355
|
account: e
|
|
3356
3356
|
} = {}) => {
|
|
3357
|
-
const { account: t } = B(), n = e ?? t ??
|
|
3357
|
+
const { account: t } = B(), n = e ?? t ?? O, { data: r } = YT({
|
|
3358
3358
|
account: n
|
|
3359
3359
|
});
|
|
3360
|
-
return P(() =>
|
|
3360
|
+
return P(() => F(n) ? {} : Object.entries(r ?? {}).reduce(
|
|
3361
3361
|
(o, [a, s]) => {
|
|
3362
3362
|
const l = Gi(
|
|
3363
3363
|
BigInt(s.balance ?? "0"),
|
|
@@ -3372,7 +3372,7 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3372
3372
|
chainId: t,
|
|
3373
3373
|
address: n
|
|
3374
3374
|
}) => {
|
|
3375
|
-
const { data: r, isFetched: o } = ve({ address: n, chainId: t }), { poolFallbackData: a } =
|
|
3375
|
+
const { data: r, isFetched: o } = ve({ address: n, chainId: t }), { poolFallbackData: a } = se(), s = G(a.address, n) ? a.tokenPrice ?? "0" : "0";
|
|
3376
3376
|
return Pe({
|
|
3377
3377
|
address: e ? n : void 0,
|
|
3378
3378
|
abi: je,
|
|
@@ -3380,19 +3380,19 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3380
3380
|
chainId: t,
|
|
3381
3381
|
args: [e],
|
|
3382
3382
|
query: {
|
|
3383
|
-
enabled: !
|
|
3383
|
+
enabled: !F(e) && o,
|
|
3384
3384
|
select: (l) => Gi(
|
|
3385
3385
|
l,
|
|
3386
3386
|
BigInt(r?.tokenPrice ?? s)
|
|
3387
3387
|
)
|
|
3388
3388
|
}
|
|
3389
3389
|
});
|
|
3390
|
-
}, mA = (e) => Math.ceil(
|
|
3390
|
+
}, mA = (e) => Math.ceil(Xt(e)), wA = ({
|
|
3391
3391
|
address: e,
|
|
3392
3392
|
chainId: t,
|
|
3393
3393
|
select: n = mA
|
|
3394
3394
|
}) => {
|
|
3395
|
-
const { data: { totalValueD18: r } = {} } = ve({ address: e, chainId: t }), { data: { maxSupplyCapD18: o } = {} } =
|
|
3395
|
+
const { data: { totalValueD18: r } = {} } = ve({ address: e, chainId: t }), { data: { maxSupplyCapD18: o } = {} } = or({
|
|
3396
3396
|
address: e,
|
|
3397
3397
|
chainId: t
|
|
3398
3398
|
});
|
|
@@ -3411,7 +3411,7 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3411
3411
|
address: e,
|
|
3412
3412
|
chainId: t
|
|
3413
3413
|
}) => {
|
|
3414
|
-
const { data: { maxSupplyCapD18: n } = {} } =
|
|
3414
|
+
const { data: { maxSupplyCapD18: n } = {} } = or({
|
|
3415
3415
|
address: e,
|
|
3416
3416
|
chainId: t
|
|
3417
3417
|
}), { data: { totalSupplyD18: r } = {} } = ve({ address: e, chainId: t }), o = Te({ address: e, chainId: t }), { data: a = 0 } = wA({
|
|
@@ -3420,7 +3420,7 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3420
3420
|
});
|
|
3421
3421
|
if (!n || n === 0n)
|
|
3422
3422
|
return null;
|
|
3423
|
-
const s = Math.ceil(
|
|
3423
|
+
const s = Math.ceil(Xt(r ?? 0)), l = Xt(n), c = Math.max(
|
|
3424
3424
|
0,
|
|
3425
3425
|
l - a
|
|
3426
3426
|
), d = Math.max(
|
|
@@ -3440,8 +3440,8 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3440
3440
|
const { data: { isPrivateVault: n } = { isPrivateVault: !1 } } = ve({
|
|
3441
3441
|
address: e,
|
|
3442
3442
|
chainId: t
|
|
3443
|
-
}), o =
|
|
3444
|
-
(s) =>
|
|
3443
|
+
}), o = on().find(
|
|
3444
|
+
(s) => G(e, s.address) && s.chainId === t
|
|
3445
3445
|
), a = !!(o?.maintenance || o?.maintenanceDeposits);
|
|
3446
3446
|
return n || a;
|
|
3447
3447
|
}, MO = (e) => ve(e), Hi = ({
|
|
@@ -3455,17 +3455,17 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3455
3455
|
args: e ? [e] : void 0,
|
|
3456
3456
|
chainId: t,
|
|
3457
3457
|
query: {
|
|
3458
|
-
enabled: !!e && !
|
|
3458
|
+
enabled: !!e && !F(n),
|
|
3459
3459
|
staleTime: 1 / 0
|
|
3460
3460
|
}
|
|
3461
3461
|
});
|
|
3462
3462
|
return r;
|
|
3463
3463
|
}, gA = (e) => {
|
|
3464
|
-
const t = Qr(), n =
|
|
3464
|
+
const t = Qr(), n = rn();
|
|
3465
3465
|
return b(
|
|
3466
3466
|
async (r) => {
|
|
3467
3467
|
const o = Q("factory", e);
|
|
3468
|
-
if (!
|
|
3468
|
+
if (!F(o))
|
|
3469
3469
|
return n.fetchQuery({
|
|
3470
3470
|
...Ws(t, {
|
|
3471
3471
|
address: o,
|
|
@@ -3484,7 +3484,7 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3484
3484
|
chainId: t,
|
|
3485
3485
|
enabled: n = !0
|
|
3486
3486
|
}) => {
|
|
3487
|
-
const r = ct({ address: e, chainId: t }), o = Q("factory", t), a = n && !
|
|
3487
|
+
const r = ct({ address: e, chainId: t }), o = Q("factory", t), a = n && !F(o), { data: s } = le({
|
|
3488
3488
|
contracts: r.map(({ tokenAddress: c }) => ({
|
|
3489
3489
|
address: o,
|
|
3490
3490
|
abi: qe,
|
|
@@ -3546,11 +3546,11 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3546
3546
|
const { assets: r } = Ye({ address: e, chainId: t }), o = Q("ondoPriceOracle", t), a = P(
|
|
3547
3547
|
() => r.map((v) => v.address),
|
|
3548
3548
|
[r]
|
|
3549
|
-
), s = t === Et.id, l = !!Ks()?.api.getPricesUrl, c = a.length > 0, d = n && s && c && l && !
|
|
3549
|
+
), s = t === Et.id, l = !!Ks()?.api.getPricesUrl, c = a.length > 0, d = n && s && c && l && !F(o), {
|
|
3550
3550
|
data: p,
|
|
3551
3551
|
isFetching: m,
|
|
3552
3552
|
isError: u
|
|
3553
|
-
} =
|
|
3553
|
+
} = le({
|
|
3554
3554
|
contracts: a.map((v) => ({
|
|
3555
3555
|
address: o,
|
|
3556
3556
|
abi: Ts,
|
|
@@ -3572,7 +3572,7 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3572
3572
|
return P(() => {
|
|
3573
3573
|
if (!n || !s || !c)
|
|
3574
3574
|
return { needsPriceUpdate: !1, isChecking: !1 };
|
|
3575
|
-
if (!l ||
|
|
3575
|
+
if (!l || F(o))
|
|
3576
3576
|
return { needsPriceUpdate: !0, isChecking: !1 };
|
|
3577
3577
|
if (u || f)
|
|
3578
3578
|
return { needsPriceUpdate: !0, isChecking: !1 };
|
|
@@ -3581,11 +3581,11 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3581
3581
|
const v = h.prices.some(
|
|
3582
3582
|
(S) => !!S.address
|
|
3583
3583
|
), y = (S, k) => v ? h.prices.find(
|
|
3584
|
-
(
|
|
3584
|
+
(_) => _.address && G(_.address, S)
|
|
3585
3585
|
)?.price : h.prices.length === a.length ? h.prices[k]?.price : void 0;
|
|
3586
3586
|
return { needsPriceUpdate: a.some((S, k) => {
|
|
3587
|
-
const
|
|
3588
|
-
return !
|
|
3587
|
+
const _ = p[k], M = _?.status === "success" ? _.result[0] : void 0, N = yA(y(S, k));
|
|
3588
|
+
return !M || M <= 0n || !N || N <= 0n ? !0 : (M > N ? M - N : N - M) * 10000n > bA * N;
|
|
3589
3589
|
}), isChecking: !1 };
|
|
3590
3590
|
}, [
|
|
3591
3591
|
n,
|
|
@@ -3601,12 +3601,12 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3601
3601
|
h,
|
|
3602
3602
|
a
|
|
3603
3603
|
]);
|
|
3604
|
-
},
|
|
3604
|
+
}, cn = ({
|
|
3605
3605
|
address: e,
|
|
3606
3606
|
chainId: t
|
|
3607
3607
|
}) => {
|
|
3608
3608
|
const n = ct({ address: e, chainId: t }), r = n.some(
|
|
3609
|
-
(s) =>
|
|
3609
|
+
(s) => G(s.tokenAddress, Go)
|
|
3610
3610
|
), o = r ? Go : void 0, a = Hi({
|
|
3611
3611
|
asset: o,
|
|
3612
3612
|
chainId: t
|
|
@@ -3624,10 +3624,10 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3624
3624
|
address: e,
|
|
3625
3625
|
symbol: t,
|
|
3626
3626
|
chainId: n
|
|
3627
|
-
} = A(), { account: r =
|
|
3627
|
+
} = A(), { account: r = O } = B(), o = Be({ symbol: t, address: e }), { data: { totalSupplyD18: a } = {} } = ve({
|
|
3628
3628
|
address: e,
|
|
3629
3629
|
chainId: n
|
|
3630
|
-
}), l = jc(e) && !
|
|
3630
|
+
}), l = jc(e) && !G(r, O), {
|
|
3631
3631
|
data: { lockedVaultPointsBalance: c, unlockTaxInPercents: d, unlockTime: p } = {},
|
|
3632
3632
|
isLoading: m
|
|
3633
3633
|
} = aA({
|
|
@@ -3653,11 +3653,11 @@ const Gi = (e, t) => Vc(e) ? {
|
|
|
3653
3653
|
m
|
|
3654
3654
|
]);
|
|
3655
3655
|
}, Io = () => {
|
|
3656
|
-
const { depositQuoteDiffErrorThreshold: e } = Z(), [t, n] = U(!1), [{ slippage: r, minSlippage: o }] = ne(), a = r === "auto" ? o ?? 0 : r, l = !
|
|
3656
|
+
const { depositQuoteDiffErrorThreshold: e } = Z(), [t, n] = U(!1), [{ slippage: r, minSlippage: o }] = ne(), a = r === "auto" ? o ?? 0 : r, l = !tr() && a > e && !t, c = b(() => {
|
|
3657
3657
|
n(!0);
|
|
3658
3658
|
}, []);
|
|
3659
3659
|
return { requiresHighSlippageConfirm: l, confirmHighSlippage: c, slippageToBeUsed: a };
|
|
3660
|
-
},
|
|
3660
|
+
}, dn = (e) => {
|
|
3661
3661
|
const { depositQuoteDiffErrorThreshold: t, depositQuoteDiffWarningThreshold: n } = Z(), r = Math.abs(e);
|
|
3662
3662
|
return r > t ? Y.ERROR : r > n ? Y.WARNING : Y.DEFAULT;
|
|
3663
3663
|
};
|
|
@@ -3666,7 +3666,7 @@ function CA(e) {
|
|
|
3666
3666
|
return typeof e == "number" || SA(e) && AA(e) == xA;
|
|
3667
3667
|
}
|
|
3668
3668
|
var EA = CA;
|
|
3669
|
-
const IA = /* @__PURE__ */
|
|
3669
|
+
const IA = /* @__PURE__ */ Hn(EA), Vi = ({
|
|
3670
3670
|
tradingType: e,
|
|
3671
3671
|
slippage: t,
|
|
3672
3672
|
minSlippage: n
|
|
@@ -3715,7 +3715,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3715
3715
|
[t]: { isOpen: !1, isPending: !1 }
|
|
3716
3716
|
}),
|
|
3717
3717
|
{}
|
|
3718
|
-
), PA = () =>
|
|
3718
|
+
), PA = () => Rn(_A, qi), Ki = ge(qi), Yi = ge(() => {
|
|
3719
3719
|
}), Qi = () => {
|
|
3720
3720
|
const e = fe(Ki);
|
|
3721
3721
|
if (!e)
|
|
@@ -3726,7 +3726,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3726
3726
|
if (!e)
|
|
3727
3727
|
throw new Error("OverlayDispatchContext is used out of Provider");
|
|
3728
3728
|
return e;
|
|
3729
|
-
},
|
|
3729
|
+
}, pe = ({ type: e }) => {
|
|
3730
3730
|
const t = Qi(), n = Ae(), r = b(() => {
|
|
3731
3731
|
n({
|
|
3732
3732
|
type: "MERGE_OVERLAY",
|
|
@@ -3807,7 +3807,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3807
3807
|
}, [t, n, e]);
|
|
3808
3808
|
return { displayLimitSellOverlay: n, openLimitSellOverlay: r };
|
|
3809
3809
|
}, No = "0x000000000022D473030F116dDEE9F6B43aC78BA3", LA = 100, RA = 28, $A = 1, BA = 500, Zi = 2, MA = 1, FA = 5, WA = 2, Ji = {
|
|
3810
|
-
[
|
|
3810
|
+
[Wn.id]: "0x40F2978D87348250F085ACEbd680B387842a69eF"
|
|
3811
3811
|
}, UA = {
|
|
3812
3812
|
PermitWitnessTransferFrom: [
|
|
3813
3813
|
{ name: "permitted", type: "TokenPermissions" },
|
|
@@ -3858,13 +3858,13 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3858
3858
|
status: t,
|
|
3859
3859
|
statusLabel: n[t]
|
|
3860
3860
|
};
|
|
3861
|
-
},
|
|
3861
|
+
}, sr = (e) => {
|
|
3862
3862
|
const t = x(), { status: n } = el();
|
|
3863
3863
|
if (!(!e || n === "Success"))
|
|
3864
3864
|
return n === "Mining" ? t.miningTx : t.sendingOrderToWallet;
|
|
3865
3865
|
}, HA = () => {
|
|
3866
3866
|
const { chainId: e } = A(), { disableHyperEvmWarning: t } = Z();
|
|
3867
|
-
return e ===
|
|
3867
|
+
return e === Fn.id && !t;
|
|
3868
3868
|
}, VA = (e, t) => e === 0 ? `dtw-z-${(t - 1) * 10}` : `dtw--ml-2 dtw-z-${(t - e - 1) * 10}`, jA = (e) => {
|
|
3869
3869
|
switch (e) {
|
|
3870
3870
|
case "xs":
|
|
@@ -3909,7 +3909,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3909
3909
|
size: t = "m",
|
|
3910
3910
|
className: n = ""
|
|
3911
3911
|
}) => {
|
|
3912
|
-
const { Image: r = Bi, customIcons: o } =
|
|
3912
|
+
const { Image: r = Bi, customIcons: o } = W(), a = e.join(""), [s, l] = U({
|
|
3913
3913
|
[a]: !1
|
|
3914
3914
|
}), { height: c, width: d, diameter: p } = jA(t), m = e.length === 1 ? o?.[e[0]] : void 0, u = OA(m ? [] : e);
|
|
3915
3915
|
if (m)
|
|
@@ -3949,7 +3949,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3949
3949
|
))
|
|
3950
3950
|
}
|
|
3951
3951
|
);
|
|
3952
|
-
},
|
|
3952
|
+
}, pn = ({
|
|
3953
3953
|
symbol: e,
|
|
3954
3954
|
iconSymbols: t,
|
|
3955
3955
|
size: n,
|
|
@@ -3997,7 +3997,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
3997
3997
|
),
|
|
3998
3998
|
children: t
|
|
3999
3999
|
}
|
|
4000
|
-
),
|
|
4000
|
+
), Cr = (e, t = !1) => {
|
|
4001
4001
|
if (!e) return "";
|
|
4002
4002
|
let n = "";
|
|
4003
4003
|
t && e.startsWith("-") && (n = "-", e = e.slice(1));
|
|
@@ -4005,7 +4005,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
4005
4005
|
if (!a) return o ? `${n}0.${o}` : n;
|
|
4006
4006
|
const s = new Intl.NumberFormat().format(Number(a));
|
|
4007
4007
|
return o !== void 0 ? `${n}${s}.${o.replace(/[^\d]/g, "")}` : `${n}${s}`;
|
|
4008
|
-
},
|
|
4008
|
+
}, Er = (e) => e.replace(/,/g, ""), qA = Dc(
|
|
4009
4009
|
({
|
|
4010
4010
|
value: e,
|
|
4011
4011
|
onChange: t,
|
|
@@ -4016,15 +4016,15 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
4016
4016
|
const s = (c) => {
|
|
4017
4017
|
const p = c.target.value.replace(r ? /[^0-9.-]/g : /[^0-9.]/g, "").replace(/^(-?\d*\.\d*).*$/, "$1").replace(/^(-?\.)(.*)/, "$1$2");
|
|
4018
4018
|
if (n)
|
|
4019
|
-
t?.(p,
|
|
4019
|
+
t?.(p, Er(p));
|
|
4020
4020
|
else {
|
|
4021
|
-
const m =
|
|
4022
|
-
t?.(m,
|
|
4021
|
+
const m = Cr(p, r);
|
|
4022
|
+
t?.(m, Er(m));
|
|
4023
4023
|
}
|
|
4024
4024
|
}, l = () => {
|
|
4025
4025
|
if (!n) return;
|
|
4026
|
-
const c =
|
|
4027
|
-
t?.(c,
|
|
4026
|
+
const c = Cr(e, r);
|
|
4027
|
+
t?.(c, Er(c));
|
|
4028
4028
|
};
|
|
4029
4029
|
return /* @__PURE__ */ i(
|
|
4030
4030
|
"input",
|
|
@@ -4033,7 +4033,7 @@ const IA = /* @__PURE__ */ Gn(EA), Vi = ({
|
|
|
4033
4033
|
ref: a,
|
|
4034
4034
|
type: "text",
|
|
4035
4035
|
inputMode: "decimal",
|
|
4036
|
-
value:
|
|
4036
|
+
value: Cr(e, r),
|
|
4037
4037
|
onChange: s,
|
|
4038
4038
|
onBlur: l
|
|
4039
4039
|
}
|
|
@@ -4130,8 +4130,8 @@ const et = ({ className: e }) => /* @__PURE__ */ i(
|
|
|
4130
4130
|
] })
|
|
4131
4131
|
] });
|
|
4132
4132
|
};
|
|
4133
|
-
function
|
|
4134
|
-
const r = Bd[n ??
|
|
4133
|
+
function ir(e, t, n) {
|
|
4134
|
+
const r = Bd[n ?? Wn.id]?.blockExplorers?.default?.url;
|
|
4135
4135
|
if (r)
|
|
4136
4136
|
switch (t) {
|
|
4137
4137
|
case "transaction":
|
|
@@ -4141,7 +4141,7 @@ function sr(e, t, n) {
|
|
|
4141
4141
|
}
|
|
4142
4142
|
}
|
|
4143
4143
|
const XA = () => {
|
|
4144
|
-
const [e, t] =
|
|
4144
|
+
const [e, t] = ie(), n = te()[1], r = Gp(), o = Vp(), [a] = e, s = a?.txHash, l = a?.action, c = l === "approve", d = a?.chainId, p = so(), { invalidateTradingQueries: m, invalidateAllowanceQueries: u } = ln(), { data: h, error: g, refetch: f } = ot({
|
|
4145
4145
|
hash: s,
|
|
4146
4146
|
chainId: d,
|
|
4147
4147
|
pollingInterval: Tt,
|
|
@@ -4152,7 +4152,7 @@ const XA = () => {
|
|
|
4152
4152
|
const v = () => {
|
|
4153
4153
|
const T = h.transactionHash;
|
|
4154
4154
|
if (T) {
|
|
4155
|
-
const S =
|
|
4155
|
+
const S = ir(T, "transaction", d);
|
|
4156
4156
|
l !== "update_ondo_prices" && (n({ link: S, status: "Success", action: l }), o?.(h, l, S)), t({ type: "remove", status: "success", txHash: T });
|
|
4157
4157
|
}
|
|
4158
4158
|
c ? u() : m();
|
|
@@ -4204,7 +4204,7 @@ const XA = () => {
|
|
|
4204
4204
|
onErrorCallback: t,
|
|
4205
4205
|
onSuccessCallback: n
|
|
4206
4206
|
}) => {
|
|
4207
|
-
const [, r] = te(), [, o] =
|
|
4207
|
+
const [, r] = te(), [, o] = ie(), [, a] = $(), s = Hp();
|
|
4208
4208
|
return b(
|
|
4209
4209
|
(l, c, d) => {
|
|
4210
4210
|
if (c) {
|
|
@@ -4219,7 +4219,7 @@ const XA = () => {
|
|
|
4219
4219
|
}
|
|
4220
4220
|
if (l) {
|
|
4221
4221
|
console.debug(`${e} transaction started`, l), o({ type: "update", txHash: l });
|
|
4222
|
-
const p =
|
|
4222
|
+
const p = ir(l, "transaction", d.chainId);
|
|
4223
4223
|
r({ isOpen: !0, status: "Mining", link: p }), e !== "approve" && e !== "update_ondo_prices" && a({ value: "" }), n?.();
|
|
4224
4224
|
}
|
|
4225
4225
|
},
|
|
@@ -4239,7 +4239,7 @@ const XA = () => {
|
|
|
4239
4239
|
refetchInterval: n,
|
|
4240
4240
|
disabled: r = !1
|
|
4241
4241
|
}) => {
|
|
4242
|
-
const { supportedChainId: o } = it(), { address: a } = A(), { data: s } =
|
|
4242
|
+
const { supportedChainId: o } = it(), { address: a } = A(), { data: s } = le({
|
|
4243
4243
|
contracts: [
|
|
4244
4244
|
{
|
|
4245
4245
|
address: Q("factory", t ?? o),
|
|
@@ -4254,7 +4254,7 @@ const XA = () => {
|
|
|
4254
4254
|
// so `getAssetPrice(poolAddress)` reverts with "Price aggregator not
|
|
4255
4255
|
// found". This can happen transiently on the deposit tab, where the
|
|
4256
4256
|
// receive token is the vault itself.
|
|
4257
|
-
enabled: !
|
|
4257
|
+
enabled: !F(e) && !G(e, a) && !r,
|
|
4258
4258
|
refetchInterval: n
|
|
4259
4259
|
}
|
|
4260
4260
|
});
|
|
@@ -4307,12 +4307,12 @@ const eS = () => {
|
|
|
4307
4307
|
}, pt = () => {
|
|
4308
4308
|
const e = !st(), [{ symbol: t }] = z(), [{ isMultiAssetWithdrawalEnabled: n }] = ne();
|
|
4309
4309
|
return e && n && t === Ce.symbol;
|
|
4310
|
-
},
|
|
4310
|
+
}, lr = ({
|
|
4311
4311
|
onErrorCallback: e
|
|
4312
4312
|
} = {}) => {
|
|
4313
4313
|
const { account: t } = B(), { chainId: n } = A(), r = pt(), [o] = $(), a = new D(o.value || "0").shiftedBy(o.decimals).toFixed(0, D.ROUND_UP), s = Q("easySwapperV2", n), { canSpend: l, isFetching: c } = cl({
|
|
4314
4314
|
tokenAddress: o.address,
|
|
4315
|
-
ownerAddress: t ??
|
|
4315
|
+
ownerAddress: t ?? O,
|
|
4316
4316
|
spenderAddress: s,
|
|
4317
4317
|
rawAmountToSpend: a,
|
|
4318
4318
|
chainId: n,
|
|
@@ -4328,7 +4328,7 @@ const eS = () => {
|
|
|
4328
4328
|
address: e,
|
|
4329
4329
|
chainId: t
|
|
4330
4330
|
}) => {
|
|
4331
|
-
const n = Ct({ chainId: t }), { data: { aaveAssetGuardAddress: r =
|
|
4331
|
+
const n = Ct({ chainId: t }), { data: { aaveAssetGuardAddress: r = O } = {} } = rr({
|
|
4332
4332
|
address: e,
|
|
4333
4333
|
chainId: t
|
|
4334
4334
|
});
|
|
@@ -4336,7 +4336,7 @@ const eS = () => {
|
|
|
4336
4336
|
async ({
|
|
4337
4337
|
withdrawAmountD18: o,
|
|
4338
4338
|
slippage: a
|
|
4339
|
-
}) =>
|
|
4339
|
+
}) => Zn({
|
|
4340
4340
|
address: r,
|
|
4341
4341
|
abi: $p,
|
|
4342
4342
|
functionName: "calculateSwapDataParams",
|
|
@@ -4357,7 +4357,7 @@ const eS = () => {
|
|
|
4357
4357
|
ondoGMSwap: Md,
|
|
4358
4358
|
usdc: Je.address
|
|
4359
4359
|
}
|
|
4360
|
-
}, rS = 200n, oS = 5n, Ia = 10000n,
|
|
4360
|
+
}, rS = 200n, oS = 5n, Ia = 10000n, Sn = (e) => e.assetType === Us, aS = (e) => e.amount * (Ia - oS) / Ia, xn = (e) => e.reduce((t, n) => t + n, 0n), sS = (e, t) => e.reduce((n, r) => {
|
|
4361
4361
|
const o = t(r);
|
|
4362
4362
|
return n.set(o, [...n.get(o) ?? [], r]);
|
|
4363
4363
|
}, /* @__PURE__ */ new Map()), iS = async (e, t, n, r) => {
|
|
@@ -4367,7 +4367,7 @@ const eS = () => {
|
|
|
4367
4367
|
abi: $o,
|
|
4368
4368
|
functionName: "dytmWithdrawProcessor"
|
|
4369
4369
|
}),
|
|
4370
|
-
|
|
4370
|
+
Zn({
|
|
4371
4371
|
address: t,
|
|
4372
4372
|
abi: $o,
|
|
4373
4373
|
functionName: "previewWithdrawal",
|
|
@@ -4378,7 +4378,7 @@ const eS = () => {
|
|
|
4378
4378
|
return { processor: o, assetData: a };
|
|
4379
4379
|
}, lS = async (e, t, n, r) => {
|
|
4380
4380
|
const o = Q("ondoPriceOracle", n);
|
|
4381
|
-
if (
|
|
4381
|
+
if (F(o)) return /* @__PURE__ */ new Map();
|
|
4382
4382
|
const a = (s) => t.fetchQuery({
|
|
4383
4383
|
...Ws(e, {
|
|
4384
4384
|
address: o,
|
|
@@ -4401,7 +4401,7 @@ const eS = () => {
|
|
|
4401
4401
|
chainId: e,
|
|
4402
4402
|
items: t.map((o) => ({
|
|
4403
4403
|
address: o.asset,
|
|
4404
|
-
tokenAmount: we(o.amount,
|
|
4404
|
+
tokenAmount: we(o.amount, Zt)
|
|
4405
4405
|
}))
|
|
4406
4406
|
}), r = sS(
|
|
4407
4407
|
n,
|
|
@@ -4478,7 +4478,7 @@ const eS = () => {
|
|
|
4478
4478
|
dytmOffice: n,
|
|
4479
4479
|
processor: r
|
|
4480
4480
|
})
|
|
4481
|
-
), v =
|
|
4481
|
+
), v = xn(
|
|
4482
4482
|
h.map(aS)
|
|
4483
4483
|
), y = u.debt ? Jc({
|
|
4484
4484
|
accountId: u.accountId,
|
|
@@ -4492,13 +4492,13 @@ const eS = () => {
|
|
|
4492
4492
|
...f,
|
|
4493
4493
|
...y
|
|
4494
4494
|
],
|
|
4495
|
-
amountOutMinimum:
|
|
4495
|
+
amountOutMinimum: xn(g.map((T) => T.amountOutMinimum)) + v,
|
|
4496
4496
|
debtAmount: u.debt?.amount ?? 0n
|
|
4497
4497
|
};
|
|
4498
4498
|
}
|
|
4499
|
-
), p =
|
|
4499
|
+
), p = xn(
|
|
4500
4500
|
d.map((u) => u.amountOutMinimum)
|
|
4501
|
-
), m =
|
|
4501
|
+
), m = xn(d.map((u) => u.debtAmount));
|
|
4502
4502
|
return {
|
|
4503
4503
|
actions: d.flatMap((u) => u.actions),
|
|
4504
4504
|
outputAsset: t.usdc,
|
|
@@ -4510,16 +4510,16 @@ const eS = () => {
|
|
|
4510
4510
|
}) => {
|
|
4511
4511
|
const {
|
|
4512
4512
|
dytmOfficeAddress: n,
|
|
4513
|
-
assetGuardAddress: r =
|
|
4513
|
+
assetGuardAddress: r = O,
|
|
4514
4514
|
hasAssets: o
|
|
4515
|
-
} =
|
|
4515
|
+
} = cn({ address: e, chainId: t }), a = gA(t), s = Ct({ chainId: t }), l = Qr(), c = rn(), d = Jn(), p = Me();
|
|
4516
4516
|
return b(
|
|
4517
4517
|
async (m) => {
|
|
4518
4518
|
const u = /* @__PURE__ */ new Map(), h = nS[t];
|
|
4519
4519
|
if (!s || !o || !n || !h)
|
|
4520
4520
|
return u;
|
|
4521
|
-
const g =
|
|
4522
|
-
if (!g ||
|
|
4521
|
+
const g = F(r) ? await a(n) : r;
|
|
4522
|
+
if (!g || F(g))
|
|
4523
4523
|
return u;
|
|
4524
4524
|
const { processor: f, assetData: v } = await iS(
|
|
4525
4525
|
s,
|
|
@@ -4527,41 +4527,41 @@ const eS = () => {
|
|
|
4527
4527
|
e,
|
|
4528
4528
|
m
|
|
4529
4529
|
);
|
|
4530
|
-
if (!f ||
|
|
4530
|
+
if (!f || F(f) || !v?.length)
|
|
4531
4531
|
return u;
|
|
4532
|
-
const y = (N) => !
|
|
4532
|
+
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 lS(
|
|
4533
4533
|
l,
|
|
4534
4534
|
c,
|
|
4535
4535
|
t,
|
|
4536
4536
|
T
|
|
4537
|
-
), k = (N) =>
|
|
4538
|
-
const
|
|
4537
|
+
), k = (N) => Sn(N) && !Xc(N.amount, S.get(N.asset)), _ = Yc(v).map((N) => {
|
|
4538
|
+
const H = N.collaterals.filter(
|
|
4539
4539
|
(J) => J.amount > 0n
|
|
4540
|
-
),
|
|
4541
|
-
(J) => !
|
|
4540
|
+
), re = H.filter(
|
|
4541
|
+
(J) => !Sn(J) && !y(J)
|
|
4542
4542
|
);
|
|
4543
|
-
if (
|
|
4543
|
+
if (re.length)
|
|
4544
4544
|
throw new Error(
|
|
4545
|
-
`Chamber Lending Market withdrawal: no unwind route for collateral ${
|
|
4545
|
+
`Chamber Lending Market withdrawal: no unwind route for collateral ${re.map((J) => `${J.asset} (type ${J.assetType})`).join(", ")}`
|
|
4546
4546
|
);
|
|
4547
4547
|
return {
|
|
4548
4548
|
group: N,
|
|
4549
|
-
gmCollaterals:
|
|
4550
|
-
outputAssetCollaterals:
|
|
4549
|
+
gmCollaterals: H.filter(k),
|
|
4550
|
+
outputAssetCollaterals: H.filter(
|
|
4551
4551
|
y
|
|
4552
4552
|
)
|
|
4553
4553
|
};
|
|
4554
4554
|
}).filter(
|
|
4555
4555
|
(N) => N.gmCollaterals.length + N.outputAssetCollaterals.length > 0
|
|
4556
4556
|
);
|
|
4557
|
-
if (!
|
|
4557
|
+
if (!_.length)
|
|
4558
4558
|
return u;
|
|
4559
|
-
if (!d &&
|
|
4559
|
+
if (!d && _.some((N) => N.gmCollaterals.length > 0))
|
|
4560
4560
|
throw new Error(
|
|
4561
4561
|
"Chamber Lending Market withdrawal: Ondo integration is not configured for the collateral unwind"
|
|
4562
4562
|
);
|
|
4563
|
-
const
|
|
4564
|
-
plans:
|
|
4563
|
+
const M = await pS({
|
|
4564
|
+
plans: _,
|
|
4565
4565
|
target: h,
|
|
4566
4566
|
dytmOffice: n,
|
|
4567
4567
|
processor: f,
|
|
@@ -4569,7 +4569,7 @@ const eS = () => {
|
|
|
4569
4569
|
slippagePercent: p
|
|
4570
4570
|
});
|
|
4571
4571
|
return u.set(n.toLowerCase(), {
|
|
4572
|
-
withdrawData: Qc(
|
|
4572
|
+
withdrawData: Qc(M),
|
|
4573
4573
|
slippageTolerance: rS
|
|
4574
4574
|
}), u;
|
|
4575
4575
|
},
|
|
@@ -4618,7 +4618,7 @@ const eS = () => {
|
|
|
4618
4618
|
signal: n,
|
|
4619
4619
|
buildKey: od
|
|
4620
4620
|
}), wS = (e, t) => {
|
|
4621
|
-
const n = oo(), { effectiveSelectedAggregators: r } =
|
|
4621
|
+
const n = oo(), { effectiveSelectedAggregators: r } = zn();
|
|
4622
4622
|
return It({
|
|
4623
4623
|
queryKey: ["getSwapsQuotes", e, r],
|
|
4624
4624
|
queryFn: async ({ signal: o, queryKey: [, a] }) => await ol({
|
|
@@ -4632,7 +4632,7 @@ const eS = () => {
|
|
|
4632
4632
|
}, hS = new AbortController(), gS = hS.signal, fS = ({
|
|
4633
4633
|
chainId: e
|
|
4634
4634
|
}) => {
|
|
4635
|
-
const { account: t =
|
|
4635
|
+
const { account: t = O } = B(), n = oo();
|
|
4636
4636
|
return b(
|
|
4637
4637
|
async ({
|
|
4638
4638
|
swapParams: r,
|
|
@@ -4641,7 +4641,7 @@ const eS = () => {
|
|
|
4641
4641
|
const a = (r?.srcData ?? []).map(({ asset: s, amount: l }) => ({
|
|
4642
4642
|
chainId: e,
|
|
4643
4643
|
sourceAddress: s,
|
|
4644
|
-
destinationAddress: r?.dstData.asset ??
|
|
4644
|
+
destinationAddress: r?.dstData.asset ?? O,
|
|
4645
4645
|
walletAddress: t,
|
|
4646
4646
|
amount: l.toString(),
|
|
4647
4647
|
slippage: o.toString()
|
|
@@ -4660,20 +4660,20 @@ const eS = () => {
|
|
|
4660
4660
|
}) => {
|
|
4661
4661
|
const {
|
|
4662
4662
|
assets: n,
|
|
4663
|
-
assetGuardAddress: r =
|
|
4663
|
+
assetGuardAddress: r = O,
|
|
4664
4664
|
hasAssets: o
|
|
4665
4665
|
} = Ye({
|
|
4666
4666
|
address: e,
|
|
4667
4667
|
chainId: t
|
|
4668
|
-
}), a = Ct({ chainId: t }), s =
|
|
4668
|
+
}), a = Ct({ chainId: t }), s = Jn(), l = Me();
|
|
4669
4669
|
return b(
|
|
4670
4670
|
async (c) => {
|
|
4671
4671
|
const d = /* @__PURE__ */ new Map();
|
|
4672
|
-
if (!s || !a || !o ||
|
|
4672
|
+
if (!s || !a || !o || F(r))
|
|
4673
4673
|
return d;
|
|
4674
4674
|
const p = await Promise.all(
|
|
4675
4675
|
n.map(
|
|
4676
|
-
(h) =>
|
|
4676
|
+
(h) => Zn({
|
|
4677
4677
|
address: r,
|
|
4678
4678
|
abi: ad,
|
|
4679
4679
|
functionName: "previewGmTokenAmount",
|
|
@@ -4686,7 +4686,7 @@ const eS = () => {
|
|
|
4686
4686
|
return f === void 0 || f <= 0n ? [] : [
|
|
4687
4687
|
{
|
|
4688
4688
|
address: h.address,
|
|
4689
|
-
tokenAmount: we(f,
|
|
4689
|
+
tokenAmount: we(f, Zt)
|
|
4690
4690
|
}
|
|
4691
4691
|
];
|
|
4692
4692
|
});
|
|
@@ -4726,7 +4726,7 @@ const eS = () => {
|
|
|
4726
4726
|
const n = Q(
|
|
4727
4727
|
"aaveLendingPoolV3",
|
|
4728
4728
|
t
|
|
4729
|
-
), { data: { getSupportedAssets: r } = {} } =
|
|
4729
|
+
), { data: { getSupportedAssets: r } = {} } = ar({
|
|
4730
4730
|
address: e,
|
|
4731
4731
|
chainId: t
|
|
4732
4732
|
}), o = tS({ address: e, chainId: t }), a = fS({ chainId: t }), s = al({
|
|
@@ -4755,9 +4755,9 @@ const eS = () => {
|
|
|
4755
4755
|
...v
|
|
4756
4756
|
]);
|
|
4757
4757
|
if (!r?.some(
|
|
4758
|
-
(N) =>
|
|
4758
|
+
(N) => G(N, n)
|
|
4759
4759
|
))
|
|
4760
|
-
return
|
|
4760
|
+
return hr(
|
|
4761
4761
|
r,
|
|
4762
4762
|
h,
|
|
4763
4763
|
y
|
|
@@ -4779,22 +4779,22 @@ const eS = () => {
|
|
|
4779
4779
|
m,
|
|
4780
4780
|
u,
|
|
4781
4781
|
y
|
|
4782
|
-
) ??
|
|
4782
|
+
) ?? hr(
|
|
4783
4783
|
r,
|
|
4784
4784
|
h,
|
|
4785
4785
|
y
|
|
4786
4786
|
);
|
|
4787
|
-
const k = await S(d),
|
|
4787
|
+
const k = await S(d), _ = ld(
|
|
4788
4788
|
k
|
|
4789
4789
|
);
|
|
4790
4790
|
return await cd(
|
|
4791
|
-
|
|
4791
|
+
_,
|
|
4792
4792
|
k,
|
|
4793
4793
|
h,
|
|
4794
4794
|
m,
|
|
4795
4795
|
u,
|
|
4796
4796
|
y
|
|
4797
|
-
) ??
|
|
4797
|
+
) ?? hr(
|
|
4798
4798
|
r,
|
|
4799
4799
|
h,
|
|
4800
4800
|
y
|
|
@@ -4866,7 +4866,7 @@ const sl = (e, t) => {
|
|
|
4866
4866
|
}, yS = ({
|
|
4867
4867
|
debounceTime: e
|
|
4868
4868
|
} = {}) => {
|
|
4869
|
-
const t = A(), n = pt(), [r] = $(), o = Me(), { data: { getSupportedAssets: a } = {} } =
|
|
4869
|
+
const t = A(), n = pt(), [r] = $(), o = Me(), { data: { getSupportedAssets: a } = {} } = ar(t), s = sl(
|
|
4870
4870
|
r.value || "0",
|
|
4871
4871
|
e ?? 0
|
|
4872
4872
|
);
|
|
@@ -4892,7 +4892,7 @@ const sl = (e, t) => {
|
|
|
4892
4892
|
const { address: n, chainId: r } = A(), [o] = z(), { hasAssets: a, isReady: s } = Ye({
|
|
4893
4893
|
address: n,
|
|
4894
4894
|
chainId: r
|
|
4895
|
-
}), { hasAssets: l, isReady: c } =
|
|
4895
|
+
}), { hasAssets: l, isReady: c } = cn({
|
|
4896
4896
|
address: n,
|
|
4897
4897
|
chainId: r
|
|
4898
4898
|
}), d = al({
|
|
@@ -4901,7 +4901,7 @@ const sl = (e, t) => {
|
|
|
4901
4901
|
}), p = rl({
|
|
4902
4902
|
address: n,
|
|
4903
4903
|
chainId: r
|
|
4904
|
-
}), m = Me(), u = s && c, h = a || l, g =
|
|
4904
|
+
}), m = Me(), u = s && c, h = a || l, g = G(
|
|
4905
4905
|
o.address,
|
|
4906
4906
|
Je.address
|
|
4907
4907
|
), { data: f, isError: v, isFetching: y } = It({
|
|
@@ -4974,7 +4974,7 @@ const sl = (e, t) => {
|
|
|
4974
4974
|
}).sort((o, a) => a.valueInUsd - o.valueInUsd),
|
|
4975
4975
|
[e]
|
|
4976
4976
|
);
|
|
4977
|
-
return
|
|
4977
|
+
return le({
|
|
4978
4978
|
contracts: AS({ assets: e, chainId: t }),
|
|
4979
4979
|
query: {
|
|
4980
4980
|
enabled: e.length > 0,
|
|
@@ -4982,7 +4982,7 @@ const sl = (e, t) => {
|
|
|
4982
4982
|
}
|
|
4983
4983
|
});
|
|
4984
4984
|
}, Oa = (e) => typeof e[0] == "string" && typeof e[1] == "bigint" && Array.isArray(e[2]), xS = () => {
|
|
4985
|
-
const e = A(), t =
|
|
4985
|
+
const e = A(), t = tr(), { canSpend: n } = lr(), r = yS({
|
|
4986
4986
|
debounceTime: Es
|
|
4987
4987
|
}), o = Oa(r) ? r[1] : BigInt(0), a = o !== BigInt(0) && !t && n, { overrides: s, isFetching: l } = TS(o, {
|
|
4988
4988
|
enabled: a
|
|
@@ -5015,17 +5015,17 @@ const sl = (e, t) => {
|
|
|
5015
5015
|
data: t = [],
|
|
5016
5016
|
isFetching: n,
|
|
5017
5017
|
isFetched: r
|
|
5018
|
-
} = xS(), o =
|
|
5018
|
+
} = xS(), o = nr();
|
|
5019
5019
|
return {
|
|
5020
5020
|
// EasySwapperV2::unrollAndClaim is not supported from within dHEDGE vaults. Managers should be able to use regular initWithdrawal & completeWithdrawal flow instead.
|
|
5021
|
-
isUnrollAndClaimTransaction: t?.length === 1 &&
|
|
5021
|
+
isUnrollAndClaimTransaction: t?.length === 1 && G(t[0]?.address, e.address) && !o,
|
|
5022
5022
|
isFetching: n,
|
|
5023
5023
|
isFetched: r
|
|
5024
5024
|
};
|
|
5025
5025
|
}, CS = ({
|
|
5026
5026
|
onErrorCallback: e
|
|
5027
5027
|
} = {}) => {
|
|
5028
|
-
const t = A(), n = pt(), { isUnrollAndClaimTransaction: r } = Oo(), o = bS(), a =
|
|
5028
|
+
const t = A(), n = pt(), { isUnrollAndClaimTransaction: r } = Oo(), o = bS(), a = ie()[1], s = n ? "multi_withdraw" : r ? "single_withdraw_and_claim" : "single_withdraw", l = Qe({ action: s, onErrorCallback: e }), c = n ? Wd : r ? Ud : Cs, { send: d, estimate: p } = ye({
|
|
5029
5029
|
contractId: n ? "poolLogic" : "easySwapperV2",
|
|
5030
5030
|
dynamicContractAddress: n ? t.address : void 0,
|
|
5031
5031
|
functionName: c,
|
|
@@ -5056,7 +5056,7 @@ const sl = (e, t) => {
|
|
|
5056
5056
|
trade: e,
|
|
5057
5057
|
onErrorCallback: t
|
|
5058
5058
|
}) => {
|
|
5059
|
-
const n = x(), { showError: r, closeError: o } = dt(), { account: a } = B(), s = A(), [l] = $(), [c] = z(), [d] = De(), p = te()[1], m =
|
|
5059
|
+
const n = x(), { showError: r, closeError: o } = dt(), { account: a } = B(), s = A(), [l] = $(), [c] = z(), [d] = De(), p = te()[1], m = ie()[1], u = ro(), h = pt(), { isUnrollAndClaimTransaction: g } = Oo(), f = Be({
|
|
5060
5060
|
symbol: l.symbol,
|
|
5061
5061
|
address: l.address
|
|
5062
5062
|
}), v = d === "deposit", y = ZA(), T = v ? "deposit" : h ? "multi_withdraw" : g ? "single_withdraw_and_claim" : "single_withdraw", S = async () => {
|
|
@@ -5074,9 +5074,9 @@ const sl = (e, t) => {
|
|
|
5074
5074
|
});
|
|
5075
5075
|
try {
|
|
5076
5076
|
await e();
|
|
5077
|
-
} catch (
|
|
5078
|
-
console.error(
|
|
5079
|
-
|
|
5077
|
+
} catch (_) {
|
|
5078
|
+
console.error(_), (_ instanceof At || _ instanceof Un) && (t?.(), r(_.message), _ instanceof At && u?.(
|
|
5079
|
+
_,
|
|
5080
5080
|
s.address,
|
|
5081
5081
|
k,
|
|
5082
5082
|
a
|
|
@@ -5109,9 +5109,9 @@ const sl = (e, t) => {
|
|
|
5109
5109
|
};
|
|
5110
5110
|
const o = e * t / 100 / n;
|
|
5111
5111
|
return {
|
|
5112
|
-
yearlyEarnings:
|
|
5113
|
-
dailyEarnings:
|
|
5114
|
-
monthlyEarnings:
|
|
5112
|
+
yearlyEarnings: gr({ value: o, currency: r }),
|
|
5113
|
+
dailyEarnings: gr({ value: o / 365, currency: r }),
|
|
5114
|
+
monthlyEarnings: gr({ value: o / 12, currency: r })
|
|
5115
5115
|
};
|
|
5116
5116
|
}, OS = ({
|
|
5117
5117
|
currency: e,
|
|
@@ -5121,7 +5121,7 @@ const sl = (e, t) => {
|
|
|
5121
5121
|
disabled: o
|
|
5122
5122
|
}) => {
|
|
5123
5123
|
const a = e === "ETH" ? zd[n]?.address : e === "BTC" ? Gd[n]?.address : void 0, s = he({
|
|
5124
|
-
address: a ??
|
|
5124
|
+
address: a ?? O,
|
|
5125
5125
|
chainId: n,
|
|
5126
5126
|
disabled: o || !r || !a
|
|
5127
5127
|
}), l = a ? Number(s) : ES;
|
|
@@ -5156,7 +5156,7 @@ const sl = (e, t) => {
|
|
|
5156
5156
|
showEarnings: !1
|
|
5157
5157
|
};
|
|
5158
5158
|
}, PS = (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" }, DS = (e, t) => {
|
|
5159
|
-
const { effectiveSelectedAggregators: n } =
|
|
5159
|
+
const { effectiveSelectedAggregators: n } = zn(), r = oo(), { isValid: o } = PS({
|
|
5160
5160
|
chainId: String(e.chainId),
|
|
5161
5161
|
sourceAddress: e.sourceAddress,
|
|
5162
5162
|
destinationAddress: e.destinationAddress,
|
|
@@ -5175,7 +5175,7 @@ const sl = (e, t) => {
|
|
|
5175
5175
|
...t,
|
|
5176
5176
|
enabled: o && (t?.enabled ?? !0)
|
|
5177
5177
|
});
|
|
5178
|
-
},
|
|
5178
|
+
}, cr = (e = {}) => {
|
|
5179
5179
|
const t = e?.extendedDebounceTime ?? !1, [n] = $(), r = sl(
|
|
5180
5180
|
n.value,
|
|
5181
5181
|
t ? Es : Hd
|
|
@@ -5193,18 +5193,18 @@ const sl = (e, t) => {
|
|
|
5193
5193
|
functionName: "getTrackedAssets",
|
|
5194
5194
|
chainId: t,
|
|
5195
5195
|
args: [e],
|
|
5196
|
-
query: { enabled: !
|
|
5197
|
-
}), LS = (e, t) =>
|
|
5196
|
+
query: { enabled: !F(e) }
|
|
5197
|
+
}), LS = (e, t) => G(e, Vd.address) && t === Et.id, RS = ({
|
|
5198
5198
|
tokenAddress: e,
|
|
5199
5199
|
spenderAddress: t
|
|
5200
5200
|
}) => {
|
|
5201
|
-
const { chainId: n } = A(), { account: r =
|
|
5201
|
+
const { chainId: n } = A(), { account: r = O } = B(), o = LS(e, n), { data: a } = an({
|
|
5202
5202
|
tokenAddress: e,
|
|
5203
5203
|
ownerAddress: r,
|
|
5204
5204
|
spenderAddress: t,
|
|
5205
5205
|
chainId: n,
|
|
5206
5206
|
skip: !o
|
|
5207
|
-
}), { invalidateAllowanceQueries: s } =
|
|
5207
|
+
}), { invalidateAllowanceQueries: s } = ln(), l = Xr({ chainId: n }), c = Ct({ chainId: n });
|
|
5208
5208
|
return { resetAllowance: b(async () => {
|
|
5209
5209
|
if (!o || !a || a === BigInt(0) || !l.data || !c)
|
|
5210
5210
|
return;
|
|
@@ -5226,26 +5226,26 @@ const sl = (e, t) => {
|
|
|
5226
5226
|
e,
|
|
5227
5227
|
l.data
|
|
5228
5228
|
]) };
|
|
5229
|
-
},
|
|
5229
|
+
}, Cn = "approve", ll = ({
|
|
5230
5230
|
token: e,
|
|
5231
5231
|
rawTokenAmount: t,
|
|
5232
5232
|
spenderAddress: n,
|
|
5233
5233
|
onErrorCallback: r
|
|
5234
5234
|
}) => {
|
|
5235
|
-
const o = A(), [{ isInfiniteAllowance: a }] = ne(), s =
|
|
5235
|
+
const o = A(), [{ isInfiniteAllowance: a }] = ne(), s = ie()[1], l = te()[1], { resetAllowance: c } = RS({
|
|
5236
5236
|
tokenAddress: e.address,
|
|
5237
5237
|
spenderAddress: n
|
|
5238
|
-
}), d = Qe({ action:
|
|
5238
|
+
}), d = Qe({ action: Cn, onErrorCallback: r }), { send: p } = ye({
|
|
5239
5239
|
contractId: "erc20",
|
|
5240
5240
|
dynamicContractAddress: e.address,
|
|
5241
|
-
functionName:
|
|
5241
|
+
functionName: Cn,
|
|
5242
5242
|
onSettled: d
|
|
5243
5243
|
});
|
|
5244
5244
|
return b(async () => (l({
|
|
5245
5245
|
isOpen: !0,
|
|
5246
5246
|
status: "Wallet",
|
|
5247
5247
|
link: "",
|
|
5248
|
-
action:
|
|
5248
|
+
action: Cn,
|
|
5249
5249
|
sendTokens: [
|
|
5250
5250
|
{
|
|
5251
5251
|
symbol: e.symbol,
|
|
@@ -5258,7 +5258,7 @@ const sl = (e, t) => {
|
|
|
5258
5258
|
meta: {}
|
|
5259
5259
|
}), s({
|
|
5260
5260
|
type: "add",
|
|
5261
|
-
action:
|
|
5261
|
+
action: Cn,
|
|
5262
5262
|
symbol: e.symbol,
|
|
5263
5263
|
chainId: o.chainId
|
|
5264
5264
|
}), await c(), p(
|
|
@@ -5285,7 +5285,7 @@ const sl = (e, t) => {
|
|
|
5285
5285
|
chainId: o,
|
|
5286
5286
|
skip: a = !1
|
|
5287
5287
|
}) => {
|
|
5288
|
-
const { data: s, isFetching: l } =
|
|
5288
|
+
const { data: s, isFetching: l } = an({
|
|
5289
5289
|
tokenAddress: t,
|
|
5290
5290
|
ownerAddress: n,
|
|
5291
5291
|
spenderAddress: r,
|
|
@@ -5314,7 +5314,7 @@ const sl = (e, t) => {
|
|
|
5314
5314
|
}, dl = () => {
|
|
5315
5315
|
const e = x(), [t, n] = $S();
|
|
5316
5316
|
return /* @__PURE__ */ i(
|
|
5317
|
-
|
|
5317
|
+
er,
|
|
5318
5318
|
{
|
|
5319
5319
|
defaultEnabled: t,
|
|
5320
5320
|
onChange: n,
|
|
@@ -5322,7 +5322,7 @@ const sl = (e, t) => {
|
|
|
5322
5322
|
}
|
|
5323
5323
|
);
|
|
5324
5324
|
}, BS = () => {
|
|
5325
|
-
const [{ selectedAggregators: e }, t] = ne(), { effectiveAvailableAggregators: n, effectiveSelectedAggregators: r } =
|
|
5325
|
+
const [{ selectedAggregators: e }, t] = ne(), { effectiveAvailableAggregators: n, effectiveSelectedAggregators: r } = zn(), o = b(
|
|
5326
5326
|
(a) => {
|
|
5327
5327
|
const s = e.includes(a) ? e.filter((l) => l !== a) : [...e, a];
|
|
5328
5328
|
t({ selectedAggregators: s });
|
|
@@ -5337,7 +5337,7 @@ const sl = (e, t) => {
|
|
|
5337
5337
|
}, pl = () => {
|
|
5338
5338
|
const e = x(), { availableAggregators: t, selectedAggregators: n, onAggregatorToggle: r } = BS();
|
|
5339
5339
|
return t.length <= 1 ? null : /* @__PURE__ */ i(
|
|
5340
|
-
|
|
5340
|
+
Jt,
|
|
5341
5341
|
{
|
|
5342
5342
|
label: e.aggregatorsLabel,
|
|
5343
5343
|
tooltipText: e.aggregatorsTooltip,
|
|
@@ -5348,7 +5348,7 @@ const sl = (e, t) => {
|
|
|
5348
5348
|
children: [
|
|
5349
5349
|
o,
|
|
5350
5350
|
/* @__PURE__ */ i(
|
|
5351
|
-
|
|
5351
|
+
er,
|
|
5352
5352
|
{
|
|
5353
5353
|
defaultEnabled: n.includes(o),
|
|
5354
5354
|
onChange: () => r(o),
|
|
@@ -5365,7 +5365,7 @@ const sl = (e, t) => {
|
|
|
5365
5365
|
const e = x();
|
|
5366
5366
|
return /* @__PURE__ */ w(R, { children: [
|
|
5367
5367
|
/* @__PURE__ */ i(
|
|
5368
|
-
|
|
5368
|
+
Jt,
|
|
5369
5369
|
{
|
|
5370
5370
|
label: e.slippageTolerance,
|
|
5371
5371
|
tooltipText: e.depositSlippageWarning,
|
|
@@ -5373,7 +5373,7 @@ const sl = (e, t) => {
|
|
|
5373
5373
|
}
|
|
5374
5374
|
),
|
|
5375
5375
|
/* @__PURE__ */ i(
|
|
5376
|
-
|
|
5376
|
+
Jt,
|
|
5377
5377
|
{
|
|
5378
5378
|
label: e.tokenAllowance,
|
|
5379
5379
|
tooltipText: e.toggleTokenApprovalAmount,
|
|
@@ -5391,15 +5391,15 @@ const sl = (e, t) => {
|
|
|
5391
5391
|
}) => {
|
|
5392
5392
|
const [a, s] = Na(
|
|
5393
5393
|
"localStorage",
|
|
5394
|
-
|
|
5394
|
+
Kt.REFERRER,
|
|
5395
5395
|
""
|
|
5396
5396
|
), [l, c] = Na(
|
|
5397
5397
|
"localStorage",
|
|
5398
|
-
|
|
5398
|
+
Kt.REF_POOL,
|
|
5399
5399
|
""
|
|
5400
5400
|
), d = n[FS];
|
|
5401
5401
|
E(() => {
|
|
5402
|
-
!d || typeof d != "string" ||
|
|
5402
|
+
!d || typeof d != "string" || F(e) || localStorage.getItem(Kt.REFERRER) || (s(d), c(e), r?.());
|
|
5403
5403
|
}, [e, d, c, s, r]), E(() => {
|
|
5404
5404
|
if (!t || !a || l.toLowerCase() !== e.toLowerCase())
|
|
5405
5405
|
return;
|
|
@@ -5418,19 +5418,19 @@ const sl = (e, t) => {
|
|
|
5418
5418
|
}
|
|
5419
5419
|
})();
|
|
5420
5420
|
}, [l, a, o, t, e]);
|
|
5421
|
-
},
|
|
5421
|
+
}, Dn = {
|
|
5422
5422
|
referrerAddress: void 0,
|
|
5423
5423
|
referralData: void 0
|
|
5424
5424
|
}, WS = (e, t) => {
|
|
5425
|
-
if (!e || !dp(e) || t &&
|
|
5426
|
-
return
|
|
5425
|
+
if (!e || !dp(e) || t && G(e, t))
|
|
5426
|
+
return Dn;
|
|
5427
5427
|
const n = pp([{ type: "address" }], [e]);
|
|
5428
5428
|
return { referrerAddress: e, referralData: n };
|
|
5429
5429
|
}, US = () => {
|
|
5430
|
-
const e = Kp(), { account: t } = B(), { data: n =
|
|
5430
|
+
const e = Kp(), { account: t } = B(), { data: n = Dn } = It({
|
|
5431
5431
|
queryKey: ["entryReferrer", t],
|
|
5432
5432
|
queryFn: async ({ queryKey: [, r] }) => {
|
|
5433
|
-
if (!e || !r) return
|
|
5433
|
+
if (!e || !r) return Dn;
|
|
5434
5434
|
const o = await e(r);
|
|
5435
5435
|
return WS(o, r);
|
|
5436
5436
|
},
|
|
@@ -5440,14 +5440,14 @@ const sl = (e, t) => {
|
|
|
5440
5440
|
});
|
|
5441
5441
|
return n;
|
|
5442
5442
|
}, zS = () => {
|
|
5443
|
-
const { chainId: e, address: t } = A(), { data: { isCustomCooldownDepositAllowed: n } = {} } =
|
|
5443
|
+
const { chainId: e, address: t } = A(), { data: { isCustomCooldownDepositAllowed: n } = {} } = rr({
|
|
5444
5444
|
address: t,
|
|
5445
5445
|
chainId: e
|
|
5446
5446
|
});
|
|
5447
5447
|
return n !== !1;
|
|
5448
5448
|
}, _a = (e, t) => e.length ? e.find(
|
|
5449
5449
|
({ tokenAddress: r }) => Object.values(jd[t] ?? {}).some(
|
|
5450
|
-
(o) =>
|
|
5450
|
+
(o) => G(o.address, r)
|
|
5451
5451
|
)
|
|
5452
5452
|
)?.tokenAddress ?? e[0]?.tokenAddress : null, Mt = () => {
|
|
5453
5453
|
const [e] = $(), { chainId: t, address: n } = A(), r = ct({
|
|
@@ -5458,9 +5458,9 @@ const sl = (e, t) => {
|
|
|
5458
5458
|
const a = r.filter(
|
|
5459
5459
|
({ isDeposit: c }) => c
|
|
5460
5460
|
);
|
|
5461
|
-
if (
|
|
5461
|
+
if (Bn(e.symbol, t)) {
|
|
5462
5462
|
const c = a.find(
|
|
5463
|
-
({ tokenName: d }) =>
|
|
5463
|
+
({ tokenName: d }) => qt[t]?.wrappedNativeTokenName === d
|
|
5464
5464
|
);
|
|
5465
5465
|
return c ? {
|
|
5466
5466
|
depositMethod: o ? ze.NATIVE_CUSTOM : ze.NATIVE,
|
|
@@ -5471,7 +5471,7 @@ const sl = (e, t) => {
|
|
|
5471
5471
|
};
|
|
5472
5472
|
}
|
|
5473
5473
|
const l = a.find(
|
|
5474
|
-
({ tokenAddress: c }) =>
|
|
5474
|
+
({ tokenAddress: c }) => G(c, e.address)
|
|
5475
5475
|
);
|
|
5476
5476
|
return l ? {
|
|
5477
5477
|
depositMethod: o ? ze.DEPOSIT_CUSTOM : ze.DEPOSIT,
|
|
@@ -5487,14 +5487,14 @@ const sl = (e, t) => {
|
|
|
5487
5487
|
e.address,
|
|
5488
5488
|
e.symbol
|
|
5489
5489
|
]);
|
|
5490
|
-
},
|
|
5490
|
+
}, un = () => {
|
|
5491
5491
|
const [e] = $(), { vaultDepositTokenAddress: t } = Mt();
|
|
5492
|
-
return !
|
|
5493
|
-
},
|
|
5494
|
-
const e = xo(), [{ slippage: t }] = ne(), n =
|
|
5492
|
+
return !G(e.address, t);
|
|
5493
|
+
}, dr = () => {
|
|
5494
|
+
const e = xo(), [{ slippage: t }] = ne(), n = un();
|
|
5495
5495
|
return t === "auto" ? n ? e : As : t;
|
|
5496
|
-
},
|
|
5497
|
-
const { account: e =
|
|
5496
|
+
}, mn = () => {
|
|
5497
|
+
const { account: e = O } = B(), { chainId: t } = A(), [n] = $(), { debouncedSendTokenValue: r } = cr(), { vaultDepositTokenAddress: o } = Mt(), a = un(), s = dr();
|
|
5498
5498
|
return DS(
|
|
5499
5499
|
{
|
|
5500
5500
|
sourceAddress: n.address,
|
|
@@ -5513,7 +5513,7 @@ const sl = (e, t) => {
|
|
|
5513
5513
|
const { defaultNoSwapMinDepositAmountGap: e } = Z(), { address: t, chainId: n } = A(), [r] = $(), [o] = z(), { data: { entryFee: a } = {} } = ve({ address: t, chainId: n }), s = ft(
|
|
5514
5514
|
Number(a ?? "0"),
|
|
5515
5515
|
Ne
|
|
5516
|
-
), [{ slippage: l }] = ne(), c = l === "auto", d =
|
|
5516
|
+
), [{ slippage: l }] = ne(), c = l === "auto", d = dr(), p = un(), m = +he({
|
|
5517
5517
|
address: r.address,
|
|
5518
5518
|
chainId: n
|
|
5519
5519
|
}), u = +Te({ address: t, chainId: n });
|
|
@@ -5542,14 +5542,19 @@ const sl = (e, t) => {
|
|
|
5542
5542
|
refetchInterval: Le,
|
|
5543
5543
|
disabled: !e
|
|
5544
5544
|
}), c = Number(n || "0") * o;
|
|
5545
|
-
return s && l !== 0 ? new D(c / l).shiftedBy(s).times(1 - Is / 100).toFixed(0) : "0";
|
|
5545
|
+
return s && l !== 0 && Number.isFinite(c) ? new D(c / l).shiftedBy(s).times(1 - Is / 100).toFixed(0) : "0";
|
|
5546
5546
|
}, ml = () => {
|
|
5547
|
-
const [e] = $(), { debouncedSendTokenValue: t } =
|
|
5547
|
+
const [e] = $(), { debouncedSendTokenValue: t } = cr(), n = un(), r = GS({
|
|
5548
5548
|
isDepositWithSwapTransaction: n,
|
|
5549
5549
|
sendTokenAddress: e.address,
|
|
5550
5550
|
sendTokenValue: t
|
|
5551
5551
|
});
|
|
5552
|
-
|
|
5552
|
+
if (n)
|
|
5553
|
+
return r;
|
|
5554
|
+
const o = new D(
|
|
5555
|
+
t || "0"
|
|
5556
|
+
).shiftedBy(e.decimals);
|
|
5557
|
+
return o.isFinite() ? o.toFixed(0) : "0";
|
|
5553
5558
|
}, HS = "0x", Ur = (e, t, n = [], r) => {
|
|
5554
5559
|
const {
|
|
5555
5560
|
vaultAddress: o,
|
|
@@ -5662,7 +5667,7 @@ const sl = (e, t) => {
|
|
|
5662
5667
|
depositMethod: e,
|
|
5663
5668
|
vaultDepositTokenAddress: t
|
|
5664
5669
|
}) => {
|
|
5665
|
-
const { address: n } = A(), [r] = $(), [{ slippage: o }] = ne(), a = r.value || "0", s = new D(a).shiftedBy(r.decimals).toFixed(0), l = ml(), { data: c } =
|
|
5670
|
+
const { address: n } = A(), [r] = $(), [{ slippage: o }] = ne(), a = r.value || "0", s = new D(a).shiftedBy(r.decimals).toFixed(0), l = ml(), { data: c } = mn(), d = ul(), p = dr(), { referralData: m } = US(), u = o === "auto", h = u ? qr({ maxSlippage: p }) : void 0;
|
|
5666
5671
|
return b(
|
|
5667
5672
|
async (g) => {
|
|
5668
5673
|
const f = {
|
|
@@ -5709,7 +5714,7 @@ const sl = (e, t) => {
|
|
|
5709
5714
|
]
|
|
5710
5715
|
);
|
|
5711
5716
|
}, KS = () => {
|
|
5712
|
-
const { chainId: e } = A(), [t] = z(), n =
|
|
5717
|
+
const { chainId: e } = A(), [t] = z(), n = ie()[1], { depositMethod: r, vaultDepositTokenAddress: o } = Mt(), a = qS({
|
|
5713
5718
|
depositMethod: r,
|
|
5714
5719
|
vaultDepositTokenAddress: o
|
|
5715
5720
|
}), s = b(() => {
|
|
@@ -5743,20 +5748,20 @@ const sl = (e, t) => {
|
|
|
5743
5748
|
const l = await n(s);
|
|
5744
5749
|
return a(...l);
|
|
5745
5750
|
}, [r, a, n, s]);
|
|
5746
|
-
},
|
|
5751
|
+
}, Ir = {}, Pa = (e, t) => `${e}:${t.toLowerCase()}`, Da = () => {
|
|
5747
5752
|
if (!xt)
|
|
5748
|
-
return
|
|
5753
|
+
return Ir;
|
|
5749
5754
|
try {
|
|
5750
|
-
const e = localStorage.getItem(
|
|
5751
|
-
return e ? JSON.parse(e) :
|
|
5755
|
+
const e = localStorage.getItem(Kt.ONDO_PRICE_UPDATES);
|
|
5756
|
+
return e ? JSON.parse(e) : Ir;
|
|
5752
5757
|
} catch (e) {
|
|
5753
|
-
return console.error(e),
|
|
5758
|
+
return console.error(e), Ir;
|
|
5754
5759
|
}
|
|
5755
5760
|
}, XS = (e) => {
|
|
5756
5761
|
if (xt)
|
|
5757
5762
|
try {
|
|
5758
5763
|
localStorage.setItem(
|
|
5759
|
-
|
|
5764
|
+
Kt.ONDO_PRICE_UPDATES,
|
|
5760
5765
|
JSON.stringify(e)
|
|
5761
5766
|
);
|
|
5762
5767
|
} catch (t) {
|
|
@@ -5783,13 +5788,13 @@ const sl = (e, t) => {
|
|
|
5783
5788
|
[e, t]
|
|
5784
5789
|
);
|
|
5785
5790
|
return { isOndoPriceFresh: n, recordOndoPriceUpdate: r };
|
|
5786
|
-
},
|
|
5791
|
+
}, Nr = "update_ondo_prices", gl = ({
|
|
5787
5792
|
ondoAssets: e,
|
|
5788
5793
|
onSettled: t,
|
|
5789
5794
|
onErrorCallback: n
|
|
5790
5795
|
}) => {
|
|
5791
|
-
const { chainId: r, symbol: o } = A(), [a] = $(), [s] = z(), l =
|
|
5792
|
-
action:
|
|
5796
|
+
const { chainId: r, symbol: o } = A(), [a] = $(), [s] = z(), l = ie()[1], c = te()[1], d = Qe({
|
|
5797
|
+
action: Nr,
|
|
5793
5798
|
onErrorCallback: n,
|
|
5794
5799
|
onSuccessCallback: t
|
|
5795
5800
|
}), { send: p } = ye({
|
|
@@ -5806,13 +5811,13 @@ const sl = (e, t) => {
|
|
|
5806
5811
|
isOpen: !0,
|
|
5807
5812
|
status: "Wallet",
|
|
5808
5813
|
link: "",
|
|
5809
|
-
action:
|
|
5814
|
+
action: Nr,
|
|
5810
5815
|
sendTokens: [a],
|
|
5811
5816
|
receiveTokens: [s],
|
|
5812
5817
|
meta: {}
|
|
5813
5818
|
}), l({
|
|
5814
5819
|
type: "add",
|
|
5815
|
-
action:
|
|
5820
|
+
action: Nr,
|
|
5816
5821
|
symbol: o,
|
|
5817
5822
|
chainId: r
|
|
5818
5823
|
});
|
|
@@ -5829,13 +5834,13 @@ const sl = (e, t) => {
|
|
|
5829
5834
|
c
|
|
5830
5835
|
]);
|
|
5831
5836
|
}, JS = () => {
|
|
5832
|
-
const { account: e =
|
|
5837
|
+
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 } = cl({
|
|
5833
5838
|
tokenAddress: n.address,
|
|
5834
5839
|
ownerAddress: e,
|
|
5835
5840
|
spenderAddress: r,
|
|
5836
5841
|
rawAmountToSpend: o,
|
|
5837
5842
|
chainId: t,
|
|
5838
|
-
skip:
|
|
5843
|
+
skip: Bn(n.symbol, t) || o === "0"
|
|
5839
5844
|
});
|
|
5840
5845
|
return { approve: ll({
|
|
5841
5846
|
token: n,
|
|
@@ -5850,36 +5855,36 @@ const sl = (e, t) => {
|
|
|
5850
5855
|
}, [o]), s = QS({ onDepositSettled: a }), { handleTrade: l } = _o({
|
|
5851
5856
|
trade: s,
|
|
5852
5857
|
onErrorCallback: a
|
|
5853
|
-
}), { approve: c, canSpend: d } = JS(), { address: p, chainId: m } = A(), [{ action: u, status: h }] = te(), [g] =
|
|
5854
|
-
async (
|
|
5858
|
+
}), { approve: c, canSpend: d } = JS(), { address: p, chainId: m } = A(), [{ action: u, status: h }] = te(), [g] = ie(), { showError: f, closeError: v } = dt(), y = so(), T = b(
|
|
5859
|
+
async (de) => {
|
|
5855
5860
|
const L = jr({
|
|
5856
5861
|
chainId: m,
|
|
5857
|
-
action:
|
|
5862
|
+
action: de,
|
|
5858
5863
|
isRabbyWallet: y
|
|
5859
5864
|
});
|
|
5860
|
-
L > 0 && await new Promise((
|
|
5865
|
+
L > 0 && await new Promise((fn) => setTimeout(fn, L));
|
|
5861
5866
|
},
|
|
5862
5867
|
[m, y]
|
|
5863
5868
|
), S = b(
|
|
5864
|
-
(
|
|
5865
|
-
|
|
5869
|
+
(de) => {
|
|
5870
|
+
de instanceof Un && f(de.message);
|
|
5866
5871
|
},
|
|
5867
5872
|
[f]
|
|
5868
|
-
), { assets: k, hasAssets:
|
|
5873
|
+
), { assets: k, hasAssets: _ } = Ye({
|
|
5869
5874
|
address: p,
|
|
5870
5875
|
chainId: m
|
|
5871
|
-
}),
|
|
5876
|
+
}), M = Jn(), N = _ && M, { isOndoPriceFresh: H, recordOndoPriceUpdate: re } = hl(), J = gl({
|
|
5872
5877
|
ondoAssets: k,
|
|
5873
5878
|
onErrorCallback: o
|
|
5874
|
-
}),
|
|
5875
|
-
(
|
|
5879
|
+
}), ce = g.find(
|
|
5880
|
+
(de) => de.action === "approve"
|
|
5876
5881
|
)?.txHash, xe = g.find(
|
|
5877
|
-
(
|
|
5882
|
+
(de) => de.action === "update_ondo_prices"
|
|
5878
5883
|
)?.txHash, { data: Xe } = ot({
|
|
5879
|
-
hash:
|
|
5884
|
+
hash: ce,
|
|
5880
5885
|
pollingInterval: Tt,
|
|
5881
5886
|
query: {
|
|
5882
|
-
enabled: !!
|
|
5887
|
+
enabled: !!ce && e === "waiting-approve-confirmation"
|
|
5883
5888
|
}
|
|
5884
5889
|
}), { data: Ut } = ot({
|
|
5885
5890
|
hash: xe,
|
|
@@ -5892,13 +5897,13 @@ const sl = (e, t) => {
|
|
|
5892
5897
|
(async () => {
|
|
5893
5898
|
if (!Xe || e !== "waiting-approve-confirmation")
|
|
5894
5899
|
return;
|
|
5895
|
-
const L = N && !
|
|
5900
|
+
const L = N && !H();
|
|
5896
5901
|
if (L && !r.current) {
|
|
5897
5902
|
r.current = !0, t("updating-prices");
|
|
5898
5903
|
try {
|
|
5899
5904
|
await J(), t("waiting-prices-confirmation");
|
|
5900
|
-
} catch (
|
|
5901
|
-
console.debug("Ondo price update failed after approve",
|
|
5905
|
+
} catch (fn) {
|
|
5906
|
+
console.debug("Ondo price update failed after approve", fn), S(fn), o();
|
|
5902
5907
|
}
|
|
5903
5908
|
return;
|
|
5904
5909
|
}
|
|
@@ -5910,14 +5915,14 @@ const sl = (e, t) => {
|
|
|
5910
5915
|
e,
|
|
5911
5916
|
l,
|
|
5912
5917
|
N,
|
|
5913
|
-
|
|
5918
|
+
H,
|
|
5914
5919
|
o,
|
|
5915
5920
|
S,
|
|
5916
5921
|
J,
|
|
5917
5922
|
T
|
|
5918
5923
|
]), E(() => {
|
|
5919
5924
|
(async () => {
|
|
5920
|
-
Ut && e === "waiting-prices-confirmation" && !n.current && (n.current = !0,
|
|
5925
|
+
Ut && e === "waiting-prices-confirmation" && !n.current && (n.current = !0, re(xe), await T("update_ondo_prices"), t("depositing"), await l());
|
|
5921
5926
|
})();
|
|
5922
5927
|
}, [
|
|
5923
5928
|
Ut,
|
|
@@ -5925,7 +5930,7 @@ const sl = (e, t) => {
|
|
|
5925
5930
|
m,
|
|
5926
5931
|
e,
|
|
5927
5932
|
l,
|
|
5928
|
-
|
|
5933
|
+
re,
|
|
5929
5934
|
T
|
|
5930
5935
|
]), E(() => {
|
|
5931
5936
|
e === "waiting-approve-confirmation" && u === "approve" && h === "None" && o();
|
|
@@ -5934,7 +5939,7 @@ const sl = (e, t) => {
|
|
|
5934
5939
|
}, [e, u, h, o]), {
|
|
5935
5940
|
approveAndDeposit: b(async () => {
|
|
5936
5941
|
if (v(), d) {
|
|
5937
|
-
if (!(N && !
|
|
5942
|
+
if (!(N && !H()))
|
|
5938
5943
|
return l();
|
|
5939
5944
|
n.current = !1, r.current = !0, t("updating-prices");
|
|
5940
5945
|
try {
|
|
@@ -5947,8 +5952,8 @@ const sl = (e, t) => {
|
|
|
5947
5952
|
t("approving"), n.current = !1, r.current = !1;
|
|
5948
5953
|
try {
|
|
5949
5954
|
await c(), t("waiting-approve-confirmation");
|
|
5950
|
-
} catch (
|
|
5951
|
-
throw o(),
|
|
5955
|
+
} catch (de) {
|
|
5956
|
+
throw o(), de;
|
|
5952
5957
|
}
|
|
5953
5958
|
}, [
|
|
5954
5959
|
d,
|
|
@@ -5956,7 +5961,7 @@ const sl = (e, t) => {
|
|
|
5956
5961
|
v,
|
|
5957
5962
|
l,
|
|
5958
5963
|
N,
|
|
5959
|
-
|
|
5964
|
+
H,
|
|
5960
5965
|
o,
|
|
5961
5966
|
S,
|
|
5962
5967
|
J
|
|
@@ -5981,7 +5986,7 @@ const sl = (e, t) => {
|
|
|
5981
5986
|
});
|
|
5982
5987
|
return Ni(l), l;
|
|
5983
5988
|
}, nx = () => {
|
|
5984
|
-
const { address: e, chainId: t } = A(), n = st(), [r] = $(), [o, a] = z(), [, s] = ne(), { isDebouncing: l, debouncedSendTokenValue: c } =
|
|
5989
|
+
const { address: e, chainId: t } = A(), n = st(), [r] = $(), [o, a] = z(), [, s] = ne(), { isDebouncing: l, debouncedSendTokenValue: c } = cr(), { isFetching: d } = mn(), { data: p, isFetching: m } = tx({
|
|
5985
5990
|
address: e,
|
|
5986
5991
|
chainId: t
|
|
5987
5992
|
}), u = d || m || l;
|
|
@@ -6002,7 +6007,7 @@ const sl = (e, t) => {
|
|
|
6002
6007
|
]), E(() => {
|
|
6003
6008
|
n && a({ isLoading: u });
|
|
6004
6009
|
}, [n, u, a]), E(() => {
|
|
6005
|
-
n && (
|
|
6010
|
+
n && (jt(r.value) || (a({ value: "0" }), s({ minSlippage: 0 })));
|
|
6006
6011
|
}, [a, s, r.value, n]);
|
|
6007
6012
|
}, fl = (e = {}) => {
|
|
6008
6013
|
const { address: t, chainId: n } = A(), { data: r } = ve({
|
|
@@ -6029,9 +6034,9 @@ const sl = (e, t) => {
|
|
|
6029
6034
|
l
|
|
6030
6035
|
]);
|
|
6031
6036
|
}, rx = () => {
|
|
6032
|
-
const e = st(), [t] = z(), [, n] = ne(), { isDebouncing: r } =
|
|
6037
|
+
const e = st(), [t] = z(), [, n] = ne(), { isDebouncing: r } = cr({
|
|
6033
6038
|
extendedDebounceTime: !0
|
|
6034
|
-
}), o =
|
|
6039
|
+
}), o = dr(), a = fl({ includesEntryFee: !0 });
|
|
6035
6040
|
E(() => {
|
|
6036
6041
|
if (!e || t.isLoading || r)
|
|
6037
6042
|
return;
|
|
@@ -6082,8 +6087,8 @@ function vx(e, t, n) {
|
|
|
6082
6087
|
var bx = vx;
|
|
6083
6088
|
function yx() {
|
|
6084
6089
|
}
|
|
6085
|
-
var Tx = yx,
|
|
6086
|
-
return new
|
|
6090
|
+
var Tx = yx, Or = gi, Ax = Tx, Sx = po, xx = 1 / 0, Cx = Or && 1 / Sx(new Or([, -0]))[1] == xx ? function(e) {
|
|
6091
|
+
return new Or(e);
|
|
6087
6092
|
} : Ax, Ex = Cx, Ix = li, Nx = fx, Ox = bx, _x = ci, Px = Ex, Dx = po, kx = 200;
|
|
6088
6093
|
function Lx(e, t, n) {
|
|
6089
6094
|
var r = -1, o = Nx, a = e.length, s = !0, l = [], c = l;
|
|
@@ -6113,10 +6118,10 @@ function Mx(e, t) {
|
|
|
6113
6118
|
return e && e.length ? Bx(e, $x(t)) : [];
|
|
6114
6119
|
}
|
|
6115
6120
|
var Fx = Mx;
|
|
6116
|
-
const Wx = /* @__PURE__ */
|
|
6121
|
+
const Wx = /* @__PURE__ */ Hn(Fx), wn = ({
|
|
6117
6122
|
excludeNativeToken: e = !1
|
|
6118
6123
|
} = {}) => {
|
|
6119
|
-
const { address: t, chainId: n, depositParams: r } = A(), { account: o } = B(), a = ct({ address: t, chainId: n }), s =
|
|
6124
|
+
const { address: t, chainId: n, depositParams: r } = A(), { account: o } = B(), a = ct({ address: t, chainId: n }), s = nr(), [{ isCustomDepositOptionsDisabled: l }] = ne(), [c] = Yp(), d = P(
|
|
6120
6125
|
() => Wx(
|
|
6121
6126
|
[
|
|
6122
6127
|
...a.filter(({ isDeposit: h }) => h).map(({ tokenAddress: h, tokenName: g, precision: f }) => ({
|
|
@@ -6141,12 +6146,12 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6141
6146
|
c,
|
|
6142
6147
|
n
|
|
6143
6148
|
]
|
|
6144
|
-
), p = !!d.length, m = !!o && p, { data: u } =
|
|
6149
|
+
), p = !!d.length, m = !!o && p, { data: u } = le({
|
|
6145
6150
|
contracts: d.map(({ address: h }) => ({
|
|
6146
6151
|
address: h,
|
|
6147
6152
|
abi: Ee,
|
|
6148
6153
|
functionName: "balanceOf",
|
|
6149
|
-
args: [o ??
|
|
6154
|
+
args: [o ?? O],
|
|
6150
6155
|
chainId: n
|
|
6151
6156
|
})),
|
|
6152
6157
|
query: {
|
|
@@ -6160,9 +6165,9 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6160
6165
|
for (let v = 0; v < d.length; v++)
|
|
6161
6166
|
h[v] = {
|
|
6162
6167
|
value: "",
|
|
6163
|
-
address: d[v]?.address ??
|
|
6164
|
-
symbol: d[v]?.symbol ?? d[v]?.address ??
|
|
6165
|
-
balance: u?.[v]?.result ?
|
|
6168
|
+
address: d[v]?.address ?? O,
|
|
6169
|
+
symbol: d[v]?.symbol ?? d[v]?.address ?? O,
|
|
6170
|
+
balance: u?.[v]?.result ? Xt(
|
|
6166
6171
|
(u?.[v]?.result).toString() ?? "0",
|
|
6167
6172
|
d[v]?.decimals ?? V
|
|
6168
6173
|
) : 0,
|
|
@@ -6182,9 +6187,9 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6182
6187
|
...s || l || e ? [] : [
|
|
6183
6188
|
{
|
|
6184
6189
|
value: "",
|
|
6185
|
-
address:
|
|
6186
|
-
symbol:
|
|
6187
|
-
decimals:
|
|
6190
|
+
address: qt[n]?.address ?? O,
|
|
6191
|
+
symbol: qt[n]?.nativeTokenSymbol ?? "",
|
|
6192
|
+
decimals: qt[n]?.decimals ?? V
|
|
6188
6193
|
}
|
|
6189
6194
|
]
|
|
6190
6195
|
];
|
|
@@ -6199,7 +6204,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6199
6204
|
r.defaultDepositTokenSymbol
|
|
6200
6205
|
]);
|
|
6201
6206
|
}, Ux = () => {
|
|
6202
|
-
const e = A(), [t] =
|
|
6207
|
+
const e = A(), [t] = wn(), n = $()[1], [r] = De();
|
|
6203
6208
|
E(() => {
|
|
6204
6209
|
r === "deposit" && t?.symbol && n({
|
|
6205
6210
|
address: t?.address,
|
|
@@ -6226,7 +6231,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6226
6231
|
});
|
|
6227
6232
|
return { isVaultDepositLocked: o, isAccountWhitelisted: a };
|
|
6228
6233
|
}, Gx = () => {
|
|
6229
|
-
const { defaultLockTime: e } = Z(), { chainId: t, address: n } = A(), { data: { customCooldown: r } = {} } =
|
|
6234
|
+
const { defaultLockTime: e } = Z(), { chainId: t, address: n } = A(), { data: { customCooldown: r } = {} } = rr({
|
|
6230
6235
|
address: n,
|
|
6231
6236
|
chainId: t
|
|
6232
6237
|
}), { depositMethod: o } = Mt(), a = r ? Fs({ minutes: Number(r) / 60 }) : e;
|
|
@@ -6240,7 +6245,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6240
6245
|
return e;
|
|
6241
6246
|
}
|
|
6242
6247
|
}, Hx = "1", Vx = () => {
|
|
6243
|
-
const { account: e =
|
|
6248
|
+
const { account: e = O } = B(), { address: t, chainId: n } = A(), [r] = z(), o = Te({ address: t, chainId: n }), { minDepositUSD: a } = Ui(t, n), { data: s } = uA({
|
|
6244
6249
|
address: t,
|
|
6245
6250
|
chainId: n,
|
|
6246
6251
|
account: e
|
|
@@ -6249,13 +6254,13 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6249
6254
|
).multipliedBy(c);
|
|
6250
6255
|
return {
|
|
6251
6256
|
requiresMinDeposit: p.isZero() ? !1 : p.lte(d),
|
|
6252
|
-
requiredMinDepositAmount:
|
|
6257
|
+
requiredMinDepositAmount: ae({ value: d })
|
|
6253
6258
|
};
|
|
6254
6259
|
}, Po = (e) => {
|
|
6255
6260
|
const [{ action: t, status: n }] = te();
|
|
6256
6261
|
return t === e && (n === "Wallet" || n === "Mining");
|
|
6257
6262
|
}, jx = (e) => {
|
|
6258
|
-
const t = Ae(), { showError: n } = dt(), { onAcceptTermsOfUse: r } = Ao(), { termsOfUseAccepted: o } = Z(), { swapQuoteRefreshTriggered: a } =
|
|
6263
|
+
const t = Ae(), { showError: n } = dt(), { onAcceptTermsOfUse: r } = Ao(), { termsOfUseAccepted: o } = Z(), { swapQuoteRefreshTriggered: a } = se(), s = ao(), l = ue(!1), c = a === "deposit", {
|
|
6259
6264
|
disabled: d,
|
|
6260
6265
|
label: p,
|
|
6261
6266
|
handleTrade: m
|
|
@@ -6263,7 +6268,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6263
6268
|
isError: u,
|
|
6264
6269
|
isLoading: h,
|
|
6265
6270
|
isFetching: g
|
|
6266
|
-
} =
|
|
6271
|
+
} = mn(), f = Po("deposit"), v = d || h || c;
|
|
6267
6272
|
E(() => (c && !g && !u && !l.current && (l.current = !0, s(null), m()), c || (l.current = !1), () => {
|
|
6268
6273
|
l.current = !1;
|
|
6269
6274
|
}), [
|
|
@@ -6334,7 +6339,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6334
6339
|
})()
|
|
6335
6340
|
};
|
|
6336
6341
|
}, Kx = () => {
|
|
6337
|
-
const { ActionButton: e = K } =
|
|
6342
|
+
const { ActionButton: e = K } = W(), { handleClick: t, disabled: n, isLoading: r, buttonText: o } = qx();
|
|
6338
6343
|
return /* @__PURE__ */ i(e, { onClick: t, disabled: n, loading: r, children: o });
|
|
6339
6344
|
}, Yx = () => {
|
|
6340
6345
|
const {
|
|
@@ -6344,7 +6349,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6344
6349
|
maintenance: r,
|
|
6345
6350
|
maintenanceDeposits: o,
|
|
6346
6351
|
depositCapacity: a
|
|
6347
|
-
} = A(), [s] = $(), l =
|
|
6352
|
+
} = A(), [s] = $(), l = tr(), c = he({
|
|
6348
6353
|
address: s.address,
|
|
6349
6354
|
chainId: n
|
|
6350
6355
|
}), { isVaultDepositLocked: d, isAccountWhitelisted: p } = zx(), { requiresHighSlippageConfirm: m, confirmHighSlippage: u, slippageToBeUsed: h } = Io(), { requiresMinDeposit: g, requiredMinDepositAmount: f } = Vx(), y = Number(s.value || "0") * Number(c), T = a !== void 0 && y > a;
|
|
@@ -6362,7 +6367,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6362
6367
|
insufficientBalance: l
|
|
6363
6368
|
};
|
|
6364
6369
|
}, Qx = () => {
|
|
6365
|
-
const { ActionButton: e = K } =
|
|
6370
|
+
const { ActionButton: e = K } = W(), t = x(), {
|
|
6366
6371
|
requiresMinDeposit: n,
|
|
6367
6372
|
requiredMinDepositAmount: r,
|
|
6368
6373
|
requiresWhitelist: o,
|
|
@@ -6376,13 +6381,13 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6376
6381
|
exceedsDepositCapacity: u
|
|
6377
6382
|
} = Yx();
|
|
6378
6383
|
return n ? /* @__PURE__ */ i(e, { disabled: !0, children: t.minimumPurchase.replace("{value}", r) }) : o || p ? /* @__PURE__ */ i(
|
|
6379
|
-
|
|
6384
|
+
Pn,
|
|
6380
6385
|
{
|
|
6381
6386
|
promptText: s ? t.poolIsInactive.replace("{poolSymbol}", l) : p ? t.poolDepositsAreMaintenance.replace("{poolSymbol}", l) : t.poolIsPrivate,
|
|
6382
6387
|
children: t.depositAction
|
|
6383
6388
|
}
|
|
6384
6389
|
) : u ? /* @__PURE__ */ i(
|
|
6385
|
-
|
|
6390
|
+
Pn,
|
|
6386
6391
|
{
|
|
6387
6392
|
promptText: t.exceedsDepositCapacity.replace(
|
|
6388
6393
|
"{poolSymbol}",
|
|
@@ -6429,7 +6434,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6429
6434
|
e.updater({ value: l });
|
|
6430
6435
|
}
|
|
6431
6436
|
};
|
|
6432
|
-
},
|
|
6437
|
+
}, kn = ({ children: e }) => /* @__PURE__ */ i(
|
|
6433
6438
|
"table",
|
|
6434
6439
|
{
|
|
6435
6440
|
className: "dtw-min-w-full dtw-border-separate",
|
|
@@ -6458,8 +6463,8 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6458
6463
|
}, eC = [
|
|
6459
6464
|
cs,
|
|
6460
6465
|
Gt.address
|
|
6461
|
-
], ka = ({ tokenAddress: e }) => eC.some((t) =>
|
|
6462
|
-
if (t !==
|
|
6466
|
+
], ka = ({ tokenAddress: e }) => eC.some((t) => G(e, t)), tC = ({ tokenAddress: e }) => G(e, cs), La = ({ tokenAddress: e }) => G(e, Je.address), nC = (e, t) => {
|
|
6467
|
+
if (t !== Fn.id || !e.some(tC))
|
|
6463
6468
|
return e;
|
|
6464
6469
|
const n = e.filter((c) => !ka(c)), r = e.filter(ka), [o] = r;
|
|
6465
6470
|
if (!o)
|
|
@@ -6477,7 +6482,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6477
6482
|
precision: Gt.decimals,
|
|
6478
6483
|
asset: { iconSymbols: [Gt.symbol] },
|
|
6479
6484
|
fraction: a.toFixed(bt(a)),
|
|
6480
|
-
fractionUsd:
|
|
6485
|
+
fractionUsd: ae({ value: s }),
|
|
6481
6486
|
fractionUsdNumber: s
|
|
6482
6487
|
};
|
|
6483
6488
|
return [...n, l].sort(
|
|
@@ -6486,7 +6491,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6486
6491
|
}, rC = (e, t) => {
|
|
6487
6492
|
if (t.length === 0)
|
|
6488
6493
|
return e;
|
|
6489
|
-
const n = ({ tokenAddress: c }) => t.some((d) =>
|
|
6494
|
+
const n = ({ tokenAddress: c }) => t.some((d) => G(c, d)), r = e.filter((c) => n(c) || La(c));
|
|
6490
6495
|
if (!r.some(n))
|
|
6491
6496
|
return e;
|
|
6492
6497
|
const [o] = r;
|
|
@@ -6504,7 +6509,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6504
6509
|
fraction: a.toFixed(
|
|
6505
6510
|
bt(a)
|
|
6506
6511
|
),
|
|
6507
|
-
fractionUsd:
|
|
6512
|
+
fractionUsd: ae({ value: a }),
|
|
6508
6513
|
fractionUsdNumber: a
|
|
6509
6514
|
};
|
|
6510
6515
|
return [...e.filter(
|
|
@@ -6525,10 +6530,10 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6525
6530
|
[o, n, a]
|
|
6526
6531
|
), l = e ? s.length : Os, c = s.find(
|
|
6527
6532
|
({ tokenAddress: g }) => ys.some(
|
|
6528
|
-
(f) =>
|
|
6533
|
+
(f) => G(g, f)
|
|
6529
6534
|
)
|
|
6530
6535
|
), d = !!c && c.amount !== "0", p = s.find(
|
|
6531
|
-
({ tokenAddress: g }) =>
|
|
6536
|
+
({ tokenAddress: g }) => G(g, fp)
|
|
6532
6537
|
), m = !!p && p.amount !== "0", { firstPart: u, secondPart: h } = ds(
|
|
6533
6538
|
s,
|
|
6534
6539
|
l
|
|
@@ -6538,7 +6543,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6538
6543
|
hiddenAssets: h,
|
|
6539
6544
|
showUnitWithdrawalTip: d,
|
|
6540
6545
|
unitSymbol: c?.tokenName,
|
|
6541
|
-
unitAddress: c?.tokenAddress ??
|
|
6546
|
+
unitAddress: c?.tokenAddress ?? O,
|
|
6542
6547
|
showMapolloWithdrawalTip: m,
|
|
6543
6548
|
mapolloSymbol: p?.tokenName
|
|
6544
6549
|
};
|
|
@@ -6584,7 +6589,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6584
6589
|
},
|
|
6585
6590
|
children: [
|
|
6586
6591
|
/* @__PURE__ */ i(
|
|
6587
|
-
|
|
6592
|
+
pn,
|
|
6588
6593
|
{
|
|
6589
6594
|
symbol: g,
|
|
6590
6595
|
iconSymbols: f.iconSymbols,
|
|
@@ -6619,8 +6624,8 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6619
6624
|
[n, t]
|
|
6620
6625
|
);
|
|
6621
6626
|
return /* @__PURE__ */ i("div", { className: I("dtw-text-sm dtw-font-light", e), children: o.length > 0 ? /* @__PURE__ */ w(R, { children: [
|
|
6622
|
-
/* @__PURE__ */ i(
|
|
6623
|
-
a.length > 0 && /* @__PURE__ */ i(vl, { children: /* @__PURE__ */ i(
|
|
6627
|
+
/* @__PURE__ */ i(kn, { children: o.map(m) }),
|
|
6628
|
+
a.length > 0 && /* @__PURE__ */ i(vl, { children: /* @__PURE__ */ i(kn, { children: a.map(m) }) }),
|
|
6624
6629
|
s && /* @__PURE__ */ w("p", { className: "dtw-mt-1 dtw-text-[color:var(--panel-warning-content-color)] dtw-text-[length:var(--panel-label-font-size)]", children: [
|
|
6625
6630
|
l,
|
|
6626
6631
|
" can be redeemed using",
|
|
@@ -6659,7 +6664,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6659
6664
|
] })
|
|
6660
6665
|
] }) : /* @__PURE__ */ i($i, {}) });
|
|
6661
6666
|
}, sC = ({ symbol: e }) => {
|
|
6662
|
-
const t =
|
|
6667
|
+
const t = on(), n = Ae(), { standalone: r } = Z(), o = t.some((p) => p.symbol === e), a = e === Ce.symbol, s = jp(), l = o && t.length === 1;
|
|
6663
6668
|
return {
|
|
6664
6669
|
isAllSymbol: a,
|
|
6665
6670
|
onClick: () => {
|
|
@@ -6689,7 +6694,7 @@ const Wx = /* @__PURE__ */ Gn(Fx), mn = ({
|
|
|
6689
6694
|
disabled: r,
|
|
6690
6695
|
children: [
|
|
6691
6696
|
/* @__PURE__ */ i(
|
|
6692
|
-
|
|
6697
|
+
pn,
|
|
6693
6698
|
{
|
|
6694
6699
|
symbol: e,
|
|
6695
6700
|
iconSymbols: o ? [] : [e],
|
|
@@ -6738,7 +6743,7 @@ const dC = (e) => {
|
|
|
6738
6743
|
const f = Number(t || 0) * Number(n || 0);
|
|
6739
6744
|
if (!e || isNaN(f))
|
|
6740
6745
|
return { usdAmount: "", isEstimated: !1 };
|
|
6741
|
-
const v =
|
|
6746
|
+
const v = ae({
|
|
6742
6747
|
value: f,
|
|
6743
6748
|
maximumFractionDigits: bt(f)
|
|
6744
6749
|
});
|
|
@@ -6759,19 +6764,19 @@ const dC = (e) => {
|
|
|
6759
6764
|
if (!a) return;
|
|
6760
6765
|
const v = f.target.selectionStart ?? 0, y = f.target.value, T = cC(y);
|
|
6761
6766
|
if (T !== "" && !/^\d*\.?\d*$/.test(T)) return;
|
|
6762
|
-
const S = (y.slice(0, v).match(/,/g) || []).length,
|
|
6763
|
-
a(
|
|
6767
|
+
const S = T === "." ? "0." : T, k = (y.slice(0, v).match(/,/g) || []).length, _ = v - k + S.length - T.length;
|
|
6768
|
+
a(S), requestAnimationFrame(() => {
|
|
6764
6769
|
if (!d.current) return;
|
|
6765
|
-
const
|
|
6766
|
-
let
|
|
6767
|
-
for (let
|
|
6768
|
-
if (
|
|
6769
|
-
|
|
6770
|
+
const M = Ra(S);
|
|
6771
|
+
let N = 0, H = M.length;
|
|
6772
|
+
for (let re = 0; re < M.length; re++) {
|
|
6773
|
+
if (N === _) {
|
|
6774
|
+
H = re;
|
|
6770
6775
|
break;
|
|
6771
6776
|
}
|
|
6772
|
-
|
|
6777
|
+
M[re] !== "," && N++;
|
|
6773
6778
|
}
|
|
6774
|
-
d.current.setSelectionRange(
|
|
6779
|
+
d.current.setSelectionRange(H, H);
|
|
6775
6780
|
});
|
|
6776
6781
|
}, g = () => {
|
|
6777
6782
|
a && s && a(s);
|
|
@@ -6786,7 +6791,7 @@ const dC = (e) => {
|
|
|
6786
6791
|
onMaxBalanceClick: g,
|
|
6787
6792
|
onInputChange: h
|
|
6788
6793
|
};
|
|
6789
|
-
},
|
|
6794
|
+
}, en = (e) => {
|
|
6790
6795
|
const {
|
|
6791
6796
|
inputRef: t,
|
|
6792
6797
|
usdAmount: n,
|
|
@@ -6929,17 +6934,17 @@ const dC = (e) => {
|
|
|
6929
6934
|
o
|
|
6930
6935
|
]);
|
|
6931
6936
|
}, hC = () => {
|
|
6932
|
-
const { account: e =
|
|
6937
|
+
const { account: e = O } = B(), { chainId: t } = A();
|
|
6933
6938
|
return Pe({
|
|
6934
6939
|
address: Q("easySwapperV2", t),
|
|
6935
6940
|
abi: rt,
|
|
6936
6941
|
functionName: "withdrawalContracts",
|
|
6937
6942
|
chainId: t,
|
|
6938
6943
|
args: [e],
|
|
6939
|
-
query: { enabled: !
|
|
6944
|
+
query: { enabled: !F(e) }
|
|
6940
6945
|
});
|
|
6941
6946
|
}, Do = () => {
|
|
6942
|
-
const { chainId: e } = A(), [t] = z(), n = nl({ address: t.address, chainId: e }), r = Me(), { data: o = [] } = me(), a = o.filter(({ address: m }) =>
|
|
6947
|
+
const { chainId: e } = A(), [t] = z(), n = nl({ address: t.address, chainId: e }), r = Me(), { data: o = [] } = me(), a = o.filter(({ address: m }) => G(m, t.address)).reduce((m, { rawBalance: u }) => m + u, BigInt(0)), s = o.filter(({ address: m }) => !G(m, t.address)).reduce((m, { valueInUsd: u }) => m + u, 0), l = new D(s).shiftedBy(V).div(n?.toString() ?? "1").shiftedBy(t.decimals).toFixed(0, D.ROUND_DOWN), c = new D(l).times(1 - Is / 100).times(1 - r / 100).toFixed(0, D.ROUND_DOWN), d = new D(
|
|
6943
6948
|
a.toString()
|
|
6944
6949
|
).plus(l).toFixed(0, D.ROUND_DOWN), p = new D(
|
|
6945
6950
|
a.toString()
|
|
@@ -6949,7 +6954,7 @@ const dC = (e) => {
|
|
|
6949
6954
|
isClaim: e,
|
|
6950
6955
|
onErrorCallback: t
|
|
6951
6956
|
} = {}) => {
|
|
6952
|
-
const n = A(), { data: r = [] } = me(), { data: o = {} } = ut(), [a] = z(), { minExpectedReceiveAmount: s } = Do(), l = Me(), [{ slippage: c }] = ne(), d = c === "auto", p =
|
|
6957
|
+
const n = A(), { data: r = [] } = me(), { data: o = {} } = ut(), [a] = z(), { minExpectedReceiveAmount: s } = Do(), l = Me(), [{ slippage: c }] = ne(), d = c === "auto", p = ie()[1], m = e ? "claim" : "swap", u = Qe({
|
|
6953
6958
|
action: m,
|
|
6954
6959
|
onErrorCallback: t
|
|
6955
6960
|
}), h = Cl(), { send: g, estimate: f } = ye({
|
|
@@ -6969,30 +6974,30 @@ const dC = (e) => {
|
|
|
6969
6974
|
}) : [l];
|
|
6970
6975
|
for (const S of T)
|
|
6971
6976
|
for (const k of y) {
|
|
6972
|
-
const
|
|
6973
|
-
(
|
|
6974
|
-
const
|
|
6977
|
+
const _ = Object.entries(o).reduce(
|
|
6978
|
+
(H, [re, J]) => {
|
|
6979
|
+
const ce = J?.find(
|
|
6975
6980
|
(xe) => xe.routerKey === k
|
|
6976
6981
|
);
|
|
6977
|
-
return { ...
|
|
6982
|
+
return { ...H, [re]: ce };
|
|
6978
6983
|
},
|
|
6979
6984
|
{}
|
|
6980
|
-
),
|
|
6985
|
+
), M = hd({
|
|
6981
6986
|
assets: r,
|
|
6982
|
-
swapData:
|
|
6987
|
+
swapData: _,
|
|
6983
6988
|
receiveAssetAddress: a.address,
|
|
6984
6989
|
slippage: S
|
|
6985
6990
|
}), { error: N } = await f(
|
|
6986
|
-
|
|
6991
|
+
M,
|
|
6987
6992
|
s
|
|
6988
6993
|
);
|
|
6989
6994
|
if (!N)
|
|
6990
6995
|
return console.debug(
|
|
6991
6996
|
`[Complete Withdraw] Estimation succeeded: slippage=${S}%, router=${k}`
|
|
6992
6997
|
), console.debug("[Complete Withdraw] Transaction arguments:", [
|
|
6993
|
-
|
|
6998
|
+
M,
|
|
6994
6999
|
s
|
|
6995
|
-
]), [
|
|
7000
|
+
]), [M, s];
|
|
6996
7001
|
}
|
|
6997
7002
|
return console.error("[Complete Withdraw] All routers failed estimation"), [];
|
|
6998
7003
|
}, [
|
|
@@ -7027,7 +7032,7 @@ const dC = (e) => {
|
|
|
7027
7032
|
const { data: e = [] } = me();
|
|
7028
7033
|
return e.reduce((t, { balance: n, price: r }) => t + n * r, 0);
|
|
7029
7034
|
}, me = () => {
|
|
7030
|
-
const { account: e =
|
|
7035
|
+
const { account: e = O } = B(), { chainId: t } = A(), { data: n = [] } = kS({
|
|
7031
7036
|
account: e,
|
|
7032
7037
|
chainId: t
|
|
7033
7038
|
});
|
|
@@ -7036,8 +7041,8 @@ const dC = (e) => {
|
|
|
7036
7041
|
const { data: e = [], isFetching: t } = me();
|
|
7037
7042
|
return { isCompleteWithdrawStep: e?.length > 0, isFetching: t };
|
|
7038
7043
|
}, ut = () => {
|
|
7039
|
-
const e = xo(), { chainId: t } = A(), { account: n =
|
|
7040
|
-
() => a.filter(({ address: c }) => !
|
|
7044
|
+
const e = xo(), { chainId: t } = A(), { account: n = O } = B(), [{ slippage: r }] = ne(), [o] = z(), { data: a = [] } = me(), s = Cl(), l = P(
|
|
7045
|
+
() => a.filter(({ address: c }) => !G(c, o.address)).map(({ address: c, rawBalance: d }) => ({
|
|
7041
7046
|
chainId: t,
|
|
7042
7047
|
sourceAddress: c,
|
|
7043
7048
|
destinationAddress: o.address,
|
|
@@ -7070,7 +7075,7 @@ const dC = (e) => {
|
|
|
7070
7075
|
if (n.length === 0 || o || a)
|
|
7071
7076
|
return;
|
|
7072
7077
|
const s = n.reduce((l, c) => {
|
|
7073
|
-
if (
|
|
7078
|
+
if (G(c.address, e.address))
|
|
7074
7079
|
return l.plus(c.rawBalance.toString());
|
|
7075
7080
|
const d = r?.[c.address] ?? [], m = d[uS(d)]?.destinationAmount ?? "0";
|
|
7076
7081
|
return l.plus(m);
|
|
@@ -7095,7 +7100,7 @@ const dC = (e) => {
|
|
|
7095
7100
|
isClaim: t,
|
|
7096
7101
|
onErrorCallback: n
|
|
7097
7102
|
}) => {
|
|
7098
|
-
const r = x(), { showError: o } = dt(), { account: a } = B(), s = A(), [l] = z(), c = te()[1], d =
|
|
7103
|
+
const r = x(), { showError: o } = dt(), { account: a } = B(), s = A(), [l] = z(), c = te()[1], d = ie()[1], p = ro(), { data: m } = me(), { isFetching: u } = ut(), h = b(async () => {
|
|
7099
7104
|
const g = s.chainId, f = (m ?? []).map(
|
|
7100
7105
|
({ address: y, decimals: T, symbol: S, balance: k }) => ({
|
|
7101
7106
|
address: y,
|
|
@@ -7104,7 +7109,7 @@ const dC = (e) => {
|
|
|
7104
7109
|
value: k.toString()
|
|
7105
7110
|
})
|
|
7106
7111
|
), v = t ? null : f.filter(
|
|
7107
|
-
(y) => !
|
|
7112
|
+
(y) => !G(y.address, l.address)
|
|
7108
7113
|
);
|
|
7109
7114
|
c({
|
|
7110
7115
|
isOpen: !0,
|
|
@@ -7156,7 +7161,7 @@ const dC = (e) => {
|
|
|
7156
7161
|
return e === "0" || n.isZero() ? 0 : n.dividedBy(e).minus(1).times(100).decimalPlaces(2, D.ROUND_DOWN).toNumber();
|
|
7157
7162
|
}, Cl = () => {
|
|
7158
7163
|
const [e] = z(), { data: t = [] } = me();
|
|
7159
|
-
return t.length > 0 && t.some(({ address: n }) => !
|
|
7164
|
+
return t.length > 0 && t.some(({ address: n }) => !G(n, e.address));
|
|
7160
7165
|
}, vC = ({
|
|
7161
7166
|
handleTrade: e,
|
|
7162
7167
|
onError: t
|
|
@@ -7179,7 +7184,7 @@ const dC = (e) => {
|
|
|
7179
7184
|
}
|
|
7180
7185
|
}, [r, a, o, e, d, c]);
|
|
7181
7186
|
}, El = () => {
|
|
7182
|
-
const e = A(), [t] =
|
|
7187
|
+
const e = A(), [t] = wn(), { isAllAssetsWithdrawOptionDefault: n } = Z(), { data: r = [] } = me(), o = r.length > 0, { data: a } = zi(e), { hasAssets: s, isReady: l } = cn({
|
|
7183
7188
|
address: e.address,
|
|
7184
7189
|
chainId: e.chainId
|
|
7185
7190
|
}), c = De()[1], d = $()[1], p = z()[1], m = () => {
|
|
@@ -7245,10 +7250,10 @@ const dC = (e) => {
|
|
|
7245
7250
|
minSlippage: o,
|
|
7246
7251
|
onInputFocus: a,
|
|
7247
7252
|
onInputChange: s
|
|
7248
|
-
} = Jx(), l =
|
|
7253
|
+
} = Jx(), l = dn(o ?? 0);
|
|
7249
7254
|
return /* @__PURE__ */ w(R, { children: [
|
|
7250
7255
|
/* @__PURE__ */ i(
|
|
7251
|
-
|
|
7256
|
+
en,
|
|
7252
7257
|
{
|
|
7253
7258
|
assetInput: e.value,
|
|
7254
7259
|
onInputChange: s,
|
|
@@ -7264,7 +7269,7 @@ const dC = (e) => {
|
|
|
7264
7269
|
}
|
|
7265
7270
|
),
|
|
7266
7271
|
/* @__PURE__ */ w(
|
|
7267
|
-
|
|
7272
|
+
en,
|
|
7268
7273
|
{
|
|
7269
7274
|
assetInput: t.value,
|
|
7270
7275
|
assetSymbol: t.symbol,
|
|
@@ -7285,7 +7290,7 @@ const dC = (e) => {
|
|
|
7285
7290
|
const { address: e, chainId: t } = A(), n = hA({ address: e, chainId: t }), [r] = z();
|
|
7286
7291
|
if (!n)
|
|
7287
7292
|
return { isMaxSupplyCapReached: !1, supplyCapInUsd: "" };
|
|
7288
|
-
const { totalSupplyNumber: o, maxSupplyCapNumber: a, remainingSupplyCapInUsd: s } = n, l = Number(r.value || "0"), c = o + l > a, d =
|
|
7293
|
+
const { totalSupplyNumber: o, maxSupplyCapNumber: a, remainingSupplyCapInUsd: s } = n, l = Number(r.value || "0"), c = o + l > a, d = ae({
|
|
7289
7294
|
value: s,
|
|
7290
7295
|
maximumFractionDigits: 0,
|
|
7291
7296
|
minimumFractionDigits: 0
|
|
@@ -7306,7 +7311,7 @@ const dC = (e) => {
|
|
|
7306
7311
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1", children: [
|
|
7307
7312
|
/* @__PURE__ */ i("span", { className: "dtw-text-[length:var(--panel-font-size-xs)] dtw-font-semibold dtw-text-[color:var(--panel-success-content-color)]", children: r.yearlyEarnings }),
|
|
7308
7313
|
/* @__PURE__ */ i(
|
|
7309
|
-
|
|
7314
|
+
En,
|
|
7310
7315
|
{
|
|
7311
7316
|
text: r.projectedYearlyEarningsTooltip,
|
|
7312
7317
|
placement: "top",
|
|
@@ -7327,7 +7332,7 @@ const dC = (e) => {
|
|
|
7327
7332
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1", children: [
|
|
7328
7333
|
/* @__PURE__ */ i("span", { className: "dtw-text-[length:var(--panel-font-size-xs)] dtw-font-semibold dtw-text-[color:var(--panel-success-content-color)]", children: r.dailyEarnings }),
|
|
7329
7334
|
/* @__PURE__ */ i(
|
|
7330
|
-
|
|
7335
|
+
En,
|
|
7331
7336
|
{
|
|
7332
7337
|
text: r.projectedDailyEarningsTooltip,
|
|
7333
7338
|
placement: "top",
|
|
@@ -7341,7 +7346,7 @@ const dC = (e) => {
|
|
|
7341
7346
|
)
|
|
7342
7347
|
] }) : null;
|
|
7343
7348
|
}, xC = () => {
|
|
7344
|
-
const e = x(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = ne(), o = t === "auto", a = ul(), [s] = z(), { address: l, chainId: c } = A(), { entryFee: d } = Eo({ address: l, chainId: c }), { minDepositUSD: p } = Ui(l, c), m = Gx(), u =
|
|
7349
|
+
const e = x(), [{ slippage: t, minSlippage: n, isMaxSlippageLoading: r }] = ne(), o = t === "auto", a = ul(), [s] = z(), { address: l, chainId: c } = A(), { entryFee: d } = Eo({ address: l, chainId: c }), { minDepositUSD: p } = Ui(l, c), m = Gx(), u = un(), h = p ? ae({ value: p, minimumFractionDigits: 0 }) : "", g = dn(
|
|
7345
7350
|
o ? n ?? 0 : t
|
|
7346
7351
|
), f = Vi({
|
|
7347
7352
|
tradingType: "deposit",
|
|
@@ -7474,7 +7479,7 @@ const dC = (e) => {
|
|
|
7474
7479
|
}
|
|
7475
7480
|
);
|
|
7476
7481
|
}, EC = ({ children: e }) => {
|
|
7477
|
-
const { DepositMetaInfo: t, MaxSupplyReachedAlert: n } =
|
|
7482
|
+
const { DepositMetaInfo: t, MaxSupplyReachedAlert: n } = W(), { isMaxSupplyCapReached: r, supplyCapInUsd: o } = AC();
|
|
7478
7483
|
return /* @__PURE__ */ w(X.Meta, { children: [
|
|
7479
7484
|
r && !!n && /* @__PURE__ */ i(n, { supplyCapInUsd: o }),
|
|
7480
7485
|
/* @__PURE__ */ i("div", { className: "dtw-bg-[var(--panel-meta-action-panel-bg)]", children: e }),
|
|
@@ -7488,7 +7493,7 @@ const dC = (e) => {
|
|
|
7488
7493
|
const { countryCode: e } = Z(), { address: t, chainId: n } = A(), { hasAssets: r } = Ye({ address: t, chainId: n }), o = e ? bp[e] : void 0, a = e ? yp[e] : void 0;
|
|
7489
7494
|
return { isGeoBlocked: !!o || r && !!a, blockedCountryName: o ?? a ?? "" };
|
|
7490
7495
|
}, OC = () => {
|
|
7491
|
-
const { ActionButton: e = K } =
|
|
7496
|
+
const { ActionButton: e = K } = W(), t = x(), { status: n } = $s(), { onConnect: r } = Ao();
|
|
7492
7497
|
return /* @__PURE__ */ i(
|
|
7493
7498
|
e,
|
|
7494
7499
|
{
|
|
@@ -7499,7 +7504,7 @@ const dC = (e) => {
|
|
|
7499
7504
|
}
|
|
7500
7505
|
);
|
|
7501
7506
|
}, _C = () => {
|
|
7502
|
-
const { ActionButton: e = K } =
|
|
7507
|
+
const { ActionButton: e = K } = W(), { switchNetwork: t } = it(), { chainId: n } = A(), r = x();
|
|
7503
7508
|
return /* @__PURE__ */ i(e, { onClick: () => {
|
|
7504
7509
|
t?.({ chainId: n });
|
|
7505
7510
|
}, children: r.switchNetwork });
|
|
@@ -7530,7 +7535,7 @@ const dC = (e) => {
|
|
|
7530
7535
|
}, Ol = (e) => {
|
|
7531
7536
|
const { disabled: t, tooltipText: n, handleClick: r } = PC(e);
|
|
7532
7537
|
return /* @__PURE__ */ i(Zr, { text: n, children: /* @__PURE__ */ i(
|
|
7533
|
-
|
|
7538
|
+
In,
|
|
7534
7539
|
{
|
|
7535
7540
|
Icon: Bc,
|
|
7536
7541
|
onClick: r,
|
|
@@ -7543,7 +7548,7 @@ const dC = (e) => {
|
|
|
7543
7548
|
}
|
|
7544
7549
|
) });
|
|
7545
7550
|
}, DC = () => {
|
|
7546
|
-
const { refetch: e, isFetched: t } =
|
|
7551
|
+
const { refetch: e, isFetched: t } = mn(), { invalidateTradingQueries: n } = ln();
|
|
7547
7552
|
return { handleSwapQuoteReload: () => {
|
|
7548
7553
|
n(), e();
|
|
7549
7554
|
}, disabled: !t };
|
|
@@ -7558,7 +7563,7 @@ const dC = (e) => {
|
|
|
7558
7563
|
}
|
|
7559
7564
|
);
|
|
7560
7565
|
}, LC = () => {
|
|
7561
|
-
const { refetch: e, isFetched: t } = ut(), { invalidateTradingQueries: n } =
|
|
7566
|
+
const { refetch: e, isFetched: t } = ut(), { invalidateTradingQueries: n } = ln();
|
|
7562
7567
|
return { handleSwapQuoteReload: () => {
|
|
7563
7568
|
n(), e();
|
|
7564
7569
|
}, disabled: !t };
|
|
@@ -7576,16 +7581,16 @@ const dC = (e) => {
|
|
|
7576
7581
|
children: e,
|
|
7577
7582
|
...t
|
|
7578
7583
|
}) => {
|
|
7579
|
-
const { ActionButton: n = K } =
|
|
7584
|
+
const { ActionButton: n = K } = W(), { openLimitSellOverlay: r, displayLimitSellOverlay: o } = kA();
|
|
7580
7585
|
return o ? /* @__PURE__ */ i(n, { ...t, onClick: r, children: e }) : null;
|
|
7581
7586
|
}, BC = ({
|
|
7582
7587
|
children: e,
|
|
7583
7588
|
...t
|
|
7584
7589
|
}) => {
|
|
7585
|
-
const { ActionButton: n = K } =
|
|
7590
|
+
const { ActionButton: n = K } = W(), { openLimitBuyOverlay: r, displayLimitBuyOverlay: o } = GA();
|
|
7586
7591
|
return o ? /* @__PURE__ */ i(n, { ...t, onClick: r, children: e }) : null;
|
|
7587
7592
|
}, Pl = ({ children: e, ...t }) => {
|
|
7588
|
-
const { ActionButton: n = K } =
|
|
7593
|
+
const { ActionButton: n = K } = W(), { onOpenNotificationsSettings: r } = Ao();
|
|
7589
7594
|
return r ? /* @__PURE__ */ i(n, { ...t, onClick: r, children: e }) : null;
|
|
7590
7595
|
}, MC = () => {
|
|
7591
7596
|
const { address: e, symbol: t } = A();
|
|
@@ -7612,8 +7617,8 @@ const dC = (e) => {
|
|
|
7612
7617
|
);
|
|
7613
7618
|
}, WC = () => {
|
|
7614
7619
|
const e = x(), t = Ae();
|
|
7615
|
-
|
|
7616
|
-
const { symbol: n } = A(), [r] = $(), [o] = z(), a =
|
|
7620
|
+
lr();
|
|
7621
|
+
const { symbol: n } = A(), [r] = $(), [o] = z(), a = Gn()[1], { isCompleteWithdrawStep: s } = Ft(), { swapQuoteRefreshTriggered: l } = se(), c = ao(), { isFetching: d, isError: p } = ut(), m = ue(!1), u = b(() => {
|
|
7617
7622
|
a({
|
|
7618
7623
|
sendToken: {
|
|
7619
7624
|
symbol: n,
|
|
@@ -7663,11 +7668,11 @@ const dC = (e) => {
|
|
|
7663
7668
|
label: s ? e.swapAction : e.sellNow
|
|
7664
7669
|
};
|
|
7665
7670
|
}, Dl = () => {
|
|
7666
|
-
const { ActionButton: e = K } =
|
|
7671
|
+
const { ActionButton: e = K } = W(), { handleClick: t, label: n, disabled: r } = WC();
|
|
7667
7672
|
return /* @__PURE__ */ i(e, { onClick: t, disabled: r, children: n });
|
|
7668
7673
|
}, UC = () => {
|
|
7669
7674
|
IC();
|
|
7670
|
-
const e = x(), { isSanctioned: t } = Z(), { GeoBlockAlert: n, SanctionedAlert: r, CustomDepositMeta: o } =
|
|
7675
|
+
const e = x(), { isSanctioned: t } = Z(), { GeoBlockAlert: n, SanctionedAlert: r, CustomDepositMeta: o } = W(), { isGeoBlocked: a, blockedCountryName: s } = NC(), l = a || t, c = [
|
|
7671
7676
|
{
|
|
7672
7677
|
Component: n ? () => /* @__PURE__ */ i(n, { countryName: s }) : void 0,
|
|
7673
7678
|
value: a,
|
|
@@ -7699,12 +7704,12 @@ const dC = (e) => {
|
|
|
7699
7704
|
}
|
|
7700
7705
|
}), n;
|
|
7701
7706
|
}, VC = ({ type: e }) => {
|
|
7702
|
-
const t = x(), { DepositTermsOfUse: n, ActionButton: r = K } =
|
|
7707
|
+
const t = x(), { DepositTermsOfUse: n, ActionButton: r = K } = W(), { handleReject: o, handleConfirm: a, isPending: s } = pe({
|
|
7703
7708
|
type: e
|
|
7704
7709
|
});
|
|
7705
7710
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-1 dtw-overflow-y-auto theme-scrollbar", children: [
|
|
7706
7711
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-1 dtw-items-center dtw-text-warning", children: [
|
|
7707
|
-
/* @__PURE__ */ i(
|
|
7712
|
+
/* @__PURE__ */ i(Qt, { className: "dtw-h-5 dtw-w-5" }),
|
|
7708
7713
|
/* @__PURE__ */ i("p", { children: t.termsOfUse })
|
|
7709
7714
|
] }),
|
|
7710
7715
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
@@ -7734,10 +7739,10 @@ const dC = (e) => {
|
|
|
7734
7739
|
] })
|
|
7735
7740
|
] });
|
|
7736
7741
|
}, jC = ({ type: e }) => {
|
|
7737
|
-
const t = x(), { ActionButton: n = K } =
|
|
7742
|
+
const t = x(), { ActionButton: n = K } = W(), { handleReject: r, handleConfirm: o } = pe({ type: e });
|
|
7738
7743
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-1", children: [
|
|
7739
7744
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-gap-1 dtw-items-center dtw-text-warning", children: [
|
|
7740
|
-
/* @__PURE__ */ i(
|
|
7745
|
+
/* @__PURE__ */ i(Qt, { className: "dtw-h-5 dtw-w-5" }),
|
|
7741
7746
|
/* @__PURE__ */ i("p", { children: t.highSlippage })
|
|
7742
7747
|
] }),
|
|
7743
7748
|
/* @__PURE__ */ i("p", { className: "dtw-text-sm", children: t.responsibleHighSlippage }),
|
|
@@ -7757,7 +7762,7 @@ const dC = (e) => {
|
|
|
7757
7762
|
] })
|
|
7758
7763
|
] });
|
|
7759
7764
|
}, qC = ({ type: e }) => {
|
|
7760
|
-
const t = x(), { ActionButton: n = K } =
|
|
7765
|
+
const t = x(), { ActionButton: n = K } = W(), { handleReject: r, handleConfirm: o } = pe({ type: e });
|
|
7761
7766
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-3", children: [
|
|
7762
7767
|
/* @__PURE__ */ i("div", { className: "dtw-flex dtw-gap-1 dtw-items-center", children: /* @__PURE__ */ i("p", { children: t.hyperEvmWarningTitle }) }),
|
|
7763
7768
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)]", children: [
|
|
@@ -7789,7 +7794,7 @@ const dC = (e) => {
|
|
|
7789
7794
|
onClick: n,
|
|
7790
7795
|
children: [
|
|
7791
7796
|
/* @__PURE__ */ i(
|
|
7792
|
-
|
|
7797
|
+
pn,
|
|
7793
7798
|
{
|
|
7794
7799
|
symbol: e.symbol,
|
|
7795
7800
|
iconSymbols: [e.symbol],
|
|
@@ -7851,7 +7856,7 @@ const dC = (e) => {
|
|
|
7851
7856
|
onClick: o,
|
|
7852
7857
|
children: [
|
|
7853
7858
|
/* @__PURE__ */ i(
|
|
7854
|
-
|
|
7859
|
+
pn,
|
|
7855
7860
|
{
|
|
7856
7861
|
symbol: e.symbol,
|
|
7857
7862
|
iconSymbols: [e.symbol],
|
|
@@ -7880,7 +7885,7 @@ const dC = (e) => {
|
|
|
7880
7885
|
}
|
|
7881
7886
|
);
|
|
7882
7887
|
}, XC = [], ZC = () => {
|
|
7883
|
-
const e = A(), [t] = De(), [n, r] = $(), [o, a] = z(), { data: s } = zi(e), l =
|
|
7888
|
+
const e = A(), [t] = De(), [n, r] = $(), [o, a] = z(), { data: s } = zi(e), l = wn(), c = s ? XC : e.withdrawParams.customTokens;
|
|
7884
7889
|
return P(
|
|
7885
7890
|
() => ({
|
|
7886
7891
|
tokens: t === "deposit" ? l : c,
|
|
@@ -7901,7 +7906,7 @@ const dC = (e) => {
|
|
|
7901
7906
|
searchQuery: e,
|
|
7902
7907
|
type: t
|
|
7903
7908
|
}) => {
|
|
7904
|
-
const [{ isMultiAssetWithdrawalEnabled: n }] = ne(), { isCompleteWithdrawStep: r } = Ft(), o =
|
|
7909
|
+
const [{ isMultiAssetWithdrawalEnabled: n }] = ne(), { isCompleteWithdrawStep: r } = Ft(), o = nr(), [a] = De(), { handleReject: s } = pe({ type: t }), { address: l, chainId: c } = A(), { hasAssets: d, isReady: p } = cn({ address: l, chainId: c }), { tokens: m, updater: u, activeTokens: h } = ZC(), g = P(
|
|
7905
7910
|
() => e ? m.filter(
|
|
7906
7911
|
({ symbol: v }) => v.toLowerCase().includes(e)
|
|
7907
7912
|
) : m,
|
|
@@ -7975,7 +7980,7 @@ const dC = (e) => {
|
|
|
7975
7980
|
children: e,
|
|
7976
7981
|
chainId: t
|
|
7977
7982
|
}) => {
|
|
7978
|
-
const { chainConfig: n } = Z(), { Image: r = Bi } =
|
|
7983
|
+
const { chainConfig: n } = Z(), { Image: r = Bi } = W(), o = n[t]?.iconPath, a = n[t]?.name;
|
|
7979
7984
|
return /* @__PURE__ */ w("div", { children: [
|
|
7980
7985
|
/* @__PURE__ */ w("div", { className: "dtw-sticky dtw-top-0 dtw-z-10 dtw-flex dtw-items-center dtw-space-x-3 dtw-bg-[color:var(--panel-popup-list-header-bg)] dtw-drop-shadow-md dtw-p-3", children: [
|
|
7981
7986
|
o && /* @__PURE__ */ i("div", { className: "dtw-h-6 dtw-w-6", children: /* @__PURE__ */ i(
|
|
@@ -7993,13 +7998,13 @@ const dC = (e) => {
|
|
|
7993
7998
|
e
|
|
7994
7999
|
] });
|
|
7995
8000
|
}, zr = (e, t) => e.address in t ? {
|
|
7996
|
-
balanceInUsd: t[e.address]?.balanceInUsd ??
|
|
8001
|
+
balanceInUsd: t[e.address]?.balanceInUsd ?? ae({ value: 0 }),
|
|
7997
8002
|
balanceInUsdNumber: t[e.address]?.balanceInUsdNumber ?? 0
|
|
7998
|
-
} : { balanceInUsd:
|
|
8003
|
+
} : { balanceInUsd: ae({ value: 0 }), balanceInUsdNumber: 0 }, nE = (e) => (t, n) => zr(n, e).balanceInUsdNumber - zr(t, e).balanceInUsdNumber, rE = ({
|
|
7999
8004
|
searchQuery: e,
|
|
8000
8005
|
type: t
|
|
8001
8006
|
}) => {
|
|
8002
|
-
const n = pA(), r =
|
|
8007
|
+
const n = pA(), r = on(), o = A(), { handleReject: a } = pe({ type: t }), [s] = De(), l = $()[1], c = z()[1], d = Up()[1], p = b(
|
|
8003
8008
|
({ address: u, value: h, decimals: g, symbol: f }) => {
|
|
8004
8009
|
(s === "deposit" ? c : l)({ address: u, value: h, decimals: g, symbol: f }), d(u), a();
|
|
8005
8010
|
},
|
|
@@ -8080,7 +8085,7 @@ const dC = (e) => {
|
|
|
8080
8085
|
}
|
|
8081
8086
|
);
|
|
8082
8087
|
}, aE = ({ type: e }) => {
|
|
8083
|
-
const { address: t, symbol: n, chainId: r } = A(), [{ link: o, sendTokens: a }, s] = te(), { handleReject: l } =
|
|
8088
|
+
const { address: t, symbol: n, chainId: r } = A(), [{ link: o, sendTokens: a }, s] = te(), { handleReject: l } = pe({ type: e }), c = a?.[0], d = hs(o), p = Te({
|
|
8084
8089
|
address: t,
|
|
8085
8090
|
chainId: r
|
|
8086
8091
|
}), m = b(() => {
|
|
@@ -8095,7 +8100,7 @@ const dC = (e) => {
|
|
|
8095
8100
|
vaultSymbol: n,
|
|
8096
8101
|
paidToken: c,
|
|
8097
8102
|
txHash: d,
|
|
8098
|
-
vaultTokenPrice:
|
|
8103
|
+
vaultTokenPrice: ae({ value: p }),
|
|
8099
8104
|
showDeriveBanner: u
|
|
8100
8105
|
};
|
|
8101
8106
|
}, sE = (e) => {
|
|
@@ -8107,11 +8112,11 @@ const dC = (e) => {
|
|
|
8107
8112
|
paidToken: s,
|
|
8108
8113
|
txHash: l,
|
|
8109
8114
|
vaultTokenPrice: c
|
|
8110
|
-
} = aE(e), { ActionButton: d = K, DeriveSuccessBanner: p } =
|
|
8115
|
+
} = aE(e), { ActionButton: d = K, DeriveSuccessBanner: p } = W(), m = ji();
|
|
8111
8116
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", noPadding: !0, children: [
|
|
8112
8117
|
/* @__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: [
|
|
8113
8118
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-text-[color:var(--panel-success-content-color)] dtw-mb-2", children: [
|
|
8114
|
-
/* @__PURE__ */ i(
|
|
8119
|
+
/* @__PURE__ */ i(nn, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
8115
8120
|
"Success"
|
|
8116
8121
|
] }),
|
|
8117
8122
|
/* @__PURE__ */ i(et, {}),
|
|
@@ -8156,7 +8161,7 @@ const dC = (e) => {
|
|
|
8156
8161
|
] })
|
|
8157
8162
|
] });
|
|
8158
8163
|
}, iE = () => {
|
|
8159
|
-
const e = x(), { LogoSpinner: t = Re } =
|
|
8164
|
+
const e = x(), { LogoSpinner: t = Re } = W(), [{ link: n }] = te();
|
|
8160
8165
|
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: [
|
|
8161
8166
|
/* @__PURE__ */ i(t, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
8162
8167
|
e.miningTx,
|
|
@@ -8173,11 +8178,11 @@ const dC = (e) => {
|
|
|
8173
8178
|
}, lE = ({
|
|
8174
8179
|
onClose: e
|
|
8175
8180
|
}) => {
|
|
8176
|
-
const t = x(), { ActionButton: n = K } =
|
|
8181
|
+
const t = x(), { ActionButton: n = K } = W(), [{ link: r }] = te();
|
|
8177
8182
|
return /* @__PURE__ */ w(R, { children: [
|
|
8178
8183
|
/* @__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: [
|
|
8179
8184
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-gap-2 dtw-text-[color:var(--panel-success-content-color)]", children: [
|
|
8180
|
-
/* @__PURE__ */ i(
|
|
8185
|
+
/* @__PURE__ */ i(nn, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
8181
8186
|
t.createLimitSellOrder
|
|
8182
8187
|
] }),
|
|
8183
8188
|
r && /* @__PURE__ */ i(
|
|
@@ -8196,7 +8201,7 @@ const dC = (e) => {
|
|
|
8196
8201
|
] })
|
|
8197
8202
|
] });
|
|
8198
8203
|
}, cE = ({ type: e }) => {
|
|
8199
|
-
const [{ status: t }, n] = te(), { handleReject: r } =
|
|
8204
|
+
const [{ status: t }, n] = te(), { handleReject: r } = pe({ type: e }), o = t === "Mining";
|
|
8200
8205
|
return { onClose: b(() => {
|
|
8201
8206
|
n({ isOpen: !1 }), r();
|
|
8202
8207
|
}, [r, n]), isProcessing: o };
|
|
@@ -8212,7 +8217,7 @@ const dC = (e) => {
|
|
|
8212
8217
|
}
|
|
8213
8218
|
);
|
|
8214
8219
|
}, pE = ({ type: e }) => {
|
|
8215
|
-
const { statusLabel: t, status: n } = el(), [{ link: r, action: o }, a] = te(), s = n == "Success", { handleReject: l } =
|
|
8220
|
+
const { statusLabel: t, status: n } = el(), [{ link: r, action: o }, a] = te(), s = n == "Success", { handleReject: l } = pe({ type: e }), c = o === "single_withdraw" && s, d = s && o === "deposit", p = s && o && Ps.includes(o);
|
|
8216
8221
|
return {
|
|
8217
8222
|
title: t ?? n,
|
|
8218
8223
|
isSuccessTx: s,
|
|
@@ -8275,12 +8280,12 @@ const dC = (e) => {
|
|
|
8275
8280
|
}
|
|
8276
8281
|
);
|
|
8277
8282
|
}, gE = ({ type: e }) => {
|
|
8278
|
-
const [, t] = te(), { handleReject: n } =
|
|
8283
|
+
const [, t] = te(), { handleReject: n } = pe({ type: e }), [{ link: r, status: o }] = te(), a = o == "Success";
|
|
8279
8284
|
return { onClose: b(() => {
|
|
8280
8285
|
t({ isOpen: !1 }), n();
|
|
8281
8286
|
}, [n, t]), link: r, isSuccessTx: a };
|
|
8282
8287
|
}, fE = (e) => {
|
|
8283
|
-
const t = x(), { ActionButton: n = K } =
|
|
8288
|
+
const t = x(), { ActionButton: n = K } = W(), { onClose: r, link: o, isSuccessTx: a } = gE(e);
|
|
8284
8289
|
return a ? /* @__PURE__ */ w(
|
|
8285
8290
|
X.Overlay,
|
|
8286
8291
|
{
|
|
@@ -8289,7 +8294,7 @@ const dC = (e) => {
|
|
|
8289
8294
|
noPadding: !0,
|
|
8290
8295
|
children: [
|
|
8291
8296
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-justify-center dtw-gap-3 dtw-pt-1 dtw-px-4 dtw-w-full dtw-h-full", children: [
|
|
8292
|
-
/* @__PURE__ */ i(
|
|
8297
|
+
/* @__PURE__ */ i(nn, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0 dtw-text-[color:var(--panel-success-content-color)]" }),
|
|
8293
8298
|
/* @__PURE__ */ i("div", { className: "dtw-text-center dtw-text-2xl dtw-font-semibold", children: t.withdrawalRequest }),
|
|
8294
8299
|
/* @__PURE__ */ i("div", { className: "dtw-text-center dtw-text-[color:var(--panel-secondary-content-color)]", children: t.expectToReceiveUsdcSoon }),
|
|
8295
8300
|
o && /* @__PURE__ */ i(
|
|
@@ -8307,7 +8312,7 @@ const dC = (e) => {
|
|
|
8307
8312
|
}
|
|
8308
8313
|
) : null;
|
|
8309
8314
|
}, vE = ({ type: e }) => {
|
|
8310
|
-
const { address: t, symbol: n } = A(), [{ link: r }, o] = te(), { handleReject: a } =
|
|
8315
|
+
const { address: t, symbol: n } = A(), [{ link: r }, o] = te(), { handleReject: a } = pe({ type: e }), [s] = Gn(), l = hs(r);
|
|
8311
8316
|
return {
|
|
8312
8317
|
onClose: b(() => {
|
|
8313
8318
|
o({ isOpen: !1, status: "None" }), a();
|
|
@@ -8320,11 +8325,11 @@ const dC = (e) => {
|
|
|
8320
8325
|
txHash: l
|
|
8321
8326
|
};
|
|
8322
8327
|
}, bE = (e) => {
|
|
8323
|
-
const t = x(), { link: n, onClose: r, vaultSymbol: o, vaultAmount: a, receiveTokens: s, txHash: l } = vE(e), { ActionButton: c = K } =
|
|
8328
|
+
const t = x(), { link: n, onClose: r, vaultSymbol: o, vaultAmount: a, receiveTokens: s, txHash: l } = vE(e), { ActionButton: c = K } = W();
|
|
8324
8329
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", noPadding: !0, children: [
|
|
8325
8330
|
/* @__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: [
|
|
8326
8331
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-items-center dtw-text-[color:var(--panel-success-content-color)] dtw-mb-2", children: [
|
|
8327
|
-
/* @__PURE__ */ i(
|
|
8332
|
+
/* @__PURE__ */ i(nn, { className: "dtw-h-16 dtw-w-16 lg:dtw-h-24 lg:dtw-w-24 dtw-shrink-0" }),
|
|
8328
8333
|
"Success"
|
|
8329
8334
|
] }),
|
|
8330
8335
|
/* @__PURE__ */ i(et, {}),
|
|
@@ -8367,7 +8372,7 @@ const dC = (e) => {
|
|
|
8367
8372
|
displaySuccessWithdrawalOverlay: l,
|
|
8368
8373
|
displayLimitOrderTransactionOverlay: c,
|
|
8369
8374
|
displayWithdrawLimitOrderOverlay: d
|
|
8370
|
-
} = pE({ type: e }), { LogoSpinner: p = Re } =
|
|
8375
|
+
} = pE({ type: e }), { LogoSpinner: p = Re } = W(), m = x();
|
|
8371
8376
|
return c ? /* @__PURE__ */ i(dE, { type: e }) : s ? /* @__PURE__ */ i(sE, { type: e }) : l ? /* @__PURE__ */ i(bE, { type: e }) : d ? /* @__PURE__ */ i(fE, { type: e }) : /* @__PURE__ */ w(X.Notification, { onClose: r, children: [
|
|
8372
8377
|
/* @__PURE__ */ w("div", { className: "dtw-flex dtw-items-center dtw-gap-1.5", children: [
|
|
8373
8378
|
/* @__PURE__ */ i("span", { className: "dtw-font-semibold dtw-drop-shadow-md", children: n }),
|
|
@@ -8459,12 +8464,12 @@ const dC = (e) => {
|
|
|
8459
8464
|
isFetched: n,
|
|
8460
8465
|
onClose: r
|
|
8461
8466
|
}) => {
|
|
8462
|
-
const o = ao(), { invalidateTradingQueries: a } =
|
|
8467
|
+
const o = ao(), { invalidateTradingQueries: a } = ln();
|
|
8463
8468
|
return { handleClick: () => {
|
|
8464
8469
|
o(e), a(), t(), r?.();
|
|
8465
8470
|
}, disabled: !n };
|
|
8466
8471
|
}, TE = (e) => {
|
|
8467
|
-
const { refetch: t, isFetched: n } =
|
|
8472
|
+
const { refetch: t, isFetched: n } = mn();
|
|
8468
8473
|
return Rl({
|
|
8469
8474
|
triggerType: "deposit",
|
|
8470
8475
|
refetch: t,
|
|
@@ -8472,7 +8477,7 @@ const dC = (e) => {
|
|
|
8472
8477
|
onClose: e
|
|
8473
8478
|
});
|
|
8474
8479
|
}, $l = ({ handleClick: e, disabled: t }) => {
|
|
8475
|
-
const n = x(), { ActionButton: r = K } =
|
|
8480
|
+
const n = x(), { ActionButton: r = K } = W();
|
|
8476
8481
|
return /* @__PURE__ */ i(r, { onClick: e, disabled: t, highlighted: !0, children: n.tryAgain });
|
|
8477
8482
|
}, AE = ({ onClose: e }) => {
|
|
8478
8483
|
const { handleClick: t, disabled: n } = TE(e);
|
|
@@ -8487,7 +8492,7 @@ const dC = (e) => {
|
|
|
8487
8492
|
error: e,
|
|
8488
8493
|
onCancel: t
|
|
8489
8494
|
}) => {
|
|
8490
|
-
const n = x(), { ActionButton: r = K } =
|
|
8495
|
+
const n = x(), { ActionButton: r = K } = W();
|
|
8491
8496
|
return /* @__PURE__ */ w(X.Overlay, { className: "dtw-justify-between dtw-gap-y-4", children: [
|
|
8492
8497
|
/* @__PURE__ */ i(
|
|
8493
8498
|
r,
|
|
@@ -8510,7 +8515,7 @@ const dC = (e) => {
|
|
|
8510
8515
|
}, xE = rt.filter(
|
|
8511
8516
|
({ type: e }) => e === "error"
|
|
8512
8517
|
).map(({ name: e }) => e), CE = ({ type: e }) => {
|
|
8513
|
-
const { handleReject: t, meta: n } =
|
|
8518
|
+
const { handleReject: t, meta: n } = pe({ type: e }), { isCompleteWithdrawStep: r } = Ft(), o = st(), a = r && !o, s = n?.error ?? "", l = s === Ns || s === _s || s.includes(Yd), c = gs({
|
|
8514
8519
|
errorMessage: n?.error,
|
|
8515
8520
|
abiErrors: xE
|
|
8516
8521
|
});
|
|
@@ -8539,7 +8544,7 @@ const dC = (e) => {
|
|
|
8539
8544
|
}
|
|
8540
8545
|
);
|
|
8541
8546
|
}, $a = !0, NE = (e) => {
|
|
8542
|
-
const { isWrongNetwork: t } = Nl(), n =
|
|
8547
|
+
const { isWrongNetwork: t } = Nl(), n = Gn()[1], { data: r = [] } = me(), o = Al({ isClaim: $a }), {
|
|
8543
8548
|
disabled: a,
|
|
8544
8549
|
label: s,
|
|
8545
8550
|
handleTrade: l
|
|
@@ -8560,7 +8565,7 @@ const dC = (e) => {
|
|
|
8560
8565
|
className: t,
|
|
8561
8566
|
onClick: n
|
|
8562
8567
|
}) => {
|
|
8563
|
-
const { ActionButton: r = K } =
|
|
8568
|
+
const { ActionButton: r = K } = W(), { handleTrade: o, disabled: a, label: s, isWrongNetwork: l, isLoading: c } = NE(n);
|
|
8564
8569
|
return l ? null : /* @__PURE__ */ i(
|
|
8565
8570
|
r,
|
|
8566
8571
|
{
|
|
@@ -8575,7 +8580,7 @@ const dC = (e) => {
|
|
|
8575
8580
|
}, OE = (e) => e.length <= 1 ? e[0] ?? "" : [...e.slice(0, -1), `and ${e[e.length - 1]}`].join(
|
|
8576
8581
|
e.length === 2 ? " " : ", "
|
|
8577
8582
|
), _E = ({ error: e, onCancel: t, isSwapError: n = !1 }) => {
|
|
8578
|
-
const r = x(), { ActionButton: o = K } =
|
|
8583
|
+
const r = x(), { ActionButton: o = K } = W(), [a, s] = U(!1), { data: l = [] } = me(), c = P(() => {
|
|
8579
8584
|
const d = l.map(({ symbol: m }) => m), p = OE(d);
|
|
8580
8585
|
return r.skipSwapAndClaimSymbols.replace("{symbols}", p);
|
|
8581
8586
|
}, [l, r.skipSwapAndClaimSymbols]);
|
|
@@ -8596,7 +8601,7 @@ const dC = (e) => {
|
|
|
8596
8601
|
e.hint && /* @__PURE__ */ i("p", { className: "dtw-text-sm dtw-text-[color:var(--panel-secondary-content-color)]", children: e.hint })
|
|
8597
8602
|
] }),
|
|
8598
8603
|
n && /* @__PURE__ */ i("div", { className: "dtw-py-2 dtw-px-4 dtw-bg-[color:var(--panel-input-bg)] dtw-rounded-full", children: /* @__PURE__ */ i(
|
|
8599
|
-
|
|
8604
|
+
er,
|
|
8600
8605
|
{
|
|
8601
8606
|
label: c,
|
|
8602
8607
|
labelClassName: "!dtw-text-sm",
|
|
@@ -8811,7 +8816,7 @@ const dC = (e) => {
|
|
|
8811
8816
|
t && p.length <= FE && m.length <= Gr && /^\d*(\.\d*)?$/.test(d) && (o(Ba(d)), t(d));
|
|
8812
8817
|
}
|
|
8813
8818
|
};
|
|
8814
|
-
},
|
|
8819
|
+
}, Ln = (e) => {
|
|
8815
8820
|
const { disabled: t, placeholder: n, percentage: r, suffix: o } = e, { inputRef: a, autoFocus: s, value: l, onContainerClick: c, onInputChange: d } = WE(e);
|
|
8816
8821
|
return /* @__PURE__ */ i(
|
|
8817
8822
|
"div",
|
|
@@ -8839,7 +8844,7 @@ const dC = (e) => {
|
|
|
8839
8844
|
] })
|
|
8840
8845
|
}
|
|
8841
8846
|
);
|
|
8842
|
-
},
|
|
8847
|
+
}, Yt = ({
|
|
8843
8848
|
title: e,
|
|
8844
8849
|
subtitle: t,
|
|
8845
8850
|
defaultEnabled: n,
|
|
@@ -8853,7 +8858,7 @@ const dC = (e) => {
|
|
|
8853
8858
|
/* @__PURE__ */ i("span", { children: e }),
|
|
8854
8859
|
/* @__PURE__ */ i("span", { className: "dtw-text-[length:var(--limit-order-font-size-sm)] dtw-text-[color:var(--limit-order-secondary-content-color)]", children: t })
|
|
8855
8860
|
] }),
|
|
8856
|
-
/* @__PURE__ */ i(
|
|
8861
|
+
/* @__PURE__ */ i(er, { onChange: (c) => {
|
|
8857
8862
|
s(c), c || r();
|
|
8858
8863
|
}, defaultEnabled: a })
|
|
8859
8864
|
] }),
|
|
@@ -8920,10 +8925,10 @@ const Hl = (e) => ({
|
|
|
8920
8925
|
minAmountInUsd: e.minAmountInUsd
|
|
8921
8926
|
}), Vl = ge(
|
|
8922
8927
|
Hl({
|
|
8923
|
-
vaultAddress:
|
|
8928
|
+
vaultAddress: O,
|
|
8924
8929
|
vaultChainId: 0,
|
|
8925
8930
|
pricingAsset: {
|
|
8926
|
-
address:
|
|
8931
|
+
address: O,
|
|
8927
8932
|
symbol: ""
|
|
8928
8933
|
},
|
|
8929
8934
|
minAmountInUsd: bo,
|
|
@@ -8942,7 +8947,7 @@ const Hl = (e) => ({
|
|
|
8942
8947
|
setPendingTransaction: Ge,
|
|
8943
8948
|
onLog: Ge
|
|
8944
8949
|
}), ql = ({ children: e, initialState: t, actions: n }) => {
|
|
8945
|
-
const [r, o] =
|
|
8950
|
+
const [r, o] = Rn(
|
|
8946
8951
|
UE,
|
|
8947
8952
|
Hl(t)
|
|
8948
8953
|
), a = b((h) => {
|
|
@@ -8991,7 +8996,7 @@ const Hl = (e) => ({
|
|
|
8991
8996
|
]
|
|
8992
8997
|
);
|
|
8993
8998
|
return /* @__PURE__ */ i(jl.Provider, { value: u, children: /* @__PURE__ */ i(Vl.Provider, { value: r, children: e }) });
|
|
8994
|
-
}, Se = () => fe(Vl), Wt = () => fe(jl),
|
|
8999
|
+
}, Se = () => fe(Vl), Wt = () => fe(jl), pr = () => {
|
|
8995
9000
|
const { account: e } = B(), {
|
|
8996
9001
|
vaultAddress: t,
|
|
8997
9002
|
vaultChainId: n,
|
|
@@ -9049,7 +9054,7 @@ const Hl = (e) => ({
|
|
|
9049
9054
|
address: o.address,
|
|
9050
9055
|
chainId: a,
|
|
9051
9056
|
refetchInterval: Le
|
|
9052
|
-
}), p = Number(d) < By ? My : Fy, { formatted: m, symbol: u } =
|
|
9057
|
+
}), p = Number(d) < By ? My : Fy, { formatted: m, symbol: u } = pr(), h = GE({
|
|
9053
9058
|
price: t,
|
|
9054
9059
|
markPrice: d
|
|
9055
9060
|
}), g = HE({
|
|
@@ -9072,7 +9077,7 @@ const Hl = (e) => ({
|
|
|
9072
9077
|
onDisableUpperLimitPrice: f,
|
|
9073
9078
|
onDisableLowerLimitPrice: v,
|
|
9074
9079
|
onDisableSellPercentage: y,
|
|
9075
|
-
pricingAssetPrice: d === "0" ? null :
|
|
9080
|
+
pricingAssetPrice: d === "0" ? null : ae({
|
|
9076
9081
|
value: d,
|
|
9077
9082
|
maximumFractionDigits: p
|
|
9078
9083
|
}),
|
|
@@ -9111,14 +9116,14 @@ const Hl = (e) => ({
|
|
|
9111
9116
|
}
|
|
9112
9117
|
),
|
|
9113
9118
|
/* @__PURE__ */ i(
|
|
9114
|
-
|
|
9119
|
+
Yt,
|
|
9115
9120
|
{
|
|
9116
9121
|
title: e.upperLimitLabel,
|
|
9117
9122
|
subtitle: e.upperLimitSubtitle,
|
|
9118
9123
|
defaultEnabled: !0,
|
|
9119
9124
|
onDisable: a,
|
|
9120
9125
|
children: /* @__PURE__ */ i(
|
|
9121
|
-
|
|
9126
|
+
Ln,
|
|
9122
9127
|
{
|
|
9123
9128
|
inputValue: t,
|
|
9124
9129
|
onInputChange: r,
|
|
@@ -9130,14 +9135,14 @@ const Hl = (e) => ({
|
|
|
9130
9135
|
}
|
|
9131
9136
|
),
|
|
9132
9137
|
/* @__PURE__ */ i(
|
|
9133
|
-
|
|
9138
|
+
Yt,
|
|
9134
9139
|
{
|
|
9135
9140
|
title: e.lowerLimitLabel,
|
|
9136
9141
|
subtitle: e.lowerLimitSubtitle,
|
|
9137
9142
|
defaultEnabled: !!n,
|
|
9138
9143
|
onDisable: s,
|
|
9139
9144
|
children: /* @__PURE__ */ i(
|
|
9140
|
-
|
|
9145
|
+
Ln,
|
|
9141
9146
|
{
|
|
9142
9147
|
inputValue: n,
|
|
9143
9148
|
onInputChange: o,
|
|
@@ -9149,7 +9154,7 @@ const Hl = (e) => ({
|
|
|
9149
9154
|
}
|
|
9150
9155
|
),
|
|
9151
9156
|
/* @__PURE__ */ i(
|
|
9152
|
-
|
|
9157
|
+
Yt,
|
|
9153
9158
|
{
|
|
9154
9159
|
title: e.partialSellLabel,
|
|
9155
9160
|
subtitle: e.partialSellSubtitle,
|
|
@@ -9172,12 +9177,12 @@ const Hl = (e) => ({
|
|
|
9172
9177
|
)
|
|
9173
9178
|
] }) });
|
|
9174
9179
|
}, KE = () => {
|
|
9175
|
-
const { account: e =
|
|
9180
|
+
const { account: e = O } = B(), { vaultAddress: t, vaultChainId: n } = Se(), r = Q("limitOrder", n), o = pr(), { data: a } = an({
|
|
9176
9181
|
tokenAddress: t,
|
|
9177
9182
|
ownerAddress: e,
|
|
9178
9183
|
spenderAddress: r,
|
|
9179
9184
|
chainId: n,
|
|
9180
|
-
skip:
|
|
9185
|
+
skip: F(r)
|
|
9181
9186
|
});
|
|
9182
9187
|
return a ? new D(o.raw).lte(a.toString()) : !1;
|
|
9183
9188
|
}, YE = () => {
|
|
@@ -9191,7 +9196,7 @@ const Hl = (e) => ({
|
|
|
9191
9196
|
});
|
|
9192
9197
|
return {
|
|
9193
9198
|
approveLimitOrder: async () => {
|
|
9194
|
-
|
|
9199
|
+
F(a) || (o(!0), await s(a, _e));
|
|
9195
9200
|
},
|
|
9196
9201
|
isApproving: r
|
|
9197
9202
|
};
|
|
@@ -9276,7 +9281,7 @@ const Hl = (e) => ({
|
|
|
9276
9281
|
r,
|
|
9277
9282
|
o,
|
|
9278
9283
|
a
|
|
9279
|
-
]) =>
|
|
9284
|
+
]) => F(o) ? null : {
|
|
9280
9285
|
takeProfitPrice: we(n, V),
|
|
9281
9286
|
stopLossPrice: we(t, V),
|
|
9282
9287
|
takeProfitPriceD18: n,
|
|
@@ -9290,8 +9295,8 @@ const Hl = (e) => ({
|
|
|
9290
9295
|
if (!t)
|
|
9291
9296
|
return !1;
|
|
9292
9297
|
const [, n, r, , o] = t;
|
|
9293
|
-
return !
|
|
9294
|
-
},
|
|
9298
|
+
return !F(o) && n === BigInt(0) && r === _e ? Le : !1;
|
|
9299
|
+
}, hn = ({
|
|
9295
9300
|
chainId: e,
|
|
9296
9301
|
userAddress: t,
|
|
9297
9302
|
vaultAddress: n
|
|
@@ -9304,7 +9309,7 @@ const Hl = (e) => ({
|
|
|
9304
9309
|
functionName: vo,
|
|
9305
9310
|
args: [zE({ userAddress: t, vaultAddress: n })],
|
|
9306
9311
|
query: {
|
|
9307
|
-
enabled: !
|
|
9312
|
+
enabled: !F(r) && !F(t) && !F(n),
|
|
9308
9313
|
select: QE,
|
|
9309
9314
|
refetchInterval: XE
|
|
9310
9315
|
}
|
|
@@ -9312,12 +9317,12 @@ const Hl = (e) => ({
|
|
|
9312
9317
|
}, ZE = ks.filter(
|
|
9313
9318
|
({ type: e }) => e === "error"
|
|
9314
9319
|
).map(({ name: e }) => e), JE = "create", Ql = () => {
|
|
9315
|
-
const { account: e =
|
|
9320
|
+
const { account: e = O } = B(), {
|
|
9316
9321
|
vaultAddress: t,
|
|
9317
9322
|
vaultChainId: n,
|
|
9318
9323
|
form: { lowerLimitPrice: r, upperLimitPrice: o },
|
|
9319
9324
|
pricingAsset: a
|
|
9320
|
-
} = Se(), s =
|
|
9325
|
+
} = Se(), s = pr(), { data: l } = hn({
|
|
9321
9326
|
userAddress: e,
|
|
9322
9327
|
vaultAddress: t,
|
|
9323
9328
|
chainId: n
|
|
@@ -9357,7 +9362,7 @@ const Hl = (e) => ({
|
|
|
9357
9362
|
error: g ?? null
|
|
9358
9363
|
};
|
|
9359
9364
|
}, eI = () => {
|
|
9360
|
-
const e = Fe(), { vaultAddress: t, vaultChainId: n, minAmountInUsd: r } = Se(), o =
|
|
9365
|
+
const e = Fe(), { vaultAddress: t, vaultChainId: n, minAmountInUsd: r } = Se(), o = pr(), a = Te({
|
|
9361
9366
|
address: t,
|
|
9362
9367
|
chainId: n
|
|
9363
9368
|
}), { createLimitOrder: s, isModifyTransaction: l, error: c } = Ql(), p = new He(o.formatted).multipliedBy(
|
|
@@ -9384,7 +9389,7 @@ const Hl = (e) => ({
|
|
|
9384
9389
|
}),
|
|
9385
9390
|
isLoading: h,
|
|
9386
9391
|
isAmountSufficient: p,
|
|
9387
|
-
minAmount:
|
|
9392
|
+
minAmount: ae({
|
|
9388
9393
|
value: r.toString(),
|
|
9389
9394
|
maximumFractionDigits: 0,
|
|
9390
9395
|
minimumFractionDigits: 0
|
|
@@ -9418,7 +9423,7 @@ const Hl = (e) => ({
|
|
|
9418
9423
|
)
|
|
9419
9424
|
] });
|
|
9420
9425
|
}, nI = "remove", rI = () => {
|
|
9421
|
-
const { account: e =
|
|
9426
|
+
const { account: e = O } = B(), { vaultAddress: t, vaultChainId: n, pendingTransaction: r } = Se(), { data: o } = hn({
|
|
9422
9427
|
userAddress: e,
|
|
9423
9428
|
vaultAddress: t,
|
|
9424
9429
|
chainId: n
|
|
@@ -9443,9 +9448,6 @@ const Hl = (e) => ({
|
|
|
9443
9448
|
}, Ma = (e) => {
|
|
9444
9449
|
const t = e?.trim();
|
|
9445
9450
|
return t ? !isNaN(Number(t)) : !1;
|
|
9446
|
-
}, Or = (e) => {
|
|
9447
|
-
const t = e?.trim();
|
|
9448
|
-
return t ? !isNaN(Number(t)) && Number(t) > 0 : !1;
|
|
9449
9451
|
}, aI = () => {
|
|
9450
9452
|
const {
|
|
9451
9453
|
form: { lowerLimitPrice: e, upperLimitPrice: t }
|
|
@@ -9527,7 +9529,7 @@ const Hl = (e) => ({
|
|
|
9527
9529
|
vaultAddress: e,
|
|
9528
9530
|
vaultChainId: t
|
|
9529
9531
|
}) => {
|
|
9530
|
-
const { account: n =
|
|
9532
|
+
const { account: n = O } = B(), { isFetched: r, data: o } = hn({
|
|
9531
9533
|
vaultAddress: e,
|
|
9532
9534
|
chainId: t,
|
|
9533
9535
|
userAddress: n
|
|
@@ -9538,7 +9540,7 @@ const Hl = (e) => ({
|
|
|
9538
9540
|
Oi,
|
|
9539
9541
|
"allowance"
|
|
9540
9542
|
], cI = () => {
|
|
9541
|
-
const e =
|
|
9543
|
+
const e = rn();
|
|
9542
9544
|
return b(() => {
|
|
9543
9545
|
e.invalidateQueries({
|
|
9544
9546
|
predicate: ({ queryKey: t }) => {
|
|
@@ -9609,7 +9611,7 @@ const Hl = (e) => ({
|
|
|
9609
9611
|
AMBER: {
|
|
9610
9612
|
400: "#AFA58D"
|
|
9611
9613
|
}
|
|
9612
|
-
},
|
|
9614
|
+
}, ur = ({
|
|
9613
9615
|
children: e,
|
|
9614
9616
|
config: t
|
|
9615
9617
|
}) => /* @__PURE__ */ i(
|
|
@@ -9766,7 +9768,7 @@ const Hl = (e) => ({
|
|
|
9766
9768
|
},
|
|
9767
9769
|
children: e
|
|
9768
9770
|
}
|
|
9769
|
-
), dI = ({ themeConfig: e }) => (Jl(), /* @__PURE__ */ i(
|
|
9771
|
+
), dI = ({ themeConfig: e }) => (Jl(), /* @__PURE__ */ i(ur, { config: e, children: /* @__PURE__ */ i(Xl, { hideDeleteButton: !0 }) })), pI = ({
|
|
9770
9772
|
vaultChainId: e,
|
|
9771
9773
|
vaultAddress: t,
|
|
9772
9774
|
pricingAsset: n,
|
|
@@ -9797,7 +9799,7 @@ const Hl = (e) => ({
|
|
|
9797
9799
|
);
|
|
9798
9800
|
return l ? /* @__PURE__ */ i(Ul, { config: r, children: /* @__PURE__ */ i(ql, { initialState: p, actions: a, children: /* @__PURE__ */ i(dI, { themeConfig: s }) }) }) : null;
|
|
9799
9801
|
}, uI = ({ type: e }) => {
|
|
9800
|
-
const { minLimitOrderValue: t } = Z(), { address: n, chainId: r, pricingAsset: o, symbol: a } = A(), { handleReject: s } =
|
|
9802
|
+
const { minLimitOrderValue: t } = Z(), { address: n, chainId: r, pricingAsset: o, symbol: a } = A(), { handleReject: s } = pe({ type: e }), l = te()[1], c = ie()[1], d = Xi(), p = P(
|
|
9801
9803
|
() => ({
|
|
9802
9804
|
onTransactionSettled: (u) => {
|
|
9803
9805
|
u && (s(), c({
|
|
@@ -9810,7 +9812,7 @@ const Hl = (e) => ({
|
|
|
9810
9812
|
isOpen: !0,
|
|
9811
9813
|
action: "create_limit_sell_order",
|
|
9812
9814
|
status: "Mining",
|
|
9813
|
-
link: u ?
|
|
9815
|
+
link: u ? ir(u, "transaction", r) : void 0,
|
|
9814
9816
|
sendTokens: null,
|
|
9815
9817
|
receiveTokens: null
|
|
9816
9818
|
}));
|
|
@@ -9935,7 +9937,7 @@ const tc = (e) => {
|
|
|
9935
9937
|
pricingAsset: e.pricingAsset,
|
|
9936
9938
|
depositTokens: e.depositTokens,
|
|
9937
9939
|
inputToken: t ?? {
|
|
9938
|
-
address:
|
|
9940
|
+
address: O,
|
|
9939
9941
|
symbol: "",
|
|
9940
9942
|
decimals: V
|
|
9941
9943
|
},
|
|
@@ -9944,11 +9946,11 @@ const tc = (e) => {
|
|
|
9944
9946
|
};
|
|
9945
9947
|
}, nc = ge(
|
|
9946
9948
|
tc({
|
|
9947
|
-
vaultAddress:
|
|
9949
|
+
vaultAddress: O,
|
|
9948
9950
|
vaultChainId: 0,
|
|
9949
|
-
limitBuyManagerAddress:
|
|
9951
|
+
limitBuyManagerAddress: O,
|
|
9950
9952
|
pricingAsset: {
|
|
9951
|
-
address:
|
|
9953
|
+
address: O,
|
|
9952
9954
|
symbol: ""
|
|
9953
9955
|
},
|
|
9954
9956
|
depositTokens: []
|
|
@@ -9966,7 +9968,7 @@ const tc = (e) => {
|
|
|
9966
9968
|
onSubmitOrder: hI,
|
|
9967
9969
|
onLog: Ie
|
|
9968
9970
|
}), oc = ({ children: e, initialState: t, actions: n }) => {
|
|
9969
|
-
const [r, o] =
|
|
9971
|
+
const [r, o] = Rn(
|
|
9970
9972
|
wI,
|
|
9971
9973
|
tc(t)
|
|
9972
9974
|
), a = b((f) => {
|
|
@@ -10020,7 +10022,7 @@ const tc = (e) => {
|
|
|
10020
10022
|
]
|
|
10021
10023
|
);
|
|
10022
10024
|
return /* @__PURE__ */ i(rc.Provider, { value: g, children: /* @__PURE__ */ i(nc.Provider, { value: r, children: e }) });
|
|
10023
|
-
}, We = () => fe(nc),
|
|
10025
|
+
}, We = () => fe(nc), gn = () => fe(rc), ac = {
|
|
10024
10026
|
switchNetwork: "Switch Network",
|
|
10025
10027
|
limitBuyTitle: "Order details",
|
|
10026
10028
|
upperLimitLabel: "Upper limit",
|
|
@@ -10061,7 +10063,7 @@ const tc = (e) => {
|
|
|
10061
10063
|
form: { upperLimitPrice: t, lowerLimitPrice: n },
|
|
10062
10064
|
pricingAsset: r,
|
|
10063
10065
|
vaultChainId: o
|
|
10064
|
-
} = We(), { setUpperLimitPrice: a, setLowerLimitPrice: s } =
|
|
10066
|
+
} = We(), { setUpperLimitPrice: a, setLowerLimitPrice: s } = gn(), l = he({
|
|
10065
10067
|
address: r.address,
|
|
10066
10068
|
chainId: o,
|
|
10067
10069
|
refetchInterval: Le
|
|
@@ -10077,7 +10079,7 @@ const tc = (e) => {
|
|
|
10077
10079
|
setLowerLimitPrice: s,
|
|
10078
10080
|
onDisableUpperLimitPrice: d,
|
|
10079
10081
|
onDisableLowerLimitPrice: p,
|
|
10080
|
-
pricingAssetPrice: l === "0" ? null :
|
|
10082
|
+
pricingAssetPrice: l === "0" ? null : ae({
|
|
10081
10083
|
value: l,
|
|
10082
10084
|
maximumFractionDigits: c
|
|
10083
10085
|
}),
|
|
@@ -10093,7 +10095,7 @@ const tc = (e) => {
|
|
|
10093
10095
|
form: { inputAmount: t },
|
|
10094
10096
|
inputToken: n,
|
|
10095
10097
|
depositTokens: r
|
|
10096
|
-
} = We(), { setInputAmount: o, setInputToken: a } =
|
|
10098
|
+
} = We(), { setInputAmount: o, setInputToken: a } = gn(), s = b(
|
|
10097
10099
|
(d) => {
|
|
10098
10100
|
o(d.replace(/[^\d.]/g, "").replace(/(\..*)\./g, "$1"));
|
|
10099
10101
|
},
|
|
@@ -10240,7 +10242,7 @@ const tc = (e) => {
|
|
|
10240
10242
|
), Fa = (e) => e ? (Number(e) / lc).toString() : "", TI = () => {
|
|
10241
10243
|
const e = mt(), {
|
|
10242
10244
|
form: { slippageBps: t }
|
|
10243
|
-
} = We(), { setSlippageBps: n } =
|
|
10245
|
+
} = We(), { setSlippageBps: n } = gn(), [r, o] = U(() => Fa(t));
|
|
10244
10246
|
E(() => {
|
|
10245
10247
|
const s = Fa(t);
|
|
10246
10248
|
o(
|
|
@@ -10306,14 +10308,14 @@ const tc = (e) => {
|
|
|
10306
10308
|
}
|
|
10307
10309
|
),
|
|
10308
10310
|
/* @__PURE__ */ i(
|
|
10309
|
-
|
|
10311
|
+
Yt,
|
|
10310
10312
|
{
|
|
10311
10313
|
title: d,
|
|
10312
10314
|
subtitle: p,
|
|
10313
10315
|
defaultEnabled: !!e,
|
|
10314
10316
|
onDisable: o,
|
|
10315
10317
|
children: /* @__PURE__ */ i(
|
|
10316
|
-
|
|
10318
|
+
Ln,
|
|
10317
10319
|
{
|
|
10318
10320
|
inputValue: e,
|
|
10319
10321
|
onInputChange: n,
|
|
@@ -10324,14 +10326,14 @@ const tc = (e) => {
|
|
|
10324
10326
|
}
|
|
10325
10327
|
),
|
|
10326
10328
|
/* @__PURE__ */ i(
|
|
10327
|
-
|
|
10329
|
+
Yt,
|
|
10328
10330
|
{
|
|
10329
10331
|
title: m,
|
|
10330
10332
|
subtitle: u,
|
|
10331
10333
|
defaultEnabled: !0,
|
|
10332
10334
|
onDisable: a,
|
|
10333
10335
|
children: /* @__PURE__ */ i(
|
|
10334
|
-
|
|
10336
|
+
Ln,
|
|
10335
10337
|
{
|
|
10336
10338
|
inputValue: t,
|
|
10337
10339
|
onInputChange: r,
|
|
@@ -10345,16 +10347,16 @@ const tc = (e) => {
|
|
|
10345
10347
|
/* @__PURE__ */ i(AI, {})
|
|
10346
10348
|
] }) });
|
|
10347
10349
|
}, xI = () => {
|
|
10348
|
-
const { account: e =
|
|
10350
|
+
const { account: e = O } = B(), {
|
|
10349
10351
|
inputToken: t,
|
|
10350
10352
|
vaultChainId: n,
|
|
10351
10353
|
form: { inputAmount: r }
|
|
10352
|
-
} = We(), { data: o } =
|
|
10354
|
+
} = We(), { data: o } = an({
|
|
10353
10355
|
tokenAddress: t.address,
|
|
10354
10356
|
ownerAddress: e,
|
|
10355
10357
|
spenderAddress: No,
|
|
10356
10358
|
chainId: n,
|
|
10357
|
-
skip:
|
|
10359
|
+
skip: F(t.address)
|
|
10358
10360
|
}), a = r ? tt(r, t.decimals) : "0";
|
|
10359
10361
|
return o ? new D(a).lte(o.toString()) : !1;
|
|
10360
10362
|
}, CI = () => {
|
|
@@ -10368,7 +10370,7 @@ const tc = (e) => {
|
|
|
10368
10370
|
});
|
|
10369
10371
|
return {
|
|
10370
10372
|
approvePermit2: async () => {
|
|
10371
|
-
|
|
10373
|
+
F(e.address) || (n(!0), await a(No, _e));
|
|
10372
10374
|
},
|
|
10373
10375
|
isApproving: t,
|
|
10374
10376
|
txHash: r
|
|
@@ -10379,7 +10381,7 @@ const tc = (e) => {
|
|
|
10379
10381
|
"0x" + Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("")
|
|
10380
10382
|
);
|
|
10381
10383
|
}, II = (e) => Math.floor(Date.now() / 1e3 + Number(e) * 24 * 60 * 60), NI = () => {
|
|
10382
|
-
const { data: e } = Xr(), { account: t } = B(), n = We(), { onSubmitOrder: r, onOrderCreated: o, onOrderError: a, setIsSubmitting: s } =
|
|
10384
|
+
const { data: e } = Xr(), { account: t } = B(), n = We(), { onSubmitOrder: r, onOrderCreated: o, onOrderError: a, setIsSubmitting: s } = gn();
|
|
10383
10385
|
return { signAndSubmit: b(async () => {
|
|
10384
10386
|
if (!e || !t) return;
|
|
10385
10387
|
const {
|
|
@@ -10395,12 +10397,12 @@ const tc = (e) => {
|
|
|
10395
10397
|
slippageBps: v,
|
|
10396
10398
|
deadlineDays: y
|
|
10397
10399
|
}
|
|
10398
|
-
} = n, T = BigInt(tt(f, u.decimals)), S = !!g,
|
|
10400
|
+
} = n, T = BigInt(tt(f, u.decimals)), S = !!g, _ = BigInt(!!h ? tt(h, Zt) : 0), M = S ? BigInt(tt(g, Zt)) : _e, N = EI(), H = II(y), re = {
|
|
10399
10401
|
owner: t,
|
|
10400
10402
|
targetVault: c,
|
|
10401
10403
|
pricingAsset: m.address,
|
|
10402
|
-
minTriggerPriceD18:
|
|
10403
|
-
maxTriggerPriceD18:
|
|
10404
|
+
minTriggerPriceD18: _,
|
|
10405
|
+
maxTriggerPriceD18: M,
|
|
10404
10406
|
slippageToleranceBps: Number(v)
|
|
10405
10407
|
}, J = {
|
|
10406
10408
|
permitted: {
|
|
@@ -10409,36 +10411,36 @@ const tc = (e) => {
|
|
|
10409
10411
|
},
|
|
10410
10412
|
spender: p,
|
|
10411
10413
|
nonce: N,
|
|
10412
|
-
deadline: BigInt(
|
|
10413
|
-
witness:
|
|
10414
|
+
deadline: BigInt(H),
|
|
10415
|
+
witness: re
|
|
10414
10416
|
};
|
|
10415
10417
|
s(!0);
|
|
10416
10418
|
try {
|
|
10417
|
-
const
|
|
10419
|
+
const ce = {
|
|
10418
10420
|
name: "Permit2",
|
|
10419
10421
|
chainId: d,
|
|
10420
10422
|
verifyingContract: No
|
|
10421
10423
|
}, xe = await e.signTypedData({
|
|
10422
10424
|
account: t,
|
|
10423
|
-
domain:
|
|
10425
|
+
domain: ce,
|
|
10424
10426
|
types: UA,
|
|
10425
10427
|
primaryType: "PermitWitnessTransferFrom",
|
|
10426
10428
|
message: J
|
|
10427
10429
|
}), Xe = {
|
|
10428
|
-
order:
|
|
10430
|
+
order: re,
|
|
10429
10431
|
permit: {
|
|
10430
10432
|
token: u.address,
|
|
10431
10433
|
amount: T.toString(),
|
|
10432
10434
|
nonce: N.toString(),
|
|
10433
|
-
deadline:
|
|
10435
|
+
deadline: H
|
|
10434
10436
|
},
|
|
10435
10437
|
owner: t,
|
|
10436
10438
|
signature: xe,
|
|
10437
10439
|
chainId: d
|
|
10438
10440
|
};
|
|
10439
10441
|
await r(Xe), o?.();
|
|
10440
|
-
} catch (
|
|
10441
|
-
a?.(
|
|
10442
|
+
} catch (ce) {
|
|
10443
|
+
a?.(ce instanceof Error ? ce : new Error(String(ce)));
|
|
10442
10444
|
} finally {
|
|
10443
10445
|
s(!1);
|
|
10444
10446
|
}
|
|
@@ -10503,7 +10505,7 @@ const tc = (e) => {
|
|
|
10503
10505
|
}, OI = () => {
|
|
10504
10506
|
const e = mt(), {
|
|
10505
10507
|
form: { upperLimitPrice: t, lowerLimitPrice: n, inputAmount: r, slippageBps: o }
|
|
10506
|
-
} = We(), { approveAndSign: a, isLoading: s, flowState: l, needsApproval: c } = cc(), d =
|
|
10508
|
+
} = We(), { approveAndSign: a, isLoading: s, flowState: l, needsApproval: c } = cc(), d = jt(t) || jt(n), p = jt(r), m = Number(o), u = !isNaN(m) && m >= $A && m <= BA;
|
|
10507
10509
|
return {
|
|
10508
10510
|
handleClick: a,
|
|
10509
10511
|
disabled: !d || !p || !u,
|
|
@@ -10569,7 +10571,7 @@ const tc = (e) => {
|
|
|
10569
10571
|
const t = mt(), {
|
|
10570
10572
|
vaultChainId: n,
|
|
10571
10573
|
form: { termsAccepted: r }
|
|
10572
|
-
} = We(), { setTermsAccepted: o } =
|
|
10574
|
+
} = We(), { setTermsAccepted: o } = gn(), [a, s] = U(!1), { approveAndSign: l, isLoading: c } = cc(), d = () => {
|
|
10573
10575
|
o(!0), s(!1), l();
|
|
10574
10576
|
};
|
|
10575
10577
|
return a ? /* @__PURE__ */ i(
|
|
@@ -10598,7 +10600,7 @@ const tc = (e) => {
|
|
|
10598
10600
|
] });
|
|
10599
10601
|
}, kI = ({
|
|
10600
10602
|
themeConfig: e
|
|
10601
|
-
}) => /* @__PURE__ */ i(
|
|
10603
|
+
}) => /* @__PURE__ */ i(ur, { config: e, children: /* @__PURE__ */ i(dc, {}) }), LI = ({
|
|
10602
10604
|
vaultChainId: e,
|
|
10603
10605
|
vaultAddress: t,
|
|
10604
10606
|
limitBuyManagerAddress: n,
|
|
@@ -10626,7 +10628,7 @@ const tc = (e) => {
|
|
|
10626
10628
|
);
|
|
10627
10629
|
return /* @__PURE__ */ i(ic, { config: a, children: /* @__PURE__ */ i(oc, { initialState: c, actions: s, children: /* @__PURE__ */ i(kI, { themeConfig: l }) }) });
|
|
10628
10630
|
}, RI = ({ type: e }) => {
|
|
10629
|
-
const { limitBuyConfig: t, limitOrderThemeConfig: n } = Z(), { address: r, chainId: o, pricingAsset: a } = A(), { handleReject: s } =
|
|
10631
|
+
const { limitBuyConfig: t, limitOrderThemeConfig: n } = Z(), { address: r, chainId: o, pricingAsset: a } = A(), { handleReject: s } = pe({ type: e }), l = te()[1], c = Xi(), d = Ji[o], p = wn({ excludeNativeToken: !0 }), m = P(
|
|
10630
10632
|
() => t ? {
|
|
10631
10633
|
...t,
|
|
10632
10634
|
onOrderCreated: () => {
|
|
@@ -10701,7 +10703,7 @@ const tc = (e) => {
|
|
|
10701
10703
|
},
|
|
10702
10704
|
e
|
|
10703
10705
|
),
|
|
10704
|
-
children: /* @__PURE__ */ i(
|
|
10706
|
+
children: /* @__PURE__ */ i(nn, { className: "dtw-opacity-0 dtw-size-[var(--panel-checkbox-icon-size)] dtw-fill-[color:var(--panel-checkbox-color)] group-data-[checked]:dtw-opacity-100 dtw-shrink-0" })
|
|
10705
10707
|
}
|
|
10706
10708
|
),
|
|
10707
10709
|
n && /* @__PURE__ */ i(Za, { className: I("dtw-select-none", r), children: n })
|
|
@@ -10709,16 +10711,16 @@ const tc = (e) => {
|
|
|
10709
10711
|
const [e] = $();
|
|
10710
10712
|
return new D(e.value || "0").shiftedBy(e.decimals);
|
|
10711
10713
|
}, MI = () => {
|
|
10712
|
-
const { account: e =
|
|
10714
|
+
const { account: e = O } = B(), { address: t, chainId: n } = A(), r = Q("limitOrder", n), o = pc(), { data: a } = an({
|
|
10713
10715
|
tokenAddress: t,
|
|
10714
10716
|
ownerAddress: e,
|
|
10715
10717
|
spenderAddress: r,
|
|
10716
10718
|
chainId: n,
|
|
10717
|
-
skip:
|
|
10719
|
+
skip: F(r)
|
|
10718
10720
|
});
|
|
10719
10721
|
return a ? o.lte(a.toString()) : !1;
|
|
10720
10722
|
}, Wa = "approve", FI = () => {
|
|
10721
|
-
const { address: e, chainId: t, symbol: n } = A(), [r, o] = U(!1), a = Q("limitOrder", t), s =
|
|
10723
|
+
const { address: e, chainId: t, symbol: n } = A(), [r, o] = U(!1), a = Q("limitOrder", t), s = ie()[1], l = Qe({ action: Wa }), { send: c } = ye({
|
|
10722
10724
|
contractId: "erc20",
|
|
10723
10725
|
dynamicContractAddress: e,
|
|
10724
10726
|
functionName: "approve",
|
|
@@ -10728,7 +10730,7 @@ const tc = (e) => {
|
|
|
10728
10730
|
});
|
|
10729
10731
|
return {
|
|
10730
10732
|
approveLimitOrder: async () => {
|
|
10731
|
-
|
|
10733
|
+
F(a) || (s({
|
|
10732
10734
|
type: "add",
|
|
10733
10735
|
action: Wa,
|
|
10734
10736
|
symbol: n,
|
|
@@ -10747,18 +10749,18 @@ const tc = (e) => {
|
|
|
10747
10749
|
}, UI = ({
|
|
10748
10750
|
children: e
|
|
10749
10751
|
}) => {
|
|
10750
|
-
const t = x(), { ActionButton: n = K } =
|
|
10752
|
+
const t = x(), { ActionButton: n = K } = W(), { isApproved: r, approveLimitOrder: o, isApprovePending: a } = WI();
|
|
10751
10753
|
return r ? e : /* @__PURE__ */ i(n, { onClick: o, loading: a, children: t.approve });
|
|
10752
10754
|
}, uc = () => {
|
|
10753
10755
|
const { chainId: e, pricingAsset: t } = A();
|
|
10754
10756
|
return t ?? Xd[e];
|
|
10755
10757
|
}, Ua = "limit_order_withdraw", zI = (e) => {
|
|
10756
|
-
const { account: t =
|
|
10758
|
+
const { account: t = O } = B(), { address: n, chainId: r, symbol: o } = A(), a = uc(), s = ie()[1], l = Qe({ action: Ua }), c = b(
|
|
10757
10759
|
(...h) => {
|
|
10758
10760
|
l(...h), e();
|
|
10759
10761
|
},
|
|
10760
10762
|
[l, e]
|
|
10761
|
-
), d = pc(), { data: p } =
|
|
10763
|
+
), d = pc(), { data: p } = hn({
|
|
10762
10764
|
userAddress: t,
|
|
10763
10765
|
vaultAddress: n,
|
|
10764
10766
|
chainId: r
|
|
@@ -10797,7 +10799,7 @@ const tc = (e) => {
|
|
|
10797
10799
|
limitOrderHandler: e,
|
|
10798
10800
|
action: t
|
|
10799
10801
|
}) => {
|
|
10800
|
-
const n = x(), { showError: r } = dt(), { account: o } = B(), a = A(), [s] = $(), l = te()[1], c =
|
|
10802
|
+
const n = x(), { showError: r } = dt(), { account: o } = B(), a = A(), [s] = $(), l = te()[1], c = ie()[1], d = ro(), p = t === "delete_limit_order_withdraw", m = async () => {
|
|
10801
10803
|
const u = a.chainId;
|
|
10802
10804
|
l({
|
|
10803
10805
|
isOpen: !0,
|
|
@@ -10847,7 +10849,7 @@ const tc = (e) => {
|
|
|
10847
10849
|
isLoading: t
|
|
10848
10850
|
};
|
|
10849
10851
|
}, jI = ({ disabled: e }) => {
|
|
10850
|
-
const { ActionButton: t = K } =
|
|
10852
|
+
const { ActionButton: t = K } = W(), { label: n, handleLimitOrderWithdraw: r, isLoading: o } = VI();
|
|
10851
10853
|
return /* @__PURE__ */ i(
|
|
10852
10854
|
t,
|
|
10853
10855
|
{
|
|
@@ -10882,7 +10884,7 @@ const tc = (e) => {
|
|
|
10882
10884
|
)
|
|
10883
10885
|
] });
|
|
10884
10886
|
}, YI = ({ type: e }) => {
|
|
10885
|
-
const t = x(), { ActionButton: n = K } =
|
|
10887
|
+
const t = x(), { ActionButton: n = K } = W(), { handleReject: r } = pe({ type: e }), [o, a] = U(!1);
|
|
10886
10888
|
return /* @__PURE__ */ i(X.Overlay, { onClose: r, children: /* @__PURE__ */ w("div", { className: "dtw-flex dtw-flex-col dtw-gap-2 dtw-w-full", children: [
|
|
10887
10889
|
/* @__PURE__ */ w("div", { className: "dtw-px-2 dtw-flex dtw-flex-col dtw-gap-2", children: [
|
|
10888
10890
|
/* @__PURE__ */ i(KI, {}),
|
|
@@ -10903,7 +10905,7 @@ const tc = (e) => {
|
|
|
10903
10905
|
isActive: e,
|
|
10904
10906
|
onError: t
|
|
10905
10907
|
}) => {
|
|
10906
|
-
const n = x(), r =
|
|
10908
|
+
const n = x(), r = sr(e), { canSpend: o, approve: a, isCanSpendFetching: s } = lr({
|
|
10907
10909
|
onErrorCallback: t
|
|
10908
10910
|
}), l = ue(!1);
|
|
10909
10911
|
return E(() => {
|
|
@@ -11009,7 +11011,7 @@ const tc = (e) => {
|
|
|
11009
11011
|
return () => clearTimeout(r);
|
|
11010
11012
|
}, [e]), t;
|
|
11011
11013
|
}, nN = () => {
|
|
11012
|
-
const { address: e, chainId: t } = A(), { hasAssets: n, isReady: r } =
|
|
11014
|
+
const { address: e, chainId: t } = A(), { hasAssets: n, isReady: r } = cn({ address: e, chainId: t }), { hasAssets: o, isReady: a } = Ye({ address: e, chainId: t }), s = Jn(), l = so(), [c] = ie(), { isOndoPriceFresh: d, recordOndoPriceUpdate: p } = hl(), m = r && a, u = n && o && s, h = u, [g, f] = U(null), { needsPriceUpdate: v } = TA({
|
|
11013
11015
|
address: e,
|
|
11014
11016
|
chainId: t,
|
|
11015
11017
|
enabled: u && g === null
|
|
@@ -11040,18 +11042,18 @@ const tc = (e) => {
|
|
|
11040
11042
|
query: {
|
|
11041
11043
|
enabled: y && !!T
|
|
11042
11044
|
}
|
|
11043
|
-
}), k = !!S, [
|
|
11045
|
+
}), k = !!S, [_, M] = U(!1);
|
|
11044
11046
|
E(() => {
|
|
11045
|
-
!k ||
|
|
11047
|
+
!k || _ || (M(!0), p(T));
|
|
11046
11048
|
}, [
|
|
11047
11049
|
k,
|
|
11048
|
-
|
|
11050
|
+
_,
|
|
11049
11051
|
p,
|
|
11050
11052
|
T
|
|
11051
11053
|
]);
|
|
11052
|
-
const [N,
|
|
11054
|
+
const [N, H] = U(!1);
|
|
11053
11055
|
return E(() => {
|
|
11054
|
-
if (!y || !
|
|
11056
|
+
if (!y || !_)
|
|
11055
11057
|
return;
|
|
11056
11058
|
const J = jr({
|
|
11057
11059
|
chainId: t,
|
|
@@ -11059,23 +11061,23 @@ const tc = (e) => {
|
|
|
11059
11061
|
isRabbyWallet: l
|
|
11060
11062
|
});
|
|
11061
11063
|
if (J <= 0) {
|
|
11062
|
-
|
|
11064
|
+
H(!0);
|
|
11063
11065
|
return;
|
|
11064
11066
|
}
|
|
11065
|
-
const
|
|
11066
|
-
return () => clearTimeout(
|
|
11067
|
-
}, [y,
|
|
11067
|
+
const ce = setTimeout(() => H(!0), J);
|
|
11068
|
+
return () => clearTimeout(ce);
|
|
11069
|
+
}, [y, _, t, l]), {
|
|
11068
11070
|
hasOracleUpdateStep: h,
|
|
11069
11071
|
needsOracleUpdate: y,
|
|
11070
11072
|
oracleUpdateDone: !h || g === !1 || y && N,
|
|
11071
11073
|
isVaultDataReady: m
|
|
11072
11074
|
};
|
|
11073
11075
|
}, rN = ({ type: e }) => {
|
|
11074
|
-
const { handleReject: t } =
|
|
11076
|
+
const { handleReject: t } = pe({ type: e }), [n] = Gn(), [{ status: r, action: o }] = te(), { isCompleteWithdrawStep: a } = Ft(), {
|
|
11075
11077
|
isUnrollAndClaimTransaction: s,
|
|
11076
11078
|
isFetching: l,
|
|
11077
11079
|
isFetched: c
|
|
11078
|
-
} = Oo(), { canSpend: d } =
|
|
11080
|
+
} = Oo(), { canSpend: d } = lr({
|
|
11079
11081
|
onErrorCallback: t
|
|
11080
11082
|
}), {
|
|
11081
11083
|
hasOracleUpdateStep: p,
|
|
@@ -11105,7 +11107,7 @@ const tc = (e) => {
|
|
|
11105
11107
|
isActive: e,
|
|
11106
11108
|
onError: t
|
|
11107
11109
|
}) => {
|
|
11108
|
-
const n = x(), r =
|
|
11110
|
+
const n = x(), r = sr(e), o = Al({
|
|
11109
11111
|
onErrorCallback: t
|
|
11110
11112
|
}), { handleTrade: a } = Sl({
|
|
11111
11113
|
withdraw: o,
|
|
@@ -11141,7 +11143,7 @@ const tc = (e) => {
|
|
|
11141
11143
|
isPending: n,
|
|
11142
11144
|
onError: r
|
|
11143
11145
|
}) => {
|
|
11144
|
-
const o =
|
|
11146
|
+
const o = sr(e), { withdraw: a } = CS({
|
|
11145
11147
|
onErrorCallback: r
|
|
11146
11148
|
}), { handleTrade: s } = _o({
|
|
11147
11149
|
trade: a,
|
|
@@ -11183,9 +11185,9 @@ const tc = (e) => {
|
|
|
11183
11185
|
isUpdateRequired: t,
|
|
11184
11186
|
onError: n
|
|
11185
11187
|
}) => {
|
|
11186
|
-
const r = x(), o =
|
|
11188
|
+
const r = x(), o = sr(e), { address: a, chainId: s } = A(), { assets: l } = Ye({ address: a, chainId: s }), { showError: c } = dt(), d = ue("idle"), p = b(
|
|
11187
11189
|
(u) => {
|
|
11188
|
-
d.current !== "failed" && (d.current = "failed", u instanceof
|
|
11190
|
+
d.current !== "failed" && (d.current = "failed", u instanceof Un && c(u.message), n());
|
|
11189
11191
|
},
|
|
11190
11192
|
[n, c]
|
|
11191
11193
|
), m = gl({
|
|
@@ -11307,7 +11309,7 @@ const tc = (e) => {
|
|
|
11307
11309
|
)
|
|
11308
11310
|
] });
|
|
11309
11311
|
}, uN = (e) => {
|
|
11310
|
-
const t = x(), { ActionButton: n = K } =
|
|
11312
|
+
const t = x(), { ActionButton: n = K } = W(), {
|
|
11311
11313
|
isUnrollAndClaimTransaction: r,
|
|
11312
11314
|
activeStepIndex: o,
|
|
11313
11315
|
hasOracleUpdateStep: a,
|
|
@@ -11388,7 +11390,7 @@ const tc = (e) => {
|
|
|
11388
11390
|
const e = x();
|
|
11389
11391
|
return /* @__PURE__ */ w(R, { children: [
|
|
11390
11392
|
/* @__PURE__ */ i(
|
|
11391
|
-
|
|
11393
|
+
Jt,
|
|
11392
11394
|
{
|
|
11393
11395
|
label: e.slippageTolerance,
|
|
11394
11396
|
tooltipText: e.withdrawSlippageWarning,
|
|
@@ -11396,7 +11398,7 @@ const tc = (e) => {
|
|
|
11396
11398
|
}
|
|
11397
11399
|
),
|
|
11398
11400
|
/* @__PURE__ */ i(
|
|
11399
|
-
|
|
11401
|
+
Jt,
|
|
11400
11402
|
{
|
|
11401
11403
|
label: e.tokenAllowance,
|
|
11402
11404
|
tooltipText: e.toggleTokenApprovalAmount,
|
|
@@ -11413,7 +11415,7 @@ const tc = (e) => {
|
|
|
11413
11415
|
({ symbol: a, address: s, rawBalance: l, decimals: c, valueInUsd: d }) => /* @__PURE__ */ w("tr", { children: [
|
|
11414
11416
|
/* @__PURE__ */ w("td", { children: [
|
|
11415
11417
|
/* @__PURE__ */ i(
|
|
11416
|
-
|
|
11418
|
+
pn,
|
|
11417
11419
|
{
|
|
11418
11420
|
symbol: a,
|
|
11419
11421
|
iconSymbols: [a],
|
|
@@ -11421,7 +11423,7 @@ const tc = (e) => {
|
|
|
11421
11423
|
size: "sm"
|
|
11422
11424
|
}
|
|
11423
11425
|
),
|
|
11424
|
-
/* @__PURE__ */ i("p", { className: "dtw-truncate dtw-text-xs dtw-text-[color:var(--panel-secondary-content-color)]", children:
|
|
11426
|
+
/* @__PURE__ */ i("p", { className: "dtw-truncate dtw-text-xs dtw-text-[color:var(--panel-secondary-content-color)]", children: ae({
|
|
11425
11427
|
value: d
|
|
11426
11428
|
}) })
|
|
11427
11429
|
] }),
|
|
@@ -11433,18 +11435,18 @@ const tc = (e) => {
|
|
|
11433
11435
|
[t]
|
|
11434
11436
|
);
|
|
11435
11437
|
return /* @__PURE__ */ w("div", { className: "dtw-text-sm dtw-font-light ", children: [
|
|
11436
|
-
/* @__PURE__ */ i(
|
|
11437
|
-
r.length > 0 && /* @__PURE__ */ i(vl, { children: /* @__PURE__ */ i(
|
|
11438
|
+
/* @__PURE__ */ i(kn, { children: n.map(o) }),
|
|
11439
|
+
r.length > 0 && /* @__PURE__ */ i(vl, { children: /* @__PURE__ */ i(kn, { children: r.map(o) }) })
|
|
11438
11440
|
] });
|
|
11439
11441
|
}, hN = () => {
|
|
11440
|
-
const { chainId: e } = A(), { stablePrecision: t } = Z(), { data: n = [] } = me(), r = gC(), { data: o =
|
|
11442
|
+
const { chainId: e } = A(), { stablePrecision: t } = Z(), { data: n = [] } = me(), r = gC(), { data: o = O } = hC();
|
|
11441
11443
|
return {
|
|
11442
11444
|
assets: n,
|
|
11443
|
-
usdAmount:
|
|
11445
|
+
usdAmount: ae({
|
|
11444
11446
|
value: r,
|
|
11445
11447
|
maximumFractionDigits: t
|
|
11446
11448
|
}),
|
|
11447
|
-
withdrawalVaultLink:
|
|
11449
|
+
withdrawalVaultLink: ir(
|
|
11448
11450
|
o,
|
|
11449
11451
|
"address",
|
|
11450
11452
|
e
|
|
@@ -11483,7 +11485,7 @@ const tc = (e) => {
|
|
|
11483
11485
|
}
|
|
11484
11486
|
};
|
|
11485
11487
|
}, vN = ({ children: e }) => {
|
|
11486
|
-
const { ActionButton: t = K } =
|
|
11488
|
+
const { ActionButton: t = K } = W(), n = x(), {
|
|
11487
11489
|
requiresHighSlippageConfirm: r,
|
|
11488
11490
|
slippageToBeUsed: o,
|
|
11489
11491
|
handleHighSlippageClick: a
|
|
@@ -11493,7 +11495,7 @@ const tc = (e) => {
|
|
|
11493
11495
|
`${Math.abs(o)}`
|
|
11494
11496
|
) }) : e;
|
|
11495
11497
|
}, bN = () => {
|
|
11496
|
-
const { chainId: e } = A(), [t] = z(), n = he({ address: t.address, chainId: e }), r = xl(), o =
|
|
11498
|
+
const { chainId: e } = A(), [t] = z(), n = he({ address: t.address, chainId: e }), r = xl(), o = dn(Math.min(0, r));
|
|
11497
11499
|
return {
|
|
11498
11500
|
receiveToken: {
|
|
11499
11501
|
...t,
|
|
@@ -11505,7 +11507,7 @@ const tc = (e) => {
|
|
|
11505
11507
|
}, yN = () => {
|
|
11506
11508
|
const { receiveToken: e, swapDiff: t, themeType: n } = bN();
|
|
11507
11509
|
return /* @__PURE__ */ i(
|
|
11508
|
-
|
|
11510
|
+
en,
|
|
11509
11511
|
{
|
|
11510
11512
|
assetInput: e.value,
|
|
11511
11513
|
autoFocus: !1,
|
|
@@ -11519,7 +11521,7 @@ const tc = (e) => {
|
|
|
11519
11521
|
}
|
|
11520
11522
|
);
|
|
11521
11523
|
}, TN = () => {
|
|
11522
|
-
const e = x(), { stablePrecision: t } = Z(), [n] = z(), r = Me(), { minExpectedReceiveAmount: o } = Do(), a =
|
|
11524
|
+
const e = x(), { stablePrecision: t } = Z(), [n] = z(), r = Me(), { minExpectedReceiveAmount: o } = Do(), a = dn(r), s = a === Y.DEFAULT ? e.withdrawSlippageWarning : e.highSlippageWarning;
|
|
11523
11525
|
return {
|
|
11524
11526
|
themeType: a,
|
|
11525
11527
|
slippageTooltipText: s,
|
|
@@ -11614,7 +11616,7 @@ const tc = (e) => {
|
|
|
11614
11616
|
openLimitOrderWithdrawOverlay: n
|
|
11615
11617
|
};
|
|
11616
11618
|
}, IN = () => {
|
|
11617
|
-
const { ActionButton: e = K } =
|
|
11619
|
+
const { ActionButton: e = K } = W(), { label: t, openLimitOrderWithdrawOverlay: n } = EN();
|
|
11618
11620
|
return /* @__PURE__ */ i(e, { onClick: n, children: t });
|
|
11619
11621
|
}, Pr = [
|
|
11620
11622
|
{
|
|
@@ -11633,19 +11635,19 @@ const tc = (e) => {
|
|
|
11633
11635
|
], Dr = {
|
|
11634
11636
|
requiresLeveragedCollateralLiquidity: !1,
|
|
11635
11637
|
leveragedCollateralValueFormatted: "$0"
|
|
11636
|
-
}, mc = (e, { precision: t, rate: n }) => D(e).shiftedBy(-t).times(n).shiftedBy(-V).toNumber(),
|
|
11638
|
+
}, mc = (e, { precision: t, rate: n }) => D(e).shiftedBy(-t).times(n).shiftedBy(-V).toNumber(), tn = (e) => mc(e.amount, e), Hr = (e) => e.reduce((t, n) => t + tn(n), 0), Vr = (e, t) => ({
|
|
11637
11639
|
requiresLeveragedCollateralLiquidity: t > e,
|
|
11638
|
-
leveragedCollateralValueFormatted:
|
|
11640
|
+
leveragedCollateralValueFormatted: ae({
|
|
11639
11641
|
value: e
|
|
11640
11642
|
})
|
|
11641
|
-
}), za = ({ tokenAddress: e }) => Td(e), Ga = ({ tokenAddress: e }) =>
|
|
11643
|
+
}), za = ({ tokenAddress: e }) => Td(e), Ga = ({ tokenAddress: e }) => G(Ad().address, e), NN = ({
|
|
11642
11644
|
config: e,
|
|
11643
11645
|
composition: t,
|
|
11644
11646
|
sendTokenValue: n
|
|
11645
11647
|
}) => {
|
|
11646
|
-
const r = e.chainId ===
|
|
11648
|
+
const r = e.chainId === Fn.id, o = r ? t.filter(
|
|
11647
11649
|
(u) => u.amount !== "0" && !za(u) && !Ga(u)
|
|
11648
|
-
) : [], { data: a } =
|
|
11650
|
+
) : [], { data: a } = le({
|
|
11649
11651
|
contracts: o.map(({ tokenAddress: u }) => ({
|
|
11650
11652
|
address: u,
|
|
11651
11653
|
abi: Ee,
|
|
@@ -11664,11 +11666,11 @@ const tc = (e) => {
|
|
|
11664
11666
|
if (f?.status !== "success")
|
|
11665
11667
|
return u;
|
|
11666
11668
|
const v = mc(String(f.result), h);
|
|
11667
|
-
return u + Math.max(0,
|
|
11669
|
+
return u + Math.max(0, tn(h) - v);
|
|
11668
11670
|
}, 0), c = s + l;
|
|
11669
11671
|
if (c <= 0)
|
|
11670
11672
|
return null;
|
|
11671
|
-
const d = t.find(Ga), p = d ?
|
|
11673
|
+
const d = t.find(Ga), p = d ? tn(d) : 0, m = Hr(t) * p / (p + c);
|
|
11672
11674
|
return Vr(m, n);
|
|
11673
11675
|
}, wc = () => {
|
|
11674
11676
|
const e = A(), t = ct(e), [n] = $(), r = Te(e), o = Number(n.value || "0") * Number(r), a = NN({
|
|
@@ -11693,11 +11695,11 @@ const tc = (e) => {
|
|
|
11693
11695
|
const c = l.getWithdrawAssetByVaultAddress(e.address)?.address ?? l.getWithdrawAssetByLeverageAddress(
|
|
11694
11696
|
s.tokenAddress
|
|
11695
11697
|
).address, d = t.find(
|
|
11696
|
-
({ tokenAddress: u }) =>
|
|
11698
|
+
({ tokenAddress: u }) => G(c, u)
|
|
11697
11699
|
);
|
|
11698
11700
|
if (!d)
|
|
11699
11701
|
return Dr;
|
|
11700
|
-
const p =
|
|
11702
|
+
const p = tn(d);
|
|
11701
11703
|
if (t.find(
|
|
11702
11704
|
({ tokenAddress: u, amount: h }) => Pr.some(
|
|
11703
11705
|
(g) => g.isLentAndBorrowedAsset({
|
|
@@ -11706,15 +11708,15 @@ const tc = (e) => {
|
|
|
11706
11708
|
}) && h !== "0"
|
|
11707
11709
|
)
|
|
11708
11710
|
)) {
|
|
11709
|
-
const u =
|
|
11711
|
+
const u = tn(s), h = Hr(t), g = p / h, f = u / h, y = g / (g + f) * h;
|
|
11710
11712
|
return Vr(y, o);
|
|
11711
11713
|
}
|
|
11712
11714
|
return Vr(p, o);
|
|
11713
11715
|
}, hc = () => {
|
|
11714
|
-
const { chainId: e, onDemandWithdrawalEnabled: t } = A(), { requiresLeveragedCollateralLiquidity: n } = wc(), r =
|
|
11715
|
-
return n && !!o && !!t && (e ===
|
|
11716
|
+
const { chainId: e, onDemandWithdrawalEnabled: t } = A(), { requiresLeveragedCollateralLiquidity: n } = wc(), r = nr(), o = uc();
|
|
11717
|
+
return n && !!o && !!t && (e === Wn.id || !r);
|
|
11716
11718
|
}, ON = () => {
|
|
11717
|
-
const { address: e, chainId: t, maintenance: n, maintenanceWithdrawals: r, symbol: o } = A(), [a] = $(), s = Ae(), l = hc(), c =
|
|
11719
|
+
const { address: e, chainId: t, maintenance: n, maintenanceWithdrawals: r, symbol: o } = A(), [a] = $(), s = Ae(), l = hc(), c = tr(), { data: d = 0 } = cA({
|
|
11718
11720
|
address: e,
|
|
11719
11721
|
chainId: t
|
|
11720
11722
|
}), p = d > 0, m = Fs(
|
|
@@ -11730,7 +11732,7 @@ const tc = (e) => {
|
|
|
11730
11732
|
});
|
|
11731
11733
|
};
|
|
11732
11734
|
return {
|
|
11733
|
-
isEmptyInput: !a.value
|
|
11735
|
+
isEmptyInput: !jt(a.value),
|
|
11734
11736
|
requiresEndOfCooldown: p,
|
|
11735
11737
|
requiresHighSlippageConfirm: u,
|
|
11736
11738
|
sendTokenSymbol: a.symbol,
|
|
@@ -11745,7 +11747,7 @@ const tc = (e) => {
|
|
|
11745
11747
|
}, _N = ({
|
|
11746
11748
|
children: e
|
|
11747
11749
|
}) => {
|
|
11748
|
-
const { ActionButton: t = K } =
|
|
11750
|
+
const { ActionButton: t = K } = W(), n = x(), {
|
|
11749
11751
|
isEmptyInput: r,
|
|
11750
11752
|
requiresEndOfCooldown: o,
|
|
11751
11753
|
requiresHighSlippageConfirm: a,
|
|
@@ -11759,7 +11761,7 @@ const tc = (e) => {
|
|
|
11759
11761
|
insufficientBalance: h
|
|
11760
11762
|
} = ON();
|
|
11761
11763
|
return r ? /* @__PURE__ */ i(t, { disabled: !0, children: n.sellNow }) : p ? /* @__PURE__ */ i(
|
|
11762
|
-
|
|
11764
|
+
Pn,
|
|
11763
11765
|
{
|
|
11764
11766
|
promptText: n.poolWithdrawalsAreMaintenance.replace(
|
|
11765
11767
|
"{poolSymbol}",
|
|
@@ -11768,7 +11770,7 @@ const tc = (e) => {
|
|
|
11768
11770
|
children: n.sellNow
|
|
11769
11771
|
}
|
|
11770
11772
|
) : o ? /* @__PURE__ */ i(
|
|
11771
|
-
|
|
11773
|
+
Pn,
|
|
11772
11774
|
{
|
|
11773
11775
|
promptText: n.withdrawCooldown.replace("{tokenSymbol}", s).replace("{cooldownEndTime}", c),
|
|
11774
11776
|
children: n.sellNow
|
|
@@ -11809,7 +11811,7 @@ const tc = (e) => {
|
|
|
11809
11811
|
const { sendToken: e, onInputChange: t, receiveToken: n } = kN();
|
|
11810
11812
|
return /* @__PURE__ */ w(R, { children: [
|
|
11811
11813
|
/* @__PURE__ */ i(
|
|
11812
|
-
|
|
11814
|
+
en,
|
|
11813
11815
|
{
|
|
11814
11816
|
assetInput: e.value,
|
|
11815
11817
|
onInputChange: t,
|
|
@@ -11822,7 +11824,7 @@ const tc = (e) => {
|
|
|
11822
11824
|
}
|
|
11823
11825
|
),
|
|
11824
11826
|
/* @__PURE__ */ w(
|
|
11825
|
-
|
|
11827
|
+
en,
|
|
11826
11828
|
{
|
|
11827
11829
|
assetInput: n.value,
|
|
11828
11830
|
autoFocus: !1,
|
|
@@ -11839,7 +11841,7 @@ const tc = (e) => {
|
|
|
11839
11841
|
)
|
|
11840
11842
|
] });
|
|
11841
11843
|
}, Ha = "delete_limit_order_withdraw", RN = () => {
|
|
11842
|
-
const { address: e, symbol: t, chainId: n } = A(), r =
|
|
11844
|
+
const { address: e, symbol: t, chainId: n } = A(), r = ie()[1], o = Qe({ action: Ha }), { send: a } = ye({
|
|
11843
11845
|
onSettled: o,
|
|
11844
11846
|
contractId: "limitOrder",
|
|
11845
11847
|
functionName: "deleteLimitOrder"
|
|
@@ -11851,7 +11853,7 @@ const tc = (e) => {
|
|
|
11851
11853
|
chainId: n
|
|
11852
11854
|
}), a(e)), [n, a, t, r, e]);
|
|
11853
11855
|
}, $N = () => {
|
|
11854
|
-
const { account: e =
|
|
11856
|
+
const { account: e = O } = B(), { address: t, chainId: n } = A(), { data: r } = hn({
|
|
11855
11857
|
userAddress: e,
|
|
11856
11858
|
vaultAddress: t,
|
|
11857
11859
|
chainId: n
|
|
@@ -11864,12 +11866,12 @@ const tc = (e) => {
|
|
|
11864
11866
|
};
|
|
11865
11867
|
}, [r]);
|
|
11866
11868
|
}, BN = () => {
|
|
11867
|
-
const { address: e, chainId: t, symbol: n } = A(), { hasPendingLimitOrderWithdraw: r, pendingLimitOrderWithdrawAmount: o } = $N(), a = Te({ address: e, chainId: t }), s = RN(), c =
|
|
11869
|
+
const { address: e, chainId: t, symbol: n } = A(), { hasPendingLimitOrderWithdraw: r, pendingLimitOrderWithdrawAmount: o } = $N(), a = Te({ address: e, chainId: t }), s = RN(), c = ie()[0].some(
|
|
11868
11870
|
(u) => u.action === "delete_limit_order_withdraw"
|
|
11869
11871
|
), d = Sd(
|
|
11870
11872
|
o,
|
|
11871
11873
|
Jd
|
|
11872
|
-
), p = new D(o).multipliedBy(a).toNumber(), m = p > 0 ?
|
|
11874
|
+
), p = new D(o).multipliedBy(a).toNumber(), m = p > 0 ? ae({ value: p }) : "";
|
|
11873
11875
|
return {
|
|
11874
11876
|
hasPendingLimitOrderWithdraw: r,
|
|
11875
11877
|
symbol: n,
|
|
@@ -11917,7 +11919,7 @@ const tc = (e) => {
|
|
|
11917
11919
|
chainId: n
|
|
11918
11920
|
}), a = Me(), s = pt();
|
|
11919
11921
|
return {
|
|
11920
|
-
slippageTooltipText:
|
|
11922
|
+
slippageTooltipText: dn(a) === Y.DEFAULT ? e.withdrawSlippageWarning : e.highSlippageWarning,
|
|
11921
11923
|
isMaxSlippageLoading: r,
|
|
11922
11924
|
slippagePlaceholder: `${a}%`,
|
|
11923
11925
|
exitFee: Kr(o, 2),
|
|
@@ -11983,7 +11985,7 @@ const tc = (e) => {
|
|
|
11983
11985
|
]);
|
|
11984
11986
|
return /* @__PURE__ */ i(Jr, { collapseItems: l });
|
|
11985
11987
|
}, UN = ({ children: e }) => {
|
|
11986
|
-
const { WithdrawMetaInfo: t, AvailableLiquidityAlert: n, OnDemandWithdrawAlert: r } =
|
|
11988
|
+
const { WithdrawMetaInfo: t, AvailableLiquidityAlert: n, OnDemandWithdrawAlert: r } = W(), {
|
|
11987
11989
|
requiresLeveragedCollateralLiquidity: o,
|
|
11988
11990
|
leveragedCollateralValueFormatted: a
|
|
11989
11991
|
} = wc(), s = hc();
|
|
@@ -12420,7 +12422,7 @@ const tc = (e) => {
|
|
|
12420
12422
|
const { onOpen: n, isModalOpen: r, onClose: o, isTransactionPending: a } = JN(), s = Fe();
|
|
12421
12423
|
Jl();
|
|
12422
12424
|
const l = b(
|
|
12423
|
-
({ children: c }) => /* @__PURE__ */ i(
|
|
12425
|
+
({ children: c }) => /* @__PURE__ */ i(ur, { config: t, children: c }),
|
|
12424
12426
|
[t]
|
|
12425
12427
|
);
|
|
12426
12428
|
return /* @__PURE__ */ w(R, { children: [
|
|
@@ -12479,7 +12481,7 @@ const tc = (e) => {
|
|
|
12479
12481
|
return d ? /* @__PURE__ */ i(Ul, { config: o, children: /* @__PURE__ */ i(ql, { initialState: u, actions: s, children: /* @__PURE__ */ i(eO, { themeConfig: l, children: e }) }) }) : null;
|
|
12480
12482
|
}, tO = ({ children: e, themeConfig: t, isOpen: n, onOpen: r, onClose: o }) => {
|
|
12481
12483
|
const a = mt(), s = b(
|
|
12482
|
-
({ children: l }) => /* @__PURE__ */ i(
|
|
12484
|
+
({ children: l }) => /* @__PURE__ */ i(ur, { config: t, children: l }),
|
|
12483
12485
|
[t]
|
|
12484
12486
|
);
|
|
12485
12487
|
return /* @__PURE__ */ w(R, { children: [
|
|
@@ -12512,7 +12514,7 @@ const tc = (e) => {
|
|
|
12512
12514
|
actions: s,
|
|
12513
12515
|
themeConfig: l
|
|
12514
12516
|
}) => {
|
|
12515
|
-
const [c, d] = U(!1), p =
|
|
12517
|
+
const [c, d] = U(!1), p = wn({ excludeNativeToken: !0 }), m = b(() => d(!0), []), u = b(() => d(!1), []), h = P(
|
|
12516
12518
|
() => ({
|
|
12517
12519
|
vaultAddress: n,
|
|
12518
12520
|
vaultChainId: t,
|
|
@@ -12557,7 +12559,7 @@ const tc = (e) => {
|
|
|
12557
12559
|
export {
|
|
12558
12560
|
QO as ALCHEMY_RPC_URL_MAP,
|
|
12559
12561
|
XO as AaveLendingPoolAbi,
|
|
12560
|
-
|
|
12562
|
+
O as AddressZero,
|
|
12561
12563
|
bs as BRIDGED_TOKENS_SYMBOLS,
|
|
12562
12564
|
ZO as BRIDGED_USDC_ARBITRUM,
|
|
12563
12565
|
JO as BRIDGED_USDC_OPTIMISM,
|
|
@@ -12565,7 +12567,7 @@ export {
|
|
|
12565
12567
|
t_ as CBBTC_BASE,
|
|
12566
12568
|
n_ as CBETH_BASE,
|
|
12567
12569
|
r_ as CHAIN_MAP,
|
|
12568
|
-
|
|
12570
|
+
qt as CHAIN_NATIVE_TOKENS,
|
|
12569
12571
|
Ps as COMPLETE_WITHDRAW_ACTIONS,
|
|
12570
12572
|
o_ as CURRENCY_SYMBOL_MAP,
|
|
12571
12573
|
jy as ConfigProvider,
|
|
@@ -12578,7 +12580,7 @@ export {
|
|
|
12578
12580
|
kd as DEFAULT_LOCK_TIME,
|
|
12579
12581
|
Nd as DEFAULT_MAX_GAS_LIMIT,
|
|
12580
12582
|
Wd as DEFAULT_MULTI_ASSET_WITHDRAW_METHOD,
|
|
12581
|
-
|
|
12583
|
+
Mn as DEFAULT_POLLING_INTERVAL,
|
|
12582
12584
|
V as DEFAULT_PRECISION,
|
|
12583
12585
|
Od as DEFAULT_PROMISE_TIMEOUT_MS,
|
|
12584
12586
|
zo as DEFAULT_SIMULATION_ERROR,
|
|
@@ -12603,11 +12605,11 @@ export {
|
|
|
12603
12605
|
ks as LimitOrderAbi,
|
|
12604
12606
|
zO as LimitSellOrderModal,
|
|
12605
12607
|
Ne as MANAGER_FEE_DENOMINATOR,
|
|
12606
|
-
|
|
12608
|
+
bn as MAX_GAS_LIMIT_MAP,
|
|
12607
12609
|
Ce as MULTI_ASSET_TOKEN,
|
|
12608
12610
|
_e as MaxUint256,
|
|
12609
12611
|
m_ as NATIVE_TOKEN_GAS_RESERVE_UNITS,
|
|
12610
|
-
|
|
12612
|
+
Un as OndoApiError,
|
|
12611
12613
|
w_ as PAXG_POLYGON,
|
|
12612
12614
|
No as PERMIT2_ADDRESS,
|
|
12613
12615
|
h_ as PYTH_API_LINK,
|
|
@@ -12666,12 +12668,12 @@ export {
|
|
|
12666
12668
|
lP as decodeErrorResult,
|
|
12667
12669
|
cP as encodeFunctionData,
|
|
12668
12670
|
dP as erc20Abi,
|
|
12669
|
-
|
|
12671
|
+
gr as formatByCurrency,
|
|
12670
12672
|
pP as formatEther,
|
|
12671
12673
|
Ve as formatNumberToLimitedDecimals,
|
|
12672
|
-
|
|
12674
|
+
vn as formatNumeratorToPercentage,
|
|
12673
12675
|
Kr as formatPercentage,
|
|
12674
|
-
|
|
12676
|
+
ae as formatToUsd,
|
|
12675
12677
|
uP as formatUnits,
|
|
12676
12678
|
Uc as getContractAbiById,
|
|
12677
12679
|
Q as getContractAddressById,
|
|
@@ -12683,12 +12685,12 @@ export {
|
|
|
12683
12685
|
Ro as getPoolFraction,
|
|
12684
12686
|
mP as hexToString,
|
|
12685
12687
|
Wo as isAaveLendAndBorrowAsset,
|
|
12686
|
-
|
|
12688
|
+
G as isEqualAddress,
|
|
12687
12689
|
Dy as isErrorWithMessage,
|
|
12688
12690
|
jc as isFmpAirdropVaultAddress,
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12691
|
+
Bn as isNativeToken,
|
|
12692
|
+
F as isZeroAddress,
|
|
12693
|
+
Xt as normalizeNumber,
|
|
12692
12694
|
vP as optimism,
|
|
12693
12695
|
bP as polygon,
|
|
12694
12696
|
qO as removeInsignificantTrailingZeros,
|
|
@@ -12718,9 +12720,9 @@ export {
|
|
|
12718
12720
|
Gx as useDepositLockTime,
|
|
12719
12721
|
_S as useDepositProjectedEarnings,
|
|
12720
12722
|
J_ as useDisconnect,
|
|
12721
|
-
|
|
12723
|
+
cn as useDytmVaultData,
|
|
12722
12724
|
kS as useEasySwapperTrackedAssets,
|
|
12723
|
-
|
|
12725
|
+
zn as useEffectiveAggregators,
|
|
12724
12726
|
eS as useExchangeRate,
|
|
12725
12727
|
FO as useFlatmoneyPointsUserBalances,
|
|
12726
12728
|
$y as useGasPrice,
|
|
@@ -12729,12 +12731,12 @@ export {
|
|
|
12729
12731
|
cI as useInvalidateLimitSellOrderQuery,
|
|
12730
12732
|
Wr as useInvalidateOnBlock,
|
|
12731
12733
|
rA as useInvalidatePoolContractData,
|
|
12732
|
-
|
|
12734
|
+
ln as useInvalidateTradingQueries,
|
|
12733
12735
|
Ft as useIsCompleteWithdrawStep,
|
|
12734
12736
|
BO as useIsDepositBlocked,
|
|
12735
12737
|
st as useIsDepositTradingPanelType,
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
+
nr as useIsDhedgeVaultConnected,
|
|
12739
|
+
tr as useIsInsufficientBalance,
|
|
12738
12740
|
CO as useIsPoolAddress,
|
|
12739
12741
|
ZA as useIsTradingEnabled,
|
|
12740
12742
|
RO as useIsWalletConnected,
|
|
@@ -12751,10 +12753,10 @@ export {
|
|
|
12751
12753
|
nA as usePoolCompositionWithFraction,
|
|
12752
12754
|
ve as usePoolDynamic,
|
|
12753
12755
|
Eo as usePoolFees,
|
|
12754
|
-
|
|
12756
|
+
ar as usePoolManagerDynamic,
|
|
12755
12757
|
Ui as usePoolManagerLogicData,
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
+
or as usePoolManagerStatic,
|
|
12759
|
+
rr as usePoolStatic,
|
|
12758
12760
|
Te as usePoolTokenPrice,
|
|
12759
12761
|
OS as useProjectedEarningsCore,
|
|
12760
12762
|
eP as usePublicClient,
|
|
@@ -12768,17 +12770,17 @@ export {
|
|
|
12768
12770
|
EO as useSetPoolAddress,
|
|
12769
12771
|
_O as useSetTradingType,
|
|
12770
12772
|
$O as useStaticCallQuery,
|
|
12771
|
-
|
|
12773
|
+
an as useTokenAllowance,
|
|
12772
12774
|
q as useTradingPanelActions,
|
|
12773
12775
|
Ot as useTradingPanelLogger,
|
|
12774
12776
|
te as useTradingPanelModal,
|
|
12775
12777
|
Up as useTradingPanelPoolAddress,
|
|
12776
12778
|
A as useTradingPanelPoolConfig,
|
|
12777
|
-
|
|
12779
|
+
on as useTradingPanelPoolConfigs,
|
|
12778
12780
|
Nt as useTradingPanelPoolFallbackData,
|
|
12779
12781
|
ne as useTradingPanelSettings,
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
+
se as useTradingPanelState,
|
|
12783
|
+
ie as useTradingPanelTransactions,
|
|
12782
12784
|
De as useTradingPanelType,
|
|
12783
12785
|
XA as useTradingResultHandling,
|
|
12784
12786
|
Qe as useTradingSettleHandler,
|
|
@@ -12790,18 +12792,18 @@ export {
|
|
|
12790
12792
|
PO as useUpdateTradingModal,
|
|
12791
12793
|
OO as useUpdateTradingSettings,
|
|
12792
12794
|
YT as useUserBalancesDynamic,
|
|
12793
|
-
|
|
12795
|
+
hn as useUserLimitSellOrder,
|
|
12794
12796
|
Be as useUserTokenBalance,
|
|
12795
12797
|
Co as useUserTokenSpendableBalance,
|
|
12796
12798
|
uA as useUserVaultBalance,
|
|
12797
12799
|
pA as useUserVaultsBalances,
|
|
12798
12800
|
MO as useVaultContractData,
|
|
12799
|
-
|
|
12801
|
+
wn as useVaultDepositTokens,
|
|
12800
12802
|
hA as useVaultSupplyCap,
|
|
12801
12803
|
aA as useVaultVestedPoints,
|
|
12802
12804
|
oP as useWaitForTransactionReceipt,
|
|
12803
12805
|
aP as useWalletClient,
|
|
12804
|
-
|
|
12806
|
+
Gn as useWithdrawAction,
|
|
12805
12807
|
sP as useWriteContract,
|
|
12806
12808
|
KO as validateLoggerEventParams
|
|
12807
12809
|
};
|