mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-18 23:06:02 -04:00
Close trade after withdrawal #283
This commit is contained in:
parent
f8e4d1a41d
commit
f92104f4e2
@ -224,6 +224,8 @@ class PendingTradesModel extends UIModel {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
|
||||
tradeManager.closeTrade(getTrade());
|
||||
|
||||
/*
|
||||
Action response = Popups.openConfirmPopup(
|
||||
"Withdrawal request", "Confirm your request",
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user