@aurora-is-near/intents-swap-widget 3.18.1 → 3.18.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/components/Accordion.js +34 -35
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/Banner.js +33 -19
- package/dist/components/Banner.js.map +1 -1
- package/dist/components/BlockingError.js +11 -16
- package/dist/components/BlockingError.js.map +1 -1
- package/dist/components/Button.d.ts +10 -2
- package/dist/components/Button.js +53 -43
- package/dist/components/Button.js.map +1 -1
- package/dist/components/CloseButton.js +6 -6
- package/dist/components/CloseButton.js.map +1 -1
- 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/DirectionSwitcher.js +12 -11
- package/dist/components/DirectionSwitcher.js.map +1 -1
- package/dist/components/Input.d.ts +5 -3
- package/dist/components/Input.js +16 -16
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Notes.js +1 -1
- package/dist/components/Notes.js.map +1 -1
- package/dist/components/StatusWidget.js +8 -21
- package/dist/components/StatusWidget.js.map +1 -1
- package/dist/{config-DJObWR7Z.js → config-BMvXuF1-.js} +692 -673
- package/dist/config-BMvXuF1-.js.map +1 -0
- package/dist/config.js +21 -6
- 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/AllNetworksIcon.js +3 -3
- package/dist/features/ChainsDropdown/AllNetworksIcon.js.map +1 -1
- package/dist/features/ChainsDropdown/ChainItem.js +7 -7
- package/dist/features/ChainsDropdown/ChainItem.js.map +1 -1
- package/dist/features/ChainsDropdown/index.js +45 -33
- package/dist/features/ChainsDropdown/index.js.map +1 -1
- package/dist/features/DepositMethodSwitcher.js +18 -17
- package/dist/features/DepositMethodSwitcher.js.map +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +22 -15
- package/dist/features/ExternalDeposit.js.map +1 -1
- package/dist/features/SendAddress/index.js +15 -14
- package/dist/features/SendAddress/index.js.map +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 +11 -11
- package/dist/features/TokensModal.js.map +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +19 -6
- 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.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/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/tailwind.css +9 -0
- package/dist/theme/ThemeProvider.js +1 -1
- 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/widgets/WidgetDeposit/WidgetDepositContent.js +79 -71
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +94 -81
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +79 -67
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +1 -2
- package/src/components/Accordion.tsx +8 -9
- package/src/components/Banner.tsx +17 -8
- package/src/components/BlockingError.tsx +4 -6
- package/src/components/Button.tsx +26 -7
- package/src/components/CloseButton.tsx +2 -2
- package/src/components/CopyButton.tsx +14 -4
- package/src/components/DirectionSwitcher.tsx +4 -4
- package/src/components/Input.tsx +5 -4
- package/src/components/Notes.tsx +1 -1
- package/src/components/StatusWidget.tsx +4 -11
- package/src/features/ChainsDropdown/AllNetworksIcon.tsx +2 -2
- package/src/features/ChainsDropdown/ChainItem.tsx +2 -2
- package/src/features/ChainsDropdown/index.tsx +9 -3
- package/src/features/DepositMethodSwitcher.tsx +4 -3
- package/src/features/ExternalDeposit.tsx +2 -2
- package/src/features/SendAddress/index.tsx +3 -2
- 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/TokensModal.tsx +2 -2
- package/src/features/WalletCompatibilityCheck/WalletCompatibilityModal.tsx +8 -9
- package/src/machine/events/reset.ts +6 -3
- package/src/tailwind.css +9 -0
- package/src/types/localisation.ts +10 -3
- 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-DJObWR7Z.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/SuccessScreen/CheckIcon.tsx +0 -7
- package/src/features/SuccessScreen/ExternalAction.tsx +0 -15
- package/src/features/SuccessScreen/SummaryItem.tsx +0 -28
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../utils/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ab as a } from "../../config-BMvXuF1-.js";
|
|
4
4
|
import "../../components/TokenIcon.js";
|
|
5
5
|
import "../../components/TinyNumber.js";
|
|
6
6
|
import "../../utils/formatters/getUsdDisplayBalance.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
a as TokenItem
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=TokenItem.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "virtua";
|
|
3
3
|
import "react";
|
|
4
|
-
import { ac as g } from "../../config-
|
|
4
|
+
import { ac as g } from "../../config-BMvXuF1-.js";
|
|
5
5
|
import "./hooks/useFocusOnList.js";
|
|
6
6
|
import "./TokensListPlaceholder.js";
|
|
7
7
|
import "./constants.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { b as
|
|
2
|
+
import { SearchW700 as j } from "@material-symbols-svg/react-rounded/icons/search";
|
|
3
|
+
import { useRef as E, useState as f } from "react";
|
|
4
|
+
import { b as I, y as M, d as R, q as A } from "../config-BMvXuF1-.js";
|
|
5
5
|
import { ChainsDropdown as B } from "./ChainsDropdown/index.js";
|
|
6
6
|
import "@tanstack/react-query";
|
|
7
7
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
@@ -30,16 +30,16 @@ import { Input as v } from "../components/Input.js";
|
|
|
30
30
|
import { Banner as K } from "../components/Banner.js";
|
|
31
31
|
import { CloseButton as L } from "../components/CloseButton.js";
|
|
32
32
|
import { useTypedTranslation as O } from "../localisation.js";
|
|
33
|
-
const
|
|
33
|
+
const ke = ({
|
|
34
34
|
variant: n,
|
|
35
35
|
showBalances: w,
|
|
36
36
|
showChainsSelector: x,
|
|
37
37
|
chainsFilter: l,
|
|
38
38
|
groupTokens: C,
|
|
39
39
|
className: k,
|
|
40
|
-
onMsg:
|
|
40
|
+
onMsg: p
|
|
41
41
|
}) => {
|
|
42
|
-
const { t: y } = O(), { ctx: S } =
|
|
42
|
+
const { t: y } = O(), { ctx: S } = I(), { walletSupportedChains: _ } = M(), c = E(null), [r, s] = f(""), i = R(n), m = () => p({ type: "on_dismiss_tokens_modal" });
|
|
43
43
|
u(
|
|
44
44
|
"Escape",
|
|
45
45
|
() => {
|
|
@@ -47,7 +47,7 @@ const Ce = ({
|
|
|
47
47
|
},
|
|
48
48
|
[r]
|
|
49
49
|
), u("Alphanumeric", (e) => {
|
|
50
|
-
s((N) => N + e),
|
|
50
|
+
s((N) => N + e), c.current?.focus();
|
|
51
51
|
});
|
|
52
52
|
const b = i.length === 1 && i[0]?.id ? i[0]?.id : "all", [o, g] = f(b), d = o !== "all" && o !== "intents" && l.external !== "all" && !_.includes(o);
|
|
53
53
|
return /* @__PURE__ */ a(
|
|
@@ -68,8 +68,8 @@ const Ce = ({
|
|
|
68
68
|
v,
|
|
69
69
|
{
|
|
70
70
|
focusOnMount: !0,
|
|
71
|
-
icon: j
|
|
72
|
-
ref:
|
|
71
|
+
icon: j,
|
|
72
|
+
ref: c,
|
|
73
73
|
defaultValue: r,
|
|
74
74
|
className: "w-full",
|
|
75
75
|
placeholder: "Search or paste address",
|
|
@@ -123,7 +123,7 @@ const Ce = ({
|
|
|
123
123
|
s("");
|
|
124
124
|
break;
|
|
125
125
|
case "on_select_token":
|
|
126
|
-
|
|
126
|
+
p(e);
|
|
127
127
|
break;
|
|
128
128
|
default:
|
|
129
129
|
h(e, { throwError: !1 });
|
|
@@ -136,6 +136,6 @@ const Ce = ({
|
|
|
136
136
|
);
|
|
137
137
|
};
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
ke as TokensModal
|
|
140
140
|
};
|
|
141
141
|
//# sourceMappingURL=TokensModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokensModal.js","sources":["../../src/features/TokensModal.tsx"],"sourcesContent":["import {
|
|
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 { useRef, useState } from 'react';\n\nimport { TokensList } from './TokensList';\nimport { ChainsDropdown } from './ChainsDropdown';\nimport { useChains } from '../hooks';\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 <div className=\"gap-sw-xl flex items-center\">\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 {showChainsSelector && (\n <ChainsDropdown\n variant={variant}\n selected={selectedChain}\n chainsFilter={chainsFilter}\n onMsg={(msg) => {\n switch (msg.type) {\n case 'on_click_chain':\n setSelectedChain(msg.chain);\n break;\n default:\n notReachable(msg.type, { throwError: false });\n }\n }}\n />\n )}\n </div>\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","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AE;AAAA,YACA,OAAO,CAACS,MAAQ;AACd,sBAAQA,EAAI,MAAA;AAAA,gBACV,KAAK;AACH,kBAAApB,EAAU,EAAE;AACZ;AAAA,gBACF,KAAK;AACH,kBAAAV,EAAM8B,CAAG;AACT;AAAA,gBACF;AACE,kBAAAC,EAAaD,GAAK,EAAE,YAAY,GAAA,CAAO;AAAA,cAAA;AAAA,YAE7C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "@material-symbols-svg/react-rounded";
|
|
2
|
+
import "@material-symbols-svg/react-rounded/icons/account-balance-wallet";
|
|
3
|
+
import "@material-symbols-svg/react-rounded/icons/arming-countdown";
|
|
4
|
+
import "@material-symbols-svg/react-rounded/icons/beenhere";
|
|
5
|
+
import "@material-symbols-svg/react-rounded/icons/check-circle";
|
|
6
|
+
import "@material-symbols-svg/react-rounded/icons/encrypted";
|
|
7
|
+
import "@material-symbols-svg/react-rounded/icons/gpp-bad";
|
|
3
8
|
import "use-timer";
|
|
4
9
|
import "react";
|
|
5
10
|
import "../../localisation.js";
|
|
@@ -9,7 +14,7 @@ import "ethers";
|
|
|
9
14
|
import "../../utils/cn.js";
|
|
10
15
|
import "@tanstack/react-query";
|
|
11
16
|
import "@defuse-protocol/one-click-sdk-typescript";
|
|
12
|
-
import { af as
|
|
17
|
+
import { af as U, ae as X, z as Y } from "../../config-BMvXuF1-.js";
|
|
13
18
|
import "../../machine/machine.js";
|
|
14
19
|
import "zod";
|
|
15
20
|
import "../../utils/near/rpc.js";
|
|
@@ -24,17 +29,25 @@ import "../../network.js";
|
|
|
24
29
|
import "viem/chains";
|
|
25
30
|
import "browser-or-node";
|
|
26
31
|
import "../../hooks/useHandleKeyDown.js";
|
|
27
|
-
import "
|
|
32
|
+
import "@material-symbols-svg/react-rounded/icons/chevron-left";
|
|
28
33
|
import "../../components/Card.js";
|
|
34
|
+
import "@material-symbols-svg/react-rounded/icons/close";
|
|
35
|
+
import "@material-symbols-svg/react-rounded/icons/emergency";
|
|
36
|
+
import "@material-symbols-svg/react-rounded/icons/error";
|
|
37
|
+
import "@material-symbols-svg/react-rounded/icons/verified";
|
|
38
|
+
import "@material-symbols-svg/react-rounded/icons/cached";
|
|
29
39
|
import "../../components/Button.js";
|
|
30
40
|
import "copy-text-to-clipboard";
|
|
41
|
+
import "@material-symbols-svg/react-rounded/icons/content-copy";
|
|
42
|
+
import "@material-symbols-svg/react-rounded/icons/arrow-downward";
|
|
43
|
+
import "@material-symbols-svg/react-rounded/icons/progress-activity";
|
|
31
44
|
import "../../components/Input.js";
|
|
32
45
|
import "../../components/InputAmount.js";
|
|
33
46
|
import "../../components/Notes.js";
|
|
34
47
|
import "../../components/CloseButton.js";
|
|
35
48
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
U as ErrorView,
|
|
50
|
+
X as Initial,
|
|
51
|
+
Y as WalletCompatibilityModal
|
|
39
52
|
};
|
|
40
53
|
//# 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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.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-BMvXuF1-.js";
|
|
5
5
|
import "../constants/chains.js";
|
|
6
6
|
import "../constants/tokens.js";
|
|
7
7
|
import "../utils/checkers/isValidChain.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as S, e as l, d as k, u as T, f as g, g as h, h as C, j as B, i as E, k as I, a as M, c as W, l as w, n as D, m as A, b as v } from "./config-
|
|
1
|
+
import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as S, e as l, d as k, u as T, f as g, g as h, h as C, j as B, i as E, k as I, a as M, c as W, l as w, n as D, m as A, b as v } from "./config-BMvXuF1-.js";
|
|
2
2
|
import { DEFAULT_RPCS as b } from "./rpcs.js";
|
|
3
3
|
import { CHAINS as H } from "./chains.js";
|
|
4
4
|
import { Accordion as N } from "./components/Accordion.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "../../logger.js";
|
|
3
3
|
import "../guards/checks/isDryQuote.js";
|
|
4
|
-
import { P as a } from "../../config-
|
|
4
|
+
import { P as a } from "../../config-BMvXuF1-.js";
|
|
5
5
|
import "../guards/index.js";
|
|
6
6
|
import "../machine.js";
|
|
7
7
|
import "../events/utils/fireEvent.js";
|
|
@@ -2,7 +2,7 @@ import "react";
|
|
|
2
2
|
import "../../utils/solana/isSolanaAddress.js";
|
|
3
3
|
import "../../utils/evm/isEvmAddress.js";
|
|
4
4
|
import "../../utils/near/isNearAddress.js";
|
|
5
|
-
import { R as l } from "../../config-
|
|
5
|
+
import { R as l } from "../../config-BMvXuF1-.js";
|
|
6
6
|
import "../../utils/tokens/getMainTokenByChain.js";
|
|
7
7
|
import "../../utils/tokens/getDefaultIntentsToken.js";
|
|
8
8
|
import "../../utils/tokens/getTokenWithHighBalance.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "../../hooks/useWalletAddressForToken.js";
|
|
3
|
-
import { I as f } from "../../config-
|
|
3
|
+
import { I as f } from "../../config-BMvXuF1-.js";
|
|
4
4
|
import "../guards/index.js";
|
|
5
5
|
import "../machine.js";
|
|
6
6
|
import "../events/utils/fireEvent.js";
|
|
@@ -3,7 +3,7 @@ import "./tokenSelectRotate.js";
|
|
|
3
3
|
import "./errorSet.js";
|
|
4
4
|
import "./quoteSet.js";
|
|
5
5
|
import "./addressSet.js";
|
|
6
|
-
import { _ as b } from "../../config-
|
|
6
|
+
import { _ as b } from "../../config-BMvXuF1-.js";
|
|
7
7
|
import "./tokenSetAmount.js";
|
|
8
8
|
import "./quoteSetStatus.js";
|
|
9
9
|
import "./depositTypeSet.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Machine } from '..';
|
|
2
2
|
import { Context } from '../context';
|
|
3
3
|
export type ResetPayload = {
|
|
4
|
+
keepSelectedTokens?: boolean;
|
|
4
5
|
clearWalletAddress: boolean;
|
|
5
6
|
};
|
|
6
7
|
export declare const reset: (ctx: Context, payload: ResetPayload, m: Machine) => import('valtio-fsm').ChainableStateMachine<import('..').MachineState, Context>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = (e, o, s) => (e.sourceTokenBalance = void 0, e.sourceTokenAmount = "", e.targetTokenAmount = "", e.sendAddress = void 0, e.isDepositFromExternalWallet = !1, e.externalDepositTxReceived = void 0, e.error = null, e.quote = void 0, e.quoteStatus = "idle", e.transferStatus = { status: "idle" }, o.keepSelectedTokens || (e.sourceToken = void 0, e.targetToken = void 0), o.clearWalletAddress && (e.walletAddress = void 0), s);
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
r as reset
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=reset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.js","sources":["../../../src/machine/events/reset.ts"],"sourcesContent":["import type { Machine } from '@/machine';\nimport type { Context } from '@/machine/context';\n\nexport type ResetPayload = {\n clearWalletAddress: boolean;\n};\n\nexport const reset = (ctx: Context, payload: ResetPayload, m: Machine) => {\n ctx.
|
|
1
|
+
{"version":3,"file":"reset.js","sources":["../../../src/machine/events/reset.ts"],"sourcesContent":["import type { Machine } from '@/machine';\nimport type { Context } from '@/machine/context';\n\nexport type ResetPayload = {\n keepSelectedTokens?: boolean;\n clearWalletAddress: boolean;\n};\n\nexport const reset = (ctx: Context, payload: ResetPayload, m: Machine) => {\n ctx.sourceTokenBalance = undefined;\n ctx.sourceTokenAmount = '';\n ctx.targetTokenAmount = '';\n\n ctx.sendAddress = undefined;\n ctx.isDepositFromExternalWallet = false;\n ctx.externalDepositTxReceived = undefined;\n ctx.error = null;\n\n ctx.quote = undefined;\n ctx.quoteStatus = 'idle';\n ctx.transferStatus = { status: 'idle' };\n\n if (!payload.keepSelectedTokens) {\n ctx.sourceToken = undefined;\n ctx.targetToken = undefined;\n }\n\n if (payload.clearWalletAddress) {\n ctx.walletAddress = undefined;\n }\n\n return m;\n};\n"],"names":["reset","ctx","payload","m"],"mappings":"AAQO,MAAMA,IAAQ,CAACC,GAAcC,GAAuBC,OACzDF,EAAI,qBAAqB,QACzBA,EAAI,oBAAoB,IACxBA,EAAI,oBAAoB,IAExBA,EAAI,cAAc,QAClBA,EAAI,8BAA8B,IAClCA,EAAI,4BAA4B,QAChCA,EAAI,QAAQ,MAEZA,EAAI,QAAQ,QACZA,EAAI,cAAc,QAClBA,EAAI,iBAAiB,EAAE,QAAQ,OAAA,GAE1BC,EAAQ,uBACXD,EAAI,cAAc,QAClBA,EAAI,cAAc,SAGhBC,EAAQ,uBACVD,EAAI,gBAAgB,SAGfE;"}
|
|
@@ -3,7 +3,7 @@ import "../../utils/near/checkNearAccountExists.js";
|
|
|
3
3
|
import "../../utils/checkers/isNotEmptyAmount.js";
|
|
4
4
|
import "../../utils/checkers/isValidBigint.js";
|
|
5
5
|
import "../../utils/near/isNearAddress.js";
|
|
6
|
-
import { K as I, L as d, N as u } from "../../config-
|
|
6
|
+
import { K as I, L as d, N as u } from "../../config-BMvXuF1-.js";
|
|
7
7
|
import "../guards/index.js";
|
|
8
8
|
import "../machine.js";
|
|
9
9
|
import "../guards/checks/isBalanceSufficient.js";
|
package/dist/machine/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as o, u as t, a as r, c as a, b as f } from "../config-
|
|
1
|
+
import { r as o, u as t, a as r, c as a, b as f } from "../config-BMvXuF1-.js";
|
|
2
2
|
import { guardStates as S } from "./guards/index.js";
|
|
3
3
|
import { machine as n, moveTo as u } from "./machine.js";
|
|
4
4
|
import { fireEvent as i } from "./events/utils/fireEvent.js";
|
package/dist/machine/snap.js
CHANGED
|
@@ -2,7 +2,7 @@ import "valtio";
|
|
|
2
2
|
import "derive-valtio";
|
|
3
3
|
import "./computed/getIsNativeNearDeposit.js";
|
|
4
4
|
import "./computed/getIsDirectTokenOnNearDeposit.js";
|
|
5
|
-
import { u as h, a as b, b as d } from "../config-
|
|
5
|
+
import { u as h, a as b, b as d } from "../config-BMvXuF1-.js";
|
|
6
6
|
import "./machine.js";
|
|
7
7
|
import "./guards/index.js";
|
|
8
8
|
import "./computed/getUsdTradeDelta.js";
|