[bisq-network/bisq] Improve handling of failed trades and offers (#3566)
sqrrm
notifications at github.com
Wed Nov 6 15:56:06 UTC 2019
sqrrm commented on this pull request.
> - log.warn("We found a closed trade with locked up funds. " +
- "That should never happen. trade ID=" + e.getId());
- return e.getId();
+ tradesIdSet.addAll(closedTradableManager.getTradesStreamWithFundsLockedIn()
+ .map(trade -> {
+ Transaction depositTx = trade.getDepositTx();
+ if (depositTx != null) {
+ TransactionConfidence confidence = btcWalletService.getConfidenceForTxId(depositTx.getHashAsString());
+ if (confidence != null && confidence.getConfidenceType() != TransactionConfidence.ConfidenceType.BUILDING) {
+ tradeTxException.set(new TradeTxException(Res.get("error.closedTradeWithUnconfirmedDepositTx", trade.getShortId())));
+ } else {
+ log.warn("We found a closed trade with locked up funds. " +
+ "That should never happen. trade ID=" + trade.getId());
+ }
+ } else {
+ tradeTxException.set(new TradeTxException(Res.get("error.closedTradeWithNoDepositTx", trade.getShortId())));
Looks like it will work due to how the result of `getSetOfFailedOrClosedTradeIdsFromLockedInFunds` is used, but perhaps the function name is a bit misguiding since there is no locked in fund. Could return `null` there and filter out nulls before collect().
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3566#discussion_r343176171
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191106/61602e99/attachment.html>
More information about the bisq-github
mailing list