diff --git a/app/src/main/assets/tangem-app-config b/app/src/main/assets/tangem-app-config index af8b453fd2..8e5de701e0 160000 --- a/app/src/main/assets/tangem-app-config +++ b/app/src/main/assets/tangem-app-config @@ -1 +1 @@ -Subproject commit af8b453fd25b29d949c05302ec282511dc2614b8 +Subproject commit 8e5de701e02a2d48a68e32cd4783549dde01983e diff --git a/app/src/main/java/com/tangem/tap/MainActivity.kt b/app/src/main/java/com/tangem/tap/MainActivity.kt index 7a9d1f385c..1f2e49db06 100644 --- a/app/src/main/java/com/tangem/tap/MainActivity.kt +++ b/app/src/main/java/com/tangem/tap/MainActivity.kt @@ -300,6 +300,7 @@ class MainActivity : AppCompatActivity(), SnackbarHandler, ActivityResultCallbac private fun setRootContent() { val routingComponent = routingComponentFactory.create( context = rootComponentContext, + initialStack = null, ) setContent { @@ -308,8 +309,12 @@ class MainActivity : AppCompatActivity(), SnackbarHandler, ActivityResultCallbac } private fun installRouting() { + // for now activity is singleTop and after going to ChromeCustomTab it calls onCreate but onDestroy + // doesn't calls. It lead to issue that decompose nav stack is not saved in bundle and to restore it + // we try to init component with previous stack val routingComponent = routingComponentFactory.create( context = rootComponentContext, + initialStack = appRouterConfig.stack, ) appRouterConfig.routerScope = mainScope diff --git a/app/src/main/java/com/tangem/tap/routing/component/RoutingComponent.kt b/app/src/main/java/com/tangem/tap/routing/component/RoutingComponent.kt index 97fa1777e1..9709e18553 100644 --- a/app/src/main/java/com/tangem/tap/routing/component/RoutingComponent.kt +++ b/app/src/main/java/com/tangem/tap/routing/component/RoutingComponent.kt @@ -38,6 +38,6 @@ internal interface RoutingComponent : ComposableContentComponent { } interface Factory { - fun create(context: AppComponentContext): RoutingComponent + fun create(context: AppComponentContext, initialStack: List?): RoutingComponent } } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/routing/component/impl/DefaultRoutingComponent.kt b/app/src/main/java/com/tangem/tap/routing/component/impl/DefaultRoutingComponent.kt index 1cc059364d..cafffe14d3 100644 --- a/app/src/main/java/com/tangem/tap/routing/component/impl/DefaultRoutingComponent.kt +++ b/app/src/main/java/com/tangem/tap/routing/component/impl/DefaultRoutingComponent.kt @@ -34,6 +34,7 @@ import dagger.assisted.AssistedInject @Suppress("LongParameterList") internal class DefaultRoutingComponent @AssistedInject constructor( @Assisted context: AppComponentContext, + @Assisted val initialStack: List?, private val childFactory: ChildFactory, private val appRouterConfig: AppRouterConfig, private val uiDependencies: UiDependencies, @@ -46,8 +47,8 @@ internal class DefaultRoutingComponent @AssistedInject constructor( override val stack: Value> = childStack( source = navigationProvider.getOrCreateTyped(), - serializer = AppRoute.serializer(), - initialConfiguration = getInitialRoute(), + initialStack = { getInitialStackOrInit() }, + serializer = null, // AppRoute.serializer(), // Disabled until Nav refactoring completes handleBackButton = false, childFactory = ::child, ) @@ -115,7 +116,11 @@ internal class DefaultRoutingComponent @AssistedInject constructor( } // TODO: Find correct initial route here: [REDACTED_JIRA] - private fun getInitialRoute(): AppRoute = AppRoute.Initial + private fun getInitialStackOrInit(): List = if (initialStack.isNullOrEmpty()) { + listOf(AppRoute.Initial) + } else { + initialStack + } private fun child(route: AppRoute, context: ComponentContext): Child { return childFactory.createChild(route) { childByContext(context) } @@ -123,6 +128,6 @@ internal class DefaultRoutingComponent @AssistedInject constructor( @AssistedFactory interface Factory : RoutingComponent.Factory { - override fun create(context: AppComponentContext): DefaultRoutingComponent + override fun create(context: AppComponentContext, initialStack: List?): DefaultRoutingComponent } } \ No newline at end of file diff --git a/data/staking/build.gradle.kts b/data/staking/build.gradle.kts index 537fae1b87..9af26ac76e 100644 --- a/data/staking/build.gradle.kts +++ b/data/staking/build.gradle.kts @@ -49,6 +49,7 @@ dependencies { implementation(deps.moshi) implementation(deps.moshi.kotlin) implementation(deps.timber) + implementation(deps.firebase.crashlytics) ksp(deps.moshi.kotlin.codegen) kaptForObfuscatingVariants(deps.retrofit.response.type.keeper) diff --git a/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt b/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt index 8918737e14..d567eb6334 100644 --- a/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt +++ b/data/staking/src/main/java/com/tangem/data/staking/DefaultStakingRepository.kt @@ -2,6 +2,7 @@ package com.tangem.data.staking import android.util.Base64 import arrow.core.getOrElse +import com.google.firebase.crashlytics.FirebaseCrashlytics import com.squareup.moshi.Moshi import com.tangem.blockchain.common.Amount import com.tangem.blockchain.common.Blockchain @@ -375,7 +376,8 @@ internal class DefaultStakingRepository( if (it != null) { send(it) } else { - error("No yield balance available for currency ${cryptoCurrency.id.value}") + FirebaseCrashlytics.getInstance() + .log("No yield balance available for currency ${cryptoCurrency.id.value}") } } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/Wallet2CobrandImage.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/Wallet2CobrandImage.kt index f24b36a03b..3c468610ba 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/Wallet2CobrandImage.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/domain/Wallet2CobrandImage.kt @@ -230,12 +230,24 @@ internal enum class Wallet2CobrandImage( batchIds = setOf("BB000010"), ), + SpringBloom( + cards2ResId = R.drawable.ill_spring_bloom_card2_120_106, + cards3ResId = R.drawable.ill_spring_bloom_card3_120_106, + batchIds = setOf("AF990001", "AF990002", "AF990004"), + ), + StealthCard( cards2ResId = R.drawable.ill_stealth_cards2_120_106, cards3ResId = R.drawable.ill_stealth_cards3_120_106, batchIds = setOf("AF60", "AF74", "AF88"), ), + SunDrop( + cards2ResId = R.drawable.ill_sundrop_cards2_120_106, + cards3ResId = R.drawable.ill_sundrop_cards3_120_106, + batchIds = setOf("AF990005", "AF990003"), + ), + Trillant( cards2ResId = R.drawable.ill_trillant_card2_120_106, cards3ResId = R.drawable.ill_trillant_card3_120_106, diff --git a/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card2_120_106.webp b/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card2_120_106.webp new file mode 100644 index 0000000000..49062f9073 Binary files /dev/null and b/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card2_120_106.webp differ diff --git a/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card3_120_106.webp b/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card3_120_106.webp new file mode 100644 index 0000000000..ca7081b627 Binary files /dev/null and b/features/wallet/impl/src/main/res/drawable/ill_spring_bloom_card3_120_106.webp differ diff --git a/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards2_120_106.webp b/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards2_120_106.webp new file mode 100644 index 0000000000..95b756fe4b Binary files /dev/null and b/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards2_120_106.webp differ diff --git a/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards3_120_106.webp b/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards3_120_106.webp new file mode 100644 index 0000000000..61f134ebae Binary files /dev/null and b/features/wallet/impl/src/main/res/drawable/ill_sundrop_cards3_120_106.webp differ diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 5a5650618e..46a2fb346d 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -1,5 +1,5 @@ [versions] -tangemBlockchainSdk = "develop-973" +tangemBlockchainSdk = "develop-974" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "develop-437" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^