Skip to content

Commit b4ae88d

Browse files
committed
chore: review #604
1 parent 7605e24 commit b4ae88d

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/src/main/java/to/bitkit/repositories/WalletRepo.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class WalletRepo @Inject constructor(
302302
}
303303
setWalletExistsState()
304304
}.onFailure {
305-
Logger.error("restoreWallet error", it)
305+
Logger.error("restoreWallet error", it, context = TAG)
306306
}
307307
}
308308

@@ -319,7 +319,6 @@ class WalletRepo @Inject constructor(
319319
_balanceState.update { BalanceState() }
320320
}
321321

322-
// Blockchain address management
323322
fun getOnchainAddress(): String = _walletState.value.onchainAddress
324323

325324
suspend fun setOnchainAddress(address: String) {
@@ -330,7 +329,7 @@ class WalletRepo @Inject constructor(
330329
suspend fun newAddress(): Result<String> = withContext(bgDispatcher) {
331330
lightningRepo.newAddress()
332331
.onSuccess { address -> setOnchainAddress(address) }
333-
.onFailure { error -> Logger.error("Error generating new address", error) }
332+
.onFailure { error -> Logger.error("Error generating new address", error, context = TAG) }
334333
}
335334

336335
suspend fun getAddresses(
@@ -369,7 +368,7 @@ class WalletRepo @Inject constructor(
369368

370369
return@runCatching addresses
371370
}.onFailure {
372-
Logger.error("Error getting addresses", it)
371+
Logger.error("Error getting addresses", it, context = TAG)
373372
}
374373
}
375374

app/src/main/java/to/bitkit/ui/screens/scanner/QrScanningScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ import java.util.concurrent.Executors
8383
const val SCAN_REQUEST_KEY = "SCAN_REQUEST"
8484
const val SCAN_RESULT_KEY = "SCAN_RESULT"
8585

86+
private const val TAG = "QrScanningScreen"
87+
8688
@OptIn(ExperimentalPermissionsApi::class)
8789
@Composable
8890
fun QrScanningScreen(
@@ -400,7 +402,7 @@ private fun processImageFromGallery(
400402
onError(e)
401403
}
402404
}.onFailure {
403-
Logger.error("Failed to process image from gallery", it)
405+
Logger.error("Failed to process image from gallery", it, context = TAG)
404406
onError(it)
405407
}
406408
}

app/src/main/java/to/bitkit/ui/screens/shop/shopWebView/ShopWebViewInterface.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ShopWebViewInterface(
5353
}
5454
}
5555
}.onFailure {
56-
Logger.error("Error parsing message: $message", it)
56+
Logger.error("Error parsing message: $message", it, context = "WebView")
5757
}
5858
}
5959

0 commit comments

Comments
 (0)