From ce962232645fd6a3c09bbccf8764a113fbe9939d Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 19 Apr 2024 21:37:28 +0700 Subject: [PATCH] refactor: do it in the construct itself --- src/state/session/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 72a7dfd662..1592feab57 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -369,7 +369,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) { async account => { logger.debug(`session: initSession`, {}, logger.DebugContext.session) - const agent = new BskyAgent({service: account.service}) + const agent = new BskyAgent({service: account.pdsUrl || account.service}) agent.setPersistSessionHandler( createPersistSessionHandler( @@ -410,10 +410,6 @@ export function Provider({children}: React.PropsWithChildren<{}>) { isSessionDeactivated(account.accessJwt) || account.deactivated, } - if (account.pdsUrl) { - agent.api.xrpc.uri = agent.pdsUrl = new URL(account.pdsUrl) - } - if (canReusePrevSession) { logger.debug(`session: attempting to reuse previous session`)