From 54500fad046b28ae00c25e5971c2691f5353323e Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 17 Aug 2018 13:08:04 +0200 Subject: [PATCH 1/4] Fix proposal list management --- .../bisq/desktop/main/dao/governance/result/VoteResultView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java b/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java index 0f67e6cf645..ac51c4a1c7d 100644 --- a/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java +++ b/src/main/java/bisq/desktop/main/dao/governance/result/VoteResultView.java @@ -243,8 +243,8 @@ private void fillCycleList() { cycleListItemList.clear(); bsqStateService.getCycles().forEach(cycle -> { List proposalsForCycle = proposalService.getProposalPayloads().stream() - .filter(proposalPayload -> cycleService.isTxInCycle(cycle, proposalPayload.getProposal().getTxId())) .map(ProposalPayload::getProposal) + .filter(proposal -> cycleService.isTxInCycle(cycle, proposal.getTxId())) .collect(Collectors.toList()); List evaluatedProposalsForCycle = voteResultService.getAllEvaluatedProposals().stream() From ef996a11fc8d7f948a4f13ff36bffb73c2615773 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Fri, 17 Aug 2018 21:57:45 +0200 Subject: [PATCH 2/4] Change link to F2F docs page --- .../main/account/content/fiataccounts/FiatAccountsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java index 23303721097..a233028a10c 100644 --- a/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java +++ b/src/main/java/bisq/desktop/main/account/content/fiataccounts/FiatAccountsView.java @@ -250,7 +250,7 @@ private void onSaveNewAccount(PaymentAccount paymentAccount) { new Popup<>().information(Res.get("payment.f2f.info")) .width(700) .closeButtonText(Res.get("payment.f2f.info.openURL")) - .onClose(() -> GUIUtil.openWebPage("https://docs.bisq.network/#f2f")) + .onClose(() -> GUIUtil.openWebPage("https://docs.bisq.network/trading-rules.html#f2f-trading")) .actionButtonText(Res.get("shared.iUnderstand")) .onAction(() -> doSaveNewAccount(paymentAccount)) .show(); From 9d24ac78b7105c88496b7a9a2b0d0fef47018f40 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sun, 19 Aug 2018 12:30:04 +0200 Subject: [PATCH 3/4] Update getAdjustedFiatVolume and getAdjustedAmount methods --- .../java/bisq/desktop/main/offer/MutableOfferDataModel.java | 4 ++-- .../java/bisq/desktop/main/offer/MutableOfferViewModel.java | 6 +++--- .../desktop/main/offer/takeoffer/TakeOfferDataModel.java | 2 +- .../desktop/main/offer/takeoffer/TakeOfferViewModel.java | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java b/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java index 662ede8fb63..a1962c0fdde 100644 --- a/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java +++ b/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java @@ -673,7 +673,7 @@ void calculateVolume() { if (isHalCashAccount()) volumeByAmount = OfferUtil.getAdjustedVolumeForHalCash(volumeByAmount); else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get())) - volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount, tradeCurrencyCode.get()); + volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount); volume.set(volumeByAmount); } catch (Throwable t) { @@ -695,7 +695,7 @@ void calculateAmount() { if (isHalCashAccount()) value = OfferUtil.getAdjustedAmountForHalCash(value, price.get(), getMaxTradeLimit()); else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get())) - value = OfferUtil.getRoundedFiatAmount(value, price.get(), tradeCurrencyCode.get(), getMaxTradeLimit()); + value = OfferUtil.getRoundedFiatAmount(value, price.get(), getMaxTradeLimit()); calculateVolume(); diff --git a/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java b/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java index d6063853726..bd12d115f2a 100644 --- a/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java +++ b/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java @@ -764,7 +764,7 @@ void onFocusOutVolumeTextField(boolean oldValue, boolean newValue) { if (dataModel.isHalCashAccount()) volume = OfferUtil.getAdjustedVolumeForHalCash(volume); else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get())) - volume = OfferUtil.getRoundedFiatVolume(volume, tradeCurrencyCode.get()); + volume = OfferUtil.getRoundedFiatVolume(volume); this.volume.set(btcFormatter.formatVolume(volume)); } @@ -979,7 +979,7 @@ private void setAmountToModel() { if (dataModel.isHalCashAccount()) amount = OfferUtil.getAdjustedAmountForHalCash(amount, price, maxTradeLimit); else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get())) - amount = OfferUtil.getRoundedFiatAmount(amount, price, tradeCurrencyCode.get(), maxTradeLimit); + amount = OfferUtil.getRoundedFiatAmount(amount, price, maxTradeLimit); } dataModel.setAmount(amount); if (syncMinAmountWithAmount || @@ -1003,7 +1003,7 @@ private void setMinAmountToModel() { if (dataModel.isHalCashAccount()) minAmount = OfferUtil.getAdjustedAmountForHalCash(minAmount, price, maxTradeLimit); else if (CurrencyUtil.isFiatCurrency(tradeCurrencyCode.get())) - minAmount = OfferUtil.getRoundedFiatAmount(minAmount, price, tradeCurrencyCode.get(), maxTradeLimit); + minAmount = OfferUtil.getRoundedFiatAmount(minAmount, price, maxTradeLimit); } dataModel.setMinAmount(minAmount); diff --git a/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java index babde6088dd..247c079cbd7 100644 --- a/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java +++ b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java @@ -496,7 +496,7 @@ void calculateVolume() { if (offer.getPaymentMethod().getId().equals(PaymentMethod.HAL_CASH_ID)) volumeByAmount = OfferUtil.getAdjustedVolumeForHalCash(volumeByAmount); else if (CurrencyUtil.isFiatCurrency(getCurrencyCode())) - volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount, getCurrencyCode()); + volumeByAmount = OfferUtil.getRoundedFiatVolume(volumeByAmount); volume.set(volumeByAmount); diff --git a/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java index 55b6e3589ee..b335faf9880 100644 --- a/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java +++ b/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferViewModel.java @@ -296,7 +296,7 @@ void onFocusOutAmountTextField(boolean oldValue, boolean newValue, String userIn // We only apply the rounding if the amount is variable (minAmount is lower as amount). // Otherwise we could get an amount lower then the minAmount set by rounding Coin roundedAmount = OfferUtil.getRoundedFiatAmount(dataModel.getAmount().get(), tradePrice, - dataModel.getCurrencyCode(), maxTradeLimit); + maxTradeLimit); dataModel.applyAmount(roundedAmount); } amount.set(btcFormatter.formatCoin(dataModel.getAmount().get())); @@ -566,7 +566,7 @@ private void setAmountToModel() { } else if (CurrencyUtil.isFiatCurrency(dataModel.getCurrencyCode()) && !isAmountEqualMinAmount(amount)) { // We only apply the rounding if the amount is variable (minAmount is lower as amount). // Otherwise we could get an amount lower then the minAmount set by rounding - amount = OfferUtil.getRoundedFiatAmount(amount, price, dataModel.getCurrencyCode(), maxTradeLimit); + amount = OfferUtil.getRoundedFiatAmount(amount, price, maxTradeLimit); } } dataModel.applyAmount(amount); @@ -577,6 +577,7 @@ private boolean isAmountEqualMinAmount(Coin amount) { return amount.value == offer.getMinAmount().value; } + /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// From e7c15da93bba560d9f79e85aaf44428a869b5e76 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Tue, 21 Aug 2018 12:38:40 +0200 Subject: [PATCH 4/4] Add script to update and re-configure OS for release --- package/linux/prepare-system.sh | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/linux/prepare-system.sh diff --git a/package/linux/prepare-system.sh b/package/linux/prepare-system.sh new file mode 100644 index 00000000000..7c87850b724 --- /dev/null +++ b/package/linux/prepare-system.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +cd $(dirname $0) + +echo Update OS + +sudo apt-get update +sudo apt-get upgrade +sudo apt-get dist-upgrade + +if [ ! -f "$JAVA_HOME/jre/lib/security/local_policy.jar" ] +then +echo "Enable strong crypto support for Java" + +wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip + +checksum=f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 # see https://github.com/jonathancross/jc-docs/blob/master/java-strong-crypto-test/README.md + +if ! echo "$checksum jce_policy-8.zip" | sha256sum -c -; +then + echo "Checksum failed" >&2 + exit 1 +fi + +unzip jce_policy-8.zip +sudo cp UnlimitedJCEPolicyJDK8/{US_export_policy.jar,local_policy.jar} $JAVA_HOME/jre/lib/security/ +sudo chmod 664 $JAVA_HOME/jre/lib/security/{US_export_policy.jar,local_policy.jar} +sudo rm -rf UnlimitedJCEPolicyJDK8 jce_policy-8.zip +else +echo "Strong Crypto support for Java already available" +fi + +bouncyCastleJar=bcprov-jdk15on-1.56.jar + +if [ ! -f "$JAVA_HOME/jre/lib/ext/$bouncyCastleJar" ] +then +echo Configure Bouncy Castle + +wget "http://central.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/$bouncyCastleJar" +sudo mv $bouncyCastleJar $JAVA_HOME/jre/lib/ext/ +sudo chmod 777 "$JAVA_HOME/jre/lib/ext/$bouncyCastleJar" +else +echo Bouncy Castle already configured +fi