diff --git a/packages/proposals/src/components/Proposal/QuickVote.tsx b/packages/proposals/src/components/Proposal/Vote.tsx similarity index 91% rename from packages/proposals/src/components/Proposal/QuickVote.tsx rename to packages/proposals/src/components/Proposal/Vote.tsx index 16c1e74..4ab147d 100644 --- a/packages/proposals/src/components/Proposal/QuickVote.tsx +++ b/packages/proposals/src/components/Proposal/Vote.tsx @@ -21,10 +21,8 @@ const { useWallet } = contexts.Wallet; const { useConnection } = contexts.Connection; const { useAccountByMint } = hooks; -const { cache } = contexts.Accounts; - const { confirm } = Modal; -export function QuickVote({ +export function Vote({ proposal, state, timelockConfig, @@ -41,10 +39,6 @@ export function QuickVote({ const noVoteAccount = useAccountByMint(proposal.info.noVotingMint); const userTokenAccount = useAccountByMint(proposal.info.sourceMint); - const alreadyHaveTokens = - (voteAccount && voteAccount.info.amount.toNumber() > 0) || - (yesVoteAccount && yesVoteAccount.info.amount.toNumber() > 0) || - (noVoteAccount && noVoteAccount.info.amount.toNumber() > 0); const [mode, setMode] = useState(true); @@ -112,7 +106,7 @@ export function QuickVote({ }) } > - {LABELS.QUICK_VOTE} + {LABELS.VOTE} ) : null; } diff --git a/packages/proposals/src/constants/labels.ts b/packages/proposals/src/constants/labels.ts index d05e8ee..9e33f27 100644 --- a/packages/proposals/src/constants/labels.ts +++ b/packages/proposals/src/constants/labels.ts @@ -68,7 +68,6 @@ export const LABELS = { EXECUTED: 'Executed.', WITHDRAWING_VOTING_TOKENS: 'Refunding voting tokens as Source Tokens', TOKENS_WITHDRAWN: 'Voting tokens refunded as Source Tokens', - QUICK_VOTE: 'Quick Vote', CONFIRM: 'Confirm', CANCEL: 'Cancel', REFUND_TOKENS: 'Refund My Tokens', diff --git a/packages/proposals/src/views/proposal/index.tsx b/packages/proposals/src/views/proposal/index.tsx index 982058e..d858064 100644 --- a/packages/proposals/src/views/proposal/index.tsx +++ b/packages/proposals/src/views/proposal/index.tsx @@ -23,7 +23,7 @@ import { NewInstructionCard } from '../../components/Proposal/NewInstructionCard import SignButton from '../../components/Proposal/SignButton'; import AddSigners from '../../components/Proposal/AddSigners'; import MintSourceTokens from '../../components/Proposal/MintSourceTokens'; -import { QuickVote } from '../../components/Proposal/QuickVote'; +import { Vote } from '../../components/Proposal/Vote'; import { WithdrawTokens } from '../../components/Proposal/WithdrawTokens'; import './style.less'; import { getGovernanceVotingRecords } from '../../utils/lookups'; @@ -300,7 +300,7 @@ function InnerProposalView({ proposal={proposal} state={timelockState} /> -