Updated on 2026-08-14
This commit is contained in:
parent
0ba686b450
commit
c1250bc31f
21 changed files with 90 additions and 83 deletions
|
|
@ -1,6 +1,8 @@
|
|||
plugins {
|
||||
alias(deps.plugins.android.library)
|
||||
alias(deps.plugins.kotlin.android)
|
||||
alias(deps.plugins.kotlin.kapt)
|
||||
alias(deps.plugins.hilt.android)
|
||||
id("configuration")
|
||||
}
|
||||
|
||||
|
|
@ -19,6 +21,7 @@ dependencies {
|
|||
api(projects.domain.core)
|
||||
implementation(projects.domain.legacy)
|
||||
implementation(projects.libs.blockchainSdk)
|
||||
implementation(projects.libs.tangemSdkApi)
|
||||
implementation(projects.domain.models)
|
||||
implementation(projects.domain.tokens)
|
||||
implementation(projects.domain.tokens.models)
|
||||
|
|
@ -29,4 +32,9 @@ dependencies {
|
|||
implementation(tangemDeps.blockchain) // android-library
|
||||
implementation(tangemDeps.card.core)
|
||||
// endregion
|
||||
|
||||
// region DI
|
||||
implementation(deps.hilt.android)
|
||||
kapt(deps.hilt.kapt)
|
||||
// end
|
||||
}
|
||||
|
|
@ -3,14 +3,17 @@ package com.tangem.domain.wallets.builder
|
|||
import com.tangem.domain.common.util.cardTypesResolver
|
||||
import com.tangem.domain.models.scan.CardDTO
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.wallets.usecase.GetCardImageUseCase
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.wallets.usecase.GenerateWalletNameUseCase
|
||||
import com.tangem.domain.wallets.usecase.GetCardImageUseCase
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
|
||||
class UserWalletBuilder(
|
||||
private val scanResponse: ScanResponse,
|
||||
class UserWalletBuilder @AssistedInject constructor(
|
||||
@Assisted private val scanResponse: ScanResponse,
|
||||
private val generateWalletNameUseCase: GenerateWalletNameUseCase,
|
||||
private val getCardImageUseCase: GetCardImageUseCase = GetCardImageUseCase(),
|
||||
private val getCardImageUseCase: GetCardImageUseCase,
|
||||
) {
|
||||
private var backupCardsIds: Set<String> = emptySet()
|
||||
private var hasBackupError: Boolean = false
|
||||
|
|
@ -56,4 +59,10 @@ class UserWalletBuilder(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
|
||||
fun create(scanResponse: ScanResponse): UserWalletBuilder
|
||||
}
|
||||
}
|
||||
|
|
@ -10,11 +10,11 @@ import com.tangem.operations.attestation.OnlineCardVerifier
|
|||
/**
|
||||
* Use case for getting card image url
|
||||
*
|
||||
* @property verifier REST API
|
||||
* @property verifier online card verifier
|
||||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
class GetCardImageUseCase(private val verifier: OnlineCardVerifier = OnlineCardVerifier()) {
|
||||
class GetCardImageUseCase(private val verifier: OnlineCardVerifier) {
|
||||
|
||||
/**
|
||||
* Get card image url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue