diff --git a/src/components/Counter/index.js b/src/components/Counter/index.js new file mode 100644 index 0000000..ac189e5 --- /dev/null +++ b/src/components/Counter/index.js @@ -0,0 +1,65 @@ +import React from "react"; +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; +import treeBG from './trees.jpg'; +import CountUp from 'react-countup'; + +const Counter = () => { + return ( + + + + Charity + + + + + + + + Trees planted + + + + + + + + Trees planted + + + + + + + + Trees planted + + + + + ); +}; + +export default Counter; \ No newline at end of file diff --git a/src/components/Counter/styles.js b/src/components/Counter/styles.js new file mode 100644 index 0000000..240eaca --- /dev/null +++ b/src/components/Counter/styles.js @@ -0,0 +1,5 @@ +export const styles = { + treeBG: { + width: '100%' + } +}; \ No newline at end of file diff --git a/src/components/Counter/trees.jpg b/src/components/Counter/trees.jpg new file mode 100644 index 0000000..62713fc Binary files /dev/null and b/src/components/Counter/trees.jpg differ diff --git a/src/components/Experience/index.js b/src/components/Experience/index.js index 678dc49..7569fd0 100644 --- a/src/components/Experience/index.js +++ b/src/components/Experience/index.js @@ -45,6 +45,10 @@ const Experience = () => { const rpcEndpoint = "https://rpc-juno-wynd.mib.tech/"; const client = await CosmWasmClient.connect(rpcEndpoint); + let lsd = await client.queryContractSmart('juno1snv8z7j75jwfce4uhkjh5fedpxjnrx9v20ffflzws57atshr79yqnw032r', { + supply: {} + }); + const contractAddress = "juno1sy9mlw47w44f94zea7g98y5ff4cvtc8rfv75jgwphlet83wlf4ssa050mv"; return await client.queryContractSmart(contractAddress, { @@ -62,6 +66,9 @@ const Experience = () => { const wyndTokenAddress = "juno1mkw83sv6c7sjdvsaplrzc8yaes9l42p4mhy0ssuxjnyzl87c9eps7ce3m9"; + const denom = + "ujuno"; + // Fetch API to get all tokens const allPrices = await ( await fetch("https://api.wynddao.com/assets/prices") @@ -72,6 +79,20 @@ const Experience = () => { (el) => el.asset == wyndTokenAddress )?.priceInUsd; + + const _junoPrice = allPrices.find( + (el) => el.asset == denom + )?.priceInUsd; + + const rpcEndpoint = "https://rpc-juno-wynd.mib.tech/"; + const client = await CosmWasmClient.connect(rpcEndpoint); + + let lsd = await client.queryContractSmart('juno1snv8z7j75jwfce4uhkjh5fedpxjnrx9v20ffflzws57atshr79yqnw032r', { + supply: {} + }); + + const _lsd = lsd.supply.total_bonded * _junoPrice / 10 ** 6; + // Format and set WYND price to show on the page const formatedUSDPrice = formatCurrencyStatic.format(_wyndPrice); setWyndPrice(formatedUSDPrice); @@ -119,7 +140,8 @@ const Experience = () => { return Number(prices[0]) + Number(prices[1]); }); - const _totalTVL = pricesInUSD.reduce((acc, b) => acc + b, 0); + let _totalTVL = pricesInUSD.reduce((acc, b) => acc + b, 0); + _totalTVL += _lsd; const formattedPrice = (_totalTVL / 1000000).toFixed(2); setTotalTVL(formattedPrice + "M $"); }; diff --git a/src/components/HeroBanner/index.js b/src/components/HeroBanner/index.js index 76a0da6..282ec93 100644 --- a/src/components/HeroBanner/index.js +++ b/src/components/HeroBanner/index.js @@ -53,7 +53,7 @@ const HeroBanner = (props) => { sm: 'flex-start' } }}> - + { variant="p" style={styles.buttonText} > - Launch DEX + Launch App @@ -126,16 +126,10 @@ const HeroBanner = (props) => { sm: '1px solid #31253F' }, mb: { - xs: 0, - sm: 9 + xs: 0 } }}> - + ); diff --git a/src/components/HeroBanner/trees.jpg b/src/components/HeroBanner/trees.jpg new file mode 100644 index 0000000..62713fc Binary files /dev/null and b/src/components/HeroBanner/trees.jpg differ diff --git a/src/components/NavBar/index.js b/src/components/NavBar/index.js index 1461ae7..d30df71 100644 --- a/src/components/NavBar/index.js +++ b/src/components/NavBar/index.js @@ -75,17 +75,10 @@ const NavBar = (props) => { - - - - - - + { const checkDisclaimer = () => { if(localStorage.getItem('disclaimer')) { - window.open('https://dex.wynddao.com/', '_blank').focus(); + window.open('https://app.wynddao.com/', '_blank').focus(); } else { setModalOpen(true); } @@ -23,6 +24,7 @@ const IndexPage = () => { +