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

Commit a24ad94

Browse files
authored
Merge pull request #131 from vue-polkadot/dev-fix
2 parents db37356 + a703d62 commit a24ad94

File tree

7 files changed

+350
-255
lines changed

7 files changed

+350
-255
lines changed

dashboard/justfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
upgrade:
2+
yarn add @polkadot/types @polkadot/ui-keyring @polkadot/ui-settings @polkadot/util @polkadot/util-crypto @polkadot/vue-identicon

dashboard/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
"@fortawesome/free-brands-svg-icons": "^5.12.1",
1515
"@fortawesome/free-solid-svg-icons": "^5.12.1",
1616
"@fortawesome/vue-fontawesome": "^0.1.9",
17-
"@polkadot/types": "^1.23.1",
18-
"@polkadot/ui-keyring": "^0.55.1",
19-
"@polkadot/ui-settings": "^0.55.1",
20-
"@polkadot/util": "^2.17.1",
21-
"@polkadot/util-crypto": "^2.17.1",
22-
"@polkadot/vue-identicon": "^0.51.1",
17+
"@polkadot/types": "^1.33.1",
18+
"@polkadot/ui-keyring": "^0.58.1",
19+
"@polkadot/ui-settings": "^0.58.1",
20+
"@polkadot/util": "^3.4.1",
21+
"@polkadot/util-crypto": "^3.4.1",
22+
"@polkadot/vue-identicon": "^0.58.1",
2323
"@types/file-saver": "^2.0.1",
24-
"@vue-polkadot/vue-api": "^0.0.22",
24+
"@vue-polkadot/vue-api": "^0.0.23",
2525
"@vue-polkadot/vue-identicon": "^0.0.8",
2626
"@vue-polkadot/vue-settings": "0.0.12-beta.1",
2727
"buefy": "^0.9.2",

dashboard/src/components/staking/Payouts/PayoutBanner.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div>
3-
<b-tabs type="is-toggle" class="payout-banner__tabs" :value="value" @input="updateSelectedEra">
4-
<b-tab-item v-for="era in availableEras" :key="era.value" :label="era.text" />
3+
<b-tabs type="is-toggle" class="payout-banner__tabs" @input="updateSelectedEra">
4+
<b-tab-item v-for="(era, index) in availableEras" :key="index" :label="era.text" />
55
</b-tabs>
66
<!-- <b-button disabled type="is-primary is-light">Payout All</b-button> -->
77
</div>
@@ -18,6 +18,8 @@ export default class PayoutBanner extends Vue {
1818
1919
@Emit('input')
2020
updateSelectedEra(selectedEra: number) {
21+
console.log(selectedEra);
22+
2123
return selectedEra;
2224
}
2325
}

dashboard/src/components/staking/Payouts/Payouts.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default class Payouts extends Vue {
6262
}
6363
6464
public eraAt(index: number): number {
65-
return this.eraSelection[index].value
65+
return this.eraSelection[index]?.value
6666
}
6767
6868
get hasOwnValidators(): boolean {

dashboard/src/components/storage/Storage.vue

+7-5
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 ''

dashboard/src/router/staking.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default [
6363
children: [
6464
{
6565
path: '',
66-
name: 'waiting',
66+
name: 'payouts',
6767
component: Payouts
6868
}
6969
]

0 commit comments

Comments
 (0)