whisper -- canonicalHost, defaultHost

This commit is contained in:
Michael Bradley, Jr 2018-07-15 19:36:52 -05:00
parent f5b93306be
commit ed5c2eb71c
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) {
@ -74,7 +76,7 @@ class Whisper {
// 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'
});