Skip to content

Commit

Permalink
feat: enable dynamic derivations in production
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry-Borodin committed Dec 22, 2023
1 parent 05fde08 commit d40150b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
2 changes: 0 additions & 2 deletions android/src/main/java/io/parity/signer/domain/FeatureFlags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ object FeatureFlags {
FeatureOption.SKIP_UNLOCK_FOR_DEVELOPMENT -> false
FeatureOption.SKIP_ROOTED_CHECK_EMULATOR -> false
FeatureOption.EXPORT_SECRET_KEY -> false //unused
FeatureOption.ENABLE_DYNAMIC_DERIVATIONS -> true // enable for debug only
FeatureOption.FAIL_DB_VERSION_CHECK -> false

}
Expand All @@ -23,7 +22,6 @@ object FeatureFlags {

enum class FeatureOption {
FAIL_DB_VERSION_CHECK,
ENABLE_DYNAMIC_DERIVATIONS,
SKIP_UNLOCK_FOR_DEVELOPMENT,
SKIP_ROOTED_CHECK_EMULATOR,
EXPORT_SECRET_KEY; //unused as sample
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,31 +139,13 @@ class CameraViewModel() : ViewModel() {
}

is DecodeSequenceResult.DynamicDerivations -> {
if (FeatureFlags.isEnabled(FeatureOption.ENABLE_DYNAMIC_DERIVATIONS)) {
resetScanValues()
_dynamicDerivationPayload.value = payload.s
} else {
val context = ServiceLocator.appContext
Toast.makeText(
context,
"Dynamic derivations not supported yet",
Toast.LENGTH_LONG
).show()
}
resetScanValues()
_dynamicDerivationPayload.value = payload.s
}

is DecodeSequenceResult.DynamicDerivationTransaction -> {
if (FeatureFlags.isEnabled(FeatureOption.ENABLE_DYNAMIC_DERIVATIONS)) {
resetScanValues()
_dynamicDerivationTransactionPayload.value = payload.s
} else {
val context = ServiceLocator.appContext
Toast.makeText(
context,
"Dynamic derivations not supported yet",
Toast.LENGTH_LONG
).show()
}
resetScanValues()
_dynamicDerivationTransactionPayload.value = payload.s
}
}

Expand Down

0 comments on commit d40150b

Please sign in to comment.