Skip to content

Commit

Permalink
Use a zero fixed-price if useMarketBasedPrice=true
Browse files Browse the repository at this point in the history
The CLI and apitest cases always pass "0", but java & python clients
might pass an empty string. This change avoids number formatting
& scaling problems when clients pass an empty string in the price
parameter.
  • Loading branch information
ghubstan committed Feb 26, 2022
1 parent c0631eb commit ab8a343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/bisq/core/api/CoreApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void createAndPlaceOffer(String currencyCode,
Consumer<Offer> resultHandler) {
coreOffersService.createAndPlaceOffer(currencyCode,
directionAsString,
price,
useMarketBasedPrice ? "0" : price,
useMarketBasedPrice,
marketPriceMargin,
amountAsLong,
Expand Down

0 comments on commit ab8a343

Please sign in to comment.