@@ -155,6 +155,7 @@ import java.math.BigDecimal
155155import javax.inject.Inject
156156import kotlin.coroutines.cancellation.CancellationException
157157import kotlin.time.Duration
158+ import kotlin.time.Duration.Companion.hours
158159import kotlin.time.Duration.Companion.milliseconds
159160import kotlin.time.Duration.Companion.minutes
160161import kotlin.time.Duration.Companion.seconds
@@ -2094,7 +2095,7 @@ class AppViewModel @Inject constructor(
20942095 lightningRepo.createInvoiceMsats(
20952096 amountMsats = lnurl.data.maxWithdrawable,
20962097 description = lnurl.data.defaultDescription,
2097- expirySeconds = 3_600u ,
2098+ expirySeconds = LNURL_EXPIRY_SEC ,
20982099 )
20992100 } else {
21002101 val withdrawAmountSats = _sendUiState .value.amount.coerceAtLeast(
@@ -2104,7 +2105,7 @@ class AppViewModel @Inject constructor(
21042105 lightningRepo.createInvoice(
21052106 amountSats = withdrawAmountSats,
21062107 description = lnurl.data.defaultDescription,
2107- expirySeconds = 3_600u ,
2108+ expirySeconds = LNURL_EXPIRY_SEC ,
21082109 )
21092110 }.getOrNull()
21102111
@@ -2804,6 +2805,7 @@ class AppViewModel @Inject constructor(
28042805 private val PUBLIC_PAYKIT_SYNC_DEBOUNCE = 1 .seconds
28052806 private val PUBLIC_PAYKIT_BOLT11_REFRESH_WINDOW = 30 .minutes
28062807 private const val PUBKYAUTH_SCHEME = " pubkyauth"
2808+ private val LNURL_EXPIRY_SEC = 1 .hours.inWholeSeconds.toUInt()
28072809 }
28082810}
28092811
0 commit comments