import { Button } from "antd"; import { CrossCircle } from "../../../../Components/Icons/CrossCircle"; import { Modal } from "antd-latest"; import { NewcoinRecept } from "../../../../Components/Recepts"; import { ProgressButton } from "../../../../Components/ProgressButton"; import { useActions } from "../../../../overmind"; import { useState } from "react"; export const WithdrawForm = ({ vote_id, quantity }) => { const withdrawStates = { disabled: 0, start: 1, reciept: 2, end: 3, }; const actions = useActions(); const [mode, setMode] = useState(withdrawStates.disabled); const [tx, setTx] = useState(""); const withdraw = async () => { const res = await actions.newcoin.daoWithdrawVoteDeposit({ vote_id }); const success = !!res.TxID_WithdrawVoteDeposit; if (success) { setTx(res.TxID_WithdrawVoteDeposit); setMode(withdrawStates.reciept); } }; const endWithdrawing = async () => { setMode(withdrawStates.disabled); await actions.newcoin.getAccountBalance(); }; return (
You've withdrawn your {quantity} vote deposit.
Your vote is ready to be withdrawn
{quantity && (This is only on Testnet! Need help? Join our telegram group!