Updated on 2026-08-14
This commit is contained in:
parent
b03396d7b1
commit
af2b62dbe3
21 changed files with 38 additions and 95 deletions
|
|
@ -1,11 +0,0 @@
|
|||
package com.tangem.tap.features.demo
|
||||
|
||||
import com.tangem.datasource.demo.DemoModeDatasource
|
||||
import com.tangem.tap.proxy.AppStateHolder
|
||||
import javax.inject.Inject
|
||||
|
||||
class DefaultDemoModeDatasource @Inject constructor(private val appStateHolder: AppStateHolder) : DemoModeDatasource {
|
||||
|
||||
override val isDemoModeActive: Boolean
|
||||
get() = appStateHolder.scanResponse?.let { DemoHelper.isDemoCard(it) } == true
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.tangem.tap.features.demo.di
|
||||
|
||||
import com.tangem.datasource.demo.DemoModeDatasource
|
||||
import com.tangem.tap.features.demo.DefaultDemoModeDatasource
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal interface DemoModule {
|
||||
|
||||
@Binds
|
||||
@Singleton
|
||||
fun bindDemoModeHelper(demoModeHelper: DefaultDemoModeDatasource): DemoModeDatasource
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue