Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: '16.x'
- run: npm install
- run: npm run build --if-present
- run: npm test
8 changes: 4 additions & 4 deletions defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"protocol": "http",
"mode": "DEV",
"floonet": false,
"binaryPath": "./GrinPlusPlus/bin/Release",
"minimumPeers": 15,
"maximumPeers": 50,
"minimumConfirmations": 10,
"binaryPath": "../../Downloads/squashfs-root/resources/app.asar.unpacked/bin/",
"minimumPeers": 8,
"maximumPeers": 60,
"minimumConfirmations": 8,
"ports": {
"node": 3413,
"foreignRPC": 3415,
Expand Down
65,952 changes: 48,720 additions & 17,232 deletions package-lock.json

Large diffs are not rendered by default.

125 changes: 62 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "GrinPlusPlus",
"name": "grinplusplus",
"productName": "Grin++",
"version": "1.2.7",
"version": "1.2.8",
"description": "Grin++ Wallet",
"author": {
"name": "David Burkett",
Expand All @@ -15,73 +15,72 @@
"license": "MIT",
"private": true,
"dependencies": {
"@babel/runtime": "^7.14.8",
"@blueprintjs/core": "^4.0.0-alpha.0",
"@craco/craco": "^5.9.0",
"@types/classnames": "^2.3.1",
"@types/jest": "^25.2.3",
"@types/styled-components": "^5.1.12",
"@types/uuid": "^7.0.5",
"acorn": "^7.4.1",
"classnames": "^2.3.1",
"custom-electron-titlebar": "^3.2.7",
"date-fns": "^2.23.0",
"easy-peasy": "^4.0.1",
"electron-log": "^4.4.1",
"electron-store": "^5.2.0",
"electron-updater": "^4.3.9",
"i18next": "^19.9.0",
"i18next-browser-languagedetector": "^4.3.1",
"immutability-helper": "^3.1.1",
"node-fetch": "^2.6.1",
"node-sass": "^4.14.0",
"npm": "^6.14.14",
"qrcode": "^1.4.4",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-dropzone": "^10.2.2",
"react-i18next": "^11.11.4",
"react-number-format": "^4.7.3",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.4",
"redux-persist-electron-storage": "^2.1.0",
"styled-components": "^5.3.0",
"tor-request": "^3.1.0",
"ts-retry": "1.4.1",
"typed-rest-client": "^1.8.4",
"typescript": "^4.3.5",
"@babel/eslint-parser": "7.18.2",
"@babel/runtime": "7.18.3",
"@blueprintjs/core": "3.54.0",
"@blueprintjs/popover2": "1.4.1",
"@craco/craco": "6.4.3",
"@types/jest": "26.0.14",
"@types/styled-components": "5.1.25",
"@types/uuid": "8.3.4",
"acorn": "8.7.1",
"custom-electron-titlebar": "4.1.0",
"date-fns": "2.28.0",
"easy-peasy": "5.0.4",
"electron-log": "4.4.7",
"electron-store": "8.0.2",
"electron-updater": "5.0.1",
"i18next": "21.8.10",
"i18next-browser-languagedetector": "6.1.4",
"immutability-helper": "3.1.1",
"node-fetch": "3.2.6",
"node-sass": "7.0.1",
"npm": "8.12.2",
"qrcode": "1.5.0",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-dropzone": "14.2.1",
"react-i18next": "11.17.2",
"react-number-format": "4.9.3",
"react-router-dom": "6.3.0",
"react-scripts": "4.0.3",
"redux-persist-electron-storage": "2.1.0",
"styled-components": "5.3.5",
"tor-request": "3.1.0",
"ts-retry": "2.4.2",
"typed-rest-client": "1.8.9",
"typescript": "4.7.4",
"uninstall": "0.0.0",
"uuid": "^7.0.3"
"uuid": "8.3.2"
},
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"@testing-library/react": "^9.5.0",
"@types/enzyme": "^3.10.9",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/file-saver": "^2.0.3",
"@types/react": "^16.14.12",
"@types/react-dom": "^16.9.14",
"@types/react-router-dom": "^5.1.8",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"cross-env": "^6.0.3",
"electron": "^11.4.11",
"electron-builder": "^22.11.7",
"electron-notarize": "^1.0.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^6.8.0",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-react": "^7.24.0",
"fetch-mock-jest": "^1.5.1",
"foreman": "^3.0.1",
"husky": "^3.1.0",
"jest-electron": "^0.1.11",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"tslint": "^6.1.3"
"@testing-library/react": "12.1.5",
"@types/enzyme": "3.10.12",
"@types/enzyme-adapter-react-16": "1.0.6",
"@types/file-saver": "2.0.5",
"@types/react": "16.14.28",
"@types/react-dom": "16.9.16",
"@types/react-router-dom": "5.3.3",
"@typescript-eslint/eslint-plugin": "4.29.3",
"@typescript-eslint/parser": "4.29.3",
"cross-env": "7.0.3",
"electron": "19.0.5",
"electron-builder": "23.0.3",
"electron-notarize": "1.2.1",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"eslint": "7.32.0",
"eslint-plugin-flowtype": "7.0.0",
"eslint-plugin-react": "7.30.0",
"fetch-mock-jest": "1.5.1",
"foreman": "3.0.1",
"husky": "8.0.1",
"lint-staged": "13.0.2",
"prettier": "2.7.1",
"tslint": "6.1.3"
},
"homepage": "./",
"main": "./src/electron-starter.js",
Expand Down
18 changes: 10 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./App.scss";

import { Route, MemoryRouter as Router, Switch } from "react-router-dom";
import { Route, MemoryRouter as Router, Routes } from "react-router-dom";

import { InitializerContainer } from "./containers/Initializer";
import React from "react";
Expand Down Expand Up @@ -32,8 +32,9 @@ const App: React.FC = () => {
await store.getActions().nodeSummary.checkStatus()
);
} catch (error) {
const message = error instanceof Error ? error.message : error;
require("electron-log").error(
`Error trying to get Node Status: ${error.message}`
`Error trying to get Node Status: ${message}`
);
store.getActions().nodeSummary.updateStatus(undefined);
}
Expand All @@ -50,7 +51,9 @@ const App: React.FC = () => {
);
}
} catch (error) {
require("electron-log").error(`HealthCheck failed: ${error.message}`);
const message = error instanceof Error ? error.message : error;
require("electron-log").error(`HealthCheck failed:${message}`);
require("electron-log").error(message);
}
}, store.getState().nodeSummary.HealthCheckInterval);

