Skip to content

Commit

Permalink
Update address.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Dec 16, 2024
1 parent 3c2a430 commit d562490
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions eth_portfolio/_ledgers/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ async def _load_new_objects(
generator_function, tqdm=True, desc=f"Trace Filters {self.address}"
)

load_prices = self.load_prices

if traces := [
trace for traces in generator_function(trace_filter_coros) for trace in await traces
]:
Expand All @@ -620,9 +618,9 @@ async def _load_new_objects(
tqdm_desc = f"Internal Transfers {self.address}"
done = 0

if load_prices:
if load_prices := self.load_prices:
tasks = (
create_task(coro=load(trace, load_prices), name="InternalTransfer.from_trace")
create_task(coro=load(trace, load_prices=True), name="InternalTransfer.from_trace")
for trace in traces
)
del traces
Expand All @@ -639,7 +637,7 @@ async def _load_new_objects(
else:
pop_next_trace = traces.pop
for _ in tqdm(tuple(range(len(traces))), desc=tqdm_desc):
internal_transfer = await load(pop_next_trace(), load_prices)
internal_transfer = await load(pop_next_trace(), load_prices=False)
if internal_transfer is not None:
append_transfer(internal_transfer)
yield internal_transfer
Expand Down

0 comments on commit d562490

Please sign in to comment.