Skip to content

Conversation

@0marSalah
Copy link
Member

@0marSalah 0marSalah commented Jul 18, 2025

Depending on: Cooperation-org/vc-storage#51

Related Issue:
-1: #394
-2: #395

@vercel

This comment was marked as duplicate.

@0marSalah 0marSalah force-pushed the 394-create-app-did-key-on-app-load branch from 10a5e02 to 88c4b15 Compare July 18, 2025 23:23
@0marSalah 0marSalah changed the title feat: create and store AppDidKey on localStorage feat: create and store AppDidKey on localStorage and Update the VPR to response with read/write zCaps Jul 29, 2025
@0marSalah 0marSalah changed the title feat: create and store AppDidKey on localStorage and Update the VPR to response with read/write zCaps feat: create and store AppDidKey on localStorage and Update the response to return read/write zCaps Jul 29, 2025
import { ReactNode, useEffect } from 'react'
import { getOrCreateAppInstanceDid } from '@cooperation/vc-storage'

export function ClientWrapper({ children }: { children: ReactNode }) {
Copy link
Collaborator

@dmitrizagidulin dmitrizagidulin Jul 29, 2025

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.

Copy link
Member Author

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 />
Copy link
Member Author

@0marSalah 0marSalah Jul 30, 2025

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks.

@vercel vercel bot temporarily deployed to Preview – linked-claims-author-8dp5 July 30, 2025 16:21 Inactive
@vercel vercel bot temporarily deployed to Preview – linked-claims-author-gpm4 July 30, 2025 16:23 Inactive
@0marSalah 0marSalah force-pushed the 394-create-app-did-key-on-app-load branch from 34d45a5 to ceb1827 Compare July 30, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants