import type { ReactElement } from 'react' import CashoutModal from '../../components/CashoutModal' import ExpandableList from '../../components/ExpandableList' import ExpandableListItem from '../../components/ExpandableListItem' import ExpandableListItemActions from '../../components/ExpandableListItemActions' import ExpandableListItemKey from '../../components/ExpandableListItemKey' import { Accounting } from '../../hooks/accounting' import type { Token } from '../../models/Token' interface Props { isLoadingUncashed: boolean totalUncashed: Token accounting: Accounting[] | null } export default function PeerBalances({ accounting, isLoadingUncashed, totalUncashed }: Props): ReactElement | null { const uncashedPeers = accounting?.filter(({ uncashedAmount }) => uncashedAmount.toBigNumber.isGreaterThan('0')) || [] return ( {uncashedPeers.map(({ peer, balance, received, sent, uncashedAmount, total }) => ( {uncashedAmount.toBigNumber.isGreaterThan('0') && ( )} ))} ) }