mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
6d1170f06c
Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: ricky <ricky.miller@gmail.com> Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com> Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com> Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: Pedro Figueiredo <pedro.figueiredo@consensys.net>
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
diff --git a/dist/web3.js b/dist/web3.js
|
|
index 6eb151ce903cd7b289af4e6d4097ca88f93d7a92..6aa4516838708b7e3444a8e0afe5b20a2ed83b2a 100644
|
|
--- a/dist/web3.js
|
|
+++ b/dist/web3.js
|
|
@@ -5072,7 +5072,7 @@ Method.prototype.toPayload = function (args) {
|
|
|
|
Method.prototype.attachToObject = function (obj) {
|
|
var func = this.buildCall();
|
|
- func.call = this.call; // TODO!!! that's ugly. filter.js uses it
|
|
+ Reflect.defineProperty(func, 'call', { value: this.call })
|
|
var name = this.name.split('.');
|
|
if (name.length > 1) {
|
|
obj[name[0]] = obj[name[0]] || {};
|
|
diff --git a/lib/web3/function.js b/lib/web3/function.js
|
|
index 863a10a08e9cb7ab1527ca5dc42d94a4187c2304..ffcd23c6779071d88b99a7709b1bf7c14c6e7948 100644
|
|
--- a/lib/web3/function.js
|
|
+++ b/lib/web3/function.js
|
|
@@ -269,7 +269,7 @@ SolidityFunction.prototype.execute = function () {
|
|
SolidityFunction.prototype.attachToContract = function (contract) {
|
|
var execute = this.execute.bind(this);
|
|
execute.request = this.request.bind(this);
|
|
- execute.call = this.call.bind(this);
|
|
+ Reflect.defineProperty(execute, 'call', this.call.bind(this));
|
|
execute.sendTransaction = this.sendTransaction.bind(this);
|
|
execute.estimateGas = this.estimateGas.bind(this);
|
|
execute.getData = this.getData.bind(this);
|
|
diff --git a/lib/web3/method.js b/lib/web3/method.js
|
|
index 2e3c79639525c1986d80308be41c08b1ae608e77..be0b6630ce32a10c32bf11b995de6353c368c1a6 100644
|
|
--- a/lib/web3/method.js
|
|
+++ b/lib/web3/method.js
|
|
@@ -123,7 +123,7 @@ Method.prototype.toPayload = function (args) {
|
|
|
|
Method.prototype.attachToObject = function (obj) {
|
|
var func = this.buildCall();
|
|
- func.call = this.call; // TODO!!! that's ugly. filter.js uses it
|
|
+ Reflect.defineProperty(func, 'call', { value: this.call })
|
|
var name = this.name.split('.');
|
|
if (name.length > 1) {
|
|
obj[name[0]] = obj[name[0]] || {};
|