@multiversx/sdk-dapp-liquidity 1.1.0-alpha.36 → 1.1.0-alpha.38

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 (74) hide show
  1. package/README.md +1 -2
  2. package/api/checkAccount.d.ts +1 -1
  3. package/api/getChains.d.ts +1 -1
  4. package/api/getTokens.d.ts +1 -1
  5. package/api/getTokensBalances.d.ts +1 -1
  6. package/api/getTransactions.d.ts +1 -1
  7. package/api/tests/getTokens.spec.js +5 -3
  8. package/api/tests/getTokens.spec.mjs +5 -3
  9. package/api/tests/getTransactions.spec.js +14 -8
  10. package/api/tests/getTransactions.spec.mjs +14 -8
  11. package/dto/Chain.dto.d.ts +1 -0
  12. package/index.js +1 -1
  13. package/index.mjs +1 -1
  14. package/package.json +1 -1
  15. package/reactjs/components/BridgeForm/BridgeForm.d.ts +1 -2
  16. package/reactjs/components/BridgeForm/BridgeForm.js +16 -20
  17. package/reactjs/components/BridgeForm/BridgeForm.mjs +16 -20
  18. package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +1 -2
  19. package/reactjs/components/BridgeHistory/BridgeHistory.js +2 -5
  20. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +2 -5
  21. package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +1 -2
  22. package/reactjs/components/Connect/BridgeAccountDisplay.js +2 -2
  23. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +2 -2
  24. package/reactjs/components/TokenSelector/TokenSelector.d.ts +1 -2
  25. package/reactjs/components/TokenSelector/TokenSelector.js +3 -7
  26. package/reactjs/components/TokenSelector/TokenSelector.mjs +3 -7
  27. package/reactjs/components/TokenSelector/components/TokenItem.d.ts +1 -2
  28. package/reactjs/components/TokenSelector/components/TokenItem.js +2 -4
  29. package/reactjs/components/TokenSelector/components/TokenItem.mjs +2 -4
  30. package/reactjs/context/Web3AppProvider.d.ts +2 -1
  31. package/reactjs/context/Web3AppProvider.js +5 -3
  32. package/reactjs/context/Web3AppProvider.mjs +5 -3
  33. package/reactjs/hooks/index.js +1 -1
  34. package/reactjs/hooks/index.mjs +1 -1
  35. package/reactjs/hooks/useBalances.d.ts +1 -3
  36. package/reactjs/hooks/useBalances.js +1 -1
  37. package/reactjs/hooks/useBalances.mjs +1 -1
  38. package/reactjs/hooks/useBridgeFormik.d.ts +1 -2
  39. package/reactjs/hooks/useBridgeFormik.js +2 -1
  40. package/reactjs/hooks/useBridgeFormik.mjs +2 -1
  41. package/reactjs/hooks/useFetchBridgeData.d.ts +1 -2
  42. package/reactjs/hooks/useFetchBridgeData.js +3 -7
  43. package/reactjs/hooks/useFetchBridgeData.mjs +3 -7
  44. package/reactjs/hooks/useFetchTokens.d.ts +1 -2
  45. package/reactjs/hooks/useFetchTokens.js +3 -7
  46. package/reactjs/hooks/useFetchTokens.mjs +3 -7
  47. package/reactjs/hooks/useFiatData.d.ts +1 -2
  48. package/reactjs/hooks/useFiatData.js +2 -5
  49. package/reactjs/hooks/useFiatData.mjs +2 -5
  50. package/reactjs/hooks/useResolveTokenChain.d.ts +1 -2
  51. package/reactjs/hooks/useResolveTokenChain.js +2 -7
  52. package/reactjs/hooks/useResolveTokenChain.mjs +2 -7
  53. package/reactjs/index.js +1 -1
  54. package/reactjs/index.mjs +1 -1
  55. package/reactjs/queries/useCheckAccount.query.d.ts +1 -3
  56. package/reactjs/queries/useCheckAccount.query.js +4 -5
  57. package/reactjs/queries/useCheckAccount.query.mjs +4 -5
  58. package/reactjs/queries/useGetAllTokens.query.d.ts +1 -3
  59. package/reactjs/queries/useGetAllTokens.query.js +4 -4
  60. package/reactjs/queries/useGetAllTokens.query.mjs +4 -4
  61. package/reactjs/queries/useGetChains.query.d.ts +1 -3
  62. package/reactjs/queries/useGetChains.query.js +4 -4
  63. package/reactjs/queries/useGetChains.query.mjs +4 -4
  64. package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +1 -2
  65. package/reactjs/queries/useGetEvmTokensBalances.query.js +3 -4
  66. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +3 -4
  67. package/reactjs/queries/useGetHistory.query.d.ts +2 -3
  68. package/reactjs/queries/useGetHistory.query.js +5 -3
  69. package/reactjs/queries/useGetHistory.query.mjs +5 -3
  70. package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -2
  71. package/reactjs/queries/useGetMvxTokensBalances.query.js +9 -3
  72. package/reactjs/queries/useGetMvxTokensBalances.query.mjs +9 -3
  73. package/{useBalances-84Wb5V4N.mjs → useBalances-CtcrEcK2.mjs} +3 -6
  74. package/{useBalances-BrSgRL7R.js → useBalances-ok4GNkJ5.js} +3 -6
