wagmi 1.0.9 → 1.1.0-cjs

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.
@@ -1,7 +1,7 @@
1
- "use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
  // src/connectors/walletConnectLegacy.ts
4
- import { WalletConnectLegacyConnector } from "@wagmi/core/connectors/walletConnectLegacy";
5
- export {
6
- WalletConnectLegacyConnector
7
- };
4
+ var _walletConnectLegacy = require('@wagmi/core/connectors/walletConnectLegacy');
5
+
6
+
7
+ exports.WalletConnectLegacyConnector = _walletConnectLegacy.WalletConnectLegacyConnector;
package/dist/index.d.ts CHANGED
@@ -678,6 +678,8 @@ declare function paginatedIndexesConfig<TContracts extends ContractFunctionConfi
678
678
  type UseContractReadConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TSelectData = ReadContractResult<TAbi, TFunctionName>> = PartialBy<ReadContractConfig<TAbi, TFunctionName>, 'abi' | 'address' | 'args' | 'blockNumber' | 'blockTag' | 'functionName'> & QueryConfigWithSelect<ReadContractResult<TAbi, TFunctionName>, Error, TSelectData> & {
679
679
  /** If set to `true`, the cache will depend on the block number */
680
680
  cacheOnBlock?: boolean;
681
+ /** Set this to `true` to keep the previous data when fetching based on a new query key. Defaults to `false`. */
682
+ keepPreviousData?: boolean;
681
683
  } & ({
682
684
  /** Block number to read against. */
683
685
  blockNumber?: ReadContractConfig['blockNumber'];
@@ -694,7 +696,7 @@ type UseContractReadConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctio
694
696
  /** Refresh on incoming blocks. */
695
697
  watch?: boolean;
696
698
  });
697
- declare function useContractRead<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TSelectData = ReadContractResult<TAbi, TFunctionName>>({ abi, address, account, args, blockNumber: blockNumberOverride, blockTag, cacheOnBlock, cacheTime, chainId: chainId_, enabled: enabled_, functionName, isDataEqual, onError, onSettled, onSuccess, scopeKey, select, staleTime, structuralSharing, suspense, watch, }?: UseContractReadConfig<TAbi, TFunctionName, TSelectData>): UseQueryResult<TSelectData, Error>;
699
+ declare function useContractRead<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TSelectData = ReadContractResult<TAbi, TFunctionName>>({ abi, address, account, args, blockNumber: blockNumberOverride, blockTag, cacheOnBlock, cacheTime, chainId: chainId_, enabled: enabled_, functionName, isDataEqual, keepPreviousData, onError, onSettled, onSuccess, scopeKey, select, staleTime, structuralSharing, suspense, watch, }?: UseContractReadConfig<TAbi, TFunctionName, TSelectData>): UseQueryResult<TSelectData, Error>;
698
700
 
699
701
  type UseContractReadsConfig<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true, TSelectData = ReadContractsResult<TContracts, TAllowFailure>, Config = ReadContractsConfig<TContracts, TAllowFailure>> = {
700
702
  [K in keyof Config]?: K extends 'contracts' ? DeepPartial<Config[K], 2> : Config[K];