#30 fix: parse mem

This commit is contained in:
lollipopkit
2023-05-10 13:25:46 +08:00
parent c1d1af8c01
commit 4f82eb09d8
11 changed files with 111 additions and 60 deletions

View File

@@ -105,18 +105,16 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
);
});
final info = PrivateKeyInfo(name, key, '');
bool haveErr = false;
try {
info.privateKey = await compute(decyptPem, [key, pwd]);
} catch (e) {
showSnackBar(context, Text(e.toString()));
haveErr = true;
rethrow;
} finally {
setState(() {
_loading = const SizedBox();
});
}
if (haveErr) return;
if (widget.info != null) {
_provider.updateInfo(widget.info!, info);
} else {