web/satellite: token deposit dropdown position fixed

WHAT:
dropdown position fixed before first ever transaction

WHY:
bug fix

Change-Id: I049acc1e1bc8311e165efc92c9769c989dbb8e41
This commit is contained in:
VitaliiShpital 2020-07-16 17:08:15 +03:00 committed by Vitalii Shpital
parent b33ef461e8
commit 0a800336cb

View File

@ -1,3 +1,4 @@
import {PaymentsHistoryItemType} from "@/types/payments";
// Copyright (C) 2019 Storj Labs, Inc. // Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information. // See LICENSE for copying information.
@ -64,7 +65,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue } from 'vue-property-decorator'; import { Component, Vue } from 'vue-property-decorator';
import { PaymentAmountOption } from '@/types/payments'; import { PaymentAmountOption, PaymentsHistoryItem, PaymentsHistoryItemType } from '@/types/payments';
import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames'; import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames';
import { ProjectOwning } from '@/utils/projectOwning'; import { ProjectOwning } from '@/utils/projectOwning';
@ -113,7 +114,9 @@ export default class TokenDepositSelection extends Vue {
* Indicates if dropdown expands top. * Indicates if dropdown expands top.
*/ */
public get isExpandingTop(): boolean { public get isExpandingTop(): boolean {
return this.$store.state.paymentsModule.paymentsHistory.length === 0; return !this.$store.state.paymentsModule.paymentsHistory.some((item: PaymentsHistoryItem) => {
return item.type === PaymentsHistoryItemType.Transaction || item.type === PaymentsHistoryItemType.DepositBonus;
});
} }
/** /**