Skip to content

Commit

Permalink
fix: TypeErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Nov 18, 2024
1 parent 89b84ea commit 874201e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dank_mids/_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def coroutines(self) -> Generator[Union["_Batch", Awaitable[RawResponse]], None,
yield working_batch
working_batch = JSONRPCBatch(self.controller)

rpc_calls_to_batch = self.rpc_calls[:]
rpc_calls_to_batch = list(self.rpc_calls)
while rpc_calls_to_batch:
if working_batch.is_full:
yield working_batch
Expand Down
4 changes: 2 additions & 2 deletions dank_mids/_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def should_retry(self, e: Exception) -> bool:
return self.is_single_multicall

@set_done
async def spoof_response(self, response: List[RawResponse], calls: List[RPCRequest]) -> None:
async def spoof_response(self, response: List[RawResponse], calls: Tuple[RPCRequest, ...]) -> None:
"""
Process the responses from the Ethereum node and set the results for each call.
Expand All @@ -1091,7 +1091,7 @@ async def spoof_response(self, response: List[RawResponse], calls: List[RPCReque
if self.controller._sort_calls:
# NOTE: these providers don't always return batch results in the correct ordering
# NOTE: is it maybe because they
calls.sort(key=lambda call: call.uid)
calls = sorted(calls, key=lambda call: call.uid) # type: ignore [assignment]

if self.controller._sort_response:
response.sort(key=lambda raw: raw.decode().id)
Expand Down

0 comments on commit 874201e

Please sign in to comment.