mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Fix issue with offers getting disabled for no apparent reason
This commit is contained in:
parent
854c6218b3
commit
ee2db16451
@ -187,6 +187,10 @@ public final class OpenOffer implements Tradable {
|
||||
return state == State.DEACTIVATED;
|
||||
}
|
||||
|
||||
public boolean isCanceled() {
|
||||
return state == State.CANCELED;
|
||||
}
|
||||
|
||||
public BsqSwapOfferPayload getBsqSwapOfferPayload() {
|
||||
checkArgument(getOffer().getBsqSwapOfferPayload().isPresent(),
|
||||
"getBsqSwapOfferPayload must be called only when BsqSwapOfferPayload is the expected payload");
|
||||
|
@ -202,7 +202,7 @@ public class TriggerPriceService {
|
||||
String currencyCode = openOffer.getOffer().getCurrencyCode();
|
||||
if (openOffersByCurrency.containsKey(currencyCode)) {
|
||||
Set<OpenOffer> set = openOffersByCurrency.get(currencyCode);
|
||||
set.remove(openOffer);
|
||||
set.removeIf(OpenOffer::isCanceled);
|
||||
if (set.isEmpty()) {
|
||||
openOffersByCurrency.remove(currencyCode);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user