@initia/interwovenkit-react 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +123 -123
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1624,19 +1624,19 @@ function fl() {
|
|
|
1624
1624
|
signerAddress: b.address,
|
|
1625
1625
|
incrementSequence: 0,
|
|
1626
1626
|
allowMissingAccount: !0
|
|
1627
|
-
}), A = await s(g),
|
|
1628
|
-
queryClient:
|
|
1627
|
+
}), A = await s(g), R = dc.withExtensions(A, uc), { gasInfo: L } = await zh({
|
|
1628
|
+
queryClient: R,
|
|
1629
1629
|
messages: S,
|
|
1630
1630
|
memo: w,
|
|
1631
1631
|
pubkey: E,
|
|
1632
1632
|
sequence: C
|
|
1633
|
-
}), q = L ? Number(L.gasUsed.toString()) : 0,
|
|
1633
|
+
}), q = L ? Number(L.gasUsed.toString()) : 0, D = f(g);
|
|
1634
1634
|
return Kh({
|
|
1635
1635
|
simulatedGas: q,
|
|
1636
1636
|
gasPrices: T,
|
|
1637
1637
|
preferredFeeDenom: k,
|
|
1638
1638
|
fallbackFeeDenom: v,
|
|
1639
|
-
policy:
|
|
1639
|
+
policy: D
|
|
1640
1640
|
});
|
|
1641
1641
|
}, _ = async (g, y, w, b, k, v) => {
|
|
1642
1642
|
let N = v ?? c(g);
|
|
@@ -1692,8 +1692,8 @@ function Zo() {
|
|
|
1692
1692
|
throw await Un(A, a(C), s);
|
|
1693
1693
|
}
|
|
1694
1694
|
}, w = async ({ messages: S, memo: E, chainId: C = n }) => {
|
|
1695
|
-
const A = await u(C),
|
|
1696
|
-
return
|
|
1695
|
+
const A = await u(C), R = dc.withExtensions(A, uc), L = S.map((O) => _.encodeAsAny(O)), [q] = await p.getAccounts(), D = tr(q.pubkey), W = await f(C), { sequence: V } = await W.getSequence(t);
|
|
1696
|
+
return R.tx.simulate(L, E, D, V);
|
|
1697
1697
|
}, b = async ({
|
|
1698
1698
|
txRequest: S,
|
|
1699
1699
|
broadcaster: E
|
|
@@ -1707,21 +1707,21 @@ function Zo() {
|
|
|
1707
1707
|
spendCoins: [],
|
|
1708
1708
|
internal: !1
|
|
1709
1709
|
}, ...S };
|
|
1710
|
-
return new Promise((
|
|
1710
|
+
return new Promise((R, L) => {
|
|
1711
1711
|
d({
|
|
1712
1712
|
txRequest: A,
|
|
1713
|
-
resolve: async (
|
|
1713
|
+
resolve: async (D) => {
|
|
1714
1714
|
try {
|
|
1715
|
-
const W = await f(A.chainId), V = await E(W, mo.encode(
|
|
1716
|
-
|
|
1715
|
+
const W = await f(A.chainId), V = await E(W, mo.encode(D).finish());
|
|
1716
|
+
R(V), typeof A.internal == "string" && e(A.internal);
|
|
1717
1717
|
} catch (W) {
|
|
1718
1718
|
L(await Un(W, a(A.chainId), s));
|
|
1719
1719
|
} finally {
|
|
1720
1720
|
q();
|
|
1721
1721
|
}
|
|
1722
1722
|
},
|
|
1723
|
-
reject: (
|
|
1724
|
-
L(
|
|
1723
|
+
reject: (D) => {
|
|
1724
|
+
L(D), q();
|
|
1725
1725
|
}
|
|
1726
1726
|
}), A.internal ? c({ path: "/tx" }) : r("/tx");
|
|
1727
1727
|
const q = () => {
|
|
@@ -1737,7 +1737,7 @@ function Zo() {
|
|
|
1737
1737
|
try {
|
|
1738
1738
|
const C = await b({
|
|
1739
1739
|
txRequest: S,
|
|
1740
|
-
broadcaster: async (A,
|
|
1740
|
+
broadcaster: async (A, R) => await A.broadcastTxSync(R)
|
|
1741
1741
|
});
|
|
1742
1742
|
return S.internal && typeof S.internal != "number" && (m({ txHash: C, chainId: E, status: "loading" }), $({ txHash: C, chainId: S.chainId }).then((A) => {
|
|
1743
1743
|
m({ status: A.code === 0 ? "success" : "error", chainId: E, txHash: C });
|
|
@@ -1749,8 +1749,8 @@ function Zo() {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
}, v = (S, E = 30 * 1e3, C = 0.5 * 1e3) => b({
|
|
1751
1751
|
txRequest: S,
|
|
1752
|
-
broadcaster: async (A,
|
|
1753
|
-
const L = await A.broadcastTx(
|
|
1752
|
+
broadcaster: async (A, R) => {
|
|
1753
|
+
const L = await A.broadcastTx(R, E, C);
|
|
1754
1754
|
if (L.code !== 0) throw new Error(L.rawLog);
|
|
1755
1755
|
return L;
|
|
1756
1756
|
}
|
|
@@ -1759,14 +1759,14 @@ function Zo() {
|
|
|
1759
1759
|
messages: E,
|
|
1760
1760
|
memo: C = "",
|
|
1761
1761
|
fee: A,
|
|
1762
|
-
preferredFeeDenom:
|
|
1762
|
+
preferredFeeDenom: R
|
|
1763
1763
|
}) => {
|
|
1764
1764
|
const L = await f(S), q = await g({
|
|
1765
1765
|
chainId: S,
|
|
1766
1766
|
messages: E,
|
|
1767
1767
|
memo: C,
|
|
1768
1768
|
fee: A,
|
|
1769
|
-
preferredFeeDenom:
|
|
1769
|
+
preferredFeeDenom: R,
|
|
1770
1770
|
client: L,
|
|
1771
1771
|
// Re-derive once per page session when auto-sign is enabled so direct
|
|
1772
1772
|
// signing continues to work after reload.
|
|
@@ -1787,18 +1787,18 @@ function Zo() {
|
|
|
1787
1787
|
}, T = async (S, E = 30 * 1e3, C = 0.5 * 1e3) => {
|
|
1788
1788
|
const A = S.chainId ?? n;
|
|
1789
1789
|
try {
|
|
1790
|
-
const { client:
|
|
1790
|
+
const { client: R, signedTx: L } = await N({
|
|
1791
1791
|
...S,
|
|
1792
1792
|
chainId: A
|
|
1793
|
-
}), q = await
|
|
1793
|
+
}), q = await R.broadcastTx(
|
|
1794
1794
|
mo.encode(L).finish(),
|
|
1795
1795
|
E,
|
|
1796
1796
|
C
|
|
1797
1797
|
);
|
|
1798
1798
|
if (q.code !== 0) throw new Error(q.rawLog);
|
|
1799
1799
|
return q;
|
|
1800
|
-
} catch (
|
|
1801
|
-
throw await Un(
|
|
1800
|
+
} catch (R) {
|
|
1801
|
+
throw await Un(R, a(A), s);
|
|
1802
1802
|
}
|
|
1803
1803
|
}, $ = async ({
|
|
1804
1804
|
chainId: S = n,
|
|
@@ -2933,8 +2933,8 @@ function Jo() {
|
|
|
2933
2933
|
const e = ne(), t = nn(e), n = se(), s = zf(), { data: a } = Nr(), { data: r } = Cr(), { data: i } = kr(), { data: c } = Tl(), { data: l } = $l(), { data: d } = Ft(e), { data: m } = Rf(n), u = x(() => {
|
|
2934
2934
|
const L = /* @__PURE__ */ new Map();
|
|
2935
2935
|
for (const q of m) {
|
|
2936
|
-
const
|
|
2937
|
-
|
|
2936
|
+
const D = L.get(q.lpMetadata) ?? [];
|
|
2937
|
+
D.push(q), L.set(q.lpMetadata, D);
|
|
2938
2938
|
}
|
|
2939
2939
|
return L;
|
|
2940
2940
|
}, [m]), f = x(
|
|
@@ -2946,17 +2946,17 @@ function Jo() {
|
|
|
2946
2946
|
), y = Uf(g), w = x(() => {
|
|
2947
2947
|
const L = [];
|
|
2948
2948
|
for (const q of m)
|
|
2949
|
-
for (const
|
|
2949
|
+
for (const D of q.incentives)
|
|
2950
2950
|
L.push({
|
|
2951
2951
|
tokenAddress: q.tokenAddress,
|
|
2952
|
-
incentiveAddress:
|
|
2952
|
+
incentiveAddress: D.incentiveAddress
|
|
2953
2953
|
});
|
|
2954
2954
|
return L;
|
|
2955
2955
|
}, [m]), b = Of(w), k = x(() => {
|
|
2956
2956
|
const L = /* @__PURE__ */ new Set();
|
|
2957
2957
|
for (const q of m)
|
|
2958
|
-
for (const
|
|
2959
|
-
L.add(
|
|
2958
|
+
for (const D of q.incentives)
|
|
2959
|
+
L.add(D.rewardMetadata);
|
|
2960
2960
|
return Array.from(L);
|
|
2961
2961
|
}, [m]), v = wo(k, { failSoft: !0 }), N = x(
|
|
2962
2962
|
() => Gf(s, a, r, i),
|
|
@@ -2971,7 +2971,7 @@ function Jo() {
|
|
|
2971
2971
|
for (const q of d ?? [])
|
|
2972
2972
|
L.set(q.id, q.price);
|
|
2973
2973
|
return L;
|
|
2974
|
-
}, [d]), { rows: A, totalValue:
|
|
2974
|
+
}, [d]), { rows: A, totalValue: R } = x(() => {
|
|
2975
2975
|
const L = d?.find((V) => V.id === nt)?.price ?? 0, q = /* @__PURE__ */ new Map();
|
|
2976
2976
|
for (const V of T)
|
|
2977
2977
|
q.set(V, Yf(V, S, E));
|
|
@@ -3064,8 +3064,8 @@ function Jo() {
|
|
|
3064
3064
|
}
|
|
3065
3065
|
});
|
|
3066
3066
|
}
|
|
3067
|
-
const
|
|
3068
|
-
return { rows:
|
|
3067
|
+
const D = Array.from(q.values()).filter((V) => V.totalAmount > 0 || V.isClamm).sort((V, O) => O.totalValue - V.totalValue), W = D.reduce((V, O) => V + O.totalValue, 0);
|
|
3068
|
+
return { rows: D, totalValue: W };
|
|
3069
3069
|
}, [
|
|
3070
3070
|
d,
|
|
3071
3071
|
T,
|
|
@@ -3089,7 +3089,7 @@ function Jo() {
|
|
|
3089
3089
|
C
|
|
3090
3090
|
]);
|
|
3091
3091
|
return {
|
|
3092
|
-
totalValue:
|
|
3092
|
+
totalValue: R,
|
|
3093
3093
|
rows: A
|
|
3094
3094
|
};
|
|
3095
3095
|
}
|
|
@@ -3766,7 +3766,7 @@ function je() {
|
|
|
3766
3766
|
return x(
|
|
3767
3767
|
() => H.create({
|
|
3768
3768
|
prefixUrl: e,
|
|
3769
|
-
headers: { "InterwovenKit-Version": "2.5.
|
|
3769
|
+
headers: { "InterwovenKit-Version": "2.5.1" }
|
|
3770
3770
|
}),
|
|
3771
3771
|
[e]
|
|
3772
3772
|
);
|
|
@@ -4579,13 +4579,13 @@ const B_ = "_title_1d032_1", F_ = "_meta_1d032_7", V_ = "_footer_1d032_14", K_ =
|
|
|
4579
4579
|
const { txRequest: e, resolve: t, reject: n } = pl(), { messages: s, memo: a, chainId: r, gas: i, gasAdjustment: c, spendCoins: l } = e, d = vt(r), m = Ms(d), u = _r(d), f = yr(d), p = Pt(d), _ = fl(), g = (e.gasPrices ?? u).map(
|
|
4580
4580
|
({ amount: S, denom: E }) => Lo(Math.ceil(i * c), qo.fromString(S + E))
|
|
4581
4581
|
), y = g.map((S) => S.amount[0]), w = (S) => {
|
|
4582
|
-
const E = m.find((W) => W.denom === S)?.amount ?? "0", C = y.find((W) => W.denom === S)?.amount ?? "0", A = l.filter((W) => W.denom === S).reduce((W, V) => U(W).plus(V.amount), U("0")),
|
|
4582
|
+
const E = m.find((W) => W.denom === S)?.amount ?? "0", C = y.find((W) => W.denom === S)?.amount ?? "0", A = l.filter((W) => W.denom === S).reduce((W, V) => U(W).plus(V.amount), U("0")), R = U(C).plus(A), L = U(E).gte(R), { symbol: q, decimals: D } = p(S);
|
|
4583
4583
|
return {
|
|
4584
4584
|
symbol: q,
|
|
4585
|
-
decimals:
|
|
4585
|
+
decimals: D,
|
|
4586
4586
|
spend: A.gt(0) ? A.toFixed() : null,
|
|
4587
4587
|
fee: C,
|
|
4588
|
-
total:
|
|
4588
|
+
total: R.toFixed(),
|
|
4589
4589
|
balance: E,
|
|
4590
4590
|
isSufficient: L
|
|
4591
4591
|
};
|
|
@@ -4851,21 +4851,21 @@ const Ly = Re("interwovenkit:account", {
|
|
|
4851
4851
|
}
|
|
4852
4852
|
})
|
|
4853
4853
|
}), qy = () => {
|
|
4854
|
-
const [e, t] = K(oy), [n, s] = Oe(Ps), [a, r] = K(!1), i = st(), c = fe(), { address: l,
|
|
4854
|
+
const [e, t] = K(oy), [n, s] = Oe(Ps), [a, r] = K(!1), i = st(), c = fe(), { address: l, initiaAddress: d, username: m } = ht(), { mutate: u, isPending: f } = ef(), { closeDrawer: p } = Vt();
|
|
4855
4855
|
if (!n) throw new Error("Pending request not found");
|
|
4856
|
-
const { logoUrl:
|
|
4857
|
-
data:
|
|
4858
|
-
isLoading:
|
|
4859
|
-
isError:
|
|
4860
|
-
} = Ce(Ly.info(
|
|
4856
|
+
const { logoUrl: _, name: g, restUrl: y } = i(n.chainId), {
|
|
4857
|
+
data: w,
|
|
4858
|
+
isLoading: b,
|
|
4859
|
+
isError: k
|
|
4860
|
+
} = Ce(Ly.info(y, d)), v = {
|
|
4861
4861
|
favicon: document.querySelector('link[rel="icon"]')?.getAttribute("href") || "",
|
|
4862
4862
|
title: document.title,
|
|
4863
4863
|
hostname: window.location.hostname
|
|
4864
|
-
},
|
|
4865
|
-
|
|
4866
|
-
},
|
|
4867
|
-
n?.reject(new Error("User cancelled")), s(null),
|
|
4868
|
-
},
|
|
4864
|
+
}, N = c.find((R) => R.chainId === n.chainId), I = N?.website ? cy(N.website, window.location.hostname) : !1, T = () => {
|
|
4865
|
+
u(e);
|
|
4866
|
+
}, $ = () => {
|
|
4867
|
+
n?.reject(new Error("User cancelled")), s(null), p();
|
|
4868
|
+
}, S = !I && !a, E = !b && !k && w === !1, C = !b && k, A = S || b || k || w === !1;
|
|
4869
4869
|
return /* @__PURE__ */ h(z, { children: [
|
|
4870
4870
|
/* @__PURE__ */ h(Nt, { className: ie.container, children: [
|
|
4871
4871
|
/* @__PURE__ */ h("header", { children: [
|
|
@@ -4875,10 +4875,10 @@ const Ly = Re("interwovenkit:account", {
|
|
|
4875
4875
|
/* @__PURE__ */ h("section", { children: [
|
|
4876
4876
|
/* @__PURE__ */ o("h2", { className: ie.sectionTitle, children: "Requested by" }),
|
|
4877
4877
|
/* @__PURE__ */ h("div", { className: ie.websiteInfo, children: [
|
|
4878
|
-
/* @__PURE__ */ o("img", { src:
|
|
4878
|
+
/* @__PURE__ */ o("img", { src: v.favicon, alt: "", className: ie.favicon }),
|
|
4879
4879
|
/* @__PURE__ */ h("div", { children: [
|
|
4880
|
-
/* @__PURE__ */ o("div", { className: ie.websiteTitle, children:
|
|
4881
|
-
/* @__PURE__ */ o("div", { className: ie.websiteHost, children:
|
|
4880
|
+
/* @__PURE__ */ o("div", { className: ie.websiteTitle, children: v.title }),
|
|
4881
|
+
/* @__PURE__ */ o("div", { className: ie.websiteHost, children: v.hostname })
|
|
4882
4882
|
] })
|
|
4883
4883
|
] })
|
|
4884
4884
|
] }),
|
|
@@ -4889,14 +4889,14 @@ const Ly = Re("interwovenkit:account", {
|
|
|
4889
4889
|
/* @__PURE__ */ o("div", { className: ie.label, children: "Address" }),
|
|
4890
4890
|
/* @__PURE__ */ h("div", { className: ie.infoValue, children: [
|
|
4891
4891
|
/* @__PURE__ */ o(Xn, { size: 14 }),
|
|
4892
|
-
/* @__PURE__ */ o("span", { className: "monospace", children: Je(
|
|
4892
|
+
/* @__PURE__ */ o("span", { className: "monospace", children: Je(m ?? l) })
|
|
4893
4893
|
] })
|
|
4894
4894
|
] }),
|
|
4895
4895
|
/* @__PURE__ */ h("div", { className: ie.infoItem, children: [
|
|
4896
4896
|
/* @__PURE__ */ o("div", { className: ie.label, children: "Chain" }),
|
|
4897
4897
|
/* @__PURE__ */ h("div", { className: ie.infoValue, children: [
|
|
4898
|
-
/* @__PURE__ */ o(ee, { src:
|
|
4899
|
-
/* @__PURE__ */ o("span", { children:
|
|
4898
|
+
/* @__PURE__ */ o(ee, { src: _, width: 14, height: 14, logo: !0 }),
|
|
4899
|
+
/* @__PURE__ */ o("span", { children: g })
|
|
4900
4900
|
] })
|
|
4901
4901
|
] }),
|
|
4902
4902
|
/* @__PURE__ */ h("div", { className: ie.infoItem, children: [
|
|
@@ -4919,10 +4919,10 @@ const Ly = Re("interwovenkit:account", {
|
|
|
4919
4919
|
"Send transactions without confirmation pop-ups",
|
|
4920
4920
|
"Secured by your wallet signature",
|
|
4921
4921
|
"Revoke permissions any time in settings"
|
|
4922
|
-
].map((
|
|
4922
|
+
].map((R) => /* @__PURE__ */ h("li", { className: ie.featureItem, children: [
|
|
4923
4923
|
/* @__PURE__ */ o(tm, { size: 12, className: ie.checkIcon }),
|
|
4924
|
-
/* @__PURE__ */ o("span", { children:
|
|
4925
|
-
] },
|
|
4924
|
+
/* @__PURE__ */ o("span", { children: R })
|
|
4925
|
+
] }, R)) }),
|
|
4926
4926
|
/* @__PURE__ */ h(
|
|
4927
4927
|
"a",
|
|
4928
4928
|
{
|
|
@@ -4943,16 +4943,16 @@ const Ly = Re("interwovenkit:account", {
|
|
|
4943
4943
|
{
|
|
4944
4944
|
className: ie.footer,
|
|
4945
4945
|
extra: /* @__PURE__ */ h("div", { className: ie.feedbackContainer, children: [
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
!
|
|
4946
|
+
E && /* @__PURE__ */ o(Ne, { level: "error", children: "Insufficient balance for fee" }),
|
|
4947
|
+
C && /* @__PURE__ */ o(Ne, { level: "warning", children: "Unable to verify account status. Try again." }),
|
|
4948
|
+
!I && !a && /* @__PURE__ */ o(Ne, { level: "warning", children: /* @__PURE__ */ h("div", { className: ie.warningContent, children: [
|
|
4949
4949
|
/* @__PURE__ */ o("span", { children: "You are on an unverified website" }),
|
|
4950
4950
|
/* @__PURE__ */ o("button", { onClick: () => r(!0), className: ie.ignoreButton, children: "Ignore" })
|
|
4951
4951
|
] }) })
|
|
4952
4952
|
] }),
|
|
4953
4953
|
children: [
|
|
4954
|
-
/* @__PURE__ */ o(le.Outline, { onClick:
|
|
4955
|
-
/* @__PURE__ */ o(le.White, { onClick:
|
|
4954
|
+
/* @__PURE__ */ o(le.Outline, { onClick: $, children: "Cancel" }),
|
|
4955
|
+
/* @__PURE__ */ o(le.White, { onClick: T, disabled: A, loading: f, children: "Enable" })
|
|
4956
4956
|
]
|
|
4957
4957
|
}
|
|
4958
4958
|
)
|
|
@@ -6203,14 +6203,14 @@ const Q0 = () => {
|
|
|
6203
6203
|
const e = Me(), t = ea(), n = es(), [s, a] = K(void 0), [r, i] = K(!1), [c, l] = sr(
|
|
6204
6204
|
ae.BRIDGE_ROUTE_TYPE,
|
|
6205
6205
|
"default"
|
|
6206
|
-
), { watch: d, setValue: m, handleSubmit: u, formState: f } = an(), p = d(), { srcChainId: _, srcDenom: g, dstChainId: y, dstDenom: w, quantity: b, sender: k, slippagePercent: v } = p, N = st(), I = ne(), T = ut(_), $ = vs(T), S = ut(y), E = vs(S), C = qt(g, _), A = qt(w, y), { data:
|
|
6206
|
+
), { watch: d, setValue: m, handleSubmit: u, formState: f } = an(), p = d(), { srcChainId: _, srcDenom: g, dstChainId: y, dstDenom: w, quantity: b, sender: k, slippagePercent: v } = p, N = st(), I = ne(), T = ut(_), $ = vs(T), S = ut(y), E = vs(S), C = qt(g, _), A = qt(w, y), { data: R } = Lr(k, _), L = v1(k, _, g), q = !L?.amount || U(L.amount).isZero(), [D] = gc(b, 300), W = _ === y, V = W && _ === I.chainId, de = G0({ isLayer1Swap: V, isL2Swap: W && $ === "initia" && !V }), we = $ !== "initia" && E !== "initia", re = C1(), ve = ja(D, {
|
|
6207
6207
|
disabled: we,
|
|
6208
6208
|
refreshMs: de
|
|
6209
|
-
}), Ae = ja(
|
|
6209
|
+
}), Ae = ja(D, {
|
|
6210
6210
|
isOpWithdraw: !0,
|
|
6211
6211
|
disabled: !re,
|
|
6212
6212
|
refreshMs: de
|
|
6213
|
-
}), Se = re && c === "op", at = Se ? Ae : ve, Wt = Se ? ve : Ae, Ut = Se ? !we : re, Ve = at.error && Ut ? Wt : at, { data: G, isLoading: ft, error: oe } = Ve, { data: ze } = k1(oe), jt =
|
|
6213
|
+
}), Se = re && c === "op", at = Se ? Ae : ve, Wt = Se ? ve : Ae, Ut = Se ? !we : re, Ve = at.error && Ut ? Wt : at, { data: G, isLoading: ft, error: oe } = Ve, { data: ze } = k1(oe), jt = D && ft && !r, zt = () => {
|
|
6214
6214
|
m("srcChainId", y), m("srcDenom", w), m("dstChainId", _), m("dstDenom", g), m("quantity", "", { shouldTouch: !1, shouldDirty: !1 });
|
|
6215
6215
|
}, { openModal: be, closeModal: Ke } = Qo(), kt = u(async (Y) => {
|
|
6216
6216
|
a(void 0), i(!0);
|
|
@@ -6270,17 +6270,17 @@ const Q0 = () => {
|
|
|
6270
6270
|
({ fee_behavior: Y }) => Y === "FEE_BEHAVIOR_ADDITIONAL"
|
|
6271
6271
|
) ?? [], [G]), pt = x(() => {
|
|
6272
6272
|
for (const Y of tt) {
|
|
6273
|
-
const Pe =
|
|
6273
|
+
const Pe = R?.[Y.origin_asset.denom]?.amount ?? "0", ss = G?.source_asset_denom === Y.origin_asset.denom ? G.amount_in : "0";
|
|
6274
6274
|
if (U(Pe).lt(U(ss).plus(Y.amount ?? "0"))) return `Insufficient ${Y.origin_asset.symbol} for fees`;
|
|
6275
6275
|
}
|
|
6276
|
-
}, [
|
|
6276
|
+
}, [R, G, tt]), $e = x(() => {
|
|
6277
6277
|
if (!p.sender) return "Connect wallet";
|
|
6278
|
-
if (!p.quantity || !
|
|
6278
|
+
if (!p.quantity || !D) return "Enter amount";
|
|
6279
6279
|
if (!p.recipient) return "Enter recipient address";
|
|
6280
6280
|
if (f.errors.quantity) return f.errors.quantity.message;
|
|
6281
6281
|
if (!G) return "Route not found";
|
|
6282
6282
|
if (pt) return pt;
|
|
6283
|
-
}, [
|
|
6283
|
+
}, [D, pt, f, G, p]), cn = G ? pe(G.amount_out, { decimals: A.decimals }) : "0", ln = U(b).gt(0) && U(b).isEqualTo(
|
|
6284
6284
|
me(L?.amount, { decimals: L?.decimals ?? 0 })
|
|
6285
6285
|
), Wr = (() => {
|
|
6286
6286
|
switch ($) {
|
|
@@ -6295,7 +6295,7 @@ const Q0 = () => {
|
|
|
6295
6295
|
}
|
|
6296
6296
|
})(), Ud = Wr.includes(g), Od = Wr.some((Y) => {
|
|
6297
6297
|
if (Y === g) return !1;
|
|
6298
|
-
const Pe =
|
|
6298
|
+
const Pe = R?.[Y]?.amount ?? "0";
|
|
6299
6299
|
return U(Pe).gt(0);
|
|
6300
6300
|
}), Bd = ln && Ud && !Od, da = Ie(
|
|
6301
6301
|
(Y, Pe) => Y.length ? /* @__PURE__ */ h("div", { className: He.description, children: [
|
|
@@ -6464,8 +6464,8 @@ const Q0 = () => {
|
|
|
6464
6464
|
// eslint-disable-next-line react-hooks/incompatible-library
|
|
6465
6465
|
r()
|
|
6466
6466
|
);
|
|
6467
|
-
r((A, { name:
|
|
6468
|
-
(
|
|
6467
|
+
r((A, { name: R }) => {
|
|
6468
|
+
(R === "srcChainId" || R === "srcDenom") && i("quantity", "", { shouldTouch: !1, shouldDirty: !1 });
|
|
6469
6469
|
});
|
|
6470
6470
|
const _ = Zl(), g = _(c), y = _(l), b = Er()(p, l);
|
|
6471
6471
|
Q(() => {
|
|
@@ -6758,13 +6758,13 @@ function Dt() {
|
|
|
6758
6758
|
return ot();
|
|
6759
6759
|
}
|
|
6760
6760
|
function d2(e, t) {
|
|
6761
|
-
const { customFee: n, onCompleted: s } = t ?? {}, a = Me(), { showNotification: r, updateNotification: i, hideNotification: c } = Vs(), { addHistoryItem: l } = ld(), d = es(), { route: m, values: u } = Dt(), { srcChainId: f, sender: p, recipient: _, cosmosWalletName: g } = u, y = nl(), { requestTxSync: w, submitTxSync: b, waitForTxConfirmation: k } = ht(), { find: v } = oa(), N = Rs(), I = Ds(), T = ut(f), $ = vs(T), S = Jl(f), E = Be(), { registryUrl: C } = te(), A = st(),
|
|
6761
|
+
const { customFee: n, onCompleted: s } = t ?? {}, a = Me(), { showNotification: r, updateNotification: i, hideNotification: c } = Vs(), { addHistoryItem: l } = ld(), d = es(), { route: m, values: u } = Dt(), { srcChainId: f, sender: p, recipient: _, cosmosWalletName: g } = u, y = nl(), { requestTxSync: w, submitTxSync: b, waitForTxConfirmation: k } = ht(), { find: v } = oa(), N = Rs(), I = Ds(), T = ut(f), $ = vs(T), S = Jl(f), E = Be(), { registryUrl: C } = te(), A = st(), R = ne(), { addReminder: L } = ns(), q = je();
|
|
6762
6762
|
return wt({
|
|
6763
6763
|
mutationFn: async () => {
|
|
6764
6764
|
try {
|
|
6765
6765
|
if ("cosmos_tx" in e) {
|
|
6766
6766
|
if (!e.cosmos_tx.msgs) throw new Error("Invalid transaction data");
|
|
6767
|
-
const
|
|
6767
|
+
const D = e.cosmos_tx.msgs.map(({ msg_type_url: Ve, msg: G }) => {
|
|
6768
6768
|
if (!(Ve && G)) throw new Error("Invalid transaction data");
|
|
6769
6769
|
return I.fromAmino({
|
|
6770
6770
|
type: Ss[Ve].aminoType,
|
|
@@ -6773,11 +6773,11 @@ function d2(e, t) {
|
|
|
6773
6773
|
});
|
|
6774
6774
|
if ($ === "initia") {
|
|
6775
6775
|
const { srcDenom: Ve, quantity: G } = u, { decimals: ft } = S(Ve), oe = n ? await b({
|
|
6776
|
-
messages:
|
|
6776
|
+
messages: D,
|
|
6777
6777
|
chainId: f,
|
|
6778
6778
|
fee: n
|
|
6779
6779
|
}) : await w({
|
|
6780
|
-
messages:
|
|
6780
|
+
messages: D,
|
|
6781
6781
|
chainId: f,
|
|
6782
6782
|
internal: 1,
|
|
6783
6783
|
spendCoins: [{ denom: Ve, amount: Eo(G, { decimals: ft }) }]
|
|
@@ -6805,13 +6805,13 @@ function d2(e, t) {
|
|
|
6805
6805
|
}
|
|
6806
6806
|
const { denom: re, gas_price: ve } = we;
|
|
6807
6807
|
if (!ve) throw new Error(`Gas price not found for ${re}`);
|
|
6808
|
-
const Ae = await O.simulate(p,
|
|
6808
|
+
const Ae = await O.simulate(p, D, ""), Se = qo.fromString(ve.average + re), at = Lo(Math.ceil(Ae * Hn), Se), Wt = await O.signAndBroadcastSync(p, D, at), Ut = gl({ txHash: Wt, client: O });
|
|
6809
6809
|
return { txHash: Wt, wait: Ut };
|
|
6810
6810
|
}
|
|
6811
6811
|
if ("evm_tx" in e) {
|
|
6812
|
-
const { chain_id:
|
|
6812
|
+
const { chain_id: D, to: W, value: V, data: O } = e.evm_tx, de = await y(), we = await de.getSigner();
|
|
6813
6813
|
await za(de, T);
|
|
6814
|
-
const re = await we.sendTransaction({ chainId:
|
|
6814
|
+
const re = await we.sendTransaction({ chainId: D, to: W, value: V, data: `0x${O}` }), ve = sl(
|
|
6815
6815
|
re.wait(),
|
|
6816
6816
|
3e4,
|
|
6817
6817
|
"Transaction was not confirmed in time. It may still be processing."
|
|
@@ -6819,13 +6819,13 @@ function d2(e, t) {
|
|
|
6819
6819
|
return { txHash: re.hash, wait: ve };
|
|
6820
6820
|
}
|
|
6821
6821
|
throw new Error("Unlisted chain type");
|
|
6822
|
-
} catch (
|
|
6823
|
-
throw
|
|
6822
|
+
} catch (D) {
|
|
6823
|
+
throw D instanceof vn ? D : await Et(D);
|
|
6824
6824
|
}
|
|
6825
6825
|
},
|
|
6826
|
-
onSuccess: async ({ txHash:
|
|
6826
|
+
onSuccess: async ({ txHash: D, wait: W }) => {
|
|
6827
6827
|
localStorage.removeItem(ae.BRIDGE_QUANTITY), E.removeQueries({ queryKey: xe.route._def }), E.removeQueries({ queryKey: xe.routeErrorInfo._def }), s ? s({
|
|
6828
|
-
txhash:
|
|
6828
|
+
txhash: D,
|
|
6829
6829
|
chainId: f,
|
|
6830
6830
|
timestamp: Date.now(),
|
|
6831
6831
|
success: !0,
|
|
@@ -6837,7 +6837,7 @@ function d2(e, t) {
|
|
|
6837
6837
|
}));
|
|
6838
6838
|
try {
|
|
6839
6839
|
await W;
|
|
6840
|
-
const V = ia(m) === "OP Bridge withdrawal", O = V ? { success: !0, error: null } : await p2(q,
|
|
6840
|
+
const V = ia(m) === "OP Bridge withdrawal", O = V ? { success: !0, error: null } : await p2(q, D, f);
|
|
6841
6841
|
if (!s && !O.success && O.error) {
|
|
6842
6842
|
const Ae = O.error instanceof Error ? O.error.message : String(O.error);
|
|
6843
6843
|
r({
|
|
@@ -6847,13 +6847,13 @@ function d2(e, t) {
|
|
|
6847
6847
|
autoHide: !0
|
|
6848
6848
|
});
|
|
6849
6849
|
}
|
|
6850
|
-
const de = O.success, re = xi({ txHash:
|
|
6850
|
+
const de = O.success, re = xi({ txHash: D, srcChainId: f, route: m, values: u, recipient: _ }, de);
|
|
6851
6851
|
l(re.tx, re.details), s || i(m2(c));
|
|
6852
|
-
const ve = $a(u,
|
|
6852
|
+
const ve = $a(u, D);
|
|
6853
6853
|
if (d("Bridge Transaction Success", ve), V) {
|
|
6854
6854
|
const Ae = A(f).metadata?.op_bridge_id;
|
|
6855
6855
|
if (Ae && !await c2(
|
|
6856
|
-
|
|
6856
|
+
R.restUrl,
|
|
6857
6857
|
Number(Ae),
|
|
6858
6858
|
m.dest_asset_denom
|
|
6859
6859
|
)) {
|
|
@@ -6864,7 +6864,7 @@ function d2(e, t) {
|
|
|
6864
6864
|
} catch (V) {
|
|
6865
6865
|
const O = V instanceof Error ? V.message : String(V);
|
|
6866
6866
|
if (V instanceof vn) {
|
|
6867
|
-
const we = xi({ txHash:
|
|
6867
|
+
const we = xi({ txHash: D, srcChainId: f, route: m, values: u }, !1);
|
|
6868
6868
|
l(we.tx, we.details), s || i(h2(c));
|
|
6869
6869
|
} else s ? s({ success: !1, error: O, route: m, values: u }) : i({
|
|
6870
6870
|
type: "error",
|
|
@@ -6872,7 +6872,7 @@ function d2(e, t) {
|
|
|
6872
6872
|
description: O
|
|
6873
6873
|
});
|
|
6874
6874
|
d("Bridge Confirmation Failed", {
|
|
6875
|
-
...$a(u,
|
|
6875
|
+
...$a(u, D),
|
|
6876
6876
|
error: O,
|
|
6877
6877
|
type: V instanceof vn ? "timeout" : "error"
|
|
6878
6878
|
});
|
|
@@ -6882,8 +6882,8 @@ function d2(e, t) {
|
|
|
6882
6882
|
});
|
|
6883
6883
|
}
|
|
6884
6884
|
},
|
|
6885
|
-
onError: async (
|
|
6886
|
-
const W = $ === "initia" ? await Un(
|
|
6885
|
+
onError: async (D) => {
|
|
6886
|
+
const W = $ === "initia" ? await Un(D, A(f), C) : D;
|
|
6887
6887
|
s ? s({ success: !1, error: W.message, route: m, values: u }) : r({
|
|
6888
6888
|
type: "error",
|
|
6889
6889
|
title: "Transaction failed",
|
|
@@ -7124,12 +7124,12 @@ const b2 = "_link_104m3_1", v2 = "_header_104m3_23", N2 = "_title_104m3_31", k2
|
|
|
7124
7124
|
dest_asset_chain_id: w,
|
|
7125
7125
|
dest_asset_denom: b,
|
|
7126
7126
|
estimated_fees: k = []
|
|
7127
|
-
} = r, v = ut(g), N = ut(w), I = qt(y, g), T = qt(b, w), $ = (q,
|
|
7127
|
+
} = r, v = ut(g), N = ut(w), I = qt(y, g), T = qt(b, w), $ = (q, D) => D ? /* @__PURE__ */ o(ee, { src: D, width: 12, height: 12 }) : J.equals(q, m) ? /* @__PURE__ */ o(ee, { src: u?.icon, width: 12, height: 12 }) : /* @__PURE__ */ o(Xn, { size: 12 }), S = (q, { symbol: D, decimals: W, logo_uri: V }, { chain_name: O, pretty_name: de, ...we }, re, ve) => /* @__PURE__ */ h("div", { className: De.row, children: [
|
|
7128
7128
|
/* @__PURE__ */ o(aa, { assetLogoUrl: V, chainLogoUrl: we.logo_uri ?? void 0 }),
|
|
7129
7129
|
/* @__PURE__ */ h("div", { children: [
|
|
7130
7130
|
/* @__PURE__ */ h("div", { className: De.asset, children: [
|
|
7131
7131
|
/* @__PURE__ */ o("span", { className: De.amount, children: pe(q, { decimals: W }) }),
|
|
7132
|
-
/* @__PURE__ */ o("span", { children:
|
|
7132
|
+
/* @__PURE__ */ o("span", { children: D })
|
|
7133
7133
|
] }),
|
|
7134
7134
|
/* @__PURE__ */ h("div", { className: De.chain, children: [
|
|
7135
7135
|
/* @__PURE__ */ h("span", { children: [
|
|
@@ -7184,7 +7184,7 @@ const b2 = "_link_104m3_1", v2 = "_header_104m3_23", N2 = "_title_104m3_31", k2
|
|
|
7184
7184
|
] });
|
|
7185
7185
|
if (E === fs.OP_WITHDRAW)
|
|
7186
7186
|
return /* @__PURE__ */ o(na, { chainId: s, txHash: a, className: De.link, children: A });
|
|
7187
|
-
const
|
|
7187
|
+
const R = new URLSearchParams({ tx_hash: a, chain_id: s }), L = new URL(`?${R.toString()}`, "https://explorer.skip.build");
|
|
7188
7188
|
return /* @__PURE__ */ o(
|
|
7189
7189
|
"a",
|
|
7190
7190
|
{
|
|
@@ -7475,14 +7475,14 @@ const uw = ({ addressList: e }) => {
|
|
|
7475
7475
|
address: t.sender,
|
|
7476
7476
|
walletIcon: _
|
|
7477
7477
|
}, y = (N) => J.equals(N, m) ? _ : /* @__PURE__ */ o(Xn, { size: 11 }), w = (N) => {
|
|
7478
|
-
const { label: I, amount_out: T, denom: $, denom_out: S = $, chain_id: E, from_chain_id: C, to_chain_id: A = E ?? C } = N,
|
|
7478
|
+
const { label: I, amount_out: T, denom: $, denom_out: S = $, chain_id: E, from_chain_id: C, to_chain_id: A = E ?? C } = N, R = c[A];
|
|
7479
7479
|
return {
|
|
7480
7480
|
label: p && !u ? void 0 : I,
|
|
7481
7481
|
amount: T,
|
|
7482
7482
|
denom: S,
|
|
7483
7483
|
chainId: A,
|
|
7484
|
-
address:
|
|
7485
|
-
walletIcon: y(
|
|
7484
|
+
address: R,
|
|
7485
|
+
walletIcon: y(R)
|
|
7486
7486
|
};
|
|
7487
7487
|
}, b = i.map(dw).map(w), k = b.slice(0, -1), v = b[b.length - 1];
|
|
7488
7488
|
return /* @__PURE__ */ h(he.Root, { className: ds.root, open: u, onOpenChange: f, children: [
|
|
@@ -7539,14 +7539,14 @@ const uw = ({ addressList: e }) => {
|
|
|
7539
7539
|
const L = f(i);
|
|
7540
7540
|
return p(L) === "initia" ? J(l).bech32 : l;
|
|
7541
7541
|
}
|
|
7542
|
-
const E = f($), C = p(E), A = f(r),
|
|
7542
|
+
const E = f($), C = p(E), A = f(r), R = p(A);
|
|
7543
7543
|
switch (C) {
|
|
7544
7544
|
case "initia":
|
|
7545
7545
|
return d;
|
|
7546
7546
|
case "evm":
|
|
7547
7547
|
return m;
|
|
7548
7548
|
case "cosmos": {
|
|
7549
|
-
if (
|
|
7549
|
+
if (R === "cosmos")
|
|
7550
7550
|
return sc(E.bech32_prefix, oc(c).data);
|
|
7551
7551
|
if (!w) throw new Error("Pubkey not found");
|
|
7552
7552
|
return ku(tr(w), E.bech32_prefix);
|
|
@@ -8353,9 +8353,9 @@ function Id(e) {
|
|
|
8353
8353
|
if (!l) return { ...$b, isLoading: i };
|
|
8354
8354
|
const d = Tb(l.symbol), m = d?.externalSourceSymbols ?? [l.symbol], u = c.length > 0, f = d?.extraExternalOptions ?? [], p = d?.extraInitiaSourceSymbols ?? [], _ = d?.externalChainListSource ?? "supported-assets", g = new Map(n.map((N) => [N.chain_id, N])), y = t.filter(({ symbol: N, denom: I, chain_id: T }) => {
|
|
8355
8355
|
if (u)
|
|
8356
|
-
return c.some((
|
|
8356
|
+
return c.some((R) => Oi(R, T, I));
|
|
8357
8357
|
const $ = f.some(
|
|
8358
|
-
(
|
|
8358
|
+
(R) => Oi(R, T, I)
|
|
8359
8359
|
), S = g.get(T), E = !!S && a(S.chain_id) && p.includes(N), C = $ || E;
|
|
8360
8360
|
return N === l.symbol || C;
|
|
8361
8361
|
}).map((N) => {
|
|
@@ -8890,15 +8890,15 @@ const Cv = "_container_oh9og_1", Iv = "_back_oh9og_6", Av = "_title_oh9og_18", S
|
|
|
8890
8890
|
), m = vt(r), u = Ms(m), f = _r(m), p = yr(m), _ = Pt(m), g = f.map(
|
|
8891
8891
|
({ amount: C, denom: A }) => Lo(Math.ceil(t * Hn), qo.fromString(C + A))
|
|
8892
8892
|
), y = g.map((C) => C.amount[0]), w = (C) => {
|
|
8893
|
-
const A = u.find((O) => O.denom === C)?.amount ?? "0",
|
|
8893
|
+
const A = u.find((O) => O.denom === C)?.amount ?? "0", R = y.find((O) => O.denom === C)?.amount ?? "0", L = d && i === C ? U(c || "0").times(U(10).pow(d.decimals)).toFixed(0) : "0", q = U(R).plus(L), D = U(A).gte(q), { symbol: W, decimals: V } = _(C);
|
|
8894
8894
|
return {
|
|
8895
8895
|
symbol: W,
|
|
8896
8896
|
decimals: V,
|
|
8897
8897
|
spend: U(L).gt(0) ? L : null,
|
|
8898
|
-
fee:
|
|
8898
|
+
fee: R,
|
|
8899
8899
|
total: q.toFixed(),
|
|
8900
8900
|
balance: A,
|
|
8901
|
-
isSufficient:
|
|
8901
|
+
isSufficient: D
|
|
8902
8902
|
};
|
|
8903
8903
|
}, b = () => {
|
|
8904
8904
|
if (!y.length) return null;
|
|
@@ -8911,23 +8911,23 @@ const Cv = "_container_oh9og_1", Iv = "_back_oh9og_6", Av = "_title_oh9og_18", S
|
|
|
8911
8911
|
}, [k, v] = K(b), N = g.find((C) => C.amount[0].denom === k) ?? void 0, I = k ? w(k) : null, T = I && !I.isSufficient ? "Insufficient balance" : void 0, $ = (C, A) => {
|
|
8912
8912
|
if (pe(C, { decimals: A }) === "0.000000") return 8;
|
|
8913
8913
|
}, S = (C) => {
|
|
8914
|
-
const [{ amount: A, denom:
|
|
8914
|
+
const [{ amount: A, denom: R }] = C.amount;
|
|
8915
8915
|
if (U(A).isZero()) return "0";
|
|
8916
|
-
const { symbol: L, decimals: q } = _(
|
|
8917
|
-
return `${pe(A, { decimals: q, dp:
|
|
8916
|
+
const { symbol: L, decimals: q } = _(R), D = $(A, q);
|
|
8917
|
+
return `${pe(A, { decimals: q, dp: D })} ${L}`;
|
|
8918
8918
|
}, E = () => {
|
|
8919
8919
|
if (g.length === 0) return null;
|
|
8920
8920
|
if (g.length === 1)
|
|
8921
8921
|
return /* @__PURE__ */ o("span", { className: "monospace", children: S(g[0]) });
|
|
8922
8922
|
if (!N || !k) return null;
|
|
8923
|
-
const C = g.map((
|
|
8924
|
-
const [{ denom: W }] =
|
|
8923
|
+
const C = g.map((D) => {
|
|
8924
|
+
const [{ denom: W }] = D.amount, { symbol: V } = _(W);
|
|
8925
8925
|
return {
|
|
8926
8926
|
value: W,
|
|
8927
|
-
label: S(
|
|
8927
|
+
label: S(D),
|
|
8928
8928
|
triggerLabel: V
|
|
8929
8929
|
};
|
|
8930
|
-
}), [{ amount: A, denom:
|
|
8930
|
+
}), [{ amount: A, denom: R }] = N.amount, { decimals: L } = _(R), q = $(A, L);
|
|
8931
8931
|
return /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
8932
8932
|
/* @__PURE__ */ o("span", { className: "monospace", children: pe(A, { decimals: L, dp: q }) }),
|
|
8933
8933
|
/* @__PURE__ */ o(
|
|
@@ -8982,16 +8982,16 @@ const Cv = "_container_oh9og_1", Iv = "_back_oh9og_6", Av = "_title_oh9og_18", S
|
|
|
8982
8982
|
const t = Qs(e), n = Me(), s = ot(), { data: a } = Ur(), r = Kt(), { data: i, error: c, chainsError: l } = Dr(), d = Os(), { watch: m, setValue: u, getValues: f } = rn(), p = m(), { srcChainId: _, srcDenom: g, quantity: y = "" } = p, w = p[t.external.denomKey], b = p[t.external.chainIdKey], k = Or(e), v = qb(e), { data: N, isLoading: I } = Id(e), T = !I && N.length === 1, $ = e === "withdraw" && !I && N.length > 0 && new Set(N.map(({ chain: be }) => be.chain_id)).size === 1, S = I || !N.length ? null : T ? N[0] : $ ? N.reduce((be, Ke) => {
|
|
8983
8983
|
const kt = Number(be.balance?.value_usd ?? 0);
|
|
8984
8984
|
return Number(Ke.balance?.value_usd ?? 0) > kt ? Ke : be;
|
|
8985
|
-
}, N[0]) : null, E = S ? `${S.chain.chain_id}:${S.asset.denom}` : "", C = b ? r(b) : null, A = i?.[_]?.[g]?.amount,
|
|
8985
|
+
}, N[0]) : null, E = S ? `${S.chain.chain_id}:${S.asset.denom}` : "", C = b ? r(b) : null, A = i?.[_]?.[g]?.amount, R = i?.[_]?.[g]?.price, L = U(R ?? 0).times(y || 0), [q] = gc(y, 300), D = e === "withdraw" ? k : v, W = x(() => {
|
|
8986
8986
|
if (e === "deposit" && !v) return "Select asset";
|
|
8987
8987
|
const be = U(y || 0);
|
|
8988
8988
|
if (!be.isFinite() || be.lte(0)) return "Enter amount";
|
|
8989
8989
|
if (A !== void 0) {
|
|
8990
|
-
const Ke = me(A, { decimals:
|
|
8990
|
+
const Ke = me(A, { decimals: D?.decimals || 6 });
|
|
8991
8991
|
if (be.gt(Ke)) return "Insufficient balance";
|
|
8992
8992
|
}
|
|
8993
8993
|
if (e === "withdraw" && !v) return "Select destination";
|
|
8994
|
-
}, [e, y, A,
|
|
8994
|
+
}, [e, y, A, D, v]), {
|
|
8995
8995
|
data: V,
|
|
8996
8996
|
error: O,
|
|
8997
8997
|
dataUpdatedAt: de
|
|
@@ -9026,7 +9026,7 @@ const Cv = "_container_oh9og_1", Iv = "_back_oh9og_6", Av = "_title_oh9og_18", S
|
|
|
9026
9026
|
if (Q(() => {
|
|
9027
9027
|
G();
|
|
9028
9028
|
}, [E]), !k || e === "deposit" && !v) return null;
|
|
9029
|
-
const ft =
|
|
9029
|
+
const ft = D?.decimals || 6, oe = e === "withdraw" ? "Select chain" : "Select asset", ze = () => {
|
|
9030
9030
|
u("quantity", ""), u(t.external.denomKey, ""), u(t.external.chainIdKey, ""), (e === "withdraw" || T) && (u(t.local.denomKey, ""), u(t.local.chainIdKey, "")), u("page", e === "withdraw" || T ? "select-local" : "select-external");
|
|
9031
9031
|
}, jt = /* @__PURE__ */ h(z, { children: [
|
|
9032
9032
|
/* @__PURE__ */ o("p", { className: j.label, children: e === "withdraw" ? "Destination" : "From" }),
|
|
@@ -9064,7 +9064,7 @@ const Cv = "_container_oh9og_1", Iv = "_back_oh9og_6", Av = "_title_oh9og_18", S
|
|
|
9064
9064
|
/* @__PURE__ */ o("p", { className: j.label, children: "Amount" }),
|
|
9065
9065
|
/* @__PURE__ */ o(Ns, { balance: A, decimals: ft, className: j.input }),
|
|
9066
9066
|
Number(A) > 0 && /* @__PURE__ */ h("div", { className: j.balanceContainer, children: [
|
|
9067
|
-
/* @__PURE__ */ o("p", { className: j.value, children: y ? Tr(L.toString(),
|
|
9067
|
+
/* @__PURE__ */ o("p", { className: j.value, children: y ? Tr(L.toString(), R) : "$-" }),
|
|
9068
9068
|
/* @__PURE__ */ h(
|
|
9069
9069
|
"button",
|
|
9070
9070
|
{
|
|
@@ -9317,7 +9317,7 @@ const yN = "_countdown_vfms8_1", wN = {
|
|
|
9317
9317
|
version: LN
|
|
9318
9318
|
}, MN = () => /* @__PURE__ */ h("aside", { className: qN.version, children: [
|
|
9319
9319
|
"v",
|
|
9320
|
-
"2.5.
|
|
9320
|
+
"2.5.1"
|
|
9321
9321
|
] }), PN = "_link_se23z_1", RN = "_title_se23z_17", DN = "_subtitle_se23z_23", UN = "_icon_se23z_30", io = {
|
|
9322
9322
|
link: PN,
|
|
9323
9323
|
title: RN,
|
|
@@ -9398,12 +9398,12 @@ const yN = "_countdown_vfms8_1", wN = {
|
|
|
9398
9398
|
if (!i) return C;
|
|
9399
9399
|
const A = i.toLowerCase();
|
|
9400
9400
|
return C.filter(
|
|
9401
|
-
(
|
|
9401
|
+
(R) => R.name.toLowerCase().includes(A) || R.chainId.toLowerCase().includes(A)
|
|
9402
9402
|
);
|
|
9403
9403
|
}, [w, i, k]), N = w.find((C) => C.chainId === e) || k, I = parseInt(Ul("--drawer-offset")), T = 6, $ = () => {
|
|
9404
9404
|
if (c(""), u(-1), g.current) {
|
|
9405
|
-
const A = g.current.getBoundingClientRect().bottom + T,
|
|
9406
|
-
p(
|
|
9405
|
+
const A = g.current.getBoundingClientRect().bottom + T, R = window.innerHeight - A - 2 * I;
|
|
9406
|
+
p(R);
|
|
9407
9407
|
}
|
|
9408
9408
|
d(!0);
|
|
9409
9409
|
};
|
|
@@ -9483,7 +9483,7 @@ const yN = "_countdown_vfms8_1", wN = {
|
|
|
9483
9483
|
ref: js()
|
|
9484
9484
|
}
|
|
9485
9485
|
),
|
|
9486
|
-
/* @__PURE__ */ o("div", { className: Ee.viewport, role: "listbox", children: v.length === 0 ? /* @__PURE__ */ o(ke, { children: "No apps found" }) : v.map(({ chainId: C, name: A, logoUrl:
|
|
9486
|
+
/* @__PURE__ */ o("div", { className: Ee.viewport, role: "listbox", children: v.length === 0 ? /* @__PURE__ */ o(ke, { children: "No apps found" }) : v.map(({ chainId: C, name: A, logoUrl: R }, L) => /* @__PURE__ */ h(
|
|
9487
9487
|
"div",
|
|
9488
9488
|
{
|
|
9489
9489
|
className: P(Ee.item, {
|
|
@@ -9503,7 +9503,7 @@ const yN = "_countdown_vfms8_1", wN = {
|
|
|
9503
9503
|
},
|
|
9504
9504
|
children: [
|
|
9505
9505
|
/* @__PURE__ */ h("div", { className: Ee.itemContent, children: [
|
|
9506
|
-
typeof
|
|
9506
|
+
typeof R == "string" ? /* @__PURE__ */ o(ee, { src: R, width: 16, height: 16, logo: !0 }) : R(16),
|
|
9507
9507
|
/* @__PURE__ */ o("span", { className: Ee.name, children: A }),
|
|
9508
9508
|
C === r && /* @__PURE__ */ o("span", { className: Ee.connectedTag, children: "Connected" })
|
|
9509
9509
|
] }),
|
|
@@ -11044,7 +11044,7 @@ const r4 = ({ chain: e, onSelect: t }) => {
|
|
|
11044
11044
|
},
|
|
11045
11045
|
enabled: J.validate(f),
|
|
11046
11046
|
staleTime: F.INFINITY
|
|
11047
|
-
}), E = Math.ceil($ * Hn), C = a4({ denom: u, balances: y, gasPrices: w, lastFeeDenom: b, gas: E }), A = U(I).isZero(), L = w.some(({ denom: O }) => O === u) && S, q = A || L, { mutate:
|
|
11047
|
+
}), E = Math.ceil($ * Hn), C = a4({ denom: u, balances: y, gasPrices: w, lastFeeDenom: b, gas: E }), A = U(I).isZero(), L = w.some(({ denom: O }) => O === u) && S, q = A || L, { mutate: D, isPending: W } = wt({
|
|
11048
11048
|
mutationFn: ({ chainId: O, denom: de, quantity: we, recipient: re, memo: ve }) => {
|
|
11049
11049
|
const Ae = Eo(we, { decimals: N }), Se = [
|
|
11050
11050
|
{
|
|
@@ -11074,7 +11074,7 @@ const r4 = ({ chain: e, onSelect: t }) => {
|
|
|
11074
11074
|
if (d.recipient) return d.recipient.message;
|
|
11075
11075
|
if (d.memo) return d.memo.message;
|
|
11076
11076
|
}, [p, f, d.quantity, d.recipient, d.memo]);
|
|
11077
|
-
return /* @__PURE__ */ o(Rt, { title: "Send", children: /* @__PURE__ */ h("form", { onSubmit: c((O) =>
|
|
11077
|
+
return /* @__PURE__ */ o(Rt, { title: "Send", children: /* @__PURE__ */ h("form", { onSubmit: c((O) => D(O)), "aria-label": "Send token form", children: [
|
|
11078
11078
|
/* @__PURE__ */ h("div", { className: Gi.fields, children: [
|
|
11079
11079
|
/* @__PURE__ */ o(
|
|
11080
11080
|
Ka,
|
|
@@ -11315,7 +11315,7 @@ const C4 = "_root_1tyvn_1", I4 = "_collectionName_1tyvn_10", A4 = "_nftName_1tyv
|
|
|
11315
11315
|
},
|
|
11316
11316
|
n.chainId !== b.chainId && await k4({ nft: t, srcChain: n, intermediaryChain: i })
|
|
11317
11317
|
), { msgs: A } = await H.create({ prefixUrl: a }).post("nft", { json: C }).json();
|
|
11318
|
-
return A.map((
|
|
11318
|
+
return A.map((R) => r.fromAmino(R));
|
|
11319
11319
|
},
|
|
11320
11320
|
enabled: J.validate(y)
|
|
11321
11321
|
}), { data: v, isLoading: N, error: I } = k, T = Be(), { mutate: $, isPending: S } = wt({
|