Skip to content

Commit

Permalink
Merge pull request #4260 from jmacxx/fix_withdraw_trade
Browse files Browse the repository at this point in the history
Fix trade withdraw to external wallet step 4
  • Loading branch information
sqrrm authored May 25, 2020
2 parents 6665713 + ea8657e commit 481ae23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/bisq/core/trade/TradeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,12 @@ private void onTradesChanged() {
private void cleanUpAddressEntries() {
// We check if we have address entries which are not in our pending trades and clean up those entries.
// They might be either from closed or failed trades or from trades we do not have at all in our data base files.
Set<String> tradesIdSet = getTradesStreamWithFundsLockedIn()
Set<String> activeTrades = getTradableList().stream()
.map(Tradable::getId)
.collect(Collectors.toSet());

btcWalletService.getAddressEntriesForTrade().stream()
.filter(e -> !tradesIdSet.contains(e.getOfferId()))
.filter(e -> !activeTrades.contains(e.getOfferId()))
.forEach(e -> {
log.warn("We found an outdated addressEntry for trade {}: entry={}", e.getOfferId(), e);
btcWalletService.resetAddressEntriesForPendingTrade(e.getOfferId());
Expand Down

0 comments on commit 481ae23

Please sign in to comment.