From a83f59bf2bf33e4521e537016031c9be0f485d4a Mon Sep 17 00:00:00 2001 From: Matt Hauff Date: Mon, 24 Jun 2024 15:26:46 -0700 Subject: [PATCH] Fix backwards compatibility for `add_private_key` (#18237) * Fix backwards compatibility for `add_private_key` * Another backwards compatibility fix --- chia/daemon/keychain_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chia/daemon/keychain_server.py b/chia/daemon/keychain_server.py index b5b506c560f1..57edc5c387e4 100644 --- a/chia/daemon/keychain_server.py +++ b/chia/daemon/keychain_server.py @@ -174,9 +174,9 @@ def get_keychain_for_request(self, request: Dict[str, Any]) -> Keychain: async def handle_command(self, command: str, data: Dict[str, Any]) -> Dict[str, Any]: try: if command == "add_private_key": - return await self.add_key( - {"mnemonic_or_pk": data.get("mnemonic", None), "label": data.get("label", None), "private": True} - ) + data["private"] = True + data["mnemonic_or_pk"] = data.get("mnemonic_or_pk", data.get("mnemonic", None)) + return await self.add_key(data) elif command == "add_key": return await self.add_key(data) elif command == "check_keys":