package/README.md CHANGED
@@ -161,12 +161,11 @@ const App = () => {
161
161
 
162
162
  return (
163
163
  // Wrap your app with Web3AppProvider to enable multi-chain connections
164
- <Web3AppProvider appKit={provider.appKit} config={provider.config} options={provider.options}>
164
+ <Web3AppProvider appKit={provider.appKit} config={provider.config} options={provider.options} nativeAuthToken={nativeAuthToken}>
165
165
  <BridgeForm
166
166
  mvxChainId={"44"}
167
167
  mvxAddress={mvxAccount?.address}
168
168
  username={mvxAccount?.username}
169
- nativeAuthToken={nativeAuthToken}
170
169
  callbackRoute={"/deposit"}
171
170
  showHistory={showHistory}
172
171
  onSuccessfullySentTransaction={(txHashes) => {
@@ -5,5 +5,5 @@ export declare function checkAccount({ url, walletAddress, chainId, nativeAuthTo
5
5
  url: string;
6
6
  walletAddress: string;
7
7
  chainId: string;
8
- nativeAuthToken?: string;
8
+ nativeAuthToken: string;
9
9
  }): Promise<AxiosResponse<CheckAccountDto>>;
@@ -3,5 +3,5 @@ import { AxiosResponse } from 'axios';
3
3
 
4
4
  export declare function getChains({ url, nativeAuthToken }: {
5
5
  url: string;
6
- nativeAuthToken?: string;
6
+ nativeAuthToken: string;
7
7
  }): Promise<AxiosResponse<ChainDTO[]>>;
@@ -4,5 +4,5 @@ import { AxiosResponse } from 'axios';
4
4
  export declare function getTokens({ url, chainId, nativeAuthToken }: {
5
5
  url: string;
6
6
  chainId?: number;
7
- nativeAuthToken?: string;
7
+ nativeAuthToken: string;
8
8
  }): Promise<AxiosResponse<TokenType[]>>;
@@ -5,5 +5,5 @@ export declare function getTokensBalances({ url, userAddress, chainId, nativeAut
5
5
  url: string;
6
6
  userAddress: string;
7
7
  chainId: string;
8
- nativeAuthToken?: string;
8
+ nativeAuthToken: string;
9
9
  }): Promise<AxiosResponse<TokenBalanceDTO[]>>;
@@ -10,5 +10,5 @@ export declare function getTransactions({ url, address, sender, provider, status
10
10
  status?: string;
11
11
  tokenIn?: string;
12
12
  tokenOut?: string;
13
- nativeAuthToken?: string;
13
+ nativeAuthToken: string;
14
14
  }): Promise<AxiosResponse<TransactionDTO[]>>;
@@ -24,7 +24,7 @@ describe("getTokens", () => {
24
24
  }
25
25
  ];
26
26
  mockedAxios.get.mockResolvedValue({ data: response });
27
- const result = await api_getTokens.getTokens({ url });
27
+ const result = await api_getTokens.getTokens({ url, nativeAuthToken: "" });
28
28
  expect(mockedAxios.get).toHaveBeenCalledWith("/tokens", { baseURL: url });
29
29
  expect(result.data).toEqual(response);
30
30
  });
@@ -47,7 +47,7 @@ describe("getTokens", () => {
47
47
  }
48
48
  ];
49
49
  mockedAxios.get.mockResolvedValue({ data: response });
50
- const result = await api_getTokens.getTokens({ url, chainId });
50
+ const result = await api_getTokens.getTokens({ url, chainId, nativeAuthToken: "" });
51
51
  expect(mockedAxios.get).toHaveBeenCalledWith(`/tokens/${chainId}`, {
52
52
  baseURL: url
53
53
  });
@@ -55,6 +55,8 @@ describe("getTokens", () => {
55
55
  });
56
56
  it("handles error when fetching tokens", async () => {
57
57
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
58
- await expect(api_getTokens.getTokens({ url })).rejects.toThrow("Network Error");
58
+ await expect(api_getTokens.getTokens({ url, nativeAuthToken: "" })).rejects.toThrow(
59
+ "Network Error"
60
+ );
59
61
  });
60
62
  });
@@ -22,7 +22,7 @@ describe("getTokens", () => {
22
22
  }
23
23
  ];
24
24
  mockedAxios.get.mockResolvedValue({ data: response });
25
- const result = await getTokens({ url });
25
+ const result = await getTokens({ url, nativeAuthToken: "" });
26
26
  expect(mockedAxios.get).toHaveBeenCalledWith("/tokens", { baseURL: url });
27
27
  expect(result.data).toEqual(response);
28
28
  });
@@ -45,7 +45,7 @@ describe("getTokens", () => {
45
45
  }
46
46
  ];
47
47
  mockedAxios.get.mockResolvedValue({ data: response });
