List<Wallet> wallets = new ArrayList<Wallet>();
// Adapt to XChange DTOs
if (balance.getBalanceBTC() != null) {
wallets.add(new Wallet(Currencies.BTC, balance.getBalanceBTC().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.BTC, balance.getBalanceBTC().getOrders(), "orders"));
}
if (balance.getBalanceLTC() != null) {
wallets.add(new Wallet(Currencies.LTC, balance.getBalanceLTC().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.LTC, balance.getBalanceLTC().getOrders(), "orders"));
}
if (balance.getBalanceNMC() != null) {
wallets.add(new Wallet(Currencies.NMC, balance.getBalanceNMC().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.NMC, balance.getBalanceNMC().getOrders(), "orders"));
}
if (balance.getBalanceIXC() != null) {
wallets.add(new Wallet(Currencies.IXC, balance.getBalanceIXC().getAvailable(), "available"));
}
if (balance.getBalanceDVC() != null) {
wallets.add(new Wallet(Currencies.DVC, balance.getBalanceDVC().getAvailable(), "available"));
}
if (balance.getBalanceGHS() != null) {
wallets.add(new Wallet(Currencies.GHs, balance.getBalanceGHS().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.GHs, balance.getBalanceGHS().getOrders(), "orders"));
}
if (balance.getBalanceUSD() != null) {
wallets.add(new Wallet(Currencies.USD, balance.getBalanceUSD().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.USD, balance.getBalanceUSD().getOrders(), "orders"));
}
if (balance.getBalanceDRK() != null) {
wallets.add(new Wallet(Currencies.DRK, balance.getBalanceDRK().getAvailable(), "available"));
wallets.add(new Wallet(Currencies.DRK, balance.getBalanceDRK().getOrders(), "orders"));
}
if (balance.getBalanceEUR() != null) {
wallets.add(new Wallet(Currencies.EUR, balance.getBalanceEUR().getAvailable(), "available"));
}
if (balance.getBalanceDOGE() != null) {
wallets.add(new Wallet(Currencies.DOGE, balance.getBalanceDOGE().getAvailable(), "available"));
}
if (balance.getBalanceFTC() != null) {
wallets.add(new Wallet(Currencies.FTC, balance.getBalanceFTC().getAvailable(), "available"));
}
if (balance.getBalanceMEC() != null) {
wallets.add(new Wallet(Currencies.MEC, balance.getBalanceMEC().getAvailable(), "available"));
}
if (balance.getBalanceWDC() != null) {
wallets.add(new Wallet(Currencies.WDC, balance.getBalanceWDC().getAvailable(), "available"));
}
if (balance.getBalanceMYR() != null) {
wallets.add(new Wallet(Currencies.MYR, balance.getBalanceMYR().getAvailable(), "available"));
}
if (balance.getBalanceAUR() != null) {
wallets.add(new Wallet("AUR", balance.getBalanceAUR().getAvailable(), "available"));
}
if (balance.getBalancePOT() != null) {
wallets.add(new Wallet("POT", balance.getBalancePOT().getAvailable(), "available"));
}
if (balance.getBalanceANC() != null) {
wallets.add(new Wallet("ANC", balance.getBalanceANC().getAvailable(), "available"));
}
if (balance.getBalanceDGB() != null) {
wallets.add(new Wallet("DGB", balance.getBalanceDGB().getAvailable(), "available"));
}
if (balance.getBalanceUSDE() != null) {
wallets.add(new Wallet("USDE", balance.getBalanceUSDE().getAvailable(), "available"));
}
return new AccountInfo(userName, null, wallets);
}