mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-11 16:10:32 -04:00
Merge branch 'master' into Development
This commit is contained in:
commit
9bbf1f0e78
5 changed files with 21 additions and 7 deletions
|
@ -248,7 +248,7 @@ class CreateOfferViewModel extends ActivatableWithDataModel<CreateOfferDataModel
|
|||
double priceAsDouble = formatter.parseNumberStringToDouble(price.get());
|
||||
double relation = priceAsDouble / marketPriceAsDouble;
|
||||
relation = formatter.roundDouble(relation, 2);
|
||||
double marketPriceMargin = dataModel.getDirection() == Offer.Direction.BUY ? 1 - relation : 1 + relation;
|
||||
double marketPriceMargin = dataModel.getDirection() == Offer.Direction.BUY ? 1 - relation : relation - 1;
|
||||
priceAsPercentage.set(formatter.formatToPercent(marketPriceMargin, 2));
|
||||
} catch (NumberFormatException t) {
|
||||
priceAsPercentage.set("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue