Commit c26899a
authored
Migrates `@metamask/eth-json-rpc-middleware` to the `JsonRpcEngineV2`
conventions in a total overhaul of the package. The semantics of each
middleware should be the same as before.
One potential behavioral difference is that request cloning within
middleware now occurs with `klona` instead of `klona/full`. This is
because `klona/full` copies property descriptors such that cloned
requests are immutable but not frozen in the `Object.isFrozen()` sense.
This is unlikely to make a difference in practice to us, since our
request objects have historically been "plain" objects.
As with all #6327-related work up to this point, `json-rpc-engine`
received minor refactors to facilitate the use of the new abstractions
_in situ_.
Incidentally, all lint rule exceptions have been removed and all lint
warnings and errors have been resolved for `eth-json-rpc-middleware`.
Several other packages are changed to support or in consequence of the
migration:
- `network-controller`
- The `NetworkClient` is migrated to `JsonRpcEngineV2`.
- The `RpcService` now uses `Readonly<JsonRpcRequest>` internally for
request objects received via its `request()` method, since the "fetch"
middleware now passes it deeply frozen request objects directly.
- `message-manager` and `signature-controller`
- Minor changes to types in order to harmonize them with the new
conventions.
1 parent be86c60 commit c26899a
File tree
58 files changed
+1948
-1569
lines changed- packages
- eth-json-rpc-middleware
- src
- methods
- utils
- test
- util
- json-rpc-engine
- src
- v2
- message-manager
- src
- network-controller
- src
- rpc-service
- signature-controller
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
58 files changed
+1948
-1569
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | 118 | | |
197 | 119 | | |
198 | 120 | | |
| |||
219 | 141 | | |
220 | 142 | | |
221 | 143 | | |
222 | | - | |
| 144 | + | |
223 | 145 | | |
224 | 146 | | |
225 | 147 | | |
| |||
236 | 158 | | |
237 | 159 | | |
238 | 160 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 161 | | |
243 | 162 | | |
244 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 233 | | |
245 | 234 | | |
246 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
0 commit comments