From 42c225f14f6fde2ba241f8afe19b9cd27e8731e8 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 11 Mar 2016 00:03:31 +0100 Subject: [PATCH] Cleanups --- common/src/main/java/io/bitsquare/app/Log.java | 2 +- .../payment/OKPayAccountContractData.java | 2 -- .../offerer/SetupDepositBalanceListener.java | 3 ++- .../tasks/offerer/VerifyTakeOfferFeePayment.java | 2 +- .../main/java/io/bitsquare/app/BitsquareApp.java | 10 ++-------- .../gui/main/offer/takeoffer/TakeOfferView.java | 2 +- .../io/bitsquare/gui/main/overlays/Overlay.java | 4 ++-- .../gui/main/overlays/windows/TacWindow.java | 15 ++++++++++----- 8 files changed, 19 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/io/bitsquare/app/Log.java b/common/src/main/java/io/bitsquare/app/Log.java index f7dc0ef624..54370c784e 100644 --- a/common/src/main/java/io/bitsquare/app/Log.java +++ b/common/src/main/java/io/bitsquare/app/Log.java @@ -63,7 +63,7 @@ public class Log { logbackLogger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); //TODO for now use always trace - logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.TRACE); + logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.INFO); // logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.DEBUG); logbackLogger.addAppender(appender); } diff --git a/core/src/main/java/io/bitsquare/payment/OKPayAccountContractData.java b/core/src/main/java/io/bitsquare/payment/OKPayAccountContractData.java index 7f7f6d04e7..5b33b525cd 100644 --- a/core/src/main/java/io/bitsquare/payment/OKPayAccountContractData.java +++ b/core/src/main/java/io/bitsquare/payment/OKPayAccountContractData.java @@ -25,8 +25,6 @@ public final class OKPayAccountContractData extends PaymentAccountContractData { private String accountNr; - // TODO refactor PaymentAccountContractData to avoid null values (countryCode, country, selectedTradeCountry) - public OKPayAccountContractData(String paymentMethod, String id, int maxTradePeriod) { super(paymentMethod, id, maxTradePeriod); } diff --git a/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java b/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java index 0b7b020d2a..ad93ad182e 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java @@ -95,7 +95,8 @@ public class SetupDepositBalanceListener extends TradeTask { trade.setState(Trade.State.DEPOSIT_SEEN_IN_NETWORK); } else if (tradeState.getPhase() == Trade.Phase.PREPARATION) { processModel.getTradeManager().removePreparedTrade(trade); - } else if (tradeState.getPhase().ordinal() < Trade.Phase.DEPOSIT_PAID.ordinal()) { // TODO need to evaluate if that is correct + } else if (tradeState.getPhase().ordinal() < Trade.Phase.DEPOSIT_PAID.ordinal()) { + // TODO need to evaluate if that is correct processModel.getTradeManager().addTradeToFailedTrades(trade); } } diff --git a/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/VerifyTakeOfferFeePayment.java b/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/VerifyTakeOfferFeePayment.java index 4ea54fb56b..2eb196b311 100644 --- a/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/VerifyTakeOfferFeePayment.java +++ b/core/src/main/java/io/bitsquare/trade/protocol/trade/tasks/offerer/VerifyTakeOfferFeePayment.java @@ -34,7 +34,7 @@ public class VerifyTakeOfferFeePayment extends TradeTask { protected void run() { try { runInterceptHook(); - //TODO mocked yet, need a confidence listeners + //TODO missing impl. // int numOfPeersSeenTx = processModel.getWalletService().getNumOfPeersSeenTx(processModel.getTakeOfferFeeTxId()); /* if (numOfPeersSeenTx > 2) { resultHandler.handleResult(); diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index d9a14d932c..f45a7a4c0b 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -163,17 +163,11 @@ public class BitsquareApp extends Application { primaryStage.setOnCloseRequest(event -> { event.consume(); - if (BitsquareApp.IS_RELEASE_VERSION) - stop(); // systemTray.hideStage(); TODO issues with some linux systems (https://github.com/bitsquare/bitsquare/issues/350) - else - stop(); + stop(); }); scene.addEventHandler(KeyEvent.KEY_RELEASED, keyEvent -> { if (new KeyCodeCombination(KeyCode.W, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) { - if (BitsquareApp.IS_RELEASE_VERSION) - stop(); //systemTray.hideStage(); TODO issues with some linux systems (https://github.com/bitsquare/bitsquare/issues/350) - else - stop(); + stop(); } else if (new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) { stop(); } else if (new KeyCodeCombination(KeyCode.E, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) { diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java index b62d384b52..2af42545b8 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java @@ -370,7 +370,7 @@ public class TakeOfferView extends ActivatableViewAndModel section you can withdraw those funds.").show();*/ diff --git a/gui/src/main/java/io/bitsquare/gui/main/overlays/Overlay.java b/gui/src/main/java/io/bitsquare/gui/main/overlays/Overlay.java index 13dd8fdf5c..4f210ef3d6 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/overlays/Overlay.java +++ b/gui/src/main/java/io/bitsquare/gui/main/overlays/Overlay.java @@ -734,8 +734,8 @@ public abstract class Overlay { } protected void setTruncatedMessage() { - if (message != null && message.length() > 1200) - truncatedMessage = StringUtils.abbreviate(message, 1200); + if (message != null && message.length() > 1500) + truncatedMessage = StringUtils.abbreviate(message, 1500); else truncatedMessage = message; } diff --git a/gui/src/main/java/io/bitsquare/gui/main/overlays/windows/TacWindow.java b/gui/src/main/java/io/bitsquare/gui/main/overlays/windows/TacWindow.java index abb977269f..d1d43249c3 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/overlays/windows/TacWindow.java +++ b/gui/src/main/java/io/bitsquare/gui/main/overlays/windows/TacWindow.java @@ -20,12 +20,12 @@ public class TacWindow extends Overlay { public TacWindow(Preferences preferences) { this.preferences = preferences; type = Type.Attention; + width = 800; } public void showIfNeeded() { if (!preferences.getTacAccepted() && !BitsquareApp.DEV_MODE) { - // TODO add link: https://bitsquare.io/arbitration_system.pdf - headLine("USER AGREEMENT"); + headLine("User agreement"); String text = "1. This software is experimental and provided \"as is\", without warranty of any kind, " + "express or implied, including but not limited to the warranties of " + "merchantability, fitness for a particular purpose and non-infringement.\n" + @@ -33,9 +33,14 @@ public class TacWindow extends Overlay { "liability, whether in an action of contract, tort or otherwise, " + "arising from, out of or in connection with the software or the use or other dealings in the software.\n\n" + "2. The user is responsible to use the software in compliance with local laws.\n\n" + - "3. The user confirms that he has read and agreed to the rules defined in our " + - "Wiki regrading the dispute process\n" + - "(https://github.com/bitsquare/bitsquare/wiki/Arbitration-system)."; + "3. The user confirms that he has read and agreed to the rules regrading the dispute process:\n" + + " - You must finalize trades within the maximum duration specified for each payment method.\n" + + " - You must enter the correct reference text for your payment transfers.\n" + + " - You must cooperate with the arbitrator during the arbitration process.\n" + + " - You must reply within 48 hours to each arbitrator inquiry.\n" + + " - Failure to follow the above requirements may result in loss of your security deposit.\n\n" + + "For more details and a general overview please read the full documentation about the " + + "arbitration system and the dispute process at: https://bitsquare.io/arbitration_system.pdf"; message(text); actionButtonText("I agree"); closeButtonText("I disagree and quit");