Skip to content

Commit

Permalink
Update portfolio.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Dec 15, 2024
1 parent 863496e commit 8ed6701
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eth_portfolio/portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class PortfolioWallets(Iterable[PortfolioAddress], Dict[Address, PortfolioAddres

_wallets: ChecksumAddressDict[PortfolioAddress]

def __init__(self, portfolio: "Portfolio", addresses: Iterable[Address]) -> None:
def __init__(self, portfolio: "Portfolio", addresses: Iterable[Address], num_workers_transactions: int) -> None:
"""
Initialize a PortfolioWallets instance.
Expand All @@ -68,7 +68,7 @@ def __init__(self, portfolio: "Portfolio", addresses: Iterable[Address]) -> None

for address in addresses:
self._wallets[address] = PortfolioAddress(
address, portfolio, asynchronous=portfolio.asynchronous
address, portfolio, num_workers_transactions=num_workers_transactions, asynchronous=portfolio.asynchronous
)

def __repr__(self) -> str:
Expand Down Expand Up @@ -173,6 +173,7 @@ def __init__(
start_block: int = 0,
label: str = "your portfolio",
load_prices: bool = True,
num_workers_transactions: int = 25_000,
asynchronous: bool = False,
) -> None:
"""
Expand Down Expand Up @@ -223,7 +224,7 @@ def __init__(
The addresses to include in your portfolio
"""

self.addresses = PortfolioWallets(self, addresses)
self.addresses = PortfolioWallets(self, addresses, num_workers_transactions)
"""
A container for the :class:`~eth_portfolio.Portfolio`'s :class:`~eth_portfolio.address.PortfolioAddress` objects.
Expand Down

0 comments on commit 8ed6701

Please sign in to comment.