Compare commits

..

No commits in common. "ac38feae9230e4a88bc5e03410da733872c16d0d" and "34699434e4ad4d97bf84e70b139068c97ff5efac" have entirely different histories.

1 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export function maybeInitDefaultPortals(): ErrTuple {
}
for (const portal of DEFAULT_PORTAL_LIST) {
addActivePortal(initPortal(portal));
initPortal(portal);
}
return [null, null];
@ -58,7 +58,7 @@ export function addActivePortal(portal: Client) {
ACTIVE_PORTALS.add(portal);
}
export function initPortal(portal: Portal): Client {
export function initPortal(portal: Portal) {
const sessions = getPortalSessions();
let jwt: string | null = null;
if (sessions) {
@ -67,12 +67,14 @@ export function initPortal(portal: Portal): Client {
}
}
return new Client({
const client = new Client({
email: generatePortalEmail(portal),
portalUrl: portal.url,
privateKey: generatePortalKeyPair(portal).privateKey,
jwt: jwt as string,
});
addActivePortal(client);
}
export function getPortalSessions() {