Updated on 2026-08-14
This commit is contained in:
parent
633186da8f
commit
edb2613eec
3 changed files with 15 additions and 16 deletions
|
|
@ -168,7 +168,7 @@ class TapWalletManager {
|
|||
.mapNotNull { walletManagerFactory.makeWalletManager(data.card, it) }
|
||||
val otherBlockhains = savedCurrencies.blockchains
|
||||
|
||||
val activeTokens = walletManagers.first { it.wallet.blockchain == Blockchain.Ethereum}
|
||||
val activeTokens = walletManagers.first { it.wallet.blockchain == Blockchain.Ethereum }
|
||||
.presetTokens.toList()
|
||||
val tokens = activeTokens + savedCurrencies.tokens
|
||||
|
||||
|
|
|
|||
|
|
@ -126,22 +126,16 @@ class WalletMiddleware {
|
|||
is WalletAction.Scan -> {
|
||||
scope.launch {
|
||||
val result = tangemSdkManager.scanNote(FirebaseAnalyticsHandler)
|
||||
when (result) {
|
||||
is CompletionResult.Success -> {
|
||||
tangemSdkManager.changeDisplayedCardIdNumbersCount(result.data.card)
|
||||
globalState?.tapWalletManager
|
||||
?.onCardScanned(result.data, true)
|
||||
if (walletState?.twinCardsState != null) {
|
||||
val showOnboarding = !preferencesStorage.wasTwinsOnboardingShown()
|
||||
if (showOnboarding) {
|
||||
store.dispatch(NavigationAction.NavigateTo(AppScreen.TwinsOnboarding))
|
||||
}
|
||||
scope.launch(Dispatchers.Main) {
|
||||
when (result) {
|
||||
is CompletionResult.Success -> {
|
||||
tangemSdkManager.changeDisplayedCardIdNumbersCount(result.data.card)
|
||||
globalState?.tapWalletManager
|
||||
?.onCardScanned(result.data, true)
|
||||
store.dispatch(WalletAction.ScanCardFinished())
|
||||
}
|
||||
store.dispatch(WalletAction.ScanCardFinished())
|
||||
}
|
||||
is CompletionResult.Failure -> {
|
||||
if (result.error !is TangemSdkError.UserCancelled) {
|
||||
scope.launch(Dispatchers.Main) {
|
||||
is CompletionResult.Failure -> {
|
||||
if (result.error !is TangemSdkError.UserCancelled) {
|
||||
store.dispatch(WalletAction.ScanCardFinished(result.error))
|
||||
if (store.state.walletState.scanCardFailsCounter >= 2) {
|
||||
store.dispatch(WalletAction.ShowDialog.ScanFails)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import android.view.ViewGroup
|
|||
import android.widget.Button
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.tangem.tap.common.extensions.*
|
||||
import com.tangem.tap.common.redux.navigation.AppScreen
|
||||
import com.tangem.tap.common.redux.navigation.NavigationAction
|
||||
import com.tangem.tap.domain.twins.TwinCardNumber
|
||||
import com.tangem.tap.features.wallet.models.PendingTransaction
|
||||
import com.tangem.tap.features.wallet.redux.*
|
||||
|
|
@ -105,6 +107,9 @@ class SingleWalletView : WalletView {
|
|||
this.tv_twin_card_number.hide()
|
||||
this.iv_twin_card.hide()
|
||||
}
|
||||
if (twinCardsState?.showTwinOnboarding == true) {
|
||||
store.dispatch(NavigationAction.NavigateTo(AppScreen.TwinsOnboarding))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue