Skip to content

Commit

Permalink
fix voting selected tx method
Browse files Browse the repository at this point in the history
  • Loading branch information
lukachi committed Apr 26, 2024
1 parent 987c353 commit 7e52505
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Forms/VoteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<VoteStates | ''>('')

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 => {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10918,11 +10918,11 @@ __metadata:

"typescript@patch:[email protected]#~builtin<compat/typescript>":
version: 5.1.6
resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=1f5320"
resolution: "typescript@patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 21e88b0a0c0226f9cb9fd25b9626fb05b4c0f3fddac521844a13e1f30beb8f14e90bd409a9ac43c812c5946d714d6e0dee12d5d02dfc1c562c5aacfa1f49b606
checksum: f53bfe97f7c8b2b6d23cf572750d4e7d1e0c5fff1c36d859d0ec84556a827b8785077bc27676bf7e71fae538e517c3ecc0f37e7f593be913d884805d931bc8be
languageName: node
linkType: hard

Expand Down

0 comments on commit 7e52505

Please sign in to comment.