mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
Add missing isAvailable flag
This commit is contained in:
parent
5336bfb8f6
commit
230e2540c4
@ -26,6 +26,9 @@ public final class OfferAvailabilityResponse extends OfferMessage {
|
||||
|
||||
public final AvailabilityResult availabilityResult;
|
||||
|
||||
// TODO keep for backward compatibility. Can be removed once everyone is on v0.4.9
|
||||
public boolean isAvailable;
|
||||
|
||||
public OfferAvailabilityResponse(String offerId, AvailabilityResult availabilityResult) {
|
||||
super(offerId);
|
||||
this.availabilityResult = availabilityResult;
|
||||
|
@ -40,7 +40,8 @@ public class ProcessOfferAvailabilityResponse extends Task<OfferAvailabilityMode
|
||||
OfferAvailabilityResponse offerAvailabilityResponse = model.getMessage();
|
||||
|
||||
if (model.offer.getState() != Offer.State.REMOVED) {
|
||||
if (offerAvailabilityResponse.availabilityResult == AvailabilityResult.AVAILABLE) {
|
||||
// TODO: isAvailable is kept for backward compatibility. Can be removed once everyone is on v0.4.9
|
||||
if (offerAvailabilityResponse.isAvailable || offerAvailabilityResponse.availabilityResult == AvailabilityResult.AVAILABLE) {
|
||||
model.offer.setState(Offer.State.AVAILABLE);
|
||||
} else {
|
||||
log.warn("Offer rejected because of: " + offerAvailabilityResponse.availabilityResult);
|
||||
|
Loading…
Reference in New Issue
Block a user