From a7e6b1182a973b6b15f8e9206a4589c14a45fc16 Mon Sep 17 00:00:00 2001 From: maciejhirsz Date: Fri, 10 Aug 2018 14:37:55 +0200 Subject: [PATCH] Cleanup --- packages/backend/src/Node.ts | 4 ---- packages/frontend/src/Connection.ts | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/Node.ts b/packages/backend/src/Node.ts index f095d9c..fd5b10e 100644 --- a/packages/backend/src/Node.ts +++ b/packages/backend/src/Node.ts @@ -119,8 +119,6 @@ export default class Node { function handler(data: WebSocket.Data) { const message = parseMessage(data); - console.log(message); - if (!message || !message.msg) { return; } @@ -200,8 +198,6 @@ export default class Node { } private onMessage(message: Message) { - console.log(message); - this.lastMessage = timestamp(); const update = getBestBlock(message); diff --git a/packages/frontend/src/Connection.ts b/packages/frontend/src/Connection.ts index c47baeb..6e47a3a 100644 --- a/packages/frontend/src/Connection.ts +++ b/packages/frontend/src/Connection.ts @@ -11,11 +11,11 @@ export class Connection { return new Connection(await Connection.socket(), update); } - // private static readonly address = window.location.protocol === 'https:' - // ? `wss://${window.location.hostname}/feed/` - // : `ws://${window.location.hostname}:8080`; + private static readonly address = window.location.protocol === 'https:' + ? `wss://${window.location.hostname}/feed/` + : `ws://${window.location.hostname}:8080`; - private static readonly address = 'wss://telemetry.polkadot.io/feed/'; + // private static readonly address = 'wss://telemetry.polkadot.io/feed/'; private static async socket(): Promise { let socket = await Connection.trySocket();