From 437494a166dd96b4aa8b6aa4c467986d79e7f2d4 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 19 Apr 2016 18:20:52 +0200 Subject: [PATCH 01/63] removed coins --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 63ddafa52e..b59c35cf90 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -105,8 +105,6 @@ public class CurrencyUtil { result.add(new CryptoCurrency("BTS", "BitShares")); result.add(new CryptoCurrency("XCP", "Counterparty")); result.add(new CryptoCurrency("XRP", "Ripple")); - result.add(new CryptoCurrency("QRK", "Quark")); - result.add(new CryptoCurrency("WDC", "WorldCoin")); // Unfortunately we cannot support CryptoNote coins yet as there is no way to proof the transaction. Payment ID helps only locate the tx but the // arbitrator cannot see if the receiving key matches the receivers address. They might add support for exposing the tx key, but that is not From 0cf2cb95e86f56a811757fe428f4330b6b96bc56 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 19 Apr 2016 20:45:58 +0200 Subject: [PATCH 02/63] Remove string abbreviation --- .../pendingtrades/steps/seller/SellerStep3View.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java index 7c0c19d8d9..da809bb3a0 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java +++ b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java @@ -36,7 +36,6 @@ import javafx.scene.control.Label; import javafx.scene.control.ProgressIndicator; import javafx.scene.control.Tooltip; import javafx.scene.layout.GridPane; -import org.apache.commons.lang3.StringUtils; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; @@ -152,13 +151,11 @@ public class SellerStep3View extends TradeStepView { } } - TextFieldWithCopyIcon myPaymentDetailsTextField = addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, - myTitle, StringUtils.abbreviate(myPaymentDetails, 56)).second; + TextFieldWithCopyIcon myPaymentDetailsTextField = addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, myTitle, myPaymentDetails).second; myPaymentDetailsTextField.setMouseTransparent(false); myPaymentDetailsTextField.setTooltip(new Tooltip(myPaymentDetails)); - TextFieldWithCopyIcon peersPaymentDetailsTextField = addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, - peersTitle, StringUtils.abbreviate(peersPaymentDetails, 56)).second; + TextFieldWithCopyIcon peersPaymentDetailsTextField = addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, peersTitle, peersPaymentDetails).second; peersPaymentDetailsTextField.setMouseTransparent(false); peersPaymentDetailsTextField.setTooltip(new Tooltip(peersPaymentDetails)); From 6c1cd763b41c31649f896363f25f5fdb9ed82ae7 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 20 Apr 2016 15:12:38 +0200 Subject: [PATCH 03/63] Update build.md Step #7 is needed before step #3 or the later would fail. I suggest moving step #7 to prerequisites chapter since that's what it seems to be. --- doc/build.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/doc/build.md b/doc/build.md index 0bc8c2441b..1a86a4a97d 100644 --- a/doc/build.md +++ b/doc/build.md @@ -34,7 +34,7 @@ Prerequisites The only prerequisite for building Bitsquare is installing the Java Development Kit (JDK), version 8u40 or better (as well as maven and git). In Debian/Ubuntu systems with OpenJDK you'll need OpenJFX as well, i.e. you'll need the `openjfx` package besides the `openjdk-8-jdk` package. -To check the version of Java you currently have installed: +##### 1. Check the version of Java you currently have installed $ javac -version javac 1.8.0_40 @@ -44,6 +44,13 @@ If `javac` is not found, or your version is anything less than `1.8.0_40`, then > _**TIP:** Here are [instructions](http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html) for installing the JDK via `apt` on Debian/Ubuntu systems. > Bitsquare can be built with OpenJDK as well, but this hasn't been thoroughly tested yet._ +##### 2. Enable unlimited Strength for cryptographic keys + +Bitsquare uses 256 bit length keys which are still not permitted by default. Get around that ridiculous fact by adding the missing [jars from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html). You will get an error when building Bitsquare package if you don't have these. + +##### 3. Copy the BountyCastle provider jar file + +Copy the BountyCastle provider jar file (bcprov-jdk15on-1.53.jar) from you local maven repository (/home/.m2) to $JavaHome/jre/lib/ext/. This prevent a "JCE cannot authenticate the provider BC" exception when starting the Bitsquare client. Steps ----- @@ -123,15 +130,6 @@ Here are example program arguments for using regtest and using the Tor network: $ java -jar gui/target/shaded.jar --bitcoin.network=regtest node.port=4442 --devTest=true --app.name=Bitsquare-Tor-Regtest-Bob - -### 7. Enable unlimited Strength for cryptographic keys - -Bitsquare uses 256 bit length keys which are still not permitted by default. -Get around that ridiculous fact by adding the missing [jars from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html). -Copy the BountyCastle provider jar file (bcprov-jdk15on-1.53.jar) from you local maven repository (/home/.m2) to $JavaHome/jre/lib/ext (to avoid getting -a "JCE cannot authenticate the provider BC" exception). - - Problems? --------- From aacb38e9d594dcb8d92e9890586e949f6e01175e Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 21 Apr 2016 23:15:49 +0200 Subject: [PATCH 04/63] Use home dir for dir chooser --- .../io/bitsquare/gui/main/account/content/backup/BackupView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java index cc85f1141e..a292397bc8 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java @@ -87,6 +87,7 @@ public class BackupView extends ActivatableView { protected void activate() { selectBackupDir.setOnAction(e -> { DirectoryChooser directoryChooser = new DirectoryChooser(); + directoryChooser.setInitialDirectory(new File(System.getProperty("user.home"))); directoryChooser.setTitle("Select backup location"); File dir = directoryChooser.showDialog(stage); if (dir != null) { From a10c5bb25c0190f830ed26679490aa745b32f940 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 21 Apr 2016 23:16:24 +0200 Subject: [PATCH 05/63] Add NEM, Anti.cash, VPNCoin, MaidSafeCoin, YbCoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index b59c35cf90..06a2420bb1 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -105,7 +105,13 @@ public class CurrencyUtil { result.add(new CryptoCurrency("BTS", "BitShares")); result.add(new CryptoCurrency("XCP", "Counterparty")); result.add(new CryptoCurrency("XRP", "Ripple")); - + result.add(new CryptoCurrency("XEM", "NEM")); + result.add(new CryptoCurrency("ANTI", "Anti.cash")); + result.add(new CryptoCurrency("VPN", "VPNCoin")); + result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); + result.add(new CryptoCurrency("YBC", "YbCoin")); + + // Unfortunately we cannot support CryptoNote coins yet as there is no way to proof the transaction. Payment ID helps only locate the tx but the // arbitrator cannot see if the receiving key matches the receivers address. They might add support for exposing the tx key, but that is not // implemented yet. To use the view key (also not available in GUI wallets) would reveal the complete wallet history for incoming payments, which is From c98a08b7cfdf14b8f8fdc6ae7e6177bf3241bd87 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 21 Apr 2016 23:16:40 +0200 Subject: [PATCH 06/63] Add check for os arch --- .../java/io/bitsquare/common/util/Utilities.java | 9 +++++++++ .../main/java/io/bitsquare/app/BitsquareApp.java | 13 +++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index 649099c33a..5a70fd2195 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -118,6 +118,15 @@ public class Utilities { return System.getProperty("os.name").toLowerCase(); } + public static boolean isCorrectOSArchitecture() { + String osArch = System.getProperty("os.arch"); + String jvmArch = System.getProperty("sun.arch.data.model"); + //TODO remove log + log.warn("osArch " + osArch); + log.warn("jvmArch " + jvmArch); + return osArch.endsWith(jvmArch); + } + public static void openURI(URI uri) throws IOException { if (!isLinux() && Desktop.isDesktopSupported() diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index 2a4348d9a5..0d8f2ad799 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -54,7 +54,6 @@ import javafx.scene.input.KeyCombination; import javafx.scene.input.KeyEvent; import javafx.scene.layout.Pane; import javafx.scene.layout.StackPane; -import javafx.scene.text.Font; import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; @@ -208,10 +207,16 @@ public class BitsquareApp extends Application { // make the UI visible primaryStage.show(); - Font fon = Font.getDefault(); - Font fonds = Font.getDefault(); - //showDebugWindow(); + if (!Utilities.isCorrectOSArchitecture()) + new Popup<>().warning("You have the wrong version installed for the architecture of your computer.\n" + + "Your computers architecture is: " + System.getProperty("os.arch") + ".\n" + + "The Bitsquare binary you installed is: " + System.getProperty("sun.arch.data.model") + ".\n" + + "Please shut down and re-install the correct version (" + System.getProperty("os.arch") + ").") + .closeButtonText("Shut down") + .onClose(shutDownHandler::run) + .show(); + } catch (Throwable throwable) { showErrorPopup(throwable, false); } From 500d448fe32e2828fa2b1b8dda42f8c04f2f7ffe Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 21 Apr 2016 23:53:18 +0200 Subject: [PATCH 07/63] Added CloakCoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 06a2420bb1..0ff0035a38 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -110,6 +110,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("VPN", "VPNCoin")); result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); result.add(new CryptoCurrency("YBC", "YbCoin")); + result.add(new CryptoCurrency("CLOAK", "CloakCoin")); // Unfortunately we cannot support CryptoNote coins yet as there is no way to proof the transaction. Payment ID helps only locate the tx but the From 95b971150b84f1744063941edb69247cf791cc9f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 21 Apr 2016 23:54:33 +0200 Subject: [PATCH 08/63] Fix OS version check --- .../io/bitsquare/common/util/Utilities.java | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index 5a70fd2195..b4df752f39 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -118,13 +118,29 @@ public class Utilities { return System.getProperty("os.name").toLowerCase(); } + //TODO remove logs public static boolean isCorrectOSArchitecture() { - String osArch = System.getProperty("os.arch"); String jvmArch = System.getProperty("sun.arch.data.model"); - //TODO remove log - log.warn("osArch " + osArch); log.warn("jvmArch " + jvmArch); - return osArch.endsWith(jvmArch); + log.warn("System.getenv(\"ProgramFiles(x86)\") " + System.getenv("ProgramFiles(x86)")); + if (isWindows()) { + // See: https://stackoverflow.com/questions/20856694/how-to-find-the-os-bit-type + String arch = System.getenv("PROCESSOR_ARCHITECTURE"); + String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432"); + + String realArch = arch.endsWith("64") + || wow64Arch != null && wow64Arch.endsWith("64") + ? "64" : "32"; + + log.warn("arch " + arch); + log.warn("wow64Arch " + wow64Arch); + log.warn("realArch " + realArch); + return realArch.endsWith(jvmArch); + } else { + String osArch = System.getProperty("os.arch"); + log.warn("osArch " + osArch); + return osArch.endsWith(jvmArch); + } } public static void openURI(URI uri) throws IOException { From 5353e05c3fae0e188320dd7d6a6ea1543942778f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 22 Apr 2016 02:01:27 +0200 Subject: [PATCH 09/63] Fix OS check --- .../io/bitsquare/common/util/Utilities.java | 45 +++++++++++-------- .../java/io/bitsquare/app/BitsquareApp.java | 20 +++++---- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index b4df752f39..edd5bfb980 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -34,6 +34,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.net.URLEncoder; +import java.util.Locale; import java.util.Random; import java.util.concurrent.*; @@ -115,34 +116,42 @@ public class Utilities { } private static String getOSName() { - return System.getProperty("os.name").toLowerCase(); + return System.getProperty("os.name").toLowerCase(Locale.US); } - //TODO remove logs - public static boolean isCorrectOSArchitecture() { - String jvmArch = System.getProperty("sun.arch.data.model"); - log.warn("jvmArch " + jvmArch); - log.warn("System.getenv(\"ProgramFiles(x86)\") " + System.getenv("ProgramFiles(x86)")); + public static String getOSArchitecture() { + String osArch = System.getProperty("os.arch"); if (isWindows()) { - // See: https://stackoverflow.com/questions/20856694/how-to-find-the-os-bit-type + // See: Like always windows needs extra treatment + // https://stackoverflow.com/questions/20856694/how-to-find-the-os-bit-type String arch = System.getenv("PROCESSOR_ARCHITECTURE"); String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432"); - - String realArch = arch.endsWith("64") + return arch.endsWith("64") || wow64Arch != null && wow64Arch.endsWith("64") ? "64" : "32"; - - log.warn("arch " + arch); - log.warn("wow64Arch " + wow64Arch); - log.warn("realArch " + realArch); - return realArch.endsWith(jvmArch); + } else if (isLinux()) { + return osArch.startsWith("i") ? "32" : "64"; } else { - String osArch = System.getProperty("os.arch"); - log.warn("osArch " + osArch); - return osArch.endsWith(jvmArch); + return osArch.contains("64") ? "64" : osArch; } } + public static String getJVMArchitecture() { + return System.getProperty("sun.arch.data.model"); + } + + public static boolean isCorrectOSArchitecture() { + boolean result = getOSArchitecture().endsWith(getJVMArchitecture()); + if (!result) { + log.warn("System.getProperty(\"os.arch\") " + System.getProperty("os.arch")); + log.warn("System.getenv(\"ProgramFiles(x86)\") " + System.getenv("ProgramFiles(x86)")); + log.warn("System.getenv(\"PROCESSOR_ARCHITECTURE\")" + System.getenv("PROCESSOR_ARCHITECTURE")); + log.warn("System.getenv(\"PROCESSOR_ARCHITEW6432\") " + System.getenv("PROCESSOR_ARCHITEW6432")); + log.warn("System.getProperty(\"sun.arch.data.model\") " + System.getProperty("sun.arch.data.model")); + } + return result; + } + public static void openURI(URI uri) throws IOException { if (!isLinux() && Desktop.isDesktopSupported() @@ -176,7 +185,7 @@ public class Utilities { throw new IOException("Failed to open directory: " + directory.toString()); } } - + public static void openWebPage(String target) { try { openURI(new URI(target)); diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index 0d8f2ad799..de6a7cb564 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -208,14 +208,16 @@ public class BitsquareApp extends Application { primaryStage.show(); - if (!Utilities.isCorrectOSArchitecture()) - new Popup<>().warning("You have the wrong version installed for the architecture of your computer.\n" + - "Your computers architecture is: " + System.getProperty("os.arch") + ".\n" + - "The Bitsquare binary you installed is: " + System.getProperty("sun.arch.data.model") + ".\n" + - "Please shut down and re-install the correct version (" + System.getProperty("os.arch") + ").") - .closeButtonText("Shut down") - .onClose(shutDownHandler::run) + if (!Utilities.isCorrectOSArchitecture()) { + String osArchitecture = Utilities.getOSArchitecture(); + // We don't force a shutdown as the osArchitecture might in strange cases return a wrong value. + // Needs at least more testing on different machines... + new Popup<>().warning("You have probably the wrong version installed for the architecture of your computer.\n" + + "Your computers architecture is: " + osArchitecture + ".\n" + + "The Bitsquare binary you installed is: " + Utilities.getJVMArchitecture() + ".\n" + + "Please shut down and re-install the correct version (" + osArchitecture + ").") .show(); + } } catch (Throwable throwable) { showErrorPopup(throwable, false); @@ -225,8 +227,8 @@ public class BitsquareApp extends Application { private void showSendAlertMessagePopup() { AlertManager alertManager = injector.getInstance(AlertManager.class); new SendAlertMessageWindow() - .onAddAlertMessage((alert, privKeyString) -> alertManager.addAlertMessageIfKeyIsValid(alert, privKeyString)) - .onRemoveAlertMessage(privKeyString -> alertManager.removeAlertMessageIfKeyIsValid(privKeyString)) + .onAddAlertMessage(alertManager::addAlertMessageIfKeyIsValid) + .onRemoveAlertMessage(alertManager::removeAlertMessageIfKeyIsValid) .show(); } From abdaf613e4789cb65f9d7c0fe862af2492d4f1f9 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 22 Apr 2016 15:19:06 +0200 Subject: [PATCH 10/63] Added: EverGreenCoin, VeriCoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 0ff0035a38..75616181fd 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -76,6 +76,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("SDC", "ShadowCash")); result.add(new CryptoCurrency("NMC", "Namecoin")); result.add(new CryptoCurrency("NBT", "NuBits")); + result.add(new CryptoCurrency("SC", "Siacoin")); result.add(new CryptoCurrency("FAIR", "FairCoin")); result.add(new CryptoCurrency("DOGE", "Dogecoin")); result.add(new CryptoCurrency("NXT", "Nxt")); @@ -111,12 +112,9 @@ public class CurrencyUtil { result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); result.add(new CryptoCurrency("YBC", "YbCoin")); result.add(new CryptoCurrency("CLOAK", "CloakCoin")); + result.add(new CryptoCurrency("EGC", "EverGreenCoin")); + result.add(new CryptoCurrency("VRC", "VeriCoin")); - - // Unfortunately we cannot support CryptoNote coins yet as there is no way to proof the transaction. Payment ID helps only locate the tx but the - // arbitrator cannot see if the receiving key matches the receivers address. They might add support for exposing the tx key, but that is not - // implemented yet. To use the view key (also not available in GUI wallets) would reveal the complete wallet history for incoming payments, which is - // not acceptable from privacy point of view. // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; From 4ea16e840beaa78d8c981dcb7c789084b7edf737 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 22 Apr 2016 21:24:50 +0200 Subject: [PATCH 11/63] Add Espers --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 75616181fd..c0eb694886 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -114,6 +114,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("CLOAK", "CloakCoin")); result.add(new CryptoCurrency("EGC", "EverGreenCoin")); result.add(new CryptoCurrency("VRC", "VeriCoin")); + result.add(new CryptoCurrency("ESP", "Espers")); // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); From cfffcaa1b25da52608bab4e5727d9028dc6e39aa Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 00:09:46 +0200 Subject: [PATCH 12/63] Update build instructions --- doc/build.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/build.md b/doc/build.md index 1a86a4a97d..3042339552 100644 --- a/doc/build.md +++ b/doc/build.md @@ -46,11 +46,22 @@ If `javac` is not found, or your version is anything less than `1.8.0_40`, then ##### 2. Enable unlimited Strength for cryptographic keys -Bitsquare uses 256 bit length keys which are still not permitted by default. Get around that ridiculous fact by adding the missing [jars from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html). You will get an error when building Bitsquare package if you don't have these. +Bitsquare uses 256 bit length keys which are still not permitted by default. +Get around that ridiculous fact by adding the missing [jars from Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html). +Please follow the steps described in the Readme file at the downloaded package. +You will get an error when building Bitsquare package if you don't have these. ##### 3. Copy the BountyCastle provider jar file -Copy the BountyCastle provider jar file (bcprov-jdk15on-1.53.jar) from you local maven repository (/home/.m2) to $JavaHome/jre/lib/ext/. This prevent a "JCE cannot authenticate the provider BC" exception when starting the Bitsquare client. +Copy the BountyCastle provider jar file (bcprov-jdk15on-1.53.jar) from you local maven repository (/home/.m2) to $JavaHome/jre/lib/ext/. +This prevent a "JCE cannot authenticate the provider BC" exception when starting the Bitsquare client. + +##### 4. Edit the jre\lib\security\java.security file to add BouncyCastleProvider + +Add org.bouncycastle.jce.provider.BouncyCastleProvider as last entry at: List of providers and their preference orders +E.g.: +security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider + Steps ----- From 32822cb5bd4aa259290260ac1746cfc7ea321de4 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 00:11:36 +0200 Subject: [PATCH 13/63] Add check for BC provider, use reflection to avoid security restriction --- .../io/bitsquare/common/util/Utilities.java | 42 +++++++++++++++++++ .../java/io/bitsquare/app/BitsquareApp.java | 2 + .../io/bitsquare/gui/main/MainViewModel.java | 12 +++++- 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index edd5bfb980..5a8f5e3ab9 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -30,11 +30,15 @@ import org.slf4j.LoggerFactory; import java.awt.*; import java.io.*; +import java.lang.reflect.Field; import java.net.URI; import java.net.URISyntaxException; import java.net.URLConnection; import java.net.URLEncoder; +import java.security.Permission; +import java.security.PermissionCollection; import java.util.Locale; +import java.util.Map; import java.util.Random; import java.util.concurrent.*; @@ -407,4 +411,42 @@ public class Utilities { return false; } } + + // See: https://stackoverflow.com/questions/1179672/how-to-avoid-installing-unlimited-strength-jce-policy-files-when-deploying-an + public static void removeCryptographyRestrictions() { + if (!isRestrictedCryptography()) { + log.debug("Cryptography restrictions removal not needed"); + return; + } + try { + final Class jceSecurity = Class.forName("javax.crypto.JceSecurity"); + final Class cryptoPermissions = Class.forName("javax.crypto.CryptoPermissions"); + final Class cryptoAllPermission = Class.forName("javax.crypto.CryptoAllPermission"); + + final Field isRestrictedField = jceSecurity.getDeclaredField("isRestricted"); + isRestrictedField.setAccessible(true); + isRestrictedField.set(null, false); + + final Field defaultPolicyField = jceSecurity.getDeclaredField("defaultPolicy"); + defaultPolicyField.setAccessible(true); + final PermissionCollection defaultPolicy = (PermissionCollection) defaultPolicyField.get(null); + + final Field perms = cryptoPermissions.getDeclaredField("perms"); + perms.setAccessible(true); + ((Map) perms.get(defaultPolicy)).clear(); + + final Field instance = cryptoAllPermission.getDeclaredField("INSTANCE"); + instance.setAccessible(true); + defaultPolicy.add((Permission) instance.get(null)); + + log.debug("Successfully removed cryptography restrictions"); + } catch (Exception e) { + log.warn("Failed to remove cryptography restrictions", e); + } + } + + public static boolean isRestrictedCryptography() { + // This simply matches the Oracle JRE, but not OpenJDK. + return "Java(TM) SE Runtime Environment".equals(System.getProperty("java.runtime.name")); + } } diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index de6a7cb564..77d8ff529e 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -123,6 +123,8 @@ public class BitsquareApp extends Application { Thread.setDefaultUncaughtExceptionHandler(handler); Thread.currentThread().setUncaughtExceptionHandler(handler); + if (Utilities.isRestrictedCryptography()) + Utilities.removeCryptographyRestrictions(); Security.addProvider(new BouncyCastleProvider()); BitsquareApp.primaryStage = primaryStage; diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java index 5878641116..9ebf26d9de 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java @@ -81,6 +81,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; +import java.security.Security; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -541,7 +542,7 @@ public class MainViewModel implements ViewModel { log.error(msg); UserThread.execute(() -> new Popup<>().warning(msg) .actionButtonText("Shut down") - .onAction(() -> BitsquareApp.shutDownHandler.run()) + .onAction(BitsquareApp.shutDownHandler::run) .closeButtonText("Report bug at Github issues") .onClose(() -> Utilities.openWebPage("https://github.com/bitsquare/bitsquare/issues")) .show()); @@ -549,6 +550,15 @@ public class MainViewModel implements ViewModel { } }; checkCryptoThread.start(); + + if (Security.getProvider("BC") == null) { + new Popup<>().warning("There is a problem with the crypto libraries. BountyCastle is not available.") + .actionButtonText("Shut down") + .onAction(BitsquareApp.shutDownHandler::run) + .closeButtonText("Report bug at Github issues") + .onClose(() -> Utilities.openWebPage("https://github.com/bitsquare/bitsquare/issues")) + .show(); + } } From 24b109421fd78a450994b7ab6c61236c6ea0287d Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 00:12:20 +0200 Subject: [PATCH 14/63] Version 0.4.3 --- common/pom.xml | 2 +- common/src/main/java/io/bitsquare/app/Version.java | 2 +- core/pom.xml | 2 +- gui/pom.xml | 2 +- jsocks/pom.xml | 2 +- jtorctl/pom.xml | 2 +- jtorproxy/pom.xml | 2 +- network/pom.xml | 2 +- package/linux/create_32bit_app.sh | 2 +- package/linux/create_app.sh | 2 +- package/mac/create_app.sh | 2 +- package/windows/Bitsquare.iss | 2 +- package/windows/create_32bit_app.bat | 6 +++--- package/windows/create_app.bat | 6 +++--- pom.xml | 2 +- seednode/pom.xml | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index e78e6c4f7e..83d1dc6201 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index 958dea6bc7..be82e54644 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -24,7 +24,7 @@ public class Version { private static final Logger log = LoggerFactory.getLogger(Version.class); // The application versions - public static final String VERSION = "0.4.2"; + public static final String VERSION = "0.4.3"; // The version nr. for the objects sent over the network. A change will break the serialization of old objects. // If objects are used for both network and database the network version is applied. diff --git a/core/pom.xml b/core/pom.xml index 494d500cfa..6ce292acb6 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 core diff --git a/gui/pom.xml b/gui/pom.xml index ec41aaf685..74df9d3137 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -22,7 +22,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/jsocks/pom.xml b/jsocks/pom.xml index 021065511f..5c4a44825d 100644 --- a/jsocks/pom.xml +++ b/jsocks/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/jtorctl/pom.xml b/jtorctl/pom.xml index 27d58da8fb..3133256d94 100644 --- a/jtorctl/pom.xml +++ b/jtorctl/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/jtorproxy/pom.xml b/jtorproxy/pom.xml index b6435092af..4f108e79c0 100644 --- a/jtorproxy/pom.xml +++ b/jtorproxy/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/network/pom.xml b/network/pom.xml index 9234355312..8bb4a3d381 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 diff --git a/package/linux/create_32bit_app.sh b/package/linux/create_32bit_app.sh index 9153ce8bff..d0455db527 100644 --- a/package/linux/create_32bit_app.sh +++ b/package/linux/create_32bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.2 +fullVersion=0.4.3 jarFile="/home/bitsquare/Desktop/sf_vm_shared_ubuntu14_32bit/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/linux/create_app.sh b/package/linux/create_app.sh index dcf624b5d1..ea1e9f7419 100644 --- a/package/linux/create_app.sh +++ b/package/linux/create_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.2 +fullVersion=0.4.3 jarFile="/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index a470aeea6f..4469526ab6 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -5,7 +5,7 @@ mkdir -p gui/deploy set -e -fullVersion="0.4.2" +fullVersion="0.4.3" mvn clean package -DskipTests -Dmaven.javadoc.skip=true diff --git a/package/windows/Bitsquare.iss b/package/windows/Bitsquare.iss index 3d49b5ab5c..b3d3c58026 100755 --- a/package/windows/Bitsquare.iss +++ b/package/windows/Bitsquare.iss @@ -3,7 +3,7 @@ [Setup] AppId={{bitsquare}} AppName=Bitsquare -AppVersion=0.4.2 +AppVersion=0.4.3 AppVerName=Bitsquare AppPublisher=Bitsquare AppComments=Bitsquare diff --git a/package/windows/create_32bit_app.bat b/package/windows/create_32bit_app.bat index f581f6f966..0764be265a 100644 --- a/package/windows/create_32bit_app.bat +++ b/package/windows/create_32bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.2 +:: edit iss file -> AppVersion=0.4.3 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.2 and -srcfiles +:: edit -> -BappVersion=0.4.3 and -srcfiles :: 32 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_77\bin\javapackager.exe" -deploy -BappVersion=0.4.2 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.2.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_77\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_77\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_77\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/package/windows/create_app.bat b/package/windows/create_app.bat index 3b00003886..8ad06d21e0 100644 --- a/package/windows/create_app.bat +++ b/package/windows/create_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.2 +:: edit iss file -> AppVersion=0.4.3 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.2 and -srcfiles +:: edit -> -BappVersion=0.4.3 and -srcfiles :: 64 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_66\bin\javapackager.exe" -deploy -BappVersion=0.4.2 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.2.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_66\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_66\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_66\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9224124b15..2c3687d21b 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.bitsquare parent pom - 0.4.2 + 0.4.3 Bitsquare - The decentralized bitcoin exchange https://bitsquare.io diff --git a/seednode/pom.xml b/seednode/pom.xml index 11aaba39fa..45907dbd29 100644 --- a/seednode/pom.xml +++ b/seednode/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.2 + 0.4.3 4.0.0 From 07f799ae411f8ec2a32c8231c9e280b5f57adfaa Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 00:54:10 +0200 Subject: [PATCH 15/63] Improve wording, show altcoin in button --- .../markets/charts/MarketsChartsView.java | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/markets/charts/MarketsChartsView.java b/gui/src/main/java/io/bitsquare/gui/main/markets/charts/MarketsChartsView.java index 915ddaa897..095b83026f 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/markets/charts/MarketsChartsView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/markets/charts/MarketsChartsView.java @@ -27,10 +27,7 @@ import io.bitsquare.gui.main.offer.BuyOfferView; import io.bitsquare.gui.main.offer.SellOfferView; import io.bitsquare.gui.main.offer.offerbook.OfferBookListItem; import io.bitsquare.gui.util.BSFormatter; -import io.bitsquare.locale.BSResources; -import io.bitsquare.locale.CryptoCurrency; -import io.bitsquare.locale.FiatCurrency; -import io.bitsquare.locale.TradeCurrency; +import io.bitsquare.locale.*; import io.bitsquare.trade.offer.Offer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; @@ -69,6 +66,8 @@ public class MarketsChartsView extends ActivatableViewAndModel, VBox, Button> tupleSell = getOfferTable(Offer.Direction.SELL); buyOfferTableView = tupleBuy.first; sellOfferTableView = tupleSell.first; + buyOfferButton = tupleBuy.third; + sellOfferButton = tupleSell.third; HBox hBox = new HBox(); hBox.setSpacing(30); @@ -135,19 +136,29 @@ public class MarketsChartsView extends ActivatableViewAndModel { - model.onSetTradeCurrency(currencyComboBox.getSelectionModel().getSelectedItem()); + TradeCurrency tradeCurrency = currencyComboBox.getSelectionModel().getSelectedItem(); + model.onSetTradeCurrency(tradeCurrency); updateChartData(); }); model.getOfferBookListItems().addListener(changeListener); tradeCurrencySubscriber = EasyBind.subscribe(model.tradeCurrency, - newValue -> { - String code = newValue.getCode(); - areaChart.setTitle("Offer book for " + newValue.getName()); + tradeCurrency -> { + String code = tradeCurrency.getCode(); + String tradeCurrencyName = tradeCurrency.getName(); + areaChart.setTitle("Offer book for " + tradeCurrencyName); priceColumnLabel.set("Price (" + code + "/BTC)"); volumeColumnLabel.set("Volume (" + code + ")"); xAxis.setLabel(priceColumnLabel.get()); xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", "")); + + if (CurrencyUtil.isCryptoCurrency(code)) { + buyOfferButton.setText("I want to sell bitcoin / buy " + tradeCurrencyName); + sellOfferButton.setText("I want to buy bitcoin / sell " + tradeCurrencyName); + } else { + buyOfferButton.setText("I want to sell bitcoin"); + sellOfferButton.setText("I want to buy bitcoin"); + } }); buyOfferTableView.setItems(model.getTop3BuyOfferList()); @@ -316,7 +327,7 @@ public class MarketsChartsView extends ActivatableViewAndModel titleLabel.prefWidthProperty().bind(tableView.widthProperty())); @@ -355,10 +366,10 @@ public class MarketsChartsView extends ActivatableViewAndModel(xAxis, yAxis); areaChart.setAnimated(false); From 395b03f42f0866068dcd74eba6f53bb16cea380c Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 01:21:00 +0200 Subject: [PATCH 16/63] Increase col. width --- .../gui/main/settings/network/NetworkSettingsView.fxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/settings/network/NetworkSettingsView.fxml b/gui/src/main/java/io/bitsquare/gui/main/settings/network/NetworkSettingsView.fxml index 471daf9739..4fd5b78175 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/settings/network/NetworkSettingsView.fxml +++ b/gui/src/main/java/io/bitsquare/gui/main/settings/network/NetworkSettingsView.fxml @@ -74,7 +74,7 @@ - + From f8e68d9447444389d25d6f853120135af96e97f6 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 01:22:06 +0200 Subject: [PATCH 17/63] rename files, fix wrong path --- package/linux/{create_app.sh => create_64bit_app.sh} | 2 +- package/windows/{create_app.bat => create_64bit_app.bat} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename package/linux/{create_app.sh => create_64bit_app.sh} (94%) rename package/windows/{create_app.bat => create_64bit_app.bat} (100%) diff --git a/package/linux/create_app.sh b/package/linux/create_64bit_app.sh similarity index 94% rename from package/linux/create_app.sh rename to package/linux/create_64bit_app.sh index ea1e9f7419..68e166db58 100644 --- a/package/linux/create_app.sh +++ b/package/linux/create_64bit_app.sh @@ -34,6 +34,6 @@ rm gui/deploy/LICENSE mv "gui/deploy/bundles/bitsquare-$fullVersion.deb" "gui/deploy/Bitsquare-$fullVersion.deb" rmdir gui/deploy/bundles cp "gui/deploy/Bitsquare-$fullVersion.deb" "/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-64bit-$fullVersion.deb" -cp "gui/deploy/Bitsquare-32bit-$fullVersion.deb" "/home/mk/Desktop/Bitsquare-64bit-$fullVersion.deb" +cp "gui/deploy/Bitsquare-64bit-$fullVersion.deb" "/home/mk/Desktop/Bitsquare-64bit-$fullVersion.deb" cd package/linux \ No newline at end of file diff --git a/package/windows/create_app.bat b/package/windows/create_64bit_app.bat similarity index 100% rename from package/windows/create_app.bat rename to package/windows/create_64bit_app.bat From cf46a5d2325fa0549f9abc4cd8db97a5e58cff83 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 01:45:27 +0200 Subject: [PATCH 18/63] update jdk --- package/windows/create_32bit_app.bat | 2 +- package/windows/create_64bit_app.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/windows/create_32bit_app.bat b/package/windows/create_32bit_app.bat index 0764be265a..12b9d9b619 100644 --- a/package/windows/create_32bit_app.bat +++ b/package/windows/create_32bit_app.bat @@ -8,6 +8,6 @@ mkdir gui\deploy :: 32 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_77\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_77\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/package/windows/create_64bit_app.bat b/package/windows/create_64bit_app.bat index 8ad06d21e0..9b4d027d14 100644 --- a/package/windows/create_64bit_app.bat +++ b/package/windows/create_64bit_app.bat @@ -8,6 +8,6 @@ mkdir gui\deploy :: 64 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_66\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_66\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file From f700c427a603aa3767f68e4ad5398c808cc070f3 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 01:58:52 +0200 Subject: [PATCH 19/63] Add system info to logs --- common/src/main/java/io/bitsquare/app/Version.java | 2 -- .../main/java/io/bitsquare/common/util/Utilities.java | 10 ++++++++++ gui/src/main/java/io/bitsquare/app/BitsquareApp.java | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index be82e54644..3e6bdf4dfb 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -81,6 +81,4 @@ public class Version { ", getP2PNetworkId()=" + getP2PMessageVersion() + '}'); } - - } diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index 5a8f5e3ab9..e6da9b8a2d 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -140,6 +140,16 @@ public class Utilities { } } + public static void printSysInfo() { + log.info("os.name: " + System.getProperty("os.name")); + log.info("os.version: " + System.getProperty("os.version")); + log.info("os.arch: " + System.getProperty("os.arch")); + log.info("os.name: " + System.getProperty("os.name")); + log.info("sun.arch.data.model: " + getJVMArchitecture()); + log.info("JRE: " + System.getProperty("java.runtime.version", "-") + " (" + System.getProperty("java.vendor", "-") + ")"); + log.info("JVM: " + System.getProperty("java.vm.version", "-") + " (" + System.getProperty("java.vm.name", "-") + ")"); + } + public static String getJVMArchitecture() { return System.getProperty("sun.arch.data.model"); } diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index 77d8ff529e..dae6210dd3 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -101,8 +101,8 @@ public class BitsquareApp extends Application { String logPath = Paths.get(env.getProperty(BitsquareEnvironment.APP_DATA_DIR_KEY), "bitsquare").toString(); Log.setup(logPath, !IS_RELEASE_VERSION); log.info("Log files under: " + logPath); - Version.printVersion(); + Utilities.printSysInfo(); UserThread.setExecutor(Platform::runLater); UserThread.setTimerClass(UITimer.class); From b4edbe29869d40a8f283a876e9d1b368952f1d9b Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 02:51:01 +0200 Subject: [PATCH 20/63] Improve logging --- common/src/main/java/io/bitsquare/app/Log.java | 8 ++++++-- core/src/main/java/io/bitsquare/trade/offer/Offer.java | 2 +- gui/src/main/java/io/bitsquare/app/BitsquareApp.java | 4 +++- .../main/java/io/bitsquare/p2p/network/Connection.java | 8 ++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/io/bitsquare/app/Log.java b/common/src/main/java/io/bitsquare/app/Log.java index 810da81353..5c08e9db0a 100644 --- a/common/src/main/java/io/bitsquare/app/Log.java +++ b/common/src/main/java/io/bitsquare/app/Log.java @@ -30,7 +30,7 @@ public class Log { private static SizeBasedTriggeringPolicy triggeringPolicy; private static Logger logbackLogger; - public static void setup(String fileName, boolean useDetailedLogging) { + public static void setup(String fileName) { LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); RollingFileAppender appender = new RollingFileAppender(); @@ -60,8 +60,8 @@ public class Log { appender.start(); logbackLogger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); - logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.WARN); logbackLogger.addAppender(appender); + logbackLogger.setLevel(Level.INFO); // log errors in separate file // not working as expected still.... damn logback... @@ -80,6 +80,10 @@ public class Log { logbackLogger.addAppender(errorAppender);*/ } + public static void setLevel(boolean useDetailedLogging) { + logbackLogger.setLevel(useDetailedLogging ? Level.TRACE : Level.WARN); + } + public static void traceCall() { if (LoggerFactory.getLogger(Log.class).isTraceEnabled()) { StackTraceElement stackTraceElement = new Throwable().getStackTrace()[1]; diff --git a/core/src/main/java/io/bitsquare/trade/offer/Offer.java b/core/src/main/java/io/bitsquare/trade/offer/Offer.java index 39e862d40c..e912c0d32c 100644 --- a/core/src/main/java/io/bitsquare/trade/offer/Offer.java +++ b/core/src/main/java/io/bitsquare/trade/offer/Offer.java @@ -371,7 +371,7 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload return null; } } else { - log.warn("We don't have a market price.\n" + + log.debug("We don't have a market price.\n" + "That case could only happen if you don't have a price feed."); return null; } diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index dae6210dd3..9d66890774 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -99,10 +99,12 @@ public class BitsquareApp extends Application { @Override public void start(Stage primaryStage) throws IOException { String logPath = Paths.get(env.getProperty(BitsquareEnvironment.APP_DATA_DIR_KEY), "bitsquare").toString(); - Log.setup(logPath, !IS_RELEASE_VERSION); + + Log.setup(logPath); log.info("Log files under: " + logPath); Version.printVersion(); Utilities.printSysInfo(); + Log.setLevel(!IS_RELEASE_VERSION); UserThread.setExecutor(Platform::runLater); UserThread.setTimerClass(UITimer.class); diff --git a/network/src/main/java/io/bitsquare/p2p/network/Connection.java b/network/src/main/java/io/bitsquare/p2p/network/Connection.java index e76af68c10..d75679e764 100644 --- a/network/src/main/java/io/bitsquare/p2p/network/Connection.java +++ b/network/src/main/java/io/bitsquare/p2p/network/Connection.java @@ -542,8 +542,12 @@ public class Connection implements MessageListener { } else { // TODO sometimes we get StreamCorruptedException, OptionalDataException, IllegalStateException closeConnectionReason = CloseConnectionReason.UNKNOWN_EXCEPTION; - log.warn("Unknown reason for exception at socket {}\n\tconnection={}\n\tException=", - socket.toString(), this, e.toString()); + log.warn("Unknown reason for exception at socket {}\n\t" + + "connection={}\n\t" + + "Exception=", + socket.toString(), + this, + e.toString()); e.printStackTrace(); } From 9f38374539a0b7820687172422bfa37c4da24cec Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 03:36:55 +0200 Subject: [PATCH 21/63] Fix wrong thread call on exite form sys tray --- gui/src/main/java/io/bitsquare/gui/SystemTray.java | 2 +- network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/SystemTray.java b/gui/src/main/java/io/bitsquare/gui/SystemTray.java index b06d3122a9..b21aaec463 100644 --- a/gui/src/main/java/io/bitsquare/gui/SystemTray.java +++ b/gui/src/main/java/io/bitsquare/gui/SystemTray.java @@ -128,7 +128,7 @@ public class SystemTray { e1.printStackTrace(); } }); - exitItem.addActionListener(e -> onExit.run()); + exitItem.addActionListener(e -> UserThread.execute(onExit::run)); } public void hideStage() { diff --git a/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java b/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java index bc1c65eac7..7a66d1a2f6 100644 --- a/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java +++ b/network/src/main/java/io/bitsquare/p2p/seed/SeedNode.java @@ -5,6 +5,7 @@ import io.bitsquare.app.Log; import io.bitsquare.app.Version; import io.bitsquare.common.Clock; import io.bitsquare.common.UserThread; +import io.bitsquare.common.util.Utilities; import io.bitsquare.p2p.NodeAddress; import io.bitsquare.p2p.P2PService; import io.bitsquare.p2p.P2PServiceListener; @@ -118,8 +119,11 @@ public class SeedNode { "Bitsquare_seed_node_" + String.valueOf(mySeedNodeAddress.getFullAddress().replace(":", "_"))); String logPath = Paths.get(appPath.toString(), "logs").toString(); - Log.setup(logPath, useDetailedLogging); + Log.setup(logPath); log.info("Log files under: " + logPath); + Version.printVersion(); + Utilities.printSysInfo(); + Log.setLevel(useDetailedLogging); SeedNodesRepository seedNodesRepository = new SeedNodesRepository(); if (progArgSeedNodes != null && !progArgSeedNodes.isEmpty()) { From 46cdfafd5e51c0b8e0ff3d76c2619e69ede20cca Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 23 Apr 2016 14:05:57 +0200 Subject: [PATCH 22/63] Add util script for collecting binaries --- .../io/bitsquare/common/util/Utilities.java | 1 - package/mac/collect_files.sh | 22 +++++++++++++++++++ package/mac/create_app.sh | 7 ++++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 package/mac/collect_files.sh diff --git a/common/src/main/java/io/bitsquare/common/util/Utilities.java b/common/src/main/java/io/bitsquare/common/util/Utilities.java index e6da9b8a2d..76ce508dfe 100644 --- a/common/src/main/java/io/bitsquare/common/util/Utilities.java +++ b/common/src/main/java/io/bitsquare/common/util/Utilities.java @@ -144,7 +144,6 @@ public class Utilities { log.info("os.name: " + System.getProperty("os.name")); log.info("os.version: " + System.getProperty("os.version")); log.info("os.arch: " + System.getProperty("os.arch")); - log.info("os.name: " + System.getProperty("os.name")); log.info("sun.arch.data.model: " + getJVMArchitecture()); log.info("JRE: " + System.getProperty("java.runtime.version", "-") + " (" + System.getProperty("java.vendor", "-") + ")"); log.info("JVM: " + System.getProperty("java.vm.version", "-") + " (" + System.getProperty("java.vm.name", "-") + ")"); diff --git a/package/mac/collect_files.sh b/package/mac/collect_files.sh new file mode 100644 index 0000000000..ab0369dca6 --- /dev/null +++ b/package/mac/collect_files.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +version="0.4.3" + +target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" + +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/bundles/Bitsquare-0.4.3.dmg" "$target_dir/Bitsquare-0.4.3.dmg " +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.3.jar" "$target_dir/SeedNode-0.4.3.jar" + + +linux32="Bitsquare-32bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu14_32bit/$linux32" "$target_dir/$linux32 " + +linux64="Bitsquare-64bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu/$linux64" "$target_dir/$linux64" + +exe="Bitsquare.exe" +cp "/Users/mk/vm_shared_windows_32bit/bundles/$exe" "$target_dir/Bitsquare-32bit-$version.exe" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "$target_dir/Bitsquare-64bit-$version.exe" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "/Users/mk/vm_shared_win10/Bitsquare-64bit-$version.exe" + +open "$target_dir" \ No newline at end of file diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 4469526ab6..0265c41d2f 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -37,7 +37,10 @@ $JAVA_HOME/bin/javapackager \ rm "gui/deploy/Bitsquare.html" rm "gui/deploy/Bitsquare.jnlp" -mv "gui/deploy/bundles/Bitsquare.dmg" "gui/deploy/Bitsquare-$fullVersion.dmg" -rm gui/deploy/bundles +mv "gui/deploy/bundles/Bitsquare-$fullVersion.dmg" "gui/deploy/Bitsquare-$fullVersion.dmg" +rm "gui/deploy/bundles" + +mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-0.4.3.jar" + cd package/mac \ No newline at end of file From 447c668cbb4d472c2251a9ed53a53cdd7b212506 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sun, 24 Apr 2016 14:03:35 +0200 Subject: [PATCH 23/63] Improve wording --- .../bitsquare/gui/main/offer/createoffer/CreateOfferView.java | 3 +-- .../io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java index 3d71c7f602..4e011a0031 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java @@ -889,8 +889,7 @@ public class CreateOfferView extends ActivatableViewAndModel { if (model.dataModel.isWalletFunded.get()) { - new Popup().warning("You have already paid in the funds.\n" + - "Are you sure you want to cancel.") + new Popup().warning("Are you sure, you want to cancel.") .closeButtonText("No") .actionButtonText("Yes, cancel") .onAction(() -> { 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 76c3fc24d0..7cbbf2d501 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 @@ -778,8 +778,7 @@ public class TakeOfferView extends ActivatableViewAndModel { if (model.dataModel.isWalletFunded.get()) { - new Popup().warning("You have already paid in the funds.\n" + - "Are you sure you want to cancel.") + new Popup().warning("Are you sure, you want to cancel.") .closeButtonText("No") .actionButtonText("Yes, cancel") .onAction(() -> { From c57813f407300cfa52821aa4359606c55a4c5615 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sun, 24 Apr 2016 14:50:25 +0200 Subject: [PATCH 24/63] Improve wording --- .../bitsquare/gui/main/offer/createoffer/CreateOfferView.java | 4 +++- .../io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java index 4e011a0031..005613419d 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java @@ -889,7 +889,9 @@ public class CreateOfferView extends ActivatableViewAndModel { if (model.dataModel.isWalletFunded.get()) { - new Popup().warning("Are you sure, you want to cancel.") + new Popup().warning("You have already paid the funds.\n" + + "If you cancel now, your funds will be available immediately.\n" + + "Are you sure, you want to cancel.") .closeButtonText("No") .actionButtonText("Yes, cancel") .onAction(() -> { 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 7cbbf2d501..edc83c5ec1 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 @@ -778,7 +778,9 @@ public class TakeOfferView extends ActivatableViewAndModel { if (model.dataModel.isWalletFunded.get()) { - new Popup().warning("Are you sure, you want to cancel.") + new Popup().warning("You have already paid the funds.\n" + + "If you cancel now, your funds will be available immediately.\n" + + "Are you sure, you want to cancel.") .closeButtonText("No") .actionButtonText("Yes, cancel") .onAction(() -> { From e76f80eabb364827a7ea20e5b77894a663a33b8b Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sun, 24 Apr 2016 14:58:17 +0200 Subject: [PATCH 25/63] Improve wording --- .../bitsquare/gui/main/offer/createoffer/CreateOfferView.java | 2 +- .../io/bitsquare/gui/main/offer/takeoffer/TakeOfferView.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java index 005613419d..28ded6126f 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java @@ -891,7 +891,7 @@ public class CreateOfferView extends ActivatableViewAndModel { 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 edc83c5ec1..b4e648e778 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 @@ -780,7 +780,7 @@ public class TakeOfferView extends ActivatableViewAndModel { From 280574638f909787b0cd48f066284ac9f2261d6e Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 25 Apr 2016 00:16:20 +0200 Subject: [PATCH 26/63] Add new seed node --- .../src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java | 1 + 1 file changed, 1 insertion(+) diff --git a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java index 032193b136..4bc4f30857 100644 --- a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java +++ b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java @@ -35,6 +35,7 @@ public class SeedNodesRepository { new NodeAddress("uadzuib66jupaept.onion:8000"), new NodeAddress("hbma455xxbqhcuqh.onion:8000"), new NodeAddress("wgthuiqn3aoiovbm.onion:8000"), + new NodeAddress("2zxtnprnx5wqr7a3.onion:8000"), // testnet new NodeAddress("znmy44wcstn2rkva.onion:8001"), From 73131e0c188883d7858fab9b7c37b4557cd5c456 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 25 Apr 2016 01:16:55 +0200 Subject: [PATCH 27/63] Added Verge --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index c0eb694886..ab9973e2ea 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -115,6 +115,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("EGC", "EverGreenCoin")); result.add(new CryptoCurrency("VRC", "VeriCoin")); result.add(new CryptoCurrency("ESP", "Espers")); + result.add(new CryptoCurrency("XVG", "Verge")); // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); From 01955a0ef69299ff93d67d4ae7ca5d20dcecae39 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 25 Apr 2016 22:42:32 +0200 Subject: [PATCH 28/63] Add Myriadcoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index ab9973e2ea..f064861624 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -116,6 +116,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("VRC", "VeriCoin")); result.add(new CryptoCurrency("ESP", "Espers")); result.add(new CryptoCurrency("XVG", "Verge")); + result.add(new CryptoCurrency("MYR", "Myriadcoin")); // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); From 171f61f60c0df74e2a48e2798ec797aa4a4766ab Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 25 Apr 2016 23:43:16 +0200 Subject: [PATCH 29/63] Fix logging, increase throttle --- .../java/io/bitsquare/p2p/network/Connection.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/network/src/main/java/io/bitsquare/p2p/network/Connection.java b/network/src/main/java/io/bitsquare/p2p/network/Connection.java index d75679e764..79be375923 100644 --- a/network/src/main/java/io/bitsquare/p2p/network/Connection.java +++ b/network/src/main/java/io/bitsquare/p2p/network/Connection.java @@ -64,7 +64,7 @@ public class Connection implements MessageListener { private static final int MAX_MSG_SIZE = 500 * 1024; // 500 kb //TODO decrease limits again after testing - private static final int MSG_THROTTLE_PER_SEC = 50; // With MAX_MSG_SIZE of 100kb results in bandwidth of 5 mbit/sec + private static final int MSG_THROTTLE_PER_SEC = 70; // With MAX_MSG_SIZE of 500kb results in bandwidth of 35 mbit/sec private static final int MSG_THROTTLE_PER_10_SEC = 500; // With MAX_MSG_SIZE of 100kb results in bandwidth of 50 mbit/sec for 10 sec private static final int SOCKET_TIMEOUT = (int) TimeUnit.SECONDS.toMillis(60); @@ -251,15 +251,15 @@ public class Connection implements MessageListener { boolean violated = false; //TODO remove serializable storage after network is tested stable if (messageTimeStamps.size() >= MSG_THROTTLE_PER_SEC) { - // check if we got more than 10 (MSG_THROTTLE_PER_SEC) msg per sec. + // check if we got more than 70 (MSG_THROTTLE_PER_SEC) msg per sec. long compareValue = messageTimeStamps.get(messageTimeStamps.size() - MSG_THROTTLE_PER_SEC).first; // if duration < 1 sec we received too much messages violated = now - compareValue < TimeUnit.SECONDS.toMillis(1); if (violated) { - log.error("violatesThrottleLimit 1 "); + log.error("violatesThrottleLimit MSG_THROTTLE_PER_SEC "); log.error("elapsed " + (now - compareValue)); log.error("messageTimeStamps: \n\t" + messageTimeStamps.stream() - .map(e -> "\n\tts=" + e.first.toString() + " message=" + e.second.toString()) + .map(e -> "\n\tts=" + e.first.toString() + " message=" + e.second.getClass().getName()) .collect(Collectors.toList()).toString()); } } @@ -272,10 +272,10 @@ public class Connection implements MessageListener { violated = now - compareValue < TimeUnit.SECONDS.toMillis(10); if (violated) { - log.error("violatesThrottleLimit 2 "); + log.error("violatesThrottleLimit MSG_THROTTLE_PER_10_SEC "); log.error("elapsed " + (now - compareValue)); log.error("messageTimeStamps: \n\t" + messageTimeStamps.stream() - .map(e -> "\n\tts=" + e.first.toString() + " message=" + e.second.toString()) + .map(e -> "\n\tts=" + e.first.toString() + " message=" + e.second.getClass().getName()) .collect(Collectors.toList()).toString()); } } From 117a65f913b21da19a97c763e91fcf184e49a8f3 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Mon, 25 Apr 2016 23:43:32 +0200 Subject: [PATCH 30/63] Change offerbook title --- .../io/bitsquare/gui/main/offer/offerbook/OfferBookView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookView.java index ad6037ac9a..71196b3e06 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/offerbook/OfferBookView.java @@ -272,7 +272,8 @@ public class OfferBookView extends ActivatableViewAndModel Date: Tue, 26 Apr 2016 00:56:05 +0200 Subject: [PATCH 31/63] Fix wrong fee calculation --- .../java/io/bitsquare/btc/WalletService.java | 105 ++++++++---------- 1 file changed, 48 insertions(+), 57 deletions(-) diff --git a/core/src/main/java/io/bitsquare/btc/WalletService.java b/core/src/main/java/io/bitsquare/btc/WalletService.java index c13956e582..dc52402fc0 100644 --- a/core/src/main/java/io/bitsquare/btc/WalletService.java +++ b/core/src/main/java/io/bitsquare/btc/WalletService.java @@ -39,10 +39,7 @@ import org.bitcoinj.kits.WalletAppKit; import org.bitcoinj.params.MainNetParams; import org.bitcoinj.params.RegTestParams; import org.bitcoinj.params.TestNet3Params; -import org.bitcoinj.script.Script; import org.bitcoinj.utils.Threading; -import org.bitcoinj.wallet.CoinSelection; -import org.bitcoinj.wallet.CoinSelector; import org.bitcoinj.wallet.DeterministicSeed; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; @@ -574,22 +571,24 @@ public class WalletService { public Coin getRequiredFee(String fromAddress, String toAddress, Coin amount, - AddressEntry.Context context) throws AddressFormatException, AddressEntryException { + AddressEntry.Context context) + throws AddressFormatException, AddressEntryException { Optional addressEntry = findAddressEntry(fromAddress, context); if (!addressEntry.isPresent()) throw new AddressEntryException("WithdrawFromAddress is not found in our wallet."); checkNotNull(addressEntry.get().getAddress(), "addressEntry.get().getAddress() must nto be null"); - CoinSelector selector = new TradeWalletCoinSelector(params, addressEntry.get().getAddress()); - return getFee(toAddress, + return getFee(fromAddress, + toAddress, amount, - selector); + context, + Coin.ZERO); } public Coin getRequiredFeeForMultipleAddresses(Set fromAddresses, String toAddress, - Coin amount) throws AddressFormatException, - AddressEntryException { + Coin amount) + throws AddressFormatException, AddressEntryException { Set addressEntries = fromAddresses.stream() .map(address -> { Optional addressEntryOptional = findAddressEntry(address, AddressEntry.Context.AVAILABLE); @@ -606,63 +605,55 @@ public class WalletService { .collect(Collectors.toSet()); if (addressEntries.isEmpty()) throw new AddressEntryException("No Addresses for withdraw found in our wallet"); - - CoinSelector selector = new MultiAddressesCoinSelector(params, addressEntries); - return getFee(toAddress, + return getFeeForMultipleAddresses(fromAddresses, + toAddress, amount, - selector); + Coin.ZERO); } - private Coin getFee(String toAddress, - Coin amount, - CoinSelector selector) throws AddressFormatException, AddressEntryException { - List candidates = wallet.calculateAllSpendCandidates(); - CoinSelection bestCoinSelection = selector.select(params.getMaxMoney(), candidates); - Transaction tx = new Transaction(params); - tx.addOutput(amount, new Address(params, toAddress)); - if (!adjustOutputDownwardsForFee(tx, bestCoinSelection, Coin.ZERO, FeePolicy.getNonTradeFeePerKb())) - throw new Wallet.CouldNotAdjustDownwards(); - Coin fee = amount.subtract(tx.getOutput(0).getValue()); - log.info("Required fee " + fee); + private Coin getFee(String fromAddress, + String toAddress, + Coin amount, + AddressEntry.Context context, + Coin fee) throws AddressEntryException, AddressFormatException { + try { + wallet.completeTx(getSendRequest(fromAddress, toAddress, amount, null, context)); + } catch (InsufficientMoneyException e) { + if (e.missing != null) { + log.trace("missing fee " + e.missing.toFriendlyString()); + fee = fee.add(e.missing); + amount = amount.subtract(fee); + return getFee(fromAddress, + toAddress, + amount, + context, + fee); + } + } + log.trace("result fee " + fee.toFriendlyString()); return fee; } - private boolean adjustOutputDownwardsForFee(Transaction tx, CoinSelection coinSelection, Coin baseFee, Coin feePerKb) { - TransactionOutput output = tx.getOutput(0); - // Check if we need additional fee due to the transaction's size - int size = tx.bitcoinSerialize().length; - size += estimateBytesForSigning(coinSelection); - Coin fee = baseFee.add(feePerKb.multiply((size / 1000) + 1)); - output.setValue(output.getValue().subtract(fee)); - // Check if we need additional fee due to the output's value - if (output.getValue().compareTo(Coin.CENT) < 0 && fee.compareTo(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE) < 0) - output.setValue(output.getValue().subtract(Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.subtract(fee))); - return output.getMinNonDustValue().compareTo(output.getValue()) <= 0; - } - - private int estimateBytesForSigning(CoinSelection selection) { - int size = 0; - for (TransactionOutput output : selection.gathered) { - try { - Script script = output.getScriptPubKey(); - ECKey key = null; - Script redeemScript = null; - if (script.isSentToAddress()) { - key = wallet.findKeyFromPubHash(script.getPubKeyHash()); - checkNotNull(key, "Coin selection includes unspendable outputs"); - } else if (script.isPayToScriptHash()) { - redeemScript = wallet.findRedeemDataFromScriptHash(script.getPubKeyHash()).redeemScript; - checkNotNull(redeemScript, "Coin selection includes unspendable outputs"); - } - size += script.getNumberOfBytesRequiredToSpend(key, redeemScript); - } catch (ScriptException e) { - // If this happens it means an output script in a wallet tx could not be understood. That should never - // happen, if it does it means the wallet has got into an inconsistent state. - throw new IllegalStateException(e); + private Coin getFeeForMultipleAddresses(Set fromAddresses, + String toAddress, + Coin amount, + Coin fee) throws AddressEntryException, AddressFormatException { + try { + wallet.completeTx(getSendRequestForMultipleAddresses(fromAddresses, toAddress, amount, null, null)); + } catch (InsufficientMoneyException e) { + if (e.missing != null) { + log.trace("missing fee " + e.missing.toFriendlyString()); + fee = fee.add(e.missing); + amount = amount.subtract(fee); + return getFeeForMultipleAddresses(fromAddresses, + toAddress, + amount, + fee); } } - return size; + log.trace("result fee " + fee.toFriendlyString()); + return fee; } From d4304428609e2f6955fb441997d666d4a5707c27 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 01:13:41 +0200 Subject: [PATCH 32/63] Fix bug with wrong fee calculation --- .../main/funds/withdrawal/WithdrawalView.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java index 8f08b87c93..f83bdf928f 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java @@ -87,6 +87,7 @@ public class WithdrawalView extends ActivatableView { private Set selectedItems = new HashSet<>(); private BalanceListener balanceListener; private Set fromAddresses; + private Coin amountOfSelectedItems; /////////////////////////////////////////////////////////////////////////////////////////// @@ -186,8 +187,11 @@ public class WithdrawalView extends ActivatableView { } }; try { + // We need to use the max. amount (amountOfSelectedItems) as the senderAmount might be less then + // we have available and then the fee calculation would return 0 + // TODO Get a proper fee calculation from BitcoinJ directly Coin requiredFee = walletService.getRequiredFeeForMultipleAddresses(fromAddresses, - withdrawToTextField.getText(), senderAmount); + withdrawToTextField.getText(), amountOfSelectedItems); Coin receiverAmount = senderAmount.subtract(requiredFee); if (BitsquareApp.DEV_MODE) { doWithdraw(receiverAmount, callback); @@ -227,9 +231,9 @@ public class WithdrawalView extends ActivatableView { .collect(Collectors.toSet()); if (!selectedItems.isEmpty()) { - Coin sum = Coin.valueOf(selectedItems.stream().mapToLong(e -> e.getBalance().getValue()).sum()); - if (sum.isPositive()) { - amountTextField.setText(formatter.formatCoin(sum)); + amountOfSelectedItems = Coin.valueOf(selectedItems.stream().mapToLong(e -> e.getBalance().getValue()).sum()); + if (amountOfSelectedItems.isPositive()) { + amountTextField.setText(formatter.formatCoin(amountOfSelectedItems)); } else { amountTextField.setText(""); withdrawFromTextField.setText(""); @@ -338,9 +342,14 @@ public class WithdrawalView extends ActivatableView { } private boolean areInputsValid() { - return btcAddressValidator.validate(withdrawToTextField.getText()).isValid && - amountTextField.getText().length() > 0 && - Restrictions.isAboveFixedTxFeeAndDust(formatter.parseToCoin(amountTextField.getText())); + if (amountTextField.getText().length() > 0) { + Coin amount = formatter.parseToCoin(amountTextField.getText()); + return btcAddressValidator.validate(withdrawToTextField.getText()).isValid && + amount.compareTo(amountOfSelectedItems) <= 0 && + Restrictions.isAboveFixedTxFeeAndDust(amount); + } else { + return false; + } } From 029eef09aba8ac90ecef4a43b587034c234bd7d1 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 17:20:47 +0200 Subject: [PATCH 33/63] Removed unused getter --- core/src/main/java/io/bitsquare/btc/FeePolicy.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/main/java/io/bitsquare/btc/FeePolicy.java b/core/src/main/java/io/bitsquare/btc/FeePolicy.java index 57eccee178..3fcfc93752 100644 --- a/core/src/main/java/io/bitsquare/btc/FeePolicy.java +++ b/core/src/main/java/io/bitsquare/btc/FeePolicy.java @@ -60,16 +60,6 @@ public class FeePolicy { return NON_TRADE_FEE_PER_KB; } - // Some wallets don't support manual fees. Most use at least 0.0001 BTC (0.04 EUR @ 400 EUR/BTC) - // To avoid rejecting deposit tx with too low mining fees we reduce the min. - // required fee to 0.0001 BTC. There is a risk that the tx does not get fast into the blockchain but it seems it has less - // negative consequences as forcing the user to set a sufficiently high fee which is impossible in some wallets - // like in the old MultiBit wallet or Coinbase. Unfortunately there is no perfect solution for that problem. - public static Coin getMinRequiredFeeForFundingTx() { - return Coin.valueOf(10_000); - } - - // 0.0005 BTC 0.05% of 1 BTC about 0.2 EUR @ 400 EUR/BTC public static Coin getCreateOfferFee() { // We need to pay the quite high miner fee of 30_000 from the trading fee tx so 30_000 us our lower limit From 4e0942818012c91e3c199c8fd1f1e0e6f13f7fb5 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 17:29:11 +0200 Subject: [PATCH 34/63] Beta version 0.4.4 --- common/pom.xml | 2 +- common/src/main/java/io/bitsquare/app/Version.java | 2 +- core/pom.xml | 2 +- gui/pom.xml | 2 +- jsocks/pom.xml | 2 +- jtorctl/pom.xml | 2 +- jtorproxy/pom.xml | 2 +- network/pom.xml | 2 +- package/linux/create_32bit_app.sh | 2 +- package/linux/create_64bit_app.sh | 2 +- package/mac/collect_files.sh | 6 +++--- package/mac/create_app.sh | 4 ++-- package/windows/Bitsquare.iss | 2 +- package/windows/create_32bit_app.bat | 6 +++--- package/windows/create_64bit_app.bat | 6 +++--- pom.xml | 2 +- seednode/pom.xml | 2 +- 17 files changed, 24 insertions(+), 24 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index 83d1dc6201..9fab13d4ad 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index 3e6bdf4dfb..044c43ee54 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -24,7 +24,7 @@ public class Version { private static final Logger log = LoggerFactory.getLogger(Version.class); // The application versions - public static final String VERSION = "0.4.3"; + public static final String VERSION = "0.4.4"; // The version nr. for the objects sent over the network. A change will break the serialization of old objects. // If objects are used for both network and database the network version is applied. diff --git a/core/pom.xml b/core/pom.xml index 6ce292acb6..8aa30bf22f 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 core diff --git a/gui/pom.xml b/gui/pom.xml index 74df9d3137..a8df94bef4 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -22,7 +22,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/jsocks/pom.xml b/jsocks/pom.xml index 5c4a44825d..e26a610741 100644 --- a/jsocks/pom.xml +++ b/jsocks/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/jtorctl/pom.xml b/jtorctl/pom.xml index 3133256d94..91f94d64e1 100644 --- a/jtorctl/pom.xml +++ b/jtorctl/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/jtorproxy/pom.xml b/jtorproxy/pom.xml index 4f108e79c0..7c85388a13 100644 --- a/jtorproxy/pom.xml +++ b/jtorproxy/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/network/pom.xml b/network/pom.xml index 8bb4a3d381..71aaaabc22 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 diff --git a/package/linux/create_32bit_app.sh b/package/linux/create_32bit_app.sh index d0455db527..1c89f6b6d5 100644 --- a/package/linux/create_32bit_app.sh +++ b/package/linux/create_32bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.3 +fullVersion=0.4.4 jarFile="/home/bitsquare/Desktop/sf_vm_shared_ubuntu14_32bit/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/linux/create_64bit_app.sh b/package/linux/create_64bit_app.sh index 68e166db58..42715fbceb 100644 --- a/package/linux/create_64bit_app.sh +++ b/package/linux/create_64bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.3 +fullVersion=0.4.4 jarFile="/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/mac/collect_files.sh b/package/mac/collect_files.sh index ab0369dca6..24a043028c 100644 --- a/package/mac/collect_files.sh +++ b/package/mac/collect_files.sh @@ -1,11 +1,11 @@ #!/bin/bash -version="0.4.3" +version="0.4.4" target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/bundles/Bitsquare-0.4.3.dmg" "$target_dir/Bitsquare-0.4.3.dmg " -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.3.jar" "$target_dir/SeedNode-0.4.3.jar" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/bundles/Bitsquare-0.4.4.dmg" "$target_dir/Bitsquare-0.4.4.dmg " +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.4.jar" "$target_dir/SeedNode-0.4.4.jar" linux32="Bitsquare-32bit-$version.deb" diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 0265c41d2f..7a21f93354 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -5,7 +5,7 @@ mkdir -p gui/deploy set -e -fullVersion="0.4.3" +fullVersion="0.4.4" mvn clean package -DskipTests -Dmaven.javadoc.skip=true @@ -40,7 +40,7 @@ rm "gui/deploy/Bitsquare.jnlp" mv "gui/deploy/bundles/Bitsquare-$fullVersion.dmg" "gui/deploy/Bitsquare-$fullVersion.dmg" rm "gui/deploy/bundles" -mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-0.4.3.jar" +mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-0.4.4.jar" cd package/mac \ No newline at end of file diff --git a/package/windows/Bitsquare.iss b/package/windows/Bitsquare.iss index b3d3c58026..355a91ec02 100755 --- a/package/windows/Bitsquare.iss +++ b/package/windows/Bitsquare.iss @@ -3,7 +3,7 @@ [Setup] AppId={{bitsquare}} AppName=Bitsquare -AppVersion=0.4.3 +AppVersion=0.4.4 AppVerName=Bitsquare AppPublisher=Bitsquare AppComments=Bitsquare diff --git a/package/windows/create_32bit_app.bat b/package/windows/create_32bit_app.bat index 12b9d9b619..9b324fe9e1 100644 --- a/package/windows/create_32bit_app.bat +++ b/package/windows/create_32bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.3 +:: edit iss file -> AppVersion=0.4.4 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.3 and -srcfiles +:: edit -> -BappVersion=0.4.4 and -srcfiles :: 32 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.4 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.4.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/package/windows/create_64bit_app.bat b/package/windows/create_64bit_app.bat index 9b4d027d14..27065ca52c 100644 --- a/package/windows/create_64bit_app.bat +++ b/package/windows/create_64bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.3 +:: edit iss file -> AppVersion=0.4.4 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.3 and -srcfiles +:: edit -> -BappVersion=0.4.4 and -srcfiles :: 64 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.3 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.3.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.4 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.4.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2c3687d21b..f9c37595fc 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.bitsquare parent pom - 0.4.3 + 0.4.4 Bitsquare - The decentralized bitcoin exchange https://bitsquare.io diff --git a/seednode/pom.xml b/seednode/pom.xml index 45907dbd29..6ce3e5ee34 100644 --- a/seednode/pom.xml +++ b/seednode/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.3 + 0.4.4 4.0.0 From 2c25c69bebefdcb9212ff41eab17fc6529602efd Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 17:33:06 +0200 Subject: [PATCH 35/63] Remove instable seed node --- .../main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java index 4bc4f30857..a8b712dafe 100644 --- a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java +++ b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java @@ -35,7 +35,7 @@ public class SeedNodesRepository { new NodeAddress("uadzuib66jupaept.onion:8000"), new NodeAddress("hbma455xxbqhcuqh.onion:8000"), new NodeAddress("wgthuiqn3aoiovbm.onion:8000"), - new NodeAddress("2zxtnprnx5wqr7a3.onion:8000"), + //new NodeAddress("2zxtnprnx5wqr7a3.onion:8000"), // testnet new NodeAddress("znmy44wcstn2rkva.onion:8001"), From ecd5626f1aa46b1e42662a94a75ae6b3496ba911 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 17:38:30 +0200 Subject: [PATCH 36/63] Update with min required jvm 1.8.0_66 instead of 1.8.0_40 --- doc/build.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/build.md b/doc/build.md index 3042339552..82cc1f8da0 100644 --- a/doc/build.md +++ b/doc/build.md @@ -12,7 +12,7 @@ For the impatient What follows is explained in detail in the sections below, but for those who know their way around Java, git and Maven, here are the instructions in a nutshell: $ javac -version - javac 1.8.0_40 # must be 1.8.0_40 or better + javac 1.8.0_66 # must be 1.8.0_66 or better $ git clone https://github.com/bitsquare/bitcoinj.git $ cd bitcoinj @@ -37,9 +37,9 @@ In Debian/Ubuntu systems with OpenJDK you'll need OpenJFX as well, i.e. you'll n ##### 1. Check the version of Java you currently have installed $ javac -version - javac 1.8.0_40 + javac 1.8.0_66 -If `javac` is not found, or your version is anything less than `1.8.0_40`, then you'll need to [download and install the latest JDK]( http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) for your platform. +If `javac` is not found, or your version is anything less than `1.8.0_66`, then you'll need to [download and install the latest JDK]( http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) for your platform. > _**TIP:** Here are [instructions](http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html) for installing the JDK via `apt` on Debian/Ubuntu systems. > Bitsquare can be built with OpenJDK as well, but this hasn't been thoroughly tested yet._ From d41315146b9b0e1ec67b9fa79e25e5fb8d7a47cf Mon Sep 17 00:00:00 2001 From: Codes4Fun Date: Tue, 26 Apr 2016 10:51:40 -0700 Subject: [PATCH 37/63] Typo fix. --- .../java/io/bitsquare/gui/main/overlays/windows/TacWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b5d886199b..22120d6be6 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 @@ -31,7 +31,7 @@ public class TacWindow extends Overlay { "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. Don't use Bitsquare if the usage of Bitcoin is not legal in your jurisdiction.\n\n" + "3. Bitcoin market price is delivered by 3rd parties (BitcoinAverage, Poloniex). It is your responsibility to double check the price with other sources.\n\n" + - "4. The user confirms that he has read and agreed to the rules regrading the dispute process:\n" + + "4. The user confirms that he has read and agreed to the rules regarding the dispute process:\n" + " - You must finalize trades within the maximum duration specified for each payment method.\n" + " - You must enter the trade ID in the \"reason for payment\" text field when doing the fiat payment transfer.\n" + " - If the bank of the fiat sender charges fees the sender (bitcoin buyer) has to cover the fees.\n" + From ae85d4e3a75891fbf6a1c2f7580ff26fcd0cc014 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 20:53:11 +0200 Subject: [PATCH 38/63] Add new seed node --- .../main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java index a8b712dafe..4bc4f30857 100644 --- a/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java +++ b/network/src/main/java/io/bitsquare/p2p/seed/SeedNodesRepository.java @@ -35,7 +35,7 @@ public class SeedNodesRepository { new NodeAddress("uadzuib66jupaept.onion:8000"), new NodeAddress("hbma455xxbqhcuqh.onion:8000"), new NodeAddress("wgthuiqn3aoiovbm.onion:8000"), - //new NodeAddress("2zxtnprnx5wqr7a3.onion:8000"), + new NodeAddress("2zxtnprnx5wqr7a3.onion:8000"), // testnet new NodeAddress("znmy44wcstn2rkva.onion:8001"), From 96764394bdc02f60d8431ff87055ba141221602f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Apr 2016 21:34:03 +0200 Subject: [PATCH 39/63] Fix display for update popup --- core/src/main/java/io/bitsquare/alert/Alert.java | 6 ++++++ .../main/java/io/bitsquare/gui/main/MainViewModel.java | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/io/bitsquare/alert/Alert.java b/core/src/main/java/io/bitsquare/alert/Alert.java index 8a44c1974c..a6cb079a9d 100644 --- a/core/src/main/java/io/bitsquare/alert/Alert.java +++ b/core/src/main/java/io/bitsquare/alert/Alert.java @@ -67,6 +67,12 @@ public final class Alert implements StoragePayload { return signatureAsBase64; } + public boolean isNewVersion() { + int versionNum = Integer.valueOf(Version.VERSION.replace(".", "")); + int alertVersionNum = Integer.valueOf(version.replace(".", "")); + return versionNum < alertVersionNum; + } + @Override public long getTTL() { return TTL; diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java index 9ebf26d9de..f5c4821d07 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java @@ -823,11 +823,10 @@ public class MainViewModel implements ViewModel { private void displayAlertIfPresent(Alert alert) { boolean alreadyDisplayed = alert != null && alert.equals(user.getDisplayedAlert()); user.setDisplayedAlert(alert); - - if (alert != null && !alreadyDisplayed) { - if (!alert.isUpdateInfo || !alert.version.equals(Version.VERSION)) - new DisplayAlertMessageWindow().alertMessage(alert).show(); - } + if (alert != null && + !alreadyDisplayed && + (!alert.isUpdateInfo || alert.isNewVersion())) + new DisplayAlertMessageWindow().alertMessage(alert).show(); } private void swapPendingOfferFundingEntries() { From 9a3b16fc361283a35f6c7d0f773a64a0218039b8 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 27 Apr 2016 00:33:22 +0200 Subject: [PATCH 40/63] Add script for signing --- package/mac/collect_files.sh | 22 ---------------- package/mac/create_app.sh | 4 +-- package/mac/finalize.sh | 50 ++++++++++++++++++++++++++++++++++++ package/mac/hashes.template | 5 ++++ 4 files changed, 57 insertions(+), 24 deletions(-) delete mode 100644 package/mac/collect_files.sh create mode 100644 package/mac/finalize.sh create mode 100644 package/mac/hashes.template diff --git a/package/mac/collect_files.sh b/package/mac/collect_files.sh deleted file mode 100644 index 24a043028c..0000000000 --- a/package/mac/collect_files.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -version="0.4.4" - -target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" - -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/bundles/Bitsquare-0.4.4.dmg" "$target_dir/Bitsquare-0.4.4.dmg " -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.4.jar" "$target_dir/SeedNode-0.4.4.jar" - - -linux32="Bitsquare-32bit-$version.deb" -cp "/Users/mk/vm_shared_ubuntu14_32bit/$linux32" "$target_dir/$linux32 " - -linux64="Bitsquare-64bit-$version.deb" -cp "/Users/mk/vm_shared_ubuntu/$linux64" "$target_dir/$linux64" - -exe="Bitsquare.exe" -cp "/Users/mk/vm_shared_windows_32bit/bundles/$exe" "$target_dir/Bitsquare-32bit-$version.exe" -cp "/Users/mk/vm_shared_windows/bundles/$exe" "$target_dir/Bitsquare-64bit-$version.exe" -cp "/Users/mk/vm_shared_windows/bundles/$exe" "/Users/mk/vm_shared_win10/Bitsquare-64bit-$version.exe" - -open "$target_dir" \ No newline at end of file diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 7a21f93354..878ec30f9e 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -38,9 +38,9 @@ rm "gui/deploy/Bitsquare.html" rm "gui/deploy/Bitsquare.jnlp" mv "gui/deploy/bundles/Bitsquare-$fullVersion.dmg" "gui/deploy/Bitsquare-$fullVersion.dmg" -rm "gui/deploy/bundles" +rm -r "gui/deploy/bundles" -mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-0.4.4.jar" +mv "gui/deploy/SeedNode.jar" "gui/deploy/SeedNode-$fullVersion.jar" cd package/mac \ No newline at end of file diff --git a/package/mac/finalize.sh b/package/mac/finalize.sh new file mode 100644 index 0000000000..cc93b83670 --- /dev/null +++ b/package/mac/finalize.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +version="0.4.4" + +target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" + +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/Bitsquare-0.4.4.dmg" "$target_dir/Bitsquare-0.4.4.dmg" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.4.jar" "$target_dir/SeedNode-0.4.4.jar" + +linux32="Bitsquare-32bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu14_32bit/$linux32" "$target_dir/$linux32" + +linux64="Bitsquare-64bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu/$linux64" "$target_dir/$linux64" + +exe="Bitsquare.exe" +cp "/Users/mk/vm_shared_windows_32bit/bundles/$exe" "$target_dir/Bitsquare-32bit-$version.exe" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "$target_dir/Bitsquare-64bit-$version.exe" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "/Users/mk/vm_shared_win10/Bitsquare-64bit-$version.exe" + +cp "hashes.template" "$target_dir/hashes.template" +cd "$target_dir" + +MAC="Bitsquare-$version.dmg" +HASH_MAC="$(shasum -a 256 $MAC)" + +DEB_64="Bitsquare-64bit-$version.deb" +HASH_DEB_64="$(shasum -a 256 $DEB_64)" + +DEB_64="Bitsquare-64bit-$version.deb" +HASH_DEB_64="$(shasum -a 256 $DEB_64)" + +DEB_32="Bitsquare-32bit-$version.deb" +HASH_DEB_32="$(shasum -a 256 $DEB_32)" + +WIN_64="Bitsquare-64bit-$version.exe" +HASH_WIN_64="$(shasum -a 256 $WIN_64)" + +WIN_32="Bitsquare-32bit-$version.exe" +HASH_WIN_32="$(shasum -a 256 $WIN_32)" + +sed -e "s|HASH_MAC|$HASH_MAC|" -e "s|HASH_DEB_64|$HASH_DEB_64|" -e "s|HASH_DEB_32|$HASH_DEB_32|" -e "s|HASH_WIN_64|$HASH_WIN_64|" -e "s|HASH_WIN_32|$HASH_WIN_32|" hashes.template > hashes.txt + +gpg --local-user manfred@bitsquare.io --output signed_hashes.txt --clearsign hashes.txt +gpg --verify signed_hashes.txt + +rm "$target_dir/hashes.template" +rm "$target_dir/hashes.txt" + +open "$target_dir" \ No newline at end of file diff --git a/package/mac/hashes.template b/package/mac/hashes.template new file mode 100644 index 0000000000..71d008a064 --- /dev/null +++ b/package/mac/hashes.template @@ -0,0 +1,5 @@ +HASH_MAC +HASH_DEB_64 +HASH_DEB_32 +HASH_WIN_64 +HASH_WIN_32 \ No newline at end of file From 143594614e7196334d6fcb032e4d80bf003af79b Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Thu, 28 Apr 2016 12:22:44 +0200 Subject: [PATCH 41/63] now in beta, not alpha --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3eb1cd739a..a570481a06 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You can read about all of this and more in the [whitepaper](https://bitsquare.io Status ------ -The software is Alpha version and still under heavy development. +Bitsquare is currently in beta and is still under heavy development. For the latest version checkout our [releases page](https://github.com/bitsquare/bitsquare/releases) at Github. Building from source From f0d97769c165d50baf79d7fd196f3999a652fb33 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 12:28:46 +0200 Subject: [PATCH 42/63] Update text regarding beta version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a570481a06..4b207a704f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You can read about all of this and more in the [whitepaper](https://bitsquare.io Status ------ -Bitsquare is currently in beta and is still under heavy development. +Bitsquare has releases the beta version on the 27th of April 2016 after 3 months testing on mainnet. For the latest version checkout our [releases page](https://github.com/bitsquare/bitsquare/releases) at Github. Building from source From 14878a7cf06e6300fbc0583c8d537c4051045223 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 17:18:00 +0200 Subject: [PATCH 43/63] Change Anti.cash to Anti, add comment --- .../io/bitsquare/locale/CurrencyUtil.java | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index f064861624..896a68b2d1 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -68,22 +68,8 @@ public class CurrencyUtil { return allSortedCryptoCurrencies; } - public static List getMainCryptoCurrencies() { - final List result = new ArrayList<>(); - result.add(new CryptoCurrency("ETH", "Ethereum")); - result.add(new CryptoCurrency("LTC", "Litecoin")); - result.add(new CryptoCurrency("DASH", "Dash")); - result.add(new CryptoCurrency("SDC", "ShadowCash")); - result.add(new CryptoCurrency("NMC", "Namecoin")); - result.add(new CryptoCurrency("NBT", "NuBits")); - result.add(new CryptoCurrency("SC", "Siacoin")); - result.add(new CryptoCurrency("FAIR", "FairCoin")); - result.add(new CryptoCurrency("DOGE", "Dogecoin")); - result.add(new CryptoCurrency("NXT", "Nxt")); - result.add(new CryptoCurrency("BTS", "BitShares")); - return result; - } - + // Don't make a PR for adding a coin but follow the steps described here: + // https://forum.bitsquare.io/t/how-to-add-your-favorite-altcoin/ public static List createAllSortedCryptoCurrenciesList() { final List result = new ArrayList<>(); result.add(new CryptoCurrency("ETH", "Ethereum")); @@ -107,7 +93,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("XCP", "Counterparty")); result.add(new CryptoCurrency("XRP", "Ripple")); result.add(new CryptoCurrency("XEM", "NEM")); - result.add(new CryptoCurrency("ANTI", "Anti.cash")); + result.add(new CryptoCurrency("ANTI", "Anti")); result.add(new CryptoCurrency("VPN", "VPNCoin")); result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); result.add(new CryptoCurrency("YBC", "YbCoin")); @@ -117,12 +103,28 @@ public class CurrencyUtil { result.add(new CryptoCurrency("ESP", "Espers")); result.add(new CryptoCurrency("XVG", "Verge")); result.add(new CryptoCurrency("MYR", "Myriadcoin")); - + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; } + public static List getMainCryptoCurrencies() { + final List result = new ArrayList<>(); + result.add(new CryptoCurrency("ETH", "Ethereum")); + result.add(new CryptoCurrency("LTC", "Litecoin")); + result.add(new CryptoCurrency("DASH", "Dash")); + result.add(new CryptoCurrency("SDC", "ShadowCash")); + result.add(new CryptoCurrency("NMC", "Namecoin")); + result.add(new CryptoCurrency("NBT", "NuBits")); + result.add(new CryptoCurrency("SC", "Siacoin")); + result.add(new CryptoCurrency("FAIR", "FairCoin")); + result.add(new CryptoCurrency("DOGE", "Dogecoin")); + result.add(new CryptoCurrency("NXT", "Nxt")); + result.add(new CryptoCurrency("BTS", "BitShares")); + return result; + } + /** * @return Sorted list of SEPA currencies with EUR as first item From 2f2501055b1439dfb9d7554d272234bc7995685a Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 17:42:16 +0200 Subject: [PATCH 44/63] Added MarteXcoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 896a68b2d1..cd1f71c4db 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -103,7 +103,8 @@ public class CurrencyUtil { result.add(new CryptoCurrency("ESP", "Espers")); result.add(new CryptoCurrency("XVG", "Verge")); result.add(new CryptoCurrency("MYR", "Myriadcoin")); - + result.add(new CryptoCurrency("MXT", "MarteXcoin")); + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; From d720a9c56f444f37946d24cd5dae8d64d78241a4 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 17:43:32 +0200 Subject: [PATCH 45/63] Added Groestlcoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index cd1f71c4db..2008143614 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -104,6 +104,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("XVG", "Verge")); result.add(new CryptoCurrency("MYR", "Myriadcoin")); result.add(new CryptoCurrency("MXT", "MarteXcoin")); + result.add(new CryptoCurrency("GRS", "Groestlcoin")); // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); From 8eddc08cd0186390515176ff412fa8dfd788193f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 18:17:06 +0200 Subject: [PATCH 46/63] Added I/O Coin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 2008143614..d1b4668642 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -105,7 +105,8 @@ public class CurrencyUtil { result.add(new CryptoCurrency("MYR", "Myriadcoin")); result.add(new CryptoCurrency("MXT", "MarteXcoin")); result.add(new CryptoCurrency("GRS", "Groestlcoin")); - + result.add(new CryptoCurrency("IOC", "I/O Coin")); + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; From a38fb9d21cc4b78608c188bfa8382b8a23fbf091 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 18:56:14 +0200 Subject: [PATCH 47/63] Add popup for stat. info --- .../funds/transactions/TransactionsView.java | 47 +++++++++++++++++-- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.java index 4e2421e8b7..9015b79f59 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsView.java @@ -41,17 +41,21 @@ import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; +import javafx.event.EventHandler; import javafx.fxml.FXML; +import javafx.scene.Scene; import javafx.scene.control.*; +import javafx.scene.input.KeyCode; +import javafx.scene.input.KeyCodeCombination; +import javafx.scene.input.KeyCombination; +import javafx.scene.input.KeyEvent; import javafx.scene.layout.VBox; import javafx.util.Callback; import org.bitcoinj.core.*; import org.bitcoinj.script.Script; import javax.inject.Inject; -import java.util.List; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -77,7 +81,8 @@ public class TransactionsView extends ActivatableView { private final DisputeManager disputeManager; private final OfferDetailsWindow offerDetailsWindow; private WalletEventListener walletEventListener; - + private EventHandler keyEventEventHandler; + private Scene scene; /////////////////////////////////////////////////////////////////////////////////////////// // Constructor, lifecycle @@ -164,6 +169,33 @@ public class TransactionsView extends ActivatableView { updateList(); } }; + + keyEventEventHandler = event -> { + if (new KeyCodeCombination(KeyCode.A, KeyCombination.SHORTCUT_DOWN).match(event)) { + Map> map = new HashMap<>(); + observableList.stream().forEach(item -> { + Coin amountAsCoin = item.getAmountAsCoin(); + List list; + long key = amountAsCoin.getValue(); + if (!map.containsKey(key)) { + list = new ArrayList<>(); + map.put(key, list); + } else { + list = map.get(key); + } + list.add(amountAsCoin); + }); + StringBuilder stringBuilder = new StringBuilder(); + map.entrySet().stream().forEach(e -> { + stringBuilder.append("Nr. of transactions for amount "). + append(formatter.formatCoinWithCode(Coin.valueOf(e.getKey()))). + append(": "). + append(e.getValue().size()). + append("\n"); + }); + new Popup().headLine("Statistical info").information(stringBuilder.toString()).show(); + } + }; } @Override @@ -173,6 +205,10 @@ public class TransactionsView extends ActivatableView { updateList(); walletService.getWallet().addEventListener(walletEventListener); + + scene = root.getScene(); + if (scene != null) + scene.addEventHandler(KeyEvent.KEY_RELEASED, keyEventEventHandler); } @Override @@ -180,6 +216,9 @@ public class TransactionsView extends ActivatableView { sortedList.comparatorProperty().unbind(); observableList.forEach(TransactionsListItem::cleanup); walletService.getWallet().removeEventListener(walletEventListener); + + if (scene != null) + scene.removeEventHandler(KeyEvent.KEY_RELEASED, keyEventEventHandler); } From 24cc6800e76f533423b81e38e66adb41210a9c10 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 18:58:14 +0200 Subject: [PATCH 48/63] Bugfix with withdrawal, display exact bitcoin value without rounding --- .../java/io/bitsquare/btc/Restrictions.java | 2 +- .../io/bitsquare/btc/TradeWalletService.java | 2 +- .../java/io/bitsquare/btc/WalletService.java | 4 +- .../io/bitsquare/btc/RestrictionsTest.java | 12 +- .../java/io/bitsquare/app/BitsquareApp.java | 4 +- .../java/io/bitsquare/gui/main/MainView.java | 4 +- .../gui/main/funds/deposit/DepositView.java | 2 +- .../main/funds/withdrawal/WithdrawalView.java | 118 ++++++++++++------ .../steps/buyer/BuyerStep5View.java | 2 +- .../io/bitsquare/gui/util/BSFormatter.java | 4 +- 10 files changed, 99 insertions(+), 55 deletions(-) diff --git a/core/src/main/java/io/bitsquare/btc/Restrictions.java b/core/src/main/java/io/bitsquare/btc/Restrictions.java index 69fedb07e3..d3805d1066 100644 --- a/core/src/main/java/io/bitsquare/btc/Restrictions.java +++ b/core/src/main/java/io/bitsquare/btc/Restrictions.java @@ -24,7 +24,7 @@ public class Restrictions { public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.0001"); // 4 cent @ 400 EUR/BTC - public static boolean isAboveFixedTxFeeAndDust(Coin amount) { + public static boolean isAboveFixedTxFeeForTradesAndDust(Coin amount) { return amount != null && amount.compareTo(FeePolicy.getFixedTxFeeForTrades().add(Transaction.MIN_NONDUST_OUTPUT)) > 0; } diff --git a/core/src/main/java/io/bitsquare/btc/TradeWalletService.java b/core/src/main/java/io/bitsquare/btc/TradeWalletService.java index e838f58ea3..1c48f983b3 100644 --- a/core/src/main/java/io/bitsquare/btc/TradeWalletService.java +++ b/core/src/main/java/io/bitsquare/btc/TradeWalletService.java @@ -145,7 +145,7 @@ public class TradeWalletService { boolean useSavingsWallet, Coin tradingFee, String feeReceiverAddresses) throws InsufficientMoneyException, AddressFormatException { Transaction tradingFeeTx = new Transaction(params); - Preconditions.checkArgument(Restrictions.isAboveFixedTxFeeAndDust(tradingFee), + Preconditions.checkArgument(Restrictions.isAboveFixedTxFeeForTradesAndDust(tradingFee), "You cannot send an amount which are smaller than the fee + dust output."); Coin outPutAmount = tradingFee.subtract(FeePolicy.getFixedTxFeeForTrades()); tradingFeeTx.addOutput(outPutAmount, new Address(params, feeReceiverAddresses)); diff --git a/core/src/main/java/io/bitsquare/btc/WalletService.java b/core/src/main/java/io/bitsquare/btc/WalletService.java index dc52402fc0..bdbbc1c406 100644 --- a/core/src/main/java/io/bitsquare/btc/WalletService.java +++ b/core/src/main/java/io/bitsquare/btc/WalletService.java @@ -717,7 +717,7 @@ public class WalletService { AddressEntryException, InsufficientMoneyException { Transaction tx = new Transaction(params); Preconditions.checkArgument(Restrictions.isAboveDust(amount), - "You cannot send an amount which are smaller than 546 satoshis."); + "The amount is too low (dust limit)."); tx.addOutput(amount, new Address(params, toAddress)); Wallet.SendRequest sendRequest = Wallet.SendRequest.forTx(tx); @@ -742,7 +742,7 @@ public class WalletService { AddressFormatException, AddressEntryException, InsufficientMoneyException { Transaction tx = new Transaction(params); Preconditions.checkArgument(Restrictions.isAboveDust(amount), - "You cannot send an amount which are smaller than 546 satoshis."); + "The amount is too low (dust limit)."); tx.addOutput(amount, new Address(params, toAddress)); Wallet.SendRequest sendRequest = Wallet.SendRequest.forTx(tx); diff --git a/core/src/test/java/io/bitsquare/btc/RestrictionsTest.java b/core/src/test/java/io/bitsquare/btc/RestrictionsTest.java index 7b42b4df24..6d77e06947 100644 --- a/core/src/test/java/io/bitsquare/btc/RestrictionsTest.java +++ b/core/src/test/java/io/bitsquare/btc/RestrictionsTest.java @@ -28,21 +28,21 @@ public class RestrictionsTest { @Test public void testIsMinSpendableAmount() { Coin amount = null; - assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); amount = Coin.ZERO; - assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); amount = FeePolicy.getFixedTxFeeForTrades(); - assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); amount = Transaction.MIN_NONDUST_OUTPUT; - assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); amount = FeePolicy.getFixedTxFeeForTrades().add(Transaction.MIN_NONDUST_OUTPUT); - assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertFalse("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); amount = FeePolicy.getFixedTxFeeForTrades().add(Transaction.MIN_NONDUST_OUTPUT).add(Coin.valueOf(1)); - assertTrue("tx unfunded, pending", Restrictions.isAboveFixedTxFeeAndDust(amount)); + assertTrue("tx unfunded, pending", Restrictions.isAboveFixedTxFeeForTradesAndDust(amount)); } } diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index 9d66890774..034867677d 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -161,7 +161,7 @@ public class BitsquareApp extends Application { mainView.setPersistedFilesCorrupted(corruptedDatabaseFiles); });*/ - scene = new Scene(mainView.getRoot(), 1150, 740); + scene = new Scene(mainView.getRoot(), 1190, 740); scene.getStylesheets().setAll( "/io/bitsquare/gui/bitsquare.css", "/io/bitsquare/gui/images.css"); @@ -193,7 +193,7 @@ public class BitsquareApp extends Application { // configure the primary stage primaryStage.setTitle(env.getRequiredProperty(APP_NAME_KEY)); primaryStage.setScene(scene); - primaryStage.setMinWidth(1130); + primaryStage.setMinWidth(1170); primaryStage.setMinHeight(620); // on windows the title icon is also used as task bar icon in a larger size diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainView.java b/gui/src/main/java/io/bitsquare/gui/main/MainView.java index 0ce31b3a72..b7b2b0c043 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainView.java @@ -152,7 +152,7 @@ public class MainView extends InitializableView { return type != null ? "Market price (" + type.name + ")" : ""; }, model.marketPriceCurrency, model.typeProperty)); - HBox.setMargin(marketPriceBox.third, new Insets(0, 20, 0, 0)); + HBox.setMargin(marketPriceBox.third, new Insets(0, 0, 0, 0)); Tuple2 availableBalanceBox = getBalanceBox("Available balance"); @@ -243,7 +243,7 @@ public class MainView extends InitializableView { private Tuple2 getBalanceBox(String text) { TextField textField = new TextField(); textField.setEditable(false); - textField.setPrefWidth(120); + textField.setPrefWidth(140); textField.setMouseTransparent(true); textField.setFocusTraversable(false); textField.setStyle("-fx-alignment: center; -fx-background-color: white;"); diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java index ec818f1df1..6481d6e441 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/deposit/DepositView.java @@ -292,7 +292,7 @@ public class DepositView extends ActivatableView { private Coin getAmountAsCoin() { Coin senderAmount = formatter.parseToCoin(amountTextField.getText()); - if (!Restrictions.isAboveFixedTxFeeAndDust(senderAmount)) { + if (!Restrictions.isAboveFixedTxFeeForTradesAndDust(senderAmount)) { senderAmount = Coin.ZERO; /* new Popup() .warning("The amount is lower than the transaction fee and the min. possible tx value (dust).") diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java index f83bdf928f..164429cba8 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java @@ -22,7 +22,6 @@ import de.jensd.fx.fontawesome.AwesomeIcon; import io.bitsquare.app.BitsquareApp; import io.bitsquare.btc.AddressEntry; import io.bitsquare.btc.AddressEntryException; -import io.bitsquare.btc.Restrictions; import io.bitsquare.btc.WalletService; import io.bitsquare.btc.listeners.BalanceListener; import io.bitsquare.common.UserThread; @@ -40,8 +39,10 @@ import io.bitsquare.trade.TradeManager; import io.bitsquare.trade.closed.ClosedTradableManager; import io.bitsquare.trade.failed.FailedTradesManager; import io.bitsquare.user.Preferences; -import javafx.beans.binding.Bindings; +import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectWrapper; +import javafx.beans.property.SimpleObjectProperty; +import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; @@ -50,10 +51,7 @@ import javafx.scene.control.*; import javafx.scene.layout.VBox; import javafx.util.Callback; import org.apache.commons.lang3.StringUtils; -import org.bitcoinj.core.AddressFormatException; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.InsufficientMoneyException; -import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.*; import org.jetbrains.annotations.NotNull; import org.spongycastle.crypto.params.KeyParameter; @@ -87,7 +85,10 @@ public class WithdrawalView extends ActivatableView { private Set selectedItems = new HashSet<>(); private BalanceListener balanceListener; private Set fromAddresses; - private Coin amountOfSelectedItems; + private Coin amountOfSelectedItems = Coin.ZERO; + private ObjectProperty senderAmountAsCoinProperty = new SimpleObjectProperty<>(Coin.ZERO); + private ChangeListener amountListener; + private ChangeListener amountFocusListener; /////////////////////////////////////////////////////////////////////////////////////////// @@ -131,6 +132,23 @@ public class WithdrawalView extends ActivatableView { updateList(); } }; + amountListener = (observable, oldValue, newValue) -> { + if (amountTextField.focusedProperty().get()) { + try { + senderAmountAsCoinProperty.set(formatter.parseToCoin(amountTextField.getText())); + } catch (Throwable t) { + log.error("Error at amountTextField input. " + t.toString()); + } + } + }; + amountFocusListener = (observable, oldValue, newValue) -> { + if (oldValue && !newValue) { + if (senderAmountAsCoinProperty.get().isPositive()) + amountTextField.setText(formatter.formatCoin(senderAmountAsCoinProperty.get())); + else + amountTextField.setText(""); + } + }; } @Override @@ -141,17 +159,18 @@ public class WithdrawalView extends ActivatableView { reset(); + amountTextField.textProperty().addListener(amountListener); + amountTextField.focusedProperty().addListener(amountFocusListener); walletService.addBalanceListener(balanceListener); - withdrawButton.disableProperty().bind(Bindings.createBooleanBinding(() -> !areInputsValid(), - amountTextField.textProperty(), withdrawToTextField.textProperty())); } @Override protected void deactivate() { sortedList.comparatorProperty().unbind(); observableList.forEach(WithdrawalListItem::cleanup); - withdrawButton.disableProperty().unbind(); walletService.removeBalanceListener(balanceListener); + amountTextField.textProperty().removeListener(amountListener); + amountTextField.focusedProperty().removeListener(amountFocusListener); } @@ -161,8 +180,7 @@ public class WithdrawalView extends ActivatableView { @FXML public void onWithdraw() { - Coin senderAmount = formatter.parseToCoin(amountTextField.getText()); - if (Restrictions.isAboveFixedTxFeeAndDust(senderAmount)) { + if (areInputsValid()) { FutureCallback callback = new FutureCallback() { @Override public void onSuccess(@javax.annotation.Nullable Transaction transaction) { @@ -192,31 +210,33 @@ public class WithdrawalView extends ActivatableView { // TODO Get a proper fee calculation from BitcoinJ directly Coin requiredFee = walletService.getRequiredFeeForMultipleAddresses(fromAddresses, withdrawToTextField.getText(), amountOfSelectedItems); - Coin receiverAmount = senderAmount.subtract(requiredFee); - if (BitsquareApp.DEV_MODE) { - doWithdraw(receiverAmount, callback); - } else { - new Popup().headLine("Confirm withdrawal request") - .confirmation("Sending: " + formatter.formatCoinWithCode(senderAmount) + "\n" + - "From address: " + withdrawFromTextField.getText() + "\n" + - "To receiving address: " + withdrawToTextField.getText() + ".\n" + - "Required transaction fee is: " + formatter.formatCoinWithCode(requiredFee) + "\n\n" + - "The recipient will receive: " + formatter.formatCoinWithCode(receiverAmount) + "\n\n" + - "Are you sure you want to withdraw that amount?") - .actionButtonText("Yes") - .onAction(() -> doWithdraw(receiverAmount, callback)) - .closeButtonText("Cancel") - .show(); + Coin receiverAmount = senderAmountAsCoinProperty.get().subtract(requiredFee); + if (receiverAmount.isPositive()) { + if (BitsquareApp.DEV_MODE) { + doWithdraw(receiverAmount, callback); + } else { + new Popup().headLine("Confirm withdrawal request") + .confirmation("Sending: " + formatter.formatCoinWithCode(senderAmountAsCoinProperty.get()) + "\n" + + "From address: " + withdrawFromTextField.getText() + "\n" + + "To receiving address: " + withdrawToTextField.getText() + ".\n" + + "Required transaction fee is: " + formatter.formatCoinWithCode(requiredFee) + "\n\n" + + "The recipient will receive: " + formatter.formatCoinWithCode(receiverAmount) + "\n\n" + + "Are you sure you want to withdraw that amount?") + .actionButtonText("Yes") + .onAction(() -> doWithdraw(receiverAmount, callback)) + .closeButtonText("Cancel") + .show(); + } + } else { + new Popup().warning("The amount you would like to send is too low as the bitcoin transaction fee will be deducted.\n" + + "Please use a higher amount.").show(); } } catch (Throwable e) { e.printStackTrace(); log.error(e.getMessage()); - new Popup().error(e.getMessage()).show(); + new Popup().warning(e.getMessage()).show(); } - } else { - new Popup().warning("The amount to transfer is lower than the transaction fee and the min. possible tx value (dust).") - .show(); } } @@ -233,8 +253,11 @@ public class WithdrawalView extends ActivatableView { if (!selectedItems.isEmpty()) { amountOfSelectedItems = Coin.valueOf(selectedItems.stream().mapToLong(e -> e.getBalance().getValue()).sum()); if (amountOfSelectedItems.isPositive()) { + senderAmountAsCoinProperty.set(amountOfSelectedItems); amountTextField.setText(formatter.formatCoin(amountOfSelectedItems)); } else { + senderAmountAsCoinProperty.set(Coin.ZERO); + amountOfSelectedItems = Coin.ZERO; amountTextField.setText(""); withdrawFromTextField.setText(""); } @@ -302,11 +325,17 @@ public class WithdrawalView extends ActivatableView { updateList(); } catch (AddressFormatException e) { new Popup().warning("The address is not correct. Please check the address format.").show(); + } catch (Wallet.DustySendRequested e) { + new Popup().warning("The amount you would like to send is below the dust limit and would be rejected by the bitcoin network.\n" + + "Please use a higher amount.").show(); } catch (AddressEntryException e) { new Popup().error(e.getMessage()).show(); } catch (InsufficientMoneyException e) { log.warn(e.getMessage()); new Popup().warning("You don't have enough fund in your wallet.").show(); + } catch (Throwable e) { + log.warn(e.getMessage()); + new Popup().warning(e.getMessage()).show(); } } @@ -319,6 +348,8 @@ public class WithdrawalView extends ActivatableView { withdrawFromTextField.setPromptText("Select a source address from the table"); withdrawFromTextField.setTooltip(null); + amountOfSelectedItems = Coin.ZERO; + senderAmountAsCoinProperty.set(Coin.ZERO); amountTextField.setText(""); amountTextField.setPromptText("Set the amount to withdraw"); @@ -342,14 +373,27 @@ public class WithdrawalView extends ActivatableView { } private boolean areInputsValid() { - if (amountTextField.getText().length() > 0) { - Coin amount = formatter.parseToCoin(amountTextField.getText()); - return btcAddressValidator.validate(withdrawToTextField.getText()).isValid && - amount.compareTo(amountOfSelectedItems) <= 0 && - Restrictions.isAboveFixedTxFeeAndDust(amount); - } else { + if (!senderAmountAsCoinProperty.get().isPositive()) { + new Popup().warning("Please fill in a valid value for the amount to send (max. 8 decimal places).").show(); return false; } + + if (!btcAddressValidator.validate(withdrawToTextField.getText()).isValid) { + new Popup().warning("Please fill in a valid receiver bitcoin address.").show(); + return false; + } + if (!amountOfSelectedItems.isPositive()) { + new Popup().warning("You need to select a source address in the table above.").show(); + return false; + } + + if (senderAmountAsCoinProperty.get().compareTo(amountOfSelectedItems) > 0) { + new Popup().warning("Your amount exceeds the available amount for the selected address.\n" + + "Consider to select multiple addresses in the table above if you want to withdraw more.").show(); + return false; + } + + return true; } diff --git a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java index 56501330e3..ac3b1f6019 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java +++ b/gui/src/main/java/io/bitsquare/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java @@ -183,7 +183,7 @@ public class BuyerStep5View extends TradeStepView { } else { if (toAddresses.isEmpty()) { validateWithdrawAddress(); - } else if (Restrictions.isAboveFixedTxFeeAndDust(senderAmount)) { + } else if (Restrictions.isAboveFixedTxFeeForTradesAndDust(senderAmount)) { if (BitsquareApp.DEV_MODE) { doWithdrawal(receiverAmount); diff --git a/gui/src/main/java/io/bitsquare/gui/util/BSFormatter.java b/gui/src/main/java/io/bitsquare/gui/util/BSFormatter.java index 465e2805b2..42d367a326 100644 --- a/gui/src/main/java/io/bitsquare/gui/util/BSFormatter.java +++ b/gui/src/main/java/io/bitsquare/gui/util/BSFormatter.java @@ -53,7 +53,7 @@ public class BSFormatter { // Input of a group separator (1,123,45) lead to an validation error. // Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit, // no way to remove grouping separator). It seems to be not optimal for user input formatting. - private MonetaryFormat coinFormat = MonetaryFormat.BTC.repeatOptionalDecimals(2, 2); + private MonetaryFormat coinFormat = MonetaryFormat.BTC.minDecimals(2).repeatOptionalDecimals(1, 6); // private String currencyCode = CurrencyUtil.getDefaultFiatCurrencyAsCode(); @@ -97,7 +97,7 @@ public class BSFormatter { if (useMilliBit) return MonetaryFormat.MBTC; else - return MonetaryFormat.BTC.repeatOptionalDecimals(2, 2); + return MonetaryFormat.BTC.minDecimals(2).repeatOptionalDecimals(1, 6); } /* public void setFiatCurrencyCode(String currencyCode) { From f9983a4e192eb8d75269d4f696292f876a00789f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 20:19:27 +0200 Subject: [PATCH 49/63] Change wording for bank form --- core/src/main/java/io/bitsquare/locale/BankUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/bitsquare/locale/BankUtil.java b/core/src/main/java/io/bitsquare/locale/BankUtil.java index 4f9a6c07a2..ebff158fb8 100644 --- a/core/src/main/java/io/bitsquare/locale/BankUtil.java +++ b/core/src/main/java/io/bitsquare/locale/BankUtil.java @@ -37,7 +37,7 @@ public class BankUtil { countryCode = ""; switch (countryCode) { default: - return "Bank nr.(BIC/SWIFT):"; + return "Bank nr. or BIC/SWIFT:"; } } @@ -64,7 +64,7 @@ public class BankUtil { countryCode = ""; switch (countryCode) { default: - return "Account nr.(IBAN):"; + return "Account nr. or IBAN:"; } } From 1ffb8f2c653f33087e3f2b7e50366618b3b7f338 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 20:38:15 +0200 Subject: [PATCH 50/63] Change Myriadcoin ticker symbol as it conflicts with Malaysian ringgit --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index d1b4668642..f8f46bd2c9 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -102,7 +102,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("VRC", "VeriCoin")); result.add(new CryptoCurrency("ESP", "Espers")); result.add(new CryptoCurrency("XVG", "Verge")); - result.add(new CryptoCurrency("MYR", "Myriadcoin")); + result.add(new CryptoCurrency("MYRC", "Myriadcoin")); result.add(new CryptoCurrency("MXT", "MarteXcoin")); result.add(new CryptoCurrency("GRS", "Groestlcoin")); result.add(new CryptoCurrency("IOC", "I/O Coin")); From dd5cacb26ffe679bbd57ef1081277808d9edfae1 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 22:24:51 +0200 Subject: [PATCH 51/63] Version 0.4.5 --- common/pom.xml | 2 +- common/src/main/java/io/bitsquare/app/Version.java | 2 +- core/pom.xml | 2 +- gui/pom.xml | 2 +- jsocks/pom.xml | 2 +- jtorctl/pom.xml | 2 +- jtorproxy/pom.xml | 2 +- network/pom.xml | 2 +- package/linux/create_32bit_app.sh | 2 +- package/linux/create_64bit_app.sh | 2 +- package/mac/create_app.sh | 2 +- package/mac/finalize.sh | 6 +++--- package/windows/Bitsquare.iss | 2 +- package/windows/create_32bit_app.bat | 6 +++--- package/windows/create_64bit_app.bat | 6 +++--- pom.xml | 2 +- seednode/pom.xml | 2 +- 17 files changed, 23 insertions(+), 23 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index 9fab13d4ad..7720a3cdd0 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index 044c43ee54..58aa3811fa 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -24,7 +24,7 @@ public class Version { private static final Logger log = LoggerFactory.getLogger(Version.class); // The application versions - public static final String VERSION = "0.4.4"; + public static final String VERSION = "0.4.5"; // The version nr. for the objects sent over the network. A change will break the serialization of old objects. // If objects are used for both network and database the network version is applied. diff --git a/core/pom.xml b/core/pom.xml index 8aa30bf22f..b1429928db 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 core diff --git a/gui/pom.xml b/gui/pom.xml index a8df94bef4..cad2845d6c 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -22,7 +22,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/jsocks/pom.xml b/jsocks/pom.xml index e26a610741..f96bc7a0fa 100644 --- a/jsocks/pom.xml +++ b/jsocks/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/jtorctl/pom.xml b/jtorctl/pom.xml index 91f94d64e1..69ecdb9e40 100644 --- a/jtorctl/pom.xml +++ b/jtorctl/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/jtorproxy/pom.xml b/jtorproxy/pom.xml index 7c85388a13..50c53e12c4 100644 --- a/jtorproxy/pom.xml +++ b/jtorproxy/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/network/pom.xml b/network/pom.xml index 71aaaabc22..a4f32799fc 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 diff --git a/package/linux/create_32bit_app.sh b/package/linux/create_32bit_app.sh index 1c89f6b6d5..1b1f48d439 100644 --- a/package/linux/create_32bit_app.sh +++ b/package/linux/create_32bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.4 +fullVersion=0.4.5 jarFile="/home/bitsquare/Desktop/sf_vm_shared_ubuntu14_32bit/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/linux/create_64bit_app.sh b/package/linux/create_64bit_app.sh index 42715fbceb..ea3889d821 100644 --- a/package/linux/create_64bit_app.sh +++ b/package/linux/create_64bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.4 +fullVersion=0.4.5 jarFile="/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 878ec30f9e..33969eb113 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -5,7 +5,7 @@ mkdir -p gui/deploy set -e -fullVersion="0.4.4" +fullVersion="0.4.5" mvn clean package -DskipTests -Dmaven.javadoc.skip=true diff --git a/package/mac/finalize.sh b/package/mac/finalize.sh index cc93b83670..af3aa0daa0 100644 --- a/package/mac/finalize.sh +++ b/package/mac/finalize.sh @@ -1,11 +1,11 @@ #!/bin/bash -version="0.4.4" +version="0.4.5" target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/Bitsquare-0.4.4.dmg" "$target_dir/Bitsquare-0.4.4.dmg" -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-0.4.4.jar" "$target_dir/SeedNode-0.4.4.jar" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/Bitsquare-$version.dmg" "$target_dir/Bitsquare-$version.dmg" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-$version.jar" "$target_dir/SeedNode-$version.jar" linux32="Bitsquare-32bit-$version.deb" cp "/Users/mk/vm_shared_ubuntu14_32bit/$linux32" "$target_dir/$linux32" diff --git a/package/windows/Bitsquare.iss b/package/windows/Bitsquare.iss index 355a91ec02..7404ba8961 100755 --- a/package/windows/Bitsquare.iss +++ b/package/windows/Bitsquare.iss @@ -3,7 +3,7 @@ [Setup] AppId={{bitsquare}} AppName=Bitsquare -AppVersion=0.4.4 +AppVersion=0.4.5 AppVerName=Bitsquare AppPublisher=Bitsquare AppComments=Bitsquare diff --git a/package/windows/create_32bit_app.bat b/package/windows/create_32bit_app.bat index 9b324fe9e1..8856e5031c 100644 --- a/package/windows/create_32bit_app.bat +++ b/package/windows/create_32bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.4 +:: edit iss file -> AppVersion=0.4.5 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.4 and -srcfiles +:: edit -> -BappVersion=0.4.5 and -srcfiles :: 32 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.4 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.4.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.5 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.5.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/package/windows/create_64bit_app.bat b/package/windows/create_64bit_app.bat index 27065ca52c..bae1dfcf57 100644 --- a/package/windows/create_64bit_app.bat +++ b/package/windows/create_64bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.4 +:: edit iss file -> AppVersion=0.4.5 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.4 and -srcfiles +:: edit -> -BappVersion=0.4.5 and -srcfiles :: 64 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.4 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.4.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.5 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.5.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/pom.xml b/pom.xml index f9c37595fc..54ce878c55 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.bitsquare parent pom - 0.4.4 + 0.4.5 Bitsquare - The decentralized bitcoin exchange https://bitsquare.io diff --git a/seednode/pom.xml b/seednode/pom.xml index 6ce3e5ee34..55e510c8fb 100644 --- a/seednode/pom.xml +++ b/seednode/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.4 + 0.4.5 4.0.0 From 80422ce96f88bc4ddb23ac5b37759410e5938148 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 28 Apr 2016 23:44:47 +0200 Subject: [PATCH 52/63] Fix wrong file name for copy task --- package/linux/create_64bit_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/linux/create_64bit_app.sh b/package/linux/create_64bit_app.sh index ea3889d821..7d251e1a47 100644 --- a/package/linux/create_64bit_app.sh +++ b/package/linux/create_64bit_app.sh @@ -34,6 +34,6 @@ rm gui/deploy/LICENSE mv "gui/deploy/bundles/bitsquare-$fullVersion.deb" "gui/deploy/Bitsquare-$fullVersion.deb" rmdir gui/deploy/bundles cp "gui/deploy/Bitsquare-$fullVersion.deb" "/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-64bit-$fullVersion.deb" -cp "gui/deploy/Bitsquare-64bit-$fullVersion.deb" "/home/mk/Desktop/Bitsquare-64bit-$fullVersion.deb" +cp "gui/deploy/Bitsquare-$fullVersion.deb" "/home/mk/Desktop/Bitsquare-64bit-$fullVersion.deb" cd package/linux \ No newline at end of file From bf2b4fd8275b816db8c0edcf2f6bead006a3665b Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 00:02:37 +0200 Subject: [PATCH 53/63] Added Sibcoin --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index f8f46bd2c9..18e1a3dc87 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -106,7 +106,8 @@ public class CurrencyUtil { result.add(new CryptoCurrency("MXT", "MarteXcoin")); result.add(new CryptoCurrency("GRS", "Groestlcoin")); result.add(new CryptoCurrency("IOC", "I/O Coin")); - + result.add(new CryptoCurrency("SIB", "Sibcoin")); + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; From d586c03a87cfb8e73e96b09a93f4c726d6f1f842 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 01:43:15 +0200 Subject: [PATCH 54/63] Rename file --- package/mac/finalize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/mac/finalize.sh b/package/mac/finalize.sh index af3aa0daa0..112a09ca52 100644 --- a/package/mac/finalize.sh +++ b/package/mac/finalize.sh @@ -41,7 +41,7 @@ HASH_WIN_32="$(shasum -a 256 $WIN_32)" sed -e "s|HASH_MAC|$HASH_MAC|" -e "s|HASH_DEB_64|$HASH_DEB_64|" -e "s|HASH_DEB_32|$HASH_DEB_32|" -e "s|HASH_WIN_64|$HASH_WIN_64|" -e "s|HASH_WIN_32|$HASH_WIN_32|" hashes.template > hashes.txt -gpg --local-user manfred@bitsquare.io --output signed_hashes.txt --clearsign hashes.txt +gpg --local-user manfred@bitsquare.io --output signed_sha256_hashes.txt --clearsign hashes.txt gpg --verify signed_hashes.txt rm "$target_dir/hashes.template" From 913c29a2db2640c6053e0cf11fe58bb3c012dc79 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 01:43:30 +0200 Subject: [PATCH 55/63] avoid null pointer --- .../gui/main/funds/transactions/TransactionsListItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java index 3729b05c76..aedb5ada39 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java +++ b/gui/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java @@ -43,7 +43,7 @@ public class TransactionsListItem { @Nullable private Tradable tradable; private String details; - private String addressString; + private String addressString = ""; private String direction; private TxConfidenceListener txConfidenceListener; private boolean received; From 60289553d58cce3321349649fce4a648f6a3f43f Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 10:49:12 +0200 Subject: [PATCH 56/63] Added Creditbit --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 18e1a3dc87..e3a2821c48 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -107,7 +107,8 @@ public class CurrencyUtil { result.add(new CryptoCurrency("GRS", "Groestlcoin")); result.add(new CryptoCurrency("IOC", "I/O Coin")); result.add(new CryptoCurrency("SIB", "Sibcoin")); - + result.add(new CryptoCurrency("CRBIT", "Creditbit")); + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result; From 0a0f5a565972de8111b672aee91b85bc12885dd8 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 10:49:58 +0200 Subject: [PATCH 57/63] Fix bug with password protection at fee calculation --- core/src/main/java/io/bitsquare/btc/WalletService.java | 9 +++++++-- .../main/java/io/bitsquare/gui/main/MainViewModel.java | 1 + .../gui/main/account/content/password/PasswordView.java | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/bitsquare/btc/WalletService.java b/core/src/main/java/io/bitsquare/btc/WalletService.java index bdbbc1c406..a424f1a5e5 100644 --- a/core/src/main/java/io/bitsquare/btc/WalletService.java +++ b/core/src/main/java/io/bitsquare/btc/WalletService.java @@ -95,6 +95,7 @@ public class WalletService { public final BooleanProperty shutDownDone = new SimpleBooleanProperty(); private final Storage storage; private final Long bloomFilterTweak; + private KeyParameter aesKey; /////////////////////////////////////////////////////////////////////////////////////////// @@ -337,6 +338,10 @@ public class WalletService { } } + public void setAesKey(KeyParameter aesKey) { + this.aesKey = aesKey; + } + /////////////////////////////////////////////////////////////////////////////////////////// // Listener @@ -618,7 +623,7 @@ public class WalletService { AddressEntry.Context context, Coin fee) throws AddressEntryException, AddressFormatException { try { - wallet.completeTx(getSendRequest(fromAddress, toAddress, amount, null, context)); + wallet.completeTx(getSendRequest(fromAddress, toAddress, amount, aesKey, context)); } catch (InsufficientMoneyException e) { if (e.missing != null) { log.trace("missing fee " + e.missing.toFriendlyString()); @@ -640,7 +645,7 @@ public class WalletService { Coin amount, Coin fee) throws AddressEntryException, AddressFormatException { try { - wallet.completeTx(getSendRequestForMultipleAddresses(fromAddresses, toAddress, amount, null, null)); + wallet.completeTx(getSendRequestForMultipleAddresses(fromAddresses, toAddress, amount, null, aesKey)); } catch (InsufficientMoneyException e) { if (e.missing != null) { log.trace("missing fee " + e.missing.toFriendlyString()); diff --git a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java index f5c4821d07..d076d09e5e 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/MainViewModel.java @@ -444,6 +444,7 @@ public class MainViewModel implements ViewModel { walletPasswordWindow .onAesKey(aesKey -> { tradeWalletService.setAesKey(aesKey); + walletService.setAesKey(aesKey); walletInitialized.set(true); }) .hideCloseButton() diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java index 1052a7c30c..83ceac968c 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java +++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java @@ -117,6 +117,7 @@ public class PasswordView extends ActivatableView { if (wallet.checkAESKey(aesKey)) { wallet.decrypt(aesKey); tradeWalletService.setAesKey(null); + walletService.setAesKey(null); new Popup() .feedback("Wallet successfully decrypted and password protection removed.") .show(); @@ -133,6 +134,7 @@ public class PasswordView extends ActivatableView { wallet.encrypt(keyCrypterScrypt, aesKey); // we save the key for the trade wallet as we don't require passwords here tradeWalletService.setAesKey(aesKey); + walletService.setAesKey(aesKey); new Popup() .feedback("Wallet successfully encrypted and password protection enabled.") .show(); From 89aed23d670f41056142d77ed4a343ddc362b090 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 29 Apr 2016 11:22:58 +0200 Subject: [PATCH 58/63] v0.4.6 --- common/pom.xml | 2 +- .../main/java/io/bitsquare/app/Version.java | 2 +- core/pom.xml | 2 +- gui/pom.xml | 2 +- jsocks/pom.xml | 2 +- jtorctl/pom.xml | 2 +- jtorproxy/pom.xml | 2 +- network/pom.xml | 2 +- package/linux/create_32bit_app.sh | 2 +- package/linux/create_64bit_app.sh | 2 +- package/mac/create_app.sh | 2 +- package/mac/finalize.sh | 52 +++++++------------ package/mac/hashes.template | 5 -- package/windows/Bitsquare.iss | 2 +- package/windows/create_32bit_app.bat | 6 +-- package/windows/create_64bit_app.bat | 6 +-- pom.xml | 2 +- seednode/pom.xml | 2 +- 18 files changed, 38 insertions(+), 59 deletions(-) delete mode 100644 package/mac/hashes.template diff --git a/common/pom.xml b/common/pom.xml index 7720a3cdd0..09bca2d0f8 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/common/src/main/java/io/bitsquare/app/Version.java b/common/src/main/java/io/bitsquare/app/Version.java index 58aa3811fa..2eeb8aa43a 100644 --- a/common/src/main/java/io/bitsquare/app/Version.java +++ b/common/src/main/java/io/bitsquare/app/Version.java @@ -24,7 +24,7 @@ public class Version { private static final Logger log = LoggerFactory.getLogger(Version.class); // The application versions - public static final String VERSION = "0.4.5"; + public static final String VERSION = "0.4.6"; // The version nr. for the objects sent over the network. A change will break the serialization of old objects. // If objects are used for both network and database the network version is applied. diff --git a/core/pom.xml b/core/pom.xml index b1429928db..ec0db52f84 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 core diff --git a/gui/pom.xml b/gui/pom.xml index cad2845d6c..36588d1447 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -22,7 +22,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/jsocks/pom.xml b/jsocks/pom.xml index f96bc7a0fa..c9e233d81d 100644 --- a/jsocks/pom.xml +++ b/jsocks/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/jtorctl/pom.xml b/jtorctl/pom.xml index 69ecdb9e40..1fbeec821f 100644 --- a/jtorctl/pom.xml +++ b/jtorctl/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/jtorproxy/pom.xml b/jtorproxy/pom.xml index 50c53e12c4..01181f00cb 100644 --- a/jtorproxy/pom.xml +++ b/jtorproxy/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/network/pom.xml b/network/pom.xml index a4f32799fc..e300254188 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 diff --git a/package/linux/create_32bit_app.sh b/package/linux/create_32bit_app.sh index 1b1f48d439..a7b279e22d 100644 --- a/package/linux/create_32bit_app.sh +++ b/package/linux/create_32bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.5 +fullVersion=0.4.6 jarFile="/home/bitsquare/Desktop/sf_vm_shared_ubuntu14_32bit/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/linux/create_64bit_app.sh b/package/linux/create_64bit_app.sh index 7d251e1a47..3ce337df34 100644 --- a/package/linux/create_64bit_app.sh +++ b/package/linux/create_64bit_app.sh @@ -6,7 +6,7 @@ mkdir -p gui/deploy set -e # Edit versions -fullVersion=0.4.5 +fullVersion=0.4.6 jarFile="/home/mk/Desktop/sf_vm_shared_ubuntu/Bitsquare-$fullVersion.jar" # Note: fakeroot needs to be installed on linux diff --git a/package/mac/create_app.sh b/package/mac/create_app.sh index 33969eb113..b75a40b79d 100644 --- a/package/mac/create_app.sh +++ b/package/mac/create_app.sh @@ -5,7 +5,7 @@ mkdir -p gui/deploy set -e -fullVersion="0.4.5" +fullVersion="0.4.6" mvn clean package -DskipTests -Dmaven.javadoc.skip=true diff --git a/package/mac/finalize.sh b/package/mac/finalize.sh index 112a09ca52..fa2109f77d 100644 --- a/package/mac/finalize.sh +++ b/package/mac/finalize.sh @@ -1,50 +1,34 @@ #!/bin/bash -version="0.4.5" +version="0.4.6" target_dir="/Users/mk/Documents/__bitsquare/_releases/$version" -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/Bitsquare-$version.dmg" "$target_dir/Bitsquare-$version.dmg" -cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-$version.jar" "$target_dir/SeedNode-$version.jar" +mac="Bitsquare-$version.dmg" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/$mac" "$target_dir/" +cp "/Users/mk/Documents/_intellij/bitsquare/gui/deploy/SeedNode-$version.jar" "$target_dir/" -linux32="Bitsquare-32bit-$version.deb" -cp "/Users/mk/vm_shared_ubuntu14_32bit/$linux32" "$target_dir/$linux32" +deb32="Bitsquare-32bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu14_32bit/$deb32" "$target_dir/" -linux64="Bitsquare-64bit-$version.deb" -cp "/Users/mk/vm_shared_ubuntu/$linux64" "$target_dir/$linux64" +deb64="Bitsquare-64bit-$version.deb" +cp "/Users/mk/vm_shared_ubuntu/$deb64" "$target_dir/" exe="Bitsquare.exe" -cp "/Users/mk/vm_shared_windows_32bit/bundles/$exe" "$target_dir/Bitsquare-32bit-$version.exe" -cp "/Users/mk/vm_shared_windows/bundles/$exe" "$target_dir/Bitsquare-64bit-$version.exe" -cp "/Users/mk/vm_shared_windows/bundles/$exe" "/Users/mk/vm_shared_win10/Bitsquare-64bit-$version.exe" +win32="Bitsquare-32bit-$version.exe" +cp "/Users/mk/vm_shared_windows_32bit/bundles/$exe" "$target_dir/$win32" +win64="Bitsquare-64bit-$version.exe" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "$target_dir/$win64" +cp "/Users/mk/vm_shared_windows/bundles/$exe" "/Users/mk/vm_shared_win10/$win64" -cp "hashes.template" "$target_dir/hashes.template" cd "$target_dir" -MAC="Bitsquare-$version.dmg" -HASH_MAC="$(shasum -a 256 $MAC)" +shasum -a 256 "$mac" "$deb64" "$deb32" "$win64" "$win32" > sha256_hashes.txt -DEB_64="Bitsquare-64bit-$version.deb" -HASH_DEB_64="$(shasum -a 256 $DEB_64)" +gpg --local-user manfred@bitsquare.io --output signed_sha256_hashes.txt --clearsign sha256_hashes.txt -DEB_64="Bitsquare-64bit-$version.deb" -HASH_DEB_64="$(shasum -a 256 $DEB_64)" +gpg --verify signed_sha256_hashes.txt -DEB_32="Bitsquare-32bit-$version.deb" -HASH_DEB_32="$(shasum -a 256 $DEB_32)" +rm "$target_dir/sha256_hashes.txt" -WIN_64="Bitsquare-64bit-$version.exe" -HASH_WIN_64="$(shasum -a 256 $WIN_64)" - -WIN_32="Bitsquare-32bit-$version.exe" -HASH_WIN_32="$(shasum -a 256 $WIN_32)" - -sed -e "s|HASH_MAC|$HASH_MAC|" -e "s|HASH_DEB_64|$HASH_DEB_64|" -e "s|HASH_DEB_32|$HASH_DEB_32|" -e "s|HASH_WIN_64|$HASH_WIN_64|" -e "s|HASH_WIN_32|$HASH_WIN_32|" hashes.template > hashes.txt - -gpg --local-user manfred@bitsquare.io --output signed_sha256_hashes.txt --clearsign hashes.txt -gpg --verify signed_hashes.txt - -rm "$target_dir/hashes.template" -rm "$target_dir/hashes.txt" - -open "$target_dir" \ No newline at end of file +open "$target_dir" diff --git a/package/mac/hashes.template b/package/mac/hashes.template deleted file mode 100644 index 71d008a064..0000000000 --- a/package/mac/hashes.template +++ /dev/null @@ -1,5 +0,0 @@ -HASH_MAC -HASH_DEB_64 -HASH_DEB_32 -HASH_WIN_64 -HASH_WIN_32 \ No newline at end of file diff --git a/package/windows/Bitsquare.iss b/package/windows/Bitsquare.iss index 7404ba8961..f61378d0d3 100755 --- a/package/windows/Bitsquare.iss +++ b/package/windows/Bitsquare.iss @@ -3,7 +3,7 @@ [Setup] AppId={{bitsquare}} AppName=Bitsquare -AppVersion=0.4.5 +AppVersion=0.4.6 AppVerName=Bitsquare AppPublisher=Bitsquare AppComments=Bitsquare diff --git a/package/windows/create_32bit_app.bat b/package/windows/create_32bit_app.bat index 8856e5031c..8e02a77e34 100644 --- a/package/windows/create_32bit_app.bat +++ b/package/windows/create_32bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.5 +:: edit iss file -> AppVersion=0.4.6 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.5 and -srcfiles +:: edit -> -BappVersion=0.4.6 and -srcfiles :: 32 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.5 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.5.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.6 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows_32bit" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows_32bit\Bitsquare-0.4.6.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/package/windows/create_64bit_app.bat b/package/windows/create_64bit_app.bat index bae1dfcf57..2995a21048 100644 --- a/package/windows/create_64bit_app.bat +++ b/package/windows/create_64bit_app.bat @@ -1,13 +1,13 @@ cd ..\..\ mkdir gui\deploy -:: edit iss file -> AppVersion=0.4.5 +:: edit iss file -> AppVersion=0.4.6 :: Copy gui/deploy.Bitsquare.jar file from mac build to windows -:: edit -> -BappVersion=0.4.5 and -srcfiles +:: edit -> -BappVersion=0.4.6 and -srcfiles :: 64 bit build :: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php) -call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.5 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.5.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true +call "C:\Program Files\Java\jdk1.8.0_92\bin\javapackager.exe" -deploy -BappVersion=0.4.6 -native exe -name Bitsquare -title Bitsquare -vendor Bitsquare -outdir "\\VBOXSVR\vm_shared_windows" -appclass io.bitsquare.app.BitsquareAppMain -srcfiles "\\VBOXSVR\vm_shared_windows\Bitsquare-0.4.6.jar" -outfile Bitsquare -Bruntime="C:\Program Files\Java\jdk1.8.0_92\jre" -BjvmProperties=-Djava.net.preferIPv4Stack=true cd package\windows \ No newline at end of file diff --git a/pom.xml b/pom.xml index 54ce878c55..8271d47394 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.bitsquare parent pom - 0.4.5 + 0.4.6 Bitsquare - The decentralized bitcoin exchange https://bitsquare.io diff --git a/seednode/pom.xml b/seednode/pom.xml index 55e510c8fb..ec4a5cf65a 100644 --- a/seednode/pom.xml +++ b/seednode/pom.xml @@ -5,7 +5,7 @@ parent io.bitsquare - 0.4.5 + 0.4.6 4.0.0 From 9f0fe335c2b207ce1834db1886abed83a73300e3 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 30 Apr 2016 01:05:24 +0200 Subject: [PATCH 59/63] Add missing branch for bitcoinj --- doc/build.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/build.md b/doc/build.md index 82cc1f8da0..23230f9d61 100644 --- a/doc/build.md +++ b/doc/build.md @@ -14,13 +14,13 @@ What follows is explained in detail in the sections below, but for those who kno $ javac -version javac 1.8.0_66 # must be 1.8.0_66 or better - $ git clone https://github.com/bitsquare/bitcoinj.git + $ git clone -b FixBloomFilters https://github.com/bitsquare/bitcoinj.git $ cd bitcoinj - $ mvn install -DskipTests -Dmaven.javadoc.skip=true + $ mvn clean install -DskipTests -Dmaven.javadoc.skip=true $ git clone https://github.com/bitsquare/bitsquare.git $ cd bitsquare - $ mvn package + $ mvn clean package When the build completes, you will find an executable jar: `gui/target/shaded.jar`. To run it use: @@ -82,16 +82,16 @@ We remove Cartographer/HttpDiscovery support from in our [fork version 0.13.1.2] Beside the Java serialisation issues here are [privacy concerns](http://bitcoin-development.narkive.com/hczWIAby/bitcoin-development-cartographer#post3) regarding Cartographer. Beside that we fixed a few [flaws with the Bloom Filters](https://jonasnick.github.io/blog/2015/02/12/privacy-in-bitcoinj) in BitcoinJ. - $ git clone https://github.com/bitsquare/bitcoinj.git + $ git clone -b FixBloomFilters https://github.com/bitsquare/bitcoinj.git $ cd bitcoinj - $ mvn install -DskipTests -Dmaven.javadoc.skip=true + $ mvn clean install -DskipTests -Dmaven.javadoc.skip=true ### 3. Build jar Bitsquare uses maven as a build system. $ cd bitsquare - $ mvn package + $ mvn clean package ### 4. Run From 528a1dc62e1043172504e312189613b424f6b345 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 30 Apr 2016 01:26:26 +0200 Subject: [PATCH 60/63] Add -DskipTests --- doc/build.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/build.md b/doc/build.md index 23230f9d61..b9b51efb18 100644 --- a/doc/build.md +++ b/doc/build.md @@ -20,7 +20,7 @@ What follows is explained in detail in the sections below, but for those who kno $ git clone https://github.com/bitsquare/bitsquare.git $ cd bitsquare - $ mvn clean package + $ mvn clean package -DskipTests When the build completes, you will find an executable jar: `gui/target/shaded.jar`. To run it use: @@ -91,7 +91,7 @@ Beside that we fixed a few [flaws with the Bloom Filters](https://jonasnick.gith Bitsquare uses maven as a build system. $ cd bitsquare - $ mvn clean package + $ mvn clean package -DskipTests ### 4. Run From 2e85f855a6555a47288eef1ba5d320d586444e76 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 30 Apr 2016 13:12:47 +0200 Subject: [PATCH 61/63] Fix validation for inputs at create offer screen --- .../main/offer/createoffer/CreateOfferViewModel.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferViewModel.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferViewModel.java index edb39ef403..7077e549ae 100644 --- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferViewModel.java +++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferViewModel.java @@ -493,9 +493,9 @@ class CreateOfferViewModel extends ActivatableWithDataModel Date: Sat, 30 Apr 2016 13:14:47 +0200 Subject: [PATCH 62/63] Added BigUp --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index e3a2821c48..6d116d5e9d 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -108,6 +108,7 @@ public class CurrencyUtil { result.add(new CryptoCurrency("IOC", "I/O Coin")); result.add(new CryptoCurrency("SIB", "Sibcoin")); result.add(new CryptoCurrency("CRBIT", "Creditbit")); + result.add(new CryptoCurrency("BIGUP", "BigUp")); // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); From bf8e3c369207638941e948dec62c596b05831599 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 5 May 2016 13:10:33 +0200 Subject: [PATCH 63/63] Add PlatinumBar --- core/src/main/java/io/bitsquare/locale/CurrencyUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java index 6d116d5e9d..7c2e42cccb 100644 --- a/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java +++ b/core/src/main/java/io/bitsquare/locale/CurrencyUtil.java @@ -109,7 +109,8 @@ public class CurrencyUtil { result.add(new CryptoCurrency("SIB", "Sibcoin")); result.add(new CryptoCurrency("CRBIT", "Creditbit")); result.add(new CryptoCurrency("BIGUP", "BigUp")); - + result.add(new CryptoCurrency("XPTX", "PlatinumBar")); + // result.add(new CryptoCurrency("XMR", "Monero")); // result.add(new CryptoCurrency("BCN", "Bytecoin")); return result;