File tree Expand file tree Collapse file tree 3 files changed +1
-17
lines changed
app/src/main/java/to/bitkit Expand file tree Collapse file tree 3 files changed +1
-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 @@ -108,6 +108,7 @@ class LightningService @Inject constructor(
108108 trustedPeersNoReserve = trustedPeerNodeIds,
109109 perChannelReserveSats = 1u ,
110110 ),
111+ includeUntrustedPendingInSpendable = true ,
111112 )
112113 }
113114
Original file line number Diff line number Diff line change @@ -382,20 +382,8 @@ class AppViewModel @Inject constructor(
382382
383383 private suspend fun notifyPaymentReceived (event : Event ) {
384384 val command = NotifyPaymentReceived .Command .from(event) ? : return
385- if (command is NotifyPaymentReceived .Command .Lightning ) {
386- val cachedId = cacheStore.data.first().lastLightningPaymentId
387- // Skip if this is a replay by ldk-node on startup
388- if (command.event.paymentHash == cachedId) {
389- Logger .debug(" Skipping notification for replayed event: $event " , context = TAG )
390- return
391- }
392- // Cache to skip later as needed
393- cacheStore.setLastLightningPayment(command.event.paymentHash)
394- }
395-
396385 val result = notifyPaymentReceivedHandler(command).getOrNull()
397386 if (result !is NotifyPaymentReceived .Result .ShowSheet ) return
398-
399387 showTransactionSheet(result.sheet)
400388 }
401389
You can’t perform that action at this time.
0 commit comments