mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-22 06:38:55 -04:00
cannot set trigger price for fixed price offers over api (#1870)
This commit is contained in:
parent
071659aec1
commit
dd1fced7fb
1 changed files with 7 additions and 1 deletions
|
@ -519,6 +519,12 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
|||
ErrorMessageHandler errorMessageHandler) {
|
||||
ThreadUtils.execute(() -> {
|
||||
|
||||
// cannot set trigger price for fixed price offers
|
||||
if (triggerPrice != 0 && offer.getOfferPayload().getPrice() != 0) {
|
||||
errorMessageHandler.handleErrorMessage("Cannot set trigger price for fixed price offers.");
|
||||
return;
|
||||
}
|
||||
|
||||
// check source offer and clone limit
|
||||
OpenOffer sourceOffer = null;
|
||||
if (sourceOfferId != null) {
|
||||
|
@ -526,7 +532,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
|||
// get source offer
|
||||
Optional<OpenOffer> sourceOfferOptional = getOpenOffer(sourceOfferId);
|
||||
if (!sourceOfferOptional.isPresent()) {
|
||||
errorMessageHandler.handleErrorMessage("Source offer not found to clone, offerId=" + sourceOfferId);
|
||||
errorMessageHandler.handleErrorMessage("Source offer not found to clone, offerId=" + sourceOfferId + ".");
|
||||
return;
|
||||
}
|
||||
sourceOffer = sourceOfferOptional.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue