Skip to content

Commit

Permalink
Merge branch 'suite' into dac-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysrbolles authored Sep 4, 2024
2 parents 7a5609d + e4cca41 commit a656904
Show file tree
Hide file tree
Showing 11 changed files with 127 additions and 119 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
- name: build local image
run: |
docker-compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
docker compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
export EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }}
export WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
docker-compose up -d
docker compose up -d
docker cp camino-suite-host-container:/app/camino-suite ./
mkdir -p /home/runner/.cache
docker cp camino-suite-host-container:/root/.cache/Cypress /home/runner/.cache/
Expand Down Expand Up @@ -102,10 +102,10 @@ jobs:
- name: build local image
run: |
docker-compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
docker compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
export EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }}
export WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }}
docker-compose up -d
docker compose up -d
docker cp camino-suite-host-container:/app/camino-suite ./
mkdir -p /home/runner/.cache
docker cp camino-suite-host-container:/root/.cache/Cypress /home/runner/.cache/
Expand Down
6 changes: 3 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ server {
try_files $uri $uri/ /index.html =404;
}

location = /wallet/ {
location = /wallet/ {
return 301 /login;
}

location = /explorer/ {
return 301 /explorer/camino/c-chain;
return 301 /explorer/c-chain;
}

include /etc/nginx/extra-conf.d/*.conf;
}
}
78 changes: 32 additions & 46 deletions src/components/Navbar/Account.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mdiCog, mdiLogout } from '@mdi/js'
import { Box, Chip, MenuItem, MenuList, Select, Typography, useTheme } from '@mui/material'
import { mdiCheckDecagram, mdiCog, mdiLogout } from '@mdi/js'
import { Box, MenuItem, MenuList, Select, Typography, useTheme } from '@mui/material'
import React, { useEffect, useState } from 'react'
import { getNameOfWallet, getPchainAddress } from '../../helpers/walletStore'
import { useAppDispatch, useAppSelector } from '../../hooks/reduxHooks'
Expand Down Expand Up @@ -43,6 +43,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
navigate('/settings')
handleCloseSidebar()
}

useEffect(() => {
dispatch(
updatePchainAddress({ address: getPchainAddress(), walletName: getNameOfWallet() }),
Expand All @@ -56,6 +57,24 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
<>
<MHidden width="smUp">
<MenuList sx={{ backgroundColor: 'transparent' }}>
<MenuItem
onClick={() => {
navigate('/settings/verify-wallet')
handleCloseSidebar()
}}
sx={{
typography: 'body2',
width: '100%',
maxWidth: '326px',
display: 'flex',
alignItems: 'center',
justifyContent: 'start',
gap: '8px',
}}
>
<Icon path={mdiCheckDecagram} size={1} />
<Typography variant="body2">Verify Wallet</Typography>
</MenuItem>
<MenuItem
sx={{
typography: 'body2',
Expand All @@ -70,26 +89,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
<Typography variant="body1">Settings</Typography>
</MenuItem>
{auth && <AliasPicker handleKeyDown={handleKeyDown} />}
<MenuItem>
<LoadAccountMenu type="kyc" />
</MenuItem>
<MenuItem sx={{ position: 'relative' }}>
<LoadAccountMenu type="kyb" />
<Chip
color="secondary"
size="small"
sx={{
position: 'absolute',
fontSize: '12px',
height: '16px',
top: '5px',
width: '50px',
left: 'calc(100% - 55px)',
zIndex: '1',
}}
label="beta"
/>
</MenuItem>

<MenuItem
onClick={logout}
sx={{
Expand Down Expand Up @@ -147,39 +147,25 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) {
}}
>
<MenuItem
onKeyDown={e => {
handleKeyDown(e)
onClick={() => {
navigate('/settings/verify-wallet')
setOpen(v => !v)
}}
sx={{ typography: 'body2', width: '100%', maxWidth: '326px' }}
>
<LoadAccountMenu type="kyc" setOpen={setOpen} />
</MenuItem>
<MenuItem
onKeyDown={e => {
handleKeyDown(e)
}}
sx={{
typography: 'body1',
typography: 'body2',
width: '100%',
maxWidth: '326px',
position: 'relative',
display: 'flex',
alignItems: 'center',
justifyContent: 'start',
gap: '8px',
}}
>
<Chip
color="secondary"
size="small"
sx={{
position: 'absolute',
fontSize: '12px',
height: '16px',
top: '5px',
width: '50px',
left: 'calc(100% - 55px)',
zIndex: '1',
}}
label="beta"
/>
<LoadAccountMenu type="kyb" setOpen={setOpen} />
<Icon path={mdiCheckDecagram} size={1} />
<Typography variant="body2">Verify Wallet</Typography>
</MenuItem>
<MenuItem
onClick={() => {
Expand Down
4 changes: 3 additions & 1 deletion src/components/Navbar/LoadMyKeysComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mountKyesComponent } from 'wallet/mountKyesComponent'
import { useAppDispatch } from '../../hooks/reduxHooks'
import { useEffectOnce } from '../../hooks/useEffectOnce'
import useWallet from '../../hooks/useWallet'
import { updateNotificationStatus } from '../../redux/slices/app-config'
import { updateAccount, updateNotificationStatus } from '../../redux/slices/app-config'

const StyledBox = styled(Box)(({ theme }) => ({
display: 'flex',
Expand Down Expand Up @@ -43,11 +43,13 @@ const LoadMyKeysComponent = () => {
const dispatch = useAppDispatch()
const dispatchNotification = ({ message, type }) =>
dispatch(updateNotificationStatus({ message, severity: type }))
const setAccount = account => dispatch(updateAccount(account))
const { updateStore } = useWallet()
useEffectOnce(() => {
mountKyesComponent(ref.current, {
dispatchNotification,
updateStore,
setAccount

Check warning on line 52 in src/components/Navbar/LoadMyKeysComponent.tsx

View workflow job for this annotation

GitHub Actions / yarn-build

Insert `,`
})
}) // eslint-disable-line react-hooks/exhaustive-deps

Expand Down
62 changes: 31 additions & 31 deletions src/constants/footer-consts.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
import {
DISCORD,
GITHUB,
LINKEDIN,
TELEGRAM_ANNOUNCEMENTS,
TELEGRAM_CAMINO,
X,
YOUTUBE,
} from './route-paths'
import {
DiscordIcon,
GithubIcon,
Expand All @@ -16,6 +7,15 @@ import {
XIcon,
YoutubeIcon,
} from '../assets'
import {
DISCORD,
GITHUB,
LINKEDIN,
TELEGRAM_ANNOUNCEMENTS,
TELEGRAM_CAMINO,
X,
YOUTUBE,
} from './route-paths'

import React from 'react'

Expand Down Expand Up @@ -133,21 +133,30 @@ export const FooterLinks = [
name: 'Camino Network',
links: [
{
text: 'Ecosystem',
text: 'The Network',
url: 'https://camino.network/ecosystem/',
},
{
text: 'Travel',
url: 'https://camino.network/travel/',
text: 'Use Cases',
url: 'https://camino.network/partners/',
},
{
text: 'Validators',
url: 'https://camino.network/validators/',
},
{
text: 'Developers',
url: 'https://camino.network/developer/',
text: 'Web3 Travel',
url: 'https://camino.network/travel/',
},
{
text: 'Camino Messenger',
url: 'https://camino.network/messenger',
},
],
},
{
name: 'Discover',
links: [
{
text: 'Community',
url: 'https://camino.network/community/',
Expand All @@ -156,6 +165,14 @@ export const FooterLinks = [
text: 'Blog',
url: 'https://camino.network/blog/',
},
{
text: 'News',
url: 'https://camino.network/news',
},
{
text: 'Entities',
url: 'https://camino.network/entities/',
},
],
},
{
Expand Down Expand Up @@ -187,21 +204,4 @@ export const FooterLinks = [
},
],
},
{
name: 'Public Sale',
links: [
{
text: 'Get CAM',
url: 'https://camino.network/public-sale/',
},
{
text: 'Disclaimer',
url: 'https://camino.network/public-sale-disclaimer/',
},
{
text: 'Terms & Conditions',
url: 'https://camino.network/static/docs/Terms_and_Conditions_of_Use_Public_Sale_2024.pdf',
},
],
},
]
2 changes: 2 additions & 0 deletions src/constants/route-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ export const CCHAIN = BASE_PATH + '/c-chain'
export const XCHAIN = BASE_PATH + '/x-chain'

export const PCHAIN = BASE_PATH + '/p-chain'

export const TERMS_OF_USE_URL = 'https://camino.network/terms/'
4 changes: 2 additions & 2 deletions src/layout/RoutesSuite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import MountAccessComponent from '../views/access/MountAccessComponent'
import Create from '../views/create/Create'
import ExplorerApp from '../views/explorer/ExplorerApp'
import LandingPage from '../views/landing/LandingPage'
import Legal from '../views/legal/Legal'
import LoginPage from '../views/login/LoginPage'
import Partners from '../views/partners'
import CreatedOffers from '../views/partners/CreatedOffers'
import Foundation from '../views/partners/Foundation'
import Partner from '../views/partners/Partner'
import MultisigWallet from '../views/settings/MultisigWallet'
import VerifyWallet from '../views/settings/VerifyWallet'
import Settings from '../views/settings/index'
import VoteApp from '../views/vote/VoteApp'
import Wallet from '../views/wallet/WalletApp'
Expand Down Expand Up @@ -122,6 +122,7 @@ export default function RoutesSuite() {
<Route index element={<Settings />} />
<Route path="save-account" element={<Settings />} />
<Route path="manage-multisig" element={<MultisigWallet />} />
<Route path="verify-wallet" element={<VerifyWallet />} />
</Route>
<Route path="/foundation" element={<CreateDepositsLayout />}>
<Route index element={<Foundation />} />
Expand All @@ -134,7 +135,6 @@ export default function RoutesSuite() {
</Route>
<Route path="/login" element={<LoginPage />} />
<Route path="/create" element={<Create />} />
<Route path="/legal" element={<Legal />} />
<Route path="/access" element={<AccessLayout />}>
<Route path="keystore" element={<MountAccessComponent type="Keystore" />} />
<Route path="mnemonic" element={<MountAccessComponent type="Mnemonic" />} />
Expand Down
31 changes: 0 additions & 31 deletions src/views/legal/Legal.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion src/views/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Icon from '@mdi/react'
import { Grid } from '@mui/material'
import { styled } from '@mui/material/styles'
import { mountAccounts } from 'wallet/mountAccounts'
import { TERMS_OF_USE_URL } from '../../constants/route-paths'


const StyledExternalLink = styled('a')(({ theme }) => ({
color: theme.palette.text.primary,
Expand Down Expand Up @@ -161,7 +163,7 @@ export default function LoginPage() {
<Typography variant="caption" color="text.secondary" textAlign="center">
By using this application, you agree to the&nbsp;
<StyledExternalLink
href="/legal"
href={TERMS_OF_USE_URL}
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
Expand Down
10 changes: 10 additions & 0 deletions src/views/settings/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function Links() {
useEffect(() => {
if (path === '/settings') setValue(0)
else if (path === '/settings/manage-multisig') setValue(1)
else if (path === '/settings/verify-wallet') setValue(2)
else setValue(0)
dispatch(changeActiveApp('Network'))
}, [path]) // eslint-disable-line react-hooks/exhaustive-deps
Expand All @@ -46,6 +47,15 @@ export default function Links() {
key={1}
sx={{ '&::after': { display: value === 1 ? 'block' : 'none' } }}
/>,
<Tab
className="tab"
disableRipple
label="Verify Wallet"
onClick={() => navigate('verify-wallet')}
{...a11yProps(2)}
key={2}
sx={{ '&::after': { display: value === 2 ? 'block' : 'none' } }}
/>,
]

const partnersTabs = [
Expand Down
Loading

0 comments on commit a656904

Please sign in to comment.