diff --git a/src/components/Forms/VoteForm.tsx b/src/components/Forms/VoteForm.tsx index a995afc..6930e08 100644 --- a/src/components/Forms/VoteForm.tsx +++ b/src/components/Forms/VoteForm.tsx @@ -56,14 +56,14 @@ export default function VoteForm({ proposalId, }: FormProps & { proposalId: number; grants: GrantAuthorization[] }) { const t = useI18n() - const { address, isValidator, isStaker } = useWeb3() + const { address, isStaker } = useWeb3() const { localizeProposalVoteOption } = useLocalize() const [alreadySelectedVote, setAlreadySelectedVote] = useState('') const DEFAULT_VALUES = { [VoteFormFieldNames.Option]: VoteOption.Yes, - [VoteFormFieldNames.Voter]: isValidator ? address : grants?.[0]?.granter, + [VoteFormFieldNames.Voter]: grants?.[0]?.granter ?? address, } const getVoterValidationRule = (yup: typeof Yup): Yup.ObjectShape => { diff --git a/yarn.lock b/yarn.lock index ff00512..f9c7409 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10918,11 +10918,11 @@ __metadata: "typescript@patch:typescript@5.1.6#~builtin": version: 5.1.6 - resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin::version=5.1.6&hash=1f5320" + resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin::version=5.1.6&hash=5da071" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 21e88b0a0c0226f9cb9fd25b9626fb05b4c0f3fddac521844a13e1f30beb8f14e90bd409a9ac43c812c5946d714d6e0dee12d5d02dfc1c562c5aacfa1f49b606 + checksum: f53bfe97f7c8b2b6d23cf572750d4e7d1e0c5fff1c36d859d0ec84556a827b8785077bc27676bf7e71fae538e517c3ecc0f37e7f593be913d884805d931bc8be languageName: node linkType: hard