Skip to content

Commit ae32b31

Browse files
ben-kaufmanclaude
andcommitted
fix: use ceiling division for PaymentDetails.amountSats
Activity list showed 222 sats while review screen showed 223 for a 222222 msat payment. The PaymentDetails extension used floor division (amountMsat / 1000). Use ceiling to match all other display paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c72e52c commit ae32b31

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/to/bitkit/ext/PaymentDetails.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ package to.bitkit.ext
22

33
import org.lightningdevkit.ldknode.PaymentDetails
44

5-
val PaymentDetails.amountSats: ULong? get() = amountMsat?.let { it / 1000u }
5+
val PaymentDetails.amountSats: ULong?
6+
get() = amountMsat?.let { (it + 999u) / 1000u }

0 commit comments

Comments
 (0)