class CoinexAdapters {

  public static Wallet adaptWallet(Map<String, CoinexBalanceInfo> coinexBalances) {<FILL_FUNCTION_BODY>}
}

    List<Balance> balances = new ArrayList<>(coinexBalances.size());
    for (Map.Entry<String, CoinexBalanceInfo> balancePair : coinexBalances.entrySet()) {
      Currency currency = new Currency(balancePair.getKey());
      BigDecimal total =
          balancePair.getValue().getAvailable().add(balancePair.getValue().getFrozen());
      Balance balance =
          new Balance(
              currency,
              total,
              balancePair.getValue().getAvailable(),
              balancePair.getValue().getFrozen());
      balances.add(balance);
    }

    return Wallet.Builder.from(balances).build();
  
<no_super_class>