Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v1.7.2 #5638

Merged
merged 20 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apitest/src/main/java/bisq/apitest/config/BisqAppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public enum BisqAppConfig {
49998),
alicedesktop("bisq-BTC_REGTEST_Alice_dao",
"bisq-desktop",
"-XX:MaxRAM=4g -Dlogback.configurationFile=apitest/build/resources/main/logback.xml",
"-XX:MaxRAM=8g -Dlogback.configurationFile=apitest/build/resources/main/logback.xml",
BisqAppMain.class.getName(),
7777,
5122,
Expand All @@ -82,7 +82,7 @@ public enum BisqAppConfig {
49999),
bobdesktop("bisq-BTC_REGTEST_Bob_dao",
"bisq-desktop",
"-XX:MaxRAM=4g -Dlogback.configurationFile=apitest/build/resources/main/logback.xml",
"-XX:MaxRAM=8g -Dlogback.configurationFile=apitest/build/resources/main/logback.xml",
BisqAppMain.class.getName(),
8888,
5123,
Expand Down
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ configure([project(':cli'),
if (applicationName == 'desktop') {
def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4g"')
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=8g -Xss1280k -XX:+UseG1GC ' +
'-XX:MaxHeapFreeRatio=10 -XX:MinHeapFreeRatio=5 -XX:+UseStringDeduplication ' +
'-Djava.net.preferIPv4Stack=true"')
}

if (applicationName == 'apitest') {
Expand Down Expand Up @@ -412,7 +414,7 @@ configure(project(':desktop')) {
modules = ['javafx.controls', 'javafx.fxml']
}

version = '1.7.1-SNAPSHOT'
version = '1.7.2-SNAPSHOT'

jar.manifest.attributes(
"Implementation-Title": project.name,
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/bisq/common/app/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public class Version {
// VERSION = 0.5.0 introduces proto buffer for the P2P network and local DB and is a not backward compatible update
// Therefore all sub versions start again with 1
// We use semantic versioning with major, minor and patch
public static final String VERSION = "1.7.1";
public static final String VERSION = "1.7.2";

/**
* Holds a list of the tagged resource files for optimizing the getData requests.
* This must not contain each version but only those where we add new version-tagged resource files for
* historical data stores.
*/
public static final List<String> HISTORICAL_RESOURCE_FILE_VERSION_TAGS = Arrays.asList("1.4.0", "1.5.0", "1.5.2",
"1.5.5", "1.5.7", "1.6.0", "1.6.3", "1.6.5");
"1.5.5", "1.5.7", "1.6.0", "1.6.3", "1.6.5", "1.7.2");

public static int getMajorVersion(String version) {
return getSubVersion(version, 0);
Expand Down
9 changes: 9 additions & 0 deletions core/src/main/java/bisq/core/locale/CurrencyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,15 @@ public static List<TradeCurrency> getAllAmazonGiftCardCurrencies() {
return currencies;
}

public static List<TradeCurrency> getAllCapitualCurrencies() {
return new ArrayList<>(Arrays.asList(
new FiatCurrency("BRL"),
new FiatCurrency("EUR"),
new FiatCurrency("GBP"),
new FiatCurrency("USD")
));
}

// https://www.revolut.com/help/getting-started/exchanging-currencies/what-fiat-currencies-are-supported-for-holding-and-exchange
public static List<TradeCurrency> getAllRevolutCurrencies() {
ArrayList<TradeCurrency> currencies = new ArrayList<>(Arrays.asList(
Expand Down
46 changes: 46 additions & 0 deletions core/src/main/java/bisq/core/payment/CapitualAccount.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/

package bisq.core.payment;

import bisq.core.locale.CurrencyUtil;
import bisq.core.payment.payload.CapitualAccountPayload;
import bisq.core.payment.payload.PaymentAccountPayload;
import bisq.core.payment.payload.PaymentMethod;

import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
public final class CapitualAccount extends PaymentAccount {
public CapitualAccount() {
super(PaymentMethod.CAPITUAL);
tradeCurrencies.addAll(CurrencyUtil.getAllCapitualCurrencies());
}

@Override
protected PaymentAccountPayload createPayload() {
return new CapitualAccountPayload(paymentMethod.getId(), id);
}

public void setAccountNr(String accountNr) {
((CapitualAccountPayload) paymentAccountPayload).setAccountNr(accountNr);
}

public String getAccountNr() {
return ((CapitualAccountPayload) paymentAccountPayload).getAccountNr();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public static PaymentAccount getPaymentAccount(PaymentMethod paymentMethod) {
return new AmazonGiftCardAccount();
case PaymentMethod.BLOCK_CHAINS_INSTANT_ID:
return new InstantCryptoCurrencyAccount();
case PaymentMethod.CAPITUAL_ID:
return new CapitualAccount();

// Cannot be deleted as it would break old trade history entries
case PaymentMethod.OK_PAY_ID:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* This file is part of Bisq.
*
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/

package bisq.core.payment.payload;

import bisq.core.locale.Res;

import com.google.protobuf.Message;

import java.nio.charset.StandardCharsets;

import java.util.HashMap;
import java.util.Map;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

@EqualsAndHashCode(callSuper = true)
@ToString
@Setter
@Getter
@Slf4j
public final class CapitualAccountPayload extends PaymentAccountPayload {
private String accountNr = "";

public CapitualAccountPayload(String paymentMethod, String id) {
super(paymentMethod, id);
}


///////////////////////////////////////////////////////////////////////////////////////////
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////

private CapitualAccountPayload(String paymentMethod,
String id,
String accountNr,
long maxTradePeriod,
Map<String, String> excludeFromJsonDataMap) {
super(paymentMethod,
id,
maxTradePeriod,
excludeFromJsonDataMap);

this.accountNr = accountNr;
}

@Override
public Message toProtoMessage() {
return getPaymentAccountPayloadBuilder()
.setCapitualAccountPayload(protobuf.CapitualAccountPayload.newBuilder()
.setAccountNr(accountNr))
.build();
}

public static CapitualAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
return new CapitualAccountPayload(proto.getPaymentMethodId(),
proto.getId(),
proto.getCapitualAccountPayload().getAccountNr(),
proto.getMaxTradePeriod(),
new HashMap<>(proto.getExcludeFromJsonDataMap()));
}

///////////////////////////////////////////////////////////////////////////////////////////
// API
///////////////////////////////////////////////////////////////////////////////////////////

@Override
public String getPaymentDetails() {
return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.capitual.cap") + " " + accountNr;
}

@Override
public String getPaymentDetailsForTradePopup() {
return getPaymentDetails();
}

@Override
public byte[] getAgeWitnessInputData() {
return super.getAgeWitnessInputData(accountNr.getBytes(StandardCharsets.UTF_8));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
public static final String AMAZON_GIFT_CARD_ID = "AMAZON_GIFT_CARD";
public static final String BLOCK_CHAINS_INSTANT_ID = "BLOCK_CHAINS_INSTANT";
public static final String CASH_BY_MAIL_ID = "CASH_BY_MAIL";
public static final String CAPITUAL_ID = "CAPITUAL";

// Cannot be deleted as it would break old trade history entries
@Deprecated
Expand Down Expand Up @@ -140,6 +141,7 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
public static PaymentMethod AMAZON_GIFT_CARD;
public static PaymentMethod BLOCK_CHAINS_INSTANT;
public static PaymentMethod CASH_BY_MAIL;
public static PaymentMethod CAPITUAL;

// Cannot be deleted as it would break old trade history entries
@Deprecated
Expand Down Expand Up @@ -191,6 +193,8 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
PERFECT_MONEY = new PaymentMethod(PERFECT_MONEY_ID, DAY, DEFAULT_TRADE_LIMIT_LOW_RISK),
ADVANCED_CASH = new PaymentMethod(ADVANCED_CASH_ID, DAY, DEFAULT_TRADE_LIMIT_VERY_LOW_RISK),
TRANSFERWISE = new PaymentMethod(TRANSFERWISE_ID, 4 * DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK),
CAPITUAL = new PaymentMethod(CAPITUAL_ID, DAY, DEFAULT_TRADE_LIMIT_HIGH_RISK),


// Japan
JAPAN_BANK = new PaymentMethod(JAPAN_BANK_ID, DAY, DEFAULT_TRADE_LIMIT_LOW_RISK),
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/bisq/core/proto/CoreProtoResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import bisq.core.payment.payload.AliPayAccountPayload;
import bisq.core.payment.payload.AmazonGiftCardAccountPayload;
import bisq.core.payment.payload.AustraliaPayidPayload;
import bisq.core.payment.payload.CapitualAccountPayload;
import bisq.core.payment.payload.CashAppAccountPayload;
import bisq.core.payment.payload.CashByMailAccountPayload;
import bisq.core.payment.payload.CashDepositAccountPayload;
Expand Down Expand Up @@ -159,6 +160,8 @@ public PaymentAccountPayload fromProto(protobuf.PaymentAccountPayload proto) {
return AmazonGiftCardAccountPayload.fromProto(proto);
case INSTANT_CRYPTO_CURRENCY_ACCOUNT_PAYLOAD:
return InstantCryptoCurrencyPayload.fromProto(proto);
case CAPITUAL_ACCOUNT_PAYLOAD:
return CapitualAccountPayload.fromProto(proto);

// Cannot be deleted as it would break old trade history entries
case O_K_PAY_ACCOUNT_PAYLOAD:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void startAckTimer() {
this.setArrived(false);
this.setAckError(Res.get("support.errorTimeout"));
}
}, 5, TimeUnit.SECONDS);
}, 60, TimeUnit.SECONDS);
}

public ReadOnlyBooleanProperty acknowledgedProperty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ private enum PaymentMethodMapper {
BLOCK_CHAINS_INSTANT,
TRANSFERWISE,
AMAZON_GIFT_CARD,
CASH_BY_MAIL
CASH_BY_MAIL,
CAPITUAL
}

@Getter
Expand Down
7 changes: 6 additions & 1 deletion core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3268,6 +3268,7 @@ payment.select.altcoin=Select or search Altcoin
payment.secret=Secret question
payment.answer=Answer
payment.wallet=Wallet ID
payment.capitual.cap=CAP Code
payment.amazon.site=Buy giftcard at
payment.ask=Ask in Trader Chat
payment.uphold.accountId=Username or email or phone no.
Expand Down Expand Up @@ -3481,7 +3482,6 @@ payment.amazonGiftCard.info=To pay with Amazon eGift Card, you will need to send
to tell your trading peer the reference text you picked so they can verify your payment)\n\
- Amazon eGift Cards can only be redeemed on the Amazon website they were purchased on (e.g., a gift card purchased on amazon.it can only be redeemed on amazon.it)


# We use constants from the code so we do not use our normal naming convention
# dynamic values are not recognized by IntelliJ

Expand Down Expand Up @@ -3564,6 +3564,8 @@ TRANSFERWISE=TransferWise
AMAZON_GIFT_CARD=Amazon eGift Card
# suppress inspection "UnusedProperty"
BLOCK_CHAINS_INSTANT=Altcoins Instant
# suppress inspection "UnusedProperty"
CAPITUAL=Capitual

# Deprecated: Cannot be deleted as it would break old trade history entries
# suppress inspection "UnusedProperty"
Expand Down Expand Up @@ -3616,6 +3618,8 @@ TRANSFERWISE_SHORT=TransferWise
AMAZON_GIFT_CARD_SHORT=Amazon eGift Card
# suppress inspection "UnusedProperty"
BLOCK_CHAINS_INSTANT_SHORT=Altcoins Instant
# suppress inspection "UnusedProperty"
CAPITUAL_SHORT=Capitual

# Deprecated: Cannot be deleted as it would break old trade history entries
# suppress inspection "UnusedProperty"
Expand Down Expand Up @@ -3706,3 +3710,4 @@ validation.phone.tooManyDigits=There are too many digits in {0} to be a valid ph
validation.phone.invalidDialingCode=Country dialing code for number {0} is invalid for country {1}. \
The correct dialing code is {2}.
validation.invalidAddressList=Must be comma separated list of valid addresses
validation.capitual.invalidFormat=Must be a valid CAP code of format: CAP-XXXXXX (6 alphanumeric characters)
16 changes: 10 additions & 6 deletions core/src/main/resources/i18n/displayStrings_cs.properties
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ shared.noDateAvailable=Žádné datum není k dispozici
shared.noDetailsAvailable=Detaily nejsou k dispozici
shared.notUsedYet=Ještě nepoužito
shared.date=Datum
shared.sendFundsDetailsWithFee=Odesílání: {0}\nZ adresy: {1}\nNa přijímací adresu: {2}.\nPožadovaný poplatek za těžbu je: {3} ({4} satoshi/vbyte)\nTransakční vsize: {5} vKb\n\nPříjemce obdrží: {6}\n\nOpravdu chcete tuto částku vybrat?
shared.sendFundsDetailsWithFee=Odesíláno: {0}\nZ adresy: {1}\nNa přijímací adresu: {2}\nPožadovaný poplatek za těžbu je: {3} ({4} satoshi/vbyte)\nTransakční vsize: {5} vKb\n\nPříjemce obdrží: {6}\n\nOpravdu chcete tuto částku vybrat?
# suppress inspection "TrailingSpacesInProperty"
shared.sendFundsDetailsDust=Bisq zjistil, že tato transakce by vytvořila drobné mince, které jsou pod limitem drobných mincí (a není to povoleno pravidly pro bitcoinový konsenzus). Místo toho budou tyto drobné mince ({0} satoshi {1}) přidány k poplatku za těžbu.\n\n\n
shared.copyToClipboard=Kopírovat do schránky
Expand Down Expand Up @@ -790,8 +790,8 @@ portfolio.pending.mediationRequested=Mediace požádána
portfolio.pending.refundRequested=Požadováno vrácení peněz
portfolio.pending.openSupport=Otevřít úkol pro podporu
portfolio.pending.supportTicketOpened=Úkol pro podporu otevřen
portfolio.pending.communicateWithArbitrator=Komunikujte prosím na obrazovce \"Podpora\" s rozhodcem.
portfolio.pending.communicateWithMediator=Komunikujte prosím na obrazovce \"Podpora\" s mediátorem.
portfolio.pending.communicateWithArbitrator=Komunikujte prosím s rozhodcem na obrazovce \"Podpora\".
portfolio.pending.communicateWithMediator=Komunikujte prosím s mediátorem na obrazovce \"Podpora\".
portfolio.pending.disputeOpenedMyUser=Už jste otevřeli spor.\n{0}
portfolio.pending.disputeOpenedByPeer=Váš obchodní partner otevřel spor\n{0}
portfolio.pending.noReceiverAddressDefined=Není definována žádná adresa příjemce
Expand Down Expand Up @@ -821,6 +821,7 @@ portfolio.pending.failedTrade.txChainValid.moveToFailed=Obchodní protokol naraz
portfolio.pending.failedTrade.moveTradeToFailedIcon.tooltip=Přesuňte obchod do neúspěšných obchodů
portfolio.pending.failedTrade.warningIcon.tooltip=Kliknutím otevřete podrobnosti o problémech tohoto obchodu
portfolio.failed.revertToPending.popup=Chcete přesunout tento obchod do otevřených obchodů?
portfolio.failed.revertToPending.failed=Chyba při přesouvání tohoto obchodu mezi otevřené obchody.
portfolio.failed.revertToPending=Přesunout obchod do otevřených obchodů

portfolio.closed.completed=Dokončeno
Expand Down Expand Up @@ -941,6 +942,7 @@ support.sigCheck.popup.failed=Ověření podpisu selhalo
support.sigCheck.popup.invalidFormat=Zpráva nemá očekávaný formát. Zkopírujte a vložte souhrnnou zprávu ze sporu.

support.reOpenByTrader.prompt=Opravdu chcete spor znovu otevřít?
support.reOpenByTrader.failed=Chyba při znovuotevírání sporu.
support.reOpenButton.label=Znovu otevřít
support.sendNotificationButton.label=Soukromé oznámení
support.reportButton.label=Zpráva
Expand Down Expand Up @@ -2417,6 +2419,8 @@ popup.accountSigning.unsignedPubKeys.signed=Pubkeys byly podepsány
popup.accountSigning.unsignedPubKeys.result.signed=Podepsané pubkeys
popup.accountSigning.unsignedPubKeys.result.failed=Nepodařilo se podepsat

popup.info.torMigration.msg=Váš klient Bisq aktuálně používá adresu Tor v2. Podpora Tor v2 bude brzy ukončena [HYPERLINK:https://blog.torproject.org/v2-deprecation-timeline]. Bisq klienty s adresami Tor v2 nebudou moci od 15. srpna 2021 obchodovat.\n\nPřepněte prosím svůj Bisq klient na adresu Tor v3. Je to rychlé a jednoduché - viz podrobnosti v tomto dokumentu [HYPERLINK:https://bisq.wiki/Changing_your_onion_address] nebo v tomto videu [HYPERLINK:https://bitcointv.com/videos/watch/f96adc20-4092-4253-84c0-1b18088b4b95]. \n\nPřed provedením upgradu si nejprve zazálohujte datový adresář.

####################################################################
# Notifications
####################################################################
Expand Down Expand Up @@ -2516,8 +2520,8 @@ addressTextField.addressCopiedToClipboard=Adresa byla zkopírována do schránky
addressTextField.openWallet.failed=Otevření výchozí bitcoinové peněženky se nezdařilo. Možná nemáte žádnou nainstalovanou?

explorerAddressTextField.copyToClipboard=Zkopírujte adresu do schránky
explorerAddressTextField.blockExplorerIcon.tooltip=Open a blockchain explorer with this address
explorerAddressTextField.missingTx.warning.tooltip=Missing required address
explorerAddressTextField.blockExplorerIcon.tooltip=Otevřít blockchain explorer s touto adresou
explorerAddressTextField.missingTx.warning.tooltip=Je vyžadována adresa

peerInfoIcon.tooltip={0}\nŠtítek: {1}

Expand All @@ -2531,7 +2535,7 @@ txIdTextField.missingTx.warning.tooltip=Chybí požadovaná transakce
####################################################################

navigation.account=\"Účet\"
navigation.account.walletSeed=\"Účet/Seed peněženky\"
navigation.account.backup=\"Účet/Záloha\"
navigation.funds.availableForWithdrawal=\"Prostředky/Odeslat prostředky\"
navigation.portfolio.myOpenOffers=\"Portfolio/Moje otevřené nabídky\"
navigation.portfolio.pending=\"Portfolio/Otevřené obchody\"
Expand Down
Loading