@multiversx/sdk-dapp-liquidity 1.0.8 → 1.0.10

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.
Files changed (52) hide show
  1. package/{index-B9WqxUXM.mjs → index-B4Eq5P3w.mjs} +1 -1
  2. package/{index-CnudU77V.js → index-C4WV9nam.js} +1 -1
  3. package/{index-DZHiA1sX.js → index-CWMcKi_X.js} +1 -1
  4. package/{index-DSnomXRI.mjs → index-D8E0O3qL.mjs} +2850 -2131
  5. package/{index-BXwpbIDQ.mjs → index-DJ8CdHSw.mjs} +1 -1
  6. package/{index-cvy2-uZ_.js → index-nigVQYBu.js} +2818 -2099
  7. package/index.js +4 -3
  8. package/index.mjs +5 -4
  9. package/package.json +4 -4
  10. package/{react-BaXyw3AO.js → react-C43nEIqn.js} +158 -65
  11. package/react-DKUsVej7.js +50 -0
  12. package/react-Dp0H8q2z.mjs +50 -0
  13. package/{react-B9sQBOh0.mjs → react-wMhOUFOm.mjs} +158 -65
  14. package/reactjs/components/BridgeForm/BridgeForm.js +1 -1
  15. package/reactjs/components/BridgeForm/BridgeForm.mjs +1 -1
  16. package/reactjs/components/Connect/BridgeAccountDisplay.js +2 -2
  17. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +2 -2
  18. package/reactjs/components/Connect/CustomConnectButton.js +2 -2
  19. package/reactjs/components/Connect/CustomConnectButton.mjs +2 -2
  20. package/reactjs/components/Connect/SwitchChainButton.js +3 -3
  21. package/reactjs/components/Connect/SwitchChainButton.mjs +3 -3
  22. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +4 -2
  23. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +4 -2
  24. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -1
  25. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +1 -1
  26. package/reactjs/components/TokenSelector/components/SelectContent.js +4 -2
  27. package/reactjs/components/TokenSelector/components/SelectContent.mjs +4 -2
  28. package/reactjs/components/TokenSelector/components/TokenItem.js +1 -1
  29. package/reactjs/components/TokenSelector/components/TokenItem.mjs +1 -1
  30. package/reactjs/constants/chains.d.ts +1 -0
  31. package/reactjs/constants/chains.js +2 -0
  32. package/reactjs/constants/chains.mjs +2 -0
  33. package/reactjs/constants/index.js +1 -0
  34. package/reactjs/constants/index.mjs +2 -1
  35. package/reactjs/hooks/useAccount.js +2 -2
  36. package/reactjs/hooks/useAccount.mjs +2 -2
  37. package/reactjs/hooks/useGetChainId.js +1 -1
  38. package/reactjs/hooks/useGetChainId.mjs +1 -1
  39. package/reactjs/index.js +4 -3
  40. package/reactjs/index.mjs +5 -4
  41. package/reactjs/init/init.js +1 -1
  42. package/reactjs/init/init.mjs +1 -1
  43. package/reactjs/init/tests/init.spec.js +2 -2
  44. package/reactjs/init/tests/init.spec.mjs +2 -2
  45. package/reactjs/queries/useGetEvmTokensBalances.query.js +2 -2
  46. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +2 -2
  47. package/reactjs/reexports.js +3 -3
  48. package/reactjs/reexports.mjs +3 -3
  49. package/{w3m-modal-DCcF1qEB.js → w3m-modal-DLyg7Voy.js} +1 -1
  50. package/{w3m-modal-DK3G5GJp.mjs → w3m-modal-hC-B8qZP.mjs} +1 -1
  51. package/react-CNXJSTCv.js +0 -38
  52. package/react-CSQpf1zk.mjs +0 -38
@@ -2,8 +2,10 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useRef, useMemo, useEffect } from "react";
3
3
  import { ChainSelect } from "./ChainSelect/ChainSelect.mjs";
4
4
  import { TokenList } from "./TokenList.mjs";
5
+ import "../../../constants/index.mjs";
5
6
  import { useGetChainId } from "../../../hooks/useGetChainId.mjs";
6
7
  import { MxSearch } from "../../base/MxSearch/MxSearch.mjs";
8
+ import { ALL_NETWORK_ID } from "../../../constants/chains.mjs";
7
9
  const SelectContent = ({
8
10
  onSelect,
9
11
  tokens = [],
@@ -16,7 +18,7 @@ const SelectContent = ({
16
18
  const searchPatternRef = useRef("");
17
19
  const activeChainId = useGetChainId();
18
20
  const [selectedChainId, setSelectedChainId] = useState(
19
- (activeChainId == null ? void 0 : activeChainId.toString()) ?? "0"
21
+ (activeChainId == null ? void 0 : activeChainId.toString()) ?? ALL_NETWORK_ID
20
22
  );
21
23
  const filteredTokensText = useMemo(() => {
22
24
  const selectedChain = chains.find(
@@ -33,7 +35,7 @@ const SelectContent = ({
33
35
  };
34
36
  const handleSearch = (pattern) => {
35
37
  searchPatternRef.current = pattern;
36
- if (selectedChainId === "0") {
38
+ if (selectedChainId === ALL_NETWORK_ID) {
37
39
  const filtered2 = tokens.filter(
38
40
  (token) => token.symbol.toLowerCase().includes(pattern.toLowerCase())
39
41
  );
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const react = require("../../../../react-BaXyw3AO.js");
5
+ const react = require("../../../../react-C43nEIqn.js");
6
6
  const require$$0 = require("react");
7
7
  const wagmi = require("wagmi");
8
8
  const reactjs_components_TokenSelector_components_TokenIcon = require("./TokenIcon.js");
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { u as useAppKitNetwork } from "../../../../react-B9sQBOh0.mjs";
2
+ import { u as useAppKitNetwork } from "../../../../react-wMhOUFOm.mjs";
3
3
  import { useMemo, useCallback } from "react";
4
4
  import { useSwitchChain } from "wagmi";
5
5
  import { TokenIcon } from "./TokenIcon.mjs";
@@ -32,4 +32,5 @@ export declare const chainIdentifier: {
32
32
  msx: string;
33
33
  MultiversX: string;
34
34
  };
35
+ export declare const ALL_NETWORK_ID = "-1";
35
36
  export {};
@@ -35,4 +35,6 @@ const chainIdentifier = {
35
35
  ...base,
36
36
  default: _default.DefaultIcon
37
37
  };
38
+ const ALL_NETWORK_ID = "-1";
39
+ exports.ALL_NETWORK_ID = ALL_NETWORK_ID;
38
40
  exports.chainIdentifier = chainIdentifier;
@@ -32,6 +32,8 @@ const chainIdentifier = {
32
32
  ...base,
33
33
  default: DefaultIcon
34
34
  };
35
+ const ALL_NETWORK_ID = "-1";
35
36
  export {
37
+ ALL_NETWORK_ID,
36
38
  chainIdentifier
37
39
  };
@@ -7,6 +7,7 @@ const safeWindow = (
7
7
  typeof window !== "undefined" ? window : {}
8
8
  );
9
9
  const safeDocument = typeof document !== "undefined" ? safeWindow.document : {};
10
+ exports.ALL_NETWORK_ID = reactjs_constants_chains.ALL_NETWORK_ID;
10
11
  exports.chainIdentifier = reactjs_constants_chains.chainIdentifier;
11
12
  exports.safeDocument = safeDocument;
12
13
  exports.safeWindow = safeWindow;
@@ -1,10 +1,11 @@
1
- import { chainIdentifier } from "./chains.mjs";
1
+ import { ALL_NETWORK_ID, chainIdentifier } from "./chains.mjs";
2
2
  const safeWindow = (
3
3
  // eslint-disable-next-line no-undef
4
4
  typeof window !== "undefined" ? window : {}
5
5
  );
6
6
  const safeDocument = typeof document !== "undefined" ? safeWindow.document : {};
7
7
  export {
8
+ ALL_NETWORK_ID,
8
9
  chainIdentifier,
9
10
  safeDocument,
10
11
  safeWindow
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- require("../../index-cvy2-uZ_.js");
5
- const react = require("../../react-CNXJSTCv.js");
4
+ require("../../index-nigVQYBu.js");
5
+ const react = require("../../react-DKUsVej7.js");
6
6
  require("viem");
7
7
  require("viem/chains");
8
8
  require("react");
@@ -1,5 +1,5 @@
1
- import "../../index-DSnomXRI.mjs";
2
- import { u as useAppKitAccount } from "../../react-CSQpf1zk.mjs";
1
+ import "../../index-D8E0O3qL.mjs";
2
+ import { u as useAppKitAccount } from "../../react-Dp0H8q2z.mjs";
3
3
  import "viem";
4
4
  import "viem/chains";
5
5
  import "react";
@@ -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 react = require("../../react-BaXyw3AO.js");
4
+ const react = require("../../react-C43nEIqn.js");
5
5
  const require$$0 = require("react");
6
6
  const reactjs_context_useWeb3App = require("../context/useWeb3App.js");
7
7
  const useGetChainId = () => {
@@ -1,4 +1,4 @@
1
- import { u as useAppKitNetwork } from "../../react-B9sQBOh0.mjs";
1
+ import { u as useAppKitNetwork } from "../../react-wMhOUFOm.mjs";
2
2
  import { useMemo } from "react";
3
3
  import { useWeb3App } from "../context/useWeb3App.mjs";
4
4
  const useGetChainId = () => {
package/reactjs/index.js CHANGED
@@ -64,11 +64,11 @@ const reactjs_utils_pipe = require("./utils/pipe.js");
64
64
  const reactjs_utils_removeCommas = require("./utils/removeCommas.js");
65
65
  const reactjs_utils_roundAmount = require("./utils/roundAmount.js");
66
66
  const reactjs_utils_testNumber = require("./utils/testNumber.js");
67
- const react$1 = require("../react-BaXyw3AO.js");
67
+ const react$1 = require("../react-C43nEIqn.js");
68
68
  const wagmi = require("wagmi");
69
69
  const reactjs_constants_chains = require("./constants/chains.js");
70
- const index = require("../index-DZHiA1sX.js");
71
- const react = require("../react-CNXJSTCv.js");
70
+ const index = require("../index-CWMcKi_X.js");
71
+ const react = require("../react-DKUsVej7.js");
72
72
  exports.AccountAddress = reactjs_components_AccountAddress_AccountAddress.AccountAddress;
73
73
  exports.AmountCard = reactjs_components_AmountCard_AmountCard.AmountCard;
74
74
  exports.AmountInput = reactjs_components_AmountInput_AmountInput.AmountInput;
@@ -142,6 +142,7 @@ Object.defineProperty(exports, "useWaitForTransactionReceipt", {
142
142
  enumerable: true,
143
143
  get: () => wagmi.useWaitForTransactionReceipt
144
144
  });
145
+ exports.ALL_NETWORK_ID = reactjs_constants_chains.ALL_NETWORK_ID;
145
146
  exports.chainIdentifier = reactjs_constants_chains.chainIdentifier;
146
147
  exports.useAppKit = index.useAppKit;
147
148
  exports.useAppKitEvents = index.useAppKitEvents;
package/reactjs/index.mjs CHANGED
@@ -61,12 +61,13 @@ import { pipe } from "./utils/pipe.mjs";
61
61
  import { removeCommas } from "./utils/removeCommas.mjs";
62
62
  import { roundAmount } from "./utils/roundAmount.mjs";
63
63
  import { testNumber } from "./utils/testNumber.mjs";
64
- import { u as u2 } from "../react-B9sQBOh0.mjs";
64
+ import { u as u2 } from "../react-wMhOUFOm.mjs";
65
65
  import { useWaitForTransactionReceipt } from "wagmi";
66
- import { chainIdentifier } from "./constants/chains.mjs";
67
- import { u as u3, a, e, b, c, d } from "../index-BXwpbIDQ.mjs";
68
- import { u as u4, b as b2, a as a2 } from "../react-CSQpf1zk.mjs";
66
+ import { ALL_NETWORK_ID, chainIdentifier } from "./constants/chains.mjs";
67
+ import { u as u3, a, e, b, c, d } from "../index-DJ8CdHSw.mjs";
68
+ import { u as u4, b as b2, a as a2 } from "../react-Dp0H8q2z.mjs";
69
69
  export {
70
+ ALL_NETWORK_ID,
70
71
  AccountAddress,
71
72
  AmountCard,
72
73
  AmountInput,
@@ -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 react = require("../../react-BaXyw3AO.js");
4
+ const react = require("../../react-C43nEIqn.js");
5
5
  const appkitAdapterWagmi = require("@reown/appkit-adapter-wagmi");
6
6
  const networks = require("viem/chains");
7
7
  const constants_index = require("../../constants/index.js");
@@ -1,4 +1,4 @@
1
- import { c as createAppKit } from "../../react-B9sQBOh0.mjs";
1
+ import { c as createAppKit } from "../../react-wMhOUFOm.mjs";
2
2
  import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
3
3
  import * as networks from "viem/chains";
4
4
  import { MVX_CHAIN_IDS } from "../../constants/index.mjs";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  const networks = require("viem/chains");
4
- require("../../../index-cvy2-uZ_.js");
5
- const react = require("../../../react-BaXyw3AO.js");
4
+ require("../../../index-nigVQYBu.js");
5
+ const react = require("../../../react-C43nEIqn.js");
6
6
  const appkitAdapterWagmi = require("@reown/appkit-adapter-wagmi");
7
7
  const connectors = require("wagmi/connectors");
8
8
  const reactjs_init_init = require("../init.js");
@@ -1,6 +1,6 @@
1
1
  import { mainnet } from "viem/chains";
2
- import "../../../index-DSnomXRI.mjs";
3
- import { c as createAppKit } from "../../../react-B9sQBOh0.mjs";
2
+ import "../../../index-D8E0O3qL.mjs";
3
+ import { c as createAppKit } from "../../../react-wMhOUFOm.mjs";
4
4
  import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
5
5
  import { injected, walletConnect } from "wagmi/connectors";
6
6
  import { init } from "../init.mjs";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- require("../../index-cvy2-uZ_.js");
5
- const react = require("../../react-CNXJSTCv.js");
4
+ require("../../index-nigVQYBu.js");
5
+ const react = require("../../react-DKUsVej7.js");
6
6
  require("viem");
7
7
  require("viem/chains");
8
8
  const require$$0 = require("react");
@@ -1,5 +1,5 @@
1
- import "../../index-DSnomXRI.mjs";
2
- import { u as useAppKitAccount } from "../../react-CSQpf1zk.mjs";
1
+ import "../../index-D8E0O3qL.mjs";
2
+ import { u as useAppKitAccount } from "../../react-Dp0H8q2z.mjs";
3
3
  import "viem";
4
4
  import "viem/chains";
5
5
  import { useMemo } from "react";
@@ -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 react$1 = require("../react-BaXyw3AO.js");
4
+ const react$1 = require("../react-C43nEIqn.js");
5
5
  const wagmi = require("wagmi");
6
- const react = require("../react-CNXJSTCv.js");
7
- const index = require("../index-DZHiA1sX.js");
6
+ const react = require("../react-DKUsVej7.js");
7
+ const index = require("../index-CWMcKi_X.js");
8
8
  exports.useAppKitNetwork = react$1.useAppKitNetwork;
9
9
  Object.defineProperty(exports, "useWaitForTransactionReceipt", {
10
10
  enumerable: true,
@@ -1,7 +1,7 @@
1
- import { u } from "../react-B9sQBOh0.mjs";
1
+ import { u } from "../react-wMhOUFOm.mjs";
2
2
  import { useWaitForTransactionReceipt } from "wagmi";
3
- import { u as u2, b, a } from "../react-CSQpf1zk.mjs";
4
- import { u as u3, a as a2, e, b as b2, c, d } from "../index-BXwpbIDQ.mjs";
3
+ import { u as u2, b, a } from "../react-Dp0H8q2z.mjs";
4
+ import { u as u3, a as a2, e, b as b2, c, d } from "../index-DJ8CdHSw.mjs";
5
5
  export {
6
6
  u3 as useAppKit,
7
7
  u2 as useAppKitAccount,
@@ -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 index = require("./index-cvy2-uZ_.js");
4
+ const index = require("./index-nigVQYBu.js");
5
5
  const styles = index.i`
6
6
  :host {
7
7
  z-index: var(--w3m-z-index);
@@ -1,4 +1,4 @@
1
- import { aF as i, aG as r, aH as OptionsController, aI as ModalController, aA as ChainController, aJ as ApiController, aK as AssetUtil, aL as x, aM as o, aN as RouterController, aO as SIWXUtil, aP as ThemeController, U as UiHelperUtil, i as initializeTheming, aQ as SnackController, aC as CoreHelperUtil, aR as ConstantsUtil, aS as n, aT as r$1, c as customElement } from "./index-DSnomXRI.mjs";
1
+ import { aE as i, aF as r, aG as OptionsController, aH as ModalController, aA as ChainController, aI as ApiController, aJ as AssetUtil, aK as x, aL as o, aM as RouterController, aN as SIWXUtil, aO as ThemeController, U as UiHelperUtil, i as initializeTheming, aP as SnackController, aC as CoreHelperUtil, aQ as ConstantsUtil, aR as n, aS as r$1, c as customElement } from "./index-D8E0O3qL.mjs";
2
2
  const styles = i`
3
3
  :host {
4
4
  z-index: var(--w3m-z-index);
package/react-CNXJSTCv.js DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- const index = require("./index-cvy2-uZ_.js");
4
- function useAppKitNetworkCore() {
5
- const { activeCaipNetwork } = index.useSnapshot(index.ChainController.state);
6
- return {
7
- caipNetwork: activeCaipNetwork,
8
- chainId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.id,
9
- caipNetworkId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.caipNetworkId
10
- };
11
- }
12
- function useAppKitAccount() {
13
- const { status, user, preferredAccountType, smartAccountDeployed, allAccounts, socialProvider } = index.useSnapshot(index.AccountController.state);
14
- const { activeCaipAddress } = index.useSnapshot(index.ChainController.state);
15
- const authConnector = index.ConnectorController.getAuthConnector();
16
- return {
17
- allAccounts,
18
- caipAddress: activeCaipAddress,
19
- address: index.CoreHelperUtil.getPlainAddress(activeCaipAddress),
20
- isConnected: Boolean(activeCaipAddress),
21
- status,
22
- embeddedWalletInfo: authConnector ? {
23
- user,
24
- authProvider: socialProvider || "email",
25
- accountType: preferredAccountType,
26
- isSmartAccountDeployed: Boolean(smartAccountDeployed)
27
- } : void 0
28
- };
29
- }
30
- function useDisconnect() {
31
- async function disconnect() {
32
- await index.ConnectionController.disconnect();
33
- }
34
- return { disconnect };
35
- }
36
- exports.useAppKitAccount = useAppKitAccount;
37
- exports.useAppKitNetworkCore = useAppKitNetworkCore;
38
- exports.useDisconnect = useDisconnect;
@@ -1,38 +0,0 @@
1
- import { ay as useSnapshot, aA as ChainController, aB as ConnectorController, aC as CoreHelperUtil, aD as AccountController, aE as ConnectionController } from "./index-DSnomXRI.mjs";
2
- function useAppKitNetworkCore() {
3
- const { activeCaipNetwork } = useSnapshot(ChainController.state);
4
- return {
5
- caipNetwork: activeCaipNetwork,
6
- chainId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.id,
7
- caipNetworkId: activeCaipNetwork == null ? void 0 : activeCaipNetwork.caipNetworkId
8
- };
9
- }
10
- function useAppKitAccount() {
11
- const { status, user, preferredAccountType, smartAccountDeployed, allAccounts, socialProvider } = useSnapshot(AccountController.state);
12
- const { activeCaipAddress } = useSnapshot(ChainController.state);
13
- const authConnector = ConnectorController.getAuthConnector();
14
- return {
15
- allAccounts,
16
- caipAddress: activeCaipAddress,
17
- address: CoreHelperUtil.getPlainAddress(activeCaipAddress),
18
- isConnected: Boolean(activeCaipAddress),
19
- status,
20
- embeddedWalletInfo: authConnector ? {
21
- user,
22
- authProvider: socialProvider || "email",
23
- accountType: preferredAccountType,
24
- isSmartAccountDeployed: Boolean(smartAccountDeployed)
25
- } : void 0
26
- };
27
- }
28
- function useDisconnect() {
29
- async function disconnect() {
30
- await ConnectionController.disconnect();
31
- }
32
- return { disconnect };
33
- }
34
- export {
35
- useDisconnect as a,
36
- useAppKitNetworkCore as b,
37
- useAppKitAccount as u
38
- };