mirror of https://github.com/embarklabs/embark.git
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
This commit is contained in:
parent
4b947bb5c2
commit
af3c0f0bcb
|
@ -50,7 +50,7 @@ class WhisperGethClient {
|
|||
}
|
||||
|
||||
commonOptions() {
|
||||
return [];
|
||||
return ['--ipcdisable'];
|
||||
}
|
||||
|
||||
getMiner() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue