rename config handler from btc to xmr

This commit is contained in:
woodser 2025-03-09 17:02:15 -04:00 committed by GitHub
parent c853c4ffcb
commit 9acd7ad584
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View file

@ -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"));

View file

@ -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,
() -> {}, () -> {},
() -> {}); () -> {});
} }

View file

@ -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);
} }

View file

@ -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()