val ownership Account getAllAccounts flatMap acc val balance acc getAs

1
2
3
4
val ownership = Account.getAllAccounts.flatMap{acc=>
val balance = acc.getAssetBalanceQNT(assetId)
if(balance>0) Some(acc.getId.toLong -> balance) else None
}.toSeq.toMap