diff --git a/app/src/main/java/net/mynero/wallet/adapter/NodeSelectionAdapter.java b/app/src/main/java/net/mynero/wallet/adapter/NodeSelectionAdapter.java index e34081d..9813dd3 100644 --- a/app/src/main/java/net/mynero/wallet/adapter/NodeSelectionAdapter.java +++ b/app/src/main/java/net/mynero/wallet/adapter/NodeSelectionAdapter.java @@ -96,7 +96,9 @@ public class NodeSelectionAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsViewModel.java b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsViewModel.java index e02585b..5ef4eab 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsViewModel.java +++ b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsViewModel.java @@ -5,6 +5,7 @@ import android.util.Patterns; import androidx.lifecycle.ViewModel; import net.mynero.wallet.MoneroApplication; +import net.mynero.wallet.data.DefaultNodes; import net.mynero.wallet.model.WalletManager; import net.mynero.wallet.service.PrefService; import net.mynero.wallet.util.Constants; @@ -17,7 +18,8 @@ public class SettingsViewModel extends ViewModel { public void updateProxy(MoneroApplication application) { application.getExecutor().execute(() -> { boolean usesProxy = PrefService.getInstance().getBoolean(Constants.PREF_USES_TOR, false); - String currentNodeString = PrefService.getInstance().getString(Constants.PREF_NODE_2, ""); + DefaultNodes defaultNode = usesProxy ? DefaultNodes.SAMOURAI_ONION : DefaultNodes.SAMOURAI; + String currentNodeString = PrefService.getInstance().getString(Constants.PREF_NODE_2, defaultNode.getUri()); boolean isNodeLocalIp = currentNodeString.startsWith("10.") || currentNodeString.startsWith("192.168.") || currentNodeString.equals("localhost") || currentNodeString.equals("127.0.0.1"); if (!usesProxy || isNodeLocalIp) {