diff options
| author | xiphon <xiphon@protonmail.com> | 2021-04-22 20:59:43 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2021-04-22 21:00:48 +0000 |
| commit | 1f904d4cffe72415da578c63ab72dc87c14ba7e3 (patch) | |
| tree | 3aa1cebd4001bd53540eb42fc7849f74c2e2a28a /components/RemoteNodeEdit.qml | |
| parent | 02ae14fd6bcd705ed838fba627775e4d8d52b5f3 (diff) | |
| download | monzero-gui-1f904d4cffe72415da578c63ab72dc87c14ba7e3.tar.gz monzero-gui-1f904d4cffe72415da578c63ab72dc87c14ba7e3.tar.xz monzero-gui-1f904d4cffe72415da578c63ab72dc87c14ba7e3.zip | |
RemoteNodeEdit: fix getAddress() and isValid() inconsistency
Diffstat (limited to 'components/RemoteNodeEdit.qml')
| -rw-r--r-- | components/RemoteNodeEdit.qml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 75ee8139..7b4b4773 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -73,13 +73,12 @@ GridLayout { } function getAddress() { + if (!isValid()) { + return ""; + } + var addr = daemonAddr.text.trim(); var port = daemonPort.text.trim(); - - // validation - if(addr === "" || addr.length < 2) return ""; - if(!Utils.isNumeric(port)) return ""; - return addr + ":" + port; } |
