Skip to content

Commit

Permalink
Merge branch 'develop' into events_refactor
Browse files Browse the repository at this point in the history
Conflicts:
	dist/web3-light.js
	dist/web3-light.js.map
	dist/web3-light.min.js
	dist/web3.js
	dist/web3.js.map
	dist/web3.min.js
	lib/web3/filter.js
  • Loading branch information
debris committed Apr 22, 2015
2 parents 76ced9a + f37057e commit 4482d5b
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 13 deletions.
7 changes: 6 additions & 1 deletion dist/web3-light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/web3-light.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/web3-light.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion dist/web3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/web3.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/web3.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ var fromDecimal = function (value) {
var toHex = function (val) {
/*jshint maxcomplexity:7 */

if(val === null || typeof val === 'undefined')
return val;

if (isBoolean(val))
return fromDecimal(+val);

Expand Down
4 changes: 3 additions & 1 deletion lib/web3/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ var getOptions = function (options) {

// make sure topics, get converted to hex
options.topics = options.topics || [];
options.topics = options.topics.map(function(topic){
options.topics = options.topics.map(function(topic) {
if (topic === null) {
return null;
} else if (utils.isArray(topic)) {
topic = topic.map(utils.toHex);
}
return utils.toHex(topic);
});
Expand Down
1 change: 1 addition & 0 deletions test/utils.toHex.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var BigNumber = require('bignumber.js');
var assert = chai.assert;

var tests = [
{ value: null, expected: null },
{ value: 1, expected: '0x1' },
{ value: '1', expected: '0x1' },
{ value: '0x1', expected: '0x1'},
Expand Down

0 comments on commit 4482d5b

Please sign in to comment.