added backwards compt for ipc provider

This commit is contained in:
Fabian Vogelsteller 2017-03-03 21:06:36 +01:00
parent 55e0832ac8
commit 7310b88b6a
No known key found for this signature in database
GPG Key ID: E51EADA77F1A4124
5 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
web3.eth.subscribe
=========
The ``web3.eth.subscribe`` function lets you subscribe to specifc events in the blockchain.
The ``web3.eth.subscribe`` function lets you subscribe to specific events in the blockchain.

View File

@ -28,7 +28,7 @@ All Ethereum addresses returned by function of this package are checksum address
This means some letters are uppercase and some are lowercase.
Based on that it will calculate a checksum for the address and prove its correctness.
Incorrect checksum address will throw an error when passed into a function.
If you want to circumvent the checksum check youn can make an address all lowercase or uppercase.
If you want to circumvent the checksum check you can make an address all lowercase or uppercase.
-------
@ -255,7 +255,7 @@ getCoinbase
getCoinbase([callback])
Returns the coinbase address were the mining rewards currently go to.
Returns the coinbase address to which mining rewards will go.
-------
Returns

View File

@ -56,7 +56,7 @@ Subscriptions.prototype.buildCall = function() {
return function(){
if(!_this.subscriptions[arguments[0]]) {
console.warn('Subscription "'+ JSON.stringify(arguments[0]) +'" doesn\'t exist. Subscribing anyway.');
console.warn('Subscription '+ JSON.stringify(arguments[0]) +' doesn\'t exist. Subscribing anyway.');
}
var subscription = new Subscription({

View File

@ -54,7 +54,7 @@ var IpcProvider = function (path, net) {
}
// notification
if(!id && result.method === 'eth_subscription') {
if(!id && result.method.indexOf('_subscription') !== -1) {
_this.notificationCallbacks.forEach(function(callback){
if(_.isFunction(callback))
callback(null, result);

View File

@ -60,7 +60,7 @@ var WebsocketProvider = function (path) {
}
// notification
if(!id && result.method === 'eth_subscription') {
if(!id && result.method.indexOf('_subscription') !== -1) {
_this.notificationCallbacks.forEach(function(callback){
if(_.isFunction(callback))
callback(null, result);