mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-27 08:10:45 -04:00
Fix authentication issues, store address
This commit is contained in:
parent
f8adaaed62
commit
85427d7bde
22 changed files with 553 additions and 598 deletions
|
@ -183,21 +183,23 @@ class MainViewModel implements ViewModel {
|
|||
private BooleanProperty initP2PNetwork() {
|
||||
final BooleanProperty initialDataReady = new SimpleBooleanProperty();
|
||||
splashP2PNetworkInfo.set("Connecting to Tor network...");
|
||||
|
||||
p2PService.start(new P2PServiceListener() {
|
||||
@Override
|
||||
public void onTorNodeReady() {
|
||||
splashP2PNetworkInfo.set("Publishing Tor Hidden Service...");
|
||||
p2PNetworkInfo.set(splashP2PNetworkInfo.get());
|
||||
p2PNetworkIconId.set("image-connection-tor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHiddenServicePublished() {
|
||||
splashP2PNetworkInfo.set("Authenticating to a seed node...");
|
||||
p2PNetworkInfo.set(splashP2PNetworkInfo.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestingDataCompleted() {
|
||||
p2PNetworkInfo.set("Publishing Tor Hidden Service...");
|
||||
initialDataReady.set(true);
|
||||
}
|
||||
|
||||
|
@ -340,14 +342,14 @@ class MainViewModel implements ViewModel {
|
|||
|
||||
|
||||
// update nr of peers in footer
|
||||
p2PService.numAuthenticatedPeers.addListener((observable, oldValue, newValue) -> updateP2pNetworkInfo());
|
||||
p2PService.getNumAuthenticatedPeers().addListener((observable, oldValue, newValue) -> updateP2pNetworkInfo());
|
||||
|
||||
// now show app
|
||||
showAppScreen.set(true);
|
||||
}
|
||||
|
||||
private void updateP2pNetworkInfo() {
|
||||
p2PNetworkInfo.set("Nr. of authenticated connections: " + p2PService.numAuthenticatedPeers.get());
|
||||
p2PNetworkInfo.set("Nr. of authenticated connections: " + p2PService.getNumAuthenticatedPeers().get());
|
||||
}
|
||||
|
||||
private void displayAlertIfPresent(Alert alert) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package io.bitsquare.gui.main.market;
|
||||
|
||||
import io.bitsquare.common.UserThread;
|
||||
import io.bitsquare.common.util.Tuple2;
|
||||
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
||||
import io.bitsquare.gui.common.view.FxmlView;
|
||||
|
@ -134,7 +135,8 @@ public class MarketView extends ActivatableViewAndModel<TabPane, MarketViewModel
|
|||
newValue -> {
|
||||
String code = newValue.getCode();
|
||||
areaChart.setTitle("Offer book for " + newValue.getName());
|
||||
xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", " " + code + "/BTC"));
|
||||
xAxis.setLabel(priceColumnLabel.get());
|
||||
xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", ""));
|
||||
priceColumnLabel.set("Price (" + code + "/BTC)");
|
||||
volumeColumnLabel.set("Volume (" + code + ")");
|
||||
});
|
||||
|
@ -156,7 +158,7 @@ public class MarketView extends ActivatableViewAndModel<TabPane, MarketViewModel
|
|||
TableView<Offer> tableView = new TableView();
|
||||
|
||||
// price
|
||||
TableColumn<Offer, Offer> priceColumn = new TableColumn<>("Price (EUR/BTC)");
|
||||
TableColumn<Offer, Offer> priceColumn = new TableColumn<>();
|
||||
priceColumn.textProperty().bind(priceColumnLabel);
|
||||
priceColumn.setMinWidth(120);
|
||||
priceColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
|
||||
|
@ -237,7 +239,7 @@ public class MarketView extends ActivatableViewAndModel<TabPane, MarketViewModel
|
|||
|
||||
Label titleLabel = new Label(direction.equals(Offer.Direction.BUY) ? "Offers for buy bitcoin (bid)" : "Offers for sell bitcoin (ask)");
|
||||
titleLabel.setStyle("-fx-font-weight: bold; -fx-font-size: 16; -fx-alignment: center");
|
||||
titleLabel.prefWidthProperty().bind(tableView.widthProperty());
|
||||
UserThread.execute(() -> titleLabel.prefWidthProperty().bind(tableView.widthProperty()));
|
||||
|
||||
VBox vBox = new VBox();
|
||||
vBox.setSpacing(10);
|
||||
|
@ -252,13 +254,13 @@ public class MarketView extends ActivatableViewAndModel<TabPane, MarketViewModel
|
|||
xAxis = new NumberAxis();
|
||||
xAxis.setForceZeroInRange(false);
|
||||
xAxis.setAutoRanging(true);
|
||||
xAxis.setLabel("Price");
|
||||
xAxis.setLabel(priceColumnLabel.get());
|
||||
|
||||
yAxis = new NumberAxis();
|
||||
yAxis.setForceZeroInRange(false);
|
||||
yAxis.setAutoRanging(true);
|
||||
yAxis.setLabel("Amount");
|
||||
yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis, "", " BTC"));
|
||||
yAxis.setLabel("Amount in BTC");
|
||||
yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis, "", ""));
|
||||
|
||||
seriesBuy = new XYChart.Series();
|
||||
seriesBuy.setName("Offers for buy bitcoin ");
|
||||
|
|
|
@ -127,7 +127,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
|||
}
|
||||
|
||||
numAuthenticatedPeersChangeListener = (observable, oldValue, newValue) -> updateAuthenticatedPeersTextArea();
|
||||
p2PService.numAuthenticatedPeers.addListener(numAuthenticatedPeersChangeListener);
|
||||
p2PService.getNumAuthenticatedPeers().addListener(numAuthenticatedPeersChangeListener);
|
||||
updateAuthenticatedPeersTextArea();
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
|||
if (p2PServiceListener != null)
|
||||
p2PService.removeP2PServiceListener(p2PServiceListener);
|
||||
if (numAuthenticatedPeersChangeListener != null)
|
||||
p2PService.numAuthenticatedPeers.removeListener(numAuthenticatedPeersChangeListener);
|
||||
p2PService.getNumAuthenticatedPeers().removeListener(numAuthenticatedPeersChangeListener);
|
||||
}
|
||||
|
||||
private void updateAuthenticatedPeersTextArea() {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<logger name="org.bitcoinj.core.BitcoinSerializer" level="WARN"/>
|
||||
<logger name="org.bitcoinj.core.Peer" level="WARN"/>
|
||||
<logger name="org.bitcoinj.core.HeadersMessage" level="WARN"/>
|
||||
<logger name="org.bitcoinj.core.AbstractBlockChain" level="WARN"/>
|
||||
<logger name="org.bitcoinj.core.AbstractBlockChain" level="ERROR"/>
|
||||
|
||||
<!--
|
||||
<logger name="io.netty" level="OFF"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue