import * as React from "react"; import Loader from "../components/Loader"; import { SContainer, STable, SRow, SKey, SValue } from "../components/shared"; import { SModalContainer, SModalTitle, SModalParagraph } from "./shared"; interface RequestModalProps { pending: boolean; result: any; } const RequestModal = (props: RequestModalProps) => { const { pending, result } = props; return ( <> {pending ? ( {"Pending JSON-RPC Request"} {"Approve or reject request using your wallet"} ) : result ? ( {result.valid ? "JSON-RPC Request Approved" : "JSON-RPC Request Failed"} {Object.keys(result).map(key => ( {key} {result[key].toString()} ))} ) : ( {"JSON-RPC Request Rejected"} )} ); }; export default RequestModal;