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() {
|
commonOptions() {
|
||||||
return [];
|
return ['--ipcdisable'];
|
||||||
}
|
}
|
||||||
|
|
||||||
getMiner() {
|
getMiner() {
|
||||||
|
|
|
@ -46,7 +46,7 @@ __embarkWhisperNewWeb3.setProvider = function(options) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
__embarkWhisperNewWeb3.sendMessage = function(options, callback) {
|
__embarkWhisperNewWeb3.sendMessage = function(options) {
|
||||||
const data = options.data || options.payload;
|
const data = options.data || options.payload;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
throw new Error("missing option: data");
|
throw new Error("missing option: data");
|
||||||
|
@ -60,12 +60,7 @@ __embarkWhisperNewWeb3.sendMessage = function(options, callback) {
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
|
||||||
this.real_sendMessage(options, (err) => {
|
return this.real_sendMessage(options);
|
||||||
if (err) {
|
|
||||||
throw new Error(err);
|
|
||||||
}
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
__embarkWhisperNewWeb3.listenTo = function (options) {
|
__embarkWhisperNewWeb3.listenTo = function (options) {
|
||||||
|
|
Loading…
Reference in New Issue