Skip to content

Commit

Permalink
fix wrong expired message for mosaics with 0 balance #1468 (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
bassemmagdy committed Jun 14, 2021
1 parent ef5341e commit bb440a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/transactions/ViewTransferTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import i18n from '@/language';
import { TransactionDetailItem } from '@/core/transactions/TransactionDetailItem';
import { MosaicService } from '@/services/MosaicService';
import { MosaicModel } from '@/core/database/entities/MosaicModel';

export class ViewTransferTransaction extends TransactionView<TransferTransaction> {
public get isIncoming() {
const currentSignerAddress = this.$store.getters['account/currentSignerAddress'];
Expand Down Expand Up @@ -85,8 +84,11 @@ export class ViewTransferTransaction extends TransactionView<TransferTransaction
const mosaicItems = attachedMosaics.map((mosaic, index, self) => {
const color = incoming ? 'green' : 'red';
const mosaicLabel = i18n.t('mosaic');
const networkConfiguration = this.$store.getters['network/networkConfiguration'];

// check if mosaic not expired yet
return this.availableMosaics.some((entry) => entry.mosaicIdHex == mosaic.mosaicHex)
return this.availableMosaics.some((entry) => entry.mosaicIdHex == mosaic.mosaicHex) ||
mosaic.mosaicHex === networkConfiguration.currencyMosaicId
? {
key: `${mosaicLabel} (${index + 1}/${self.length})`,
value: { ...mosaic, color },
Expand Down

0 comments on commit bb440a8

Please sign in to comment.