@multiversx/sdk-dapp-liquidity 1.1.0-alpha.2 → 1.1.0-alpha.21
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/README.md +6 -1
- package/api/getTransactions.d.ts +8 -2
- package/api/getTransactions.js +23 -3
- package/api/getTransactions.mjs +23 -3
- package/api/tests/getChains.spec.js +2 -1
- package/api/tests/getChains.spec.mjs +2 -1
- package/api/tests/getTokens.spec.js +2 -2
- package/api/tests/getTokens.spec.mjs +2 -2
- package/api/tests/getTransactions.spec.js +79 -69
- package/api/tests/getTransactions.spec.mjs +79 -69
- package/constants/index.d.ts +1 -1
- package/constants/index.js +1 -1
- package/constants/index.mjs +1 -1
- package/dto/Chain.dto.d.ts +3 -1
- package/dto/ConfirmRate.dto.d.ts +1 -0
- package/dto/Token.dto.d.ts +7 -2
- package/index.js +44 -16
- package/index.mjs +14 -16
- package/package.json +10 -6
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +3 -1
- package/reactjs/components/BridgeForm/BridgeForm.js +182 -87
- package/reactjs/components/BridgeForm/BridgeForm.mjs +153 -58
- package/reactjs/components/BridgeHistory/BridgeHistory.js +73 -26
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +68 -21
- package/reactjs/components/Connect/BridgeAccountDisplay.js +2 -5
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +2 -5
- package/reactjs/components/Connect/CustomConnectButton.js +2 -5
- package/reactjs/components/Connect/CustomConnectButton.mjs +1 -4
- package/reactjs/components/Connect/MvxConnectButton.d.ts +2 -4
- package/reactjs/components/Connect/MvxConnectButton.js +2 -2
- package/reactjs/components/Connect/MvxConnectButton.mjs +2 -2
- package/reactjs/components/Connect/SwitchChainButton.js +2 -6
- package/reactjs/components/Connect/SwitchChainButton.mjs +1 -5
- package/reactjs/components/CopyButton/CopyButton.js +2 -2
- package/reactjs/components/CopyButton/CopyButton.mjs +2 -2
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +5 -5
- package/reactjs/components/Error/Error.d.ts +6 -0
- package/reactjs/components/Error/Error.js +67 -0
- package/reactjs/components/Error/Error.mjs +66 -0
- package/reactjs/components/Error/index.d.ts +1 -0
- package/reactjs/components/Error/index.js +5 -0
- package/reactjs/components/Error/index.mjs +4 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +2 -1
- package/reactjs/components/TokenSelector/TokenSelector.js +17 -9
- package/reactjs/components/TokenSelector/TokenSelector.mjs +13 -5
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +2 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +7 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +4 -0
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -1
- package/reactjs/components/TokenSelector/components/SelectContent.js +12 -9
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +4 -1
- package/reactjs/components/TokenSelector/components/TokenIcon.js +3 -3
- package/reactjs/components/TokenSelector/components/TokenItem.js +9 -9
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +6 -6
- package/reactjs/components/base/MxCard/MxCard.js +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +4 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +29 -0
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +28 -0
- package/reactjs/components/base/MxCircleLoader/index.d.ts +1 -0
- package/reactjs/components/base/MxCircleLoader/index.js +5 -0
- package/reactjs/components/base/MxCircleLoader/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.js +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +4 -4
- package/reactjs/components/base/MxSlideover/MxSlideover.js +4 -4
- package/reactjs/components/base/MxTooltip/MxTooltip.js +9 -9
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +2 -2
- package/reactjs/components/index.d.ts +1 -0
- package/reactjs/components/index.js +2 -0
- package/reactjs/components/index.mjs +2 -0
- package/reactjs/context/Web3AppProvider.d.ts +3 -1
- package/reactjs/context/Web3AppProvider.js +7 -5
- package/reactjs/context/Web3AppProvider.mjs +4 -2
- package/reactjs/context/useWeb3App.js +2 -2
- package/reactjs/hooks/index.js +1 -1
- package/reactjs/hooks/index.mjs +1 -1
- package/reactjs/hooks/useAccount.js +1 -5
- package/reactjs/hooks/useAccount.mjs +1 -5
- package/reactjs/hooks/useBalances.d.ts +4 -4
- package/reactjs/hooks/useBalances.js +16 -1
- package/reactjs/hooks/useBalances.mjs +16 -1
- package/reactjs/hooks/useBridgeFormik.js +9 -16
- package/reactjs/hooks/useBridgeFormik.mjs +0 -7
- package/reactjs/hooks/useDebounce.js +3 -3
- package/reactjs/hooks/useFetchBridgeData.d.ts +14 -4
- package/reactjs/hooks/useFetchTokens.d.ts +14 -4
- package/reactjs/hooks/useFetchTokens.js +9 -9
- package/reactjs/hooks/useFetchTokens.mjs +2 -2
- package/reactjs/hooks/useFiatData.d.ts +7 -2
- package/reactjs/hooks/useFiatData.js +6 -6
- package/reactjs/hooks/useFiatData.mjs +1 -1
- package/reactjs/hooks/useGetChainId.js +3 -3
- package/reactjs/hooks/useGetChainId.mjs +1 -1
- package/reactjs/hooks/useResolveTokenChain.js +2 -2
- package/reactjs/hooks/useSendTransactions.js +2 -2
- package/reactjs/hooks/useSignTransaction.d.ts +93 -67
- package/reactjs/hooks/useSignTransaction.js +53 -4
- package/reactjs/hooks/useSignTransaction.mjs +53 -4
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +3 -3
- package/reactjs/hooks/validation/useTestIsConnected.js +2 -2
- package/reactjs/index.js +44 -16
- package/reactjs/index.mjs +14 -16
- package/reactjs/init/init.d.ts +220 -1
- package/reactjs/init/init.js +34 -10
- package/reactjs/init/init.mjs +31 -7
- package/reactjs/init/tests/init.spec.js +5 -6
- package/reactjs/init/tests/init.spec.mjs +5 -6
- package/reactjs/queries/index.d.ts +0 -1
- package/reactjs/queries/index.js +0 -2
- package/reactjs/queries/index.mjs +1 -3
- package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +8 -3
- package/reactjs/queries/useGetEvmTokensBalances.query.js +15 -18
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +15 -18
- package/reactjs/queries/useGetHistory.query.d.ts +9 -1
- package/reactjs/queries/useGetHistory.query.js +23 -5
- package/reactjs/queries/useGetHistory.query.mjs +23 -5
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +7 -2
- package/reactjs/queries/useGetMvxTokensBalances.query.js +2 -2
- package/reactjs/reexports.d.ts +2 -1
- package/reactjs/reexports.js +41 -13
- package/reactjs/reexports.mjs +11 -13
- package/reactjs/utils/getInitialTokens.d.ts +4 -1
- package/reactjs/utils/getInitialTokens.js +3 -3
- package/reactjs/utils/getInitialTokens.mjs +3 -3
- package/style.css +33 -1730
- package/types/chainType.d.ts +6 -0
- package/types/chainType.js +11 -0
- package/types/chainType.mjs +10 -0
- package/types/transaction.d.ts +28 -0
- package/types/utxo.d.ts +11 -0
- package/types/utxo.js +2 -0
- package/types/utxo.mjs +1 -0
- package/{useBalances-C_69CFoa.mjs → useBalances-Bom1mw1J.mjs} +101 -23
- package/{useBalances-C4YhEYxy.js → useBalances-gZTsFZHe.js} +102 -24
- package/index-BIVnypNe.mjs +0 -108
- package/index-Ben8n3bd.js +0 -58656
- package/index-CnKr4rL1.mjs +0 -91
- package/index-CnuruJNu.js +0 -329
- package/index-DsBh-EBw.js +0 -108
- package/index-iN9APQ6x.mjs +0 -58735
- package/modules/fiat/components/FiatForm/FiatForm.d.ts +0 -9
- package/modules/fiat/components/FiatForm/FiatForm.js +0 -314
- package/modules/fiat/components/FiatForm/FiatForm.mjs +0 -313
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.d.ts +0 -13
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.js +0 -117
- package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.mjs +0 -116
- package/modules/fiat/components/FiatForm/components/AmountInput/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/components/AmountInput/index.js +0 -5
- package/modules/fiat/components/FiatForm/components/AmountInput/index.mjs +0 -4
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.js +0 -74
- package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.mjs +0 -73
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.d.ts +0 -14
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.js +0 -94
- package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.mjs +0 -93
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.js +0 -82
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.mjs +0 -81
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.js +0 -91
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.mjs +0 -90
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.d.ts +0 -5
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.js +0 -30
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.mjs +0 -29
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.d.ts +0 -8
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.js +0 -103
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.mjs +0 -102
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.js +0 -33
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.mjs +0 -32
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.d.ts +0 -7
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.js +0 -21
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.mjs +0 -20
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.d.ts +0 -9
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.js +0 -26
- package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.mjs +0 -25
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.js +0 -5
- package/modules/fiat/components/FiatForm/components/TokenSelector/index.mjs +0 -4
- package/modules/fiat/components/FiatForm/index.d.ts +0 -1
- package/modules/fiat/components/FiatForm/index.js +0 -5
- package/modules/fiat/components/FiatForm/index.mjs +0 -4
- package/modules/fiat/components/index.d.ts +0 -1
- package/modules/fiat/components/index.js +0 -5
- package/modules/fiat/components/index.mjs +0 -4
- package/modules/fiat/context/FiatProvider.d.ts +0 -8
- package/modules/fiat/context/FiatProvider.js +0 -24
- package/modules/fiat/context/FiatProvider.mjs +0 -23
- package/modules/fiat/context/queryClient.d.ts +0 -3
- package/modules/fiat/context/queryClient.js +0 -12
- package/modules/fiat/context/queryClient.mjs +0 -11
- package/modules/fiat/context/useFiat.d.ts +0 -1
- package/modules/fiat/context/useFiat.js +0 -13
- package/modules/fiat/context/useFiat.mjs +0 -12
- package/modules/fiat/hooks/index.d.ts +0 -2
- package/modules/fiat/hooks/index.js +0 -7
- package/modules/fiat/hooks/index.mjs +0 -6
- package/modules/fiat/hooks/useFiatData.d.ts +0 -7
- package/modules/fiat/hooks/useFiatData.js +0 -75
- package/modules/fiat/hooks/useFiatData.mjs +0 -74
- package/modules/fiat/hooks/validation/index.d.ts +0 -1
- package/modules/fiat/hooks/validation/index.js +0 -5
- package/modules/fiat/hooks/validation/index.mjs +0 -4
- package/modules/fiat/hooks/validation/useAmountSchema.d.ts +0 -2
- package/modules/fiat/hooks/validation/useAmountSchema.js +0 -27
- package/modules/fiat/hooks/validation/useAmountSchema.mjs +0 -9
- package/modules/fiat/index.d.ts +0 -8
- package/modules/fiat/index.js +0 -22
- package/modules/fiat/index.mjs +0 -21
- package/modules/fiat/init/index.d.ts +0 -2
- package/modules/fiat/init/index.js +0 -5
- package/modules/fiat/init/index.mjs +0 -4
- package/modules/fiat/init/init.d.ts +0 -22
- package/modules/fiat/init/init.js +0 -15
- package/modules/fiat/init/init.mjs +0 -14
- package/modules/fiat/queries/index.d.ts +0 -2
- package/modules/fiat/queries/index.js +0 -7
- package/modules/fiat/queries/index.mjs +0 -6
- package/modules/fiat/queries/useGetRate.mutation.d.ts +0 -6
- package/modules/fiat/queries/useGetRate.mutation.js +0 -20
- package/modules/fiat/queries/useGetRate.mutation.mjs +0 -19
- package/modules/fiat/queries/useGetTokens.query.d.ts +0 -5
- package/modules/fiat/queries/useGetTokens.query.js +0 -33
- package/modules/fiat/queries/useGetTokens.query.mjs +0 -32
- package/react-47kZTyAT.mjs +0 -51
- package/react-B_iI3-1z.mjs +0 -3133
- package/react-BomcNL1v.js +0 -254
- package/react-CqKlu0W0.js +0 -51
- package/react-R_xxu7fN.js +0 -3133
- package/react-cXurUY4Z.mjs +0 -254
- package/reactjs/queries/useGetTokens.query.d.ts +0 -3
- package/reactjs/queries/useGetTokens.query.js +0 -34
- package/reactjs/queries/useGetTokens.query.mjs +0 -33
- package/w3m-modal-Bhg44d6I.js +0 -356
- package/w3m-modal-Br2Ec3MM.mjs +0 -356
|
@@ -3,24 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
5
|
const reactQuery = require("@tanstack/react-query");
|
|
6
|
-
const
|
|
6
|
+
const React = require("react");
|
|
7
7
|
const wagmi = require("wagmi");
|
|
8
8
|
const reactjs_context_queryClient = require("./queryClient.js");
|
|
9
9
|
const queryClient = reactjs_context_queryClient.getQueryClient();
|
|
10
|
-
const Web3AppContext =
|
|
10
|
+
const Web3AppContext = React.createContext(
|
|
11
11
|
void 0
|
|
12
12
|
);
|
|
13
13
|
function Web3AppProvider({
|
|
14
14
|
children,
|
|
15
15
|
config,
|
|
16
16
|
appKit,
|
|
17
|
-
options
|
|
17
|
+
options,
|
|
18
|
+
supportedChains
|
|
18
19
|
}) {
|
|
19
|
-
const value =
|
|
20
|
+
const value = React.useMemo(() => {
|
|
20
21
|
return {
|
|
21
22
|
config,
|
|
22
23
|
appKit,
|
|
23
|
-
options
|
|
24
|
+
options,
|
|
25
|
+
supportedChains
|
|
24
26
|
};
|
|
25
27
|
}, [config, appKit, options]);
|
|
26
28
|
return /* @__PURE__ */ jsxRuntime.jsx(Web3AppContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(wagmi.WagmiProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children }) }) });
|
|
@@ -11,13 +11,15 @@ function Web3AppProvider({
|
|
|
11
11
|
children,
|
|
12
12
|
config,
|
|
13
13
|
appKit,
|
|
14
|
-
options
|
|
14
|
+
options,
|
|
15
|
+
supportedChains
|
|
15
16
|
}) {
|
|
16
17
|
const value = useMemo(() => {
|
|
17
18
|
return {
|
|
18
19
|
config,
|
|
19
20
|
appKit,
|
|
20
|
-
options
|
|
21
|
+
options,
|
|
22
|
+
supportedChains
|
|
21
23
|
};
|
|
22
24
|
}, [config, appKit, options]);
|
|
23
25
|
return /* @__PURE__ */ jsx(Web3AppContext.Provider, { value, children: /* @__PURE__ */ jsx(WagmiProvider, { config, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children }) }) });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const reactjs_context_Web3AppProvider = require("./Web3AppProvider.js");
|
|
6
6
|
function useWeb3App() {
|
|
7
|
-
const context =
|
|
7
|
+
const context = React.useContext(reactjs_context_Web3AppProvider.Web3AppContext);
|
|
8
8
|
if (context == null) {
|
|
9
9
|
throw new Error("Web3AppContext must be used within a Web3AppProvider");
|
|
10
10
|
}
|
package/reactjs/hooks/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const reactjs_hooks_validation_useSecondAmountSchema = require("./validation/use
|
|
|
6
6
|
const reactjs_hooks_validation_useTestHasEnoughFunds = require("./validation/useTestHasEnoughFunds.js");
|
|
7
7
|
const reactjs_hooks_validation_useTestIsConnected = require("./validation/useTestIsConnected.js");
|
|
8
8
|
const reactjs_hooks_useAccount = require("./useAccount.js");
|
|
9
|
-
const reactjs_hooks_useBalances = require("../../useBalances-
|
|
9
|
+
const reactjs_hooks_useBalances = require("../../useBalances-gZTsFZHe.js");
|
|
10
10
|
const reactjs_hooks_useBridgeFormik = require("./useBridgeFormik.js");
|
|
11
11
|
const reactjs_hooks_useDebounce = require("./useDebounce.js");
|
|
12
12
|
const reactjs_hooks_useFetchBridgeData = require("./useFetchBridgeData.js");
|
package/reactjs/hooks/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { useSecondAmountSchema } from "./validation/useSecondAmountSchema.mjs";
|
|
|
3
3
|
import { useTestHasEnoughFunds } from "./validation/useTestHasEnoughFunds.mjs";
|
|
4
4
|
import { useTestIsConnected } from "./validation/useTestIsConnected.mjs";
|
|
5
5
|
import { useAccount } from "./useAccount.mjs";
|
|
6
|
-
import { u } from "../../useBalances-
|
|
6
|
+
import { u } from "../../useBalances-Bom1mw1J.mjs";
|
|
7
7
|
import { BridgeFormikValuesEnum, useBridgeFormik } from "./useBridgeFormik.mjs";
|
|
8
8
|
import { useDebounce } from "./useDebounce.mjs";
|
|
9
9
|
import { useFetchBridgeData } from "./useFetchBridgeData.mjs";
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
require("
|
|
5
|
-
const react = require("../../react-CqKlu0W0.js");
|
|
6
|
-
require("viem");
|
|
7
|
-
require("viem/chains");
|
|
8
|
-
require("react");
|
|
4
|
+
const react = require("@reown/appkit/react");
|
|
9
5
|
const wagmi = require("wagmi");
|
|
10
6
|
const useAccount = () => {
|
|
11
7
|
const appkitAccount = react.useAppKitAccount();
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { u as useAppKitAccount } from "../../react-47kZTyAT.mjs";
|
|
3
|
-
import "viem";
|
|
4
|
-
import "viem/chains";
|
|
5
|
-
import "react";
|
|
1
|
+
import { useAppKitAccount } from "@reown/appkit/react";
|
|
6
2
|
import { useAccount as useAccount$1 } from "wagmi";
|
|
7
3
|
const useAccount = () => {
|
|
8
4
|
const appkitAccount = useAppKitAccount();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { TokenType } from '../../types';
|
|
2
|
+
|
|
1
3
|
export declare const useBalances: () => {
|
|
2
|
-
fetchBalances: ({
|
|
3
|
-
|
|
4
|
-
chainId: string;
|
|
5
|
-
tokenIdentifiers: string[];
|
|
4
|
+
fetchBalances: ({ tokens }: {
|
|
5
|
+
tokens: TokenType[];
|
|
6
6
|
}) => Promise<{
|
|
7
7
|
tokenId: string;
|
|
8
8
|
balance: string;
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("@reown/appkit/react");
|
|
5
|
+
require("@solana/web3.js");
|
|
6
|
+
require("axios");
|
|
4
7
|
require("react");
|
|
8
|
+
require("../../helpers/getApiURL.js");
|
|
9
|
+
require("./useGetChainId.js");
|
|
10
|
+
require("../../types/chainType.js");
|
|
5
11
|
require("../context/useWeb3App.js");
|
|
6
|
-
|
|
12
|
+
require("@tanstack/react-query");
|
|
13
|
+
require("../queries/useGetChains.query.js");
|
|
14
|
+
require("yup");
|
|
15
|
+
require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");
|
|
16
|
+
require("../../bignumber-B8vjg9qn.js");
|
|
17
|
+
require("wagmi");
|
|
18
|
+
const reactjs_hooks_useBalances = require("../../useBalances-gZTsFZHe.js");
|
|
19
|
+
require("formik");
|
|
20
|
+
require("../constants/index.js");
|
|
21
|
+
require("@reown/appkit-adapter-solana/react");
|
|
7
22
|
exports.useBalances = reactjs_hooks_useBalances.useBalances;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
import "@reown/appkit/react";
|
|
2
|
+
import "@solana/web3.js";
|
|
3
|
+
import "axios";
|
|
1
4
|
import "react";
|
|
5
|
+
import "../../helpers/getApiURL.mjs";
|
|
6
|
+
import "./useGetChainId.mjs";
|
|
7
|
+
import "../../types/chainType.mjs";
|
|
2
8
|
import "../context/useWeb3App.mjs";
|
|
3
|
-
import
|
|
9
|
+
import "@tanstack/react-query";
|
|
10
|
+
import "../queries/useGetChains.query.mjs";
|
|
11
|
+
import "yup";
|
|
12
|
+
import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
|
|
13
|
+
import "../../bignumber-CKZkoo0g.mjs";
|
|
14
|
+
import "wagmi";
|
|
15
|
+
import { u } from "../../useBalances-Bom1mw1J.mjs";
|
|
16
|
+
import "formik";
|
|
17
|
+
import "../constants/index.mjs";
|
|
18
|
+
import "@reown/appkit-adapter-solana/react";
|
|
4
19
|
export {
|
|
5
20
|
u as useBalances
|
|
6
21
|
};
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const formik = require("formik");
|
|
5
|
-
const
|
|
6
|
-
const wagmi = require("wagmi");
|
|
5
|
+
const React = require("react");
|
|
7
6
|
const yup = require("yup");
|
|
8
7
|
const reactjs_hooks_useAccount = require("./useAccount.js");
|
|
9
8
|
const reactjs_hooks_validation_useAmountSchema = require("./validation/useAmountSchema.js");
|
|
@@ -32,10 +31,9 @@ const useBridgeFormik = ({
|
|
|
32
31
|
rate,
|
|
33
32
|
onSubmit
|
|
34
33
|
}) => {
|
|
35
|
-
const [lastChangedField, setLastChangedField] =
|
|
36
|
-
const pendingSigningRef =
|
|
34
|
+
const [lastChangedField, setLastChangedField] = React.useState(null);
|
|
35
|
+
const pendingSigningRef = React.useRef();
|
|
37
36
|
const account = reactjs_hooks_useAccount.useAccount();
|
|
38
|
-
const { switchChainAsync } = wagmi.useSwitchChain();
|
|
39
37
|
const initialValues = {
|
|
40
38
|
firstAmount: "",
|
|
41
39
|
secondAmount: "",
|
|
@@ -50,11 +48,6 @@ const useBridgeFormik = ({
|
|
|
50
48
|
};
|
|
51
49
|
const onSubmitFormik = async (values2) => {
|
|
52
50
|
var _a, _b;
|
|
53
|
-
if (values2.fromChainId) {
|
|
54
|
-
await switchChainAsync({
|
|
55
|
-
chainId: Number(values2.fromChainId)
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
51
|
if (pendingSigningRef.current) {
|
|
59
52
|
return;
|
|
60
53
|
}
|
|
@@ -128,7 +121,7 @@ const useBridgeFormik = ({
|
|
|
128
121
|
setFieldValue,
|
|
129
122
|
setFieldTouched
|
|
130
123
|
} = formik$1;
|
|
131
|
-
|
|
124
|
+
React.useEffect(() => {
|
|
132
125
|
if (!values.firstAmount && touched.firstAmount) {
|
|
133
126
|
setFieldValue("secondAmount", 0, true);
|
|
134
127
|
return;
|
|
@@ -141,7 +134,7 @@ const useBridgeFormik = ({
|
|
|
141
134
|
);
|
|
142
135
|
}
|
|
143
136
|
}, [values.firstAmount, rate == null ? void 0 : rate.fee, lastChangedField, touched.firstAmount]);
|
|
144
|
-
|
|
137
|
+
React.useEffect(() => {
|
|
145
138
|
if (!values.secondAmount && touched.secondAmount) {
|
|
146
139
|
setFieldValue("firstAmount", 0, true);
|
|
147
140
|
return;
|
|
@@ -151,16 +144,16 @@ const useBridgeFormik = ({
|
|
|
151
144
|
setFieldValue("firstAmount", calculatedFirstAmount);
|
|
152
145
|
}
|
|
153
146
|
}, [values.secondAmount, rate == null ? void 0 : rate.fee, lastChangedField, touched.secondAmount]);
|
|
154
|
-
|
|
147
|
+
React.useEffect(() => {
|
|
155
148
|
setFieldValue("firstToken", firstToken, true);
|
|
156
149
|
}, [firstToken]);
|
|
157
|
-
|
|
150
|
+
React.useEffect(() => {
|
|
158
151
|
setFieldValue("secondToken", secondToken, true);
|
|
159
152
|
}, [secondToken]);
|
|
160
|
-
|
|
153
|
+
React.useEffect(() => {
|
|
161
154
|
setFieldValue("fromChainId", fromChainId, true);
|
|
162
155
|
}, [fromChainId]);
|
|
163
|
-
|
|
156
|
+
React.useEffect(() => {
|
|
164
157
|
setFieldValue("toChainId", toChainId, true);
|
|
165
158
|
}, [toChainId]);
|
|
166
159
|
const secondAmountError = "secondAmount" in errors && "secondAmount" in touched ? errors.secondAmount : void 0;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useFormik } from "formik";
|
|
2
2
|
import { useState, useRef, useEffect } from "react";
|
|
3
|
-
import { useSwitchChain } from "wagmi";
|
|
4
3
|
import { object, string } from "yup";
|
|
5
4
|
import { useAccount } from "./useAccount.mjs";
|
|
6
5
|
import { useAmountSchema } from "./validation/useAmountSchema.mjs";
|
|
@@ -32,7 +31,6 @@ const useBridgeFormik = ({
|
|
|
32
31
|
const [lastChangedField, setLastChangedField] = useState(null);
|
|
33
32
|
const pendingSigningRef = useRef();
|
|
34
33
|
const account = useAccount();
|
|
35
|
-
const { switchChainAsync } = useSwitchChain();
|
|
36
34
|
const initialValues = {
|
|
37
35
|
firstAmount: "",
|
|
38
36
|
secondAmount: "",
|
|
@@ -47,11 +45,6 @@ const useBridgeFormik = ({
|
|
|
47
45
|
};
|
|
48
46
|
const onSubmitFormik = async (values2) => {
|
|
49
47
|
var _a, _b;
|
|
50
|
-
if (values2.fromChainId) {
|
|
51
|
-
await switchChainAsync({
|
|
52
|
-
chainId: Number(values2.fromChainId)
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
48
|
if (pendingSigningRef.current) {
|
|
56
49
|
return;
|
|
57
50
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const useDebounce = (value, timeout) => {
|
|
6
|
-
const [state, setState] =
|
|
6
|
+
const [state, setState] = React.useState(value);
|
|
7
7
|
const effect = () => {
|
|
8
8
|
const handler = setTimeout(() => setState(value), timeout);
|
|
9
9
|
return () => clearTimeout(handler);
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
React.useEffect(effect, [value]);
|
|
12
12
|
return state;
|
|
13
13
|
};
|
|
14
14
|
exports.useDebounce = useDebounce;
|
|
@@ -7,7 +7,7 @@ export declare const useFetchBridgeData: ({ refetchTrigger, mvxAddress, mvxApiUR
|
|
|
7
7
|
isTokensLoading: boolean;
|
|
8
8
|
evmTokensWithBalances: {
|
|
9
9
|
balance: string;
|
|
10
|
-
chainId:
|
|
10
|
+
chainId: string;
|
|
11
11
|
address: string;
|
|
12
12
|
name: string;
|
|
13
13
|
symbol: string;
|
|
@@ -19,13 +19,18 @@ export declare const useFetchBridgeData: ({ refetchTrigger, mvxAddress, mvxApiUR
|
|
|
19
19
|
minBridgeAmount: string;
|
|
20
20
|
maxBridgeAmount: string;
|
|
21
21
|
};
|
|
22
|
-
availableTokens?:
|
|
22
|
+
availableTokens?: {
|
|
23
|
+
address: string;
|
|
24
|
+
chainId: string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
}[];
|
|
27
|
+
isNative?: boolean;
|
|
23
28
|
}[] | undefined;
|
|
24
29
|
isLoadingEvmTokensBalances: boolean;
|
|
25
30
|
isErrorMvxTokensBalances: boolean;
|
|
26
31
|
mvxTokensWithBalances: {
|
|
27
32
|
balance: string;
|
|
28
|
-
chainId:
|
|
33
|
+
chainId: string;
|
|
29
34
|
address: string;
|
|
30
35
|
name: string;
|
|
31
36
|
symbol: string;
|
|
@@ -37,7 +42,12 @@ export declare const useFetchBridgeData: ({ refetchTrigger, mvxAddress, mvxApiUR
|
|
|
37
42
|
minBridgeAmount: string;
|
|
38
43
|
maxBridgeAmount: string;
|
|
39
44
|
};
|
|
40
|
-
availableTokens?:
|
|
45
|
+
availableTokens?: {
|
|
46
|
+
address: string;
|
|
47
|
+
chainId: string;
|
|
48
|
+
symbol: string;
|
|
49
|
+
}[];
|
|
50
|
+
isNative?: boolean;
|
|
41
51
|
}[] | undefined;
|
|
42
52
|
isLoadingMvxTokensBalances: boolean;
|
|
43
53
|
isErrorEvmTokensBalances: boolean;
|
|
@@ -9,7 +9,7 @@ export declare const useFetchTokens: ({ mvxAddress, mvxApiURL, refetchTrigger }:
|
|
|
9
9
|
isErrorEvmTokensBalances: boolean;
|
|
10
10
|
evmTokensWithBalances: {
|
|
11
11
|
balance: string;
|
|
12
|
-
chainId:
|
|
12
|
+
chainId: string;
|
|
13
13
|
address: string;
|
|
14
14
|
name: string;
|
|
15
15
|
symbol: string;
|
|
@@ -21,13 +21,18 @@ export declare const useFetchTokens: ({ mvxAddress, mvxApiURL, refetchTrigger }:
|
|
|
21
21
|
minBridgeAmount: string;
|
|
22
22
|
maxBridgeAmount: string;
|
|
23
23
|
};
|
|
24
|
-
availableTokens?:
|
|
24
|
+
availableTokens?: {
|
|
25
|
+
address: string;
|
|
26
|
+
chainId: string;
|
|
27
|
+
symbol: string;
|
|
28
|
+
}[];
|
|
29
|
+
isNative?: boolean;
|
|
25
30
|
}[] | undefined;
|
|
26
31
|
isLoadingMvxTokensBalances: boolean;
|
|
27
32
|
isErrorMvxTokensBalances: boolean;
|
|
28
33
|
mvxTokensWithBalances: {
|
|
29
34
|
balance: string;
|
|
30
|
-
chainId:
|
|
35
|
+
chainId: string;
|
|
31
36
|
address: string;
|
|
32
37
|
name: string;
|
|
33
38
|
symbol: string;
|
|
@@ -39,7 +44,12 @@ export declare const useFetchTokens: ({ mvxAddress, mvxApiURL, refetchTrigger }:
|
|
|
39
44
|
minBridgeAmount: string;
|
|
40
45
|
maxBridgeAmount: string;
|
|
41
46
|
};
|
|
42
|
-
availableTokens?:
|
|
47
|
+
availableTokens?: {
|
|
48
|
+
address: string;
|
|
49
|
+
chainId: string;
|
|
50
|
+
symbol: string;
|
|
51
|
+
}[];
|
|
52
|
+
isNative?: boolean;
|
|
43
53
|
}[] | undefined;
|
|
44
54
|
fiatCurrencies: import('../..').TokenType[] | undefined;
|
|
45
55
|
tokens: import('../..').TokenType[] | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const reactjs_hooks_useAccount = require("./useAccount.js");
|
|
6
6
|
const reactjs_hooks_useGetChainId = require("./useGetChainId.js");
|
|
7
7
|
const constants_index = require("../../constants/index.js");
|
|
@@ -20,19 +20,19 @@ const useFetchTokens = ({
|
|
|
20
20
|
isLoading: isTokensLoading,
|
|
21
21
|
isError: isTokensError
|
|
22
22
|
} = reactjs_queries_useGetAllTokens_query.useGetAllTokensQuery();
|
|
23
|
-
const evmTokens =
|
|
23
|
+
const evmTokens = React.useMemo(
|
|
24
24
|
() => tokens == null ? void 0 : tokens.filter(
|
|
25
|
-
(token) => !constants_index.MVX_CHAIN_IDS.includes(
|
|
25
|
+
(token) => !constants_index.MVX_CHAIN_IDS.includes(token.chainId.toString()) && Boolean(token.chainId)
|
|
26
26
|
),
|
|
27
27
|
[tokens]
|
|
28
28
|
);
|
|
29
|
-
const mvxTokens =
|
|
29
|
+
const mvxTokens = React.useMemo(
|
|
30
30
|
() => tokens == null ? void 0 : tokens.filter(
|
|
31
|
-
(token) => constants_index.MVX_CHAIN_IDS.includes(
|
|
31
|
+
(token) => constants_index.MVX_CHAIN_IDS.includes(token.chainId.toString())
|
|
32
32
|
),
|
|
33
33
|
[tokens]
|
|
34
34
|
);
|
|
35
|
-
const fiatCurrencies =
|
|
35
|
+
const fiatCurrencies = React.useMemo(() => {
|
|
36
36
|
return tokens == null ? void 0 : tokens.filter((token) => !token.chainId);
|
|
37
37
|
}, [tokens]);
|
|
38
38
|
const {
|
|
@@ -52,7 +52,7 @@ const useFetchTokens = ({
|
|
|
52
52
|
mvxAddress,
|
|
53
53
|
apiURL: mvxApiURL
|
|
54
54
|
});
|
|
55
|
-
const mvxTokensWithBalances =
|
|
55
|
+
const mvxTokensWithBalances = React.useMemo(() => {
|
|
56
56
|
return mvxTokens == null ? void 0 : mvxTokens.map((token) => {
|
|
57
57
|
const foundToken = mvxTokensBalances == null ? void 0 : mvxTokensBalances.find(
|
|
58
58
|
(mvxToken) => mvxToken.address === token.address
|
|
@@ -69,7 +69,7 @@ const useFetchTokens = ({
|
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
}, [mvxTokens, mvxTokensBalances]);
|
|
72
|
-
const evmTokensWithBalances =
|
|
72
|
+
const evmTokensWithBalances = React.useMemo(() => {
|
|
73
73
|
return evmTokens == null ? void 0 : evmTokens.map((token) => {
|
|
74
74
|
const foundToken = evmTokensBalances == null ? void 0 : evmTokensBalances.find(
|
|
75
75
|
(evmToken) => evmToken.address === token.address
|
|
@@ -86,7 +86,7 @@ const useFetchTokens = ({
|
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
}, [evmTokens, evmTokensBalances]);
|
|
89
|
-
|
|
89
|
+
React.useEffect(() => {
|
|
90
90
|
if (account.address) {
|
|
91
91
|
reactjs_queries_useGetEvmTokensBalances_query.invalidateEvmTokensBalances();
|
|
92
92
|
}
|
|
@@ -19,13 +19,13 @@ const useFetchTokens = ({
|
|
|
19
19
|
} = useGetAllTokensQuery();
|
|
20
20
|
const evmTokens = useMemo(
|
|
21
21
|
() => tokens == null ? void 0 : tokens.filter(
|
|
22
|
-
(token) => !MVX_CHAIN_IDS.includes(
|
|
22
|
+
(token) => !MVX_CHAIN_IDS.includes(token.chainId.toString()) && Boolean(token.chainId)
|
|
23
23
|
),
|
|
24
24
|
[tokens]
|
|
25
25
|
);
|
|
26
26
|
const mvxTokens = useMemo(
|
|
27
27
|
() => tokens == null ? void 0 : tokens.filter(
|
|
28
|
-
(token) => MVX_CHAIN_IDS.includes(
|
|
28
|
+
(token) => MVX_CHAIN_IDS.includes(token.chainId.toString())
|
|
29
29
|
),
|
|
30
30
|
[tokens]
|
|
31
31
|
);
|
|
@@ -9,7 +9,7 @@ export declare const useFiatData: ({ mvxAddress, mvxApiURL, refetchTrigger }: {
|
|
|
9
9
|
isErrorMvxTokensBalances: boolean;
|
|
10
10
|
mvxTokensWithBalances: {
|
|
11
11
|
balance: string;
|
|
12
|
-
chainId:
|
|
12
|
+
chainId: string;
|
|
13
13
|
address: string;
|
|
14
14
|
name: string;
|
|
15
15
|
symbol: string;
|
|
@@ -21,7 +21,12 @@ export declare const useFiatData: ({ mvxAddress, mvxApiURL, refetchTrigger }: {
|
|
|
21
21
|
minBridgeAmount: string;
|
|
22
22
|
maxBridgeAmount: string;
|
|
23
23
|
};
|
|
24
|
-
availableTokens?:
|
|
24
|
+
availableTokens?: {
|
|
25
|
+
address: string;
|
|
26
|
+
chainId: string;
|
|
27
|
+
symbol: string;
|
|
28
|
+
}[];
|
|
29
|
+
isNative?: boolean;
|
|
25
30
|
}[] | undefined;
|
|
26
31
|
currencies: import('../..').TokenType[] | undefined;
|
|
27
32
|
tokens: import('../..').TokenType[] | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const constants_index = require("../../constants/index.js");
|
|
6
6
|
const reactjs_queries_useGetAllTokens_query = require("../queries/useGetAllTokens.query.js");
|
|
7
7
|
const reactjs_queries_useGetMvxTokensBalances_query = require("../queries/useGetMvxTokensBalances.query.js");
|
|
@@ -15,13 +15,13 @@ const useFiatData = ({
|
|
|
15
15
|
isLoading: isTokensLoading,
|
|
16
16
|
isError: isTokensError
|
|
17
17
|
} = reactjs_queries_useGetAllTokens_query.useGetAllTokensQuery();
|
|
18
|
-
const mvxTokens =
|
|
18
|
+
const mvxTokens = React.useMemo(
|
|
19
19
|
() => tokens == null ? void 0 : tokens.filter(
|
|
20
|
-
(token) => constants_index.MVX_CHAIN_IDS.includes(
|
|
20
|
+
(token) => constants_index.MVX_CHAIN_IDS.includes(token.chainId.toString())
|
|
21
21
|
),
|
|
22
22
|
[tokens]
|
|
23
23
|
);
|
|
24
|
-
const currencies =
|
|
24
|
+
const currencies = React.useMemo(() => {
|
|
25
25
|
return tokens == null ? void 0 : tokens.filter((token) => !token.chainId);
|
|
26
26
|
}, [tokens]);
|
|
27
27
|
const {
|
|
@@ -33,7 +33,7 @@ const useFiatData = ({
|
|
|
33
33
|
mvxAddress,
|
|
34
34
|
apiURL: mvxApiURL
|
|
35
35
|
});
|
|
36
|
-
const mvxTokensWithBalances =
|
|
36
|
+
const mvxTokensWithBalances = React.useMemo(() => {
|
|
37
37
|
return mvxTokens == null ? void 0 : mvxTokens.map((token) => {
|
|
38
38
|
const foundToken = mvxTokensBalances == null ? void 0 : mvxTokensBalances.find(
|
|
39
39
|
(mvxToken) => mvxToken.address === token.address
|
|
@@ -50,7 +50,7 @@ const useFiatData = ({
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
}, [mvxTokens, mvxTokensBalances]);
|
|
53
|
-
|
|
53
|
+
React.useEffect(() => {
|
|
54
54
|
if (mvxAddress) {
|
|
55
55
|
reactjs_queries_useGetMvxTokensBalances_query.invalidateMvxTokensBalancesQuery();
|
|
56
56
|
}
|
|
@@ -14,7 +14,7 @@ const useFiatData = ({
|
|
|
14
14
|
} = useGetAllTokensQuery();
|
|
15
15
|
const mvxTokens = useMemo(
|
|
16
16
|
() => tokens == null ? void 0 : tokens.filter(
|
|
17
|
-
(token) => MVX_CHAIN_IDS.includes(
|
|
17
|
+
(token) => MVX_CHAIN_IDS.includes(token.chainId.toString())
|
|
18
18
|
),
|
|
19
19
|
[tokens]
|
|
20
20
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const react = require("
|
|
5
|
-
const
|
|
4
|
+
const react = require("@reown/appkit/react");
|
|
5
|
+
const React = require("react");
|
|
6
6
|
const reactjs_context_useWeb3App = require("../context/useWeb3App.js");
|
|
7
7
|
const useGetChainId = () => {
|
|
8
8
|
const { chainId } = react.useAppKitNetwork();
|
|
9
9
|
const { appKit } = reactjs_context_useWeb3App.useWeb3App();
|
|
10
|
-
return
|
|
10
|
+
return React.useMemo(() => chainId ?? appKit.getChainId(), [chainId, appKit]);
|
|
11
11
|
};
|
|
12
12
|
exports.useGetChainId = useGetChainId;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
require("../constants/index.js");
|
|
6
6
|
const reactjs_queries_useGetChains_query = require("../queries/useGetChains.query.js");
|
|
7
7
|
const reactjs_constants_chains = require("../constants/chains.js");
|
|
8
8
|
const useResolveTokenChain = ({ token }) => {
|
|
9
9
|
const { data: chains, isLoading } = reactjs_queries_useGetChains_query.useGetChainsQuery();
|
|
10
|
-
const tokenChain =
|
|
10
|
+
const tokenChain = React.useMemo(() => {
|
|
11
11
|
return chains == null ? void 0 : chains.find(
|
|
12
12
|
(chain) => chain.chainId.toString() === (token == null ? void 0 : token.chainId.toString())
|
|
13
13
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const api_sendTransactions = require("../../api/sendTransactions.js");
|
|
6
6
|
const useSendTransactions = () => {
|
|
7
|
-
return
|
|
7
|
+
return React.useCallback(
|
|
8
8
|
async ({
|
|
9
9
|
transactions,
|
|
10
10
|
provider,
|