@talismn/balances-react 0.0.0-pr677-20230413171850 → 0.0.0-pr677-20230414044007

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,20 +1,21 @@
1
1
  # @talismn/balances-react
2
2
 
3
- ## 0.0.0-pr677-20230413171850
3
+ ## 0.0.0-pr677-20230414044007
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - fb8ee962: feat: proxy dapp websocket requests to talisman wallet backend when available
8
+ - 7440f96a: feat: crowdloan and nom pool balances
8
9
  - Updated dependencies [fb8ee962]
9
10
  - Updated dependencies [c898da98]
10
- - Updated dependencies [306e7160]
11
- - @talismn/balances@0.0.0-pr677-20230413171850
12
- - @talismn/chain-connector@0.0.0-pr677-20230413171850
13
- - @talismn/chaindata-provider-extension@0.0.0-pr677-20230413171850
14
- - @talismn/chain-connector-evm@0.0.0-pr677-20230413171850
15
- - @talismn/chaindata-provider@0.0.0-pr677-20230413171850
16
- - @talismn/connection-meta@0.0.0-pr677-20230413171850
17
- - @talismn/token-rates@0.0.0-pr677-20230413171850
11
+ - Updated dependencies [7440f96a]
12
+ - @talismn/balances@0.0.0-pr677-20230414044007
13
+ - @talismn/chain-connector@0.0.0-pr677-20230414044007
14
+ - @talismn/chaindata-provider-extension@0.0.0-pr677-20230414044007
15
+ - @talismn/chain-connector-evm@0.0.0-pr677-20230414044007
16
+ - @talismn/chaindata-provider@0.0.0-pr677-20230414044007
17
+ - @talismn/connection-meta@0.0.0-pr677-20230414044007
18
+ - @talismn/token-rates@0.0.0-pr677-20230414044007
18
19
 
19
20
  ## 0.4.0
20
21
 
@@ -11,9 +11,8 @@ export type BalancesStatus = {
11
11
  * Given a collection of `Balances`, this hook returns a `BalancesStatus` summary for the collection.
12
12
  *
13
13
  * @param balances The collection of balances to get the status from.
14
- * @param isLoadingLocks Because the wallet currently fetches locks outside of the balances api, this param can be used to indicate that the locks are still loading, even if the `Balances` collection is not.
15
14
  * @returns An instance of `BalancesStatus` which represents the status of the balances collection.
16
15
 
17
16
  */
18
- export declare const useBalancesStatus: (balances: Balances, isLoadingLocks?: boolean) => BalancesStatus;
17
+ export declare const useBalancesStatus: (balances: Balances) => BalancesStatus;
19
18
  export declare const getStaleChains: (balances: Balances) => string[];
@@ -200,7 +200,7 @@ const [DbCacheProvider, useDbCache] = provideContext(useDbCacheProvider);
200
200
 
201
201
  var packageJson = {
202
202
  name: "@talismn/balances-react",
203
- version: "0.0.0-pr677-20230413171850",
203
+ version: "0.0.0-pr677-20230414044007",
204
204
  author: "Talisman",
205
205
  homepage: "https://talisman.xyz",
206
206
  license: "UNLICENSED",
@@ -678,11 +678,10 @@ function useBalances(addressesByToken) {
678
678
  * Given a collection of `Balances`, this hook returns a `BalancesStatus` summary for the collection.
679
679
  *
680
680
  * @param balances The collection of balances to get the status from.
681
- * @param isLoadingLocks Because the wallet currently fetches locks outside of the balances api, this param can be used to indicate that the locks are still loading, even if the `Balances` collection is not.
682
681
  * @returns An instance of `BalancesStatus` which represents the status of the balances collection.
683
682
 
684
683
  */
685
- const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
684
+ const useBalancesStatus = balances => react.useMemo(() => {
686
685
  // stale
687
686
  const staleChains = getStaleChains(balances);
688
687
  if (staleChains.length > 0) return {
@@ -692,7 +691,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
692
691
 
693
692
  // fetching
694
693
  const hasCachedBalances = balances.each.some(b => b.status === "cache");
695
- if (hasCachedBalances || isLoadingLocks) return {
694
+ if (hasCachedBalances) return {
696
695
  status: "fetching"
697
696
  };
698
697
 
@@ -700,7 +699,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
700
699
  return {
701
700
  status: "live"
702
701
  };
703
- }, [balances, isLoadingLocks]);
702
+ }, [balances]);
704
703
  const getStaleChains = balances => [...new Set(balances.sorted.filter(b => b.status === "stale").map(b => b.chain?.name ?? b.chainId ?? "Unknown"))];
705
704
 
706
705
  const BalancesProvider = ({
@@ -200,7 +200,7 @@ const [DbCacheProvider, useDbCache] = provideContext(useDbCacheProvider);
200
200
 
201
201
  var packageJson = {
202
202
  name: "@talismn/balances-react",
203
- version: "0.0.0-pr677-20230413171850",
203
+ version: "0.0.0-pr677-20230414044007",
204
204
  author: "Talisman",
205
205
  homepage: "https://talisman.xyz",
206
206
  license: "UNLICENSED",
@@ -678,11 +678,10 @@ function useBalances(addressesByToken) {
678
678
  * Given a collection of `Balances`, this hook returns a `BalancesStatus` summary for the collection.
679
679
  *
680
680
  * @param balances The collection of balances to get the status from.
681
- * @param isLoadingLocks Because the wallet currently fetches locks outside of the balances api, this param can be used to indicate that the locks are still loading, even if the `Balances` collection is not.
682
681
  * @returns An instance of `BalancesStatus` which represents the status of the balances collection.
683
682
 
684
683
  */
685
- const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
684
+ const useBalancesStatus = balances => react.useMemo(() => {
686
685
  // stale
687
686
  const staleChains = getStaleChains(balances);
688
687
  if (staleChains.length > 0) return {
@@ -692,7 +691,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
692
691
 
693
692
  // fetching
694
693
  const hasCachedBalances = balances.each.some(b => b.status === "cache");
695
- if (hasCachedBalances || isLoadingLocks) return {
694
+ if (hasCachedBalances) return {
696
695
  status: "fetching"
697
696
  };
698
697
 
@@ -700,7 +699,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => react.useMemo(() => {
700
699
  return {
701
700
  status: "live"
702
701
  };
703
- }, [balances, isLoadingLocks]);
702
+ }, [balances]);
704
703
  const getStaleChains = balances => [...new Set(balances.sorted.filter(b => b.status === "stale").map(b => b.chain?.name ?? b.chainId ?? "Unknown"))];
705
704
 
706
705
  const BalancesProvider = ({
@@ -191,7 +191,7 @@ const [DbCacheProvider, useDbCache] = provideContext(useDbCacheProvider);
191
191
 
192
192
  var packageJson = {
193
193
  name: "@talismn/balances-react",
194
- version: "0.0.0-pr677-20230413171850",
194
+ version: "0.0.0-pr677-20230414044007",
195
195
  author: "Talisman",
196
196
  homepage: "https://talisman.xyz",
197
197
  license: "UNLICENSED",
@@ -669,11 +669,10 @@ function useBalances(addressesByToken) {
669
669
  * Given a collection of `Balances`, this hook returns a `BalancesStatus` summary for the collection.
670
670
  *
671
671
  * @param balances The collection of balances to get the status from.
672
- * @param isLoadingLocks Because the wallet currently fetches locks outside of the balances api, this param can be used to indicate that the locks are still loading, even if the `Balances` collection is not.
673
672
  * @returns An instance of `BalancesStatus` which represents the status of the balances collection.
674
673
 
675
674
  */
676
- const useBalancesStatus = (balances, isLoadingLocks) => useMemo(() => {
675
+ const useBalancesStatus = balances => useMemo(() => {
677
676
  // stale
678
677
  const staleChains = getStaleChains(balances);
679
678
  if (staleChains.length > 0) return {
@@ -683,7 +682,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => useMemo(() => {
683
682
 
684
683
  // fetching
685
684
  const hasCachedBalances = balances.each.some(b => b.status === "cache");
686
- if (hasCachedBalances || isLoadingLocks) return {
685
+ if (hasCachedBalances) return {
687
686
  status: "fetching"
688
687
  };
689
688
 
@@ -691,7 +690,7 @@ const useBalancesStatus = (balances, isLoadingLocks) => useMemo(() => {
691
690
  return {
692
691
  status: "live"
693
692
  };
694
- }, [balances, isLoadingLocks]);
693
+ }, [balances]);
695
694
  const getStaleChains = balances => [...new Set(balances.sorted.filter(b => b.status === "stale").map(b => b.chain?.name ?? b.chainId ?? "Unknown"))];
696
695
 
697
696
  const BalancesProvider = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/balances-react",
3
- "version": "0.0.0-pr677-20230413171850",
3
+ "version": "0.0.0-pr677-20230414044007",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "UNLICENSED",
@@ -26,13 +26,13 @@
26
26
  "clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
27
27
  },
28
28
  "dependencies": {
29
- "@talismn/balances": "^0.0.0-pr677-20230413171850",
30
- "@talismn/chain-connector": "^0.0.0-pr677-20230413171850",
31
- "@talismn/chain-connector-evm": "^0.0.0-pr677-20230413171850",
32
- "@talismn/chaindata-provider": "^0.0.0-pr677-20230413171850",
33
- "@talismn/chaindata-provider-extension": "^0.0.0-pr677-20230413171850",
34
- "@talismn/connection-meta": "^0.0.0-pr677-20230413171850",
35
- "@talismn/token-rates": "^0.0.0-pr677-20230413171850",
29
+ "@talismn/balances": "^0.0.0-pr677-20230414044007",
30
+ "@talismn/chain-connector": "^0.0.0-pr677-20230414044007",
31
+ "@talismn/chain-connector-evm": "^0.0.0-pr677-20230414044007",
32
+ "@talismn/chaindata-provider": "^0.0.0-pr677-20230414044007",
33
+ "@talismn/chaindata-provider-extension": "^0.0.0-pr677-20230414044007",
34
+ "@talismn/connection-meta": "^0.0.0-pr677-20230414044007",
35
+ "@talismn/token-rates": "^0.0.0-pr677-20230414044007",
36
36
  "anylogger": "^1.0.11",
37
37
  "blueimp-md5": "2.19.0",
38
38
  "dexie": "^3.2.3",