@talismn/balances-react 0.0.0-pr587-20230302015709 → 0.0.0-pr589-20230302073822
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 +3 -7
- package/dist/declarations/src/hooks/index.d.ts +2 -3
- package/dist/declarations/src/hooks/useBalancesHydrate.d.ts +1 -1
- package/dist/declarations/src/hooks/useChainConnectors.d.ts +2 -2
- package/dist/declarations/src/hooks/useChaindata.d.ts +2 -2
- package/dist/declarations/src/hooks/useDbCache.d.ts +4 -1
- package/dist/declarations/src/hooks/useDbCacheSubscription.d.ts +5 -9
- package/dist/talismn-balances-react.cjs.dev.js +209 -292
- package/dist/talismn-balances-react.cjs.prod.js +209 -292
- package/dist/talismn-balances-react.esm.js +210 -290
- package/package.json +3 -4
- package/dist/declarations/src/hooks/useWithTestnets.d.ts +0 -8
- package/dist/declarations/src/util/useSharedSubscription.d.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# @talismn/balances-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 29b1144: refactor: tweaks to trigger less balance subscription resets
|
|
3
|
+
## 0.0.0-pr589-20230302073822
|
|
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-
|
|
16
|
-
- @talismn/balances@0.0.0-
|
|
11
|
+
- @talismn/token-rates@0.0.0-pr589-20230302073822
|
|
12
|
+
- @talismn/balances@0.0.0-pr589-20230302073822
|
|
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
|
-
|
|
18
|
+
useTestnets?: boolean;
|
|
20
19
|
children?: ReactNode;
|
|
21
20
|
};
|
|
22
|
-
export declare const BalancesProvider: ({ balanceModules, onfinalityApiKey,
|
|
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 {
|
|
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: () =>
|
|
8
|
+
}>, useChaindata: () => Chaindata | undefined;
|
|
@@ -18,7 +18,10 @@ type DbCache = {
|
|
|
18
18
|
tokenRatesMap: Record<TokenId, TokenRates>;
|
|
19
19
|
balances: BalanceJson[];
|
|
20
20
|
};
|
|
21
|
-
|
|
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
|
-
|
|
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;
|