Skip to content

Commit 1cbf00f

Browse files
committed
chore: lint
1 parent abd1ffe commit 1cbf00f

File tree

3 files changed

+9
-28
lines changed

3 files changed

+9
-28
lines changed

app/src/main/java/to/bitkit/androidServices/LightningNodeService.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ class LightningNodeService : Service() {
103103
is Event.OnchainTransactionReceived -> {
104104
val sats = event.details.amountSats
105105
val shouldShow = activityRepo.shouldShowReceivedSheet(event.txid, sats.toULong())
106-
if (shouldShow) {
107-
showPaymentNotification(sats, event.txid, isOnchain = true)
106+
if (!shouldShow) {
107+
Logger.info("Skipping received sheet for tx: ${event.txid}", context = TAG)
108+
return
108109
}
110+
111+
showPaymentNotification(sats, event.txid, isOnchain = true)
109112
}
110113

111114
else -> Unit

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

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,7 @@ class WakeNodeWorker @AssistedInject constructor(
141141
}
142142
}
143143

144-
is Event.OnchainTransactionReceived -> {
145-
// TODO handle like onPaymentReceived but for onchain
146-
}
147-
148-
is Event.OnchainTransactionConfirmed -> Unit
149-
150-
is Event.PaymentSuccessful -> Unit
151-
is Event.PaymentClaimable -> Unit
152-
is Event.PaymentForwarded -> Unit
153-
154-
is Event.SyncProgress -> Unit
155-
is Event.SyncCompleted -> Unit
156-
is Event.BalanceChanged -> Unit
157-
158-
is Event.OnchainTransactionEvicted,
159-
is Event.OnchainTransactionReorged,
160-
is Event.OnchainTransactionReplaced,
161-
-> {
162-
// TODO handle activity removed from mempool UI & toast
163-
}
144+
else -> Unit
164145
}
165146
}
166147

app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,9 @@ class AppViewModel @Inject constructor(
320320
is Event.SyncCompleted -> Unit
321321
is Event.BalanceChanged -> Unit
322322

323-
is Event.OnchainTransactionEvicted,
324-
is Event.OnchainTransactionReorged,
325-
is Event.OnchainTransactionReplaced,
326-
-> {
327-
// TODO handle activity removed from mempool UI & toast
328-
}
323+
is Event.OnchainTransactionEvicted -> Unit
324+
is Event.OnchainTransactionReorged -> Unit
325+
is Event.OnchainTransactionReplaced -> Unit
329326
}
330327
}.onFailure { e ->
331328
Logger.error("LDK event handler error", e, context = TAG)

0 commit comments

Comments
 (0)