diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 2f8277bf48..70107ef01b 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -20,6 +20,9 @@ # hide the original source file name. #-renamesourcefileattribute SourceFile +#Fix Crashig "Donate" scree +-keep class com.ivy.wallet.ui.donate.** { *; } + # Fix broken stuff by R8 -keep class com.ivy.wallet.ui.widget.** { *; } -keep class com.ivy.wallet.domain.data.** { *; } diff --git a/app/src/main/java/com/ivy/wallet/ui/donate/DonateState.kt b/app/src/main/java/com/ivy/wallet/ui/donate/DonateState.kt index 2f135cc90e..ee3dccf9bd 100644 --- a/app/src/main/java/com/ivy/wallet/ui/donate/DonateState.kt +++ b/app/src/main/java/com/ivy/wallet/ui/donate/DonateState.kt @@ -1,8 +1,6 @@ package com.ivy.wallet.ui.donate sealed class DonateState { - object Loading : DonateState() - object Success : DonateState() data class Error( diff --git a/app/src/main/java/com/ivy/wallet/ui/donate/DonateViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/donate/DonateViewModel.kt index 941986b9d6..cd3d1b58ad 100644 --- a/app/src/main/java/com/ivy/wallet/ui/donate/DonateViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/donate/DonateViewModel.kt @@ -16,7 +16,7 @@ import javax.inject.Inject class DonateViewModel @Inject constructor( private val ivyBilling: IvyBilling ) : FRPViewModel() { - override val _state: MutableStateFlow = MutableStateFlow(DonateState.Loading) + override val _state: MutableStateFlow = MutableStateFlow(DonateState.Success) val plans = mutableListOf() @@ -32,7 +32,6 @@ class DonateViewModel @Inject constructor( viewModelScope.launch { plans.clear() plans.addAll(ivyBilling.fetchOneTimePlans()) - updateStateNonBlocking { DonateState.Success } } }, onError = { code, msg -> @@ -42,7 +41,7 @@ class DonateViewModel @Inject constructor( }, onPurchases = {} ) - stateVal() + DonateState.Success } private fun donate(event: DonateEvent.Donate) = suspend {