mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 04:29:22 +00:00
remove repeated popups on offer taken error
This commit is contained in:
parent
399d4e0512
commit
4761b71105
3 changed files with 7 additions and 4 deletions
|
@ -54,7 +54,7 @@ public class ProcessOfferAvailabilityResponse extends Task<OfferAvailabilityMode
|
||||||
|
|
||||||
// verify maker signature for trade request
|
// verify maker signature for trade request
|
||||||
if (!HavenoUtils.isMakerSignatureValid(model.getTradeRequest(), offerAvailabilityResponse.getMakerSignature(), offer.getPubKeyRing())) {
|
if (!HavenoUtils.isMakerSignatureValid(model.getTradeRequest(), offerAvailabilityResponse.getMakerSignature(), offer.getPubKeyRing())) {
|
||||||
offer.setState(Offer.State.NOT_AVAILABLE);
|
offer.setState(Offer.State.UNKNOWN); // TODO: using as invalid state
|
||||||
failed("Take offer attempt failed because maker signature is invalid");
|
failed("Take offer attempt failed because maker signature is invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,10 @@ class TakeOfferDataModel extends OfferDataModel {
|
||||||
this.amount.get(),
|
this.amount.get(),
|
||||||
() -> {
|
() -> {
|
||||||
},
|
},
|
||||||
errorMessage -> new Popup().warning(errorMessage).show());
|
errorMessage -> {
|
||||||
|
log.warn(errorMessage);
|
||||||
|
if (offer.getState() != Offer.State.NOT_AVAILABLE) new Popup().warning(errorMessage).show(); // expected and handled elsewhere in UI
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -374,8 +374,8 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
|
||||||
takeOfferRequested = false;
|
takeOfferRequested = false;
|
||||||
break;
|
break;
|
||||||
case REMOVED:
|
case REMOVED:
|
||||||
if (!takeOfferRequested)
|
// if (takeOfferRequested) // TODO: show any warning or removed is expected?
|
||||||
offerWarning.set(Res.get("takeOffer.failed.offerRemoved"));
|
// offerWarning.set(Res.get("takeOffer.failed.offerRemoved"));
|
||||||
|
|
||||||
takeOfferRequested = false;
|
takeOfferRequested = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue