mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Remove onPaymentReceived delegate method in seller trade
This commit is contained in:
parent
a661ce6ed5
commit
c39a9b074f
3 changed files with 4 additions and 12 deletions
|
@ -19,12 +19,9 @@ package bisq.core.trade;
|
|||
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.offer.Offer;
|
||||
import bisq.core.trade.protocol.SellerProtocol;
|
||||
|
||||
import bisq.network.p2p.NodeAddress;
|
||||
|
||||
import bisq.common.handlers.ErrorMessageHandler;
|
||||
import bisq.common.handlers.ResultHandler;
|
||||
import bisq.common.storage.Storage;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
@ -33,8 +30,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
@Slf4j
|
||||
public abstract class SellerTrade extends Trade {
|
||||
SellerTrade(Offer offer,
|
||||
|
@ -83,11 +78,6 @@ public abstract class SellerTrade extends Trade {
|
|||
btcWalletService);
|
||||
}
|
||||
|
||||
public void onPaymentReceived(ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
||||
checkArgument(tradeProtocol instanceof SellerProtocol, "tradeProtocol NOT instanceof SellerProtocol");
|
||||
((SellerProtocol) tradeProtocol).onPaymentReceived(resultHandler, errorMessageHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coin getPayoutAmount() {
|
||||
return getOffer().getSellerSecurityDeposit();
|
||||
|
|
|
@ -27,6 +27,7 @@ import bisq.core.trade.Trade;
|
|||
import bisq.core.trade.TradeManager;
|
||||
import bisq.core.trade.closed.ClosedTradableManager;
|
||||
import bisq.core.trade.failed.FailedTradesManager;
|
||||
import bisq.core.trade.protocol.SellerProtocol;
|
||||
import bisq.core.trade.txproof.AssetTxProofResult;
|
||||
import bisq.core.trade.txproof.AssetTxProofService;
|
||||
import bisq.core.user.AutoConfirmSettings;
|
||||
|
@ -263,7 +264,7 @@ public class XmrTxProofService implements AssetTxProofService {
|
|||
log.info("We auto-confirm trade {} as our all our services for the tx proof completed successfully", trade.getShortId());
|
||||
log.info("###########################################################################################");
|
||||
|
||||
trade.onPaymentReceived(() -> {
|
||||
((SellerProtocol) trade.getTradeProtocol()).onPaymentReceived(() -> {
|
||||
}, errorMessage -> {
|
||||
});
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ import bisq.core.trade.TradeDataValidation;
|
|||
import bisq.core.trade.TradeManager;
|
||||
import bisq.core.trade.protocol.BuyerProtocol;
|
||||
import bisq.core.trade.protocol.DisputeProtocol;
|
||||
import bisq.core.trade.protocol.SellerProtocol;
|
||||
import bisq.core.user.Preferences;
|
||||
import bisq.core.util.FormattingUtils;
|
||||
|
||||
|
@ -194,7 +195,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
public void onFiatPaymentReceived(ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {
|
||||
checkNotNull(getTrade(), "trade must not be null");
|
||||
checkArgument(getTrade() instanceof SellerTrade, "Trade must be instance of SellerTrade");
|
||||
((SellerTrade) getTrade()).onPaymentReceived(resultHandler, errorMessageHandler);
|
||||
((SellerProtocol) getTrade().getTradeProtocol()).onPaymentReceived(resultHandler, errorMessageHandler);
|
||||
}
|
||||
|
||||
public void onWithdrawRequest(String toAddress,
|
||||
|
|
Loading…
Add table
Reference in a new issue