From a3a256f057b2031d0fb8af130237dc806e8f49be Mon Sep 17 00:00:00 2001 From: axpoems <145597137+axpoems@users.noreply.github.com> Date: Tue, 21 Jan 2025 12:03:09 +0100 Subject: [PATCH] Use low precision --- .../amount_selection/AmountSelectionController.java | 2 +- .../trade_wizard/amount/TradeWizardAmountController.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/components/amount_selection/AmountSelectionController.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/components/amount_selection/AmountSelectionController.java index cedf875858..6973a49975 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/components/amount_selection/AmountSelectionController.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/components/amount_selection/AmountSelectionController.java @@ -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); diff --git a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/trade_wizard/amount/TradeWizardAmountController.java b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/trade_wizard/amount/TradeWizardAmountController.java index 17dd13a277..f6aea64f9c 100644 --- a/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/trade_wizard/amount/TradeWizardAmountController.java +++ b/apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/trade_wizard/amount/TradeWizardAmountController.java @@ -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 @@ -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", @@ -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 { @@ -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) {