- values_in_base = self.balances.in_currency(base_currency,
- compute_value=compute_value)
- total_base_value = sum(values_in_base.values())
+ if available_balance_only:
+ repartition, total_base_value, values_in_base = self.balances.available_balances_for_repartition(
+ base_currency=base_currency, liquidity=liquidity,
+ repartition=repartition, compute_value=compute_value)
+ else:
+ values_in_base = self.balances.in_currency(base_currency,
+ compute_value=compute_value)
+ total_base_value = sum(values_in_base.values())