feat: add __repr__ to Wallets object

pull/12692/head
Matthias 4 months ago
parent 38c74e5d1a
commit 32eaae5dcf

@ -52,6 +52,12 @@ class Wallets:
self._last_wallet_refresh: datetime | None = None
self.update()
def __repr__(self) -> str:
return (
f"Wallets(stake_currency={self._stake_currency}, start_cap={self._start_cap}, "
f"wallets={len(self._wallets)}, positions={len(self._positions)})"
)
def get_free(self, currency: str) -> float:
balance = self._wallets.get(currency)
if balance and balance.free:

Loading…
Cancel
Save