diff --git a/src/controllers/TxStream.js b/src/controllers/TxStream.js index 89ea8cd..4dda28a 100644 --- a/src/controllers/TxStream.js +++ b/src/controllers/TxStream.js @@ -3,7 +3,7 @@ import config from '../config.js' class TxStream { constructor () { - this.websocketUri = (config.dev ? `ws://localhost:5000${config.websocket_path}` : `wss://${window.location.host}${config.websocket_path}`) + this.websocketUri = config.localSocket ? `ws://localhost:4000${config.websocket_path}` : (config.dev ? `wss://bits.monospace.live${config.websocket_path}` : `wss://${window.location.host}${config.websocket_path}`) this.reconnectBackoff = 128 this.websocket = null this.setConnected(false) diff --git a/src/models/TxPoolScene.js b/src/models/TxPoolScene.js index 59254f8..3b7fe12 100644 --- a/src/models/TxPoolScene.js +++ b/src/models/TxPoolScene.js @@ -40,8 +40,8 @@ export default class TxPoolScene { resize ({ width = this.width, height = this.height }) { this.width = width this.height = height - this.unitWidth = Math.max(4, width / 250) - this.unitPadding = Math.max(1, width / 1000) + this.unitWidth = Math.floor(Math.max(4, width / 250)) + this.unitPadding = Math.floor(Math.max(1, width / 1000)) this.gridSize = this.unitWidth + (this.unitPadding * 2) this.blockWidth = (Math.floor(width / this.gridSize) - 1) this.blockHeight = (Math.floor(height / this.gridSize) - 1)