@pezkuwi/api-derive 16.5.9 → 16.5.11

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.
@@ -28,7 +28,8 @@ export function subscribeFinalizedHeads(instanceId, api) {
28
28
  return api.rpc.chain.subscribeFinalizedHeads().pipe(switchMap((header) => {
29
29
  const endHash = prevHash;
30
30
  const startHash = header.parentHash;
31
- prevHash = header.createdAtHash = header.hash;
31
+ header.createdAtHash = header.hash;
32
+ prevHash = header.hash;
32
33
  return endHash === null || startHash.eq(endHash)
33
34
  ? of(header)
34
35
  : api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe(switchMap((headers) => from(headers)));
@@ -32,7 +32,8 @@ function subscribeFinalizedHeads(instanceId, api) {
32
32
  return api.rpc.chain.subscribeFinalizedHeads().pipe((0, rxjs_1.switchMap)((header) => {
33
33
  const endHash = prevHash;
34
34
  const startHash = header.parentHash;
35
- prevHash = header.createdAtHash = header.hash;
35
+ header.createdAtHash = header.hash;
36
+ prevHash = header.hash;
36
37
  return endHash === null || startHash.eq(endHash)
37
38
  ? (0, rxjs_1.of)(header)
38
39
  : api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe((0, rxjs_1.switchMap)((headers) => (0, rxjs_1.from)(headers)));
@@ -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/api-derive', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '16.5.9' };
4
+ exports.packageInfo = { name: '@pezkuwi/api-derive', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '16.5.11' };
package/package.json CHANGED
@@ -18,8 +18,8 @@
18
18
  "./cjs/packageDetect.js"
19
19
  ],
20
20
  "type": "module",
21
- "version": "16.5.9",
22
- "main": "./cjs/cjs/index.js",
21
+ "version": "16.5.11",
22
+ "main": "./cjs/index.js",
23
23
  "module": "./cjs/index.js",
24
24
  "types": "./cjs/index.d.ts",
25
25
  "exports": {
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@pezkuwi/api-derive', 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: '16.5.9' };
1
+ export const packageInfo = { name: '@pezkuwi/api-derive', 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: '16.5.11' };