support invalid offer state

This commit is contained in:
woodser 2024-05-07 15:56:51 -04:00
parent 7887c450c7
commit 0ea056104c
6 changed files with 12 additions and 3 deletions

View file

@ -81,7 +81,8 @@ public class Offer implements NetworkPayload, PersistablePayload {
AVAILABLE,
NOT_AVAILABLE,
REMOVED,
MAKER_OFFLINE
MAKER_OFFLINE,
INVALID
}
///////////////////////////////////////////////////////////////////////////////////////////

View file

@ -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.UNKNOWN); // TODO: using as invalid state
offer.setState(Offer.State.INVALID);
failed("Take offer attempt failed because maker signature is invalid");
return;
}

View file

@ -563,6 +563,7 @@ takeOffer.setAmountPrice=Set amount
takeOffer.alreadyFunded.askCancel=You have already funded that offer.\nIf you cancel now, your funds will remain in your local Haveno wallet and are available for withdrawal in the \"Funds/Send funds\" screen.\nAre you sure you want to cancel?
takeOffer.failed.offerNotAvailable=Take offer request failed because the offer is not available anymore. Maybe another trader has taken the offer in the meantime.
takeOffer.failed.offerTaken=You cannot take that offer because the offer was already taken by another trader.
takeOffer.failed.offerInvalid=You cannot take that offer because the maker's signature is invalid.
takeOffer.failed.offerRemoved=You cannot take that offer because the offer has been removed in the meantime.
takeOffer.failed.offererNotOnline=Take offer request failed because maker is not online anymore.
takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline.