Use wallet-core connection examples
What changed, and why it matters
This commit changes where the example server addresses come from in the wallet's connection setup screen. Previously, placeholder text like 'lws.example.com:18090' and 'node.example.com:18081' was hard-coded in the app's translation files. Now the app asks the underlying wallet-core library for an example address instead. There is no visible security bug being fixed here; it appears to be a code cleanup or consistency improvement.
No security action required. Treat as a normal refactor. If reviewing further, verify that the wallet-core implementation of connectionAddressExampleForType returns only static example strings and does not perform any network activity or expose real user data.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes two localized string keys (lwsSetupAddressHint and connectionNodeAddressHint) and their English/Portuguese translations. It adds a new method, connectionAddressExampleForType(String type), to the AppWallet interface and its MoneroWalletAdapter implementation, delegating to the underlying wallet core. The connection_settings_form widget now calls this method rather than reading from i18n. The diff shows only UI/placeholder text sourcing changes; no networking, validation, cryptographic, or authentication logic is modified.
Changed components
lib/l10n/app_localizations.dartlib/l10n/app_localizations_en.dartlib/l10n/app_localizations_pt.dartlib/l10n/app_pt.arblib/models/app_wallet.dartlib/models/monero_wallet_adapter.dartlib/widgets/connection_settings_form.dartInspect captured patch +6 / −27
### lib/l10n/app_localizations.dart
@@ -243,12 +243,6 @@ abstract class AppLocalizations {
/// **'Connect to a Monero light-wallet server (LWS) or your own full node. Only select a server you trust. Even if you use Tor, this server can learn information about you. With an LWS, your private view key and primary address will be shared with this server.'**
String get lwsSetupDescription;
- /// No description provided for @lwsSetupAddressHint.
- ///
- /// In en, this message translates to:
- /// **'lws.example.com:18090'**
- String get lwsSetupAddressHint;
-
/// No description provided for @lwsSetupProxyPortLabel.
///
/// In en, this message translates to:
@@ -297,12 +291,6 @@ abstract class AppLocalizations {
/// **'Monero Node'**
String get connectionTypeNode;
- /// No description provided for @connectionNodeAddressHint.
- ///
- /// In en, this message translates to:
- /// **'e.g. node.example.com:18081'**
- String get connectionNodeAddressHint;
-
/// No description provided for @connectionRemoteIpNotAllowed.
///
/// In en, this message translates to:
### lib/l10n/app_localizations_en.dart
@@ -86,9 +86,6 @@ class AppLocalizationsEn extends AppLocalizations {
String get lwsSetupDescription =>
'Connect to a Monero light-wallet server (LWS) or your own full node. Only select a server you trust. Even if you use Tor, this server can learn information about you. With an LWS, your private view key and primary address will be shared with this server.';
- @override
- String get lwsSetupAddressHint => 'lws.example.com:18090';
-
@override
String get lwsSetupProxyPortLabel => 'HTTP Proxy Port (Optional)';
@@ -113,9 +110,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get connectionTypeNode => 'Monero Node';
- @override
- String get connectionNodeAddressHint => 'e.g. node.example.com:18081';
-
@override
String get connectionRemoteIpNotAllowed =>
'Connections to remote IP addresses aren\'t allowed. Use a domain name or a local IP address.';
### lib/l10n/app_localizations_pt.dart
@@ -86,9 +86,6 @@ class AppLocalizationsPt extends AppLocalizations {
String get lwsSetupDescription =>
'Conecte-se a um servidor light-wallet Monero (LWS) ou ao seu próprio nó completo. Selecione apenas um servidor em que você confia. Mesmo se você usar o Tor, este servidor pode obter informações sobre você. Com um LWS, sua chave privada de visualização e seu endereço primário serão compartilhados com este servidor.';
- @override
- String get lwsSetupAddressHint => 'lws.example.com:18090';
-
@override
String get lwsSetupProxyPortLabel => 'Porta do Proxy HTTP (opcional)';
@@ -113,9 +110,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get connectionTypeNode => 'Nó Monero';
- @override
- String get connectionNodeAddressHint => 'ex.: node.example.com:18081';
-
@override
String get connectionRemoteIpNotAllowed =>
'Conexões com endereços IP remotos não são permitidas. Use um nome de domínio ou um endereço IP local.';
### lib/l10n/app_pt.arb
@@ -25,7 +25,6 @@
"restoreWarningContinueButton": "Continuar",
"lwsSetupTitle": "Configuração da conexão",
"lwsSetupDescription": "Conecte-se a um servidor light-wallet Monero (LWS) ou ao seu próprio nó completo. Selecione apenas um servidor em que você confia. Mesmo se você usar o Tor, este servidor pode obter informações sobre você. Com um LWS, sua chave privada de visualização e seu endereço primário serão compartilhados com este servidor.",
- "lwsSetupAddressHint": "lws.example.com:18090",
"lwsSetupProxyPortLabel": "Porta do Proxy HTTP (opcional)",
"lwsSetupProxyPortHint": "ex: 4444 para I2P",
"lwsSetupUseTorLabel": "Usar Tor",
@@ -34,7 +33,6 @@
"lwsSetupContinueButton": "Continuar",
"connectionTypeLws": "Servidor Light Wallet",
"connectionTypeNode": "Nó Monero",
- "connectionNodeAddressHint": "ex.: node.example.com:18081",
"connectionRemoteIpNotAllowed": "Conexões com endereços IP remotos não são permitidas. Use um nome de domínio ou um endereço IP local.",
"connectionProtocolHttps": "Removendo protocolo. Usando HTTPS para domínios.",
"connectionProtocolHttp": "Removendo protocolo. Usando HTTP para endereços locais.",
### lib/models/app_wallet.dart
@@ -31,6 +31,8 @@ abstract interface class AppWallet implements Listenable {
bool get hasAttemptedConnection;
bool get torRequirementBroken;
+ String connectionAddressExampleForType(String type);
+
// Sync
bool get isConnected;
bool get isSynced;
### lib/models/monero_wallet_adapter.dart
@@ -58,6 +58,9 @@ class MoneroWalletAdapter extends ChangeNotifier implements AppWallet {
bool get hasAttemptedConnection => _wallet.hasAttemptedConnection;
@override
bool get torRequirementBroken => _wallet.torRequirementBroken;
+ @override
+ String connectionAddressExampleForType(String type) =>
+ _wallet.connectionAddressExampleForType(type);
// Sync
@override
### lib/widgets/connection_settings_form.dart
@@ -431,7 +431,7 @@ class _ConnectionSettingsFormState extends State<ConnectionSettingsForm> {
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context)!;
final torMode = TorSettingsService.sharedInstance.torMode;
- final addressHint = _isNode ? i18n.connectionNodeAddressHint : i18n.lwsSetupAddressHint;
+ final addressHint = appWalletOf(context).connectionAddressExampleForType(_connectionType);
final hasWorkingConnection = _hasTested && _connectionSuccess && !_connectionTestIsLoading;
final connectionChanged =Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.