Recovery key formatting is now done by the js-sdk

pull/21833/head
David Baker 2018-10-09 14:01:58 +01:00
parent 387128ed1e
commit 67e8a6f9dc
1 changed files with 1 additions and 5 deletions

View File

@ -20,10 +20,6 @@ import MatrixClientPeg from '../../../../MatrixClientPeg';
import { _t } from '../../../../languageHandler'; 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 * 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) { _onRecoveryKeyChange: function(e) {
this.setState({ this.setState({
recoveryKey: e.target.value, recoveryKey: e.target.value,
recoveryKeyValid: isRecoveryKeyValid(e.target.value), recoveryKeyValid: MatrixClientPeg.get().isValidRecoveryKey(e.target.value),
}); });
}, },