mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-13 15:26:10 +00:00
Merge pull request #894 from embark-framework/bugfix/error-ws-connection-error
Remove useless try on ws connect
This commit is contained in:
commit
94758a1ea4
@ -276,7 +276,7 @@ class ContractDeployer {
|
|||||||
contract.error = error.message;
|
contract.error = error.message;
|
||||||
self.events.emit("deploy:contract:error", contract);
|
self.events.emit("deploy:contract:error", contract);
|
||||||
if (error.message && error.message.indexOf('replacement transaction underpriced')) {
|
if (error.message && error.message.indexOf('replacement transaction underpriced')) {
|
||||||
self.logger.warn("replacement transaction underpriced: This warning typically means a transaction exactly like this one is still pending on the blockchain")
|
self.logger.warn("replacement transaction underpriced: This warning typically means a transaction exactly like this one is still pending on the blockchain");
|
||||||
}
|
}
|
||||||
return next(new Error("error deploying =" + contract.className + "= due to error: " + error.message));
|
return next(new Error("error deploying =" + contract.className + "= due to error: " + error.message));
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ __embarkWhisperNewWeb3.setProvider = function (options) {
|
|||||||
}
|
}
|
||||||
// TODO: take into account type
|
// TODO: take into account type
|
||||||
self.web3 = new Web3(new Web3.providers.WebsocketProvider("ws://" + provider, options.providerOptions));
|
self.web3 = new Web3(new Web3.providers.WebsocketProvider("ws://" + provider, options.providerOptions));
|
||||||
|
self.web3.currentProvider.on('connect', () => {
|
||||||
self.getWhisperVersion(function (err, version) {
|
self.getWhisperVersion(function (err, version) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log("whisper not available");
|
console.log("whisper not available");
|
||||||
@ -28,6 +29,10 @@ __embarkWhisperNewWeb3.setProvider = function (options) {
|
|||||||
}
|
}
|
||||||
self.whisperVersion = self.web3.version.whisper;
|
self.whisperVersion = self.web3.version.whisper;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
self.web3.currentProvider.on('error', () => {
|
||||||
|
console.log("whisper not available");
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
__embarkWhisperNewWeb3.sendMessage = function (options) {
|
__embarkWhisperNewWeb3.sendMessage = function (options) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user