Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Fix login to https custom node - Closes #424 #441

Merged
merged 1 commit into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/login/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/peers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down