Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Commit 6ee0bcc

Browse files
committed
fixed chainstate to accept arguments
1 parent f9742a1 commit 6ee0bcc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

dashboard/src/components/storage/Storage.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/>
1414
<b-button class="chainstate-button" type="is-dark" icon-left="plus" @click="handleClick" :disabled="disabled" />
1515
</div>
16-
<!-- <Argurments v-if="params.length" :args="params" @selected="handleSelectedArguments" /> -->
16+
<Argurments v-if="params.length" :args="params" @selected="handleSelectedArguments" />
1717
</div>
1818
</template>
1919

@@ -50,7 +50,7 @@ export default class Storage extends Mixins(ExtrinsicMixin) {
5050
console.log(params);
5151
5252
53-
this.setArgs(params.map(({type}) => ({ ...type, name: '' })))
53+
this.setArgs(params.map(({type}, index) => ({ ...type, name: index })))
5454
console.log(this.mapArgs());
5555
5656
}
@@ -71,19 +71,21 @@ export default class Storage extends Mixins(ExtrinsicMixin) {
7171
7272
private handleType(storageEntryPromise: StorageEntryPromise): string {
7373
const { type } = storageEntryPromise.creator.meta;
74-
const { isPlain, isMap, isDoubleMap } = type;
74+
const { isPlain, isMap, isDoubleMap } = type;
7575
7676
if (isPlain) {
7777
return type.asPlain.toString();
7878
}
7979
8080
if (isMap) {
81-
return type.asMap.key.toString()
81+
return ''
82+
// return type.asMap.key.toString()
8283
}
8384
8485
// TODO: not so correct
8586
if (isDoubleMap) {
86-
return type.asDoubleMap.key1.toString()
87+
return ''
88+
// return type.asDoubleMap.key1.toString()
8789
}
8890
8991
return ''

0 commit comments

Comments
 (0)