Expand All @@ -64,16 +67,15 @@ const App: React.FC = () => {
await store.getActions().nodeSummary.getConnectedPeers()
);
} catch (error) {
require("electron-log").error(
`Error trying to get Connected Peers: ${error.message}`
);
const message = error instanceof Error ? error.message : error;
require("electron-log").error(`Error trying to get Connected Peers: ${message}`);
}
}, 5000);

return (
<StoreProvider store={store}>
<Router>
<Switch>
<Routes>
<Route path="/wallet">
<WalletContainer />
</Route>
Expand Down Expand Up @@ -110,7 +112,7 @@ const App: React.FC = () => {
<Route path="/">
<InitializerContainer />
</Route>
</Switch>
</Routes>
</Router>
</StoreProvider>
);
Expand Down
19 changes: 7 additions & 12 deletions src/components/extras/Init.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Center, HorizontallyCenter } from "../styled";
import { Button, Icon, Intent, Spinner, Text } from "@blueprintjs/core";
import { Error, TickCircle, Help } from "@blueprintjs/icons";

import { GrinPPBannerComponent } from "../shared/GrinPPBanner";
import React from "react";
import { useHistory } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";

export type InitComponentProps = {
Expand All @@ -15,7 +14,7 @@ export type InitComponentProps = {
export const InitComponent = ({ error, message }: InitComponentProps) => {
const { t } = useTranslation();

const history = useHistory();
const navigate = useNavigate();

return (
<div>
Expand All @@ -34,13 +33,9 @@ export const InitComponent = ({ error, message }: InitComponentProps) => {
<HorizontallyCenter>
<Icon
data-testid="init-icon"
icon={
error ? (
<Error color="red" size={28} />
) : (
<TickCircle color="green" size={28} />
)
}
color="{error ? 'red' : 'green'}"
size={28}
icon={error ? 'error' : 'tick-circle'}
/>
</HorizontallyCenter>
)}
Expand All @@ -52,7 +47,7 @@ export const InitComponent = ({ error, message }: InitComponentProps) => {
{error ? (
<HorizontallyCenter>
<Button
onClick={() => history.push("/UILogs")}
onClick={() => navigate("/UILogs")}
className="bp4-dark"
intent={Intent.WARNING}
>
Expand All @@ -65,7 +60,7 @@ export const InitComponent = ({ error, message }: InitComponentProps) => {
<div className="footer">
<HorizontallyCenter>
<Button
icon={<Help />}
icon="help"
minimal={true}
onClick={() => {
require("electron").shell.openExternal("https://t.me/GrinPP");
Expand Down
8 changes: 4 additions & 4 deletions src/components/extras/NoAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Button, Intent } from "@blueprintjs/core";

import { HorizontallyCenter } from "../styled";
import React from "react";
import { useHistory } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";

export const NoAccountsComponent = () => {
const { t } = useTranslation();
const history = useHistory();
const navigate = useNavigate();

return (
<div style={{ width: "100%" }}>
Expand All @@ -17,7 +17,7 @@ export const NoAccountsComponent = () => {
style={{ color: "black", width: "200px" }}
large={true}
text={t("create_wallet")}
onClick={() => history.push("/create")}
onClick={() => navigate("/create")}
/>
<br />
<br />
Expand All @@ -26,7 +26,7 @@ export const NoAccountsComponent = () => {
minimal={true}
large={true}
text={t("restore_wallet")}
onClick={() => history.push("/restore")}
onClick={() => navigate("/restore")}
/>
</HorizontallyCenter>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/components/extras/Slatepack.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from "react";
import { SlatesBox } from "../styled";
import {
ContextMenu,
Menu,
MenuItem,
OverlayToaster,
Position,
Intent,
} from "@blueprintjs/core";
import { ContextMenu2 } from "@blueprintjs/popover2";

import { useTranslation } from "react-i18next";

export type SlatepackProps = {
Expand All @@ -18,7 +19,7 @@ export const SlatepackComponent = ({ slatepack }: SlatepackProps) => {
const { t } = useTranslation();

return (
<ContextMenu
<ContextMenu2
className="bp4-dark"
content={
<Menu>
Expand All @@ -37,6 +38,6 @@ export const SlatepackComponent = ({ slatepack }: SlatepackProps) => {
}
>
<SlatesBox readOnly={true} value={slatepack}></SlatesBox>
</ContextMenu>
</ContextMenu2>
);
};
7 changes: 4 additions & 3 deletions src/components/extras/TextFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import React from "react";
import { TextFileBox } from "../styled";

import {
ContextMenu,
Menu,
MenuItem,
OverlayToaster,
Position,
Intent,
} from "@blueprintjs/core";
import { ContextMenu2 } from "@blueprintjs/popover2";

import { useTranslation } from "react-i18next";

type TextFileComponentProps = {
Expand All @@ -19,7 +20,7 @@ export const TextFileComponent = ({ content }: TextFileComponentProps) => {
const { t } = useTranslation();

return (
<ContextMenu
<ContextMenu2
className="bp4-dark"
content={
<Menu>
Expand All @@ -39,6 +40,6 @@ export const TextFileComponent = ({ content }: TextFileComponentProps) => {
<div style={{ width: "100%", height: "calc(100vh - 0px)" }}>
<TextFileBox defaultValue={content}></TextFileBox>
</div>
</ContextMenu>
</ContextMenu2>
);
};
Loading