fail preparing payment sent message if payout already published

This commit is contained in:
woodser 2025-09-28 11:54:51 -04:00 committed by woodser
parent 57d9701ef0
commit bd12a1a4e6

View file

@ -63,6 +63,11 @@ public class BuyerPreparePaymentSentMessage extends TradeTask {
try {
runInterceptHook();
// quit if payout already published
if (trade.isPayoutPublished()) {
throw new RuntimeException("Cannot mark payment sent because payout already published for " + trade.getClass().getSimpleName() + " " + trade.getShortId());
}
// skip if payout tx already created
if (trade.getSelf().getUnsignedPayoutTxHex() != null) {
log.warn("Skipping preparation of payment sent message because payout tx is already created for {} {}", trade.getClass().getSimpleName(), trade.getShortId());