Close trade after withdrawal #283

This commit is contained in:
Manfred Karrer 2014-11-18 20:19:30 +01:00
parent f8e4d1a41d
commit f92104f4e2
3 changed files with 7 additions and 8 deletions

View File

@ -224,6 +224,8 @@ class PendingTradesModel extends UIModel {
log.error(e.getMessage());
}
tradeManager.closeTrade(getTrade());
/*
Action response = Popups.openConfirmPopup(
"Withdrawal request", "Confirm your request",

View File

@ -19,7 +19,6 @@ package io.bitsquare.gui.main.portfolio.pending;
import io.bitsquare.btc.WalletService;
import io.bitsquare.gui.PresentationModel;
import io.bitsquare.gui.components.Popups;
import io.bitsquare.gui.util.BSFormatter;
import io.bitsquare.gui.util.validation.BtcAddressValidator;
import io.bitsquare.locale.BSResources;
@ -134,11 +133,7 @@ public class PendingTradesPM extends PresentationModel<PendingTradesModel> {
}
void withdraw(String withdrawToAddress) {
// TODO address validation
if (withdrawToAddress != null && withdrawToAddress.length() > 0)
model.withdraw(withdrawToAddress);
else
Popups.openWarningPopup("Please fill in a withdrawal address where you want to send your bitcoins.");
model.withdraw(withdrawToAddress);
}
void withdrawAddressFocusOut(String text) {

View File

@ -278,7 +278,8 @@ public class TradeManager {
public void onPayoutTxPublished(Transaction payoutTx) {
trade.setPayoutTx(payoutTx);
trade.setState(Trade.State.COMPLETED);
closeTrade(trade);
// We close the trade when the user has withdrawn his trade funds (see #283)
//closeTrade(trade);
log.debug("trading onPayoutTxPublishedMessage");
}
@ -355,7 +356,8 @@ public class TradeManager {
public void onPayoutTxPublished(Trade trade, Transaction payoutTx) {
trade.setPayoutTx(payoutTx);
trade.setState(Trade.State.COMPLETED);
closeTrade(trade);
// We close the trade when the user has withdrawn his trade funds (see #283)
//closeTrade(trade);
}
@Override