Skip to content

Commit

Permalink
Merge pull request #1 from fuseio/musab/feat/withdrawal-portal
Browse files Browse the repository at this point in the history
Add withdrawal portal
  • Loading branch information
MusabShakeel576 authored Nov 18, 2024
2 parents 6cf559a + 74890bd commit a6aca53
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 412 deletions.
19 changes: 3 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -26,5 +13,5 @@ yarn
### Run

```bash
yarn start
yarn start:dev
```
2 changes: 1 addition & 1 deletion cypress/e2e/bridge.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import connectWallet from "../utils/connect-wallet"
describe('Bridge', () => {
describe('Fuse', () => {
beforeEach(() => {
cy.visit('/bridge')
cy.visit('/')

connectWallet()
})
Expand Down
50 changes: 0 additions & 50 deletions cypress/e2e/swap.cy.ts

This file was deleted.

52 changes: 31 additions & 21 deletions public/images/landing/hero-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/assets/svg/logos/fuse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 7 additions & 138 deletions src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 (
<Box
alignItems={'center'}
Expand All @@ -174,126 +159,10 @@ export default function Sidebar() {
bg={'transparent'}
>
<Flex justifyContent={'space-between'} px={3} height={'100%'} mx="auto" alignItems={'center'} as="nav">
<Flex sx={{ position: 'relative' }} style={{ cursor: 'pointer' }} alignItems={'center'}>
<Link to="/home">
<Image width={125} src={isHomePage(location) ? LogoIcon : LogoIconBlack} />
</Link>
</Flex>

<Hidden tablet mobile>
<Box
sx={{
zIndex: 20,
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translate(-50%,-50%)',
}}
>
<Navbar />
</Box>
</Hidden>

<Flex
sx={{
gap: '12px',
}}
>
<Flex
sx={{
alignItems: 'center',
gap: '12px',
width: '100%',
}}
>
<Box display={['none', 'flex']}>
<GetAppButton isSmall variant={isHomePage(location) ? 'greenSecondary' : 'blackSecondary'} />
</Box>

<Web3Status />

{/* {account ? (
<Web3Status />
) : (
<>
<GetAppButton isSmall variant={isHomePage(location) ? 'greenSecondary' : 'blackSecondary'} />
<Button
display={['none', 'block']}
variant={isHomePage(location) ? 'greenPrimary' : 'blackPrimary'}
onClick={() => {
history.push('/swap')
}}
>
<Flex alignItems={'center'} style={{ gap: '10px', color: 'inherit' }}>
Start Trading
<WalletIcon />
</Flex>
</Button>
<Button
display={['block', 'none']}
variant={isHomePage(location) ? 'greenPrimary' : 'blackPrimary'}
onClick={() => {
history.push('/swap')
}}
>
Trade
</Button>
</>
)} */}

<Box
sx={{
alignItems: 'center',
gap: '12px',
width: '100%',
}}
display={['flex', 'none']}
>
{account ? (
<>
<GetAppButton isSmall variant={isHomePage(location) ? 'greenSecondary' : 'blackSecondary'} />

<Button
display={['none', 'block']}
variant={isHomePage(location) ? 'greenPrimary' : 'blackPrimary'}
onClick={() => {
history.push('/swap')
}}
>
<Flex alignItems={'center'} style={{ gap: '10px', color: 'inherit' }}>
Start Trading
<WalletIcon />
</Flex>
</Button>
<Button
display={['block', 'none']}
variant={isHomePage(location) ? 'greenPrimary' : 'blackPrimary'}
onClick={() => {
history.push('/swap')
}}
>
Trade
</Button>
</>
) : (
<></>
)}
</Box>
</Flex>

<Hidden desktop>
<Flex
py={3}
justifyContent={'center'}
onClick={() => {
openNavMenu()
}}
>
<MenuNav stroke={isHomePage(location) ? 'white' : 'black'} />
</Flex>
</Hidden>
</Flex>
<a href="https://www.fuse.io">
<Image width={125} src={FuseLogo} />
</a>
<Web3Status />
</Flex>
</Box>
)
Expand Down
7 changes: 3 additions & 4 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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={() => {
Expand All @@ -67,12 +66,12 @@ export const Navbar = () => {
>
{(
<Flex alignItems="center">
<Text fontSize={2} color={isHomePage(location) ? "white" : "black"} fontWeight={700}>
<Text fontSize={2} color="black" fontWeight={700}>
{name}
</Text>
{
Icon ? <Box mt={1} ml={0}>
<Icon scale={0.5} width={20} height={20} color={isHomePage(location) ? "white" : "black"} opacity={0.5} />
<Icon scale={0.5} width={20} height={20} color="black" opacity={0.5} />
</Box> : null
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/Web3Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export default function Web3Status() {
<>
<CustomAccountCenter />

<Flex sx={{ gap: 2, zIndex: 10 }}>
{!wallet && (
{!wallet && (
<Flex sx={{ gap: 2, zIndex: 10 }}>
<Box sx={{ position: 'relative', zIndex: 4 }}>
<Button
id="connect-wallet"
Expand All @@ -33,8 +33,8 @@ export default function Web3Status() {
Connect
</Button>
</Box>
)}
</Flex>
</Flex>
)}
</>
)
}
Loading

0 comments on commit a6aca53

Please sign in to comment.