@skip-go/widget 3.2.0 → 3.2.1-alpha.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m, jsxs as S, Fragment as Ce } from "react/jsx-runtime";
|
|
2
|
-
import sn, { useState as
|
|
2
|
+
import sn, { useState as le, useMemo as U, useEffect as De, useContext as Rc, useRef as Oc, useDebugValue as Pa, createElement as ap, useCallback as Pe, Fragment as rp, useLayoutEffect as sp, cloneElement as lp } from "react";
|
|
3
3
|
import { useCSS as mp, Scope as pp } from "react-shadow-scope";
|
|
4
4
|
import ie, { useModal as Wc } from "@ebay/nice-modal-react";
|
|
5
5
|
import * as Jo from "@radix-ui/react-dialog";
|
|
@@ -7,7 +7,7 @@ import { ErrorBoundary as Ro } from "react-error-boundary";
|
|
|
7
7
|
import { atom as $, useSetAtom as X, useAtomValue as R, useAtom as de } from "jotai";
|
|
8
8
|
import { SkipClient as hp, ChainType as V } from "@skip-go/client";
|
|
9
9
|
import { atomWithQuery as hi, atomWithMutation as up } from "jotai-tanstack-query";
|
|
10
|
-
import { getWallet as an, WalletType as
|
|
10
|
+
import { getWallet as an, WalletType as pe, useAccount as Cs, useActiveWalletType as dp, useDisconnect as ks, checkWallet as Dp, isWalletConnect as xp, connect as Nt, getChainInfo as gp, GrazProvider as fp } from "graz";
|
|
11
11
|
import { createClient as bp, custom as Ap, walletActions as Cp, getAddress as Vt, UserRejectedRequestError as Lt, SwitchChainError as kp, numberToHex as za, defineChain as wp, http as re, createPublicClient as yp, isAddress as vp } from "viem";
|
|
12
12
|
import { createConfig as Ep, createStorage as Fp, useAccount as Dt, useConnectors as Uc, useConnect as Bp, useDisconnect as Mp, WagmiProvider as Pp } from "wagmi";
|
|
13
13
|
import { BackpackWalletAdapter as zp } from "@solana/wallet-adapter-backpack";
|
|
@@ -206,8 +206,8 @@ var mh = function(n, i, o, t) {
|
|
|
206
206
|
var p = a[l];
|
|
207
207
|
if (!s(p))
|
|
208
208
|
return !1;
|
|
209
|
-
var
|
|
210
|
-
if (c = o ? o.call(t,
|
|
209
|
+
var u = n[p], d = i[p];
|
|
210
|
+
if (c = o ? o.call(t, u, d, p) : void 0, c === !1 || c === void 0 && u !== d)
|
|
211
211
|
return !1;
|
|
212
212
|
}
|
|
213
213
|
return !0;
|
|
@@ -366,10 +366,10 @@ function yh(e) {
|
|
|
366
366
|
return bh(Go("", null, null, null, [""], e = fh(e), 0, [0], e));
|
|
367
367
|
}
|
|
368
368
|
function Go(e, n, i, o, t, c, a, r, s) {
|
|
369
|
-
for (var l = 0, p = 0,
|
|
369
|
+
for (var l = 0, p = 0, u = a, d = 0, x = 0, C = 0, k = 1, M = 1, q = 1, g = 0, E = "", H = t, T = c, j = o, z = E; M; )
|
|
370
370
|
switch (C = g, g = rn()) {
|
|
371
371
|
case 40:
|
|
372
|
-
if (C != 108 && qe(z,
|
|
372
|
+
if (C != 108 && qe(z, u - 1) == 58) {
|
|
373
373
|
Wo(z += ne(Rt(g), "&", "&\f"), "&\f", js(l ? r[l - 1] : 0)) != -1 && (q = -1);
|
|
374
374
|
break;
|
|
375
375
|
}
|
|
@@ -407,30 +407,30 @@ function Go(e, n, i, o, t, c, a, r, s) {
|
|
|
407
407
|
case 125:
|
|
408
408
|
M = 0;
|
|
409
409
|
case 59 + p:
|
|
410
|
-
q == -1 && (z = ne(z, /\f/g, "")), x > 0 && Dn(z) -
|
|
410
|
+
q == -1 && (z = ne(z, /\f/g, "")), x > 0 && Dn(z) - u && to(x > 32 ? Ia(z + ";", o, i, u - 1, s) : Ia(ne(z, " ", "") + ";", o, i, u - 2, s), s);
|
|
411
411
|
break;
|
|
412
412
|
case 59:
|
|
413
413
|
z += ";";
|
|
414
414
|
default:
|
|
415
|
-
if (to(j = ja(z, n, i, l, p, t, r, E, H = [], T = [],
|
|
415
|
+
if (to(j = ja(z, n, i, l, p, t, r, E, H = [], T = [], u, c), c), g === 123)
|
|
416
416
|
if (p === 0)
|
|
417
|
-
Go(z, n, j, j, H, c,
|
|
417
|
+
Go(z, n, j, j, H, c, u, r, T);
|
|
418
418
|
else
|
|
419
|
-
switch (
|
|
419
|
+
switch (d === 99 && qe(z, 3) === 110 ? 100 : d) {
|
|
420
420
|
case 100:
|
|
421
421
|
case 108:
|
|
422
422
|
case 109:
|
|
423
423
|
case 115:
|
|
424
|
-
Go(e, j, j, o && to(ja(e, j, j, 0, 0, t, r, E, t, H = [],
|
|
424
|
+
Go(e, j, j, o && to(ja(e, j, j, 0, 0, t, r, E, t, H = [], u, T), T), t, T, u, r, o ? H : T);
|
|
425
425
|
break;
|
|
426
426
|
default:
|
|
427
427
|
Go(z, j, j, j, [""], T, 0, r, T);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
l = p = x = 0, k = q = 1, E = z = "",
|
|
430
|
+
l = p = x = 0, k = q = 1, E = z = "", u = a;
|
|
431
431
|
break;
|
|
432
432
|
case 58:
|
|
433
|
-
|
|
433
|
+
u = 1 + Dn(z), x = C;
|
|
434
434
|
default:
|
|
435
435
|
if (k < 1) {
|
|
436
436
|
if (g == 123)
|
|
@@ -446,7 +446,7 @@ function Go(e, n, i, o, t, c, a, r, s) {
|
|
|
446
446
|
r[l++] = (Dn(z) - 1) * q, q = 1;
|
|
447
447
|
break;
|
|
448
448
|
case 64:
|
|
449
|
-
ii() === 45 && (z += Rt(rn())),
|
|
449
|
+
ii() === 45 && (z += Rt(rn())), d = ii(), p = u = Dn(E = z += wh(Uo())), g++;
|
|
450
450
|
break;
|
|
451
451
|
case 45:
|
|
452
452
|
C === 45 && Dn(z) == 2 && (k = 0);
|
|
@@ -454,11 +454,11 @@ function Go(e, n, i, o, t, c, a, r, s) {
|
|
|
454
454
|
}
|
|
455
455
|
return c;
|
|
456
456
|
}
|
|
457
|
-
function ja(e, n, i, o, t, c, a, r, s, l, p,
|
|
458
|
-
for (var
|
|
459
|
-
for (var g = 0, E = Ei(e,
|
|
457
|
+
function ja(e, n, i, o, t, c, a, r, s, l, p, u) {
|
|
458
|
+
for (var d = t - 1, x = t === 0 ? c : [""], C = Hs(x), k = 0, M = 0, q = 0; k < o; ++k)
|
|
459
|
+
for (var g = 0, E = Ei(e, d + 1, d = js(M = a[k])), H = e; g < C; ++g)
|
|
460
460
|
(H = Is(M > 0 ? x[g] + " " + E : ne(E, /&\f/g, x[g]))) && (s[q++] = H);
|
|
461
|
-
return ft(e, n, i, t === 0 ? xt : r, s, l, p,
|
|
461
|
+
return ft(e, n, i, t === 0 ? xt : r, s, l, p, u);
|
|
462
462
|
}
|
|
463
463
|
function vh(e, n, i, o) {
|
|
464
464
|
return ft(e, n, i, Ss, Kc(xh()), Ei(e, 2, -2), 0, o);
|
|
@@ -990,14 +990,14 @@ var Ys = function(e) {
|
|
|
990
990
|
var t = this;
|
|
991
991
|
this.options = He(He({}, tu), n), this.gs = i, this.names = new Map(o), this.server = !!n.isServer, !this.server && _o && Wa && (Wa = !1, Oa(this)), Yc(this, function() {
|
|
992
992
|
return function(c) {
|
|
993
|
-
for (var a = c.getTag(), r = a.length, s = "", l = function(
|
|
994
|
-
var
|
|
993
|
+
for (var a = c.getTag(), r = a.length, s = "", l = function(u) {
|
|
994
|
+
var d = function(q) {
|
|
995
995
|
return $o.get(q);
|
|
996
|
-
}(
|
|
997
|
-
if (
|
|
998
|
-
var x = c.names.get(
|
|
996
|
+
}(u);
|
|
997
|
+
if (d === void 0) return "continue";
|
|
998
|
+
var x = c.names.get(d), C = a.getGroup(u);
|
|
999
999
|
if (x === void 0 || !x.size || C.length === 0) return "continue";
|
|
1000
|
-
var k = "".concat(ai, ".g").concat(
|
|
1000
|
+
var k = "".concat(ai, ".g").concat(u, '[id="').concat(d, '"]'), M = "";
|
|
1001
1001
|
x !== void 0 && x.forEach(function(q) {
|
|
1002
1002
|
q.length > 0 && (M += "".concat(q, ","));
|
|
1003
1003
|
}), s += "".concat(C).concat(k, '{content:"').concat(M, '"}').concat(Xc);
|
|
@@ -1046,24 +1046,24 @@ function Qs(e, n) {
|
|
|
1046
1046
|
});
|
|
1047
1047
|
}
|
|
1048
1048
|
function _s(e) {
|
|
1049
|
-
var n, i, o, t = e === void 0 ? Bi : e, c = t.options, a = c === void 0 ? Bi : c, r = t.plugins, s = r === void 0 ? Ct : r, l = function(
|
|
1050
|
-
return C.startsWith(i) && C.endsWith(i) && C.replaceAll(i, "").length > 0 ? ".".concat(n) :
|
|
1049
|
+
var n, i, o, t = e === void 0 ? Bi : e, c = t.options, a = c === void 0 ? Bi : c, r = t.plugins, s = r === void 0 ? Ct : r, l = function(d, x, C) {
|
|
1050
|
+
return C.startsWith(i) && C.endsWith(i) && C.replaceAll(i, "").length > 0 ? ".".concat(n) : d;
|
|
1051
1051
|
}, p = s.slice();
|
|
1052
|
-
p.push(function(
|
|
1053
|
-
|
|
1052
|
+
p.push(function(d) {
|
|
1053
|
+
d.type === xt && d.value.includes("&") && (d.props[0] = d.props[0].replace(cu, i).replace(o, l));
|
|
1054
1054
|
}), a.prefix && p.push(Mh), p.push(Eh);
|
|
1055
|
-
var
|
|
1055
|
+
var u = function(d, x, C, k) {
|
|
1056
1056
|
x === void 0 && (x = ""), C === void 0 && (C = ""), k === void 0 && (k = "&"), n = k, i = x, o = new RegExp("\\".concat(i, "\\b"), "g");
|
|
1057
|
-
var M =
|
|
1057
|
+
var M = d.replace(au, ""), q = yh(C || x ? "".concat(C, " ").concat(x, " { ").concat(M, " }") : M);
|
|
1058
1058
|
a.namespace && (q = Qs(q, a.namespace));
|
|
1059
1059
|
var g = [];
|
|
1060
1060
|
return Qo(q, Fh(p.concat(Bh(function(E) {
|
|
1061
1061
|
return g.push(E);
|
|
1062
1062
|
})))), g;
|
|
1063
1063
|
};
|
|
1064
|
-
return
|
|
1065
|
-
return x.name || fn(15), _n(
|
|
1066
|
-
}, Rs).toString() : "",
|
|
1064
|
+
return u.hash = s.length ? s.reduce(function(d, x) {
|
|
1065
|
+
return x.name || fn(15), _n(d, x.name);
|
|
1066
|
+
}, Rs).toString() : "", u;
|
|
1067
1067
|
}
|
|
1068
1068
|
var ru = new Js(), Dc = _s(), Jc = sn.createContext({ shouldForwardProp: void 0, styleSheet: ru, stylis: Dc });
|
|
1069
1069
|
Jc.Consumer;
|
|
@@ -1072,7 +1072,7 @@ function xc() {
|
|
|
1072
1072
|
return Rc(Jc);
|
|
1073
1073
|
}
|
|
1074
1074
|
function lu(e) {
|
|
1075
|
-
var n =
|
|
1075
|
+
var n = le(e.stylisPlugins), i = n[0], o = n[1], t = xc().styleSheet, c = U(function() {
|
|
1076
1076
|
var s = t;
|
|
1077
1077
|
return e.sheet ? s = e.sheet : e.target && (s = s.reconstructWithOptions({ target: e.target }, !1)), e.disableCSSOMInjection && (s = s.reconstructWithOptions({ useCSSOMInjection: !1 })), s;
|
|
1078
1078
|
}, [e.disableCSSOMInjection, e.sheet, e.target, t]), a = U(function() {
|
|
@@ -1158,11 +1158,11 @@ var hu = Os(At), uu = function() {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
else {
|
|
1160
1160
|
for (var s = _n(this.baseHash, o.hash), l = "", p = 0; p < this.rules.length; p++) {
|
|
1161
|
-
var
|
|
1162
|
-
if (typeof
|
|
1163
|
-
else if (
|
|
1164
|
-
var
|
|
1165
|
-
s = _n(s,
|
|
1161
|
+
var u = this.rules[p];
|
|
1162
|
+
if (typeof u == "string") l += u, te.env.NODE_ENV !== "production" && (s = _n(s, u));
|
|
1163
|
+
else if (u) {
|
|
1164
|
+
var d = uc(oi(u, n, i, o));
|
|
1165
|
+
s = _n(s, d + p), l += d;
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
if (l) {
|
|
@@ -1201,9 +1201,9 @@ function Du(e, n, i) {
|
|
|
1201
1201
|
Ut[j] = (Ut[j] || 0) + 1;
|
|
1202
1202
|
var z = "".concat(j, "-").concat(Ws(At + j + Ut[j]));
|
|
1203
1203
|
return T ? "".concat(T, "-").concat(z) : z;
|
|
1204
|
-
}(n.displayName, n.parentComponentId) : s, p = n.displayName,
|
|
1204
|
+
}(n.displayName, n.parentComponentId) : s, p = n.displayName, u = p === void 0 ? function(H) {
|
|
1205
1205
|
return Wt(H) ? "styled.".concat(H) : "Styled(".concat(Us(H), ")");
|
|
1206
|
-
}(e) : p,
|
|
1206
|
+
}(e) : p, d = n.displayName && n.componentId ? "".concat(Ta(n.displayName), "-").concat(n.componentId) : n.componentId || l, x = o && t.attrs ? t.attrs.concat(r).filter(Boolean) : r, C = n.shouldForwardProp;
|
|
1207
1207
|
if (o && t.shouldForwardProp) {
|
|
1208
1208
|
var k = t.shouldForwardProp;
|
|
1209
1209
|
if (n.shouldForwardProp) {
|
|
@@ -1213,13 +1213,13 @@ function Du(e, n, i) {
|
|
|
1213
1213
|
};
|
|
1214
1214
|
} else C = k;
|
|
1215
1215
|
}
|
|
1216
|
-
var q = new uu(i,
|
|
1216
|
+
var q = new uu(i, d, o ? t.componentStyle : void 0);
|
|
1217
1217
|
function g(H, T) {
|
|
1218
1218
|
return function(j, z, h) {
|
|
1219
1219
|
var D = j.attrs, f = j.componentStyle, A = j.defaultProps, b = j.foldedComponentIds, w = j.styledComponentId, B = j.target, y = sn.useContext(lo), F = xc(), v = j.shouldForwardProp || F.shouldForwardProp;
|
|
1220
1220
|
te.env.NODE_ENV !== "production" && Pa(w);
|
|
1221
|
-
var P = qh(z, y, A) || Bi, I = function(J, ee,
|
|
1222
|
-
for (var on, tn = He(He({}, ee), { className: void 0, theme:
|
|
1221
|
+
var P = qh(z, y, A) || Bi, I = function(J, ee, me) {
|
|
1222
|
+
for (var on, tn = He(He({}, ee), { className: void 0, theme: me }), Yn = 0; Yn < J.length; Yn += 1) {
|
|
1223
1223
|
var Ne = ri(on = J[Yn]) ? on(tn) : on;
|
|
1224
1224
|
for (var Le in Ne) tn[Le] = Le === "className" ? ni(tn[Le], Ne[Le]) : Le === "style" ? He(He({}, tn[Le]), Ne[Le]) : Ne[Le];
|
|
1225
1225
|
}
|
|
@@ -1227,7 +1227,7 @@ function Du(e, n, i) {
|
|
|
1227
1227
|
}(D, z, P), O = I.as || B, G = {};
|
|
1228
1228
|
for (var Y in I) I[Y] === void 0 || Y[0] === "$" || Y === "as" || Y === "theme" && I.theme === P || (Y === "forwardedAs" ? G.as = I.forwardedAs : v && !v(Y, O) || (G[Y] = I[Y], v || te.env.NODE_ENV !== "development" || zs(Y) || Ga.has(Y) || !pc.has(O) || (Ga.add(Y), console.warn('styled-components: it looks like an unknown prop "'.concat(Y, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
1229
1229
|
var K = function(J, ee) {
|
|
1230
|
-
var
|
|
1230
|
+
var me = xc(), on = J.generateAndInjectStyles(ee, me.styleSheet, me.stylis);
|
|
1231
1231
|
return te.env.NODE_ENV !== "production" && Pa(on), on;
|
|
1232
1232
|
}(f, I);
|
|
1233
1233
|
te.env.NODE_ENV !== "production" && j.warnTooManyClasses && j.warnTooManyClasses(K);
|
|
@@ -1235,9 +1235,9 @@ function Du(e, n, i) {
|
|
|
1235
1235
|
return K && (ae += " " + K), I.className && (ae += " " + I.className), G[Wt(O) && !pc.has(O) ? "class" : "className"] = ae, G.ref = h, ap(O, G);
|
|
1236
1236
|
}(E, H, T);
|
|
1237
1237
|
}
|
|
1238
|
-
g.displayName =
|
|
1238
|
+
g.displayName = u;
|
|
1239
1239
|
var E = sn.forwardRef(g);
|
|
1240
|
-
return E.attrs = x, E.componentStyle = q, E.displayName =
|
|
1240
|
+
return E.attrs = x, E.componentStyle = q, E.displayName = u, E.shouldForwardProp = C, E.foldedComponentIds = o ? ni(t.foldedComponentIds, t.styledComponentId) : "", E.styledComponentId = d, E.target = o ? t.target : e, Object.defineProperty(E, "defaultProps", { get: function() {
|
|
1241
1241
|
return this._foldedDefaultProps;
|
|
1242
1242
|
}, set: function(H) {
|
|
1243
1243
|
this._foldedDefaultProps = o ? function(T) {
|
|
@@ -1245,7 +1245,7 @@ function Du(e, n, i) {
|
|
|
1245
1245
|
for (var h = 0, D = j; h < D.length; h++) dc(T, D[h], !0);
|
|
1246
1246
|
return T;
|
|
1247
1247
|
}({}, t.defaultProps, H) : H;
|
|
1248
|
-
} }), te.env.NODE_ENV !== "production" && (Sh(
|
|
1248
|
+
} }), te.env.NODE_ENV !== "production" && (Sh(u, d), E.warnTooManyClasses = /* @__PURE__ */ function(H, T) {
|
|
1249
1249
|
var j = {}, z = !1;
|
|
1250
1250
|
return function(h) {
|
|
1251
1251
|
if (!z && (j[h] = !0, Object.keys(j).length >= 200)) {
|
|
@@ -1262,7 +1262,7 @@ Example:
|
|
|
1262
1262
|
<Component />`), z = !0, j = {};
|
|
1263
1263
|
}
|
|
1264
1264
|
};
|
|
1265
|
-
}(
|
|
1265
|
+
}(u, d)), Yc(E, function() {
|
|
1266
1266
|
return ".".concat(E.styledComponentId);
|
|
1267
1267
|
}), c && Zs(E, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), E;
|
|
1268
1268
|
}
|
|
@@ -1453,9 +1453,9 @@ const _c = ({
|
|
|
1453
1453
|
theme: n
|
|
1454
1454
|
}) => {
|
|
1455
1455
|
wu();
|
|
1456
|
-
const i = mp(), [, o] =
|
|
1456
|
+
const i = mp(), [, o] = le(), [t, c] = le(), a = Pe((l) => {
|
|
1457
1457
|
o(l);
|
|
1458
|
-
}, []), r =
|
|
1458
|
+
}, []), r = Pe((l) => {
|
|
1459
1459
|
c(l);
|
|
1460
1460
|
}, []), s = U(() => ({
|
|
1461
1461
|
...et,
|
|
@@ -1475,7 +1475,7 @@ const _c = ({
|
|
|
1475
1475
|
}
|
|
1476
1476
|
) });
|
|
1477
1477
|
}, il = ({ children: e }) => {
|
|
1478
|
-
const [n, i] =
|
|
1478
|
+
const [n, i] = le(!1);
|
|
1479
1479
|
return De(() => {
|
|
1480
1480
|
i(!0);
|
|
1481
1481
|
}, []), /* @__PURE__ */ m(Ce, { children: n ? e : null });
|
|
@@ -1524,8 +1524,8 @@ function Su(e = () => {
|
|
|
1524
1524
|
let o, t;
|
|
1525
1525
|
const c = {
|
|
1526
1526
|
getItem: (s, l) => {
|
|
1527
|
-
var p,
|
|
1528
|
-
const
|
|
1527
|
+
var p, u;
|
|
1528
|
+
const d = (C) => {
|
|
1529
1529
|
if (C = C || "", o !== C) {
|
|
1530
1530
|
try {
|
|
1531
1531
|
t = JSON.parse(C, n == null ? void 0 : n.reviver);
|
|
@@ -1535,8 +1535,8 @@ function Su(e = () => {
|
|
|
1535
1535
|
o = C;
|
|
1536
1536
|
}
|
|
1537
1537
|
return t;
|
|
1538
|
-
}, x = (
|
|
1539
|
-
return zu(x) ? x.then(
|
|
1538
|
+
}, x = (u = (p = e()) == null ? void 0 : p.getItem(s)) != null ? u : null;
|
|
1539
|
+
return zu(x) ? x.then(d) : d(x);
|
|
1540
1540
|
},
|
|
1541
1541
|
setItem: (s, l) => {
|
|
1542
1542
|
var p;
|
|
@@ -1549,12 +1549,12 @@ function Su(e = () => {
|
|
|
1549
1549
|
var l;
|
|
1550
1550
|
return (l = e()) == null ? void 0 : l.removeItem(s);
|
|
1551
1551
|
}
|
|
1552
|
-
}, a = (s) => (l, p,
|
|
1552
|
+
}, a = (s) => (l, p, u) => s(l, (d) => {
|
|
1553
1553
|
let x;
|
|
1554
1554
|
try {
|
|
1555
|
-
x = JSON.parse(
|
|
1555
|
+
x = JSON.parse(d || "");
|
|
1556
1556
|
} catch {
|
|
1557
|
-
x =
|
|
1557
|
+
x = u;
|
|
1558
1558
|
}
|
|
1559
1559
|
p(x);
|
|
1560
1560
|
});
|
|
@@ -1567,8 +1567,8 @@ function Su(e = () => {
|
|
|
1567
1567
|
if (!(e() instanceof window.Storage))
|
|
1568
1568
|
return () => {
|
|
1569
1569
|
};
|
|
1570
|
-
const p = (
|
|
1571
|
-
|
|
1570
|
+
const p = (u) => {
|
|
1571
|
+
u.storageArea === e() && u.key === s && l(u.newValue);
|
|
1572
1572
|
};
|
|
1573
1573
|
return window.addEventListener("storage", p), () => {
|
|
1574
1574
|
window.removeEventListener("storage", p);
|
|
@@ -1949,9 +1949,9 @@ function hd(e, n = 24) {
|
|
|
1949
1949
|
for (let a = 0; a < 10; a++)
|
|
1950
1950
|
i[a] = e[a] ^ e[a + 10] ^ e[a + 20] ^ e[a + 30] ^ e[a + 40];
|
|
1951
1951
|
for (let a = 0; a < 10; a += 2) {
|
|
1952
|
-
const r = (a + 8) % 10, s = (a + 2) % 10, l = i[s], p = i[s + 1],
|
|
1952
|
+
const r = (a + 8) % 10, s = (a + 2) % 10, l = i[s], p = i[s + 1], u = $a(l, p, 1) ^ i[r], d = er(l, p, 1) ^ i[r + 1];
|
|
1953
1953
|
for (let x = 0; x < 50; x += 10)
|
|
1954
|
-
e[a + x] ^=
|
|
1954
|
+
e[a + x] ^= u, e[a + x + 1] ^= d;
|
|
1955
1955
|
}
|
|
1956
1956
|
let t = e[2], c = e[3];
|
|
1957
1957
|
for (let a = 0; a < 24; a++) {
|
|
@@ -2757,8 +2757,8 @@ class Kd extends dl {
|
|
|
2757
2757
|
const { buffer: i, view: o, blockLen: t, isLE: c } = this;
|
|
2758
2758
|
let { pos: a } = this;
|
|
2759
2759
|
i[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > t - a && (this.process(o, 0), a = 0);
|
|
2760
|
-
for (let
|
|
2761
|
-
i[
|
|
2760
|
+
for (let u = a; u < t; u++)
|
|
2761
|
+
i[u] = 0;
|
|
2762
2762
|
Wd(o, t - 8, BigInt(this.length * 8), c), this.process(o, 0);
|
|
2763
2763
|
const r = Gt(n), s = this.outputLen;
|
|
2764
2764
|
if (s % 4)
|
|
@@ -2766,8 +2766,8 @@ class Kd extends dl {
|
|
|
2766
2766
|
const l = s / 4, p = this.get();
|
|
2767
2767
|
if (l > p.length)
|
|
2768
2768
|
throw new Error("_sha2: outputLen bigger than state");
|
|
2769
|
-
for (let
|
|
2770
|
-
r.setUint32(4 *
|
|
2769
|
+
for (let u = 0; u < l; u++)
|
|
2770
|
+
r.setUint32(4 * u, p[u], c);
|
|
2771
2771
|
}
|
|
2772
2772
|
digest() {
|
|
2773
2773
|
const { buffer: n, outputLen: i } = this;
|
|
@@ -2869,15 +2869,15 @@ class Zd extends Kd {
|
|
|
2869
2869
|
this.A = n | 0, this.B = i | 0, this.C = o | 0, this.D = t | 0, this.E = c | 0, this.F = a | 0, this.G = r | 0, this.H = s | 0;
|
|
2870
2870
|
}
|
|
2871
2871
|
process(n, i) {
|
|
2872
|
-
for (let
|
|
2873
|
-
qn[
|
|
2874
|
-
for (let
|
|
2875
|
-
const
|
|
2876
|
-
qn[
|
|
2872
|
+
for (let u = 0; u < 16; u++, i += 4)
|
|
2873
|
+
qn[u] = n.getUint32(i, !1);
|
|
2874
|
+
for (let u = 16; u < 64; u++) {
|
|
2875
|
+
const d = qn[u - 15], x = qn[u - 2], C = hn(d, 7) ^ hn(d, 18) ^ d >>> 3, k = hn(x, 17) ^ hn(x, 19) ^ x >>> 10;
|
|
2876
|
+
qn[u] = k + qn[u - 7] + C + qn[u - 16] | 0;
|
|
2877
2877
|
}
|
|
2878
2878
|
let { A: o, B: t, C: c, D: a, E: r, F: s, G: l, H: p } = this;
|
|
2879
|
-
for (let
|
|
2880
|
-
const
|
|
2879
|
+
for (let u = 0; u < 64; u++) {
|
|
2880
|
+
const d = hn(r, 6) ^ hn(r, 11) ^ hn(r, 25), x = p + d + Ud(r, s, l) + Xd[u] + qn[u] | 0, k = (hn(o, 2) ^ hn(o, 13) ^ hn(o, 22)) + Gd(o, t, c) | 0;
|
|
2881
2881
|
p = l, l = s, s = r, r = a + x | 0, a = c, c = t, t = o, o = x + k | 0;
|
|
2882
2882
|
}
|
|
2883
2883
|
o = o + this.A | 0, t = t + this.B | 0, c = c + this.C | 0, a = a + this.D | 0, r = r + this.E | 0, s = s + this.F | 0, l = l + this.G | 0, p = p + this.H | 0, this.set(o, t, c, a, r, s, l, p);
|
|
@@ -2992,13 +2992,13 @@ function t0(e) {
|
|
|
2992
2992
|
throw new Sd({ transaction: e });
|
|
2993
2993
|
}
|
|
2994
2994
|
class c0 extends oe {
|
|
2995
|
-
constructor(n, { account: i, docsPath: o, chain: t, data: c, gas: a, gasPrice: r, maxFeePerGas: s, maxPriorityFeePerGas: l, nonce: p, to:
|
|
2995
|
+
constructor(n, { account: i, docsPath: o, chain: t, data: c, gas: a, gasPrice: r, maxFeePerGas: s, maxPriorityFeePerGas: l, nonce: p, to: u, value: d, stateOverride: x }) {
|
|
2996
2996
|
var M;
|
|
2997
2997
|
const C = i ? Ft(i) : void 0;
|
|
2998
2998
|
let k = El({
|
|
2999
2999
|
from: C == null ? void 0 : C.address,
|
|
3000
|
-
to:
|
|
3001
|
-
value: typeof
|
|
3000
|
+
to: u,
|
|
3001
|
+
value: typeof d < "u" && `${Md(d)} ${((M = t == null ? void 0 : t.nativeCurrency) == null ? void 0 : M.symbol) || "ETH"}`,
|
|
3002
3002
|
data: c,
|
|
3003
3003
|
gas: a,
|
|
3004
3004
|
gasPrice: typeof r < "u" && `${ti(r)} gwei`,
|
|
@@ -3172,9 +3172,9 @@ function x0(e, n) {
|
|
|
3172
3172
|
return i === "eip1559" ? b0(e, n) : i === "eip2930" ? A0(e, n) : i === "eip4844" ? f0(e, n) : i === "eip7702" ? g0(e, n) : C0(e, n);
|
|
3173
3173
|
}
|
|
3174
3174
|
function g0(e, n) {
|
|
3175
|
-
const { authorizationList: i, chainId: o, gas: t, nonce: c, to: a, value: r, maxFeePerGas: s, maxPriorityFeePerGas: l, accessList: p, data:
|
|
3175
|
+
const { authorizationList: i, chainId: o, gas: t, nonce: c, to: a, value: r, maxFeePerGas: s, maxPriorityFeePerGas: l, accessList: p, data: u } = e;
|
|
3176
3176
|
p0(e);
|
|
3177
|
-
const
|
|
3177
|
+
const d = wo(p), x = D0(i);
|
|
3178
3178
|
return Gi([
|
|
3179
3179
|
"0x04",
|
|
3180
3180
|
Vn([
|
|
@@ -3185,23 +3185,23 @@ function g0(e, n) {
|
|
|
3185
3185
|
t ? Q(t) : "0x",
|
|
3186
3186
|
a ?? "0x",
|
|
3187
3187
|
r ? Q(r) : "0x",
|
|
3188
|
-
|
|
3189
|
-
|
|
3188
|
+
u ?? "0x",
|
|
3189
|
+
d,
|
|
3190
3190
|
x,
|
|
3191
3191
|
...Ki(e, n)
|
|
3192
3192
|
])
|
|
3193
3193
|
]);
|
|
3194
3194
|
}
|
|
3195
3195
|
function f0(e, n) {
|
|
3196
|
-
const { chainId: i, gas: o, nonce: t, to: c, value: a, maxFeePerBlobGas: r, maxFeePerGas: s, maxPriorityFeePerGas: l, accessList: p, data:
|
|
3196
|
+
const { chainId: i, gas: o, nonce: t, to: c, value: a, maxFeePerBlobGas: r, maxFeePerGas: s, maxPriorityFeePerGas: l, accessList: p, data: u } = e;
|
|
3197
3197
|
h0(e);
|
|
3198
|
-
let
|
|
3199
|
-
if (e.blobs && (typeof
|
|
3198
|
+
let d = e.blobVersionedHashes, x = e.sidecars;
|
|
3199
|
+
if (e.blobs && (typeof d > "u" || typeof x > "u")) {
|
|
3200
3200
|
const E = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((j) => Pn(j)), H = e.kzg, T = zl({
|
|
3201
3201
|
blobs: E,
|
|
3202
3202
|
kzg: H
|
|
3203
3203
|
});
|
|
3204
|
-
if (typeof
|
|
3204
|
+
if (typeof d > "u" && (d = _d({
|
|
3205
3205
|
commitments: T
|
|
3206
3206
|
})), typeof x > "u") {
|
|
3207
3207
|
const j = Sl({ blobs: E, commitments: T, kzg: H });
|
|
@@ -3216,10 +3216,10 @@ function f0(e, n) {
|
|
|
3216
3216
|
o ? Q(o) : "0x",
|
|
3217
3217
|
c ?? "0x",
|
|
3218
3218
|
a ? Q(a) : "0x",
|
|
3219
|
-
|
|
3219
|
+
u ?? "0x",
|
|
3220
3220
|
C,
|
|
3221
3221
|
r ? Q(r) : "0x",
|
|
3222
|
-
|
|
3222
|
+
d ?? [],
|
|
3223
3223
|
...Ki(e, n)
|
|
3224
3224
|
], M = [], q = [], g = [];
|
|
3225
3225
|
if (x)
|
|
@@ -3236,7 +3236,7 @@ function f0(e, n) {
|
|
|
3236
3236
|
function b0(e, n) {
|
|
3237
3237
|
const { chainId: i, gas: o, nonce: t, to: c, value: a, maxFeePerGas: r, maxPriorityFeePerGas: s, accessList: l, data: p } = e;
|
|
3238
3238
|
ta(e);
|
|
3239
|
-
const
|
|
3239
|
+
const u = wo(l), d = [
|
|
3240
3240
|
Q(i),
|
|
3241
3241
|
t ? Q(t) : "0x",
|
|
3242
3242
|
s ? Q(s) : "0x",
|
|
@@ -3245,18 +3245,18 @@ function b0(e, n) {
|
|
|
3245
3245
|
c ?? "0x",
|
|
3246
3246
|
a ? Q(a) : "0x",
|
|
3247
3247
|
p ?? "0x",
|
|
3248
|
-
|
|
3248
|
+
u,
|
|
3249
3249
|
...Ki(e, n)
|
|
3250
3250
|
];
|
|
3251
3251
|
return Gi([
|
|
3252
3252
|
"0x02",
|
|
3253
|
-
Vn(
|
|
3253
|
+
Vn(d)
|
|
3254
3254
|
]);
|
|
3255
3255
|
}
|
|
3256
3256
|
function A0(e, n) {
|
|
3257
3257
|
const { chainId: i, gas: o, data: t, nonce: c, to: a, value: r, accessList: s, gasPrice: l } = e;
|
|
3258
3258
|
u0(e);
|
|
3259
|
-
const p = wo(s),
|
|
3259
|
+
const p = wo(s), u = [
|
|
3260
3260
|
Q(i),
|
|
3261
3261
|
c ? Q(c) : "0x",
|
|
3262
3262
|
l ? Q(l) : "0x",
|
|
@@ -3269,7 +3269,7 @@ function A0(e, n) {
|
|
|
3269
3269
|
];
|
|
3270
3270
|
return Gi([
|
|
3271
3271
|
"0x01",
|
|
3272
|
-
Vn(
|
|
3272
|
+
Vn(u)
|
|
3273
3273
|
]);
|
|
3274
3274
|
}
|
|
3275
3275
|
function C0(e, n) {
|
|
@@ -3293,12 +3293,12 @@ function C0(e, n) {
|
|
|
3293
3293
|
if (n.v !== x)
|
|
3294
3294
|
throw new zd({ v: n.v });
|
|
3295
3295
|
return x;
|
|
3296
|
-
})(),
|
|
3296
|
+
})(), u = zi(n.r), d = zi(n.s);
|
|
3297
3297
|
l = [
|
|
3298
3298
|
...l,
|
|
3299
3299
|
Q(p),
|
|
3300
|
-
|
|
3301
|
-
|
|
3300
|
+
u === "0x00" ? "0x" : u,
|
|
3301
|
+
d === "0x00" ? "0x" : d
|
|
3302
3302
|
];
|
|
3303
3303
|
} else i > 0 && (l = [
|
|
3304
3304
|
...l,
|
|
@@ -3447,13 +3447,13 @@ async function M0(e, n = {}) {
|
|
|
3447
3447
|
const { connector: l } = n;
|
|
3448
3448
|
if (e.state.status === "reconnecting" && !l.getAccounts && !l.getChainId)
|
|
3449
3449
|
throw new B0({ connector: l });
|
|
3450
|
-
const [p,
|
|
3450
|
+
const [p, u] = await Promise.all([
|
|
3451
3451
|
l.getAccounts(),
|
|
3452
3452
|
l.getChainId()
|
|
3453
3453
|
]);
|
|
3454
3454
|
i = {
|
|
3455
3455
|
accounts: p,
|
|
3456
|
-
chainId:
|
|
3456
|
+
chainId: u,
|
|
3457
3457
|
connector: l
|
|
3458
3458
|
};
|
|
3459
3459
|
} else
|
|
@@ -3975,7 +3975,7 @@ const G0 = {
|
|
|
3975
3975
|
};
|
|
3976
3976
|
function K0(e, n) {
|
|
3977
3977
|
Z0(e);
|
|
3978
|
-
const { chainId: i, gas: o, nonce: t, to: c, value: a, maxFeePerGas: r, maxPriorityFeePerGas: s, accessList: l, feeCurrency: p, data:
|
|
3978
|
+
const { chainId: i, gas: o, nonce: t, to: c, value: a, maxFeePerGas: r, maxPriorityFeePerGas: s, accessList: l, feeCurrency: p, data: u } = e, d = [
|
|
3979
3979
|
Q(i),
|
|
3980
3980
|
t ? Q(t) : "0x",
|
|
3981
3981
|
s ? Q(s) : "0x",
|
|
@@ -3983,14 +3983,14 @@ function K0(e, n) {
|
|
|
3983
3983
|
o ? Q(o) : "0x",
|
|
3984
3984
|
c ?? "0x",
|
|
3985
3985
|
a ? Q(a) : "0x",
|
|
3986
|
-
|
|
3986
|
+
u ?? "0x",
|
|
3987
3987
|
wo(l),
|
|
3988
3988
|
p,
|
|
3989
3989
|
...Ki(e, n)
|
|
3990
3990
|
];
|
|
3991
3991
|
return Gi([
|
|
3992
3992
|
"0x7b",
|
|
3993
|
-
Vn(
|
|
3993
|
+
Vn(d)
|
|
3994
3994
|
]);
|
|
3995
3995
|
}
|
|
3996
3996
|
const X0 = ko;
|
|
@@ -4201,7 +4201,7 @@ async function J0(e, n) {
|
|
|
4201
4201
|
throw new Cd();
|
|
4202
4202
|
const o = Ft(i);
|
|
4203
4203
|
try {
|
|
4204
|
-
const { accessList: r, blockNumber: s, blockTag: l, data: p, gas:
|
|
4204
|
+
const { accessList: r, blockNumber: s, blockTag: l, data: p, gas: u, gasPrice: d, maxFeePerGas: x, maxPriorityFeePerGas: C, nonce: k, to: M, value: q, ...g } = n, H = (s ? Oe(s) : void 0) || l;
|
|
4205
4205
|
Vd(n);
|
|
4206
4206
|
const T = (a = (c = (t = e.chain) == null ? void 0 : t.formatters) == null ? void 0 : c.transactionRequest) == null ? void 0 : a.format, z = (T || Fl)({
|
|
4207
4207
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
@@ -4209,8 +4209,8 @@ async function J0(e, n) {
|
|
|
4209
4209
|
from: o == null ? void 0 : o.address,
|
|
4210
4210
|
accessList: r,
|
|
4211
4211
|
data: p,
|
|
4212
|
-
gas:
|
|
4213
|
-
gasPrice:
|
|
4212
|
+
gas: u,
|
|
4213
|
+
gasPrice: d,
|
|
4214
4214
|
maxFeePerGas: x,
|
|
4215
4215
|
maxPriorityFeePerGas: C,
|
|
4216
4216
|
nonce: k,
|
|
@@ -4615,35 +4615,35 @@ function ca(e) {
|
|
|
4615
4615
|
let i, o;
|
|
4616
4616
|
const t = "eip155";
|
|
4617
4617
|
let c, a, r, s, l, p;
|
|
4618
|
-
return (
|
|
4618
|
+
return (u) => ({
|
|
4619
4619
|
id: "walletConnect",
|
|
4620
4620
|
name: "WalletConnect",
|
|
4621
4621
|
type: ca.type,
|
|
4622
4622
|
async setup() {
|
|
4623
|
-
const
|
|
4624
|
-
|
|
4623
|
+
const d = await this.getProvider().catch(() => null);
|
|
4624
|
+
d && (r || (r = this.onConnect.bind(this), d.on("connect", r)), l || (l = this.onSessionDelete.bind(this), d.on("session_delete", l)));
|
|
4625
4625
|
},
|
|
4626
|
-
async connect({ chainId:
|
|
4626
|
+
async connect({ chainId: d, ...x } = {}) {
|
|
4627
4627
|
var C, k;
|
|
4628
4628
|
try {
|
|
4629
4629
|
const M = await this.getProvider();
|
|
4630
4630
|
if (!M)
|
|
4631
4631
|
throw new cr();
|
|
4632
4632
|
s || (s = this.onDisplayUri, M.on("display_uri", s));
|
|
4633
|
-
let q =
|
|
4633
|
+
let q = d;
|
|
4634
4634
|
if (!q) {
|
|
4635
|
-
const T = await ((C =
|
|
4636
|
-
|
|
4635
|
+
const T = await ((C = u.storage) == null ? void 0 : C.getItem("state")) ?? {};
|
|
4636
|
+
u.chains.some((z) => z.id === T.chainId) ? q = T.chainId : q = (k = u.chains[0]) == null ? void 0 : k.id;
|
|
4637
4637
|
}
|
|
4638
4638
|
if (!q)
|
|
4639
4639
|
throw new Error("No chains found on connector.");
|
|
4640
4640
|
const g = await this.isChainsStale();
|
|
4641
4641
|
if (M.session && g && await M.disconnect(), !M.session || g) {
|
|
4642
|
-
const T =
|
|
4642
|
+
const T = u.chains.filter((j) => j.id !== q).map((j) => j.id);
|
|
4643
4643
|
await M.connect({
|
|
4644
4644
|
optionalChains: [q, ...T],
|
|
4645
4645
|
..."pairingTopic" in x ? { pairingTopic: x.pairingTopic } : {}
|
|
4646
|
-
}), this.setRequestedChainsIds(
|
|
4646
|
+
}), this.setRequestedChainsIds(u.chains.map((j) => j.id));
|
|
4647
4647
|
}
|
|
4648
4648
|
const E = (await M.enable()).map((T) => Vt(T)), H = await this.getChainId();
|
|
4649
4649
|
return s && (M.removeListener("display_uri", s), s = void 0), r && (M.removeListener("connect", r), r = void 0), c || (c = this.onAccountsChanged.bind(this), M.on("accountsChanged", c)), a || (a = this.onChainChanged.bind(this), M.on("chainChanged", a)), p || (p = this.onDisconnect.bind(this), M.on("disconnect", p)), l || (l = this.onSessionDelete.bind(this), M.on("session_delete", l)), { accounts: E, chainId: H };
|
|
@@ -4652,73 +4652,73 @@ function ca(e) {
|
|
|
4652
4652
|
}
|
|
4653
4653
|
},
|
|
4654
4654
|
async disconnect() {
|
|
4655
|
-
const
|
|
4655
|
+
const d = await this.getProvider();
|
|
4656
4656
|
try {
|
|
4657
|
-
await (
|
|
4657
|
+
await (d == null ? void 0 : d.disconnect());
|
|
4658
4658
|
} catch (x) {
|
|
4659
4659
|
if (!/No matching key/i.test(x.message))
|
|
4660
4660
|
throw x;
|
|
4661
4661
|
} finally {
|
|
4662
|
-
a && (
|
|
4662
|
+
a && (d == null || d.removeListener("chainChanged", a), a = void 0), p && (d == null || d.removeListener("disconnect", p), p = void 0), r || (r = this.onConnect.bind(this), d == null || d.on("connect", r)), c && (d == null || d.removeListener("accountsChanged", c), c = void 0), l && (d == null || d.removeListener("session_delete", l), l = void 0), this.setRequestedChainsIds([]);
|
|
4663
4663
|
}
|
|
4664
4664
|
},
|
|
4665
4665
|
async getAccounts() {
|
|
4666
4666
|
return (await this.getProvider()).accounts.map((x) => Vt(x));
|
|
4667
4667
|
},
|
|
4668
|
-
async getProvider({ chainId:
|
|
4668
|
+
async getProvider({ chainId: d } = {}) {
|
|
4669
4669
|
var C;
|
|
4670
4670
|
async function x() {
|
|
4671
|
-
const k =
|
|
4671
|
+
const k = u.chains.map((q) => q.id);
|
|
4672
4672
|
if (!k.length)
|
|
4673
4673
|
return;
|
|
4674
|
-
const { EthereumProvider: M } = await import("./index.es-
|
|
4674
|
+
const { EthereumProvider: M } = await import("./index.es-QrUpbRy3.js");
|
|
4675
4675
|
return await M.init({
|
|
4676
4676
|
...e,
|
|
4677
4677
|
disableProviderPing: !0,
|
|
4678
4678
|
optionalChains: k,
|
|
4679
4679
|
projectId: e.projectId,
|
|
4680
|
-
rpcMap: Object.fromEntries(
|
|
4680
|
+
rpcMap: Object.fromEntries(u.chains.map((q) => {
|
|
4681
4681
|
const [g] = z0({
|
|
4682
4682
|
chain: q,
|
|
4683
|
-
transports:
|
|
4683
|
+
transports: u.transports
|
|
4684
4684
|
});
|
|
4685
4685
|
return [q.id, g];
|
|
4686
4686
|
})),
|
|
4687
4687
|
showQrModal: e.showQrModal ?? !0
|
|
4688
4688
|
});
|
|
4689
4689
|
}
|
|
4690
|
-
return i || (o || (o = x()), i = await o, i == null || i.events.setMaxListeners(Number.POSITIVE_INFINITY)),
|
|
4690
|
+
return i || (o || (o = x()), i = await o, i == null || i.events.setMaxListeners(Number.POSITIVE_INFINITY)), d && await ((C = this.switchChain) == null ? void 0 : C.call(this, { chainId: d })), i;
|
|
4691
4691
|
},
|
|
4692
4692
|
async getChainId() {
|
|
4693
4693
|
return (await this.getProvider()).chainId;
|
|
4694
4694
|
},
|
|
4695
4695
|
async isAuthorized() {
|
|
4696
4696
|
try {
|
|
4697
|
-
const [
|
|
4697
|
+
const [d, x] = await Promise.all([
|
|
4698
4698
|
this.getAccounts(),
|
|
4699
4699
|
this.getProvider()
|
|
4700
4700
|
]);
|
|
4701
|
-
return
|
|
4701
|
+
return d.length ? await this.isChainsStale() && x.session ? (await x.disconnect().catch(() => {
|
|
4702
4702
|
}), !1) : !0 : !1;
|
|
4703
4703
|
} catch {
|
|
4704
4704
|
return !1;
|
|
4705
4705
|
}
|
|
4706
4706
|
},
|
|
4707
|
-
async switchChain({ addEthereumChainParameter:
|
|
4707
|
+
async switchChain({ addEthereumChainParameter: d, chainId: x }) {
|
|
4708
4708
|
var M, q, g;
|
|
4709
4709
|
const C = await this.getProvider();
|
|
4710
4710
|
if (!C)
|
|
4711
4711
|
throw new cr();
|
|
4712
|
-
const k =
|
|
4712
|
+
const k = u.chains.find((E) => E.id === x);
|
|
4713
4713
|
if (!k)
|
|
4714
4714
|
throw new kp(new y0());
|
|
4715
4715
|
try {
|
|
4716
4716
|
await Promise.all([
|
|
4717
4717
|
new Promise((H) => {
|
|
4718
4718
|
const T = ({ chainId: j }) => {
|
|
4719
|
-
j === x && (
|
|
4719
|
+
j === x && (u.emitter.off("change", T), H());
|
|
4720
4720
|
};
|
|
4721
|
-
|
|
4721
|
+
u.emitter.on("change", T);
|
|
4722
4722
|
}),
|
|
4723
4723
|
C.request({
|
|
4724
4724
|
method: "wallet_switchEthereumChain",
|
|
@@ -4733,15 +4733,15 @@ function ca(e) {
|
|
|
4733
4733
|
throw new Lt(H);
|
|
4734
4734
|
try {
|
|
4735
4735
|
let T;
|
|
4736
|
-
|
|
4736
|
+
d != null && d.blockExplorerUrls ? T = d.blockExplorerUrls : T = (M = k.blockExplorers) != null && M.default.url ? [(q = k.blockExplorers) == null ? void 0 : q.default.url] : [];
|
|
4737
4737
|
let j;
|
|
4738
|
-
(g =
|
|
4738
|
+
(g = d == null ? void 0 : d.rpcUrls) != null && g.length ? j = d.rpcUrls : j = [...k.rpcUrls.default.http];
|
|
4739
4739
|
const z = {
|
|
4740
4740
|
blockExplorerUrls: T,
|
|
4741
4741
|
chainId: za(x),
|
|
4742
|
-
chainName: (
|
|
4743
|
-
iconUrls:
|
|
4744
|
-
nativeCurrency: (
|
|
4742
|
+
chainName: (d == null ? void 0 : d.chainName) ?? k.name,
|
|
4743
|
+
iconUrls: d == null ? void 0 : d.iconUrls,
|
|
4744
|
+
nativeCurrency: (d == null ? void 0 : d.nativeCurrency) ?? k.nativeCurrency,
|
|
4745
4745
|
rpcUrls: j
|
|
4746
4746
|
};
|
|
4747
4747
|
await C.request({
|
|
@@ -4755,26 +4755,26 @@ function ca(e) {
|
|
|
4755
4755
|
}
|
|
4756
4756
|
}
|
|
4757
4757
|
},
|
|
4758
|
-
onAccountsChanged(
|
|
4759
|
-
|
|
4760
|
-
accounts:
|
|
4758
|
+
onAccountsChanged(d) {
|
|
4759
|
+
d.length === 0 ? this.onDisconnect() : u.emitter.emit("change", {
|
|
4760
|
+
accounts: d.map((x) => Vt(x))
|
|
4761
4761
|
});
|
|
4762
4762
|
},
|
|
4763
|
-
onChainChanged(
|
|
4764
|
-
const x = Number(
|
|
4765
|
-
|
|
4763
|
+
onChainChanged(d) {
|
|
4764
|
+
const x = Number(d);
|
|
4765
|
+
u.emitter.emit("change", { chainId: x });
|
|
4766
4766
|
},
|
|
4767
|
-
async onConnect(
|
|
4768
|
-
const x = Number(
|
|
4769
|
-
|
|
4767
|
+
async onConnect(d) {
|
|
4768
|
+
const x = Number(d.chainId), C = await this.getAccounts();
|
|
4769
|
+
u.emitter.emit("connect", { accounts: C, chainId: x });
|
|
4770
4770
|
},
|
|
4771
|
-
async onDisconnect(
|
|
4772
|
-
this.setRequestedChainsIds([]),
|
|
4771
|
+
async onDisconnect(d) {
|
|
4772
|
+
this.setRequestedChainsIds([]), u.emitter.emit("disconnect");
|
|
4773
4773
|
const x = await this.getProvider();
|
|
4774
4774
|
c && (x.removeListener("accountsChanged", c), c = void 0), a && (x.removeListener("chainChanged", a), a = void 0), p && (x.removeListener("disconnect", p), p = void 0), l && (x.removeListener("session_delete", l), l = void 0), r || (r = this.onConnect.bind(this), x.on("connect", r));
|
|
4775
4775
|
},
|
|
4776
|
-
onDisplayUri(
|
|
4777
|
-
|
|
4776
|
+
onDisplayUri(d) {
|
|
4777
|
+
u.emitter.emit("message", { type: "display_uri", data: d });
|
|
4778
4778
|
},
|
|
4779
4779
|
onSessionDelete() {
|
|
4780
4780
|
this.onDisconnect();
|
|
@@ -4784,8 +4784,8 @@ function ca(e) {
|
|
|
4784
4784
|
return i ? ((k = (C = (x = i.session) == null ? void 0 : x.namespaces[t]) == null ? void 0 : C.accounts) == null ? void 0 : k.map((M) => Number.parseInt(M.split(":")[1] || ""))) ?? [] : [];
|
|
4785
4785
|
},
|
|
4786
4786
|
async getRequestedChainsIds() {
|
|
4787
|
-
var
|
|
4788
|
-
return await ((
|
|
4787
|
+
var d;
|
|
4788
|
+
return await ((d = u.storage) == null ? void 0 : d.getItem(this.requestedChainsStorageKey)) ?? [];
|
|
4789
4789
|
},
|
|
4790
4790
|
/**
|
|
4791
4791
|
* Checks if the target chains match the chains that were
|
|
@@ -4801,15 +4801,15 @@ function ca(e) {
|
|
|
4801
4801
|
async isChainsStale() {
|
|
4802
4802
|
if (!n)
|
|
4803
4803
|
return !1;
|
|
4804
|
-
const
|
|
4805
|
-
if (x.length && !x.some((k) =>
|
|
4804
|
+
const d = u.chains.map((k) => k.id), x = this.getNamespaceChainsIds();
|
|
4805
|
+
if (x.length && !x.some((k) => d.includes(k)))
|
|
4806
4806
|
return !1;
|
|
4807
4807
|
const C = await this.getRequestedChainsIds();
|
|
4808
|
-
return !
|
|
4808
|
+
return !d.every((k) => C.includes(k));
|
|
4809
4809
|
},
|
|
4810
|
-
async setRequestedChainsIds(
|
|
4810
|
+
async setRequestedChainsIds(d) {
|
|
4811
4811
|
var x;
|
|
4812
|
-
await ((x =
|
|
4812
|
+
await ((x = u.storage) == null ? void 0 : x.setItem(this.requestedChainsStorageKey, d));
|
|
4813
4813
|
},
|
|
4814
4814
|
get requestedChainsStorageKey() {
|
|
4815
4815
|
return `${this.id}.requestedChains`;
|
|
@@ -4982,7 +4982,7 @@ const mo = [
|
|
|
4982
4982
|
});
|
|
4983
4983
|
return i;
|
|
4984
4984
|
}, yo = $(void 0), bn = hi((e) => {
|
|
4985
|
-
const n = e(zn), { apiURL: i, apiKey: o, cacheDurationMs: t } = e(ui), c = e(
|
|
4985
|
+
const n = e(zn), { apiURL: i, apiKey: o, cacheDurationMs: t } = e(ui), c = e(ze), a = e(yo);
|
|
4986
4986
|
return {
|
|
4987
4987
|
queryKey: ["skipAssets", a, { onlyTestnets: a, apiURL: i, apiKey: o, cacheDurationMs: t }],
|
|
4988
4988
|
queryFn: async () => n.assets({
|
|
@@ -4992,7 +4992,7 @@ const mo = [
|
|
|
4992
4992
|
onlyTestnets: a
|
|
4993
4993
|
}).then((r) => Q0(r, c.data))
|
|
4994
4994
|
};
|
|
4995
|
-
}),
|
|
4995
|
+
}), ze = hi((e) => {
|
|
4996
4996
|
const n = e(zn), { apiURL: i, apiKey: o, cacheDurationMs: t } = e(ui), c = e(yo);
|
|
4997
4997
|
return {
|
|
4998
4998
|
queryKey: ["skipChains", { onlyTestnets: c, apiURL: i, apiKey: o, cacheDurationMs: t }],
|
|
@@ -5015,22 +5015,29 @@ const mo = [
|
|
|
5015
5015
|
queryFn: async () => n.venues(c)
|
|
5016
5016
|
};
|
|
5017
5017
|
}), $0 = ({ children: e, drawer: n, container: i, onOpenChange: o, theme: t }) => {
|
|
5018
|
-
const c
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5018
|
+
const [c, a] = le(0), r = Pe(() => {
|
|
5019
|
+
window.scrollTo(0, c);
|
|
5020
|
+
}, [c]), s = Wc(), l = Rc(ie.NiceModalContext), u = Object.entries(l).filter((k) => {
|
|
5021
|
+
const [M, q] = k;
|
|
5022
|
+
return q.visible;
|
|
5023
|
+
}).map((k) => k[0]).findIndex((k) => k === s.id) !== 0;
|
|
5024
|
+
De(() => {
|
|
5025
|
+
const k = window.scrollY;
|
|
5026
|
+
return a(k), o == null || o(!0), () => {
|
|
5027
|
+
o == null || o(!1);
|
|
5028
|
+
};
|
|
5029
|
+
}, [o, c, r]);
|
|
5030
|
+
const d = async (k) => new Promise((M) => setTimeout(M, k)), [x, C] = le(!0);
|
|
5026
5031
|
return /* @__PURE__ */ m(
|
|
5027
5032
|
Jo.Root,
|
|
5028
5033
|
{
|
|
5029
|
-
open:
|
|
5034
|
+
open: s.visible,
|
|
5030
5035
|
onOpenChange: () => {
|
|
5031
|
-
|
|
5036
|
+
C(!1), d(75).then(() => {
|
|
5037
|
+
s.remove(), r();
|
|
5038
|
+
});
|
|
5032
5039
|
},
|
|
5033
|
-
children: /* @__PURE__ */ m(Jo.Portal, { container: i, children: /* @__PURE__ */ m(_c, { theme: t, children: /* @__PURE__ */ m(tD, { drawer: n, open:
|
|
5040
|
+
children: /* @__PURE__ */ m(Jo.Portal, { container: i, children: /* @__PURE__ */ m(_c, { theme: t, children: /* @__PURE__ */ m(tD, { drawer: n, open: x, invisible: u, children: /* @__PURE__ */ m(cD, { drawer: n, open: x, children: e }) }) }) })
|
|
5034
5041
|
}
|
|
5035
5042
|
);
|
|
5036
5043
|
}, Xi = (e) => {
|
|
@@ -5549,14 +5556,14 @@ const po = {
|
|
|
5549
5556
|
isGoFast: l,
|
|
5550
5557
|
fontSize: p = 24
|
|
5551
5558
|
}) => {
|
|
5552
|
-
const
|
|
5553
|
-
o ?? (o = t ?
|
|
5554
|
-
const
|
|
5559
|
+
const u = xe();
|
|
5560
|
+
o ?? (o = t ? u.secondary.background.normal : u.brandColor);
|
|
5561
|
+
const d = t ? u.primary.text.normal : u.brandTextColor, x = po[n], C = po[i];
|
|
5555
5562
|
return c ? /* @__PURE__ */ m(
|
|
5556
5563
|
xD,
|
|
5557
5564
|
{
|
|
5558
5565
|
label: e,
|
|
5559
|
-
backgroundColor:
|
|
5566
|
+
backgroundColor: u.primary.background.normal,
|
|
5560
5567
|
loadingTimeString: a,
|
|
5561
5568
|
extra: s,
|
|
5562
5569
|
isGoFast: l,
|
|
@@ -5572,10 +5579,10 @@ const po = {
|
|
|
5572
5579
|
onClick: r,
|
|
5573
5580
|
children: [
|
|
5574
5581
|
i ? /* @__PURE__ */ S(L, { align: "center", gap: 10, children: [
|
|
5575
|
-
/* @__PURE__ */ m(C, { backgroundColor:
|
|
5576
|
-
/* @__PURE__ */ m(zc, { color:
|
|
5577
|
-
] }) : /* @__PURE__ */ m(zc, { capitalize: !0, color:
|
|
5578
|
-
/* @__PURE__ */ m(x, { color:
|
|
5582
|
+
/* @__PURE__ */ m(C, { backgroundColor: d, color: o }),
|
|
5583
|
+
/* @__PURE__ */ m(zc, { color: d, fontSize: p, children: e })
|
|
5584
|
+
] }) : /* @__PURE__ */ m(zc, { capitalize: !0, color: d, fontSize: p, children: e }),
|
|
5585
|
+
/* @__PURE__ */ m(x, { color: d })
|
|
5579
5586
|
]
|
|
5580
5587
|
}
|
|
5581
5588
|
) });
|
|
@@ -5730,7 +5737,7 @@ const Vr = [0.1, 0.5, 1, 3], CD = [
|
|
|
5730
5737
|
], uo = 6;
|
|
5731
5738
|
var kD = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Zt = Math.ceil, Xe = Math.floor, Re = "[BigNumber Error] ", Lr = Re + "Number primitive has more than 15 significant digits: ", cn = 1e14, _ = 14, Yt = 9007199254740991, Jt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], jn = 1e7, Se = 1e9;
|
|
5732
5739
|
function _l(e) {
|
|
5733
|
-
var n, i, o, t = g.prototype = { constructor: g, toString: null, valueOf: null }, c = new g(1), a = 20, r = 4, s = -7, l = 21, p = -1e7,
|
|
5740
|
+
var n, i, o, t = g.prototype = { constructor: g, toString: null, valueOf: null }, c = new g(1), a = 20, r = 4, s = -7, l = 21, p = -1e7, u = 1e7, d = !1, x = 1, C = 0, k = {
|
|
5734
5741
|
prefix: "",
|
|
5735
5742
|
groupSize: 3,
|
|
5736
5743
|
secondaryGroupSize: 0,
|
|
@@ -5746,13 +5753,13 @@ function _l(e) {
|
|
|
5746
5753
|
if (!(P instanceof g)) return new g(h, D);
|
|
5747
5754
|
if (D == null) {
|
|
5748
5755
|
if (h && h._isBigNumber === !0) {
|
|
5749
|
-
P.s = h.s, !h.c || h.e >
|
|
5756
|
+
P.s = h.s, !h.c || h.e > u ? P.c = P.e = null : h.e < p ? P.c = [P.e = 0] : (P.e = h.e, P.c = h.c.slice());
|
|
5750
5757
|
return;
|
|
5751
5758
|
}
|
|
5752
5759
|
if ((y = typeof h == "number") && h * 0 == 0) {
|
|
5753
5760
|
if (P.s = 1 / h < 0 ? (h = -h, -1) : 1, h === ~~h) {
|
|
5754
5761
|
for (w = 0, B = h; B >= 10; B /= 10, w++) ;
|
|
5755
|
-
w >
|
|
5762
|
+
w > u ? P.c = P.e = null : (P.e = w, P.c = [h]);
|
|
5756
5763
|
return;
|
|
5757
5764
|
}
|
|
5758
5765
|
v = String(h);
|
|
@@ -5790,7 +5797,7 @@ function _l(e) {
|
|
|
5790
5797
|
if (v = v.slice(B, ++F)) {
|
|
5791
5798
|
if (F -= B, y && g.DEBUG && F > 15 && (h > Yt || h !== Xe(h)))
|
|
5792
5799
|
throw Error(Lr + P.s * h);
|
|
5793
|
-
if ((w = w - B - 1) >
|
|
5800
|
+
if ((w = w - B - 1) > u)
|
|
5794
5801
|
P.c = P.e = null;
|
|
5795
5802
|
else if (w < p)
|
|
5796
5803
|
P.c = [P.e = 0];
|
|
@@ -5813,20 +5820,20 @@ function _l(e) {
|
|
|
5813
5820
|
if (typeof h == "object") {
|
|
5814
5821
|
if (h.hasOwnProperty(D = "DECIMAL_PLACES") && (f = h[D], ke(f, 0, Se, D), a = f), h.hasOwnProperty(D = "ROUNDING_MODE") && (f = h[D], ke(f, 0, 8, D), r = f), h.hasOwnProperty(D = "EXPONENTIAL_AT") && (f = h[D], f && f.pop ? (ke(f[0], -Se, 0, D), ke(f[1], 0, Se, D), s = f[0], l = f[1]) : (ke(f, -Se, Se, D), s = -(l = f < 0 ? -f : f))), h.hasOwnProperty(D = "RANGE"))
|
|
5815
5822
|
if (f = h[D], f && f.pop)
|
|
5816
|
-
ke(f[0], -Se, -1, D), ke(f[1], 1, Se, D), p = f[0],
|
|
5823
|
+
ke(f[0], -Se, -1, D), ke(f[1], 1, Se, D), p = f[0], u = f[1];
|
|
5817
5824
|
else if (ke(f, -Se, Se, D), f)
|
|
5818
|
-
p = -(
|
|
5825
|
+
p = -(u = f < 0 ? -f : f);
|
|
5819
5826
|
else
|
|
5820
5827
|
throw Error(Re + D + " cannot be zero: " + f);
|
|
5821
5828
|
if (h.hasOwnProperty(D = "CRYPTO"))
|
|
5822
5829
|
if (f = h[D], f === !!f)
|
|
5823
5830
|
if (f)
|
|
5824
5831
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
5825
|
-
|
|
5832
|
+
d = f;
|
|
5826
5833
|
else
|
|
5827
|
-
throw
|
|
5834
|
+
throw d = !f, Error(Re + "crypto unavailable");
|
|
5828
5835
|
else
|
|
5829
|
-
|
|
5836
|
+
d = f;
|
|
5830
5837
|
else
|
|
5831
5838
|
throw Error(Re + D + " not true or false: " + f);
|
|
5832
5839
|
if (h.hasOwnProperty(D = "MODULO_MODE") && (f = h[D], ke(f, 0, 9, D), x = f), h.hasOwnProperty(D = "POW_PRECISION") && (f = h[D], ke(f, 0, Se, D), C = f), h.hasOwnProperty(D = "FORMAT"))
|
|
@@ -5843,8 +5850,8 @@ function _l(e) {
|
|
|
5843
5850
|
DECIMAL_PLACES: a,
|
|
5844
5851
|
ROUNDING_MODE: r,
|
|
5845
5852
|
EXPONENTIAL_AT: [s, l],
|
|
5846
|
-
RANGE: [p,
|
|
5847
|
-
CRYPTO:
|
|
5853
|
+
RANGE: [p, u],
|
|
5854
|
+
CRYPTO: d,
|
|
5848
5855
|
MODULO_MODE: x,
|
|
5849
5856
|
POW_PRECISION: C,
|
|
5850
5857
|
FORMAT: k,
|
|
@@ -5881,7 +5888,7 @@ function _l(e) {
|
|
|
5881
5888
|
};
|
|
5882
5889
|
return function(f) {
|
|
5883
5890
|
var A, b, w, B, y, F = 0, v = [], P = new g(c);
|
|
5884
|
-
if (f == null ? f = a : ke(f, 0, Se), B = Zt(f / _),
|
|
5891
|
+
if (f == null ? f = a : ke(f, 0, Se), B = Zt(f / _), d)
|
|
5885
5892
|
if (crypto.getRandomValues) {
|
|
5886
5893
|
for (A = crypto.getRandomValues(new Uint32Array(B *= 2)); F < B; )
|
|
5887
5894
|
y = A[F] * 131072 + (A[F + 1] >>> 11), y >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), A[F] = b[0], A[F + 1] = b[1]) : (v.push(y % 1e14), F += 2);
|
|
@@ -5891,8 +5898,8 @@ function _l(e) {
|
|
|
5891
5898
|
y = (A[F] & 31) * 281474976710656 + A[F + 1] * 1099511627776 + A[F + 2] * 4294967296 + A[F + 3] * 16777216 + (A[F + 4] << 16) + (A[F + 5] << 8) + A[F + 6], y >= 9e15 ? crypto.randomBytes(7).copy(A, F) : (v.push(y % 1e14), F += 7);
|
|
5892
5899
|
F = B / 7;
|
|
5893
5900
|
} else
|
|
5894
|
-
throw
|
|
5895
|
-
if (!
|
|
5901
|
+
throw d = !1, Error(Re + "crypto unavailable");
|
|
5902
|
+
if (!d)
|
|
5896
5903
|
for (; F < B; )
|
|
5897
5904
|
y = D(), y < 9e15 && (v[F++] = y % 1e14);
|
|
5898
5905
|
for (B = v[--F], f %= _, B && f && (y = Jt[_ - f], v[F] = Xe(B / y) * y); v[F] === 0; v.pop(), F--) ;
|
|
@@ -5964,7 +5971,7 @@ function _l(e) {
|
|
|
5964
5971
|
for (; !A[0] && A.length > 1; A.splice(0, 1)) ;
|
|
5965
5972
|
}
|
|
5966
5973
|
return function(A, b, w, B, y) {
|
|
5967
|
-
var F, v, P, I, O, G, Y, K, ae, J, ee,
|
|
5974
|
+
var F, v, P, I, O, G, Y, K, ae, J, ee, me, on, tn, Yn, Ne, Le, Ge = A.s == b.s ? 1 : -1, Ve = A.c, ye = b.c;
|
|
5968
5975
|
if (!Ve || !Ve[0] || !ye || !ye[0])
|
|
5969
5976
|
return new g(
|
|
5970
5977
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -5981,7 +5988,7 @@ function _l(e) {
|
|
|
5981
5988
|
Le = ye.slice(), Le = [0].concat(Le), Yn = ye[0], ye[1] >= y / 2 && Yn++;
|
|
5982
5989
|
do {
|
|
5983
5990
|
if (O = 0, F = D(ye, J, Ne, ee), F < 0) {
|
|
5984
|
-
if (
|
|
5991
|
+
if (me = J[0], Ne != ee && (me = me * y + (J[1] || 0)), O = Xe(me / Yn), O > 1)
|
|
5985
5992
|
for (O >= y && (O = y - 1), G = h(ye, O, y), Y = G.length, ee = J.length; D(G, J, Y, ee) == 1; )
|
|
5986
5993
|
O--, f(G, Ne < Y ? Le : ye, Y, y), Y = G.length, F = 1;
|
|
5987
5994
|
else
|
|
@@ -6024,7 +6031,7 @@ function _l(e) {
|
|
|
6024
6031
|
function T(h, D, f) {
|
|
6025
6032
|
for (var A = 1, b = D.length; !D[--b]; D.pop()) ;
|
|
6026
6033
|
for (b = D[0]; b >= 10; b /= 10, A++) ;
|
|
6027
|
-
return (f = A + f * _ - 1) >
|
|
6034
|
+
return (f = A + f * _ - 1) > u ? h.c = h.e = null : f < p ? h.c = [h.e = 0] : (h.e = f, h.c = D), h;
|
|
6028
6035
|
}
|
|
6029
6036
|
o = /* @__PURE__ */ function() {
|
|
6030
6037
|
var h = /^(-?)0([xbo])(?=\w[\w.]*$)/i, D = /^([^.]+)\.$/, f = /^\.([^.]+)$/, A = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
@@ -6080,7 +6087,7 @@ function _l(e) {
|
|
|
6080
6087
|
}
|
|
6081
6088
|
for (w = I.length; I[--w] === 0; I.pop()) ;
|
|
6082
6089
|
}
|
|
6083
|
-
h.e >
|
|
6090
|
+
h.e > u ? h.c = h.e = null : h.e < p && (h.c = [h.e = 0]);
|
|
6084
6091
|
}
|
|
6085
6092
|
return h;
|
|
6086
6093
|
}
|
|
@@ -6197,12 +6204,12 @@ function _l(e) {
|
|
|
6197
6204
|
var f, A, b = this;
|
|
6198
6205
|
return h = new g(h, D), !b.c || !h.s || h.c && !h.c[0] ? new g(NaN) : !h.c || b.c && !b.c[0] ? new g(b) : (x == 9 ? (A = h.s, h.s = 1, f = n(b, h, 0, 3), h.s = A, f.s *= A) : f = n(b, h, 0, x), h = b.minus(f.times(h)), !h.c[0] && x == 1 && (h.s = b.s), h);
|
|
6199
6206
|
}, t.multipliedBy = t.times = function(h, D) {
|
|
6200
|
-
var f, A, b, w, B, y, F, v, P, I, O, G, Y, K, ae, J = this, ee = J.c,
|
|
6201
|
-
if (!ee || !
|
|
6202
|
-
return !J.s || !h.s || ee && !ee[0] && !
|
|
6203
|
-
for (A = Ze(J.e / _) + Ze(h.e / _), h.s *= J.s, F = ee.length, I =
|
|
6207
|
+
var f, A, b, w, B, y, F, v, P, I, O, G, Y, K, ae, J = this, ee = J.c, me = (h = new g(h, D)).c;
|
|
6208
|
+
if (!ee || !me || !ee[0] || !me[0])
|
|
6209
|
+
return !J.s || !h.s || ee && !ee[0] && !me || me && !me[0] && !ee ? h.c = h.e = h.s = null : (h.s *= J.s, !ee || !me ? h.c = h.e = null : (h.c = [0], h.e = 0)), h;
|
|
6210
|
+
for (A = Ze(J.e / _) + Ze(h.e / _), h.s *= J.s, F = ee.length, I = me.length, F < I && (Y = ee, ee = me, me = Y, b = F, F = I, I = b), b = F + I, Y = []; b--; Y.push(0)) ;
|
|
6204
6211
|
for (K = cn, ae = jn, b = I; --b >= 0; ) {
|
|
6205
|
-
for (f = 0, O =
|
|
6212
|
+
for (f = 0, O = me[b] % ae, G = me[b] / ae | 0, B = F, w = b + B; w > b; )
|
|
6206
6213
|
v = ee[--B] % ae, P = ee[B] / ae | 0, y = G * v + P * O, v = O * v + y % ae * ae + Y[w] + f, f = (v / K | 0) + (y / ae | 0) + G * P, Y[w--] = v % K;
|
|
6207
6214
|
Y[w] = f;
|
|
6208
6215
|
}
|
|
@@ -6285,11 +6292,11 @@ function _l(e) {
|
|
|
6285
6292
|
if (h != null && (y = new g(h), !y.isInteger() && (y.c || y.s !== 1) || y.lt(c)))
|
|
6286
6293
|
throw Error(Re + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + z(y));
|
|
6287
6294
|
if (!Y) return new g(G);
|
|
6288
|
-
for (D = new g(c), v = f = new g(c), A = F = new g(c), O = Ke(Y), w = D.e = O.length - G.e - 1, D.c[0] = Jt[(B = w % _) < 0 ? _ + B : B], h = !h || y.comparedTo(D) > 0 ? w > 0 ? D : v : y, B =
|
|
6295
|
+
for (D = new g(c), v = f = new g(c), A = F = new g(c), O = Ke(Y), w = D.e = O.length - G.e - 1, D.c[0] = Jt[(B = w % _) < 0 ? _ + B : B], h = !h || y.comparedTo(D) > 0 ? w > 0 ? D : v : y, B = u, u = 1 / 0, y = new g(O), F.c[0] = 0; P = n(y, D, 0, 1), b = f.plus(P.times(A)), b.comparedTo(h) != 1; )
|
|
6289
6296
|
f = A, A = b, v = F.plus(P.times(b = v)), F = b, D = y.minus(P.times(b = D)), y = b;
|
|
6290
6297
|
return b = n(h.minus(f), A, 0, 1), F = F.plus(b.times(v)), f = f.plus(b.times(A)), F.s = v.s = G.s, w = w * 2, I = n(v, A, w, r).minus(G).abs().comparedTo(
|
|
6291
6298
|
n(F, f, w, r).minus(G).abs()
|
|
6292
|
-
) < 1 ? [v, A] : [F, f],
|
|
6299
|
+
) < 1 ? [v, A] : [F, f], u = B, I;
|
|
6293
6300
|
}, t.toNumber = function() {
|
|
6294
6301
|
return +z(this);
|
|
6295
6302
|
}, t.toPrecision = function(h, D) {
|
|
@@ -6355,22 +6362,22 @@ const Hn = (e, n = uo) => (typeof e == "string" && (e = parseFloat(e)), new we(e
|
|
|
6355
6362
|
tokenAmount: i,
|
|
6356
6363
|
chainId: o
|
|
6357
6364
|
}) => {
|
|
6358
|
-
const [{ data: t }] = de(bn), [{ data: c }] = de(
|
|
6365
|
+
const [{ data: t }] = de(bn), [{ data: c }] = de(ze), a = U(() => {
|
|
6359
6366
|
if (!(!e || !o) && t)
|
|
6360
6367
|
return t.find((x) => x.denom === e && x.chainID === o);
|
|
6361
6368
|
}, [t, e, o]);
|
|
6362
6369
|
!n && i ? n = $e(i, a == null ? void 0 : a.decimals) : !i && n && (i = Hn(n, a == null ? void 0 : a.decimals));
|
|
6363
|
-
const r = a == null ? void 0 : a.logoURI, s = (a == null ? void 0 : a.recommendedSymbol) ?? (a == null ? void 0 : a.symbol), l = c == null ? void 0 : c.find((x) => o ? x.chainID === o : x.chainID === (a == null ? void 0 : a.chainID)), p = (l == null ? void 0 : l.prettyName) ?? (l == null ? void 0 : l.chainName),
|
|
6370
|
+
const r = a == null ? void 0 : a.logoURI, s = (a == null ? void 0 : a.recommendedSymbol) ?? (a == null ? void 0 : a.symbol), l = c == null ? void 0 : c.find((x) => o ? x.chainID === o : x.chainID === (a == null ? void 0 : a.chainID)), p = (l == null ? void 0 : l.prettyName) ?? (l == null ? void 0 : l.chainName), u = l == null ? void 0 : l.logoURI, d = a == null ? void 0 : a.decimals;
|
|
6364
6371
|
return o ? {
|
|
6365
6372
|
asset: a,
|
|
6366
6373
|
chain: l,
|
|
6367
6374
|
assetImage: r,
|
|
6368
6375
|
chainName: p,
|
|
6369
|
-
chainImage:
|
|
6376
|
+
chainImage: u,
|
|
6370
6377
|
symbol: s,
|
|
6371
6378
|
amount: n,
|
|
6372
6379
|
tokenAmount: i,
|
|
6373
|
-
decimals:
|
|
6380
|
+
decimals: d
|
|
6374
6381
|
} : {
|
|
6375
6382
|
asset: void 0,
|
|
6376
6383
|
chain: void 0,
|
|
@@ -6498,8 +6505,8 @@ const Sc = (e) => {
|
|
|
6498
6505
|
sourceAssetDenom: s,
|
|
6499
6506
|
sourceAssetChainID: l,
|
|
6500
6507
|
destAssetDenom: p,
|
|
6501
|
-
destAssetChainID:
|
|
6502
|
-
} = i,
|
|
6508
|
+
destAssetChainID: u
|
|
6509
|
+
} = i, d = `${$l(
|
|
6503
6510
|
a ?? 0,
|
|
6504
6511
|
r ?? 0,
|
|
6505
6512
|
!0
|
|
@@ -6509,7 +6516,7 @@ const Sc = (e) => {
|
|
|
6509
6516
|
tokenAmount: t
|
|
6510
6517
|
}), C = en({
|
|
6511
6518
|
assetDenom: p,
|
|
6512
|
-
chainId:
|
|
6519
|
+
chainId: u,
|
|
6513
6520
|
tokenAmount: c
|
|
6514
6521
|
});
|
|
6515
6522
|
return /* @__PURE__ */ S(Ce, { children: [
|
|
@@ -6526,11 +6533,11 @@ const Sc = (e) => {
|
|
|
6526
6533
|
/* @__PURE__ */ m(
|
|
6527
6534
|
Kn,
|
|
6528
6535
|
{
|
|
6529
|
-
title: `Warning: Bad trade (-${
|
|
6536
|
+
title: `Warning: Bad trade (-${d})`,
|
|
6530
6537
|
description: /* @__PURE__ */ S(Ce, { children: [
|
|
6531
6538
|
/* @__PURE__ */ S(W, { color: o.error.text, textAlign: "center", textWrap: "balance", children: [
|
|
6532
6539
|
"You will lose ",
|
|
6533
|
-
|
|
6540
|
+
d,
|
|
6534
6541
|
" of your input value with this trade",
|
|
6535
6542
|
/* @__PURE__ */ m("br", {}),
|
|
6536
6543
|
"Input: ",
|
|
@@ -6968,8 +6975,8 @@ class xa {
|
|
|
6968
6975
|
const i = typeof n == "function" ? n(this) : n, [o, t] = i instanceof xo ? (
|
|
6969
6976
|
// eslint-disable-next-line deprecation/deprecation
|
|
6970
6977
|
[i.getScopeData(), i.getRequestSession()]
|
|
6971
|
-
) : SD(i) ? [n, n.requestSession] : [], { tags: c, extra: a, user: r, contexts: s, level: l, fingerprint: p = [], propagationContext:
|
|
6972
|
-
return this._tags = { ...this._tags, ...c }, this._extra = { ...this._extra, ...a }, this._contexts = { ...this._contexts, ...s }, r && Object.keys(r).length && (this._user = r), l && (this._level = l), p.length && (this._fingerprint = p),
|
|
6978
|
+
) : SD(i) ? [n, n.requestSession] : [], { tags: c, extra: a, user: r, contexts: s, level: l, fingerprint: p = [], propagationContext: u } = o || {};
|
|
6979
|
+
return this._tags = { ...this._tags, ...c }, this._extra = { ...this._extra, ...a }, this._contexts = { ...this._contexts, ...s }, r && Object.keys(r).length && (this._user = r), l && (this._level = l), p.length && (this._fingerprint = p), u && (this._propagationContext = u), t && (this._requestSession = t), this;
|
|
6973
6980
|
}
|
|
6974
6981
|
/**
|
|
6975
6982
|
* @inheritDoc
|
|
@@ -7403,7 +7410,7 @@ function QD(e) {
|
|
|
7403
7410
|
default:
|
|
7404
7411
|
return C === "send" ? (H = (E = n[l]) == null ? void 0 : E.txs.sendTx) == null ? void 0 : H.explorerLink : (j = (T = n[l]) == null ? void 0 : T.txs.receiveTx) == null ? void 0 : j.explorerLink;
|
|
7405
7412
|
}
|
|
7406
|
-
},
|
|
7413
|
+
}, u = {
|
|
7407
7414
|
...o,
|
|
7408
7415
|
...i,
|
|
7409
7416
|
...t,
|
|
@@ -7415,10 +7422,10 @@ function QD(e) {
|
|
|
7415
7422
|
...s,
|
|
7416
7423
|
fromExplorerLink: p("send"),
|
|
7417
7424
|
toExplorerLink: p("receive")
|
|
7418
|
-
},
|
|
7425
|
+
}, d = e2(u.state);
|
|
7419
7426
|
return {
|
|
7420
|
-
...
|
|
7421
|
-
status:
|
|
7427
|
+
...u,
|
|
7428
|
+
status: d
|
|
7422
7429
|
};
|
|
7423
7430
|
}
|
|
7424
7431
|
function _D(e) {
|
|
@@ -7468,25 +7475,25 @@ const ga = ({
|
|
|
7468
7475
|
txsRequired: n,
|
|
7469
7476
|
enabled: i
|
|
7470
7477
|
}) => {
|
|
7471
|
-
const o = R(zn), [t, c] =
|
|
7478
|
+
const o = R(zn), [t, c] = le(!1), [a, r] = le(void 0), s = U(() => ["txs-status", n, e], [e, n]);
|
|
7472
7479
|
return bo({
|
|
7473
7480
|
queryKey: s,
|
|
7474
7481
|
queryFn: async ({ queryKey: [, l, p] }) => {
|
|
7475
7482
|
if (!p) return;
|
|
7476
|
-
const
|
|
7483
|
+
const u = await Promise.all(
|
|
7477
7484
|
p.map(async (g) => await o.transactionStatus({
|
|
7478
7485
|
chainID: g.chainID,
|
|
7479
7486
|
txHash: g.txHash
|
|
7480
7487
|
}))
|
|
7481
|
-
),
|
|
7488
|
+
), d = _D(u), x = u.every((g) => g.state === "STATE_COMPLETED_SUCCESS" || g.state === "STATE_COMPLETED_ERROR" || g.state === "STATE_ABANDONED"), C = l === u.length && x;
|
|
7482
7489
|
C && c(!0);
|
|
7483
|
-
const k =
|
|
7490
|
+
const k = u.some((g) => g.state === "STATE_COMPLETED_ERROR" || g.state === "STATE_ABANDONED"), M = u.length > 0 ? $D(u[u.length - 1].state) : void 0;
|
|
7484
7491
|
M === "failed" && C && ws("TransactionFailed");
|
|
7485
7492
|
const q = {
|
|
7486
7493
|
isSuccess: C && !k && M === "success",
|
|
7487
7494
|
lastTxStatus: M,
|
|
7488
7495
|
isSettled: C,
|
|
7489
|
-
transferEvents:
|
|
7496
|
+
transferEvents: d
|
|
7490
7497
|
};
|
|
7491
7498
|
return r(q), q;
|
|
7492
7499
|
},
|
|
@@ -7500,14 +7507,14 @@ function am(e = 250) {
|
|
|
7500
7507
|
const n = $(void 0), i = $(), o = $(!1), t = $(!1), c = $(
|
|
7501
7508
|
void 0,
|
|
7502
7509
|
// Set initial value here too
|
|
7503
|
-
(r, s, l, p,
|
|
7510
|
+
(r, s, l, p, u) => {
|
|
7504
7511
|
clearTimeout(r(n));
|
|
7505
|
-
const
|
|
7512
|
+
const d = r(i), x = typeof l == "function" ? l(d) : l, C = () => {
|
|
7506
7513
|
s(i, x), s(o, !0), s(t, !0);
|
|
7507
7514
|
}, k = () => {
|
|
7508
7515
|
s(c, x), s(o, !1), p == null || p();
|
|
7509
7516
|
};
|
|
7510
|
-
|
|
7517
|
+
u ? k() : C();
|
|
7511
7518
|
const M = setTimeout(() => {
|
|
7512
7519
|
k();
|
|
7513
7520
|
}, e);
|
|
@@ -38123,7 +38130,7 @@ const u2 = [
|
|
|
38123
38130
|
if (!(!i || !e))
|
|
38124
38131
|
switch (i) {
|
|
38125
38132
|
case V.Cosmos: {
|
|
38126
|
-
const r = g2.find((
|
|
38133
|
+
const r = g2.find((u) => u.chainId === e), l = ((o = r == null ? void 0 : r.explorers) == null ? void 0 : o.find((u) => u.kind === "mintscan")) || ((t = r == null ? void 0 : r.explorers) == null ? void 0 : t[0]);
|
|
38127
38134
|
return (c = l == null ? void 0 : l.tx_page) == null ? void 0 : c.replace("${txHash}", n);
|
|
38128
38135
|
}
|
|
38129
38136
|
case V.EVM: {
|
|
@@ -38148,15 +38155,15 @@ const u2 = [
|
|
|
38148
38155
|
), $n = $(null, (e, n, i) => {
|
|
38149
38156
|
n(We, (o) => ({ ...o, overallStatus: i }));
|
|
38150
38157
|
}), f2 = $(null, (e, n) => {
|
|
38151
|
-
const { data: i } = e(Yi), { data: o } = e(
|
|
38158
|
+
const { data: i } = e(Yi), { data: o } = e(ze), t = e(Un), c = e(Mo), a = t.length;
|
|
38152
38159
|
if (!i) return;
|
|
38153
38160
|
const {
|
|
38154
38161
|
requiredChainAddresses: r,
|
|
38155
38162
|
sourceAssetDenom: s,
|
|
38156
38163
|
sourceAssetChainID: l,
|
|
38157
38164
|
destAssetDenom: p,
|
|
38158
|
-
destAssetChainID:
|
|
38159
|
-
} = i,
|
|
38165
|
+
destAssetChainID: u
|
|
38166
|
+
} = i, d = r[0], x = r[r.length - 1];
|
|
38160
38167
|
n(We, {
|
|
38161
38168
|
userAddresses: [],
|
|
38162
38169
|
transactionDetailsArray: [],
|
|
@@ -38188,12 +38195,12 @@ const u2 = [
|
|
|
38188
38195
|
chainId: C.chainID,
|
|
38189
38196
|
txHash: C.txHash,
|
|
38190
38197
|
explorerLink: M ?? "",
|
|
38191
|
-
sourceAddress:
|
|
38198
|
+
sourceAddress: d,
|
|
38192
38199
|
destinationAddress: x,
|
|
38193
38200
|
sourceAssetDenom: s,
|
|
38194
38201
|
sourceAssetChainID: l,
|
|
38195
38202
|
destAssetDenom: p,
|
|
38196
|
-
destAssetChainID:
|
|
38203
|
+
destAssetChainID: u
|
|
38197
38204
|
});
|
|
38198
38205
|
},
|
|
38199
38206
|
onTransactionCompleted: async (C, k) => {
|
|
@@ -38207,12 +38214,12 @@ const u2 = [
|
|
|
38207
38214
|
chainId: C,
|
|
38208
38215
|
txHash: k,
|
|
38209
38216
|
explorerLink: q ?? "",
|
|
38210
|
-
sourceAddress:
|
|
38217
|
+
sourceAddress: d,
|
|
38211
38218
|
destinationAddress: x,
|
|
38212
38219
|
sourceAssetDenom: s,
|
|
38213
38220
|
sourceAssetChainID: l,
|
|
38214
38221
|
destAssetDenom: p,
|
|
38215
|
-
destAssetChainID:
|
|
38222
|
+
destAssetChainID: u
|
|
38216
38223
|
});
|
|
38217
38224
|
},
|
|
38218
38225
|
onTransactionSigned: async () => {
|
|
@@ -38652,7 +38659,7 @@ const u2 = [
|
|
|
38652
38659
|
)
|
|
38653
38660
|
}
|
|
38654
38661
|
), xm = 767, Ue = () => {
|
|
38655
|
-
const [e, n] =
|
|
38662
|
+
const [e, n] = le(!1);
|
|
38656
38663
|
return De(() => {
|
|
38657
38664
|
if (window === void 0) return;
|
|
38658
38665
|
const i = () => {
|
|
@@ -38674,7 +38681,7 @@ const u2 = [
|
|
|
38674
38681
|
" ",
|
|
38675
38682
|
Ci("Signature", o == null ? void 0 : o.txsRequired),
|
|
38676
38683
|
" required"
|
|
38677
|
-
] }) }), [o == null ? void 0 : o.txsRequired]),
|
|
38684
|
+
] }) }), [o == null ? void 0 : o.txsRequired]), u = U(() => {
|
|
38678
38685
|
const x = () => n && l ? p : /* @__PURE__ */ S(L, { align: "center", gap: 5, children: [
|
|
38679
38686
|
"Powered by ",
|
|
38680
38687
|
/* @__PURE__ */ m(Ic, {})
|
|
@@ -38704,7 +38711,7 @@ const u2 = [
|
|
|
38704
38711
|
r,
|
|
38705
38712
|
i,
|
|
38706
38713
|
n
|
|
38707
|
-
]),
|
|
38714
|
+
]), d = U(() => /* @__PURE__ */ S(Ce, { children: [
|
|
38708
38715
|
/* @__PURE__ */ S(L, { align: "center", gap: 5, children: [
|
|
38709
38716
|
"Powered by ",
|
|
38710
38717
|
/* @__PURE__ */ m(Ic, {})
|
|
@@ -38736,7 +38743,7 @@ const u2 = [
|
|
|
38736
38743
|
i,
|
|
38737
38744
|
n
|
|
38738
38745
|
]);
|
|
38739
|
-
return a ?
|
|
38746
|
+
return a ? u : d;
|
|
38740
38747
|
}, Ca = ({
|
|
38741
38748
|
onClick: e,
|
|
38742
38749
|
rightContent: n,
|
|
@@ -38881,102 +38888,102 @@ const u2 = [
|
|
|
38881
38888
|
"umee-1",
|
|
38882
38889
|
"wormchain"
|
|
38883
38890
|
], q2 = {
|
|
38884
|
-
[
|
|
38891
|
+
[pe.OKX]: {
|
|
38885
38892
|
name: "OKX",
|
|
38886
38893
|
imgSrc: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJDSURBVHgB7Zq9jtpAEMfHlhEgQLiioXEkoAGECwoKxMcTRHmC5E3IoyRPkPAEkI7unJYmTgEFTYwA8a3NTKScLnCHN6c9r1e3P2llWQy7M/s1Gv1twCP0ej37dDq9x+Zut1t3t9vZjDEHIiSRSPg4ZpDL5fxkMvn1cDh8m0wmfugfO53OoFQq/crn8wxfY9EymQyrVCqMfHvScZx1p9ls3pFxXBy/bKlUipGPrVbLuQqAfsCliq3zl0H84zwtjQrOw4Mt1W63P5LvBm2d+Xz+YzqdgkqUy+WgWCy+Mc/nc282m4FqLBYL+3g8fjDxenq72WxANZbLJeA13zDX67UDioL5ybXwafMYu64Ltn3bdDweQ5R97fd7GyhBQMipx4POeEDHIu2LfDdBIGGz+hJ9CQ1ABjoA2egAZPM6AgiCAEQhsi/C4jHyPA/6/f5NG3Ks2+3CYDC4aTccDrn6ojG54MnEvG00GoVmWLIRNZ7wTCwDHYBsdACy0QHIhiuRETxlICWpMMhGZHmqS8qH6JLyGegAZKMDkI0uKf8X4SWlaZo+Pp1bRrwlJU8ZKLIvUjKh0WiQ3sRUbNVq9c5Ebew7KEo2m/1p4jJ4qAmDaqDQBzj5XyiAT4VCQezJigAU+IDU+z8vJFnGWeC+bKQV/5VZ71FV6L7PA3gg3tXrdQ+DgLhC+75Wq3no69P3MC0NFQpx2lL04Ql9gHK1bRDjsSBIvScBnDTk1WrlGIZBorIDEYJj+rhdgnQ67VmWRe0zlplXl81vcyEt0rSoYDUAAAAASUVORK5CYII="
|
|
38887
38894
|
},
|
|
38888
|
-
[
|
|
38895
|
+
[pe.KEPLR]: {
|
|
38889
38896
|
name: "Keplr",
|
|
38890
38897
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-keplr.png"
|
|
38891
38898
|
},
|
|
38892
|
-
[
|
|
38899
|
+
[pe.LEAP]: {
|
|
38893
38900
|
name: "Leap",
|
|
38894
38901
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-leap.png"
|
|
38895
38902
|
},
|
|
38896
|
-
[
|
|
38903
|
+
[pe.COSMOSTATION]: {
|
|
38897
38904
|
name: "Cosmostation",
|
|
38898
38905
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-cosmostation.png"
|
|
38899
38906
|
},
|
|
38900
|
-
[
|
|
38907
|
+
[pe.VECTIS]: {
|
|
38901
38908
|
name: "Vectis",
|
|
38902
38909
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-vectis.svg"
|
|
38903
38910
|
},
|
|
38904
|
-
[
|
|
38911
|
+
[pe.STATION]: {
|
|
38905
38912
|
name: "Station",
|
|
38906
38913
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-station.svg"
|
|
38907
38914
|
},
|
|
38908
|
-
[
|
|
38915
|
+
[pe.XDEFI]: {
|
|
38909
38916
|
name: "XDefi",
|
|
38910
38917
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-xdefi.jpeg"
|
|
38911
38918
|
},
|
|
38912
|
-
[
|
|
38919
|
+
[pe.METAMASK_SNAP_LEAP]: {
|
|
38913
38920
|
name: "Metamask Snap Leap",
|
|
38914
38921
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-metamask.png"
|
|
38915
38922
|
},
|
|
38916
|
-
[
|
|
38923
|
+
[pe.METAMASK_SNAP_COSMOS]: {
|
|
38917
38924
|
name: "Metamask Snap Cosmos",
|
|
38918
38925
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-metamask.png"
|
|
38919
38926
|
},
|
|
38920
|
-
[
|
|
38927
|
+
[pe.WALLETCONNECT]: {
|
|
38921
38928
|
name: "WalletConnect",
|
|
38922
38929
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-walletconnect.png"
|
|
38923
38930
|
},
|
|
38924
|
-
[
|
|
38931
|
+
[pe.WC_KEPLR_MOBILE]: {
|
|
38925
38932
|
name: "Keplr Mobile",
|
|
38926
38933
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-keplr.png",
|
|
38927
38934
|
mobile: !0
|
|
38928
38935
|
},
|
|
38929
|
-
[
|
|
38936
|
+
[pe.WC_LEAP_MOBILE]: {
|
|
38930
38937
|
name: "Leap Mobile",
|
|
38931
38938
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-leap.png",
|
|
38932
38939
|
mobile: !0
|
|
38933
38940
|
},
|
|
38934
|
-
[
|
|
38941
|
+
[pe.WC_COSMOSTATION_MOBILE]: {
|
|
38935
38942
|
name: "Cosmostation Mobile",
|
|
38936
38943
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-cosmostation.png",
|
|
38937
38944
|
mobile: !0
|
|
38938
38945
|
},
|
|
38939
|
-
[
|
|
38946
|
+
[pe.CAPSULE]: {
|
|
38940
38947
|
name: "Capsule",
|
|
38941
38948
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-capsule.jpg"
|
|
38942
38949
|
},
|
|
38943
|
-
[
|
|
38950
|
+
[pe.COSMIFRAME]: {
|
|
38944
38951
|
name: "DAO DAO",
|
|
38945
38952
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-daodao.png"
|
|
38946
38953
|
},
|
|
38947
|
-
[
|
|
38954
|
+
[pe.COMPASS]: {
|
|
38948
38955
|
name: "Compass",
|
|
38949
38956
|
imgSrc: "https://raw.githubusercontent.com/graz-sh/graz/dev/example/starter/public/assets/wallet-icon-compass.png"
|
|
38950
38957
|
}
|
|
38951
38958
|
}, bm = (e) => q2[e], Zn = () => {
|
|
38952
|
-
const e = R(vt), [n, i] = de(kt), [o, t] = de(wt), [c, a] = de(yt), r = R(Et), { data: s } = R(
|
|
38959
|
+
const e = R(vt), [n, i] = de(kt), [o, t] = de(wt), [c, a] = de(yt), r = R(Et), { data: s } = R(ze), { data: l, walletType: p } = Cs({
|
|
38953
38960
|
multiChain: !0
|
|
38954
|
-
}),
|
|
38961
|
+
}), u = mo.find((k) => {
|
|
38955
38962
|
var M;
|
|
38956
38963
|
return k.name === ((M = e.svm) == null ? void 0 : M.walletName);
|
|
38957
|
-
}),
|
|
38964
|
+
}), d = Dt(), x = Uc();
|
|
38958
38965
|
return De(() => {
|
|
38959
38966
|
p && o === void 0 && t({
|
|
38960
38967
|
walletName: p,
|
|
38961
38968
|
chainType: V.Cosmos
|
|
38962
|
-
}),
|
|
38963
|
-
walletName:
|
|
38969
|
+
}), u && c === void 0 && a({
|
|
38970
|
+
walletName: u.name,
|
|
38964
38971
|
chainType: V.SVM
|
|
38965
|
-
}),
|
|
38966
|
-
walletName:
|
|
38972
|
+
}), d.connector && n === void 0 && i({
|
|
38973
|
+
walletName: d.connector.id,
|
|
38967
38974
|
chainType: V.EVM
|
|
38968
38975
|
});
|
|
38969
38976
|
}, [
|
|
38970
38977
|
p,
|
|
38971
38978
|
o,
|
|
38972
|
-
|
|
38979
|
+
u,
|
|
38973
38980
|
c,
|
|
38974
|
-
|
|
38981
|
+
d.connector,
|
|
38975
38982
|
n,
|
|
38976
38983
|
t,
|
|
38977
38984
|
a,
|
|
38978
38985
|
i
|
|
38979
|
-
]),
|
|
38986
|
+
]), Pe(
|
|
38980
38987
|
// if checkChainType is true, it only check wallet connected no chainId is dependent
|
|
38981
38988
|
(k, M) => {
|
|
38982
38989
|
var H, T;
|
|
@@ -38999,14 +39006,14 @@ const u2 = [
|
|
|
38999
39006
|
});
|
|
39000
39007
|
break;
|
|
39001
39008
|
case V.SVM:
|
|
39002
|
-
|
|
39003
|
-
walletName:
|
|
39009
|
+
u && c === void 0 && a({
|
|
39010
|
+
walletName: u.name,
|
|
39004
39011
|
chainType: V.SVM
|
|
39005
39012
|
});
|
|
39006
39013
|
break;
|
|
39007
39014
|
case V.EVM:
|
|
39008
|
-
|
|
39009
|
-
walletName:
|
|
39015
|
+
d.connector && n === void 0 && i({
|
|
39016
|
+
walletName: d.connector.id,
|
|
39010
39017
|
chainType: V.EVM
|
|
39011
39018
|
});
|
|
39012
39019
|
break;
|
|
@@ -39031,27 +39038,27 @@ const u2 = [
|
|
|
39031
39038
|
};
|
|
39032
39039
|
}
|
|
39033
39040
|
case V.EVM:
|
|
39034
|
-
return !e.evm ||
|
|
39035
|
-
address:
|
|
39036
|
-
currentConnectedEVMChainId: String(
|
|
39041
|
+
return !e.evm || d.chainId !== Number(k) && !M || !d.address || !d.connector ? void 0 : {
|
|
39042
|
+
address: d.address,
|
|
39043
|
+
currentConnectedEVMChainId: String(d.chainId),
|
|
39037
39044
|
chainType: q,
|
|
39038
39045
|
wallet: {
|
|
39039
|
-
name:
|
|
39040
|
-
prettyName:
|
|
39041
|
-
logo:
|
|
39046
|
+
name: d.connector.id,
|
|
39047
|
+
prettyName: d.connector.name,
|
|
39048
|
+
logo: d.connector.id === "walletConnect" ? ct : (T = x.find((j) => {
|
|
39042
39049
|
var z;
|
|
39043
|
-
return j.id === ((z =
|
|
39050
|
+
return j.id === ((z = d.connector) == null ? void 0 : z.id);
|
|
39044
39051
|
})) == null ? void 0 : T.icon
|
|
39045
39052
|
}
|
|
39046
39053
|
};
|
|
39047
39054
|
case V.SVM:
|
|
39048
|
-
return !e.svm || !(
|
|
39049
|
-
address:
|
|
39055
|
+
return !e.svm || !(u != null && u.publicKey) ? void 0 : {
|
|
39056
|
+
address: u.publicKey.toBase58(),
|
|
39050
39057
|
chainType: q,
|
|
39051
39058
|
wallet: {
|
|
39052
|
-
name:
|
|
39053
|
-
prettyName:
|
|
39054
|
-
logo:
|
|
39059
|
+
name: u.name,
|
|
39060
|
+
prettyName: u.name,
|
|
39061
|
+
logo: u.name === "WalletConnect" ? ct : u.icon
|
|
39055
39062
|
}
|
|
39056
39063
|
};
|
|
39057
39064
|
default:
|
|
@@ -39062,11 +39069,11 @@ const u2 = [
|
|
|
39062
39069
|
s,
|
|
39063
39070
|
p,
|
|
39064
39071
|
o,
|
|
39065
|
-
|
|
39072
|
+
u,
|
|
39066
39073
|
c,
|
|
39067
|
-
|
|
39068
|
-
|
|
39069
|
-
|
|
39074
|
+
d.connector,
|
|
39075
|
+
d.chainId,
|
|
39076
|
+
d.address,
|
|
39070
39077
|
n,
|
|
39071
39078
|
t,
|
|
39072
39079
|
a,
|
|
@@ -39112,7 +39119,7 @@ const u2 = [
|
|
|
39112
39119
|
...l
|
|
39113
39120
|
}) => {
|
|
39114
39121
|
var T;
|
|
39115
|
-
const p = xe(),
|
|
39122
|
+
const p = xe(), u = Ue(), d = en({
|
|
39116
39123
|
assetDenom: e,
|
|
39117
39124
|
chainId: i,
|
|
39118
39125
|
tokenAmount: n
|
|
@@ -39155,12 +39162,12 @@ const u2 = [
|
|
|
39155
39162
|
}
|
|
39156
39163
|
}
|
|
39157
39164
|
),
|
|
39158
|
-
|
|
39165
|
+
u ? /* @__PURE__ */ m(j2, { color: p.primary.text.lowContrast }) : /* @__PURE__ */ m(I2, { title: g.address, monospace: !0, textWrap: "nowrap", children: qi(g.address, u) })
|
|
39159
39166
|
] }),
|
|
39160
39167
|
M && /* @__PURE__ */ m(
|
|
39161
39168
|
nn,
|
|
39162
39169
|
{
|
|
39163
|
-
as:
|
|
39170
|
+
as: u ? rt : void 0,
|
|
39164
39171
|
align: "center",
|
|
39165
39172
|
onClick: t,
|
|
39166
39173
|
children: /* @__PURE__ */ m(ua, { color: p.primary.text.lowContrast })
|
|
@@ -39168,7 +39175,7 @@ const u2 = [
|
|
|
39168
39175
|
)
|
|
39169
39176
|
] });
|
|
39170
39177
|
}, [
|
|
39171
|
-
|
|
39178
|
+
u,
|
|
39172
39179
|
t,
|
|
39173
39180
|
M,
|
|
39174
39181
|
g.address,
|
|
@@ -39176,10 +39183,10 @@ const u2 = [
|
|
|
39176
39183
|
p.primary.text.lowContrast
|
|
39177
39184
|
]), H = U(() => {
|
|
39178
39185
|
if (c)
|
|
39179
|
-
return
|
|
39180
|
-
}, [c,
|
|
39186
|
+
return u ? /* @__PURE__ */ m(em, { href: c, target: "_blank", children: /* @__PURE__ */ m(Fn, {}) }) : /* @__PURE__ */ m(st, { href: c, target: "_blank", children: /* @__PURE__ */ m(Fn, {}) });
|
|
39187
|
+
}, [c, u]);
|
|
39181
39188
|
return /* @__PURE__ */ S(L, { gap: 15, align: "center", ...l, children: [
|
|
39182
|
-
(
|
|
39189
|
+
(d == null ? void 0 : d.assetImage) && /* @__PURE__ */ m(
|
|
39183
39190
|
St,
|
|
39184
39191
|
{
|
|
39185
39192
|
width: 30,
|
|
@@ -39191,8 +39198,8 @@ const u2 = [
|
|
|
39191
39198
|
{
|
|
39192
39199
|
height: 30,
|
|
39193
39200
|
width: 30,
|
|
39194
|
-
src:
|
|
39195
|
-
title: (T =
|
|
39201
|
+
src: d.assetImage,
|
|
39202
|
+
title: (T = d == null ? void 0 : d.asset) == null ? void 0 : T.name
|
|
39196
39203
|
}
|
|
39197
39204
|
)
|
|
39198
39205
|
}
|
|
@@ -39207,18 +39214,18 @@ const u2 = [
|
|
|
39207
39214
|
children: /* @__PURE__ */ S(L, { align: "center", justify: "space-between", children: [
|
|
39208
39215
|
/* @__PURE__ */ S(he, { children: [
|
|
39209
39216
|
/* @__PURE__ */ S(L, { gap: 5, align: "center", children: [
|
|
39210
|
-
/* @__PURE__ */ m(V2, { normalTextColor: !0, title:
|
|
39211
|
-
/* @__PURE__ */ m(L2, { normalTextColor: !0, children:
|
|
39217
|
+
/* @__PURE__ */ m(V2, { normalTextColor: !0, title: d == null ? void 0 : d.amount, children: ji(d == null ? void 0 : d.amount) }),
|
|
39218
|
+
/* @__PURE__ */ m(L2, { normalTextColor: !0, children: d == null ? void 0 : d.symbol }),
|
|
39212
39219
|
/* @__PURE__ */ S(
|
|
39213
39220
|
R2,
|
|
39214
39221
|
{
|
|
39215
39222
|
renderingEditDestinationWalletOrExplorerLink: q,
|
|
39216
|
-
title:
|
|
39223
|
+
title: d == null ? void 0 : d.chainName,
|
|
39217
39224
|
textWrap: "nowrap",
|
|
39218
39225
|
children: [
|
|
39219
39226
|
" ",
|
|
39220
39227
|
"on ",
|
|
39221
|
-
|
|
39228
|
+
d == null ? void 0 : d.chainName
|
|
39222
39229
|
]
|
|
39223
39230
|
}
|
|
39224
39231
|
),
|
|
@@ -39386,8 +39393,8 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39386
39393
|
assetDenom: e,
|
|
39387
39394
|
chainId: o,
|
|
39388
39395
|
tokenAmount: n
|
|
39389
|
-
}),
|
|
39390
|
-
const g = Object.values(
|
|
39396
|
+
}), u = R(Xn), x = Zn()(o), C = U(() => {
|
|
39397
|
+
const g = Object.values(u);
|
|
39391
39398
|
switch (r) {
|
|
39392
39399
|
case "source":
|
|
39393
39400
|
return {
|
|
@@ -39402,7 +39409,7 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39402
39409
|
};
|
|
39403
39410
|
}
|
|
39404
39411
|
}
|
|
39405
|
-
}, [x == null ? void 0 : x.address, x == null ? void 0 : x.wallet.logo,
|
|
39412
|
+
}, [x == null ? void 0 : x.address, x == null ? void 0 : x.wallet.logo, u, r]), k = U(() => ji(Do(p.amount)), [p.amount]), M = U(() => {
|
|
39406
39413
|
if (a)
|
|
39407
39414
|
return l ? /* @__PURE__ */ m(em, { href: a, target: "_blank", children: /* @__PURE__ */ m(Fn, {}) }) : /* @__PURE__ */ m(st, { href: a, target: "_blank", children: /* @__PURE__ */ m(Fn, {}) });
|
|
39408
39415
|
}, [a, l]);
|
|
@@ -39508,12 +39515,12 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39508
39515
|
firstOperationStatus: t
|
|
39509
39516
|
}) => {
|
|
39510
39517
|
var k, M, q;
|
|
39511
|
-
const c = xe(), { route: a } = R(We), r = e[0], s = e[e.length - 1], l = n == null ? void 0 : n.transferEvents, p = o === Ae.confirmed ? "completed" : (k = l == null ? void 0 : l[s.transferIndex]) == null ? void 0 : k.status,
|
|
39518
|
+
const c = xe(), { route: a } = R(We), r = e[0], s = e[e.length - 1], l = n == null ? void 0 : n.transferEvents, p = o === Ae.confirmed ? "completed" : (k = l == null ? void 0 : l[s.transferIndex]) == null ? void 0 : k.status, u = {
|
|
39512
39519
|
denom: r.denomIn,
|
|
39513
39520
|
tokenAmount: r.amountIn,
|
|
39514
39521
|
chainId: r.fromChainID ?? r.chainID,
|
|
39515
39522
|
usdValue: a == null ? void 0 : a.usdAmountIn
|
|
39516
|
-
},
|
|
39523
|
+
}, d = {
|
|
39517
39524
|
denom: s.denomOut,
|
|
39518
39525
|
tokenAmount: s.amountOut,
|
|
39519
39526
|
chainId: s.toChainID ?? s.chainID,
|
|
@@ -39523,7 +39530,7 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39523
39530
|
/* @__PURE__ */ m(
|
|
39524
39531
|
os,
|
|
39525
39532
|
{
|
|
39526
|
-
...
|
|
39533
|
+
...u,
|
|
39527
39534
|
status: t,
|
|
39528
39535
|
context: "source",
|
|
39529
39536
|
explorerLink: x
|
|
@@ -39533,7 +39540,7 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39533
39540
|
/* @__PURE__ */ m(
|
|
39534
39541
|
os,
|
|
39535
39542
|
{
|
|
39536
|
-
...
|
|
39543
|
+
...d,
|
|
39537
39544
|
icon: Z.pen,
|
|
39538
39545
|
status: p,
|
|
39539
39546
|
onClickEditDestinationWallet: i,
|
|
@@ -39654,7 +39661,7 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39654
39661
|
firstOperationStatus: t
|
|
39655
39662
|
}) => {
|
|
39656
39663
|
var x;
|
|
39657
|
-
const { data: c } = R(ra), { data: a } = R(_0), [r, s] =
|
|
39664
|
+
const { data: c } = R(ra), { data: a } = R(_0), [r, s] = le({}), l = (C) => {
|
|
39658
39665
|
s((k) => ({
|
|
39659
39666
|
...k,
|
|
39660
39667
|
[C]: !0
|
|
@@ -39664,15 +39671,15 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39664
39671
|
...k,
|
|
39665
39672
|
[C]: !1
|
|
39666
39673
|
}));
|
|
39667
|
-
},
|
|
39674
|
+
}, u = e[0], d = n == null ? void 0 : n.transferEvents;
|
|
39668
39675
|
return /* @__PURE__ */ m(n1, { children: /* @__PURE__ */ S(he, { children: [
|
|
39669
39676
|
/* @__PURE__ */ m(
|
|
39670
39677
|
is,
|
|
39671
39678
|
{
|
|
39672
|
-
tokenAmount:
|
|
39673
|
-
denom:
|
|
39674
|
-
chainId:
|
|
39675
|
-
explorerLink: (x =
|
|
39679
|
+
tokenAmount: u.amountIn,
|
|
39680
|
+
denom: u.denomIn,
|
|
39681
|
+
chainId: u.fromChainID,
|
|
39682
|
+
explorerLink: (x = d == null ? void 0 : d[0]) == null ? void 0 : x.fromExplorerLink,
|
|
39676
39683
|
status: t,
|
|
39677
39684
|
context: "source",
|
|
39678
39685
|
index: 0
|
|
@@ -39691,7 +39698,7 @@ const O2 = new Intl.NumberFormat("en-US", {
|
|
|
39691
39698
|
tokenAmount: C.amountOut,
|
|
39692
39699
|
denom: C.denomOut,
|
|
39693
39700
|
chainId: C.toChainID ?? C.chainID
|
|
39694
|
-
}, T = C.isSwap ? (z =
|
|
39701
|
+
}, T = C.isSwap ? (z = d == null ? void 0 : d[C.transferIndex]) == null ? void 0 : z.fromExplorerLink : (h = d == null ? void 0 : d[C.transferIndex]) == null ? void 0 : h.toExplorerLink, j = o === Ae.confirmed ? "completed" : (D = d == null ? void 0 : d[C.transferIndex]) == null ? void 0 : D.status;
|
|
39695
39702
|
return /* @__PURE__ */ S(sn.Fragment, { children: [
|
|
39696
39703
|
/* @__PURE__ */ S(
|
|
39697
39704
|
o1,
|
|
@@ -39840,18 +39847,18 @@ function wm(e) {
|
|
|
39840
39847
|
if (typeof l == "string")
|
|
39841
39848
|
throw new Error(l);
|
|
39842
39849
|
let p = a + "1";
|
|
39843
|
-
for (let
|
|
39844
|
-
const
|
|
39845
|
-
if (
|
|
39850
|
+
for (let u = 0; u < r.length; ++u) {
|
|
39851
|
+
const d = r[u];
|
|
39852
|
+
if (d >> 5)
|
|
39846
39853
|
throw new Error("Non 5-bit word");
|
|
39847
|
-
l = yi(l) ^
|
|
39854
|
+
l = yi(l) ^ d, p += pt.charAt(d);
|
|
39848
39855
|
}
|
|
39849
|
-
for (let
|
|
39856
|
+
for (let u = 0; u < 6; ++u)
|
|
39850
39857
|
l = yi(l);
|
|
39851
39858
|
l ^= n;
|
|
39852
|
-
for (let
|
|
39853
|
-
const
|
|
39854
|
-
p += pt.charAt(
|
|
39859
|
+
for (let u = 0; u < 6; ++u) {
|
|
39860
|
+
const d = l >> (5 - u) * 5 & 31;
|
|
39861
|
+
p += pt.charAt(d);
|
|
39855
39862
|
}
|
|
39856
39863
|
return p;
|
|
39857
39864
|
}
|
|
@@ -39869,20 +39876,20 @@ function wm(e) {
|
|
|
39869
39876
|
return "No separator character for " + a;
|
|
39870
39877
|
if (p === 0)
|
|
39871
39878
|
return "Missing prefix for " + a;
|
|
39872
|
-
const
|
|
39873
|
-
if (
|
|
39879
|
+
const u = a.slice(0, p), d = a.slice(p + 1);
|
|
39880
|
+
if (d.length < 6)
|
|
39874
39881
|
return "Data too short";
|
|
39875
|
-
let x = cs(
|
|
39882
|
+
let x = cs(u);
|
|
39876
39883
|
if (typeof x == "string")
|
|
39877
39884
|
return x;
|
|
39878
39885
|
const C = [];
|
|
39879
|
-
for (let k = 0; k <
|
|
39880
|
-
const M =
|
|
39886
|
+
for (let k = 0; k < d.length; ++k) {
|
|
39887
|
+
const M = d.charAt(k), q = km[M];
|
|
39881
39888
|
if (q === void 0)
|
|
39882
39889
|
return "Unknown character " + M;
|
|
39883
|
-
x = yi(x) ^ q, !(k + 6 >=
|
|
39890
|
+
x = yi(x) ^ q, !(k + 6 >= d.length) && C.push(q);
|
|
39884
39891
|
}
|
|
39885
|
-
return x !== n ? "Invalid checksum for " + a : { prefix:
|
|
39892
|
+
return x !== n ? "Invalid checksum for " + a : { prefix: u, words: C };
|
|
39886
39893
|
}
|
|
39887
39894
|
function t(a, r) {
|
|
39888
39895
|
const s = o(a, r);
|
|
@@ -39970,22 +39977,22 @@ const vm = {
|
|
|
39970
39977
|
penumbrawalletid: "penumbrawalletid",
|
|
39971
39978
|
plpid: "plpid"
|
|
39972
39979
|
}, l1 = Bm.penumbra, m1 = Mm.penumbra, as = ({ [l1]: e }) => r1(e, m1), p1 = Bm.penumbracompat1, h1 = Mm.penumbracompat1, u1 = ({ [p1]: e }) => s1(e, h1), Pm = () => {
|
|
39973
|
-
const { data: e } = R(
|
|
39980
|
+
const { data: e } = R(ze), { data: n } = R(bn), i = X(wt), o = X(Ee), t = R(Mo), { walletType: c } = dp(), { data: a, isConnected: r } = Cs({
|
|
39974
39981
|
multiChain: !0
|
|
39975
39982
|
}), { disconnectAsync: s } = ks();
|
|
39976
|
-
return { createCosmosWallets:
|
|
39983
|
+
return { createCosmosWallets: Pe(
|
|
39977
39984
|
(p) => {
|
|
39978
|
-
const
|
|
39979
|
-
|
|
39980
|
-
|
|
39981
|
-
|
|
39982
|
-
|
|
39983
|
-
|
|
39984
|
-
|
|
39985
|
-
|
|
39985
|
+
const u = On(), d = Dp(pe.COSMIFRAME), x = [
|
|
39986
|
+
pe.KEPLR,
|
|
39987
|
+
pe.LEAP,
|
|
39988
|
+
pe.COSMOSTATION,
|
|
39989
|
+
pe.XDEFI,
|
|
39990
|
+
pe.STATION,
|
|
39991
|
+
pe.VECTIS,
|
|
39992
|
+
pe.WALLETCONNECT
|
|
39986
39993
|
];
|
|
39987
|
-
typeof window < "u" && window.keplr && (window == null ? void 0 : window.keplr).isOkxWallet && (x[0] =
|
|
39988
|
-
const C = [
|
|
39994
|
+
typeof window < "u" && window.keplr && (window == null ? void 0 : window.keplr).isOkxWallet && (x[0] = pe.OKX), d && x.push(pe.COSMIFRAME);
|
|
39995
|
+
const C = [pe.WC_KEPLR_MOBILE], k = [...x, ...C].filter(
|
|
39989
39996
|
(E) => {
|
|
39990
39997
|
try {
|
|
39991
39998
|
return !!an(E);
|
|
@@ -39993,8 +40000,8 @@ const vm = {
|
|
|
39993
40000
|
return !1;
|
|
39994
40001
|
}
|
|
39995
40002
|
}
|
|
39996
|
-
), M =
|
|
39997
|
-
if ((p == null ? void 0 : p.includes("penumbra")) && !
|
|
40003
|
+
), M = u ? k : x;
|
|
40004
|
+
if ((p == null ? void 0 : p.includes("penumbra")) && !u)
|
|
39998
40005
|
return [{
|
|
39999
40006
|
walletName: "prax",
|
|
40000
40007
|
walletPrettyName: "Prax Wallet",
|
|
@@ -40037,7 +40044,7 @@ const vm = {
|
|
|
40037
40044
|
}];
|
|
40038
40045
|
const g = [];
|
|
40039
40046
|
for (const E of M) {
|
|
40040
|
-
const H = xp(E), T = On(), j = bm(E), z = (H ? z2 : E ===
|
|
40047
|
+
const H = xp(E), T = On(), j = bm(E), z = (H ? z2 : E === pe.OKX ? B2 : E === pe.KEPLR && !T ? M2 : P2).filter(
|
|
40041
40048
|
(b) => (e == null ? void 0 : e.filter((w) => w.chainType === V.Cosmos).map((w) => w.chainID).includes(b)) && Aa.map((w) => w.chainId).includes(b)
|
|
40042
40049
|
), h = async () => {
|
|
40043
40050
|
var b, w;
|
|
@@ -40230,13 +40237,13 @@ const vm = {
|
|
|
40230
40237
|
type: "function"
|
|
40231
40238
|
}
|
|
40232
40239
|
], zm = () => {
|
|
40233
|
-
const { data: e } = R(
|
|
40240
|
+
const { data: e } = R(ze), { data: n } = R(bn), i = X(Ee), o = X(kt), t = R(Mo), {
|
|
40234
40241
|
connector: c,
|
|
40235
40242
|
address: a,
|
|
40236
40243
|
isConnected: r,
|
|
40237
40244
|
chainId: s
|
|
40238
|
-
} = Dt(), { connectAsync: l } = Bp(), p = Uc(),
|
|
40239
|
-
return { createEvmWallets:
|
|
40245
|
+
} = Dt(), { connectAsync: l } = Bp(), p = Uc(), u = p.find((k) => k.id === (c == null ? void 0 : c.id)), { disconnectAsync: d } = Mp(), x = On();
|
|
40246
|
+
return { createEvmWallets: Pe(
|
|
40240
40247
|
(k) => {
|
|
40241
40248
|
const M = k === "pacific-1";
|
|
40242
40249
|
M && (k = tt.id.toString());
|
|
@@ -40253,7 +40260,7 @@ const vm = {
|
|
|
40253
40260
|
connector: g,
|
|
40254
40261
|
chainId: Number(k)
|
|
40255
40262
|
});
|
|
40256
|
-
return await
|
|
40263
|
+
return await d(), o(void 0), window.localStorage.removeItem("WALLETCONNECT_DEEPLINK_CHOICE"), window.localStorage.removeItem("WCM_RECENT_WALLET_DATA"), D.accounts[0];
|
|
40257
40264
|
}
|
|
40258
40265
|
if (z && r && s !== Number(k) && g.id === (c == null ? void 0 : c.id))
|
|
40259
40266
|
return await ((h = g == null ? void 0 : g.switchChain) == null ? void 0 : h.call(g, {
|
|
@@ -40288,7 +40295,7 @@ const vm = {
|
|
|
40288
40295
|
}));
|
|
40289
40296
|
return;
|
|
40290
40297
|
}
|
|
40291
|
-
r && g.id !== (c == null ? void 0 : c.id) && await (
|
|
40298
|
+
r && g.id !== (c == null ? void 0 : c.id) && await (u == null ? void 0 : u.disconnect());
|
|
40292
40299
|
try {
|
|
40293
40300
|
await l({ connector: g, chainId: 1 }), o({
|
|
40294
40301
|
walletName: g.id,
|
|
@@ -40318,7 +40325,7 @@ const vm = {
|
|
|
40318
40325
|
}));
|
|
40319
40326
|
return;
|
|
40320
40327
|
}
|
|
40321
|
-
r && g.id !== (c == null ? void 0 : c.id) && await (
|
|
40328
|
+
r && g.id !== (c == null ? void 0 : c.id) && await (u == null ? void 0 : u.disconnect());
|
|
40322
40329
|
try {
|
|
40323
40330
|
await l({ connector: g, chainId: Number(k) }), o({
|
|
40324
40331
|
walletName: g.id,
|
|
@@ -40343,7 +40350,7 @@ const vm = {
|
|
|
40343
40350
|
},
|
|
40344
40351
|
disconnect: async () => {
|
|
40345
40352
|
var z;
|
|
40346
|
-
await (
|
|
40353
|
+
await (u == null ? void 0 : u.disconnect()), o(void 0), (z = t == null ? void 0 : t.onWalletDisconnected) == null || z.call(t, {
|
|
40347
40354
|
walletName: g.name,
|
|
40348
40355
|
chainType: V.EVM
|
|
40349
40356
|
});
|
|
@@ -40382,9 +40389,9 @@ const vm = {
|
|
|
40382
40389
|
s,
|
|
40383
40390
|
a,
|
|
40384
40391
|
l,
|
|
40385
|
-
u,
|
|
40386
|
-
o,
|
|
40387
40392
|
d,
|
|
40393
|
+
o,
|
|
40394
|
+
u,
|
|
40388
40395
|
e,
|
|
40389
40396
|
n,
|
|
40390
40397
|
i,
|
|
@@ -40392,8 +40399,8 @@ const vm = {
|
|
|
40392
40399
|
]
|
|
40393
40400
|
) };
|
|
40394
40401
|
}, Sm = () => {
|
|
40395
|
-
const { data: e } = R(
|
|
40396
|
-
return { createSolanaWallets:
|
|
40402
|
+
const { data: e } = R(ze), { data: n } = R(bn), i = X(Ee), o = X(yt), t = R(Mo), c = On();
|
|
40403
|
+
return { createSolanaWallets: Pe(() => {
|
|
40397
40404
|
const r = [];
|
|
40398
40405
|
for (const s of mo) {
|
|
40399
40406
|
const l = s.name === "WalletConnect", p = {
|
|
@@ -40404,11 +40411,11 @@ const vm = {
|
|
|
40404
40411
|
logo: l ? ct : s.icon
|
|
40405
40412
|
},
|
|
40406
40413
|
connect: async () => {
|
|
40407
|
-
var
|
|
40414
|
+
var u, d;
|
|
40408
40415
|
try {
|
|
40409
40416
|
await s.connect(), o({ walletName: s.name, chainType: V.SVM });
|
|
40410
|
-
const x = e == null ? void 0 : e.find((k) => k.chainID === "solana"), C = (
|
|
40411
|
-
(
|
|
40417
|
+
const x = e == null ? void 0 : e.find((k) => k.chainID === "solana"), C = (u = s.publicKey) == null ? void 0 : u.toBase58();
|
|
40418
|
+
(d = t == null ? void 0 : t.onWalletConnected) == null || d.call(t, {
|
|
40412
40419
|
walletName: s.name,
|
|
40413
40420
|
chainId: x == null ? void 0 : x.chainID,
|
|
40414
40421
|
address: C
|
|
@@ -40418,7 +40425,7 @@ const vm = {
|
|
|
40418
40425
|
}
|
|
40419
40426
|
},
|
|
40420
40427
|
connectEco: async () => {
|
|
40421
|
-
var
|
|
40428
|
+
var u, d;
|
|
40422
40429
|
try {
|
|
40423
40430
|
await s.connect(), o({ walletName: s.name, chainType: V.SVM });
|
|
40424
40431
|
const x = e == null ? void 0 : e.find((M) => M.chainID === "solana"), C = n == null ? void 0 : n.find(
|
|
@@ -40429,8 +40436,8 @@ const vm = {
|
|
|
40429
40436
|
chainName: x == null ? void 0 : x.chainName,
|
|
40430
40437
|
...C
|
|
40431
40438
|
});
|
|
40432
|
-
const k = (
|
|
40433
|
-
(
|
|
40439
|
+
const k = (u = s.publicKey) == null ? void 0 : u.toBase58();
|
|
40440
|
+
(d = t == null ? void 0 : t.onWalletConnected) == null || d.call(t, {
|
|
40434
40441
|
walletName: s.name,
|
|
40435
40442
|
chainId: x == null ? void 0 : x.chainID,
|
|
40436
40443
|
address: k
|
|
@@ -40439,7 +40446,7 @@ const vm = {
|
|
|
40439
40446
|
throw console.error(x), x;
|
|
40440
40447
|
}
|
|
40441
40448
|
},
|
|
40442
|
-
getAddress: async ({ signRequired:
|
|
40449
|
+
getAddress: async ({ signRequired: u }) => {
|
|
40443
40450
|
try {
|
|
40444
40451
|
if (!s.connected) {
|
|
40445
40452
|
if (l && c) {
|
|
@@ -40455,17 +40462,17 @@ const vm = {
|
|
|
40455
40462
|
}
|
|
40456
40463
|
const x = s.publicKey;
|
|
40457
40464
|
if (!x) throw new Error("No address found");
|
|
40458
|
-
return
|
|
40465
|
+
return u && o({
|
|
40459
40466
|
walletName: s.name,
|
|
40460
40467
|
chainType: V.SVM
|
|
40461
40468
|
}), x.toBase58();
|
|
40462
|
-
} catch (
|
|
40463
|
-
console.error(
|
|
40469
|
+
} catch (d) {
|
|
40470
|
+
console.error(d);
|
|
40464
40471
|
}
|
|
40465
40472
|
},
|
|
40466
40473
|
disconnect: async () => {
|
|
40467
|
-
var
|
|
40468
|
-
await s.disconnect(), o(void 0), (
|
|
40474
|
+
var u;
|
|
40475
|
+
await s.disconnect(), o(void 0), (u = t == null ? void 0 : t.onWalletDisconnected) == null || u.call(t, {
|
|
40469
40476
|
walletName: s.name,
|
|
40470
40477
|
chainType: V.SVM
|
|
40471
40478
|
});
|
|
@@ -40515,7 +40522,7 @@ const vm = {
|
|
|
40515
40522
|
}
|
|
40516
40523
|
`};
|
|
40517
40524
|
`, rs = 600, f1 = 100, qm = (e) => {
|
|
40518
|
-
const n = Ue(), [i, o] =
|
|
40525
|
+
const n = Ue(), [i, o] = le(rs - e);
|
|
40519
40526
|
return De(() => {
|
|
40520
40527
|
o(n ? window.innerHeight - e - f1 * 2 : rs - e);
|
|
40521
40528
|
}, [n, e]), i;
|
|
@@ -40528,12 +40535,12 @@ const vm = {
|
|
|
40528
40535
|
className: c,
|
|
40529
40536
|
empty: a
|
|
40530
40537
|
}) => {
|
|
40531
|
-
const r = xe(), [s, l] =
|
|
40538
|
+
const r = xe(), [s, l] = le(), p = qm(i), u = Oc(null);
|
|
40532
40539
|
return De(() => {
|
|
40533
40540
|
var k, M, q;
|
|
40534
|
-
const
|
|
40541
|
+
const d = (q = (M = (k = u.current) == null ? void 0 : k.nativeElement) == null ? void 0 : M.getElementsByClassName(
|
|
40535
40542
|
"rc-virtual-list-holder-inner"
|
|
40536
|
-
)) == null ? void 0 : q[0], x =
|
|
40543
|
+
)) == null ? void 0 : q[0], x = d == null ? void 0 : d.firstChild, C = (g) => {
|
|
40537
40544
|
if (g.key === "ArrowDown") {
|
|
40538
40545
|
x && (x.focus(), l(x)), g.preventDefault();
|
|
40539
40546
|
const E = s == null ? void 0 : s.nextElementSibling;
|
|
@@ -40549,8 +40556,8 @@ const vm = {
|
|
|
40549
40556
|
};
|
|
40550
40557
|
}, [s, e.length]), De(() => {
|
|
40551
40558
|
setTimeout(() => {
|
|
40552
|
-
var
|
|
40553
|
-
(
|
|
40559
|
+
var d;
|
|
40560
|
+
(d = u.current) == null || d.scrollTo(0);
|
|
40554
40561
|
}, 0);
|
|
40555
40562
|
}, [e.length]), e.length === 0 ? /* @__PURE__ */ S(b1, { gap: 10, height: n ?? p, children: [
|
|
40556
40563
|
a == null ? void 0 : a.icon,
|
|
@@ -40559,7 +40566,7 @@ const vm = {
|
|
|
40559
40566
|
] }) : /* @__PURE__ */ m(
|
|
40560
40567
|
_p,
|
|
40561
40568
|
{
|
|
40562
|
-
ref:
|
|
40569
|
+
ref: u,
|
|
40563
40570
|
data: e,
|
|
40564
40571
|
height: n ?? p,
|
|
40565
40572
|
itemHeight: i,
|
|
@@ -40575,7 +40582,7 @@ const vm = {
|
|
|
40575
40582
|
backgroundColor: Qc(r.primary.text.normal) + gn(50)
|
|
40576
40583
|
}
|
|
40577
40584
|
},
|
|
40578
|
-
children: (
|
|
40585
|
+
children: (d, x) => o(d, x)
|
|
40579
40586
|
}
|
|
40580
40587
|
);
|
|
40581
40588
|
}, b1 = N(he)`
|
|
@@ -40778,9 +40785,9 @@ function Vm(e, n) {
|
|
|
40778
40785
|
var r = Nm(c);
|
|
40779
40786
|
if (typeof r == "string") return r;
|
|
40780
40787
|
for (var s = [], l = 0; l < a.length; ++l) {
|
|
40781
|
-
var p = a.charAt(l),
|
|
40782
|
-
if (
|
|
40783
|
-
r = vi(r) ^
|
|
40788
|
+
var p = a.charAt(l), u = Hc[p];
|
|
40789
|
+
if (u === void 0) return "Unknown character " + p;
|
|
40790
|
+
r = vi(r) ^ u, !(l + 6 >= a.length) && s.push(u);
|
|
40784
40791
|
}
|
|
40785
40792
|
return r !== 1 ? "Invalid checksum for " + e : { prefix: c, words: s };
|
|
40786
40793
|
}
|
|
@@ -40904,10 +40911,10 @@ function ex(e) {
|
|
|
40904
40911
|
if (!n)
|
|
40905
40912
|
throw new Error("Date string is not in RFC3339 format");
|
|
40906
40913
|
const i = +n[1], o = +n[2], t = +n[3], c = +n[4], a = +n[5], r = +n[6], s = n[7] ? Math.floor(+n[7] * 1e3) : 0;
|
|
40907
|
-
let l, p,
|
|
40908
|
-
n[8] === "Z" ? (l = 1, p = 0,
|
|
40909
|
-
const
|
|
40910
|
-
return new Date(x);
|
|
40914
|
+
let l, p, u;
|
|
40915
|
+
n[8] === "Z" ? (l = 1, p = 0, u = 0) : (l = n[8].substring(0, 1) === "-" ? -1 : 1, p = +n[8].substring(1, 3), u = +n[8].substring(4, 6));
|
|
40916
|
+
const d = l * (p * 60 + u) * 60, x = /* @__PURE__ */ new Date();
|
|
40917
|
+
return x.setUTCFullYear(i, o - 1, t), x.setUTCHours(c, a, r, s), new Date(x.getTime() - d * 1e3);
|
|
40911
40918
|
}
|
|
40912
40919
|
Vi.fromRfc3339 = ex;
|
|
40913
40920
|
function nx(e) {
|
|
@@ -41003,12 +41010,12 @@ const tx = ({
|
|
|
41003
41010
|
chainType: i
|
|
41004
41011
|
}) => {
|
|
41005
41012
|
var p;
|
|
41006
|
-
const { createCosmosWallets: o } = Pm(), { createEvmWallets: t } = zm(), { createSolanaWallets: c } = Sm(), { data: a } = R(
|
|
41013
|
+
const { createCosmosWallets: o } = Pm(), { createEvmWallets: t } = zm(), { createSolanaWallets: c } = Sm(), { data: a } = R(ze), r = e ? (p = a == null ? void 0 : a.find((u) => u.chainID === e)) == null ? void 0 : p.chainType : i, s = n && e === "pacific-1" ? "sei" : r;
|
|
41007
41014
|
return U(() => {
|
|
41008
41015
|
switch (s) {
|
|
41009
41016
|
case "sei": {
|
|
41010
|
-
const
|
|
41011
|
-
return [...
|
|
41017
|
+
const u = o(e), d = t(e);
|
|
41018
|
+
return [...u, ...d];
|
|
41012
41019
|
}
|
|
41013
41020
|
case "cosmos":
|
|
41014
41021
|
return o(e);
|
|
@@ -41024,24 +41031,24 @@ const tx = ({
|
|
|
41024
41031
|
var bi = /* @__PURE__ */ ((e) => (e.Input = "input", e.Wallet = "wallet", e.Injected = "injected", e))(bi || {});
|
|
41025
41032
|
const cx = Xi((e) => {
|
|
41026
41033
|
var h, D;
|
|
41027
|
-
const n = Ue(), { chainId: i, chainAddressIndex: o } = e, t = xe(), { data: c } = R(
|
|
41034
|
+
const n = Ue(), { chainId: i, chainAddressIndex: o } = e, t = xe(), { data: c } = R(ze), a = c == null ? void 0 : c.find((f) => f.chainID === i), r = a == null ? void 0 : a.prettyName, s = a == null ? void 0 : a.logoURI, [l, p] = le(!1), [u, d] = le(""), x = va({ chainID: i, destinationWalletList: !0 }), [C, k] = de(Xn), M = new Set(Object.values(C).map(({ chainID: f }) => f)).size > 1, q = On(), g = {
|
|
41028
41035
|
onSelect: () => p(!0),
|
|
41029
41036
|
walletName: "Enter address manually",
|
|
41030
41037
|
rightContent: () => {
|
|
41031
41038
|
var f;
|
|
41032
41039
|
return /* @__PURE__ */ m(ma, { color: (f = t == null ? void 0 : t.primary) == null ? void 0 : f.text.normal });
|
|
41033
41040
|
}
|
|
41034
|
-
}, E = [...x, g], H =
|
|
41035
|
-
|
|
41041
|
+
}, E = [...x, g], H = Pe((f) => {
|
|
41042
|
+
d(f.target.value);
|
|
41036
41043
|
}, []), T = U(() => {
|
|
41037
|
-
if (!a ||
|
|
41044
|
+
if (!a || u.length === 0) return;
|
|
41038
41045
|
const { chainType: f, bech32Prefix: A } = a;
|
|
41039
41046
|
return tx({
|
|
41040
|
-
address:
|
|
41047
|
+
address: u,
|
|
41041
41048
|
bech32Prefix: A,
|
|
41042
41049
|
chainType: f
|
|
41043
41050
|
});
|
|
41044
|
-
}, [a,
|
|
41051
|
+
}, [a, u]), j = U(() => {
|
|
41045
41052
|
if (!a) return "Enter address...";
|
|
41046
41053
|
const { chainType: f, bech32Prefix: A } = a;
|
|
41047
41054
|
switch (f) {
|
|
@@ -41063,7 +41070,7 @@ const cx = Xi((e) => {
|
|
|
41063
41070
|
[b]: {
|
|
41064
41071
|
chainID: i,
|
|
41065
41072
|
chainType: f,
|
|
41066
|
-
address:
|
|
41073
|
+
address: u,
|
|
41067
41074
|
source: "input"
|
|
41068
41075
|
/* Input */
|
|
41069
41076
|
}
|
|
@@ -41085,7 +41092,7 @@ const cx = Xi((e) => {
|
|
|
41085
41092
|
lx,
|
|
41086
41093
|
{
|
|
41087
41094
|
placeholder: j,
|
|
41088
|
-
value:
|
|
41095
|
+
value: u,
|
|
41089
41096
|
onChange: H,
|
|
41090
41097
|
validAddress: T
|
|
41091
41098
|
}
|
|
@@ -41175,7 +41182,7 @@ const cx = Xi((e) => {
|
|
|
41175
41182
|
chainAddressIndex: r
|
|
41176
41183
|
}) => {
|
|
41177
41184
|
var j, z;
|
|
41178
|
-
const s = xe(), l = R(vt), p = X(wt),
|
|
41185
|
+
const s = xe(), l = R(vt), p = X(wt), u = X(kt), d = X(yt), x = X(Xn), C = U(() => {
|
|
41179
41186
|
const h = n.filter(
|
|
41180
41187
|
(D) => ss(D) || (D == null ? void 0 : D.isAvailable) !== !1
|
|
41181
41188
|
);
|
|
@@ -41218,7 +41225,7 @@ const cx = Xi((e) => {
|
|
|
41218
41225
|
var I;
|
|
41219
41226
|
return P.name === ((I = l.svm) == null ? void 0 : I.walletName);
|
|
41220
41227
|
});
|
|
41221
|
-
await ((b = v == null ? void 0 : v.disconnect) == null ? void 0 : b.call(v)),
|
|
41228
|
+
await ((b = v == null ? void 0 : v.disconnect) == null ? void 0 : b.call(v)), d(void 0);
|
|
41222
41229
|
}
|
|
41223
41230
|
break;
|
|
41224
41231
|
case V.SVM:
|
|
@@ -41227,7 +41234,7 @@ const cx = Xi((e) => {
|
|
|
41227
41234
|
var I;
|
|
41228
41235
|
return P.id === ((I = l.evm) == null ? void 0 : I.walletName);
|
|
41229
41236
|
});
|
|
41230
|
-
await ((w = v == null ? void 0 : v.disconnect) == null ? void 0 : w.call(v)),
|
|
41237
|
+
await ((w = v == null ? void 0 : v.disconnect) == null ? void 0 : w.call(v)), u(void 0);
|
|
41231
41238
|
}
|
|
41232
41239
|
if (l.cosmos) {
|
|
41233
41240
|
const v = an(l.cosmos.walletName);
|
|
@@ -41240,14 +41247,14 @@ const cx = Xi((e) => {
|
|
|
41240
41247
|
var I;
|
|
41241
41248
|
return P.id === ((I = l.evm) == null ? void 0 : I.walletName);
|
|
41242
41249
|
});
|
|
41243
|
-
await ((y = v == null ? void 0 : v.disconnect) == null ? void 0 : y.call(v)),
|
|
41250
|
+
await ((y = v == null ? void 0 : v.disconnect) == null ? void 0 : y.call(v)), u(void 0);
|
|
41244
41251
|
}
|
|
41245
41252
|
if (l.svm) {
|
|
41246
41253
|
const v = mo.find((P) => {
|
|
41247
41254
|
var I;
|
|
41248
41255
|
return P.name === ((I = l.svm) == null ? void 0 : I.walletName);
|
|
41249
41256
|
});
|
|
41250
|
-
await ((F = v == null ? void 0 : v.disconnect) == null ? void 0 : F.call(v)),
|
|
41257
|
+
await ((F = v == null ? void 0 : v.disconnect) == null ? void 0 : F.call(v)), d(void 0);
|
|
41251
41258
|
}
|
|
41252
41259
|
break;
|
|
41253
41260
|
}
|
|
@@ -41256,7 +41263,7 @@ const cx = Xi((e) => {
|
|
|
41256
41263
|
onSuccess: () => {
|
|
41257
41264
|
a && k(), ie.remove(ce.SetAddressModal), ie.remove(ce.WalletSelectorModal);
|
|
41258
41265
|
}
|
|
41259
|
-
}), E =
|
|
41266
|
+
}), E = Pe(
|
|
41260
41267
|
(h) => {
|
|
41261
41268
|
var v;
|
|
41262
41269
|
const D = No(h) ? h.walletPrettyName ?? h.walletName : h.walletName, f = No(h) ? (v = h == null ? void 0 : h.walletInfo) == null ? void 0 : v.logo : void 0, A = ss(h) ? h == null ? void 0 : h.rightContent : void 0, b = No(h) ? h == null ? void 0 : h.isAvailable : void 0, w = (A == null ? void 0 : A()) ?? /* @__PURE__ */ m(Ce, {}), B = f ? /* @__PURE__ */ m(
|
|
@@ -41417,14 +41424,14 @@ const cx = Xi((e) => {
|
|
|
41417
41424
|
] })
|
|
41418
41425
|
] });
|
|
41419
41426
|
}), nc = ({ chainType: e, chainID: n }) => {
|
|
41420
|
-
var
|
|
41427
|
+
var d, x;
|
|
41421
41428
|
const i = xe(), o = Zn(), t = Ue(), c = R(Ee), { chain: a } = en({
|
|
41422
41429
|
assetDenom: c == null ? void 0 : c.denom,
|
|
41423
41430
|
chainId: c == null ? void 0 : c.chainID
|
|
41424
41431
|
}), r = U(() => {
|
|
41425
41432
|
const C = e === (a == null ? void 0 : a.chainType) ? c == null ? void 0 : c.chainID : n;
|
|
41426
41433
|
return o(C, !0);
|
|
41427
|
-
}, [a == null ? void 0 : a.chainType, n, e, o, c == null ? void 0 : c.chainID]), s = qi(r == null ? void 0 : r.address, t), p = va({ chainType: e }).find((C) => C.walletName === (r == null ? void 0 : r.wallet.name)),
|
|
41434
|
+
}, [a == null ? void 0 : a.chainType, n, e, o, c == null ? void 0 : c.chainID]), s = qi(r == null ? void 0 : r.address, t), p = va({ chainType: e }).find((C) => C.walletName === (r == null ? void 0 : r.wallet.name)), u = U(() => {
|
|
41428
41435
|
var C, k;
|
|
41429
41436
|
return t ? /* @__PURE__ */ m(
|
|
41430
41437
|
nn,
|
|
@@ -41448,7 +41455,7 @@ const cx = Xi((e) => {
|
|
|
41448
41455
|
children: "Disconnect"
|
|
41449
41456
|
}
|
|
41450
41457
|
);
|
|
41451
|
-
}, [p, t, (x = (
|
|
41458
|
+
}, [p, t, (x = (d = i == null ? void 0 : i.primary) == null ? void 0 : d.text) == null ? void 0 : x.ultraLowContrast]);
|
|
41452
41459
|
return /* @__PURE__ */ m(
|
|
41453
41460
|
fo,
|
|
41454
41461
|
{
|
|
@@ -41490,11 +41497,11 @@ const cx = Xi((e) => {
|
|
|
41490
41497
|
" ",
|
|
41491
41498
|
e === V.Cosmos ? "Cosmos" : e === V.EVM ? "Ethereum" : "Solana"
|
|
41492
41499
|
] }),
|
|
41493
|
-
rightContent: r && r.wallet.name !== "injected" ?
|
|
41500
|
+
rightContent: r && r.wallet.name !== "injected" ? u : /* @__PURE__ */ m(ma, { color: i.primary.text.normal })
|
|
41494
41501
|
}
|
|
41495
41502
|
);
|
|
41496
41503
|
}, Dx = ({ chainId: e }) => {
|
|
41497
|
-
const n = xe(), { data: i } = R(
|
|
41504
|
+
const n = xe(), { data: i } = R(ze), o = i == null ? void 0 : i.find((t) => t.chainID === e);
|
|
41498
41505
|
return /* @__PURE__ */ m(Ie, { fontSize: 12, color: n.primary.text.lowContrast, children: o == null ? void 0 : o.prettyName });
|
|
41499
41506
|
}, xx = ({ color: e = "currentColor" }) => /* @__PURE__ */ m("svg", { width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ m(
|
|
41500
41507
|
"path",
|
|
@@ -41545,7 +41552,7 @@ const cx = Xi((e) => {
|
|
|
41545
41552
|
)
|
|
41546
41553
|
}
|
|
41547
41554
|
), bx = () => {
|
|
41548
|
-
const [e, n] =
|
|
41555
|
+
const [e, n] = le(!1), [i, o] = le(!1), [t, c] = le(""), [a, r] = de(sm), s = !!(a && !Vr.includes(a));
|
|
41549
41556
|
return De(() => {
|
|
41550
41557
|
s && c(a == null ? void 0 : a.toString());
|
|
41551
41558
|
}, [a, s]), /* @__PURE__ */ S(Ax, { children: [
|
|
@@ -41708,7 +41715,7 @@ const cx = Xi((e) => {
|
|
|
41708
41715
|
color: ${n.brandTextColor};
|
|
41709
41716
|
`}
|
|
41710
41717
|
`, Fx = () => {
|
|
41711
|
-
const [e, n] =
|
|
41718
|
+
const [e, n] = le(!1), [i, o] = de(lm);
|
|
41712
41719
|
return /* @__PURE__ */ S(Bx, { children: [
|
|
41713
41720
|
/* @__PURE__ */ S(Mx, { align: "center", children: [
|
|
41714
41721
|
"Route Preference",
|
|
@@ -41763,7 +41770,7 @@ const cx = Xi((e) => {
|
|
|
41763
41770
|
width: 100%;
|
|
41764
41771
|
}
|
|
41765
41772
|
`, Sx = Xi(() => {
|
|
41766
|
-
const e = xe(), { data: n } = R(Yi), { data: i } = R(
|
|
41773
|
+
const e = xe(), { data: n } = R(Yi), { data: i } = R(ze), o = U(() => n == null ? void 0 : n.chainIDs.map((s) => i == null ? void 0 : i.find((l) => l.chainID === s)), [n, i]), t = Zi(n == null ? void 0 : n.operations), c = U(() => t ? t.filter(
|
|
41767
41774
|
(s) => [
|
|
41768
41775
|
ve.axelarTransfer,
|
|
41769
41776
|
ve.hyperlaneTransfer,
|
|
@@ -41776,13 +41783,13 @@ const cx = Xi((e) => {
|
|
|
41776
41783
|
if (!l) return;
|
|
41777
41784
|
const {
|
|
41778
41785
|
feeAsset: p,
|
|
41779
|
-
sourceChainFeeAmount:
|
|
41780
|
-
destinationChainFeeAmount:
|
|
41786
|
+
sourceChainFeeAmount: u,
|
|
41787
|
+
destinationChainFeeAmount: d,
|
|
41781
41788
|
bpsFeeAmount: x,
|
|
41782
41789
|
sourceChainFeeUSD: C,
|
|
41783
41790
|
destinationChainFeeUSD: k,
|
|
41784
41791
|
bpsFeeUSD: M
|
|
41785
|
-
} = l, q = [
|
|
41792
|
+
} = l, q = [u, d, x].reduce(
|
|
41786
41793
|
(H, T) => H + Number(T),
|
|
41787
41794
|
0
|
|
41788
41795
|
), g = [C, k, M].reduce(
|
|
@@ -41798,22 +41805,22 @@ const cx = Xi((e) => {
|
|
|
41798
41805
|
formattedUsdAmount: Gn(g.toString())
|
|
41799
41806
|
};
|
|
41800
41807
|
} else {
|
|
41801
|
-
const { feeAmount: l, feeAsset: p, usdFeeAmount:
|
|
41808
|
+
const { feeAmount: l, feeAsset: p, usdFeeAmount: u } = s;
|
|
41802
41809
|
if (!l || !p || !p.decimals) return;
|
|
41803
|
-
const
|
|
41810
|
+
const d = $e(l, p.decimals);
|
|
41804
41811
|
return {
|
|
41805
|
-
assetAmount: Number(
|
|
41806
|
-
formattedAssetAmount: `${
|
|
41807
|
-
formattedUsdAmount:
|
|
41812
|
+
assetAmount: Number(d),
|
|
41813
|
+
formattedAssetAmount: `${d} ${p.symbol}`,
|
|
41814
|
+
formattedUsdAmount: u ? Gn(u) : void 0
|
|
41808
41815
|
};
|
|
41809
41816
|
}
|
|
41810
41817
|
}, r = U(() => {
|
|
41811
41818
|
const s = [];
|
|
41812
|
-
c.forEach((
|
|
41813
|
-
const
|
|
41814
|
-
if (
|
|
41819
|
+
c.forEach((u) => {
|
|
41820
|
+
const d = a(u);
|
|
41821
|
+
if (d) {
|
|
41815
41822
|
let x = "";
|
|
41816
|
-
switch (
|
|
41823
|
+
switch (u.type) {
|
|
41817
41824
|
case ve.axelarTransfer:
|
|
41818
41825
|
x = "Axelar Bridging Fee";
|
|
41819
41826
|
break;
|
|
@@ -41824,7 +41831,7 @@ const cx = Xi((e) => {
|
|
|
41824
41831
|
x = "Go Fast Transfer Fee";
|
|
41825
41832
|
break;
|
|
41826
41833
|
}
|
|
41827
|
-
s.push({ label: x, fee:
|
|
41834
|
+
s.push({ label: x, fee: d });
|
|
41828
41835
|
}
|
|
41829
41836
|
});
|
|
41830
41837
|
const l = gx(n), p = fx(l, n == null ? void 0 : n.estimatedFees);
|
|
@@ -41928,7 +41935,7 @@ const cx = Xi((e) => {
|
|
|
41928
41935
|
};
|
|
41929
41936
|
}), Ht = () => {
|
|
41930
41937
|
const { data: e } = R(Ea);
|
|
41931
|
-
return
|
|
41938
|
+
return Pe(
|
|
41932
41939
|
(i, o) => {
|
|
41933
41940
|
var t, c, a;
|
|
41934
41941
|
return (a = (c = (t = e == null ? void 0 : e.chains) == null ? void 0 : t[i]) == null ? void 0 : c.denoms) == null ? void 0 : a[o];
|
|
@@ -41960,38 +41967,38 @@ const cx = Xi((e) => {
|
|
|
41960
41967
|
searchQuery: n = "",
|
|
41961
41968
|
context: i
|
|
41962
41969
|
}) => {
|
|
41963
|
-
const { data: o } = R(
|
|
41970
|
+
const { data: o } = R(ze), t = R(fa), c = Ht();
|
|
41964
41971
|
return U(() => !e || !o ? void 0 : e.assets.filter((l) => !Xm.some(
|
|
41965
|
-
(
|
|
41972
|
+
(u) => u.id === e.id && u.chainIDs.includes(l.chainID)
|
|
41966
41973
|
)).map((l) => {
|
|
41967
|
-
const p = o.find((
|
|
41974
|
+
const p = o.find((u) => u.chainID === l.chainID);
|
|
41968
41975
|
return p ? { ...p, asset: l } : null;
|
|
41969
41976
|
}).filter((l) => {
|
|
41970
41977
|
if (!l) return !1;
|
|
41971
|
-
const p = !(t != null && t[i]) || Object.keys(t[i]).includes(l.chainID),
|
|
41972
|
-
return p &&
|
|
41978
|
+
const p = !(t != null && t[i]) || Object.keys(t[i]).includes(l.chainID), u = i !== "source" || !l.chainID.startsWith("penumbra");
|
|
41979
|
+
return p && u;
|
|
41973
41980
|
}).filter(
|
|
41974
41981
|
(l) => l.chainName.toLowerCase().includes(n.toLowerCase())
|
|
41975
41982
|
).sort((l, p) => {
|
|
41976
41983
|
var k, M;
|
|
41977
|
-
const
|
|
41984
|
+
const u = Number(
|
|
41978
41985
|
((k = c(l.chainID, l.asset.denom)) == null ? void 0 : k.valueUSD) ?? 0
|
|
41979
|
-
),
|
|
41986
|
+
), d = Number(
|
|
41980
41987
|
((M = c(p.chainID, p.asset.denom)) == null ? void 0 : M.valueUSD) ?? 0
|
|
41981
41988
|
);
|
|
41982
|
-
if (
|
|
41989
|
+
if (d !== u) return d - u;
|
|
41983
41990
|
const x = l.asset.originChainID === l.chainID;
|
|
41984
41991
|
return p.asset.originChainID === p.chainID ? 1 : x ? -1 : 0;
|
|
41985
41992
|
}), [t, o, i, c, n, e]);
|
|
41986
41993
|
}, Hx = 6, Fa = ({ groupedAsset: e, height: n, width: i }) => {
|
|
41987
41994
|
var s;
|
|
41988
|
-
const [o, t] =
|
|
41995
|
+
const [o, t] = le(0);
|
|
41989
41996
|
if (!(e != null && e.assets) || e.assets.length === 0)
|
|
41990
41997
|
return /* @__PURE__ */ m(ic, { height: n, width: i, src: "", alt: "No asset" });
|
|
41991
41998
|
const c = [
|
|
41992
41999
|
(s = e.assets.find((l) => {
|
|
41993
42000
|
var p;
|
|
41994
|
-
return (p = l.logoURI) == null ? void 0 : p.includes("
|
|
42001
|
+
return (p = l.logoURI) == null ? void 0 : p.includes("chain-registry");
|
|
41995
42002
|
})) == null ? void 0 : s.logoURI,
|
|
41996
42003
|
...e.assets.map((l) => l.logoURI)
|
|
41997
42004
|
].filter((l) => !!l), a = Array.from(new Set(c));
|
|
@@ -42026,7 +42033,7 @@ const cx = Xi((e) => {
|
|
|
42026
42033
|
onSelect: o,
|
|
42027
42034
|
context: t
|
|
42028
42035
|
}) => {
|
|
42029
|
-
const { isLoading: c } = R(
|
|
42036
|
+
const { isLoading: c } = R(ze), a = Ht();
|
|
42030
42037
|
if (!e || c) return i;
|
|
42031
42038
|
if (Vc(e))
|
|
42032
42039
|
return /* @__PURE__ */ m(
|
|
@@ -42184,10 +42191,10 @@ const cx = Xi((e) => {
|
|
|
42184
42191
|
if (!t) return;
|
|
42185
42192
|
const a = [], r = (s) => s.reduce(
|
|
42186
42193
|
(l, p) => {
|
|
42187
|
-
const
|
|
42188
|
-
return
|
|
42189
|
-
$e(
|
|
42190
|
-
), Number(
|
|
42194
|
+
const u = i(p.chainID, p.denom);
|
|
42195
|
+
return u && (l.totalAmount += Number(
|
|
42196
|
+
$e(u.amount, u.decimals)
|
|
42197
|
+
), Number(u.valueUSD) && (l.totalUsd += Number(u.valueUSD))), l;
|
|
42191
42198
|
},
|
|
42192
42199
|
{ totalAmount: 0, totalUsd: 0 }
|
|
42193
42200
|
);
|
|
@@ -42228,7 +42235,7 @@ const cx = Xi((e) => {
|
|
|
42228
42235
|
badPriceWarning: s,
|
|
42229
42236
|
context: l
|
|
42230
42237
|
}) => {
|
|
42231
|
-
const p = xe(), [
|
|
42238
|
+
const p = xe(), [u, d] = le(!1), x = Ue(), C = u || s, k = en({
|
|
42232
42239
|
assetDenom: o == null ? void 0 : o.denom,
|
|
42233
42240
|
amount: e,
|
|
42234
42241
|
chainId: o == null ? void 0 : o.chainID
|
|
@@ -42317,8 +42324,8 @@ const cx = Xi((e) => {
|
|
|
42317
42324
|
Fo,
|
|
42318
42325
|
{
|
|
42319
42326
|
color: s ? p.error.text : void 0,
|
|
42320
|
-
onMouseEnter: () =>
|
|
42321
|
-
onMouseLeave: () =>
|
|
42327
|
+
onMouseEnter: () => d(!0),
|
|
42328
|
+
onMouseLeave: () => d(!1),
|
|
42322
42329
|
children: n && Gn(n)
|
|
42323
42330
|
}
|
|
42324
42331
|
),
|
|
@@ -42402,17 +42409,17 @@ const cx = Xi((e) => {
|
|
|
42402
42409
|
setSearchTerm: t,
|
|
42403
42410
|
onKeyDown: c
|
|
42404
42411
|
}) => {
|
|
42405
|
-
const a = xe(), r = e == null ? void 0 : e.assets[0], s = Ue(), l = On(), p = Oc(null),
|
|
42406
|
-
(
|
|
42407
|
-
const x =
|
|
42412
|
+
const a = xe(), r = e == null ? void 0 : e.assets[0], s = Ue(), l = On(), p = Oc(null), u = Pe(
|
|
42413
|
+
(d) => {
|
|
42414
|
+
const x = d.target.value;
|
|
42408
42415
|
t(x), n(x);
|
|
42409
42416
|
},
|
|
42410
42417
|
[n, t]
|
|
42411
42418
|
);
|
|
42412
42419
|
return De(() => {
|
|
42413
42420
|
l || s || setTimeout(() => {
|
|
42414
|
-
var
|
|
42415
|
-
(
|
|
42421
|
+
var d;
|
|
42422
|
+
(d = p.current) == null || d.focus();
|
|
42416
42423
|
}, 0);
|
|
42417
42424
|
}, [r, s, l]), /* @__PURE__ */ S(_x, { align: "center", gap: 5, children: [
|
|
42418
42425
|
r ? /* @__PURE__ */ S(Ce, { children: [
|
|
@@ -42431,7 +42438,7 @@ const cx = Xi((e) => {
|
|
|
42431
42438
|
type: "text",
|
|
42432
42439
|
placeholder: r ? "Search networks" : "Search for an asset",
|
|
42433
42440
|
value: o,
|
|
42434
|
-
onChange:
|
|
42441
|
+
onChange: u,
|
|
42435
42442
|
onKeyDown: c
|
|
42436
42443
|
}
|
|
42437
42444
|
),
|
|
@@ -42467,9 +42474,9 @@ const cx = Xi((e) => {
|
|
|
42467
42474
|
background: ${({ theme: e }) => e.primary.background.normal};
|
|
42468
42475
|
`, us = 65, ds = 5, eg = Xi(
|
|
42469
42476
|
(e) => {
|
|
42470
|
-
const n = Wc(), { onSelect: i, selectedAsset: o, selectChain: t, context: c } = e, { data: a, isLoading: r } = R(bn), { isLoading: s } = R(
|
|
42477
|
+
const n = Wc(), { onSelect: i, selectedAsset: o, selectChain: t, context: c } = e, { data: a, isLoading: r } = R(bn), { isLoading: s } = R(ze), l = r || s, [p, u] = le(!0), [d, x] = le(""), [C, k] = le(null), M = qm(us + ds), q = () => {
|
|
42471
42478
|
x("");
|
|
42472
|
-
}, g =
|
|
42479
|
+
}, g = Pe(
|
|
42473
42480
|
(b) => {
|
|
42474
42481
|
if (b) {
|
|
42475
42482
|
if (Vc(b)) {
|
|
@@ -42486,15 +42493,15 @@ const cx = Xi((e) => {
|
|
|
42486
42493
|
return E == null ? void 0 : E.find(
|
|
42487
42494
|
(w) => w.id === b.recommendedSymbol
|
|
42488
42495
|
);
|
|
42489
|
-
}, [C == null ? void 0 : C.assets, o, E]), T = Ix({ groupedAssetsByRecommendedSymbol: E, searchQuery:
|
|
42496
|
+
}, [C == null ? void 0 : C.assets, o, E]), T = Ix({ groupedAssetsByRecommendedSymbol: E, searchQuery: d }), j = Zm({ selectedGroup: H, searchQuery: d, context: c });
|
|
42490
42497
|
De(() => {
|
|
42491
|
-
!l && a &&
|
|
42498
|
+
!l && a && u(!1);
|
|
42492
42499
|
}, [l, a]), De(() => {
|
|
42493
42500
|
x("");
|
|
42494
42501
|
}, [n.visible]);
|
|
42495
42502
|
const z = (b) => {
|
|
42496
42503
|
x(b);
|
|
42497
|
-
}, h =
|
|
42504
|
+
}, h = Pe(
|
|
42498
42505
|
(b, w) => /* @__PURE__ */ m(
|
|
42499
42506
|
Tx,
|
|
42500
42507
|
{
|
|
@@ -42516,10 +42523,10 @@ const cx = Xi((e) => {
|
|
|
42516
42523
|
C === null ? ie.remove(ce.AssetAndChainSelectorModal) : k(null);
|
|
42517
42524
|
},
|
|
42518
42525
|
groupedAsset: C ?? H,
|
|
42519
|
-
searchTerm:
|
|
42526
|
+
searchTerm: d,
|
|
42520
42527
|
setSearchTerm: x,
|
|
42521
42528
|
onKeyDown: (b) => {
|
|
42522
|
-
b.key === "Backspace" && C !== null &&
|
|
42529
|
+
b.key === "Backspace" && C !== null && d === "" && k(null);
|
|
42523
42530
|
}
|
|
42524
42531
|
}
|
|
42525
42532
|
),
|
|
@@ -42549,9 +42556,9 @@ const cx = Xi((e) => {
|
|
|
42549
42556
|
var ce = /* @__PURE__ */ ((e) => (e.AssetAndChainSelectorModal = "AssetAndChainSelectorModal", e.ConnectedWalletModal = "ConnectedWalletModal", e.SetAddressModal = "SetAddressModal", e.SwapSettingsDrawer = "SwapSettingsDrawer", e.WalletSelectorModal = "WalletSelectorModal", e))(ce || {});
|
|
42550
42557
|
const og = () => {
|
|
42551
42558
|
var x, C, k;
|
|
42552
|
-
const [e, n] = de(Xn), { route: i } = R(We), o = i == null ? void 0 : i.requiredChainAddresses, { data: t } = R(
|
|
42559
|
+
const [e, n] = de(Xn), { route: i } = R(We), o = i == null ? void 0 : i.requiredChainAddresses, { data: t } = R(ze), c = R(vt);
|
|
42553
42560
|
de(A2);
|
|
42554
|
-
const { createCosmosWallets: a } = Pm(), { createEvmWallets: r } = zm(), { createSolanaWallets: s } = Sm(), l = R(Et), p = On(),
|
|
42561
|
+
const { createCosmosWallets: a } = Pm(), { createEvmWallets: r } = zm(), { createSolanaWallets: s } = Sm(), l = R(Et), p = On(), u = U(() => i != null && i.operations ? Zi(i.operations).filter((g) => g.signRequired).map((g) => g.fromChainID) : void 0, [i == null ? void 0 : i.operations]);
|
|
42555
42562
|
De(() => {
|
|
42556
42563
|
var q;
|
|
42557
42564
|
const M = {};
|
|
@@ -42564,14 +42571,14 @@ const og = () => {
|
|
|
42564
42571
|
};
|
|
42565
42572
|
}), n(M));
|
|
42566
42573
|
}, []);
|
|
42567
|
-
const
|
|
42574
|
+
const d = Pe(
|
|
42568
42575
|
async (M) => {
|
|
42569
42576
|
o && o.forEach(async (q, g) => {
|
|
42570
42577
|
var j, z, h, D;
|
|
42571
42578
|
const E = t == null ? void 0 : t.find((f) => f.chainID === q);
|
|
42572
42579
|
if (!E)
|
|
42573
42580
|
return;
|
|
42574
|
-
const H =
|
|
42581
|
+
const H = u == null ? void 0 : u.includes(q);
|
|
42575
42582
|
if (l != null && l[q]) {
|
|
42576
42583
|
n((f) => {
|
|
42577
42584
|
var A;
|
|
@@ -42731,7 +42738,7 @@ const og = () => {
|
|
|
42731
42738
|
[
|
|
42732
42739
|
o,
|
|
42733
42740
|
t,
|
|
42734
|
-
|
|
42741
|
+
u,
|
|
42735
42742
|
l,
|
|
42736
42743
|
e,
|
|
42737
42744
|
n,
|
|
@@ -42751,7 +42758,7 @@ const og = () => {
|
|
|
42751
42758
|
requiredChainAddresses: o,
|
|
42752
42759
|
chains: t,
|
|
42753
42760
|
sourceWallet: c,
|
|
42754
|
-
signRequiredChains:
|
|
42761
|
+
signRequiredChains: u,
|
|
42755
42762
|
chainAddresses: e,
|
|
42756
42763
|
connectedAddress: l
|
|
42757
42764
|
}
|
|
@@ -42759,13 +42766,13 @@ const og = () => {
|
|
|
42759
42766
|
enabled: !!o && !!t && (!!c.cosmos || !!c.evm || !!c.svm || !!l),
|
|
42760
42767
|
queryFn: async () => {
|
|
42761
42768
|
if (o)
|
|
42762
|
-
return await
|
|
42769
|
+
return await d(), null;
|
|
42763
42770
|
},
|
|
42764
42771
|
refetchOnWindowFocus: !1,
|
|
42765
42772
|
refetchOnReconnect: !1
|
|
42766
|
-
}), { connectRequiredChains:
|
|
42773
|
+
}), { connectRequiredChains: d };
|
|
42767
42774
|
}, tg = (e) => {
|
|
42768
|
-
const { route: n, transactionDetailsArray: i } = R(We), o = X(je), t = X($n), [c, a] =
|
|
42775
|
+
const { route: n, transactionDetailsArray: i } = R(We), o = X(je), t = X($n), [c, a] = le();
|
|
42769
42776
|
De(() => {
|
|
42770
42777
|
if (!(!(n != null && n.estimatedRouteDurationSeconds) || !(n != null && n.txsRequired))) {
|
|
42771
42778
|
if (e === Ae.pending && c === void 0 && n.txsRequired === i.length) {
|
|
@@ -42800,7 +42807,7 @@ const og = () => {
|
|
|
42800
42807
|
statusData: e,
|
|
42801
42808
|
historyIndex: n
|
|
42802
42809
|
}) => {
|
|
42803
|
-
const i = e == null ? void 0 : e.transferEvents, o = X($n), { route: t, transactionDetailsArray: c, overallStatus: a, transactionHistoryIndex: r } = R(We), s = X(mm), { isPending: l } = R(dm), p = U(() => t != null && t.operations ? Zi(t.operations) : [], [t == null ? void 0 : t.operations]),
|
|
42810
|
+
const i = e == null ? void 0 : e.transferEvents, o = X($n), { route: t, transactionDetailsArray: c, overallStatus: a, transactionHistoryIndex: r } = R(We), s = X(mm), { isPending: l } = R(dm), p = U(() => t != null && t.operations ? Zi(t.operations) : [], [t == null ? void 0 : t.operations]), u = U(() => {
|
|
42804
42811
|
if (!(!(t != null && t.operations) || !(t != null && t.txsRequired))) {
|
|
42805
42812
|
if ((e == null ? void 0 : e.lastTxStatus) === "pending")
|
|
42806
42813
|
return l && o("pending"), "pending";
|
|
@@ -42813,9 +42820,9 @@ const og = () => {
|
|
|
42813
42820
|
return "completed";
|
|
42814
42821
|
if (!e.isSuccess && e.isSettled)
|
|
42815
42822
|
return "failed";
|
|
42816
|
-
if (i != null && i.find(({ status:
|
|
42823
|
+
if (i != null && i.find(({ status: d }) => d === "pending"))
|
|
42817
42824
|
return "pending";
|
|
42818
|
-
if (i != null && i.every(({ status:
|
|
42825
|
+
if (i != null && i.every(({ status: d }) => d === "unconfirmed"))
|
|
42819
42826
|
return "unconfirmed";
|
|
42820
42827
|
}
|
|
42821
42828
|
}
|
|
@@ -42831,13 +42838,13 @@ const og = () => {
|
|
|
42831
42838
|
a
|
|
42832
42839
|
]);
|
|
42833
42840
|
De(() => {
|
|
42834
|
-
|
|
42835
|
-
status:
|
|
42836
|
-
}), n || o(
|
|
42841
|
+
u && (s(n ?? r, {
|
|
42842
|
+
status: u
|
|
42843
|
+
}), n || o(u));
|
|
42837
42844
|
}, [
|
|
42838
42845
|
p,
|
|
42839
42846
|
a,
|
|
42840
|
-
|
|
42847
|
+
u,
|
|
42841
42848
|
o,
|
|
42842
42849
|
c.length,
|
|
42843
42850
|
s,
|
|
@@ -42859,8 +42866,8 @@ function ag({
|
|
|
42859
42866
|
if (!c) return Ae.destinationAddressUnset;
|
|
42860
42867
|
const a = c.every(
|
|
42861
42868
|
(l, p) => {
|
|
42862
|
-
var
|
|
42863
|
-
return (
|
|
42869
|
+
var u;
|
|
42870
|
+
return (u = e[p]) == null ? void 0 : u.address;
|
|
42864
42871
|
}
|
|
42865
42872
|
), r = (s = e[c.length - 1]) == null ? void 0 : s.address;
|
|
42866
42873
|
return i === "completed" ? Ae.confirmed : i === "pending" ? t > 0 ? Ae.signaturesRemaining : Ae.pending : i === "approving" ? Ae.approving : o && o.status !== "completed" ? Ae.validatingGasBalance : i === "signing" ? Ae.waitingForSigning : r ? a ? Ae.ready : Ae.recoveryAddressUnset : Ae.destinationAddressUnset;
|
|
@@ -42873,7 +42880,7 @@ function ag({
|
|
|
42873
42880
|
]);
|
|
42874
42881
|
}
|
|
42875
42882
|
const rg = () => {
|
|
42876
|
-
const [e, n] =
|
|
42883
|
+
const [e, n] = le(!1), i = xe();
|
|
42877
42884
|
return /* @__PURE__ */ S(L, { children: [
|
|
42878
42885
|
/* @__PURE__ */ m(
|
|
42879
42886
|
Yl,
|
|
@@ -42925,16 +42932,16 @@ const rg = () => {
|
|
|
42925
42932
|
label: "Set destination address",
|
|
42926
42933
|
icon: Z.rightArrow,
|
|
42927
42934
|
onClick: () => {
|
|
42928
|
-
const
|
|
42929
|
-
|
|
42935
|
+
const u = n == null ? void 0 : n.destAssetChainID;
|
|
42936
|
+
u && ie.show(ce.SetAddressModal, {
|
|
42930
42937
|
signRequired: o.signRequired,
|
|
42931
|
-
chainId:
|
|
42938
|
+
chainId: u
|
|
42932
42939
|
});
|
|
42933
42940
|
}
|
|
42934
42941
|
}
|
|
42935
42942
|
);
|
|
42936
42943
|
case Ae.ready: {
|
|
42937
|
-
const
|
|
42944
|
+
const u = () => {
|
|
42938
42945
|
if (n != null && n.txsRequired && n.txsRequired > 1) {
|
|
42939
42946
|
r({
|
|
42940
42947
|
errorType: Fe.AdditionalSigningRequired,
|
|
@@ -42945,7 +42952,7 @@ const rg = () => {
|
|
|
42945
42952
|
}
|
|
42946
42953
|
c();
|
|
42947
42954
|
};
|
|
42948
|
-
return /* @__PURE__ */ m(ge, { label: "Confirm", icon: Z.rightArrow, onClick:
|
|
42955
|
+
return /* @__PURE__ */ m(ge, { label: "Confirm", icon: Z.rightArrow, onClick: u });
|
|
42949
42956
|
}
|
|
42950
42957
|
case Ae.validatingGasBalance:
|
|
42951
42958
|
return /* @__PURE__ */ m(ge, { label: "Validating", icon: Z.rightArrow, loading: !0 });
|
|
@@ -43006,40 +43013,40 @@ const rg = () => {
|
|
|
43006
43013
|
};
|
|
43007
43014
|
var Ae = /* @__PURE__ */ ((e) => (e[e.recoveryAddressUnset = 0] = "recoveryAddressUnset", e[e.destinationAddressUnset = 1] = "destinationAddressUnset", e[e.ready = 2] = "ready", e[e.pending = 3] = "pending", e[e.waitingForSigning = 4] = "waitingForSigning", e[e.signaturesRemaining = 5] = "signaturesRemaining", e[e.confirmed = 6] = "confirmed", e[e.validatingGasBalance = 7] = "validatingGasBalance", e[e.approving = 8] = "approving", e))(Ae || {});
|
|
43008
43015
|
const pg = () => {
|
|
43009
|
-
const e = X(An), { route: n, overallStatus: i, transactionDetailsArray: o, isValidatingGasBalance: t } = R(We), c = R(Xn), { connectRequiredChains: a } = og(), [r, s] =
|
|
43016
|
+
const e = X(An), { route: n, overallStatus: i, transactionDetailsArray: o, isValidatingGasBalance: t } = R(We), c = R(Xn), { connectRequiredChains: a } = og(), [r, s] = le(!0), { mutate: l } = R(dm), p = (n == null ? void 0 : n.txsRequired) && n.txsRequired > 1, u = p ? n.txsRequired - ((o == null ? void 0 : o.length) ?? 0) : 0, { data: d } = ga({
|
|
43010
43017
|
txsRequired: n == null ? void 0 : n.txsRequired,
|
|
43011
43018
|
txs: o
|
|
43012
43019
|
});
|
|
43013
43020
|
cg({
|
|
43014
|
-
statusData:
|
|
43021
|
+
statusData: d
|
|
43015
43022
|
});
|
|
43016
43023
|
const x = U(() => n != null && n.operations ? Zi(n.operations) : [], [n == null ? void 0 : n.operations]), C = x[x.length - 1], k = ag({
|
|
43017
43024
|
chainAddresses: c,
|
|
43018
43025
|
route: n,
|
|
43019
43026
|
overallStatus: i,
|
|
43020
43027
|
isValidatingGasBalance: t,
|
|
43021
|
-
signaturesRemaining:
|
|
43028
|
+
signaturesRemaining: u
|
|
43022
43029
|
});
|
|
43023
|
-
mg((
|
|
43030
|
+
mg((d == null ? void 0 : d.isSettled) && !(d != null && d.isSuccess)), tg(k);
|
|
43024
43031
|
const M = U(() => {
|
|
43025
|
-
if (p &&
|
|
43032
|
+
if (p && u)
|
|
43026
43033
|
return /* @__PURE__ */ S(fm, { gap: 5, align: "center", children: [
|
|
43027
43034
|
/* @__PURE__ */ m(ha, {}),
|
|
43028
|
-
|
|
43035
|
+
u,
|
|
43029
43036
|
" ",
|
|
43030
|
-
Ci("Signature",
|
|
43037
|
+
Ci("Signature", u),
|
|
43031
43038
|
" still required"
|
|
43032
43039
|
] });
|
|
43033
|
-
}, [
|
|
43040
|
+
}, [u, p]), q = U(() => {
|
|
43034
43041
|
var T;
|
|
43035
|
-
const H =
|
|
43042
|
+
const H = d == null ? void 0 : d.transferEvents;
|
|
43036
43043
|
if (k === 6)
|
|
43037
43044
|
return "completed";
|
|
43038
43045
|
if ((T = H == null ? void 0 : H[0]) != null && T.status)
|
|
43039
43046
|
return H[0].status;
|
|
43040
43047
|
if (k === 3 || k === 5)
|
|
43041
43048
|
return "pending";
|
|
43042
|
-
}, [
|
|
43049
|
+
}, [d, k]), g = U(() => {
|
|
43043
43050
|
if (![
|
|
43044
43051
|
3,
|
|
43045
43052
|
4,
|
|
@@ -43075,7 +43082,7 @@ const pg = () => {
|
|
|
43075
43082
|
{
|
|
43076
43083
|
onClickEditDestinationWallet: g,
|
|
43077
43084
|
operations: x,
|
|
43078
|
-
statusData:
|
|
43085
|
+
statusData: d,
|
|
43079
43086
|
swapExecutionState: k,
|
|
43080
43087
|
firstOperationStatus: q
|
|
43081
43088
|
}
|
|
@@ -43085,7 +43092,7 @@ const pg = () => {
|
|
|
43085
43092
|
{
|
|
43086
43093
|
swapExecutionState: k,
|
|
43087
43094
|
route: n,
|
|
43088
|
-
signaturesRemaining:
|
|
43095
|
+
signaturesRemaining: u,
|
|
43089
43096
|
lastOperation: C,
|
|
43090
43097
|
connectRequiredChains: a,
|
|
43091
43098
|
submitExecuteRouteMutation: l
|
|
@@ -43123,7 +43130,7 @@ const pg = () => {
|
|
|
43123
43130
|
)
|
|
43124
43131
|
}
|
|
43125
43132
|
), ug = () => {
|
|
43126
|
-
const e = xe(), n = Ue(), [i, o] =
|
|
43133
|
+
const e = xe(), n = Ue(), [i, o] = le(!1), t = X(a2);
|
|
43127
43134
|
return /* @__PURE__ */ S(
|
|
43128
43135
|
nn,
|
|
43129
43136
|
{
|
|
@@ -43215,18 +43222,18 @@ const Qm = () => {
|
|
|
43215
43222
|
data: U(() => {
|
|
43216
43223
|
var C, k, M, q, g, E, H, T;
|
|
43217
43224
|
if (!e || !i || !o) return;
|
|
43218
|
-
const { chainID: p, denom:
|
|
43219
|
-
if (!
|
|
43220
|
-
const
|
|
43225
|
+
const { chainID: p, denom: u } = e;
|
|
43226
|
+
if (!u || !p) return;
|
|
43227
|
+
const d = !!((k = (C = o == null ? void 0 : o.chains) == null ? void 0 : C[p]) != null && k.denoms), x = (g = (q = (M = o == null ? void 0 : o.chains) == null ? void 0 : M[p]) == null ? void 0 : q.denoms) == null ? void 0 : g[u];
|
|
43221
43228
|
return e.isCW20 ? {
|
|
43222
43229
|
...r.data,
|
|
43223
43230
|
error: r.error || void 0
|
|
43224
|
-
} :
|
|
43231
|
+
} : d && x === void 0 ? {
|
|
43225
43232
|
amount: 0,
|
|
43226
43233
|
formattedAmount: "0",
|
|
43227
43234
|
error: void 0,
|
|
43228
43235
|
decimals: void 0
|
|
43229
|
-
} : (T = (H = (E = o == null ? void 0 : o.chains) == null ? void 0 : E[p]) == null ? void 0 : H.denoms) == null ? void 0 : T[
|
|
43236
|
+
} : (T = (H = (E = o == null ? void 0 : o.chains) == null ? void 0 : E[p]) == null ? void 0 : H.denoms) == null ? void 0 : T[u];
|
|
43230
43237
|
}, [e, i, o, r.data, r.error]),
|
|
43231
43238
|
isLoading: !t || c || s,
|
|
43232
43239
|
refetch: () => {
|
|
@@ -43234,7 +43241,7 @@ const Qm = () => {
|
|
|
43234
43241
|
}
|
|
43235
43242
|
};
|
|
43236
43243
|
}, _m = (e) => {
|
|
43237
|
-
const n = Ht(), { data: i } = R(
|
|
43244
|
+
const n = Ht(), { data: i } = R(ze), { data: o } = R(ra);
|
|
43238
43245
|
return U(() => {
|
|
43239
43246
|
var a;
|
|
43240
43247
|
if (!e) return;
|
|
@@ -43250,7 +43257,7 @@ const Qm = () => {
|
|
|
43250
43257
|
return new nh(eh.fromUserInput(we(k).toFixed(), 18), r.denom);
|
|
43251
43258
|
})();
|
|
43252
43259
|
if (!l) return;
|
|
43253
|
-
const p = o == null ? void 0 : o.map((k) => k.chainID).includes(e),
|
|
43260
|
+
const p = o == null ? void 0 : o.map((k) => k.chainID).includes(e), u = Math.ceil(p ? so.SWAP : so.DEFAULT), x = ih(u, l).amount[0].amount;
|
|
43254
43261
|
return {
|
|
43255
43262
|
feeAmount: x,
|
|
43256
43263
|
denom: r.denom,
|
|
@@ -43271,12 +43278,12 @@ const Qm = () => {
|
|
|
43271
43278
|
);
|
|
43272
43279
|
return !(e != null && e.amount ? we(a).isGreaterThanOrEqualTo(we(e == null ? void 0 : e.amount)) : !1);
|
|
43273
43280
|
}, fg = () => {
|
|
43274
|
-
var c, a, r, s, l, p,
|
|
43281
|
+
var c, a, r, s, l, p, u;
|
|
43275
43282
|
const [e] = de(Ee), n = en({
|
|
43276
43283
|
assetDenom: e == null ? void 0 : e.denom,
|
|
43277
43284
|
amount: e == null ? void 0 : e.amount,
|
|
43278
43285
|
chainId: e == null ? void 0 : e.chainID
|
|
43279
|
-
}), i = _m(e == null ? void 0 : e.chainID), o = i == null ? void 0 : i.find((
|
|
43286
|
+
}), i = _m(e == null ? void 0 : e.chainID), o = i == null ? void 0 : i.find((d) => d == null ? void 0 : d.isSufficient);
|
|
43280
43287
|
switch ((c = n == null ? void 0 : n.chain) == null ? void 0 : c.chainType) {
|
|
43281
43288
|
case V.EVM: {
|
|
43282
43289
|
if (((a = e == null ? void 0 : e.denom) == null ? void 0 : a.includes("-native")) && (e == null ? void 0 : e.originChainID) === (e == null ? void 0 : e.chainID))
|
|
@@ -43299,7 +43306,7 @@ const Qm = () => {
|
|
|
43299
43306
|
);
|
|
43300
43307
|
default:
|
|
43301
43308
|
return Number(
|
|
43302
|
-
Hn(8e-4, (
|
|
43309
|
+
Hn(8e-4, (u = n.asset) == null ? void 0 : u.decimals)
|
|
43303
43310
|
);
|
|
43304
43311
|
}
|
|
43305
43312
|
return 0;
|
|
@@ -43326,7 +43333,7 @@ const Qm = () => {
|
|
|
43326
43333
|
e && n(e);
|
|
43327
43334
|
};
|
|
43328
43335
|
}, Ag = () => {
|
|
43329
|
-
const e = Tt(), [n] = de(Ee), [{ data: i }] = de(
|
|
43336
|
+
const e = Tt(), [n] = de(Ee), [{ data: i }] = de(ze), o = gg();
|
|
43330
43337
|
if (!(n != null && n.amount)) return !1;
|
|
43331
43338
|
if (!e) return !0;
|
|
43332
43339
|
const t = i == null ? void 0 : i.find((c) => c.chainID === (n == null ? void 0 : n.chainID));
|
|
@@ -43347,9 +43354,9 @@ const Qm = () => {
|
|
|
43347
43354
|
amount: e == null ? void 0 : e.amount,
|
|
43348
43355
|
chainId: e == null ? void 0 : e.chainID
|
|
43349
43356
|
}), { data: t, isLoading: c } = Qm(), a = bg(), r = Tt(), s = U(() => {
|
|
43350
|
-
var
|
|
43357
|
+
var u;
|
|
43351
43358
|
const l = o != null && o.symbol ? ` ${o == null ? void 0 : o.symbol}` : "";
|
|
43352
|
-
return (
|
|
43359
|
+
return (u = t == null ? void 0 : t.error) != null && u.message ? "--" : t === void 0 ? void 0 : Do(
|
|
43353
43360
|
ji(t == null ? void 0 : t.formattedAmount)
|
|
43354
43361
|
) + l;
|
|
43355
43362
|
}, [t, o == null ? void 0 : o.symbol]);
|
|
@@ -43415,11 +43422,11 @@ const Qm = () => {
|
|
|
43415
43422
|
}
|
|
43416
43423
|
) : null;
|
|
43417
43424
|
}, wg = () => {
|
|
43418
|
-
const e = Zn(), { data: n } = R(bn), i = X(Km), { data: o } = R(
|
|
43425
|
+
const e = Zn(), { data: n } = R(bn), i = X(Km), { data: o } = R(ze), t = R(Et), c = U(() => {
|
|
43419
43426
|
if (!t) return;
|
|
43420
43427
|
const l = Object.keys(t).find((p) => {
|
|
43421
|
-
const
|
|
43422
|
-
return (
|
|
43428
|
+
const u = o == null ? void 0 : o.find((d) => d.chainID === p);
|
|
43429
|
+
return (u == null ? void 0 : u.chainType) === V.EVM;
|
|
43423
43430
|
});
|
|
43424
43431
|
return l && (t == null ? void 0 : t[l]);
|
|
43425
43432
|
}, [t, o]), { chainId: a } = Dt(), r = U(() => !n || !o ? {} : n.reduce(
|
|
@@ -43427,8 +43434,8 @@ const Qm = () => {
|
|
|
43427
43434
|
var x, C;
|
|
43428
43435
|
const p = o.find((k) => k.chainID === l.chainID);
|
|
43429
43436
|
if (!p) return s;
|
|
43430
|
-
const
|
|
43431
|
-
return
|
|
43437
|
+
const u = c ?? ((x = e(String(a))) == null ? void 0 : x.address), d = p.chainType === V.EVM ? u : (C = e(l.chainID)) == null ? void 0 : C.address;
|
|
43438
|
+
return d && !s[l.chainID] && (s[l.chainID] = { address: d }), s;
|
|
43432
43439
|
},
|
|
43433
43440
|
{}
|
|
43434
43441
|
), [n, e, o, c, a]);
|
|
@@ -43476,7 +43483,7 @@ const Qm = () => {
|
|
|
43476
43483
|
}, [e.data, i, t, n, o, c]);
|
|
43477
43484
|
}, Eg = () => {
|
|
43478
43485
|
var t;
|
|
43479
|
-
const { data: e } = R(
|
|
43486
|
+
const { data: e } = R(ze), n = R(Ee), i = (t = e == null ? void 0 : e.find((c) => c.chainID === (n == null ? void 0 : n.chainID))) == null ? void 0 : t.chainType, o = Zn();
|
|
43480
43487
|
return U(() => {
|
|
43481
43488
|
if (i !== V.Cosmos) return !1;
|
|
43482
43489
|
const c = o(n == null ? void 0 : n.chainID);
|
|
@@ -43484,12 +43491,12 @@ const Qm = () => {
|
|
|
43484
43491
|
}, [n == null ? void 0 : n.chainID, i, o]);
|
|
43485
43492
|
}, Fg = () => {
|
|
43486
43493
|
var Y;
|
|
43487
|
-
const [e, n] =
|
|
43494
|
+
const [e, n] = le(), [i, o] = le(!1), { data: t } = R(ze), [c, a] = de(Ee), r = X(Bo), s = X(zt), [l] = de(c2), [p, u] = de(mn), [d] = de(Wn), [{ data: x }] = de(bn), C = X(An), k = Ag(), M = X(f2), q = X(je), { isLoading: g } = R(Ea), { data: E, isError: H, error: T } = R(Yi), j = Eg(), z = X(Xn);
|
|
43488
43495
|
wg(), yg(), vg();
|
|
43489
43496
|
const h = Zn(), D = h(c == null ? void 0 : c.chainID), f = R(Un), A = k2(E), { chainId: b, connector: w } = Dt(), B = U(() => {
|
|
43490
43497
|
var K;
|
|
43491
43498
|
return b ? (K = h(String(b))) == null ? void 0 : K.address : void 0;
|
|
43492
|
-
}, [b, h]), y =
|
|
43499
|
+
}, [b, h]), y = Pe(
|
|
43493
43500
|
(K, ae) => {
|
|
43494
43501
|
if (!(!K || !ae) && x)
|
|
43495
43502
|
return x.find(
|
|
@@ -43497,15 +43504,15 @@ const Qm = () => {
|
|
|
43497
43504
|
);
|
|
43498
43505
|
},
|
|
43499
43506
|
[x]
|
|
43500
|
-
), F =
|
|
43507
|
+
), F = Pe(() => {
|
|
43501
43508
|
ie.show(ce.AssetAndChainSelectorModal, {
|
|
43502
43509
|
context: "source",
|
|
43503
43510
|
onSelect: (K) => {
|
|
43504
43511
|
var J, ee;
|
|
43505
|
-
((J = t == null ? void 0 : t.find((
|
|
43512
|
+
((J = t == null ? void 0 : t.find((me) => me.chainID === (K == null ? void 0 : K.chainID))) == null ? void 0 : J.chainType) === "evm" && B && K && K.chainID !== String(b) && w && ((ee = w.switchChain) == null || ee.call(w, {
|
|
43506
43513
|
chainId: Number(K.chainID)
|
|
43507
|
-
})), a((
|
|
43508
|
-
...
|
|
43514
|
+
})), a((me) => ({
|
|
43515
|
+
...me,
|
|
43509
43516
|
...K
|
|
43510
43517
|
})), r(""), s(""), ie.hide(ce.AssetAndChainSelectorModal);
|
|
43511
43518
|
}
|
|
@@ -43518,15 +43525,15 @@ const Qm = () => {
|
|
|
43518
43525
|
s,
|
|
43519
43526
|
a,
|
|
43520
43527
|
r
|
|
43521
|
-
]), v =
|
|
43528
|
+
]), v = Pe(() => {
|
|
43522
43529
|
ie.show(ce.AssetAndChainSelectorModal, {
|
|
43523
43530
|
context: "source",
|
|
43524
43531
|
onSelect: (K) => {
|
|
43525
43532
|
var J, ee;
|
|
43526
|
-
((J = t == null ? void 0 : t.find((
|
|
43533
|
+
((J = t == null ? void 0 : t.find((me) => me.chainID === (K == null ? void 0 : K.chainID))) == null ? void 0 : J.chainType) === "evm" && B && K && K.chainID !== String(b) && w && ((ee = w.switchChain) == null || ee.call(w, {
|
|
43527
43534
|
chainId: Number(K.chainID)
|
|
43528
|
-
})), a((
|
|
43529
|
-
...
|
|
43535
|
+
})), a((me) => ({
|
|
43536
|
+
...me,
|
|
43530
43537
|
...K
|
|
43531
43538
|
})), ie.hide(ce.AssetAndChainSelectorModal);
|
|
43532
43539
|
},
|
|
@@ -43542,21 +43549,21 @@ const Qm = () => {
|
|
|
43542
43549
|
a,
|
|
43543
43550
|
c == null ? void 0 : c.chainID,
|
|
43544
43551
|
c == null ? void 0 : c.denom
|
|
43545
|
-
]), P =
|
|
43552
|
+
]), P = Pe(() => {
|
|
43546
43553
|
ie.show(ce.AssetAndChainSelectorModal, {
|
|
43547
43554
|
context: "destination",
|
|
43548
43555
|
onSelect: (K) => {
|
|
43549
|
-
|
|
43556
|
+
u((ae) => ({
|
|
43550
43557
|
...ae,
|
|
43551
43558
|
...K
|
|
43552
43559
|
})), ie.hide(ce.AssetAndChainSelectorModal);
|
|
43553
43560
|
}
|
|
43554
43561
|
});
|
|
43555
|
-
}, [
|
|
43562
|
+
}, [u]), I = Pe(() => {
|
|
43556
43563
|
ie.show(ce.AssetAndChainSelectorModal, {
|
|
43557
43564
|
context: "destination",
|
|
43558
43565
|
onSelect: (K) => {
|
|
43559
|
-
|
|
43566
|
+
u((ae) => ({
|
|
43560
43567
|
...ae,
|
|
43561
43568
|
...K
|
|
43562
43569
|
})), ie.hide(ce.AssetAndChainSelectorModal);
|
|
@@ -43564,7 +43571,7 @@ const Qm = () => {
|
|
|
43564
43571
|
selectedAsset: y(p == null ? void 0 : p.denom, p == null ? void 0 : p.chainID),
|
|
43565
43572
|
selectChain: !0
|
|
43566
43573
|
});
|
|
43567
|
-
}, [p == null ? void 0 : p.chainID, p == null ? void 0 : p.denom, y,
|
|
43574
|
+
}, [p == null ? void 0 : p.chainID, p == null ? void 0 : p.denom, y, u]), O = U(() => D != null && D.address ? c != null && c.chainID ? p != null && p.chainID ? !(c != null && c.amount) && !(p != null && p.amount) ? /* @__PURE__ */ m(ge, { label: "Please enter a valid amount", icon: Z.swap, disabled: !0 }) : l ? /* @__PURE__ */ m(ge, { label: "Finding best route", loading: !0 }) : H ? /* @__PURE__ */ m(
|
|
43568
43575
|
ge,
|
|
43569
43576
|
{
|
|
43570
43577
|
label: (T == null ? void 0 : T.message) ?? "No routes found",
|
|
@@ -43664,7 +43671,7 @@ const Qm = () => {
|
|
|
43664
43671
|
selectedAsset: c,
|
|
43665
43672
|
handleChangeAsset: F,
|
|
43666
43673
|
handleChangeChain: v,
|
|
43667
|
-
isWaitingToUpdateInputValue:
|
|
43674
|
+
isWaitingToUpdateInputValue: d === "swap-out" && l,
|
|
43668
43675
|
value: c == null ? void 0 : c.amount,
|
|
43669
43676
|
usdValue: E == null ? void 0 : E.usdAmountIn,
|
|
43670
43677
|
onChangeValue: r,
|
|
@@ -43678,7 +43685,7 @@ const Qm = () => {
|
|
|
43678
43685
|
selectedAsset: p,
|
|
43679
43686
|
handleChangeAsset: P,
|
|
43680
43687
|
handleChangeChain: I,
|
|
43681
|
-
isWaitingToUpdateInputValue:
|
|
43688
|
+
isWaitingToUpdateInputValue: d === "swap-in" && l,
|
|
43682
43689
|
usdValue: E == null ? void 0 : E.usdAmountOut,
|
|
43683
43690
|
value: p == null ? void 0 : p.amount,
|
|
43684
43691
|
priceChangePercentage: Number(G),
|
|
@@ -43759,14 +43766,14 @@ const Qm = () => {
|
|
|
43759
43766
|
transactionDetails: t,
|
|
43760
43767
|
onClickDelete: c
|
|
43761
43768
|
}) => {
|
|
43762
|
-
var l, p,
|
|
43769
|
+
var l, p, u;
|
|
43763
43770
|
const a = xe(), r = U(() => {
|
|
43764
43771
|
if (e === "failed" || e === "incomplete")
|
|
43765
43772
|
return a.error.text;
|
|
43766
43773
|
if (e === "completed")
|
|
43767
43774
|
return a.success.text;
|
|
43768
|
-
}, [e, a]), s = (
|
|
43769
|
-
x || Pt(
|
|
43775
|
+
}, [e, a]), s = (d, x) => {
|
|
43776
|
+
x || Pt(d);
|
|
43770
43777
|
};
|
|
43771
43778
|
return /* @__PURE__ */ S(he, { padding: 20, gap: 10, style: { paddingTop: 10 }, children: [
|
|
43772
43779
|
/* @__PURE__ */ S(Lo, { align: "center", children: [
|
|
@@ -43793,9 +43800,9 @@ const Qm = () => {
|
|
|
43793
43800
|
st,
|
|
43794
43801
|
{
|
|
43795
43802
|
onClick: () => {
|
|
43796
|
-
var
|
|
43803
|
+
var d, x;
|
|
43797
43804
|
return s(
|
|
43798
|
-
(
|
|
43805
|
+
(d = t == null ? void 0 : t[0]) == null ? void 0 : d.txHash,
|
|
43799
43806
|
(x = t == null ? void 0 : t[0]) == null ? void 0 : x.explorerLink
|
|
43800
43807
|
);
|
|
43801
43808
|
},
|
|
@@ -43804,32 +43811,32 @@ const Qm = () => {
|
|
|
43804
43811
|
target: "_blank",
|
|
43805
43812
|
gap: 5,
|
|
43806
43813
|
children: [
|
|
43807
|
-
/* @__PURE__ */ m(W, { normalTextColor: !0, children: qi((
|
|
43814
|
+
/* @__PURE__ */ m(W, { normalTextColor: !0, children: qi((u = t == null ? void 0 : t[0]) == null ? void 0 : u.txHash) }),
|
|
43808
43815
|
/* @__PURE__ */ m(W, { children: /* @__PURE__ */ m(Fn, {}) })
|
|
43809
43816
|
]
|
|
43810
43817
|
}
|
|
43811
43818
|
)
|
|
43812
|
-
] }) : t.map((
|
|
43813
|
-
/* @__PURE__ */ m(Vo, { children: x === 0 ? "Initial transaction" : x === t.length - 1 ? "Final transaction" : "Transaction" }, `${x}-${
|
|
43819
|
+
] }) : t.map((d, x) => /* @__PURE__ */ S(Lo, { align: "center", children: [
|
|
43820
|
+
/* @__PURE__ */ m(Vo, { children: x === 0 ? "Initial transaction" : x === t.length - 1 ? "Final transaction" : "Transaction" }, `${x}-${d.txHash}`),
|
|
43814
43821
|
/* @__PURE__ */ S(
|
|
43815
43822
|
st,
|
|
43816
43823
|
{
|
|
43817
43824
|
onClick: () => s(
|
|
43818
|
-
|
|
43819
|
-
|
|
43825
|
+
d.txHash,
|
|
43826
|
+
d.explorerLink
|
|
43820
43827
|
),
|
|
43821
|
-
href:
|
|
43822
|
-
title:
|
|
43828
|
+
href: d.explorerLink,
|
|
43829
|
+
title: d == null ? void 0 : d.txHash,
|
|
43823
43830
|
target: "_blank",
|
|
43824
43831
|
gap: 5,
|
|
43825
43832
|
children: [
|
|
43826
|
-
/* @__PURE__ */ m(W, { normalTextColor: !0, children: qi(
|
|
43833
|
+
/* @__PURE__ */ m(W, { normalTextColor: !0, children: qi(d.txHash) }),
|
|
43827
43834
|
/* @__PURE__ */ m(W, { children: /* @__PURE__ */ m(Fn, {}) })
|
|
43828
43835
|
]
|
|
43829
43836
|
},
|
|
43830
|
-
`${x}-${
|
|
43837
|
+
`${x}-${d.txHash}`
|
|
43831
43838
|
)
|
|
43832
|
-
] }, `${x}-${
|
|
43839
|
+
] }, `${x}-${d.txHash}`)),
|
|
43833
43840
|
/* @__PURE__ */ m(L, { align: "center", style: { marginTop: 10 }, children: /* @__PURE__ */ S(nn, { onClick: c, gap: 5, align: "center", children: [
|
|
43834
43841
|
/* @__PURE__ */ m(W, { color: a.error.text, children: "Delete" }),
|
|
43835
43842
|
/* @__PURE__ */ m(Bg, { color: a.error.text })
|
|
@@ -44121,10 +44128,10 @@ function oo(e) {
|
|
|
44121
44128
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = i.width, t = o && e.matchPatterns[o] || e.matchPatterns[e.defaultMatchWidth], c = n.match(t);
|
|
44122
44129
|
if (!c)
|
|
44123
44130
|
return null;
|
|
44124
|
-
var a = c[0], r = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth], s = Array.isArray(r) ? Qg(r, function(
|
|
44125
|
-
return
|
|
44126
|
-
}) : Jg(r, function(
|
|
44127
|
-
return
|
|
44131
|
+
var a = c[0], r = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth], s = Array.isArray(r) ? Qg(r, function(u) {
|
|
44132
|
+
return u.test(a);
|
|
44133
|
+
}) : Jg(r, function(u) {
|
|
44134
|
+
return u.test(a);
|
|
44128
44135
|
}), l;
|
|
44129
44136
|
l = e.valueCallback ? e.valueCallback(s) : s, l = i.valueCallback ? i.valueCallback(l) : l;
|
|
44130
44137
|
var p = n.slice(a.length);
|
|
@@ -44276,18 +44283,18 @@ function d3(e, n, i) {
|
|
|
44276
44283
|
var l = ep(u3(i), {
|
|
44277
44284
|
addSuffix: !!(i != null && i.addSuffix),
|
|
44278
44285
|
comparison: s
|
|
44279
|
-
}), p,
|
|
44280
|
-
s > 0 ? (p = Ai(n),
|
|
44281
|
-
var
|
|
44282
|
-
if (
|
|
44286
|
+
}), p, u;
|
|
44287
|
+
s > 0 ? (p = Ai(n), u = Ai(e)) : (p = Ai(e), u = Ai(n));
|
|
44288
|
+
var d = String((c = i == null ? void 0 : i.roundingMethod) !== null && c !== void 0 ? c : "round"), x;
|
|
44289
|
+
if (d === "floor")
|
|
44283
44290
|
x = Math.floor;
|
|
44284
|
-
else if (
|
|
44291
|
+
else if (d === "ceil")
|
|
44285
44292
|
x = Math.ceil;
|
|
44286
|
-
else if (
|
|
44293
|
+
else if (d === "round")
|
|
44287
44294
|
x = Math.round;
|
|
44288
44295
|
else
|
|
44289
44296
|
throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
|
|
44290
|
-
var C =
|
|
44297
|
+
var C = u.getTime() - p.getTime(), k = C / xs, M = Ds(u) - Ds(p), q = (C - M) / xs, g = i == null ? void 0 : i.unit, E;
|
|
44291
44298
|
if (g ? E = String(g) : k < 1 ? E = "second" : k < 60 ? E = "minute" : k < dt ? E = "hour" : q < gs ? E = "day" : q < fs ? E = "month" : E = "year", E === "second") {
|
|
44292
44299
|
var H = x(C / 1e3);
|
|
44293
44300
|
return r.formatDistance("xSeconds", H, l);
|
|
@@ -44342,18 +44349,18 @@ const D3 = (e) => {
|
|
|
44342
44349
|
amountIn: s,
|
|
44343
44350
|
amountOut: l,
|
|
44344
44351
|
sourceAssetDenom: p,
|
|
44345
|
-
sourceAssetChainID:
|
|
44346
|
-
destAssetDenom:
|
|
44352
|
+
sourceAssetChainID: u,
|
|
44353
|
+
destAssetDenom: d,
|
|
44347
44354
|
destAssetChainID: x
|
|
44348
44355
|
},
|
|
44349
44356
|
timestamp: C,
|
|
44350
44357
|
transactionDetails: k
|
|
44351
44358
|
} = n, M = en({
|
|
44352
44359
|
assetDenom: p,
|
|
44353
|
-
chainId:
|
|
44360
|
+
chainId: u,
|
|
44354
44361
|
tokenAmount: s
|
|
44355
44362
|
}), q = en({
|
|
44356
|
-
assetDenom:
|
|
44363
|
+
assetDenom: d,
|
|
44357
44364
|
chainId: x,
|
|
44358
44365
|
tokenAmount: l
|
|
44359
44366
|
}), g = {
|
|
@@ -44456,7 +44463,7 @@ const D3 = (e) => {
|
|
|
44456
44463
|
overflow: hidden;
|
|
44457
44464
|
`, k3 = () => {
|
|
44458
44465
|
var r;
|
|
44459
|
-
const e = xe(), n = X(An), i = Ue(), [o, t] =
|
|
44466
|
+
const e = xe(), n = X(An), i = Ue(), [o, t] = le(void 0), c = R(Un), a = U(
|
|
44460
44467
|
() => c.sort((s, l) => l.timestamp - s.timestamp),
|
|
44461
44468
|
[c]
|
|
44462
44469
|
);
|
|
@@ -44579,7 +44586,7 @@ const D3 = (e) => {
|
|
|
44579
44586
|
},
|
|
44580
44587
|
"skip-widget-wagmi-provider"
|
|
44581
44588
|
), ip = ({ children: e }) => /* @__PURE__ */ m(y3, { children: /* @__PURE__ */ m(v3, { children: e }) }), E3 = (e) => {
|
|
44582
|
-
const n = X(Ee), i = X(mn), o = X(Bo), t = X(zt), [{ data: c }] = de(bn), a =
|
|
44589
|
+
const n = X(Ee), i = X(mn), o = X(Bo), t = X(zt), [{ data: c }] = de(bn), a = Pe(
|
|
44583
44590
|
(r, s) => {
|
|
44584
44591
|
if (!(!r || !s) && c)
|
|
44585
44592
|
return c.find(
|
|
@@ -44590,14 +44597,14 @@ const D3 = (e) => {
|
|
|
44590
44597
|
);
|
|
44591
44598
|
sp(() => {
|
|
44592
44599
|
if (e && e && c) {
|
|
44593
|
-
const { srcAssetDenom: r, srcChainId: s, destAssetDenom: l, destChainId: p, amountIn:
|
|
44600
|
+
const { srcAssetDenom: r, srcChainId: s, destAssetDenom: l, destChainId: p, amountIn: u, amountOut: d } = e, x = a(r, s), C = a(l, p);
|
|
44594
44601
|
i({
|
|
44595
44602
|
...C,
|
|
44596
|
-
amount:
|
|
44603
|
+
amount: d == null ? void 0 : d.toString()
|
|
44597
44604
|
}), n({
|
|
44598
44605
|
...x,
|
|
44599
|
-
amount:
|
|
44600
|
-
}),
|
|
44606
|
+
amount: u == null ? void 0 : u.toString()
|
|
44607
|
+
}), u ? o(u == null ? void 0 : u.toString()) : d && t(d == null ? void 0 : d.toString());
|
|
44601
44608
|
}
|
|
44602
44609
|
}, [
|
|
44603
44610
|
c,
|
|
@@ -44613,7 +44620,7 @@ let As = !1;
|
|
|
44613
44620
|
const F3 = () => {
|
|
44614
44621
|
As || (Np({
|
|
44615
44622
|
dsn: "https://10ce608bdd1c68a13d3849d6b242333c@o4504768725909504.ingest.us.sentry.io/4508485201231872",
|
|
44616
|
-
tunnel: "
|
|
44623
|
+
tunnel: "api/sentry",
|
|
44617
44624
|
defaultIntegrations: !1,
|
|
44618
44625
|
denyUrls: [/^https?:\/\/localhost:.*/],
|
|
44619
44626
|
integrations: [
|
|
@@ -44637,7 +44644,7 @@ const F3 = () => {
|
|
|
44637
44644
|
replaysSessionSampleRate: 1,
|
|
44638
44645
|
replaysOnErrorSampleRate: 0
|
|
44639
44646
|
}), As = !0);
|
|
44640
|
-
}, B3 = "3.2.0", M3 = () => {
|
|
44647
|
+
}, B3 = "3.2.1-alpha.0", M3 = () => {
|
|
44641
44648
|
const e = Ue(), n = X(ba);
|
|
44642
44649
|
De(() => {
|
|
44643
44650
|
n((i) => ({
|
|
@@ -44646,7 +44653,7 @@ const F3 = () => {
|
|
|
44646
44653
|
}));
|
|
44647
44654
|
}, [e, n]);
|
|
44648
44655
|
}, op = (e) => {
|
|
44649
|
-
var
|
|
44656
|
+
var d;
|
|
44650
44657
|
e.enableSentrySessionReplays && F3(), Xp("widget_version", B3), E3(e.defaultRoute), P3(e), M3();
|
|
44651
44658
|
const n = X(ui), i = X(Gl), o = X(Tn), t = X(ba), c = X(fa), a = X(yo), r = X(cl), s = X(Mo), l = X(um), p = U(() => {
|
|
44652
44659
|
const { apiUrl: x, chainIdsToAffiliates: C, endpointOptions: k } = e, M = {
|
|
@@ -44659,7 +44666,7 @@ const F3 = () => {
|
|
|
44659
44666
|
endpointOptions: M.endpointOptions ?? at.endpointOptions,
|
|
44660
44667
|
chainIDsToAffiliates: M.chainIdsToAffiliates ?? {}
|
|
44661
44668
|
};
|
|
44662
|
-
}, [e]),
|
|
44669
|
+
}, [e]), u = U(() => {
|
|
44663
44670
|
var C;
|
|
44664
44671
|
let x;
|
|
44665
44672
|
return typeof e.theme == "string" ? x = e.theme === "light" ? gu : et : x = { ...et, ...e.theme }, e.brandColor && (x.brandColor = e.brandColor), ((C = e.theme) == null ? void 0 : C.brandTextColor) === void 0 && typeof document < "u" && (x.brandTextColor = xu(x.brandColor)), x;
|
|
@@ -44669,8 +44676,8 @@ const F3 = () => {
|
|
|
44669
44676
|
apiURL: p.apiURL,
|
|
44670
44677
|
endpointOptions: p.endpointOptions,
|
|
44671
44678
|
chainIDsToAffiliates: p.chainIDsToAffiliates
|
|
44672
|
-
}), i(
|
|
44673
|
-
}, [n, p, i,
|
|
44679
|
+
}), i(u);
|
|
44680
|
+
}, [n, p, i, u]), De(() => {
|
|
44674
44681
|
e.settings && o({
|
|
44675
44682
|
...mt,
|
|
44676
44683
|
...e.settings
|
|
@@ -44696,7 +44703,7 @@ const F3 = () => {
|
|
|
44696
44703
|
e.onlyTestnet,
|
|
44697
44704
|
e.routeConfig,
|
|
44698
44705
|
e.settings,
|
|
44699
|
-
(
|
|
44706
|
+
(d = e.settings) == null ? void 0 : d.slippage,
|
|
44700
44707
|
e.walletConnect,
|
|
44701
44708
|
e.simulate,
|
|
44702
44709
|
c,
|
|
@@ -44706,7 +44713,7 @@ const F3 = () => {
|
|
|
44706
44713
|
r,
|
|
44707
44714
|
s,
|
|
44708
44715
|
l
|
|
44709
|
-
]), { theme:
|
|
44716
|
+
]), { theme: u };
|
|
44710
44717
|
}, P3 = (e) => {
|
|
44711
44718
|
const n = X(al), i = X(Et);
|
|
44712
44719
|
De(() => {
|