diff --git a/README.md b/README.md index 3551f26..1fab416 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JS -You need to run a local ethrereum node to use this library. +You need to run a local Ethereum node to use this library. [Documentation](https://github.com/ethereum/wiki/wiki/JavaScript-API) diff --git a/lib/web3/filter.js b/lib/web3/filter.js index 3e4628e..5db6734 100644 --- a/lib/web3/filter.js +++ b/lib/web3/filter.js @@ -53,7 +53,7 @@ var getOptions = function (options) { if (utils.isString(options)) { return options; - } + } options = options || {}; @@ -69,8 +69,8 @@ var getOptions = function (options) { to: options.to, address: options.address, fromBlock: formatters.inputBlockNumberFormatter(options.fromBlock), - toBlock: formatters.inputBlockNumberFormatter(options.toBlock) - }; + toBlock: formatters.inputBlockNumberFormatter(options.toBlock) + }; }; /** @@ -78,7 +78,7 @@ Adds the callback and sets up the methods, to iterate over the results. @method getLogsAtStart @param {Object} self -@param {funciton} +@param {funciton} */ var getLogsAtStart = function(self, callback){ // call getFilterLogs for the first watch callback start @@ -168,7 +168,7 @@ var Filter = function (requestManager, options, methods, formatter, callback) { pollFilter(self); // start to watch immediately - if(callback) { + if(typeof callback === 'function') { return self.watch(callback); } }