@talismn/balances-react 0.0.0-pr587-20230302015709 → 0.0.0-pr593-20230303151944

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/CHANGELOG.md CHANGED
@@ -1,10 +1,6 @@
1
1
  # @talismn/balances-react
2
2
 
3
- ## 0.0.0-pr587-20230302015709
4
-
5
- ### Minor Changes
6
-
7
- - 29b1144: refactor: tweaks to trigger less balance subscription resets
3
+ ## 0.0.0-pr593-20230303151944
8
4
 
9
5
  ### Patch Changes
10
6
 
@@ -12,8 +8,8 @@
12
8
  - 6643a4e: fix: ported useDbCache related perf fixes to @talismn/balances-react
13
9
  - Updated dependencies [6643a4e]
14
10
  - Updated dependencies [6643a4e]
15
- - @talismn/token-rates@0.0.0-pr587-20230302015709
16
- - @talismn/balances@0.0.0-pr587-20230302015709
11
+ - @talismn/token-rates@0.0.0-pr593-20230303151944
12
+ - @talismn/balances@0.0.0-pr593-20230303151944
17
13
 
18
14
  ## 0.3.3
19
15
 
@@ -10,13 +10,12 @@ export * from "./useDbCacheSubscription";
10
10
  export * from "./useEvmNetworks";
11
11
  export * from "./useTokenRates";
12
12
  export * from "./useTokens";
13
- export * from "./useWithTestnets";
14
13
  import { BalanceModule } from "@talismn/balances";
15
14
  import { ReactNode } from "react";
16
15
  export type BalancesProviderProps = {
17
16
  balanceModules: Array<BalanceModule<any, any, any, any, any>>;
18
17
  onfinalityApiKey?: string;
19
- withTestnets?: boolean;
18
+ useTestnets?: boolean;
20
19
  children?: ReactNode;
21
20
  };
22
- export declare const BalancesProvider: ({ balanceModules, onfinalityApiKey, withTestnets, children, }: BalancesProviderProps) => JSX.Element;
21
+ export declare const BalancesProvider: ({ balanceModules, onfinalityApiKey, useTestnets, children, }: BalancesProviderProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { HydrateDb } from "@talismn/balances";
2
- export declare const useBalancesHydrate: () => HydrateDb;
2
+ export declare const useBalancesHydrate: (withTestnets?: boolean) => HydrateDb;
@@ -7,6 +7,6 @@ export type ChainConnectorsProviderOptions = {
7
7
  export declare const ChainConnectorsProvider: import("react").FC<ChainConnectorsProviderOptions & {
8
8
  children?: import("react").ReactNode;
9
9
  }>, useChainConnectors: () => {
10
- substrate: ChainConnector;
11
- evm: ChainConnectorEvm;
10
+ substrate: ChainConnector | undefined;
11
+ evm: ChainConnectorEvm | undefined;
12
12
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ChaindataProviderExtension } from "@talismn/chaindata-provider-extension";
2
+ import { ChaindataProvider as Chaindata } from "@talismn/chaindata-provider";
3
3
  export type ChaindataProviderOptions = {
4
4
  onfinalityApiKey?: string;
5
5
  };
6
6
  export declare const ChaindataProvider: import("react").FC<ChaindataProviderOptions & {
7
7
  children?: import("react").ReactNode;
8
- }>, useChaindata: () => ChaindataProviderExtension;
8
+ }>, useChaindata: () => Chaindata | undefined;
@@ -18,7 +18,10 @@ type DbCache = {
18
18
  tokenRatesMap: Record<TokenId, TokenRates>;
19
19
  balances: BalanceJson[];
20
20
  };
21
- export declare const DbCacheProvider: import("react").FC<{
21
+ type DbCacheProviderProps = {
22
+ useTestnets?: boolean;
23
+ };
24
+ export declare const DbCacheProvider: import("react").FC<DbCacheProviderProps & {
22
25
  children?: import("react").ReactNode;
23
26
  }>, useDbCache: () => DbCache;
24
27
  export {};
@@ -1,13 +1,9 @@
1
- export type DbEntityType = "chains" | "evmNetworks" | "tokens";
1
+ /// <reference types="react" />
2
+ export type DbEntityType = "chains" | "evmNetworks" | "tokens" | "tokenRates" | "balances";
3
+ export declare const SubscriptionsProvider: import("react").FC<{
4
+ children?: import("react").ReactNode;
5
+ }>, useSubscriptions: () => ((callback?: ((val: unknown) => void) | undefined) => import("../util").Unsubscribe)[];
2
6
  /**
3
7
  * This hook is responsible for fetching the data used for balances and inserting it into the db.
4
8
  */
5
9
  export declare const useDbCacheSubscription: (subscribeTo: DbEntityType) => void;
6
- /**
7
- * This hook is responsible for fetching the data used for token rates and inserting it into the db.
8
- */
9
- export declare function useDbCacheTokenRatesSubscription(): void;
10
- /**
11
- * This hook is responsible for fetching the data used for balances and inserting it into the db.
12
- */
13
- export declare function useDbCacheBalancesSubscription(): void;