Skip to content

Commit

Permalink
fix: handle multisig for voter address
Browse files Browse the repository at this point in the history
  • Loading branch information
thekidnamedkd committed May 22, 2024
1 parent ffc31f0 commit 63904a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/containers/votingTerminal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {ProposalStatus} from '@aragon/sdk-client-common';
import {useTranslation} from 'react-i18next';
import styled from 'styled-components';
import {useProviders} from 'context/providers';
import {formatUnits} from 'ethers/lib/utils';

Check failure on line 20 in src/containers/votingTerminal/index.tsx

View workflow job for this annotation

GitHub Actions / build-and-test

'formatUnits' is defined but never used

Check failure on line 20 in src/containers/votingTerminal/index.tsx

View workflow job for this annotation

GitHub Actions / webapp-preview

'formatUnits' is defined but never used
import {usePastVotingPowerAsync} from 'services/aragon-sdk/queries/use-past-voting-power';
import {Web3Address, shortenAddress} from 'utils/library';
import BreakdownTab from './breakdownTab';
Expand Down Expand Up @@ -132,10 +133,12 @@ export const VotingTerminal: React.FC<VotingTerminalProps> = ({
voters.map(async voter => {
const wallet = await Web3Address.create(
provider,
voter.wallet.toLowerCase().split('_')[1]
isMultisigProposal
? voter.wallet
: voter.wallet.toLowerCase().split('_')[1]
);

// commenting out for now to just use tokenAmount fallback
// commenting out for now to just use token
// let balance;

// if (daoToken?.address && wallet.address) {
Expand All @@ -155,6 +158,7 @@ export const VotingTerminal: React.FC<VotingTerminalProps> = ({
};
})
);
console.log('response', response);
setDisplayedVoters(response);
}

Expand All @@ -178,6 +182,7 @@ export const VotingTerminal: React.FC<VotingTerminalProps> = ({
: displayedVoters.filter(voter =>
voter.wallet.includes(query.toLowerCase())
);
console.log('filteredVoters', query);
}, [displayedVoters, query]);

const minimumReached = useMemo(() => {
Expand Down

0 comments on commit 63904a1

Please sign in to comment.