Skip to content

Commit

Permalink
feat: disable BUSD
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Aug 27, 2023
1 parent 4b6ab67 commit 64d4837
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 19 deletions.
8 changes: 8 additions & 0 deletions src/constants/disabledTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ interface DisabledToken {
}

export const DISABLED_TOKENS_TESTNET: DisabledToken[] = [
{
token: TESTNET_TOKENS.busd,
disabledActions: ['borrow', 'supply'],
},
{
token: TESTNET_TOKENS.ust,
disabledActions: ['borrow', 'supply'],
Expand All @@ -32,6 +36,10 @@ export const DISABLED_TOKENS_TESTNET: DisabledToken[] = [
];

export const DISABLED_TOKENS_MAINNET: DisabledToken[] = [
{
token: MAINNET_TOKENS.busd,
disabledActions: ['borrow', 'supply'],
},
{
token: MAINNET_TOKENS.ust,
disabledActions: ['borrow', 'supply'],
Expand Down
22 changes: 20 additions & 2 deletions src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import { ButtonGroup, Tag, TagGroup, TextField } from 'components';
import { ButtonGroup, NoticeWarning, Tag, TagGroup, TextField } from 'components';
import React, { InputHTMLAttributes, useMemo, useState } from 'react';
import { useTranslation } from 'translation';
import { Pool } from 'types';
Expand Down Expand Up @@ -28,7 +28,7 @@ export const DashboardUi: React.FC<DashboardUiProps> = ({
searchValue,
onSearchInputChange,
}) => {
const { t } = useTranslation();
const { t, Trans } = useTranslation();
const styles = useStyles();
const [activeTabIndex, setActiveTabIndex] = useState(0);
const [selectedPoolTagIndex, setSelectedPoolTagIndex] = useState<number>(0);
Expand Down Expand Up @@ -93,6 +93,24 @@ export const DashboardUi: React.FC<DashboardUiProps> = ({
<>
<ConnectWalletBanner />

<NoticeWarning
css={styles.banner}
description={
<Trans
i18nKey="dashboard.banner.busdDelisting"
components={{
Link: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
href="https://community.venus.io/t/chaos-labs-risk-parameter-updates-08-21-2023/3707"
rel="noreferrer"
/>
),
}}
/>
}
/>

<div css={styles.header}>
<TextField
css={[styles.tabletSearchTextField, showXlDownCss]}
Expand Down
36 changes: 19 additions & 17 deletions src/translation/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@
"yourAccount": "Your account"
},
"walletList": {
"comingSoon": "Coming soon...",
"termsOfServiceLink": "By connecting a wallet, you agree to Venus' <Anchor>Terms of Service</Anchor>"
"comingSoon": "Coming soon..."
}
},
"breadcrumbs": {
Expand Down Expand Up @@ -177,6 +176,9 @@
},
"dashboard": {
"allTag": "All",
"banner": {
"busdDelisting": "Borrowing and supplying have been paused for the BUSD token. For more information see the <Link>Chaos Labs recommendations</Link>."
},
"borrowMarketTableTitle": "Borrow market",
"borrowTabTitle": "Borrow",
"connectWalletBanner": {
Expand All @@ -195,26 +197,26 @@
"supplyTabTitle": "Supply"
},
"errors": {
"missingAbstainDescription": "Proposal needs an 'abstain' votes description",
"missingAgainstDescription": "Proposal needs an 'against' votes description",
"missingDescription": "There is no proposal description in the file",
"missingForDescription": "Proposal needs a 'for' votes description",
"missingParamForSignature": "There is no corresponding param for the function",
"missingTargetForSignature": "There is no corresponding target for the function",
"missingTitle": "Proposal needs to have a title",
"noMetaKey": "No metadata information is present in the file",
"noParamsKey": "File does not contain the list of params",
"noSignaturesKey": "There are no call signatures in the file",
"noTargetsKey": "File does not contain the list of targets",
"noTypeKey": "File does not indicate the proposal's type",
"somethingWentWrong": "Something went wrong",
"somethingWentWrongRetrievingTransactions": "Something went wrong retrieving transactions",
"somethingWentWrongRetrievingVoterAccounts": "Something went wrong retrieving voter accounts",
"somethingWentWrongRetrievingVoterDetails": "Something went wrong retrieving voter details",
"somethingWentWrongRetrievingVoterHistory": "Something went wrong retrieving voter history ",
"undefinedAccountErrorMessage": "Account undefined",
"walletNotConnected": "Wallet not connected",
"noMetaKey": "No metadata information is present in the file",
"noSignaturesKey": "There are no call signatures in the file",
"noTypeKey": "File does not indicate the proposal's type",
"noTargetsKey": "File does not contain the list of targets",
"noParamsKey": "File does not contain the list of params",
"missingTitle": "Proposal needs to have a title",
"missingTargetForSignature": "There is no corresponding target for the function",
"missingParamForSignature": "There is no corresponding param for the function",
"missingDescription": "There is no proposal description in the file",
"missingForDescription": "Proposal needs a 'for' votes description",
"missingAgainstDescription": "Proposal needs an 'against' votes description",
"missingAbstainDescription": "Proposal needs an 'abstain' votes description",
"validationError": "Validation failed for imported proposal:"
"validationError": "Validation failed for imported proposal:",
"walletNotConnected": "Wallet not connected"
},
"footer": {
"latestNumber": "Latest Block:\u00a0"
Expand Down Expand Up @@ -874,8 +876,8 @@
"votingOptions": "Voting options"
},
"createProposalModal": {
"createProposal": "Create Proposal",
"createManually": "Create manually",
"createProposal": "Create Proposal",
"uploadFile": "Upload file",
"youCanEitherCreateManuallyOrUpload": "You can either create a proposal manually or upload a file containing its details. If you choose to upload a file, you can use this template as an example: <Link>Github</Link>"
},
Expand Down

0 comments on commit 64d4837

Please sign in to comment.