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

Legacy badger com changes (#2556) #2559

Merged
merged 1 commit into from
Jul 10, 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
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ const YieldBearingRewards = observer(({ open, onModalClose }: YieldBearingReward
the overall return on your deposits. No staking, locking, delegating, voting, bribing or claiming. Just
earning.
</Typography>
<Typography gutterBottom className={classes.contentText}>
Do Less, Earn More.
</Typography>
</DialogContent>
</Dialog>
);
Expand Down
3 changes: 2 additions & 1 deletion src/components-v2/common/dialogs/VaultDeposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export const VaultDeposit = observer(({ open = false, vault, depositAdvisory, on
const deposit = TokenBalance.fromString(userBalance, amount === '' ? '0' : amount);
const vaultCaps = user.vaultCaps[vault.vaultToken];

let canDeposit = wallet.isConnected && !!amount && deposit.tokenBalance.gt(0);
let canDeposit: boolean =
wallet.isConnected && !!amount && deposit.tokenBalance.gt(0) && vault.state !== VaultState.Discontinued;

if (canDeposit && vaultCaps) {
const vaultHasSpace = vaultCaps.totalDepositCap.gte(deposit.tokenBalance);
Expand Down
7 changes: 4 additions & 3 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ function stringHash(input?: string): string | undefined {
}

// Message should be defined or explicitly undefined.
export const APP_NEWS_MESSAGE = undefined;
export const APP_NEWS_MESSAGE =
'app.badger.com has officially been migrated to legacy.badger.com and the discontinuation of all remaining vaults is in progress. To learn more about Badgers progression toward further decentralization ';
// Text & URL should be defined or explicitly undefined.
export const APP_NEWS_URL_TEXT = 'Learn How.';
export const APP_NEWS_URL = 'https://docs.badger.com/assistants/removing-exposure-to-renbtc';
export const APP_NEWS_URL_TEXT = 'Click here';
export const APP_NEWS_URL = 'https://badgerdao.medium.com/progressing-towards-further-decentralization-25351d4d240b';
export const APP_NEWS_STORAGE_HASH = stringHash(APP_NEWS_MESSAGE);
4 changes: 4 additions & 0 deletions src/mobx/stores/VaultStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ export default class VaultStore {
return false;
}

if (vault.state === VaultState.Discontinued) {
return false;
}

return this.store.user.onGuestList(vault);
}

Expand Down
3 changes: 1 addition & 2 deletions src/pages/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { makeStyles } from '@material-ui/core/styles';
import VaultListTitle from 'components-v2/landing/VaultListTitle';
import { observer } from 'mobx-react-lite';
import React from 'react';

Expand All @@ -17,7 +16,7 @@ const Landing = observer(() => {
const classes = useStyles();
return (
<LayoutContainer className={classes.root}>
<VaultListTitle />
{/* <VaultListTitle /> */}
<VaultsSearchControls />
<VaultListDisplay />
</LayoutContainer>
Expand Down
Loading