Skip to content

Commit 7b87d7b

Browse files
committed
refactor: simplify collection call chain
1 parent 89aea3a commit 7b87d7b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/src/main/java/to/bitkit/data/keychain/Keychain.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ class Keychain @Inject constructor(
148148
val walletIndex = runCatching {
149149
runBlocking { db.configDao().getAll().first() }.firstOrNull()?.walletIndex ?: 0L
150150
}.getOrDefault(-1L)
151-
val causeChain = generateSequence<Throwable>(cause) { it.cause }
151+
val causeChain = generateSequence(cause) { it.cause }
152152
.take(CAUSE_CHAIN_DEPTH)
153-
.map { it.javaClass.simpleName }
154-
.joinToString(separator = " <- ")
153+
.joinToString(separator = " <- ") { it.javaClass.simpleName }
155154

156155
Logger.warn(
157156
"Decrypt failed for key='$key' walletIndex='$walletIndex' " +

0 commit comments

Comments
 (0)