@multiversx/sdk-dapp-liquidity 1.1.0-alpha.42 → 1.1.0-alpha.44

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/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/multiversx/mx-sdk-dapp-liquidity#readme",
30
30
  "license": "MIT",
31
- "version": "1.1.0-alpha.42",
31
+ "version": "1.1.0-alpha.44",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -653,10 +653,6 @@ const BridgeForm = ({
653
653
  handleOnChangeSecondAmount(secondTokenAmount);
654
654
  }
655
655
  }, [secondTokenAmount]);
656
- console.log("BridgeForm=", {
657
- nativeAuthToken,
658
- chains
659
- });
660
656
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
661
657
  "form",
662
658
  {
@@ -650,10 +650,6 @@ const BridgeForm = ({
650
650
  handleOnChangeSecondAmount(secondTokenAmount);
651
651
  }
652
652
  }, [secondTokenAmount]);
653
- console.log("BridgeForm=", {
654
- nativeAuthToken,
655
- chains
656
- });
657
653
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
658
654
  "form",
659
655
  {
@@ -63,17 +63,11 @@ const BridgeAccountDisplay = ({
63
63
  chainId: chainId ? chainId.toString() : "",
64
64
  nativeAuthToken
65
65
  });
66
- console.log("ownership", {
67
- ownership,
68
- accountAddress: account.address,
69
- chainId: chainId ? chainId.toString() : ""
70
- });
71
66
  if (!(ownership == null ? void 0 : ownership.isLinked)) {
72
67
  try {
73
68
  const signature = await signMessage(
74
69
  (ownership == null ? void 0 : ownership.signMessage) ?? "Missing message"
75
70
  );
76
- console.log("signature = ", signature);
77
71
  await linkAccount({
78
72
  nativeAuthToken: nativeAuthToken ?? "",
79
73
  body: {
@@ -60,17 +60,11 @@ const BridgeAccountDisplay = ({
60
60
  chainId: chainId ? chainId.toString() : "",
61
61
  nativeAuthToken
62
62
  });
63
- console.log("ownership", {
64
- ownership,
65
- accountAddress: account.address,
66
- chainId: chainId ? chainId.toString() : ""
67
- });
68
63
  if (!(ownership == null ? void 0 : ownership.isLinked)) {
69
64
  try {
70
65
  const signature = await signMessage(
71
66
  (ownership == null ? void 0 : ownership.signMessage) ?? "Missing message"
72
67
  );
73
- console.log("signature = ", signature);
74
68
  await linkAccount({
75
69
  nativeAuthToken: nativeAuthToken ?? "",
76
70
  body: {
@@ -6,7 +6,7 @@ export declare const useAccount: () => {
6
6
  embeddedWalletInfo?: {
7
7
  user: import('@reown/appkit/react').AccountControllerState["user"];
8
8
  authProvider: import('@reown/appkit/react').AccountControllerState["socialProvider"] | "email";
9
- accountType: import('@reown/appkit/react').PreferredAccountTypes[import('@reown/appkit-common').ChainNamespace] | undefined;
9
+ accountType: import("@reown/appkit-wallet").W3mFrameTypes.AccountType | undefined;
10
10
  isSmartAccountDeployed: boolean;
11
11
  };
12
12
  status: import('@reown/appkit/react').AccountControllerState["status"];
@@ -25,7 +25,7 @@ export declare const useAccount: () => {
25
25
  embeddedWalletInfo?: {
26
26
  user: import('@reown/appkit/react').AccountControllerState["user"];
27
27
  authProvider: import('@reown/appkit/react').AccountControllerState["socialProvider"] | "email";
28
- accountType: import('@reown/appkit/react').PreferredAccountTypes[import('@reown/appkit-common').ChainNamespace] | undefined;
28
+ accountType: import("@reown/appkit-wallet").W3mFrameTypes.AccountType | undefined;
29
29
  isSmartAccountDeployed: boolean;
30
30
  };
31
31
  status: import('@reown/appkit/react').AccountControllerState["status"];
@@ -44,7 +44,7 @@ export declare const useAccount: () => {
44
44
  embeddedWalletInfo?: {
45
45
  user: import('@reown/appkit/react').AccountControllerState["user"];
46
46
  authProvider: import('@reown/appkit/react').AccountControllerState["socialProvider"] | "email";
47
- accountType: import('@reown/appkit/react').PreferredAccountTypes[import('@reown/appkit-common').ChainNamespace] | undefined;
47
+ accountType: import("@reown/appkit-wallet").W3mFrameTypes.AccountType | undefined;
48
48
  isSmartAccountDeployed: boolean;
49
49
  };
50
50
  status: import('@reown/appkit/react').AccountControllerState["status"];
@@ -63,7 +63,7 @@ export declare const useAccount: () => {
63
63
  embeddedWalletInfo?: {
64
64
  user: import('@reown/appkit/react').AccountControllerState["user"];
65
65
  authProvider: import('@reown/appkit/react').AccountControllerState["socialProvider"] | "email";
66
- accountType: import('@reown/appkit/react').PreferredAccountTypes[import('@reown/appkit-common').ChainNamespace] | undefined;
66
+ accountType: import("@reown/appkit-wallet").W3mFrameTypes.AccountType | undefined;
67
67
  isSmartAccountDeployed: boolean;
68
68
  };
69
69
  status: import('@reown/appkit/react').AccountControllerState["status"];
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const react = require("@reown/appkit/react");
5
5
  const reactQuery = require("@tanstack/react-query");
6
+ const React = require("react");
6
7
  const reactjs_context_queryClient = require("../context/queryClient.js");
7
8
  require("yup");
8
- require("react");
9
9
  require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");
10
10
  require("../../bignumber-B8vjg9qn.js");
11
11
  require("wagmi");
@@ -22,6 +22,10 @@ const useGetEvmTokensBalancesQuery = ({
22
22
  }) => {
23
23
  const { address } = react.useAppKitAccount();
24
24
  const { fetchBalances } = reactjs_hooks_useBalances.useBalances();
25
+ const identifiers = React.useMemo(
26
+ () => tokens.map((token) => token.address),
27
+ [tokens]
28
+ );
25
29
  const queryFn = async () => {
26
30
  try {
27
31
  if (!address) {
@@ -54,15 +58,14 @@ const useGetEvmTokensBalancesQuery = ({
54
58
  return ((_a = error.response) == null ? void 0 : _a.status) === 404;
55
59
  };
56
60
  return reactQuery.useQuery({
57
- queryKey: ["evm-tokens-balances", address, chainId],
61
+ queryKey: ["evm-tokens-balances", address, chainId, identifiers],
58
62
  queryFn,
59
63
  retry,
60
64
  enabled: Boolean(address) && Boolean(chainId),
61
65
  refetchOnWindowFocus: false,
62
66
  refetchIntervalInBackground: true,
63
- refetchInterval: 5 * 6e4,
67
+ refetchInterval: 5 * 6e4
64
68
  // 5 minutes,
65
- gcTime: 0
66
69
  });
67
70
  };
68
71
  function invalidateEvmTokensBalances() {
@@ -1,8 +1,8 @@
1
1
  import { useAppKitAccount } from "@reown/appkit/react";
2
2
  import { useQuery } from "@tanstack/react-query";
3
+ import { useMemo } from "react";
3
4
  import { getQueryClient } from "../context/queryClient.mjs";
4
5
  import "yup";
5
- import "react";
6
6
  import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
7
7
  import "../../bignumber-CKZkoo0g.mjs";
8
8
  import "wagmi";
@@ -19,6 +19,10 @@ const useGetEvmTokensBalancesQuery = ({
19
19
  }) => {
20
20
  const { address } = useAppKitAccount();
21
21
  const { fetchBalances } = useBalances();
22
+ const identifiers = useMemo(
23
+ () => tokens.map((token) => token.address),
24
+ [tokens]
25
+ );
22
26
  const queryFn = async () => {
23
27
  try {
24
28
  if (!address) {
@@ -51,15 +55,14 @@ const useGetEvmTokensBalancesQuery = ({
51
55
  return ((_a = error.response) == null ? void 0 : _a.status) === 404;
52
56
  };
53
57
  return useQuery({
54
- queryKey: ["evm-tokens-balances", address, chainId],
58
+ queryKey: ["evm-tokens-balances", address, chainId, identifiers],
55
59
  queryFn,
56
60
  retry,
57
61
  enabled: Boolean(address) && Boolean(chainId),
58
62
  refetchOnWindowFocus: false,
59
63
  refetchIntervalInBackground: true,
60
- refetchInterval: 5 * 6e4,
64
+ refetchInterval: 5 * 6e4
61
65
  // 5 minutes,
62
- gcTime: 0
63
66
  });
64
67
  };
65
68
  function invalidateEvmTokensBalances() {