Skip to content

Commit

Permalink
Add ipfs gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
elenabardho committed Feb 3, 2025
1 parent be1a04f commit 6a60221
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/components/transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -308,7 +313,7 @@ export const TransactionButton = () => {
</TableRow>
<TableRow>
<TableCell sx={{ fontWeight: "bold" }}>Metadata Anchor URL</TableCell>
<TableCell><a href={metadataAnchorURL} target="_blank">{metadataAnchorURL}</a></TableCell>
<TableCell><a href={'https://'+ NEXT_PUBLIC_REST_IPFS_GATEWAY + metadataAnchorURL?.slice(7)} target="_blank">{metadataAnchorURL}</a></TableCell>
</TableRow>
<TableRow>
<TableCell sx={{ fontWeight: "bold" }}>Metadata Anchor Hash</TableCell>
Expand Down

0 comments on commit 6a60221

Please sign in to comment.