diff --git a/generate-static.sh b/generate-static.sh index dde67c6..77efa2a 100755 --- a/generate-static.sh +++ b/generate-static.sh @@ -6,4 +6,5 @@ mkdir liquity && cp index.html liquity mkdir faq && cp index.html faq mkdir risk && cp index.html risk mkdir terms && cp index.html terms -mkdir farm-info && cp index.html farm-info \ No newline at end of file +mkdir farm-info && cp index.html farm-info +mkdir vesta && cp index.html vesta \ No newline at end of file diff --git a/package.json b/package.json index d0a3b86..c96e6f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bprotocol-react-client", - "version": "1.0.25", + "version": "1.0.29", "private": true, "dependencies": { "@cloudflare/kv-asset-handler": "^0.1.0", diff --git a/src/App.js b/src/App.js index 1e637a8..fccb37b 100644 --- a/src/App.js +++ b/src/App.js @@ -19,6 +19,8 @@ routerStore.setRouteProps(browserHistory) const Dashboard = React.lazy(() => import("./containers/Dashboard")); const Compound = React.lazy(() => import("./containers/Compound")); const Liquity = React.lazy(() => import("./containers/Liquity")); +const LiquityLegacy = React.lazy(() => import("./containers/LiquityLegacy")); +const Vesta = React.lazy(() => import("./containers/Vesta")); const Risk = React.lazy(() => import("./containers/Risk")); const TermsOfUse = React.lazy(() => import("./containers/Terms")); const FAQ = React.lazy(() => import("./containers/FAQ")); @@ -53,6 +55,8 @@ const App = observer(() => { (renderPage(props, Dashboard))} /> (renderPage(props, Compound))} /> (renderPage(props, Liquity))} /> + (renderPage(props, LiquityLegacy))} /> + (renderPage(props, Vesta))} /> (renderPage(props, FAQ))} /> (renderPage(props, TermsOfUse))} /> (renderPage(props, Risk))} /> diff --git a/src/assets/vesta-logo.svg b/src/assets/vesta-logo.svg new file mode 100644 index 0000000..3c0fd39 --- /dev/null +++ b/src/assets/vesta-logo.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 28a4c88..a808403 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -7,6 +7,7 @@ import Discord from "../assets/discord.svg"; import AAVELogo from "../assets/aav-ewhite-logo.svg"; import CompoundLogo from "../assets/compound-logo.svg"; import LiquityLogo from "../assets/liquity-logo.svg"; +import VestaLogo from "../assets/vesta-logo.svg"; import MakerLogo from "../assets/logo-maker-white.svg"; import HundredLogo from "../assets/hundred-logo.svg"; import MigrationModal from "./modals/MigrationModal"; @@ -134,14 +135,22 @@ class Sidebar extends Component { {false && (Testnet)} - +
this.handleItemSelect("vesta")}> + + Testnet +
- Lending + Legacy
this.handleItemSelect("compound")}>
+ +
this.handleItemSelect("liquity-leagacy")}> + + (Deprecated) +
diff --git a/src/components/TvlTooltip.js b/src/components/TvlTooltip.js index f78ec7b..899fc74 100644 --- a/src/components/TvlTooltip.js +++ b/src/components/TvlTooltip.js @@ -6,6 +6,7 @@ import mainStore from "../stores/main.store" import apyStore from "../stores/apy.store" import {toCommmSepratedString} from '../lib/Utils' import liquityStore from "../stores/main.liquity.store" +import mainHundredStore from "../stores/main.hundred.store" const ToolTipLine = styled.div` min-width: 160px; @@ -33,7 +34,8 @@ const ToolTipTitle = styled.div` class TvlTooltip extends React.Component { render() { - const { liquityTvlNumeric, othersTvlNumeric } = liquityStore + const { liquityTvlNumeric } = liquityStore + const totalDeposits = parseFloat(apyStore.totalCollateral) + liquityTvlNumeric + mainHundredStore.TVL return ( @@ -42,16 +44,12 @@ class TvlTooltip extends React.Component {
total deposits:
-
${toCommmSepratedString(parseFloat(apyStore.totalCollateral).toFixed(2))}
+
${toCommmSepratedString(parseFloat(totalDeposits).toFixed(2))}
total debt:
${toCommmSepratedString(parseFloat(apyStore.totalDebt).toFixed(2))}
- -
number of users:
-
{apyStore.totalUsers}
-
Maker @@ -65,10 +63,6 @@ class TvlTooltip extends React.Component {
debt:
${toCommmSepratedString(parseFloat(apyStore.makerTotalDebt).toFixed(2))}
- -
users:
-
{apyStore.makerUsers}
-
Compound @@ -82,21 +76,25 @@ class TvlTooltip extends React.Component {
debt:
${toCommmSepratedString(parseFloat(apyStore.compoundTotalDebt).toFixed(2))}
- -
users:
-
{apyStore.compoundUsers}
-
Liquity -
bprotocol.org:
+
Deposits:
${toCommmSepratedString((liquityTvlNumeric).toFixed(2))}
+ + Hundred + + + +
Arbitrum:
+
${toCommmSepratedString((mainHundredStore.hundredTvlArbitrum).toFixed(2))}
+
-
pickle.finance & others:
-
${toCommmSepratedString((othersTvlNumeric).toFixed(2))}
+
Fantom:
+
${toCommmSepratedString((mainHundredStore.hundredTvlFantom).toFixed(2))}
diff --git a/src/containers/FarmInfo.js b/src/containers/FarmInfo.js index 001455a..a421cd2 100644 --- a/src/containers/FarmInfo.js +++ b/src/containers/FarmInfo.js @@ -13,6 +13,7 @@ import bproStore, {uBproStore} from "../stores/bpro.store" import mainStore from "../stores/main.store" import mainCompStore from "../stores/main.comp.store" import liquityStore from "../stores/main.liquity.store" +import mainHundredStore from "../stores/main.hundred.store" import userStore from "../stores/user.store" import instaStore, {bproInstaStores} from "../stores/insta.store" import BproClaimModal from "../components/modals/BproClaimModal" @@ -179,8 +180,8 @@ class FarmInfo extends Component { const params = qs.parse(search, { ignoreQueryPrefix: true }) const { tvlNumeric: compTvl } = mainCompStore const { tvlUsdNumeric: makerTvl } = mainStore - const { liquityTvlNumeric: liquityTvl, othersTvlNumeric } = liquityStore - const tvl = parseInt((compTvl + makerTvl + liquityTvl + othersTvlNumeric) / 1000000) + const { liquityTvlNumeric: liquityTvl } = liquityStore + const tvl = parseInt((compTvl + makerTvl + liquityTvl + mainHundredStore.TVL) / 1000000) const instaAccounts = instaStore.accounts if(params.inIframe){ diff --git a/src/containers/Liquity.js b/src/containers/Liquity.js index 8faffb4..e6ad2c0 100644 --- a/src/containers/Liquity.js +++ b/src/containers/Liquity.js @@ -15,7 +15,7 @@ class Liquity extends Component { render() { return (