Skip to content

Commit

Permalink
fix: Only show update to safe owners
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Nov 28, 2024
1 parent 92085f3 commit 694b067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/common/SafeTokenWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import UnreadBadge from '@/components/common/UnreadBadge'
import { IS_PRODUCTION, SAFE_TOKEN_ADDRESSES, SAFE_LOCKING_ADDRESS } from '@/config/constants'
import { AppRoutes } from '@/config/routes'
import useChainId from '@/hooks/useChainId'
import useIsSafeOwner from '@/hooks/useIsSafeOwner'
import type { Vesting } from '@/hooks/useSafeTokenAllocation'
import useSafeTokenAllocation, { useSafeVotingPower } from '@/hooks/useSafeTokenAllocation'
import { OVERVIEW_EVENTS } from '@/services/analytics'
Expand Down Expand Up @@ -50,6 +51,7 @@ const SafeTokenWidget = () => {
const safeAddress = useSafeAddress()
const query = useSearchParams()
const darkMode = useDarkMode()
const isSafeOwner = useIsSafeOwner()

const [allocationData, , allocationDataLoading] = useSafeTokenAllocation()
const [allocation, , allocationLoading] = useSafeVotingPower(allocationData)
Expand All @@ -71,7 +73,7 @@ const SafeTokenWidget = () => {
}

const flooredSafeBalance = formatVisualAmount(allocation || BigInt(0), TOKEN_DECIMALS, 0)
const canRedeemSAPUnboosted = canRedeemSAPUnboostedAllocation(allocationData)
const canRedeemSAPUnboosted = canRedeemSAPUnboostedAllocation(allocationData) && isSafeOwner

return (
<Box className={css.container}>
Expand Down

0 comments on commit 694b067

Please sign in to comment.