import { Button } from "../../ui/button" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "../../ui/dialog" import { Input } from "../../ui/input" import { Label } from "../../ui/label" import { CopyClipboard } from "../../ui/copy-clipboard" import { useContext, useState } from "react" import { useBitcoinKit } from "../../../hooks/useBitcoinKit" import { useToast } from "../../ui/use-toast" import { AccountContext } from "../../../context/account/accountContext" import { IAccountContext } from "../../../types/account" import { WalletContext } from "../../../context/wallet/walletContext" import { IWalletContext } from "../../../types/wallet" import Other from "./index" export default function OtherRenderer() { const [authenticationInfo, setAuthenticationInfo] = useState({ address: "", message: "test message", signature: "", }) const { toast } = useToast() const [showModal, setShowModal] = useState(false) const { authenticateWithGivenSignature } = useBitcoinKit() const { connect } = useContext(AccountContext) as IAccountContext const { connectedWallet } = useContext(WalletContext) as IWalletContext return ( { setShowModal(open) }} > Verify the ownership of your address Sign the given message with your wallet and paste the signature below
{ localStorage.setItem("localAddress", e.target.value) setAuthenticationInfo({ ...authenticationInfo, address: e.target.value, }) }} />
{"test message"}
{ setAuthenticationInfo({ ...authenticationInfo, signature: e.target.value, }) }} />
) }