Skip to content

Commit

Permalink
chore: merge branch 'dev' into fix/data-fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Apr 2, 2024
2 parents d2d68ef + 0fbb76a commit 78f5fe9
Show file tree
Hide file tree
Showing 40 changed files with 2,123 additions and 1,176 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-hooks', '@typescript-eslint', 'deprecation'],
rules: {
'import/no-unused-modules': 'off',
'@typescript-eslint/no-floating-promises': ['warn'],
'@typescript-eslint/no-unnecessary-type-assertion': ['warn'],
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-unsafe-assignment': [0],
'@typescript-eslint/no-unsafe-return': [0],
'@typescript-eslint/no-unsafe-call': [0],
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ dev ]
branches: [dev]
pull_request:
branches: [ dev ]
branches: [dev]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ dist-ssr

# Environment variables
.env*
!.env.example
!.env.template
175 changes: 0 additions & 175 deletions github-actions.patch

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"micro-packed": "^0.5.1",
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-charts": "^3.0.0-beta.57",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"react-redux": "^8.1.3",
Expand Down
23 changes: 23 additions & 0 deletions public/images/logos/falcon-x-logo.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: 9 additions & 6 deletions src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ProofOfReservePage } from '@pages/proof-of-reserve/proof-of-reserve-pag
import { BalanceContextProvider } from '@providers/balance-context-provider';
import { BlockchainHeightContextProvider } from '@providers/bitcoin-query-provider';
import { EthereumObserverProvider } from '@providers/ethereum-observer-provider';
import { ProofOfReserveContextProvider } from '@providers/proof-of-reserve-context-provider';

import { About } from './pages/about/about';
import { Dashboard } from './pages/dashboard/dashboard';
Expand All @@ -23,12 +24,14 @@ export function App(): React.JSX.Element {
<VaultContextProvider>
<BlockchainHeightContextProvider>
<BalanceContextProvider>
<AppLayout>
<Route path="/" element={<Dashboard />} />
<Route path="/my-vaults" element={<MyVaults />} />
<Route path="/how-it-works" element={<About />} />
<Route path="/proof-of-reserve" element={<ProofOfReservePage />} />
</AppLayout>
<ProofOfReserveContextProvider>
<AppLayout>
<Route path="/" element={<Dashboard />} />
<Route path="/my-vaults" element={<MyVaults />} />
<Route path="/how-it-works" element={<About />} />
<Route path="/proof-of-reserve" element={<ProofOfReservePage />} />
</AppLayout>
</ProofOfReserveContextProvider>
</BalanceContextProvider>
</BlockchainHeightContextProvider>
</VaultContextProvider>
Expand Down
14 changes: 7 additions & 7 deletions src/app/components/fade-layer/fade-layer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import { VStack } from '@chakra-ui/react';

interface FadeLayerProps {
children: React.ReactNode;
height: string;
fadeHeight: string;
h: string;
fh: string;
}

export function FadeLayer({ children, height, fadeHeight }: FadeLayerProps): React.JSX.Element {
export function FadeLayer({ children, h, fh }: FadeLayerProps): React.JSX.Element {
const afterStyles = {
content: '""',
position: 'absolute',
height: fh,
bottom: 0,
left: 0,
right: 0,
height: fadeHeight,
position: 'absolute',
content: '""',
backgroundImage: 'linear-gradient(to top, background.container.01, transparent)',
};

return (
<VStack alignItems={'start'} position="relative" w={'100%'} h={height} _after={afterStyles}>
<VStack w={'100%'} h={h} position="relative" _after={afterStyles}>
{children}
</VStack>
);
Expand Down
5 changes: 5 additions & 0 deletions src/app/components/header/components/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export function NavigationTabs({
isActive={activeTab === '/how-it-works'}
handleClick={() => handleTabClick('/how-it-works')}
/>
<TabButton
title={'Proof of Reserve'}
isActive={activeTab === '/proof-of-reserve'}
handleClick={() => handleTabClick('/proof-of-reserve')}
/>
</HStack>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { HStack, Text } from '@chakra-ui/react';

// @ts-expect-error: ignoring because of later implementation
function MerchantTableHeader(): React.JSX.Element {

Check warning on line 4 in src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-header.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

'MerchantTableHeader' is defined but never used
return (
<HStack px={'25px'} py={'15px'} w={'100%'}>
<Text w={'33.3%'} color={'white'} fontSize={'lg'} fontWeight={800}>
Merchant
</Text>
<Text w={'33.3%'} color={'white'} fontSize={'lg'}>
dlcBTC Minted
</Text>
</HStack>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';

import { Button, HStack, Image, Text } from '@chakra-ui/react';
import { Merchant } from '@models/merchant';

interface MerchantTableItemProps {
merchant: Merchant;
dlcBTCAmount: number;
}

// @ts-expect-error: ignoring because of later implementation
function MerchantTableItem({ merchant, dlcBTCAmount }: MerchantTableItemProps): React.ReactElement {

Check warning on line 12 in src/app/components/proof-of-reserve/components/merchant-table/components/merchant-table-item.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

'MerchantTableItem' is defined but never used
//TODO: replace name with logo when the logo is available
const { name } = merchant;

return (
<HStack px={'25px'} w={'100%'}>
<Text w={'33.3%'} color={'white'} fontSize={'2xl'} fontWeight={800}>
{name}
</Text>
<HStack w={'33.3%'}>
<Image src={'/images/logos/dlc-btc-logo.svg'} alt={'dlcBTC Logo'} boxSize={'25px'} />
<Text color={'white'} fontSize={'2xl'} fontWeight={800}>
{dlcBTCAmount}
</Text>
</HStack>
<Button w={'33.3%'} variant={'merchantHistory'}>
Mint/Redeem History
</Button>
</HStack>
);
}
Loading

0 comments on commit 78f5fe9

Please sign in to comment.