Additional check for malformed keys on waiting list (#3906)

This commit is contained in:
Jaco Greeff 2020-10-21 08:13:24 +02:00 committed by GitHub
parent 72aa1581a1
commit 535e9b6cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ function getFiltered (stakingOverview: DeriveStakingOverview, favorites: string[
function extractNominators (nominations: [StorageKey, Option<Nominations>][]): Record<string, [string, EraIndex, number][]> {
return nominations.reduce((mapped: Record<string, [string, EraIndex, number][]>, [key, optNoms]) => {
if (optNoms.isSome) {
if (optNoms.isSome && key.args.length) {
const nominatorId = key.args[0].toString();
const { submittedIn, targets } = optNoms.unwrap();