
| Audited | horizontalsystems/unstoppable-wallet-android at commit b6ced7d1b2eceae84488bcba90e569711c38000e |
|---|---|
| Date | 11 October 2026 (audited again; first audit 11 October 2026) |
| How it ran | local run on our workstation, full audit, Standard review |
| Verdict after review | Pass with notes (Fail if a High finding remains after review, otherwise Pass with notes) |
[Update 20 November 2026. We compared the 90 findings after review, audited at commit b6ced7d, with the default branch develop at 818930a2 (20 November 2026, 10:09 UTC, 316 commits later).
Of these 90 findings after review, each counted once: 2 fixed on develop (36, 37), 3 partly fixed (44, 59, 67), 2 with the cited code removed (40, 74), 35 with the cited code unchanged and 48 still present on develop (2 + 3 + 2 + 35 + 48 = 90). The status of each is shown under it.
The numbers are this page's; the first audit numbers its findings differently (see the comparison table below).
Every finding after review was compared between the audited commit and develop at 818930a2. A finding whose cited file is byte-identical is marked "Cited code unchanged". Every other finding was reviewed finding by finding in the code at 818930a2.
Our GitHub issue #9913 was closed with the reason 'completed' on 20 November 2026 at 06:06 UTC; when we checked at 12:53 UTC the same day, it had no comment and no linked commit. This page does not claim that the changes below respond to our report, or that they do not.]
Compared with the first audit
Same commit as the first audit: the project's default branch has no later commits (checked 11 October 2026), so nothing could have been fixed upstream in between. Each finding of the first audit (11 October 2026) was checked again against the code audited now. 69 findings in the first audit; 69 still open (37 found again, 32 not reported again but still present). This audit has 90 findings after review, 48 of them new.
| First audit | Finding | Reviewed rating then | Now | In this audit |
|---|---|---|---|---|
| #1 | Raw Solana transactions from swap providers signed without decoding | Medium | Still open | not reported again |
| #2 | Custom SPL token decimals and symbol from off-chain API | Low | Still open | not reported again |
| #3 | WC Solana summary does not identify the token | Low | Still open | #1 |
| #4 | Missing swap output amount shown as zero | Low | Still open | not reported again |
| #5 | Backup encryption hand-assembled | Low | Still open | #5 |
| #6 | Raw exception text shown to users | Low | Still open | #3, #4 |
| #7 | Local-network permission not declared for API 37 | Low | Still open | not reported again |
| #8 | Unparseable payment amount becomes zero | Low | Still open | #6 |
| #9 | TonConnect deep links not de-duplicated | Low | Still open | not reported again |
| #10 | Name-resolution caches use check-then-get on plain map | Low | Still open | not reported again |
| #11 | TVL view-item cache keyed by hashCode | Low | Still open | #19 |
| #12 | Preference keys have no naming scheme | Low | Still open | #17 |
| #13 | Material 2 theme root with Material 3 components | Low | Still open | #13 |
| #14 | Scroll-to-top triggered from inside list builder | Low | Still open | #10, #11 |
| #15 | Raw colour literals duplicated | Low | Still open | #14 |
| #16 | Day and night themes set different attributes | Low | Still open | #15 |
| #17 | Theme-to-night-mode mapping in two places | Low | Still open | not reported again |
| #18 | Account import publishes only imported accounts | Low | Still open | #77 |
| #19 | Transaction adapter map cleared and refilled in place | Low | Still open | not reported again |
| #20 | XRP and THORChain kit managers not synchronised on provider change | Low | Still open | #82 |
| #21 | Restored favourites left out of manual sort order | Low | Still open | #21 |
| #22 | Backup restore writes selected nodes directly to storage | Low | Still open | #22 |
| #23 | Connectivity state keeps networks lost in background | Low | Still open | not reported again |
| #24 | Pending swap records polled every 30 s with no limit | Low | Still open | not reported again |
| #25 | Spam verdicts cached by transaction hash only | Low | Still open | not reported again |
| #26 | Swap status written by two parties without ownership check | Low | Still open | not reported again |
| #27 | Active account change skipped based on id alone | Low | Still open | not reported again |
| #28 | Spam-hiding condition copied into each reader | Low | Still open | #54 |
| #29 | Account record columns carry an unchecked invariant | Low | Still open | #27 |
| #30 | Spam rows can be stored without an address | Low | Still open | not reported again |
| #31 | Spam threshold duplicated as SQL literal | Low | Still open | not reported again |
| #32 | Unused preference accessors remain | Low | Still open | not reported again |
| #33 | Bookkeeping after broadcast can report send as failed | Low | Still open | not reported again |
| #34 | Contacts file overwritten in place | Low | Still open | #83 |
| #35 | Contacts map shared across threads | Low | Still open | #84 |
| #36 | QR images decoded at full resolution | Low | Still open | #32 |
| #37 | Import files read without size cap on main thread | Low | Still open | #35 |
| #38 | Swap provider file mixes API, mapping, per-chain building | Low | Still open | #44 |
| #39 | Transaction view-item factory holds every chain's converter | Low | Still open | #43 |
| #40 | View model takes a platform Uri | Low | Still open | not reported again |
| #41 | Send view model does not enforce a single send itself | Low | Still open | not reported again |
| #42 | Cross-chain pay and private send duplicate send sequence | Low | Still open | not reported again |
| #43 | QR-scan and paste actions copy-pasted | Low | Still open | not reported again |
| #44 | Fee and spam thresholds compiled in | Low | Still open | #40, #41 |
| #45 | User-visible text only changeable by a release | Info | Still open | not reported again |
| #46 | Auto-enable copied per chain, only TON filters scam tokens | Low | Still open | not reported again |
| #47 | Reproducible-build check script no longer matches build | Low | Still open | not reported again |
| #48 | Release workflows do not run tests or lint | Low | Still open | not reported again |
| #49 | EVM helper in EVM module forces chain-to-chain dependency | Low | Still open | #55 |
| #50 | Implicit return@let in nested lambdas | Low | Still open | not reported again |
| #51 | Leftover debug logs at error level | Low | Still open | #56 |
| #52 | Failed exchange-rate fetches retried and logged on every UI call | Low | Still open | not reported again |
| #53 | Chain parity test checks hand-copied registration | Low | Still open | not reported again |
| #54 | Release APKs published without checksum files | Low | Still open | #60 |
| #55 | Build script overwrites existing APK silently | Low | Still open | not reported again |
| #56 | Third-party API keys and tokens committed | Low | Still open | #62 |
| #57 | Auto-lock bypass by setting clock back | Low | Still open | not reported again |
| #58 | Backup scrypt cost unbounded | Low | Still open | #31 |
| #59 | Server-built EVM, Stellar, TON swap transactions signed unchecked | Medium | Still open | #67 |
| #60 | Subscriptions wiped before refresh; failed purchase launch hangs | Low | Still open | #38, #68 |
| #61 | Malformed WC Stellar XDR crashes wallet | Low | Still open | #33 |
| #62 | TonConnect confirm can crash, approves unsent tx | Medium | Still open | #71 |
| #63 | Custom Monero nodes always added as trusted | Low | Still open | not reported again |
| #64 | Zano custom nodes accept plain http | Low | Still open | #73 |
| #65 | Zano alias resolution trusts selected node | Low | Still open | not reported again |
| #66 | personal_sign signs different bytes than sent | Low | Still open | #70 |
| #67 | Accounts that fail to decode silently disappear | Low | Still open | #64 |
| #68 | Wallet reload deletes then re-adds in separate writes | Low | Still open | #80 |
| #69 | Loading contacts drops unknown addresses | Low | Still open | #23 |
[Update 20 November 2026: the states in this table are as checked on 11 October 2026 at the audited commit. For the state on develop at 818930a2, see the update above and the line under each finding.]
Each finding keeps the number it has in the audit report. The rating shown first is the one after review; the first automated rating is listed with it. 44 findings were first rated Medium or High; 5 of them are Medium or High after review. Text marked "From the report" is quoted from the audit report; fixes are suggestions and were not tested. Code locations link to the file and line at the audited commit.
Medium after review (5)
walletkit/src/main/java/io/horizontalsystems/walletkit/core/storage/DatabaseConverters.kt:38From the report
SecretString(App.encryptionManager.decrypt(value))
} catch (e: Exception) {
null
PinDbStorage.isLastLevelPinSet returns passcode != null. The keystore key requires user authentication and can throw, and any such decryption error makes the app believe no PIN is set. AppLockManager reads this once at construction, so the app can start unlocked.
Treat a PIN that cannot be decrypted as "set and locked", or store a separate non-secret "PIN enabled" flag.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
to = signable.to ?: throw IllegalStateException("No tx `to`"),
value = BigInteger((signable.value ?: "0x0").stripHexPrefix(), 16),
input = (signable.data ?: "0x").hexStringToByteArray()
The 1inch response is used the same way in OneInchProvider.kt:165.
A compromised or mis-served API response could get an arbitrary contract call or deposit address signed. Only the THORChain memo destination is checked today.
Before signing, check the target against the router or allowlist, the value against the input amount, and the deposit address against the quote.
On develop at 818930a2 (20 Nov 2026): Partly fixed. A new check compares the target and call data with the route for THORChain deposit routes only; other server-built swap transactions are still signed without a local check. The 1inch provider the finding also cited was removed. Now at walletkit/src/main/java/io/horizontalsystems/walletkit/modules/multiswap/providers/USwapProvider.kt:1010.
From the report
viewModelScope.launch(Dispatchers.Default) {
val boc = transactionSigner.sign(sendRequestEntity, tonWallet)
tonKitWrapper?.tonKit?.send(boc)
The screen shows "Done" as soon as confirm() returns. A network error during the send is uncaught in the coroutine and crashes the app. Closing the screen can cancel a send the user was told succeeded.
Await signing, sending and approval inside error handling, in a scope that outlives the screen. Report success only after the broadcast succeeds, and reject the request to the dApp on failure.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
LocalDensity provides Density(currentDensity.density, fontScale = 1f),
Users who need large text cannot get it on amount and address screens.
Keep the system font scale. Cap it at a documented maximum if some layouts break.
On develop at 818930a2 (20 Nov 2026): Still present. The code moved to the designkit module. Now at designkit/src/main/java/io/horizontalsystems/designkit/theme/Theme.kt:104.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/PaidActionSettingsManager.kt:48From the report
private val IPaidAction.key: String
get() = this::class.simpleName ?: toString()
Release builds are minified, and no keep rule covers the subscriptions classes. The stored keys never match the literal defaults ("ScamProtection", "SwapProtection"), so the protection toggles misreport or reset.
Give each paid action an explicit, stable string key.
On develop at 818930a2 (20 Nov 2026): Still present.
Low after review (83)
From the report
TOKEN_PROGRAM, TOKEN_2022_PROGRAM ->
when (val discriminator = data.firstOrNull()?.toInt()?.and(0xFF)) {
3 -> if (data.size >= 9) { transfers.add(Transfer(false, u64LE(1), null, payer = accountAt(2), destination = accountAt(1)))
The summary of a dApp-built Solana transaction decodes token transfers by instruction shape only. The mint is never read: for TransferChecked it is account 1, and for Transfer it must be resolved from the source account. Plain Transfer amounts are shown in raw base units. A worthless token and a valuable one look the same, so the user cannot tell what they are approving.
Resolve the mint and show its symbol or address with a decimal-adjusted amount. If the mint cannot be resolved, label the amount as "unknown token, raw units" and add a warning. Treat Token-2022 mints that have transfer-fee or transfer-hook extensions as unknown instructions.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
HudHelper.showErrorMessage(view, t.javaClass.simpleName)
// WCSignEthereumTransactionRequestViewModel.kt:99-100
val gasData = gasData ?: throw WCSessionManager.RequestDataError.InvalidGasPrice
val nonce = nonce ?: throw WCSessionManager.RequestDataError.InvalidNonce
dApps often leave gas and nonce to the wallet. These requests fail, the user sees an internal class name such as "InvalidGasPrice", and the dApp's request is left pending.
Fill in a missing gas price, gas limit and nonce from the node, as the eth_sendTransaction path already does. Map the remaining errors to localized messages, and reject the request after an error.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/multiswap/SwapConfirmPage.kt:275From the report
else -> t.message ?: t.javaClass.simpleName
The same pattern appears in SendV2Screen.kt:346, BackupLocalPasswordViewModel.kt:187, RestoreLocalPage.kt:197, CautionViewItem.kt:18, WcRequestScreen.kt:68, WCSessionViewModel.kt:385 and 539, TonConnectSendRequestScreen.kt:110 and 135, and TonConnectNewViewModel.kt:77 and 107.
Users get untranslated technical text they cannot act on.
Map known failure types to localized strings. Use one generic localized fallback for everything else, and log the details.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
Toast.makeText(App.instance, "Issue with Keystore", Toast.LENGTH_SHORT).show()
The message is not translated and does not tell the user what to do.
Use a string resource that explains the next step, for example re-setting the screen lock or restarting the app.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/EncryptDecryptManager.kt:65From the report
System.arraycopy(derivedKey, 16, result, 0, 16)
System.arraycopy(cipherText, 0, result, 16, cipherText.size)
return keccak256(result)
The AES-CTR key is the full 32-byte derived key, and its second half is reused as the MAC key. The scheme is assembled by hand rather than taken from a standard authenticated mode. A single Cipher instance is also shared across calls.
Use AES-GCM or ChaCha20-Poly1305 for new backup versions. If the current layout must stay for compatibility, use derivedKey[0..16] as the AES key, and create a new Cipher for each call.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
val amount = assetAmount.toBigDecimalOrNull() ?: BigDecimal.ZERO
A malformed merchant quote produces a zero-value payment that the user can still pay gas for.
Treat an invalid amount as an error and keep the pay button disabled.
On develop at 818930a2 (20 Nov 2026): Still present.
app/build.gradle.kts:63From the report
storeFile = file("./test.keystore")
storePassword = "test…"
signingConfig = signingConfigs.getByName("test")
The ci and fdroidCi variants, which are distributed to testers, are signed with a key anyone can use. A lookalike APK can therefore carry the same signature.
Keep that key out of every distributed variant. Use per-developer debug keys, and verify the signing certificate of release artifacts.
On develop at 818930a2 (20 Nov 2026): Still present.
gradle.properties:15From the report
android.nonTransitiveRClass=false
With more than 20 modules and flavors, a duplicate resource name silently overrides another one.
Enable non-transitive R classes and give each module a resource prefix.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
setContent {
ComposeAppTheme {
Nav3(EntryPage)
We searched the whole source tree for filterTouchesWhenObscured, FLAG_WINDOW_IS_OBSCURED and setHideOverlayWindows and found none of them. Another app's overlay can cover the send-confirm, PIN keypad or WalletConnect approve buttons, and the user's taps still reach those buttons (tapjacking).
Enable obscured-touch filtering on the confirm, unlock and approval screens. On API 31 and later, also call Window.setHideOverlayWindows(true) on those screens.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
if (scrollToTop) {
coroutineScope.launch {
listState.scrollToItem(0)
The same pattern appears in CoinListComponents.kt:256, CoinListOrderable.kt:149, EarnScreen.kt:252 and CoinMarketsScreen.kt:169.
The coroutine is a side effect inside a builder that Compose may run again. The scroll also happens after the new filter or sort state has already been applied.
Scroll from a LaunchedEffect keyed on the filter or sort change, and scroll before applying the state.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
CoinMarketList(uiState.items, scrollToTopAfterUpdate)
if (scrollToTopAfterUpdate) {
scrollToTopAfterUpdate = false
The same pattern appears in EarnScreen.kt:167, MarketFavoritesScreen.kt:185, MarketFiltersResultsPage.kt:156, MarketPlatformPage.kt:198 and MarketSectorPage.kt:166.
Consume the flag in a LaunchedEffect that scrolls first and then clears the flag.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/coin/overview/ui/Chart.kt:689From the report
.pointerInput(Unit) {
detectDragGestures(
onDrag = { change: PointerInputChange, _: Offset -> selectedX = change.position.x },
A tap detector and a drag detector both write selectedX, and nothing clears it when a drag is cancelled. The cursor can stay stuck on screen. EtfPage.kt:458-469 repeats the pattern.
Use one pointerInput with awaitEachGesture that sets the cursor on down and move, and clears it on up or cancel.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
import androidx.compose.material.Icon
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.rememberModalBottomSheetState
23 files mix the two libraries, but the theme sets up only the old MaterialTheme. Material3 parts therefore miss the app's colors, ripple and shapes.
Pick one library for each screen and provide a matching theme.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/coin/analytics/ui/Components.kt:237From the report
OverallScore.Excellent -> Color(0xFF05C46B)
OverallScore.Good -> Color(0xFFFFA800)
OverallScore.Fair -> Color(0xFFFF7A00)
The same map is repeated in OverallScoreInfoPage.kt:76-81.
Define these colors once as theme tokens.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
<item name="colorControlHighlight">#6E7899</item>
The same literal is in values-night/themes.xml:14.
Reference a named color resource from both themes.
On develop at 818930a2 (20 Nov 2026): Still present.
components/chartview/src/main/java/io/horizontalsystems/chartview/models/ChartConfig.kt:33From the report
var trendUpGradient = GradientColor(Color.parseColor("#416BFF"), Color.parseColor("#13D670"))
var trendDownGradient = GradientColor(Color.parseColor("#7413D6"), Color.parseColor("#FF0303"))
The same literals appear again in ChartHelper.kt:34 and 101-111.
Derive each gradient from the trend color token in one place.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/LocalStorageManager.kt:58From the report
private val SYNC_MODE = "sync_mode"
preferences.getString("zcashUnshieldedBalanceAlerts", null)
Put every key in one constants block with a feature prefix, and stop using inline key literals.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/LocalStorageManager.kt:760From the report
override fun migrateEnabledPaidActionsFromDisabled() {
if (!preferences.contains("disabled_paid_actions")) return
if (preferences.contains(ENABLED_PAID_ACTIONS)) return
Store a schema version for the preferences file and run numbered migrations at startup.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/market/tvl/TvlViewItemFactory.kt:10 (line corrected on review; the report cites :25)From the report
if (!cache.containsKey(item.hashCode())) {
Two distinct items with the same hash code would show each other's cached data. The check-then-get on a plain map is also not thread-safe.
Key the cache by item identity and use a single getOrPut, or remove the cache.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
val scope = MainScope()
scope.launch {
glanceId?.let {
Every tap starts a new scope, so repeated taps run the update and finish() twice.
Use lifecycleScope, ignore taps while an update is running, and set RESULT_CANCELED as the default result.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/MarketFavoritesManager.kt:35From the report
fun addAll(coinUids: List<String>) {
dao.insertAll(coinUids.map { FavoriteCoin(it) })
add() updates both the database and the manual order. addAll(), which backup restore uses, updates only the database. Restored coins are missing from the order and sort to the top.
Route both methods through one write function that updates both stores.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
blockchainSettingsStorage.save(syncSource.url, blockchainType)
Restore writes straight to storage, so the managers' change events never fire. Running chain kits keep using the old node until the app restarts.
Restore through the sync-source and node managers' save methods.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/contacts/ContactsRepository.kt:191From the report
addresses = contactJson.addresses.mapNotNull { addressJson ->
marketKit.blockchain(addressJson.blockchain_uid)?.let { ContactAddress(it, addressJson.address) }
Addresses whose blockchain is unknown at load time are dropped. The next save overwrites the file with the reduced set. A file that cannot be read also leaves an empty list, which the next save writes out.
Keep unresolved addresses in the model, refuse to write after a lossy or failed load, and move a corrupt file aside instead of overwriting it.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit-chain-ton/src/main/java/io/horizontalsystems/walletkit/core/managers/TonKitManager.kt:142From the report
private suspend fun start() {
tonKitWrapper?.tonKit?.start()
job = scope.launch {
The same race exists in StellarKitManager.kt:101 and XrpKitManager.kt:108.
stop() cancels job before start() has assigned it. When the user switches accounts quickly, foreground-refresh collectors are orphaned and pile up.
Start the kit and register the collector synchronously under the manager's lock, as SolanaKitManager and TronKitManager do.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/pin/core/OneTimeTimer.kt:15From the report
if (timer == null) {
timer = Timer()
}
Add cancel() and call it from the view models' onCleared(), or use a coroutine delay instead.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
var authToken: String? = ""
// MarketKitWrapper.kt:51
userSubscriptionManager.authToken = null
Nothing ever assigns a real token. After one 401 or 403 response, every token-gated market call throws until the process restarts. ILocalStorage.authToken is a second, unused copy.
Give the token one owner with a single setter, and remove the duplicate.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
PRIVATE_KEY -> AccountType.EvmPrivateKey(record.key!!.value.toBigInteger())
The code asserts the invariant with !! inside a catch-all. A row that breaks it disappears without any log.
Add a consistency check after writes and migrations, and log rows that fail it.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/LocalStorageManager.kt:316From the report
preferences.edit().clear().apply()
Reset every in-memory state flow to its default after clearing.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/EncryptDecryptManager.kt:47From the report
SCrypt.generate(passwordByteArray, salt, n, r, p, dkLen)
// n, r, p, dkLen come from the imported file's kdfparams
A crafted backup file can request huge scrypt costs. The resulting OutOfMemoryError is not an Exception, so the surrounding catch does not stop it and the app crashes.
Reject any n, r, p or dklen outside the values the app itself writes before deriving the key. Catch OutOfMemoryError around restore.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/qrscanner/QRScannerActivity.kt:164From the report
val bitmap = context.contentResolver.openInputStream(uri)
?.use { BitmapFactory.decodeStream(it) } ?: return null
val intArray = IntArray(bitmap.width * bitmap.height)
A large photo allocates a full bitmap plus an equally large pixel array on the UI thread. This can freeze the app or crash it with an OutOfMemoryError that is not caught.
Read the bounds first, downsample to a fixed pixel budget, decode off the main thread, and catch OutOfMemoryError.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
override fun createState(): WCActionState {
val transaction = stellarKit.getTransaction(xdr)
The same parse is in WCActionStellarSignAndSubmitXdr.kt:68.
WCRequestViewModel reads the action's state while the view model is being created, outside any try/catch. A malformed XDR from a connected dApp therefore crashes the app. Neither the params nor the XDR is size-limited, unlike the Solana handler.
Cap the length of both inputs, parse once in the constructor inside the guarded path, and turn a failure into the error screen plus a reject to the dApp.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
val params = JsonParser.parseString(paramsJson).asJsonArray
Reject params over a fixed byte limit before parsing.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
val jsonString = br.readText()
//validate json format
BackupFileValidator().validate(jsonString)
The same pattern is in ImportWalletPage.kt:99 and ContactsScreen.kt:95.
Stop reading at a sane maximum size, parse on the IO dispatcher, and pass a reference instead of the whole string through navigation.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
private val cache = mutableMapOf<String, Map<Long, TransactionViewItem>>()
...
cache.forEach { (recordUid, map) ->
cache[recordUid] = mapOf(
updateCache() iterates and writes this map from one coroutine while convertToViewItemCached() inserts into it from the refresh job (TransactionsViewModel.kt:133-153, both on Dispatchers.Default). refreshViewItemsJob?.cancel() does not wait for the old job to finish. A ConcurrentModificationException in viewModelScope crashes the app.
Make the cache thread-safe or confine it to one dispatcher. Serialize refreshes with a Mutex or by joining the old job.
On develop at 818930a2 (20 Nov 2026): Fixed. The cache refresh and the cached lookup now share one lock. Now at walletkit/src/main/java/io/horizontalsystems/walletkit/modules/transactions/TransactionViewItemFactory.kt:74.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/multiswap/SwapQuoteService.kt:156From the report
quotingJob?.cancel()
quoting = false
quotes = listOf()
Plain fields are written from the main thread and from a background collector. The tail of a cancelled job can still assign quotes after a new quotation has reset them.
Guard the quote state with a Mutex or a single confined dispatcher. Tag each run with a generation number and drop results from older runs.
On develop at 818930a2 (20 Nov 2026): Fixed. Each quotation now carries a generation number, and the results of a superseded quotation are dropped under a lock. Now at walletkit/src/main/java/io/horizontalsystems/walletkit/modules/multiswap/SwapQuoteService.kt:278.
From the report
val billingResult = billingClient.launchBillingFlow(activity, billingFlowParams)
return suspendCancellableCoroutine { inProgressPurchaseResult = it
When the launch fails, no purchase callback ever arrives, so the caller waits forever. A second purchase replaces the pending continuation of the first.
Check billingResult.responseCode and fail fast when it is not OK. Reuse an in-flight purchase instead of replacing it, and clear the field in a finally block.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
override val swapFeeBps: Int = BuildConfig.SWAP_FEE_BPS
Serve the fee rate and the fee recipients from versioned remote configuration.
On develop at 818930a2 (20 Nov 2026): Cited code removed. The fee constant and the swap providers that read it are no longer in the app's code.
From the report
override val spamCoinValueLimits: Map<String, BigDecimal> = mapOf("XLM" to BigDecimal("0.1"), ...
Serve the per-coin limits from remote configuration, so a new spam wave can be handled without a release.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
return App.instance.localizedContext().getString(id)
// WCStellarHelper.kt:54: ViewItem.Input("Transaction XDR", xdr)
Move literal labels into strings.xml so they can be translated.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
class TransactionViewItemFactory(
Move the cache into its own class, and split the record-type builders into separate classes.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
class USwapProvider(
Move the API interface and its DTOs, the private-send flow and the per-chain transaction builders into separate files.
On develop at 818930a2 (20 Nov 2026): Partly fixed. The swap API interface and its response types moved to their own file; the provider file still holds quoting, the send flow and transaction building. Now at walletkit/src/main/java/io/horizontalsystems/walletkit/modules/multiswap/providers/UnstoppableAPI.kt:20.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/LocalStorageManager.kt:43From the report
class LocalStorageManager(...) : ILocalStorage, IPinSettingsStorage, ILockoutStorage, IThirdKeyboard, IMarketStorage
Split it into per-concern storage classes, each with its own key namespace.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
return App.numberFormatter.formatCoinFull(value, coin.code, 8)
Keep entities as plain data and do the formatting in the presentation layer.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
interface ChainPlugin {
Split it into a domain and data plugin and a separate UI plugin.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
import io.horizontalsystems.walletkit.modules.multiswap.AmountInput
import io.horizontalsystems.walletkit.modules.multiswap.FiatAmountInput
Move these composables into the shared components package.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
val parts = pair.split("="); if (parts.size == 2) { parameters[parts[0]] = parts[1] }
MoneroUriParser.kt:84 splits with a limit and URL-decodes the values; this parser does neither. Payment URIs with encoded values are handled differently depending on the chain.
Use one shared, tested parser in both places.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
backgroundManager.stateFlow.collect { state -> when (state) { ... kit.resume(); delay(1000); kit.refresh()
XrpKitManager and ThorchainKitManager wrap this handler in try/catch, with a comment that a throw would cancel the shared scope for good. The Solana, Tron, EVM, Stellar and TON managers have no such guard.
Apply one guarded collector to every kit manager.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit-chain-evm/src/main/java/io/horizontalsystems/walletkit/core/adapters/EvmAdapter.kt:49From the report
private fun convertToAdapterState(syncState: EthereumKit.SyncState): AdapterState = when (syncState) {
Use one extension function per kit module, as the other chain modules already do.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
private fun refreshWithMinLoadingSpinnerPeriod() {
Move it into one shared helper.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit/build.gradle.kts:209From the report
tasks.withType<Test>().configureEach {
systemProperty("updateParityFixture", providers.gradleProperty("updateParityFixture").getOrElse("false"))
This block is copied into 10 build files. The dependency-substitution table is also duplicated between the app and walletkit build files, so the copies will drift.
Move both into a convention plugin or a root-level configuration block.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/transactions/TransactionsService.kt:198 (line corrected on review; the report cites :191)From the report
if (record.spam && spamManager.hideSuspiciousTx) return@forEach
The same loop is in TokenTransactionsService.kt:206-224.
Extract one function that both services call.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit-chain-thorchain/build.gradle.kts:32 (line corrected on review; the report cites :33)From the report
api(project(":walletkit"))
api(project(":walletkit-chain-evm"))
Move the one helper the THORChain module needs into the core library, and drop this dependency.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
Log.e("AAA", "billingClient.isReady: ${billingClient.isReady}")
More leftovers are in AdapterFactory.kt:33, ResultEventBus.kt:67 and EvmKitManager.kt:215.
Remove them, or log them at debug level only.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
Log.e("ZcashAdapter", "Processor error resolved")
Log routine events at info or warning level.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/App.kt:496 (line corrected on review; the report cites :497)From the report
if (BuildConfig.DEBUG) { Timber.plant(Timber.DebugTree()) }
Timber is planted only in debug builds, so its errors disappear in release while Log.e calls remain. The lint check that would flag the mix is disabled in app/build.gradle.kts:211.
Use one logging facade and plant a release tree.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
} catch (exception: Exception) {
exception.printStackTrace()
}
The same pattern appears in NftMetadataSyncer.kt:64-66, MoneroNodeManager.kt:69, BalanceAdapterRepository.kt:149 and Migration_66_67.kt:16.
Log these errors through the project logger with a stable message.
On develop at 818930a2 (20 Nov 2026): Partly fixed. Six of the eleven printStackTrace calls are gone, most with the code around them; five remain.
From the report
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
Add distributionSha256Sum, and have the release script and the release workflow publish SHA-256 checksums of every APK.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
app/build.gradle.kts:102From the report
applicationIdSuffix = ".appcenter"
CI builds now go to Firebase, but the package suffix, build counters, launcher icons, the App Links file and test docs still name the old service.
Rename all of them in one step, then confirm on a fresh install that nothing still calls the old service.
On develop at 818930a2 (20 Nov 2026): Still present.
app/build.gradle.kts:154From the report
buildConfigFieldString("TWITTER_BEARER_TOKEN", "AAAA…")
buildConfigFieldString("CHAINALYSIS_API_KEY", "928b…")
buildConfigFieldString("HASH_DIT_API_KEY", "aGMk…")
The file also commits explorer, swap, market, 1inch, Alchemy and TronGrid keys, a THORChain key ("THOR…" at line 47) and USwap keys ("a32d…" and "6e92…" at lines 72-73). They are readable from the public repository and from every APK, so anyone can use the quotas.
Inject the keys from CI secrets or untracked local files. Proxy paid or rate-limited APIs through your backend, and rotate every committed key.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
MNEMONIC -> AccountType.Mnemonic(record.words!!.list, record.passphrase?.value ?: "")
When the passphrase fails to decrypt, the wallet is derived without it and shows different, empty addresses. When the words fail to decrypt, the account is silently dropped from the list.
Distinguish "no passphrase" from "failed to decrypt", and surface a locked or error state instead.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
} catch (ex: UnrecoverableKeyException) {
//couldn't get key due to exception
}
return createGcmKey()
A transient load failure replaces the key under the same alias. The next validation then fails with a bad tag, which routes to the invalid-key flow that resets the app and wipes the encrypted wallet data.
Create a key only when the alias does not exist, and pass load errors to the explicit recovery flow.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
evmSyncSourceManager.saveSyncSource(blockchainType, syncSource.url, auth)
The add-RPC screen requires https, wss or onion. The restore path saves whatever URL the file contains, and the settings section is not covered by the backup's MAC. A tampered backup can point the wallet at a hostile node.
Apply the same URL validation on restore, and authenticate the settings section of the backup.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
activeSubscriptions.clear()
if (!billingClient.isReady) {
Paid protections read as off on every resume or billing disconnect. The UI thread iterates the list while a background coroutine mutates it, which can throw ConcurrentModificationException.
Build a new list and swap it in atomically. Keep the last known state until a successful query replaces it.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit-chain-evm/src/main/java/io/horizontalsystems/walletkit/modules/walletconnect/request/WCRequestEvmViewModel.kt:112 (line corrected on review; the report cites :113)From the report
val sessionRequest = sessionRequestUi as? SessionRequestUI.Content
if (sessionRequest != null) {
There is no else branch, so the continuation is never resumed and the confirm button stays in progress.
Resume with an error when there is no request, and use suspendCancellableCoroutine.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
String(message.hexStringToByteArray())
// WCRequestEvmViewModel.kt:116: signer.signByteArray(message = sessionRequest.param.toByteArray())
Payloads that are not valid UTF-8, such as a 32-byte hash, are altered before signing. The dApp gets a signature over different bytes, and the user sees something other than what is signed.
Sign the original bytes. Use text only for display, falling back to hex.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
TextHelper.copyText(keys.getKey(keyType))
This is the private-key branch. It skips the sensitive flag and expiry that copySecret adds, so the spend key appears in clipboard previews and history.
Use TextHelper.copySecret for private keys.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
val hasRequiredProtocol = scheme == "https" || scheme == "http"
The Monero and Zcash screens require https or onion. Zano syncs over native sockets, which bypass the platform's cleartext policy, so a network attacker can read wallet activity and falsify balances.
Require https, and allow http only for onion hosts.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit-chain-zcash/src/main/java/io/horizontalsystems/walletkit/chain/zcash/ZnsResolver.kt:212From the report
val lowestNonce = if (usesNonce) maxOf(0L, registration.nonce - NONCE_SEARCH_DEPTH) else registration.nonce
for (nonce in registration.nonce downTo lowestNonce) {
The signature proves the registrar once signed a name-to-address binding, not that the binding is current. A hostile indexer can serve an older address.
Add a freshness check against an independent source, and show the resolved address for confirmation.
On develop at 818930a2 (20 Nov 2026): Cited code removed. The name resolver was rewritten without the cited signature and replay check; it now trusts the resolver service's answer without verifying records, so the concern remains in another form. Now at walletkit-chain-zcash/src/main/java/io/horizontalsystems/walletkit/chain/zcash/ZnsResolver.kt:23.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/keystore/KeyStoreActivity.kt:153 (line corrected on review; the report cites :154)From the report
if (viewModel.showBiometricPrompt) {
showBiometricPrompt.invoke()
}
Every recomposition calls authenticate again. Lines 143-146 also start an activity during composition.
Run these side effects from a LaunchedEffect keyed on the state, or from a one-shot event.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
override fun import(accounts: List<Account>) {
...
_accountsFlow.tryEmit(accounts)
The parameter shadows the manager's accounts property. After a restore, subscribers receive only the imported accounts instead of the full set.
Emit the full cache, and rename the parameter.
On develop at 818930a2 (20 Nov 2026): Still present.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/storage/migrations/Migration_56_57.kt:12From the report
App.pinSettingsStorage.pin?.let {
db.execSQL("INSERT INTO `Pin` VALUES(0, ?)", arrayOf(it))
The migration copies the PIN out of the plaintext lock_pin preference but never deletes that preference.
Remove the legacy value in the same migration.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/LocalStorageManager.kt:362From the report
preferences.edit().putInt(FAILED_ATTEMPTS, it).apply()
If the process is killed right after a wrong PIN, the increment can be lost, which weakens the attempt limit. The lockout timestamp at line 376 is written the same way.
Use commit() for the attempt counter and the lockout timestamp.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
delete(walletsToReAdd)
save(walletsToReAdd)
A process kill between the two steps loses the user's enabled tokens for that chain.
Re-emit the wallets without touching storage, or rewrite them in one transaction.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
walletManager.saveEnabledWallets(enabledWallets)
The restore settings, such as the birthday height, are saved afterwards with a reload. The adapter starts without them and is then rebuilt, which can leave it stuck syncing.
Save the restore settings without a reload before enabling the wallet.
On develop at 818930a2 (20 Nov 2026): Still present.
From the report
private fun handleUpdateNetwork() {
stop()
_kitStoppedFlow.tryEmit(Unit)
The same issue is in XrpKitManager.kt:108.
The getter checks for null and then dereferences with !! under a lock that this handler does not take. A network change can therefore cause a crash or hand out a kit that is being torn down.
Mark the handler @Synchronized, as the EVM, Solana and Tron managers do.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/contacts/ContactsRepository.kt:200From the report
FileOutputStream(file).use { fos ->
fos.bufferedWriter().use { bw ->
bw.write(asJsonString)
A crash or a full disk during the write destroys the whole address book.
Write to a temporary file, sync it, then rename it atomically (for example with AtomicFile). Surface write failures to the user.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/contacts/ContactsRepository.kt:31From the report
private var contactsMap: MutableMap<String, Contact> = mutableMapOf()
save, delete and restore mutate the map on the caller's thread while the background writer iterates it. This can throw, or a late file read can overwrite fresh edits.
Confine the map to one dispatcher, and publish immutable snapshots to readers.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
val result = withContext(Dispatchers.IO) { sendTransactionService.sendTransaction() }
val txHash = extractTxHash(result)
?: throw Exception("Could not get transaction hash")
If no hash can be extracted, or the record insert fails, the funds have already left the wallet but the user is told the payment failed and may pay twice. The merchant proof is never sent.
Save a pending record before broadcasting, and never report failure after a successful send.
On develop at 818930a2 (20 Nov 2026): Still present.
.github/workflows/build_apk.yml:30From the report
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore.jks
Every build script and Gradle plugin that runs afterwards (line 36 onward) can read the release signing key.
Decode the key only in the signing step after the build, and delete it right after. publish_play.yml already uses this order.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
.github/workflows/build_apk.yml:20From the report
image: hsdao/android-release-build:java-17-update
The same image is used in publish_play.yml:15 and docker/build-apk.sh:24.
Whoever controls the tag can change the toolchain that builds and signs the wallet.
Pin the image by digest, or build it from a pinned Dockerfile.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
.github/workflows/deploy_dev.yml:83From the report
uses: wzieba/Firebase-Distribution-Github-Action@v1
The same action is used in deploy_dev.yml:98 and deploy_release.yml:81, and it receives the Firebase service-account key. maestro_tests.yml:35 also pipes a remote install script into bash.
Pin actions to a full commit SHA, and download tools from pinned releases with a checksum check.
On develop at 818930a2 (20 Nov 2026): Still present.
docker/build-apk.sh:36From the report
BUILT_APK_FILE="app/build/outputs/apk/base/release/app-base-release.apk"
The base release has no signing config, so the build produces app-base-release-unsigned.apk, the name the CI workflow uses. The script has no fail-fast setting and still prints "Successfully created apk".
Fix the path, add set -euo pipefail, run apksigner verify, and quote $KEYSTORE.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
bw.write(backupJson)
bw.flush()
HudHelper.showSuccessMessage(
viewModel.backupFinished(), which marks the account as backed up, also runs inside the open stream. If closing fails on a cloud provider, the wallet is marked backed up without a usable file.
Close the stream first, then show success and mark the backup done.
On develop at 818930a2 (20 Nov 2026): Still present.
Info after review (2)
walletkit/src/main/java/io/horizontalsystems/walletkit/core/managers/StalledSyncWatcher.kt:37From the report
while (isActive) {
delay(CHECK_INTERVAL)
check()
Drive the check from sync-state changes, or run the loop only while a wallet is not synced.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
From the report
override fun isActionAllowed(paidAction: IPaidAction) = activeSubscriptions.any {
Verify purchase tokens on a backend for any server-provided paid feature, or document that client-side gating is intentional.
On develop at 818930a2 (20 Nov 2026): Cited code unchanged.
Excluded on review (1)
Findings the review showed to be wrong or a repeat of another finding. They are not counted above.
- 29. Transaction view-item cache key misses inputs the item depends on (wrong): Shown wrong on review.