Store evidence, files and images in was#412
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…management for appDid
…roved flexibility in file operations
app/utils/wasUpload.ts
Outdated
| } | ||
|
|
||
| async function makeInvocationSigner(appInstance: any) { | ||
| const key = await Ed25519VerificationKey2020.from({ |
There was a problem hiding this comment.
| const key = await Ed25519VerificationKey2020.from({ | |
| const key = await Ed25519VerificationKey2020.from(appInstance) |
app/global.d.ts
Outdated
| @@ -0,0 +1,5 @@ | |||
| declare module '@digitalcredentials/ed25519-verification-key-2020'; | |||
There was a problem hiding this comment.
| declare module '@digitalcredentials/ed25519-verification-key-2020'; |
v5.beta-1 exports Typescript types, no need to declare it here.
…eDid handling in exchanges and login page
app/contexts/AppDidContext.tsx
Outdated
|
|
||
| useEffect(() => { | ||
| // Check for stored zCap on mount | ||
| const storedZcap = localStorage.getItem('zcap') |
There was a problem hiding this comment.
Lets give the zcap a more descriptive name. Something like 'delegatedWasZcap'
app/hooks/handleUpload.ts
Outdated
| useWas && | ||
| appInstanceDid && | ||
| hasZcap && | ||
| (appInstanceDid.keyPair || appInstanceDid.privateKeyMultibase) |
There was a problem hiding this comment.
I'm not sure this line is necessary -- if there's an appInstanceDid, there must always be keypair etc
… checks for appInstanceDid keys
app/hooks/handleUpload.ts
Outdated
| } | ||
|
|
||
| const uploadedFiles = await Promise.all( | ||
| filesToUpload.map(async (fileItem, index) => { |
There was a problem hiding this comment.
Is this the same upload code as in app/utils/wasUpload.ts ?
This should probably be extracted to its own function.
There was a problem hiding this comment.
i ma not handling which storage the app should use, so you may see GoogleStorage being used to upload the final signed VC, and the wasUpload in evidence and images step only.
There was a problem hiding this comment.
useHandleUpload hook is the factory function that decides which storage the app should use depending on useWas prop (this temporarily for now).
related issue: #411