 
 // MARK: - KeyRecoveryPassphraseCoordinatorDelegate
 extension KeyBackupSetupCoordinator: KeyBackupSetupPassphraseCoordinatorDelegate {
-    func keyBackupSetupPassphraseCoordinator(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinatorType, didCompleteWithMegolmBackupCreationInfo megolmBackupCreationInfo: MXMegolmBackupCreationInfo) {
-        self.showRecoveryKey(with: megolmBackupCreationInfo, animated: true)
+    func keyBackupSetupPassphraseCoordinator(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinatorType, didCreateBackupFromPassphraseWithResultingRecoveryKey recoveryKey: String) {
+        self.showSetupPassphraseSuccess(with: recoveryKey, animated: true)
+    }
+    
+    func keyBackupSetupPassphraseCoordinator(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinatorType, didCreateBackupFromRecoveryKey recoveryKey: String) {
+        self.showSetupRecoveryKeySuccess(with: recoveryKey, animated: true)
     }
     
     func keyBackupSetupPassphraseCoordinatorDidCancel(_ keyBackupSetupPassphraseCoordinator: KeyBackupSetupPassphraseCoordinatorType) {

        }
    }
    
    private func showRecoveryKey(with megolmBackupCreationInfo: MXMegolmBackupCreationInfo, animated: Bool) {
        
        let keyBackupSetupRecoveryKeyCoordinator = KeyBackupSetupRecoveryKeyCoordinator(session: self.session, megolmBackupCreationInfo: megolmBackupCreationInfo)
        keyBackupSetupRecoveryKeyCoordinator.delegate = self
        keyBackupSetupRecoveryKeyCoordinator.start()
        
        self.add(childCoordinator: keyBackupSetupRecoveryKeyCoordinator)
        self.navigationRouter.push(keyBackupSetupRecoveryKeyCoordinator, animated: animated) { [weak self] in
            self?.remove(childCoordinator: keyBackupSetupRecoveryKeyCoordinator)
        }
    }
}


    }
}

// MARK: - KeyBackupSetupSuccessFromPassphraseViewControllerDelegate
extension KeyBackupSetupCoordinator: KeyBackupSetupSuccessFromPassphraseViewControllerDelegate {
    func keyBackupSetupSuccessFromPassphraseViewControllerDidTapDoneAction(_ viewController: KeyBackupSetupSuccessFromPassphraseViewController) {
        self.delegate?.keyBackupSetupCoordinatorDidSetupRecoveryKey(self)
    }
}

// MARK: - KeyBackupSetupSuccessFromRecoveryKeyViewControllerDelegate
extension KeyBackupSetupCoordinator: KeyBackupSetupSuccessFromRecoveryKeyViewControllerDelegate {
    func keyBackupSetupSuccessFromRecoveryKeyViewControllerDidTapDoneAction(_ viewController: KeyBackupSetupSuccessFromRecoveryKeyViewController) {
        self.delegate?.keyBackupSetupCoordinatorDidSetupRecoveryKey(self)
    }
}
