Skip to content

Commit

Permalink
Merge pull request #34 from kaleido-io/github-actions
Browse files Browse the repository at this point in the history
Update to node 16.x for GitHub Actions builds
  • Loading branch information
dechdev authored Apr 13, 2022
2 parents 49c1855 + 40310f4 commit d2e33d2
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 76 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '16.x'
- run: npm ci
working-directory: ./server
- run: npm run test
Expand Down
16 changes: 8 additions & 8 deletions server/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import 'reflect-metadata';
import * as http from 'http';
import * as express from 'express';
import * as cors from 'cors';
import * as path from 'path';
import * as bodyParser from 'body-parser';
import * as cors from 'cors';
import * as express from 'express';
import 'reflect-metadata';
import { RoutingControllersOptions, useExpressServer } from 'routing-controllers';
import * as swaggerUi from 'swagger-ui-express';
import { useExpressServer, RoutingControllersOptions } from 'routing-controllers';
import { genOpenAPI, WebsocketHandler } from './utils';
import { CommonController } from './controllers/common';
import { ContractsController, ContractsTemplateController } from './controllers/contracts';
import { MessagesController, MessagesTemplateController } from './controllers/messages';
import { TokensController, TokensTemplateController } from './controllers/tokens';
import { CommonController } from './controllers/common';
import { SimpleWebSocket } from './controllers/websocket';
import { ContractsController, ContractsTemplateController } from './controllers/contracts';
import * as path from 'path';
import { genOpenAPI, WebsocketHandler } from './utils';

const app = express();
app.use(bodyParser.json());
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Forms/BurnForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import RefreshIcon from '@mui/icons-material/Refresh';
import { TUTORIALS } from '../../constants/TutorialSections';

