Skip to content

Commit

Permalink
Fix backwards compatibility for add_private_key (#18237)
Browse files Browse the repository at this point in the history
* Fix backwards compatibility for `add_private_key`

* Another backwards compatibility fix
  • Loading branch information
Quexington authored Jun 24, 2024
1 parent 058b807 commit a83f59b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chia/daemon/keychain_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit a83f59b

Please sign in to comment.