Commit 93b1c45
authored
chore: Remove Proxy from json rpc client (#10554)
Using a proxy as a json rpc client means that dynamic checks for
functions in the returned object fail. For instance, `typeof
pxe.getTransactions` returns true even if the method is not part of the
pxe schema, since the proxy creates a fake function for every single
property requested. But then it fails when we try to invoke it.
Since we now have schemas, we can drop usage of the proxy and just
create an object with exactly the methods we need.1 parent 7441767 commit 93b1c45
File tree
2 files changed
+7
-17
lines changed- yarn-project/foundation/src/json-rpc
- client
- test
2 files changed
+7
-17
lines changedLines changed: 5 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
59 | 51 | | |
60 | | - | |
| 52 | + | |
61 | 53 | | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
| |||
0 commit comments