import { useContext, useEffect, useState } from 'react'; import { ClientContext } from '../../contexts/clientProvider'; import { apiFetch, getAddressFromPrivateKey } from '../../utils/helpers'; import { Row, Col, ListGroup, Alert, Container } from 'react-bootstrap'; import Loading from '../bootstrap/Loading'; export default function Ganache() { const client = useContext(ClientContext); const [ganacheResponse, setGanacheResponse] = useState(null); const [showGanacheInformation, setShowGanacheInformation] = useState(false); const [copySuccess, setCopySuccess] = useState(false); useEffect(() => { if (!client.loaded) return; if (!client.controller?.apiAccess) { console.error('No API available'); return; } const main = async () => { let result = await apiFetch('/meta/ganache'); setGanacheResponse(result); }; main().catch((error) => { console.error(error); }); }, [client]); return ( {!client.loaded ? ( <> ) : ( <>

Ganache

Here you can view your ganache mnemonic and keys which are currently being used by the API server. Note that these credentials will only be valid if you've ran ganache locally on the same machine the API has access too. Otherwise it will fallback onto what ever is set in the environent settings of InfinityMint

)}
); }