diff --git a/core/src/main/java/bisq/core/trade/Trade.java b/core/src/main/java/bisq/core/trade/Trade.java index de5c1949bb..447f8b52ea 100644 --- a/core/src/main/java/bisq/core/trade/Trade.java +++ b/core/src/main/java/bisq/core/trade/Trade.java @@ -119,10 +119,10 @@ public abstract class Trade implements Tradable, Model { // DEPOSIT_TX_PUBLISHED_MSG // seller perspective - SELLER_SENT_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), - SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), - SELLER_STORED_IN_MAILBOX_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), - SELLER_SEND_FAILED_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), + @Deprecated SELLER_SENT_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), + @Deprecated SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), + @Deprecated SELLER_STORED_IN_MAILBOX_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), + @Deprecated SELLER_SEND_FAILED_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), // buyer perspective BUYER_RECEIVED_DEPOSIT_TX_PUBLISHED_MSG(Phase.DEPOSIT_PUBLISHED), diff --git a/core/src/main/java/bisq/core/trade/protocol/SellerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/SellerProtocol.java index cb94485fb1..ef5f83b0d3 100644 --- a/core/src/main/java/bisq/core/trade/protocol/SellerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/SellerProtocol.java @@ -87,7 +87,7 @@ public abstract class SellerProtocol extends DisputeProtocol { } protected void handle(ShareBuyerPaymentAccountMessage message, NodeAddress peer) { - expect(anyPhase(Trade.Phase.DEPOSIT_PUBLISHED, Trade.Phase.DEPOSIT_CONFIRMED) + expect(anyPhase(Trade.Phase.TAKER_FEE_PUBLISHED, Trade.Phase.DEPOSIT_PUBLISHED, Trade.Phase.DEPOSIT_CONFIRMED) .with(message) .from(peer)) .setup(tasks(SellerProcessShareBuyerPaymentAccountMessage.class, diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/seller/SellerSendsDepositTxAndDelayedPayoutTxMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/seller/SellerSendsDepositTxAndDelayedPayoutTxMessage.java index 5fad7f71e8..b20b9654c9 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/seller/SellerSendsDepositTxAndDelayedPayoutTxMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/seller/SellerSendsDepositTxAndDelayedPayoutTxMessage.java @@ -79,16 +79,15 @@ public class SellerSendsDepositTxAndDelayedPayoutTxMessage extends SendMailboxMe @Override protected void setStateSent() { - trade.setStateIfValidTransitionTo(Trade.State.SELLER_SENT_DEPOSIT_TX_PUBLISHED_MSG); - - processModel.getTradeManager().requestPersistence(); + // we no longer set deprecated state (Trade.State.SELLER_SENT_DEPOSIT_TX_PUBLISHED_MSG); + // see https://github.com/bisq-network/bisq/pull/5746#issuecomment-939879623 } @Override protected void setStateArrived() { - trade.setStateIfValidTransitionTo(Trade.State.SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG); + // we no longer set deprecated state (Trade.State.SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG); + // see https://github.com/bisq-network/bisq/pull/5746#issuecomment-939879623 - processModel.getTradeManager().requestPersistence(); cleanup(); // Complete is called in base class } @@ -101,9 +100,9 @@ public class SellerSendsDepositTxAndDelayedPayoutTxMessage extends SendMailboxMe @Override protected void setStateStoredInMailbox() { - trade.setStateIfValidTransitionTo(Trade.State.SELLER_STORED_IN_MAILBOX_DEPOSIT_TX_PUBLISHED_MSG); + // we no longer set deprecated state (Trade.State.SELLER_STORED_IN_MAILBOX_DEPOSIT_TX_PUBLISHED_MSG); + // see https://github.com/bisq-network/bisq/pull/5746#issuecomment-939879623 - processModel.getTradeManager().requestPersistence(); // The DepositTxAndDelayedPayoutTxMessage is a mailbox message as earlier we use only the deposit tx which can // be also received from the network once published. // Now we send the delayed payout tx as well and with that this message is mandatory for continuing the protocol. @@ -125,12 +124,11 @@ public class SellerSendsDepositTxAndDelayedPayoutTxMessage extends SendMailboxMe @Override protected void setStateFault() { - trade.setStateIfValidTransitionTo(Trade.State.SELLER_SEND_FAILED_DEPOSIT_TX_PUBLISHED_MSG); + // we no longer set deprecated state (Trade.State.SELLER_SEND_FAILED_DEPOSIT_TX_PUBLISHED_MSG); + // see https://github.com/bisq-network/bisq/pull/5746#issuecomment-939879623 if (!trade.isDepositConfirmed()) { tryToSendAgainLater(); } - - processModel.getTradeManager().requestPersistence(); } @Override @@ -184,9 +182,9 @@ public class SellerSendsDepositTxAndDelayedPayoutTxMessage extends SendMailboxMe // Once we receive an ACK from our msg we know the peer has received the msg and we stop. if (newValue == MessageState.ACKNOWLEDGED) { // We treat a ACK like SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG - trade.setStateIfValidTransitionTo(Trade.State.SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG); + // we no longer set deprecated state (Trade.State.SELLER_SAW_ARRIVED_DEPOSIT_TX_PUBLISHED_MSG); + // see https://github.com/bisq-network/bisq/pull/5746#issuecomment-939879623 - processModel.getTradeManager().requestPersistence(); cleanup(); complete(); } diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java index 1ecd4ac02b..a0ef8130d6 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java @@ -367,7 +367,8 @@ public class PendingTradesView extends ActivatableViewAndModel