@ic-reactor/react 1.11.0 → 1.11.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.
@@ -125,7 +125,7 @@ const actorHooks = (actorManager) => {
125
125
  const replaceArgs = eventOrReplaceArgs instanceof Array ? eventOrReplaceArgs : args;
126
126
  const data = yield callMethodWithOptions(options)(functionName, ...(replaceArgs !== null && replaceArgs !== void 0 ? replaceArgs : args));
127
127
  setSharedState({ data, error: undefined, loading: false });
128
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(data);
128
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess((0, utils_1.createCompiledResult)(data));
129
129
  onLoading === null || onLoading === void 0 ? void 0 : onLoading(false);
130
130
  return data;
131
131
  }
@@ -158,7 +158,7 @@ const actorHooks = (actorManager) => {
158
158
  call();
159
159
  }
160
160
  else if (refetchOnMount && state.data !== undefined) {
161
- (_a = rest.onSuccess) === null || _a === void 0 ? void 0 : _a.call(rest, state.data);
161
+ (_a = rest.onSuccess) === null || _a === void 0 ? void 0 : _a.call(rest, (0, utils_1.createCompiledResult)(state.data));
162
162
  }
163
163
  return () => clearInterval(intervalId.current);
164
164
  }, [refetchInterval, refetchOnMount]);
@@ -52,7 +52,7 @@ export interface UseSharedCallParameters<A, M extends FunctionName<A>> extends C
52
52
  args?: ActorMethodParameters<A[M]>;
53
53
  onLoading?: (loading: boolean) => void;
54
54
  onError?: (error: Error | undefined) => void;
55
- onSuccess?: (data: ActorMethodReturnType<A[M]> | undefined) => void;
55
+ onSuccess?: (data: CompiledResult<ActorMethodReturnType<A[M]>> | undefined) => void;
56
56
  throwOnError?: boolean;
57
57
  compileResult?: boolean;
58
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic-reactor/react",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "A React library for interacting with Internet Computer canisters",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -47,5 +47,5 @@
47
47
  "react": ">=16.8",
48
48
  "zustand": "4.5"
49
49
  },
50
- "gitHead": "03b85c107e062dc52e4feee4864ed78db5a97294"
50
+ "gitHead": "d4eedb456c14717255f56ad5b4993622fc548567"
51
51
  }