-
Notifications
You must be signed in to change notification settings - Fork 3
feat: create and store AppDidKey on localStorage and Update the response to return read/write zCaps #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
10a5e02 to
88c4b15
Compare
app/components/ClientWrapper.tsx
Outdated
| import { ReactNode, useEffect } from 'react' | ||
| import { getOrCreateAppInstanceDid } from '@cooperation/vc-storage' | ||
|
|
||
| export function ClientWrapper({ children }: { children: ReactNode }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this wrapper style is the right move. It should likely be a component lifecycle hook on ClientLayout, instead of a separate wrapper component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point — makes sense to move this into a useEffect inside ClientLayout to keep things co-located. I’ll refactor accordingly. Thanks.
| : '#F0F4F8' | ||
| }} | ||
| > | ||
| <AppDidInitializer /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmitrizagidulin - I added <AppDidInitializer /> because putting the getOrCreateAppInstanceDid() logic directly in ClientLayout runs it only after the user is authenticated. This way, the App DID is initialized earlier, before any auth checks, without using a wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks.
83c2446 to
7201ed4
Compare
…c-strage utility function getOrCreateAppInstanceDid
… vprQuery function appInstanceDid
…and enhance logging for appInstanceDid
34d45a5 to
ceb1827
Compare
Depending on: Cooperation-org/vc-storage#51
Related Issue:
-1: #394
-2: #395