Skip to content

Commit

Permalink
Merge branch 'development' into rename-types
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnaveira authored Jan 18, 2024
2 parents 740b0fa + 4ce0c5f commit 77f2e63
Show file tree
Hide file tree
Showing 181 changed files with 4,430 additions and 8,548 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: CI

'on':
"on":
workflow_dispatch:
push:
branches:
Expand All @@ -26,7 +26,7 @@ env:
jobs:
fmt:
name: fmt
runs-on: [ self-hosted, ubuntu-high-cpu ]
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
Expand All @@ -48,10 +48,25 @@ jobs:

- name: cargo format
run: cargo +${{ env.nightly_toolchain }} fmt --all -- --check
prettier:
name: prettier
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
uses: actions/checkout@v4

- name: install
run: |
npm install [email protected]
- name: prettier
run: |
npx prettier --check "./**/*.{ts,tsx,css,json}"
clippy:
name: clippy
runs-on: [ self-hosted, ubuntu-high-cpu ]
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
Expand Down Expand Up @@ -106,7 +121,7 @@ jobs:
build:
name: check nightly
runs-on: [ self-hosted, ubuntu-high-cpu ]
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
Expand All @@ -132,7 +147,7 @@ jobs:

build-stable:
name: check stable
runs-on: [ self-hosted, ubuntu-high-cpu ]
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
Expand Down Expand Up @@ -181,7 +196,7 @@ jobs:

test:
name: test
runs-on: [ self-hosted, ubuntu-high-cpu ]
runs-on: [self-hosted, ubuntu-high-cpu]

steps:
- name: checkout
Expand Down Expand Up @@ -212,7 +227,7 @@ jobs:
run: cargo nextest run --all-features --release -E "not package(integration_tests)" --profile ci

- name: upload artifact
uses: actions/upload-artifact@v4 # upload test results as artifact
uses: actions/upload-artifact@v4 # upload test results as artifact
if: success() || failure()
with:
name: test-results
Expand All @@ -222,11 +237,11 @@ jobs:
run: cargo test --all-features --release --package integration_tests

- name: upload test result artifact
uses: actions/upload-artifact@v4 # upload test results as artifact
uses: actions/upload-artifact@v4 # upload test results as artifact
if: success() || failure()
with:
name: cucumber-test-results
path: ${{ github.workspace }}/integration_tests/cucumber-output-junit.xml
name: cucumber-test-results
path: ${{ github.workspace }}/integration_tests/cucumber-output-junit.xml

