mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 19:48:13 +00:00
added backwards compt for ipc provider
This commit is contained in:
parent
55e0832ac8
commit
7310b88b6a
@ -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.
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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({
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user