Merge pull request #163 from MAGICGrants/conn-example-fix
What changed, and why it matters
This commit is a routine UI cleanup. It removes hard-coded placeholder text examples for server addresses from the app's translation files and instead asks the underlying wallet library for example addresses. There is no security-relevant change here—only where the example text comes from.
No security action needed. This is a localization and UI refactor with no security implications.
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 translations, replacing their usage in connection_settings_form.dart with a call to appWalletOf(context).connectionAddressExampleForType(_connectionType). The AppWallet interface and MoneroWalletAdapter are updated to expose this new method, which delegates to the wallet-core library. pubspec.yaml build number is bumped from 407 to 408.
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.dartpubspec.yamlInspect captured patch +7 / −28
### 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 =
### pubspec.yaml
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
-version: 2.0.0+407
+version: 2.0.0+408
environment:
sdk: 3.11.5Why this scored 15/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.