Skip to content

Commit 4982d50

Browse files
committed
refactor: replace coreService.blocktank.open() with blocktankRepo.openChannel()
1 parent 7b1019c commit 4982d50

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/src/main/java/to/bitkit/fcm/WakeNodeWorker.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,9 @@ class WakeNodeWorker @AssistedInject constructor(
8787
if (orderId == null) {
8888
Logger.error("Missing orderId", context = TAG)
8989
} else {
90-
try {
91-
Logger.info("Open channel request for order $orderId", context = TAG)
92-
coreService.blocktank.open(orderId = orderId)
93-
} catch (e: Exception) {
94-
Logger.error("failed to open channel", e, context = TAG)
90+
Logger.info("Open channel request for order $orderId", context = TAG)
91+
blocktankRepo.openChannel(orderId).onFailure { e ->
92+
Logger.error("Failed to open channel", e, context = TAG)
9593
bestAttemptContent = NotificationDetails(
9694
title = appContext.getString(R.string.notification_channel_open_failed_title),
9795
body = e.message ?: appContext.getString(R.string.notification_unknown_error),

0 commit comments

Comments
 (0)