Skip to content

Commit

Permalink
Refactor useSky hook to handle view wallet address in button text
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinciarka committed Sep 23, 2024
1 parent 4e70a85 commit 1ec5453
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion features/sky/hooks/useSky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const useSky = ({
if (!walletAddress) {
return connect
}
if (!isOwner) {
if (!isOwner && viewWalletAddress) {
return () => {
void replace(`/earn/srr/${walletAddress}`)
}
Expand All @@ -234,6 +234,7 @@ export const useSky = ({
isOwner,
replace,
walletAddress,
viewWalletAddress,
resolvedPrimaryTokenData.allowance,
amount,
executeDeposit,
Expand Down

0 comments on commit 1ec5453

Please sign in to comment.