From 74890bdd2556d739f5e97f7eccfdc298ca2bdb7c Mon Sep 17 00:00:00 2001 From: MusabShakeel576 <46605319+MusabShakeel576@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:39:39 +0000 Subject: [PATCH] Add withdrawal portal --- README.md | 19 +-- cypress/e2e/bridge.cy.ts | 2 +- cypress/e2e/swap.cy.ts | 50 -------- public/images/landing/hero-background.svg | 52 ++++---- src/assets/svg/logos/fuse.svg | 15 +++ src/components/Menu/index.tsx | 145 ++-------------------- src/components/Navbar/index.tsx | 7 +- src/components/Web3Status/index.tsx | 8 +- src/pages/App.tsx | 97 +-------------- src/pages/AppBody.tsx | 7 +- src/pages/Bridge/index.tsx | 95 ++++++++++---- src/pages/redirects.tsx | 2 +- src/state/lists/updater.ts | 54 -------- src/utils/index.ts | 4 - 14 files changed, 145 insertions(+), 412 deletions(-) delete mode 100644 cypress/e2e/swap.cy.ts create mode 100644 src/assets/svg/logos/fuse.svg diff --git a/README.md b/README.md index 71458ca..b77303c 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,6 @@ -# Voltage.finance Interface +# Voltage Bridge Withdrawal Portal -[![Tests](https://github.com/voltfinance/voltage-interface/workflows/Tests/badge.svg)](https://github.com/voltfinance/voltage-interface/actions?query=workflow%3ATests) -[![Styled With Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io/) - -An open source interface for Voltage finance -- the defi hub that will onboard the next 1 billion users via the [fuse network](https://fuse.io) - -- Website: [voltage.finance](https://voltage.finance/) -- Interface: [app.voltage.finance](https://app.voltage.finance/) -- Twitter: [Voltage finance](https://twitter.com/voltfinance) - -## Accessing the Voltage.finance Interface - -To access the Voltage.finance Interface, use an IPFS gateway link from the -[latest release](https://github.com/voltfinance/voltage-interface/releases/latest), -or visit [app.voltage.finance](https://app.voltage.finance). +[Voltage Finance DEX Bridge](https://voltage.finance/bridge) was deprecated on December 1, 2024. This old bridge portal is intended for all those who did not withdraw funds and they remained blocked in the bridge. ## Development @@ -26,5 +13,5 @@ yarn ### Run ```bash -yarn start +yarn start:dev ``` \ No newline at end of file diff --git a/cypress/e2e/bridge.cy.ts b/cypress/e2e/bridge.cy.ts index 2bab9fb..ffc37a4 100644 --- a/cypress/e2e/bridge.cy.ts +++ b/cypress/e2e/bridge.cy.ts @@ -3,7 +3,7 @@ import connectWallet from "../utils/connect-wallet" describe('Bridge', () => { describe('Fuse', () => { beforeEach(() => { - cy.visit('/bridge') + cy.visit('/') connectWallet() }) diff --git a/cypress/e2e/swap.cy.ts b/cypress/e2e/swap.cy.ts deleted file mode 100644 index 9920578..0000000 --- a/cypress/e2e/swap.cy.ts +++ /dev/null @@ -1,50 +0,0 @@ -import connectWallet from "../utils/connect-wallet" - -describe('Swap', () => { - describe('base functionality', () => { - beforeEach(() => { - cy.visit('/swap') - - connectWallet() - }) - - it('can enter an amount into input', () => { - cy.get('#swap-currency-input .token-amount-input') - .type('0.001', { delay: 300 }) - .should('have.value', '0.001') - }) - - it('zero swap amount', () => { - cy.get('#swap-currency-input .token-amount-input') - .type('0.0', { delay: 200 }) - .should('have.value', '0.0') - }) - - it('invalid swap amount', () => { - cy.get('#swap-currency-input .token-amount-input') - .type('\\', { delay: 200 }) - .should('have.value', '') - }) - - it('can enter an amount into output', () => { - cy.get('#swap-currency-output .token-amount-input') - .type('0.001', { delay: 200 }) - .should('have.value', '0.001') - }) - - it('zero output amount', () => { - cy.get('#swap-currency-output .token-amount-input') - .type('0.0', { delay: 200 }) - .should('have.value', '0.0') - }) - - it('can swap FUSE for USDC', () => { - cy.get('#swap-currency-output .open-currency-select-button').click() - cy.get('.token-item-0x28C3d1cD466Ba22f6cae51b1a4692a831696391A').click({ force: true }) - cy.get('#swap-currency-input .token-amount-input').should('be.visible') - cy.get('#swap-currency-input .token-amount-input').type('0.001', { force: true, delay: 200 }) - cy.get('#swap-currency-output .token-amount-input').should('not.equal', '') - cy.get('#swap-button').should('not.be.disabled') - }) - }) -}) diff --git a/public/images/landing/hero-background.svg b/public/images/landing/hero-background.svg index d1f8e63..38dbd0e 100644 --- a/public/images/landing/hero-background.svg +++ b/public/images/landing/hero-background.svg @@ -1,24 +1,34 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/logos/fuse.svg b/src/assets/svg/logos/fuse.svg new file mode 100644 index 0000000..cdf4a1c --- /dev/null +++ b/src/assets/svg/logos/fuse.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 75bc9f1..0af600d 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -1,19 +1,10 @@ import styled from 'styled-components' import { ExternalLink } from 'react-feather' -import { Link, useHistory, useLocation } from 'react-router-dom' -import { Box, Button, Flex, Image } from 'rebass/styled-components' +import { Box, Flex, Image } from 'rebass/styled-components' -import { Navbar } from '../Navbar' -import { useWeb3 } from '../../hooks' import Web3Status from '../Web3Status' -import { isHomePage } from '../../utils' -import { Hidden } from '../../wrappers/Hidden' -import { WalletIcon, MenuNav } from '../Icons' -import { GetAppButton } from '../Button/getApp' -import { useToggleNavMenu } from '../../state/application/hooks' -import LogoIcon from '../../assets/svg/voltage.svg' -import LogoIconBlack from '../../assets/svg/voltage-black.svg' +import FuseLogo from '../../assets/svg/logos/fuse.svg' const activeClassName = 'ACTIVE' @@ -95,7 +86,7 @@ export const MenuItem = styled.a` `}; ` -export const MenuItemExternal = styled(ExternalLink)<{ pl?: string }>` +export const MenuItemExternal = styled(ExternalLink) <{ pl?: string }>` width: 100%; height: 48px; text-decoration: none; @@ -157,12 +148,6 @@ export const Item = styled(ExternalLink)` ` export default function Sidebar() { - const openNavMenu = useToggleNavMenu() - const history = useHistory() - const location = useLocation() - - const { account } = useWeb3() - return ( - - - - - - - - - - - - - - - - - - - - - {/* {account ? ( - - ) : ( - <> - - - - - - )} */} - - - {account ? ( - <> - - - - - - ) : ( - <> - )} - - - - - { - openNavMenu() - }} - > - - - - + + + + ) diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 2119bf5..2ee1087 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -4,7 +4,6 @@ import { useHistory, useLocation } from 'react-router-dom' import { Box, Card, Flex, Text } from 'rebass/styled-components' import { MENU } from '../../constants' import { useOnClickOutside } from '../../hooks/useOnClickOutside' -import { isHomePage } from '../../utils' export const Navbar = () => { const [activeIndex, setActiveIndex] = useState(-1) @@ -53,7 +52,7 @@ export const Navbar = () => { sub?.map(({ to }) => to).includes(location?.pathname) || to === location?.pathname || sub?.some(({ additional }: any) => includesPath(location, additional || [])) - ? isHomePage(location) ? '#333333' : 'white' + ? 'white' : 'transparent', }} onClick={() => { @@ -67,12 +66,12 @@ export const Navbar = () => { > {( - + {name} { Icon ? - + : null } diff --git a/src/components/Web3Status/index.tsx b/src/components/Web3Status/index.tsx index 0e92be4..dba37e6 100644 --- a/src/components/Web3Status/index.tsx +++ b/src/components/Web3Status/index.tsx @@ -17,8 +17,8 @@ export default function Web3Status() { <> - - {!wallet && ( + {!wallet && ( + - )} - + + )} ) } diff --git a/src/pages/App.tsx b/src/pages/App.tsx index 6725cd7..abd770f 100644 --- a/src/pages/App.tsx +++ b/src/pages/App.tsx @@ -4,48 +4,15 @@ import { Suspense, lazy, useEffect } from 'react' import { useAccountCenter } from '@web3-onboard/react' import { BrowserRouter as Router, Switch, useLocation } from 'react-router-dom' -import Menu from '../components/Menu' import { preset } from '../theme/preset' -import Loader from '../components/Loader' import Popups from '../components/Popups' import { RedirectToDefault } from './redirects' -import MobileNav from '../components/MobileNav' import useMediaQuery from '../hooks/useMediaQuery' import { RpcLoader } from '../components/RpcLoader' -import { RedirectPathToSwapOnly } from './Swap/redirects' import AnalyticsReporter from '../components/analytics/AnalyticsReporter' -import { RedirectOldRemoveLiquidityPathStructure } from './Liquidity/RemoveLiquidity/redirects' -import { - RedirectDuplicateTokenIds, - RedirectOldAddLiquidityPathStructure, - RedirectToAddLiquidity, -} from './Liquidity/AddLiquidity/redirects' import { SentryRoute } from '../components/errorReporting/sentry' -import SimpleStaking from './Stake/SimpleStaking' -import { USDC_FARM_PID, USDC_V2, WETH_FARM_PID, WETH_V2 } from '../constants' -import { isHomePage } from '../utils' -const Home = lazy(() => import('./Home')) -const VoltApp = lazy(() => import('./VoltApp')) -const Swap = lazy(() => import('./Swap')) -const Pool = lazy(() => import('./Pool')) -const AddLiquidity = lazy(() => import('./Liquidity/AddLiquidity')) -const RemoveLiquidity = lazy(() => import('./Liquidity/RemoveLiquidity')) const Bridge = lazy(() => import('./Bridge')) -const Migrate = lazy(() => import('./Migrate')) -const Farms = lazy(() => import('./Farms')) -const xVOLT = lazy(() => import('./Stake/xVOLT')) -const sFUSE = lazy(() => import('./Stake/SFuse')) -const StakeOptions = lazy(() => import('./Stake')) -const Zap = lazy(() => import('./Zap')) -const Mint = lazy(() => import('./Mint')) -const VeVolt = lazy(() => import('./Stake/Page/VeVolt')) -const Mobile = lazy(() => import('./Mobile')) -const Launchpad = lazy(() => import('./Launchpad')) -const Analytics = lazy(() => import('./Analytics')) -const Launch = lazy(() => import('./Launchpad/Launch')) -const RemoveLiquidityV3 = lazy(() => import('./Liquidity/RemoveLiquidityV3')) -const AdjustLiquidityV3 = lazy(() => import('./Liquidity/AdjustLiquidityV3')) function ScrollToTop() { const { pathname } = useLocation() @@ -82,18 +49,6 @@ const UpdateAccountCenter = () => { return
} -function Nav() { - const location = useLocation() - if (!isHomePage(location)) { - return ( - <> - - - - ) - } -} - export default function App() { return ( @@ -103,57 +58,9 @@ export default function App() { - }> -