Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-26 18:22:59 +04:00
parent e0262f6d9f
commit 0a07579089

View file

@ -23,7 +23,9 @@ internal class QrScanningViewModel @Inject constructor(
savedStateHandle: SavedStateHandle,
) : ViewModel() {
private val source: SourceType = savedStateHandle[AppRoute.QrScanning.SOURCE_KEY] ?: error("Source is mandatory")
private val source: SourceType = savedStateHandle.get<Int>(AppRoute.QrScanning.SOURCE_KEY)
?.let { SourceType.entries[it] }
?: error("Source is mandatory")
private val network: String? = savedStateHandle[AppRoute.QrScanning.NETWORK_KEY]
val uiState: StateFlow<QrScanningState> = stateHolder.uiState