From 67e8a6f9dc329c355081fe894b620f137cb56f39 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 9 Oct 2018 14:01:58 +0100 Subject: [PATCH] Recovery key formatting is now done by the js-sdk --- .../views/dialogs/keybackup/RestoreKeyBackupDialog.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js index 1dc927055d..9e5e61cb1a 100644 --- a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js +++ b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js @@ -20,10 +20,6 @@ import MatrixClientPeg from '../../../../MatrixClientPeg'; import { _t } from '../../../../languageHandler'; -function isRecoveryKeyValid(r) { - return MatrixClientPeg.get().isValidRecoveryKey(r.replace(/ /g, '')); -} - /** * Dialog for restoring e2e keys from a backup and the user's recovery key */ @@ -55,7 +51,7 @@ export default React.createClass({ _onRecoveryKeyChange: function(e) { this.setState({ recoveryKey: e.target.value, - recoveryKeyValid: isRecoveryKeyValid(e.target.value), + recoveryKeyValid: MatrixClientPeg.get().isValidRecoveryKey(e.target.value), }); },