@talismn/balances 0.0.0-pr677-20230413212044 → 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,19 +1,19 @@
1
1
  # @talismn/balances
2
2
 
3
- ## 0.0.0-pr677-20230413212044
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
- - 6e5f12bc: feat: crowdloan and nom pool balances
8
+ - 7440f96a: feat: crowdloan and nom pool balances
9
9
  - Updated dependencies [fb8ee962]
10
10
  - Updated dependencies [c898da98]
11
- - Updated dependencies [6e5f12bc]
12
- - @talismn/chain-connector@0.0.0-pr677-20230413212044
13
- - @talismn/chain-connector-evm@0.0.0-pr677-20230413212044
14
- - @talismn/util@0.0.0-pr677-20230413212044
15
- - @talismn/chaindata-provider@0.0.0-pr677-20230413212044
16
- - @talismn/token-rates@0.0.0-pr677-20230413212044
11
+ - Updated dependencies [7440f96a]
12
+ - @talismn/chain-connector@0.0.0-pr677-20230414044007
13
+ - @talismn/chain-connector-evm@0.0.0-pr677-20230414044007
14
+ - @talismn/util@0.0.0-pr677-20230414044007
15
+ - @talismn/chaindata-provider@0.0.0-pr677-20230414044007
16
+ - @talismn/token-rates@0.0.0-pr677-20230414044007
17
17
 
18
18
  ## 0.4.0
19
19
 
@@ -176,7 +176,7 @@ export declare class FiatSumBalancesFormatter {
176
176
  get reserved(): number;
177
177
  /** The frozen balance of these tokens. Is included in the free amount. */
178
178
  get locked(): number;
179
- /** @deprecated - use balances.locked */
179
+ /** @deprecated Use balances.locked */
180
180
  get frozen(): number;
181
181
  /** The transferable balance of these tokens. Is generally the free amount - the miscFrozen amount. */
182
182
  get transferable(): number;
@@ -69,7 +69,7 @@ const db = new TalismanBalancesDatabase();
69
69
 
70
70
  var packageJson = {
71
71
  name: "@talismn/balances",
72
- version: "0.0.0-pr677-20230413212044",
72
+ version: "0.0.0-pr677-20230414044007",
73
73
  author: "Talisman",
74
74
  homepage: "https://talisman.xyz",
75
75
  license: "UNLICENSED",
@@ -156,7 +156,7 @@ const createTypeRegistryCache = () => {
156
156
  } catch (cause) {
157
157
  log.warn(new Error(`Failed to set metadata for chain ${chainId}`, {
158
158
  cause
159
- }));
159
+ }), cause);
160
160
  }
161
161
  }
162
162
  typeRegistryCache.set(chainId, typeRegistry);
@@ -316,15 +316,12 @@ class RpcStateQueryHelper {
316
316
  const params = [queries.map(({
317
317
  stateKey
318
318
  }) => stateKey)];
319
- const unsubscribe = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
319
+ const unsub = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
320
320
  error ? callback(error) : callback(null, this.#distributeChangesToQueryDecoders.call(this, chainId, result));
321
321
  }, timeout);
322
- return () => unsubscribe(unsubscribeMethod);
323
- }).map(subscription => subscription.catch(error => {
324
- log.warn(`Failed to create subscription: ${error.message}`);
325
- return () => {};
326
- }));
327
- return () => subscriptions.forEach(subscription => subscription.then(unsubscribe => unsubscribe()));
322
+ return () => unsub.then(unsubscribe => unsubscribe(unsubscribeMethod));
323
+ });
324
+ return () => subscriptions.forEach(unsubscribe => unsubscribe());
328
325
  }
329
326
  async fetch(method = "state_queryStorageAt") {
330
327
  const queriesByChain = groupBy__default["default"](this.#queries, "chainId");
@@ -360,7 +357,7 @@ class RpcStateQueryHelper {
360
357
  }) => stateKey)}`);
361
358
  return [];
362
359
  }
363
- return query.decodeResult(change);
360
+ return [query.decodeResult(change)];
364
361
  });
365
362
  }
366
363
  }
@@ -797,7 +794,7 @@ class FiatSumBalancesFormatter {
797
794
  get locked() {
798
795
  return this.#sum("locked");
799
796
  }
800
- /** @deprecated - use balances.locked */
797
+ /** @deprecated Use balances.locked */
801
798
  get frozen() {
802
799
  return this.locked;
803
800
  }
@@ -69,7 +69,7 @@ const db = new TalismanBalancesDatabase();
69
69
 
70
70
  var packageJson = {
71
71
  name: "@talismn/balances",
72
- version: "0.0.0-pr677-20230413212044",
72
+ version: "0.0.0-pr677-20230414044007",
73
73
  author: "Talisman",
74
74
  homepage: "https://talisman.xyz",
75
75
  license: "UNLICENSED",
@@ -156,7 +156,7 @@ const createTypeRegistryCache = () => {
156
156
  } catch (cause) {
157
157
  log.warn(new Error(`Failed to set metadata for chain ${chainId}`, {
158
158
  cause
159
- }));
159
+ }), cause);
160
160
  }
161
161
  }
162
162
  typeRegistryCache.set(chainId, typeRegistry);
@@ -316,15 +316,12 @@ class RpcStateQueryHelper {
316
316
  const params = [queries.map(({
317
317
  stateKey
318
318
  }) => stateKey)];
319
- const unsubscribe = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
319
+ const unsub = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
320
320
  error ? callback(error) : callback(null, this.#distributeChangesToQueryDecoders.call(this, chainId, result));
321
321
  }, timeout);
322
- return () => unsubscribe(unsubscribeMethod);
323
- }).map(subscription => subscription.catch(error => {
324
- log.warn(`Failed to create subscription: ${error.message}`);
325
- return () => {};
326
- }));
327
- return () => subscriptions.forEach(subscription => subscription.then(unsubscribe => unsubscribe()));
322
+ return () => unsub.then(unsubscribe => unsubscribe(unsubscribeMethod));
323
+ });
324
+ return () => subscriptions.forEach(unsubscribe => unsubscribe());
328
325
  }
329
326
  async fetch(method = "state_queryStorageAt") {
330
327
  const queriesByChain = groupBy__default["default"](this.#queries, "chainId");
@@ -360,7 +357,7 @@ class RpcStateQueryHelper {
360
357
  }) => stateKey)}`);
