@multiversx/sdk-dapp-liquidity 1.0.12 → 1.1.0-alpha.1

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 (170) hide show
  1. package/README.md +2 -2
  2. package/api/confirmFiatRate.d.ts +19 -0
  3. package/api/confirmFiatRate.js +34 -0
  4. package/api/confirmFiatRate.mjs +33 -0
  5. package/api/tests/getChains.spec.js +1 -1
  6. package/api/tests/getChains.spec.mjs +1 -1
  7. package/api/tests/getTransactions.spec.js +7 -3
  8. package/api/tests/getTransactions.spec.mjs +7 -3
  9. package/api/tests/sendTransactions.spec.js +14 -8
  10. package/api/tests/sendTransactions.spec.mjs +14 -8
  11. package/{index-D8E0O3qL.mjs → bitcoin-CC1UPyzF.mjs} +29043 -53730
  12. package/{index-nigVQYBu.js → bitcoin-DgJtQpEP.js} +28933 -53620
  13. package/dto/Chain.dto.d.ts +1 -1
  14. package/dto/Token.dto.d.ts +1 -0
  15. package/dto/Transaction.dto.d.ts +3 -0
  16. package/index-0HkMxaG8.js +468 -0
  17. package/{index-CWMcKi_X.js → index-CRpflwIF.js} +3 -2
  18. package/{index-DJ8CdHSw.mjs → index-CpW-TGUF.mjs} +2 -1
  19. package/index-D6X1U8OY.mjs +231 -0
  20. package/index.js +3 -3
  21. package/index.mjs +3 -3
  22. package/modules/fiat/components/FiatForm/FiatForm.d.ts +9 -0
  23. package/modules/fiat/components/FiatForm/FiatForm.js +315 -0
  24. package/modules/fiat/components/FiatForm/FiatForm.mjs +314 -0
  25. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.d.ts +13 -0
  26. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.js +118 -0
  27. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.mjs +117 -0
  28. package/modules/fiat/components/FiatForm/components/AmountInput/index.d.ts +1 -0
  29. package/modules/fiat/components/FiatForm/components/AmountInput/index.js +5 -0
  30. package/modules/fiat/components/FiatForm/components/AmountInput/index.mjs +4 -0
  31. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.d.ts +7 -0
  32. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.js +74 -0
  33. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.mjs +73 -0
  34. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.d.ts +14 -0
  35. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.js +94 -0
  36. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.mjs +93 -0
  37. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.d.ts +7 -0
  38. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.js +83 -0
  39. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.mjs +82 -0
  40. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.d.ts +7 -0
  41. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.js +92 -0
  42. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.mjs +91 -0
  43. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.d.ts +5 -0
  44. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.js +30 -0
  45. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.mjs +29 -0
  46. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.d.ts +8 -0
  47. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.js +104 -0
  48. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.mjs +103 -0
  49. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.d.ts +7 -0
  50. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.js +33 -0
  51. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.mjs +32 -0
  52. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.d.ts +7 -0
  53. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.js +21 -0
  54. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.mjs +20 -0
  55. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.d.ts +9 -0
  56. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.js +26 -0
  57. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.mjs +25 -0
  58. package/modules/fiat/components/FiatForm/components/TokenSelector/index.d.ts +1 -0
  59. package/modules/fiat/components/FiatForm/components/TokenSelector/index.js +5 -0
  60. package/modules/fiat/components/FiatForm/components/TokenSelector/index.mjs +4 -0
  61. package/modules/fiat/components/FiatForm/index.d.ts +1 -0
  62. package/modules/fiat/components/FiatForm/index.js +5 -0
  63. package/modules/fiat/components/FiatForm/index.mjs +4 -0
  64. package/modules/fiat/components/index.d.ts +1 -0
  65. package/modules/fiat/components/index.js +5 -0
  66. package/modules/fiat/components/index.mjs +4 -0
  67. package/modules/fiat/context/FiatProvider.d.ts +8 -0
  68. package/modules/fiat/context/FiatProvider.js +24 -0
  69. package/modules/fiat/context/FiatProvider.mjs +23 -0
  70. package/modules/fiat/context/queryClient.d.ts +3 -0
  71. package/modules/fiat/context/queryClient.js +12 -0
  72. package/modules/fiat/context/queryClient.mjs +11 -0
  73. package/modules/fiat/context/useFiat.d.ts +1 -0
  74. package/modules/fiat/context/useFiat.js +13 -0
  75. package/modules/fiat/context/useFiat.mjs +12 -0
  76. package/modules/fiat/hooks/index.d.ts +2 -0
  77. package/modules/fiat/hooks/index.js +7 -0
  78. package/modules/fiat/hooks/index.mjs +6 -0
  79. package/modules/fiat/hooks/useFiatData.d.ts +7 -0
  80. package/modules/fiat/hooks/useFiatData.js +76 -0
  81. package/modules/fiat/hooks/useFiatData.mjs +75 -0
  82. package/modules/fiat/hooks/validation/index.d.ts +1 -0
  83. package/modules/fiat/hooks/validation/index.js +5 -0
  84. package/modules/fiat/hooks/validation/index.mjs +4 -0
  85. package/modules/fiat/hooks/validation/useAmountSchema.d.ts +2 -0
  86. package/modules/fiat/hooks/validation/useAmountSchema.js +27 -0
  87. package/modules/fiat/hooks/validation/useAmountSchema.mjs +9 -0
  88. package/modules/fiat/index.d.ts +8 -0
  89. package/modules/fiat/index.js +22 -0
  90. package/modules/fiat/index.mjs +21 -0
  91. package/modules/fiat/init/index.d.ts +2 -0
  92. package/modules/fiat/init/index.js +5 -0
  93. package/modules/fiat/init/index.mjs +4 -0
  94. package/modules/fiat/init/init.d.ts +22 -0
  95. package/modules/fiat/init/init.js +15 -0
  96. package/modules/fiat/init/init.mjs +14 -0
  97. package/modules/fiat/queries/index.d.ts +2 -0
  98. package/modules/fiat/queries/index.js +7 -0
  99. package/modules/fiat/queries/index.mjs +6 -0
  100. package/modules/fiat/queries/useGetRate.mutation.d.ts +6 -0
  101. package/modules/fiat/queries/useGetRate.mutation.js +20 -0
  102. package/modules/fiat/queries/useGetRate.mutation.mjs +19 -0
  103. package/modules/fiat/queries/useGetTokens.query.d.ts +5 -0
  104. package/modules/fiat/queries/useGetTokens.query.js +33 -0
  105. package/modules/fiat/queries/useGetTokens.query.mjs +32 -0
  106. package/package.json +5 -5
  107. package/react-B64ZbiKy.mjs +254 -0
  108. package/{react-C43nEIqn.js → react-BozMPLkn.js} +623 -419
  109. package/{react-wMhOUFOm.mjs → react-CN9w_Rtw.mjs} +263 -59
  110. package/{react-Dp0H8q2z.mjs → react-CZt9p-RK.mjs} +2 -1
  111. package/{react-DKUsVej7.js → react-DSg_4gdG.js} +7 -6
  112. package/react-Wmrk3u2q.js +254 -0
  113. package/reactjs/components/AmountCard/AmountCard.js +1 -0
  114. package/reactjs/components/AmountCard/AmountCard.mjs +1 -0
  115. package/reactjs/components/BridgeForm/BridgeForm.d.ts +2 -1
  116. package/reactjs/components/BridgeForm/BridgeForm.js +17 -8
  117. package/reactjs/components/BridgeForm/BridgeForm.mjs +18 -9
  118. package/reactjs/components/BridgeHistory/BridgeHistory.js +90 -29
  119. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +91 -30
  120. package/reactjs/components/Connect/BridgeAccountDisplay.js +4 -2
  121. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +4 -2
  122. package/reactjs/components/Connect/CustomConnectButton.js +3 -2
  123. package/reactjs/components/Connect/CustomConnectButton.mjs +3 -2
  124. package/reactjs/components/Connect/SwitchChainButton.js +4 -3
  125. package/reactjs/components/Connect/SwitchChainButton.mjs +4 -3
  126. package/reactjs/components/CopyButton/utils/copyToClipboard.js +7 -6
  127. package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +7 -6
  128. package/reactjs/components/TokenSelector/TokenSelector.d.ts +1 -1
  129. package/reactjs/components/TokenSelector/components/TokenItem.js +2 -2
  130. package/reactjs/components/TokenSelector/components/TokenItem.mjs +2 -2
  131. package/reactjs/components/base/MxLink/MxLink.d.ts +6 -2
  132. package/reactjs/components/base/MxLink/MxLink.js +2 -2
  133. package/reactjs/components/base/MxLink/MxLink.mjs +2 -2
  134. package/reactjs/components/base/MxTooltip/MxTooltip.js +4 -3
  135. package/reactjs/components/base/MxTooltip/MxTooltip.mjs +4 -3
  136. package/reactjs/context/Web3AppProvider.d.ts +1 -1
  137. package/reactjs/hooks/useAccount.js +3 -2
  138. package/reactjs/hooks/useAccount.mjs +3 -2
  139. package/reactjs/hooks/useFetchBridgeData.d.ts +4 -0
  140. package/reactjs/hooks/useFetchBridgeData.js +6 -2
  141. package/reactjs/hooks/useFetchBridgeData.mjs +6 -2
  142. package/reactjs/hooks/useFetchTokens.d.ts +4 -0
  143. package/reactjs/hooks/useFetchTokens.js +6 -1
  144. package/reactjs/hooks/useFetchTokens.mjs +6 -1
  145. package/reactjs/hooks/useFiatData.d.ts +28 -0
  146. package/reactjs/hooks/useFiatData.js +68 -0
  147. package/reactjs/hooks/useFiatData.mjs +67 -0
  148. package/reactjs/hooks/useGetChainId.js +1 -1
  149. package/reactjs/hooks/useGetChainId.mjs +1 -1
  150. package/reactjs/index.js +3 -3
  151. package/reactjs/index.mjs +3 -3
  152. package/reactjs/init/init.d.ts +3 -4
  153. package/reactjs/init/init.js +1 -1
  154. package/reactjs/init/init.mjs +1 -1
  155. package/reactjs/init/tests/init.spec.js +4 -4
  156. package/reactjs/init/tests/init.spec.mjs +4 -4
  157. package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +1 -0
  158. package/reactjs/queries/useGetEvmTokensBalances.query.js +3 -2
  159. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +3 -2
  160. package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -0
  161. package/reactjs/queries/useGetRate.mutation.js +1 -12
  162. package/reactjs/queries/useGetRate.mutation.mjs +1 -12
  163. package/reactjs/reexports.d.ts +2 -3
  164. package/reactjs/reexports.js +3 -3
  165. package/reactjs/reexports.mjs +3 -3
  166. package/style.css +1724 -0
  167. package/{w3m-modal-DLyg7Voy.js → w3m-modal-D1GK9s5A.js} +47 -47
  168. package/{w3m-modal-hC-B8qZP.mjs → w3m-modal-DFePcJNd.mjs} +1 -1
  169. package/index-B4Eq5P3w.mjs +0 -91
  170. package/index-C4WV9nam.js +0 -329
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @multiversx/mx-sdk-dapp-liquidity
1
+ # @multiversx/sdk-dapp-liquidity
2
2
 
