Skip to content

Commit 7bfb20b

Browse files
ben-kaufmanclaude
andcommitted
fix: address review — LNURL quickpay null amount, log quotes, changelog
- Pass null instead of data.sats for LNURL quick-pay so LDK uses the invoice's native msat precision (same fix as Bolt11 path) - Wrap log parameter values in single quotes per CLAUDE.md - Consolidate duplicate changelog entries into one Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 388c669 commit 7bfb20b

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Fixed
11-
- Preserve msat precision for LNURL pay and withdraw callbacks #879
12-
- Avoid msat truncation when paying invoices with built-in amounts #879
11+
- Avoid msat truncation when paying invoices and LNURL callbacks #879
1312
- Fix ANR on RGS server settings screen caused by catastrophic regex backtracking #880
1413
- Fix crash when returning app to foreground on Receive screen #875
1514
- Show loading state on Spending tab when node is not running #875

app/src/main/java/to/bitkit/repositories/LightningRepo.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ class LightningRepo @Inject constructor(
910910
return@runCatching decoded
911911
}.onFailure {
912912
Logger.error(
913-
"fetchLnurlInvoice error, url: $callbackUrl, amountMsats: $amountMsats, comment: $comment",
913+
"fetchLnurlInvoice error, url: '$callbackUrl', amountMsats: '$amountMsats', comment: '$comment'",
914914
it,
915915
context = TAG,
916916
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ class AppViewModel @Inject constructor(
14911491
}
14921492

14931493
if (isFixed) {
1494-
Logger.info("Found fixed amount $displaySats sats in lnurlPay, proceeding with payment", context = TAG)
1494+
Logger.info("Found fixed amount '$displaySats' sats in lnurlPay, proceeding with payment", context = TAG)
14951495

14961496
val quickPayHandled = handleQuickPayIfApplicable(amountSats = displaySats, lnurlPay = data)
14971497
if (quickPayHandled) return

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class QuickPayViewModel @Inject constructor(
5757
}
5858
return@launch
5959
}
60-
Triple(invoice.bolt11, data.sats, data.sats)
60+
Triple(invoice.bolt11, null, data.sats)
6161
}
6262
}
6363

0 commit comments

Comments
 (0)