export const BurnForm: React.FC = () => {
const { selfIdentity, jsonPayload, setJsonPayload, activeForm } =
const { selfIdentity, setJsonPayload, activeForm } =
useContext(ApplicationContext);
const { reportFetchError } = useContext(SnackbarContext);
const { t } = useTranslation();
Expand Down
12 changes: 4 additions & 8 deletions ui/src/components/Forms/Contracts/DefineInterfaceForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,20 @@ import {
} from '@mui/material';
import { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { TUTORIALS } from '../../../constants/TutorialSections';
import { ApplicationContext } from '../../../contexts/ApplicationContext';
import { SnackbarContext } from '../../../contexts/SnackbarContext';
import { DEFAULT_SPACING } from '../../../theme';
import { TUTORIALS } from '../../../constants/TutorialSections';

export const CONTRACT_INTERFACE_FORMATS = ['ffi', 'abi'];

export const DefineInterfaceForm: React.FC = () => {
const { selfIdentity, jsonPayload, setJsonPayload, activeForm } =
useContext(ApplicationContext);
const { reportFetchError } = useContext(SnackbarContext);
const { setJsonPayload, activeForm } = useContext(ApplicationContext);
const { t } = useTranslation();

const [interfaceFormat, setInterfaceFormat] = useState<string>('ffi');
const [name, setName] = useState<string>('');
const [, setName] = useState<string>('');
const [schema, setSchema] = useState<string>('');
const [version, setVersion] = useState<string>('');
const [refresh, setRefresh] = useState<number>(0);
const [, setVersion] = useState<string>('');

useEffect(() => {
if (activeForm !== TUTORIALS.DEFINE_CONTRACT_INTERFACE) {
Expand Down
16 changes: 7 additions & 9 deletions ui/src/components/Forms/Contracts/DeployContractForm.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import * as React from 'react';
import LinkIcon from '@mui/icons-material/Link';
import { Grid } from '@mui/material';
import Box from '@mui/material/Box';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
import StepLabel from '@mui/material/StepLabel';
import StepContent from '@mui/material/StepContent';
import Button from '@mui/material/Button';
import Paper from '@mui/material/Paper';
import Step from '@mui/material/Step';
import StepContent from '@mui/material/StepContent';
import StepLabel from '@mui/material/StepLabel';
import Stepper from '@mui/material/Stepper';
import Typography from '@mui/material/Typography';
import LinkIcon from '@mui/icons-material/Link';
import { Grid } from '@mui/material';
import { useTranslation } from 'react-i18next';
import * as React from 'react';
import { DEFAULT_SPACING } from '../../../theme';

export const DeployContractForm: React.FC = () => {
const { t } = useTranslation();
const steps = [
{
label: 'Install the Solidity Compiler',
Expand Down
31 changes: 7 additions & 24 deletions ui/src/components/Forms/Contracts/RegisterContractApiForm.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,25 @@
import {
Button,
FormControl,
Grid,
InputLabel,
ListItemText,
MenuItem,
OutlinedInput,
Select,
SelectChangeEvent,
TextField,
Typography,
} from '@mui/material';
import { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import RefreshIcon from '@mui/icons-material/Refresh';
import { FF_Paths } from '../../../constants/FF_Paths';
import { ApplicationContext } from '../../../contexts/ApplicationContext';
import { SnackbarContext } from '../../../contexts/SnackbarContext';
import { DEFAULT_PADDING, DEFAULT_SPACING } from '../../../theme';
import { fetchCatcher } from '../../../utils/fetches';
import {
DEFAULT_MESSAGE_STRING,
// MessageTypeGroup,
} from '../../Buttons/MessageTypeGroup';
import { TUTORIALS } from '../../../constants/TutorialSections';
import { ApplicationContext } from '../../../contexts/ApplicationContext';
import { DEFAULT_SPACING } from '../../../theme';

export const RegisterContractApiForm: React.FC = () => {
const { selfIdentity, jsonPayload, setJsonPayload, activeForm } =
useContext(ApplicationContext);
const { reportFetchError } = useContext(SnackbarContext);
const { setJsonPayload, activeForm } = useContext(ApplicationContext);
const { t } = useTranslation();

const [contractInterfaces, setContractInterfaces] = useState<string[]>([]);
const [tokenBalance, setTokenBalance] = useState<number>(0);
const [name, setName] = useState<string>('');
const [blockchainAddress, setBlockchainAddress] = useState<string>('');

const [refresh, setRefresh] = useState<number>(0);
const [contractInterfaces] = useState<string[]>([]);
const [, setName] = useState<string>('');
const [, setBlockchainAddress] = useState<string>('');

useEffect(() => {
if (activeForm !== TUTORIALS.REGISTER_CONTRACT_API) {
Expand Down Expand Up @@ -69,7 +52,7 @@ export const RegisterContractApiForm: React.FC = () => {
label={
contractInterfaces.length ? t('tokenPool') : t('noTokenPools')
}
onChange={(e) => {
onChange={() => {
return null;
}}
>
Expand Down
28 changes: 6 additions & 22 deletions ui/src/components/Forms/MintForm.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
import RefreshIcon from '@mui/icons-material/Refresh';
import {
Button,
FormControl,
Grid,
InputLabel,
ListItemText,
MenuItem,
OutlinedInput,
Select,
SelectChangeEvent,
TextField,
Typography,
} from '@mui/material';
import { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import RefreshIcon from '@mui/icons-material/Refresh';
import { FF_Paths } from '../../constants/FF_Paths';
import { TUTORIALS } from '../../constants/TutorialSections';
import { ApplicationContext } from '../../contexts/ApplicationContext';
import { SnackbarContext } from '../../contexts/SnackbarContext';
import { ITokenPool, IVerifiers } from '../../interfaces/api';
import { ITokenPool } from '../../interfaces/api';
import { DEFAULT_PADDING, DEFAULT_SPACING } from '../../theme';
import { fetchCatcher } from '../../utils/fetches';
import {
DEFAULT_MESSAGE_STRING,
// MessageTypeGroup,
} from '../Buttons/MessageTypeGroup';
import { TUTORIALS } from '../../constants/TutorialSections';
import { DEFAULT_MESSAGE_STRING } from '../Buttons/MessageTypeGroup';

export const MintForm: React.FC = () => {
const { selfIdentity, jsonPayload, setJsonPayload, activeForm } =
const { selfIdentity, setJsonPayload, activeForm } =
useContext(ApplicationContext);
const { reportFetchError } = useContext(SnackbarContext);
const { t } = useTranslation();

const [tokenPools, setTokenPools] = useState<ITokenPool[]>([]);
const [tokenBalance, setTokenBalance] = useState<number>(0);
const [recipient, setRecipient] = useState<string>('');

const [message, setMessage] = useState<string | object | undefined>(
const [message] = useState<string | object | undefined>(
DEFAULT_MESSAGE_STRING
);

Expand Down Expand Up @@ -113,15 +106,6 @@ export const MintForm: React.FC = () => {
setAmount(parseInt(event.target.value));
};

const handleRecipientChange = (
event: SelectChangeEvent<typeof recipient>
) => {
const {
target: { value },
} = event;
setRecipient(value);
};

return (
<Grid container>
<Grid container spacing={DEFAULT_SPACING}>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Forms/TransferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import RefreshIcon from '@mui/icons-material/Refresh';
import { TUTORIALS } from '../../constants/TutorialSections';

export const TransferForm: React.FC = () => {
const { selfIdentity, jsonPayload, setJsonPayload, activeForm } =
const { selfIdentity, setJsonPayload, activeForm } =
useContext(ApplicationContext);
const { reportFetchError } = useContext(SnackbarContext);
const { t } = useTranslation();
Expand Down

0 comments on commit d2e33d2

Please sign in to comment.