Skip to content

Commit

Permalink
refactor: trying to fix proof upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Codetrauma committed May 10, 2024
1 parent d8037d4 commit a5cadca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion web/components/ProofDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -69,7 +70,7 @@ const ProofDetails: React.FC<ProofDetailsProps> = ({
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

Expand Down
3 changes: 2 additions & 1 deletion web/components/ProofViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ function ShareWarningModal(props: {
setUploading(false);
}
}, []);

return (
<Modal className="w-2/3 max-w-[45rem]" onClose={props.onClose}>
<ModalHeader>Sharing a Proof</ModalHeader>
<ModalContent className="py-2 px-4">
<ModalContent className="py-2 px-4 text-center">
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?
</ModalContent>
Expand Down
2 changes: 1 addition & 1 deletion web/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -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/';

0 comments on commit a5cadca

Please sign in to comment.