mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add check for isUseMarketBasedPrice
This commit is contained in:
parent
284eaf2c11
commit
65d3ef4ff5
1 changed files with 5 additions and 0 deletions
|
@ -227,6 +227,11 @@ public class Offer implements NetworkPayload, PersistablePayload {
|
|||
|
||||
public void checkTradePriceTolerance(long takersTradePrice) throws TradePriceOutOfToleranceException,
|
||||
MarketPriceNotAvailableException, IllegalArgumentException {
|
||||
if (!isUseMarketBasedPrice()) {
|
||||
checkArgument(takersTradePrice == getFixedPrice(),
|
||||
"Takers price does not match offer price");
|
||||
}
|
||||
|
||||
Price tradePrice = Price.valueOf(getCurrencyCode(), takersTradePrice);
|
||||
Price offerPrice = getPrice();
|
||||
if (offerPrice == null)
|
||||
|
|
Loading…
Add table
Reference in a new issue