mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Remove handleTakeOfferRequest delegate method in maker trade
This commit is contained in:
parent
766b1e2e1e
commit
456f16ddf4
@ -20,13 +20,10 @@ package bisq.core.trade;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.offer.Offer;
|
||||
import bisq.core.proto.CoreProtoResolver;
|
||||
import bisq.core.trade.messages.TakeOfferRequest;
|
||||
import bisq.core.trade.protocol.BuyerAsMakerProtocol;
|
||||
import bisq.core.trade.protocol.MakerProtocol;
|
||||
|
||||
import bisq.network.p2p.NodeAddress;
|
||||
|
||||
import bisq.common.handlers.ErrorMessageHandler;
|
||||
import bisq.common.storage.Storage;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
@ -108,11 +105,4 @@ public final class BuyerAsMakerTrade extends BuyerTrade implements MakerTrade {
|
||||
protected void createTradeProtocol() {
|
||||
tradeProtocol = new BuyerAsMakerProtocol(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTakeOfferRequest(TakeOfferRequest message,
|
||||
NodeAddress taker,
|
||||
ErrorMessageHandler errorMessageHandler) {
|
||||
((MakerProtocol) tradeProtocol).handleTakeOfferRequest(message, taker, errorMessageHandler);
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,5 @@
|
||||
|
||||
package bisq.core.trade;
|
||||
|
||||
import bisq.core.trade.messages.TakeOfferRequest;
|
||||
|
||||
import bisq.network.p2p.NodeAddress;
|
||||
|
||||
import bisq.common.handlers.ErrorMessageHandler;
|
||||
|
||||
public interface MakerTrade {
|
||||
void handleTakeOfferRequest(TakeOfferRequest message,
|
||||
NodeAddress peerNodeAddress,
|
||||
ErrorMessageHandler errorMessageHandler);
|
||||
}
|
||||
|
@ -20,13 +20,10 @@ package bisq.core.trade;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.offer.Offer;
|
||||
import bisq.core.proto.CoreProtoResolver;
|
||||
import bisq.core.trade.messages.TakeOfferRequest;
|
||||
import bisq.core.trade.protocol.MakerProtocol;
|
||||
import bisq.core.trade.protocol.SellerAsMakerProtocol;
|
||||
|
||||
import bisq.network.p2p.NodeAddress;
|
||||
|
||||
import bisq.common.handlers.ErrorMessageHandler;
|
||||
import bisq.common.storage.Storage;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
@ -109,11 +106,4 @@ public final class SellerAsMakerTrade extends SellerTrade implements MakerTrade
|
||||
protected void createTradeProtocol() {
|
||||
tradeProtocol = new SellerAsMakerProtocol(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTakeOfferRequest(TakeOfferRequest message,
|
||||
NodeAddress taker,
|
||||
ErrorMessageHandler errorMessageHandler) {
|
||||
((MakerProtocol) tradeProtocol).handleTakeOfferRequest(message, taker, errorMessageHandler);
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import bisq.core.trade.failed.FailedTradesManager;
|
||||
import bisq.core.trade.handlers.TradeResultHandler;
|
||||
import bisq.core.trade.messages.TakeOfferRequest;
|
||||
import bisq.core.trade.messages.TradeMessage;
|
||||
import bisq.core.trade.protocol.MakerProtocol;
|
||||
import bisq.core.trade.protocol.ProcessModelServiceProvider;
|
||||
import bisq.core.trade.statistics.TradeStatisticsManager;
|
||||
import bisq.core.user.User;
|
||||
@ -253,7 +254,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
||||
|
||||
initTrade(trade);
|
||||
tradableList.add(trade);
|
||||
((MakerTrade) trade).handleTakeOfferRequest(takeOfferRequest, peer, errorMessage -> {
|
||||
((MakerProtocol) trade.getTradeProtocol()).handleTakeOfferRequest(takeOfferRequest, peer, errorMessage -> {
|
||||
if (takeOfferRequestErrorMessageHandler != null)
|
||||
takeOfferRequestErrorMessageHandler.handleErrorMessage(errorMessage);
|
||||
});
|
||||
|
@ -369,7 +369,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void onTradeStateChanged(Trade.State tradeState) {
|
||||
log.debug("UI tradeState={}, id={}",
|
||||
log.info("UI tradeState={}, id={}",
|
||||
tradeState,
|
||||
trade != null ? trade.getShortId() : "trade is null");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user