Set amounts before setting state, as the state triggers the check where the amount is needed

This commit is contained in:
chimp1984 2020-10-06 11:30:44 -05:00
parent 2d99ae7d09
commit 7ecae0e5be
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -202,6 +202,10 @@ public final class MediationManager extends DisputeManager<MediationDisputeList>
Trade trade = tradeOptional.get();
if (trade.getDisputeState() == Trade.DisputeState.MEDIATION_REQUESTED ||
trade.getDisputeState() == Trade.DisputeState.MEDIATION_STARTED_BY_PEER) {
trade.getProcessModel().setBuyerPayoutAmountFromMediation(disputeResult.getBuyerPayoutAmount().value);
trade.getProcessModel().setSellerPayoutAmountFromMediation(disputeResult.getSellerPayoutAmount().value);
tradeManager.requestPersistence();
trade.setDisputeState(Trade.DisputeState.MEDIATION_CLOSED);
}
} else {