1
0

Kraken: Fixed weird bug
All checks were successful
Test Python / Test (push) Successful in 27s

This commit is contained in:
Jon Michael Aanes 2024-10-20 11:03:31 +02:00
parent b9e8f22801
commit 5bda09911c
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
2 changed files with 7 additions and 1 deletions

View File

@ -44,6 +44,9 @@ class DepoSingle(Depo):
_assets: Mapping[Asset, Decimal] _assets: Mapping[Asset, Decimal]
def __post_init__(self):
assert None not in self._assets
def assets(self) -> Iterable[Asset]: def assets(self) -> Iterable[Asset]:
return self._assets return self._assets
@ -58,6 +61,9 @@ class DepoGroup(Depo):
nested: list[Depo] nested: list[Depo]
def __post_init__(self):
assert None not in self.nested
def assets(self) -> Iterable[Asset]: def assets(self) -> Iterable[Asset]:
assets: set[Asset] = set() assets: set[Asset] = set()
for nested_depo in self.nested: for nested_depo in self.nested:

View File

@ -59,4 +59,4 @@ def parse_asset_from_ticker(ticker: str) -> fin_defs.Asset:
account = ticker.removesuffix('.HOLD') account = ticker.removesuffix('.HOLD')
if account == 'ZEUR': if account == 'ZEUR':
return fin_defs.EUR return fin_defs.EUR
asset = fin_defs.WELL_KNOWN_SYMBOLS[account] return fin_defs.WELL_KNOWN_SYMBOLS[account]