@orbs-network/spot-react 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-BKzYXzAO.js → ccip-DJmm1rA2.js} +1 -1
- package/dist/{index-D_nZHWAR.js → index-Gf3YJFzC.js} +241 -235
- package/dist/spot-react/package.json.d.ts +1 -1
- package/dist/spot-react/src/index.d.ts +2 -1
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react.js +26 -25
- package/dist/spot-react.umd.cjs +7 -7
- package/package.json +1 -1
|
@@ -2925,7 +2925,7 @@ const Vm = (e) => {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
});
|
|
2927
2927
|
}
|
|
2928
|
-
})), Xw = "0.0.
|
|
2928
|
+
})), Xw = "0.0.29", Qw = {
|
|
2929
2929
|
version: Xw
|
|
2930
2930
|
};
|
|
2931
2931
|
var yo = class {
|
|
@@ -27604,7 +27604,7 @@ async function AD({ address: e, authorization: t, signature: r }) {
|
|
|
27604
27604
|
signature: r
|
|
27605
27605
|
}));
|
|
27606
27606
|
}
|
|
27607
|
-
function
|
|
27607
|
+
function se(e, t, r) {
|
|
27608
27608
|
const n = e[t.name];
|
|
27609
27609
|
if (typeof n == "function")
|
|
27610
27610
|
return n;
|
|
@@ -27810,7 +27810,7 @@ async function ku(e, t) {
|
|
|
27810
27810
|
});
|
|
27811
27811
|
return ie === "0x" ? { data: void 0 } : { data: ie };
|
|
27812
27812
|
} catch (U) {
|
|
27813
|
-
const F = DD(U), { offchainLookup: N, offchainLookupSignature: z } = await import("./ccip-
|
|
27813
|
+
const F = DD(U), { offchainLookup: N, offchainLookupSignature: z } = await import("./ccip-DJmm1rA2.js");
|
|
27814
27814
|
if (e.ccipRead !== !1 && (F == null ? void 0 : F.slice(0, 10)) === z && C)
|
|
27815
27815
|
return { data: await N(e, { data: F, to: C }) };
|
|
27816
27816
|
throw S && (F == null ? void 0 : F.slice(0, 10)) === "0x101bb98d" ? new XA({ factory: f }) : Zf(U, {
|
|
@@ -27926,7 +27926,7 @@ async function jr(e, t) {
|
|
|
27926
27926
|
functionName: a
|
|
27927
27927
|
});
|
|
27928
27928
|
try {
|
|
27929
|
-
const { data: c } = await
|
|
27929
|
+
const { data: c } = await se(e, ku, "call")({
|
|
27930
27930
|
...o,
|
|
27931
27931
|
data: i,
|
|
27932
27932
|
to: n
|
|
@@ -28005,7 +28005,7 @@ async function MD(e, t) {
|
|
|
28005
28005
|
authorization: f
|
|
28006
28006
|
}))
|
|
28007
28007
|
throw new ia();
|
|
28008
|
-
const y = await
|
|
28008
|
+
const y = await se(e, jr, "readContract")({
|
|
28009
28009
|
...o ? { address: o } : { code: b0 },
|
|
28010
28010
|
authorizationList: [f],
|
|
28011
28011
|
abi: Nl,
|
|
@@ -28057,7 +28057,7 @@ async function RD(e, t) {
|
|
|
28057
28057
|
bytecode: vD
|
|
28058
28058
|
}),
|
|
28059
28059
|
...c
|
|
28060
|
-
}, { data: d } = await
|
|
28060
|
+
}, { data: d } = await se(e, ku, "call")(u).catch((f) => {
|
|
28061
28061
|
throw f instanceof ng ? new ia() : f;
|
|
28062
28062
|
});
|
|
28063
28063
|
if (v8(d ?? "0x0"))
|
|
@@ -28066,7 +28066,7 @@ async function RD(e, t) {
|
|
|
28066
28066
|
}
|
|
28067
28067
|
async function ND(e, t) {
|
|
28068
28068
|
const { address: r, blockNumber: n, blockTag: s, hash: a, signature: o } = t;
|
|
28069
|
-
if ((await
|
|
28069
|
+
if ((await se(e, jr, "readContract")({
|
|
28070
28070
|
address: r,
|
|
28071
28071
|
abi: r6,
|
|
28072
28072
|
args: [a, o],
|
|
@@ -28780,7 +28780,7 @@ const v0 = {
|
|
|
28780
28780
|
});
|
|
28781
28781
|
}
|
|
28782
28782
|
}
|
|
28783
|
-
return await
|
|
28783
|
+
return await se(e, dc, "verifyHash")({ ...t, chain: null });
|
|
28784
28784
|
}
|
|
28785
28785
|
}, B_ = /* @__PURE__ */ p({
|
|
28786
28786
|
...v0,
|
|
@@ -31689,7 +31689,7 @@ async function w6(e, t) {
|
|
|
31689
31689
|
try {
|
|
31690
31690
|
const i = ((a = n == null ? void 0 : n.fees) == null ? void 0 : a.maxPriorityFeePerGas) ?? ((o = n == null ? void 0 : n.fees) == null ? void 0 : o.defaultPriorityFee);
|
|
31691
31691
|
if (typeof i == "function") {
|
|
31692
|
-
const l = r || await
|
|
31692
|
+
const l = r || await se(e, Nr, "getBlock")({}), u = await i({
|
|
31693
31693
|
block: l,
|
|
31694
31694
|
client: e,
|
|
31695
31695
|
request: s
|
|
@@ -31706,8 +31706,8 @@ async function w6(e, t) {
|
|
|
31706
31706
|
return ze(c);
|
|
31707
31707
|
} catch {
|
|
31708
31708
|
const [i, c] = await Promise.all([
|
|
31709
|
-
r ? Promise.resolve(r) :
|
|
31710
|
-
|
|
31709
|
+
r ? Promise.resolve(r) : se(e, Nr, "getBlock")({}),
|
|
31710
|
+
se(e, k0, "getGasPrice")({})
|
|
31711
31711
|
]);
|
|
31712
31712
|
if (typeof i.baseFeePerGas != "bigint")
|
|
31713
31713
|
throw new E0();
|
|
@@ -31730,7 +31730,7 @@ async function Yp(e, t) {
|
|
|
31730
31730
|
})();
|
|
31731
31731
|
if (o < 1)
|
|
31732
31732
|
throw new g6();
|
|
31733
|
-
const c = 10 ** (((f = o.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), l = (y) => y * BigInt(Math.ceil(o * c)) / BigInt(c), u = r || await
|
|
31733
|
+
const c = 10 ** (((f = o.toString().split(".")[1]) == null ? void 0 : f.length) ?? 0), l = (y) => y * BigInt(Math.ceil(o * c)) / BigInt(c), u = r || await se(e, Nr, "getBlock")({});
|
|
31734
31734
|
if (typeof ((m = n == null ? void 0 : n.fees) == null ? void 0 : m.estimateFeesPerGas) == "function") {
|
|
31735
31735
|
const y = await n.fees.estimateFeesPerGas({
|
|
31736
31736
|
block: r,
|
|
@@ -31756,7 +31756,7 @@ async function Yp(e, t) {
|
|
|
31756
31756
|
};
|
|
31757
31757
|
}
|
|
31758
31758
|
return {
|
|
31759
|
-
gasPrice: (s == null ? void 0 : s.gasPrice) ?? l(await
|
|
31759
|
+
gasPrice: (s == null ? void 0 : s.gasPrice) ?? l(await se(e, k0, "getGasPrice")({}))
|
|
31760
31760
|
};
|
|
31761
31761
|
}
|
|
31762
31762
|
async function C0(e, { address: t, blockTag: r = "latest", blockNumber: n }) {
|
|
@@ -31792,7 +31792,7 @@ async function T0(e, t) {
|
|
|
31792
31792
|
const { account: r = e.account, accessList: n, authorizationList: s, chain: a = e.chain, blobVersionedHashes: o, blobs: i, data: c, gas: l, gasPrice: u, maxFeePerBlobGas: d, maxFeePerGas: f, maxPriorityFeePerGas: m, nonce: y, nonceManager: g, to: E, type: w, value: v, ...A } = t, C = await (async () => {
|
|
31793
31793
|
if (!r || !g || typeof y < "u")
|
|
31794
31794
|
return y;
|
|
31795
|
-
const B = Qe(r), D = a ? a.id : await
|
|
31795
|
+
const B = Qe(r), D = a ? a.id : await se(e, Ts, "getChainId")({});
|
|
31796
31796
|
return await g.consume({
|
|
31797
31797
|
address: B.address,
|
|
31798
31798
|
chainId: D,
|
|
@@ -31828,7 +31828,7 @@ async function T0(e, t) {
|
|
|
31828
31828
|
const P = await (async () => {
|
|
31829
31829
|
var z, $;
|
|
31830
31830
|
if (typeof ((z = a == null ? void 0 : a.fees) == null ? void 0 : z.baseFeeMultiplier) == "function") {
|
|
31831
|
-
const X = await
|
|
31831
|
+
const X = await se(e, Nr, "getBlock")({});
|
|
31832
31832
|
return a.fees.baseFeeMultiplier({
|
|
31833
31833
|
block: X,
|
|
31834
31834
|
client: e,
|
|
@@ -31880,7 +31880,7 @@ async function fc(e, t) {
|
|
|
31880
31880
|
})();
|
|
31881
31881
|
let c;
|
|
31882
31882
|
async function l() {
|
|
31883
|
-
return c || (typeof r.chainId < "u" ? r.chainId : s ? s.id : (c = await
|
|
31883
|
+
return c || (typeof r.chainId < "u" ? r.chainId : s ? s.id : (c = await se(e, Ts, "getChainId")({}), c));
|
|
31884
31884
|
}
|
|
31885
31885
|
const u = n && Qe(n);
|
|
31886
31886
|
let d = r.nonce;
|
|
@@ -31895,7 +31895,7 @@ async function fc(e, t) {
|
|
|
31895
31895
|
i != null && i.fn && ((C = i.runAt) != null && C.includes("beforeFillTransaction")) && (r = await i.fn({ ...r, chain: s }, {
|
|
31896
31896
|
phase: "beforeFillTransaction"
|
|
31897
31897
|
}), d ?? (d = r.nonce));
|
|
31898
|
-
const m = ((o.includes("blobVersionedHashes") || o.includes("sidecars")) && r.kzg && r.blobs || Fd.get(e.uid) === !1 || !["fees", "gas"].some((h) => o.includes(h)) ? !1 : !!(o.includes("chainId") && typeof r.chainId != "number" || o.includes("nonce") && typeof d != "number" || o.includes("fees") && typeof r.gasPrice != "bigint" && (typeof r.maxFeePerGas != "bigint" || typeof r.maxPriorityFeePerGas != "bigint") || o.includes("gas") && typeof r.gas != "bigint")) ? await
|
|
31898
|
+
const m = ((o.includes("blobVersionedHashes") || o.includes("sidecars")) && r.kzg && r.blobs || Fd.get(e.uid) === !1 || !["fees", "gas"].some((h) => o.includes(h)) ? !1 : !!(o.includes("chainId") && typeof r.chainId != "number" || o.includes("nonce") && typeof d != "number" || o.includes("fees") && typeof r.gasPrice != "bigint" && (typeof r.maxFeePerGas != "bigint" || typeof r.maxPriorityFeePerGas != "bigint") || o.includes("gas") && typeof r.gas != "bigint")) ? await se(e, T0, "fillTransaction")({ ...r, nonce: d }).then((T) => {
|
|
31899
31899
|
const { chainId: h, from: b, gas: x, gasPrice: S, nonce: I, maxFeePerBlobGas: B, maxFeePerGas: D, maxPriorityFeePerGas: k, type: P, ...U } = T.transaction;
|
|
31900
31900
|
return Fd.set(e.uid, !0), {
|
|
31901
31901
|
...r,
|
|
@@ -31929,9 +31929,9 @@ async function fc(e, t) {
|
|
|
31929
31929
|
}));
|
|
31930
31930
|
let v;
|
|
31931
31931
|
async function A() {
|
|
31932
|
-
return v || (v = await
|
|
31932
|
+
return v || (v = await se(e, Nr, "getBlock")({ blockTag: "latest" }), v);
|
|
31933
31933
|
}
|
|
31934
|
-
if (o.includes("nonce") && typeof d > "u" && u && !a && (r.nonce = await
|
|
31934
|
+
if (o.includes("nonce") && typeof d > "u" && u && !a && (r.nonce = await se(e, C0, "getTransactionCount")({
|
|
31935
31935
|
address: u.address,
|
|
31936
31936
|
blockTag: "pending"
|
|
31937
31937
|
})), (o.includes("blobVersionedHashes") || o.includes("sidecars")) && y && E) {
|
|
@@ -31991,7 +31991,7 @@ async function fc(e, t) {
|
|
|
31991
31991
|
r.gasPrice = h;
|
|
31992
31992
|
}
|
|
31993
31993
|
}
|
|
31994
|
-
return o.includes("gas") && typeof g > "u" && (r.gas = await
|
|
31994
|
+
return o.includes("gas") && typeof g > "u" && (r.gas = await se(e, S0, "estimateGas")({
|
|
31995
31995
|
...r,
|
|
31996
31996
|
account: u,
|
|
31997
31997
|
prepare: (u == null ? void 0 : u.type) === "local" ? [] : ["blobVersionedHashes"]
|
|
@@ -32066,7 +32066,7 @@ async function bR(e, t) {
|
|
|
32066
32066
|
functionName: a
|
|
32067
32067
|
});
|
|
32068
32068
|
try {
|
|
32069
|
-
return await
|
|
32069
|
+
return await se(e, S0, "estimateGas")({
|
|
32070
32070
|
data: `${c}${o ? o.replace("0x", "") : ""}`,
|
|
32071
32071
|
to: n,
|
|
32072
32072
|
...i
|
|
@@ -32244,7 +32244,7 @@ async function I0(e, { address: t, blockHash: r, fromBlock: n, toBlock: s, event
|
|
|
32244
32244
|
}
|
|
32245
32245
|
async function v6(e, t) {
|
|
32246
32246
|
const { abi: r, address: n, args: s, blockHash: a, eventName: o, fromBlock: i, toBlock: c, strict: l } = t, u = o ? fa({ abi: r, name: o }) : void 0, d = u ? void 0 : r.filter((f) => f.type === "event");
|
|
32247
|
-
return
|
|
32247
|
+
return se(e, I0, "getLogs")({
|
|
32248
32248
|
address: n,
|
|
32249
32249
|
args: s,
|
|
32250
32250
|
blockHash: a,
|
|
@@ -32258,7 +32258,7 @@ async function v6(e, t) {
|
|
|
32258
32258
|
async function xR(e, t) {
|
|
32259
32259
|
const { abi: r, address: n, args: s, dataSuffix: a, functionName: o, ...i } = t, c = i.account ? Qe(i.account) : e.account, l = yr({ abi: r, args: s, functionName: o });
|
|
32260
32260
|
try {
|
|
32261
|
-
const { data: u } = await
|
|
32261
|
+
const { data: u } = await se(e, ku, "call")({
|
|
32262
32262
|
batch: !1,
|
|
32263
32263
|
data: `${l}${a ? a.replace("0x", "") : ""}`,
|
|
32264
32264
|
to: n,
|
|
@@ -32422,7 +32422,7 @@ function AR(e, t) {
|
|
|
32422
32422
|
var T;
|
|
32423
32423
|
if (!O) {
|
|
32424
32424
|
try {
|
|
32425
|
-
C = await
|
|
32425
|
+
C = await se(e, y6, "createContractEventFilter")({
|
|
32426
32426
|
abi: r,
|
|
32427
32427
|
address: n,
|
|
32428
32428
|
args: s,
|
|
@@ -32438,10 +32438,10 @@ function AR(e, t) {
|
|
|
32438
32438
|
try {
|
|
32439
32439
|
let h;
|
|
32440
32440
|
if (C)
|
|
32441
|
-
h = await
|
|
32441
|
+
h = await se(e, Au, "getFilterChanges")({ filter: C });
|
|
32442
32442
|
else {
|
|
32443
|
-
const b = await
|
|
32444
|
-
A && A < b ? h = await
|
|
32443
|
+
const b = await se(e, mc, "getBlockNumber")({});
|
|
32444
|
+
A && A < b ? h = await se(e, v6, "getContractEvents")({
|
|
32445
32445
|
abi: r,
|
|
32446
32446
|
address: n,
|
|
32447
32447
|
args: s,
|
|
@@ -32466,7 +32466,7 @@ function AR(e, t) {
|
|
|
32466
32466
|
interval: d
|
|
32467
32467
|
});
|
|
32468
32468
|
return async () => {
|
|
32469
|
-
C && await
|
|
32469
|
+
C && await se(e, Su, "uninstallFilter")({ filter: C }), R();
|
|
32470
32470
|
};
|
|
32471
32471
|
});
|
|
32472
32472
|
})() : (() => {
|
|
@@ -32566,7 +32566,7 @@ async function Pu(e, t) {
|
|
|
32566
32566
|
})();
|
|
32567
32567
|
if ((w == null ? void 0 : w.type) === "json-rpc" || w === null) {
|
|
32568
32568
|
let T;
|
|
32569
|
-
n !== null && (T = await
|
|
32569
|
+
n !== null && (T = await se(e, Ts, "getChainId")({}), Hf({
|
|
32570
32570
|
currentChainId: T,
|
|
32571
32571
|
chain: n
|
|
32572
32572
|
}));
|
|
@@ -32610,7 +32610,7 @@ async function Pu(e, t) {
|
|
|
32610
32610
|
}
|
|
32611
32611
|
}
|
|
32612
32612
|
if ((w == null ? void 0 : w.type) === "local") {
|
|
32613
|
-
const T = await
|
|
32613
|
+
const T = await se(e, fc, "prepareTransactionRequest")({
|
|
32614
32614
|
account: w,
|
|
32615
32615
|
accessList: s,
|
|
32616
32616
|
authorizationList: a,
|
|
@@ -32632,7 +32632,7 @@ async function Pu(e, t) {
|
|
|
32632
32632
|
}), h = (O = n == null ? void 0 : n.serializers) == null ? void 0 : O.transaction, b = await w.signTransaction(T, {
|
|
32633
32633
|
serializer: h
|
|
32634
32634
|
});
|
|
32635
|
-
return await
|
|
32635
|
+
return await se(e, B0, "sendRawTransaction")({
|
|
32636
32636
|
serializedTransaction: b
|
|
32637
32637
|
});
|
|
32638
32638
|
}
|
|
@@ -32670,7 +32670,7 @@ async function Ui(e, t) {
|
|
|
32670
32670
|
functionName: d
|
|
32671
32671
|
});
|
|
32672
32672
|
try {
|
|
32673
|
-
return await
|
|
32673
|
+
return await se(r, n, s)({
|
|
32674
32674
|
data: `${y}${u ? u.replace("0x", "") : ""}`,
|
|
32675
32675
|
to: c,
|
|
32676
32676
|
account: m,
|
|
@@ -32858,7 +32858,7 @@ async function A6(e, t) {
|
|
|
32858
32858
|
};
|
|
32859
32859
|
try {
|
|
32860
32860
|
const v = await Ll(async () => {
|
|
32861
|
-
const A = await
|
|
32861
|
+
const A = await se(e, T6, "getCallsStatus")({ id: r });
|
|
32862
32862
|
if (c && A.status === "failure")
|
|
32863
32863
|
throw new SR(A);
|
|
32864
32864
|
return A;
|
|
@@ -33086,7 +33086,7 @@ async function _R(e, t) {
|
|
|
33086
33086
|
],
|
|
33087
33087
|
blockNumber: r,
|
|
33088
33088
|
blockTag: n
|
|
33089
|
-
}, g = await
|
|
33089
|
+
}, g = await se(e, jr, "readContract")(m);
|
|
33090
33090
|
if (g[0] === "0x")
|
|
33091
33091
|
return null;
|
|
33092
33092
|
const E = ha({
|
|
@@ -33315,7 +33315,7 @@ async function U6(e, t) {
|
|
|
33315
33315
|
functionName: "resolveWithGateways",
|
|
33316
33316
|
blockNumber: r,
|
|
33317
33317
|
blockTag: n
|
|
33318
|
-
}, m = await
|
|
33318
|
+
}, m = await se(e, jr, "readContract")(d);
|
|
33319
33319
|
if (m[0] === "0x")
|
|
33320
33320
|
return null;
|
|
33321
33321
|
const y = ha({
|
|
@@ -33333,7 +33333,7 @@ async function U6(e, t) {
|
|
|
33333
33333
|
}
|
|
33334
33334
|
}
|
|
33335
33335
|
async function YR(e, { blockNumber: t, blockTag: r, assetGatewayUrls: n, name: s, gatewayUrls: a, strict: o, universalResolverAddress: i }) {
|
|
33336
|
-
const c = await
|
|
33336
|
+
const c = await se(e, U6, "getEnsText")({
|
|
33337
33337
|
blockNumber: t,
|
|
33338
33338
|
blockTag: r,
|
|
33339
33339
|
key: "avatar",
|
|
@@ -33373,7 +33373,7 @@ async function KR(e, t) {
|
|
|
33373
33373
|
functionName: "reverseWithGateways",
|
|
33374
33374
|
blockNumber: n,
|
|
33375
33375
|
blockTag: s
|
|
33376
|
-
}, d =
|
|
33376
|
+
}, d = se(e, jr, "readContract"), [f] = await d(u);
|
|
33377
33377
|
return f || null;
|
|
33378
33378
|
} catch (u) {
|
|
33379
33379
|
if (i)
|
|
@@ -33397,7 +33397,7 @@ async function ZR(e, t) {
|
|
|
33397
33397
|
})(), i = a == null ? void 0 : a.ensTlds;
|
|
33398
33398
|
if (i && !i.some((l) => s.endsWith(l)))
|
|
33399
33399
|
throw new Error(`${s} is not a valid ENS TLD (${i == null ? void 0 : i.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);
|
|
33400
|
-
const [c] = await
|
|
33400
|
+
const [c] = await se(e, jr, "readContract")({
|
|
33401
33401
|
address: o,
|
|
33402
33402
|
abi: [
|
|
33403
33403
|
{
|
|
@@ -33542,7 +33542,7 @@ class tN extends L {
|
|
|
33542
33542
|
async function rN(e, t) {
|
|
33543
33543
|
const { address: r, factory: n, factoryData: s } = t;
|
|
33544
33544
|
try {
|
|
33545
|
-
const [a, o, i, c, l, u, d] = await
|
|
33545
|
+
const [a, o, i, c, l, u, d] = await se(e, jr, "readContract")({
|
|
33546
33546
|
abi: nN,
|
|
33547
33547
|
address: r,
|
|
33548
33548
|
functionName: "eip712Domain",
|
|
@@ -34096,8 +34096,8 @@ async function _0(e, { blockHash: t, blockNumber: r, blockTag: n, hash: s, index
|
|
|
34096
34096
|
}
|
|
34097
34097
|
async function PN(e, { hash: t, transactionReceipt: r }) {
|
|
34098
34098
|
const [n, s] = await Promise.all([
|
|
34099
|
-
|
|
34100
|
-
t ?
|
|
34099
|
+
se(e, mc, "getBlockNumber")({}),
|
|
34100
|
+
t ? se(e, _0, "getTransaction")({ hash: t }) : void 0
|
|
34101
34101
|
]), a = (r == null ? void 0 : r.blockNumber) || (s == null ? void 0 : s.blockNumber);
|
|
34102
34102
|
return a ? n - a + 1n : 0n;
|
|
34103
34103
|
}
|
|
@@ -34163,7 +34163,7 @@ async function IN(e, t) {
|
|
|
34163
34163
|
];
|
|
34164
34164
|
}
|
|
34165
34165
|
}
|
|
34166
|
-
const E = await Promise.allSettled(m.map((A) =>
|
|
34166
|
+
const E = await Promise.allSettled(m.map((A) => se(e, jr, "readContract")({
|
|
34167
34167
|
...f === null ? { code: b0 } : { address: f },
|
|
34168
34168
|
abi: Nl,
|
|
34169
34169
|
account: r,
|
|
@@ -34680,7 +34680,7 @@ async function zN(e, t) {
|
|
|
34680
34680
|
}
|
|
34681
34681
|
async function LN(e, { address: t, message: r, factory: n, factoryData: s, signature: a, ...o }) {
|
|
34682
34682
|
const i = M6(r);
|
|
34683
|
-
return
|
|
34683
|
+
return se(e, dc, "verifyHash")({
|
|
34684
34684
|
address: t,
|
|
34685
34685
|
factory: n,
|
|
34686
34686
|
factoryData: s,
|
|
@@ -34691,7 +34691,7 @@ async function LN(e, { address: t, message: r, factory: n, factoryData: s, signa
|
|
|
34691
34691
|
}
|
|
34692
34692
|
async function $N(e, t) {
|
|
34693
34693
|
const { address: r, factory: n, factoryData: s, signature: a, message: o, primaryType: i, types: c, domain: l, ...u } = t, d = wN({ message: o, primaryType: i, types: c, domain: l });
|
|
34694
|
-
return
|
|
34694
|
+
return se(e, dc, "verifyHash")({
|
|
34695
34695
|
address: r,
|
|
34696
34696
|
factory: n,
|
|
34697
34697
|
factoryData: s,
|
|
@@ -34714,7 +34714,7 @@ function W6(e, { emitOnBegin: t = !1, emitMissed: r = !1, onBlockNumber: n, onEr
|
|
|
34714
34714
|
return jn(d, { onBlockNumber: n, onError: s }, (f) => Ao(async () => {
|
|
34715
34715
|
var m;
|
|
34716
34716
|
try {
|
|
34717
|
-
const y = await
|
|
34717
|
+
const y = await se(e, mc, "getBlockNumber")({ cacheTime: 0 });
|
|
34718
34718
|
if (c !== void 0) {
|
|
34719
34719
|
if (y === c)
|
|
34720
34720
|
return;
|
|
@@ -34788,12 +34788,12 @@ async function q6(e, t) {
|
|
|
34788
34788
|
E == null || E(), g == null || g(), A(new R8({ hash: s }));
|
|
34789
34789
|
}, c) : void 0;
|
|
34790
34790
|
return g = jn(l, { onReplaced: a, resolve: v, reject: A }, async (O) => {
|
|
34791
|
-
if (m = await
|
|
34791
|
+
if (m = await se(e, vl, "getTransactionReceipt")({ hash: s }).catch(() => {
|
|
34792
34792
|
}), m && n <= 1) {
|
|
34793
34793
|
clearTimeout(C), O.resolve(m), g == null || g();
|
|
34794
34794
|
return;
|
|
34795
34795
|
}
|
|
34796
|
-
E =
|
|
34796
|
+
E = se(e, W6, "watchBlockNumber")({
|
|
34797
34797
|
emitMissed: !0,
|
|
34798
34798
|
emitOnBegin: !0,
|
|
34799
34799
|
poll: !0,
|
|
@@ -34812,11 +34812,11 @@ async function q6(e, t) {
|
|
|
34812
34812
|
return;
|
|
34813
34813
|
}
|
|
34814
34814
|
if (r && !d && (y = !0, await Ll(async () => {
|
|
34815
|
-
d = await
|
|
34815
|
+
d = await se(e, _0, "getTransaction")({ hash: s }), d.blockNumber && (h = d.blockNumber);
|
|
34816
34816
|
}, {
|
|
34817
34817
|
delay: i,
|
|
34818
34818
|
retryCount: o
|
|
34819
|
-
}), y = !1), m = await
|
|
34819
|
+
}), y = !1), m = await se(e, vl, "getTransactionReceipt")({ hash: s }), n > 1 && (!m.blockNumber || h - m.blockNumber + 1n < n))
|
|
34820
34820
|
return;
|
|
34821
34821
|
T(() => O.resolve(m));
|
|
34822
34822
|
} catch (b) {
|
|
@@ -34827,7 +34827,7 @@ async function q6(e, t) {
|
|
|
34827
34827
|
}
|
|
34828
34828
|
try {
|
|
34829
34829
|
f = d, y = !0;
|
|
34830
|
-
const x = await Ll(() =>
|
|
34830
|
+
const x = await Ll(() => se(e, Nr, "getBlock")({
|
|
34831
34831
|
blockNumber: h,
|
|
34832
34832
|
includeTransactions: !0
|
|
34833
34833
|
}), {
|
|
@@ -34837,7 +34837,7 @@ async function q6(e, t) {
|
|
|
34837
34837
|
});
|
|
34838
34838
|
y = !1;
|
|
34839
34839
|
const S = x.transactions.find(({ from: B, nonce: D }) => B === f.from && D === f.nonce);
|
|
34840
|
-
if (!S || (m = await
|
|
34840
|
+
if (!S || (m = await se(e, vl, "getTransactionReceipt")({
|
|
34841
34841
|
hash: S.hash
|
|
34842
34842
|
}), n > 1 && (!m.blockNumber || h - m.blockNumber + 1n < n)))
|
|
34843
34843
|
return;
|
|
@@ -34877,7 +34877,7 @@ function HN(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
34877
34877
|
return jn(y, { onBlock: s, onError: a }, (g) => Ao(async () => {
|
|
34878
34878
|
var E;
|
|
34879
34879
|
try {
|
|
34880
|
-
const w = await
|
|
34880
|
+
const w = await se(e, Nr, "getBlock")({
|
|
34881
34881
|
blockTag: t,
|
|
34882
34882
|
includeTransactions: u
|
|
34883
34883
|
});
|
|
@@ -34886,7 +34886,7 @@ function HN(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
34886
34886
|
return;
|
|
34887
34887
|
if (w.number - d.number > 1 && r)
|
|
34888
34888
|
for (let v = (d == null ? void 0 : d.number) + 1n; v < w.number; v++) {
|
|
34889
|
-
const A = await
|
|
34889
|
+
const A = await se(e, Nr, "getBlock")({
|
|
34890
34890
|
blockNumber: v,
|
|
34891
34891
|
includeTransactions: u
|
|
34892
34892
|
});
|
|
@@ -34909,7 +34909,7 @@ function HN(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
34909
34909
|
let y = !0, g = !0, E = () => y = !1;
|
|
34910
34910
|
return (async () => {
|
|
34911
34911
|
try {
|
|
34912
|
-
n &&
|
|
34912
|
+
n && se(e, Nr, "getBlock")({
|
|
34913
34913
|
blockTag: t,
|
|
34914
34914
|
includeTransactions: u
|
|
34915
34915
|
}).then((A) => {
|
|
@@ -34927,7 +34927,7 @@ function HN(e, { blockTag: t = e.experimental_blockTag ?? "latest", emitMissed:
|
|
|
34927
34927
|
var O;
|
|
34928
34928
|
if (!y)
|
|
34929
34929
|
return;
|
|
34930
|
-
const C = await
|
|
34930
|
+
const C = await se(e, Nr, "getBlock")({
|
|
34931
34931
|
blockNumber: (O = A.result) == null ? void 0 : O.number,
|
|
34932
34932
|
includeTransactions: u
|
|
34933
34933
|
}).catch(() => {
|
|
@@ -34966,7 +34966,7 @@ function GN(e, { address: t, args: r, batch: n = !0, event: s, events: a, fromBl
|
|
|
34966
34966
|
var R;
|
|
34967
34967
|
if (!C) {
|
|
34968
34968
|
try {
|
|
34969
|
-
A = await
|
|
34969
|
+
A = await se(e, D6, "createEventFilter")({
|
|
34970
34970
|
address: t,
|
|
34971
34971
|
args: r,
|
|
34972
34972
|
event: s,
|
|
@@ -34982,10 +34982,10 @@ function GN(e, { address: t, args: r, batch: n = !0, event: s, events: a, fromBl
|
|
|
34982
34982
|
try {
|
|
34983
34983
|
let T;
|
|
34984
34984
|
if (A)
|
|
34985
|
-
T = await
|
|
34985
|
+
T = await se(e, Au, "getFilterChanges")({ filter: A });
|
|
34986
34986
|
else {
|
|
34987
|
-
const h = await
|
|
34988
|
-
v && v !== h ? T = await
|
|
34987
|
+
const h = await se(e, mc, "getBlockNumber")({});
|
|
34988
|
+
v && v !== h ? T = await se(e, I0, "getLogs")({
|
|
34989
34989
|
address: t,
|
|
34990
34990
|
args: r,
|
|
34991
34991
|
event: s,
|
|
@@ -35009,7 +35009,7 @@ function GN(e, { address: t, args: r, batch: n = !0, event: s, events: a, fromBl
|
|
|
35009
35009
|
interval: u
|
|
35010
35010
|
});
|
|
35011
35011
|
return async () => {
|
|
35012
|
-
A && await
|
|
35012
|
+
A && await se(e, Su, "uninstallFilter")({ filter: A }), O();
|
|
35013
35013
|
};
|
|
35014
35014
|
});
|
|
35015
35015
|
})() : (() => {
|
|
@@ -35084,12 +35084,12 @@ function jN(e, { batch: t = !0, onError: r, onTransactions: n, poll: s, pollingI
|
|
|
35084
35084
|
try {
|
|
35085
35085
|
if (!d)
|
|
35086
35086
|
try {
|
|
35087
|
-
d = await
|
|
35087
|
+
d = await se(e, _6, "createPendingTransactionFilter")({});
|
|
35088
35088
|
return;
|
|
35089
35089
|
} catch (g) {
|
|
35090
35090
|
throw f(), g;
|
|
35091
35091
|
}
|
|
35092
|
-
const y = await
|
|
35092
|
+
const y = await se(e, Au, "getFilterChanges")({ filter: d });
|
|
35093
35093
|
if (y.length === 0)
|
|
35094
35094
|
return;
|
|
35095
35095
|
if (t)
|
|
@@ -35105,7 +35105,7 @@ function jN(e, { batch: t = !0, onError: r, onTransactions: n, poll: s, pollingI
|
|
|
35105
35105
|
interval: a
|
|
35106
35106
|
});
|
|
35107
35107
|
return async () => {
|
|
35108
|
-
d && await
|
|
35108
|
+
d && await se(e, Su, "uninstallFilter")({ filter: d }), f();
|
|
35109
35109
|
};
|
|
35110
35110
|
});
|
|
35111
35111
|
})() : (() => {
|
|
@@ -35317,7 +35317,7 @@ async function Y6(e, t) {
|
|
|
35317
35317
|
chainId: n,
|
|
35318
35318
|
nonce: s
|
|
35319
35319
|
};
|
|
35320
|
-
return typeof i.chainId > "u" && (i.chainId = ((c = e.chain) == null ? void 0 : c.id) ?? await
|
|
35320
|
+
return typeof i.chainId > "u" && (i.chainId = ((c = e.chain) == null ? void 0 : c.id) ?? await se(e, Ts, "getChainId")({})), typeof i.nonce > "u" && (i.nonce = await se(e, C0, "getTransactionCount")({
|
|
35321
35321
|
address: a.address,
|
|
35322
35322
|
blockTag: "pending"
|
|
35323
35323
|
}), (o === "self" || o != null && o.address && uc(o.address, a.address)) && (i.nonce += 1)), i;
|
|
@@ -35362,7 +35362,7 @@ async function K6(e, t) {
|
|
|
35362
35362
|
})();
|
|
35363
35363
|
if ((C == null ? void 0 : C.type) === "json-rpc" || C === null) {
|
|
35364
35364
|
let x;
|
|
35365
|
-
n !== null && (x = await
|
|
35365
|
+
n !== null && (x = await se(e, Ts, "getChainId")({}), Hf({
|
|
35366
35366
|
currentChainId: x,
|
|
35367
35367
|
chain: n
|
|
35368
35368
|
}));
|
|
@@ -35404,7 +35404,7 @@ async function K6(e, t) {
|
|
|
35404
35404
|
});
|
|
35405
35405
|
throw N;
|
|
35406
35406
|
}
|
|
35407
|
-
})(), U = await
|
|
35407
|
+
})(), U = await se(e, q6, "waitForTransactionReceipt")({
|
|
35408
35408
|
checkReplacement: !1,
|
|
35409
35409
|
hash: P,
|
|
35410
35410
|
pollingInterval: y,
|
|
@@ -35415,7 +35415,7 @@ async function K6(e, t) {
|
|
|
35415
35415
|
return U;
|
|
35416
35416
|
}
|
|
35417
35417
|
if ((C == null ? void 0 : C.type) === "local") {
|
|
35418
|
-
const x = await
|
|
35418
|
+
const x = await se(e, fc, "prepareTransactionRequest")({
|
|
35419
35419
|
account: C,
|
|
35420
35420
|
accessList: s,
|
|
35421
35421
|
authorizationList: a,
|
|
@@ -35437,7 +35437,7 @@ async function K6(e, t) {
|
|
|
35437
35437
|
}), S = (h = n == null ? void 0 : n.serializers) == null ? void 0 : h.transaction, I = await C.signTransaction(x, {
|
|
35438
35438
|
serializer: S
|
|
35439
35439
|
});
|
|
35440
|
-
return await
|
|
35440
|
+
return await se(e, M0, "sendRawTransactionSync")({
|
|
35441
35441
|
serializedTransaction: I,
|
|
35442
35442
|
throwOnReceiptRevert: g
|
|
35443
35443
|
});
|
|
@@ -35511,7 +35511,7 @@ async function lz(e, t) {
|
|
|
35511
35511
|
account: a,
|
|
35512
35512
|
...t
|
|
35513
35513
|
});
|
|
35514
|
-
const o = await
|
|
35514
|
+
const o = await se(e, Ts, "getChainId")({});
|
|
35515
35515
|
n !== null && Hf({
|
|
35516
35516
|
currentChainId: o,
|
|
35517
35517
|
chain: n
|
|
@@ -35857,7 +35857,7 @@ const tf = Ki({}), kz = new v3({
|
|
|
35857
35857
|
]
|
|
35858
35858
|
}
|
|
35859
35859
|
);
|
|
35860
|
-
}, CK = (e) => /* @__PURE__ */ _(E3, { client: kz, children: /* @__PURE__ */ _(Sz, { ...e }) }),
|
|
35860
|
+
}, CK = (e) => /* @__PURE__ */ _(E3, { client: kz, children: /* @__PURE__ */ _(Sz, { ...e }) }), ne = () => {
|
|
35861
35861
|
if (!tf)
|
|
35862
35862
|
throw new Error("useSpotContext must be used within a WidgetProvider");
|
|
35863
35863
|
return Kl(tf);
|
|
@@ -39013,7 +39013,7 @@ function JG(e) {
|
|
|
39013
39013
|
});
|
|
39014
39014
|
}
|
|
39015
39015
|
const ju = (e, t) => re(() => xf(e, t), [e, t]), Lr = (e, t) => re(() => Hn(e, t), [e, t]), xc = () => {
|
|
39016
|
-
const { chainId: e } =
|
|
39016
|
+
const { chainId: e } = ne();
|
|
39017
39017
|
return re(() => bo(e), [e]);
|
|
39018
39018
|
}, Gd = (e) => {
|
|
39019
39019
|
const t = xc();
|
|
@@ -39022,20 +39022,20 @@ const ju = (e, t) => re(() => xf(e, t), [e, t]), Lr = (e, t) => re(() => Hn(e, t
|
|
|
39022
39022
|
return eu(e, t.id);
|
|
39023
39023
|
}, [e, t]);
|
|
39024
39024
|
}, ca = (e, t) => re(() => !e || !t || H(e || "0").isZero() || H(t || "0").isZero() ? "" : H(e || "0").times(t).toFixed(), [e, t]), ej = () => {
|
|
39025
|
-
const { srcToken: e, dstToken: t, chainId: r } =
|
|
39025
|
+
const { srcToken: e, dstToken: t, chainId: r } = ne();
|
|
39026
39026
|
return re(() => $b(e, t, r), [e, t, r]);
|
|
39027
39027
|
}, tj = () => {
|
|
39028
|
-
const { srcToken: e, dstToken: t, chainId: r } =
|
|
39028
|
+
const { srcToken: e, dstToken: t, chainId: r } = ne();
|
|
39029
39029
|
return re(() => Hb(e, t, r), [e, t, r]);
|
|
39030
39030
|
}, rj = () => {
|
|
39031
39031
|
const e = ej(), t = tj();
|
|
39032
39032
|
return e || t;
|
|
39033
39033
|
}, im = (e) => {
|
|
39034
|
-
const { overrides: t } =
|
|
39034
|
+
const { overrides: t } = ne();
|
|
39035
39035
|
return re(() => t != null && t.dateFormat ? t.dateFormat(e || 0) : J(e).format("DD/MM/YYYY HH:mm"), [e, t == null ? void 0 : t.dateFormat]);
|
|
39036
39036
|
};
|
|
39037
39037
|
function nj() {
|
|
39038
|
-
const { callbacks: e } =
|
|
39038
|
+
const { callbacks: e } = ne();
|
|
39039
39039
|
return Be(
|
|
39040
39040
|
async (t) => {
|
|
39041
39041
|
var r;
|
|
@@ -39050,7 +39050,7 @@ function nj() {
|
|
|
39050
39050
|
}
|
|
39051
39051
|
const sj = (e, t) => re(() => Bl(e == null ? void 0 : e.toString(), t), [e, t]), Ve = ({ value: e, decimalScale: t = 3, prefix: r, suffix: n }) => {
|
|
39052
39052
|
var c;
|
|
39053
|
-
const s = sj(e, t), { overrides: a } =
|
|
39053
|
+
const s = sj(e, t), { overrides: a } = ne(), o = a == null ? void 0 : a.numberFormat, i = JG({
|
|
39054
39054
|
allowLeadingZeros: !0,
|
|
39055
39055
|
thousandSeparator: ",",
|
|
39056
39056
|
displayType: "text",
|
|
@@ -39153,7 +39153,7 @@ function MV(e) {
|
|
|
39153
39153
|
return t;
|
|
39154
39154
|
}
|
|
39155
39155
|
const Ne = () => {
|
|
39156
|
-
const e =
|
|
39156
|
+
const e = ne();
|
|
39157
39157
|
return Be(
|
|
39158
39158
|
(r, n) => {
|
|
39159
39159
|
var o, i;
|
|
@@ -39191,7 +39191,7 @@ const Ne = () => {
|
|
|
39191
39191
|
] });
|
|
39192
39192
|
}, HV = ({ trades: e, label: t, tooltip: r }) => e === 1 ? null : /* @__PURE__ */ _(fr, { title: t, tooltip: r, children: e }), GV = () => {
|
|
39193
39193
|
var s;
|
|
39194
|
-
const e = Ne(), { account: t } =
|
|
39194
|
+
const e = Ne(), { account: t } = ne(), r = (s = xc()) == null ? void 0 : s.explorer, n = Nb(t);
|
|
39195
39195
|
return /* @__PURE__ */ _(fr, { title: e("recipient") || "", children: r ? /* @__PURE__ */ _("a", { href: `${r}/address/${t}`, target: "_blank", children: n }) : n });
|
|
39196
39196
|
}, jV = ({ fillDelayMillis: e, chunks: t = 0, label: r, tooltip: n }) => {
|
|
39197
39197
|
const s = re(() => e8(e), [e]);
|
|
@@ -39204,7 +39204,7 @@ const Ne = () => {
|
|
|
39204
39204
|
onClick: s,
|
|
39205
39205
|
style: a
|
|
39206
39206
|
}) => {
|
|
39207
|
-
const { components: o } =
|
|
39207
|
+
const { components: o } = ne(), i = o.Tooltip;
|
|
39208
39208
|
return /* @__PURE__ */ fe("div", { className: `${n} twap-order-details__detail-row`, onClick: s, style: a, children: [
|
|
39209
39209
|
/* @__PURE__ */ fe("div", { className: "twap-order-details__detail-row-label", children: [
|
|
39210
39210
|
/* @__PURE__ */ _("p", { className: "twap-order-details__detail-row-label-value", children: e }),
|
|
@@ -39213,7 +39213,7 @@ const Ne = () => {
|
|
|
39213
39213
|
/* @__PURE__ */ _("div", { className: "twap-order-details__detail-row-value", children: r })
|
|
39214
39214
|
] });
|
|
39215
39215
|
}, VV = ({ id: e }) => {
|
|
39216
|
-
const { components: t } =
|
|
39216
|
+
const { components: t } = ne(), r = t == null ? void 0 : t.Tooltip, n = nj();
|
|
39217
39217
|
return e.startsWith("0x") ? /* @__PURE__ */ _(fr, { title: "ID", onClick: () => n(e), style: { cursor: "pointer" }, children: r && /* @__PURE__ */ _(r, { tooltipText: e, children: /* @__PURE__ */ fe("div", { className: "twap-order-details__detail-row-value-id", children: [
|
|
39218
39218
|
/* @__PURE__ */ _("p", { children: Nb(e) }),
|
|
39219
39219
|
/* @__PURE__ */ _(Mz.AiOutlineCopy, {})
|
|
@@ -39244,7 +39244,7 @@ Ee.Container = qV;
|
|
|
39244
39244
|
Ee.OrderVersion = WV;
|
|
39245
39245
|
Ee.USD = Vu;
|
|
39246
39246
|
const cm = () => {
|
|
39247
|
-
const { publicClient: e } =
|
|
39247
|
+
const { publicClient: e } = ne();
|
|
39248
39248
|
return Wn({
|
|
39249
39249
|
mutationFn: async (t) => {
|
|
39250
39250
|
if (!e) throw new Error("publicClient is not defined");
|
|
@@ -39265,7 +39265,7 @@ const cm = () => {
|
|
|
39265
39265
|
}
|
|
39266
39266
|
}).mutateAsync;
|
|
39267
39267
|
}, lm = () => {
|
|
39268
|
-
const { account: e, walletClient: t, publicClient: r, config: n, callbacks: s, chainId: a } =
|
|
39268
|
+
const { account: e, walletClient: t, publicClient: r, config: n, callbacks: s, chainId: a } = ne(), o = cm(), i = Y((u) => u.updateState), c = async (u) => {
|
|
39269
39269
|
pt.onCancelOrderRequest(
|
|
39270
39270
|
u.map((d) => d.id.toString()),
|
|
39271
39271
|
1
|
|
@@ -39341,13 +39341,13 @@ const cm = () => {
|
|
|
39341
39341
|
const t = Ne();
|
|
39342
39342
|
return re(() => e ? e.type === bt.TRIGGER_PRICE_MARKET ? t("triggerPriceMarket") : e.type === bt.TRIGGER_PRICE_LIMIT ? t("triggerPriceLimit") : e.type === bt.TWAP_MARKET ? t("twapMarket") : e.type === bt.TWAP_LIMIT ? t("twapLimit") : t("twapMarket") : t("twapMarket"), [t, e == null ? void 0 : e.type]);
|
|
39343
39343
|
}, um = () => {
|
|
39344
|
-
const { account: e, config: t, chainId: r } =
|
|
39344
|
+
const { account: e, config: t, chainId: r } = ne();
|
|
39345
39345
|
return re(
|
|
39346
39346
|
() => ["useTwapOrderHistoryManager", e, t == null ? void 0 : t.partner, r],
|
|
39347
39347
|
[e, t, r]
|
|
39348
39348
|
);
|
|
39349
39349
|
}, KV = () => {
|
|
39350
|
-
const e = Ql(), { account: t } =
|
|
39350
|
+
const e = Ql(), { account: t } = ne(), r = um();
|
|
39351
39351
|
return Be(
|
|
39352
39352
|
(n) => {
|
|
39353
39353
|
e.setQueryData(r, (s) => s ? s != null && s.some((a) => a.id === n.id) ? s : [n, ...s] : [n]);
|
|
@@ -39355,7 +39355,7 @@ const cm = () => {
|
|
|
39355
39355
|
[e, r, t]
|
|
39356
39356
|
);
|
|
39357
39357
|
}, ZV = () => {
|
|
39358
|
-
const { callbacks: e, refetchBalances: t } =
|
|
39358
|
+
const { callbacks: e, refetchBalances: t } = ne(), r = Ql(), n = um();
|
|
39359
39359
|
return Be(
|
|
39360
39360
|
(s) => {
|
|
39361
39361
|
var c;
|
|
@@ -39371,7 +39371,7 @@ const cm = () => {
|
|
|
39371
39371
|
[r, n, e, t]
|
|
39372
39372
|
);
|
|
39373
39373
|
}, XV = () => {
|
|
39374
|
-
const { account: e, config: t, chainId: r } =
|
|
39374
|
+
const { account: e, config: t, chainId: r } = ne(), n = um(), s = ZV();
|
|
39375
39375
|
return D3({
|
|
39376
39376
|
refetchInterval: Pz,
|
|
39377
39377
|
refetchOnWindowFocus: !0,
|
|
@@ -39566,7 +39566,7 @@ const cm = () => {
|
|
|
39566
39566
|
}
|
|
39567
39567
|
}), [e, t, r, n, s, a, i]);
|
|
39568
39568
|
}, J2 = (e) => {
|
|
39569
|
-
const { orders: t } = Wu(), { config: r, useToken: n } =
|
|
39569
|
+
const { orders: t } = Wu(), { config: r, useToken: n } = ne(), s = Ne(), a = re(() => t == null ? void 0 : t.all.find((g) => g.id === e), [t, e]) || {}, o = K2(a), i = n == null ? void 0 : n(a == null ? void 0 : a.srcTokenAddress), c = n == null ? void 0 : n(a == null ? void 0 : a.dstTokenAddress), l = QV(i, c, a), u = Ve({ value: JV(i, c, a) }), d = Ve({ value: Lr(i == null ? void 0 : i.decimals, a == null ? void 0 : a.srcAmountFilled) }), f = Ve({ value: Lr(c == null ? void 0 : c.decimals, a == null ? void 0 : a.dstAmountFilled) }), m = Ve({ value: a == null ? void 0 : a.progress, decimalScale: 2 }), y = Q2({
|
|
39570
39570
|
srcToken: i,
|
|
39571
39571
|
dstToken: c,
|
|
39572
39572
|
limitPrice: l,
|
|
@@ -39617,7 +39617,7 @@ const cm = () => {
|
|
|
39617
39617
|
}
|
|
39618
39618
|
}), [a, s, u, d, f, m, o, i, c, y]);
|
|
39619
39619
|
}, ex = Ki({}), $t = () => Kl(ex), eW = () => {
|
|
39620
|
-
const e = Y((c) => c.state.selectedOrderID), t = J2(e), r = Ne(), [n, s] = Zl("panel1"), { components: a } =
|
|
39620
|
+
const e = Y((c) => c.state.selectedOrderID), t = J2(e), r = Ne(), [n, s] = Zl("panel1"), { components: a } = ne(), o = a.TokenLogo;
|
|
39621
39621
|
ns(() => {
|
|
39622
39622
|
s("panel1");
|
|
39623
39623
|
}, [t.id.value]);
|
|
@@ -39781,7 +39781,7 @@ const cm = () => {
|
|
|
39781
39781
|
(r = e.data.dstToken) == null ? void 0 : r.symbol
|
|
39782
39782
|
] }) }) : null;
|
|
39783
39783
|
}, dW = () => {
|
|
39784
|
-
const { order: e } = $t(), { mutateAsync: t, isPending: r } = lm(), { components: n } =
|
|
39784
|
+
const { order: e } = $t(), { mutateAsync: t, isPending: r } = lm(), { components: n } = ne(), s = n.Button, a = Be(async () => t({ orders: [e.original] }), [t, e]);
|
|
39785
39785
|
return !e || e.original.status !== yt.Open || !s ? null : /* @__PURE__ */ _(
|
|
39786
39786
|
s,
|
|
39787
39787
|
{
|
|
@@ -43188,7 +43188,7 @@ const Zq = () => /* @__PURE__ */ _("div", { className: "twap-orders__loader", ch
|
|
|
43188
43188
|
/* @__PURE__ */ _("p", { className: "twap-orders__list-item-header-status", children: t })
|
|
43189
43189
|
] });
|
|
43190
43190
|
}, tb = (e) => {
|
|
43191
|
-
const { useToken: t, components: r } =
|
|
43191
|
+
const { useToken: t, components: r } = ne(), n = t == null ? void 0 : t(e.address);
|
|
43192
43192
|
return /* @__PURE__ */ _("div", { className: "twap-orders__list-item-token", children: n ? /* @__PURE__ */ fe(mo, { children: [
|
|
43193
43193
|
/* @__PURE__ */ _("div", { className: "twap-orders__list-item-token-logo", children: r.TokenLogo ? /* @__PURE__ */ _(r.TokenLogo, { token: n }) : /* @__PURE__ */ _(Kq, { logo: n == null ? void 0 : n.logoUrl }) }),
|
|
43194
43194
|
/* @__PURE__ */ _("p", { className: "twap-orders__list-item-token-symbol", children: n == null ? void 0 : n.symbol })
|
|
@@ -43204,7 +43204,7 @@ const rY = () => {
|
|
|
43204
43204
|
const e = Y((r) => r.state.selectedOrderID);
|
|
43205
43205
|
return /* @__PURE__ */ _("div", { className: `twap-orders ${e !== void 0 ? "twap-orders__show-selected" : ""}`, children: e !== void 0 ? /* @__PURE__ */ _(eW, {}) : /* @__PURE__ */ _(Xq, {}) });
|
|
43206
43206
|
}, nY = (e) => {
|
|
43207
|
-
const t = Ne(), { marketPrice: r } =
|
|
43207
|
+
const t = Ne(), { marketPrice: r } = ne(), n = Y((a) => a.state.typedSrcAmount);
|
|
43208
43208
|
return re(() => {
|
|
43209
43209
|
const { isError: a, value: o } = yw(e);
|
|
43210
43210
|
if (!(!a || H(n || "0").isZero() || !r))
|
|
@@ -43234,14 +43234,14 @@ const rY = () => {
|
|
|
43234
43234
|
tooltip: n("tradeIntervalTootlip")
|
|
43235
43235
|
};
|
|
43236
43236
|
}, Xr = () => {
|
|
43237
|
-
const { srcToken: e } =
|
|
43237
|
+
const { srcToken: e } = ne(), t = Ne(), r = Y((a) => a.state.typedSrcAmount), s = Y((a) => a.state.acceptedSrcAmount) || r;
|
|
43238
43238
|
return {
|
|
43239
43239
|
amountWei: ju(e == null ? void 0 : e.decimals, s),
|
|
43240
43240
|
amountUI: s,
|
|
43241
43241
|
error: H(s || 0).isZero() ? t("enterAmount") : void 0
|
|
43242
43242
|
};
|
|
43243
43243
|
}, sY = (e, t) => {
|
|
43244
|
-
const { module: r, srcUsd1Token: n, marketPrice: s, minChunkSizeUsd: a } =
|
|
43244
|
+
const { module: r, srcUsd1Token: n, marketPrice: s, minChunkSizeUsd: a } = ne(), o = Ne(), i = Y((c) => c.state.typedSrcAmount);
|
|
43245
43245
|
return re(() => {
|
|
43246
43246
|
if (H(i || "0").isZero() || !s) return;
|
|
43247
43247
|
if (!e)
|
|
@@ -43266,7 +43266,7 @@ const rY = () => {
|
|
|
43266
43266
|
};
|
|
43267
43267
|
}, [e, t, r, i, n, a, o, s]);
|
|
43268
43268
|
}, pn = () => {
|
|
43269
|
-
const { srcToken: e, srcUsd1Token: t, module: r, minChunkSizeUsd: n } =
|
|
43269
|
+
const { srcToken: e, srcUsd1Token: t, module: r, minChunkSizeUsd: n } = ne(), s = Y((g) => g.state.typedChunks), a = xa().fillDelay, o = Y((g) => g.updateState), { amountWei: i, amountUI: c } = Xr(), l = re(
|
|
43270
43270
|
() => cw(a, c || "", t || "", n || 0),
|
|
43271
43271
|
[c, t, n, a]
|
|
43272
43272
|
), u = re(() => iw(l, r, s), [l, s, r]), d = Be(
|
|
@@ -43285,7 +43285,7 @@ const rY = () => {
|
|
|
43285
43285
|
error: sY(u, l)
|
|
43286
43286
|
};
|
|
43287
43287
|
}, IK = () => {
|
|
43288
|
-
const { srcToken: e, dstToken: t } =
|
|
43288
|
+
const { srcToken: e, dstToken: t } = ne(), r = Ne(), { onChange: n, totalTrades: s, amountPerTradeUsd: a, amountPerTradeUI: o, error: i, maxTrades: c, amountPerTradeWei: l } = pn(), u = Ve({ value: o }), d = Ve({ value: a });
|
|
43289
43289
|
return {
|
|
43290
43290
|
error: i,
|
|
43291
43291
|
maxTrades: c,
|
|
@@ -43300,7 +43300,7 @@ const rY = () => {
|
|
|
43300
43300
|
toToken: t
|
|
43301
43301
|
};
|
|
43302
43302
|
}, BK = () => {
|
|
43303
|
-
const { srcToken: e, dstToken: t, marketPrice: r } =
|
|
43303
|
+
const { srcToken: e, dstToken: t, marketPrice: r } = ne(), [n, s] = Zl(!1), a = re(() => {
|
|
43304
43304
|
if (H(r || "0").isZero() || !t) return "0";
|
|
43305
43305
|
const o = Hn(t == null ? void 0 : t.decimals, r);
|
|
43306
43306
|
return n ? H(1).div(o || 0).toFixed() : o;
|
|
@@ -43313,7 +43313,7 @@ const rY = () => {
|
|
|
43313
43313
|
onInvert: Be(() => s(!n), [n])
|
|
43314
43314
|
};
|
|
43315
43315
|
}, aY = (e) => {
|
|
43316
|
-
const { module: t, marketPrice: r } =
|
|
43316
|
+
const { module: t, marketPrice: r } = ne(), n = Ne();
|
|
43317
43317
|
return re(() => {
|
|
43318
43318
|
const s = hw(t, e), a = bw(e);
|
|
43319
43319
|
if (r) {
|
|
@@ -43332,14 +43332,14 @@ const rY = () => {
|
|
|
43332
43332
|
}
|
|
43333
43333
|
}, [e, n, t, r]);
|
|
43334
43334
|
}, km = () => {
|
|
43335
|
-
const { module: e } =
|
|
43335
|
+
const { module: e } = ne(), t = Y((i) => i.state.typedDuration), r = Y((i) => i.updateState), n = pn().totalTrades, s = xa().fillDelay, a = re(() => ow(e, n, s, t), [n, s, t, e]), o = aY(a);
|
|
43336
43336
|
return {
|
|
43337
43337
|
duration: a,
|
|
43338
43338
|
setDuration: Be((i) => r({ typedDuration: i }), [r]),
|
|
43339
43339
|
error: o
|
|
43340
43340
|
};
|
|
43341
43341
|
}, FK = () => {
|
|
43342
|
-
const { module: e } =
|
|
43342
|
+
const { module: e } = ne(), t = Ne(), { duration: r, setDuration: n, error: s } = km(), a = Be(
|
|
43343
43343
|
(c) => {
|
|
43344
43344
|
n({ unit: r.unit, value: Number(c) });
|
|
43345
43345
|
},
|
|
@@ -43361,7 +43361,7 @@ const rY = () => {
|
|
|
43361
43361
|
error: s
|
|
43362
43362
|
};
|
|
43363
43363
|
}, UK = () => {
|
|
43364
|
-
const e = Y((s) => s.state.isMarketOrder), { module: t } =
|
|
43364
|
+
const e = Y((s) => s.state.isMarketOrder), { module: t } = ne(), r = Ne(), n = t === Pe.STOP_LOSS || t === Pe.TAKE_PROFIT;
|
|
43365
43365
|
return re(() => {
|
|
43366
43366
|
if (!n)
|
|
43367
43367
|
return {
|
|
@@ -43373,7 +43373,7 @@ const rY = () => {
|
|
|
43373
43373
|
const e = Y((r) => r.state.currentTime), t = km().duration;
|
|
43374
43374
|
return re(() => lw(e, t), [e, t]);
|
|
43375
43375
|
}, Tm = () => {
|
|
43376
|
-
const { srcToken: e, dstToken: t, marketPriceLoading: r } =
|
|
43376
|
+
const { srcToken: e, dstToken: t, marketPriceLoading: r } = ne(), n = Y((l) => l.updateState), s = Y((l) => l.state.isInvertedTrade), a = Y((l) => l.state.typedTriggerPrice), o = Y((l) => l.state.typedLimitPrice), i = Y((l) => l.state.isMarketOrder);
|
|
43377
43377
|
return {
|
|
43378
43378
|
onInvert: Be(() => {
|
|
43379
43379
|
a !== void 0 && n({ typedTriggerPrice: H(1).div(a).toFixed() }), o !== void 0 && n({ typedLimitPrice: H(1).div(o).toFixed() }), n({ isInvertedTrade: !s });
|
|
@@ -43391,7 +43391,7 @@ const rY = () => {
|
|
|
43391
43391
|
setValue: s,
|
|
43392
43392
|
setPercentage: a
|
|
43393
43393
|
}) => {
|
|
43394
|
-
const { srcUsd1Token: o, dstUsd1Token: i } =
|
|
43394
|
+
const { srcUsd1Token: o, dstUsd1Token: i } = ne(), { isInverted: c } = Tm(), l = re(() => {
|
|
43395
43395
|
if (e !== void 0) {
|
|
43396
43396
|
const g = c ? H(e).isZero() ? H(0) : H(1).div(e) : H(e);
|
|
43397
43397
|
return xf(t, g.toFixed());
|
|
@@ -43442,13 +43442,13 @@ const rY = () => {
|
|
|
43442
43442
|
usd: H(y).isNaN() ? "" : y
|
|
43443
43443
|
};
|
|
43444
43444
|
}, oY = () => {
|
|
43445
|
-
const { module: e } =
|
|
43445
|
+
const { module: e } = ne();
|
|
43446
43446
|
return re(() => e === Pe.STOP_LOSS ? K5 : Z5, [e]);
|
|
43447
43447
|
}, Am = () => {
|
|
43448
|
-
const { module: e } =
|
|
43448
|
+
const { module: e } = ne(), t = Y((r) => r.state.isMarketOrder);
|
|
43449
43449
|
return re(() => e !== Pe.STOP_LOSS && e !== Pe.TAKE_PROFIT || t ? void 0 : e === Pe.STOP_LOSS ? X5 : Q5, [e, t]);
|
|
43450
43450
|
}, iY = (e = "") => {
|
|
43451
|
-
const { module: t, marketPrice: r } =
|
|
43451
|
+
const { module: t, marketPrice: r } = ne(), n = Ne(), s = Y((a) => a.state.typedSrcAmount);
|
|
43452
43452
|
return re(() => {
|
|
43453
43453
|
if (H(s || "0").isZero() || !r || t !== Pe.STOP_LOSS && t !== Pe.TAKE_PROFIT) return;
|
|
43454
43454
|
const a = dw(r || "", e || "", t);
|
|
@@ -43473,13 +43473,13 @@ const rY = () => {
|
|
|
43473
43473
|
};
|
|
43474
43474
|
}, [r, e, t, n, s]);
|
|
43475
43475
|
}, cY = (e) => {
|
|
43476
|
-
const { srcToken: t, dstToken: r, module: n } =
|
|
43476
|
+
const { srcToken: t, dstToken: r, module: n } = ne(), s = pn().amountPerTradeWei, a = Y((i) => i.state.isMarketOrder), o = re(() => aw(n, s, e, (t == null ? void 0 : t.decimals) || 0), [e, s, a, t == null ? void 0 : t.decimals, n]);
|
|
43477
43477
|
return {
|
|
43478
43478
|
amountWei: o,
|
|
43479
43479
|
amountUI: Lr((r == null ? void 0 : r.decimals) || 0, o)
|
|
43480
43480
|
};
|
|
43481
43481
|
}, wa = () => {
|
|
43482
|
-
const { dstToken: e, marketPrice: t, module: r } =
|
|
43482
|
+
const { dstToken: e, marketPrice: t, module: r } = ne(), n = Y((m) => m.updateState), s = oY(), a = Y((m) => m.state.triggerPricePercent), o = Be(
|
|
43483
43483
|
(m) => {
|
|
43484
43484
|
n({ triggerPricePercent: m });
|
|
43485
43485
|
},
|
|
@@ -43499,7 +43499,7 @@ const rY = () => {
|
|
|
43499
43499
|
pricePerChunkUI: f
|
|
43500
43500
|
}), [l, u, d, f]);
|
|
43501
43501
|
}, OK = () => {
|
|
43502
|
-
const { module: e, marketPrice: t, marketPriceLoading: r } =
|
|
43502
|
+
const { module: e, marketPrice: t, marketPriceLoading: r } = ne(), n = Ne(), { amountUI: s, onChange: a, onPercentageChange: o, usd: i, selectedPercentage: c, error: l } = wa(), u = Y((v) => v.state.isMarketOrder), d = Y((v) => v.updateState), { isInverted: f, onInvert: m, fromToken: y, toToken: g } = Tm(), E = Be(() => {
|
|
43503
43503
|
d({ triggerPricePercent: void 0, typedTriggerPrice: void 0 });
|
|
43504
43504
|
}, [d]), w = e !== Pe.STOP_LOSS && e !== Pe.TAKE_PROFIT;
|
|
43505
43505
|
return {
|
|
@@ -43522,7 +43522,7 @@ const rY = () => {
|
|
|
43522
43522
|
onInvert: m
|
|
43523
43523
|
};
|
|
43524
43524
|
}, lY = (e) => {
|
|
43525
|
-
const { module: t, marketPrice: r } =
|
|
43525
|
+
const { module: t, marketPrice: r } = ne(), n = Ne(), { amountWei: s } = wa(), a = Y((i) => i.state.isMarketOrder), o = Y((i) => i.state.typedSrcAmount);
|
|
43526
43526
|
return re(() => {
|
|
43527
43527
|
if (H(o || "0").isZero() || !s || !r) return;
|
|
43528
43528
|
const i = fw(s, e, a, t), c = mw(s, e, a, t);
|
|
@@ -43546,7 +43546,7 @@ const rY = () => {
|
|
|
43546
43546
|
};
|
|
43547
43547
|
}, [e, n, s, t, a, o, r]);
|
|
43548
43548
|
}, Xu = () => {
|
|
43549
|
-
const { dstToken: e, marketPrice: t, module: r } =
|
|
43549
|
+
const { dstToken: e, marketPrice: t, module: r } = ne(), n = Y((l) => l.updateState), s = Am(), a = Y((l) => l.state.limitPricePercent), o = a === void 0 ? s : a, i = _x({
|
|
43550
43550
|
typedValue: Y((l) => l.state.typedLimitPrice),
|
|
43551
43551
|
percentage: o,
|
|
43552
43552
|
tokenDecimals: e == null ? void 0 : e.decimals,
|
|
@@ -43564,7 +43564,7 @@ const rY = () => {
|
|
|
43564
43564
|
error: c
|
|
43565
43565
|
}), [i, c]);
|
|
43566
43566
|
}, uY = () => {
|
|
43567
|
-
const { module: e } =
|
|
43567
|
+
const { module: e } = ne(), t = Y((i) => i.updateState), r = Y((i) => i.state.isMarketOrder), n = Am(), s = Y((i) => i.state.triggerPricePercent) || 0, a = e === Pe.LIMIT, o = Be(() => {
|
|
43568
43568
|
!r && e === Pe.STOP_LOSS && t({ limitPricePercent: n }), t({ isMarketOrder: !r });
|
|
43569
43569
|
}, [t, s, e, r, n]);
|
|
43570
43570
|
return {
|
|
@@ -43573,7 +43573,7 @@ const rY = () => {
|
|
|
43573
43573
|
hide: a
|
|
43574
43574
|
};
|
|
43575
43575
|
}, DK = () => {
|
|
43576
|
-
const { module: e, marketPriceLoading: t } =
|
|
43576
|
+
const { module: e, marketPriceLoading: t } = ne(), r = Ne(), { amountUI: n, onChange: s, onPercentageChange: a, usd: o, selectedPercentage: i, error: c } = Xu(), l = Y((R) => R.state.isMarketOrder), u = Y((R) => R.updateState), d = Am(), { isLimitPrice: f, toggleLimitPrice: m } = uY(), { triggerPricePercent: y } = Y((R) => R.state), { isInverted: g, onInvert: E, fromToken: w, toToken: v } = Tm(), A = re(() => {
|
|
43577
43577
|
if (!(e !== Pe.STOP_LOSS && e !== Pe.TAKE_PROFIT || !l))
|
|
43578
43578
|
return {
|
|
43579
43579
|
text: r("triggerMarketPriceDisclaimer"),
|
|
@@ -43602,16 +43602,16 @@ const rY = () => {
|
|
|
43602
43602
|
onInvert: E
|
|
43603
43603
|
};
|
|
43604
43604
|
}, Mx = () => {
|
|
43605
|
-
const { module: e, marketPrice: t } =
|
|
43605
|
+
const { module: e, marketPrice: t } = ne(), r = Xu().amountWei, n = wa().amountWei, s = Y((a) => a.state.isMarketOrder);
|
|
43606
43606
|
return e === Pe.LIMIT || !s ? r || "" : e === Pe.STOP_LOSS || e === Pe.TAKE_PROFIT ? n || "" : t || "";
|
|
43607
43607
|
}, kc = () => {
|
|
43608
|
-
const { srcToken: e, dstToken: t } =
|
|
43608
|
+
const { srcToken: e, dstToken: t } = ne(), r = Mx(), n = Xr().amountWei, s = re(() => nw(n || "", r, (e == null ? void 0 : e.decimals) || 0), [n, r, e == null ? void 0 : e.decimals]);
|
|
43609
43609
|
return {
|
|
43610
43610
|
amountWei: s,
|
|
43611
43611
|
amountUI: Lr(t == null ? void 0 : t.decimals, s)
|
|
43612
43612
|
};
|
|
43613
43613
|
}, Sm = () => {
|
|
43614
|
-
const { srcToken: e, dstToken: t, dstUsd1Token: r } =
|
|
43614
|
+
const { srcToken: e, dstToken: t, dstUsd1Token: r } = ne(), n = Mx(), s = pn().amountPerTradeWei, a = Y((c) => c.state.isMarketOrder), o = re(
|
|
43615
43615
|
() => sw(s, n, !!a, (e == null ? void 0 : e.decimals) || 0),
|
|
43616
43616
|
[s, n, a, e == null ? void 0 : e.decimals]
|
|
43617
43617
|
), i = Lr(t == null ? void 0 : t.decimals, o);
|
|
@@ -43621,10 +43621,10 @@ const rY = () => {
|
|
|
43621
43621
|
usd: ca(i, r)
|
|
43622
43622
|
};
|
|
43623
43623
|
}, dY = () => {
|
|
43624
|
-
const { srcUsd1Token: e, dstUsd1Token: t } =
|
|
43624
|
+
const { srcUsd1Token: e, dstUsd1Token: t } = ne(), r = Xr().amountUI, n = kc().amountUI, s = ca(r, e), a = ca(n, t);
|
|
43625
43625
|
return { srcAmountUsd: s, dstAmountUsd: a };
|
|
43626
43626
|
}, pY = () => {
|
|
43627
|
-
const { fees: e, dstUsd1Token: t } =
|
|
43627
|
+
const { fees: e, dstUsd1Token: t } = ne(), { amountUI: r } = kc(), n = re(() => !e || !r ? "" : H(r).multipliedBy(e).dividedBy(100).toFixed(), [r]);
|
|
43628
43628
|
return {
|
|
43629
43629
|
amount: Ve({ value: n }),
|
|
43630
43630
|
percent: Ve({ value: e }),
|
|
@@ -43637,7 +43637,7 @@ const rY = () => {
|
|
|
43637
43637
|
);
|
|
43638
43638
|
return Ve({ value: r, decimalScale: 4 });
|
|
43639
43639
|
}, Rx = () => {
|
|
43640
|
-
const { srcToken: e, dstToken: t, account: r } =
|
|
43640
|
+
const { srcToken: e, dstToken: t, account: r } = ne(), n = Ne(), { amountWei: s } = Xr(), { amountWei: a, usd: o } = Sm(), { totalTrades: i, amountPerTradeWei: c } = pn(), { amountWei: l, usd: u } = wa(), { fillDelay: d } = xa(), f = Cm(), { amountUI: m, usd: y } = Xu(), { amount: g, percent: E, usd: w } = pY(), v = Ve({ value: fY(), decimalScale: 4 }), { srcAmountUsd: A, dstAmountUsd: C } = dY(), O = Q2({
|
|
43641
43641
|
srcToken: e,
|
|
43642
43642
|
dstToken: t,
|
|
43643
43643
|
srcAmount: s,
|
|
@@ -43676,7 +43676,7 @@ const rY = () => {
|
|
|
43676
43676
|
}
|
|
43677
43677
|
}), [O, E, g, n, v, e, t, A, C, o, u, w, y]);
|
|
43678
43678
|
}, Nx = () => {
|
|
43679
|
-
const { srcBalance: e } =
|
|
43679
|
+
const { srcBalance: e } = ne(), t = Ne(), r = Xr().amountWei;
|
|
43680
43680
|
return re(() => {
|
|
43681
43681
|
if (e && H(r).gt(e))
|
|
43682
43682
|
return {
|
|
@@ -43687,12 +43687,12 @@ const rY = () => {
|
|
|
43687
43687
|
}, [e, r, t]);
|
|
43688
43688
|
};
|
|
43689
43689
|
function mY() {
|
|
43690
|
-
const { marketPrice: e, marketPriceLoading: t } =
|
|
43690
|
+
const { marketPrice: e, marketPriceLoading: t } = ne(), r = Y((u) => u.state.typedSrcAmount), n = Nx(), { error: s } = wa(), { error: a } = Xu(), { error: o } = pn(), { error: i } = xa(), { error: c } = km(), l = re(() => Xl("ignore-errors"), []);
|
|
43691
43691
|
if (!(H(e || 0).isZero() || H(r || 0).isZero() || t || l))
|
|
43692
43692
|
return s || a || o || i || c || n;
|
|
43693
43693
|
}
|
|
43694
43694
|
const hY = () => {
|
|
43695
|
-
const { srcToken: e, dstToken: t, chainId: r, account: n, slippage: s, config: a } =
|
|
43695
|
+
const { srcToken: e, dstToken: t, chainId: r, account: n, slippage: s, config: a } = ne(), o = pn().amountPerTradeWei, i = Xr().amountWei, c = Cm(), l = wa().pricePerChunkWei, u = Sm().amountWei, d = xa().fillDelay, f = pn().totalTrades, m = s * 100, y = !f || f === 1 ? 0 : d.unit * d.value;
|
|
43696
43696
|
return re(() => {
|
|
43697
43697
|
var E;
|
|
43698
43698
|
const g = ho((e == null ? void 0 : e.address) || "") ? (E = bo(r)) == null ? void 0 : E.wToken.address : e == null ? void 0 : e.address;
|
|
@@ -43721,7 +43721,7 @@ const hY = () => {
|
|
|
43721
43721
|
refetchBalances: n,
|
|
43722
43722
|
callbacks: s,
|
|
43723
43723
|
chainId: a
|
|
43724
|
-
} =
|
|
43724
|
+
} = ne(), o = (c = xc()) == null ? void 0 : c.wToken, i = cm();
|
|
43725
43725
|
return Wn({
|
|
43726
43726
|
mutationFn: async ({
|
|
43727
43727
|
onHash: l,
|
|
@@ -43759,7 +43759,7 @@ const hY = () => {
|
|
|
43759
43759
|
}
|
|
43760
43760
|
});
|
|
43761
43761
|
}, yY = () => {
|
|
43762
|
-
const { account: e, walletClient: t, chainId: r, callbacks: n } =
|
|
43762
|
+
const { account: e, walletClient: t, chainId: r, callbacks: n } = ne(), s = hY(), a = KV();
|
|
43763
43763
|
return Wn({
|
|
43764
43764
|
mutationFn: async () => {
|
|
43765
43765
|
var y, g, E, w;
|
|
@@ -43801,7 +43801,7 @@ const hY = () => {
|
|
|
43801
43801
|
}
|
|
43802
43802
|
});
|
|
43803
43803
|
}, zx = () => {
|
|
43804
|
-
const { account: e, publicClient: t, config: r } =
|
|
43804
|
+
const { account: e, publicClient: t, config: r } = ne();
|
|
43805
43805
|
return Wn({
|
|
43806
43806
|
mutationFn: async ({
|
|
43807
43807
|
tokenAddress: n,
|
|
@@ -43825,7 +43825,7 @@ const hY = () => {
|
|
|
43825
43825
|
}
|
|
43826
43826
|
});
|
|
43827
43827
|
}, gY = () => {
|
|
43828
|
-
const { account: e, walletClient: t, overrides: r, config: n, chainId: s, callbacks: a } =
|
|
43828
|
+
const { account: e, walletClient: t, overrides: r, config: n, chainId: s, callbacks: a } = ne(), o = cm(), { mutateAsync: i } = zx();
|
|
43829
43829
|
return Wn({
|
|
43830
43830
|
onError: (c) => {
|
|
43831
43831
|
pt.onApproveError(c);
|
|
@@ -43888,7 +43888,7 @@ const hY = () => {
|
|
|
43888
43888
|
}
|
|
43889
43889
|
});
|
|
43890
43890
|
}, xY = () => {
|
|
43891
|
-
const { account: e, chainId: t, srcToken: r, dstToken: n, module: s, slippage: a } =
|
|
43891
|
+
const { account: e, chainId: t, srcToken: r, dstToken: n, module: s, slippage: a } = ne(), o = wa(), i = Xr().amountWei, c = pn().amountPerTradeWei, l = Cm(), u = xa().fillDelay, d = Sm().amountWei, f = Y((m) => m.state.isMarketOrder);
|
|
43892
43892
|
return Wn({
|
|
43893
43893
|
mutationFn: async () => {
|
|
43894
43894
|
pt.onRequestOrder({
|
|
@@ -43918,7 +43918,7 @@ function wY(e) {
|
|
|
43918
43918
|
};
|
|
43919
43919
|
}
|
|
43920
43920
|
const vY = () => {
|
|
43921
|
-
const { srcToken: e, dstToken: t, chainId: r, callbacks: n } =
|
|
43921
|
+
const { srcToken: e, dstToken: t, chainId: r, callbacks: n } = ne(), s = gY().mutateAsync, a = bY().mutateAsync, o = yY().mutateAsync, { mutateAsync: i } = zx(), c = Y((d) => d.updateSwapExecution), { amountWei: l } = Xr(), u = xY().mutate;
|
|
43922
43922
|
return Wn({
|
|
43923
43923
|
mutationFn: async () => {
|
|
43924
43924
|
var f, m;
|
|
@@ -43970,7 +43970,7 @@ const vY = () => {
|
|
|
43970
43970
|
}
|
|
43971
43971
|
});
|
|
43972
43972
|
}, _K = () => {
|
|
43973
|
-
const { marketPrice: e, srcToken: t, dstToken: r, marketPriceLoading: n, srcBalance: s, srcUsd1Token: a, noLiquidity: o } =
|
|
43973
|
+
const { marketPrice: e, srcToken: t, dstToken: r, marketPriceLoading: n, srcBalance: s, srcUsd1Token: a, noLiquidity: o } = ne(), i = Ne(), c = vY(), l = Y((h) => h.updateState), { amountUI: u, amountWei: d } = Xr(), f = Y((h) => h.resetState), m = Y((h) => h.state.swapExecution), y = Y((h) => h.state.typedSrcAmount), g = n || H(a || "0").isZero() || s === void 0 || H(e || "0").isZero(), E = !!(t && r && y && g), w = mY(), v = re(() => o ? i("noLiquidity") : H(y || "0").isZero() ? i("enterAmount") : (w == null ? void 0 : w.type) === qt.INSUFFICIENT_BALANCE ? i("insufficientFunds") : i("placeOrder"), [w, i, y, o]), A = Be(() => {
|
|
43974
43974
|
(m == null ? void 0 : m.status) === Ft.SUCCESS && (l({ typedSrcAmount: "" }), setTimeout(() => {
|
|
43975
43975
|
f();
|
|
43976
43976
|
}, 1e3));
|
|
@@ -43997,7 +43997,7 @@ const vY = () => {
|
|
|
43997
43997
|
}
|
|
43998
43998
|
}), [m, t, r, T, f, A, C, R, v, E, w, o, y]);
|
|
43999
43999
|
}, Lx = (e, t) => {
|
|
44000
|
-
const { marketPriceLoading: r, srcToken: n, dstToken: s, srcBalance: a, dstBalance: o } =
|
|
44000
|
+
const { marketPriceLoading: r, srcToken: n, dstToken: s, srcBalance: a, dstBalance: o } = ne(), i = Y((C) => C.state.typedSrcAmount), c = Y((C) => C.updateState), { srcUsd1Token: l, dstUsd1Token: u } = ne(), d = ca(i, l), f = ca(t, u), m = rj(), y = e ? n : s, g = Lr(y == null ? void 0 : y.decimals, e ? a : o), E = Nx(), w = Be(
|
|
44001
44001
|
(C) => {
|
|
44002
44002
|
e && c({ typedSrcAmount: C });
|
|
44003
44003
|
},
|
|
@@ -44032,7 +44032,7 @@ const vY = () => {
|
|
|
44032
44032
|
const e = Ne(), { wrapTxHash: t, srcToken: r } = Y((o) => o.state.swapExecution), n = (a = (s = xc()) == null ? void 0 : s.wToken) == null ? void 0 : a.symbol;
|
|
44033
44033
|
return t ? /* @__PURE__ */ _("p", { className: "twap-error-wrap-msg", children: e("wrapMsg", { symbol: (r == null ? void 0 : r.symbol) || "", wSymbol: n || "" }) }) : null;
|
|
44034
44034
|
}, CY = (e = !1, t = 1) => {
|
|
44035
|
-
const { module: r } =
|
|
44035
|
+
const { module: r } = ne(), n = Ne();
|
|
44036
44036
|
return re(() => r === Pe.STOP_LOSS ? n("stopLoss") : r === Pe.TAKE_PROFIT ? n("takeProfit") : n(e ? "twapMarket" : t === 1 ? "limit" : "twapLimit"), [n, r, e, t]);
|
|
44037
44037
|
}, TY = ({ price: e, dstTokenSymbol: t, label: r, usd: n }) => /* @__PURE__ */ fe(Ee.DetailRow, { title: r, children: [
|
|
44038
44038
|
`${e || "-"} ${t || ""}`,
|
|
@@ -44063,14 +44063,14 @@ const vY = () => {
|
|
|
44063
44063
|
/* @__PURE__ */ _(Hx, {})
|
|
44064
44064
|
] });
|
|
44065
44065
|
function PY({ error: e }) {
|
|
44066
|
-
const { components: t } =
|
|
44066
|
+
const { components: t } = ne(), r = Ne(), n = Y((o) => {
|
|
44067
44067
|
var i;
|
|
44068
44068
|
return (i = o.state.swapExecution) == null ? void 0 : i.wrapTxHash;
|
|
44069
44069
|
}), s = t.SubmitOrderErrorView, a = /* @__PURE__ */ _(ks.Failed, { error: /* @__PURE__ */ _(SY, { error: e }), footerLink: bb, footerText: r("viewOnExplorer") });
|
|
44070
44070
|
return s ? /* @__PURE__ */ _(s, { wrapTxHash: n, error: e, children: a }) : a;
|
|
44071
44071
|
}
|
|
44072
44072
|
const IY = () => {
|
|
44073
|
-
const { components: e } =
|
|
44073
|
+
const { components: e } = ne(), t = Y((f) => f.state.swapExecution.srcToken), r = Y((f) => f.state.swapExecution.dstToken), { reviewDetails: n } = kY(), s = Ne(), a = Y((f) => {
|
|
44074
44074
|
var m;
|
|
44075
44075
|
return !!((m = f.state.swapExecution) != null && m.status);
|
|
44076
44076
|
}), o = Rx(), i = Ve({ value: o.srcAmountUsd, decimalScale: 2 }), c = Ve({ value: o.dstAmountUsd, decimalScale: 2 }), l = e.USD, u = e.SubmitOrderMainView, d = /* @__PURE__ */ fe(mo, { children: [
|
|
@@ -44135,7 +44135,7 @@ const IY = () => {
|
|
|
44135
44135
|
] });
|
|
44136
44136
|
return u ? /* @__PURE__ */ _(u, { children: d }) : d;
|
|
44137
44137
|
}, BY = (e) => {
|
|
44138
|
-
const { status: t, stepIndex: r, totalSteps: n, error: s } = Y((v) => v.state.swapExecution), { components: a } =
|
|
44138
|
+
const { status: t, stepIndex: r, totalSteps: n, error: s } = Y((v) => v.state.swapExecution), { components: a } = ne(), o = a.Spinner, i = a.SuccessIcon, c = a.ErrorIcon, l = a.TokenLogo, { srcToken: u, dstToken: d } = ne(), f = Xr().amountUI, m = kc().amountUI, y = Ve({ value: f, decimalScale: 2 }), g = Ve({ value: m, decimalScale: 2 }), E = re(() => ({
|
|
44139
44139
|
symbol: u == null ? void 0 : u.symbol,
|
|
44140
44140
|
logoUrl: u == null ? void 0 : u.logoUrl
|
|
44141
44141
|
}), [u]), w = re(() => ({
|
|
@@ -44166,135 +44166,141 @@ const IY = () => {
|
|
|
44166
44166
|
}
|
|
44167
44167
|
) });
|
|
44168
44168
|
}, FY = () => {
|
|
44169
|
-
const e = Gx(), { components: t } =
|
|
44169
|
+
const e = Gx(), { components: t } = ne(), r = Y((a) => a.state.swapExecution.orderId), n = t.SubmitOrderSuccessView, s = /* @__PURE__ */ fe(mo, { children: [
|
|
44170
44170
|
/* @__PURE__ */ _(ks.Success, { title: e }),
|
|
44171
44171
|
/* @__PURE__ */ _(Hx, {})
|
|
44172
44172
|
] });
|
|
44173
44173
|
return n ? /* @__PURE__ */ _(n, { newOrderId: r, children: s }) : s;
|
|
44174
44174
|
}, zK = () => {
|
|
44175
|
-
const { supportedChains: e } =
|
|
44175
|
+
const { supportedChains: e } = ne();
|
|
44176
44176
|
return re(() => e, [e]);
|
|
44177
|
+
}, LK = () => {
|
|
44178
|
+
const { config: e } = ne();
|
|
44179
|
+
return re(() => ({
|
|
44180
|
+
spender: (e == null ? void 0 : e.repermit) ?? ""
|
|
44181
|
+
}), [e]);
|
|
44177
44182
|
};
|
|
44178
44183
|
Aw(Qw.version);
|
|
44179
|
-
const
|
|
44184
|
+
const $K = () => {
|
|
44180
44185
|
const e = Y((t) => t.updateState);
|
|
44181
44186
|
return {
|
|
44182
44187
|
amount: Y((t) => t.state.typedSrcAmount),
|
|
44183
44188
|
reset: Be(() => e({ typedSrcAmount: "" }), [e])
|
|
44184
44189
|
};
|
|
44185
|
-
},
|
|
44190
|
+
}, HK = {
|
|
44186
44191
|
SubmitOrderPanel: BY,
|
|
44187
44192
|
Orders: rY
|
|
44188
44193
|
};
|
|
44189
44194
|
export {
|
|
44190
|
-
|
|
44195
|
+
n8 as $,
|
|
44191
44196
|
Ne as A,
|
|
44192
44197
|
L as B,
|
|
44193
|
-
|
|
44198
|
+
HK as C,
|
|
44194
44199
|
TK as D,
|
|
44195
44200
|
zK as E,
|
|
44196
|
-
|
|
44197
|
-
|
|
44201
|
+
LK as F,
|
|
44202
|
+
Ve as G,
|
|
44198
44203
|
Qo as H,
|
|
44199
44204
|
qt as I,
|
|
44200
|
-
|
|
44201
|
-
|
|
44202
|
-
|
|
44203
|
-
|
|
44204
|
-
|
|
44205
|
+
Ma as J,
|
|
44206
|
+
Ft as K,
|
|
44207
|
+
D5 as L,
|
|
44208
|
+
bt as M,
|
|
44209
|
+
Pe as N,
|
|
44205
44210
|
yt as O,
|
|
44206
44211
|
AK as P,
|
|
44207
|
-
|
|
44208
|
-
|
|
44212
|
+
XY as Q,
|
|
44213
|
+
QY as R,
|
|
44209
44214
|
CK as S,
|
|
44210
|
-
|
|
44211
|
-
|
|
44212
|
-
|
|
44213
|
-
|
|
44214
|
-
|
|
44215
|
-
|
|
44216
|
-
|
|
44217
|
-
|
|
44215
|
+
e8 as T,
|
|
44216
|
+
Nb as U,
|
|
44217
|
+
JY as V,
|
|
44218
|
+
Bl as W,
|
|
44219
|
+
zb as X,
|
|
44220
|
+
eK as Y,
|
|
44221
|
+
t8 as Z,
|
|
44222
|
+
r8 as _,
|
|
44218
44223
|
FR as a,
|
|
44219
|
-
|
|
44220
|
-
|
|
44221
|
-
|
|
44222
|
-
|
|
44223
|
-
|
|
44224
|
-
|
|
44225
|
-
|
|
44226
|
-
|
|
44227
|
-
|
|
44228
|
-
|
|
44229
|
-
|
|
44230
|
-
|
|
44231
|
-
|
|
44232
|
-
|
|
44233
|
-
|
|
44234
|
-
|
|
44235
|
-
|
|
44236
|
-
|
|
44237
|
-
|
|
44238
|
-
|
|
44239
|
-
|
|
44240
|
-
|
|
44241
|
-
|
|
44242
|
-
|
|
44243
|
-
|
|
44244
|
-
|
|
44245
|
-
|
|
44246
|
-
|
|
44247
|
-
|
|
44248
|
-
|
|
44249
|
-
|
|
44250
|
-
|
|
44251
|
-
|
|
44252
|
-
|
|
44253
|
-
|
|
44254
|
-
|
|
44255
|
-
|
|
44256
|
-
|
|
44257
|
-
|
|
44258
|
-
|
|
44259
|
-
|
|
44260
|
-
|
|
44261
|
-
|
|
44262
|
-
|
|
44263
|
-
|
|
44264
|
-
|
|
44265
|
-
|
|
44266
|
-
|
|
44267
|
-
|
|
44268
|
-
|
|
44269
|
-
|
|
44270
|
-
|
|
44271
|
-
|
|
44272
|
-
|
|
44273
|
-
|
|
44274
|
-
|
|
44275
|
-
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44281
|
-
|
|
44282
|
-
|
|
44224
|
+
gb as a$,
|
|
44225
|
+
s8 as a0,
|
|
44226
|
+
Lb as a1,
|
|
44227
|
+
tK as a2,
|
|
44228
|
+
$b as a3,
|
|
44229
|
+
Hb as a4,
|
|
44230
|
+
ao as a5,
|
|
44231
|
+
ho as a6,
|
|
44232
|
+
eu as a7,
|
|
44233
|
+
Ht as a8,
|
|
44234
|
+
pt as a9,
|
|
44235
|
+
Gt as aA,
|
|
44236
|
+
W5 as aB,
|
|
44237
|
+
Jd as aC,
|
|
44238
|
+
$Y as aD,
|
|
44239
|
+
HY as aE,
|
|
44240
|
+
q5 as aF,
|
|
44241
|
+
Y5 as aG,
|
|
44242
|
+
bb as aH,
|
|
44243
|
+
GY as aI,
|
|
44244
|
+
jY as aJ,
|
|
44245
|
+
VY as aK,
|
|
44246
|
+
WY as aL,
|
|
44247
|
+
qY as aM,
|
|
44248
|
+
wf as aN,
|
|
44249
|
+
K5 as aO,
|
|
44250
|
+
Z5 as aP,
|
|
44251
|
+
X5 as aQ,
|
|
44252
|
+
Q5 as aR,
|
|
44253
|
+
YY as aS,
|
|
44254
|
+
nw as aT,
|
|
44255
|
+
sw as aU,
|
|
44256
|
+
aw as aV,
|
|
44257
|
+
ow as aW,
|
|
44258
|
+
iw as aX,
|
|
44259
|
+
cw as aY,
|
|
44260
|
+
KY as aZ,
|
|
44261
|
+
lw as a_,
|
|
44262
|
+
Aw as aa,
|
|
44263
|
+
bo as ab,
|
|
44264
|
+
xf as ac,
|
|
44265
|
+
Hn as ad,
|
|
44266
|
+
mb as ae,
|
|
44267
|
+
Xl as af,
|
|
44268
|
+
$5 as ag,
|
|
44269
|
+
Rt as ah,
|
|
44270
|
+
Ww as ai,
|
|
44271
|
+
F5 as aj,
|
|
44272
|
+
MY as ak,
|
|
44273
|
+
U5 as al,
|
|
44274
|
+
O5 as am,
|
|
44275
|
+
er as an,
|
|
44276
|
+
RY as ao,
|
|
44277
|
+
hb as ap,
|
|
44278
|
+
NY as aq,
|
|
44279
|
+
zY as ar,
|
|
44280
|
+
Qd as as,
|
|
44281
|
+
ni as at,
|
|
44282
|
+
zm as au,
|
|
44283
|
+
H5 as av,
|
|
44284
|
+
G5 as aw,
|
|
44285
|
+
j5 as ax,
|
|
44286
|
+
V5 as ay,
|
|
44287
|
+
LY as az,
|
|
44283
44288
|
Fr as b,
|
|
44284
|
-
|
|
44285
|
-
|
|
44286
|
-
|
|
44287
|
-
|
|
44288
|
-
|
|
44289
|
-
|
|
44290
|
-
|
|
44291
|
-
|
|
44292
|
-
|
|
44293
|
-
|
|
44294
|
-
|
|
44295
|
-
|
|
44296
|
-
|
|
44297
|
-
|
|
44289
|
+
uw as b0,
|
|
44290
|
+
ZY as b1,
|
|
44291
|
+
dw as b2,
|
|
44292
|
+
pw as b3,
|
|
44293
|
+
fw as b4,
|
|
44294
|
+
mw as b5,
|
|
44295
|
+
hw as b6,
|
|
44296
|
+
bw as b7,
|
|
44297
|
+
yw as b8,
|
|
44298
|
+
gw as b9,
|
|
44299
|
+
xw as ba,
|
|
44300
|
+
xb as bb,
|
|
44301
|
+
ww as bc,
|
|
44302
|
+
vw as bd,
|
|
44303
|
+
_w as be,
|
|
44298
44304
|
ku as c,
|
|
44299
44305
|
VA as d,
|
|
44300
44306
|
pa as e,
|
|
@@ -44318,5 +44324,5 @@ export {
|
|
|
44318
44324
|
mY as w,
|
|
44319
44325
|
NK as x,
|
|
44320
44326
|
hY as y,
|
|
44321
|
-
|
|
44327
|
+
$K as z
|
|
44322
44328
|
};
|