simplified polling && jsonrpc payload creation

This commit is contained in:
Marek Kotewicz
2015-02-03 21:43:39 +01:00
parent ddc17196da
commit f3ce1f07c4
7 changed files with 36 additions and 90 deletions

View File

@ -136,8 +136,8 @@ var setupMethods = function (obj, methods) {
var args = Array.prototype.slice.call(arguments);
var call = typeof method.call === 'function' ? method.call(args) : method.call;
return web3.provider.send({
call: call,
args: args
method: call,
params: args
});
};
});
@ -150,15 +150,15 @@ var setupProperties = function (obj, properties) {
var proto = {};
proto.get = function () {
return web3.provider.send({
call: property.getter
method: property.getter
});
};
if (property.setter) {
proto.set = function (val) {
return web3.provider.send({
call: property.setter,
args: [val]
method: property.setter,
params: [val]
});
};
}