File tree Expand file tree Collapse file tree 2 files changed +0
-17
lines changed
app/src/main/java/to/bitkit Expand file tree Collapse file tree 2 files changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,6 @@ class CacheStore @Inject constructor(
9898 }
9999 }
100100
101- suspend fun setLastLightningPayment (paymentId : String ) {
102- store.updateData { it.copy(lastLightningPaymentId = paymentId) }
103- }
104-
105101 suspend fun setBackgroundReceive (details : NewTransactionSheetDetails ) = store.updateData {
106102 it.copy(backgroundReceive = details)
107103 }
@@ -130,7 +126,6 @@ data class AppCacheData(
130126 val balance : BalanceState ? = null ,
131127 val backupStatuses : Map <BackupCategory , BackupItemStatus > = mapOf(),
132128 val deletedActivities : List <String > = listOf(),
133- val lastLightningPaymentId : String? = null ,
134129 val pendingBoostActivities : List <PendingBoostActivity > = listOf(),
135130 val backgroundReceive : NewTransactionSheetDetails ? = null ,
136131) {
Original file line number Diff line number Diff line change @@ -373,20 +373,8 @@ class AppViewModel @Inject constructor(
373373
374374 private suspend fun notifyPaymentReceived (event : Event ) {
375375 val command = NotifyPaymentReceived .Command .from(event) ? : return
376- if (command is NotifyPaymentReceived .Command .Lightning ) {
377- val cachedId = cacheStore.data.first().lastLightningPaymentId
378- // Skip if this is a replay by ldk-node on startup
379- if (command.event.paymentHash == cachedId) {
380- Logger .debug(" Skipping notification for replayed event: $event " , context = TAG )
381- return
382- }
383- // Cache to skip later as needed
384- cacheStore.setLastLightningPayment(command.event.paymentHash)
385- }
386-
387376 val result = notifyPaymentReceivedHandler(command).getOrNull()
388377 if (result !is NotifyPaymentReceived .Result .ShowSheet ) return
389-
390378 showTransactionSheet(result.sheet)
391379 }
392380
You can’t perform that action at this time.
0 commit comments