-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flexa hidden behind feature flag (#1676)
* Flexa hidden behind feature flag * Remove unused flag IS_FIAT_CONVERSION_ENABLED * Code cleanup * Kotlin flow handling --------- Co-authored-by: Honza <[email protected]>
- Loading branch information
1 parent
882605d
commit d4be4a5
Showing
19 changed files
with
89 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 3 additions & 8 deletions
11
ui-lib/src/main/java/co/electriccoin/zcash/ui/common/usecase/IsFlexaAvailableUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
package co.electriccoin.zcash.ui.common.usecase | ||
|
||
import co.electriccoin.zcash.ui.BuildConfig | ||
import co.electriccoin.zcash.ui.common.provider.GetVersionInfoProvider | ||
import co.electriccoin.zcash.ui.common.repository.ConfigurationRepository | ||
|
||
class IsFlexaAvailableUseCase( | ||
private val getVersionInfo: GetVersionInfoProvider, | ||
private val configurationRepository: ConfigurationRepository | ||
) { | ||
operator fun invoke(): Boolean { | ||
val versionInfo = getVersionInfo() | ||
val isDebug = versionInfo.let { it.isDebuggable && !it.isRunningUnderTestService } | ||
return !versionInfo.isTestnet && (BuildConfig.ZCASH_FLEXA_KEY.isNotEmpty() || isDebug) | ||
} | ||
suspend operator fun invoke() = configurationRepository.isFlexaAvailable() | ||
} |
9 changes: 9 additions & 0 deletions
9
...b/src/main/java/co/electriccoin/zcash/ui/common/usecase/ObserveIsFlexaAvailableUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package co.electriccoin.zcash.ui.common.usecase | ||
|
||
import co.electriccoin.zcash.ui.common.repository.ConfigurationRepository | ||
|
||
class ObserveIsFlexaAvailableUseCase( | ||
private val configurationRepository: ConfigurationRepository | ||
) { | ||
operator fun invoke() = configurationRepository.isFlexaAvailable | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.