361
358
  return [];
362
359
  }
363
- return query.decodeResult(change);
360
+ return [query.decodeResult(change)];
364
361
  });
365
362
  }
366
363
  }
@@ -797,7 +794,7 @@ class FiatSumBalancesFormatter {
797
794
  get locked() {
798
795
  return this.#sum("locked");
799
796
  }
800
- /** @deprecated - use balances.locked */
797
+ /** @deprecated Use balances.locked */
801
798
  get frozen() {
802
799
  return this.locked;
803
800
  }
@@ -60,7 +60,7 @@ const db = new TalismanBalancesDatabase();
60
60
 
61
61
  var packageJson = {
62
62
  name: "@talismn/balances",
63
- version: "0.0.0-pr677-20230413212044",
63
+ version: "0.0.0-pr677-20230414044007",
64
64
  author: "Talisman",
65
65
  homepage: "https://talisman.xyz",
66
66
  license: "UNLICENSED",
@@ -147,7 +147,7 @@ const createTypeRegistryCache = () => {
147
147
  } catch (cause) {
148
148
  log.warn(new Error(`Failed to set metadata for chain ${chainId}`, {
149
149
  cause
150
- }));
150
+ }), cause);
151
151
  }
152
152
  }
153
153
  typeRegistryCache.set(chainId, typeRegistry);
@@ -307,15 +307,12 @@ class RpcStateQueryHelper {
307
307
  const params = [queries.map(({
308
308
  stateKey
309
309
  }) => stateKey)];
310
- const unsubscribe = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
310
+ const unsub = this.#chainConnector.subscribe(chainId, subscribeMethod, responseMethod, params, (error, result) => {
311
311
  error ? callback(error) : callback(null, this.#distributeChangesToQueryDecoders.call(this, chainId, result));
312
312
  }, timeout);
313
- return () => unsubscribe(unsubscribeMethod);
314
- }).map(subscription => subscription.catch(error => {
315
- log.warn(`Failed to create subscription: ${error.message}`);
316
- return () => {};
317
- }));
318
- return () => subscriptions.forEach(subscription => subscription.then(unsubscribe => unsubscribe()));
313
+ return () => unsub.then(unsubscribe => unsubscribe(unsubscribeMethod));
314
+ });
315
+ return () => subscriptions.forEach(unsubscribe => unsubscribe());
319
316
  }
320
317
  async fetch(method = "state_queryStorageAt") {
321
318
  const queriesByChain = groupBy(this.#queries, "chainId");
@@ -351,7 +348,7 @@ class RpcStateQueryHelper {
351
348
  }) => stateKey)}`);
352
349
  return [];
353
350
  }
354
- return query.decodeResult(change);
351
+ return [query.decodeResult(change)];
355
352
  });
356
353
  }
357
354
  }
@@ -788,7 +785,7 @@ class FiatSumBalancesFormatter {
788
785
  get locked() {
789
786
  return this.#sum("locked");
790
787
  }
791
- /** @deprecated - use balances.locked */
788
+ /** @deprecated Use balances.locked */
792
789
  get frozen() {
793
790
  return this.locked;
794
791
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/balances",
3
- "version": "0.0.0-pr677-20230413212044",
3
+ "version": "0.0.0-pr677-20230414044007",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "UNLICENSED",
@@ -27,11 +27,11 @@
27
27
  "clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
28
28
  },
29
29
  "dependencies": {
30
- "@talismn/chain-connector": "^0.0.0-pr677-20230413212044",
31
- "@talismn/chain-connector-evm": "^0.0.0-pr677-20230413212044",
32
- "@talismn/chaindata-provider": "^0.0.0-pr677-20230413212044",
33
- "@talismn/token-rates": "^0.0.0-pr677-20230413212044",
34
- "@talismn/util": "^0.0.0-pr677-20230413212044",
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/token-rates": "^0.0.0-pr677-20230414044007",
34
+ "@talismn/util": "^0.0.0-pr677-20230414044007",
35
35
  "anylogger": "^1.0.11",
36
36
  "dexie": "^3.2.3",
37
37
  "lodash": "4.17.21"