@pezkuwi/extension-chains 0.62.27 → 0.62.28

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/bundle.js CHANGED
@@ -6,7 +6,7 @@ const definitions = new Map(
6
6
  const expanded = new Map();
7
7
  export function metadataExpand(definition, isPartial = false) {
8
8
  const cached = expanded.get(definition.genesisHash);
9
- if (cached && cached.specVersion === definition.specVersion) {
9
+ if (cached?.specVersion === definition.specVersion) {
10
10
  return cached;
11
11
  }
12
12
  const { chain, genesisHash, icon, metaCalls, specVersion, ss58Format, tokenDecimals, tokenSymbol, types, userExtensions } = definition;
@@ -14,6 +14,10 @@ export function metadataExpand(definition, isPartial = false) {
14
14
  if (!isPartial) {
15
15
  registry.register(types);
16
16
  }
17
+ // Needed in this package's own build, where the type augmentation is not
18
+ // loaded and createType returns a plain Codec; the repository-wide lint sees
19
+ // it augmented.
20
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
17
21
  registry.setChainProperties(registry.createType('ChainProperties', {
18
22
  ss58Format,
19
23
  tokenDecimals,
package/cjs/bundle.js CHANGED
@@ -14,7 +14,7 @@ const definitions = new Map(
14
14
  const expanded = new Map();
15
15
  function metadataExpand(definition, isPartial = false) {
16
16
  const cached = expanded.get(definition.genesisHash);
17
- if (cached && cached.specVersion === definition.specVersion) {
17
+ if (cached?.specVersion === definition.specVersion) {
18
18
  return cached;
19
19
  }
20
20
  const { chain, genesisHash, icon, metaCalls, specVersion, ss58Format, tokenDecimals, tokenSymbol, types, userExtensions } = definition;
@@ -22,6 +22,10 @@ function metadataExpand(definition, isPartial = false) {
22
22
  if (!isPartial) {
23
23
  registry.register(types);
24
24
  }
25
+ // Needed in this package's own build, where the type augmentation is not
26
+ // loaded and createType returns a plain Codec; the repository-wide lint sees
27
+ // it augmented.
28
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
25
29
  registry.setChainProperties(registry.createType('ChainProperties', {
26
30
  ss58Format,
27
31
  tokenDecimals,
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@pezkuwi/extension-chains', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.62.27' };
4
+ exports.packageInfo = { name: '@pezkuwi/extension-chains', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.62.28' };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "./cjs/packageDetect.js"
19
19
  ],
20
20
  "type": "module",
21
- "version": "0.62.27",
21
+ "version": "0.62.28",
22
22
  "main": "./cjs/index.js",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts",
@@ -115,7 +115,7 @@
115
115
  }
116
116
  },
117
117
  "dependencies": {
118
- "@pezkuwi/extension-inject": "0.62.27",
118
+ "@pezkuwi/extension-inject": "0.62.28",
119
119
  "@pezkuwi/networks": "^14.0.26",
120
120
  "@pezkuwi/util": "^14.0.26",
121
121
  "@pezkuwi/util-crypto": "^14.0.26",
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@pezkuwi/extension-chains', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.62.27' };
1
+ export const packageInfo = { name: '@pezkuwi/extension-chains', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.62.28' };