fix(@embark/simulator): fix port used in simulator

When using websockets, the simulator was starting on port `8545` instead of `8546`, so the blockchain check was failing.

Update the simulator port to be websockets port from the config when using websockets.
This commit is contained in:
emizzle 2019-11-20 14:59:43 +11:00 committed by Pascal Precht
parent cb0f8b011e
commit dba5f771f2
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class Simulator {
const cmds = []; const cmds = [];
const host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost); const host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost);
const configPort = this.blockchainConfig.wsRPC ? this.blockchainConfig.rpcPort : this.blockchainConfig.wsPort; const configPort = this.blockchainConfig.wsRPC ? this.blockchainConfig.wsPort : this.blockchainConfig.rpcPort;
let port = parseInt((options.port || configPort || 8545), 10); let port = parseInt((options.port || configPort || 8545), 10);
cmds.push("-p " + port); cmds.push("-p " + port);