import React from 'react' ; import { Asset } from '@burner-wallet/types' ; import Balance from './Balance' ; interface BalancesProps { assets : Asset [ ] ; balances : string [ ] ; } interface Balance { asset : Asset ; balance : string ; } const Balances = ( { assets , balances } ) => { const nonEmptyBalances = assets . map ( ( asset , i ) => ( { asset , balance : balances [ i ] } ) ) . filter ( ( { balance } ) => balance !== '0' ) ; return ( < div > { nonEmptyBalances . map ( ( { asset , balance } ) => ( < Balance asset = { asset } balance = { balance } key = { asset . id } / > ) ) } < /div>); } ; export default Balances ;