Updated on 2026-08-14
This commit is contained in:
parent
879c8d603b
commit
af8fc1732d
14 changed files with 215 additions and 187 deletions
|
|
@ -15,7 +15,10 @@ import com.tangem.domain.common.util.twinsIsTwinned
|
|||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.tap.*
|
||||
import com.tangem.tap.common.analytics.paramsInterceptor.CardContextInterceptor
|
||||
import com.tangem.tap.common.extensions.*
|
||||
import com.tangem.tap.common.extensions.addContext
|
||||
import com.tangem.tap.common.extensions.dispatchOnMain
|
||||
import com.tangem.tap.common.extensions.dispatchWithMain
|
||||
import com.tangem.tap.common.extensions.setContext
|
||||
import com.tangem.tap.common.redux.global.GlobalAction
|
||||
import com.tangem.tap.features.disclaimer.createDisclaimer
|
||||
import com.tangem.tap.features.disclaimer.redux.DisclaimerAction
|
||||
|
|
@ -34,8 +37,7 @@ internal object LegacyScanProcessor {
|
|||
allowsRequestAccessCodeFromRepository: Boolean = false,
|
||||
): CompletionResult<ScanResponse> {
|
||||
return tangemSdkManager.scanProduct(
|
||||
userTokensRepository,
|
||||
cardId,
|
||||
cardId = cardId,
|
||||
allowsRequestAccessCodeFromRepository = allowsRequestAccessCodeFromRepository,
|
||||
)
|
||||
}
|
||||
|
|
@ -56,10 +58,7 @@ internal object LegacyScanProcessor {
|
|||
|
||||
tangemSdkManager.changeDisplayedCardIdNumbersCount(null)
|
||||
|
||||
val result = tangemSdkManager.scanProduct(
|
||||
userTokensRepository = userTokensRepository,
|
||||
cardId = cardId,
|
||||
)
|
||||
val result = tangemSdkManager.scanProduct(cardId)
|
||||
|
||||
store.dispatchOnMain(GlobalAction.ScanFailsCounter.ChooseBehavior(result))
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,8 @@ import com.tangem.domain.card.repository.ScanCardRepository
|
|||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.tap.domain.TangemSdkManager
|
||||
import com.tangem.tap.domain.scanCard.utils.ScanCardExceptionConverter
|
||||
import com.tangem.tap.domain.tokens.UserTokensRepository
|
||||
|
||||
internal class DefaultScanCardRepository(
|
||||
// FIXME: The repository should not depend on another repository.
|
||||
// But now we need to provide loadBlockchainsToDerive() to ScanProductTask and it's hard to move this method from
|
||||
// UserTokensRepository.
|
||||
private val userTokensRepository: UserTokensRepository,
|
||||
private val tangemSdkManager: TangemSdkManager,
|
||||
) : ScanCardRepository {
|
||||
|
||||
|
|
@ -27,7 +22,6 @@ internal class DefaultScanCardRepository(
|
|||
when (
|
||||
val result = tangemSdkManager.scanProduct(
|
||||
cardId = cardId,
|
||||
userTokensRepository = userTokensRepository,
|
||||
allowsRequestAccessCodeFromRepository = allowRequestAccessCodeFromStorage,
|
||||
)
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue