diff --git a/app/src/main/java/com/tangem/tap/domain/userWalletList/di/UserWalletsListManagerModule.kt b/app/src/main/java/com/tangem/tap/domain/userWalletList/di/UserWalletsListManagerModule.kt index 3951929b3c..6fdd327d88 100644 --- a/app/src/main/java/com/tangem/tap/domain/userWalletList/di/UserWalletsListManagerModule.kt +++ b/app/src/main/java/com/tangem/tap/domain/userWalletList/di/UserWalletsListManagerModule.kt @@ -6,6 +6,7 @@ import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory import com.tangem.common.authentication.storage.AuthenticatedStorage import com.tangem.common.json.TangemSdkAdapter import com.tangem.common.services.secure.SecureStorage +import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.datasource.local.preferences.AppPreferencesStore import com.tangem.domain.models.scan.serialization.* import com.tangem.domain.visa.model.VisaActivationRemoteState @@ -42,16 +43,23 @@ internal object UserWalletsListManagerModule { @ApplicationContext applicationContext: Context, appPreferencesStore: AppPreferencesStore, dispatchers: CoroutineDispatcherProvider, + analyticsEventHandler: AnalyticsEventHandler, ): UserWalletsListManager { return GeneralUserWalletsListManager( runtimeUserWalletsListManager = RuntimeUserWalletsListManager(), - biometricUserWalletsListManager = createBiometricUserWalletsListManager(applicationContext), + biometricUserWalletsListManager = createBiometricUserWalletsListManager( + applicationContext, + analyticsEventHandler, + ), appPreferencesStore = appPreferencesStore, dispatchers = dispatchers, ) } - private fun createBiometricUserWalletsListManager(applicationContext: Context): UserWalletsListManager { + private fun createBiometricUserWalletsListManager( + applicationContext: Context, + analyticsEventHandler: AnalyticsEventHandler, + ): UserWalletsListManager { val moshi = Moshi.Builder() .add(WalletDerivedKeysMapAdapter()) .add(ScanResponseDerivedKeysMapAdapter()) @@ -88,6 +96,7 @@ internal object UserWalletsListManagerModule { moshi = moshi, secureStorage = secureStorage, authenticatedStorage = authenticatedStorage, + analyticsEventHandler = analyticsEventHandler, ) val publicInformationRepository = DefaultUserWalletsPublicInformationRepository( diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt index 4be56e4101..6f6b569334 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/ui/StateBuilder.kt @@ -29,13 +29,13 @@ import com.tangem.feature.swap.domain.models.domain.IncludeFeeInAmount import com.tangem.feature.swap.domain.models.domain.NetworkInfo import com.tangem.feature.swap.domain.models.domain.SwapProvider import com.tangem.feature.swap.domain.models.ui.* +import com.tangem.feature.swap.model.SwapNotificationsFactory +import com.tangem.feature.swap.model.SwapProcessDataState import com.tangem.feature.swap.models.* import com.tangem.feature.swap.models.states.* import com.tangem.feature.swap.models.states.events.SwapEvent import com.tangem.feature.swap.presentation.R -import com.tangem.feature.swap.model.SwapNotificationsFactory import com.tangem.feature.swap.utils.formatToUIRepresentation -import com.tangem.feature.swap.model.SwapProcessDataState import com.tangem.utils.Provider import com.tangem.utils.StringsSigns.DASH_SIGN import com.tangem.utils.StringsSigns.PERCENT @@ -750,6 +750,9 @@ internal class StateBuilder( fun loadingPermissionState(uiState: SwapStateHolder): SwapStateHolder { return uiState.copy( + swapButton = uiState.swapButton.copy( + enabled = false, + ), permissionState = GiveTxPermissionState.InProgress, notifications = notificationsFactory.getApprovalInProgressStateNotification(uiState.notifications), )