web/multinode/operator: wallets features type changed to support null
Change-Id: I4e5a3aed9488747d10cd795e81d52e689fd08be0
This commit is contained in:
parent
d426d4f00d
commit
a89e20895d
@ -61,7 +61,7 @@ import { Operator } from '@/operators';
|
||||
},
|
||||
})
|
||||
export default class WalletsTable extends Vue {
|
||||
@Prop({default: []})
|
||||
@Prop({default: () => []})
|
||||
private readonly operators: Operator[];
|
||||
|
||||
public redirectToWalletDetailsPage(walletAddress: string): void {
|
||||
|
@ -7,6 +7,7 @@
|
||||
<div class="wallets__content-area">
|
||||
<div class="wallets__left-area">
|
||||
<wallets-table
|
||||
v-if="operatorsState.operators.length"
|
||||
class="wallets__left-area__table"
|
||||
:operators="operatorsState.operators"
|
||||
/>
|
||||
@ -16,12 +17,12 @@
|
||||
<div class="wallets__information" slot="body">
|
||||
<h3 class="wallets__information__title">Payouts with zkSync</h3>
|
||||
<p class="wallets__information__description">Short description how minimal threshold system works.</p>
|
||||
<v-link uri="#" label="Learn more" />
|
||||
<v-link uri="https://forum.storj.io/t/minimum-threshold-for-storage-node-operator-payouts/11064" label="Learn more" />
|
||||
</div>
|
||||
</info-block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wallets__pagination">
|
||||
<div class="wallets__pagination" v-if="operatorsState.pageCount > 1">
|
||||
<v-pagination
|
||||
:total-page-count="operatorsState.pageCount"
|
||||
:preselected-current-page-number="operatorsState.currentPage"
|
||||
|
@ -12,7 +12,7 @@ export class Operator {
|
||||
public nodeId: string,
|
||||
public email: string,
|
||||
public wallet: string,
|
||||
public walletFeatures: string[],
|
||||
public walletFeatures: string[] | null,
|
||||
public undistributed: number,
|
||||
) {}
|
||||
|
||||
@ -20,7 +20,7 @@ export class Operator {
|
||||
* indicates if wallet features are enabled.
|
||||
*/
|
||||
public get areWalletFeaturesEnabled(): boolean {
|
||||
return this.walletFeatures.length !== 0;
|
||||
return !!(this.walletFeatures && this.walletFeatures.length !== 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,11 +12,11 @@ export class Cursor {
|
||||
// Page holds page entity which is used to show listed page.
|
||||
export class Page<T> {
|
||||
public constructor(
|
||||
public items: T[],
|
||||
public offset: number,
|
||||
public limit: number,
|
||||
public currentPage: number,
|
||||
public pageCount: number,
|
||||
public totalCount: number,
|
||||
public items: T[] = [],
|
||||
public offset: number = 0,
|
||||
public limit: number = 0,
|
||||
public currentPage: number = 1,
|
||||
public pageCount: number = 0,
|
||||
public totalCount: number = 0,
|
||||
) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user