mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Prevent NPE in case delayedPayoutTx is not present (failed trade)
This commit is contained in:
parent
9f60146b96
commit
c916e9b749
@ -493,7 +493,8 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
||||
}
|
||||
Trade.DisputeState disputeState = trade.getDisputeState();
|
||||
DisputeManager<? extends DisputeList<Dispute>> disputeManager;
|
||||
long remainingLockTime = trade.getDelayedPayoutTx().getLockTime() - btcWalletService.getBestChainHeight();
|
||||
long lockTime = trade.getDelayedPayoutTx() == null ? trade.getLockTime() : trade.getDelayedPayoutTx().getLockTime();
|
||||
long remainingLockTime = lockTime - btcWalletService.getBestChainHeight();
|
||||
// In case we re-open a dispute we allow Trade.DisputeState.MEDIATION_REQUESTED
|
||||
boolean useMediation = disputeState == Trade.DisputeState.NO_DISPUTE ||
|
||||
(disputeState == Trade.DisputeState.MEDIATION_REQUESTED && remainingLockTime > 0);
|
||||
|
Loading…
Reference in New Issue
Block a user