From 9d4203118705cc68853fadfb213f812ea178590f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 11 Jan 2019 22:00:46 +0100 Subject: [PATCH] Move setup code for tradeManager to onAllServicesInitialized method --- core/src/main/java/bisq/core/app/BisqSetup.java | 7 ------- core/src/main/java/bisq/core/trade/TradeManager.java | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/bisq/core/app/BisqSetup.java b/core/src/main/java/bisq/core/app/BisqSetup.java index 1f3f2db3f9..295a3bbd83 100644 --- a/core/src/main/java/bisq/core/app/BisqSetup.java +++ b/core/src/main/java/bisq/core/app/BisqSetup.java @@ -584,17 +584,10 @@ public class BisqSetup { disputeManager.onAllServicesInitialized(); tradeManager.onAllServicesInitialized(); - tradeManager.getAddressEntriesForAvailableBalanceStream() - .filter(addressEntry -> addressEntry.getOfferId() != null) - .forEach(addressEntry -> { - log.warn("Swapping pending OFFER_FUNDING entries at startup. offerId={}", addressEntry.getOfferId()); - btcWalletService.swapTradeEntryToAvailableEntry(addressEntry.getOfferId(), AddressEntry.Context.OFFER_FUNDING); - }); if (walletsSetup.downloadPercentageProperty().get() == 1) checkForLockedUpFunds(); - openOfferManager.onAllServicesInitialized(); balances.onAllServicesInitialized(); diff --git a/core/src/main/java/bisq/core/trade/TradeManager.java b/core/src/main/java/bisq/core/trade/TradeManager.java index 77e2841843..e2b3592197 100644 --- a/core/src/main/java/bisq/core/trade/TradeManager.java +++ b/core/src/main/java/bisq/core/trade/TradeManager.java @@ -239,6 +239,13 @@ public class TradeManager implements PersistedDataHost { tradableList.getList().addListener((ListChangeListener) change -> onTradesChanged()); onTradesChanged(); + + getAddressEntriesForAvailableBalanceStream() + .filter(addressEntry -> addressEntry.getOfferId() != null) + .forEach(addressEntry -> { + log.warn("Swapping pending OFFER_FUNDING entries at startup. offerId={}", addressEntry.getOfferId()); + btcWalletService.swapTradeEntryToAvailableEntry(addressEntry.getOfferId(), AddressEntry.Context.OFFER_FUNDING); + }); } public void shutDown() {