wagmi 0.8.9 → 0.8.10
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/dist/index.js +8 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -456,7 +456,7 @@ function useFeeData({
|
|
|
456
456
|
});
|
|
457
457
|
useInvalidateOnBlock({
|
|
458
458
|
chainId: chainId2,
|
|
459
|
-
enabled: enabled && watch,
|
|
459
|
+
enabled: Boolean(enabled && watch),
|
|
460
460
|
queryKey: queryKey_
|
|
461
461
|
});
|
|
462
462
|
return feeDataQuery;
|
|
@@ -471,6 +471,7 @@ function useInvalidateOnBlock({
|
|
|
471
471
|
const queryClient = useQueryClient2();
|
|
472
472
|
useBlockNumber({
|
|
473
473
|
chainId: chainId2,
|
|
474
|
+
enabled,
|
|
474
475
|
onBlock: enabled ? () => queryClient.invalidateQueries(queryKey17) : void 0,
|
|
475
476
|
scopeKey: enabled ? void 0 : "idle"
|
|
476
477
|
});
|
|
@@ -489,7 +490,7 @@ function useSyncExternalStoreWithTracked(subscribe, getSnapshot, getServerSnapsh
|
|
|
489
490
|
getServerSnapshot,
|
|
490
491
|
(x) => x,
|
|
491
492
|
(a, b) => {
|
|
492
|
-
if (isPlainObject(a) && isPlainObject(b)) {
|
|
493
|
+
if (isPlainObject(a) && isPlainObject(b) && trackedKeys.current.length) {
|
|
493
494
|
for (const key of trackedKeys.current) {
|
|
494
495
|
const equal = isEqual(
|
|
495
496
|
a[key],
|
|
@@ -1253,7 +1254,7 @@ function useContractRead({
|
|
|
1253
1254
|
}, [abi, address, blockNumber, cacheOnBlock, enabled_, functionName]);
|
|
1254
1255
|
useInvalidateOnBlock({
|
|
1255
1256
|
chainId: chainId2,
|
|
1256
|
-
enabled: watch && !cacheOnBlock,
|
|
1257
|
+
enabled: Boolean(enabled && watch && !cacheOnBlock),
|
|
1257
1258
|
queryKey: queryKey_
|
|
1258
1259
|
});
|
|
1259
1260
|
return useQuery(
|
|
@@ -1382,7 +1383,10 @@ function useContractReads({
|
|
|
1382
1383
|
enabled2 = Boolean(enabled2 && blockNumber);
|
|
1383
1384
|
return enabled2;
|
|
1384
1385
|
}, [blockNumber, cacheOnBlock, contracts, enabled_]);
|
|
1385
|
-
useInvalidateOnBlock({
|
|
1386
|
+
useInvalidateOnBlock({
|
|
1387
|
+
enabled: Boolean(enabled && watch && !cacheOnBlock),
|
|
1388
|
+
queryKey: queryKey_
|
|
1389
|
+
});
|
|
1386
1390
|
const abis = (contracts ?? []).map(
|
|
1387
1391
|
({ abi }) => abi
|
|
1388
1392
|
);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "wagmi",
|
|
3
3
|
"description": "React Hooks for Ethereum",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.10",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/wagmi-dev/wagmi.git",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@walletconnect/ethereum-provider": "^1.8.0",
|
|
99
99
|
"abitype": "^0.1.7",
|
|
100
100
|
"use-sync-external-store": "^1.2.0",
|
|
101
|
-
"@wagmi/core": "0.7.
|
|
101
|
+
"@wagmi/core": "0.7.9"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@testing-library/react": "^13.3.0",
|