Skip to content

Commit

Permalink
fix: cant hex a float
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Dec 21, 2024
1 parent e9c7e87 commit e4db4f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eth_portfolio/_ledgers/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@ async def _load_new_objects(
await e.load_remaining()
return

# TODO: figure out where this float comes from and raise a TypeError there
if isinstance(start_block, float) and int(start_block) == start_block:
start_block = int(start_block)
if isinstance(end_block, float) and int(end_block) == end_block:
end_block = int(end_block)

block_ranges = [
[hex(i), hex(i + BATCH_SIZE - 1)] for i in range(start_block, end_block, BATCH_SIZE)
]
Expand Down

0 comments on commit e4db4f6

Please sign in to comment.