From 0ef491ac584d10fe82af40bc525876ef4cd285da Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 2 Oct 2014 15:24:35 +0200 Subject: [PATCH] Fix bug with collateral --- .../bitsquare/gui/main/orders/pending/PendingTradesPM.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesPM.java b/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesPM.java index f03cd03669..88a1ac0874 100644 --- a/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesPM.java +++ b/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesPM.java @@ -237,7 +237,12 @@ public class PendingTradesPM extends PresentationModel { } 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() {