From 6a60221307eb40af313f66cf78f06bb664db4c64 Mon Sep 17 00:00:00 2001 From: Elena Bardho Date: Mon, 3 Feb 2025 14:40:59 +0000 Subject: [PATCH 1/2] Add ipfs gateway --- src/app/components/transaction.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/transaction.tsx b/src/app/components/transaction.tsx index 992ae6e..c09083d 100644 --- a/src/app/components/transaction.tsx +++ b/src/app/components/transaction.tsx @@ -6,6 +6,11 @@ import { BlockfrostProvider, deserializeAddress } from "@meshsdk/core"; import { Button, TextField, Box, Typography, Container, Table, TableBody, TableCell, TableContainer, TableRow, Paper } from "@mui/material"; import * as CLS from "@emurgo/cardano-serialization-lib-browser"; import ReactJsonPretty from 'react-json-pretty'; +import dotevn from "dotenv"; + +dotevn.config(); + +const NEXT_PUBLIC_REST_IPFS_GATEWAY=process.env.NEXT_PUBLIC_REST_IPFS_GATEWAY; // Function to decode an unasigned transaction const decodeTransaction = (unsignedTransactionHex: string) => { @@ -308,7 +313,7 @@ export const TransactionButton = () => { Metadata Anchor URL - {metadataAnchorURL} + {metadataAnchorURL} Metadata Anchor Hash From 99c202e2d8618fd301cfc4156b48aff4653dc75b Mon Sep 17 00:00:00 2001 From: Elena Bardho Date: Mon, 3 Feb 2025 15:28:24 +0000 Subject: [PATCH 2/2] Check if anchor url is https/http --- src/app/components/transaction.tsx | 164 ++++++++++++++++++++--------- 1 file changed, 116 insertions(+), 48 deletions(-) diff --git a/src/app/components/transaction.tsx b/src/app/components/transaction.tsx index c09083d..a1e980e 100644 --- a/src/app/components/transaction.tsx +++ b/src/app/components/transaction.tsx @@ -7,6 +7,7 @@ import { Button, TextField, Box, Typography, Container, Table, TableBody, TableC import * as CLS from "@emurgo/cardano-serialization-lib-browser"; import ReactJsonPretty from 'react-json-pretty'; import dotevn from "dotenv"; +import { Underline } from "lucide-react"; dotevn.config(); @@ -235,7 +236,6 @@ export const TransactionButton = () => { }, [signature,unsignedTransaction]); return ( - {/* Transaction Input & Button */} @@ -245,7 +245,8 @@ export const TransactionButton = () => { variant="outlined" fullWidth value={unsignedTransactionHex} - onChange={(e) => {setUnsignedTransactionHex(e.target.value); + onChange={(e) => { + setUnsignedTransactionHex(e.target.value); setIsPartOfSigners(false); setIsOneVote(false); setHasCertificates(true); @@ -253,8 +254,8 @@ export const TransactionButton = () => { setHasICCCredentials(false); setIsInOutputPlutusData(false); setVoteResult(""); - setVoteID("") - }} + setVoteID(""); + }} />