diff --git a/src/components/login/login.js b/src/components/login/login.js index 10230554e..130430f29 100644 --- a/src/components/login/login.js +++ b/src/components/login/login.js @@ -56,8 +56,9 @@ app.component('login', { this.$scope.$watch('$ctrl.input_passphrase', val => this.validity.passphrase = this.Passphrase.isValidPassphrase(val)); this.$scope.$watch('$ctrl.network.address', (val) => { try { - const url = new URL(val); - this.validity.url = url.port !== ''; + // eslint-disable-next-line no-new + new URL(val); + this.validity.url = true; } catch (e) { this.validity.url = false; } diff --git a/src/services/api/peers.js b/src/services/api/peers.js index c87d46356..996a9472c 100644 --- a/src/services/api/peers.js +++ b/src/services/api/peers.js @@ -63,7 +63,7 @@ app.factory('Peers', ($timeout, $cookies, $location, $q, $rootScope, dialog) => conf.node = normalizedUrl.hostname; conf.port = normalizedUrl.port; - conf.ssl = normalizedUrl.protocol === 'https'; + conf.ssl = normalizedUrl.protocol === 'https:'; } if (conf.testnet === undefined && conf.port !== undefined) { conf.testnet = conf.port === '7000';