Fix bug with collateral

This commit is contained in:
Manfred Karrer 2014-10-02 15:24:35 +02:00
parent d20a9306ee
commit 0ef491ac58

View File

@ -237,7 +237,12 @@ public class PendingTradesPM extends PresentationModel<PendingTradesModel> {
} }
String getCollateral() { String getCollateral() {
return formatter.formatCoinWithCode(model.getTrade().getOffer().getCollateralAmount()); // collateral is handled different for offerer and taker.
// Offerer have paid in the max amount, but taker might have taken less so also paid in less collateral
if (model.isOfferer())
return formatter.formatCoinWithCode(model.getTrade().getOffer().getCollateralAmount());
else
return formatter.formatCoinWithCode(model.getTrade().getCollateralAmount());
} }
BtcAddressValidator getBtcAddressValidator() { BtcAddressValidator getBtcAddressValidator() {