@aurora-is-near/intents-swap-widget 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{config-BhnkBtE4.js → config-mc4bU5n_.js} +58 -48
- package/dist/{config-BhnkBtE4.js.map → config-mc4bU5n_.js.map} +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/errors.js +1 -1
- package/dist/ext/alchemy/index.js +1 -1
- package/dist/ext/index.js +1 -1
- package/dist/features/BalanceRpcLoader/index.js +1 -1
- package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
- package/dist/features/ChainsDropdown/index.js +1 -1
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +1 -1
- package/dist/features/SendAddress/index.js +1 -1
- package/dist/features/SendAddress/useNotification.js +1 -1
- package/dist/features/SubmitButton/index.js +1 -1
- package/dist/features/SuccessScreen/index.js +1 -1
- package/dist/features/SwapDirectionSwitcher.js +1 -1
- package/dist/features/SwapQuote/SwapQuote.js +1 -1
- package/dist/features/TokenInput/TokenInput.js +1 -1
- package/dist/features/TokenInput/TokenInputSource.js +1 -1
- package/dist/features/TokenInput/TokenInputTarget.js +1 -1
- package/dist/features/TokenInput/WalletBalance.js +1 -1
- package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
- package/dist/features/TokensList/TokenItem.js +1 -1
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useChains.js +1 -1
- package/dist/hooks/useCompatibilityCheck.js +1 -1
- package/dist/hooks/useExternalDepositStatus.js +1 -1
- package/dist/hooks/useIntentsBalance.js +1 -1
- package/dist/hooks/useMakeDepositAddress.js +1 -1
- package/dist/hooks/useMakeIntentsTransfer.js +1 -1
- package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
- package/dist/hooks/useMakeQuote.js +1 -1
- package/dist/hooks/useMakeQuoteTransfer.js +1 -1
- package/dist/hooks/useMakeTransfer.js +1 -1
- package/dist/hooks/useMergedBalance.js +1 -1
- package/dist/hooks/useTokenInputPair.js +1 -1
- package/dist/hooks/useTokens.js +1 -1
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/index.js +1 -1
- package/dist/machine/effects/index.js +1 -1
- package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
- package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
- package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
- package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
- package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
- package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
- package/dist/machine/effects/useWalletConnEffect.js +1 -1
- package/dist/machine/events/index.js +1 -1
- package/dist/machine/events/tokenSelect.js +1 -1
- package/dist/machine/events/validateInputAndMoveTo.js +1 -1
- package/dist/machine/index.js +1 -1
- package/dist/machine/snap.js +1 -1
- package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
- package/dist/machine/subscriptions/index.js +1 -1
- package/dist/utils/intents/signers/near.js +1 -1
- package/dist/utils/intents/signers/privy.js +1 -1
- package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
- package/dist/widgets/WidgetDeposit.js +1 -1
- package/dist/widgets/WidgetSwap.js +1 -1
- package/dist/widgets/WidgetWithdraw.js +1 -1
- package/package.json +1 -1
- package/src/config.tsx +14 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as q } from "react/jsx-runtime";
|
|
2
2
|
import Te from "i18next";
|
|
3
|
-
import { deepClone as
|
|
4
|
-
import { useSnapshot as
|
|
3
|
+
import { deepClone as M } from "valtio/utils";
|
|
4
|
+
import { useSnapshot as P, snapshot as G, proxy as ne } from "valtio";
|
|
5
5
|
import { useMemo as C, useEffect as h, useRef as O, createContext as Ie, useContext as ke } from "react";
|
|
6
6
|
import { useQuery as se, useInfiniteQuery as ge, useQueryClient as Ae, QueryClient as he, QueryClientProvider as we } from "@tanstack/react-query";
|
|
7
7
|
import { I18nextProvider as ye } from "react-i18next";
|
|
@@ -31,7 +31,7 @@ import { useAddClassToPortal as Fe } from "./hooks/useAddClassToPortal.js";
|
|
|
31
31
|
import { initLocalisation as $e } from "./localisation.js";
|
|
32
32
|
import { isAmountChangedFromQuote as Ge } from "./machine/subscriptions/checkers/isAmountChangedFromQuote.js";
|
|
33
33
|
import { reset as Ke } from "./machine/events/reset.js";
|
|
34
|
-
import { tokenSelectRotate as
|
|
34
|
+
import { tokenSelectRotate as V } from "./machine/events/tokenSelectRotate.js";
|
|
35
35
|
import { errorSet as He } from "./machine/events/errorSet.js";
|
|
36
36
|
import { quoteSet as je } from "./machine/events/quoteSet.js";
|
|
37
37
|
import { addressSet as ze } from "./machine/events/addressSet.js";
|
|
@@ -43,18 +43,18 @@ import { walletAddressSet as Ye } from "./machine/events/walletAddressSet.js";
|
|
|
43
43
|
import { tokenSetBalance as et } from "./machine/events/tokenSetBalance.js";
|
|
44
44
|
import { transferSetStatus as tt } from "./machine/events/transferSetStatus.js";
|
|
45
45
|
import { OneClickService as nt, QuoteRequest as w } from "@defuse-protocol/one-click-sdk-typescript";
|
|
46
|
-
import { TOKENS_DATA as
|
|
46
|
+
import { TOKENS_DATA as K, NATIVE_NEAR_DUMB_ASSET_ID as L, WNEAR_ASSET_ID as F } from "./constants/tokens.js";
|
|
47
47
|
import { isValidChain as st } from "./utils/checkers/isValidChain.js";
|
|
48
48
|
import { useWalletBalance as ce } from "./hooks/useWalletBalance.js";
|
|
49
49
|
import { parse as ot } from "./ext/alchemy/parse.js";
|
|
50
50
|
import { createLoader as rt } from "./ext/alchemy/load.js";
|
|
51
51
|
import { isAlchemySupportedChain as at } from "./ext/alchemy/types.js";
|
|
52
|
-
import { getIntentsAccountId as
|
|
52
|
+
import { getIntentsAccountId as H } from "./utils/intents/getIntentsAccountId.js";
|
|
53
53
|
import { getIntentsBalances as it } from "./utils/intents/getIntentsBalance.js";
|
|
54
54
|
import { getTokenBalanceKey as ct } from "./utils/intents/getTokenBalanceKey.js";
|
|
55
55
|
import { snakeCase as lt } from "change-case";
|
|
56
56
|
import { CanceledError as le, AxiosError as de } from "axios";
|
|
57
|
-
import { oneClickApi as
|
|
57
|
+
import { oneClickApi as $, bridgeApi as dt } from "./network.js";
|
|
58
58
|
import { formatBigToHuman as B } from "./utils/formatters/formatBigToHuman.js";
|
|
59
59
|
import { getMainTokenByChain as ut } from "./utils/tokens/getMainTokenByChain.js";
|
|
60
60
|
import { getDefaultIntentsToken as ft } from "./utils/tokens/getDefaultIntentsToken.js";
|
|
@@ -65,14 +65,14 @@ const N = x.getStore(), pt = Ce({
|
|
|
65
65
|
isNearToIntentsSameAssetTransfer: (e) => xe(e(N.context)),
|
|
66
66
|
isDirectNearDeposit: (e) => Be(e(N.context)),
|
|
67
67
|
isDirectNonNearWithdrawal: (e) => Oe(e(N.context))
|
|
68
|
-
}), Tt = () =>
|
|
69
|
-
const e =
|
|
68
|
+
}), Tt = () => P(pt), _ = () => {
|
|
69
|
+
const e = P(N);
|
|
70
70
|
return {
|
|
71
71
|
state: e.state,
|
|
72
72
|
ctx: e.context
|
|
73
73
|
};
|
|
74
74
|
}, Xn = (e) => {
|
|
75
|
-
const t =
|
|
75
|
+
const t = P(N);
|
|
76
76
|
if (!S(t.context, [e]))
|
|
77
77
|
throw new U(
|
|
78
78
|
`[WIDGET] Attempt to access snapshot for ${e} state while context does not match`
|
|
@@ -86,7 +86,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
86
86
|
}
|
|
87
87
|
n && re(e) ? y("input_valid_external") : s && ae(e) ? y("input_valid_internal") : y("initial_wallet");
|
|
88
88
|
}, It = (e, t) => {
|
|
89
|
-
const { config: s } =
|
|
89
|
+
const { config: s } = G(z);
|
|
90
90
|
return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((n) => n?.key === "sendAddress") && s.walletSupportedChains.includes(e.targetToken.blockchain);
|
|
91
91
|
}, kt = ({ debug: e }) => {
|
|
92
92
|
x.onContextChange((t, s) => {
|
|
@@ -117,13 +117,13 @@ const N = x.getStore(), pt = Ce({
|
|
|
117
117
|
e && b.debug(`===> [WIDGET] State moved from ${t} to ${s}`);
|
|
118
118
|
});
|
|
119
119
|
}, At = (e, t) => {
|
|
120
|
-
const { variant: s, token: n } = t, { config: o } =
|
|
120
|
+
const { variant: s, token: n } = t, { config: o } = G(z);
|
|
121
121
|
switch (s) {
|
|
122
122
|
case "source":
|
|
123
123
|
if (n && n.assetId === e.targetToken?.assetId && n.isIntent === e.targetToken.isIntent && o.enableAutoTokensSwitching) {
|
|
124
124
|
if (!e.sourceToken)
|
|
125
125
|
return;
|
|
126
|
-
|
|
126
|
+
V(e);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
if (n && !e.sourceToken && n.assetId === e.targetToken?.assetId && n.isIntent === e.targetToken.isIntent && o.enableAutoTokensSwitching)
|
|
@@ -134,7 +134,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
134
134
|
if (n && n.assetId === e.sourceToken?.assetId && n.isIntent === e.sourceToken.isIntent && o.enableAutoTokensSwitching) {
|
|
135
135
|
if (!e.targetToken)
|
|
136
136
|
return;
|
|
137
|
-
|
|
137
|
+
V(e);
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
e.targetToken = n;
|
|
@@ -145,11 +145,11 @@ const N = x.getStore(), pt = Ce({
|
|
|
145
145
|
}, g = (e, t) => {
|
|
146
146
|
x.on(e, (s, n) => t(s, n));
|
|
147
147
|
}, ht = () => {
|
|
148
|
-
g("quoteSetStatus", Ze), g("walletAddressSet", Ye), g("transferSetStatus", tt), g("tokenSelectRotate",
|
|
148
|
+
g("quoteSetStatus", Ze), g("walletAddressSet", Ye), g("transferSetStatus", tt), g("tokenSelectRotate", V), g("tokenSetBalance", et), g("tokenSetAmount", Xe), g("depositTypeSet", Je), g("tokenSelect", At), g("addressSet", ze), g("errorSet", He), g("quoteSet", je), g("reset", Ke), g("validateDryInputs", oe), g("validateExternalInputs", re), g("validateInternalInputs", ae);
|
|
149
149
|
}, wt = (e) => {
|
|
150
150
|
const t = e.symbol.toLowerCase();
|
|
151
|
-
return
|
|
152
|
-
}, Y = (e) => Se[e].icon ?? be, yt = (e) => `${e.blockchain?.charAt(0).toUpperCase()}${e.blockchain?.slice(1)}`, St = (e) =>
|
|
151
|
+
return K[t]?.icon ?? "";
|
|
152
|
+
}, Y = (e) => Se[e].icon ?? be, yt = (e) => `${e.blockchain?.charAt(0).toUpperCase()}${e.blockchain?.slice(1)}`, St = (e) => K[e.symbol]?.name ?? e.symbol, W = (e) => {
|
|
153
153
|
const {
|
|
154
154
|
showIntentTokens: t,
|
|
155
155
|
allowedTokensList: s,
|
|
@@ -184,7 +184,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
184
184
|
blockchain: "near",
|
|
185
185
|
assetId: L,
|
|
186
186
|
chainIcon: Y("near"),
|
|
187
|
-
icon:
|
|
187
|
+
icon: K.near?.icon ?? "",
|
|
188
188
|
price: l?.price ?? 0,
|
|
189
189
|
contractAddress: l?.contractAddress,
|
|
190
190
|
isIntent: !1,
|
|
@@ -206,7 +206,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
206
206
|
alchemyApiKey: t,
|
|
207
207
|
...s
|
|
208
208
|
}) => {
|
|
209
|
-
const { ctx: n } = _(), { tokens: o } =
|
|
209
|
+
const { ctx: n } = _(), { tokens: o } = W(), { walletSupportedChains: r } = v(), { setWalletBalance: u } = ce(n.walletAddress), i = s.isEnabled && !!e && r.length > 0, c = ge({
|
|
210
210
|
initialPageParam: null,
|
|
211
211
|
enabled: i && !!e && !!t,
|
|
212
212
|
queryKey: ["walletTokensBalance", e],
|
|
@@ -241,8 +241,8 @@ const N = x.getStore(), pt = Ce({
|
|
|
241
241
|
refetch: c.refetch,
|
|
242
242
|
balances: m
|
|
243
243
|
};
|
|
244
|
-
},
|
|
245
|
-
const { walletAddress: e, intentsAccountType: t } = v(), { tokens: s } =
|
|
244
|
+
}, j = () => {
|
|
245
|
+
const { walletAddress: e, intentsAccountType: t } = v(), { tokens: s } = W(), n = s.filter((i) => i.isIntent).map((i) => i.assetId), o = H({
|
|
246
246
|
walletAddress: e ?? "",
|
|
247
247
|
addressType: t
|
|
248
248
|
}), r = se({
|
|
@@ -274,7 +274,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
274
274
|
isEnabled: e,
|
|
275
275
|
alchemyApiKey: t
|
|
276
276
|
}) => {
|
|
277
|
-
const { ctx: s } = _(), n = Ae(), { refetch: o } =
|
|
277
|
+
const { ctx: s } = _(), n = Ae(), { refetch: o } = j(), { refetch: r } = fe({
|
|
278
278
|
isEnabled: e,
|
|
279
279
|
walletAddress: s.walletAddress,
|
|
280
280
|
alchemyApiKey: t ?? ""
|
|
@@ -286,7 +286,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
286
286
|
}), await r()), await n.invalidateQueries({ queryKey: ["tokenBalance"] })))();
|
|
287
287
|
}, [s.state, e, t]);
|
|
288
288
|
}, _t = () => {
|
|
289
|
-
const { walletAddress: e } = v(), { intentBalances: t } =
|
|
289
|
+
const { walletAddress: e } = v(), { intentBalances: t } = j(), { walletBalance: s } = ce(e);
|
|
290
290
|
return { mergedBalance: C(
|
|
291
291
|
() => ({ ...s, ...t }),
|
|
292
292
|
[s, t]
|
|
@@ -321,7 +321,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
321
321
|
}, vt = ({
|
|
322
322
|
isEnabled: e
|
|
323
323
|
}) => {
|
|
324
|
-
const { ctx: t } = _(), { tokens: s } =
|
|
324
|
+
const { ctx: t } = _(), { tokens: s } = W();
|
|
325
325
|
h(() => {
|
|
326
326
|
if (!e)
|
|
327
327
|
return;
|
|
@@ -365,16 +365,16 @@ const N = x.getStore(), pt = Ce({
|
|
|
365
365
|
d("walletAddressSet", t ?? void 0), S(s, ["initial_dry", "initial_wallet"]) && (n === "initial_wallet" && !t ? y("initial_dry") : n === "initial_dry" && t && y("initial_wallet"));
|
|
366
366
|
}, [e, t, s, n]);
|
|
367
367
|
}, Ct = () => {
|
|
368
|
-
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s, appName: n } = v(), o = !e.walletAddress, r =
|
|
368
|
+
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s, appName: n } = v(), o = !e.walletAddress, r = H({
|
|
369
369
|
addressType: t,
|
|
370
370
|
walletAddress: o ? J[t] : e.walletAddress ?? ""
|
|
371
|
-
}), u = O(null), i = O(new AbortController()), c = C(() => async (a) =>
|
|
371
|
+
}), u = O(null), i = O(new AbortController()), c = C(() => async (a) => $.post(
|
|
372
372
|
s,
|
|
373
373
|
a,
|
|
374
374
|
{
|
|
375
375
|
signal: i.current.signal
|
|
376
376
|
}
|
|
377
|
-
), [s,
|
|
377
|
+
), [s, $]), m = o ? J[t] : e.walletAddress ?? "";
|
|
378
378
|
return {
|
|
379
379
|
make: async ({ message: a, quoteType: T = "exact_in" } = {}) => {
|
|
380
380
|
if (!S(e, [
|
|
@@ -406,9 +406,9 @@ const N = x.getStore(), pt = Ce({
|
|
|
406
406
|
// 1 hour
|
|
407
407
|
swapType: T === "exact_out" ? w.swapType.EXACT_OUTPUT : w.swapType.EXACT_INPUT,
|
|
408
408
|
// Target
|
|
409
|
-
destinationAsset: e.targetToken.assetId === L ?
|
|
409
|
+
destinationAsset: e.targetToken.assetId === L ? F : e.targetToken.assetId,
|
|
410
410
|
// Source
|
|
411
|
-
originAsset: e.sourceToken.assetId === L ?
|
|
411
|
+
originAsset: e.sourceToken.assetId === L ? F : e.sourceToken.assetId,
|
|
412
412
|
amount: T === "exact_out" ? e.targetTokenAmount : e.sourceTokenAmount
|
|
413
413
|
};
|
|
414
414
|
a && (k.customRecipientMsg = a), n && (k.referral = lt(n));
|
|
@@ -485,7 +485,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
485
485
|
}
|
|
486
486
|
};
|
|
487
487
|
}, Dt = () => {
|
|
488
|
-
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s } = v(), n =
|
|
488
|
+
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s } = v(), n = H({
|
|
489
489
|
addressType: t,
|
|
490
490
|
walletAddress: e.walletAddress ?? ""
|
|
491
491
|
}), o = O(null), r = O(new AbortController()), u = C(() => async (c) => dt.post(
|
|
@@ -504,7 +504,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
504
504
|
{
|
|
505
505
|
signal: r.current.signal
|
|
506
506
|
}
|
|
507
|
-
), [s,
|
|
507
|
+
), [s, $]);
|
|
508
508
|
return {
|
|
509
509
|
make: async () => {
|
|
510
510
|
if (!S(e, [
|
|
@@ -606,7 +606,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
606
606
|
const k = S(n, ["input_valid_dry"]), f = S(n, ["input_valid_external"]), p = S(n, ["input_valid_internal"]);
|
|
607
607
|
(c && !k || !c && n.targetToken?.isIntent && !p || !c && !n.targetToken?.isIntent && !f) && I();
|
|
608
608
|
}, [I, c, n]), h(() => {
|
|
609
|
-
if (!m || n.sourceToken?.assetId === L && n.targetToken?.assetId ===
|
|
609
|
+
if (!m || n.sourceToken?.assetId === L && n.targetToken?.assetId === F)
|
|
610
610
|
return;
|
|
611
611
|
const k = c ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent;
|
|
612
612
|
(async () => {
|
|
@@ -641,7 +641,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
641
641
|
}
|
|
642
642
|
})();
|
|
643
643
|
}, [n, m, c, l]);
|
|
644
|
-
},
|
|
644
|
+
}, R = {
|
|
645
645
|
sol: "sol",
|
|
646
646
|
evm: "eth",
|
|
647
647
|
near: "near"
|
|
@@ -650,7 +650,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
650
650
|
skipIntents: t = !1,
|
|
651
651
|
target: s = "none"
|
|
652
652
|
}) => {
|
|
653
|
-
const { tokens: n } =
|
|
653
|
+
const { tokens: n } = W(), { ctx: o, state: r } = _(), { intentBalances: u } = j(), {
|
|
654
654
|
walletSupportedChains: i,
|
|
655
655
|
chainsFilter: c,
|
|
656
656
|
walletAddress: m,
|
|
@@ -693,7 +693,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
693
693
|
}), D.status === "loaded" && T.status === "loaded" && !o.targetToken)) {
|
|
694
694
|
let k = D.token;
|
|
695
695
|
s === "same-asset" && (T.token?.isIntent ? k = n.find(
|
|
696
|
-
(f) => !f.isIntent && f.symbol === o.sourceToken?.symbol && f.blockchain ===
|
|
696
|
+
(f) => !f.isIntent && f.symbol === o.sourceToken?.symbol && f.blockchain === R[l]
|
|
697
697
|
) : k = n.find(
|
|
698
698
|
(f) => f.isIntent && f.symbol === o.sourceToken?.symbol
|
|
699
699
|
)), d("tokenSelect", {
|
|
@@ -716,7 +716,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
716
716
|
});
|
|
717
717
|
else if (i.length) {
|
|
718
718
|
const p = n.find(
|
|
719
|
-
(E) => !E.isIntent && E.blockchain ===
|
|
719
|
+
(E) => !E.isIntent && E.blockchain === R[l] && E.symbol.toLowerCase() === Ee[R[l]]?.toLowerCase()
|
|
720
720
|
) ?? k;
|
|
721
721
|
d("tokenSelect", {
|
|
722
722
|
variant: "source",
|
|
@@ -779,7 +779,7 @@ class U extends Error {
|
|
|
779
779
|
context;
|
|
780
780
|
_is_widget_error = !0;
|
|
781
781
|
constructor(t, s) {
|
|
782
|
-
super(t), this.name = "WidgetError", this.cause = s?.cause, this.context =
|
|
782
|
+
super(t), this.name = "WidgetError", this.cause = s?.cause, this.context = G(Lt).context;
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
class me extends U {
|
|
@@ -822,7 +822,7 @@ const Yn = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
|
|
|
822
822
|
staleTime: 2e3 * 60
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
|
-
}), Rt = ["fms", "abg", "stjack", "noear", "testnebula"],
|
|
825
|
+
}), Rt = ["fms", "abg", "stjack", "noear", "testnebula"], Q = {
|
|
826
826
|
appName: "Unknown",
|
|
827
827
|
appIcon: "https://wtmcxrwapthiogjpxwfr.supabase.co/storage/v1/object/public/swap-widget/unknown.svg",
|
|
828
828
|
defaultMaxSlippage: 0.01,
|
|
@@ -862,27 +862,37 @@ const Yn = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
|
|
|
862
862
|
target: { external: "all", intents: "all" }
|
|
863
863
|
}
|
|
864
864
|
}, pe = Ie({
|
|
865
|
-
config:
|
|
865
|
+
config: Q
|
|
866
866
|
}), z = ne({
|
|
867
|
-
config:
|
|
867
|
+
config: Q
|
|
868
868
|
}), v = () => {
|
|
869
869
|
const e = ke(pe);
|
|
870
|
-
return
|
|
870
|
+
return P(e).config;
|
|
871
871
|
}, Mt = (e) => {
|
|
872
|
-
z.config =
|
|
872
|
+
z.config = M(e);
|
|
873
873
|
}, es = ({
|
|
874
874
|
children: e,
|
|
875
|
-
config: t
|
|
875
|
+
config: t,
|
|
876
876
|
localisation: s
|
|
877
877
|
}) => {
|
|
878
|
-
const n = O(
|
|
878
|
+
const n = O(
|
|
879
|
+
ne({
|
|
880
|
+
config: M({
|
|
881
|
+
...Q,
|
|
882
|
+
...t
|
|
883
|
+
})
|
|
884
|
+
})
|
|
885
|
+
);
|
|
879
886
|
return h(() => {
|
|
880
|
-
const o =
|
|
887
|
+
const o = M({
|
|
888
|
+
...Q,
|
|
889
|
+
...t
|
|
890
|
+
});
|
|
881
891
|
Object.assign(n.current.config, o), Mt(o);
|
|
882
892
|
}, [t]), $e(s ?? {}), Fe("headlessui-portal-root", "sw"), /* @__PURE__ */ q(we, { client: Wt, children: /* @__PURE__ */ q(ye, { i18n: Te, children: /* @__PURE__ */ q(pe.Provider, { value: n.current, children: /* @__PURE__ */ q(Pt, { children: /* @__PURE__ */ q("div", { className: "sw", children: e }) }) }) }) });
|
|
883
893
|
};
|
|
884
894
|
export {
|
|
885
|
-
|
|
895
|
+
Q as A,
|
|
886
896
|
z as B,
|
|
887
897
|
Mt as C,
|
|
888
898
|
es as D,
|
|
@@ -894,10 +904,10 @@ export {
|
|
|
894
904
|
Xn as a,
|
|
895
905
|
_ as b,
|
|
896
906
|
Zn as c,
|
|
897
|
-
|
|
907
|
+
j as d,
|
|
898
908
|
Ct as e,
|
|
899
909
|
_t as f,
|
|
900
|
-
|
|
910
|
+
W as g,
|
|
901
911
|
fe as h,
|
|
902
912
|
Yn as i,
|
|
903
913
|
v as j,
|
|
@@ -918,4 +928,4 @@ export {
|
|
|
918
928
|
Ot as y,
|
|
919
929
|
xt as z
|
|
920
930
|
};
|
|
921
|
-
//# sourceMappingURL=config-
|
|
931
|
+
//# sourceMappingURL=config-mc4bU5n_.js.map
|