Skip to content

Commit

Permalink
Use low precision
Browse files Browse the repository at this point in the history
  • Loading branch information
axpoems committed Jan 21, 2025
1 parent c0f7d17 commit a3a256f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public AmountSelectionController(ServiceProvider serviceProvider) {
// max or fixed amount
maxOrFixedQuoteSideAmountInput = new QuoteAmountInputBox(false, true);
maxOrFixedBaseSideAmountInput = new BaseAmountBox(true);
maxOrFixedBaseSideAmountInput.setUseLowPrecision(false);
maxOrFixedBaseSideAmountInput.setUseLowPrecision(true);

// min amount (only applies when selecting a range)
minQuoteSideAmountInput = new QuoteAmountInputBox(false, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ private void quoteSideAmountsChanged(boolean maxAmountChanged) {
.filter(e -> userIdentityService.findUserIdentity(e.getKey()).isEmpty())
.filter(e -> e.getValue() >= requiredReputationScoreForMinAmount || requiredReputationScoreForMinAmount <= MIN_REPUTATION_SCORE)
.count();
String formattedMaxOrFixedAmount = formatAmountWithCode(maxOrFixedQuoteSideAmount);
String formattedMaxOrFixedAmount = formatAmountWithCode(maxOrFixedQuoteSideAmount, true);
model.getShouldShowWarningIcon().set(false);
if (model.isCreateOfferMode()) {
// Create offer
Expand All @@ -526,7 +526,7 @@ private void quoteSideAmountsChanged(boolean maxAmountChanged) {
String numSellers = Res.getPluralization("bisqEasy.tradeWizard.amount.buyer.numSellers", numPotentialTakersForMinAmount);
model.getAmountLimitInfo().set(Res.get("bisqEasy.tradeWizard.amount.buyer.limitInfo", numSellers));

String formattedMinAmount = formatAmountWithCode(minQuoteSideAmount);
String formattedMinAmount = formatAmountWithCode(minQuoteSideAmount, true);
if (numPotentialTakersForMinAmount == 0) {
model.getShouldShowWarningIcon().set(true);
model.getAmountLimitInfoOverlayInfo().set(Res.get("bisqEasy.tradeWizard.amount.buyer.limitInfo.overlay.info.noSellers",
Expand Down Expand Up @@ -557,7 +557,7 @@ private void quoteSideAmountsChanged(boolean maxAmountChanged) {
String numOffers = Res.getPluralization("bisqEasy.tradeWizard.amount.numOffers", numMatchingOffers);

boolean weakSecurity = maxOrFixedQuoteSideAmount.isLessThanOrEqual(MAX_USD_TRADE_AMOUNT_WITHOUT_REPUTATION);
String formatted = formatAmountWithCode(MAX_USD_TRADE_AMOUNT_WITHOUT_REPUTATION);
String formatted = formatAmountWithCode(MAX_USD_TRADE_AMOUNT_WITHOUT_REPUTATION, true);
if (weakSecurity) {
model.getAmountLimitInfo().set(Res.get("bisqEasy.tradeWizard.amount.buyer.limitInfo.wizard.info", formatted));
} else {
Expand Down Expand Up @@ -636,7 +636,7 @@ private void applyQuoteSideMinMaxRange() {
model.setAmountLimitInfoLink(Res.get("bisqEasy.tradeWizard.amount.seller.limitInfo.link"));
Monetary reputationBasedQuoteSideAmount = model.getReputationBasedMaxAmount();
long myReputationScore = model.getMyReputationScore();
String formattedAmount = formatAmountWithCode(reputationBasedQuoteSideAmount);
String formattedAmount = formatAmountWithCode(reputationBasedQuoteSideAmount, true);
model.getAmountLimitInfo().set(Res.get("bisqEasy.tradeWizard.amount.seller.limitInfo", formattedAmount));
model.getAmountLimitInfoOverlayInfo().set(Res.get("bisqEasy.tradeWizard.amount.seller.limitInfo.overlay", myReputationScore, formattedAmount));
if (isCreateOfferMode) {
Expand Down

0 comments on commit a3a256f

Please sign in to comment.