diff --git a/common/routing/src/main/kotlin/com/tangem/common/routing/deeplink/DeeplinkConst.kt b/common/routing/src/main/kotlin/com/tangem/common/routing/deeplink/DeeplinkConst.kt index 575be52e80..630b68ded8 100644 --- a/common/routing/src/main/kotlin/com/tangem/common/routing/deeplink/DeeplinkConst.kt +++ b/common/routing/src/main/kotlin/com/tangem/common/routing/deeplink/DeeplinkConst.kt @@ -12,5 +12,7 @@ object DeeplinkConst { const val DERIVATION_PATH_KEY = "derivation_path" const val TRANSACTION_ID_KEY = "transaction_id" const val PROMO_CODE_KEY = "promo_code" + const val REF_KEY = "ref" + const val CAMPAIGN_KEY = "campaign" const val NAME_KEY = "name" } \ No newline at end of file diff --git a/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/TangemTechApi.kt b/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/TangemTechApi.kt index aec86d12d2..a3b38cb1f0 100644 --- a/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/TangemTechApi.kt +++ b/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/TangemTechApi.kt @@ -56,6 +56,7 @@ interface TangemTechApi { @Body userTokens: UserTokensResponse, ): ApiResponse + // region Referral /** Returns referral status by [walletId] */ @GET("v1/referral/{walletId}") suspend fun getReferralStatus(@Path("walletId") walletId: String): ApiResponse @@ -64,6 +65,10 @@ interface TangemTechApi { @POST("v1/referral") suspend fun startReferral(@Body startReferralBody: StartReferralBody): ApiResponse + @POST("v1/referral/bind-wallets-by-code") + suspend fun bindWalletsByReferralCode(@Body body: BindWalletsByReferralCodeBody): ApiResponse + // endregion + @GET("v1/quotes") suspend fun getQuotes( @Query("currencyId") currencyId: String, diff --git a/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/models/BindWalletsByReferralCodeBody.kt b/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/models/BindWalletsByReferralCodeBody.kt new file mode 100644 index 0000000000..1eac85742a --- /dev/null +++ b/core/datasource/src/main/java/com/tangem/datasource/api/tangemTech/models/BindWalletsByReferralCodeBody.kt @@ -0,0 +1,11 @@ +package com.tangem.datasource.api.tangemTech.models + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +@JsonClass(generateAdapter = true) +data class BindWalletsByReferralCodeBody( + @Json(name = "walletIds") val walletIds: List, + @Json(name = "referralCode") val refcode: String, + @Json(name = "utmCampaign") val campaign: String? = null, +) \ No newline at end of file diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsPromoRepository.kt b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsPromoRepository.kt new file mode 100644 index 0000000000..23738373d2 --- /dev/null +++ b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsPromoRepository.kt @@ -0,0 +1,104 @@ +package com.tangem.data.wallets + +import androidx.datastore.preferences.core.stringPreferencesKey +import arrow.core.Option +import arrow.core.toOption +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import com.tangem.datasource.api.common.response.ApiResponse +import com.tangem.datasource.api.common.response.getOrThrow +import com.tangem.datasource.api.tangemTech.TangemTechApi +import com.tangem.datasource.api.tangemTech.models.BindWalletsByReferralCodeBody +import com.tangem.datasource.local.appsflyer.AppsFlyerConversionStore +import com.tangem.datasource.local.preferences.AppPreferencesStore +import com.tangem.datasource.local.preferences.utils.getObjectSyncOrNull +import com.tangem.datasource.local.preferences.utils.storeObject +import com.tangem.datasource.local.userwallet.UserWalletsStore +import com.tangem.domain.wallets.models.AppsFlyerConversionData +import com.tangem.domain.wallets.repository.WalletsPromoRepository +import com.tangem.utils.coroutines.CoroutineDispatcherProvider +import com.tangem.utils.coroutines.runSuspendCatching +import kotlinx.coroutines.withContext +import timber.log.Timber + +internal class DefaultWalletsPromoRepository( + private val appPreferencesStore: AppPreferencesStore, + private val tangemTechApi: TangemTechApi, + private val userWalletsStore: UserWalletsStore, + private val appsFlyerConversionStore: AppsFlyerConversionStore, + private val dispatchers: CoroutineDispatcherProvider, +) : WalletsPromoRepository { + + override suspend fun getConversionData(): Option { + return runSuspendCatching { appsFlyerConversionStore.get() }.getOrNull().toOption() + } + + override suspend fun saveConversionData(refcode: String, campaign: String?) { + val data = AppsFlyerConversionData(refcode = refcode, campaign = campaign) + + appsFlyerConversionStore.store(data) + } + + override suspend fun bindRefcodeWithWallets(refcode: String, campaign: String?) = withContext(dispatchers.io) { + val walletIds = userWalletsStore.userWalletsSync.map { it.walletId.stringValue } + + val result = tangemTechApi.bindWalletsByReferralCode( + body = BindWalletsByReferralCodeBody( + walletIds = walletIds, + refcode = refcode, + campaign = campaign, + ), + ) + + val bindingData = ReferralWalletsBindingData( + refcode = refcode, + campaign = campaign, + isDone = result is ApiResponse.Success, + ) + + appPreferencesStore.storeObject(key = REFERRAL_WALLETS_BINDING_DATA_KEY, value = bindingData) + + result.getOrThrow() + } + + override suspend fun bindSavedRefcodeWithWallets(): AppsFlyerConversionData { + val bindingData = appPreferencesStore.getObjectSyncOrNull( + key = REFERRAL_WALLETS_BINDING_DATA_KEY, + ) + + if (bindingData == null) { + val exception = IllegalStateException("No saved referral wallets binding data found") + Timber.e(exception) + throw exception + } + + val conversionData = AppsFlyerConversionData( + refcode = bindingData.refcode, + campaign = bindingData.campaign, + ) + + if (bindingData.isDone) { + Timber.i("Referral code ${bindingData.refcode} already bound with wallets") + return conversionData + } + + bindRefcodeWithWallets( + refcode = bindingData.refcode, + campaign = bindingData.campaign, + ) + + return conversionData + } + + @JsonClass(generateAdapter = true) + private data class ReferralWalletsBindingData( + @Json(name = "refcode") val refcode: String, + @Json(name = "campaign") val campaign: String?, + @Json(name = "done") val isDone: Boolean, + ) + + private companion object { + + val REFERRAL_WALLETS_BINDING_DATA_KEY by lazy { stringPreferencesKey(name = "referralWalletsBindingData") } + } +} \ No newline at end of file diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt b/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt index 3ba821417e..5023a6099e 100644 --- a/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt +++ b/data/wallets/src/main/java/com/tangem/data/wallets/di/WalletsDataModule.kt @@ -3,6 +3,7 @@ package com.tangem.data.wallets.di import com.squareup.moshi.Moshi import com.tangem.data.common.wallet.WalletServerBinder import com.tangem.data.wallets.DefaultWalletNamesMigrationRepository +import com.tangem.data.wallets.DefaultWalletsPromoRepository import com.tangem.data.wallets.DefaultWalletsRepository import com.tangem.data.wallets.cold.DefaultColdMapDerivationsRepository import com.tangem.data.wallets.derivations.DefaultDerivationsRepository @@ -21,6 +22,7 @@ import com.tangem.domain.wallets.derivations.DerivationsRepository import com.tangem.domain.wallets.derivations.HotMapDerivationsRepository import com.tangem.domain.wallets.hot.HotWalletAccessCodeAttemptsRepository import com.tangem.domain.wallets.repository.WalletNamesMigrationRepository +import com.tangem.domain.wallets.repository.WalletsPromoRepository import com.tangem.domain.wallets.repository.WalletsRepository import com.tangem.utils.coroutines.CoroutineDispatcherProvider import dagger.Binds @@ -66,6 +68,24 @@ internal object WalletsDataModule { fun provideMigrateNamesRepository(appPreferencesStore: AppPreferencesStore): WalletNamesMigrationRepository { return DefaultWalletNamesMigrationRepository(appPreferencesStore) } + + @Provides + @Singleton + fun provideWalletsPromoRepository( + appPreferencesStore: AppPreferencesStore, + tangemTechApi: TangemTechApi, + userWalletsStore: UserWalletsStore, + appsFlyerConversionStore: AppsFlyerConversionStore, + dispatchers: CoroutineDispatcherProvider, + ): WalletsPromoRepository { + return DefaultWalletsPromoRepository( + appPreferencesStore = appPreferencesStore, + tangemTechApi = tangemTechApi, + userWalletsStore = userWalletsStore, + appsFlyerConversionStore = appsFlyerConversionStore, + dispatchers = dispatchers, + ) + } } @Module diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsPromoRepository.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsPromoRepository.kt new file mode 100644 index 0000000000..e07fb8e436 --- /dev/null +++ b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsPromoRepository.kt @@ -0,0 +1,15 @@ +package com.tangem.domain.wallets.repository + +import arrow.core.Option +import com.tangem.domain.wallets.models.AppsFlyerConversionData + +interface WalletsPromoRepository { + + suspend fun getConversionData(): Option + + suspend fun saveConversionData(refcode: String, campaign: String?) + + suspend fun bindRefcodeWithWallets(refcode: String, campaign: String?) + + suspend fun bindSavedRefcodeWithWallets(): AppsFlyerConversionData +} \ No newline at end of file diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/BindRefcodeWithWalletUseCase.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/BindRefcodeWithWalletUseCase.kt new file mode 100644 index 0000000000..ec454d0aa9 --- /dev/null +++ b/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/BindRefcodeWithWalletUseCase.kt @@ -0,0 +1,75 @@ +package com.tangem.domain.wallets.usecase + +import arrow.core.Either +import arrow.core.raise.Raise +import arrow.core.raise.catch +import arrow.core.raise.either +import arrow.core.raise.ensure +import com.tangem.domain.wallets.models.AppsFlyerConversionData +import com.tangem.domain.wallets.repository.WalletsPromoRepository +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import javax.inject.Inject + +class BindRefcodeWithWalletUseCase @Inject constructor( + private val walletsPromoRepository: WalletsPromoRepository, +) { + + private val mutex = Mutex() + + suspend operator fun invoke(refcode: String, campaign: String?): Either = either { + ensure(refcode.isNotBlank()) { Error.InvalidRefcode } + + mutex.withLock { + checkSavedRefcode() + + bindRefcode(refcode = refcode, campaign = campaign) + + saveConversionData(refcode = refcode, campaign = campaign) + } + } + + suspend fun retry(): Either = either { + mutex.withLock { + val conversionData = tryBindRefcodeAgain() + + saveConversionData(refcode = conversionData.refcode, campaign = conversionData.campaign) + } + } + + private suspend fun Raise.checkSavedRefcode() { + walletsPromoRepository.getConversionData().onSome { + raise(Error.RefcodeAlreadySaved) + } + } + + private suspend fun Raise.bindRefcode(refcode: String, campaign: String?) { + catch( + block = { walletsPromoRepository.bindRefcodeWithWallets(refcode, campaign) }, + catch = { raise(Error.DataError(it)) }, + ) + } + + private suspend fun Raise.tryBindRefcodeAgain(): AppsFlyerConversionData { + return catch( + block = { walletsPromoRepository.bindSavedRefcodeWithWallets() }, + catch = { raise(Error.DataError(it)) }, + ) + } + + private suspend fun Raise.saveConversionData(refcode: String, campaign: String?) { + catch( + block = { walletsPromoRepository.saveConversionData(refcode, campaign) }, + catch = { raise(Error.DataError(it)) }, + ) + } + + sealed interface Error { + + data object InvalidRefcode : Error + + data object RefcodeAlreadySaved : Error + + data class DataError(val throwable: Throwable) : Error + } +} \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/WalletModel.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/WalletModel.kt index ba456f80f5..dc160b2505 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/WalletModel.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/child/wallet/model/WalletModel.kt @@ -104,6 +104,7 @@ internal class WalletModel @Inject constructor( private val singleAccountListSupplier: SingleAccountListSupplier, private val isAccountsModeEnabledUseCase: IsAccountsModeEnabledUseCase, private val feedFeatureToggle: FeedFeatureToggle, + private val bindRefcodeWithWalletUseCase: BindRefcodeWithWalletUseCase, val screenLifecycleProvider: ScreenLifecycleProvider, val innerWalletRouter: InnerWalletRouter, ) : Model() { @@ -138,6 +139,11 @@ internal class WalletModel @Inject constructor( enableNotificationsIfNeeded() clickIntents.initialize(innerWalletRouter, modelScope) + + modelScope.launch { + bindRefcodeWithWalletUseCase.retry() + .onLeft { Timber.e("Failed to bind refcode with wallets: $it") } + } } fun onResume() { diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt index 5c151cb3ef..2c0d3c82e8 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt @@ -1,6 +1,7 @@ package com.tangem.feature.wallet.deeplink import com.tangem.blockchain.common.Blockchain +import com.tangem.common.routing.deeplink.DeeplinkConst import com.tangem.common.routing.deeplink.DeeplinkConst.PROMO_CODE_KEY import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.core.decompose.di.GlobalUiMessageSender @@ -19,6 +20,7 @@ import com.tangem.domain.wallets.PromoCodeActivationResult import com.tangem.domain.wallets.PromoCodeActivationResult.* import com.tangem.domain.wallets.models.errors.ActivatePromoCodeError import com.tangem.domain.wallets.usecase.ActivateBitcoinPromocodeUseCase +import com.tangem.domain.wallets.usecase.BindRefcodeWithWalletUseCase import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase import com.tangem.feature.wallet.deeplink.analytics.PromoActivationAnalytics import com.tangem.feature.wallet.impl.R @@ -44,10 +46,14 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor( private val multiWalletCryptoCurrenciesSupplier: MultiWalletCryptoCurrenciesSupplier, private val activateBitcoinPromocodeUseCase: ActivateBitcoinPromocodeUseCase, private val getSelectedWalletSyncUseCase: GetSelectedWalletSyncUseCase, + private val bindRefcodeWithWalletUseCase: BindRefcodeWithWalletUseCase, private val analyticsEventsHandler: AnalyticsEventHandler, private val dispatchers: CoroutineDispatcherProvider, ) : PromoDeeplinkHandler { + private val refcode: String? = queryParams[DeeplinkConst.REF_KEY] + private val campaign: String? = queryParams[DeeplinkConst.CAMPAIGN_KEY] + init { analyticsEventsHandler.send(PromoActivationAnalytics.PromoDeepLinkActivationStart()) val promoCode = queryParams[PROMO_CODE_KEY].orEmpty() @@ -122,6 +128,14 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor( Timber.tag(LOG_TAG).d( "Start activation promoCode ${promoCode.mask()} address ${bitcoinAddress.mask()}", ) + + if (refcode != null) { + launch { + bindRefcodeWithWalletUseCase(refcode = refcode, campaign = campaign) + .onLeft { Timber.e("Failed to bind refcode with wallets: $it") } + } + } + activatePromoCode(bitcoinAddress = bitcoinAddress, promoCode = promoCode) } else { uiMessageSender.send(GlobalLoadingMessage(false)) diff --git a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt index b6844fd970..126be8d9a7 100644 --- a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt +++ b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt @@ -25,6 +25,7 @@ import com.tangem.domain.wallets.PromoCodeActivationResult import com.tangem.domain.wallets.models.GetUserWalletError import com.tangem.domain.wallets.models.errors.ActivatePromoCodeError import com.tangem.domain.wallets.usecase.ActivateBitcoinPromocodeUseCase +import com.tangem.domain.wallets.usecase.BindRefcodeWithWalletUseCase import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase import com.tangem.feature.wallet.deeplink.DefaultPromoDeeplinkHandler import com.tangem.feature.wallet.deeplink.analytics.PromoActivationAnalytics @@ -66,6 +67,9 @@ class DefaultPromoDeeplinkHandlerTest { @MockK private lateinit var analyticsEventHandler: AnalyticsEventHandler + @MockK + private lateinit var bindRefcodeWithWalletUseCase: BindRefcodeWithWalletUseCase + private lateinit var messages: MutableList @Before @@ -105,6 +109,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -137,6 +142,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = TestingCoroutineDispatcherProvider(), ) @@ -168,6 +174,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = TestingCoroutineDispatcherProvider(), ) @@ -205,6 +212,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -246,6 +254,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -362,6 +371,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -393,6 +403,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -433,6 +444,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -494,6 +506,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -546,6 +559,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -604,6 +618,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -661,6 +676,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -714,6 +730,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, ) @@ -767,6 +784,7 @@ class DefaultPromoDeeplinkHandlerTest { multiWalletCryptoCurrenciesSupplier = multiWalletCryptoCurrenciesSupplier, activateBitcoinPromocodeUseCase = activateBitcoinPromocodeUseCase, getSelectedWalletSyncUseCase = getSelectedWalletSyncUseCase, + bindRefcodeWithWalletUseCase = bindRefcodeWithWalletUseCase, analyticsEventsHandler = analyticsEventHandler, dispatchers = dispatcherProvider, )