From af3c0f0bcbc4520b8abab827fb774921379d4cbb Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Sun, 13 Oct 2019 21:55:37 -0400 Subject: [PATCH] Fix whisper callback and start (#1968) * fix(@embark/geth/whisper): add ipcdisable for whisper geth client * fix(@embarkjs/whisper): fix callback not used in send --- packages/embark/src/lib/modules/geth/whisperClient.js | 2 +- packages/embarkjs/whisper/src/index.js | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/embark/src/lib/modules/geth/whisperClient.js b/packages/embark/src/lib/modules/geth/whisperClient.js index 95c8a6610..a5c42bbef 100644 --- a/packages/embark/src/lib/modules/geth/whisperClient.js +++ b/packages/embark/src/lib/modules/geth/whisperClient.js @@ -50,7 +50,7 @@ class WhisperGethClient { } commonOptions() { - return []; + return ['--ipcdisable']; } getMiner() { diff --git a/packages/embarkjs/whisper/src/index.js b/packages/embarkjs/whisper/src/index.js index 6f7f35158..7e6acb1ec 100644 --- a/packages/embarkjs/whisper/src/index.js +++ b/packages/embarkjs/whisper/src/index.js @@ -46,7 +46,7 @@ __embarkWhisperNewWeb3.setProvider = function(options) { }); }; -__embarkWhisperNewWeb3.sendMessage = function(options, callback) { +__embarkWhisperNewWeb3.sendMessage = function(options) { const data = options.data || options.payload; if (!data) { throw new Error("missing option: data"); @@ -60,12 +60,7 @@ __embarkWhisperNewWeb3.sendMessage = function(options, callback) { data }); - this.real_sendMessage(options, (err) => { - if (err) { - throw new Error(err); - } - callback(); - }); + return this.real_sendMessage(options); }; __embarkWhisperNewWeb3.listenTo = function (options) {