Skip to content

Commit

Permalink
Fix bug with collateral
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfredKarrer committed Oct 2, 2014
1 parent d20a930 commit 0ef491a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,12 @@ String getTotalFees() {
}

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() {
Expand Down

0 comments on commit 0ef491a

Please sign in to comment.