fix: Fixes #163 Concat index before value for queries with array response (#172)

Applies to queries to storage @polkadot/storage/ such as staking.ts and session.ts having type ['AccountId'].
This commit is contained in:
Luke Schoen 2018-08-02 10:13:45 +02:00 committed by Jaco Greeff
parent 2ddff94741
commit df91405d1b

View File

@ -35,8 +35,8 @@ function arrayToText (type: Param$Type$Array, value: Array<any>, withBound: bool
return `${value.length}`;
}
return value.map((value) =>
valueToText(type[0], value, false)
return value.map((value, index) =>
`${index}: ${valueToText(type[0], value, false)}`
).join(', ');
}