Skip to content

Commit

Permalink
🐛 (signup) fix setting up for the first time with missing protocol (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Sep 7, 2023
1 parent bca0902 commit 852b537
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function ConfigServer() {
let { error } = await setServerUrl(url);

if (
error === 'network-failure' &&
['network-failure', 'get-server-failure'].includes(error) &&
!url.startsWith('http://') &&
!url.startsWith('https://')
) {
Expand Down
8 changes: 6 additions & 2 deletions packages/loot-core/src/server/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,12 @@ handlers['get-did-bootstrap'] = async function () {
handlers['subscribe-needs-bootstrap'] = async function ({
url,
}: { url? } = {}) {
if (!getServer(url)) {
return { bootstrapped: true, hasServer: false };
try {
if (!getServer(url)) {
return { bootstrapped: true, hasServer: false };
}
} catch (err) {
return { error: 'get-server-failure' };
}

let res;
Expand Down
3 changes: 1 addition & 2 deletions packages/loot-core/src/server/server-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export function getServer(url?: string): ServerConfig | null {
SYNC_SERVER: joinURL(url, '/sync'),
SIGNUP_SERVER: joinURL(url, '/account'),
PLAID_SERVER: joinURL(url, '/plaid'),
// TODO: change to use `/gocardless` after v23.8.0
GOCARDLESS_SERVER: joinURL(url, '/nordigen'),
GOCARDLESS_SERVER: joinURL(url, '/gocardless'),
};
}
return config;
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1657.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---

Fix signup page not allowing to use domains without protocol

0 comments on commit 852b537

Please sign in to comment.