48
- const result = await getTokens({ url, chainId });
48
+ const result = await getTokens({ url, chainId, nativeAuthToken: "" });
49
49
  expect(mockedAxios.get).toHaveBeenCalledWith(`/tokens/${chainId}`, {
50
50
  baseURL: url
51
51
  });
@@ -53,6 +53,8 @@ describe("getTokens", () => {
53
53
  });
54
54
  it("handles error when fetching tokens", async () => {
55
55
  mockedAxios.get.mockRejectedValue(new Error("Network Error"));
56
- await expect(getTokens({ url })).rejects.toThrow("Network Error");
56
+ await expect(getTokens({ url, nativeAuthToken: "" })).rejects.toThrow(
57
+ "Network Error"
58
+ );
57
59
  });
58
60
  });
@@ -30,7 +30,7 @@ describe("getTransactions", () => {
30
30
  });
31
31
  it("fetches transactions with only address parameter", async () => {
32
32
  const address = "0x123";
33
- const result = await api_getTransactions.getTransactions({ url, address });
33
+ const result = await api_getTransactions.getTransactions({ url, address, nativeAuthToken: "" });
34
34
  expect(mockedAxios.get).toHaveBeenCalledWith(
35
35
  "/transactions?receiver=0x123",
36
36
  { baseURL: url }
@@ -39,7 +39,7 @@ describe("getTransactions", () => {
39
39
  });
40
40
  it("fetches transactions with empty address", async () => {
41
41
  const address = "";
42
- const result = await api_getTransactions.getTransactions({ url, address });
42
+ const result = await api_getTransactions.getTransactions({ url, address, nativeAuthToken: "" });
43
43
  expect(mockedAxios.get).toHaveBeenCalledWith("/transactions?", {
44
44
  baseURL: url
45
45
  });
@@ -53,7 +53,8 @@ describe("getTransactions", () => {
53
53
  provider: types_providerType.ProviderType.MultiversxBridge,
54
54
  status: "success",
55
55
  tokenIn: "0xTOKEN",
56
- tokenOut: "WEGLD-123456"
56
+ tokenOut: "WEGLD-123456",
57
+ nativeAuthToken: ""
57
58
  });
58
59
  expect(mockedAxios.get).toHaveBeenCalledWith(
59
60
  "/transactions?receiver=0x123&sender=0xABC&provider=multiversxBridge&status=success&tokenIn=0xTOKEN&tokenOut=WEGLD-123456",
@@ -69,7 +70,8 @@ describe("getTransactions", () => {
69
70
  provider: types_providerType.ProviderType.MultiversxBridge,
70
71
  status: "",
71
72
  tokenIn: "0xTOKEN",
72
- tokenOut: ""
73
+ tokenOut: "",
74
+ nativeAuthToken: ""
73
75
  });
74
76
  expect(mockedAxios.get).toHaveBeenCalledWith(
75
77
  "/transactions?receiver=0x123&provider=multiversxBridge&tokenIn=0xTOKEN",
@@ -80,9 +82,9 @@ describe("getTransactions", () => {
80
82
  it("handles axios error", async () => {
81
83
  const error = new Error("Network error");
82
84
  mockedAxios.get.mockRejectedValueOnce(error);
83
- await expect(api_getTransactions.getTransactions({ url, address: "0x123" })).rejects.toThrow(
84
- "Network error"
85
- );
85
+ await expect(
86
+ api_getTransactions.getTransactions({ url, address: "0x123", nativeAuthToken: "" })
87
+ ).rejects.toThrow("Network error");
86
88
  expect(mockedAxios.get).toHaveBeenCalledWith(
87
89
  "/transactions?receiver=0x123",
88
90
  { baseURL: url }
@@ -97,7 +99,11 @@ describe("getTransactions", () => {
97
99
  config: {}
98
100
  };
99
101
  mockedAxios.get.mockResolvedValueOnce(axiosResponse);
100
- const result = await api_getTransactions.getTransactions({ url, address: "0x123" });
102
+ const result = await api_getTransactions.getTransactions({
103
+ url,
104
+ address: "0x123",
105
+ nativeAuthToken: ""
106
+ });
101
107
  expect(result).toEqual(axiosResponse);
102
108
  });
103
109
  });
@@ -28,7 +28,7 @@ describe("getTransactions", () => {
28
28
  });
29
29
  it("fetches transactions with only address parameter", async () => {
30
30
  const address = "0x123";
31
- const result = await getTransactions({ url, address });
31
+ const result = await getTransactions({ url, address, nativeAuthToken: "" });
32
32
  expect(mockedAxios.get).toHaveBeenCalledWith(
33
33
  "/transactions?receiver=0x123",
34
34
  { baseURL: url }
@@ -37,7 +37,7 @@ describe("getTransactions", () => {
37
37
  });
38
38
  it("fetches transactions with empty address", async () => {
39
39
  const address = "";
40
- const result = await getTransactions({ url, address });
40
+ const result = await getTransactions({ url, address, nativeAuthToken: "" });
41
41
  expect(mockedAxios.get).toHaveBeenCalledWith("/transactions?", {
42
42
  baseURL: url
43
43
  });
@@ -51,7 +51,8 @@ describe("getTransactions", () => {
51
51
  provider: ProviderType.MultiversxBridge,
52
52
  status: "success",
53
53
  tokenIn: "0xTOKEN",
54
- tokenOut: "WEGLD-123456"
54
+ tokenOut: "WEGLD-123456",
55
+ nativeAuthToken: ""
55
56
  });
56
57
  expect(mockedAxios.get).toHaveBeenCalledWith(
57
58
  "/transactions?receiver=0x123&sender=0xABC&provider=multiversxBridge&status=success&tokenIn=0xTOKEN&tokenOut=WEGLD-123456",
@@ -67,7 +68,8 @@ describe("getTransactions", () => {
67
68
  provider: ProviderType.MultiversxBridge,
68
69
  status: "",
69
70
  tokenIn: "0xTOKEN",
70
- tokenOut: ""
71
+ tokenOut: "",
72
+ nativeAuthToken: ""
71
73
  });
72
74
  expect(mockedAxios.get).toHaveBeenCalledWith(
73
75
  "/transactions?receiver=0x123&provider=multiversxBridge&tokenIn=0xTOKEN",
@@ -78,9 +80,9 @@ describe("getTransactions", () => {
78
80
  it("handles axios error", async () => {
79
81
  const error = new Error("Network error");
80
82
  mockedAxios.get.mockRejectedValueOnce(error);
81
- await expect(getTransactions({ url, address: "0x123" })).rejects.toThrow(
82
- "Network error"
83
- );
83
+ await expect(
84
+ getTransactions({ url, address: "0x123", nativeAuthToken: "" })
85
+ ).rejects.toThrow("Network error");
84
86
  expect(mockedAxios.get).toHaveBeenCalledWith(
85
87
  "/transactions?receiver=0x123",
86
88
  { baseURL: url }
@@ -95,7 +97,11 @@ describe("getTransactions", () => {
95
97
  config: {}
96
98
  };
97
99
  mockedAxios.get.mockResolvedValueOnce(axiosResponse);
98
- const result = await getTransactions({ url, address: "0x123" });
100
+ const result = await getTransactions({
101
+ url,
102
+ address: "0x123",
103
+ nativeAuthToken: ""
104
+ });
99
105
  expect(result).toEqual(axiosResponse);
100
106
  });
101
107
  });
@@ -15,4 +15,5 @@ export interface ChainDTO {
15
15
  icon: string;
16
16
  };
17
17
  blockExplorerUrls: string[];
18
+ isBridge?: boolean;
18
19
  }
package/index.js CHANGED
@@ -55,7 +55,7 @@ const reactjs_hooks_validation_useSecondAmountSchema = require("./reactjs/hooks/
55
55
  const reactjs_hooks_validation_useTestHasEnoughFunds = require("./reactjs/hooks/validation/useTestHasEnoughFunds.js");
56
56
  const reactjs_hooks_validation_useTestIsConnected = require("./reactjs/hooks/validation/useTestIsConnected.js");
57
57
  const reactjs_hooks_useAccount = require("./reactjs/hooks/useAccount.js");
58
- const reactjs_hooks_useBalances = require("./useBalances-BrSgRL7R.js");
58
+ const reactjs_hooks_useBalances = require("./useBalances-ok4GNkJ5.js");
59
59
  const reactjs_hooks_useBridgeFormik = require("./reactjs/hooks/useBridgeFormik.js");
60
60
  const reactjs_hooks_useDebounce = require("./reactjs/hooks/useDebounce.js");
61
61
  const reactjs_hooks_useFetchBridgeData = require("./reactjs/hooks/useFetchBridgeData.js");
package/index.mjs CHANGED
@@ -52,7 +52,7 @@ import { useSecondAmountSchema } from "./reactjs/hooks/validation/useSecondAmoun
52
52
  import { useTestHasEnoughFunds } from "./reactjs/hooks/validation/useTestHasEnoughFunds.mjs";
53
53
  import { useTestIsConnected } from "./reactjs/hooks/validation/useTestIsConnected.mjs";
54
54
  import { useAccount } from "./reactjs/hooks/useAccount.mjs";
55
- import { u } from "./useBalances-84Wb5V4N.mjs";
55
+ import { u } from "./useBalances-CtcrEcK2.mjs";
56
56
  import { BridgeFormikValuesEnum, useBridgeFormik } from "./reactjs/hooks/useBridgeFormik.mjs";
57
57
  import { useDebounce } from "./reactjs/hooks/useDebounce.mjs";
58
58
  import { useFetchBridgeData } from "./reactjs/hooks/useFetchBridgeData.mjs";
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.36",
31
+ "version": "1.1.0-alpha.38",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -2,7 +2,6 @@ interface BridgeFormProps {
2
2
  mvxChainId: string;
3
3
  mvxAddress?: string;
4
4
  username?: string;
5
- nativeAuthToken?: string;
6
5
  callbackRoute?: string;
7
6
  firstTokenIdentifier?: string;
8
7
  secondTokenIdentifier?: string;
@@ -18,5 +17,5 @@ interface BridgeFormProps {
18
17
  onMvxDisconnect?: () => void;
19
18
  onNavigate?: (url: string, options?: object) => void;
20
19
  }
21
- export declare const BridgeForm: ({ mvxChainId, mvxAddress, username, nativeAuthToken, callbackRoute, firstTokenIdentifier, secondTokenIdentifier, firstTokenAmount, secondTokenAmount, refetchTrigger, showHistory, forcedDestinationTokenSymbol, onSuccessfullySentTransaction, onFailedSentTransaction, onHistoryClose, onMvxConnect, onMvxDisconnect, onNavigate }: BridgeFormProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const BridgeForm: ({ mvxChainId, mvxAddress, username, callbackRoute, firstTokenIdentifier, secondTokenIdentifier, firstTokenAmount, secondTokenAmount, refetchTrigger, showHistory, forcedDestinationTokenSymbol, onSuccessfullySentTransaction, onFailedSentTransaction, onHistoryClose, onMvxConnect, onMvxDisconnect, onNavigate }: BridgeFormProps) => import("react/jsx-runtime").JSX.Element;
22
21
  export {};
@@ -44,7 +44,7 @@ const reactjs_components_Connect_MvxAccountDisplay = require("../Connect/MvxAcco
44
44
  const reactjs_components_TokenSelector_TokenSelector = require("../TokenSelector/TokenSelector.js");
45
45
  const viem = require("viem");
46
46
  const actions = require("viem/actions");
47
- const reactjs_hooks_useBalances = require("../../../useBalances-BrSgRL7R.js");
47
+ const reactjs_hooks_useBalances = require("../../../useBalances-ok4GNkJ5.js");
48
48
  function deepEqual(a, b) {
49
49
  if (a === b)
50
50
  return true;
@@ -121,7 +121,6 @@ const BridgeForm = ({
121
121
  mvxChainId,
122
122
  mvxAddress,
123
123
  username,
124
- nativeAuthToken,
125
124
  callbackRoute = "/",
126
125
  firstTokenIdentifier,
127
126
  secondTokenIdentifier,
@@ -145,7 +144,12 @@ const BridgeForm = ({
145
144
  const [siginingTransactionsCount, setSigningTransactionsCount] = React.useState(0);
146
145
  const account = reactjs_hooks_useAccount.useAccount();
147
146
  const { switchNetwork } = react.useAppKitNetwork();
148
- const { config, options, supportedChains: sdkChains } = reactjs_context_useWeb3App.useWeb3App();
147
+ const {
148
+ config,
149
+ options,
150
+ supportedChains: sdkChains,
151
+ nativeAuthToken
152
+ } = reactjs_context_useWeb3App.useWeb3App();
149
153
  const chainId = reactjs_hooks_useGetChainId.useGetChainId();
150
154
  const {
151
155
  evmTokensWithBalances,
@@ -158,8 +162,7 @@ const BridgeForm = ({
158
162
  } = reactjs_hooks_useFetchBridgeData.useFetchBridgeData({
159
163
  refetchTrigger,
160
164
  mvxAddress,
161
- mvxApiURL: options.mvxApiURL,
162
- nativeAuthToken
165
+ mvxApiURL: options.mvxApiURL
163
166
  });
164
167
  const isTokensLoading = tokensLoading || isLoadingEvmTokensBalances || isLoadingMvxTokensBalances || isChainsLoading;
165
168
  const activeChain = React.useMemo(() => {
@@ -559,7 +562,6 @@ const BridgeForm = ({
559
562
  resetSwapForm
560
563
  } = reactjs_hooks_useBridgeFormik.useBridgeFormik({
561
564
  rate,
562
- nativeAuthToken,
563
565
  mvxAccountAddress: mvxAddress,
564
566
  firstToken,
565
567
  firstAmount,
@@ -651,6 +653,10 @@ const BridgeForm = ({
651
653
  handleOnChangeSecondAmount(secondTokenAmount);
652
654
  }
653
655
  }, [secondTokenAmount]);
656
+ console.log("BridgeForm=", {
657
+ nativeAuthToken,
658
+ chains
659
+ });
654
660
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(
655
661
  "form",
656
662
  {
@@ -660,14 +666,7 @@ const BridgeForm = ({
660
666
  autoComplete: "off",
661
667
  onSubmit: handleSubmit,
662
668
  children: [
663
- showHistory && /* @__PURE__ */ jsxRuntime.jsx(
664
- reactjs_components_BridgeHistory_BridgeHistory.BridgeHistory,
665
- {
666
- mvxAddress,
667
- onClose: handleHistoryClose,
668
- nativeAuthToken
669
- }
670
- ),
669
+ showHistory && /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_BridgeHistory_BridgeHistory.BridgeHistory, { mvxAddress, onClose: handleHistoryClose }),
671
670
  /* @__PURE__ */ jsxRuntime.jsxs(
672
671
  reactjs_components_AmountCard_AmountCard.AmountCard,
673
672
  {
@@ -685,8 +684,7 @@ const BridgeForm = ({
685
684
  reactjs_components_Connect_BridgeAccountDisplay.BridgeAccountDisplay,
686
685
  {
687
686
  disabled: isPendingRate,
688
- activeChain: selectedChainOption,
689
- nativeAuthToken
687
+ activeChain: selectedChainOption
690
688
  }
691
689
  )
692
690
  ] }),
@@ -716,8 +714,7 @@ const BridgeForm = ({
716
714
  onBlur: handleBlur,
717
715
  onMaxBtnClick: handleOnFirstMaxBtnChange,
718
716
  selectedOption: firstToken,
719
- onTokenSelectorDisplay: (visible) => setIsTokenSelectorVisible(visible),
720
- nativeAuthToken
717
+ onTokenSelectorDisplay: (visible) => setIsTokenSelectorVisible(visible)
721
718
  }
722
719
  )
723
720
  ] })
@@ -774,8 +771,7 @@ const BridgeForm = ({
774
771
  color: "neutral-850",
775
772
  onChange: onChangeSecondSelect,
776
773
  onBlur: handleBlur,
777
- selectedOption: secondToken,
778
- nativeAuthToken
774
+ selectedOption: secondToken
779
775
  }
780
776
  )
781
777
  ] })
@@ -41,7 +41,7 @@ import { MvxAccountDisplay } from "../Connect/MvxAccountDisplay.mjs";
41
41
  import { TokenSelector } from "../TokenSelector/TokenSelector.mjs";
42
42
  import { hexToString } from "viem";
43
43
  import { waitForTransactionReceipt as waitForTransactionReceipt$1, getTransaction, call } from "viem/actions";
44
- import { g as getAction } from "../../../useBalances-84Wb5V4N.mjs";
44
+ import { g as getAction } from "../../../useBalances-CtcrEcK2.mjs";
45
45
  function deepEqual(a, b) {
46
46
  if (a === b)
47
47
  return true;
@@ -118,7 +118,6 @@ const BridgeForm = ({
118
118
  mvxChainId,
119
119
  mvxAddress,
120
120
  username,
121
- nativeAuthToken,
122
121
  callbackRoute = "/",
123
122
  firstTokenIdentifier,
124
123
  secondTokenIdentifier,
@@ -142,7 +141,12 @@ const BridgeForm = ({
142
141
  const [siginingTransactionsCount, setSigningTransactionsCount] = useState(0);
143
142
  const account = useAccount();
144
143
  const { switchNetwork } = useAppKitNetwork();
145
- const { config, options, supportedChains: sdkChains } = useWeb3App();
144
+ const {
145
+ config,
146
+ options,
147
+ supportedChains: sdkChains,
148
+ nativeAuthToken
149
+ } = useWeb3App();
146
150
  const chainId = useGetChainId();
147
151
  const {
148
152
  evmTokensWithBalances,
@@ -155,8 +159,7 @@ const BridgeForm = ({
155
159
  } = useFetchBridgeData({
156
160
  refetchTrigger,
157
161
  mvxAddress,
158
- mvxApiURL: options.mvxApiURL,
159
- nativeAuthToken
162
+ mvxApiURL: options.mvxApiURL
160
163
  });
161
164
  const isTokensLoading = tokensLoading || isLoadingEvmTokensBalances || isLoadingMvxTokensBalances || isChainsLoading;
162
165
  const activeChain = useMemo(() => {
@@ -556,7 +559,6 @@ const BridgeForm = ({
556
559
  resetSwapForm
557
560
  } = useBridgeFormik({
558
561
  rate,
559
- nativeAuthToken,
560
562
  mvxAccountAddress: mvxAddress,
561
563
  firstToken,
562
564
  firstAmount,
@@ -648,6 +650,10 @@ const BridgeForm = ({
648
650
  handleOnChangeSecondAmount(secondTokenAmount);
649
651
  }
650
652
  }, [secondTokenAmount]);
653
+ console.log("BridgeForm=", {
654
+ nativeAuthToken,
655
+ chains
656
+ });
651
657
  return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
652
658
  "form",
653
659
  {
@@ -657,14 +663,7 @@ const BridgeForm = ({
657
663
  autoComplete: "off",
658
664
  onSubmit: handleSubmit,
659
665
  children: [
660
- showHistory && /* @__PURE__ */ jsx(
661
- BridgeHistory,
662
- {
663
- mvxAddress,
664
- onClose: handleHistoryClose,
665
- nativeAuthToken
666
- }
667
- ),
666
+ showHistory && /* @__PURE__ */ jsx(BridgeHistory, { mvxAddress, onClose: handleHistoryClose }),
668
667
  /* @__PURE__ */ jsxs(
669
668
  AmountCard,
670
669
  {
@@ -682,8 +681,7 @@ const BridgeForm = ({
682
681
  BridgeAccountDisplay,
683
682
  {
684
683
  disabled: isPendingRate,
685
- activeChain: selectedChainOption,
686
- nativeAuthToken
684
+ activeChain: selectedChainOption
687
685
  }
688
686
  )
689
687
  ] }),
@@ -713,8 +711,7 @@ const BridgeForm = ({
713
711
  onBlur: handleBlur,
714
712
  onMaxBtnClick: handleOnFirstMaxBtnChange,
715
713
  selectedOption: firstToken,
716
- onTokenSelectorDisplay: (visible) => setIsTokenSelectorVisible(visible),
717
- nativeAuthToken
714
+ onTokenSelectorDisplay: (visible) => setIsTokenSelectorVisible(visible)
718
715
  }
719
716
  )
720
717
  ] })
@@ -771,8 +768,7 @@ const BridgeForm = ({
771
768
  color: "neutral-850",
772
769
  onChange: onChangeSecondSelect,
773
770
  onBlur: handleBlur,
774
- selectedOption: secondToken,
775
- nativeAuthToken
771
+ selectedOption: secondToken
776
772
  }
777
773
  )
778
774
  ] })
@@ -1,5 +1,4 @@
1
- export declare const BridgeHistory: ({ mvxAddress, nativeAuthToken, onClose }: {
1
+ export declare const BridgeHistory: ({ mvxAddress, onClose }: {
2
2
  mvxAddress?: string;
3
- nativeAuthToken?: string;
4
3
  onClose: () => void;
5
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -26,13 +26,11 @@ const reactjs_components_base_MxTooltip_MxTooltip = require("../base/MxTooltip/M
26
26
  const ArrowUpRight = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%206V13C15%2013.5625%2014.5312%2014%2014%2014C13.4375%2014%2013%2013.5625%2013%2013V8.4375L6.6875%2014.7188C6.3125%2015.125%205.65625%2015.125%205.28125%2014.7188C4.875%2014.3438%204.875%2013.6875%205.28125%2013.3125L11.5625%207H7C6.4375%207%206%206.5625%206%206C6%205.46875%206.4375%205%207%205H14C14.5312%205%2015%205.46875%2015%206Z'%20fill='%23CDD0DB'/%3e%3c/svg%3e";
27
27
  const BridgeHistory = ({
28
28
  mvxAddress,
29
- nativeAuthToken,
30
29
  onClose
31
30
  }) => {
32
31
  const { options } = reactjs_context_useWeb3App.useWeb3App();
33
32
  const { data, isLoading, isError } = reactjs_queries_useGetHistory_query.useGetHistoryQuery({
34
- address: mvxAddress,
35
- nativeAuthToken
33
+ address: mvxAddress
36
34
  });
37
35
  const resolveTransactionIcon = React.useCallback((transaction) => {
38
36
  switch (transaction.status) {
@@ -85,8 +83,7 @@ const BridgeHistory = ({
85
83
  isChainsLoading
86
84
  } = reactjs_hooks_useFetchBridgeData.useFetchBridgeData({
87
85
  mvxAddress,
88
- mvxApiURL: options.mvxApiURL,
89
- nativeAuthToken
86
+ mvxApiURL: options.mvxApiURL
90
87
  });
91
88
  const tokensMap = React.useMemo(() => {
92
89
  return [
@@ -23,13 +23,11 @@ import { MxTooltip } from "../base/MxTooltip/MxTooltip.mjs";
23
23
  const ArrowUpRight = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%206V13C15%2013.5625%2014.5312%2014%2014%2014C13.4375%2014%2013%2013.5625%2013%2013V8.4375L6.6875%2014.7188C6.3125%2015.125%205.65625%2015.125%205.28125%2014.7188C4.875%2014.3438%204.875%2013.6875%205.28125%2013.3125L11.5625%207H7C6.4375%207%206%206.5625%206%206C6%205.46875%206.4375%205%207%205H14C14.5312%205%2015%205.46875%2015%206Z'%20fill='%23CDD0DB'/%3e%3c/svg%3e";
24
24
  const BridgeHistory = ({
25
25
  mvxAddress,
26
- nativeAuthToken,
27
26
  onClose
28
27
  }) => {
29
28
  const { options } = useWeb3App();
30
29
  const { data, isLoading, isError } = useGetHistoryQuery({
31
- address: mvxAddress,
32
- nativeAuthToken
30
+ address: mvxAddress
33
31
  });
34
32
  const resolveTransactionIcon = useCallback((transaction) => {
35
33
  switch (transaction.status) {
@@ -82,8 +80,7 @@ const BridgeHistory = ({
82
80
  isChainsLoading
83
81
  } = useFetchBridgeData({
84
82
  mvxAddress,
85
- mvxApiURL: options.mvxApiURL,
86
- nativeAuthToken
83
+ mvxApiURL: options.mvxApiURL
87
84
  });
88
85
  const tokensMap = useMemo(() => {
89
86
  return [
@@ -1,7 +1,6 @@
1
1
  import { ChainDTO } from '../../../dto/Chain.dto';
2
2
 
3
- export declare const BridgeAccountDisplay: ({ activeChain, nativeAuthToken, disabled }: {
3
+ export declare const BridgeAccountDisplay: ({ activeChain, disabled }: {
4
4
  activeChain?: ChainDTO;
5
- nativeAuthToken?: string;
6
5
  disabled: boolean;
7
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -9,6 +9,7 @@ const React = require("react");
9
9
  const api_checkAccount = require("../../../api/checkAccount.js");
10
10
  const reactjs_components_Connect_SwitchChainButton = require("./SwitchChainButton.js");
11
11
  const helpers_getApiURL = require("../../../helpers/getApiURL.js");
12
+ const reactjs_context_useWeb3App = require("../../context/useWeb3App.js");
12
13
  require("yup");
13
14
  require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");
14
15
  require("../../../bignumber-B8vjg9qn.js");
@@ -16,7 +17,6 @@ const reactjs_hooks_useAccount = require("../../hooks/useAccount.js");
16
17
  require("@solana/web3.js");
17
18
  require("axios");
18
19
  const reactjs_hooks_useGetChainId = require("../../hooks/useGetChainId.js");
19
- require("../../context/Web3AppProvider.js");
20
20
  require("@tanstack/react-query");
21
21
  require("formik");
22
22
  require("../../constants/index.js");
@@ -37,7 +37,6 @@ const reactjs_components_CopyButton_CopyButton = require("../CopyButton/CopyButt
37
37
  const reactjs_components_TrimAddress_TrimAddress = require("../TrimAddress/TrimAddress.js");
38
38
  const BridgeAccountDisplay = ({
39
39
  activeChain,
40
- nativeAuthToken,
41
40
  disabled
42
41
  }) => {
43
42
  var _a;
@@ -45,6 +44,7 @@ const BridgeAccountDisplay = ({
45
44
  const { disconnect } = react.useDisconnect();
46
45
  const chainId = reactjs_hooks_useGetChainId.useGetChainId();
47
46
  const { signMessage } = reactjs_hooks_useGenericSignMessage.useGenericSignMessage();
47
+ const { nativeAuthToken } = reactjs_context_useWeb3App.useWeb3App();
48
48
  const { mutateAsync: linkAccount } = reactjs_queries_useLinkAccount_mutation.useLinkAccountMutation();
49
49
  const handleDisconnect = async (e) => {
50
50
  try {
@@ -6,6 +6,7 @@ import { useCallback, useEffect } from "react";
6
6
  import { checkAccount } from "../../../api/checkAccount.mjs";
7
7
  import { SwitchChainButton } from "./SwitchChainButton.mjs";
8
8
  import { getApiURL } from "../../../helpers/getApiURL.mjs";
9
+ import { useWeb3App } from "../../context/useWeb3App.mjs";
9
10
  import "yup";
10
11
  import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
11
12
  import "../../../bignumber-CKZkoo0g.mjs";
@@ -13,7 +14,6 @@ import { useAccount } from "../../hooks/useAccount.mjs";
13
14
  import "@solana/web3.js";
14
15
  import "axios";
15
16
  import { useGetChainId } from "../../hooks/useGetChainId.mjs";
16
- import "../../context/Web3AppProvider.mjs";
17
17
  import "@tanstack/react-query";
18
18
  import "formik";
19
19
  import "../../constants/index.mjs";
@@ -34,7 +34,6 @@ import { CopyButton } from "../CopyButton/CopyButton.mjs";
34
34
  import { TrimAddress } from "../TrimAddress/TrimAddress.mjs";
35
35
  const BridgeAccountDisplay = ({
36
36
  activeChain,
37
- nativeAuthToken,
38
37
  disabled
39
38
  }) => {
40
39
  var _a;
@@ -42,6 +41,7 @@ const BridgeAccountDisplay = ({
42
41
  const { disconnect } = useDisconnect();
43
42
  const chainId = useGetChainId();
44
43
  const { signMessage } = useGenericSignMessage();
44
+ const { nativeAuthToken } = useWeb3App();
45
45
  const { mutateAsync: linkAccount } = useLinkAccountMutation();
46
46
  const handleDisconnect = async (e) => {
47
47
  try {
@@ -1,6 +1,6 @@
1
1
  import { TokenType } from '../../../types/token';
2
2
 
3
- export declare const TokenSelector: ({ name, options, selectedOption, areOptionsLoading, className, disabled, isMvxSelector, omitDisableClass, color, onBlur, onChange, onMaxBtnClick, onTokenSelectorDisplay, nativeAuthToken }: {
3
+ export declare const TokenSelector: ({ name, options, selectedOption, areOptionsLoading, className, disabled, isMvxSelector, omitDisableClass, color, onBlur, onChange, onMaxBtnClick, onTokenSelectorDisplay }: {
4
4
  name: string;
5
5
  options: TokenType[];
6
6
  selectedOption?: TokenType;
@@ -14,5 +14,4 @@ export declare const TokenSelector: ({ name, options, selectedOption, areOptions
14
14
  onBlur?: (e: React.FocusEvent<any, HTMLButtonElement>) => void;
15
15
  onMaxBtnClick?: () => void;
16
16
  onTokenSelectorDisplay?: (visible: boolean) => void;
17
- nativeAuthToken?: string;
18
17
  }) => import("react/jsx-runtime").JSX.Element;