Cleanups: Remove outdated TODOs, fix typos

This commit is contained in:
chimp1984 2020-10-08 22:00:57 -05:00
parent 66740b7dc1
commit 39c8ade5ef
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
18 changed files with 7 additions and 44 deletions

View File

@ -128,7 +128,6 @@ public class Version {
'}');
}
//TODO move to consensus area
public static final byte COMPENSATION_REQUEST = (byte) 0x01;
public static final byte REIMBURSEMENT_REQUEST = (byte) 0x01;
public static final byte PROPOSAL = (byte) 0x01;

View File

@ -24,8 +24,5 @@ package bisq.common.consensus;
* Better to use the excludeFromJsonDataMap (annotated with @JsonExclude; used in PaymentAccountPayload) to
* add a key/value pair.
*/
// TODO PubKeyRing and NodeAddress (network) are using UsedForTradeContractJson that is why it is in common module,
// which is a bit weird... Maybe we need either rename common or split it to util and common where common is common code
// used in network and core?
public interface UsedForTradeContractJson {
}

View File

@ -48,7 +48,6 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// TODO is Hmac needed/make sense?
public class Encryption {
private static final Logger log = LoggerFactory.getLogger(Encryption.class);

View File

@ -55,7 +55,6 @@ import org.jetbrains.annotations.NotNull;
import static bisq.common.util.Preconditions.checkDir;
// TODO: use a password protection for key storage
@Singleton
public class KeyStorage {
private static final Logger log = LoggerFactory.getLogger(KeyStorage.class);

View File

@ -48,7 +48,6 @@ public abstract class NetworkEnvelope implements Envelope {
return getNetworkEnvelopeBuilder().build();
}
// todo remove
public protobuf.NetworkEnvelope toProtoNetworkEnvelope() {
return getNetworkEnvelopeBuilder().build();
}

View File

@ -52,7 +52,6 @@ import javax.annotation.Nullable;
import static com.google.common.base.Preconditions.checkNotNull;
// TODO use dao parameters for fee
@Slf4j
public class FeeService {

View File

@ -157,7 +157,7 @@ public final class ArbitrationManager extends DisputeManager<ArbitrationDisputeL
@Override
protected String getDisputeInfo(Dispute dispute) {
String role = Res.get("shared.arbitrator").toLowerCase();
String link = "https://docs.bisq.network/trading-rules.html#legacy-arbitration"; //TODO needs to be created
String link = "https://docs.bisq.network/trading-rules.html#legacy-arbitration";
return Res.get("support.initialInfo", role, role, link);
}

View File

@ -78,9 +78,6 @@ public class AddressTextField extends AnchorPane {
});
textField.focusTraversableProperty().set(focusTraversableProperty().get());
//TODO app wide focus
//focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());
Label extWalletIcon = new Label();
extWalletIcon.setLayoutY(3);
extWalletIcon.getStyleClass().addAll("icon", "highlight");

View File

@ -74,9 +74,6 @@ public class BsqAddressTextField extends AnchorPane {
});
textField.focusTraversableProperty().set(focusTraversableProperty().get());
//TODO app wide focus
//focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());
Label copyIcon = new Label();
copyIcon.setLayoutY(3);

View File

@ -79,9 +79,6 @@ public class TextFieldWithCopyIcon extends AnchorPane {
AnchorPane.setRightAnchor(textField, 30.0);
AnchorPane.setLeftAnchor(textField, 0.0);
textField.focusTraversableProperty().set(focusTraversableProperty().get());
//TODO app wide focus
//focusedProperty().addListener((ov, oldValue, newValue) -> textField.requestFocus());
getChildren().addAll(textField, copyIcon);
}

View File

@ -64,8 +64,6 @@ import static bisq.desktop.util.FormBuilder.addMultilineLabel;
import static bisq.desktop.util.FormBuilder.addTitledGroupBg;
import static bisq.desktop.util.FormBuilder.addTopLabelTextField;
// TODO translation string keys should renamed to be more generic.
// Lets do it for 1.1.7 the translator have time to add new string.
public abstract class AgentRegistrationView<R extends DisputeAgent, T extends AgentRegistrationViewModel<R, ?>>
extends ActivatableViewAndModel<VBox, T> {

View File

@ -298,7 +298,7 @@ public class SpreadView extends ActivatableViewAndModel<GridPane, SpreadViewMode
public void updateItem(final SpreadItem item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
// TODO maybe show exra colums with item.priceSpread and use real amount diff
// TODO maybe show extra columns with item.priceSpread and use real amount diff
// not % based
if (item.priceSpread != null)
setText(item.percentage);

View File

@ -172,7 +172,7 @@ class SpreadViewModel extends ActivatableViewModel {
else
spread = bestBuyOfferPrice.subtract(bestSellOfferPrice);
// TODO maybe show extra colums with spread and use real amount diff
// TODO maybe show extra columns with spread and use real amount diff
// not % based. e.g. diff between best buy and sell offer (of small amounts its a smaller gain)
if (spread != null && marketPrice != null && marketPrice.isPriceAvailable()) {

View File

@ -332,7 +332,7 @@ public class FormBuilder {
final Tuple2<Label, VBox> topLabelWithVBox = addTopLabelWithVBox(gridPane, rowIndex, title, textField, top);
// TOD not 100% sure if that is a good idea....
// TODO not 100% sure if that is a good idea....
//topLabelWithVBox.first.getStyleClass().add("jfx-text-field-top-label");
return new Tuple3<>(topLabelWithVBox.first, textField, topLabelWithVBox.second);

View File

@ -20,30 +20,15 @@ package bisq.monitor.metric;
import bisq.monitor.Metric;
import bisq.monitor.Reporter;
import bisq.asset.Asset;
import bisq.asset.AssetRegistry;
import bisq.network.p2p.storage.payload.ProtectedStoragePayload;
import org.berndpruenster.netlayer.tor.TorCtlException;
import com.runjva.sourceforge.jsocks.protocol.SocksSocket;
import java.net.HttpURLConnection;
import java.net.Socket;
import java.net.URL;
import java.net.URLConnection;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
@ -110,7 +95,6 @@ public class MarketStats extends Metric {
} catch (IllegalStateException ignore) {
// no match found
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

View File

@ -159,7 +159,6 @@ public class PriceNodeStats extends Metric {
}
}
} catch (TorCtlException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

View File

@ -21,6 +21,7 @@ import bisq.monitor.Metric;
import bisq.monitor.OnionParser;
import bisq.monitor.Reporter;
import bisq.monitor.StatisticsHelper;
import bisq.network.p2p.NodeAddress;
import org.berndpruenster.netlayer.tor.Tor;
@ -33,6 +34,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
@ -84,7 +86,6 @@ public class TorRoundTripTime extends Metric {
reporter.report(StatisticsHelper.process(samples), getName());
}
} catch (TorCtlException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

View File

@ -58,7 +58,6 @@ public class TorStartupTime extends Metric {
try {
torOverrides = new Torrc(overrides);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@ -79,7 +78,6 @@ public class TorStartupTime extends Metric {
// stop the timer and set its timestamp
reporter.report(System.currentTimeMillis() - start, getName());
} catch (TorCtlException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
// cleanup