mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +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
|
||||
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");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,10 @@ class TakeOfferDataModel extends OfferDataModel {
|
|||
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;
|
||||
break;
|
||||
case REMOVED:
|
||||
if (!takeOfferRequested)
|
||||
offerWarning.set(Res.get("takeOffer.failed.offerRemoved"));
|
||||
// if (takeOfferRequested) // TODO: show any warning or removed is expected?
|
||||
// offerWarning.set(Res.get("takeOffer.failed.offerRemoved"));
|
||||
|
||||
takeOfferRequested = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue