Skip to content

Commit

Permalink
Merge pull request #400 from dappnode/v0.2.34
Browse files Browse the repository at this point in the history
v0.2.34 Release
  • Loading branch information
dapplion authored Aug 31, 2020
2 parents ee72d26 + f4b724b commit d075b2f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dappmanager.dnp.dappnode.eth",
"version": "0.2.33",
"version": "0.2.34",
"description": "Dappnode package responsible for providing the DappNode Package Manager",
"type": "dncore",
"author": "DAppNode Association <[email protected]> (https://github.com/dappnode)",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
build:
context: .
dockerfile: ./build/Dockerfile
image: 'dappmanager.dnp.dappnode.eth:0.2.33'
image: 'dappmanager.dnp.dappnode.eth:0.2.34'
container_name: DAppNodeCore-dappmanager.dnp.dappnode.eth
restart: always
volumes:
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"is-ipfs": "^0.6.0",
"jquery": "^3.3.1",
"lodash": "^4.17.15",
"mitt": "^2.1.0",
"node-sass": "^4.12.0",
"popper.js": "^1.14.3",
"pretty-bytes": "^5.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/admin-ui/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect } from "react";
import io from "socket.io-client";
import useSWR, { responseInterface } from "swr";
import { mapValues } from "lodash";
import mitt from "mitt";
import { store } from "../store";
// Transport
import { subscriptionsFactory } from "common/transport/socketIo";
Expand All @@ -19,7 +20,6 @@ import {
connectionClose
} from "services/connectionStatus/actions";
import { initialCallsOnOpen } from "./initialCalls";
import { PubSub } from "./utils";
import { parseRpcResponse } from "common/transport/jsonRpc";
import { apiUrl, apiUrls } from "params";

Expand Down Expand Up @@ -52,7 +52,7 @@ const routeSubscription: Partial<
* ```
* Or use the hook `useSubscription`
*/
const apiEventBridge = new PubSub();
const apiEventBridge = mitt();

/**
* Call a RPC route
Expand Down
21 changes: 0 additions & 21 deletions packages/admin-ui/src/api/utils.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
import { dappmanagerName, coreName } from "params";

export class PubSub extends EventTarget {
callbacks: any;
constructor() {
super();
this.callbacks = {};
}
emit(route: string, ...args: any) {
const event = new CustomEvent(route, { detail: args });
this.dispatchEvent(event);
}
on(route: string, callback: any) {
const listener = (e: CustomEvent) => callback(...e.detail);
this.callbacks[callback] = listener;
this.addEventListener(route, listener as EventListener);
}
off(route: string, callback: any) {
const listener = this.callbacks[callback];
if (listener) this.removeEventListener(route, listener);
}
}

/**
* Restarting the DAPPMANAGER will cause this error
* ```bash
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11137,6 +11137,11 @@ mississippi@^3.0.0:
stream-each "^1.1.0"
through2 "^2.0.0"

mitt@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230"
integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==

mixin-deep@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
Expand Down

0 comments on commit d075b2f

Please sign in to comment.