Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion chia/wallet/cat_wallet/cat_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ async def create_from_puzzle_info(
puzzle_driver: PuzzleInfo,
name: Optional[str] = None,
# We're hinting this as Any for mypy by should explore adding this to the wallet protocol and hinting properly
potential_subclasses: dict[AssetType, Any] = {},
potential_subclasses: Optional[dict[AssetType, Any]] = None,
) -> Any:
if potential_subclasses is None:
potential_subclasses = {}

next_layer: Optional[PuzzleInfo] = puzzle_driver.also()
if next_layer is not None:
if AssetType(next_layer.type()) in potential_subclasses:
Expand Down
5 changes: 4 additions & 1 deletion chia/wallet/cat_wallet/r_cat_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ async def create_from_puzzle_info(
puzzle_driver: PuzzleInfo,
name: Optional[str] = None,
# We're hinting this as Any for mypy by should explore adding this to the wallet protocol and hinting properly
potential_subclasses: dict[AssetType, Any] = {},
potential_subclasses: Optional[dict[AssetType, Any]] = None,
) -> Any:
if potential_subclasses is None:
potential_subclasses = {}

rev_layer: Optional[PuzzleInfo] = puzzle_driver.also()
if rev_layer is None:
raise ValueError("create_from_puzzle_info called on RCATWallet with a non R-CAT puzzle driver")
Expand Down
5 changes: 4 additions & 1 deletion chia/wallet/vc_wallet/cr_cat_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ async def create_from_puzzle_info(
puzzle_driver: PuzzleInfo,
name: Optional[str] = None,
# We're hinting this as Any for mypy by should explore adding this to the wallet protocol and hinting properly
potential_subclasses: dict[AssetType, Any] = {},
potential_subclasses: Optional[dict[AssetType, Any]] = None,
) -> Any:
if potential_subclasses is None:
potential_subclasses = {}

cr_layer: Optional[PuzzleInfo] = puzzle_driver.also()
if cr_layer is None: # pragma: no cover
raise ValueError("create_from_puzzle_info called on CRCATWallet with a non CR-CAT puzzle driver")
Expand Down
Loading