@aurora-is-near/intents-swap-widget 3.18.2 → 3.19.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.
- package/dist/components/Accordion.js +31 -32
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/AllNetworksIcon.js +11 -0
- package/dist/components/AllNetworksIcon.js.map +1 -0
- package/dist/components/Button.d.ts +8 -0
- package/dist/components/Button.js +53 -43
- package/dist/components/Button.js.map +1 -1
- package/dist/components/ChainShortcut.d.ts +15 -0
- package/dist/components/ChainShortcut.js +57 -0
- package/dist/components/ChainShortcut.js.map +1 -0
- package/dist/components/CopyButton.d.ts +5 -2
- package/dist/components/CopyButton.js +11 -7
- package/dist/components/CopyButton.js.map +1 -1
- package/dist/components/Notes.js +1 -1
- package/dist/components/Notes.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +21 -17
- package/dist/components/index.js.map +1 -1
- package/dist/{config-CgCb5P7j.js → config-C47AYcMK.js} +1006 -992
- package/dist/config-C47AYcMK.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +9 -10
- package/dist/config.js.map +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/TokenBalanceLoader.js +1 -1
- package/dist/features/BalanceRpcLoader/index.js +1 -1
- package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
- package/dist/features/ChainsDropdown/ChainItem.d.ts +1 -0
- package/dist/features/ChainsDropdown/ChainItem.js +23 -14
- package/dist/features/ChainsDropdown/ChainItem.js.map +1 -1
- package/dist/features/ChainsDropdown/index.js +61 -94
- package/dist/features/ChainsDropdown/index.js.map +1 -1
- package/dist/features/ChainsSelector/index.d.ts +15 -0
- package/dist/features/ChainsSelector/index.js +108 -0
- package/dist/features/ChainsSelector/index.js.map +1 -0
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +4 -3
- package/dist/features/ExternalDeposit.js.map +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/CopyableValue.d.ts +5 -0
- package/dist/features/SuccessScreen/CopyableValue.js +11 -0
- package/dist/features/SuccessScreen/CopyableValue.js.map +1 -0
- package/dist/features/SuccessScreen/TokenRow.d.ts +8 -0
- package/dist/features/SuccessScreen/TokenRow.js +20 -0
- package/dist/features/SuccessScreen/TokenRow.js.map +1 -0
- package/dist/features/SuccessScreen/index.d.ts +5 -4
- package/dist/features/SuccessScreen/index.js +151 -49
- package/dist/features/SuccessScreen/index.js.map +1 -1
- package/dist/features/SuccessScreen/useSummaryItemsCount.d.ts +1 -0
- package/dist/features/SuccessScreen/useSummaryItemsCount.js +14 -0
- package/dist/features/SuccessScreen/useSummaryItemsCount.js.map +1 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensList/index.js +1 -1
- package/dist/features/TokensModal.js +62 -64
- package/dist/features/TokensModal.js.map +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +5 -4
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js.map +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.d.ts +3 -1
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/index.js +74 -70
- package/dist/index.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/reset.d.ts +1 -0
- package/dist/machine/events/reset.js +2 -2
- package/dist/machine/events/reset.js.map +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/styles.css +1 -1
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/localisation.d.ts +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/utils/tokens/sort.d.ts +2 -1
- package/dist/utils/tokens/sort.js +55 -24
- package/dist/utils/tokens/sort.js.map +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +74 -73
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +70 -68
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +64 -62
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +1 -1
- package/src/components/Accordion.tsx +5 -6
- package/src/components/AllNetworksIcon.tsx +8 -0
- package/src/components/Button.tsx +17 -1
- package/src/components/ChainShortcut.tsx +67 -0
- package/src/components/CopyButton.tsx +12 -2
- package/src/components/Notes.tsx +1 -1
- package/src/components/index.ts +2 -0
- package/src/config.tsx +13 -0
- package/src/features/ChainsDropdown/ChainItem.tsx +17 -4
- package/src/features/ChainsDropdown/index.tsx +10 -41
- package/src/features/ChainsSelector/index.tsx +113 -0
- package/src/features/SuccessScreen/CopyableValue.tsx +13 -0
- package/src/features/SuccessScreen/TokenRow.tsx +26 -0
- package/src/features/SuccessScreen/index.tsx +161 -55
- package/src/features/SuccessScreen/useSummaryItemsCount.ts +33 -0
- package/src/features/TokensList/TokensList.tsx +2 -1
- package/src/features/TokensModal.tsx +29 -29
- package/src/hooks/useTokensFiltered.ts +4 -0
- package/src/machine/events/reset.ts +6 -3
- package/src/types/config.ts +8 -0
- package/src/types/localisation.ts +11 -3
- package/src/utils/tokens/sort.ts +107 -20
- package/src/widgets/WidgetDeposit/WidgetDepositContent.tsx +6 -4
- package/src/widgets/WidgetSwap/WidgetSwapContent.tsx +7 -4
- package/src/widgets/WidgetWithdraw/WidgetWithdrawContent.tsx +7 -4
- package/dist/config-CgCb5P7j.js.map +0 -1
- package/dist/features/ChainsDropdown/AllNetworksIcon.js +0 -7
- package/dist/features/ChainsDropdown/AllNetworksIcon.js.map +0 -1
- package/dist/features/SuccessScreen/CheckIcon.d.ts +0 -1
- package/dist/features/SuccessScreen/CheckIcon.js +0 -7
- package/dist/features/SuccessScreen/CheckIcon.js.map +0 -1
- package/dist/features/SuccessScreen/ExternalAction.d.ts +0 -5
- package/dist/features/SuccessScreen/ExternalAction.js +0 -16
- package/dist/features/SuccessScreen/ExternalAction.js.map +0 -1
- package/dist/features/SuccessScreen/SummaryItem.d.ts +0 -8
- package/dist/features/SuccessScreen/SummaryItem.js +0 -21
- package/dist/features/SuccessScreen/SummaryItem.js.map +0 -1
- package/src/features/ChainsDropdown/AllNetworksIcon.tsx +0 -7
- package/src/features/SuccessScreen/CheckIcon.tsx +0 -7
- package/src/features/SuccessScreen/ExternalAction.tsx +0 -15
- package/src/features/SuccessScreen/SummaryItem.tsx +0 -28
- /package/dist/{features/ChainsDropdown → components}/AllNetworksIcon.d.ts +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { b as
|
|
5
|
-
import { ChainsDropdown as B } from "./ChainsDropdown/index.js";
|
|
1
|
+
import { jsxs as i, jsx as t, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j, useState as f } from "react";
|
|
3
|
+
import { SearchW700 as I } from "@material-symbols-svg/react-rounded/icons/search";
|
|
4
|
+
import { b as M, y as R, d as A, q as B } from "../config-C47AYcMK.js";
|
|
6
5
|
import "@tanstack/react-query";
|
|
7
6
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
8
7
|
import "../constants/chains.js";
|
|
9
8
|
import "ethers";
|
|
10
9
|
import "../machine/machine.js";
|
|
11
|
-
import { notReachable as
|
|
10
|
+
import { notReachable as u } from "../utils/notReachable.js";
|
|
12
11
|
import "zod";
|
|
13
12
|
import "../utils/near/rpc.js";
|
|
14
13
|
import "../index-DEq3oXQF.js";
|
|
@@ -20,101 +19,100 @@ import "../index-xuotMAFm.js";
|
|
|
20
19
|
import "axios";
|
|
21
20
|
import "../network.js";
|
|
22
21
|
import "viem";
|
|
23
|
-
import { cn as
|
|
22
|
+
import { cn as E } from "../utils/cn.js";
|
|
24
23
|
import "viem/chains";
|
|
25
24
|
import "browser-or-node";
|
|
26
|
-
import { useHandleKeyDown as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
25
|
+
import { useHandleKeyDown as h } from "../hooks/useHandleKeyDown.js";
|
|
26
|
+
import { ChainsSelector as H } from "./ChainsSelector/index.js";
|
|
27
|
+
import { Hr as q } from "../components/Hr.js";
|
|
28
|
+
import { Card as D } from "../components/Card.js";
|
|
29
|
+
import { Input as K } from "../components/Input.js";
|
|
30
|
+
import { Banner as L } from "../components/Banner.js";
|
|
31
|
+
import { CloseButton as O } from "../components/CloseButton.js";
|
|
32
|
+
import { useTypedTranslation as U } from "../localisation.js";
|
|
33
|
+
const ye = ({
|
|
34
34
|
variant: n,
|
|
35
35
|
showBalances: w,
|
|
36
36
|
showChainsSelector: x,
|
|
37
|
-
chainsFilter:
|
|
37
|
+
chainsFilter: a,
|
|
38
38
|
groupTokens: C,
|
|
39
|
-
className:
|
|
39
|
+
className: y,
|
|
40
40
|
onMsg: p
|
|
41
41
|
}) => {
|
|
42
|
-
const { t:
|
|
43
|
-
|
|
42
|
+
const { t: S } = U(), { ctx: k } = M(), { walletSupportedChains: _ } = R(), c = j(null), [r, s] = f(""), l = A(n), m = () => p({ type: "on_dismiss_tokens_modal" });
|
|
43
|
+
h(
|
|
44
44
|
"Escape",
|
|
45
45
|
() => {
|
|
46
46
|
r ? s("") : m();
|
|
47
47
|
},
|
|
48
48
|
[r]
|
|
49
|
-
),
|
|
49
|
+
), h("Alphanumeric", (e) => {
|
|
50
50
|
s((N) => N + e), c.current?.focus();
|
|
51
51
|
});
|
|
52
|
-
const b =
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
-
|
|
52
|
+
const b = l.length === 1 && l[0]?.id ? l[0]?.id : "all", [o, g] = f(b), d = o !== "all" && o !== "intents" && a.external !== "all" && !_.includes(o);
|
|
53
|
+
return /* @__PURE__ */ i(
|
|
54
|
+
D,
|
|
55
55
|
{
|
|
56
56
|
padding: "none",
|
|
57
|
-
className:
|
|
57
|
+
className: E(
|
|
58
58
|
"w-full gap-sw-xl flex flex-col px-sw-2xl pt-sw-2xl",
|
|
59
|
-
|
|
59
|
+
y
|
|
60
60
|
),
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ i("header", { className: "flex items-center justify-between", children: [
|
|
63
63
|
/* @__PURE__ */ t("h2", { className: "text-sw-label-lg text-sw-gray-50", children: "Select token" }),
|
|
64
|
-
/* @__PURE__ */ t(
|
|
64
|
+
/* @__PURE__ */ t(O, { onClick: m })
|
|
65
65
|
] }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
h(e.type, { throwError: !1 });
|
|
92
|
-
}
|
|
66
|
+
/* @__PURE__ */ t(
|
|
67
|
+
K,
|
|
68
|
+
{
|
|
69
|
+
focusOnMount: !0,
|
|
70
|
+
icon: I,
|
|
71
|
+
ref: c,
|
|
72
|
+
defaultValue: r,
|
|
73
|
+
className: "w-full",
|
|
74
|
+
placeholder: "Search or paste address",
|
|
75
|
+
onChange: (e) => s(e.target.value.trim())
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
x && /* @__PURE__ */ t(
|
|
79
|
+
H,
|
|
80
|
+
{
|
|
81
|
+
variant: n,
|
|
82
|
+
chainsFilter: a,
|
|
83
|
+
selectedChain: o,
|
|
84
|
+
onMsg: (e) => {
|
|
85
|
+
switch (e.type) {
|
|
86
|
+
case "on_select_chain":
|
|
87
|
+
g(e.chain);
|
|
88
|
+
break;
|
|
89
|
+
default:
|
|
90
|
+
u(e.type);
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
d && !!
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
d && !!k.walletAddress && /* @__PURE__ */ i(T, { children: [
|
|
98
96
|
/* @__PURE__ */ t(
|
|
99
|
-
|
|
97
|
+
L,
|
|
100
98
|
{
|
|
101
99
|
variant: "error",
|
|
102
|
-
message:
|
|
100
|
+
message: S(
|
|
103
101
|
"wallet.connected.error.notSupportedChain",
|
|
104
102
|
"This network isn’t supported by your wallet."
|
|
105
103
|
)
|
|
106
104
|
}
|
|
107
105
|
),
|
|
108
|
-
/* @__PURE__ */ t(
|
|
106
|
+
/* @__PURE__ */ t(q, {})
|
|
109
107
|
] }),
|
|
110
108
|
/* @__PURE__ */ t(
|
|
111
|
-
|
|
109
|
+
B,
|
|
112
110
|
{
|
|
113
111
|
variant: n,
|
|
114
112
|
search: r,
|
|
115
113
|
groupTokens: C,
|
|
116
114
|
showBalances: w,
|
|
117
|
-
chainsFilter:
|
|
115
|
+
chainsFilter: a,
|
|
118
116
|
selectedChain: o,
|
|
119
117
|
chainIsNotSupported: d,
|
|
120
118
|
onMsg: (e) => {
|
|
@@ -126,7 +124,7 @@ const ke = ({
|
|
|
126
124
|
p(e);
|
|
127
125
|
break;
|
|
128
126
|
default:
|
|
129
|
-
|
|
127
|
+
u(e, { throwError: !1 });
|
|
130
128
|
}
|
|
131
129
|
}
|
|
132
130
|
}
|
|
@@ -136,6 +134,6 @@ const ke = ({
|
|
|
136
134
|
);
|
|
137
135
|
};
|
|
138
136
|
export {
|
|
139
|
-
|
|
137
|
+
ye as TokensModal
|
|
140
138
|
};
|
|
141
139
|
//# sourceMappingURL=TokensModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokensModal.js","sources":["../../src/features/TokensModal.tsx"],"sourcesContent":["import { SearchW700 as Search } from '@material-symbols-svg/react-rounded/icons/search';\nimport {
|
|
1
|
+
{"version":3,"file":"TokensModal.js","sources":["../../src/features/TokensModal.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { SearchW700 as Search } from '@material-symbols-svg/react-rounded/icons/search';\n\nimport { useChains } from '../hooks';\nimport { TokensList } from './TokensList';\nimport { ChainsSelector } from './ChainsSelector';\n\nimport { Hr } from '@/components/Hr';\nimport { Card } from '@/components/Card';\nimport { Input } from '@/components/Input';\nimport { Banner } from '@/components/Banner';\nimport { CloseButton } from '@/components/CloseButton';\n\nimport { cn } from '@/utils/cn';\nimport { useConfig } from '@/config';\nimport { useHandleKeyDown } from '@/hooks';\nimport { useUnsafeSnapshot } from '@/machine/snap';\nimport { notReachable } from '@/utils/notReachable';\nimport { useTypedTranslation } from '@/localisation';\nimport type { Chains, ChainsFilter } from '@/types/chain';\nimport type { Token } from '@/types/token';\n\ntype Msg =\n | { type: 'on_select_token'; token: Token }\n | { type: 'on_dismiss_tokens_modal' };\n\ntype Props = {\n variant: 'source' | 'target';\n groupTokens: boolean;\n showBalances: boolean;\n showChainsSelector: boolean;\n chainsFilter: ChainsFilter;\n className?: string;\n onMsg: (msg: Msg) => void;\n};\n\nexport const TokensModal = ({\n variant,\n showBalances,\n showChainsSelector,\n chainsFilter,\n groupTokens,\n className,\n onMsg,\n}: Props) => {\n const { t } = useTypedTranslation();\n const { ctx } = useUnsafeSnapshot();\n const { walletSupportedChains } = useConfig();\n\n const searchInputRef = useRef<HTMLInputElement>(null);\n const [search, setSearch] = useState('');\n const chains = useChains(variant);\n\n const handleClose = () => onMsg({ type: 'on_dismiss_tokens_modal' });\n\n useHandleKeyDown(\n 'Escape',\n () => {\n if (search) {\n setSearch('');\n } else {\n handleClose();\n }\n },\n [search],\n );\n\n useHandleKeyDown('Alphanumeric', (key) => {\n setSearch((s) => s + key);\n searchInputRef.current?.focus();\n });\n\n // If there is only one chain available, select it by default\n const defaultChain =\n chains.length === 1 && chains[0]?.id ? chains[0]?.id : 'all';\n\n const [selectedChain, setSelectedChain] = useState<\n 'all' | 'intents' | Chains\n >(defaultChain);\n\n // selected chain is not supported by connected wallet\n const chainIsNotSupported =\n selectedChain !== 'all' &&\n selectedChain !== 'intents' &&\n chainsFilter.external !== 'all' &&\n !walletSupportedChains.includes(selectedChain);\n\n return (\n <Card\n padding=\"none\"\n className={cn(\n 'w-full gap-sw-xl flex flex-col px-sw-2xl pt-sw-2xl',\n className,\n )}>\n <header className=\"flex items-center justify-between\">\n <h2 className=\"text-sw-label-lg text-sw-gray-50\">Select token</h2>\n <CloseButton onClick={handleClose} />\n </header>\n\n <Input\n focusOnMount\n icon={Search}\n ref={searchInputRef}\n defaultValue={search}\n className=\"w-full\"\n placeholder=\"Search or paste address\"\n onChange={(e) => setSearch(e.target.value.trim())}\n />\n\n {showChainsSelector && (\n <ChainsSelector\n variant={variant}\n chainsFilter={chainsFilter}\n selectedChain={selectedChain}\n onMsg={(msg) => {\n switch (msg.type) {\n case 'on_select_chain':\n setSelectedChain(msg.chain);\n break;\n default:\n notReachable(msg.type);\n }\n }}\n />\n )}\n\n {chainIsNotSupported && !!ctx.walletAddress && (\n <>\n <Banner\n variant=\"error\"\n message={t(\n 'wallet.connected.error.notSupportedChain',\n 'This network isn’t supported by your wallet.',\n )}\n />\n <Hr />\n </>\n )}\n\n <TokensList\n variant={variant}\n search={search}\n groupTokens={groupTokens}\n showBalances={showBalances}\n chainsFilter={chainsFilter}\n selectedChain={selectedChain}\n chainIsNotSupported={chainIsNotSupported}\n onMsg={(msg) => {\n switch (msg.type) {\n case 'on_reset_search':\n setSearch('');\n break;\n case 'on_select_token':\n onMsg(msg);\n break;\n default:\n notReachable(msg, { throwError: false });\n }\n }}\n />\n </Card>\n );\n};\n"],"names":["TokensModal","variant","showBalances","showChainsSelector","chainsFilter","groupTokens","className","onMsg","t","useTypedTranslation","ctx","useUnsafeSnapshot","walletSupportedChains","useConfig","searchInputRef","useRef","search","setSearch","useState","chains","useChains","handleClose","useHandleKeyDown","key","s","defaultChain","selectedChain","setSelectedChain","chainIsNotSupported","jsxs","Card","cn","jsx","CloseButton","Input","Search","ChainsSelector","msg","notReachable","Fragment","Banner","Hr","TokensList"],"mappings":"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"}
|
|
@@ -14,7 +14,7 @@ import "ethers";
|
|
|
14
14
|
import "../../utils/cn.js";
|
|
15
15
|
import "@tanstack/react-query";
|
|
16
16
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
17
|
-
import { af as
|
|
17
|
+
import { af as X, ae as Y, z as Z } from "../../config-C47AYcMK.js";
|
|
18
18
|
import "../../machine/machine.js";
|
|
19
19
|
import "zod";
|
|
20
20
|
import "../../utils/near/rpc.js";
|
|
@@ -45,9 +45,10 @@ import "../../components/Input.js";
|
|
|
45
45
|
import "../../components/InputAmount.js";
|
|
46
46
|
import "../../components/Notes.js";
|
|
47
47
|
import "../../components/CloseButton.js";
|
|
48
|
+
import "../../components/ChainShortcut.js";
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
X as ErrorView,
|
|
51
|
+
Y as Initial,
|
|
52
|
+
Z as WalletCompatibilityModal
|
|
52
53
|
};
|
|
53
54
|
//# sourceMappingURL=WalletCompatibilityModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletCompatibilityModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WalletCompatibilityModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as r } from "react";
|
|
3
|
-
import { b, z as n } from "../../config-
|
|
3
|
+
import { b, z as n } from "../../config-C47AYcMK.js";
|
|
4
4
|
import "ethers";
|
|
5
5
|
import "../../machine/machine.js";
|
|
6
6
|
import { notReachable as l } from "../../utils/notReachable.js";
|
package/dist/features/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as r, S as t, o as p, p as a, T as s, q as n } from "../config-
|
|
1
|
+
import { B as r, S as t, o as p, p as a, T as s, q as n } from "../config-C47AYcMK.js";
|
|
2
2
|
import { ChainsDropdown as m } from "./ChainsDropdown/index.js";
|
|
3
3
|
import { SendAddress as c } from "./SendAddress/index.js";
|
|
4
4
|
import { SuccessScreen as S } from "./SuccessScreen/index.js";
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as a, d as r, f as o, g as t, h as n, j as u, i as f, k as l, l as m, n as k, m as p } from "../config-
|
|
1
|
+
import { e as a, d as r, f as o, g as t, h as n, j as u, i as f, k as l, l as m, n as k, m as p } from "../config-C47AYcMK.js";
|
|
2
2
|
import { useMakeEvmTransfer as T } from "./useMakeEvmTransfer.js";
|
|
3
3
|
import { useMakeSolanaTransfer as M } from "./useMakeSolanaTransfer.js";
|
|
4
4
|
import { useTokenInputPair as c } from "./useTokenInputPair.js";
|
package/dist/hooks/useChains.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState as f } from "react";
|
|
2
2
|
import { B as l } from "../index-DEq3oXQF.js";
|
|
3
3
|
import { verifyWalletSignature as N, walletVerificationMessageFactory as p } from "../utils/intents/walletCompatibilityVerification.js";
|
|
4
|
-
import { y, w as o } from "../config-
|
|
4
|
+
import { y, w as o } from "../config-C47AYcMK.js";
|
|
5
5
|
import { notReachable as A } from "../utils/notReachable.js";
|
|
6
6
|
import { getIntentsAccountId as S } from "../utils/intents/getIntentsAccountId.js";
|
|
7
7
|
import { localStorageTyped as u } from "../utils/localstorage.js";
|
|
@@ -5,7 +5,7 @@ import "ethers";
|
|
|
5
5
|
import "../../utils/cn.js";
|
|
6
6
|
import { notReachable as l } from "../../utils/notReachable.js";
|
|
7
7
|
import { useOneClickExternalDepositStatus as p } from "./useOneClickExternalDepositStatus.js";
|
|
8
|
-
import { b as c, u as m, A as S, v as f } from "../../config-
|
|
8
|
+
import { b as c, u as m, A as S, v as f } from "../../config-C47AYcMK.js";
|
|
9
9
|
import { WNEAR_ASSET_ID as D } from "../../constants/tokens.js";
|
|
10
10
|
import { guardStates as h } from "../../machine/guards/index.js";
|
|
11
11
|
import "../../machine/machine.js";
|
|
@@ -4,7 +4,7 @@ import "change-case";
|
|
|
4
4
|
import "../utils/near/getRandomBytes.js";
|
|
5
5
|
import "../utils/intents/signers/solana.js";
|
|
6
6
|
import "../logger.js";
|
|
7
|
-
import { g as b } from "../config-
|
|
7
|
+
import { g as b } from "../config-C47AYcMK.js";
|
|
8
8
|
import "../constants/chains.js";
|
|
9
9
|
import "../constants/intents.js";
|
|
10
10
|
import "../utils/notReachable.js";
|
|
@@ -3,7 +3,7 @@ import "change-case";
|
|
|
3
3
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
4
4
|
import "axios";
|
|
5
5
|
import "../logger.js";
|
|
6
|
-
import { h as M } from "../config-
|
|
6
|
+
import { h as M } from "../config-C47AYcMK.js";
|
|
7
7
|
import "../network.js";
|
|
8
8
|
import "../machine/guards/index.js";
|
|
9
9
|
import "../constants/tokens.js";
|
|
@@ -9,7 +9,7 @@ import "../utils/isErrorLikeObject.js";
|
|
|
9
9
|
import "./useMakeEvmTransfer.js";
|
|
10
10
|
import "../utils/evm/isEvmAddress.js";
|
|
11
11
|
import "./useMakeSolanaTransfer.js";
|
|
12
|
-
import { j as T } from "../config-
|
|
12
|
+
import { j as T } from "../config-C47AYcMK.js";
|
|
13
13
|
import "../utils/solana/isSolanaAddress.js";
|
|
14
14
|
import "../logger.js";
|
|
15
15
|
import "../constants/tokens.js";
|
package/dist/hooks/useTheme.js
CHANGED
package/dist/hooks/useTokens.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "@tanstack/react-query";
|
|
3
3
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
4
|
-
import { n } from "../config-
|
|
4
|
+
import { n } from "../config-C47AYcMK.js";
|
|
5
5
|
import "../constants/chains.js";
|
|
6
6
|
import "../constants/tokens.js";
|
|
7
7
|
import "../utils/checkers/isValidChain.js";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Chains, ChainsFilter } from '../types/chain';
|
|
2
|
+
import { PriorityAssets } from '../types/config';
|
|
2
3
|
export type TokensFilterOptions = {
|
|
3
4
|
variant: 'source' | 'target';
|
|
4
5
|
search: string;
|
|
5
6
|
selectedChain: Chains | 'all' | 'intents';
|
|
6
7
|
chainsFilter: ChainsFilter;
|
|
7
8
|
walletSupportedChains: ReadonlyArray<Chains>;
|
|
9
|
+
priorityAssets: PriorityAssets;
|
|
8
10
|
};
|
|
9
|
-
export declare const useTokensFiltered: ({ variant, search, selectedChain, chainsFilter, walletSupportedChains, }: TokensFilterOptions) => {
|
|
11
|
+
export declare const useTokensFiltered: ({ variant, search, selectedChain, chainsFilter, walletSupportedChains, priorityAssets, }: TokensFilterOptions) => {
|
|
10
12
|
all: import('..').Token[];
|
|
11
13
|
intents: import('..').Token[];
|
|
12
14
|
wallet: import('..').Token[];
|