mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-05-08 09:35:30 -04:00
rename config handler from btc to xmr
This commit is contained in:
parent
c853c4ffcb
commit
9acd7ad584
4 changed files with 8 additions and 8 deletions
|
@ -86,7 +86,7 @@ public class HavenoHeadlessApp implements HeadlessApp {
|
||||||
havenoSetup.setDisplaySecurityRecommendationHandler(key -> log.info("onDisplaySecurityRecommendationHandler"));
|
havenoSetup.setDisplaySecurityRecommendationHandler(key -> log.info("onDisplaySecurityRecommendationHandler"));
|
||||||
havenoSetup.setWrongOSArchitectureHandler(msg -> log.error("onWrongOSArchitectureHandler. msg={}", msg));
|
havenoSetup.setWrongOSArchitectureHandler(msg -> log.error("onWrongOSArchitectureHandler. msg={}", msg));
|
||||||
havenoSetup.setRejectedTxErrorMessageHandler(errorMessage -> log.warn("setRejectedTxErrorMessageHandler. errorMessage={}", errorMessage));
|
havenoSetup.setRejectedTxErrorMessageHandler(errorMessage -> log.warn("setRejectedTxErrorMessageHandler. errorMessage={}", errorMessage));
|
||||||
havenoSetup.setShowPopupIfInvalidBtcConfigHandler(() -> log.error("onShowPopupIfInvalidBtcConfigHandler"));
|
havenoSetup.setShowPopupIfInvalidXmrConfigHandler(() -> log.error("onShowPopupIfInvalidXmrConfigHandler"));
|
||||||
havenoSetup.setRevolutAccountsUpdateHandler(revolutAccountList -> log.info("setRevolutAccountsUpdateHandler: revolutAccountList={}", revolutAccountList));
|
havenoSetup.setRevolutAccountsUpdateHandler(revolutAccountList -> log.info("setRevolutAccountsUpdateHandler: revolutAccountList={}", revolutAccountList));
|
||||||
havenoSetup.setOsxKeyLoggerWarningHandler(() -> log.info("setOsxKeyLoggerWarningHandler"));
|
havenoSetup.setOsxKeyLoggerWarningHandler(() -> log.info("setOsxKeyLoggerWarningHandler"));
|
||||||
havenoSetup.setQubesOSInfoHandler(() -> log.info("setQubesOSInfoHandler"));
|
havenoSetup.setQubesOSInfoHandler(() -> log.info("setQubesOSInfoHandler"));
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class HavenoSetup {
|
||||||
private Consumer<PrivateNotificationPayload> displayPrivateNotificationHandler;
|
private Consumer<PrivateNotificationPayload> displayPrivateNotificationHandler;
|
||||||
@Setter
|
@Setter
|
||||||
@Nullable
|
@Nullable
|
||||||
private Runnable showPopupIfInvalidBtcConfigHandler;
|
private Runnable showPopupIfInvalidXmrConfigHandler;
|
||||||
@Setter
|
@Setter
|
||||||
@Nullable
|
@Nullable
|
||||||
private Consumer<List<RevolutAccount>> revolutAccountsUpdateHandler;
|
private Consumer<List<RevolutAccount>> revolutAccountsUpdateHandler;
|
||||||
|
@ -461,7 +461,7 @@ public class HavenoSetup {
|
||||||
havenoSetupListeners.forEach(HavenoSetupListener::onInitWallet);
|
havenoSetupListeners.forEach(HavenoSetupListener::onInitWallet);
|
||||||
walletAppSetup.init(chainFileLockedExceptionHandler,
|
walletAppSetup.init(chainFileLockedExceptionHandler,
|
||||||
showFirstPopupIfResyncSPVRequestedHandler,
|
showFirstPopupIfResyncSPVRequestedHandler,
|
||||||
showPopupIfInvalidBtcConfigHandler,
|
showPopupIfInvalidXmrConfigHandler,
|
||||||
() -> {},
|
() -> {},
|
||||||
() -> {});
|
() -> {});
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class WalletAppSetup {
|
||||||
|
|
||||||
void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
|
void init(@Nullable Consumer<String> chainFileLockedExceptionHandler,
|
||||||
@Nullable Runnable showFirstPopupIfResyncSPVRequestedHandler,
|
@Nullable Runnable showFirstPopupIfResyncSPVRequestedHandler,
|
||||||
@Nullable Runnable showPopupIfInvalidBtcConfigHandler,
|
@Nullable Runnable showPopupIfInvalidXmrConfigHandler,
|
||||||
Runnable downloadCompleteHandler,
|
Runnable downloadCompleteHandler,
|
||||||
Runnable walletInitializedHandler) {
|
Runnable walletInitializedHandler) {
|
||||||
log.info("Initialize WalletAppSetup with monero-java v{}", MoneroUtils.getVersion());
|
log.info("Initialize WalletAppSetup with monero-java v{}", MoneroUtils.getVersion());
|
||||||
|
@ -199,8 +199,8 @@ public class WalletAppSetup {
|
||||||
walletInitializedHandler.run();
|
walletInitializedHandler.run();
|
||||||
},
|
},
|
||||||
exception -> {
|
exception -> {
|
||||||
if (exception instanceof InvalidHostException && showPopupIfInvalidBtcConfigHandler != null) {
|
if (exception instanceof InvalidHostException && showPopupIfInvalidXmrConfigHandler != null) {
|
||||||
showPopupIfInvalidBtcConfigHandler.run();
|
showPopupIfInvalidXmrConfigHandler.run();
|
||||||
} else {
|
} else {
|
||||||
walletServiceException.set(exception);
|
walletServiceException.set(exception);
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,7 +420,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
||||||
|
|
||||||
havenoSetup.setRejectedTxErrorMessageHandler(msg -> new Popup().width(850).warning(msg).show());
|
havenoSetup.setRejectedTxErrorMessageHandler(msg -> new Popup().width(850).warning(msg).show());
|
||||||
|
|
||||||
havenoSetup.setShowPopupIfInvalidBtcConfigHandler(this::showPopupIfInvalidBtcConfig);
|
havenoSetup.setShowPopupIfInvalidXmrConfigHandler(this::showPopupIfInvalidXmrConfig);
|
||||||
|
|
||||||
havenoSetup.setRevolutAccountsUpdateHandler(revolutAccountList -> {
|
havenoSetup.setRevolutAccountsUpdateHandler(revolutAccountList -> {
|
||||||
// We copy the array as we will mutate it later
|
// We copy the array as we will mutate it later
|
||||||
|
@ -536,7 +536,7 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPopupIfInvalidBtcConfig() {
|
private void showPopupIfInvalidXmrConfig() {
|
||||||
preferences.setMoneroNodesOptionOrdinal(0);
|
preferences.setMoneroNodesOptionOrdinal(0);
|
||||||
new Popup().warning(Res.get("settings.net.warn.invalidXmrConfig"))
|
new Popup().warning(Res.get("settings.net.warn.invalidXmrConfig"))
|
||||||
.hideCloseButton()
|
.hideCloseButton()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue