Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHIA-1455: remove no-wallet-found traceback from /dl_owned_singletons #18632

Merged
merged 1 commit into from
Sep 27, 2024
Merged
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
6 changes: 5 additions & 1 deletion chia/rpc/wallet_rpc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4406,7 +4406,11 @@ async def dl_owned_singletons(self, request: Dict[str, Any]) -> EndpointResult:
if self.service.wallet_state_manager is None:
raise ValueError("The wallet service is not currently initialized")

wallet = self.service.wallet_state_manager.get_dl_wallet()
try:
wallet = self.service.wallet_state_manager.get_dl_wallet()
except ValueError:
return {"success": False, "error": "no DataLayer wallet available"}

singletons = await wallet.get_owned_singletons()
singletons_json = [singleton.to_json_dict() for singleton in singletons]

Expand Down
Loading