@aurora-is-near/intents-swap-widget 2.3.0 → 2.3.2
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-9cxpHvlG.js → config-C3Ii_szE.js} +57 -59
- package/dist/{config-9cxpHvlG.js.map → config-C3Ii_szE.js.map} +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/localisation.d.ts +1 -1
- package/dist/localisation.js +15 -13
- package/dist/localisation.js.map +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 +7 -7
- package/dist/widgets/WidgetDeposit.js.map +1 -1
- package/dist/widgets/WidgetSwap.js +4 -4
- package/dist/widgets/WidgetSwap.js.map +1 -1
- package/dist/widgets/WidgetWithdraw.js +1 -1
- package/package.json +1 -1
- package/src/config.tsx +2 -6
- package/src/localisation.tsx +2 -2
- package/src/widgets/WidgetDeposit.tsx +2 -2
- package/src/widgets/WidgetSwap.tsx +3 -3
|
@@ -18,7 +18,7 @@ import { getIsDirectNearDeposit as Be } from "./machine/computed/getIsDirectNear
|
|
|
18
18
|
import "ethers";
|
|
19
19
|
import Ue from "lodash.once";
|
|
20
20
|
import { logger as b } from "./logger.js";
|
|
21
|
-
import { fireEvent as
|
|
21
|
+
import { fireEvent as d } from "./machine/events/utils/fireEvent.js";
|
|
22
22
|
import { validateDryInputs as oe, validateExternalInputs as re, validateInternalInputs as ae } from "./machine/events/validateInputs.js";
|
|
23
23
|
import { isQuoteIdle as Le } from "./machine/subscriptions/checkers/isQuoteIdle.js";
|
|
24
24
|
import { isInputChanged as Qe } from "./machine/subscriptions/checkers/isInputChanged.js";
|
|
@@ -52,9 +52,9 @@ import { isAlchemySupportedChain as at } from "./ext/alchemy/types.js";
|
|
|
52
52
|
import { getIntentsAccountId as K } 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
|
-
import { snakeCase as
|
|
56
|
-
import { CanceledError as
|
|
57
|
-
import { oneClickApi as F, bridgeApi as
|
|
55
|
+
import { snakeCase as lt } from "change-case";
|
|
56
|
+
import { CanceledError as le, AxiosError as de } from "axios";
|
|
57
|
+
import { oneClickApi as F, 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";
|
|
@@ -94,7 +94,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
94
94
|
if (e && b.debug("[WIDGET] Context changed", n), e && t.error && Pe(n) && b.debug(`[WIDGET] Error set to ${t.error.code}`), We(n) || Ge(t, n, e))
|
|
95
95
|
return;
|
|
96
96
|
if (Me(t, n)) {
|
|
97
|
-
|
|
97
|
+
d("reset", null), w("initial_dry");
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
const { isChanged: o, isDry: a } = Qe(t, n);
|
|
@@ -157,21 +157,21 @@ const N = x.getStore(), pt = Ce({
|
|
|
157
157
|
}), a = C(() => {
|
|
158
158
|
if (!o.data)
|
|
159
159
|
return [];
|
|
160
|
-
const u = o.data.map((
|
|
161
|
-
const c =
|
|
162
|
-
return !st(c) || s && !s.includes(
|
|
163
|
-
...
|
|
160
|
+
const u = o.data.map((l) => {
|
|
161
|
+
const c = l.blockchain.toLowerCase();
|
|
162
|
+
return !st(c) || s && !s.includes(l.assetId) ? null : {
|
|
163
|
+
...l,
|
|
164
164
|
blockchain: c,
|
|
165
165
|
isIntent: !1,
|
|
166
|
-
icon: yt(
|
|
167
|
-
name: St(
|
|
166
|
+
icon: yt(l),
|
|
167
|
+
name: St(l),
|
|
168
168
|
chainIcon: Y(c),
|
|
169
|
-
chainName: wt(
|
|
170
|
-
contractAddress:
|
|
169
|
+
chainName: wt(l),
|
|
170
|
+
contractAddress: l.contractAddress
|
|
171
171
|
};
|
|
172
|
-
}).filter((
|
|
173
|
-
(
|
|
174
|
-
), i = u.find((
|
|
172
|
+
}).filter((l) => !!l).filter(n ?? (() => !0)), r = u.filter(
|
|
173
|
+
(l) => l.symbol.toLowerCase() !== "wnear"
|
|
174
|
+
), i = u.find((l) => l.symbol.toLowerCase() === "wnear");
|
|
175
175
|
return r.push({
|
|
176
176
|
name: "NEAR",
|
|
177
177
|
symbol: "NEAR",
|
|
@@ -188,7 +188,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
188
188
|
...r,
|
|
189
189
|
// add intents tokens to the full list
|
|
190
190
|
...u.map(
|
|
191
|
-
(
|
|
191
|
+
(l) => l.symbol.toLowerCase() === "wnear" ? { ...l, symbol: "NEAR", name: "NEAR", isIntent: !0 } : { ...l, isIntent: !0 }
|
|
192
192
|
)
|
|
193
193
|
] : r;
|
|
194
194
|
}, [o.data, t, n]);
|
|
@@ -218,7 +218,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
218
218
|
h(() => {
|
|
219
219
|
r && i.data && i.hasNextPage && i.data.pages.length < ee && !i.isFetchingNextPage && i.fetchNextPage();
|
|
220
220
|
}, [r, i]);
|
|
221
|
-
const
|
|
221
|
+
const l = C(() => {
|
|
222
222
|
if (!i.data?.pages)
|
|
223
223
|
return {};
|
|
224
224
|
const c = ot(
|
|
@@ -230,11 +230,11 @@ const N = x.getStore(), pt = Ce({
|
|
|
230
230
|
}), c;
|
|
231
231
|
}, [i.data, o]);
|
|
232
232
|
return h(() => {
|
|
233
|
-
S(n, ["initial_wallet"]) && (u(n.walletAddress,
|
|
234
|
-
}, [
|
|
233
|
+
S(n, ["initial_wallet"]) && (u(n.walletAddress, l), n.sourceToken && Object.keys(l).includes(n.sourceToken.assetId) && d("tokenSetBalance", l[n.sourceToken.assetId]));
|
|
234
|
+
}, [l]), {
|
|
235
235
|
status: i.status,
|
|
236
236
|
refetch: i.refetch,
|
|
237
|
-
balances:
|
|
237
|
+
balances: l
|
|
238
238
|
};
|
|
239
239
|
}, H = () => {
|
|
240
240
|
const { walletAddress: e, intentsAccountType: t } = v(), { tokens: s } = P(), n = s.filter((r) => r.isIntent).map((r) => r.assetId), o = K({
|
|
@@ -292,11 +292,11 @@ const N = x.getStore(), pt = Ce({
|
|
|
292
292
|
if (!e)
|
|
293
293
|
return;
|
|
294
294
|
if (!t.sourceToken || !t.walletAddress) {
|
|
295
|
-
|
|
295
|
+
d("tokenSetBalance", void 0);
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
298
|
const n = ct(t.sourceToken);
|
|
299
|
-
|
|
299
|
+
d("tokenSetBalance", s[n]);
|
|
300
300
|
}, [s, t.sourceToken]);
|
|
301
301
|
}, te = {
|
|
302
302
|
// cbBTC (eth)
|
|
@@ -321,7 +321,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
321
321
|
if (!e)
|
|
322
322
|
return;
|
|
323
323
|
if (!t.sourceToken) {
|
|
324
|
-
|
|
324
|
+
d("tokenSelect", { variant: "target", token: void 0 });
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
const { sourceToken: n } = t;
|
|
@@ -329,7 +329,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
329
329
|
const r = s.find(
|
|
330
330
|
(i) => i.isIntent && i.assetId === te[n.assetId]
|
|
331
331
|
);
|
|
332
|
-
|
|
332
|
+
d("tokenSelect", {
|
|
333
333
|
variant: "target",
|
|
334
334
|
token: r
|
|
335
335
|
});
|
|
@@ -339,7 +339,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
339
339
|
(r) => r.isIntent && r.symbol === n.symbol && r.blockchain === "near"
|
|
340
340
|
);
|
|
341
341
|
if (o) {
|
|
342
|
-
|
|
342
|
+
d("tokenSelect", { variant: "target", token: o });
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
345
|
const a = s.find(
|
|
@@ -347,7 +347,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
347
347
|
), u = s.find(
|
|
348
348
|
(r) => r.isIntent && r.symbol === "USDC" && r.blockchain === "near"
|
|
349
349
|
);
|
|
350
|
-
|
|
350
|
+
d("tokenSelect", {
|
|
351
351
|
variant: "target",
|
|
352
352
|
token: a ?? u
|
|
353
353
|
});
|
|
@@ -357,7 +357,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
357
357
|
h(() => {
|
|
358
358
|
if (!e)
|
|
359
359
|
return;
|
|
360
|
-
|
|
360
|
+
d("walletAddressSet", t ?? void 0), S(s, ["initial_dry", "initial_wallet"]) && (n === "initial_wallet" && !t ? w("initial_dry") : n === "initial_dry" && t && w("initial_wallet"));
|
|
361
361
|
}, [e, t, s, n]);
|
|
362
362
|
}, Ct = () => {
|
|
363
363
|
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s, appName: n } = v(), o = !e.walletAddress, a = K({
|
|
@@ -369,7 +369,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
369
369
|
{
|
|
370
370
|
signal: r.current.signal
|
|
371
371
|
}
|
|
372
|
-
), [s, F]),
|
|
372
|
+
), [s, F]), l = o ? J[t] : e.walletAddress ?? "";
|
|
373
373
|
return {
|
|
374
374
|
make: async ({ message: m, quoteType: A = "exact_in" } = {}) => {
|
|
375
375
|
if (!S(e, [
|
|
@@ -406,7 +406,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
406
406
|
originAsset: e.sourceToken.assetId === U ? V : e.sourceToken.assetId,
|
|
407
407
|
amount: A === "exact_out" ? e.targetTokenAmount : e.sourceTokenAmount
|
|
408
408
|
};
|
|
409
|
-
m && (k.customRecipientMsg = m), n && (k.referral =
|
|
409
|
+
m && (k.customRecipientMsg = m), n && (k.referral = lt(n));
|
|
410
410
|
try {
|
|
411
411
|
e.sourceToken.isIntent && e.targetToken.isIntent && (u.current = i({
|
|
412
412
|
...k,
|
|
@@ -422,13 +422,13 @@ const N = x.getStore(), pt = Ce({
|
|
|
422
422
|
recipientType: e.targetToken.isIntent ? y.recipientType.INTENTS : y.recipientType.DESTINATION_CHAIN,
|
|
423
423
|
depositType: e.sourceToken.isIntent ? y.depositType.INTENTS : y.depositType.ORIGIN_CHAIN,
|
|
424
424
|
// Refund
|
|
425
|
-
refundTo: e.sourceToken.isIntent ? a :
|
|
425
|
+
refundTo: e.sourceToken.isIntent ? a : l,
|
|
426
426
|
refundType: e.sourceToken.isIntent ? y.refundType.INTENTS : y.refundType.ORIGIN_CHAIN
|
|
427
427
|
}), T = (await u.current).data;
|
|
428
428
|
} catch (p) {
|
|
429
|
-
if (p instanceof
|
|
429
|
+
if (p instanceof le)
|
|
430
430
|
return;
|
|
431
|
-
if (p instanceof
|
|
431
|
+
if (p instanceof de) {
|
|
432
432
|
const E = p.response?.data.message || p.message;
|
|
433
433
|
if (E.includes("Amount is too low")) {
|
|
434
434
|
const X = E.match(/\d+/), Z = X ? X[0] : void 0;
|
|
@@ -483,7 +483,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
483
483
|
const { ctx: e } = _(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s } = v(), n = K({
|
|
484
484
|
addressType: t,
|
|
485
485
|
walletAddress: e.walletAddress ?? ""
|
|
486
|
-
}), o = O(null), a = O(new AbortController()), u = C(() => async (i) =>
|
|
486
|
+
}), o = O(null), a = O(new AbortController()), u = C(() => async (i) => dt.post(
|
|
487
487
|
"",
|
|
488
488
|
{
|
|
489
489
|
id: 1,
|
|
@@ -537,15 +537,15 @@ const N = x.getStore(), pt = Ce({
|
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
o.current && (a.current.abort("Abort previous quote (auto)"), a.current = new AbortController());
|
|
540
|
-
const
|
|
541
|
-
if (!
|
|
540
|
+
const l = _e[e.targetToken.blockchain];
|
|
541
|
+
if (!l)
|
|
542
542
|
throw new g({
|
|
543
543
|
code: "QUOTE_INVALID_INITIAL",
|
|
544
544
|
meta: { isDry: !1, message: "Chain is not supported by POA" }
|
|
545
545
|
});
|
|
546
546
|
try {
|
|
547
547
|
return o.current = u({
|
|
548
|
-
chain:
|
|
548
|
+
chain: l,
|
|
549
549
|
accountId: n
|
|
550
550
|
}), {
|
|
551
551
|
depositAddress: (await o.current).data.result.address,
|
|
@@ -567,9 +567,9 @@ const N = x.getStore(), pt = Ce({
|
|
|
567
567
|
dry: !1
|
|
568
568
|
};
|
|
569
569
|
} catch (c) {
|
|
570
|
-
if (c instanceof
|
|
570
|
+
if (c instanceof le)
|
|
571
571
|
return;
|
|
572
|
-
if (b.error(c), c instanceof
|
|
572
|
+
if (b.error(c), c instanceof de) {
|
|
573
573
|
const m = c.response?.data.message || c.message;
|
|
574
574
|
throw new g({
|
|
575
575
|
code: "QUOTE_FAILED",
|
|
@@ -594,24 +594,24 @@ const N = x.getStore(), pt = Ce({
|
|
|
594
594
|
isDirectNonNearWithdrawal: a,
|
|
595
595
|
isNearToIntentsSameAssetTransfer: u,
|
|
596
596
|
isDirectNearDeposit: r
|
|
597
|
-
} = Tt(), i = !n.walletAddress,
|
|
597
|
+
} = Tt(), i = !n.walletAddress, l = e && !o && !a && !u && !r, { make: c, cancel: m } = Ct(), { make: A, cancel: D } = Dt(), T = () => {
|
|
598
598
|
m(), D();
|
|
599
599
|
};
|
|
600
600
|
h(() => {
|
|
601
601
|
const k = S(n, ["input_valid_dry"]), f = S(n, ["input_valid_external"]), p = S(n, ["input_valid_internal"]);
|
|
602
602
|
(i && !k || !i && n.targetToken?.isIntent && !p || !i && !n.targetToken?.isIntent && !f) && T();
|
|
603
603
|
}, [T, i, n]), h(() => {
|
|
604
|
-
if (!
|
|
604
|
+
if (!l || n.sourceToken?.assetId === U && n.targetToken?.assetId === V)
|
|
605
605
|
return;
|
|
606
606
|
const k = i ? n.state === "input_valid_dry" : n.state === "input_valid_external" && !n.targetToken?.isIntent || n.state === "input_valid_internal" && n.targetToken?.isIntent;
|
|
607
607
|
(async () => {
|
|
608
608
|
try {
|
|
609
609
|
if (k && n.quoteStatus === "idle") {
|
|
610
|
-
|
|
610
|
+
d("quoteSetStatus", "pending");
|
|
611
611
|
let f;
|
|
612
612
|
if (n.sourceToken?.assetId === n.targetToken?.assetId ? f = await A() : f = await c({ message: t, quoteType: s }), !f)
|
|
613
613
|
return;
|
|
614
|
-
if (
|
|
614
|
+
if (d("quoteSetStatus", "success"), d("quoteSet", f), d("errorSet", null), d("tokenSetAmount", {
|
|
615
615
|
variant: "target",
|
|
616
616
|
amount: f.amountOut
|
|
617
617
|
}), n.state === "input_valid_dry") {
|
|
@@ -623,19 +623,19 @@ const N = x.getStore(), pt = Ce({
|
|
|
623
623
|
} catch (f) {
|
|
624
624
|
if (f instanceof g) {
|
|
625
625
|
if (f.data.code === "QUOTE_INVALID_INITIAL") {
|
|
626
|
-
|
|
626
|
+
d("quoteSetStatus", "idle"), d("quoteSet", void 0), d("errorSet", null);
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
|
|
629
|
+
d("quoteSetStatus", "error"), d("quoteSet", void 0), d("errorSet", f.data), ue(n);
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
|
|
632
|
+
d("quoteSetStatus", "error"), d("quoteSet", void 0), d("errorSet", {
|
|
633
633
|
code: "QUOTE_FAILED",
|
|
634
634
|
meta: { message: "Unknown error" }
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
637
|
})();
|
|
638
|
-
}, [n,
|
|
638
|
+
}, [n, l, i, c]);
|
|
639
639
|
}, W = {
|
|
640
640
|
sol: "sol",
|
|
641
641
|
evm: "eth",
|
|
@@ -648,14 +648,14 @@ const N = x.getStore(), pt = Ce({
|
|
|
648
648
|
const { tokens: n } = P(), { ctx: o, state: a } = _(), { intentBalances: u } = H(), {
|
|
649
649
|
walletSupportedChains: r,
|
|
650
650
|
chainsFilter: i,
|
|
651
|
-
walletAddress:
|
|
651
|
+
walletAddress: l,
|
|
652
652
|
intentsAccountType: c
|
|
653
653
|
} = v(), m = mt({
|
|
654
654
|
tokens: n,
|
|
655
655
|
walletSupportedChains: r,
|
|
656
656
|
balances: u,
|
|
657
657
|
across: "intents"
|
|
658
|
-
}), [A, D] = C(() => !
|
|
658
|
+
}), [A, D] = C(() => !l && !t ? [
|
|
659
659
|
{ token: ft({ tokens: n }), status: "loaded" },
|
|
660
660
|
{ token: void 0, status: "loaded" }
|
|
661
661
|
] : i.source.intents !== "none" && !t ? m ? [
|
|
@@ -674,7 +674,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
674
674
|
n,
|
|
675
675
|
t,
|
|
676
676
|
i,
|
|
677
|
-
|
|
677
|
+
l,
|
|
678
678
|
m,
|
|
679
679
|
r,
|
|
680
680
|
a
|
|
@@ -682,7 +682,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
682
682
|
return h(() => {
|
|
683
683
|
if (!e)
|
|
684
684
|
return;
|
|
685
|
-
if (S(o, ["initial_dry", "initial_wallet"]) && (A.status === "loaded" && !o.sourceToken &&
|
|
685
|
+
if (S(o, ["initial_dry", "initial_wallet"]) && (A.status === "loaded" && !o.sourceToken && d("tokenSelect", {
|
|
686
686
|
variant: "source",
|
|
687
687
|
token: A.token
|
|
688
688
|
}), D.status === "loaded" && A.status === "loaded" && !o.targetToken)) {
|
|
@@ -691,7 +691,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
691
691
|
(f) => !f.isIntent && f.symbol === o.sourceToken?.symbol && f.blockchain === W[c]
|
|
692
692
|
) : k = n.find(
|
|
693
693
|
(f) => f.isIntent && f.symbol === o.sourceToken?.symbol
|
|
694
|
-
)),
|
|
694
|
+
)), d("tokenSelect", {
|
|
695
695
|
variant: "target",
|
|
696
696
|
token: k
|
|
697
697
|
});
|
|
@@ -705,7 +705,7 @@ const N = x.getStore(), pt = Ce({
|
|
|
705
705
|
), f = setTimeout(() => {
|
|
706
706
|
if (!A.token)
|
|
707
707
|
if (!t && m)
|
|
708
|
-
|
|
708
|
+
d("tokenSelect", {
|
|
709
709
|
variant: "source",
|
|
710
710
|
token: m
|
|
711
711
|
});
|
|
@@ -713,12 +713,12 @@ const N = x.getStore(), pt = Ce({
|
|
|
713
713
|
const p = n.find(
|
|
714
714
|
(E) => !E.isIntent && E.blockchain === W[c] && E.symbol.toLowerCase() === Ee[W[c]]?.toLowerCase()
|
|
715
715
|
) ?? k;
|
|
716
|
-
|
|
716
|
+
d("tokenSelect", {
|
|
717
717
|
variant: "source",
|
|
718
718
|
token: p
|
|
719
719
|
});
|
|
720
720
|
} else
|
|
721
|
-
|
|
721
|
+
d("tokenSelect", {
|
|
722
722
|
variant: "source",
|
|
723
723
|
token: k
|
|
724
724
|
});
|
|
@@ -874,9 +874,7 @@ const Yn = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
|
|
|
874
874
|
return h(() => {
|
|
875
875
|
const o = R(t);
|
|
876
876
|
Object.assign(n.current.config, o), Mt(o);
|
|
877
|
-
}, [t]),
|
|
878
|
-
s && $e(s);
|
|
879
|
-
}, [s]), Fe("headlessui-portal-root", "sw"), /* @__PURE__ */ q(ye, { client: Wt, children: /* @__PURE__ */ q(we, { i18n: Te, children: /* @__PURE__ */ q(pe.Provider, { value: n.current, children: /* @__PURE__ */ q(Pt, { children: /* @__PURE__ */ q("div", { className: "sw", children: e }) }) }) }) });
|
|
877
|
+
}, [t]), $e(s ?? {}), Fe("headlessui-portal-root", "sw"), /* @__PURE__ */ q(ye, { client: Wt, children: /* @__PURE__ */ q(we, { i18n: Te, children: /* @__PURE__ */ q(pe.Provider, { value: n.current, children: /* @__PURE__ */ q(Pt, { children: /* @__PURE__ */ q("div", { className: "sw", children: e }) }) }) }) });
|
|
880
878
|
};
|
|
881
879
|
export {
|
|
882
880
|
j as A,
|
|
@@ -915,4 +913,4 @@ export {
|
|
|
915
913
|
Ot as y,
|
|
916
914
|
xt as z
|
|
917
915
|
};
|
|
918
|
-
//# sourceMappingURL=config-
|
|
916
|
+
//# sourceMappingURL=config-C3Ii_szE.js.map
|