From 694b0679f5ef20b2266cf4da2ff94fbcf1f48271 Mon Sep 17 00:00:00 2001 From: Usame Algan Date: Thu, 28 Nov 2024 11:44:50 +0100 Subject: [PATCH] fix: Only show update to safe owners --- src/components/common/SafeTokenWidget/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/common/SafeTokenWidget/index.tsx b/src/components/common/SafeTokenWidget/index.tsx index 92b0c73523..2c9dc11c3f 100644 --- a/src/components/common/SafeTokenWidget/index.tsx +++ b/src/components/common/SafeTokenWidget/index.tsx @@ -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' @@ -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) @@ -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 (