Do not reset addressEntries if its from cloned offers at cleanUpAddressEntries

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2023-05-05 19:42:08 +07:00
parent 13bcfb3121
commit 2651a88d5e
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307

View File

@ -227,7 +227,10 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
}
private void cleanUpAddressEntries() {
Set<String> openOffersIdSet = openOffers.getList().stream().map(OpenOffer::getId).collect(Collectors.toSet());
Set<String> openOffersIdSet = openOffers.getList().stream()
.filter(openOffer -> !hasOfferSharedMakerFee(openOffer))
.map(OpenOffer::getId)
.collect(Collectors.toSet());
btcWalletService.getAddressEntriesForOpenOffer().stream()
.filter(e -> !openOffersIdSet.contains(e.getOfferId()))
.forEach(e -> {