Skip to content

Commit

Permalink
Fix backwards compatibility for add_private_key (cherrypick from main) (
Browse files Browse the repository at this point in the history
#18256)

Fix backwards compatibility for `add_private_key` (#18237)

* Fix backwards compatibility for `add_private_key`

* Another backwards compatibility fix

Co-authored-by: Matt Hauff <[email protected]>
  • Loading branch information
emlowe and Quexington authored Jun 28, 2024
1 parent abcbb97 commit 0970ba7
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 0970ba7

Please sign in to comment.