Skip to content

Commit

Permalink
[wallet] add default currencies to wallet (#1335)
Browse files Browse the repository at this point in the history
* refactor: add default currencies to wallet

* refactor: use NATIVE_CURRENCIES
  • Loading branch information
tomjeatt authored Jun 27, 2023
1 parent f3a7a12 commit 0eb4d00
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useMediaQuery } from '@/component-library/utils/use-media-query';
import { Cell } from '@/components';
import { AssetCell, DataGrid } from '@/components/DataGrid';
import { GOVERNANCE_TOKEN, WRAPPED_TOKEN } from '@/config/relay-chains';
import { NATIVE_CURRENCIES } from '@/utils/constants/currency';
import { getCoinIconProps } from '@/utils/helpers/coin-icon';
import { getTokenPrice } from '@/utils/helpers/prices';
import { BalanceData } from '@/utils/hooks/api/tokens/use-get-balances';
Expand Down Expand Up @@ -46,7 +47,9 @@ const AvailableAssetsTable = ({ balances, pooledTickers }: AvailableAssetsTableP

const rows: AvailableAssetsRows[] = useMemo(() => {
const data = balances ? Object.values(balances) : [];
const filteredData = showZeroBalances ? data : data.filter((balance) => !balance.transferable.isZero());
const filteredData = showZeroBalances
? data
: data.filter((balance) => NATIVE_CURRENCIES.includes(balance.currency) || !balance.transferable.isZero());

return filteredData.map(
({ currency, transferable }): AvailableAssetsRows => {
Expand Down

2 comments on commit 0eb4d00

@vercel
Copy link

@vercel vercel bot commented on 0eb4d00 Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0eb4d00 Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.