fix(lite): keep a rejected import key out of the log and Settings

The backend's error for a key it doesn't recognize repeats the key
("'<key>' was not recognized as either a spending key or a viewing
key"). Import passed that text on as its error, so a mistyped private
key was written to the lite log (shown in the Console tab) and to the
Settings status line. A failed import now carries a fixed reason
(unrecognized format, wallet locked, key already exists, could not be
decoded, or rejected), which is all the log records. Settings shows
"Couldn't import the key — check it, unlock the wallet (if encrypted)
and try again." instead, translated in all eight languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 21:09:48 -05:00
co-authored by Claude Opus 5.5
parent 7c24400c83
commit bb84243114
13 changed files with 69 additions and 6 deletions
+1
View File
@@ -1020,6 +1020,7 @@
"lite_hide_wipe": "숨기고 삭제",
"lite_import": "가져오기",
"lite_import_key_label": "키 가져오기",
"lite_key_import_failed": "키를 가져오지 못했습니다. 키를 확인하고 지갑 잠금을 해제한 후(암호화된 경우) 다시 시도하세요.",
"lite_key_imported": "키를 가져왔습니다 — 동기화를 실행하여 기록을 스캔하세요",
"lite_lock_failed": "잠금 실패",
"lite_lock_now": "지금 잠그기",