diff --git a/packages/prop-house-webapp/src/components/TimedRoundProposalCard/index.tsx b/packages/prop-house-webapp/src/components/TimedRoundProposalCard/index.tsx index 0a4a3663f..a463d0d15 100644 --- a/packages/prop-house-webapp/src/components/TimedRoundProposalCard/index.tsx +++ b/packages/prop-house-webapp/src/components/TimedRoundProposalCard/index.tsx @@ -17,6 +17,7 @@ import { Proposal, Round, Timed } from '@prophouse/sdk-react'; import { useAppSelector } from '../../hooks'; import ProposalCardClaimAwardBar from '../ProposalCardClaimAwardBar'; import { getBlockExplorerURL } from '../../utils/getBlockExplorerUrl'; +import { getChecksumAddress } from '../../utils/getChecksumAddress'; import { useAccount, useChainId } from 'wagmi'; import Button, { ButtonColor } from '../Button'; import { cmdPlusClicked } from '../../utils/cmdPlusClicked'; @@ -162,7 +163,7 @@ const TimedRoundProposalCard: React.FC<{ {roundEndedAndNotCancelled && - account.address === proposal.proposer && + account.address === getChecksumAddress(proposal.proposer) && proposal.isWinner && } diff --git a/packages/prop-house-webapp/src/utils/getChecksumAddress.ts b/packages/prop-house-webapp/src/utils/getChecksumAddress.ts new file mode 100644 index 000000000..3103c6b32 --- /dev/null +++ b/packages/prop-house-webapp/src/utils/getChecksumAddress.ts @@ -0,0 +1,3 @@ +import { utils } from 'ethers'; + +export const getChecksumAddress = (address: string) => utils.getAddress(address.replace('0x', '').padStart(40, '0'))