mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 12:09:22 +00:00
do not initialize failed trades until moved back to pending trades
This commit is contained in:
parent
cdb99a9cfb
commit
1af87b2db9
2 changed files with 13 additions and 2 deletions
|
@ -450,6 +450,13 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
return;
|
||||
}
|
||||
|
||||
// skip if marked as failed
|
||||
if (failedTradesManager.getObservableList().contains(trade)) {
|
||||
log.warn("Skipping initialization of failed trade {} {}", trade.getClass().getSimpleName(), trade.getId());
|
||||
tradesToSkip.add(trade);
|
||||
return;
|
||||
}
|
||||
|
||||
// initialize trade
|
||||
initPersistedTrade(trade);
|
||||
|
||||
|
@ -1060,7 +1067,11 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
|||
|
||||
private void addTradeToPendingTrades(Trade trade) {
|
||||
if (!trade.isInitialized()) {
|
||||
initPersistedTrade(trade);
|
||||
try {
|
||||
initPersistedTrade(trade);
|
||||
} catch (Exception e) {
|
||||
log.warn("Error initializing {} {} on move to pending trades", trade.getClass().getSimpleName(), trade.getShortId(), e);
|
||||
}
|
||||
}
|
||||
addTrade(trade);
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
|
|||
}
|
||||
|
||||
if (trade.getTakerDepositTx() == null) {
|
||||
return Res.get("portfolio.pending.failedTrade.missingDepositTx"); // TODO (woodser): use .missingTakerDepositTx, .missingMakerDepositTx
|
||||
return Res.get("portfolio.pending.failedTrade.missingDepositTx"); // TODO (woodser): use .missingTakerDepositTx, .missingMakerDepositTx, update translation to 2-of-3 multisig
|
||||
}
|
||||
|
||||
if (trade.hasErrorMessage()) {
|
||||
|
|
Loading…
Reference in a new issue