- name: Upload cucumber log artifacts
uses: actions/upload-artifact@v4
Expand Down
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf"
}
12 changes: 4 additions & 8 deletions applications/tari_dan_wallet_daemon/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,20 @@
{
"name": "keys/create",
"summary": "",
"tags": [
],
"tags": [],
"params": [],
"result": {
"name": "KeysCreateResponse",
"schema": {
"$ref": "#/components/schemas/KeysCreateResponse"
}
},
"errors": [
],
"errors": [],
"examples": [
{
"name": "default",
"description": "",
"params": [
],
"params": [],
"result": {
"name": "example1",
"value": {
Expand All @@ -45,8 +42,7 @@
}
],
"components": {
"contentDescriptors": {
},
"contentDescriptors": {},
"schemas": {
"KeysCreateResponse": {
"type": "object",
Expand Down
72 changes: 35 additions & 37 deletions applications/tari_dan_wallet_web_ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,67 +20,67 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import { Routes, Route } from 'react-router-dom';
import Accounts from './routes/Accounts/Accounts';
import AccountDetails from './routes/AccountDetails/AccountDetails';
import { Routes, Route } from "react-router-dom";
import Accounts from "./routes/Accounts/Accounts";
import AccountDetails from "./routes/AccountDetails/AccountDetails";
import DialogContent from "@mui/material/DialogContent";
import DialogTitle from "@mui/material/DialogTitle";
import Keys from './routes/Keys/Keys';
import ErrorPage from './routes/ErrorPage';
import Wallet from './routes/Wallet/Wallet';
import Layout from './theme/LayoutMain';
import AccessTokensLayout from './routes/AccessTokens/AccessTokens';
import Transactions from './routes/Transactions/TransactionsLayout';
import TransactionDetails from './routes/Transactions/TransactionDetails';
import AssetVault from './routes/AssetVault/AssetVault';
import SettingsPage from './routes/Settings/Settings';
import { Dialog } from '@mui/material';
import useAccountStore from './store/accountStore';
import Keys from "./routes/Keys/Keys";
import ErrorPage from "./routes/ErrorPage";
import Wallet from "./routes/Wallet/Wallet";
import Layout from "./theme/LayoutMain";
import AccessTokensLayout from "./routes/AccessTokens/AccessTokens";
import Transactions from "./routes/Transactions/TransactionsLayout";
import TransactionDetails from "./routes/Transactions/TransactionDetails";
import AssetVault from "./routes/AssetVault/AssetVault";
import SettingsPage from "./routes/Settings/Settings";
import { Dialog } from "@mui/material";
import useAccountStore from "./store/accountStore";

export const breadcrumbRoutes = [
{
label: 'Home',
path: '/',
label: "Home",
path: "/",
dynamic: false,
},
{
label: 'Accounts',
path: '/accounts',
label: "Accounts",
path: "/accounts",
dynamic: false,
},
{
label: 'Keys',
path: '/keys',
label: "Keys",
path: "/keys",
dynamic: false,
},
{
label: 'Access Tokens',
path: '/access-tokens',
label: "Access Tokens",
path: "/access-tokens",
dynamic: false,
},
{
label: 'Account Details',
path: '/accounts/:name',
label: "Account Details",
path: "/accounts/:name",
dynamic: true,
},
{
label: 'Transactions',
path: '/transactions',
label: "Transactions",
path: "/transactions",
dynamic: false,
},
{
label: 'Transaction Details',
path: '/transactions/:id',
label: "Transaction Details",
path: "/transactions/:id",
dynamic: true,
},
{
label: 'Wallet',
path: '/wallet',
label: "Wallet",
path: "/wallet",
dynamic: false,
},
{
label: 'Settings',
path: '/settings',
label: "Settings",
path: "/settings",
dynamic: false,
},
];
Expand All @@ -89,7 +89,7 @@ function App() {
const { popup, setPopup } = useAccountStore();
const handleClose = () => {
setPopup({ visible: false });
}
};
return (
<div>
<Routes>
Expand All @@ -108,11 +108,9 @@ function App() {
</Routes>
<Dialog open={popup.visible} onClose={handleClose}>
<DialogTitle>
{(popup?.error ? <div style={{ color: "red" }}>{popup?.title}</div> : <div>{popup?.title}</div>)}
{popup?.error ? <div style={{ color: "red" }}>{popup?.title}</div> : <div>{popup?.title}</div>}
</DialogTitle>
<DialogContent className="dialog-content">
{popup?.message}
</DialogContent>
<DialogContent className="dialog-content">{popup?.message}</DialogContent>
</Dialog>
</div>
);
Expand Down
31 changes: 13 additions & 18 deletions applications/tari_dan_wallet_web_ui/src/Components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,33 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import { styled } from '@mui/material/styles';
import KeyboardArrowRightRoundedIcon from '@mui/icons-material/KeyboardArrowRightRounded';
import MuiAccordion, { AccordionProps } from '@mui/material/Accordion';
import MuiAccordionSummary, {
AccordionSummaryProps,
} from '@mui/material/AccordionSummary';
import MuiAccordionDetails from '@mui/material/AccordionDetails';
import { styled } from "@mui/material/styles";
import KeyboardArrowRightRoundedIcon from "@mui/icons-material/KeyboardArrowRightRounded";
import MuiAccordion, { AccordionProps } from "@mui/material/Accordion";
import MuiAccordionSummary, { AccordionSummaryProps } from "@mui/material/AccordionSummary";
import MuiAccordionDetails from "@mui/material/AccordionDetails";

export const Accordion = styled((props: AccordionProps) => (
<MuiAccordion disableGutters elevation={0} square {...props} />
))(({ theme }) => ({
border: `2px solid ${theme.palette.background.paper}`,
'&:not(:last-child)': {
"&:not(:last-child)": {
borderBottom: 0,
},
'&:before': {
display: 'none',
"&:before": {
display: "none",
},
}));

export const AccordionSummary = styled((props: AccordionSummaryProps) => (
<MuiAccordionSummary
expandIcon={<KeyboardArrowRightRoundedIcon />}
{...props}
/>
<MuiAccordionSummary expandIcon={<KeyboardArrowRightRoundedIcon />} {...props} />
))(({ theme }) => ({
backgroundColor: theme.palette.divider,
flexDirection: 'row-reverse',
'& .MuiAccordionSummary-expandIconWrapper.Mui-expanded': {
transform: 'rotate(90deg)',
flexDirection: "row-reverse",
"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
transform: "rotate(90deg)",
},
'& .MuiAccordionSummary-content': {
"& .MuiAccordionSummary-content": {
marginLeft: theme.spacing(1),
},
}));
Expand Down
22 changes: 10 additions & 12 deletions applications/tari_dan_wallet_web_ui/src/Components/AlertDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import { useState } from 'react';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import { useState } from "react";
import Button from "@mui/material/Button";
import Dialog from "@mui/material/Dialog";
import DialogActions from "@mui/material/DialogActions";
import DialogContent from "@mui/material/DialogContent";
import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";

interface AlertDialogProps {
buttonTitle?: string;
Expand All @@ -42,8 +42,8 @@ export function ConfirmDialog({
dialogTitle,
dialogDescription,
confirmFunction,
confirmTitle = 'Confirm',
cancelTitle = 'Cancel',
confirmTitle = "Confirm",
cancelTitle = "Cancel",
}: AlertDialogProps) {
const [open, setOpen] = useState(false);

Expand All @@ -69,9 +69,7 @@ export function ConfirmDialog({
>
<DialogTitle id="alert-dialog-title">{dialogTitle}</DialogTitle>
<DialogContent>
<DialogContentText id="alert-dialog-description">
{dialogDescription}
</DialogContentText>
<DialogContentText id="alert-dialog-description">{dialogDescription}</DialogContentText>
</DialogContent>
<DialogActions>
<Button variant="outlined" onClick={handleClose}>
Expand Down
Loading

0 comments on commit 77f2e63

Please sign in to comment.