mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-19 06:30:39 -04:00
debugging work
This commit is contained in:
parent
739df7c427
commit
d6b1c20906
71 changed files with 4155 additions and 3616 deletions
|
@ -1,5 +1,6 @@
|
|||
import 'dart:typed_data';
|
||||
|
||||
import '../src/dynamic_debug.dart';
|
||||
import '../veilid_support.dart' as veilid;
|
||||
import 'veilid.pb.dart' as proto;
|
||||
|
||||
|
@ -150,3 +151,26 @@ extension ProtoKeyPair on proto.KeyPair {
|
|||
veilid.KeyPair toVeilid() =>
|
||||
veilid.KeyPair(key: key.toVeilid(), secret: secret.toVeilid());
|
||||
}
|
||||
|
||||
void registerVeilidProtoToDebug() {
|
||||
dynamic toDebug(dynamic protoObj) {
|
||||
if (protoObj is proto.CryptoKey) {
|
||||
return protoObj.toVeilid();
|
||||
}
|
||||
if (protoObj is proto.Signature) {
|
||||
return protoObj.toVeilid();
|
||||
}
|
||||
if (protoObj is proto.Nonce) {
|
||||
return protoObj.toVeilid();
|
||||
}
|
||||
if (protoObj is proto.TypedKey) {
|
||||
return protoObj.toVeilid();
|
||||
}
|
||||
if (protoObj is proto.KeyPair) {
|
||||
return protoObj.toVeilid();
|
||||
}
|
||||
return protoObj;
|
||||
}
|
||||
|
||||
DynamicDebug.registerToDebug(toDebug);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue