From 1ec5453ee96122fb244b419c6e78346d495432cc Mon Sep 17 00:00:00 2001 From: Marcin Ciarka Date: Mon, 23 Sep 2024 13:37:31 +0200 Subject: [PATCH] Refactor useSky hook to handle view wallet address in button text --- features/sky/hooks/useSky.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/sky/hooks/useSky.ts b/features/sky/hooks/useSky.ts index a9bb8b2daa..f08f08d866 100644 --- a/features/sky/hooks/useSky.ts +++ b/features/sky/hooks/useSky.ts @@ -217,7 +217,7 @@ export const useSky = ({ if (!walletAddress) { return connect } - if (!isOwner) { + if (!isOwner && viewWalletAddress) { return () => { void replace(`/earn/srr/${walletAddress}`) } @@ -234,6 +234,7 @@ export const useSky = ({ isOwner, replace, walletAddress, + viewWalletAddress, resolvedPrimaryTokenData.allowance, amount, executeDeposit,