desktop app creates offers with floating market price

This commit is contained in:
woodser 2023-03-06 12:03:59 -05:00
parent 369e562362
commit f91db182d8
3 changed files with 7 additions and 4 deletions

View file

@ -133,6 +133,12 @@ public class CreateOfferService {
minAmount,
buyerSecurityDepositAsDouble);
// verify fixed price xor market price with margin
if (price != null) {
if (useMarketBasedPrice) throw new IllegalArgumentException("Can create offer with fixed price or floating market price but not both");
if (marketPriceMargin != 0) throw new IllegalArgumentException("Cannot set market price margin with fixed price");
}
long creationTime = new Date().getTime();
NodeAddress makerAddress = p2PService.getAddress();
boolean useMarketBasedPriceValue = price == null &&