Skip to content

Commit

Permalink
fix missing attached address
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Colon committed Mar 25, 2024
1 parent fae4b78 commit e2933f3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/ui/menus/ManageDAO/ManageDAOMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function ManageDAOMenu({
const {
node: { safe },
governance: { type },
guardContracts: { freezeVotingContractAddress },
} = useFractal();
const baseContracts = useSafeContracts();
const currentTime = BigNumber.from(useBlockTimestamp());
Expand Down Expand Up @@ -139,8 +140,8 @@ export function ManageDAOMenu({
const freezeOption = {
optionKey: 'optionInitiateFreeze',
onClick: () => {
const freezeVotingContract = baseContracts?.freezeMultisigVotingMasterCopyContract.asSigner;
const freezeVotingType = guardContracts?.freezeVotingType;
const freezeVotingContract = baseContracts!.freezeMultisigVotingMasterCopyContract.asSigner.attach(freezeVotingContractAddress!);
const freezeVotingType = guardContracts!.freezeVotingType;
if (freezeVotingContract) {
if (
freezeVotingType === FreezeVotingType.MULTISIG ||
Expand All @@ -150,8 +151,8 @@ export function ManageDAOMenu({
} else if (freezeVotingType === FreezeVotingType.ERC721) {
getUserERC721VotingTokens(undefined, parentAddress).then(tokensInfo => {
const freezeERC721VotingContract =
baseContracts?.freezeERC721VotingMasterCopyContract.asSigner;
return freezeERC721VotingContract['castFreezeVote(address[],uint256[])'](
baseContracts!.freezeERC721VotingMasterCopyContract.asSigner.attach(freezeVotingContractAddress!);
return freezeERC721VotingContract!['castFreezeVote(address[],uint256[])'](
tokensInfo.totalVotingTokenAddresses,
tokensInfo.totalVotingTokenIds,
);
Expand Down Expand Up @@ -236,6 +237,7 @@ export function ManageDAOMenu({
handleNavigateToSettings,
getUserERC721VotingTokens,
baseContracts,
freezeVotingContractAddress
]);

return (
Expand Down

0 comments on commit e2933f3

Please sign in to comment.