Skip to content

Commit 3d7fce9

Browse files
committed
do not prefill lnurl-pay with minSendable
1 parent 7f442bb commit 3d7fce9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,15 +835,17 @@ class AppViewModel @Inject constructor(
835835
return
836836
}
837837

838+
val hasAmount = minSendable == maxSendable && minSendable > 0u
839+
val initialAmount = if (hasAmount) minSendable else 0u
840+
838841
_sendUiState.update {
839842
it.copy(
840-
amount = minSendable,
843+
amount = initialAmount,
841844
payMethod = SendMethod.LIGHTNING,
842845
lnurl = LnurlParams.LnurlPay(data),
843846
)
844847
}
845848

846-
val hasAmount = minSendable == maxSendable && minSendable > 0u
847849
if (hasAmount) {
848850
Logger.info("Found amount $$minSendable in lnurlPay, proceeding with payment", context = TAG)
849851

0 commit comments

Comments
 (0)