Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use correct pps for earn #718

Merged
merged 4 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion shared/src/components/Product/Theta/YieldCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ const YieldCard: React.FC<YieldCardProps> = ({
{positionState === "partiallyPaused" && "Partially Paused"}
</SecondaryText>
<Title fontSize={14}>
{vaultAccount
{vaultAccount && vault !== "rSOL-THETA"
? `${formatBigNumber(
vaultAccount.totalBalance.add(pausedAmount),
decimals
Expand All @@ -886,6 +886,7 @@ const YieldCard: React.FC<YieldCardProps> = ({
positionState,
color,
vaultAccount,
vault,
pausedAmount,
asset,
]);
Expand Down
3 changes: 2 additions & 1 deletion shared/src/components/Vault/YourPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ const YourPosition: React.FC<YourPositionProps> = ({
]);

const render = useMemo(() => {
if (!vaultAccount) {
if (!vaultAccount || vaultOption === "rSOL-THETA") {
return <></>;
}
// return paused widget if account has paused balance and no vault balance
Expand All @@ -735,6 +735,7 @@ const YourPosition: React.FC<YourPositionProps> = ({
}
}, [
vaultAccount,
vaultOption,
positionState,
positionWidget,
pausedPositionWidget,
Expand Down
3 changes: 1 addition & 2 deletions shared/src/hooks/useFetchEarnVaultData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
getVaultNetwork,
EarnVaultList,
VIPVaultList,
isEarnVault,
} from "../constants/constants";
import { isProduction, isTreasury, isVIP } from "../utils/env";
import { getVaultContract } from "./useVaultContract";
Expand Down Expand Up @@ -203,7 +202,7 @@ const useFetchEarnVaultData = (): V2VaultData => {
vault,
totalBalance,
cap,
pricePerShare: actualPricePerShare,
pricePerShare: usedPricePerShare,
round: round,
roundPricePerShare,
lockedBalanceInAsset: accountVaultBalance,
Expand Down
4 changes: 0 additions & 4 deletions webapp/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<MobileMenuOpenProps>`
Expand Down Expand Up @@ -158,7 +157,6 @@ const Header = () => {
const staking = useRouteMatch({ path: "/staking", exact: true });
const headerRef = useRef<HTMLDivElement>(null);
const [, setComponentRefs] = useGlobalState("componentRefs");
const lendLink = useLendLink();
const onToggleMenu = () => {
setIsMenuOpen(!isMenuOpen);
};
Expand Down Expand Up @@ -276,7 +274,6 @@ const Header = () => {
/>
</div>
)}
{renderLinkItem("LEND", lendLink, true, true, true, true)}
</LinksContainer>
</HeaderAbsoluteContainer>

Expand Down Expand Up @@ -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)}
Expand Down