Skip to content

Commit f5231d4

Browse files
committed
fix: notification channel amount
1 parent d519a01 commit f5231d4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import kotlinx.serialization.json.contentOrNull
1515
import kotlinx.serialization.json.jsonObject
1616
import org.lightningdevkit.ldknode.Event
1717
import to.bitkit.di.json
18+
import to.bitkit.ext.amountOnClose
1819
import to.bitkit.models.BlocktankNotificationType
1920
import to.bitkit.models.BlocktankNotificationType.cjitPaymentArrived
2021
import to.bitkit.models.BlocktankNotificationType.incomingHtlc
@@ -140,15 +141,15 @@ class WakeNodeWorker @AssistedInject constructor(
140141
self.bestAttemptContent?.body = "Via new channel"
141142

142143
lightningRepo.getChannels()?.find { it.channelId == event.channelId }?.let { channel ->
143-
val sats = channel.outboundCapacityMsat / 1000u
144+
val sats = channel.amountOnClose
144145
self.bestAttemptContent?.title = "Received ⚡ $sats sats"
145146
// Save for UI to pick up
146147
NewTransactionSheetDetails.save(
147148
appContext,
148149
NewTransactionSheetDetails(
149150
type = NewTransactionSheetType.LIGHTNING,
150151
direction = NewTransactionSheetDirection.RECEIVED,
151-
sats = sats.toLong(),
152+
sats = channel.amountOnClose.toLong(),
152153
)
153154
)
154155
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,8 +1499,6 @@ class AppViewModel @Inject constructor(
14991499
private const val TEN_USD = 10
15001500
private const val MAX_BALANCE_FRACTION = 0.5
15011501
private const val MAX_FEE_AMOUNT_RATIO = 0.5
1502-
1503-
private const val MILLISATS = 1000U
15041502
}
15051503
}
15061504

0 commit comments

Comments
 (0)