Fix bug with mining fee

This commit is contained in:
Manfred Karrer 2014-10-03 22:21:23 +02:00
parent 756966c965
commit 864c7a15db
2 changed files with 4 additions and 4 deletions

View File

@ -316,10 +316,9 @@ class PendingTradesModel extends UIModel {
// TODO handle overpaid collateral
if (isOfferer())
return getTrade().getTradeAmount().add(getTrade().getOffer().getCollateralAmount()).subtract(FeePolicy
.TX_FEE);
return getTrade().getTradeAmount().add(getTrade().getOffer().getCollateralAmount());
else
return getTrade().getCollateralAmount().subtract(FeePolicy.TX_FEE);
return getTrade().getCollateralAmount();
}
///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -17,6 +17,7 @@
package io.bitsquare.gui.main.orders.pending;
import io.bitsquare.btc.FeePolicy;
import io.bitsquare.btc.WalletFacade;
import io.bitsquare.gui.PresentationModel;
import io.bitsquare.gui.components.Popups;
@ -150,7 +151,7 @@ public class PendingTradesPM extends PresentationModel<PendingTradesModel> {
}
String getAmountToWithdraw() {
return formatter.formatCoinWithCode(model.getAmountToWithdraw());
return formatter.formatCoinWithCode(model.getAmountToWithdraw().subtract(FeePolicy.TX_FEE));
}
///////////////////////////////////////////////////////////////////////////////////////////