Move setup code for tradeManager to onAllServicesInitialized method

This commit is contained in:
Manfred Karrer 2019-01-11 22:00:46 +01:00
parent 74c2c0cf61
commit 9d42031187
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
2 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -239,6 +239,13 @@ public class TradeManager implements PersistedDataHost {
tradableList.getList().addListener((ListChangeListener<Trade>) 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() {