about summary refs log tree commit diff
path: root/src/state/session/index.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-05 19:59:34 -0600
committerGitHub <noreply@github.com>2023-12-05 19:59:34 -0600
commit3c8036587e28d8fc90e87e4818e3f4e080fbd091 (patch)
tree4ead93f29432f91afd9c7abcac1caa790e303092 /src/state/session/index.tsx
parenta915a57b10e9e8a62d769d4de359a916dcf4ceab (diff)
downloadvoidsky-3c8036587e28d8fc90e87e4818e3f4e080fbd091.tar.zst
Improvements to persisted state migration (#2098)
* Fix session email/emailConfirmed types, update usage for safer access

* Handle fallback better, better errors

* Better handling, add test

* Add test for default data

* Remove fallback, not needed, update logs
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r--src/state/session/index.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx
index e6def1fab..37454187a 100644
--- a/src/state/session/index.tsx
+++ b/src/state/session/index.tsx
@@ -245,7 +245,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
         service: agent.service.toString(),
         did: agent.session.did,
         handle: agent.session.handle,
-        email: agent.session.email!, // TODO this is always defined?
+        email: agent.session.email,
         emailConfirmed: agent.session.emailConfirmed || false,
         refreshJwt: agent.session.refreshJwt,
         accessJwt: agent.session.accessJwt,
@@ -342,7 +342,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
         service: agent.service.toString(),
         did: agent.session.did,
         handle: agent.session.handle,
-        email: agent.session.email!, // TODO this is always defined?
+        email: agent.session.email,
         emailConfirmed: agent.session.emailConfirmed || false,
         refreshJwt: agent.session.refreshJwt,
         accessJwt: agent.session.accessJwt,