From 789b590beb3e1801109d855bbfc07ceca5dcd89a Mon Sep 17 00:00:00 2001 From: Eric DeVito <89915894+EricDevito@users.noreply.github.com> Date: Thu, 8 Aug 2024 03:16:48 +0100 Subject: [PATCH] fix nouns.wtf voting --- packages/nouns-webapp/src/wrappers/nounsDao.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/nouns-webapp/src/wrappers/nounsDao.ts b/packages/nouns-webapp/src/wrappers/nounsDao.ts index a0dac1734..eac3da35b 100644 --- a/packages/nouns-webapp/src/wrappers/nounsDao.ts +++ b/packages/nouns-webapp/src/wrappers/nounsDao.ts @@ -842,15 +842,16 @@ export const useCastVoteWithReason = () => { export const useCastRefundableVote = () => { const { library } = useEthers(); + const functionSig = 'castRefundableVote(uint256,uint8)'; const { send: castRefundableVote, state: castRefundableVoteState } = useContractFunction( nounsDaoContract, - 'castRefundableVote', + functionSig ); return { castRefundableVote: async (...args: any[]): Promise => { const contract = connectContractToSigner(nounsDaoContract, undefined, library); - const gasLimit = await contract.estimateGas.castRefundableVote(...args); + const gasLimit = await contract.estimateGas[functionSig](...args); return castRefundableVote(...args, { gasLimit: gasLimit.add(30_000), // A 30,000 gas pad is used to avoid 'Out of gas' errors }); @@ -862,15 +863,14 @@ export const useCastRefundableVote = () => { export const useCastRefundableVoteWithReason = () => { const { library } = useEthers(); // prettier-ignore - const { send: castRefundableVoteWithReason, state: castRefundableVoteWithReasonState } = useContractFunction( - nounsDaoContract, - 'castRefundableVoteWithReason', - ); + const functionSig = 'castRefundableVoteWithReason(uint256,uint8,string)'; + const { send: castRefundableVoteWithReason, state: castRefundableVoteWithReasonState } = + useContractFunction(nounsDaoContract, functionSig); return { castRefundableVoteWithReason: async (...args: any[]): Promise => { const contract = connectContractToSigner(nounsDaoContract, undefined, library); - const gasLimit = await contract.estimateGas.castRefundableVoteWithReason(...args); + const gasLimit = await contract.estimateGas[functionSig](...args); return castRefundableVoteWithReason(...args, { gasLimit: gasLimit.add(30_000), // A 30,000 gas pad is used to avoid 'Out of gas' errors });