Fix bug with missing trade completion

This commit is contained in:
Manfred Karrer 2016-03-28 20:06:18 +02:00
parent d6ca10523d
commit 4a8161146b

View File

@ -71,6 +71,11 @@ public class BroadcastAfterLockTime extends TradeTask {
private void broadcastTx() {
Transaction payoutTx = trade.getPayoutTx();
checkNotNull(payoutTx, "payoutTx must not be null at BroadcastAfterLockTime.broadcastTx");
Transaction payoutTxFromWallet = processModel.getWalletService().getWallet().getTransaction(payoutTx.getHash());
if (payoutTxFromWallet != null)
payoutTx = payoutTxFromWallet;
TransactionConfidence.ConfidenceType confidenceType = payoutTx.getConfidence().getConfidenceType();
if (confidenceType.equals(TransactionConfidence.ConfidenceType.BUILDING)) {
trade.setState(Trade.State.PAYOUT_BROAD_CASTED);