List<Wallet> wallets = new ArrayList<Wallet>();
String userId = "";
for (int i = 0; i < info.length; i++) {
ItBitAccountInfoReturn itBitAccountInfoReturn = info[i];
ItBitAccountBalance[] balances = itBitAccountInfoReturn.getBalances();
userId = itBitAccountInfoReturn.getUserId();
for (int j = 0; j < balances.length; j++) {
ItBitAccountBalance itBitAccountBalance = balances[j];
Wallet wallet = new Wallet(itBitAccountBalance.getCurrency(), itBitAccountBalance.getAvailableBalance(), itBitAccountInfoReturn.getName());
wallets.add(wallet);
}
}
return new AccountInfo(userId, wallets);