Skip to content

Commit 74a70c7

Browse files
committed
feat: Trim trailing slash from node URL input in SelectNodeScreen
1 parent cf4e84c commit 74a70c7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/screens/select_node.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ class SelectNodeScreen extends StatelessWidget {
5555
label: "Connect",
5656
icon: Icons.link,
5757
onPressed: () {
58-
final nodeAddress = _nodeController.text.trim();
58+
String nodeAddress = _nodeController.text.trim();
59+
// Remove trailing slash if present
60+
if (nodeAddress.endsWith('/')) {
61+
nodeAddress = nodeAddress.substring(0, nodeAddress.length - 1);
62+
}
5963
if (nodeAddress.isEmpty) {
6064
ScaffoldMessenger.of(context).showSnackBar(
6165
const SnackBar(content: Text('Please enter a node URL')),

0 commit comments

Comments
 (0)