1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/.yarn/patches/web3-npm-0.20.7-ee7ef00c57.patch
Brad Decker 6d1170f06c
upgrade yarn to version 3 (#16232)
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>
2022-12-08 10:38:04 -06:00

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]] || {};