Gurad for Candidate{Backed, Included} events (#4451)

This commit is contained in:
Jaco Greeff 2021-01-19 17:39:41 +01:00 committed by GitHub
parent 3b9fc4b41b
commit cdc7c7f6ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,11 +29,13 @@ interface LastEvents {
function includeEntry (map: EventMap, event: Event, blockHash: string, blockNumber: BN): void {
const { descriptor } = event.data[0] as CandidateReceipt;
map[descriptor.paraId.toString()] = [
blockHash,
descriptor.relayParent.toHex(),
blockNumber
];
if (descriptor) {
map[descriptor.paraId.toString()] = [
blockHash,
descriptor.relayParent.toHex(),
blockNumber
];
}
}
function ParachainList ({ ids, scheduled }: Props): React.ReactElement<Props> {