Making LnInvoice amount a Lazy property.
This commit is contained in:
@@ -36,7 +36,9 @@ class LnZapEvent(
|
||||
}
|
||||
|
||||
// Keeps this as a field because it's a heavier function used everywhere.
|
||||
val amount = lnInvoice()?.let { LnInvoiceUtil.getAmountInSats(it) }
|
||||
val amount by lazy {
|
||||
lnInvoice()?.let { LnInvoiceUtil.getAmountInSats(it) }
|
||||
}
|
||||
|
||||
override fun containedPost(): Event? = try {
|
||||
description()?.let {
|
||||
|
||||
Reference in New Issue
Block a user