fix: get balance from websocket instead of separate api call
This commit is contained in:
+3
-1
@@ -81,6 +81,7 @@ class WalletNotificationService : Service() {
|
||||
* Emitted to [paymentEvents] for in-process UI updates.
|
||||
*/
|
||||
data class PaymentEvent(
|
||||
val walletBalance: Long?,
|
||||
val amountSats: Long,
|
||||
val memo: String?,
|
||||
val isOutgoing: Boolean,
|
||||
@@ -229,6 +230,7 @@ class WalletNotificationService : Service() {
|
||||
serviceScope.launch {
|
||||
_paymentEvents.emit(
|
||||
PaymentEvent(
|
||||
walletBalance = msg.walletBalance,
|
||||
amountSats = amountSats,
|
||||
memo = payment.memo,
|
||||
isOutgoing = isOutgoing,
|
||||
@@ -245,7 +247,7 @@ class WalletNotificationService : Service() {
|
||||
checkingId = payment.checkingId,
|
||||
paymentHash = payment.paymentHash,
|
||||
amountMsat = payment.amount,
|
||||
feeMsat = 0L, // WsPaymentMessage doesn't carry fee
|
||||
feeMsat = payment.fee,
|
||||
memo = payment.memo,
|
||||
time = payment.time,
|
||||
status = payment.status,
|
||||
|
||||
Reference in New Issue
Block a user