optimization work and crypto overrides for dht operations

This commit is contained in:
Christien Rioux 2024-04-04 22:31:09 -04:00
parent 9bb20f4dd2
commit 5da68b2d94
4 changed files with 77 additions and 36 deletions

View file

@ -5,14 +5,16 @@ import '../../proto/proto.dart' as proto;
// Watch subkey #1 of the ContactRequest record for accept/reject
class ContactRequestInboxCubit
extends DefaultDHTRecordCubit<proto.SignedContactResponse> {
extends DefaultDHTRecordCubit<proto.SignedContactResponse?> {
ContactRequestInboxCubit(
{required this.activeAccountInfo, required this.contactInvitationRecord})
: super(
open: () => _open(
activeAccountInfo: activeAccountInfo,
contactInvitationRecord: contactInvitationRecord),
decodeState: proto.SignedContactResponse.fromBuffer);
decodeState: (buf) => buf.isEmpty
? null
: proto.SignedContactResponse.fromBuffer(buf));
// ContactRequestInboxCubit.value(
// {required super.record,