diff --git a/web/components/FileUpload/index.tsx b/web/components/FileUpload/index.tsx index 0d55ec6..03ae57f 100644 --- a/web/components/FileUpload/index.tsx +++ b/web/components/FileUpload/index.tsx @@ -33,7 +33,13 @@ export default function FileDrop(): ReactElement { let verifiedProof: Proof; const proofContent = await readFileAsync(file); try { - verifiedProof = await verify(JSON.parse(proofContent), notaryKey); + let pubKey: any; + if (JSON.parse(proofContent).notaryUrl) { + const notaryFetch = await fetch(JSON.parse(proofContent).notaryUrl + '/info'); + const notaryData = await notaryFetch.json(); + pubKey = notaryData.publicKey; + } + verifiedProof = await verify(JSON.parse(proofContent), pubKey || notaryKey); setVerifiedProof(verifiedProof); } catch(e) { setError(e as string); diff --git a/web/components/SharedProof/index.tsx b/web/components/SharedProof/index.tsx index 4e89a84..c1ba5b1 100644 --- a/web/components/SharedProof/index.tsx +++ b/web/components/SharedProof/index.tsx @@ -27,7 +27,7 @@ export default function SharedProof(): ReactElement { } const data = await response.json(); try { - let pubKey; + let pubKey: any; if (data.notaryUrl) { const notaryFetch = await fetch(data.notaryUrl + '/info'); const notaryData = await notaryFetch.json();