mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-18 19:28:08 -04:00
rename services and objects from Monero to Xmr for consistency
This commit is contained in:
parent
497f987541
commit
644bb72957
52 changed files with 334 additions and 334 deletions
|
@ -29,7 +29,7 @@ import haveno.common.util.Tuple2;
|
|||
import haveno.core.account.sign.SignedWitnessService;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.alert.PrivateNotificationManager;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.api.XmrConnectionService;
|
||||
import haveno.core.app.HavenoSetup;
|
||||
import haveno.core.locale.CryptoCurrency;
|
||||
import haveno.core.locale.CurrencyUtil;
|
||||
|
@ -103,7 +103,7 @@ import java.util.concurrent.TimeUnit;
|
|||
@Slf4j
|
||||
public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener {
|
||||
private final HavenoSetup havenoSetup;
|
||||
private final CoreMoneroConnectionsService connectionService;
|
||||
private final XmrConnectionService xmrConnectionService;
|
||||
private final User user;
|
||||
private final BalancePresentation balancePresentation;
|
||||
private final TradePresentation tradePresentation;
|
||||
|
@ -147,7 +147,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
|||
|
||||
@Inject
|
||||
public MainViewModel(HavenoSetup havenoSetup,
|
||||
CoreMoneroConnectionsService connectionService,
|
||||
XmrConnectionService xmrConnectionService,
|
||||
XmrWalletService xmrWalletService,
|
||||
User user,
|
||||
BalancePresentation balancePresentation,
|
||||
|
@ -171,7 +171,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
|||
CorruptedStorageFileHandler corruptedStorageFileHandler,
|
||||
Navigation navigation) {
|
||||
this.havenoSetup = havenoSetup;
|
||||
this.connectionService = connectionService;
|
||||
this.xmrConnectionService = xmrConnectionService;
|
||||
this.user = user;
|
||||
this.balancePresentation = balancePresentation;
|
||||
this.tradePresentation = tradePresentation;
|
||||
|
@ -359,7 +359,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
|||
havenoSetup.setDisplaySecurityRecommendationHandler(key -> {});
|
||||
havenoSetup.setDisplayLocalhostHandler(key -> {
|
||||
if (!DevEnv.isDevMode()) {
|
||||
Popup popup = new Popup().backgroundInfo(Res.get("popup.moneroLocalhostNode.msg"))
|
||||
Popup popup = new Popup().backgroundInfo(Res.get("popup.xmrLocalNode.msg"))
|
||||
.dontShowAgainId(key);
|
||||
popup.setDisplayOrderPriority(5);
|
||||
popupQueue.add(popup);
|
||||
|
|
|
@ -20,7 +20,7 @@ package haveno.desktop.main.funds.transactions;
|
|||
import com.googlecode.jcsv.writer.CSVEntryConverter;
|
||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||
import haveno.common.util.Utilities;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.api.XmrConnectionService;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.offer.OpenOffer;
|
||||
import haveno.core.trade.Trade;
|
||||
|
@ -110,7 +110,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
|||
@Inject
|
||||
private TransactionsView(XmrWalletService xmrWalletService,
|
||||
P2PService p2PService,
|
||||
CoreMoneroConnectionsService connectionService,
|
||||
XmrConnectionService xmrConnectionService,
|
||||
Preferences preferences,
|
||||
TradeDetailsWindow tradeDetailsWindow,
|
||||
OfferDetailsWindow offerDetailsWindow,
|
||||
|
|
|
@ -553,7 +553,7 @@ abstract class OfferBookViewModel extends ActivatableViewModel {
|
|||
|
||||
boolean canCreateOrTakeOffer() {
|
||||
return GUIUtil.canCreateOrTakeOfferOrShowPopup(user, navigation) &&
|
||||
GUIUtil.isChainHeightSyncedWithinToleranceOrShowPopup(openOfferManager.getConnectionsService()) &&
|
||||
GUIUtil.isChainHeightSyncedWithinToleranceOrShowPopup(openOfferManager.getXmrConnectionService()) &&
|
||||
GUIUtil.isBootstrappedOrShowPopup(p2PService);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import haveno.common.handlers.FaultHandler;
|
|||
import haveno.common.handlers.ResultHandler;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.api.CoreDisputesService;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.api.XmrConnectionService;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.offer.OfferDirection;
|
||||
|
@ -89,7 +89,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
public final ArbitrationManager arbitrationManager;
|
||||
public final MediationManager mediationManager;
|
||||
private final P2PService p2PService;
|
||||
private final CoreMoneroConnectionsService connectionService;
|
||||
private final XmrConnectionService xmrConnectionService;
|
||||
@Getter
|
||||
private final AccountAgeWitnessService accountAgeWitnessService;
|
||||
public final Navigation navigation;
|
||||
|
@ -129,7 +129,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
TraderChatManager traderChatManager,
|
||||
Preferences preferences,
|
||||
P2PService p2PService,
|
||||
CoreMoneroConnectionsService connectionService,
|
||||
XmrConnectionService xmrConnectionService,
|
||||
AccountAgeWitnessService accountAgeWitnessService,
|
||||
Navigation navigation,
|
||||
WalletPasswordWindow walletPasswordWindow,
|
||||
|
@ -145,7 +145,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
this.traderChatManager = traderChatManager;
|
||||
this.preferences = preferences;
|
||||
this.p2PService = p2PService;
|
||||
this.connectionService = connectionService;
|
||||
this.xmrConnectionService = xmrConnectionService;
|
||||
this.accountAgeWitnessService = accountAgeWitnessService;
|
||||
this.navigation = navigation;
|
||||
this.walletPasswordWindow = walletPasswordWindow;
|
||||
|
@ -544,7 +544,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
|||
}
|
||||
|
||||
public boolean isReadyForTxBroadcast() {
|
||||
return GUIUtil.isBootstrappedOrShowPopup(p2PService) && GUIUtil.isReadyForTxBroadcastOrShowPopup(connectionService);
|
||||
return GUIUtil.isBootstrappedOrShowPopup(p2PService) && GUIUtil.isReadyForTxBroadcastOrShowPopup(xmrConnectionService);
|
||||
}
|
||||
|
||||
public boolean isBootstrappedOrShowPopup() {
|
||||
|
|
|
@ -19,8 +19,8 @@ package haveno.desktop.main.settings.network;
|
|||
|
||||
import haveno.common.ClockWatcher;
|
||||
import haveno.common.UserThread;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.api.LocalMoneroNode;
|
||||
import haveno.core.api.XmrConnectionService;
|
||||
import haveno.core.api.XmrLocalNode;
|
||||
import haveno.core.filter.Filter;
|
||||
import haveno.core.filter.FilterManager;
|
||||
import haveno.core.locale.Res;
|
||||
|
@ -103,12 +103,12 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
|||
private final Preferences preferences;
|
||||
private final XmrNodes xmrNodes;
|
||||
private final FilterManager filterManager;
|
||||
private final LocalMoneroNode localMoneroNode;
|
||||
private final XmrLocalNode xmrLocalNode;
|
||||
private final TorNetworkSettingsWindow torNetworkSettingsWindow;
|
||||
private final ClockWatcher clockWatcher;
|
||||
private final WalletsSetup walletsSetup;
|
||||
private final P2PService p2PService;
|
||||
private final CoreMoneroConnectionsService connectionManager;
|
||||
private final XmrConnectionService connectionManager;
|
||||
|
||||
private final ObservableList<P2pNetworkListItem> p2pNetworkListItems = FXCollections.observableArrayList();
|
||||
private final SortedList<P2pNetworkListItem> p2pSortedList = new SortedList<>(p2pNetworkListItems);
|
||||
|
@ -132,11 +132,11 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
|||
@Inject
|
||||
public NetworkSettingsView(WalletsSetup walletsSetup,
|
||||
P2PService p2PService,
|
||||
CoreMoneroConnectionsService connectionManager,
|
||||
XmrConnectionService connectionManager,
|
||||
Preferences preferences,
|
||||
XmrNodes xmrNodes,
|
||||
FilterManager filterManager,
|
||||
LocalMoneroNode localMoneroNode,
|
||||
XmrLocalNode xmrLocalNode,
|
||||
TorNetworkSettingsWindow torNetworkSettingsWindow,
|
||||
ClockWatcher clockWatcher) {
|
||||
super();
|
||||
|
@ -146,7 +146,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
|||
this.preferences = preferences;
|
||||
this.xmrNodes = xmrNodes;
|
||||
this.filterManager = filterManager;
|
||||
this.localMoneroNode = localMoneroNode;
|
||||
this.xmrLocalNode = xmrLocalNode;
|
||||
this.torNetworkSettingsWindow = torNetworkSettingsWindow;
|
||||
this.clockWatcher = clockWatcher;
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
|||
}
|
||||
|
||||
private void onMoneroPeersToggleSelected(boolean calledFromUser) {
|
||||
boolean localMoneroNodeShouldBeUsed = localMoneroNode.shouldBeUsed();
|
||||
boolean localMoneroNodeShouldBeUsed = xmrLocalNode.shouldBeUsed();
|
||||
useTorForXmrLabel.setDisable(localMoneroNodeShouldBeUsed);
|
||||
moneroNodesLabel.setDisable(localMoneroNodeShouldBeUsed);
|
||||
xmrNodesLabel.setDisable(localMoneroNodeShouldBeUsed);
|
||||
|
@ -501,7 +501,7 @@ public class NetworkSettingsView extends ActivatableView<GridPane, Void> {
|
|||
|
||||
private void applyPreventPublicXmrNetwork() {
|
||||
final boolean preventPublicXmrNetwork = isPreventPublicXmrNetwork();
|
||||
usePublicNodesRadio.setDisable(localMoneroNode.shouldBeUsed() || preventPublicXmrNetwork);
|
||||
usePublicNodesRadio.setDisable(xmrLocalNode.shouldBeUsed() || preventPublicXmrNetwork);
|
||||
if (preventPublicXmrNetwork && selectedMoneroNodesOption == XmrNodes.MoneroNodesOption.PUBLIC) {
|
||||
selectedMoneroNodesOption = XmrNodes.MoneroNodesOption.PROVIDED;
|
||||
preferences.setMoneroNodesOptionOrdinal(selectedMoneroNodesOption.ordinal());
|
||||
|
|
|
@ -38,7 +38,7 @@ import haveno.common.util.Tuple3;
|
|||
import haveno.common.util.Utilities;
|
||||
import haveno.core.account.witness.AccountAgeWitness;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.api.CoreMoneroConnectionsService;
|
||||
import haveno.core.api.XmrConnectionService;
|
||||
import haveno.core.locale.Country;
|
||||
import haveno.core.locale.CountryUtil;
|
||||
import haveno.core.locale.CurrencyUtil;
|
||||
|
@ -689,19 +689,19 @@ public class GUIUtil {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static boolean isReadyForTxBroadcastOrShowPopup(CoreMoneroConnectionsService connectionService) {
|
||||
if (!connectionService.hasSufficientPeersForBroadcast()) {
|
||||
new Popup().information(Res.get("popup.warning.notSufficientConnectionsToXmrNetwork", connectionService.getMinBroadcastConnections())).show();
|
||||
public static boolean isReadyForTxBroadcastOrShowPopup(XmrConnectionService xmrConnectionService) {
|
||||
if (!xmrConnectionService.hasSufficientPeersForBroadcast()) {
|
||||
new Popup().information(Res.get("popup.warning.notSufficientConnectionsToXmrNetwork", xmrConnectionService.getMinBroadcastConnections())).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!connectionService.isDownloadComplete()) {
|
||||
if (!xmrConnectionService.isDownloadComplete()) {
|
||||
new Popup().information(Res.get("popup.warning.downloadNotComplete")).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
connectionService.verifyConnection();
|
||||
xmrConnectionService.verifyConnection();
|
||||
} catch (Exception e) {
|
||||
new Popup().information(e.getMessage()).show();
|
||||
return false;
|
||||
|
@ -710,8 +710,8 @@ public class GUIUtil {
|
|||
return true;
|
||||
}
|
||||
|
||||
public static boolean isChainHeightSyncedWithinToleranceOrShowPopup(CoreMoneroConnectionsService connectionService) {
|
||||
if (!connectionService.isSyncedWithinTolerance()) {
|
||||
public static boolean isChainHeightSyncedWithinToleranceOrShowPopup(XmrConnectionService xmrConnectionService) {
|
||||
if (!xmrConnectionService.isSyncedWithinTolerance()) {
|
||||
new Popup().information(Res.get("popup.warning.chainNotSynced")).show();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue