From 7b77ec04d88584b89456f8e1fde65c44f3e3fc40 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Mon, 19 Jan 2026 20:34:32 +0100 Subject: [PATCH 1/2] chore: update ai rules for commit messages --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 0e6e8a7fb..98580058c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -164,7 +164,8 @@ suspend fun getData(): Result = withContext(Dispatchers.IO) { - ALWAYS when fixing lint or test failures prefer to do the minimal amount of changes to fix the issues - USE single-line commit messages under 50 chars; use conventional commit messages template format: `feat: add something new` - USE `git diff HEAD sourceFilePath` to diff an uncommitted file against the last commit -- ALWAYS run `git status` to check ALL uncommitted changes after completing any code edits, then provide exactly 3 commit message suggestions covering the ENTIRE uncommitted diff +- NEVER capitalize words in commit messages +- ALWAYS run `git status` to check ALL uncommitted changes after completing any code edits, then reply with 3 commit message suggestions covering the ENTIRE uncommitted diff - ALWAYS check existing code patterns before implementing new features - USE existing extensions and utilities rather than creating new ones - ALWAYS consider applying YAGNI (You Ain't Gonna Need It) principle for new code From d62217e63597e3037522b8adba73f5ded41a1858 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Mon, 19 Jan 2026 20:41:49 +0100 Subject: [PATCH 2/2] fix: reset keystore entries on wallet wipe Co-Authored-By: Claude Opus 4.5 --- .../main/java/to/bitkit/data/keychain/AndroidKeyStore.kt | 6 ++++++ app/src/main/java/to/bitkit/data/keychain/Keychain.kt | 1 + 2 files changed, 7 insertions(+) diff --git a/app/src/main/java/to/bitkit/data/keychain/AndroidKeyStore.kt b/app/src/main/java/to/bitkit/data/keychain/AndroidKeyStore.kt index 8f9226669..f60108f8e 100644 --- a/app/src/main/java/to/bitkit/data/keychain/AndroidKeyStore.kt +++ b/app/src/main/java/to/bitkit/data/keychain/AndroidKeyStore.kt @@ -80,4 +80,10 @@ class AndroidKeyStore( val decryptedDataBytes = cipher.doFinal(actualEncryptedData) return decryptedDataBytes } + + fun deleteEncryptionKey() { + if (keyStore.containsAlias(alias)) { + keyStore.deleteEntry(alias) + } + } } diff --git a/app/src/main/java/to/bitkit/data/keychain/Keychain.kt b/app/src/main/java/to/bitkit/data/keychain/Keychain.kt index ad6e82997..7e81ff50f 100644 --- a/app/src/main/java/to/bitkit/data/keychain/Keychain.kt +++ b/app/src/main/java/to/bitkit/data/keychain/Keychain.kt @@ -96,6 +96,7 @@ class Keychain @Inject constructor( suspend fun wipe() { val keys = snapshot.asMap().keys keychain.edit { it.clear() } + keyStore.deleteEncryptionKey() Logger.info("Deleted all keychain entries: ${keys.joinToString()}") }