From 195fc090b5b4aa5839ec1b91667f302f26984be5 Mon Sep 17 00:00:00 2001 From: Timothy Date: Sun, 3 Sep 2023 18:53:15 +0800 Subject: [PATCH 1/4] use correct pps for earn --- shared/src/hooks/useFetchEarnVaultData.ts | 3 +-- webapp/src/components/Header/Header.tsx | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/shared/src/hooks/useFetchEarnVaultData.ts b/shared/src/hooks/useFetchEarnVaultData.ts index 4f08cb3b0..fdacd0bd8 100644 --- a/shared/src/hooks/useFetchEarnVaultData.ts +++ b/shared/src/hooks/useFetchEarnVaultData.ts @@ -5,7 +5,6 @@ import { getVaultNetwork, EarnVaultList, VIPVaultList, - isEarnVault, } from "../constants/constants"; import { isProduction, isTreasury, isVIP } from "../utils/env"; import { getVaultContract } from "./useVaultContract"; @@ -203,7 +202,7 @@ const useFetchEarnVaultData = (): V2VaultData => { vault, totalBalance, cap, - pricePerShare: actualPricePerShare, + pricePerShare: usedPricePerShare, round: round, roundPricePerShare, lockedBalanceInAsset: accountVaultBalance, diff --git a/webapp/src/components/Header/Header.tsx b/webapp/src/components/Header/Header.tsx index 41bbc066d..d14afef3c 100644 --- a/webapp/src/components/Header/Header.tsx +++ b/webapp/src/components/Header/Header.tsx @@ -19,7 +19,6 @@ import ExternalLink from "shared/lib/assets/icons/externalLink"; import { useGlobalState } from "shared/lib/store/store"; import FilterDropdown from "shared/lib/components/Common/FilterDropdown"; import { useHistory } from "react-router-dom"; -import { useLendLink } from "shared/lib/hooks/useLendLink"; import { BuyButton } from "../Wallet/BuyButton"; export const HeaderContainer = styled.div` @@ -158,7 +157,6 @@ const Header = () => { const staking = useRouteMatch({ path: "/staking", exact: true }); const headerRef = useRef(null); const [, setComponentRefs] = useGlobalState("componentRefs"); - const lendLink = useLendLink(); const onToggleMenu = () => { setIsMenuOpen(!isMenuOpen); }; @@ -276,7 +274,6 @@ const Header = () => { /> )} - {renderLinkItem("LEND", lendLink, true, true, true, true)} @@ -330,7 +327,6 @@ const Header = () => { Boolean(useRouteMatch({ path: "/staking", exact: true })) )} {renderLinkItem("STAKE RBN", URLS.governance, false, true, true)} - {renderLinkItem("LEND", lendLink, true, true, true, true)} {renderLinkItem("DISCORD", URLS.discord, false, false, true)} {renderLinkItem("TWITTER", URLS.twitter, false, false, true)} {renderLinkItem("GITHUB", URLS.github, false, false, true)} From bb3a71a819e60f94068471c157313445af2af1c9 Mon Sep 17 00:00:00 2001 From: Timothy Date: Sun, 3 Sep 2023 18:57:33 +0800 Subject: [PATCH 2/4] hide sol position widget --- shared/src/components/Vault/YourPosition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/src/components/Vault/YourPosition.tsx b/shared/src/components/Vault/YourPosition.tsx index 92af2ac3b..4442145e4 100644 --- a/shared/src/components/Vault/YourPosition.tsx +++ b/shared/src/components/Vault/YourPosition.tsx @@ -716,7 +716,7 @@ const YourPosition: React.FC = ({ ]); const render = useMemo(() => { - if (!vaultAccount) { + if (!vaultAccount || vaultOption === "rSOL-THETA") { return <>; } // return paused widget if account has paused balance and no vault balance From 00939887e485ca41307b645efaaf1adfa9ef7cbc Mon Sep 17 00:00:00 2001 From: Timothy Date: Sun, 3 Sep 2023 19:03:55 +0800 Subject: [PATCH 3/4] remove sol subgraph data --- shared/src/components/Product/Theta/YieldCard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/components/Product/Theta/YieldCard.tsx b/shared/src/components/Product/Theta/YieldCard.tsx index c28319bbf..3ce1d4370 100644 --- a/shared/src/components/Product/Theta/YieldCard.tsx +++ b/shared/src/components/Product/Theta/YieldCard.tsx @@ -866,7 +866,7 @@ const YieldCard: React.FC = ({ {positionState === "partiallyPaused" && "Partially Paused"} - {vaultAccount + {vaultAccount && vault !== "rSOL-THETA" ? `${formatBigNumber( vaultAccount.totalBalance.add(pausedAmount), decimals @@ -886,6 +886,7 @@ const YieldCard: React.FC<YieldCardProps> = ({ positionState, color, vaultAccount, + vault, pausedAmount, asset, ]); From aafd3c6c2cead83960418ba46b2c878155708475 Mon Sep 17 00:00:00 2001 From: Timothy <timongll@hotmail.com> Date: Sun, 3 Sep 2023 19:04:28 +0800 Subject: [PATCH 4/4] dependency --- shared/src/components/Vault/YourPosition.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/src/components/Vault/YourPosition.tsx b/shared/src/components/Vault/YourPosition.tsx index 4442145e4..b2fa42494 100644 --- a/shared/src/components/Vault/YourPosition.tsx +++ b/shared/src/components/Vault/YourPosition.tsx @@ -735,6 +735,7 @@ const YourPosition: React.FC<YourPositionProps> = ({ } }, [ vaultAccount, + vaultOption, positionState, positionWidget, pausedPositionWidget,