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

Merkle staking button #1674

Draft
wants to merge 5 commits into
base: staging
Choose a base branch
from
Draft
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
13 changes: 9 additions & 4 deletions src/components/_cards/PortfolioCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { Rewards } from "./Rewards"
import { useNetwork } from "wagmi"
import WithdrawQueueCard from "../WithdrawQueueCard"
import withdrawQueueV0821 from "src/abi/withdraw-queue-v0.8.21.json"
import { CellarNameKey } from "data/types"
import { CellarNameKey, ConfigProps } from "data/types"
import { PointsDisplay } from "./PointsDisplay"
import { MerklePoints } from "./MerklePoints/MerklePoints"
import { BaseButton } from "components/_buttons/BaseButton"
Expand Down Expand Up @@ -171,6 +171,11 @@ export const PortfolioCard: VFC<BoxProps> = (props) => {
checkWithdrawRequest()
}, [withdrawQueueContract, address, cellarConfig])

const isMerkleRewardsException = (config: ConfigProps) => {
return config.cellarNameKey === CellarNameKey.REAL_YIELD_ETH_ARB
||config.cellarNameKey === CellarNameKey.REAL_YIELD_USD_ARB
}

return (
<TransparentCard
{...props}
Expand Down Expand Up @@ -381,9 +386,9 @@ export const PortfolioCard: VFC<BoxProps> = (props) => {
: "--")}
</CardStat>
</VStack>
{isBondButtonEnabled(cellarConfig) &&
isStakingAllowed &&
isMounted && (
{isMounted
&& (isMerkleRewardsException(cellarConfig) || isStakingAllowed)
&& (
<BondButton
disabled={
lpTokenDisabled || !buttonsEnabled
Expand Down
23 changes: 21 additions & 2 deletions src/data/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,8 @@ export const bondingPeriodOptions = (
config.cellarNameKey === CellarNameKey.TURBO_GHO ||
config.cellarNameKey === CellarNameKey.TURBO_SOMM ||
config.cellarNameKey === CellarNameKey.TURBO_EETH ||
config.cellarNameKey === CellarNameKey.REAL_YIELD_ETH_ARB ||
config.cellarNameKey ===
CellarNameKey.TEST_ARBITRUM_REAL_YIELD_USD ||
config.cellarNameKey === CellarNameKey.REAL_YIELD_USD_ARB ||
config.cellarNameKey === CellarNameKey.REAL_YIELD_BTC
) {
return [
Expand Down Expand Up @@ -323,6 +321,27 @@ export const bondingPeriodOptions = (
},
]
}
if (
config.cellarNameKey === CellarNameKey.REAL_YIELD_USD_ARB ||
config.cellarNameKey === CellarNameKey.REAL_YIELD_ETH_ARB) {
return [
{
title: "10 Day Unbonding",
amount: "1.1x SOMM",
value: 0,
},
{
title: "14 Day Unbonding",
amount: "1.2x SOMM",
value: 1,
},
{
title: "20 Day Unbonding",
amount: "1.25x SOMM",
value: 2,
},
]
}
if (
config.cellarNameKey === CellarNameKey.STEADY_BTC ||
config.cellarNameKey === CellarNameKey.STEADY_ETH ||
Expand Down