forked from cerc-io/plugeth
eth.filter next param optional
This commit is contained in:
parent
589c4fb30f
commit
688030ecb6
7
dist/ethereum.js
vendored
7
dist/ethereum.js
vendored
@ -1441,10 +1441,11 @@ var web3 = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/// @param filter may be a string, object or event
|
/// @param filter may be a string, object or event
|
||||||
/// @param indexed is optional, this may be an object with optional event indexed params
|
/// @param indexed is optional, this is an object with optional event indexed params
|
||||||
watch: function (filter, indexed) {
|
/// @param options is optional, this is an object with optional event options ('max'...)
|
||||||
|
watch: function (filter, indexed, options) {
|
||||||
if (filter._isEvent) {
|
if (filter._isEvent) {
|
||||||
return filter(indexed);
|
return filter(indexed, options);
|
||||||
}
|
}
|
||||||
return new web3.filter(filter, ethWatch);
|
return new web3.filter(filter, ethWatch);
|
||||||
}
|
}
|
||||||
|
4
dist/ethereum.js.map
vendored
4
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
File diff suppressed because one or more lines are too long
@ -75,7 +75,13 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function test8() {
|
||||||
|
// "{"topic":["0x83c9849c","000000000000000000000000000000000000000000000000000000000000001e"],"max":100,"address":"0x01"}"
|
||||||
|
web3.eth.watch(contract.Event, {a: 30}, {max: 100}).changed(function (res) {
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// not valid
|
// not valid
|
||||||
// function testX() {
|
// function testX() {
|
||||||
// web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) {
|
// web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) {
|
||||||
@ -107,5 +113,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<button type="button" onClick="test7();">test7</button>
|
<button type="button" onClick="test7();">test7</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<button type="button" onClick="test8();">test8</button>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -250,10 +250,11 @@ var web3 = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/// @param filter may be a string, object or event
|
/// @param filter may be a string, object or event
|
||||||
/// @param indexed is optional, this may be an object with optional event indexed params
|
/// @param indexed is optional, this is an object with optional event indexed params
|
||||||
watch: function (filter, indexed) {
|
/// @param options is optional, this is an object with optional event options ('max'...)
|
||||||
|
watch: function (filter, indexed, options) {
|
||||||
if (filter._isEvent) {
|
if (filter._isEvent) {
|
||||||
return filter(indexed);
|
return filter(indexed, options);
|
||||||
}
|
}
|
||||||
return new web3.filter(filter, ethWatch);
|
return new web3.filter(filter, ethWatch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user