Updated on 2026-08-14

This commit is contained in:
Tangem 2023-07-31 16:39:21 +03:00
parent 65f7cd064e
commit 2aeea6c534
2 changed files with 10 additions and 8 deletions

View file

@ -22,9 +22,7 @@ import com.tangem.tap.common.redux.AppState
import com.tangem.tap.common.redux.global.GlobalAction
import com.tangem.tap.domain.model.builders.UserWalletBuilder
import com.tangem.tap.domain.scanCard.ScanCardProcessor
import com.tangem.tap.features.home.BELARUS_COUNTRY_CODE
import com.tangem.tap.features.home.RUSSIA_COUNTRY_CODE
import com.tangem.tap.features.home.redux.HomeMiddleware.BUY_WALLET_URL
import com.tangem.tap.features.home.redux.HomeMiddleware.NEW_BUY_WALLET_URL
import com.tangem.tap.features.send.redux.states.ButtonState
import com.tangem.tap.features.signin.redux.SignInAction
import kotlinx.coroutines.delay
@ -37,6 +35,7 @@ object HomeMiddleware {
val handler = homeMiddleware
const val BUY_WALLET_URL = "https://tangem.com/ru/resellers/"
const val NEW_BUY_WALLET_URL = "https://buy.tangem.com/ru/"
}
private val homeMiddleware: Middleware<AppState> = { _, _ ->
@ -64,10 +63,13 @@ private fun handleHomeAction(action: Action) {
}
is HomeAction.GoToShop -> {
Analytics.send(Shop.ScreenOpened())
when (action.userCountryCode) {
RUSSIA_COUNTRY_CODE, BELARUS_COUNTRY_CODE -> store.dispatchOpenUrl(BUY_WALLET_URL)
else -> store.dispatch(NavigationAction.NavigateTo(AppScreen.Shop))
}
store.dispatchOpenUrl(NEW_BUY_WALLET_URL)
// disabled for now in task [REDACTED_JIRA]
// when (action.userCountryCode) {
// RUSSIA_COUNTRY_CODE, BELARUS_COUNTRY_CODE -> store.dispatchOpenUrl(BUY_WALLET_URL)
// else -> store.dispatch(NavigationAction.NavigateTo(AppScreen.Shop))
// }
}
}
}

View file

@ -78,7 +78,7 @@ walletConnectWeb3 = "1.11.0"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "release-app_4.9-291"
tangemBlockchainSdk = "release-app_4.9-293"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "release-app_4.9-277"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds