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 3daf44c commit 4e70a85
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 @@ -245,7 +245,7 @@ export const useSky = ({
if (!walletAddress) {
return 'Connect wallet'
}
if (!isOwner) {
if (!isOwner && viewWalletAddress) {
return 'Go to your position'
}
if (
Expand All @@ -259,6 +259,7 @@ export const useSky = ({
return stake ? (isTokenSwapped ? `Unstake` : `Stake`) : isTokenSwapped ? `Downgrade` : `Upgrade`
}, [
walletAddress,
viewWalletAddress,
resolvedPrimaryTokenData.allowance,
amount,
isTokenSwapped,
Expand Down

0 comments on commit 4e70a85

Please sign in to comment.