mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-28 01:15:23 -04:00
bugfixes
This commit is contained in:
parent
a6666d3a6c
commit
00aad2c728
12 changed files with 158 additions and 183 deletions
|
@ -571,13 +571,15 @@ class VeilidJS extends Veilid {
|
|||
|
||||
@override
|
||||
List<CryptoKind> validCryptoKinds() {
|
||||
return jsonDecode(js_util.callMethod(wasm, "valid_crypto_kinds", []));
|
||||
final vck = jsonDecode(js_util.callMethod(wasm, "valid_crypto_kinds", []))
|
||||
as List<dynamic>;
|
||||
return vck.map((v) => v as CryptoKind).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<VeilidCryptoSystem> getCryptoSystem(CryptoKind kind) async {
|
||||
if (!validCryptoKinds().contains(kind)) {
|
||||
throw VeilidAPIExceptionGeneric("unsupported cryptosystem");
|
||||
throw const VeilidAPIExceptionGeneric("unsupported cryptosystem");
|
||||
}
|
||||
return VeilidCryptoSystemJS._(this, kind);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue