diff --git a/CHANGELOG.md b/CHANGELOG.md index 2723d63..9e35335 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Contract invocation support. +### Fixed + +- Fixed bug in `Wallet` `default_address` property for newly hydrated wallets. + ## [0.0.3] - 2024-09-25 ### Added diff --git a/cdp/wallet.py b/cdp/wallet.py index f67fd70..93980d9 100644 --- a/cdp/wallet.py +++ b/cdp/wallet.py @@ -606,7 +606,7 @@ def _address(self, address_id: str) -> WalletAddress | None: """ return next( - (address for address in self._addresses if address.address_id == address_id), + (address for address in self.addresses if address.address_id == address_id), None, ) diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 575395a..0819646 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -48,7 +48,7 @@ def _create_wallet_model( network_id="base-sepolia", default_address=None, feature_set=None, - server_signer_status="active_seed", + server_signer_status="active_seed" ): if default_address is None: default_address = address_model_factory()