@aurora-is-near/intents-swap-widget 3.26.2 → 3.26.3
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-C5COAGpG.js → config-BqHbn1-k.js} +13 -13
- package/dist/{config-C5COAGpG.js.map → config-BqHbn1-k.js.map} +1 -1
- package/dist/config.js +2 -2
- 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/TokenBalanceLoader.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/ChainsSelector/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/SuccessScreen/useSummaryItemsCount.js +1 -1
- package/dist/features/SwapDirectionSwitcher.js +1 -1
- package/dist/features/SwapQuote/SwapQuote.js +1 -1
- package/dist/features/SwapQuote/index.js +1 -1
- package/dist/features/TokenInput/TokenInput.js +1 -1
- package/dist/features/TokenInput/TokenInputEmpty.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/index.js +1 -1
- package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
- package/dist/features/TokenInput/index.js +1 -1
- package/dist/features/TokensList/TokenItem.js +1 -1
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensList/index.js +1 -1
- package/dist/features/TokensModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/index.js +1 -1
- package/dist/features/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAllTokens.js +1 -1
- package/dist/hooks/useChains.js +1 -1
- package/dist/hooks/useCompatibilityCheck.js +1 -1
- package/dist/hooks/useDefaultToken.js +1 -1
- package/dist/hooks/useExternalDepositStatus/index.js +1 -1
- package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
- package/dist/hooks/useIntentsBalance.js +1 -1
- package/dist/hooks/useIsCompatibilityCheckRequired.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/useSwitchChain.js +1 -1
- package/dist/hooks/useTheme.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 +20 -20
- 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/events/validateInputs.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/theme/ThemeProvider.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/Widget/WidgetContent.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +1 -1
- package/src/config.tsx +2 -2
- package/src/localisation.tsx +15 -13
|
@@ -7,18 +7,18 @@ import { HelmetProvider as zt, Helmet as Yt } from "react-helmet-async";
|
|
|
7
7
|
import { memo as Xt, useEffect as R, useMemo as B, useRef as Z, useCallback as le, useState as re, useId as Zt, createContext as mt, useContext as Jt } from "react";
|
|
8
8
|
import { useQuery as De, useInfiniteQuery as en, useQueryClient as tn, QueryClient as nn, QueryClientProvider as rn } from "@tanstack/react-query";
|
|
9
9
|
import { Trans as sn, I18nextProvider as an } from "react-i18next";
|
|
10
|
-
import { useTypedTranslation as K, initLocalisation as on } from "./localisation.js";
|
|
11
10
|
import { logger as C } from "./logger.js";
|
|
12
|
-
import { getTonTokenBalance as
|
|
13
|
-
import { getSolanaTokenBalance as
|
|
11
|
+
import { getTonTokenBalance as on } from "./utils/ton/getTonTokenBalance.js";
|
|
12
|
+
import { getSolanaTokenBalance as cn } from "./utils/solana/getSolanaTokenBalance.js";
|
|
14
13
|
import { useWalletAddressForToken as ft } from "./hooks/useWalletAddressForToken.js";
|
|
15
14
|
import "@headlessui/react";
|
|
16
15
|
import "@material-symbols-svg/react-rounded/icons/chevron-left";
|
|
17
16
|
import "framer-motion";
|
|
18
17
|
import "./features/ChainsDropdown/ChainItem.js";
|
|
19
18
|
import { cn as H } from "./utils/cn.js";
|
|
20
|
-
import { OneClickService as
|
|
21
|
-
import { CHAINS_LIST as pt, DEFAULT_CHAINS_ORDER as ht, CHAIN_POA_MAP as Tt, POA_EVM_CHAIN_ID as gt, CHAIN_BASE_TOKENS as
|
|
19
|
+
import { OneClickService as ln, QuoteRequest as W, GetExecutionStatusResponse as te } from "@defuse-protocol/one-click-sdk-typescript";
|
|
20
|
+
import { CHAINS_LIST as pt, DEFAULT_CHAINS_ORDER as ht, CHAIN_POA_MAP as Tt, POA_EVM_CHAIN_ID as gt, CHAIN_BASE_TOKENS as dn, EVM_CHAIN_IDS_MAP as Ne, CHAIN_IDS_MAP as un, EVM_CHAINS as mn } from "./constants/chains.js";
|
|
21
|
+
import { useTypedTranslation as K, useLocalisation as fn } from "./localisation.js";
|
|
22
22
|
import "use-debounce";
|
|
23
23
|
import "@material-symbols-svg/react-rounded/icons/wand-shine";
|
|
24
24
|
import { derive as pn } from "derive-valtio";
|
|
@@ -197,7 +197,7 @@ function rs({ rpcs: e, token: t, connectedWallets: s }) {
|
|
|
197
197
|
const i = e[t.blockchain] ?? [];
|
|
198
198
|
return i.length > 0 ? ns(t, l, i[0]) : null;
|
|
199
199
|
}
|
|
200
|
-
return t.blockchain === "ton" ?
|
|
200
|
+
return t.blockchain === "ton" ? on(t, l, r) : t.blockchain === "sol" && n.includes(t.blockchain) ? cn(t, l, a) : (C.warn(
|
|
201
201
|
`Failed to fetch token balance for ${t.symbol} on ${t.blockchain}`
|
|
202
202
|
), null);
|
|
203
203
|
}
|
|
@@ -239,7 +239,7 @@ const rt = Object.assign(xt, {
|
|
|
239
239
|
fetchTargetTokens: i
|
|
240
240
|
} = y(), { data: d, ...u } = De({
|
|
241
241
|
queryKey: ["tokens", e].filter(Boolean),
|
|
242
|
-
queryFn: async () => e === "source" && l ? l() : e === "target" && i ? i() :
|
|
242
|
+
queryFn: async () => e === "source" && l ? l() : e === "target" && i ? i() : ln.getTokens()
|
|
243
243
|
}), c = B(() => {
|
|
244
244
|
if (!d)
|
|
245
245
|
return [];
|
|
@@ -976,7 +976,7 @@ const ms = (e) => {
|
|
|
976
976
|
}, [r, f, w, e]);
|
|
977
977
|
const p = (k, I) => {
|
|
978
978
|
const b = n.find(
|
|
979
|
-
(E) => !E.isIntent && E.blockchain === we[k] && E.symbol.toLowerCase() ===
|
|
979
|
+
(E) => !E.isIntent && E.blockchain === we[k] && E.symbol.toLowerCase() === dn[we[k]]?.toLowerCase()
|
|
980
980
|
) ?? I;
|
|
981
981
|
h("tokenSelect", {
|
|
982
982
|
variant: "source",
|
|
@@ -1074,7 +1074,7 @@ const ms = (e) => {
|
|
|
1074
1074
|
O("quoteSetStatus", Mn), O("walletAddressSet", Hn), O("transferSetStatus", jn), O("tokenSelectRotate", ye), O("tokenSetBalance", Gn), O("tokenSetAmount", Vn), O("depositTypeSet", $n), O("setInputsValidating", Kn), O("externalDepositTxSet", Qn), O("tokenSelect", ys), O("addressSet", Wn), O("errorSet", Un), O("quoteSet", Pn), O("reset", qn), O("validateDryInputs", Ft), O("validateExternalInputs", Lt), O("validateInternalInputs", Bt);
|
|
1075
1075
|
}, Cs = gn(({ debug: e }) => {
|
|
1076
1076
|
e && C.debug(
|
|
1077
|
-
"[WIDGET] Debug mode is enabled (package version: 3.26.
|
|
1077
|
+
"[WIDGET] Debug mode is enabled (package version: 3.26.3)"
|
|
1078
1078
|
), Es(), bs({ debug: e }), _s({ debug: e });
|
|
1079
1079
|
}), Oc = ({ listenTo: e, debug: t = !1 }) => {
|
|
1080
1080
|
R(() => {
|
|
@@ -1669,7 +1669,7 @@ const Ls = ({
|
|
|
1669
1669
|
// no hash means completion not trackable for this bridge
|
|
1670
1670
|
hash: b.hash ?? "",
|
|
1671
1671
|
transactionLink: b.hash ? pr(
|
|
1672
|
-
|
|
1672
|
+
un[t.targetToken.blockchain],
|
|
1673
1673
|
b.hash
|
|
1674
1674
|
) : ""
|
|
1675
1675
|
};
|
|
@@ -2859,7 +2859,7 @@ const ct = [
|
|
|
2859
2859
|
slippageTolerance: 100,
|
|
2860
2860
|
// 1%
|
|
2861
2861
|
intentsAccountType: "evm",
|
|
2862
|
-
walletSupportedChains:
|
|
2862
|
+
walletSupportedChains: mn,
|
|
2863
2863
|
connectedWallets: {},
|
|
2864
2864
|
enableAutoTokensSwitching: !0,
|
|
2865
2865
|
showIntentTokens: !0,
|
|
@@ -2911,7 +2911,7 @@ const ct = [
|
|
|
2911
2911
|
...t
|
|
2912
2912
|
});
|
|
2913
2913
|
Object.assign(l.current.config, i), ha(i);
|
|
2914
|
-
}, [t]),
|
|
2914
|
+
}, [t]), fn(n), Yr("headlessui-portal-root", "sw"), /* @__PURE__ */ o(rn, { client: fa, children: /* @__PURE__ */ o(an, { i18n: jt, children: /* @__PURE__ */ T(Mt.Provider, { value: l.current, children: [
|
|
2915
2915
|
/* @__PURE__ */ T(zt, { children: [
|
|
2916
2916
|
/* @__PURE__ */ T(Yt, { children: [
|
|
2917
2917
|
/* @__PURE__ */ o("link", { rel: "preconnect", href: "https://rsms.me/" }),
|
|
@@ -3002,4 +3002,4 @@ export {
|
|
|
3002
3002
|
y,
|
|
3003
3003
|
Wc as z
|
|
3004
3004
|
};
|
|
3005
|
-
//# sourceMappingURL=config-
|
|
3005
|
+
//# sourceMappingURL=config-BqHbn1-k.js.map
|