Skip to content

Commit

Permalink
Merge pull request #4885 from chimp1984/fix-bug-with-reapplying-past-…
Browse files Browse the repository at this point in the history
…trade-state

Avoid that buyer switches back to trade step 2 at startup after payment confirmed
  • Loading branch information
ripcurlx authored Dec 4, 2020
2 parents c44eaa8 + f843b54 commit 588623e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ protected TradeMessage getMessage(String tradeId) {

@Override
protected void setStateSent() {
trade.setStateIfValidTransitionTo(Trade.State.BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG);
if (trade.getState().ordinal() < Trade.State.BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG.ordinal()) {
trade.setStateIfValidTransitionTo(Trade.State.BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG);
}

processModel.getTradeManager().requestPersistence();
}
Expand Down

0 comments on commit 588623e

Please sign in to comment.