Use full address instead of hostname

This commit is contained in:
Manfred Karrer 2019-04-13 10:58:17 -05:00
parent 8a3f42c572
commit bb71fb122b
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
3 changed files with 6 additions and 20 deletions

View File

@ -538,7 +538,7 @@ class OfferBookViewModel extends ActivatableViewModel {
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) {

View File

@ -203,10 +203,7 @@ public class FilterWindow extends Overlay<FilterWindow> {
}
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()) {
@ -234,24 +231,15 @@ public class FilterWindow extends Overlay<FilterWindow> {
}
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()) {

View File

@ -324,9 +324,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
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"));