@multiversx/sdk-dapp-liquidity 1.0.5 → 1.0.6

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.0.5",
31
+ "version": "1.0.6",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -13,16 +13,7 @@ const useGetRateMutation = () => {
13
13
  return data;
14
14
  };
15
15
  return reactQuery.useMutation({
16
- mutationFn,
17
- onSuccess: (data) => {
18
- const currentTime = (/* @__PURE__ */ new Date()).getTime();
19
- if (data.expiresAt && new Date(data.expiresAt).getTime() < currentTime) {
20
- throw new Error("Retrying due to expired rate");
21
- }
22
- },
23
- retry: (failureCount, error) => {
24
- return error.message === "Retrying due to expired rate" && failureCount < 2;
25
- }
16
+ mutationFn
26
17
  });
27
18
  };
28
19
  exports.useGetRateMutation = useGetRateMutation;
@@ -10,16 +10,7 @@ const useGetRateMutation = () => {
10
10
  return data;
11
11
  };
12
12
  return useMutation({
13
- mutationFn,
14
- onSuccess: (data) => {
15
- const currentTime = (/* @__PURE__ */ new Date()).getTime();
16
- if (data.expiresAt && new Date(data.expiresAt).getTime() < currentTime) {
17
- throw new Error("Retrying due to expired rate");
18
- }
19
- },
20
- retry: (failureCount, error) => {
21
- return error.message === "Retrying due to expired rate" && failureCount < 2;
22
- }
13
+ mutationFn
23
14
  });
24
15
  };
25
16
  export {