From 896e67120c79883b3d2e7d149c3182ea3d845d0c Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 5 Apr 2024 14:11:53 -0500 Subject: [PATCH] Remove too-strong fallback --- src/state/session/index.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 7c70473da1..9eb84a3b38 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -419,15 +419,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) { await networkRetry(1, () => agent.resumeSession(prevSession)) setCurrentAgent(agent) } catch (e) { + // this can fail on bad connections as well, so `clearCurrentAccount` + // bumps them out to login, but doesn't rug tokens logger.error(`session: resumeSession failed`, {message: e}) - // TODO flaky connectin could cause this too - setAccounts(accounts => { - return accounts.map(a => - a.did === account.did - ? {...a, accessJwt: undefined, refreshJwt: undefined} - : a, - ) - }) clearCurrentAccount() } }