chore: update sdk & remove selfSign

This commit is contained in:
Sorunome 2021-02-13 15:07:30 +01:00
parent d300da147a
commit 26f7cb342c
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
2 changed files with 2 additions and 17 deletions

View File

@ -3,7 +3,6 @@ import 'package:famedlysdk/encryption.dart';
import 'package:famedlysdk/encryption/utils/bootstrap.dart'; import 'package:famedlysdk/encryption/utils/bootstrap.dart';
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
import 'package:fluffychat/components/dialogs/adaptive_flat_button.dart'; import 'package:fluffychat/components/dialogs/adaptive_flat_button.dart';
import 'package:fluffychat/utils/sentry_controller.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -179,24 +178,10 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
_recoveryKeyInputLoading = true; _recoveryKeyInputLoading = true;
}); });
try { try {
final input = _recoveryKeyTextEditingController.text.trim();
await bootstrap.newSsssKey.unlock( await bootstrap.newSsssKey.unlock(
keyOrPassphrase: input, keyOrPassphrase: _recoveryKeyTextEditingController.text,
); );
await bootstrap.openExistingSsss(); await bootstrap.openExistingSsss();
if (widget.client.encryption.crossSigning.enabled) {
Logs().v(
'Cross signing is already enabled. Try to self-sign');
try {
await widget.client.encryption.crossSigning
.selfSign(recoveryKey: input);
} catch (e, s) {
// ignore: unawaited_futures
SentryController.captureException(
'Unable to self sign with recovery key after successfully open existing SSSS: ${e.toString()}',
s);
}
}
} catch (e, s) { } catch (e, s) {
Logs().w('Unable to unlock SSSS', e, s); Logs().w('Unable to unlock SSSS', e, s);
setState(() => _recoveryKeyInputError = setState(() => _recoveryKeyInputError =

View File

@ -223,7 +223,7 @@ packages:
description: description:
path: "." path: "."
ref: main ref: main
resolved-ref: fb5a0bc6a20c2b60e72ac409c4506d0a319e7fb8 resolved-ref: "41522e868d7672f2a67b0f2e3bae050435f15f4f"
url: "https://gitlab.com/famedly/famedlysdk.git" url: "https://gitlab.com/famedly/famedlysdk.git"
source: git source: git
version: "0.0.1" version: "0.0.1"