formatting
This commit is contained in:
@@ -40,7 +40,7 @@ import kotlinx.coroutines.launch
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ZapNoteCompose(baseReqResponse: ZapReqResponse, accountViewModel: AccountViewModel, nav: (String) -> Unit) {
|
fun ZapNoteCompose(baseReqResponse: ZapReqResponse, accountViewModel: AccountViewModel, nav: (String) -> Unit) {
|
||||||
val baseNoteRequest by baseReqResponse.request.live().metadata.observeAsState()
|
val baseNoteRequest by baseReqResponse.zapRequest.live().metadata.observeAsState()
|
||||||
|
|
||||||
var baseAuthor by remember {
|
var baseAuthor by remember {
|
||||||
mutableStateOf<User?>(null)
|
mutableStateOf<User?>(null)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.vitorpamplona.amethyst.model.Note
|
|||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
data class ZapReqResponse(val request: Note, val zapEvent: Note)
|
data class ZapReqResponse(val zapRequest: Note, val zapEvent: Note)
|
||||||
|
|
||||||
@Stable
|
@Stable
|
||||||
sealed class LnZapFeedState {
|
sealed class LnZapFeedState {
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ class UserZapsTest {
|
|||||||
val actual = UserZaps.forProfileFeed(zaps)
|
val actual = UserZaps.forProfileFeed(zaps)
|
||||||
|
|
||||||
Assert.assertEquals(1, actual.count())
|
Assert.assertEquals(1, actual.count())
|
||||||
Assert.assertEquals(zapRequest, actual.first().first)
|
Assert.assertEquals(zapRequest, actual.first().zapRequest)
|
||||||
Assert.assertEquals(
|
Assert.assertEquals(
|
||||||
BigDecimal(200),
|
BigDecimal(200),
|
||||||
(actual.first().second.event as LnZapEventInterface).amount()
|
(actual.first().zapEvent.event as LnZapEventInterface).amount()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user