From 2f664123e0577d65e74492e530598fb9e5dd4f00 Mon Sep 17 00:00:00 2001 From: Anthony Law Date: Tue, 19 Apr 2022 02:59:11 +0800 Subject: [PATCH] [explorer] fix: filter rich list (#1044) --- src/config/filters.js | 3 +-- src/infrastructure/AccountService.js | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/config/filters.js b/src/config/filters.js index c1288db0b..cd025a475 100644 --- a/src/config/filters.js +++ b/src/config/filters.js @@ -1,5 +1,4 @@ import Constants from '../config/constants'; -import http from '../infrastructure/http'; import { TransactionType, TransactionGroup, @@ -192,7 +191,7 @@ export const account = [ icon: 'mdi-cash', value: { orderBy: AccountOrderBy.Balance, - mosaicId: http.networkCurrency.mosaicId + mosaicId: '' } } ]; diff --git a/src/infrastructure/AccountService.js b/src/infrastructure/AccountService.js index d7a16de85..cf5b95e7f 100644 --- a/src/infrastructure/AccountService.js +++ b/src/infrastructure/AccountService.js @@ -98,14 +98,14 @@ class AccountService { const searchCriteria = { pageNumber, pageSize, - order: Order.Desc + order: Order.Desc, + ...filterValue }; - // Prevent new MosaicId throw error if mosaicId is undefined - if (filterValue.mosaicId) { + // set default network mosaic id + if ('' === filterValue.mosaicId) { Object.assign(searchCriteria, { - ...filterValue, - mosaicId: new MosaicId(filterValue.mosaicId) + mosaicId: new MosaicId(http.networkCurrency.mosaicId) }); }