Skip to content

Commit 36af4da

Browse files
ben-kaufmanclaude
andcommitted
fix: use ceiling for received payment notification amount
The received transaction sheet used floor division for the msat amount. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 91a35c5 commit 36af4da

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Bitkit/ViewModels/AppViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ extension AppViewModel {
726726
}
727727

728728
await MainActor.run {
729-
sheetViewModel.showSheet(.receivedTx, data: ReceivedTxSheetDetails(type: .lightning, sats: amountMsat / 1000))
729+
let sats = LightningAmountConversion.satsCeil(fromMsats: amountMsat)
730+
sheetViewModel.showSheet(.receivedTx, data: ReceivedTxSheetDetails(type: .lightning, sats: sats))
730731
}
731732
}
732733
case .channelPending(channelId: _, userChannelId: _, formerTemporaryChannelId: _, counterpartyNodeId: _, fundingTxo: _):

0 commit comments

Comments
 (0)