mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-17 09:46:37 +00:00
Merge pull request #728 from embark-framework/bug_fix/whisper-config
whisper config should be stringified only once
This commit is contained in:
commit
fa551f67a3
@ -75,15 +75,13 @@ class Whisper {
|
|||||||
let connection = this.communicationConfig.connection || {};
|
let connection = this.communicationConfig.connection || {};
|
||||||
|
|
||||||
// todo: make the add code a function as well
|
// todo: make the add code a function as well
|
||||||
let config = JSON.stringify({
|
let config = {
|
||||||
server: canonicalHost(connection.host || defaultHost),
|
server: canonicalHost(connection.host || defaultHost),
|
||||||
port: connection.port || '8546',
|
port: connection.port || '8546',
|
||||||
type: connection.type || 'ws'
|
type: connection.type || 'ws'
|
||||||
});
|
};
|
||||||
|
|
||||||
config = JSON.stringify(config);
|
let code = `\nEmbarkJS.Messages.setProvider('whisper', ${JSON.stringify(config)});`;
|
||||||
|
|
||||||
let code = "\nEmbarkJS.Messages.setProvider('whisper'," + config + ");";
|
|
||||||
|
|
||||||
let shouldInit = (communicationConfig) => {
|
let shouldInit = (communicationConfig) => {
|
||||||
return (communicationConfig.provider === 'whisper' && communicationConfig.enabled === true);
|
return (communicationConfig.provider === 'whisper' && communicationConfig.enabled === true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user