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
This commit is contained in:
parent
a915a57b10
commit
3c8036587e
9 changed files with 48 additions and 30 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue