@@ -72,6 +72,7 @@ import to.bitkit.data.CacheStore
7272import to.bitkit.data.SettingsStore
7373import to.bitkit.env.Env
7474import to.bitkit.ext.amountSats
75+ import to.bitkit.models.msatFloorOf
7576import to.bitkit.ext.channelId
7677import to.bitkit.ext.create
7778import to.bitkit.ext.latestSpendingTxid
@@ -501,7 +502,7 @@ class ActivityService(
501502 value = payment.amountSats ? : 0u ,
502503 invoice = kind.bolt11 ? : " Loading..." ,
503504 timestamp = payment.latestUpdateTimestamp,
504- fee = (payment.feePaidMsat ? : 0u ) / 1000u ,
505+ fee = msatFloorOf (payment.feePaidMsat ? : 0u ),
505506 message = kind.description.orEmpty(),
506507 preimage = kind.preimage,
507508 seenAt = null ,
@@ -610,7 +611,7 @@ class ActivityService(
610611 ldkValue
611612 }
612613
613- val ldkFeeSats = ldkFeeMsat / 1000u
614+ val ldkFeeSats = msatFloorOf( ldkFeeMsat)
614615 val updatedFee = if (existingActivity.v1.fee == 0uL && ldkFeeSats > 0uL ) ldkFeeSats else existingActivity.v1.fee
615616
616617 val updatedOnChain = existingActivity.v1.copy(
@@ -649,7 +650,7 @@ class ActivityService(
649650 txType = payment.direction.toPaymentType(),
650651 txId = kind.txid,
651652 value = payment.amountSats ? : 0u ,
652- fee = (payment.feePaidMsat ? : 0u ) / 1000u ,
653+ fee = msatFloorOf (payment.feePaidMsat ? : 0u ),
653654 address = resolvedAddress ? : " Loading..." ,
654655 timestamp = activityTimestamp,
655656 confirmed = confirmationData.isConfirmed,
0 commit comments