Skip to content

Commit

Permalink
use correct pps for earn (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
timongll authored Sep 3, 2023
1 parent 6cb0e0b commit e27b66c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
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

3 comments on commit e27b66c

@vercel
Copy link

@vercel vercel bot commented on e27b66c Sep 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on e27b66c Sep 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ribbon-governance – ./governance

ribbon-governance-git-master-ribbon-finance.vercel.app
ribbon-governance-ribbon-finance.vercel.app
vote.ribbon.finance

@vercel
Copy link

@vercel vercel bot commented on e27b66c Sep 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ribbon-frontend – ./webapp

ribbon-frontend-git-master-ribbon-finance.vercel.app
app.ribbon.finance
ribbon-frontend-ribbon-finance.vercel.app

Please sign in to comment.