Dont use referrer url for block explorer calls

This commit is contained in:
Manfred Karrer 2019-02-21 16:21:38 -05:00
parent 544f065b89
commit f2e9e1e887
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
7 changed files with 11 additions and 9 deletions

View file

@ -616,12 +616,12 @@ public class BsqTxView extends ActivatableView<GridPane, Void> implements BsqBal
private void openTxInBlockExplorer(BsqTxListItem item) {
if (item.getTxId() != null)
GUIUtil.openWebPage(preferences.getBsqBlockChainExplorer().txUrl + item.getTxId());
GUIUtil.openWebPage(preferences.getBsqBlockChainExplorer().txUrl + item.getTxId(), false);
}
private void openAddressInBlockExplorer(BsqTxListItem item) {
if (item.getAddress() != null) {
GUIUtil.openWebPage(preferences.getBsqBlockChainExplorer().addressUrl + item.getAddress());
GUIUtil.openWebPage(preferences.getBsqBlockChainExplorer().addressUrl + item.getAddress(), false);
}
}
}

View file

@ -286,7 +286,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
private void openBlockExplorer(DepositListItem item) {
if (item.getAddressString() != null)
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString());
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString(), false);
}
///////////////////////////////////////////////////////////////////////////////////////////

View file

@ -181,7 +181,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
}
private void openBlockExplorer(LockedListItem item) {
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString());
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString(), false);
}
private Optional<Tradable> getTradable(LockedListItem item) {

View file

@ -181,7 +181,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
}
private void openBlockExplorer(ReservedListItem item) {
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString());
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString(), false);
}
private Optional<Tradable> getTradable(ReservedListItem item) {

View file

@ -286,7 +286,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
private void openAddressInBlockExplorer(TransactionsListItem item) {
if (item.getAddressString() != null) {
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString());
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString(), false);
}
}

View file

@ -436,7 +436,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
private void openBlockExplorer(WithdrawalListItem item) {
if (item.getAddressString() != null)
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString());
GUIUtil.openWebPage(preferences.getBlockChainExplorer().addressUrl + item.getAddressString(), false);
}

View file

@ -589,10 +589,12 @@ public class GUIUtil {
}
}
public static void openWebPage(String target) {
openWebPage(target, true);
}
if (target.contains("bisq.network")) {
public static void openWebPage(String target, boolean useReferrer) {
if (useReferrer && target.contains("bisq.network")) {
// add utm parameters
target = appendURI(target, "utm_source=desktop-client&utm_medium=in-app-link&utm_campaign=language_" +
preferences.getUserLanguage());