whisper -- canonicalHost, defaultHost

This commit is contained in:
Michael Bradley, Jr 2018-07-15 19:36:52 -05:00
parent f91baf73bc
commit 6d4870f862
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ let utils = require('../../utils/utils.js');
let fs = require('../../core/fs.js');
let Web3 = require('web3');
const {canonicalHost, defaultHost} = require('../../utils/host');
class Whisper {
constructor(embark, _options) {
@ -69,7 +71,7 @@ class Whisper {
let connection = this.communicationConfig.connection || {};
// todo: make the add code a function as well
let config = JSON.stringify({
server: connection.host || 'localhost',
server: canonicalHost(connection.host || defaultHost),
port: connection.port || '8546',
type: connection.type || 'ws'
});