Fixes after rebase
This commit is contained in:
@@ -18,7 +18,7 @@ import io.element.android.libraries.architecture.createNode
|
||||
|
||||
@ContributesBinding(AppScope::class)
|
||||
@Inject
|
||||
class DefaultSecureBackupEntryPoint() : SecureBackupEntryPoint {
|
||||
class DefaultSecureBackupEntryPoint : SecureBackupEntryPoint {
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): SecureBackupEntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import com.freeletics.flowredux.dsl.State as MachineState
|
||||
|
||||
@Inject
|
||||
class SecureBackupSetupStateMachine() : FlowReduxStateMachine<SecureBackupSetupStateMachine.State, SecureBackupSetupStateMachine.Event>(
|
||||
class SecureBackupSetupStateMachine : FlowReduxStateMachine<SecureBackupSetupStateMachine.State, SecureBackupSetupStateMachine.Event>(
|
||||
initialState = State.Initial
|
||||
) {
|
||||
init {
|
||||
|
||||
@@ -13,7 +13,7 @@ private const val RECOVERY_KEY_LENGTH = 48
|
||||
private const val BASE_58_ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||||
|
||||
@Inject
|
||||
class RecoveryKeyTools() {
|
||||
class RecoveryKeyTools {
|
||||
fun isRecoveryKeyFormatValid(recoveryKey: String): Boolean {
|
||||
val recoveryKeyWithoutSpace = recoveryKey.replace("\\s+".toRegex(), "")
|
||||
return recoveryKeyWithoutSpace.length == RECOVERY_KEY_LENGTH && recoveryKeyWithoutSpace.all { BASE_58_ALPHABET.contains(it) }
|
||||
|
||||
Reference in New Issue
Block a user