Replace Data/U8a with un-aliassed Raw (#1656)
* Replace Data with un-aliassed U8a * Export U8a * Explicitly add U8a to the registry * U8a -> Raw
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-empty-interface */
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { Option, U8a, Vec } from '@polkadot/types/codec';
|
||||
import { Option, Raw, Vec } from '@polkadot/types/codec';
|
||||
import { Bytes, Null, bool, u32, u64 } from '@polkadot/types';
|
||||
import { AccountId, AccountIndex, Balance, BalanceOf, BlockNumber, Hash, Index, KeyTypeId, Moment, Perbill, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
@@ -47,10 +47,10 @@ declare module './types' {
|
||||
authorities: StorageEntryExact<ApiType, () => Observable<Vec<ITuple<[AuthorityId, BabeAuthorityWeight]>>>> & QueryableStorageEntry<ApiType>;
|
||||
genesisSlot: StorageEntryExact<ApiType, () => Observable<u64>> & QueryableStorageEntry<ApiType>;
|
||||
currentSlot: StorageEntryExact<ApiType, () => Observable<u64>> & QueryableStorageEntry<ApiType>;
|
||||
randomness: StorageEntryExact<ApiType, () => Observable<U8a>> & QueryableStorageEntry<ApiType>;
|
||||
nextRandomness: StorageEntryExact<ApiType, () => Observable<U8a>> & QueryableStorageEntry<ApiType>;
|
||||
randomness: StorageEntryExact<ApiType, () => Observable<Raw>> & QueryableStorageEntry<ApiType>;
|
||||
nextRandomness: StorageEntryExact<ApiType, () => Observable<Raw>> & QueryableStorageEntry<ApiType>;
|
||||
segmentIndex: StorageEntryExact<ApiType, () => Observable<u32>> & QueryableStorageEntry<ApiType>;
|
||||
underConstruction: StorageEntryExact<ApiType, (arg: u32 | Uint8Array | number | string) => Observable<Vec<U8a>>> & QueryableStorageEntry<ApiType>;
|
||||
underConstruction: StorageEntryExact<ApiType, (arg: u32 | Uint8Array | number | string) => Observable<Vec<Raw>>> & QueryableStorageEntry<ApiType>;
|
||||
initialized: StorageEntryExact<ApiType, () => Observable<Option<MaybeVrf>>> & QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
timestamp: {
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
import { EventRecord, SignedBlock } from '@polkadot/types/interfaces';
|
||||
|
||||
import { U8a } from '@polkadot/types';
|
||||
import { Raw } from '@polkadot/types';
|
||||
|
||||
import l from './logging';
|
||||
|
||||
export default function filterEvents (extHash: U8a, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[]): EventRecord[] | undefined {
|
||||
export default function filterEvents (extHash: Raw, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[]): EventRecord[] | undefined {
|
||||
// extrinsics to hashes
|
||||
const myHash = extHash.toHex();
|
||||
const allHashes = extrinsics.map((ext): string => ext.hash.toHex());
|
||||
|
||||
Reference in New Issue
Block a user