diff --git a/app/src/main/kotlin/net/primal/android/premium/legend/become/PremiumBecomeLegendViewModel.kt b/app/src/main/kotlin/net/primal/android/premium/legend/become/PremiumBecomeLegendViewModel.kt index 8035e6899..20c6d92cb 100644 --- a/app/src/main/kotlin/net/primal/android/premium/legend/become/PremiumBecomeLegendViewModel.kt +++ b/app/src/main/kotlin/net/primal/android/premium/legend/become/PremiumBecomeLegendViewModel.kt @@ -14,7 +14,6 @@ import kotlinx.coroutines.flow.getAndUpdate import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock -import kotlinx.serialization.encodeToString import net.primal.android.core.serialization.json.NostrJson import net.primal.android.navigation.FROM_ORIGIN_PREMIUM_BADGE import net.primal.android.navigation.buyingPremiumFromOrigin diff --git a/app/src/main/kotlin/net/primal/android/premium/legend/become/amount/BecomeLegendAmountStage.kt b/app/src/main/kotlin/net/primal/android/premium/legend/become/amount/BecomeLegendAmountStage.kt index a86038450..3733ed33d 100644 --- a/app/src/main/kotlin/net/primal/android/premium/legend/become/amount/BecomeLegendAmountStage.kt +++ b/app/src/main/kotlin/net/primal/android/premium/legend/become/amount/BecomeLegendAmountStage.kt @@ -34,6 +34,7 @@ import androidx.compose.ui.unit.sp import java.time.Year import net.primal.android.R import net.primal.android.core.compose.NostrUserText +import net.primal.android.core.compose.PrimalLoadingSpinner import net.primal.android.core.compose.PrimalSliderThumb import net.primal.android.core.compose.PrimalTopAppBar import net.primal.android.core.compose.UniversalAvatarThumbnail @@ -118,15 +119,20 @@ fun BecomeLegendAmountStage( Spacer(modifier = Modifier.height(48.dp)) - if (state.arePaymentInstructionsAvailable() || state.isFetchingPaymentInstructions) { - SelectAmountSlider( - state = state, - eventPublisher = eventPublisher, - ) - } else { - NoPaymentInstructionsColumn( - onRetryClick = { eventPublisher(PremiumBecomeLegendContract.UiEvent.FetchPaymentInstructions) }, - ) + Column( + modifier = Modifier.height(200.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally, + ) { + if (state.arePaymentInstructionsAvailable()) { + SelectAmountSlider(state = state, eventPublisher = eventPublisher) + } else if (state.isFetchingPaymentInstructions) { + PrimalLoadingSpinner() + } else { + NoPaymentInstructionsColumn( + onRetryClick = { eventPublisher(PremiumBecomeLegendContract.UiEvent.FetchPaymentInstructions) }, + ) + } } Spacer(modifier = Modifier.height(48.dp))