mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +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;
|
return state == State.DEACTIVATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isCanceled() {
|
||||||
|
return state == State.CANCELED;
|
||||||
|
}
|
||||||
|
|
||||||
public BsqSwapOfferPayload getBsqSwapOfferPayload() {
|
public BsqSwapOfferPayload getBsqSwapOfferPayload() {
|
||||||
checkArgument(getOffer().getBsqSwapOfferPayload().isPresent(),
|
checkArgument(getOffer().getBsqSwapOfferPayload().isPresent(),
|
||||||
"getBsqSwapOfferPayload must be called only when BsqSwapOfferPayload is the expected payload");
|
"getBsqSwapOfferPayload must be called only when BsqSwapOfferPayload is the expected payload");
|
||||||
|
@ -202,7 +202,7 @@ public class TriggerPriceService {
|
|||||||
String currencyCode = openOffer.getOffer().getCurrencyCode();
|
String currencyCode = openOffer.getOffer().getCurrencyCode();
|
||||||
if (openOffersByCurrency.containsKey(currencyCode)) {
|
if (openOffersByCurrency.containsKey(currencyCode)) {
|
||||||
Set<OpenOffer> set = openOffersByCurrency.get(currencyCode);
|
Set<OpenOffer> set = openOffersByCurrency.get(currencyCode);
|
||||||
set.remove(openOffer);
|
set.removeIf(OpenOffer::isCanceled);
|
||||||
if (set.isEmpty()) {
|
if (set.isEmpty()) {
|
||||||
openOffersByCurrency.remove(currencyCode);
|
openOffersByCurrency.remove(currencyCode);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user