Skip to content

Commit 0970ba7

Browse files
emloweQuexington
andauthored
Fix backwards compatibility for add_private_key (cherrypick from main) (#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]>
1 parent abcbb97 commit 0970ba7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chia/daemon/keychain_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ def get_keychain_for_request(self, request: Dict[str, Any]) -> Keychain:
174174
async def handle_command(self, command: str, data: Dict[str, Any]) -> Dict[str, Any]:
175175
try:
176176
if command == "add_private_key":
177-
return await self.add_key(
178-
{"mnemonic_or_pk": data.get("mnemonic", None), "label": data.get("label", None), "private": True}
179-
)
177+
data["private"] = True
178+
data["mnemonic_or_pk"] = data.get("mnemonic_or_pk", data.get("mnemonic", None))
179+
return await self.add_key(data)
180180
elif command == "add_key":
181181
return await self.add_key(data)
182182
elif command == "check_keys":

0 commit comments

Comments
 (0)