mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-23 07:00:49 -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) {
|
ErrorMessageHandler errorMessageHandler) {
|
||||||
ThreadUtils.execute(() -> {
|
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
|
// check source offer and clone limit
|
||||||
OpenOffer sourceOffer = null;
|
OpenOffer sourceOffer = null;
|
||||||
if (sourceOfferId != null) {
|
if (sourceOfferId != null) {
|
||||||
|
@ -526,7 +532,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
// get source offer
|
// get source offer
|
||||||
Optional<OpenOffer> sourceOfferOptional = getOpenOffer(sourceOfferId);
|
Optional<OpenOffer> sourceOfferOptional = getOpenOffer(sourceOfferId);
|
||||||
if (!sourceOfferOptional.isPresent()) {
|
if (!sourceOfferOptional.isPresent()) {
|
||||||
errorMessageHandler.handleErrorMessage("Source offer not found to clone, offerId=" + sourceOfferId);
|
errorMessageHandler.handleErrorMessage("Source offer not found to clone, offerId=" + sourceOfferId + ".");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sourceOffer = sourceOfferOptional.get();
|
sourceOffer = sourceOfferOptional.get();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue