Skip to content

Commit

Permalink
Merge pull request #283 from chain4travel/suite
Browse files Browse the repository at this point in the history
 Add DAC Integration, Partner Enhancements, and Feature Flag Updates
  • Loading branch information
aeddaqqa authored Dec 19, 2024
2 parents 49ad2e5 + 22363ba commit 8ed0d8f
Show file tree
Hide file tree
Showing 40 changed files with 846 additions and 483 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
WALLET_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-wallet:suite"
SUITE_IMAGE="suite-local"
EXPLORER_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-explorer:suite"
VOTING_IMAGE="europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-voting:suite"
BUILD_ENV="build:dev"
16 changes: 8 additions & 8 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ jobs:

# These extract all artifacts out from the container to git so they can be previewed
- name: extract screenshots to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
name: cypress-screenshots_wallet
path: camino-suite/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- name: extract videos to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
name: cypress-videos_wallet
path: camino-suite/cypress/videos


Expand Down Expand Up @@ -126,15 +126,15 @@ jobs:

# These extract all artifacts out from the container to git so they can be previewed
- name: extract screenshots to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
name: cypress-screenshots_explorer
path: camino-suite/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- name: extract videos to git
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
name: cypress-videos_explorer
path: camino-suite/cypress/videos
4 changes: 4 additions & 0 deletions Dockerfile_SUITE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG BUILD_ENV="build:dev"
ARG EXPLORER_BRANCH=suite
ARG WALLET_BRANCH=suite
ARG VOTING_BRANCH=suite

FROM node:16 as stage-suite
ARG BUILD_ENV
Expand All @@ -16,11 +17,14 @@ FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-expl

FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-wallet:$WALLET_BRANCH as stage-wallet

FROM europe-west3-docker.pkg.dev/pwk-c4t-dev/camino-suite-apps/camino-suite-voting:$VOTING_BRANCH as stage-voting



FROM nginx:1.18
COPY --from=stage-suite /app/camino-suite/dist/ /usr/share/nginx/html
COPY --from=stage-explorer /app/camino-block-explorer/dist/ /usr/share/nginx/html/explorer
COPY --from=stage-wallet /app/camino-wallet/dist/ /usr/share/nginx/html/wallet
COPY --from=stage-voting /app/camino-suite-voting/dist/ /usr/share/nginx/html/dac
# Copy the default nginx.conf provided by tiangolo/node-frontend
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ version: '3.5'

services:

voting:
image: ${VOTING_IMAGE}
entrypoint: ["yarn", "start"]
ports:
- 5004:5004
container_name: camino-suite-voting-container

wallet:
image: ${WALLET_IMAGE}
entrypoint: ["yarn", "start"]
Expand Down
6 changes: 5 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ server {
}

include /etc/nginx/extra-conf.d/*.conf;
}

gzip on;
gzip_types *;
gzip_proxied no-cache no-store private expired auth;
}
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "host-react",
"version": "1.0.0",
"scripts": {
"build": "PUBLIC_PATH=https://suite.camino.network/ EXPLORER_PATH=https://suite.camino.network/explorer/ WALLET_PATH=https://suite.camino.network/wallet/ webpack --config webpack.prod.js",
"build:dev": "PUBLIC_PATH=https://dev.suite.camino.network/ EXPLORER_PATH=https://dev.suite.camino.network/explorer/ WALLET_PATH=https://dev.suite.camino.network/wallet/ webpack --config webpack.dev.js",
"build:stage": "PUBLIC_PATH=https://stage.suite.camino.network/ EXPLORER_PATH=https://stage.suite.camino.network/explorer/ WALLET_PATH=https://stage.suite.camino.network/wallet/ webpack --config webpack.prod.js",
"build": "PUBLIC_PATH=https://suite.camino.network/ EXPLORER_PATH=https://suite.camino.network/explorer/ WALLET_PATH=https://suite.camino.network/wallet/ DAC_PATH=https://suite.camino.network/dac/ webpack --config webpack.prod.js",
"build:dev": "PUBLIC_PATH=https://dev.suite.camino.network/ EXPLORER_PATH=https://dev.suite.camino.network/explorer/ WALLET_PATH=https://dev.suite.camino.network/wallet/ DAC_PATH=https://dev.suite.camino.network/dac/ webpack --config webpack.dev.js",
"build:stage": "PUBLIC_PATH=https://stage.suite.camino.network/ EXPLORER_PATH=https://stage.suite.camino.network/explorer/ WALLET_PATH=https://stage.suite.camino.network/wallet/ DAC_PATH=https://suite.camino.network/dac/ webpack --config webpack.prod.js",
"build:start": "cd dist && PORT=5001 npx serve",
"start": "webpack-dev-server --config webpack.local.js",
"start:live": "webpack-dev-server --open --config webpack.local.js --live-reload",
Expand Down Expand Up @@ -32,16 +32,16 @@
"@emotion/styled": "^11.10.5",
"@mdi/js": "^7.0.96",
"@mdi/react": "^1.6.1",
"@types/big.js": "^6.2.2",
"@types/ethereum-protocol": "^1.0.5",
"@reduxjs/toolkit": "^1.8.1",
"@testing-library/dom": "^8.19.0",
"@mui/icons-material": "^5.15.11",
"@mui/material": "^5.15.11",
"@mui/system": "^5.15.11",
"@reduxjs/toolkit": "^1.8.1",
"@testing-library/dom": "^8.19.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.0.1",
"@testing-library/user-event": "^14.1.1",
"@types/big.js": "^6.2.2",
"@types/ethereum-protocol": "^1.0.5",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.189",
"@types/node": "^17.0.25",
Expand Down Expand Up @@ -83,10 +83,10 @@
"webpack-dev-server": "^4.3.1",
"webpack-merge": "^5.8.0",
"yup": "^0.32.11",
"ethers": "^6.13.2"
"ethers": "^6.13.2",
"big.js": "^6.2.1"
},
"dependencies": {
"big.js": "^6.2.1",
"react": "^18.2.0",
"react-circle-flags": "^0.0.18",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Animate/DialogAnimate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Dialog, DialogProps, Paper, useTheme } from '@mui/material'
import React from 'react'
import { Dialog, Box, Paper, DialogProps, useTheme } from '@mui/material'

interface DialogAnimateProps extends DialogProps {
animate?: object
Expand Down
10 changes: 5 additions & 5 deletions src/components/Navbar/AddNewNetwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import {
} from '@mui/material'
import { Form, FormikProvider, useFormik } from 'formik'

import { AvaNetwork } from 'wallet/AvaNetwork'
import { Button } from '@mui/material'
import { Network } from '../../@types/store'
import React from 'react'
import { addNetworks } from '../../redux/slices/network'
import { useStore } from 'Explorer/useStore'
import axios from 'axios'
import React from 'react'
import { AvaNetwork } from 'wallet/AvaNetwork'
import store from 'wallet/store'
import { Network } from '../../@types/store'
import { useAppDispatch } from '../../hooks/reduxHooks'
import { useStore } from 'Explorer/useStore'
import { addNetworks } from '../../redux/slices/network'

export default function AddNewNetwork({
networks,
Expand Down
13 changes: 6 additions & 7 deletions src/components/Navbar/NetworkSwitcher.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
import { mdiDeleteOutline, mdiPencilOutline, mdiPlus } from '@mdi/js'
import {
Box,
Button,
Chip,
CircularProgress,
DialogTitle,
MenuItem,
MenuList,
Select,
Stack,
Typography,
useTheme,
useTheme

Check warning on line 12 in src/components/Navbar/NetworkSwitcher.tsx

View workflow job for this annotation

GitHub Actions / yarn-build

Insert `,`
} from '@mui/material'
import { mdiDeleteOutline, mdiPencilOutline, mdiPlus } from '@mdi/js'
import { networkStatusColor, networkStatusName } from '../../utils/networkUtils'

import AddNewNetwork from './AddNewNetwork'
import DialogAnimate from '../Animate/DialogAnimate'
import Icon from '@mdi/react'
import MHidden from '../@material-extend/MHidden'
import React from 'react'
import SelectedNetwork from './SelectNetwork'
import useNetwork from '../../hooks/useNetwork'
import MHidden from '../@material-extend/MHidden'
import DialogAnimate from '../Animate/DialogAnimate'
import AddNewNetwork from './AddNewNetwork'
import SelectedNetwork from './SelectNetwork'

interface NetworkSwitcherProps {
handleCloseSidebar?: () => void
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/SelectNetwork.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Chip, Typography } from '@mui/material'
import React from 'react'
import { Box, Typography, Chip } from '@mui/material'
import { useAppSelector } from '../../hooks/reduxHooks'
import { NetworkID, getActiveNetwork, selectNetworkStatus } from '../../redux/slices/network'

Expand Down
16 changes: 8 additions & 8 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mdiClose, mdiMenu, mdiWalletOutline } from '@mdi/js'
import {
AppBar,
Box,
Expand All @@ -8,26 +9,25 @@ import {
Typography,
useTheme,
} from '@mui/material'
import { DRAWER_WIDTH, TIMEOUT_DURATION } from '../../constants/apps-consts'
import React, { useState } from 'react'
import { mdiClose, mdiMenu, mdiWalletOutline } from '@mdi/js'
import { DRAWER_WIDTH, TIMEOUT_DURATION } from '../../constants/apps-consts'
import { useAppDispatch, useAppSelector } from '../../hooks/reduxHooks'

import Account from './Account'
import Icon from '@mdi/react'
import LoggedInAccount from './LoggedInAccount'
import { getActiveNetwork } from '../../redux/slices/network'
import MHidden from '../@material-extend/MHidden'
import MIconButton from '../@material-extend/MIconButton'
import NetworkSwitcher from './NetworkSwitcher'
import PlatformSwitcher from '../PlatformSwitcher'
import Account from './Account'
import LoggedInAccount from './LoggedInAccount'
import NetworkSwitcher from './NetworkSwitcher'
import ThemeSwitcher from './ThemeSwitcher'
import { getActiveNetwork } from '../../redux/slices/network'
// @ts-ignore
import { useIdleTimer } from 'react-idle-timer'
import { useNavigate } from 'react-router-dom'
import store from 'wallet/store'
import { updateAccount } from '../../redux/slices/app-config'
import { updateAuthStatus } from '../../redux/slices/utils'
import { useIdleTimer } from 'react-idle-timer'
import { useNavigate } from 'react-router-dom'

export default function Navbar() {
const theme = useTheme()
Expand Down
Loading

0 comments on commit 8ed0d8f

Please sign in to comment.