Updated on 2026-08-14
This commit is contained in:
parent
ba572cf71f
commit
77683181c7
20 changed files with 189 additions and 145 deletions
|
|
@ -2,4 +2,5 @@ package com.tangem.domain.appsflyer
|
|||
|
||||
enum class AppsFlyerDeeplinkSource {
|
||||
TangemPayHotWalletOnboarding,
|
||||
Referral,
|
||||
}
|
||||
|
|
@ -4,5 +4,7 @@ import com.tangem.domain.appsflyer.AppsFlyerDeeplinkSource
|
|||
|
||||
interface AppsFlyerRepository {
|
||||
|
||||
suspend fun getDeeplink(source: AppsFlyerDeeplinkSource): String?
|
||||
|
||||
suspend fun clearDeeplink(source: AppsFlyerDeeplinkSource)
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.tangem.domain.appsflyer.usecase
|
||||
|
||||
import com.tangem.domain.appsflyer.AppsFlyerDeeplinkSource
|
||||
import com.tangem.domain.appsflyer.repository.AppsFlyerRepository
|
||||
|
||||
/**
|
||||
* Returns whether the app install was attributed to an AppsFlyer referral deep link.
|
||||
*/
|
||||
class IsReferralInstallUseCase(
|
||||
private val appsFlyerRepository: AppsFlyerRepository,
|
||||
) {
|
||||
suspend operator fun invoke(): Boolean {
|
||||
return appsFlyerRepository.getDeeplink(AppsFlyerDeeplinkSource.Referral) != null
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue