Skip to content

Commit

Permalink
feat(release): dashboard update (#5)
Browse files Browse the repository at this point in the history
* feat(release): dashboard update

* chore(cleanup): repo

* build(setup): init script
  • Loading branch information
sambacha committed May 5, 2022
1 parent ead890d commit cce083c
Show file tree
Hide file tree
Showing 18 changed files with 122 additions and 216 deletions.
30 changes: 0 additions & 30 deletions exec.sh

This file was deleted.

12 changes: 2 additions & 10 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "schoolbus",
"name": "walletbus-monorepo",
"version": "1.0.0",
"description": "",
"description": "monorepo for walletbus",
"private": true,
"workspaces": [
"packages/*"
Expand All @@ -14,17 +14,9 @@
"test:ci": "jest -u --passWithNoTests --coverageDirectory .github/coverage",
"format": "npx prettier --config .prettierrc.json --write \"**/*.{ts,tsx,md}\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/sambacha/schoolbus.git"
},
"keywords": [],
"author": "SEE CONTRIBUTORS",
"license": "MIT",
"bugs": {
"url": "https://github.com/sambacha/schoolbus/issues"
},
"homepage": "https://github.com/sambacha/schoolbus#readme",
"devDependencies": {
"@changesets/cli": "^2.21.1",
"@ethersproject/address": "^5.6.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/dashboard-message-bus/lib/utils.ts
Expand Up @@ -105,7 +105,7 @@ export const sendAndAwait = (socket: WebSocket, message: Message) => {
};

export const connectToMessageBusWithRetries = async (
port: number,
port: number = 8564,
host: string = 'localhost',
retries: number = 50,
): Promise<WebSocket> => {
Expand All @@ -123,7 +123,7 @@ export const connectToMessageBusWithRetries = async (
};

export const connectToMessageBus = (
port: number,
port: number = 8564,
host: string = 'localhost',
) => {
const socket = new WebSocket(`ws://${host}:${port}`);
Expand All @@ -137,7 +137,7 @@ export const connectToMessageBus = (
};

export const getMessageBusPorts = async (
dashboardPort: number,
dashboardPort: number = 8564,
dashboardHost: string = 'localhost',
retries: number = 5,
): Promise<PortsConfig> => {
Expand Down
14 changes: 7 additions & 7 deletions packages/dashboard/build/asset-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/dashboard/build/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions packages/dashboard/build/static/js/2.1fd31452.chunk.js

This file was deleted.

59 changes: 0 additions & 59 deletions packages/dashboard/build/static/js/2.1fd31452.chunk.js.LICENSE.txt

This file was deleted.

2 changes: 2 additions & 0 deletions packages/dashboard/build/static/js/main.5ac653b8.chunk.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions packages/dashboard/build/static/js/main.74488c4d.chunk.js

This file was deleted.

56 changes: 28 additions & 28 deletions packages/dashboard/output/lib/interfaceServer.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions packages/dashboard/output/lib/utils.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -36,7 +36,7 @@ function IncomingRequest({ provider, socket, request, setRequests }: Props) {
id: request.payload.id,
error: {
code: 4001,
message: 'User rejected @truffle/dashboard-provider request',
message: 'User rejected @securerpcwalletbus-provider request',
},
},
};
Expand Down
4 changes: 2 additions & 2 deletions packages/dashboard/src/utils/utils.ts
Expand Up @@ -64,10 +64,10 @@ export const respondToUnsupportedRequest = (
request: DashboardProviderMessage,
responseSocket: WebSocket,
) => {
const defaultMessage = `Method "${request.payload.method}" is unsupported by @truffle/dashboard-provider`;
const defaultMessage = `Method "${request.payload.method}" is unsupported by @securerpcwalletbus-provider`;
const customMessages: { [index: string]: string } = {
eth_sign:
'Method "eth_sign" is unsupported by @truffle/dashboard-provider, please use "personal_sign" instead',
'Method "eth_sign" is unsupported by @securerpcwalletbus-provider, please use "personal_sign" instead',
};

const message = customMessages[request.payload.method] ?? defaultMessage;
Expand Down
16 changes: 13 additions & 3 deletions packages/dashboard/tsconfig.json
Expand Up @@ -5,7 +5,10 @@
"sourceMap": true,
"declaration": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"lib": [
"esnext",
"dom"
],
"skipLibCheck": true,
"target": "es6",
"moduleResolution": "node",
Expand All @@ -17,7 +20,10 @@
"strictNullChecks": true,
"rootDir": ".",
"baseUrl": ".",
"types": ["react", "node"],
"types": [
"react",
"node"
],
"allowJs": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
Expand All @@ -26,5 +32,9 @@
"isolatedModules": true,
"noEmit": true
},
"include": ["src", "bin", "lib"]
"include": [
"src",
"bin",
"lib"
]
}
17 changes: 0 additions & 17 deletions run.sh

This file was deleted.

15 changes: 15 additions & 0 deletions setup.sh
@@ -0,0 +1,15 @@
#!/bin/bash
set -ex

echo "Installing..."
node --version
yarn --version

yarn install
yarn run build
echo "Starting Service..."
cd packages/dashboard
echo "Access dashboard at http://localhost:3000 "
echo "Access RPC at http://localhost:24012/rpc "
sleep 1
yarn run start

0 comments on commit cce083c

Please sign in to comment.