From d00cfc6aba0e425fa3248a960088c63627c7f0d7 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Mon, 6 May 2024 23:37:51 -0400 Subject: [PATCH] Delete now unused useDelegateVote hook --- src/hooks/DAO/useDelegateVote.ts | 35 -------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/hooks/DAO/useDelegateVote.ts diff --git a/src/hooks/DAO/useDelegateVote.ts b/src/hooks/DAO/useDelegateVote.ts deleted file mode 100644 index f53b1c5f03..0000000000 --- a/src/hooks/DAO/useDelegateVote.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { useCallback } from 'react'; -import { useTranslation } from 'react-i18next'; -import { LockRelease } from '../../assets/typechain-types/dcnt'; -import { useTransaction } from '../utils/useTransaction'; - -const useDelegateVote = () => { - const [contractCallDelegateVote, contractCallPending] = useTransaction(); - - const { t } = useTranslation('transaction'); - - const delegateVote = useCallback( - ({ - delegatee, - votingTokenContract, - successCallback, - }: { - delegatee: string; - votingTokenContract: LockRelease; - successCallback?: () => void; - }) => { - contractCallDelegateVote({ - contractFn: () => votingTokenContract.delegate(delegatee), - pendingMessage: t('pendingDelegateVote'), - failedMessage: t('failedDelegateVote'), - successMessage: t('successDelegateVote'), - successCallback, - }); - }, - [contractCallDelegateVote, t], - ); - - return { delegateVote, contractCallPending }; -}; - -export default useDelegateVote;