From df91405d1beb41e01b32430f68ad69485a32e708 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 2 Aug 2018 10:13:45 +0200 Subject: [PATCH] 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']. --- packages/ui-app/src/Params/valueToText.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-app/src/Params/valueToText.ts b/packages/ui-app/src/Params/valueToText.ts index fae4fefea4..eca4eb65c6 100644 --- a/packages/ui-app/src/Params/valueToText.ts +++ b/packages/ui-app/src/Params/valueToText.ts @@ -35,8 +35,8 @@ function arrayToText (type: Param$Type$Array, value: Array, 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(', '); }