From a5cadca03b4059f1e8b72e474384108fa3ba5fb5 Mon Sep 17 00:00:00 2001 From: Tanner Shaw Date: Fri, 10 May 2024 16:31:22 -0700 Subject: [PATCH] refactor: trying to fix proof upload --- web/components/ProofDetails/index.tsx | 3 ++- web/components/ProofViewer/index.tsx | 3 ++- web/utils/constants.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/components/ProofDetails/index.tsx b/web/components/ProofDetails/index.tsx index 451dcdd..1533e05 100644 --- a/web/components/ProofDetails/index.tsx +++ b/web/components/ProofDetails/index.tsx @@ -6,6 +6,7 @@ import Modal, { ModalContent, ModalHeader, ModalFooter } from '../Modal'; import { copyText } from '../../utils'; import { useSelectedProof } from '../../store/proofupload'; import { uploadFileToIpfs } from '../../store/upload'; +import { EXPLORER_URL } from '../../utils/constants'; import Icon from '../Icon'; interface ProofDetailsProps { @@ -69,7 +70,7 @@ const ProofDetails: React.FC = ({ const inputValue = process.env.NODE_ENV === 'development' ? `http://localhost:3000/${selectedProof?.ipfsCID ? selectedProof?.ipfsCID : cid}` - : `www.tlsnexplorer.com/${selectedProof?.ipfsCID ? selectedProof?.ipfsCID : cid}`; + : `${EXPLORER_URL}/${selectedProof?.ipfsCID ? selectedProof?.ipfsCID : cid}`; // TODO - Format proof details for redacted data diff --git a/web/components/ProofViewer/index.tsx b/web/components/ProofViewer/index.tsx index 0e5f964..5ebf636 100644 --- a/web/components/ProofViewer/index.tsx +++ b/web/components/ProofViewer/index.tsx @@ -122,10 +122,11 @@ function ShareWarningModal(props: { setUploading(false); } }, []); + return ( Sharing a Proof - + This will upload your proof to IPFS. Anyone with the url will be able to view your proof. Are you sure you want to proceed? diff --git a/web/utils/constants.ts b/web/utils/constants.ts index 4ec60bd..90300ed 100644 --- a/web/utils/constants.ts +++ b/web/utils/constants.ts @@ -1,4 +1,4 @@ export const EXPLORER_URL = process.env.NODE_ENV === 'development' ? 'http://localhost:3000' - : 'https://explorer-tlsn.pse.dev'; + : 'https://explorer.tlsnotary.org/';