Augment Registry (w/o CodecRegistry & CreateRegistry) (#4463)

* Augment Registry (w/o CodecRegistry & CreateRegistry)

* Build fixes

* Final build fixes

* licence headers
This commit is contained in:
Jaco
2022-01-18 12:52:01 +02:00
committed by GitHub
parent f8c2701751
commit 500e2022c3
112 changed files with 570 additions and 537 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
import type { Observable } from 'rxjs';
import type { AccountId } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import type { HeaderExtended } from '../type/types';
import type { DeriveApi } from '../types';
@@ -39,7 +38,7 @@ export function getHeader (instanceId: string, api: DeriveApi): (blockHash: Uint
)
]).pipe(
map(([header, validators]) =>
createHeaderExtended(header.registry as Registry, header, validators)
createHeaderExtended(header.registry, header, validators)
),
catchError((): Observable<undefined> =>
// where rpc.chain.getHeader throws, we will land here - it can happen that
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Registry } from '@polkadot/types/types';
import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types';
@@ -33,7 +32,7 @@ export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => O
]);
}),
map(([header, block, events]) =>
createSignedBlockExtended(block.registry as Registry, block, events, header.validators)
createSignedBlockExtended(block.registry, block, events, header.validators)
)
)
);
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Registry } from '@polkadot/types/types';
import type { HeaderExtended } from '../type/types';
import type { DeriveApi } from '../types';
@@ -35,7 +34,7 @@ export function subscribeNewHeads (instanceId: string, api: DeriveApi): () => Ob
map(([header, validators]): HeaderExtended => {
header.createdAtHash = header.hash;
return createHeaderExtended(header.registry as Registry, header, validators);
return createHeaderExtended(header.registry, header, validators);
})
)
);