Updated on 2026-08-14

This commit is contained in:
Tangem 2023-07-21 19:12:08 +03:00
parent 6c97b14db7
commit 3babc020c8

View file

@ -24,6 +24,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import timber.log.Timber
/**
[REDACTED_AUTHOR]
@ -90,11 +91,12 @@ internal class DefaultLearn2earnInteractor(
return repository.getUserData().isRegisteredInPromotion
}
override fun getAwardAmount(): Int {
override fun getAwardAmount(): Int = try {
val promoCode = repository.getUserData().promoCode
val awardAmount = promotion.getPromotionInfo().getData(promoCode).award.toInt()
return awardAmount
promotion.getPromotionInfo().getData(promoCode).award.toInt()
} catch (ex: NullPointerException) {
Timber.e(ex)
0
}
override fun getAwardNetworkName(): String {