mirror of https://github.com/status-im/web3.js.git
Removed enumerable from methods, fixed number property
This commit is contained in:
parent
ce141d8ec3
commit
ed7d473efd
|
@ -620,7 +620,7 @@ var properties = [
|
||||||
{ name: 'blockNumber', getter: 'eth_number'},
|
{ name: 'blockNumber', getter: 'eth_number'},
|
||||||
|
|
||||||
// deprecated properties
|
// deprecated properties
|
||||||
{ name: 'number', call: 'eth_number', newProperty: 'blockNumber'}
|
{ name: 'number', getter: 'eth_number', newProperty: 'blockNumber'}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -1878,11 +1878,7 @@ var setupMethods = function (obj, methods) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Object.defineProperty(obj, method.name, {
|
obj[objectMethods[0]] = callFunction;
|
||||||
enumerable: (method.newMethod) ? false : true,
|
|
||||||
value: callFunction
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1919,10 +1915,8 @@ var setupProperties = function (obj, properties) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperty(obj, property.name, {
|
proto.enumerable = !property.newProperty;
|
||||||
enumerable: (property.newProperty) ? false : true,
|
Object.defineProperty(obj, property.name, proto);
|
||||||
value: proto
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -91,7 +91,7 @@ var properties = [
|
||||||
{ name: 'blockNumber', getter: 'eth_number'},
|
{ name: 'blockNumber', getter: 'eth_number'},
|
||||||
|
|
||||||
// deprecated properties
|
// deprecated properties
|
||||||
{ name: 'number', call: 'eth_number', newProperty: 'blockNumber'}
|
{ name: 'number', getter: 'eth_number', newProperty: 'blockNumber'}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
12
lib/web3.js
12
lib/web3.js
|
@ -70,11 +70,7 @@ var setupMethods = function (obj, methods) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Object.defineProperty(obj, method.name, {
|
obj[objectMethods[0]] = callFunction;
|
||||||
enumerable: (method.newMethod) ? false : true,
|
|
||||||
value: callFunction
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -111,10 +107,8 @@ var setupProperties = function (obj, properties) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperty(obj, property.name, {
|
proto.enumerable = !property.newProperty;
|
||||||
enumerable: (property.newProperty) ? false : true,
|
Object.defineProperty(obj, property.name, proto);
|
||||||
value: proto
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue