mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Strip trailing whitespace
This commit is contained in:
parent
4e5fbb5f0b
commit
830932d93d
@ -67,7 +67,7 @@ public class SeedNode extends Thread {
|
||||
|
||||
@Override
|
||||
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistics) {
|
||||
// log.debug("Peer updated: peerAddress=" + peerAddress + ",
|
||||
// log.debug("Peer updated: peerAddress=" + peerAddress + ",
|
||||
// peerStatistics=" + peerStatistics);
|
||||
}
|
||||
});
|
||||
|
@ -99,7 +99,7 @@ class AddressBasedCoinSelector extends DefaultCoinSelector {
|
||||
// we accept network tx without confirmations and numBroadcastPeers > 0
|
||||
//confidence.getSource().equals(TransactionConfidence.Source.SELF) &&
|
||||
// In regtest mode we expect to have only one peer, so we won't see transactions propagate.
|
||||
// TODO: The value 1 below dates from a time when transactions we broadcast *to* were
|
||||
// TODO: The value 1 below dates from a time when transactions we broadcast *to* were
|
||||
// counted, set to 0
|
||||
(confidence.numBroadcastPeers() > 1 || tx.getParams() == RegTestParams.get());*/
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class FeePolicy {
|
||||
// Not used at the moment
|
||||
// private static final String registrationFeeAddress = "mvkDXt4QmN4Nq9dRUsRigBCaovde9nLkZR";
|
||||
|
||||
//
|
||||
//
|
||||
private static String createOfferFeeAddress;
|
||||
private static String takeOfferFeeAddress;
|
||||
|
||||
|
@ -32,8 +32,8 @@ public class Navigation {
|
||||
private static final Logger log = LoggerFactory.getLogger(Navigation.class);
|
||||
|
||||
|
||||
// New listeners can be added during iteration so we use CopyOnWriteArrayList to prevent invalid array
|
||||
// modification
|
||||
// New listeners can be added during iteration so we use CopyOnWriteArrayList to prevent invalid array
|
||||
// modification
|
||||
private final List<Listener> listeners = new CopyOnWriteArrayList<>();
|
||||
private final Persistence persistence;
|
||||
private Item[] currentItems;
|
||||
|
@ -86,7 +86,7 @@ public class InfoDisplay extends Parent {
|
||||
link = new Hyperlink(BSResources.get("shared.readMore"));
|
||||
link.setPadding(new Insets(0, 0, 0, -2));
|
||||
|
||||
// We need that to know if we have a wrapping or not.
|
||||
// We need that to know if we have a wrapping or not.
|
||||
// Did not find a way to get that from the API.
|
||||
Label testLabel = new Label();
|
||||
testLabel.textProperty().bind(text);
|
||||
@ -109,7 +109,7 @@ public class InfoDisplay extends Parent {
|
||||
};
|
||||
|
||||
|
||||
// when clicking "Read more..." we expand and change the link to the Help
|
||||
// when clicking "Read more..." we expand and change the link to the Help
|
||||
link.setOnAction(new EventHandler<ActionEvent>() {
|
||||
@Override
|
||||
public void handle(ActionEvent actionEvent) {
|
||||
@ -136,7 +136,7 @@ public class InfoDisplay extends Parent {
|
||||
sceneProperty().addListener((ov, oldValue, newValue) -> {
|
||||
if (oldValue == null && newValue != null && newValue.getWindow() != null) {
|
||||
newValue.getWindow().widthProperty().addListener(listener);
|
||||
// localToScene does deliver 0 instead of the correct x position when scene propery gets set,
|
||||
// localToScene does deliver 0 instead of the correct x position when scene propery gets set,
|
||||
// so we delay for 1 render cycle
|
||||
Platform.runLater(() -> {
|
||||
label.setVisible(true);
|
||||
|
@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
|
||||
* There can be only 1 errorMessageDisplays at a time we use static field for it.
|
||||
* The position is derived from the position of the textField itself or if set from the layoutReference node.
|
||||
*/
|
||||
//TODO There are some rare situation where it behaves buggy. Needs further investigation and improvements. Also
|
||||
//TODO There are some rare situation where it behaves buggy. Needs further investigation and improvements. Also
|
||||
// consider replacement with controlsFX components.
|
||||
public class InputTextField extends TextField {
|
||||
private static final Logger log = LoggerFactory.getLogger(InputTextField.class);
|
||||
|
@ -89,7 +89,7 @@ public class ChangePasswordViewCB extends CachedViewCB<ChangePasswordPM> impleme
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -138,7 +138,7 @@ class FiatAccountModel extends UIModel {
|
||||
reset();
|
||||
}
|
||||
|
||||
// We ask the user if he likes to add his own bank account country to the accepted country list if he has not
|
||||
// We ask the user if he likes to add his own bank account country to the accepted country list if he has not
|
||||
// already added it before
|
||||
void addCountryToAcceptedCountriesList() {
|
||||
settings.addAcceptedCountry(country.get());
|
||||
|
@ -130,7 +130,7 @@ public class FiatAccountViewCB extends CachedViewCB<FiatAccountPm> implements Co
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -150,7 +150,7 @@ public class IrcAccountViewCB extends CachedViewCB<IrcAccountPm> implements Cont
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -89,7 +89,7 @@ public class PasswordViewCB extends CachedViewCB<PasswordPM> implements ContextA
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -148,7 +148,7 @@ class RegistrationModel extends UIModel {
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Getters
|
||||
// Getters
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
WalletFacade getWalletFacade() {
|
||||
@ -169,7 +169,7 @@ class RegistrationModel extends UIModel {
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
// Private
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void updateBalance(@NotNull Coin balance) {
|
||||
|
@ -158,7 +158,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -178,7 +178,7 @@ class RestrictionsModel extends UIModel {
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
// Private
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void saveSettings() {
|
||||
|
@ -85,7 +85,7 @@ public class SeedWordsViewCB extends CachedViewCB<SeedWordsPM> implements Contex
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ContextAware implementation
|
||||
// ContextAware implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
|
@ -122,7 +122,7 @@ public class TransactionsViewCB extends CachedViewCB {
|
||||
Popups.openWarningPopup("Under construction",
|
||||
"This will open a details popup but that is not implemented yet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Cell factories
|
||||
|
@ -26,7 +26,7 @@ import java.util.ResourceBundle;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
// home is just hosting the arbiters buttons yet, but that's just for dev, not clear yet what will be in home,
|
||||
// home is just hosting the arbiters buttons yet, but that's just for dev, not clear yet what will be in home,
|
||||
// probably overview, event history, news, charts,... -> low prio
|
||||
public class HomeViewCB extends CachedViewCB {
|
||||
private static final Logger log = LoggerFactory.getLogger(HomeViewCB.class);
|
||||
|
@ -81,7 +81,7 @@ public class PortfolioViewCB extends CachedViewCB {
|
||||
if (newValue == offersTab)
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO, Navigation.Item.OFFERS);
|
||||
else if (newValue == pendingTradesTab)
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO,
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO,
|
||||
Navigation.Item.PENDING_TRADES);
|
||||
else if (newValue == closedTradesTab)
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO, Navigation.Item.CLOSED_TRADES);
|
||||
|
@ -331,4 +331,4 @@ class PendingTradesModel extends UIModel {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||
directionLabel.set(model.getDirection() == Direction.BUY ? BSResources.get("shared.buy") : BSResources.get
|
||||
("shared.sell"));
|
||||
|
||||
// apply only if valid
|
||||
// apply only if valid
|
||||
boolean amountValid = false;
|
||||
if (amount != null && isBtcInputValid(amount.toPlainString())
|
||||
.isValid) {
|
||||
@ -201,7 +201,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||
isPlaceOfferButtonVisible.set(true);
|
||||
}
|
||||
|
||||
// On focus out we do validation and apply the data to the model
|
||||
// On focus out we do validation and apply the data to the model
|
||||
void onFocusOutAmountTextField(Boolean oldValue, Boolean newValue, String userInput) {
|
||||
if (oldValue && !newValue) {
|
||||
InputValidator.ValidationResult result = isBtcInputValid(amount.get());
|
||||
@ -277,7 +277,7 @@ class CreateOfferPM extends PresentationModel<CreateOfferModel> {
|
||||
|
||||
calculateAmount();
|
||||
|
||||
// must be placed after calculateAmount (btc value has been adjusted in case the calculation leads to
|
||||
// must be placed after calculateAmount (btc value has been adjusted in case the calculation leads to
|
||||
// invalid decimal places for the amount value
|
||||
showWarningAdjustedVolume.set(!formatter.formatFiat(formatter.parseToFiatWith2Decimals(userInput))
|
||||
.equals(volume
|
||||
|
@ -70,7 +70,7 @@ import org.slf4j.LoggerFactory;
|
||||
import static javafx.beans.binding.Bindings.createStringBinding;
|
||||
|
||||
// TODO Implement other positioning method in InoutTextField to display it over the field instead of right side
|
||||
// priceAmountHBox is too large after redesign as to be used as layoutReference.
|
||||
// priceAmountHBox is too large after redesign as to be used as layoutReference.
|
||||
|
||||
public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||
private static final Logger log = LoggerFactory.getLogger(CreateOfferViewCB.class);
|
||||
@ -350,7 +350,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||
if (newValue) {
|
||||
overlayManager.blurContent();
|
||||
|
||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||
// our own actions.
|
||||
List<Action> actions = new ArrayList<>();
|
||||
/* actions.add(new AbstractAction(BSResources.get("shared.copyTxId")) {
|
||||
|
@ -82,7 +82,7 @@ class OfferBookPM extends PresentationModel<OfferBookModel> {
|
||||
fiatCode.bind(model.fiatCode);
|
||||
restrictionsInfo.bind(model.restrictionsInfo);
|
||||
|
||||
// Bidirectional bindings are used for all input fields: amount, price and volume
|
||||
// Bidirectional bindings are used for all input fields: amount, price and volume
|
||||
// We do volume/amount calculation during input, so user has immediate feedback
|
||||
amount.addListener((ov, oldValue, newValue) -> {
|
||||
if (isBtcInputValid(newValue).isValid) {
|
||||
|
@ -202,7 +202,7 @@ class TakeOfferPM extends PresentationModel<TakeOfferModel> {
|
||||
isTakeOfferButtonVisible.set(true);
|
||||
}
|
||||
|
||||
// On focus out we do validation and apply the data to the model
|
||||
// On focus out we do validation and apply the data to the model
|
||||
void onFocusOutAmountTextField(Boolean oldValue, Boolean newValue, String userInput) {
|
||||
if (oldValue && !newValue) {
|
||||
InputValidator.ValidationResult result = isBtcInputValid(amount.get());
|
||||
|
@ -324,7 +324,7 @@ public class TakeOfferViewCB extends CachedViewCB<TakeOfferPM> {
|
||||
if (newValue) {
|
||||
overlayManager.blurContent();
|
||||
|
||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||
// our own actions.
|
||||
List<Action> actions = new ArrayList<>();
|
||||
/* actions.add(new AbstractAction(BSResources.get("shared.copyTxId")) {
|
||||
|
@ -131,8 +131,8 @@ public class CountryUtil {
|
||||
return regionCode;
|
||||
}
|
||||
|
||||
// We use getAvailableLocales as we depend on display names (would be a bit painful with translations if handled
|
||||
// from a static list -or we find something ready made?).
|
||||
// We use getAvailableLocales as we depend on display names (would be a bit painful with translations if handled
|
||||
// from a static list -or we find something ready made?).
|
||||
private static List<Locale> getAllCountryLocales() {
|
||||
List<Locale> allLocales = Arrays.asList(Locale.getAvailableLocales());
|
||||
Set<Locale> allLocalesAsSet = allLocales.stream().filter(locale -> !"".equals(locale.getCountry()))
|
||||
|
@ -91,7 +91,7 @@ public class DHTManager extends AbstractActor {
|
||||
|
||||
@Override
|
||||
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistics) {
|
||||
// log.debug("Peer updated: peerAddress=" + peerAddress + ",
|
||||
// log.debug("Peer updated: peerAddress=" + peerAddress + ",
|
||||
// peerStatistics=" + peerStatistics);
|
||||
}
|
||||
});
|
||||
|
@ -33,7 +33,7 @@ import net.tomp2p.peers.PeerAddress;
|
||||
public class TomP2PPeer implements Peer, Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2022551056208230853L;
|
||||
|
||||
|
||||
private final PeerAddress peerAddress;
|
||||
|
||||
public TomP2PPeer(PeerAddress peerAddress) {
|
||||
|
@ -63,7 +63,7 @@ public class Trade implements Serializable {
|
||||
private State state;
|
||||
private Throwable fault;
|
||||
|
||||
// When serialized those transient properties are not instantiated, so we instantiate them in the getters at first
|
||||
// When serialized those transient properties are not instantiated, so we instantiate them in the getters at first
|
||||
// access. Only use the accessor not the private field.
|
||||
// TODO use ObjectProperties instead of BooleanProperty
|
||||
transient private BooleanProperty _payoutTxChanged;
|
||||
|
@ -62,7 +62,7 @@ public class VerifyOffer {
|
||||
|
||||
// TODO check balance
|
||||
// securityDeposit
|
||||
// Coin totalsToFund
|
||||
// Coin totalsToFund
|
||||
// getAddressInfoByTradeID(offerId)
|
||||
// TODO when offer is flattened continue here...
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class User implements Serializable {
|
||||
private KeyPair messageKeyPair;
|
||||
private String accountID;
|
||||
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// only temporary
|
||||
private List<BankAccount> _bankAccounts = new ArrayList<>();
|
||||
private BankAccount _currentBankAccount;
|
||||
@ -59,7 +59,7 @@ public class User implements Serializable {
|
||||
private final transient ObjectProperty<BankAccount> currentBankAccount = new SimpleObjectProperty<>();
|
||||
|
||||
public User() {
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// only temporary
|
||||
bankAccounts.addListener((ListChangeListener<BankAccount>) change ->
|
||||
_bankAccounts = new ArrayList<>(bankAccounts));
|
||||
@ -178,7 +178,7 @@ public class User implements Serializable {
|
||||
return currentBankAccount;
|
||||
}
|
||||
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// Used for serialisation (ObservableList cannot be serialized) -> serialisation will change anyway so that is
|
||||
// only temporary
|
||||
List<BankAccount> getSerializedBankAccounts() {
|
||||
return _bankAccounts;
|
||||
|
@ -55,7 +55,7 @@ public class ViewLoader {
|
||||
this(url, true);
|
||||
}
|
||||
|
||||
// TODO check relationship with CachedViewCB -> derive caching strategy, but there are some special cases where
|
||||
// TODO check relationship with CachedViewCB -> derive caching strategy, but there are some special cases where
|
||||
// we need an override, as caching is done manually in the client class
|
||||
public ViewLoader(URL url, boolean useCaching) {
|
||||
this.url = url;
|
||||
|
@ -83,7 +83,7 @@ public class BasicUsecasesInWANTest {
|
||||
|
||||
private String overrideBootStrapMode = "default"; // nat, relay
|
||||
|
||||
// In port forwarding mode the isSuccess returns false, but the DHT operations succeeded.
|
||||
// In port forwarding mode the isSuccess returns false, but the DHT operations succeeded.
|
||||
// Needs investigation why.
|
||||
private boolean ignoreSuccessTests = true;
|
||||
|
||||
@ -288,7 +288,7 @@ public class BasicUsecasesInWANTest {
|
||||
}
|
||||
}
|
||||
|
||||
// That test should succeed in port forwarding as we use the server seed node as receiver
|
||||
// That test should succeed in port forwarding as we use the server seed node as receiver
|
||||
@Test
|
||||
@Ignore
|
||||
public void testSendDirectPortForwarding() throws Exception {
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2012 Thomas Bocek
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
@ -82,7 +82,7 @@ public class UtilsDHT2 {
|
||||
}
|
||||
|
||||
public static PeerAddress createAddress(Number160 idSender, String inetSender, int tcpPortSender,
|
||||
int udpPortSender, boolean firewallUDP,
|
||||
int udpPortSender, boolean firewallUDP,
|
||||
boolean firewallTCP) throws UnknownHostException {
|
||||
InetAddress inetSend = InetAddress.getByName(inetSender);
|
||||
PeerSocketAddress peerSocketAddress = new PeerSocketAddress(inetSend, tcpPortSender, udpPortSender);
|
||||
@ -92,9 +92,9 @@ public class UtilsDHT2 {
|
||||
}
|
||||
|
||||
public static Message createDummyMessage(Number160 idSender, String inetSender, int tcpPortSendor,
|
||||
int udpPortSender, Number160 idRecipien, String inetRecipient,
|
||||
int udpPortSender, Number160 idRecipien, String inetRecipient,
|
||||
int tcpPortRecipient,
|
||||
int udpPortRecipient, byte command, Type type, boolean firewallUDP,
|
||||
int udpPortRecipient, byte command, Type type, boolean firewallUDP,
|
||||
boolean firewallTCP)
|
||||
throws UnknownHostException {
|
||||
Message message = new Message();
|
||||
|
Loading…
x
Reference in New Issue
Block a user