payment sent message must be processed before confirming payment receipt

This commit is contained in:
woodser 2025-11-21 18:15:17 -05:00
parent d607508eee
commit 2612f032c6
No known key found for this signature in database
GPG key ID: 55A10DD48ADEE5EF

View file

@ -122,7 +122,7 @@ public class SellerProtocol extends DisputeProtocol {
log.info(TradeProtocol.LOG_HIGHLIGHT + "SellerProtocol.onPaymentReceived() for {} {}", trade.getClass().getSimpleName(), trade.getShortId()); log.info(TradeProtocol.LOG_HIGHLIGHT + "SellerProtocol.onPaymentReceived() for {} {}", trade.getClass().getSimpleName(), trade.getShortId());
// advance trade state // advance trade state
if (trade.isPaymentSent() || trade.isPaymentReceived()) { if (trade.getState() == Trade.State.BUYER_SENT_PAYMENT_SENT_MSG || trade.isPaymentReceived()) {
trade.setStateIfValidTransitionTo(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT); trade.setStateIfValidTransitionTo(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT);
} else { } else {
errorMessageHandler.handleErrorMessage("Cannot confirm payment received for " + trade.getClass().getSimpleName() + " " + trade.getShortId() + " in state " + trade.getState()); errorMessageHandler.handleErrorMessage("Cannot confirm payment received for " + trade.getClass().getSimpleName() + " " + trade.getShortId() + " in state " + trade.getState());