Skip to content

Commit

Permalink
Merge pull request #2707 from ManfredKarrer/fix-filter
Browse files Browse the repository at this point in the history
Use full address instead of hostname
  • Loading branch information
ManfredKarrer authored Apr 13, 2019
2 parents 8a3f42c + bb71fb1 commit 994da7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ private void applyFilterPredicate() {

boolean isIgnored(Offer offer) {
return preferences.getIgnoreTradersList().stream()
.anyMatch(i -> i.equals(offer.getMakerNodeAddress().getHostNameWithoutPostFix()));
.anyMatch(i -> i.equals(offer.getMakerNodeAddress().getFullAddress()));
}

boolean isOfferBanned(Offer offer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,7 @@ private void addContent() {
}

if (!nodesInputTextField.getText().isEmpty()) {
nodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(nodesInputTextField.getText())
.replace(":9999", "")
.replace(".onion", "")
.split(",")));
nodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(nodesInputTextField.getText()).split(",")));
}

if (!paymentAccountFilterInputTextField.getText().isEmpty()) {
Expand Down Expand Up @@ -234,24 +231,15 @@ private void addContent() {
}

if (!arbitratorsInputTextField.getText().isEmpty()) {
arbitrators = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(arbitratorsInputTextField.getText())
.replace(":9999", "")
.replace(".onion", "")
.split(",")));
arbitrators = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(arbitratorsInputTextField.getText()).split(",")));
}

if (!seedNodesInputTextField.getText().isEmpty()) {
seedNodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(seedNodesInputTextField.getText())
.replace(":9999", "")
.replace(".onion", "")
.split(",")));
seedNodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(seedNodesInputTextField.getText()).split(",")));
}

if (!priceRelayNodesInputTextField.getText().isEmpty()) {
priceRelayNodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(priceRelayNodesInputTextField.getText())
.replace(":9999", "")
.replace(".onion", "")
.split(",")));
priceRelayNodes = new ArrayList<>(Arrays.asList(StringUtils.deleteWhitespace(priceRelayNodesInputTextField.getText()).split(",")));
}

if (!btcNodesInputTextField.getText().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,7 @@ public BaseCurrencyNetwork fromString(String string) {
ignoreTradersListInputTextField = addInputTextField(root, ++gridRow,
Res.get("setting.preferences.ignorePeers"));
ignoreTradersListListener = (observable, oldValue, newValue) ->
preferences.setIgnoreTradersList(Arrays.asList(StringUtils.deleteWhitespace(newValue)
.replace(":9999", "").replace(".onion", "")
.split(",")));
preferences.setIgnoreTradersList(Arrays.asList(StringUtils.deleteWhitespace(newValue).split(",")));

// referralId
referralIdInputTextField = addInputTextField(root, ++gridRow, Res.get("setting.preferences.refererId"));
Expand Down

0 comments on commit 994da7f

Please sign in to comment.