mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge branch '7-more-grpcproto-comments' into 8-remove-trdstats-service
This commit is contained in:
commit
a1f059ded4
@ -204,7 +204,7 @@ public class CoreApi {
|
||||
Consumer<Offer> resultHandler) {
|
||||
coreOffersService.createAndPlaceOffer(currencyCode,
|
||||
directionAsString,
|
||||
price,
|
||||
useMarketBasedPrice ? "0" : price,
|
||||
useMarketBasedPrice,
|
||||
marketPriceMargin,
|
||||
amountAsLong,
|
||||
|
@ -259,7 +259,7 @@ class CoreOffersService {
|
||||
String offerId = getRandomOfferId();
|
||||
OfferDirection direction = OfferDirection.valueOf(directionAsString.toUpperCase());
|
||||
Coin amount = Coin.valueOf(amountAsLong);
|
||||
Coin minAmount = Coin.valueOf(minAmountAsLong);
|
||||
Coin minAmount = minAmountAsLong == 0 ? amount : Coin.valueOf(minAmountAsLong);
|
||||
Price price = Price.valueOf(currencyCode, priceStringToLong(priceAsString, currencyCode));
|
||||
openBsqSwapOfferService.requestNewOffer(offerId,
|
||||
direction,
|
||||
@ -294,7 +294,7 @@ class CoreOffersService {
|
||||
OfferDirection direction = OfferDirection.valueOf(directionAsString.toUpperCase());
|
||||
Price price = Price.valueOf(upperCaseCurrencyCode, priceStringToLong(priceAsString, upperCaseCurrencyCode));
|
||||
Coin amount = Coin.valueOf(amountAsLong);
|
||||
Coin minAmount = Coin.valueOf(minAmountAsLong);
|
||||
Coin minAmount = minAmountAsLong == 0 ? amount : Coin.valueOf(minAmountAsLong);
|
||||
Coin useDefaultTxFee = Coin.ZERO;
|
||||
|
||||
// Almost ready to call createOfferService.createAndGetOffer(), but first:
|
||||
|
@ -68,7 +68,7 @@ class EditOfferValidator {
|
||||
int newEnable,
|
||||
EditOfferRequest.EditType editType) {
|
||||
this.currentlyOpenOffer = currentlyOpenOffer;
|
||||
this.newPrice = newPrice;
|
||||
this.newPrice = newPrice.isBlank() ? "0" : newPrice;
|
||||
// The client cannot determine what offer.isUseMarketBasedPrice should be
|
||||
// when editType = ACTIVATION_STATE_ONLY. Override newIsUseMarketBasedPrice
|
||||
// param for the ACTIVATION_STATE_ONLY case.
|
||||
@ -78,12 +78,12 @@ class EditOfferValidator {
|
||||
? currentlyOpenOffer.getOffer().isUseMarketBasedPrice()
|
||||
: newIsUseMarketBasedPrice;
|
||||
this.newMarketPriceMargin = newMarketPriceMargin;
|
||||
this.newTriggerPrice = newTriggerPrice;
|
||||
this.newTriggerPrice = newTriggerPrice.isBlank() ? "0" : newTriggerPrice;
|
||||
this.newEnable = newEnable;
|
||||
this.editType = editType;
|
||||
|
||||
this.isZeroEditedFixedPriceString = new BigDecimal(newPrice).doubleValue() == 0;
|
||||
this.isZeroEditedTriggerPrice = new BigDecimal(newTriggerPrice).equals(ZERO);
|
||||
this.isZeroEditedFixedPriceString = new BigDecimal(this.newPrice).doubleValue() == 0;
|
||||
this.isZeroEditedTriggerPrice = new BigDecimal(this.newTriggerPrice).equals(ZERO);
|
||||
}
|
||||
|
||||
EditOfferValidator validate() {
|
||||
|
Loading…
Reference in New Issue
Block a user