fix compilation
This commit is contained in:
parent
6e371b7d2d
commit
9fbc0cdd46
@ -522,7 +522,9 @@ internal class RealmCryptoStore @Inject constructor(
|
|||||||
val key = it.keyBackupRecoveryKey
|
val key = it.keyBackupRecoveryKey
|
||||||
val version = it.keyBackupRecoveryKeyVersion
|
val version = it.keyBackupRecoveryKeyVersion
|
||||||
if (!key.isNullOrBlank() && !version.isNullOrBlank()) {
|
if (!key.isNullOrBlank() && !version.isNullOrBlank()) {
|
||||||
SavedKeyBackupKeyInfo(recoveryKey = BackupUtils.recoveryKeyFromBase58(key), version = version)
|
BackupUtils.recoveryKeyFromBase58(key)?.let { recoveryKey ->
|
||||||
|
SavedKeyBackupKeyInfo(recoveryKey = recoveryKey, version = version)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
package org.matrix.android.sdk.api.session.crypto.keysbackup
|
package org.matrix.android.sdk.api.session.crypto.keysbackup
|
||||||
|
|
||||||
object BackupUtils {
|
object BackupUtils {
|
||||||
fun recoveryKeyFromBase58(key: String): IBackupRecoveryKey = BackupRecoveryKey.fromBase58(key)
|
fun recoveryKeyFromBase58(key: String): IBackupRecoveryKey? = BackupRecoveryKey.fromBase58(key)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user