3
3
  ## Overview
4
4
 
@@ -63,7 +63,7 @@ yarn publish-package-next
63
63
  ## Usage
64
64
 
65
65
  ```css
66
- @import 'node_modules/@multiversx/mx-sdk-dapp-liquidity/style.css';
66
+ @import 'node_modules/@multiversx/sdk-dapp-liquidity/style.css';
67
67
  ```
68
68
 
69
69
  ```tsx
@@ -0,0 +1,19 @@
1
+ import { ConfirmRateDto } from '../dto/ConfirmRate.dto';
2
+ import { AxiosResponse } from 'axios';
3
+
4
+ type ConfirmFiatRateProps = {
5
+ url: string;
6
+ nativeAuthToken: string;
7
+ body: ConfirmRateDto;
8
+ };
9
+ type ConfirmFiatRateResponse = ConfirmRateDto & {
10
+ type: string;
11
+ content: string;
12
+ additionalInfo: {
13
+ url: string;
14
+ checksum: string;
15
+ jsonRequest: string;
16
+ };
17
+ }[];
18
+ export declare function confirmFiatRate({ url, nativeAuthToken, body }: ConfirmFiatRateProps): Promise<AxiosResponse<ConfirmFiatRateResponse>>;
19
+ export {};
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const axios = require("axios");
5
+ const helpers_decodeToken = require("../helpers/decodeToken.js");
6
+ async function confirmFiatRate({
7
+ url,
8
+ nativeAuthToken,
9
+ body
10
+ }) {
11
+ var _a;
12
+ const config = {
13
+ baseURL: url,
14
+ headers: {
15
+ Authorization: `Bearer ${nativeAuthToken}`
16
+ }
17
+ };
18
+ if (!nativeAuthToken) {
19
+ (_a = config.headers) == null ? true : delete _a.Authorization;
20
+ }
21
+ const decodedToken = await helpers_decodeToken.decodeToken(nativeAuthToken);
22
+ if (config.headers.set) {
23
+ config.headers.set({
24
+ ...config.headers,
25
+ origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
26
+ });
27
+ }
28
+ return await axios.post(
29
+ `/rate/confirm`,
30
+ body,
31
+ config
32
+ );
33
+ }
34
+ exports.confirmFiatRate = confirmFiatRate;
@@ -0,0 +1,33 @@
1
+ import axios from "axios";
2
+ import { decodeToken } from "../helpers/decodeToken.mjs";
3
+ async function confirmFiatRate({
4
+ url,
5
+ nativeAuthToken,
6
+ body
7
+ }) {
8
+ var _a;
9
+ const config = {
10
+ baseURL: url,
11
+ headers: {
12
+ Authorization: `Bearer ${nativeAuthToken}`
13
+ }
14
+ };
15
+ if (!nativeAuthToken) {
16
+ (_a = config.headers) == null ? true : delete _a.Authorization;
17
+ }
18
+ const decodedToken = await decodeToken(nativeAuthToken);
19
+ if (config.headers.set) {
20
+ config.headers.set({
21
+ ...config.headers,
22
+ origin: (decodedToken == null ? void 0 : decodedToken.origin) ?? ""
23
+ });
24
+ }
25
+ return await axios.post(
26
+ `/rate/confirm`,
27
+ body,
28
+ config
29
+ );
30
+ }
31
+ export {
32
+ confirmFiatRate
33
+ };
@@ -9,7 +9,7 @@ describe("getChains", () => {
9
9
  it("fetches chains successfully", async () => {
10
10
  const response = [
11
11
  {
12
- chainId: 1,
12
+ chainId: "1",
13
13
  chainName: "msx",
14
14
  pngUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.png",
15
15
  svgUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.svg",
@@ -7,7 +7,7 @@ describe("getChains", () => {
7
7
  it("fetches chains successfully", async () => {
8
8
  const response = [
9
9
  {
10
- chainId: 1,
10
+ chainId: "1",
11
11
  chainName: "msx",
12
12
  pngUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.png",
13
13
  svgUrl: "https://devnet-tools.multiversx.com/liquidity-sdk/ethereum/icon.svg",
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  const axios = require("axios");
4
+ const types_providerType = require("../../types/providerType.js");
4
5
  const api_getTransactions = require("../getTransactions.js");
5
6
  jest.mock("axios");
6
7
  const mockedAxios = axios;
@@ -21,7 +22,8 @@ describe("getTransactions", () => {
21
22
  status: "success",
22
23
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
23
24
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
24
- fee: "0"
25
+ fee: "0",
26
+ provider: types_providerType.ProviderType.MultiversxBridge
25
27
  }
26
28
  ];
27
29
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -46,7 +48,8 @@ describe("getTransactions", () => {
46
48
  status: "success",
47
49
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
48
50
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
49
- fee: "0"
51
+ fee: "0",
52
+ provider: types_providerType.ProviderType.MultiversxBridge
50
53
  }
51
54
  ];
52
55
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -72,7 +75,8 @@ describe("getTransactions", () => {
72
75
  status: "success",
73
76
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
74
77
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
75
- fee: "0"
78
+ fee: "0",
79
+ provider: types_providerType.ProviderType.MultiversxBridge
76
80
  }
77
81
  ];
78
82
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -1,4 +1,5 @@
1
1
  import axios from "axios";
2
+ import { ProviderType } from "../../types/providerType.mjs";
2
3
  import { getTransactions } from "../getTransactions.mjs";
3
4
  jest.mock("axios");
4
5
  const mockedAxios = axios;
@@ -19,7 +20,8 @@ describe("getTransactions", () => {
19
20
  status: "success",
20
21
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
21
22
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
22
- fee: "0"
23
+ fee: "0",
24
+ provider: ProviderType.MultiversxBridge
23
25
  }
24
26
  ];
25
27
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -44,7 +46,8 @@ describe("getTransactions", () => {
44
46
  status: "success",
45
47
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
46
48
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
47
- fee: "0"
49
+ fee: "0",
50
+ provider: ProviderType.MultiversxBridge
48
51
  }
49
52
  ];
50
53
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -70,7 +73,8 @@ describe("getTransactions", () => {
70
73
  status: "success",
71
74
  receiver: "erd1sp0aaszznqnuvyvkmxkv2ultcvlf637c093sfc26dszks60jdqsqy2knqu",
72
75
  txHash: "0xe7e706c1793d06a252a3f040f07732989e4a6466d804cae17105c09818bc2994",
73
- fee: "0"
76
+ fee: "0",
77
+ provider: ProviderType.MultiversxBridge
74
78
  }
75
79
  ];
76
80
  mockedAxios.get.mockResolvedValue({ data: response });
@@ -23,7 +23,7 @@ describe("sendTransactions", () => {
23
23
  }
24
24
  ];
25
25
  it("POST sendTransactions successfully", async () => {
26
- const response = { data: { transactions } };
26
+ const response = { data: { transactions, provider: types_providerType.ProviderType.None } };
27
27
  mockedAxios.post.mockResolvedValue(response);
28
28
  const result = await api_sendTransactions.sendTransactions({
29
29
  transactions,
@@ -33,9 +33,12 @@ describe("sendTransactions", () => {
33
33
  });
34
34
  expect(mockedAxios.post).toHaveBeenCalledWith(
35
35
  "/transactions",
36
- transactions.map(
37
- (transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
38
- ),
36
+ {
37
+ transactions: transactions.map(
38
+ (transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
39
+ ),
40
+ provider: types_providerType.ProviderType.None
41
+ },
39
42
  {
40
43
  baseURL: url,
41
44
  headers: {
@@ -49,7 +52,7 @@ describe("sendTransactions", () => {
49
52
  });
50
53
  it("POST sendTransactions with additional axiosConfig", async () => {
51
54
  const axiosConfig = { timeout: 1e3 };
52
- const response = { data: { transactions } };
55
+ const response = { data: { transactions, provider: types_providerType.ProviderType.None } };
53
56
  mockedAxios.post.mockResolvedValue(response);
54
57
  const result = await api_sendTransactions.sendTransactions({
55
58
  transactions,
@@ -60,9 +63,12 @@ describe("sendTransactions", () => {
60
63
  });
61
64
  expect(mockedAxios.post).toHaveBeenCalledWith(
62
65
  "/transactions",
63
- transactions.map(
64
- (transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
65
- ),
66
+ {
67
+ transactions: transactions.map(
68
+ (transaction) => JSON.parse(helpers_serializeTransaction.serializeTransaction(transaction))
69
+ ),
70
+ provider: types_providerType.ProviderType.None
71
+ },
66
72
  {
67
73
  baseURL: url,
68
74
  headers: {
@@ -21,7 +21,7 @@ describe("sendTransactions", () => {
21
21
  }
22
22
  ];
23
23
  it("POST sendTransactions successfully", async () => {
24
- const response = { data: { transactions } };
24
+ const response = { data: { transactions, provider: ProviderType.None } };
25
25
  mockedAxios.post.mockResolvedValue(response);
26
26
  const result = await sendTransactions({
27
27
  transactions,
@@ -31,9 +31,12 @@ describe("sendTransactions", () => {
31
31
  });
32
32
  expect(mockedAxios.post).toHaveBeenCalledWith(
33
33
  "/transactions",
34
- transactions.map(
35
- (transaction) => JSON.parse(serializeTransaction(transaction))
36
- ),
34
+ {
35
+ transactions: transactions.map(
36
+ (transaction) => JSON.parse(serializeTransaction(transaction))
37
+ ),
38
+ provider: ProviderType.None
39
+ },
37
40
  {
38
41
  baseURL: url,
39
42
  headers: {
@@ -47,7 +50,7 @@ describe("sendTransactions", () => {
47
50
  });
48
51
  it("POST sendTransactions with additional axiosConfig", async () => {
49
52
  const axiosConfig = { timeout: 1e3 };
50
- const response = { data: { transactions } };
53
+ const response = { data: { transactions, provider: ProviderType.None } };
51
54
  mockedAxios.post.mockResolvedValue(response);
52
55
  const result = await sendTransactions({
53
56
  transactions,
@@ -58,9 +61,12 @@ describe("sendTransactions", () => {
58
61
  });
59
62
  expect(mockedAxios.post).toHaveBeenCalledWith(
60
63
  "/transactions",
61
- transactions.map(
62
- (transaction) => JSON.parse(serializeTransaction(transaction))
63
- ),
64
+ {
65
+ transactions: transactions.map(
66
+ (transaction) => JSON.parse(serializeTransaction(transaction))
67
+ ),
68
+ provider: ProviderType.None
69
+ },
64
70
  {
65
71
  baseURL: url,
66
72
  headers: {